diff --git a/Legacy/Aria/ArNetworking/ArNetworking-Reference.html b/Legacy/Aria/ArNetworking/ArNetworking-Reference.html new file mode 100644 index 0000000..dc35573 --- /dev/null +++ b/Legacy/Aria/ArNetworking/ArNetworking-Reference.html @@ -0,0 +1,16 @@ + + +ArNetworking Documentation + + + +

ArNetworking Index

+
+
+
+
+
(If the ArNetworking index isn't loaded automatically,
please click +the above hyperlink,
or locate the index.html page in +docs/.)
+ + diff --git a/Legacy/Aria/ArNetworking/CommandLineOptions.txt b/Legacy/Aria/ArNetworking/CommandLineOptions.txt new file mode 100644 index 0000000..d8d4a76 --- /dev/null +++ b/Legacy/Aria/ArNetworking/CommandLineOptions.txt @@ -0,0 +1,68 @@ + +ArNetworking 2.8.0 + +Summary of command line options + +Some classes in ARIA and ArNetworking check a program's run time options to +specify parameters and options. These options are used to configure run time +accessory device parameters (ports, speeds, etc.) used by ARIA; host names, +port numbers, etc. used by ArNetworking; and various other run time options. +Options may be given as program arguments on the command line, or globally +saved as defaults in the file /etc/Aria.args if on Linux, or in the ARIAARGS +environment variable. Arguments given on the command line may override some +internal defaults or values read from the robot parameter files. + +Note, an option will be available only in programs that instantiate an +object of the class that uses it. Some programs may also check for +program-specific command line options. + +Use the special "-help" command line option to cause a program to +print out its available options. + +A list of options used by each class follows. + + +ArClientSimpleConnector +----------------------- +Options for ArClientSimpleConnector (see docs for more details): +-host +-port +-p +-user +-u +-password +-pwd +-nopassword +-np +-logDataList +-ldl + +ArServerSimpleOpener +-------------------- +Options for ArServerSimpleOpener: +-serverPort +-sp +-serverIP +-sip +-serverTcpOnly +-userInfo +-ui +-logUserInfo +-lui +-logCommandGroups +-lcg +-serverInfoFile + + +ArClientSwitchManager +--------------------- +ArClientSwitchManager options: +-centralServer +-cs +-centralServerPort +-csp +-identifier +-id +-centralServerInfoFile + + diff --git a/Legacy/Aria/ArNetworking/CommandLineOptions.txt.in b/Legacy/Aria/ArNetworking/CommandLineOptions.txt.in new file mode 100644 index 0000000..c0d33fa --- /dev/null +++ b/Legacy/Aria/ArNetworking/CommandLineOptions.txt.in @@ -0,0 +1,68 @@ + +ArNetworking @ARIA_VERSION@ + +Summary of command line options + +Some classes in ARIA and ArNetworking check a program's run time options to +specify parameters and options. These options are used to configure run time +accessory device parameters (ports, speeds, etc.) used by ARIA; host names, +port numbers, etc. used by ArNetworking; and various other run time options. +Options may be given as program arguments on the command line, or globally +saved as defaults in the file /etc/Aria.args if on Linux, or in the ARIAARGS +environment variable. Arguments given on the command line may override some +internal defaults or values read from the robot parameter files. + +Note, an option will be available only in programs that instantiate an +object of the class that uses it. Some programs may also check for +program-specific command line options. + +Use the special "-help" command line option to cause a program to +print out its available options. + +A list of options used by each class follows. + + +ArClientSimpleConnector +----------------------- +Options for ArClientSimpleConnector (see docs for more details): +-host +-port +-p +-user +-u +-password +-pwd +-nopassword +-np +-logDataList +-ldl + +ArServerSimpleOpener +-------------------- +Options for ArServerSimpleOpener: +-serverPort +-sp +-serverIP +-sip +-serverTcpOnly +-userInfo +-ui +-logUserInfo +-lui +-logCommandGroups +-lcg +-serverInfoFile + + +ArClientSwitchManager +--------------------- +ArClientSwitchManager options: +-centralServer +-cs +-centralServerPort +-csp +-identifier +-id +-centralServerInfoFile + + diff --git a/Legacy/Aria/ArNetworking/Makefile b/Legacy/Aria/ArNetworking/Makefile new file mode 100644 index 0000000..5b44d50 --- /dev/null +++ b/Legacy/Aria/ArNetworking/Makefile @@ -0,0 +1,260 @@ +CFILEEXT:=cpp +# Make sure we're using a compiler (we probably don't need to define +# it but we have been so here it is unless it was already set) +ifndef CXX +CXX=g++ +endif +BARECXXFLAGS:=-fPIC -g -Wall -D_REENTRANT #-pg -fprofile-arcs +CXXFLAGS+=$(BARECXXFLAGS) -fno-exceptions +CXXINC:=-I../include -Iinclude +CXXLINK:=-L../lib -lAria -lArNetworking -lpthread -ldl -lrt \ + -Xlinker -Bstatic -lstdc++ -Xlinker -Bdynamic +CXXSTATICLINK:=-L../lib -Xlinker -Bstatic -lArNetworking -lAria -Xlinker -Bdynamic -lpthread -ldl -lrt -Xlinker -Bstatic -lstdc++ -Xlinker -Bdynamic + +ifdef JAVA_BIN +JAVAC:=$(JAVA_BIN)/javac +JAR:=$(JAVA_BIN)/jar +else +JAVAC:=javac +JAR:=jar +endif + +CFILES:= \ + ArCentralManager.cpp \ + ArCentralForwarder.cpp \ + ArClientBase.cpp \ + ArClientData.cpp \ + ArClientHandlerConfig.cpp \ + ArClientFileUtils.cpp \ + ArClientSimpleConnector.cpp \ + ArClientSwitchManager.cpp \ + ArClientArgUtils.cpp \ + ArHybridForwarderVideo.cpp \ + ArMapChanger.cpp \ + ArNetPacket.cpp \ + ArNetPacketReceiverUdp.cpp \ + ArNetPacketReceiverTcp.cpp \ + ArNetPacketSenderTcp.cpp \ + ArServerBase.cpp \ + ArServerClient.cpp \ + ArServerData.cpp \ + ArServerFileUtils.cpp \ + ArServerHandlerCamera.cpp \ + ArServerHandlerCameraCollection.cpp \ + ArServerHandlerCommands.cpp \ + ArServerHandlerCommMonitor.cpp \ + ArServerHandlerConfig.cpp \ + ArServerHandlerMap.cpp \ + ArServerHandlerMapping.cpp \ + ArServerHandlerPopup.cpp \ + ArServerMode.cpp \ + ArServerModeDrive.cpp \ + ArServerModeIdle.cpp \ + ArServerModeRatioDrive.cpp \ + ArServerModeStop.cpp \ + ArServerModeWander.cpp \ + ArServerInfoDrawings.cpp \ + ArServerInfoRobot.cpp \ + ArServerInfoSensor.cpp \ + ArServerInfoStrings.cpp \ + ArServerSimpleCommands.cpp \ + ArServerSimpleOpener.cpp \ + ArServerUserInfo.cpp \ + ArTempDirectoryHelper.cpp \ + md5.cpp + + +OTFILES:=$(patsubst %.$(CFILEEXT),%.o,$(CFILES)) +OFILES:=$(patsubst %,../obj/%,$(OTFILES)) + +TARGETS:=../lib/libArNetworking.so examples + +EXAMPLES_CPP:=$(shell find examples -name "*.$(CFILEEXT)" | grep -v Mod.cpp) +EXAMPLES:=$(patsubst %.$(CFILEEXT),%,$(EXAMPLES_CPP)) + +TESTS_CPP:=$(shell find tests -name "*.$(CFILEEXT)" | grep -v Mod.cpp) +TESTS:=$(patsubst %.$(CFILEEXT),%,$(TESTS_CPP)) + +SRC_FILES:=$(patsubst %,src/%,$(CFILES)) +HEADER_FILES:=$(shell find include -type f -name \*.h) + +all: dirs $(TARGETS) + +dirs: + @mkdir -p -v ../obj + @mkdir -p -v ../lib + +../lib/libArNetworking.so: $(OFILES) ../lib/libAria.so Makefile.dep + @mkdir -p -v ../obj + @mkdir -p -v ../lib + $(CXX) -shared -Xlinker -Bstatic -lstdc++ -Xlinker -Bdynamic -o $(@) $(OFILES) + +../lib/libArNetworking.a: $(OFILES) ../lib/libAria.a Makefile.dep + @mkdir -p -v ../obj + @mkdir -p -v ../lib + ar -cr $(@) $(OFILES) + ranlib $(@) + + +examples: dirs $(EXAMPLES) Makefile.dep + + +tests: dirs $(TESTS) Makefile.dep + +clean: cleanExamples + rm -f ../lib/libArNetworking.so ../lib/libArNetworking.a \ + `find . -name core` $(OFILES) `find . -name '*~'` + +cleanPython: + -rm ../python/_ArNetworkingPy.so + -rm ../python/ArNetworkingPy.py + -rm ../python/ArNetworkingPy.pyc + -rm ../python/ArNetworkingPy_wrap.cpp + -rm ../obj/ArNetworkingPy_wrap.o + +cleanExamples: + rm -f $(EXAMPLES) + +cleanDoc: + -rm -f docs/*.html docs/*.png docs/*.png + -rm -rf docs/tmp + +fullClean: clean cleanExamples cleanJava cleanPython cleanDoc + +docs: doc +doc: docs/index.html +docs/index.html: $(SRC_FILES) $(HEADER_FILES) $(EXAMPLES_CPP) doxygen.conf docs/options/all_options.dox ../docs/index.html + $(MAKE) cleanDoc + -mkdir docs + doxygen doxygen.conf + +../docs/index.html: FORCE + $(MAKE) -C .. docs/index.html + +#doxygen.conf: FORCE +# $(MAKE) -C .. ArNetworking/$@ +# +#CommandLineOptions.txt: FORCE +# $(MAKE) -C .. ArNetworking/$@ + +Makefile.dep: + $(MAKE) dep + +dep: clean + if [ -f `echo src/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM src/*.cpp | \ + awk '$$1 ~ /:/{printf "../obj/%s\n", $$0} $$1 !~ /:/' > Makefile.dep; fi + if [ -f `echo examples/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM examples/*.cpp | \ + awk '$$1 ~ /:/{printf "examples/%s\n", $$0} $$1 !~ /:/' | \ + sed 's/\.o//' >> Makefile.dep; fi + +../lib/libAria.so: FORCE + $(MAKE) -C .. dirs lib/libAria.so + +../lib/libAria.a: FORCE + $(MAKE) -C .. dirs lib/libAria.a + +../obj/%.o : src/%.cpp Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) -c $< -o $@ + +../obj/%.o : src/%.c Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) -c $< -o $@ + +# Don't build .o files if their library is up to date with respect to source files: +.INTERMEDIATE: $(OFILES) + +# But don't delete .o files if we do make them in order to make a library: +.PRECIOUS: $(OFILES) + +examples/%: examples/%.$(CFILEEXT) ../lib/libAria.so ../lib/libArNetworking.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXLINK) + +tests/%: tests/%.$(CFILEEXT) ../lib/libAria.so ../lib/libArNetworking.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXLINK) + + +examples/%Static: examples/%.$(CFILEEXT) ../lib/libAria.a ../lib/libArNetworking.a Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXSTATICLINK) + strip $@ + +tests/%Static: tests/%.$(CFILEEXT) ../lib/libAria.a ../lib/libArNetworking.a Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXSTATICLINK) + strip $@ + +CommandLineOptions.txt.in docs/options/all_options.dox: genCommandLineOptionDocs + -mkdir docs/options + ./genCommandLineOptionDocs + +genCommandLineOptionDocs: ../utils/genCommandLineOptionDocs.cpp ../lib/libAria.so ../lib/libArNetworking.so src/ArServerSimpleOpener.cpp src/ArClientSimpleConnector.cpp src/ArClientSwitchManager.cpp + $(CXX) $(CXXFLAGS) -DFOR_ARNETWORKING $(CXXINC) $< -o $@ $(CXXLINK) + +## Python SWIG wrapper ## + +ifdef PYTHON_INCLUDE +PYTHON_INCLUDE_FLAGS=-I$(PYTHON_INCLUDE) +else +ifdef DIST_INSTALL +$(warning WARNING using default value of /usr/include/python2.5 for PYTHON_INCLUDE directory. Set PYTHON_INCLUDE environment variable if you would like to use a different version of the Python C development library to build the Python ARIA wrapper.) +endif +PYTHON_INCLUDE:=/usr/include/python2.5 +PYTHON_INCLUDE_FLAGS=-I/usr/include/python2.5 +endif + +python: ariaPython ../python/_ArNetworkingPy.so + +ariaPython: + $(MAKE) -C .. python + +../python/ArNetworkingPy_wrap.cpp ../python/ArNetworkingPy.py: include/wrapper.i $(HEADER_FILES) + cd ../python; swig -c++ -python -module ArNetworkingPy -Dlinux -DAREXPORT -o ArNetworkingPy_wrap.cpp -I../include -I../ArNetworking/include ../ArNetworking/include/wrapper.i + +../python/_ArNetworkingPy.so: ../obj/ArNetworkingPy_wrap.o ../lib/libArNetworking.so Makefile.dep + $(CXX) $(BARECXXFLAGS) -shared -o $(@) ../obj/ArNetworkingPy_wrap.o -lpthread -ldl -lrt \ + -L../lib -lAria -lArNetworking + +../obj/ArNetworkingPy_wrap.o: ../python/ArNetworkingPy_wrap.cpp + @ if test -z "$(PYTHON_INCLUDE)"; then echo "*** Error: PYTHON_INCLUDE is not set, cannot build ArNetworking python wrapper! ***"; exit 1; fi + $(CXX) -c $(BARECXXFLAGS) -g $(CXXINC) -I$(PYTHON_INCLUDE) $< -o $@ + + +## Java SWIG wrapper ## + + +java: ../lib/libArNetworkingJava.so ../java/ArNetworking.jar + +../java/Aria.jar: + $(MAKE) -C .. java + +../java/ArNetworking.jar: ../java/com/mobilerobots/ArNetworking/ArServerBase.class + cd ../java ; $(JAR) cf ArNetworking.jar com/mobilerobots/ArNetworking/*.class + +../java/ArNetworkingJava_wrap.cpp ../java/com/mobilerobots/ArNetworking/ArServerBase.java: include/wrapper.i $(HEADER_FILES) + -mkdir -p ../java/com/mobilerobots/ArNetworking + rm ../java/com/mobilerobots/ArNetworking/*.java ../java/ArNetworkingJava_wrap.cpp ../java/ArNetworkingJava_wrap.h ; swig -c++ -java -package com.mobilerobots.ArNetworking -outdir ../java/com/mobilerobots/ArNetworking -module ArNetworkingJava -Dlinux -DAREXPORT -o ../java/ArNetworkingJava_wrap.cpp -I../include -Iinclude include/wrapper.i + +../java/com/mobilerobots/ArNetworking/ArServerBase.class: ../java/com/mobilerobots/ArNetworking/ArServerBase.java ../java/Aria.jar + rm ../java/com/mobilerobots/ArNetworking/*.class; $(JAVAC) -classpath ../java/Aria.jar:../java ../java/com/mobilerobots/ArNetworking/*.java + +cleanJava: + -rm ../java/ArNetworking.jar + -rm -r ../java/com/mobilerobots/ArNetworking + -rm ../java/ArNetworkingJava_wrap.* ../obj/ArNetworkingJava_wrap.o ../lib/libArNetworkingJava.so + +../lib/libArNetworkingJava.so: ../obj/ArNetworkingJava_wrap.o Makefile.dep ../lib/libArNetworking.so + $(CXX) $(BARECXXFLAGS) -shared -o $(@) ../obj/ArNetworkingJava_wrap.o -lpthread -ldl -lrt -L../lib -lAria -lArNetworking + +../obj/ArNetworkingJava_wrap.o: ../java/ArNetworkingJava_wrap.cpp + @ if test -z "$(JAVA_INCLUDE)"; then echo "*** Error: JAVA_INCLUDE is not set, building ArNetworkingPy_wrap.cpp will probably fail! ***"; fi + $(CXX) -c $(BARECXXFLAGS) $(CXXINC) -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/linux $< -o $@ + +FORCE: + +# Just see if there is a Makefile.dep, if so include one... there +# should be one because of the rules up in the command line parsing +# part above +ifeq (Makefile.dep,$(wildcard Makefile.dep)) +include Makefile.dep +# End of the Makefile.dep check +endif + diff --git a/Legacy/Aria/ArNetworking/Makefile.dep b/Legacy/Aria/ArNetworking/Makefile.dep new file mode 100644 index 0000000..223a7cd --- /dev/null +++ b/Legacy/Aria/ArNetworking/Makefile.dep @@ -0,0 +1,4845 @@ +../obj/ArCentralForwarder.o: src/ArCentralForwarder.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArCentralForwarder.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArClientBase.h include/ArClientCommands.h include/ArClientData.h +../obj/ArCentralManager.o: src/ArCentralManager.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArCentralManager.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArCentralForwarder.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h +../obj/ArClientArgUtils.o: src/ArClientArgUtils.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientArgUtils.h ../include/ArConfigArg.h \ + include/ArNetPacket.h +../obj/ArClientBase.o: src/ArClientBase.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientBase.h include/ArClientCommands.h \ + include/ArServerCommands.h include/ArNetPacket.h \ + include/ArNetPacketSenderTcp.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketReceiverUdp.h include/ArClientData.h \ + include/ArServerCommands.h include/ArClientCommands.h ../include/md5.h +../obj/ArClientData.o: src/ArClientData.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientData.h include/ArNetPacket.h +../obj/ArClientFileUtils.o: src/ArClientFileUtils.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientFileUtils.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArServerCommands.h \ + include/ArNetPacket.h include/ArNetPacketSenderTcp.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketReceiverUdp.h \ + include/ArClientData.h +../obj/ArClientHandlerConfig.o: src/ArClientHandlerConfig.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientHandlerConfig.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArServerCommands.h \ + include/ArNetPacket.h include/ArNetPacketSenderTcp.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketReceiverUdp.h \ + include/ArClientData.h include/ArClientArgUtils.h +../obj/ArClientSimpleConnector.o: src/ArClientSimpleConnector.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientSimpleConnector.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArServerCommands.h \ + include/ArNetPacket.h include/ArNetPacketSenderTcp.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketReceiverUdp.h \ + include/ArClientData.h +../obj/ArClientSwitchManager.o: src/ArClientSwitchManager.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArClientSwitchManager.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArClientBase.h include/ArClientCommands.h include/ArClientData.h +../obj/ArHybridForwarderVideo.o: src/ArHybridForwarderVideo.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArHybridForwarderVideo.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArClientBase.h include/ArClientCommands.h include/ArClientData.h +../obj/ArMapChanger.o: src/ArMapChanger.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArMapChanger.h ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArNetPacket.h include/ArCentralForwarder.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArClientBase.h include/ArClientCommands.h include/ArClientData.h \ + include/ArClientSwitchManager.h include/ArMapChanger.h \ + ../include/ArFileParser.h ../include/ArMD5Calculator.h ../include/md5.h +../obj/ArNetPacket.o: src/ArNetPacket.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArNetPacket.h +../obj/ArNetPacketReceiverTcp.o: src/ArNetPacketReceiverTcp.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacket.h +../obj/ArNetPacketReceiverUdp.o: src/ArNetPacketReceiverUdp.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArNetPacketReceiverUdp.h include/ArNetPacket.h +../obj/ArNetPacketSenderTcp.o: src/ArNetPacketSenderTcp.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArNetPacketSenderTcp.h include/ArNetPacket.h +../obj/ArServerBase.o: src/ArServerBase.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArServerCommands.h \ + include/ArClientCommands.h include/ArServerMode.h include/ArServerBase.h +../obj/ArServerClient.o: src/ArServerClient.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArServerCommands.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerCommands.h \ + include/ArClientCommands.h include/ArServerData.h \ + include/ArServerUserInfo.h +../obj/ArServerData.o: src/ArServerData.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerData.h include/ArServerClient.h include/ArNetPacket.h \ + include/ArServerCommands.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArNetPacket.h +../obj/ArServerFileUtils.o: src/ArServerFileUtils.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerFileUtils.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerHandlerCamera.o: src/ArServerHandlerCamera.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h \ + include/ArServerHandlerCameraCollection.h ../include/ArFunctor.h \ + ../include/ArCameraCollection.h include/ArServerHandlerCommMonitor.h \ + include/ArServerHandlerCommands.h include/ArServerHandlerPopup.h \ + include/ArServerInfoDrawings.h include/ArServerInfoRobot.h \ + include/ArServerInfoSensor.h include/ArServerHandlerMap.h \ + ../include/ArConfig.h include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +../obj/ArServerHandlerCameraCollection.o: \ + src/ArServerHandlerCameraCollection.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerCameraCollection.h ../include/ArFunctor.h \ + ../include/ArCameraCollection.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + ../include/ArConfigArg.h include/ArClientArgUtils.h +../obj/ArServerHandlerCommMonitor.o: src/ArServerHandlerCommMonitor.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerCommMonitor.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h \ + include/ArServerHandlerCameraCollection.h ../include/ArFunctor.h \ + ../include/ArCameraCollection.h include/ArServerHandlerCommMonitor.h \ + include/ArServerHandlerCommands.h include/ArServerHandlerPopup.h \ + include/ArServerInfoDrawings.h include/ArServerInfoRobot.h \ + include/ArServerInfoSensor.h include/ArServerHandlerMap.h \ + ../include/ArConfig.h include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +../obj/ArServerHandlerCommands.o: src/ArServerHandlerCommands.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerCommands.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerHandlerConfig.o: src/ArServerHandlerConfig.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerConfig.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArClientArgUtils.h +../obj/ArServerHandlerMap.o: src/ArServerHandlerMap.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerMap.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + ../include/ArConfig.h ../include/ArMap.h +../obj/ArServerHandlerMapping.o: src/ArServerHandlerMapping.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerMapping.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArServerHandlerCommands.h include/ArTempDirectoryHelper.h \ + ../include/ariaTypedefs.h ../include/ArFunctor.h +../obj/ArServerHandlerPopup.o: src/ArServerHandlerPopup.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerHandlerPopup.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerInfoDrawings.o: src/ArServerInfoDrawings.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerInfoDrawings.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerInfoRobot.o: src/ArServerInfoRobot.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerInfoRobot.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h \ + include/ArServerMode.h +../obj/ArServerInfoSensor.o: src/ArServerInfoSensor.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerInfoSensor.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerInfoStrings.o: src/ArServerInfoStrings.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerInfoStrings.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerMode.o: src/ArServerMode.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerMode.h include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArServerModeIdle.h \ + include/ArServerMode.h +../obj/ArServerModeDrive.o: src/ArServerModeDrive.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerModeDrive.h ../include/ariaTypedefs.h \ + include/ArNetworking.h include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaUtil.h ../include/ArMapInterface.h \ + ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h \ + include/ArServerHandlerCameraCollection.h ../include/ArFunctor.h \ + ../include/ArCameraCollection.h include/ArServerHandlerCommMonitor.h \ + include/ArServerHandlerCommands.h include/ArServerHandlerPopup.h \ + include/ArServerInfoDrawings.h include/ArServerInfoRobot.h \ + include/ArServerInfoSensor.h include/ArServerHandlerMap.h \ + ../include/ArConfig.h include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +../obj/ArServerModeIdle.o: src/ArServerModeIdle.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerModeIdle.h include/ArServerMode.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerModeRatioDrive.o: src/ArServerModeRatioDrive.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerModeRatioDrive.h ../include/ariaTypedefs.h \ + include/ArServerMode.h include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArServerHandlerCommands.h +../obj/ArServerModeStop.o: src/ArServerModeStop.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerModeStop.h include/ArServerMode.h include/ArServerBase.h \ + include/ArServerCommands.h include/ArServerClient.h \ + include/ArNetPacket.h include/ArNetPacketReceiverTcp.h \ + include/ArNetPacketSenderTcp.h include/ArServerClientData.h \ + include/ArServerClientIdentifier.h include/ArServerData.h \ + include/ArNetPacketReceiverUdp.h include/ArServerUserInfo.h +../obj/ArServerModeWander.o: src/ArServerModeWander.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerModeWander.h ../include/ariaTypedefs.h \ + include/ArNetworking.h include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaUtil.h ../include/ArMapInterface.h \ + ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h \ + include/ArServerHandlerCameraCollection.h ../include/ArFunctor.h \ + ../include/ArCameraCollection.h include/ArServerHandlerCommMonitor.h \ + include/ArServerHandlerCommands.h include/ArServerHandlerPopup.h \ + include/ArServerInfoDrawings.h include/ArServerInfoRobot.h \ + include/ArServerInfoSensor.h include/ArServerHandlerMap.h \ + ../include/ArConfig.h include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +../obj/ArServerSimpleCommands.o: src/ArServerSimpleCommands.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArServerSimpleCommands.h \ + include/ArServerBase.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h +../obj/ArServerSimpleOpener.o: src/ArServerSimpleOpener.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArServerSimpleOpener.h +../obj/ArServerUserInfo.o: src/ArServerUserInfo.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h ../include/ArExport.h \ + include/ArServerUserInfo.h ../include/md5.h +../obj/ArTempDirectoryHelper.o: src/ArTempDirectoryHelper.cpp \ + ../include/ArExport.h include/ArTempDirectoryHelper.h \ + ../include/ariaTypedefs.h ../include/ArFunctor.h \ + ../include/ariaTypedefs.h ../include/ariaOSDef.h ../include/ArLog.h \ + ../include/ArMutex.h ../include/ArFunctor.h ../include/ariaUtil.h \ + ../include/ArLog.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h +../obj/md5.o: src/md5.cpp ../include/ArExport.h ../include/md5.h +examples/clientCommandLister: examples/clientCommandLister.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/clientDemo: examples/clientDemo.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/configClient: examples/configClient.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/configClientToServer: examples/configClientToServer.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/configServer: examples/configServer.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/configServerRobot: examples/configServerRobot.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/drawingsExample: examples/drawingsExample.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/drawingsExampleWithRobot: examples/drawingsExampleWithRobot.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/getVideoExample: examples/getVideoExample.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/popupExample: examples/popupExample.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/proprietaryDirectoryEmptier: examples/proprietaryDirectoryEmptier.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/proprietaryGetSnapshots: examples/proprietaryGetSnapshots.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/ptzCameraClientExample: examples/ptzCameraClientExample.cpp \ + ../include/Aria.h ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h +examples/serverDemo: examples/serverDemo.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h ../include/ArSonarMTX.h +examples/simpleServerExample: examples/simpleServerExample.cpp ../include/Aria.h \ + ../include/ariaOSDef.h ../include/ariaTypedefs.h \ + ../include/ArSerialConnection.h ../include/ArDeviceConnection.h \ + ../include/ariaUtil.h ../include/ArLog.h ../include/ArMutex.h \ + ../include/ArFunctor.h ../include/ArArgumentParser.h \ + ../include/ArArgumentBuilder.h ../include/ArBasePacket.h \ + ../include/ArTcpConnection.h ../include/ArSocket.h \ + ../include/ArSimpleConnector.h ../include/ArRobotConnector.h \ + ../include/ArLaserConnector.h ../include/ArLogFileConnection.h \ + ../include/ArRobotPacket.h ../include/ArRobotPacketSender.h \ + ../include/ArRobotPacketReceiver.h \ + ../include/ArRobotConfigPacketReader.h ../include/ArRobotTypes.h \ + ../include/ArRobotParams.h ../include/ArConfig.h \ + ../include/ArConfigArg.h ../include/ArFileParser.h \ + ../include/ArHasFileName.h ../include/ArConfigGroup.h \ + ../include/ArRobot.h ../include/ArSyncTask.h ../include/ArTaskState.h \ + ../include/ArSensorReading.h ../include/ArTransform.h \ + ../include/ArCondition.h ../include/ArSyncLoop.h \ + ../include/ArASyncTask.h ../include/ArThread.h \ + ../include/ArRobotPacketReaderThread.h ../include/ArActionDesired.h \ + ../include/ArResolver.h ../include/ArInterpolation.h \ + ../include/ArKeyHandler.h ../include/ArCommands.h \ + ../include/ArJoyHandler.h ../include/ariaInternal.h \ + ../include/ArStringInfoGroup.h ../include/ArSonarDevice.h \ + ../include/ArRangeDevice.h ../include/ArRangeBuffer.h \ + ../include/ArDrawingData.h ../include/ArPriorityResolver.h \ + ../include/ArAction.h ../include/ArArg.h ../include/ArActionGroup.h \ + ../include/ArActionGroups.h ../include/ArActionColorFollow.h \ + ../include/ArACTS.h ../include/ArPTZ.h ../include/ArPTZConnector.h \ + ../include/ArActionDeceleratingLimiter.h \ + ../include/ArActionLimiterForwards.h \ + ../include/ArActionLimiterBackwards.h \ + ../include/ArActionLimiterTableSensor.h ../include/ArActionBumpers.h \ + ../include/ArActionIRs.h ../include/ArActionStallRecover.h \ + ../include/ArActionAvoidFront.h ../include/ArActionAvoidSide.h \ + ../include/ArActionConstantVelocity.h ../include/ArActionInput.h \ + ../include/ArActionRobotJoydrive.h ../include/ArActionJoydrive.h \ + ../include/ArActionKeydrive.h ../include/ArActionTriangleDriveTo.h \ + ../include/ArLineFinder.h ../include/ArActionTurn.h \ + ../include/ArActionRatioInput.h ../include/ArActionStop.h \ + ../include/ArActionGoto.h ../include/ArModule.h \ + ../include/ArModuleLoader.h ../include/ArRecurrentTask.h \ + ../include/ArGripper.h ../include/ArSonyPTZ.h ../include/ArRVisionPTZ.h \ + ../include/ArAMPTU.h ../include/ArP2Arm.h ../include/ArSick.h \ + ../include/ArLaser.h ../include/ArRangeDeviceThreaded.h \ + ../include/ArFunctorASyncTask.h ../include/ArLMS2xx.h \ + ../include/ArLMS2xxPacket.h ../include/ArLMS2xxPacketReceiver.h \ + ../include/ArLaserLogger.h ../include/ArIrrfDevice.h \ + ../include/ArDPPTU.h ../include/ArVCC4.h ../include/ArMode.h \ + ../include/ArModes.h ../include/ArTCMCompassRobot.h ../include/ArTCM2.h \ + ../include/ArNetServer.h ../include/ArSignalHandler.h \ + ../include/ArAnalogGyro.h ../include/ArMapInterface.h \ + ../include/ArMapObject.h ../include/ArMapUtils.h ../include/ArMap.h \ + ../include/ArMapComponents.h ../include/ArBumpers.h ../include/ArIRs.h \ + ../include/ArForbiddenRangeDevice.h ../include/ArVersalogicIO.h \ + ../include/ArMTXIO.h ../include/ArActionGotoStraight.h \ + ../include/ArDataLogger.h ../include/ArRobotJoyHandler.h \ + ../include/ArRatioInputKeydrive.h ../include/ArRatioInputJoydrive.h \ + ../include/ArRatioInputRobotJoydrive.h \ + ../include/ArActionMovementParameters.h ../include/ArSoundPlayer.h \ + ../include/ArSoundsQueue.h ../include/ArSpeech.h \ + ../include/ArCameraCollection.h ../include/ArCameraCommands.h \ + ../include/ArSonarAutoDisabler.h ../include/ArActionDriveDistance.h \ + ../include/ArLaserReflectorDevice.h ../include/ArRobotConfig.h \ + ../include/ArTCMCompassDirect.h ../include/ArNMEAParser.h \ + ../include/ArLaserFilter.h ../include/ArUrg.h ../include/ArGPS.h \ + ../include/ArTrimbleGPS.h ../include/ArNovatelGPS.h \ + ../include/ArGPSCoords.h ../include/ArSonarConnector.h \ + ../include/ArBatteryConnector.h ../include/ArLCDConnector.h \ + ../include/ArSonarMTX.h ../include/ArBatteryMTX.h ../include/ArLCDMTX.h \ + ../include/ArSimulatedLaser.h ../include/ArExitErrorSource.h \ + ../include/ArActionLimiterRot.h ../include/ArRobotBatteryPacketReader.h \ + ../include/ArLMS1XX.h ../include/ArUrg_2_0.h \ + ../include/ArActionMovementParametersDebugging.h ../include/ArZippable.h \ + ../include/ArS3Series.h ../include/ArSZSeries.h include/ArNetworking.h \ + include/ArServerBase.h include/ArServerCommands.h \ + include/ArServerClient.h include/ArNetPacket.h \ + include/ArNetPacketReceiverTcp.h include/ArNetPacketSenderTcp.h \ + include/ArServerClientData.h include/ArServerClientIdentifier.h \ + include/ArServerData.h include/ArNetPacketReceiverUdp.h \ + include/ArServerUserInfo.h include/ArClientBase.h \ + include/ArClientCommands.h include/ArClientData.h include/ArMapChanger.h \ + ../include/ariaTypedefs.h ../include/ariaUtil.h \ + ../include/ArMapInterface.h ../include/ArMapUtils.h ../include/ArMutex.h \ + include/ArCentralForwarder.h include/ArClientSwitchManager.h \ + include/ArServerHandlerCamera.h include/ArNetworking.h \ + include/ArServerHandlerCameraCollection.h ../include/ArExport.h \ + ../include/ArFunctor.h ../include/ArCameraCollection.h \ + include/ArServerHandlerCommMonitor.h include/ArServerHandlerCommands.h \ + include/ArServerHandlerPopup.h include/ArServerInfoDrawings.h \ + include/ArServerInfoRobot.h include/ArServerInfoSensor.h \ + include/ArServerHandlerMap.h ../include/ArConfig.h \ + include/ArServerMode.h include/ArServerModeDrive.h \ + include/ArServerModeRatioDrive.h include/ArServerModeStop.h \ + include/ArServerModeWander.h include/ArServerHandlerConfig.h \ + include/ArClientHandlerConfig.h include/ArHybridForwarderVideo.h \ + include/ArServerSimpleCommands.h include/ArServerFileUtils.h \ + include/ArClientFileUtils.h include/ArClientSimpleConnector.h \ + include/ArServerHandlerMapping.h include/ArTempDirectoryHelper.h \ + include/ArServerSimpleOpener.h include/ArServerInfoStrings.h \ + include/ArClientArgUtils.h include/ArCentralManager.h \ + include/ArServerModeIdle.h diff --git a/Legacy/Aria/ArNetworking/docs/figures/ArNetworking_overview.png b/Legacy/Aria/ArNetworking/docs/figures/ArNetworking_overview.png new file mode 100644 index 0000000..1157e36 Binary files /dev/null and b/Legacy/Aria/ArNetworking/docs/figures/ArNetworking_overview.png differ diff --git a/Legacy/Aria/ArNetworking/doxygen.conf b/Legacy/Aria/ArNetworking/doxygen.conf new file mode 100644 index 0000000..8aa7f57 --- /dev/null +++ b/Legacy/Aria/ArNetworking/doxygen.conf @@ -0,0 +1,1304 @@ +# Doxyfile 1.5.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file that +# follow. The default is UTF-8 which is also the encoding used for all text before +# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into +# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of +# possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = ArNetworking + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 2.8.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "javanote=

Java Wrapper Library: " \ + "pynote=

Python Wrapper Library: " \ + "swignote=

Java and Python Wrappers: " \ + "swigomit=

Java and Python Wrappers: Not available in Java or Python wrapper libraries. " \ + "notwindows=@note Not available on Windows " \ + "windowsonly=@note Available on Windows only " \ + "linuxonly=@note Available on Linux only " + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be extracted +# and appear in the documentation as a namespace called 'anonymous_namespace{file}', +# where file will be replaced with the base name of the file that contains the anonymous +# namespace. By default anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = src/ \ + include/ \ + examples/ \ + docs/options/all_options.dox + +# This tag can be used to specify the character encoding of the source files that +# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default +# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. +# See http://www.gnu.org/software/libiconv for the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = *.cpp \ + *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = proprietary* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the output. +# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, +# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = examples/ docs/options/ + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = *.cpp *_options + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = docs/figures + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH +# then you must also enable this option. If you don't then doxygen will produce +# a warning and turn it on anyway + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = ./ + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = letter + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = YES + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = AREXPORT= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = ../docs/Aria.tag=../../docs + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = docs/ArNetworking.tag + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to +# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to +# specify the directory where the mscgen tool resides. If left empty the tool is assumed to +# be found in the default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the number +# of direct children of the root node in a graph is already larger than +# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/Legacy/Aria/ArNetworking/doxygen.conf.in b/Legacy/Aria/ArNetworking/doxygen.conf.in new file mode 100644 index 0000000..de5a767 --- /dev/null +++ b/Legacy/Aria/ArNetworking/doxygen.conf.in @@ -0,0 +1,1304 @@ +# Doxyfile 1.5.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file that +# follow. The default is UTF-8 which is also the encoding used for all text before +# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into +# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of +# possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = ArNetworking + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "javanote=

Java Wrapper Library: " \ + "pynote=

Python Wrapper Library: " \ + "swignote=

Java and Python Wrappers: " \ + "swigomit=

Java and Python Wrappers: Not available in Java or Python wrapper libraries. " \ + "notwindows=@note Not available on Windows " \ + "windowsonly=@note Available on Windows only " \ + "linuxonly=@note Available on Linux only " + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be extracted +# and appear in the documentation as a namespace called 'anonymous_namespace{file}', +# where file will be replaced with the base name of the file that contains the anonymous +# namespace. By default anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = src/ \ + include/ \ + examples/ \ + docs/options/all_options.dox + +# This tag can be used to specify the character encoding of the source files that +# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default +# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. +# See http://www.gnu.org/software/libiconv for the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = *.cpp \ + *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = proprietary* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the output. +# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, +# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = examples/ docs/options/ + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = *.cpp *_options + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = docs/figures + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH +# then you must also enable this option. If you don't then doxygen will produce +# a warning and turn it on anyway + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = ./ + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = letter + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = YES + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = AREXPORT= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = ../docs/Aria.tag=../../docs + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = docs/ArNetworking.tag + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to +# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to +# specify the directory where the mscgen tool resides. If left empty the tool is assumed to +# be found in the default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the number +# of direct children of the root node in a graph is already larger than +# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/Legacy/Aria/ArNetworking/examples/ArNetworking_Examples-vc2003.sln b/Legacy/Aria/ArNetworking/examples/ArNetworking_Examples-vc2003.sln new file mode 100644 index 0000000..e31b6c2 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/ArNetworking_Examples-vc2003.sln @@ -0,0 +1,87 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clientDemoStatic", "clientDemoStatic-vc2003.vcproj", "{0A8A179D-832B-44B2-829A-AB6E61BFF46E}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + {1D08AFC4-1036-425C-B381-6FE522207D47} = {1D08AFC4-1036-425C-B381-6FE522207D47} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingDLL", "..\src\ArNetworkingDLL-vc2003.vcproj", "{95FF1CC1-5006-4DEE-99D9-0B6C418C9689}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingStatic", "..\src\ArNetworkingStatic-vc2003.vcproj", "{1D08AFC4-1036-425C-B381-6FE522207D47}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clientDemo", "clientDemo-vc2003.vcproj", "{806E0C42-BE8A-4857-A97B-068FD56C27A1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} = {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serverDemo", "serverDemo-vc2003.vcproj", "{7AEA7E4D-0984-4A16-8A3F-AF36B1A27836}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} = {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serverDemoStatic", "serverDemoStatic-vc2003.vcproj", "{31A8793E-E70A-4C52-B470-971BAF9DE5E0}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + {1D08AFC4-1036-425C-B381-6FE522207D47} = {1D08AFC4-1036-425C-B381-6FE522207D47} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\..\src\AriaDLL-vc2003.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "..\..\src\AriaStatic-vc2003.vcproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Debug.ActiveCfg = Debug|Win32 + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Debug.Build.0 = Debug|Win32 + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Release.ActiveCfg = Release|Win32 + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Release.Build.0 = Release|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Debug.ActiveCfg = Debug|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Debug.Build.0 = Debug|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Release.ActiveCfg = Release|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Release.Build.0 = Release|Win32 + {1D08AFC4-1036-425C-B381-6FE522207D47}.Debug.ActiveCfg = Debug|Win32 + {1D08AFC4-1036-425C-B381-6FE522207D47}.Debug.Build.0 = Debug|Win32 + {1D08AFC4-1036-425C-B381-6FE522207D47}.Release.ActiveCfg = Release|Win32 + {1D08AFC4-1036-425C-B381-6FE522207D47}.Release.Build.0 = Release|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Debug.ActiveCfg = Debug|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Debug.Build.0 = Debug|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Release.ActiveCfg = Release|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Release.Build.0 = Release|Win32 + {7AEA7E4D-0984-4A16-8A3F-AF36B1A27836}.Debug.ActiveCfg = Debug|Win32 + {7AEA7E4D-0984-4A16-8A3F-AF36B1A27836}.Debug.Build.0 = Debug|Win32 + {7AEA7E4D-0984-4A16-8A3F-AF36B1A27836}.Release.ActiveCfg = Release|Win32 + {7AEA7E4D-0984-4A16-8A3F-AF36B1A27836}.Release.Build.0 = Release|Win32 + {31A8793E-E70A-4C52-B470-971BAF9DE5E0}.Debug.ActiveCfg = Debug|Win32 + {31A8793E-E70A-4C52-B470-971BAF9DE5E0}.Debug.Build.0 = Debug|Win32 + {31A8793E-E70A-4C52-B470-971BAF9DE5E0}.Release.ActiveCfg = Release|Win32 + {31A8793E-E70A-4C52-B470-971BAF9DE5E0}.Release.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.Build.0 = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/ArNetworking/examples/ArNetworking_Examples-vc2008.sln b/Legacy/Aria/ArNetworking/examples/ArNetworking_Examples-vc2008.sln new file mode 100644 index 0000000..a83f152 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/ArNetworking_Examples-vc2008.sln @@ -0,0 +1,79 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clientDemoStatic", "clientDemoStatic-vc2008.vcproj", "{0A8A179D-832B-44B2-829A-AB6E61BFF46E}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + {5AD87287-2610-453A-A986-A4CDCCC24C89} = {5AD87287-2610-453A-A986-A4CDCCC24C89} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingDLL", "..\src\ArNetworkingDLL-vc2008.vcproj", "{783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingStatic", "..\src\ArNetworkingStatic-vc2008.vcproj", "{5AD87287-2610-453A-A986-A4CDCCC24C89}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clientDemo", "clientDemo-vc2008.vcproj", "{806E0C42-BE8A-4857-A97B-068FD56C27A1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} = {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serverDemoStatic", "serverDemoStatic-vc2008.vcproj", "{EEF9FE4C-34C4-4C76-94C4-D11930C88DE1}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + {5AD87287-2610-453A-A986-A4CDCCC24C89} = {5AD87287-2610-453A-A986-A4CDCCC24C89} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\..\src\AriaDLL-vc2008.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "..\..\src\AriaStatic-vc2008.vcproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serverDemo", "serverDemo-vc2008.vcproj", "{B9C37E51-E357-4019-B4B5-71C42E1FCD11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Debug|Win32.ActiveCfg = Debug|Win32 + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Debug|Win32.Build.0 = Debug|Win32 + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Release|Win32.ActiveCfg = Release|Win32 + {0A8A179D-832B-44B2-829A-AB6E61BFF46E}.Release|Win32.Build.0 = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|Win32.ActiveCfg = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|Win32.Build.0 = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|Win32.ActiveCfg = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|Win32.Build.0 = Release|Win32 + {5AD87287-2610-453A-A986-A4CDCCC24C89}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AD87287-2610-453A-A986-A4CDCCC24C89}.Debug|Win32.Build.0 = Debug|Win32 + {5AD87287-2610-453A-A986-A4CDCCC24C89}.Release|Win32.ActiveCfg = Release|Win32 + {5AD87287-2610-453A-A986-A4CDCCC24C89}.Release|Win32.Build.0 = Release|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Debug|Win32.Build.0 = Debug|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Release|Win32.ActiveCfg = Release|Win32 + {806E0C42-BE8A-4857-A97B-068FD56C27A1}.Release|Win32.Build.0 = Release|Win32 + {EEF9FE4C-34C4-4C76-94C4-D11930C88DE1}.Debug|Win32.ActiveCfg = Debug|Win32 + {EEF9FE4C-34C4-4C76-94C4-D11930C88DE1}.Debug|Win32.Build.0 = Debug|Win32 + {EEF9FE4C-34C4-4C76-94C4-D11930C88DE1}.Release|Win32.ActiveCfg = Release|Win32 + {EEF9FE4C-34C4-4C76-94C4-D11930C88DE1}.Release|Win32.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.Build.0 = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug|Win32.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug|Win32.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release|Win32.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release|Win32.Build.0 = Release|Win32 + {B9C37E51-E357-4019-B4B5-71C42E1FCD11}.Debug|Win32.ActiveCfg = Debug|Win32 + {B9C37E51-E357-4019-B4B5-71C42E1FCD11}.Debug|Win32.Build.0 = Debug|Win32 + {B9C37E51-E357-4019-B4B5-71C42E1FCD11}.Release|Win32.ActiveCfg = Release|Win32 + {B9C37E51-E357-4019-B4B5-71C42E1FCD11}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/ArNetworking/examples/Makefile b/Legacy/Aria/ArNetworking/examples/Makefile new file mode 100644 index 0000000..d977f56 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/Makefile @@ -0,0 +1,8 @@ + +all: + $(MAKE) -C .. examples + +%: %.cpp + $(MAKE) -C .. examples/$@ + +.PHONY: all diff --git a/Legacy/Aria/ArNetworking/examples/README.txt b/Legacy/Aria/ArNetworking/examples/README.txt new file mode 100644 index 0000000..0e7e0bf --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/README.txt @@ -0,0 +1,26 @@ +These mostly come in pairs, with the description in front then the +client or server tag + +clientCommandLister - A client that just connects to the server then lists the + data that the server has available. Also useful as a testing/diagnostic tool. + +configClient - A client that will get the ArConfig information from the server + +configClientToServer - A client that will send ArConfig information from + a config file to the server + +configServer - A server that takes the ArConfig information and + makes it available to the client, use in conjunction with configClient + +configServerRobot - Serves up a robot parameter file to edit (example) + +serverDemo - An example that will show the setting up of a + server with robot sensor visualization, robot control, and more... + connect with MobileEyes. + +drawingsExample - Shows how to display custom graphics (drawings) in + a client + +drawingsExampleWithRobot - Shows how to display custom graphics (drawings) + in a client, along with the robot and its sensors. + diff --git a/Legacy/Aria/ArNetworking/examples/clientCommandLister.cpp b/Legacy/Aria/ArNetworking/examples/clientCommandLister.cpp new file mode 100644 index 0000000..b7a2cd8 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientCommandLister.cpp @@ -0,0 +1,36 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Normal); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + client.setRobotName(client.getHost()); // include server hostname in log messages + client.runAsync(); + ArUtil::sleep(500); + client.logDataList(); + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/ArNetworking/examples/clientDemo-vc2003.vcproj b/Legacy/Aria/ArNetworking/examples/clientDemo-vc2003.vcproj new file mode 100644 index 0000000..856fa8b --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemo-vc2003.vcproj @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/clientDemo-vc2008.vcproj b/Legacy/Aria/ArNetworking/examples/clientDemo-vc2008.vcproj new file mode 100644 index 0000000..7c4c2b3 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemo-vc2008.vcproj @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/clientDemo-vc2010.vcxproj b/Legacy/Aria/ArNetworking/examples/clientDemo-vc2010.vcxproj new file mode 100644 index 0000000..a2b2546 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemo-vc2010.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + clientDemo + {806E0C42-BE8A-4857-A97B-068FD56C27A1} + + + + Application + false + MultiByte + v100 + + + Application + false + MultiByte + v100 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../../bin/ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../../bin/ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + clientDemoDebugVC10 + $(ProjectName)VC10 + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + .\../../bin/clientDemo.tlb + + + + + Disabled + ..\include;..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + + + .\../../obj/ + .\../../obj/ + $(IntDir)vc100.pdb + true + Level3 + true + ProgramDatabase + Default + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib;ArNetworkingDebugVC10.lib + $(OutDir)$(TargetFileName) + 1.0 + true + ..\..\lib;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + .\../../bin/clientDemo.tlb + + + + + MaxSpeed + AnySuitable + true + ..\include;..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + .\../../obj/clientDemo.pch + .\../../obj/ + .\../../obj/ + .\../../obj/ + Level3 + true + Default + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib;ArNetworkingVC10.lib + $(OutDir)$(TargetFileName) + 1.0 + true + ..\..\lib;%(AdditionalLibraryDirectories) + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/examples/clientDemo.cpp b/Legacy/Aria/ArNetworking/examples/clientDemo.cpp new file mode 100644 index 0000000..03a000c --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemo.cpp @@ -0,0 +1,634 @@ +/* This is the ArNetworking example client. + * It connects to an ArNetworking server, and provides continuous + * information about the robot state (position, speed, server mode, etc.), + * and, if the server supports the commands, lets you drive the robot with + * the keyboard. + * + * To see the example client in action, first run a server on the robot's + * onboard computer, for example, serverDemo, testServer, guiServer (from ARNL), + * or ARAM. Make sure the robot computer is on a network, and run this + * clientDemo with the hostname of the robot computer as an argument: + * + * ./clientDemo -host myrobot + * + */ + +#include "Aria.h" +#include "ArNetworking.h" + + +/* This class provides callback functions which are called by the ArKeyHandler + * object when the user presses keys. These callback functions adjust member + * variables. The sendInput() method sends a command with those values + * to the server using the "ratioDrive" request. + */ + +class InputHandler +{ +public: + /** + * @param client Our client networking object + * @param keyHandler Key handler to register command callbacks with + */ + InputHandler(ArClientBase *client, ArKeyHandler *keyHandler); + virtual ~InputHandler(void); + + /// Up arrow key handler: drive the robot forward + void up(void); + + /// Down arrow key handler: drive the robot backward + void down(void); + + /// Left arrow key handler: turn the robot left + void left(void); + + /// Right arrow key handler: turn the robot right + void right(void); + + /// Move the robot laterally right (q key) + void lateralLeft(void); + + /// Move the robot laterally right (e key) + void lateralRight(void); + + /// Send drive request to the server with stored values + void sendInput(void); + + /// Send a request to enable "safe drive" mode on the server + void safeDrive(); + + /// Send a request to disable "safe drive" mode on the server + void unsafeDrive(); + + void listData(); + + void logTrackingTerse(); + void logTrackingVerbose(); + void resetTracking(); +protected: + ArClientBase *myClient; + ArKeyHandler *myKeyHandler; + + /// Set this to true in the constructor to print out debugging information + bool myPrinting; + + /// Current translation value (a percentage of the maximum speed) + double myTransRatio; + + /// Current rotation ration value (a percentage of the maximum rotational velocity) + double myRotRatio; + + /// Current rotation ration value (a percentage of the maximum rotational velocity) + double myLatRatio; + + /** Functor objects, given to the key handler, which then call our handler + * methods above */ + ///@{ + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + ArFunctorC myLateralLeftCB; + ArFunctorC myLateralRightCB; + ArFunctorC mySafeDriveCB; + ArFunctorC myUnsafeDriveCB; + ArFunctorC myListDataCB; + ArFunctorC myLogTrackingTerseCB; + ArFunctorC myLogTrackingVerboseCB; + ArFunctorC myResetTrackingCB; + ///@} +}; + +InputHandler::InputHandler(ArClientBase *client, ArKeyHandler *keyHandler) : + myClient(client), myKeyHandler(keyHandler), + myPrinting(false), myTransRatio(0.0), myRotRatio(0.0), myLatRatio(0.0), + + /* Initialize functor objects with pointers to our handler methods: */ + myUpCB(this, &InputHandler::up), + myDownCB(this, &InputHandler::down), + myLeftCB(this, &InputHandler::left), + myRightCB(this, &InputHandler::right), + myLateralLeftCB(this, &InputHandler::lateralLeft), + myLateralRightCB(this, &InputHandler::lateralRight), + mySafeDriveCB(this, &InputHandler::safeDrive), + myUnsafeDriveCB(this, &InputHandler::unsafeDrive), + myListDataCB(this, &InputHandler::listData), + myLogTrackingTerseCB(this, &InputHandler::logTrackingTerse), + myLogTrackingVerboseCB(this, &InputHandler::logTrackingVerbose), + myResetTrackingCB(this, &InputHandler::resetTracking) +{ + + /* Add our functor objects to the key handler, associated with the appropriate + * keys: */ + myKeyHandler->addKeyHandler(ArKeyHandler::UP, &myUpCB); + myKeyHandler->addKeyHandler(ArKeyHandler::DOWN, &myDownCB); + myKeyHandler->addKeyHandler(ArKeyHandler::LEFT, &myLeftCB); + myKeyHandler->addKeyHandler(ArKeyHandler::RIGHT, &myRightCB); + myKeyHandler->addKeyHandler('q', &myLateralLeftCB); + myKeyHandler->addKeyHandler('e', &myLateralRightCB); + myKeyHandler->addKeyHandler('s', &mySafeDriveCB); + myKeyHandler->addKeyHandler('u', &myUnsafeDriveCB); + myKeyHandler->addKeyHandler('l', &myListDataCB); + myKeyHandler->addKeyHandler('t', &myLogTrackingTerseCB); + myKeyHandler->addKeyHandler('v', &myLogTrackingVerboseCB); + myKeyHandler->addKeyHandler('r', &myResetTrackingCB); +} + +InputHandler::~InputHandler(void) +{ + +} + +void InputHandler::up(void) +{ + if (myPrinting) + printf("Forwards\n"); + myTransRatio = 100; +} + +void InputHandler::down(void) +{ + if (myPrinting) + printf("Backwards\n"); + myTransRatio = -100; +} + +void InputHandler::left(void) +{ + if (myPrinting) + printf("Left\n"); + myRotRatio = 100; +} + +void InputHandler::right(void) +{ + if (myPrinting) + printf("Right\n"); + myRotRatio = -100; +} + +void InputHandler::lateralLeft(void) +{ + if (myPrinting) + printf("Lateral left\n"); + myLatRatio = 100; +} + +void InputHandler::lateralRight(void) +{ + if (myPrinting) + printf("Lateral right\n"); + myLatRatio = -100; +} + +void InputHandler::safeDrive() +{ + /* Construct a request packet. The data is a single byte, with value + * 1 to enable safe drive, 0 to disable. */ + ArNetPacket p; + p.byteToBuf(1); + + /* Send the packet as a single request: */ + if(myPrinting) + printf("Sending setSafeDrive 1.\n"); + myClient->requestOnce("setSafeDrive",&p); + if(myPrinting) + printf("\nSent enable safe drive.\n"); +} + +void InputHandler::unsafeDrive() +{ + /* Construct a request packet. The data is a single byte, with value + * 1 to enable safe drive, 0 to disable. */ + ArNetPacket p; + p.byteToBuf(0); + + /* Send the packet as a single request: */ + if(myPrinting) + printf("Sending setSafeDrive 0.\n"); + myClient->requestOnce("setSafeDrive",&p); + if(myPrinting) + printf("\nSent disable safe drive command. Your robot WILL run over things if you're not careful.\n"); +} + +void InputHandler::listData() +{ + myClient->logDataList(); +} + +void InputHandler::logTrackingTerse() +{ + myClient->logTracking(true); +} + +void InputHandler::logTrackingVerbose() +{ + myClient->logTracking(false); +} + +void InputHandler::resetTracking() +{ + myClient->resetTracking(); +} + + +void InputHandler::sendInput(void) +{ + /* This method is called by the main function to send a ratioDrive + * request with our current velocity values. If the server does + * not support the ratioDrive request, then we abort now: */ + if(!myClient->dataExists("ratioDrive")) return; + + /* Construct a ratioDrive request packet. It consists + * of three doubles: translation ratio, rotation ratio, and an overall scaling + * factor. */ + ArNetPacket packet; + packet.doubleToBuf(myTransRatio); + packet.doubleToBuf(myRotRatio); + packet.doubleToBuf(50); // use half of the robot's maximum. + packet.doubleToBuf(myLatRatio); + if (myPrinting) + printf("Sending\n"); + myClient->requestOnce("ratioDrive", &packet); + myTransRatio = 0; + myRotRatio = 0; + myLatRatio = 0; +} + + +/** This class requests continual data updates from the server and prints them + * out. + */ +class OutputHandler +{ +public: + OutputHandler(ArClientBase *client); + virtual ~OutputHandler(void); + + /// This callback is called when an update on general robot state arrives + void handleOutput(ArNetPacket *packet); + /// This callback is called when an update on general robot state arrives + void handleOutputNumbers(ArNetPacket *packet); + /// This callback is called when an update on general robot state arrives + void handleOutputStrings(ArNetPacket *packet); + + /// This callback is called when an update on the battery configuration changes + void handleBatteryInfo(ArNetPacket *packet); + /// This is called when the physical robot information comes back + void handlePhysicalInfo(ArNetPacket *packet); + /// This callback is called when an update on the temperature information changes + void handleTemperatureInfo(ArNetPacket *packet); + /// Called when the map on the server changes. + void handleMapUpdated(ArNetPacket *packet); +protected: + + /// The results from the data update are stored in these variables + //@{ + double myX; + double myY; + double myTh; + double myVel; + double myRotVel; + double myLatVel; + bool myVoltageIsStateOfCharge; + char myTemperature; + double myVoltage; + char myStatus[256]; + char myMode[256]; + //@} + ArClientBase *myClient; + + /** These functor objects are given to the client to receive updates when they + * arrive from the server. + */ + //@{ + ArFunctor1C myHandleOutputCB; + ArFunctor1C myHandleOutputNumbersCB; + ArFunctor1C myHandleOutputStringsCB; + ArFunctor1C myHandleBatteryInfoCB; + ArFunctor1C myHandlePhysicalInfoCB; + ArFunctor1C myHandleTemperatureInfoCB; + ArFunctor1C myHandleMapUpdatedCB; + //@} + + /// A header for the columns in the data printout is sometimes printed + bool myNeedToPrintHeader; + /// Don't print any information until we get the battery info + bool myGotBatteryInfo; +}; + +OutputHandler::OutputHandler(ArClientBase *client) : + myClient(client), + myHandleOutputCB(this, &OutputHandler::handleOutput), + myHandleOutputNumbersCB(this, &OutputHandler::handleOutputNumbers), + myHandleOutputStringsCB(this, &OutputHandler::handleOutputStrings), + myHandleBatteryInfoCB(this, &OutputHandler::handleBatteryInfo), + myHandlePhysicalInfoCB(this, &OutputHandler::handlePhysicalInfo), + myHandleTemperatureInfoCB(this, &OutputHandler::handleTemperatureInfo), + myHandleMapUpdatedCB(this, &OutputHandler::handleMapUpdated), + myNeedToPrintHeader(false), + myGotBatteryInfo(false) +{ + /* Add a handler for battery info, and make a single request for it */ + myClient->addHandler("physicalInfo", &myHandlePhysicalInfoCB); + myClient->requestOnce("physicalInfo"); + + + /* Add a handler for battery info, and make a single request for it */ + myClient->addHandler("batteryInfo", &myHandleBatteryInfoCB); + myClient->requestOnce("batteryInfo"); + + /* If it exists add a handler for temperature info, and make a + * single request for it */ + if (myClient->dataExists("temperatureInfo")) + { + myClient->addHandler("temperatureInfo", &myHandleTemperatureInfoCB); + myClient->requestOnce("temperatureInfo"); + } + + // if we have the new way of broadcasting that only pushes strings + // when they change then use that + if (myClient->dataExists("updateNumbers") && + myClient->dataExists("updateStrings")) + { + printf("Using new updates\n"); + // get the numbers every 100 ms + myClient->addHandler("updateNumbers", &myHandleOutputNumbersCB); + myClient->request("updateNumbers", 100); + // and the strings whenever they change (and are broadcast) + myClient->addHandler("updateStrings", &myHandleOutputStringsCB); + myClient->request("updateStrings", -1); + } + else + { + printf("Using old updates\n"); + // For the old way, just Add a handler for general info, and + // request it to be called every 100 ms + myClient->addHandler("update", &myHandleOutputCB); + myClient->request("update", 100); + } + + if(myClient->dataExists("mapUpdated")) + { + myClient->addHandler("mapUpdated", &myHandleMapUpdatedCB); + myClient->request("mapUpdated", -1); + } +} + +OutputHandler::~OutputHandler(void) +{ + /* Halt the request for data updates */ + myClient->requestStop("update"); +} + +void OutputHandler::handleOutput(ArNetPacket *packet) +{ + /* Extract the data from the update packet. Its format is status and + * mode (null-terminated strings), then 6 doubles for battery voltage, + * x position, y position and orientation (theta) (from odometry), current + * translational velocity, and current rotational velocity. Translation is + * always milimeters, rotation in degrees. + */ + memset(myStatus, 0, sizeof(myStatus)); + memset(myMode, 0, sizeof(myMode)); + packet->bufToStr(myStatus, sizeof(myStatus)); + packet->bufToStr(myMode, sizeof(myMode)); + myVoltage = ( (double) packet->bufToByte2() )/10.0; + myX = (double) packet->bufToByte4(); + myY = (double) packet->bufToByte4(); + myTh = (double) packet->bufToByte2(); + myVel = (double) packet->bufToByte2(); + myRotVel = (double) packet->bufToByte2(); + myLatVel = (double) packet->bufToByte2(); + myTemperature = (double) packet->bufToByte(); + + if(myNeedToPrintHeader) + { + printf("\n%6s|%6s|%6s|%6s|%6s|%6s|%4s|%6s|%15s|%20s|\n", + "x","y","theta", "vel", "rotVel", "latVel", "temp", myVoltageIsStateOfCharge ? "charge" : "volts", "mode","status"); + fflush(stdout); + myNeedToPrintHeader = false; + } + if (myGotBatteryInfo) + printf("%6.0f|%6.0f|%6.1f|%6.0f|%6.0f|%6.0f|%4.0d|%6.1f|%15s|%20s|\r", + myX, myY, myTh, myVel, myRotVel, myLatVel, myTemperature, myVoltage, myMode, myStatus); + + fflush(stdout); +} + +void OutputHandler::handleOutputNumbers(ArNetPacket *packet) +{ + /* Extract the data from the updateNumbers packet. Its format is 6 + * doubles for battery voltage, x position, y position and + * orientation (theta) (from odometry), current translational + * velocity, and current rotational velocity. Translation is always + * milimeters, rotation in degrees. + */ + myVoltage = ( (double) packet->bufToByte2() )/10.0; + myX = (double) packet->bufToByte4(); + myY = (double) packet->bufToByte4(); + myTh = (double) packet->bufToByte2(); + myVel = (double) packet->bufToByte2(); + myRotVel = (double) packet->bufToByte2(); + myLatVel = (double) packet->bufToByte2(); + myTemperature = (double) packet->bufToByte(); + + if(myNeedToPrintHeader) + { + printf("\n%6s|%6s|%6s|%6s|%6s|%6s|%4s|%6s|%15s|%20s|\n", + "x","y","theta", "vel", "rotVel", "latVel", "temp", myVoltageIsStateOfCharge ? "charge" : "volts", "mode","status"); + fflush(stdout); + myNeedToPrintHeader = false; + } + if (myGotBatteryInfo) + printf("%6.0f|%6.0f|%6.1f|%6.0f|%6.0f|%6.0f|%4.0d|%6.1f|%15s|%20s|\r", + myX, myY, myTh, myVel, myRotVel, myLatVel, myTemperature, myVoltage, myMode, myStatus); + + fflush(stdout); +} + +void OutputHandler::handleOutputStrings(ArNetPacket *packet) +{ + /* Extract the data from the updateStrings packet. Its format is + * status and mode (null-terminated strings). + */ + memset(myStatus, 0, sizeof(myStatus)); + memset(myMode, 0, sizeof(myMode)); + packet->bufToStr(myStatus, sizeof(myStatus)); + packet->bufToStr(myMode, sizeof(myMode)); +} + +void OutputHandler::handleBatteryInfo(ArNetPacket *packet) +{ + /* Get battery configuration parameters: when the robot will begin beeping and + * warning about low battery, and when it will automatically disconnect and + * shutdown. */ + double lowBattery = packet->bufToDouble(); + double shutdown = packet->bufToDouble(); + printf("Low battery voltage: %6g Shutdown battery voltage: %6g\n", lowBattery, shutdown); + fflush(stdout); + myNeedToPrintHeader = true; + myGotBatteryInfo = true; + + if (packet->getDataReadLength() == packet->getDataLength()) + { + printf("Packet is too small so its an old server, though you could just get to the bufToUByte anyways, since it'd be 0 anyhow\n"); + myVoltageIsStateOfCharge = false; + } + else + myVoltageIsStateOfCharge = (packet->bufToUByte() == 1); + +} + + +void OutputHandler::handlePhysicalInfo(ArNetPacket *packet) +{ + /* Get phyiscal configuration parameters: */ + char robotType[512]; + char robotSubtype[512]; + int width; + int lengthFront; + int lengthRear; + + packet->bufToStr(robotType, sizeof(robotType)); + packet->bufToStr(robotSubtype, sizeof(robotSubtype)); + width = packet->bufToByte2(); + lengthFront = packet->bufToByte2(); + lengthRear = packet->bufToByte2(); + + printf("Type: %s Subtype: %s Width %d: LengthFront: %d LengthRear: %d\n", + robotType, robotSubtype, width, lengthFront, lengthRear); + fflush(stdout); +} + +void OutputHandler::handleTemperatureInfo(ArNetPacket *packet) +{ + char warning = packet->bufToByte(); + char shutdown = packet->bufToByte(); + printf("High temperature warning: %4d High temperature shutdown: %4d\n", warning, shutdown); + fflush(stdout); + myNeedToPrintHeader = true; +} + +void OutputHandler::handleMapUpdated(ArNetPacket *packet) +{ + printf("\nMap changed.\n"); + fflush(stdout); + myNeedToPrintHeader = true; +} + + +/* Key handler for the escape key: shutdown all of Aria. */ +void escape(void) +{ + printf("esc pressed, shutting down aria\n"); + Aria::shutdown(); +} + +int main(int argc, char **argv) +{ + /* Aria initialization: */ + Aria::init(); + + //ArLog::init(ArLog::StdErr, ArLog::Verbose); + + + /* Create our client object. This is the object which connects with a remote + * server over the network, and which manages all of our communication with it + * once connected by sending data "requests". Requests may be sent once, or + * may be repeated at any frequency. Requests and replies to requsets contain + * payload "packets", into which various data types may be packed (when making a + * request), and from which they may also be extracted (when handling a reply). + * See the InputHandler and OutputHandler classes above for + * examples of making requests and reading/writing the data in packets. + */ + ArClientBase client; + + /* Aria components use this to get options off the command line: */ + ArArgumentParser parser(&argc, argv); + + /* This will be used to connect our client to the server, including + * various bits of handshaking (e.g. sending a password, retrieving a list + * of data requests and commands...) + * It will get the hostname from the -host command line argument: */ + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + printf("Connected to server.\n"); + + client.setRobotName(client.getHost()); // include server name in log messages + + /* Create a key handler and also tell Aria about it */ + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + + /* Global escape-key handler to shut everythnig down */ + ArGlobalFunctor escapeCB(&escape); + keyHandler.addKeyHandler(ArKeyHandler::ESCAPE, &escapeCB); + + /* Now that we're connected, we can run the client in a background thread, + * sending requests and receiving replies. When a reply to a request arrives, + * or the server makes a request of the client, a handler functor is invoked. + * The handlers for this program are registered with the client by the + * InputHandler and OutputHandler classes (in their constructors, above) */ + client.runAsync(); + + /* Create the InputHandler object and request safe-drive mode */ + InputHandler inputHandler(&client, &keyHandler); + inputHandler.safeDrive(); + + /* Use ArClientBase::dataExists() to see if the "ratioDrive" request is available on the + * currently connected server. */ + if(!client.dataExists("ratioDrive") ) + printf("Warning: server does not have ratioDrive command, can not use drive commands!\n"); + else + printf("Keys are:\nUP: Forward\nDOWN: Backward\nLEFT: Turn Left\nRIGHT: Turn Right\n"); + printf("s: Enable safe drive mode (if supported).\nu: Disable safe drive mode (if supported).\nl: list all data requests on server\n\nDrive commands use 'ratioDrive'.\nt: logs the network tracking tersely\nv: logs the network tracking verbosely\nr: resets the network tracking\n\n"); + + + /* Create the OutputHandler object. It will begin printing out data from the + * server. */ + OutputHandler outputHandler(&client); + + + /* Begin capturing keys into the key handler. Callbacks will be called + * asyncrosously from this main thread when pressed. */ + + /* While the client is still running (getRunningWithLock locks the "running" + * flag until it returns), check keys on the key handler (which will call + * our callbacks), then tell the input handler to send drive commands. + * Sleep a fraction of a second as well to avoid using + * too much CPU time, and give other threads time to work. + */ + while (client.getRunningWithLock()) + { + keyHandler.checkKeys(); + inputHandler.sendInput(); + ArUtil::sleep(100); + } + + /* The client stopped running, due to disconnection from the server, general + * Aria shutdown, or some other reason. */ + client.disconnect(); + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2003.vcproj b/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2003.vcproj new file mode 100644 index 0000000..5ecefa7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2003.vcproj @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2008.vcproj b/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2008.vcproj new file mode 100644 index 0000000..fa75c01 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2008.vcproj @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2010.vcxproj b/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2010.vcxproj new file mode 100644 index 0000000..2912652 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/clientDemoStatic-vc2010.vcxproj @@ -0,0 +1,146 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + clientDemoStatic + {0A8A179D-832B-44B2-829A-AB6E61BFF46E} + clientDemoStatic + ManagedCProj + + + + Application + MultiByte + false + + + Application + MultiByte + false + v100 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + true + ..\..\bin\ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + clientDemoStaticDebugVC10 + $(ProjectName)VC10 + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + Disabled + ..\..\include;..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebug + false + + + Level3 + ProgramDatabase + true + + + false + + + ArNetworkingStaticDebugVC10.lib;AriaStaticDebugVC10.lib;ws2_32.lib;winmm.lib;advapi32.lib + $(OutDir)$(TargetFileName) + true + ..\..\lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + true + false + + + NotSet + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + AnySuitable + true + ..\..\include;..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + false + MultiThreaded + false + true + + + Level3 + ProgramDatabase + true + + + false + + + ArNetworkingStaticVC10.lib;AriaStaticVC10.lib;winmm.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetFileName) + true + ..\..\lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + false + false + + + + + NotSet + + + + + true + true + + + true + true + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/examples/configClient.cpp b/Legacy/Aria/ArNetworking/examples/configClient.cpp new file mode 100644 index 0000000..453fb2f --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/configClient.cpp @@ -0,0 +1,66 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArClientBase *client; +ArClientHandlerConfig *configHandler; +bool done = false; + +void gotConfig(void) +{ + ArConfig *newConfig; + done = true; + configHandler->getConfig()->writeFile("configClient.txt"); + newConfig = new ArConfig(*(configHandler->getConfig())); + newConfig->writeFile("configClientNew.txt"); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArGlobalFunctor gotConfigCB(&gotConfig); + std::string hostname; + + client = new ArClientBase; + configHandler = new ArClientHandlerConfig(client); + + configHandler->addGotConfigCB(&gotConfigCB); + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(client)) + { + exit(1); + } + + client->setRobotName(client->getHost()); // include server hostname in log messages + + configHandler->requestConfigFromServer(); + client->runAsync(); + + while (!done) + ArUtil::sleep(100); + + if (configHandler->canRequestDefaults()) + { + configHandler->requestDefaultConfigFromServer(); + while (!configHandler->haveGottenDefaults()) + ArUtil::sleep(100); + printf("%d\n", configHandler->haveGottenDefaults()); + configHandler->getDefaultConfig()->writeFile("configClientDefaults.txt"); + printf("wrote defaults\n"); + } + + + Aria::exit(0); +} diff --git a/Legacy/Aria/ArNetworking/examples/configClientToServer.cpp b/Legacy/Aria/ArNetworking/examples/configClientToServer.cpp new file mode 100644 index 0000000..3d19828 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/configClientToServer.cpp @@ -0,0 +1,82 @@ +#include "Aria.h" +#include "ArNetworking.h" + +/* + Pass this a file to send to the server (should be made by configClient then modified). + + Takes a file to send, and can take the host to send to too + + */ + +ArClientBase *client; +ArClientHandlerConfig *configHandler; + +char *file; + +void saveConfigSucceeded(void) +{ + printf("HERE: Save config succeeded\n"); +} + +void saveConfigFailed(const char *str) +{ + printf("HERE: Save config failed: %s\n", str); +} + +void gotConfig(void) +{ + char errorBuffer[1024]; + ArConfig *newConfig; + if (!configHandler->getConfig()->parseFile(file, false, false, errorBuffer, + sizeof(errorBuffer))) + printf("Error loading file: %s\n", errorBuffer); + + configHandler->saveConfigToServer(); + client->loopOnce(); + ArUtil::sleep(1000); + client->loopOnce(); + ArUtil::sleep(1000); + client->disconnect(); + Aria::shutdown(); + exit(0); +} + +int main(int argc, char **argv) +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArGlobalFunctor gotConfigCB(&gotConfig); + ArGlobalFunctor saveConfigSucceededCB(&saveConfigSucceeded); + ArGlobalFunctor1 saveConfigFailedCB(&saveConfigFailed); + std::string hostname; + + client = new ArClientBase; + configHandler = new ArClientHandlerConfig(client, true); + + configHandler->addGotConfigCB(&gotConfigCB); + configHandler->addSaveConfigSucceededCB(&saveConfigSucceededCB); + configHandler->addSaveConfigFailedCB(&saveConfigFailedCB); + + if (argc == 1) + { + printf("Usage: %s \n", argv[0]); + exit(1); + } + file = argv[1]; + if (argc == 2) + hostname = "localhost"; + else + hostname = argv[2]; + + + if (!client->blockingConnect(hostname.c_str(), 7272)) + { + printf("Could not connect to server, exiting\n"); + exit(1); + } + //client->requestOnce("setConfig"); + configHandler->requestConfigFromServer(); + //client->requestOnce("setConfig"); + client->run(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/examples/configServer.cpp b/Legacy/Aria/ArNetworking/examples/configServer.cpp new file mode 100644 index 0000000..ac858ca --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/configServer.cpp @@ -0,0 +1,61 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + + ArConfig *config; + config = Aria::getConfig(); + std::string section; + char joy[512]; + sprintf(joy, "Joy"); + section = "section1"; + config->addParam(ArConfigArg("int", new int, "fun int", 0), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("double", new double, "fun double", 0, 1), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("bool", new bool, "fun bool"), section.c_str(), ArPriority::IMPORTANT); + config->addParam(ArConfigArg("string", joy, "fun string", sizeof(joy)), section.c_str(), ArPriority::TRIVIAL); + section = "section8"; + config->addParam(ArConfigArg("int", new int, "fun int", 0), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("double", new double, "fun double", 0, 1), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("doubleFOUR", (double).4, "fun double", 0.0, 1.0), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("double three", new double, "fun double", 0, 1), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("double two", new double, "fun double", 0, 1), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("double one", new double, "fun double", 0, 1), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("double", new double, "fun double", 0, 1), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("bool", new bool, "fun bool"), section.c_str(), ArPriority::IMPORTANT); + config->addParam(ArConfigArg("string", joy, "fun string", sizeof(joy)), section.c_str(), ArPriority::TRIVIAL); + section = "some section"; + config->setSectionComment("some section", "this is a random section with 4 ints"); + config->addParam(ArConfigArg("int1", new int, "fun int"), section.c_str(), ArPriority::TRIVIAL); + config->addParam(ArConfigArg("int2", new int, "fun int", -1, 1200), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("int3", new int, "fun int"), section.c_str(), ArPriority::IMPORTANT); + config->addParam(ArConfigArg("int4", new int, "fun int"), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("int4", new int, "fun int"), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("int1", new int, "fun int"), section.c_str(), ArPriority::TRIVIAL); + section = "another section"; + config->setSectionComment("another section", "this is another section with 1 of each type"); + config->addParam(ArConfigArg("inta", new int, "fun int"), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("doublea", new double, "fun double"), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("boola", new bool, "fun bool"), section.c_str(), ArPriority::NORMAL); + config->addParam(ArConfigArg("stringa", new char[512], "fun string", 512), section.c_str(), ArPriority::NORMAL); + + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + config->setBaseDirectory("./"); + config->writeFile("default.txt"); + config->parseFile("modified.txt"); + config->writeFile("modifiedModified.txt"); + ArServerHandlerConfig configHandler(&server, Aria::getConfig(), + "default.txt"); + + server.run(); + + Aria::shutdown(); + + return 0; +} diff --git a/Legacy/Aria/ArNetworking/examples/configServerRobot.cpp b/Legacy/Aria/ArNetworking/examples/configServerRobot.cpp new file mode 100644 index 0000000..60d0036 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/configServerRobot.cpp @@ -0,0 +1,30 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArConfig *config; + config = Aria::getConfig(); + + ArRobotP3DX dx; + //dx.writeFile("dx.txt"); + *Aria::getConfig() = dx; + //Aria::getConfig()->writeFile("dxcopy.txt"); + + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + + ArServerHandlerConfig configHandler(&server, Aria::getConfig()); + server.run(); + + Aria::shutdown(); + + return 0; +} diff --git a/Legacy/Aria/ArNetworking/examples/drawingsExample.cpp b/Legacy/Aria/ArNetworking/examples/drawingsExample.cpp new file mode 100644 index 0000000..9486158 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/drawingsExample.cpp @@ -0,0 +1,287 @@ +#include "Aria.h" +#include "ArNetworking.h" +#include + + +/** @example drawingsExample.cpp Example showing how to draw custom graphics in + * clients such as MobileEyes + * + * This is an example server that shows how to draw arbitrary figures in a + * client (e.g. MobileEyes) via ArServerInfoDrawings. It draws some lines, "arrows", and moving dots + * with various sizes and colors. You can use these drawings for debugging + * or visualization, for example, to represent sensor readings. In fact, + * specific support for ArRobot, ArSick, ArSonarDevice, ArIRs and ArBumpers + * are built in to ArServerInfoDrawings: see drawingsExampleWithRobot.cpp + * or serverDemo.cpp. + * + * @sa drawingsExampleWithRobot.cpp + */ + + +/* These are some callbacks that respond to client requests for the drawings' + * geometry data. */ +void exampleHomeDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); +void exampleDotsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); +void exampleXDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); +void exampleArrowsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); + + +/* This class shows how to encapsulate the various aspects of a drawing into one + * object that other parts of the program can easily access in a more general + * (and thread-safe) way. It lets you change position, radius, resolution + * (number of dots), and dot drawing properties. + * The default radius is 1 meter and the default number of points is 360. + * + * In this example program, the radius is updated periodically by a loop in the + * main thread (see main() function), while ArNetworking requests are handled + * in the separate ArNetworking server thread, calling drawingServerCB() callback (this is + * registered with the server when we register the drawing with the + * ArServerInfoDrawings object). So note the use of an ArMutex object to + * control this asyrchronous access to the reply packet. + */ +class Circle +{ +private: + ArNetPacket myReply; + ArMutex myMutex; // mutex around myReply + ArPose myPos; + double myRadius; + unsigned int myNumPoints; + void drawingServerCB(ArServerClient *client, ArNetPacket *pkt); + ArFunctor2C callback; + void regenerate(); +public: + Circle(ArServerInfoDrawings *drawingsServer, const std::string& name, ArDrawingData *drawData); + ~Circle(); + + void setPos(const ArPose& p) + { + myPos = p; + regenerate(); + } + + void setRadius(double r) + { + myRadius = r; + regenerate(); + } + + void setNumPoints(unsigned int r) + { + myNumPoints = r; + regenerate(); + } + +}; + +Circle::Circle(ArServerInfoDrawings *drawingsServer, const std::string& name, ArDrawingData* drawData) : + myRadius(1000.0), + myNumPoints(360), + callback(this, &Circle::drawingServerCB) +{ + drawingsServer->addDrawing(drawData, name.c_str(), &callback); +} + +Circle::~Circle() +{ + // TODO remove drawing from the server, but not implemented yet +} + +void Circle::drawingServerCB(ArServerClient *client, ArNetPacket *pkt) +{ + myMutex.lock(); + client->sendPacketUdp(&myReply); + myMutex.unlock(); +} + +// Method called by accessor methods when properties changed. This reconstructs +// the myReply packet sent in response to requests from clients +void Circle::regenerate() +{ + myMutex.lock(); + myReply.empty(); + myReply.byte4ToBuf(myNumPoints); + double a = 360.0/myNumPoints; + for(unsigned int i = 0; i < myNumPoints; ++i) + { + myReply.byte4ToBuf(ArMath::roundInt(myPos.getX()+ArMath::cos(i*a)*myRadius)); // X + myReply.byte4ToBuf(ArMath::roundInt(myPos.getY()+ArMath::sin(i*a)*myRadius)); // Y + } + myMutex.unlock(); +} + + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + + ArArgumentParser parser(&argc, argv); + ArServerSimpleOpener simpleOpener(&parser); + + // parse the command line... fail and print the help if the parsing fails + // or if help was requested + parser.loadDefaultArguments(); + if (!simpleOpener.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + simpleOpener.logOptions(); + exit(1); + } + + + // first open the server up + if (!simpleOpener.open(&server)) + { + if (simpleOpener.wasUserFileBad()) + printf("Error: Bad user/password/permissions file.\n"); + else + printf("Error: Could not open server port. Use -help to see options.\n"); + exit(1); + } + + + // This is the service that provides drawing data to the client. + ArServerInfoDrawings drawings(&server); + + // Add our custom drawings + drawings.addDrawing( + // shape: color: size: layer: + new ArDrawingData("polyLine", ArColor(255, 0, 0), 2, 49), + "exampleDrawing_Home", + new ArGlobalFunctor2(&exampleHomeDrawingNetCallback) + ); + drawings.addDrawing( + new ArDrawingData("polyDots", ArColor(0, 255, 0), 250, 48), + "exampleDrawing_Dots", + new ArGlobalFunctor2(&exampleDotsDrawingNetCallback) + ); + drawings.addDrawing( + new ArDrawingData("polySegments", ArColor(0, 0, 0), 4, 52), + "exampleDrawing_XMarksTheSpot", + new ArGlobalFunctor2(&exampleXDrawingNetCallback) + ); + drawings.addDrawing( + new ArDrawingData("polyArrows", ArColor(255, 0, 255), 500, 100), + "exampleDrawing_Arrows", + new ArGlobalFunctor2(&exampleArrowsDrawingNetCallback) + ); + + Circle circle(&drawings, "exampleDrawing_circle", + new ArDrawingData("polySegments", ArColor(255, 150, 0), 3, 120)); + circle.setPos(ArPose(0, -5000)); + circle.setRadius(1000); + circle.setNumPoints(360); + + // log whatever we wanted to before the runAsync + simpleOpener.checkAndLog(); + + // run the server thread in the background + server.runAsync(); + + printf("Server is now running...\n"); + + + // Add a key handler mostly that windows can exit by pressing + // escape, note that the key handler prevents you from running this program + // in the background on Linux. + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + printf("To exit, press escape.\n"); + } + + + double circleRadius = 1000; + while(true) + { + ArUtil::sleep(100); + circleRadius += 50; + if(circleRadius > 5000) + circleRadius = 0; + circle.setRadius(circleRadius); + } + + Aria::shutdown(); + exit(0); +} + + + + +// Network callbacks for drawings' current geometry data: + +void exampleHomeDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + ArNetPacket reply; + + // 7 Vertices + reply.byte4ToBuf(7); + + // Centered on 0,0. + // X: Y: + reply.byte4ToBuf(-500); reply.byte4ToBuf(500); // Vertex 1 + reply.byte4ToBuf(-500); reply.byte4ToBuf(-500); // Vertex 2 + reply.byte4ToBuf(500); reply.byte4ToBuf(-500); // Vertex 3 + reply.byte4ToBuf(500); reply.byte4ToBuf(500); // Vertex 4 + reply.byte4ToBuf(0); reply.byte4ToBuf(1000); // Vertex 5 + reply.byte4ToBuf(-500); reply.byte4ToBuf(500); // Vertex 6 + reply.byte4ToBuf(500); reply.byte4ToBuf(500); // Vertex 7 + + client->sendPacketUdp(&reply); +} + +void exampleDotsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + ArNetPacket reply; + + unsigned int tik = ArUtil::getTime() % 200; + double t = tik / 5.0; + + // Three dots + reply.byte4ToBuf(3); + + // Dot 1: + reply.byte4ToBuf(3000); // X coordinate (mm) + reply.byte4ToBuf((int) (sin(t) * 1000));// Y + + // Dot 2: + reply.byte4ToBuf(3500); // X + reply.byte4ToBuf((int) (sin(t+500) * 1000));// Y + + // Dot 3: + reply.byte4ToBuf(4000); // X + reply.byte4ToBuf((int) (sin(t+1000) * 1000));// Y + + client->sendPacketUdp(&reply); +} + +void exampleXDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + ArNetPacket reply; + + // X marks the spot. 2 line segments, so 4 vertices: + reply.byte4ToBuf(4); + + // Segment 1: + reply.byte4ToBuf(-4250); // X1 + reply.byte4ToBuf(250); // Y1 + reply.byte4ToBuf(-3750); // X2 + reply.byte4ToBuf(-250); // Y2 + + // Segment 2: + reply.byte4ToBuf(-4250); // X1 + reply.byte4ToBuf(-250); // Y1 + reply.byte4ToBuf(-3750); // X2 + reply.byte4ToBuf(250); // Y2 + + client->sendPacketUdp(&reply); +} + +void exampleArrowsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + // 1 Arrow that points at the robot + ArNetPacket reply; + reply.byte4ToBuf(1); + reply.byte4ToBuf(0); // Pos. X + reply.byte4ToBuf(700); // Pos. Y + client->sendPacketUdp(&reply); +} + diff --git a/Legacy/Aria/ArNetworking/examples/drawingsExampleWithRobot.cpp b/Legacy/Aria/ArNetworking/examples/drawingsExampleWithRobot.cpp new file mode 100644 index 0000000..49525de --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/drawingsExampleWithRobot.cpp @@ -0,0 +1,256 @@ +#include "Aria.h" +#include "ArNetworking.h" +#include + +/** @example drawingsExampleWithRobot.cpp Example showing how to draw custom + * graphics in clients such as MobileEyes, and enable drawing of sensor + * readings as well. + * + * This is an example server that shows how to draw arbitrary figures in a + * client (e.g. MobileEyes). It also uses the convenient built-in + * support for visualization built in to ArRobot, ArSick, ArSonarDevice, + * etc. + * + * @sa drawingsExample.cpp which does not include robot and sensor drawings + */ + +/* These are callbacks that respond to client requests for the drawings' + * geometry data. */ +void exampleHomeDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); +void exampleDotsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); +void exampleXDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); +void exampleArrowsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt); + +int main(int argc, char **argv) +{ + Aria::init(); + ArRobot robot; + ArServerBase server; + + ArArgumentParser parser(&argc, argv); + ArSimpleConnector simpleConnector(&parser); + ArServerSimpleOpener simpleOpener(&parser); + + + // parse the command line... fail and print the help if the parsing fails + // or if help was requested + parser.loadDefaultArguments(); + if (!simpleConnector.parseArgs() || !simpleOpener.parseArgs() || + !parser.checkHelpAndWarnUnparsed()) + { + simpleConnector.logOptions(); + simpleOpener.logOptions(); + exit(1); + } + + // Set up where we'll look for files such as config file, user/password file, + // etc. + char fileDir[1024]; + ArUtil::addDirectories(fileDir, sizeof(fileDir), Aria::getDirectory(), + "ArNetworking/examples"); + + // first open the server up + if (!simpleOpener.open(&server, fileDir, 240)) + { + if (simpleOpener.wasUserFileBad()) + printf("Error: Bad user/password/permissions file.\n"); + else + printf("Error: Could not open server port. Use -help to see options.\n"); + exit(1); + } + + + // Devices + ArAnalogGyro gyro(&robot); + + ArSonarDevice sonarDev; + robot.addRangeDevice(&sonarDev); + + ArIRs irs; + robot.addRangeDevice(&irs); + + ArBumpers bumpers; + robot.addRangeDevice(&bumpers); + + ArSick sick(361, 180); + robot.addRangeDevice(&sick); + + + ArServerInfoRobot serverInfoRobot(&server, &robot); + ArServerInfoSensor serverInfoSensor(&server, &robot); + + // This is the service that provides drawing data to the client. + ArServerInfoDrawings drawings(&server); + + // Convenience function that sets up drawings for all the robot's current + // range devices (using default shape and color info) + drawings.addRobotsRangeDevices(&robot); + + // Add our custom drawings + drawings.addDrawing( + // shape: color: size: layer: + new ArDrawingData("polyLine", ArColor(255, 0, 0), 2, 49), + "exampleDrawing_Home", + new ArGlobalFunctor2(&exampleHomeDrawingNetCallback) + ); + drawings.addDrawing( + new ArDrawingData("polyDots", ArColor(0, 255, 0), 250, 48), + "exampleDrawing_Dots", + new ArGlobalFunctor2(&exampleDotsDrawingNetCallback) + ); + drawings.addDrawing( + new ArDrawingData("polySegments", ArColor(0, 0, 0), 4, 52), + "exampleDrawing_XMarksTheSpot", + new ArGlobalFunctor2(&exampleXDrawingNetCallback) + ); + drawings.addDrawing( + new ArDrawingData("polyArrows", ArColor(255, 0, 255), 500, 100), + "exampleDrawing_Arrows", + new ArGlobalFunctor2(&exampleArrowsDrawingNetCallback) + ); + + // modes for moving the robot + ArServerModeStop modeStop(&server, &robot); + ArServerModeDrive modeDrive(&server, &robot); + ArServerModeRatioDrive modeRatioDrive(&server, &robot); + ArServerModeWander modeWander(&server, &robot); + modeStop.addAsDefaultMode(); + modeStop.activate(); + + + + // Connect to the robot. + if (!simpleConnector.connectRobot(&robot)) + { + printf("Error: Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // set up the laser before handing it to the laser mode + simpleConnector.setupLaser(&sick); + + robot.enableMotors(); + + // start the robot cycle running in a background thread + robot.runAsync(true); + + // start the laser processing cycle in a background thread + sick.runAsync(); + + // connect the laser if it was requested + if (!simpleConnector.connectLaser(&sick)) + { + printf("Error: Could not connect to laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + // log whatever we wanted to before the runAsync + simpleOpener.checkAndLog(); + + // run the server thread in the background + server.runAsync(); + + printf("Server is now running...\n"); + + + // Add a key handler mostly that windows can exit by pressing + // escape, note that the key handler prevents you from running this program + // in the background on Linux. + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + robot.lock(); + robot.attachKeyHandler(keyHandler); + robot.unlock(); + printf("To exit, press escape.\n"); + } + + robot.waitForRunExit(); + + + Aria::shutdown(); + exit(0); +} + + + + +// Network callbacks for drawings' current geometry data: + +void exampleHomeDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + ArNetPacket reply; + + // 7 Vertices + reply.byte4ToBuf(7); + + // Centered on 0,0. + // X: Y: + reply.byte4ToBuf(-500); reply.byte4ToBuf(500); // Vertex 1 + reply.byte4ToBuf(-500); reply.byte4ToBuf(-500); // Vertex 2 + reply.byte4ToBuf(500); reply.byte4ToBuf(-500); // Vertex 3 + reply.byte4ToBuf(500); reply.byte4ToBuf(500); // Vertex 4 + reply.byte4ToBuf(0); reply.byte4ToBuf(1000); // Vertex 5 + reply.byte4ToBuf(-500); reply.byte4ToBuf(500); // Vertex 6 + reply.byte4ToBuf(500); reply.byte4ToBuf(500); // Vertex 7 + + client->sendPacketUdp(&reply); +} + +void exampleDotsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + ArNetPacket reply; + + unsigned int tik = ArUtil::getTime() % 200; + double t = tik / 5.0; + + // Three dots + reply.byte4ToBuf(3); + + // Dot 1: + reply.byte4ToBuf(3000); // X coordinate (mm) + reply.byte4ToBuf((int) (sin(t) * 1000));// Y + + // Dot 2: + reply.byte4ToBuf(3500); // X + reply.byte4ToBuf((int) (sin(t+500) * 1000));// Y + + // Dot 3: + reply.byte4ToBuf(4000); // X + reply.byte4ToBuf((int) (sin(t+1000) * 1000));// Y + + client->sendPacketUdp(&reply); +} + +void exampleXDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + ArNetPacket reply; + + // X marks the spot. 2 line segments, so 4 vertices: + reply.byte4ToBuf(4); + + // Segment 1: + reply.byte4ToBuf(-4250); // X1 + reply.byte4ToBuf(250); // Y1 + reply.byte4ToBuf(-3750); // X2 + reply.byte4ToBuf(-250); // Y2 + + // Segment 2: + reply.byte4ToBuf(-4250); // X1 + reply.byte4ToBuf(-250); // Y1 + reply.byte4ToBuf(-3750); // X2 + reply.byte4ToBuf(250); // Y2 + + client->sendPacketUdp(&reply); +} + +void exampleArrowsDrawingNetCallback(ArServerClient* client, ArNetPacket* requestPkt) { + // 1 Arrow that points at the robot + ArNetPacket reply; + reply.byte4ToBuf(1); + reply.byte4ToBuf(0); // Pos. X + reply.byte4ToBuf(700); // Pos. Y + client->sendPacketUdp(&reply); +} + diff --git a/Legacy/Aria/ArNetworking/examples/getVideoExample.cpp b/Legacy/Aria/ArNetworking/examples/getVideoExample.cpp new file mode 100644 index 0000000..e7e65f9 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/getVideoExample.cpp @@ -0,0 +1,164 @@ +#include "Aria.h" +#include "ArNetworking.h" + +/** @example getVideoExample.cpp + * + * This example client requests video images from the server + * and saves them repeatedly to a file named "video.jpg", or + * to a series of files ("video1.jpg", "video2.jpg", etc.) if + * you give the -counter option. Give the image request rate + * in images per second with the -rate option (or use -1 to let + * the server decide when to send image; may not work with all servers). + * + * Connect to SAVserver, ACTS, or another video server to get + * images. + * + * To make a movie from the images, you can use ffmpeg on Linux. + * First run with frame rate and counter options to save multiple images: + * ./getVideoExample -host robothost -port 7272 -rate 20 -counter + * Then use ffmpeg: + * ffmpeg -i video%d.jpeg -r 20 movie.mpeg + * See ffmpeg -h for full list of options. + */ + + +bool useCounter = false; +unsigned long counter = 1; + +double rate = 0; +int rateAsTime = 0; + +void jpegHandler(ArNetPacket *packet) +{ + unsigned int width; + unsigned int height; + static unsigned char jpeg[50000]; + int jpegSize; + FILE *file; + + width = packet->bufToUByte2(); + height = packet->bufToUByte2(); + jpegSize = packet->getDataLength() - packet->getDataReadLength(); + if(jpegSize > 50000) + { + ArLog::log(ArLog::Normal, "Cannot save image, it's too big. (image is %d bytes, my buffer is 50000 bytes)", jpegSize); + return; + } + packet->bufToData((char *)jpeg, jpegSize); + char filename[128]; + char tmpFilename[128]; + sprintf(tmpFilename, "tmp.jpg"); + if ((file = ArUtil::fopen(tmpFilename, "wb")) != NULL) + { + fwrite(jpeg, jpegSize, 1, file); + fclose(file); + if(useCounter) + snprintf(filename, 64, "video%lu.jpg", counter++); + else + strcpy(filename, "video.jpg"); +#ifdef WIN32 + // On windows, rename() fails if the new file already exists + unlink(filename); +#endif + if (rename(tmpFilename, filename) == 0) + ArLog::log(ArLog::Normal, "Wrote a %dx%d image, %d bytes, named %s.", width, height, jpegSize, filename); + else + ArLog::log(ArLog::Normal, "Wrote a %dx%d image, %d bytes, named %s (could not rename to real name).", width, height, jpegSize, tmpFilename); + } + else + ArLog::log(ArLog::Normal, "Could not write temp file %s", tmpFilename); + + if (rate == 0 || rateAsTime == 0) + { + ArLog::log(ArLog::Normal, "Only one frame was requested, so exiting"); + Aria::exit(0); + } +} + +int main(int argc, char **argv) +{ + +#ifndef WIN32 + ArDaemonizer daemonizer(&argc, argv, false); + bool isDaemonized = false; + if (!daemonizer.daemonize()) + { + ArLog::log(ArLog::Terse, "Could not daemonize process"); + exit(1); + } + if (daemonizer.isDaemonized()) + isDaemonized = true; +#endif + + Aria::init(); + ArLog::init(ArLog::File, ArLog::Normal, "getVideoLog.txt", true, true, true); + + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + + ArClientSimpleConnector clientConnector(&argParser); + + if(argParser.checkParameterArgumentDouble("-rate", &rate) && rate != 0.0) + { + if(rate == -1) + rateAsTime = -1; + else + rateAsTime = ArMath::roundInt(1000.0 / rate); + } + + useCounter = argParser.checkArgument("-counter"); + + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + ArLog::log(ArLog::Terse, "\n\n%s options:\n-rate (If this isn't given, then the program will take one frame then exit, note that it is a double (so you can do .5 to do one frame per 2 seconds) and that if you set it to be too fast you'll saturate the robot's bandwidth and make it useless)\n-counter (default no)\n", argv[0]); + + ArLog::log(ArLog::Terse, "\n\nNotes:\nThis program saves the images as video.jpg if you aren't using a counter, or video.jpg if you are using the counter.\nIt puts its logs into getVideoLog.txt, and overwrites it whenever it runs\n"); + + return 1; + } + + + + ArClientBase client; + if (!clientConnector.connectClient(&client)) + { + ArLog::log(ArLog::Normal, "Could not connect to server, exiting\n"); + exit(1); + } + + ArGlobalFunctor1 jpegHandlerCB(&jpegHandler); + + if(client.dataExists("getPictureCam1")) + { + ArLog::log(ArLog::Normal, "Requesting images using \"getPictureCam1\" request."); + client.addHandler("getPictureCam1", &jpegHandlerCB); + if (rate != 0 && rateAsTime != 0) + client.request("getPictureCam1", rateAsTime); + else + client.requestOnce("getPictureCam1"); + } + else if(client.dataExists("sendVideo")) + { + ArLog::log(ArLog::Normal, "Server does not have \"getPictureCam1\" request, requesting images using old \"sendVideo\" request."); + client.addHandler("sendVideo", &jpegHandlerCB); + if (rate != 0 && rateAsTime != 0) + client.request("sendVideo", rateAsTime); + else + client.requestOnce("sendVideo"); + } + else + { + ArLog::log(ArLog::Terse, "Error: Server does not have \"getPictureCam1\" or \"sendVideo\" request, cannot request images."); + Aria::exit(2); + } + + + client.run(); + + Aria::shutdown(); + return 0; +} + + + diff --git a/Legacy/Aria/ArNetworking/examples/popupExample.cpp b/Legacy/Aria/ArNetworking/examples/popupExample.cpp new file mode 100644 index 0000000..fa8cc14 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/popupExample.cpp @@ -0,0 +1,189 @@ + +#include "Aria.h" +#include "ArNetworking.h" + +/** @example popupExample.cpp Shows how to create popup windows in a client like MobileEyes + * + * This example server program connects to a robot, and sends a message to clients (e.g. MobileEyes) to display + * in a dialog box when a sensor reading is detected in front of the robot + * within 1 meter. It also checks to see if that obstacle is not at the same + * angle as the previous detected obstacle -- it's probably the same one, + * unmoved -- to avoid sending repeated popups. The popup offers three choices, + * acknowlege and do nothing, turn the robot around 180 degrees, or exit the server. + */ + + +class SensorDetectPopup +{ +public: + SensorDetectPopup(ArRobot *robot, ArServerHandlerPopup *popupServer); +protected: + ArRobot *myRobot; + ArServerHandlerPopup *myPopupServer; + bool myPopupDisplayed; + double myPrevObstacleAngle; + bool myPrevObstacleAngleValid; + ArFunctor2C *myPopupClosedCB; + + void popupClosed(ArTypes::Byte4 popupID, int button); + void sensorTask(void) ; +}; + + +int main(int argc, char **argv) +{ + Aria::init(); + ArRobot robot; + ArSonarDevice sonar; + ArSick sick; + robot.addRangeDevice(&sonar); + ArServerBase server; + + // Argument parser: + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + + // Connector and server opener: + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "popupExample: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + } + Aria::exit(1); + } + + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + + ArServerSimpleOpener simpleOpener(&parser); + + // Get command-line and other parameters + if(!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + robot.runAsync(true); + + // connect to the laser + if(!laserConnector.connectLasers()) + { + ArLog::log(ArLog::Normal, "popupExample: Warning: Could not connect to lasers."); + } + + + // Open the server + if(!simpleOpener.open(&server)) + { + ArLog::log(ArLog::Terse, "popupExample: Error, could not open server."); + return 1; + } + server.runAsync(); + ArLog::log(ArLog::Normal, "popupExample: Server running. Press control-C to exit."); + ArLog::log(ArLog::Normal, "popupExample: Each time an obstacle is detected near the robot, a new popup message will be created. Connect with MobileEyes to see them."); + + // Sends robot position etc. + ArServerInfoRobot robotInfoServer(&server, &robot); + + // This service sends drawings e.g. showing range device positions + ArServerInfoDrawings drawingsServer(&server); + drawingsServer.addRobotsRangeDevices(&robot); + + // This service can send messages to clients to display as popup dialogs: + ArServerHandlerPopup popupServer(&server); + + // This object contains the robot sensor interpretation task and creates + // popups: + SensorDetectPopup(&robot, &popupServer); + + robot.enableMotors(); + robot.waitForRunExit(); + + Aria::exit(0); +} + +SensorDetectPopup::SensorDetectPopup(ArRobot *robot, ArServerHandlerPopup *popupServer) : + myRobot(robot), + myPopupServer(popupServer), + myPopupDisplayed(false), + myPrevObstacleAngleValid(false) +{ + myRobot->lock(); + myRobot->addSensorInterpTask("sensorDetectPopup", 50, new ArFunctorC(this, &SensorDetectPopup::sensorTask)); + myPopupClosedCB = new ArFunctor2C(this, &SensorDetectPopup::popupClosed); + myRobot->unlock(); +} + +void SensorDetectPopup::sensorTask(void) +{ + // Basic obstacle detection + + if (myPopupDisplayed) return; + double detectAngle, detectRange; + detectRange = myRobot->checkRangeDevicesCurrentPolar(-90, 90, &detectAngle); + if (detectRange > 0 && detectRange <= 500) + { + if(myPrevObstacleAngleValid && fabs(detectAngle - myPrevObstacleAngle) < 0.0001) + return; + ArLog::log(ArLog::Normal, "popupExample: New obstacle detected at range %f, angle %f. Displaying popup dialog on client...", detectRange, detectAngle); + + ArServerHandlerPopupInfo info("popupExample", // ID + "Object Detected", // Title + "A range sensor detected a reading within 0.5 meters of the robot.", // Message + ArServerHandlerPopup::INFORMATION, // Type + 0, // Default button + 0, // Cancel/escape button + 5, // Timeout (sec.) + NULL, // Timeout String + "OK", "Acknowleged.", // Button 0 Label/Acknowlegement + "Turn Around", "Requested rotate...", // Button 1 Label/Acknowlegement + "Shut Down", "Shutting down server..." // Button 2 Label/Acknowlegement + ); + int id = myPopupServer->createPopup(&info, myPopupClosedCB); + ArLog::log(ArLog::Normal, "\t...Created a popup with ID=%d", id); + myPopupDisplayed = true; + myPrevObstacleAngle = detectAngle; + myPrevObstacleAngleValid = true; + } +} + +void SensorDetectPopup::popupClosed(ArTypes::Byte4 popupID, int button) +{ + // A client closed the popup + ArLog::log(ArLog::Normal, "popupExample: a client closed popup dialog window with id=%d. Button=%d...", popupID, button); + myPopupDisplayed = false; + + if(button < 0) + { + ArLog::log(ArLog::Normal, "\t...popup timed out or closed due to an error."); + return; + } + + if (button == 0) + { + ArLog::log(ArLog::Normal, "\t...OK pressed."); + return; + } + + if(button == 1) + { + ArLog::log(ArLog::Normal, "\t...180 degree rotate requested."); + myRobot->lock(); + myRobot->setDeltaHeading(180); + myRobot->unlock(); + return; + } + + if(button == 2) + { + ArLog::log(ArLog::Normal, "\t...exit requested."); + myRobot->stopRunning(); + Aria::shutdown(); + Aria::exit(0); + } +} + + diff --git a/Legacy/Aria/ArNetworking/examples/ptzCameraClientExample.cpp b/Legacy/Aria/ArNetworking/examples/ptzCameraClientExample.cpp new file mode 100644 index 0000000..54937b7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/ptzCameraClientExample.cpp @@ -0,0 +1,334 @@ +#include "Aria.h" +#include "ArNetworking.h" +#include + + +/** @example ptzCameraClientExample.cpp Example client showing how to control a Pan/Tilt/Zoom + * camera remotely. + * + * To use, serverDemo, arnlServer from ARNL, sonarnlServer from SONARNL, or + * your own server program that includes an ArServerHandlerCamera object. + * Then from another host, run ptzCameraClientExample with the -host argument. + * For example, if the hostname of the robot's onboard computer is "robot", run: + * ptzCameraClientExample -host robot + * Or use an IP address, for example, if the address is 10.0.126.32: + * ptzCameraClientExample -host 10.0.126.32 + * + * This program connects to the server, gets a list of cameras if neccesary, and + * for each camera on the robot, it receives and prints out one information + * packet, then a continuous stream of data packets, and then sends requests + * to cycle through each of its pan and tilt limits. + * + * This program does not get any video images from the server. To do so, use + * a video server (e.g. SAV server or ACTS), and see getVideoExample for an + * example client. + */ + + +/** A request packet that is able to send a copy of itself, with data packed in, + * to a server. + */ +class ArNetCameraRequest : public ArNetPacket +{ + ArClientBase *myClient; + std::string myAbsReqName; +public: + ArNetCameraRequest(ArClientBase *client, const char *cameraName = "") : myClient(client), myAbsReqName(std::string("setCameraAbs")+cameraName) + {} + void setCameraName(const char *name) { + myAbsReqName = std::string("setCameraAbs") + name; + } + bool requestPanTiltZoomAbs(double pan, double tilt, double zoom); + bool requestPanTiltAbs(double pan, double tilt); +}; + + +/** Includes callbacks for receiving info and data packets from a + * camera server and storing the values parsed from them. + */ +class ArClientHandlerCamera { +public: + std::string name; + std::string type; + std::string displayName; + std::string displayType; + double minPan, maxPan, minTilt, maxTilt, minZoom, maxZoom; + bool haveZoom; + double pan, tilt, zoom; + + void handleCameraInfoReply(ArNetPacket *packet); + void handleCameraDataReply(ArNetPacket *packet); + + ArClientBase *myClient; + ArNetCameraRequest request; + ArMutex myMutex; + + ArFunctor1C myCameraInfoReplyFunc; + ArFunctor1C myCameraDataReplyFunc; + + ArClientHandlerCamera(ArClientBase *client, const char *cameraName) : + name(cameraName), myClient(client), request(client, cameraName) , + myCameraInfoReplyFunc(this, &ArClientHandlerCamera::handleCameraInfoReply), + myCameraDataReplyFunc(this, &ArClientHandlerCamera::handleCameraDataReply) + { + myClient->addHandler((std::string("getCameraInfo")+name).c_str(), &myCameraInfoReplyFunc); + myClient->addHandler((std::string("getCameraData")+name).c_str(), &myCameraDataReplyFunc); + } + + void requestUpdates(int dataRequestFreq) { + myClient->request((std::string("getCameraInfo")+name).c_str(), -1); + myClient->request((std::string("getCameraData")+name).c_str(), 100); + } + + void lock() { myMutex.lock(); } + void unlock() { myMutex.unlock(); } +}; + + +/** Requests a list of cameras if neccesary, maintains a list of cameras, and implements example pan/tilt movements */ +class PtzCameraExample +{ + ArClientBase *myClient; + + std::set myCameras; + ArMutex mutex; + + ArFunctor1C myCameraListReplyFunc; + + void handleCameraListReply(ArNetPacket *packet); + + +public: + PtzCameraExample(ArClientBase *client) : + myClient(client), + myCameraListReplyFunc(this, &PtzCameraExample::handleCameraListReply) + { + } + + bool init(); + void run(); +}; + + + +int main(int argc, char **argv) +{ + Aria::init(); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + return 1; + } + + if (!clientConnector.connectClient(&client)) + { + if(client.wasRejected()) + ArLog::log(ArLog::Terse, "Error, server '%s' rejected connection. Exiting.", client.getHost()); + else + ArLog::log(ArLog::Terse, "Error, could not connect to server '%s'. Exiting.", client.getHost()); + return 2; + } + + client.setRobotName(client.getHost()); // include server hostname in log messages + + client.runAsync(); + + PtzCameraExample example(&client); + if(!example.init()) + return 1; + + example.run(); + + + Aria::shutdown(); + return 0; +} + + +bool PtzCameraExample::init() +{ + // If the server has the "getCameraList" request, then it's using + // ArServerHandlerCameraCollection, and migth have multiple PTZs/cameras each with + // its own set of requests. So send a "getCameraList" request, and when its + // reply is received, the handler will send "getCameraInfo" requests for each. + // If the server does not have "getCameraList", it only has one PTZ camera, just + // send "getCameraInfo". The handler for that will send various control + // commands. + // If the server does not have "getCameraInfo", then it doesn't provide any + // access to PTZ cameras. + if(myClient->dataExists("getCameraList")) + { + ArLog::log(ArLog::Normal, "Server may have multiple cameras. Requesting list."); + myClient->addHandler("getCameraList", &myCameraListReplyFunc); + myClient->requestOnce("getCameraList"); + } + else if(myClient->dataExists("getCameraInfo")) + { + ArLog::log(ArLog::Normal, "Server does not support multiple cameras. Requesting info for its camera."); + ArClientHandlerCamera *camClient = new ArClientHandlerCamera(myClient, ""); + camClient->requestUpdates(100); + mutex.lock(); + myCameras.insert(camClient); + mutex.unlock(); + } + else + { + ArLog::log(ArLog::Terse, "Error, server does not have any camera control requests. (Was the server run with video features enabled or video forwarding active?)"); + return false; + } + return true; +} + +void PtzCameraExample::handleCameraListReply(ArNetPacket *pkt) +{ + ArTypes::Byte2 numCams = pkt->bufToByte2(); + ArLog::log(ArLog::Normal, "%d cameras in list.", numCams); + char camName[128]; + char camType[128]; + char displayName[128]; + char displayType[128]; + char cmdDesc[128]; + char cmdName[128]; + ArTypes::Byte4 cmdFreq; + int dataReqFreq = 100; + for(ArTypes::Byte2 i = 0; i < numCams; ++i) + { + memset(camName, 0, 128); + memset(camType, 0, 128); + memset(displayName, 0, 128); + memset(displayType, 0, 128); + pkt->bufToStr(camName, 128); // name + + ArClientHandlerCamera *cam = new ArClientHandlerCamera(myClient, camName); + + pkt->bufToStr(camType, 128); // type + cam->type = camType; + pkt->bufToStr(displayName, 128); // description + cam->displayName = displayName; + pkt->bufToStr(displayType, 128); // description + cam->displayType = displayType; + ArTypes::Byte2 numCmds = pkt->bufToByte2(); + ArLog::log(ArLog::Normal, "%d commands for camera \'%s\' (%s) / \'%s\' (%s)", numCmds, camName, camType, displayName, displayType); + for(ArTypes::Byte2 c = 0; c < numCmds; ++c) + { + memset(cmdDesc, 0, 128); + memset(cmdName, 0, 128); + char cmdDesc[128]; + char cmdName[128]; + pkt->bufToStr(cmdDesc, 128); // description + pkt->bufToStr(cmdName, 128); // request name + cmdFreq = pkt->bufToByte4(); // recommended request frequency + ArLog::log(ArLog::Normal, "Camera %s has %s command named %s with recommended request frequency %d.", camName, cmdDesc, cmdName, cmdFreq); + + if(strcmp(cmdDesc, "getCameraData") == 0) + dataReqFreq = cmdFreq; + } + ArTypes::Byte2 numParams = pkt->bufToByte2(); + ArLog::log(ArLog::Normal, "Camera %s has %d parameters.", camName, numParams); + for(ArTypes::Byte2 p = 0; p < numParams; ++p) + { + ArClientArg carg; + ArConfigArg arg; + if(!carg.bufToArgValue(pkt, arg)) + ArLog::log(ArLog::Normal, "Hmm, error getting ArClientArg for camera %s's parameter #%d.", camName, p); + } + + cam->requestUpdates(dataReqFreq); + mutex.lock(); + myCameras.insert(cam); + mutex.unlock(); + } +} + +void ArClientHandlerCamera::handleCameraInfoReply(ArNetPacket *pkt) +{ + lock(); + minPan = pkt->bufToByte2() / 1000.0; + maxPan = pkt->bufToByte2() / 1000.0; + minTilt = pkt->bufToByte2() / 1000.0; + maxTilt = pkt->bufToByte2() / 1000.0; + minZoom = pkt->bufToByte2() / 1000.0; + maxZoom = pkt->bufToByte2() / 1000.0; + haveZoom = pkt->bufToByte(); + ArLog::log(ArLog::Normal, "Got getCameraInfo reply with pan range (%f, %f), tilt range (%f, %f), zoom range (%f, %f), zoom valid %d.", minPan, maxPan, minTilt, maxTilt, minZoom, maxZoom, haveZoom); + unlock(); +} + +void ArClientHandlerCamera::handleCameraDataReply(ArNetPacket *pkt) +{ + lock(); + pan = pkt->bufToByte2() / 1000.0; + tilt = pkt->bufToByte2() / 1000.0; + zoom = pkt->bufToByte2() /1000.0; + ArLog::log(ArLog::Normal, "Got camera data from camera %s with current pan=%f, tilt=%f, zoom=%f.", name.c_str(), pan, tilt, zoom); + unlock(); +} + +bool ArNetCameraRequest::requestPanTiltAbs(double pan, double tilt) +{ + empty(); + byte2ToBuf((ArTypes::Byte2)(pan * 1000.0)); + byte2ToBuf((ArTypes::Byte2)(tilt * 1000.0)); + finalizePacket(); + return myClient->requestOnce(myAbsReqName.c_str(), this); +} + +bool ArNetCameraRequest::requestPanTiltZoomAbs(double pan, double tilt, double zoom) +{ + empty(); + byte2ToBuf((ArTypes::Byte2)(pan * 1000.0)); + byte2ToBuf((ArTypes::Byte2)(tilt * 1000.0)); + byte2ToBuf((ArTypes::Byte2)(zoom * 1000.0)); + finalizePacket(); + return myClient->requestOnce(myAbsReqName.c_str(), this); +} + + +void PtzCameraExample::run() +{ + enum { MinPan, MaxPan, Center1, MinTilt, MaxTilt, Center2} stage; + stage = MinPan; + while(myClient->isConnected()) + { + mutex.lock(); + for(std::set::const_iterator i = myCameras.begin(); i != myCameras.end(); ++i) + { + ArClientHandlerCamera* c = (*i); + c->lock(); + switch(stage) + { + case MinPan: + c->request.requestPanTiltAbs(c->minPan, 0); + stage = MaxPan; + break; + case MaxPan: + c->request.requestPanTiltAbs(c->maxPan, 0); + stage = Center1; + break; + case Center1: + c->request.requestPanTiltAbs(0, 0); + stage = MinTilt; + break; + case MinTilt: + c->request.requestPanTiltAbs(0, c->minTilt); + stage = MaxTilt; + break; + case MaxTilt: + c->request.requestPanTiltAbs(0, c->maxTilt); + stage = Center2; + break; + case Center2: + c->request.requestPanTiltAbs(0, 0); + stage = MinPan; + } + c->unlock(); + } + mutex.unlock(); + ArUtil::sleep(3000); + } +} diff --git a/Legacy/Aria/ArNetworking/examples/serverDemo-vc2003.vcproj b/Legacy/Aria/ArNetworking/examples/serverDemo-vc2003.vcproj new file mode 100644 index 0000000..9cb5df0 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemo-vc2003.vcproj @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/serverDemo-vc2008.vcproj b/Legacy/Aria/ArNetworking/examples/serverDemo-vc2008.vcproj new file mode 100644 index 0000000..bb5f55b --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemo-vc2008.vcproj @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/serverDemo-vc2010.vcxproj b/Legacy/Aria/ArNetworking/examples/serverDemo-vc2010.vcxproj new file mode 100644 index 0000000..4568514 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemo-vc2010.vcxproj @@ -0,0 +1,152 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + serverDemo + {B9C37E51-E357-4019-B4B5-71C42E1FCD11} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../../bin/ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../../bin/ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + serverDemoDebug + $(ProjectName) + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + .\../../bin/serverDemo.tlb + + + + + Disabled + ..\include;..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + false + false + true + true + Level3 + true + ProgramDatabase + Default + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib;ArNetworkingDebugVC10.lib + $(OutDir)$(TargetFileName) + 1.0 + true + ..\..\lib;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + .\../../bin/serverDemo.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + Level3 + true + Default + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib;ArNetworkingVC10.lib + $(OutDir)$(TargetFileName) + 1.0 + true + ..\..\lib;%(AdditionalLibraryDirectories) + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/examples/serverDemo.cpp b/Legacy/Aria/ArNetworking/examples/serverDemo.cpp new file mode 100644 index 0000000..150ca87 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemo.cpp @@ -0,0 +1,257 @@ +#include "Aria.h" +#include "ArNetworking.h" + +/** @example serverDemo.cpp Example ArNetworking server providing teleoperation, + * sonar data, control the camera, etc. + * + * This is a basic ArNetworking server. It connects to a robot or simulator, + * including, if available, IRs, gyro, and bumpers. Give the option + * "-connectLaser" on the command line to enable the laser rangefinder, + * if available. + * + * Run "./serverDemo -help" for a full list of command line options. + * + * Once running, connect to this server with a a client such as + * MobileEyes. + * + * This server provides the following services: + * - User login (optional) + * - Basic robot telemetry information + * - Range sensor data values (not used by MobileEyes) + * - Graphics representing range sensor reading positions + * - Teleoperation modes (including safe/unsafe drive modes) + * - Wander mode + * - Various advanced "custom" commands to control logging, debugging, etc. + * - If an ACTS or SAV server is running, forward the video stream + * - Camera control (pan/tilt/zoom) if cameras are available + * + * Note that this program requires a terminal to run -- i.e. you can't run + * it in the background in Linux. To modify it to allow that, remove the key + * handler code in main(). + */ + +int main(int argc, char **argv) +{ + // mandatory init + Aria::init(); + + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + // set up our parser + ArArgumentParser parser(&argc, argv); + + // load the default arguments + parser.loadDefaultArguments(); + + // robot + ArRobot robot; + // set up our simple connector + ArRobotConnector robotConnector(&parser, &robot); + + + // add a gyro, it'll see if it should attach to the robot or not + ArAnalogGyro gyro(&robot); + + + // set up the robot for connecting + if (!robotConnector.connectRobot()) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + } + + ArDataLogger dataLogger(&robot, "dataLog.txt"); + dataLogger.addToConfig(Aria::getConfig()); + + // our base server object + ArServerBase server; + + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + ArServerSimpleOpener simpleOpener(&parser); + + + ArClientSwitchManager clientSwitchManager(&server, &parser); + + // parse the command line... fail and print the help if the parsing fails + // or if the help was requested + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + // Set up where we'll look for files such as user/password + char fileDir[1024]; + ArUtil::addDirectories(fileDir, sizeof(fileDir), Aria::getDirectory(), + "ArNetworking/examples"); + + // first open the server up + if (!simpleOpener.open(&server, fileDir, 240)) + { + if (simpleOpener.wasUserFileBad()) + printf("Bad user/password/permissions file\n"); + else + printf("Could not open server port\n"); + exit(1); + } + + // Range devices: + + + ArSonarDevice sonarDev; + robot.addRangeDevice(&sonarDev); + + ArIRs irs; + robot.addRangeDevice(&irs); + + ArBumpers bumpers; + robot.addRangeDevice(&bumpers); + + // attach services to the server + ArServerInfoRobot serverInfoRobot(&server, &robot); + ArServerInfoSensor serverInfoSensor(&server, &robot); + ArServerInfoDrawings drawings(&server); + + // modes for controlling robot movement + ArServerModeStop modeStop(&server, &robot); + ArServerModeRatioDrive modeRatioDrive(&server, &robot); + ArServerModeWander modeWander(&server, &robot); + modeStop.addAsDefaultMode(); + modeStop.activate(); + + // set up the simple commands + ArServerHandlerCommands commands(&server); + ArServerSimpleComUC uCCommands(&commands, &robot); // send commands directly to microcontroller + ArServerSimpleComMovementLogging loggingCommands(&commands, &robot); // control debug logging + ArServerSimpleComGyro gyroCommands(&commands, &robot, &gyro); // configure gyro + ArServerSimpleComLogRobotConfig configCommands(&commands, &robot); // control more debug logging + ArServerSimpleServerCommands serverCommands(&commands, &server); // control ArNetworking debug logging + ArServerSimpleLogRobotDebugPackets logRobotDebugPackets(&commands, &robot, "."); // debugging tool + + // ArServerModeDrive is an older drive mode. ArServerModeRatioDrive is newer and generally performs better, + // but you can use this for old clients if neccesary. + //ArServerModeDrive modeDrive(&server, &robot); + //modeDrive.addControlCommands(&commands); // configure the drive modes (e.g. enable/disable safe drive) + + ArServerHandlerConfig serverHandlerConfig(&server, Aria::getConfig()); // make a config handler + ArLog::addToConfig(Aria::getConfig()); // let people configure logging + + modeRatioDrive.addToConfig(Aria::getConfig(), "Teleop settings"); // able to configure teleop settings + modeRatioDrive.addControlCommands(&commands); + + // Forward video if either ACTS or SAV server are running. + // You can find out more about SAV and ACTS on our website + // http://robots.activmedia.com. ACTS is for color tracking and is + // a separate product. SAV just does software A/V transmitting and is + // free to all our customers. Just run ACTS or SAV server before you + // start this program and this class here will forward video from the + // server to the client. + ArHybridForwarderVideo videoForwarder(&server, "localhost", 7070); + + // Control a pan/tilt/zoom camera, if one is installed, and the video + // forwarder was enabled above. + ArPTZ *camera = NULL; + ArServerHandlerCamera *handlerCamera = NULL; + ArCameraCollection *cameraCollection = NULL; + if (videoForwarder.isForwardingVideo()) + { + bool invertedCamera = false; + camera = new ArVCC4(&robot, invertedCamera, + ArVCC4::COMM_UNKNOWN, true, true); + camera->init(); + + cameraCollection = new ArCameraCollection(); + cameraCollection->addCamera("Cam1", "VCC4", "Camera", "VCC4"); + handlerCamera = new ArServerHandlerCamera("Cam1", + &server, + &robot, + camera, + cameraCollection); + } + + // You can use this class to send a set of arbitrary strings + // for MobileEyes to display, this is just a small example + ArServerInfoStrings stringInfo(&server); + Aria::getInfoGroup()->addAddStringCallback(stringInfo.getAddStringFunctor()); + Aria::getInfoGroup()->addStringInt( + "Motor Packet Count", 10, + new ArConstRetFunctorC(&robot, + &ArRobot::getMotorPacCount)); + /* + Aria::getInfoGroup()->addStringInt( + "Laser Packet Count", 10, + new ArRetFunctorC(&sick, + &ArSick::getSickPacCount)); + */ + + // start the robot running, true means that if we lose connection the run thread stops + robot.runAsync(true); + + + // connect the laser(s) if it was requested + if (!laserConnector.connectLasers()) + { + printf("Could not connect to lasers... exiting\n"); + Aria::exit(2); + } + + + drawings.addRobotsRangeDevices(&robot); + + // log whatever we wanted to before the runAsync + simpleOpener.checkAndLog(); + // now let it spin off in its own thread + server.runAsync(); + + printf("Server is now running...\n"); + + // Add a key handler so that you can exit by pressing + // escape. Note that a key handler prevents you from running + // a program in the background on Linux, since it expects an + // active terminal to read keys from; remove this if you want + // to run it in the background. + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + robot.lock(); + robot.attachKeyHandler(keyHandler); + robot.unlock(); + printf("To exit, press escape.\n"); + } + + // Read in parameter files. + std::string configFile = "serverDemoConfig.txt"; + Aria::getConfig()->setBaseDirectory("./"); + if (Aria::getConfig()->parseFile(configFile.c_str(), true, true)) + { + ArLog::log(ArLog::Normal, "Loaded config file %s", configFile.c_str()); + } + else + { + if (ArUtil::findFile(configFile.c_str())) + { + ArLog::log(ArLog::Normal, + "Trouble loading configuration file %s, continuing", + configFile.c_str()); + } + else + { + ArLog::log(ArLog::Normal, + "No configuration file %s, will try to create if config used", + configFile.c_str()); + } + } + + clientSwitchManager.runAsync(); + + robot.lock(); + robot.enableMotors(); + robot.unlock(); + + robot.waitForRunExit(); + Aria::exit(0); +} + + diff --git a/Legacy/Aria/ArNetworking/examples/serverDemo.userInfo b/Legacy/Aria/ArNetworking/examples/serverDemo.userInfo new file mode 100644 index 0000000..b36409f --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemo.userInfo @@ -0,0 +1,8 @@ +; You'll want to change the . below to the actual password you want +; used for the different accounts, also note you can start up serverDemo +; with this information by giving it the '-userInfo ' +; argument on the command line +UserInfoVersion1 +user user . CustomCommands Movement RobotInfo SensorInfo Stop UnsafeMovement +user guest . CustomCommands Movement RobotInfo SensorInfo Stop UnsafeMovement +user administrator . all diff --git a/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2003.vcproj b/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2003.vcproj new file mode 100644 index 0000000..ec45845 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2003.vcproj @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2008.vcproj b/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2008.vcproj new file mode 100644 index 0000000..2446a63 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2008.vcproj @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2010.vcxproj b/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2010.vcxproj new file mode 100644 index 0000000..cc93bf5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/serverDemoStatic-vc2010.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + serverDemoStatic + {EEF9FE4C-34C4-4C76-94C4-D11930C88DE1} + serverDemoStatic + ManagedCProj + + + + Application + MultiByte + false + v100 + + + Application + MultiByte + false + v100 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + true + ..\..\bin\ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + serverDemoStaticDebug + $(ProjectName) + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + Disabled + ..\..\include;..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebug + false + + + Level3 + ProgramDatabase + true + + + false + + + AriaStaticDebugVC10.lib;ws2_32.lib;winmm.lib;advapi32.lib;ArNetworkingStaticDebugVC10.lib + $(OutDir)$(TargetFileName) + true + ..\..\lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + true + false + + + NotSet + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + AnySuitable + true + ..\..\include;..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + false + MultiThreaded + false + true + NotUsing + Level3 + ProgramDatabase + true + + + AriaStaticVC10.lib;ArNetworkingStaticVC10.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetFileName) + true + ..\..\lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + false + false + + + + + NotSet + + + + + true + true + + + true + true + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/examples/simpleServerExample.cpp b/Legacy/Aria/ArNetworking/examples/simpleServerExample.cpp new file mode 100644 index 0000000..0d0f911 --- /dev/null +++ b/Legacy/Aria/ArNetworking/examples/simpleServerExample.cpp @@ -0,0 +1,129 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +/** @example simpleServerExample.cpp This is a simple example of an ArNetworking server. + * This server provides range sensor data to the client, and teleoperation + * controls. It also includes an example of a custom command (using + * ArServerHandlerCommands). + * + * For a more complete server, see serverDemo.cpp. + */ + + +/* This function is called ArServerHandlerCommands when our custom command is + * recieved. */ +void customCommandHandler(ArArgumentBuilder *args) +{ + if(args && args->getArg(0)) + ArLog::log(ArLog::Normal, "Recieved custom command with argument \"%s\".", args->getArg(0)); + else + ArLog::log(ArLog::Normal, "Recieved custom command with no arguments."); +} + + +int main(int argc, char **argv) +{ + Aria::init(); + ArRobot robot; + ArArgumentParser parser(&argc, argv); + ArSimpleConnector simpleConnector(&parser); + + // The base server object, manages all connections to clients. + ArServerBase server; + + // This object simplifies configuration and opening of the ArServerBase + // object. + ArServerSimpleOpener simpleOpener(&parser); + + // parse the command line. fail and print the help if the parsing fails + // or if the help was requested with -help + parser.loadDefaultArguments(); + if (!simpleConnector.parseArgs() || !simpleOpener.parseArgs() || + !parser.checkHelpAndWarnUnparsed()) + { + simpleConnector.logOptions(); + simpleOpener.logOptions(); + exit(1); + } + + // Use the ArSimpleOpener to open the server port + if (!simpleOpener.open(&server)) + { + ArLog::log(ArLog::Terse, "Error: Could not open server on port %d", simpleOpener.getPort()); + exit(1); + } + + + // + // Create services attached to the base server: + // + + // Robot position etc.: + ArServerInfoRobot serverInfoRobot(&server, &robot); + + // Robot control modes (only one mode can be active at once): + ArServerModeStop modeStop(&server, &robot); + // old ArServerModeDrive modeDrive(&server, &robot); + ArServerModeRatioDrive modeRatioDrive(&server, &robot); + ArServerModeWander modeWander(&server, &robot); + modeStop.addAsDefaultMode(); + modeStop.activate(); + + // This provides a simple way to add new commands. + ArServerHandlerCommands commands(&server); + + // Add our custom command. ArServerHandlerCommands also has other methods + // for adding commands taht take different kinds of arguments, or no + // arguments. + ArGlobalFunctor1 customCommandFunctor(&customCommandHandler); + commands.addStringCommand("ExampleCustomCommand", "Example of a custom command. simpleServerExample will print out the text sent with the command.", &customCommandFunctor); + + // These objects provide various debugging and diagnostic custom commands: + ArServerSimpleComUC uCCommands(&commands, &robot); // Get information about the robot + ArServerSimpleComMovementLogging loggingCommands(&commands, &robot); // Control logging + modeRatioDrive.addControlCommands(&commands); // Drive mode diagnostics + + // This provides the client (e.g. MobileEyes) with a simple table of string values + // (called an InfoGroup). An InfoGroup is kept globally by Aria. + // The values in the table sent to clients are retrieved periodically by calling a + // functor. + ArServerInfoStrings stringInfo(&server); + Aria::getInfoGroup()->addAddStringCallback(stringInfo.getAddStringFunctor()); + + // Here are some example entries in the InfoGroup: + Aria::getInfoGroup()->addStringInt( + "Motor Packet Count", 10, + new ArConstRetFunctorC(&robot, + &ArRobot::getMotorPacCount)); + + // + // Connect to the robot: + // + + if (!simpleConnector.connectRobot(&robot)) + { + printf("Error: Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + + robot.enableMotors(); + robot.runAsync(true); + + // The simple opener might have information to display right before starting + // the server thread: + simpleOpener.checkAndLog(); + + // now let the server base run in a new thread, accepting client connections. + server.runAsync(); + + ArLog::log(ArLog::Normal, "Server is now running... Press Ctrl-C to exit."); + + robot.waitForRunExit(); + Aria::shutdown(); + exit(0); +} + + diff --git a/Legacy/Aria/ArNetworking/include/ArCentralForwarder.h b/Legacy/Aria/ArNetworking/include/ArCentralForwarder.h new file mode 100644 index 0000000..d62f62b --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArCentralForwarder.h @@ -0,0 +1,168 @@ +#ifndef ARCENTRALFORWARDER_H +#define ARCENTRALFORWARDER_H + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArClientBase.h" + +/** + Class for forwarding... You sould use the commands on this instead + of the ones on the server and client it holds. + + requestStop is missing since that'd only cause problems. + + request doesn't take a packet since that'd cause problems with the + proxying, other than that everything should be like the client. + + Talk to MattL if there's questions. +**/ +class ArCentralForwarder +{ +public: + AREXPORT ArCentralForwarder( + ArServerBase *mainServer, ArSocket *socket, + const char *robotName, int startingPort, + std::map *usedPorts, + ArFunctor2 *notifyServerClientRemovedCB, + const char *enforceProtocolVersion, + ArServerCommands::Type enforceType + ); + AREXPORT ~ArCentralForwarder(); + + /// Gets the robot name + const char *getRobotName(void) { return myRobotName.c_str(); } + + /// Adds a functor for some particular data + AREXPORT bool addHandler(const char *name, + ArFunctor1 *functor); + + /// Removes a functor for some particular data by name + AREXPORT bool remHandler(const char *name, ArFunctor1 *functor); + + /// Request some data every @a mSec milliseconds + AREXPORT bool request(const char *name, long mSec); + + /// Request some data (or send a command) just once + AREXPORT bool requestOnce(const char *name, + ArNetPacket *packet = NULL, + bool quiet = false); + + /// Request some data (or send a command) just once by UDP + AREXPORT bool requestOnceUdp(const char *name, + ArNetPacket *packet = NULL, + bool quiet = false); + + /// Request some data (or send a command) just once with a string as argument + AREXPORT bool requestOnceWithString(const char *name, const char *str); + + /// Sees if this data exists + AREXPORT bool dataExists(const char *name); + + + + /// Gets the server (shouldn't need to be used by anyone) + ArServerBase *getServer(void) { return myServer; } + /// Gets the client (shouldn't need to be used by anyone) + ArClientBase *getClient(void) { return myClient; } + /// Gets the port (shouldn't need to be used by anyone) + int getPort(void) { return myPort; } + AREXPORT bool callOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout); + AREXPORT bool isConnected(void) { return myState == STATE_CONNECTED; } + AREXPORT void willReplace(void) { myBeingReplaced = true; } +protected: + AREXPORT void netCentralHeartbeat(ArNetPacket *packet); + + void robotServerClientRemoved(ArServerClient *client); + void clientServerClientRemoved(ArServerClient *client); + void receiveData(ArNetPacket *packet); + void internalRequestChanged(long interval, unsigned int command); + bool internalRequestOnce(ArServerClient *client, ArNetPacket *packet, + bool tcp); + + AREXPORT bool startingCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout); + AREXPORT bool connectingCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout); + AREXPORT bool gatheringCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout); + AREXPORT bool connectedCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout); + + std::string myEnforceProtocolVersion; + ArServerCommands::Type myEnforceType; + + ArServerBase *myMainServer; + ArSocket *mySocket; + std::string myRobotName; + std::string myPrefix; + int myStartingPort; + std::map *myUsedPorts; + ArFunctor2 *myForwarderServerClientRemovedCB; + + enum State + { + STATE_STARTING, + STATE_CONNECTING, + STATE_GATHERING, + STATE_CONNECTED + }; + bool myBeingReplaced; + + + ArServerBase *myServer; + ArClientBase *myClient; + State myState; + int myPort; + ArServerBase *server; + ArClientBase *client; + + bool myRobotHasCentralServerHeartbeat; + ArTime myLastSentCentralServerHeartbeat; + + enum ReturnType + { + RETURN_NONE, + RETURN_SINGLE, + RETURN_VIDEO, + RETURN_UNTIL_EMPTY, + RETURN_COMPLEX, + RETURN_VIDEO_OPTIM, + }; + + std::map myReturnTypes; + std::map *> myRequestOnces; + std::map myLastRequest; + std::map myLastBroadcast; + + ReturnType getReturnType(int command); + void checkRequestOnces(unsigned int command); + void setLastRequest(unsigned int command); + void setLastBroadcast(unsigned int command); + + ArTime myLastTcpHeartbeat; + ArTime myLastUdpHeartbeat; + + ArFunctor1C myReceiveDataFunctor; + ArFunctor2C myInternalRequestChangedFunctor; + ArRetFunctor3C myInternalRequestOnceFunctor; + ArFunctor1C myRobotServerClientRemovedCB; + ArFunctor1C myNetCentralHeartbeatCB; + ArFunctor1C myClientServerClientRemovedCB; + +}; + + +#endif // ARSERVERSWITCHFORWARDER diff --git a/Legacy/Aria/ArNetworking/include/ArCentralManager.h b/Legacy/Aria/ArNetworking/include/ArCentralManager.h new file mode 100644 index 0000000..2df9dfd --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArCentralManager.h @@ -0,0 +1,88 @@ +#ifndef ARCENTRALMANAGER +#define ARCENTRALMANAGER + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArCentralForwarder.h" + +class ArCentralManager : public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArCentralManager(ArServerBase *robotServer, ArServerBase *clientServer); + /// Destructor + AREXPORT virtual ~ArCentralManager(); + /// Logs all the connection information + void logConnections(void); + /// Enforces that everything is using this protocol version + AREXPORT void enforceProtocolVersion(const char *protocolVersion); + /// Enforces that the robots that connect are this type + AREXPORT void enforceType(ArServerCommands::Type type); + /// Adds a callback for when a new forwarder is added + AREXPORT void addForwarderAddedCallback( + ArFunctor1 *functor, int priority = 0); + /// Removes a callback for when a new forwarder is added + AREXPORT void remForwarderAddedCallback( + ArFunctor1 *functor); + /// Adds a callback for when a new forwarder is destroyed + AREXPORT void addForwarderRemovedCallback( + ArFunctor1 *functor, int priority = 0); + /// Removes a callback for when a new forwarder is destroyed + AREXPORT void remForwarderRemovedCallback( + ArFunctor1 *functor); + /// Networking command to get the list of clients + AREXPORT void netClientList(ArServerClient *client, ArNetPacket *packet); + /// A callback so we can tell the main connection happened when a + /// client is removed + AREXPORT void forwarderServerClientRemovedCallback( + ArCentralForwarder *forwarder, ArServerClient *client); + /// A callback so we can close down other connetions when a main + /// client loses connection + AREXPORT void mainServerClientRemovedCallback(ArServerClient *client); + /// Networking command to switch the direction of a connection + AREXPORT void netServerSwitch(ArServerClient *client, ArNetPacket *packet); + AREXPORT virtual void *runThread(void *arg); +protected: + void close(void); + bool processFile(void); + + bool removePendingDuplicateConnections(const char *robotName); + + ArServerBase *myRobotServer; + ArServerBase *myClientServer; + double myHeartbeatTimeout; + double myUdpHeartbeatTimeout; + double myRobotBackupTimeout; + double myClientBackupTimeout; + + std::string myEnforceProtocolVersion; + ArServerCommands::Type myEnforceType; + + int myMostForwarders; + int myMostClients; + + ArTypes::UByte4 myClosingConnectionID; + std::list myClientSockets; + std::list myClientNames; + std::list myForwarders; + std::map myUsedPorts; + ArMutex myCallbackMutex; + std::multimap *> myForwarderAddedCBList; + std::multimap *> myForwarderRemovedCBList; + ArMutex myDataMutex; + int myOnSocket; + ArFunctor2C myNetSwitchCB; + ArFunctor2C myNetClientListCB; + ArFunctorC myAriaExitCB; + ArRetFunctorC myProcessFileCB; + ArFunctor2C myForwarderServerClientRemovedCB; + ArFunctor1C myMainServerClientRemovedCB; +}; + + +#endif // ARSERVERSWITCHMANAGER diff --git a/Legacy/Aria/ArNetworking/include/ArClientArgUtils.h b/Legacy/Aria/ArNetworking/include/ArClientArgUtils.h new file mode 100644 index 0000000..65607d5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientArgUtils.h @@ -0,0 +1,170 @@ +/*! + * \brief Defines the ArClientArg class. + * \date 05/01/05 + * \author K. Cunningham + * +**/ +#ifndef ARCLIENTARGUTILS_H +#define ARCLIENTARGUTILS_H + +#include "Aria.h" + +class ArNetPacket; +class ArConfigArg; + +/// Small helper class for sending/receiving an ArConfigArg in an ArNetPacket. +/** + * ArClientArg defines methods for packing/unpacking an ArConfigArg into/from + * an ArNetPacket. (The name of the class is a slight misnomer since it may + * be used both on the server and client sides.) + *

+ * The structure of the network packet information is as follows: + *

+ *    string: arg.getName()
+ *    string: arg.getDescription()
+ *    byte: arg.getConfigPriority()
+ *    byte: arg type ('B' == BOOL | 'I' == INT | 'D' == DOUBLE | 'S' == STRING | 'L' == LIST)
+ *    <arg values>
+ *    string: arg.getDisplayHint()      -- only if isDisplayHintParsed is set to true
+ *    string: arg.getExtraExplanation() -- only if version >= 2
+ *    byte: arg.getRestartLevel()       -- only if version >= 2
+ * 
+ *    <arg values> varies by arg type:
+ *
+ *    if BOOL, then:
+ *        byte: arg.getBool()
+ *    if INT, then:
+ *	      byte4: arg.getInt()
+ *		    byte4: arg.getMinInt()
+ *		    byte4: arg.getMaxInt()
+ *    if DOUBLE, then:
+ *	      byte4: arg.getDouble()
+ *		    byte4: arg.getMinDouble()
+ *		    byte4: arg.getMaxDouble()
+ *        byte4: arg.getDoublePrecision()  -- only if version >= 2
+ *    if STRING, then:
+ *        string: arg.getString()
+ *    if LIST, then:
+ *        byte4: arg.getArgCount()
+ *        <list contents>
+ *        
+ *
+ *    
+ * 
+ *

+ * ArClientArg also defines methods to send an "abbreviated" ArConfigArg + * (i.e. just value). The short packet structure is as follows: + *

+ *    <arg value> varies by arg type:
+ *    if BOOL, then:
+ *        byte: arg.getBool()
+ *    if INT, then:
+ *	      byte4: arg.getInt()
+ *    if DOUBLE, then:
+ *	      byte4: arg.getDouble()
+ *    if STRING, then:
+ *        string: arg.getString()
+ *    if LIST, then:
+ *        
+ *        <list contents>
+ * 
+ * Lastly, it defines a method to send an "abbreviated" ArConfigArg in a + * text format. +**/ +class ArClientArg +{ +public: + + /// Constructor + AREXPORT ArClientArg(bool isDisplayHintParsed = false, + ArPriority::Priority lastPriority = ArPriority::LAST_PRIORITY, + int version = 1); + + /// Destructor + AREXPORT virtual ~ArClientArg(); + + /// Returns whether the given parameter can be sent in a network packet. + /** + * Currently, a parameter can only be sent if it is of type INT, DOUBLE, + * STRING, BOOL, LIST, or a SEPARATOR. + **/ + AREXPORT virtual bool isSendableParamType(const ArConfigArg &arg); + + /// Unpacks the given network packet and stores the data in the config arg. + /** + * @param packet the ArNetPacket * from which data is extracted + * @param argOut the ArConfigArg in which to set the data + * @return bool set to true if the data was successfully extracted from + * the packet; false if an error occurred and argOut is invalid + **/ + AREXPORT virtual bool createArg(ArNetPacket *packet, + ArConfigArg &argOut); + + + /// Stores the given config arg into the network packet. + /** + * @param arg the ArConfigArg from which to retrieve the data + * @param packet the ArNetPacket * to which data is added + * @return bool set to true if the data was successfully stored in + * the packet; false if an error occurred and the packet is invalid + **/ + AREXPORT virtual bool createPacket(const ArConfigArg &arg, + ArNetPacket *packet); + + + + /// Unpacks the abbreviated arg value and stores the data in the config arg. + /** + * @param packet the ArNetPacket * from which data is extracted + * @param arg the ArConfigArg in which to set the value + * @return bool set to true if the data was successfully extracted from + * the packet; false if an error occurred and arg is invalid + **/ + AREXPORT virtual bool bufToArgValue(ArNetPacket *packet, + ArConfigArg &arg); + + /// Stores the abbreviated arg value into the network packet. + /** + * @param arg the ArConfigArg from which to retrieve the data + * @param packet the ArNetPacket * to which data is added + * @return bool set to true if the data was successfully stored in + * the packet; false if an error occurred and the packet is invalid + **/ + AREXPORT virtual bool argValueToBuf(const ArConfigArg &arg, + ArNetPacket *packet); + + + + /// Stores the arg value into the network packet as a text string. + /** + * The stored text string is suitable for parsing by an ArArgumentBuilder. + * + * @param arg the ArConfigArg from which to retrieve the data + * @param packet the ArNetPacket * to which data is added + * @return bool set to true if the data was successfully stored in + * the packet; false if an error occurred and the packet is invalid + **/ + AREXPORT virtual bool argTextToBuf(const ArConfigArg &arg, + ArNetPacket *packet); + + + AREXPORT virtual bool addArgTextToPacket(const ArConfigArg &arg, + ArNetPacket *packet); + +protected: + + enum { + BUFFER_LENGTH = 1024 + }; + + bool myIsDisplayHintParsed; + ArPriority::Priority myLastPriority; + int myVersion; + + char myBuffer[BUFFER_LENGTH]; + char myDisplayBuffer[BUFFER_LENGTH]; + char myExtraBuffer[BUFFER_LENGTH]; + +}; // end class ArClientArgUtils + +#endif //ARCLIENTARGUTILS_H diff --git a/Legacy/Aria/ArNetworking/include/ArClientBase.h b/Legacy/Aria/ArNetworking/include/ArClientBase.h new file mode 100644 index 0000000..0981c4f --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientBase.h @@ -0,0 +1,424 @@ +#ifndef NLCLIENTBASE_H +#define NLCLIENTBASE_H + +#include "Aria.h" +#include "ArClientCommands.h" +#include "ArServerCommands.h" +#include "ArNetPacket.h" +#include "ArNetPacketSenderTcp.h" +#include "ArNetPacketReceiverTcp.h" +#include "ArNetPacketReceiverUdp.h" +#include "ArClientData.h" + +/** + @brief The base client class + + You need to connect a client to a server using blockingConnect() with + the address for the server. Then you should add handlers to + the client to receive information from the server (with addHandler(), + request(), and requestOnce()). Then call run() or runAsync() + (or loopOnce() if you really know what you're doing). + You can also add a callback that will get called every cycle of the + client. + + User and password information may be required by the server. + For details on that see ArServerBase. The most important thing is + the modification to blockingConnect(), it can now take a user and + password argument and upon failure you'll want to check wasRejected() + to determine whether the client couldn't find the server or if the user and + password were rejected. Another relevant function is setServerKey() + to set the key (string of text) we need to connect to the server. + + This class should be thread safe... The only thing you cannot do is + call 'addHandler' or 'remHandler' from within a handler for that + specific piece of data. + **/ + +class ArClientBase : public ArASyncTask +{ +public: + + /// The state of the connection + enum ClientState { + STATE_NO_CONNECTION, ///< The client has not connected + STATE_FAILED_CONNECTION, ///< The client tried to connect and failed + STATE_OPENED_SOCKET, ///< Client opened socket, waiting for intro from srvr + STATE_EXCHANGED_INTROS, ///< Client and server have exchanged introductions + STATE_REJECTED, ///< Client was rejected by server + STATE_WAITING_LIST, ///< Client was connected to server, waiting for list + STATE_CONNECTED, ///< Client is connected to server + STATE_LOST_CONNECTION ///< Client lost connection to server + }; + + enum { + CLIENT_KEY_LENGTH = 16 + }; + + enum NonBlockingConnectReturn + { + NON_BLOCKING_CONTINUE, ///< Client didn't connect or fail to connect yet + NON_BLOCKING_CONNECTED, ///< Client connected + NON_BLOCKING_FAILED ///< Client couldn't connect + }; + + /// Constructor + AREXPORT ArClientBase(); + /// Destructor + AREXPORT virtual ~ArClientBase(); + + /// Sets the optional name of the connected robot for debugging purposes. + AREXPORT virtual void setRobotName(const char *name, + bool debugLogging = false, + int robotId = 0); + + /// Returns the optional name of the connected robot for debugging purposes. + AREXPORT virtual const char *getRobotName() const; + + /// Returns the entire string used to prefix log entries for this client base. + AREXPORT virtual const char *getLogPrefix() const; + + /// Returns if we're doing debug logging or not + AREXPORT bool getDebugLogging(void); + + /// Connect to a server + AREXPORT bool blockingConnect(const char *host, int port, bool log = true, + const char *user = NULL, + const char *password = NULL, + const char *openOnIP = NULL); + + /// Disconnect from a server + /** + * This method blocks while the connection is being shutdown. + **/ + AREXPORT bool disconnect(void); + + /// Disconnect from a server next time through the loop + /** + * This method does not block while the connection is being + * shutdown, and the disconnect only happens the next time the + * client base is in its loop + **/ + AREXPORT void disconnectSoon(void); + + /** @return true if we're connected to a server */ + AREXPORT bool isConnected(void) { return myState == STATE_CONNECTED;} + + /** @return true if a server connection attempt failed because the server rejected the username or password, false if the connection failed for another reason, or the username/password were accepted. */ + AREXPORT bool wasRejected(void) { return myState == STATE_REJECTED; } + + /// Gets the state of the client + AREXPORT ClientState getState(void) { return myState; } + + /// Adds a functor for some particular data + AREXPORT bool addHandler(const char *name, + ArFunctor1 *functor); + + /// Removes a functor for some particular data by name + AREXPORT bool remHandler(const char *name, ArFunctor1 *functor); + + /// Request some data every @a mSec milliseconds + AREXPORT bool request(const char *name, long mSec, + ArNetPacket *packet = NULL); + + /// Don't want this data anymore + AREXPORT bool requestStop(const char *name); + + /// Request some data (or send a command) just once + AREXPORT bool requestOnce(const char *name, + ArNetPacket *packet = NULL, + bool quiet = false); + + /// Request some data (or send a command) just once by UDP + AREXPORT bool requestOnceUdp(const char *name, + ArNetPacket *packet = NULL, + bool quiet = false); + + /// Request some data (or send a command) just once with a string as argument + AREXPORT bool requestOnceWithString(const char *name, const char *str); + + /// Sees if this data exists + AREXPORT bool dataExists(const char *name); + + /// Gets the name of the host we tried to connect to + AREXPORT const char *getHost(void); + + + /// Sets the 'key' needed to connect to the server + AREXPORT void setServerKey(const char *serverKey, bool log = true); + + /// Enforces the that the server is using this protocol version + AREXPORT void enforceProtocolVersion(const char *protocolVersion, + bool log = true); + + /// Enforces that the robots that connect are this type + AREXPORT void enforceType(ArServerCommands::Type type, bool log = true); + + /// Gets the last time a packet was received + AREXPORT ArTime getLastPacketReceived(void); + + /// Sets the backup timeout + AREXPORT void setBackupTimeout(double timeoutInMins); + + /// Runs the client in this thread + AREXPORT virtual void run(void); + + /// Runs the client in its own thread + AREXPORT virtual void runAsync(void); + + /// Stops the thread and sets the stopped flag + AREXPORT virtual void stopRunning(void); + + /// Returns whether the client has been stopped (regardless of whether its in its own thread) + AREXPORT virtual bool isStopped(); + + /// Print out or data with descriptions + AREXPORT void logDataList(void); + + /// Adds a functor to call every cycle + AREXPORT void addCycleCallback(ArFunctor *functor); + + /// Removes a functor called every cycle + AREXPORT void remCycleCallback(ArFunctor *functor); + + /// Send a packet over TCP + AREXPORT bool sendPacketTcp(ArNetPacket *packet); + /// Send a packet over UDP (unless client only wants tcp then sends over tcp) + AREXPORT bool sendPacketUdp(ArNetPacket *packet); + + /// Sets the time to allow for connection (default 3) + AREXPORT void setConnectTimeoutTime(int sec); + + /// Gets the time allowed for connection + AREXPORT int getConnectTimeoutTime(void); + + /// Logs the tracking information (packet and byte counts) + AREXPORT void logTracking(bool terse); + + /// Clears the tracking information (resets counters) + AREXPORT void resetTracking(void); + + /// Adds a call for when the server shuts down + AREXPORT void addServerShutdownCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + + /// Removes a call for when the server shuts down + AREXPORT void remServerShutdownCB(ArFunctor *functor); + + /// Adds a call for when a disconnection has occured because of error + AREXPORT void addDisconnectOnErrorCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + + /// Removes a call for when a disconnection has occured because of error + AREXPORT void remDisconnectOnErrorCB(ArFunctor *functor); + + /// Run the loop once + AREXPORT void loopOnce(void); + + /// Process the packet wherever it came from + AREXPORT void processPacket(ArNetPacket *packet, bool tcp); + + /// Process a packet from udp (just hands off to processPacket) + AREXPORT void processPacketUdp(ArNetPacket *packet, + struct sockaddr_in *sin); + + /// Sets it so we only get TCP data from the server not UDP + AREXPORT void setTcpOnlyFromServer(void); + /// Sets it so we only send TCP data to the server + AREXPORT void setTcpOnlyToServer(void); + + /// Returns whether we only get TCP data from the server not UDP + AREXPORT bool isTcpOnlyFromServer(void); + /// Returns whether we only send TCP data to the server + AREXPORT bool isTcpOnlyToServer(void); + /// Gets a (probably) unique key that can be used to identify the client (after connection) + AREXPORT void getClientKey(unsigned char key[CLIENT_KEY_LENGTH]); + + + /// Starts the process of disconnecting from the server. + /** + * This method should be called in threads that should not block + * (such as the main GUI thread). The call should be followed by + * a delay of one second, followed by a call to + * finishNonBlockingDisconnect(). + **/ + AREXPORT bool startNonBlockingDisconnect(); + + /// Finishes the process of disconnecting from the server. + /** + * This method should be used in conjunction with + * startNonBlockingDisconnect in threads that should not block + * (such as the main GUI thread). + **/ + AREXPORT void finishNonBlockingDisconnect(); + + /// Gets the name of the data a packet is for + AREXPORT const char *getName(ArNetPacket *packet, bool internalCall = false); + /// Gets the name of the data a command is + AREXPORT const char *getName(unsigned int command, bool internalCall = false); + // the function for the thread + AREXPORT virtual void * runThread(void *arg); + /// Internal function to get the socket (no one should need this) + AREXPORT struct in_addr *getTcpAddr(void) { return myTcpSocket.inAddr(); } + /// Internal function that'll do the connection (mainly for switch connections) + AREXPORT bool internalBlockingConnect( + const char *host, int port, bool log, const char *user, + const char *password, ArSocket *tcpSocket, + const char *openOnIP = NULL); + /// Internal function that'll start the non blocking connection (mainly for switch connections) + AREXPORT NonBlockingConnectReturn internalNonBlockingConnectStart( + const char *host, int port, bool log, const char *user, + const char *password, ArSocket *tcpSocket, + const char *openOnIP = NULL); + /// Internal function that'll start the non blocking connection (mainly for switch connections) + AREXPORT NonBlockingConnectReturn internalNonBlockingConnectContinue(void); + /// Internal function to get the tcp socket + AREXPORT ArSocket *getTcpSocket(void) { return &myTcpSocket; } + /// Internal function to get the udp socket + AREXPORT ArSocket *getUdpSocket(void) { return &myUdpSocket; } + /// Internal function get get the data map + AREXPORT const std::map *getDataMap(void) + { return &myIntDataMap; } + /// Returns the command number from the name + AREXPORT unsigned int findCommandFromName(const char *name); + /// Request some data every mSec milliseconds by command not name + AREXPORT bool requestByCommand(unsigned int command, long mSec, + ArNetPacket *packet = NULL); + /// Don't want this data anymore, by command not name + AREXPORT bool requestStopByCommand(unsigned int command); + + /// Request some data (or send a command) just once by command not name + AREXPORT bool requestOnceByCommand(unsigned int command, + ArNetPacket *packet = NULL); + /// Request some data (or send a command) just once by command not name + AREXPORT bool requestOnceByCommandUdp(unsigned int command, + ArNetPacket *packet = NULL); + /// Gets if we received the list of commands + bool getReceivedDataList(void) { return myReceivedDataList; } + /// Gets if we received the list of arguments and + bool getReceivedArgRetList(void) { return myReceivedArgRetList; } + /// Gets if we received the list of commands + bool getReceivedGroupAndFlagsList(void) { return myReceivedGroupAndFlagsList; } + /// Tells us the reason the connection was rejected (see ArServerCommands for details) + int getRejected(void) { return myRejected; } + /// Tells us the reason the connection was rejected (see ArServerCommands for details) + const char *getRejectedString(void) { return myRejectedString; } +protected: + + /// Optional robot name for logging + std::string myRobotName; + /// Optional prefix to be inserted at the start of log messages + std::string myLogPrefix; + /// If we're enforcing the version of the protocol or not + std::string myEnforceProtocolVersion; + /// if we're a particular type + ArServerCommands::Type myEnforceType; + + AREXPORT bool setupPacket(ArNetPacket *packet); + ArTime myLastPacketReceived; + std::list myServerShutdownCBList; + std::list myDisconnectOnErrorCBList; + std::list myCycleCallbacks; + void clear(void); + // does the first part of connection + bool internalConnect(const char *host, int port, bool obsolete, + const char *openOnIP); + void internalStartUdp(void); + void buildList(ArNetPacket *packet); + void internalSwitchState(ClientState state); + bool myReceivedDataList; + bool myReceivedArgRetList; + bool myReceivedGroupAndFlagsList; + ClientState myState; + ArTime myStateStarted; + bool myUdpConfirmedFrom; + bool myUdpConfirmedTo; + // if we only send tcp + bool myTcpOnlyTo; + // if we only receive tcp from the server + bool myTcpOnlyFrom; + + bool myIsRunningAsync; + bool myDisconnectSoon; + bool myIsStartedDisconnect; + bool myIsStopped; + + bool myQuiet; + bool myDebugLogging; + ArLog::LogLevel myVerboseLogLevel; + std::string myHost; + std::string myUser; + std::string myPassword; + // the time we allow for connections + int myTimeoutTime; + // the time we started our connection + ArTime myStartedConnection; + ArTime myStartedUdpConnection; + ArTime myStartedShutdown; + + enum NonBlockingConnectState + { + NON_BLOCKING_STATE_NONE, + NON_BLOCKING_STATE_TCP, + NON_BLOCKING_STATE_UDP + }; + + NonBlockingConnectState myNonBlockingConnectState; + + + ArMutex myDataMutex; + ArMutex myClientMutex; + ArMutex myMapsMutex; + ArMutex myStateMutex; + ArMutex myCallbackMutex; + ArMutex myCycleCallbackMutex; + ArMutex myPacketTrackingMutex; + // our map of names to ints + std::map myNameIntMap; + // our map of ints to functors + std::map myIntDataMap; + + struct sockaddr_in myUdpSin; + bool myUdpSinValid; + // the port the server said it was using + unsigned int myServerReportedUdpPort; + // the port the server actually is using + unsigned int myServerSentUdpPort; + unsigned int myUdpPort; + long myAuthKey; + long myIntroKey; + std::string myServerKey; + double myBackupTimeout; + // this is a key we have for identifying ourselves moderately uniquely + unsigned char myClientKey[16]; + ArNetPacketSenderTcp myTcpSender; + ArNetPacketReceiverTcp myTcpReceiver; + ArNetPacketReceiverUdp myUdpReceiver; + ArSocket myTcpSocket; + ArSocket myUdpSocket; + ArFunctor2C myProcessPacketCB; + ArFunctor2C myProcessPacketUdpCB; + + int myRejected; + char myRejectedString[32000]; + + ArTime myTrackingStarted; + class Tracker + { + public: + Tracker() { reset(); } + virtual ~Tracker() {} + void reset(void) + { myPacketsTcp = 0; myBytesTcp = 0; myPacketsUdp = 0; myBytesUdp = 0; } + long myPacketsTcp; + long myBytesTcp; + long myPacketsUdp; + long myBytesUdp; + }; + AREXPORT void trackPacketSent(ArNetPacket *packet, bool tcp); + AREXPORT void trackPacketReceived(ArNetPacket *packet, bool tcp); + std::map myTrackingSentMap; + std::map myTrackingReceivedMap; + +}; + +#endif // NLCLIENTBASE_H diff --git a/Legacy/Aria/ArNetworking/include/ArClientCommands.h b/Legacy/Aria/ArNetworking/include/ArClientCommands.h new file mode 100644 index 0000000..2a5497c --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientCommands.h @@ -0,0 +1,24 @@ +#ifndef NLCLIENTCOMMANDS_H +#define NLCLIENTCOMMANDS_H + +/** + The commands from the client to the server +**/ + +class ArClientCommands +{ +public: + enum ClientCommands { + SHUTDOWN = 1, ///< Closes the connection + INTRODUCTION = 2, ///< Introduces the client to the server + UDP_INTRODUCTION = 3, ///< Udp introduction of the client to the server + UDP_CONFIRMATION = 4, ///< Confirmation Udp was received from server + TCP_ONLY = 5, ///< Client tells server to only send TCP + LIST = 128, ///< Lists the types that can be handled + REQUEST = 129, ///< Requests packet of a certain type + REQUESTSTOP = 130 ///< Requests that the server stop sending the given type + /// You can request any other command once if you know its number just by sending that number + }; +}; + +#endif // NLCLIENTCOMMANDS_H diff --git a/Legacy/Aria/ArNetworking/include/ArClientData.h b/Legacy/Aria/ArNetworking/include/ArClientData.h new file mode 100644 index 0000000..c8e206a --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientData.h @@ -0,0 +1,86 @@ +#ifndef ARCLIENTDATA_H +#define ARCLIENTDATA_H + +#include "Aria.h" +class ArNetPacket; + +/// class to hold information about the different data the client has +/** + This class is mostly just for holding all the information about one + of the client data entires in one convenient spot + + Information about the data flags held here... The recognized ones + right now are just for return values so some forwarding can be done + intelligently, you should only have one return value, they are: + RETURN_NONE (There are no return packets), RETURN_SINGLE (There is + exactly one return packet), RETURN_UNTIL_EMPTY (There return goes + until an empty packet), RETURN_VIDEO (this is the special case for + video where basically its something thats always requested at an + interval and everyone'll want it after we've transfered it), + RETURN_COMPLEX (The return is more complex (so you'll need a helper + class)) +**/ + +class ArClientData +{ +public: + /// Constructor + AREXPORT ArClientData(const char *name, const char *description, + unsigned int command, + ArFunctor1 *functor); + /// Destructor + AREXPORT virtual ~ArClientData(); + /// Gets the name + const char *getName(void) { return myName.c_str(); } + /// Gets the description + const char *getDescription(void) { return myDescription.c_str(); } + unsigned int getCommand(void) { return myCommand; } + /// Gets the argument description + const char *getArgumentDescription(void) + { return myArgumentDescription.c_str(); } + /// Gets the return description + const char *getReturnDescription(void) + { return myReturnDescription.c_str(); } + /// Gets the command group + const char *getCommandGroup(void) { return myCommandGroup.c_str(); } + AREXPORT bool hasDataFlag(const char *dataFlag); + const char *getDataFlagsString(void) + { return myDataFlagsBuilder.getFullString(); } + /// Gets the list of functors + const std::list *> *getFunctorList(void) const + { return &myFunctorList; }; + /// Locks the functor list so we can walk it without it changing + AREXPORT int lockFunctorList(void) { return myMutex.lock(); } + /// Tries to lock the functor list so we can walk it without it changing + AREXPORT int tryLockFunctorList(void) { return myMutex.tryLock(); } + /// Unlocks the functor list so we can walk it without it changing + AREXPORT int unlockFunctorList(void) { return myMutex.unlock(); } + + /// Adds a new functor the end of the list + void addFunctor(ArFunctor1 *functor) + { myFunctorList.push_back(functor); } + /// Removes a functor from the list all together + void remFunctor(ArFunctor1 *functor) + { myFunctorList.remove(functor); } + /// Sets the argument and return descriptions + void setArgRetDescs(const char *argDesc, const char *retDesc) + { myArgumentDescription = argDesc; myReturnDescription = retDesc; } + /// Sets the command group + void setCommandGroup(const char *commandGroup) + { myCommandGroup = commandGroup; } + /// Sets the data flags + AREXPORT void addDataFlags(const char *dataFlags); +protected: + std::string myName; + std::string myDescription; + unsigned int myCommand; + std::string myArgumentDescription; + std::string myReturnDescription; + std::string myCommandGroup; + ArMutex myDataMutex; + ArArgumentBuilder myDataFlagsBuilder; + ArMutex myMutex; + std::list *> myFunctorList; +}; + +#endif // ARCLIENTDATA_H diff --git a/Legacy/Aria/ArNetworking/include/ArClientFileUtils.h b/Legacy/Aria/ArNetworking/include/ArClientFileUtils.h new file mode 100644 index 0000000..de77fef --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientFileUtils.h @@ -0,0 +1,367 @@ +#ifndef ARCLIENTFILEUTILS_H +#define ARCLIENTFILEUTILS_H + +#include "Aria.h" +#include "ArClientBase.h" + +/// The item type that the ArCLientFileLister gets back +class ArClientFileListerItem +{ +public: + /// Constructor + ArClientFileListerItem(const char *name, time_t atime, time_t mtime, + ArTypes::UByte4 size) + { myName = name; myATime = atime; myMTime = mtime; mySize = size; } + /// Copy Constructor + ArClientFileListerItem(const ArClientFileListerItem &item) + { myName = item.myName; myATime = item.myATime; myMTime = item.myMTime; + mySize = item.mySize; } + /// Assignment operator + AREXPORT ArClientFileListerItem &operator=(const + ArClientFileListerItem &item) + { + if (this != &item) + { + myName = item.myName; myATime = item.myATime; myMTime = item.myMTime; + mySize = item.mySize; + } + return *this; + } + /// Destructor + virtual ~ArClientFileListerItem() {} + /// Gets the name of the list item + const char *getName(void) const { return myName.c_str(); } + /// Gets the time this list item was last accessed in seconds from 1970 + time_t getLastAccessedTime(void) const { return myATime; } + /// Gets the time this list item was last modified in seconds from 1970 + time_t getLastModifiedTime(void) const { return myMTime; } + /// Gets the size of this list item in bytes + ArTypes::UByte4 getSize(void) const { return mySize; } +protected: + std::string myName; + time_t myATime; + time_t myMTime; + ArTypes::UByte4 mySize; +}; + +/// Class for getting file list information from the server +/** + This class will interact with the ArServerFileLister and find out + whats in directories and change directories and such. This class + is all that should be used to get the information from + ArServerFileLister, the API between the two is fairly volatile and + will remain so. If you need more functionality let us know and + we'll add it if its reasonable. + + When you change directories or change to the top dir it doesn't + happen right away, but when it happens the update callbacks will be + called, 0 as the int for the callback means everything is good, + positive error messages are from the server (1 == tried to go + outside allowed area, 2 == no such directory), negative are from + this class (-1 == got directory but it wasn't what we wanted (if + you wait the right one might come in, like if someone selects one + dir then the other)). +**/ +class ArClientFileLister +{ +public: + /// Constructor + AREXPORT ArClientFileLister(ArClientBase *client); + /// Destructor + AREXPORT virtual ~ArClientFileLister(); + /// Sees if the server supports what this class needs + AREXPORT bool isAvailable(void); + /// Goes to the top directory + AREXPORT void changeToTopDir(void); + /// Goes to this directory in the current directory + AREXPORT void changeToDir(const char *dir); + /// Goes up one directory from current directory + AREXPORT void upOneDir(void); + /// Goes to this absolute directory + AREXPORT void changeToAbsDir(const char *dir); + /// Gets the name of the directory we're in + AREXPORT const char *getCurrentDir(void) const; + /// Gets the name of the directory that we're currently waiting for + AREXPORT const char *getWaitingForDir(void) const; + + /// Gets the directories in the current directory + AREXPORT std::list getDirectories(void) const; + /// Gets the files in the current directory + AREXPORT std::list getFiles(void) const; + /// Adds a callback for when we get the desired directory info + AREXPORT void addUpdatedCallback(ArFunctor1 *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when we get the desired directory info + AREXPORT void remUpdatedCallback(ArFunctor1 *functor); + /// Gets the last time we were updated + AREXPORT ArTime getLastUpdated(void); + /// Gets the last time we requested an update + AREXPORT ArTime getLastRequested(void); + /// Logs the current directory + AREXPORT void log(bool withTimes); +protected: + AREXPORT void netGetDirListing(ArNetPacket *packet); + AREXPORT void netGetDirListingMultiplePackets(ArNetPacket *packet); + AREXPORT void callUpdatedCallbacks(int val); + AREXPORT void logList( + std::list *logThis, + bool withTimes); + void getDirListing(const char *dir); + ArMutex myDataMutex; + ArMutex myCallbackMutex; + ArClientBase *myClient; + char myCurrentDir[2048]; + char myWaitingForDir[2048]; + bool myLastDirMatched; + bool myNewDirListing; + ArTime myLastRequested; + ArTime myLastUpdated; + std::list myDirectories; + std::list myFiles; + std::list *> myUpdatedCallbacks; + ArFunctor1C myGetDirListingCB; + ArFunctor1C myGetDirListingMultiplePacketsCB; +}; + + +/// Class for getting files from the server +/** + This class will interact with the ArServerFileToClient and get a + file on the server. If you want to find out what files are on the + server use ArClientFileLister. + + When get a file it doesn't happen right away, but when the file is + received (or failes) the fileGotten callbacks will be called, 0 as + the int for the callback means everything is good, positive error + messages are from the server (1 == tried to go outside allowed + area, 2 == no such directory, 3 == empty file name, 4 == problem + reading file), negative are from this class (-1 == got directory + but it wasn't what we wanted (if you wait the right one might come + in, like if someone selects one dir then the other), -2 == can't + open file to put result into). +**/ +class ArClientFileToClient +{ +public: + /// Constructor + AREXPORT ArClientFileToClient(ArClientBase *client); + /// Destructor + AREXPORT virtual ~ArClientFileToClient(); + /// Sees if the server supports what this class needs + AREXPORT bool isAvailable(void); + + AREXPORT bool isAvailableSetTimestamp(void); + + /// Get the file from a directory + AREXPORT bool getFileFromDirectory(const char *directory, + const char *fileName, + const char *clientFileName, + bool isSetTimestamp = false); + /// Cancels getting a file + AREXPORT void cancelGet(void); + /// If we're getting a file now + AREXPORT bool isWaitingForFile(void); + /// Gets the directory we're getting from + AREXPORT const char *getDirectory(void); + /// Gets the filename we're getting + AREXPORT const char *getFileName(void); + /// Gets the filename we'll save the gotten file in + AREXPORT const char *getClientFileName(void); + /// Adds a callback for when we get the desired file (or fail) + AREXPORT void addFileReceivedCallback(ArFunctor1 *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when we get the desired file (or fail) + AREXPORT void remFileReceivedCallback(ArFunctor1 *functor); + + + /// Gets the last time we finished getting a file + AREXPORT ArTime getLastReceived(void); + /// Gets the last time we asked for a file + AREXPORT ArTime getLastRequested(void); + +protected: + + AREXPORT void netGetFile(ArNetPacket *packet); + AREXPORT void netGetFileWithTimestamp(ArNetPacket *packet); + AREXPORT void doGetFile(ArNetPacket *packet, + bool isSetTimestamp); + AREXPORT void callFileReceivedCallbacks(int val); + + +protected: + + ArMutex myDataMutex; + ArMutex myCallbackMutex; + ArClientBase *myClient; + bool myIsWaitingForFile; + std::string myDirectory; + std::string myFileName; + std::string myWholeFileName; + std::string myClientFileName; + FILE *myFile; + + ArTime myLastRequested; + ArTime myLastReceived; + + std::list *> myFileReceivedCallbacks; + + ArFunctor1C myGetFileCB; + ArFunctor1C myGetFileWithTimestampCB; +}; + +/// Class for putting files to the server +/** + This class will interact with the ArServerFileFromClient and put a + file on to the server. If you want to find out what files are on + the server use ArClientFileLister. + + When get a file it doesn't happen right away, but when the file is + received (or failes) the fileGotten callbacks will be called, 0 as + the int for the callback means everything is good, positive error + messages are from the server (0 = good (got file), 1 = getting + file, 2 = tried to go outside allowed area, 3 = bad directory, 4 = + empty file name (or other problem with fileName), 5 = can't write + temp file, 6 = error moving file from temp to perm, 7 = another + client putting file, 8 = timeout (no activity for 15 seconds) and + another client wanted to put the file, 9 = client adding to, + finishing, or canceling a file the server doesn't have), negative + would be from this class but there aren't any of those yet +**/ +class ArClientFileFromClient +{ +public: + /// Constructor + AREXPORT ArClientFileFromClient(ArClientBase *client); + /// Destructor + AREXPORT virtual ~ArClientFileFromClient(); + /// Sees if the server supports what this class needs + AREXPORT bool isAvailable(void); + /// Sees if the server supports what this class needs to send slowly + AREXPORT bool isAvailableSlow(void); + /// Sees if the server supports what this class needs to send fast + AREXPORT bool isAvailableFast(void); + /// Sees if the server supports the ability to set the file timestamp + AREXPORT bool isAvailableSetTimestamp(void); + + /// Enum that describes the speed to send at + enum SendSpeed + { + SPEED_AUTO, ///< Send it fast if available, if not then send it slow + SPEED_FAST, ///< Send it fast + SPEED_SLOW ///< Send it slow + }; + /// Puts the specified client file on the server in the given directory and file + AREXPORT bool putFileToDirectory(const char *directory, + const char *fileName, + const char *clientFileName, + SendSpeed sendSpeed = SPEED_AUTO, + bool isSetTimestamp = false); + /// Cancels putting a file + AREXPORT void cancelPut(void); + + /// If we're waiting for completion now + AREXPORT bool isWaitingForReturn(void); + /// Gets the directory we're putting to + AREXPORT const char *getDirectory(void); + /// Gets the filename we're putting + AREXPORT const char *getFileName(void); + /// Gets the filename we're taking from the client + AREXPORT const char *getClientFileName(void); + /// Adds a callback for when we get the desired file (or fail) + AREXPORT void addFileSentCallback(ArFunctor1 *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when we get the desired file (or fail) + AREXPORT void remFileSentCallback(ArFunctor1 *functor); + /// Gets the last time we finished putting a file + AREXPORT ArTime getLastCompletedSend(void); + /// Gets the last time we started putting a file + AREXPORT ArTime getLastStartedSend(void); +protected: + AREXPORT void netPutFile(ArNetPacket *packet); + AREXPORT void callFileSentCallbacks(int val); + + ArMutex myDataMutex; + ArMutex myCallbackMutex; + ArClientBase *myClient; + bool myIsWaitingForReturn; + bool myInterleaved; + bool myTimestamp; + std::string myCommandName; + std::string myDirectory; + std::string myFileName; + std::string myWholeFileName; + std::string myClientFileName; + + bool myReadyForNextPacket; + FILE *myFile; + ArTime myLastStartedSend; + ArTime myLastCompletedSend; + std::list *> myFileSentCallbacks; + ArFunctor1C myPutFileCB; +}; + + +/// Class for deleting a file on the server +/** + This class will interact with the ArServerFileFromClient and put a + file on to the server. If you want to find out what files are on + the server use ArClientFileLister. + + When get a file it doesn't happen right away, but when the file is + received (or failes) the fileGotten callbacks will be called, 0 as + the int for the callback means everything is good, positive error + messages are from the server (0 = good (got file), 1 = getting + file, 2 = tried to go outside allowed area, 3 = bad directory, 4 = + empty file name (or other problem with fileName), 5 = can't write + temp file, 6 = error moving file from temp to perm, 7 = another + client putting file, 8 = timeout (no activity for 15 seconds) and + another client wanted to put the file, 9 = client adding to, + finishing, or canceling a file the server doesn't have), negative + would be from this class but there aren't any of those yet +**/ +class ArClientDeleteFileOnServer +{ +public: + /// Constructor + AREXPORT ArClientDeleteFileOnServer(ArClientBase *client); + /// Destructor + AREXPORT virtual ~ArClientDeleteFileOnServer(); + /// Sees if the server supports what this class needs + AREXPORT bool isAvailable(void); + /// Get the file from a directory + AREXPORT bool deleteFileFromDirectory(const char *directory, + const char *fileName); + /// If we're waiting for completion now + AREXPORT bool isWaitingForReturn(void); + /// Gets the directory we're putting to + AREXPORT const char *getDirectory(void); + /// Gets the filename we're putting + AREXPORT const char *getFileName(void); + /// Adds a callback for when we get the desired file (or fail) + AREXPORT void addFileDeletedCallback(ArFunctor1 *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when we get the desired file (or fail) + AREXPORT void remFileDeletedCallback(ArFunctor1 *functor); + /// Gets the last time we finished putting a file + AREXPORT ArTime getLastCompletedSend(void); + /// Gets the last time we started putting a file + AREXPORT ArTime getLastStartedSend(void); +protected: + AREXPORT void netDeleteFile(ArNetPacket *packet); + AREXPORT void callFileDeletedCallbacks(int val); + ArMutex myDataMutex; + ArMutex myCallbackMutex; + ArClientBase *myClient; + bool myIsWaitingForReturn; + std::string myDirectory; + std::string myFileName; + std::string myWholeFileName; + FILE *myFile; + ArTime myLastStartedSend; + ArTime myLastCompletedSend; + std::list *> myFileDeletedCallbacks; + ArFunctor1C myDeleteFileCB; +}; + +#endif //ARCLIENTFILEUTILS_H diff --git a/Legacy/Aria/ArNetworking/include/ArClientHandlerConfig.h b/Legacy/Aria/ArNetworking/include/ArClientHandlerConfig.h new file mode 100644 index 0000000..7d4d1f3 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientHandlerConfig.h @@ -0,0 +1,223 @@ +#ifndef ARCLIENTCONFIGHANDLER_H +#define ARCLIENTCONFIGHANDLER_H + +#include "Aria.h" +#include "ArClientBase.h" + +/// Client handler for receiving and updating ArConfig data via ArNetworking. +/** + * ArClientHandlerConfig processes the network packets that describe a + * robot's ArConfig. It also provides a means to save the modified + * configuration data to the robot server. This class is designed to + * work in conjunction with the ArServerHandlerConfig. See the server + * handler documentation for a complete description of the networking + * interface. + * + * This class should be thread safe, with the exception of + * unThreadSafeGetConfig. (If you want to use this method, surround it + * with calls to lock() and unlock().) + * + * Note that you can't add callbacks or remove callbacks from within a + * callback function. +**/ +class ArClientHandlerConfig +{ +public: + /// Constructor + AREXPORT ArClientHandlerConfig(ArClientBase *client, + bool ignoreBounds = false, + const char *robotName = NULL, + const char *logPrefix = NULL); + /// Destructor + AREXPORT virtual ~ArClientHandlerConfig(void); + + /// Requests the config from the server + AREXPORT void requestConfigFromServer(void); + /// Tells the server to reload the configuration + AREXPORT void reloadConfigOnServer(void); + + /// Threadsafe way to get the config to play with + AREXPORT ArConfig getConfigCopy(void); + + /// Adds a gotConfig callback + AREXPORT void addGotConfigCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a gotConfig callback + AREXPORT void remGotConfigCB(ArFunctor *functor); + /// Adds a save config to server succeeded callback + AREXPORT void addSaveConfigSucceededCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a save config to server succeeded callback + AREXPORT void remSaveConfigSucceededCB(ArFunctor *functor); + /// Adds a save config to server failed callback + AREXPORT void addSaveConfigFailedCB(ArFunctor1 *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a save config to server failed callback + AREXPORT void remSaveConfigFailedCB(ArFunctor1 *functor); + + /// Returns true if config gotten + AREXPORT bool haveGottenConfig(void); + /// Sends the config back to the server + AREXPORT void saveConfigToServer(void); + /// Sends the config back to the server + AREXPORT void saveConfigToServer( + ArConfig *config, + const std::set *ignoreTheseSections = NULL); + + /// Returns if we've requested some defaults + AREXPORT bool haveRequestedDefaults(void); + /// Returns if we've gotten our requested defaults + AREXPORT bool haveGottenDefaults(void); + + /// Sees if we can request defaults (both types) + AREXPORT bool canRequestDefaults(void); + + AREXPORT bool requestDefaultConfigFromServer(void); + AREXPORT ArConfig *getDefaultConfig(); + + /// Requests defaults for all sections from the server; modifies the config + AREXPORT bool requestConfigDefaults(void); + /// Requests defaults for one section from the server; modifies the config + AREXPORT bool requestSectionDefaults(const char *section); + + + /// Adds a got config defaults callback + AREXPORT void addGotConfigDefaultsCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a got config defaults callback + AREXPORT void remGotConfigDefaultsCB(ArFunctor *functor); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Last Editable Priority + // + // This value designates the last priority (highest numerical value) for + // which parameters may be edited. For example, when this value is set to + // EXPERT, then the user may not edit FACTORY parameters. + // + // If editable priority levels are supported and the client wishes to + // receive parameters of ineditable priorities, then the method + // requestLastEditablePriority should be called (and completed) before + // requestConfigFromServer is called. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns whether the server supports the last editable priority request. + AREXPORT bool isLastEditablePriorityAvailable(); + + /// Requests the last editable priority from the server + AREXPORT bool requestLastEditablePriorityFromServer(); + + /// Returns whether the last editable priority has been received from the server + AREXPORT bool haveGottenLastEditablePriority(); + /// Returns the last editable priority of the config + AREXPORT ArPriority::Priority getLastEditablePriority(); + + /// Adds callback invoked when the last editable priority packet is received + AREXPORT void addGotLastEditablePriorityCB + (ArFunctor *functor, + int position = 50); + /// Removes the specified callback from the list of last editable priority callbacks + AREXPORT void remGotLastEditablePriorityCB(ArFunctor *functor); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Unthreadsafe way to get the config to play with (see long docs) + AREXPORT ArConfig *getConfig(void); + /// Locks the config for if you're using the unthreadsafe getConfig + AREXPORT int lock(void); + /// Try to lock for the config for if you're using the unthreadsafe getConfig + AREXPORT int tryLock(void); + /// Unlocks the config for if you're using the unthreadsafe getConfig + AREXPORT int unlock(void); + + /// Turn on this flag to reduce the number of verbose log messages. + AREXPORT void setQuiet(bool isQuiet); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Packet Handlers + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Handles the packet from the GetConfigBySectionsV3 + AREXPORT void handleGetConfigBySectionsV3(ArNetPacket *packet); + + /// Handles the packet from the GetConfigBySectionsV2 + AREXPORT void handleGetConfigBySectionsV2(ArNetPacket *packet); + + /// Handles the packet from the GetConfigBySections + AREXPORT void handleGetConfigBySections(ArNetPacket *packet); + + /// Handles the packet from the GetConfigSectionFlags + AREXPORT void handleGetConfigSectionFlags(ArNetPacket *packet); + + /// Handles the packet from the getConfig + AREXPORT void handleGetConfig(ArNetPacket *packet); + + /// Handles the return packet from the setConfig (saveConfigToServer) + AREXPORT void handleSetConfig(ArNetPacket *packet); + + /// Handles the return packet from the setConfigBySections (saveConfigToServer) + AREXPORT void handleSetConfigBySections(ArNetPacket *packet); + + /// Handles the return packet from the setConfigBySectionsV2 (saveConfigToServer) + AREXPORT void handleSetConfigBySectionsV2(ArNetPacket *packet); + + /// Handles the return packet from getConfigDefaults + AREXPORT void handleGetConfigDefaults(ArNetPacket *packet); + + /// Handles the return packet from getLastEditablePriority + AREXPORT void handleGetLastEditablePriority(ArNetPacket *packet); + +protected: + + AREXPORT void handleGetConfigData(ArNetPacket *packet, + bool isMultiplePackets, + int version); + + +protected: + + std::string myRobotName; + std::string myLogPrefix; + + std::list myGotConfigCBList; + std::list mySaveConfigSucceededCBList; + std::list *> mySaveConfigFailedCBList; + std::list myGotConfigDefaultsCBList; + ArCallbackList myGotLastEditablePriorityCBList; + + ArClientBase *myClient; + + ArConfig myConfig; + ArConfig *myDefaultConfig; + ArPriority::Priority myLastEditablePriority; + + ArMutex myDataMutex; + ArMutex myCallbackMutex; + + bool myHaveRequestedLastEditablePriority; + bool myHaveGottenLastEditablePriority; + bool myHaveRequestedConfig; + bool myHaveGottenConfig; + bool myHaveRequestedDefaults; + bool myHaveGottenDefaults; + bool myHaveRequestedDefaultCopy; + + bool myIsQuiet; + + ArFunctor1C myHandleGetConfigBySectionsV3CB; + ArFunctor1C myHandleGetConfigBySectionsV2CB; + ArFunctor1C myHandleGetConfigBySectionsCB; + ArFunctor1C myHandleGetConfigCB; + ArFunctor1C myHandleSetConfigCB; + ArFunctor1C myHandleSetConfigBySectionsCB; + ArFunctor1C myHandleSetConfigBySectionsV2CB; + ArFunctor1C myHandleGetConfigDefaultsCB; + ArFunctor1C myHandleGetDefaultConfigCB; + ArFunctor1C myHandleGetConfigSectionFlagsCB; + ArFunctor1C myHandleGetLastEditablePriorityCB; +}; + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArClientSimpleConnector.h b/Legacy/Aria/ArNetworking/include/ArClientSimpleConnector.h new file mode 100644 index 0000000..84adfea --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientSimpleConnector.h @@ -0,0 +1,71 @@ +#ifndef ARCLIENTSIMPLECONNECTOR_H +#define ARCLIENTSIMPLECONNECTOR_H + +#include "Aria.h" +#include "ArClientBase.h" + +/** + This will let you connect to different hosts, ports, and with + different users and passwords more easily. + + Some program command line options affect behavior: + @verbinclude ArClientSimpleConnector_options + + To set the host the client will connect to use '-host hostName' + in the command line parameters + (no abbreviation for this since -h is for help and it's only 4 + letters). To set the port the client will connect to use '-port + portNumber' or '-p portNumber'. + To set the user to connect with + use '-user userName' or '-u userName'. + To set the password to + connect with use '-password password' or + '-pwd password'. To + use no password use '-nopassword' or '-np'. + Note that for using + passwords you should NOT use that option on the command line since + that can show everyone what the password is (especially in Linux), + it's there only for testing. If you give it a username without a + password it'll ask you for a password, if you don't have a password + just use the -nopassword or let it ask you for a password and hit + enter. To set the server key (string we need to connect to the + server) use '-setServerKey serverKey' or + '-ssk serverKey'. + **/ +class ArClientSimpleConnector +{ +public: + /// Constructor that takes argument parser (prefered) + AREXPORT ArClientSimpleConnector(ArArgumentParser *parser); + /// Constructor that takes args from main (not prefered) + AREXPORT ArClientSimpleConnector(int *argc, char **argv); + /// Constructor that takes argument builder (not prefered) + AREXPORT ArClientSimpleConnector(ArArgumentBuilder *arguments); + /// Destructor + AREXPORT ~ArClientSimpleConnector(void); + /// Connects the client with the options given + AREXPORT bool connectClient(ArClientBase *client, bool log = true); + /// Parses the arguments + AREXPORT bool parseArgs(void); + /// Parses the arguments + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Logs the options the connector has + AREXPORT void logOptions(void) const; +protected: + void reset(void); + const char *myHost; + const char *myUser; + const char *myPassword; + const char *myServerKey; + int myPort; + bool myNoPassword; + bool myLogDataList; + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; +}; + +#endif // ARCLIENTSIMPLECONNECTOR_H diff --git a/Legacy/Aria/ArNetworking/include/ArClientSwitchManager.h b/Legacy/Aria/ArNetworking/include/ArClientSwitchManager.h new file mode 100644 index 0000000..7019eb5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArClientSwitchManager.h @@ -0,0 +1,187 @@ +#ifndef ARCLIENTSWITCH_H +#define ARCLIENTSWITCH_H + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArClientBase.h" + +/** + The serverInfoFile takes the form of a config file roughly, there + are 3 things you can put in it now. 'user user', 'password + password' and 'serverKey serverKey'. Note that it loads these + files sequentially so if you pass it 5 files it'll read them in the + order they were passed in. If you give it just the keyword but not + the value (ie 'user') then it'll clear out that value. + + Some program command line options can be used to configure this class: + @verbinclude ArClientSwitchManager_options +**/ +class ArClientSwitchManager : public ArASyncTask +{ +public: + AREXPORT ArClientSwitchManager( + ArServerBase *serverBase, + ArArgumentParser *parser, + const char *serverDescription = "Central Server", + const char *clientSoftwareDescription = "Software"); + AREXPORT virtual ~ArClientSwitchManager(); + /// Returns if we're connected or not + AREXPORT bool isConnected(void); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Gets the hostname we're using for the central server (NULL means we're not trying to sue the central server) + AREXPORT const char *getCentralServerHostName(void); + /// Gets the identifier we're using + AREXPORT const char *getIdentifier(void); + /// Sets the identifier we're using + AREXPORT void setIdentifier(const char *identifier) + { myIdentifier = identifier; } + + /// Enforces the that the server is using this protocol version + AREXPORT void enforceProtocolVersion(const char *protocolVersion); + /// Enforces that the robots that connect are this type + AREXPORT void enforceType(ArServerCommands::Type type); + + /// Gets the config display hint items dependent on the central + /// server should use (still check getCentralServerHostName to see + /// if it's being used) + const char *getConfigDisplayHint(void) + { return myConfigDisplayHint.c_str(); } + + /// The handler for the response to the switch command + AREXPORT void clientSwitch(ArNetPacket *packet); + /// The handler for the packet to let the server know we're still talking to it + AREXPORT void netCentralHeartbeat(ArServerClient *client, + ArNetPacket *packet); + /// The handler for the packet that comes from the server so we know + /// we're getting these + AREXPORT void netCentralServerHeartbeat(ArServerClient *client, + ArNetPacket *packet); + + /// Parses the file for holding the user, password, and server key + AREXPORT bool parseFile(const char *fileName); + AREXPORT virtual void *runThread(void *arg); + + /// Sets debug logging + AREXPORT void setDebugLogging(bool debugLogging = false) + { myDebugLogging = debugLogging; } + /// Gets if this is using debug logging + AREXPORT bool getDebugLogging(void) { return myDebugLogging; } + + /// Gets the server client the forwarder is using (internal) + /** + @internal + **/ + AREXPORT ArServerClient* getServerClient(void) + { return myServerClient; } + + /// Adds central server or identifier not passed into the config + AREXPORT void addToConfig(const char *configSection, + const char *connectName, const char *connectDesc, + const char *addressName, const char *addressDesc); + + /// Adds a callback when we switch states while starting + AREXPORT void addFailedConnectCB( + ArFunctor1 *functor, int position = 50) + { myFailedConnectCBList.addCallback(functor, position); } + /// Removes a callback when we switch to running + AREXPORT void remFailedConnectCB(ArFunctor1 *functor) + { myFailedConnectCBList.remCallback(functor); } + + /// Adds a callback when we switch states while starting + AREXPORT void addConnectedCB( + ArFunctor1 *functor, int position = 50) + { myConnectedCBList.addCallback(functor, position); } + /// Removes a callback when we switch to running + AREXPORT void remConnectedCB(ArFunctor1 *functor) + { myConnectedCBList.remCallback(functor); } + + +protected: + AREXPORT void socketClosed(void); + ArServerBase *myServer; + ArArgumentParser *myParser; + std::string myServerDesc; + std::string myClientSoftwareDesc; + + ArServerClient *myServerClient; + ArTime myLastTcpHeartbeat; + ArTime myLastUdpHeartbeat; + + ArFileParser myFileParser; + + bool myServerHasHeartbeat; + double myServerHeartbeatTimeout; + double myServerUdpHeartbeatTimeout; + double myServerBackupTimeout; + + bool fileUserCallback(ArArgumentBuilder *arg); + bool filePasswordCallback(ArArgumentBuilder *arg); + bool fileServerKeyCallback(ArArgumentBuilder *arg); + + enum State + { + IDLE, ///< Don't want to connect + TRYING_CONNECTION, ///< If we're trying to connect + CONNECTING, ///< If we're waiting for the response from the server + CONNECTED, ///< If we're connected + LOST_CONNECTION ///< If we lost a connection... wait a bit and try again + }; + State myState; + ArTime myStartedState; + ArTime myLastConnectionAttempt; + //bool myGaveTimeWarning; + + bool processFile(void); + AREXPORT void switchState(State state); + + ArMutex myDataMutex; + + bool myTryConnection; + ArClientBase *myClient; + + std::string myUser; + std::string myPassword; + std::string myServerKey; + + std::string myCentralServer; + int myCentralServerPort; + std::string myIdentifier; + + std::string myEnforceProtocolVersion; + ArServerCommands::Type myEnforceType; + + bool myConfigFirstProcess; + bool myConfigConnectToCentralServer; + char myConfigCentralServer[1024]; + char myConfigIdentifier[1024]; + std::string myConfigDisplayHint; + + ArCallbackList1 myFailedConnectCBList; + ArCallbackList1 myConnectedCBList; + + bool myDebugLogging; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; + ArFunctorC mySocketClosedCB; + ArFunctor1C mySwitchCB; + ArFunctor2C myNetCentralHeartbeatCB; + ArFunctor2C myNetCentralServerHeartbeatCB; + ArRetFunctor1C myFileUserCB; + ArRetFunctor1C myFilePasswordCB; + ArRetFunctor1C myFileServerKeyCB; + ArRetFunctorC myProcessFileCB; + +}; + + +#endif // ARCLIENTSWITCH_H + diff --git a/Legacy/Aria/ArNetworking/include/ArHybridForwarderVideo.h b/Legacy/Aria/ArNetworking/include/ArHybridForwarderVideo.h new file mode 100644 index 0000000..63f9312 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArHybridForwarderVideo.h @@ -0,0 +1,88 @@ +#ifndef ARHYBRIDFORWARDERVIDEO_H +#define ARHYBRIDFORWARDERVIDEO_H + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArClientBase.h" + +/// This class takes video another source and serves it back up +class ArHybridForwarderVideo : public ArCameraCollectionItem +{ +public: + /// Constructor that takes a client + AREXPORT ArHybridForwarderVideo(ArServerBase *server, ArClientBase *client); + /// Constructor that just takes a host and port and makes its own client + AREXPORT ArHybridForwarderVideo(ArServerBase *server, + const char *hostname = "localhost", + int port = 7070); + /// Destructor + AREXPORT virtual ~ArHybridForwarderVideo(); + + /// Returns if we're forwarding video or not + AREXPORT bool isForwardingVideo(void) const; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ArCameraCollectionItem methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns the name of the camera handled by this item. + AREXPORT virtual const char *getCameraName(); + + /// Sets the name of the camera handled by this item. + /** + * This method must be called before addToCameraCollection(). + **/ + AREXPORT virtual void setCameraName(const char *cameraName); + + /// Adds this item to the given camera collection. + AREXPORT virtual void addToCameraCollection(ArCameraCollection &collection); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Packet methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Sends the last received video size (just gets this once) + AREXPORT void sendVideoSize(ArServerClient *client, ArNetPacket *packet); + /// Sends the last received video + AREXPORT void sendVideo(ArServerClient *client, ArNetPacket *packet); + /// Receives the video size (just gets this once) + AREXPORT void receiveVideoSize(ArNetPacket *packet); + /// Receives the video (and sets a timer to wait a bit and get it again) + AREXPORT void receiveVideo(ArNetPacket *packet); + /// Our callback that requests more video + AREXPORT void clientCycleCallback(void); + /// Sets how often after getting video we ask for it again + void setVideoRequestTime(int ms) { myVideoRequestTime = ms; } + /// Gets how often after getting video we ask for it again + int setVideoRequestTime(void) const { return myVideoRequestTime; } +protected: + AREXPORT void finishConstructor(void); + + std::string myCameraName; + + ArMutex myMutex; + bool myForwardingVideo; + ArNetPacket myReceivedVideoSize; + ArNetPacket myReceivedVideo; + ArNetPacket mySendVideoArgument; + ArTime myLastReceivedVideo; + ArTime myLastReqSent; + bool myReqSent; + int myVideoRequestTime; + ArServerBase *myServer; + ArClientBase *myClient; + ArFunctor2C *mySendVideoSizeCB; + ArFunctor2C *mySendVideoCB; + ArFunctor1C *myReceiveVideoSizeCB; + ArFunctor1C *myReceiveVideoCB; + ArFunctorC *myClientCycleCB; + + bool myIsSendVideoAvailable; +}; + + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArMapChanger.h b/Legacy/Aria/ArNetworking/include/ArMapChanger.h new file mode 100644 index 0000000..aa052e7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArMapChanger.h @@ -0,0 +1,557 @@ +#ifndef ARMAPCHANGER_H +#define ARMAPCHANGER_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +#include + +#include +#include +#include + +#include "ArNetPacket.h" +#include "ArCentralForwarder.h" +#include "ArClientBase.h" +#include "ArClientSwitchManager.h" +#include "ArServerBase.h" +#include "ArServerClient.h" +#include "ArMapChanger.h" + +/// Utility class used to apply incremental changes to an Aria map. +/** + * ArMapChanger is a helper class that can send and receive ArMapChangeDetails + * over the network and apply them to an associated Aria map. An instance of + * ArMapChanger must be instantiated on both the client and the server side. + * (Note that there are two different versions of the constructors for this.) + * + * TODO: Possibly subclass this into ArClientMapChanger and ArServerMapChanger? + * + * @see ArMapChangeDetails +**/ +class ArMapChanger +{ +public: + + /// Reply status for a map change request + enum MapChangeReplyType { + CHANGE_FAILED = 0, + CHANGE_SUCCESS = 10 + }; + + /// Name of the network packet that contains the incremental map changes. + static const char *PROCESS_CHANGES_PACKET_NAME; + + /// Name of the network packet that contains incremental map changes originated by the robot. + static const char *PROCESS_ROBOT_CHANGES_PACKET_NAME; + + /// Name of a network packet that is broadcast when the map is being changed. + static const char *CHANGES_IN_PROGRESS_PACKET_NAME; + + /// Name of the network packet that is broadcast when map changes originated by the robot are complete. + static const char *ROBOT_CHANGES_COMPLETE_PACKET_NAME; + + // --------------------------------------------------------------------------- + // Constructors, Destructor + // --------------------------------------------------------------------------- + + /// Constructs a server map changer. + /** + * The map changer will automatically apply the received map change details + * to the given map. + * + * @param server the ArServerBase * that receives the network packets + * @param map the ArMapInterface * to which to apply the map changes + **/ + AREXPORT ArMapChanger(ArServerBase *server, + ArMapInterface *map); + + /// Constructs a server map changer that can also originate changes (to the EM). + /** + * The map changer will automatically apply the received map change details + * to the given map. + * + * @param clientSwitch the ArClientSwitchManager * that communicates to the EM + * @param server the ArServerBase * that receives the network packets + * @param map the ArMapInterface * to which to apply the map changes + **/ + AREXPORT ArMapChanger(ArClientSwitchManager *clientSwitch, + ArServerBase *server, + ArMapInterface *map); + + + /// Constructs a client map changer. + /** + * The map changer will send map change details to the server. The application + * must request this by calling sendMapChanges. + * + * @param client the ArClientBase * which is used to send the map change details + * @param infoNames the list of info names included in the map + **/ + AREXPORT ArMapChanger(ArClientBase *client, + const std::list &infoNames); + + /// Constructs a stand-alone map changer that will apply changes to the given map. + /** + * This method is primarily used for debugging. + * + * @param map the ArMapInterface * to which to apply the map changes + **/ + AREXPORT ArMapChanger(ArMapInterface *map); + + /// Destructor + AREXPORT virtual ~ArMapChanger(); + + // --------------------------------------------------------------------------- + // Main Methods + // --------------------------------------------------------------------------- + + /// Sends the given map changes from the client to the server. + AREXPORT virtual bool sendMapChanges(ArMapChangeDetails *changeDetails); + + /// Sends the given map changes from the robot to the central server. + AREXPORT virtual bool sendRobotMapChanges(ArMapChangeDetails *changeDetails); + + /// Applies the given map changes received from the client to the associated Aria map. + AREXPORT virtual bool applyMapChanges(ArMapChangeDetails *changeDetails); + + /// Transmits the given map change packet list from the client to the server. + AREXPORT virtual bool sendPacketList(const std::list &packetList); + + /// Transmit the given map change packet list from the robot to the central server. + AREXPORT virtual bool sendRobotPacketList(const std::list &packetList); + + // --------------------------------------------------------------------------- + // Callback Methods + // --------------------------------------------------------------------------- + + /// Adds a callback to be invoked after the map has been changed on the server. + /** + * This method is primarily used on the central server. After the map changes + * are successfully applied to its map, they are propagated to all of the + * connected robots. + **/ + AREXPORT virtual bool addChangeCB + (ArFunctor2 *> *functor); + + /// Removes a callback from the map change list. + AREXPORT virtual bool remChangeCB + (ArFunctor2 *> *functor); + + /// Adds a callback to be invoked after the remote reply has been received. + /** + * This method is primarily used on the robot. After the ARCL originated + * changes have been applied by the Enterprise Manager, this callback list + * is invoked for other interested parties. + **/ + AREXPORT virtual bool addRobotChangeReplyCB + (ArFunctor2 *functor); + + /// Removes a callback from the remote reply list. + AREXPORT virtual bool remRobotChangeReplyCB + (ArFunctor2 *functor); + + /// Adds a callback to be invoked before the map file is written. + /** + * This method is primarily used to temporarily make the server's directory + * writeable, if necessary. + **/ + AREXPORT virtual void addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + + /// Removes a callback from the pre-write file list. + AREXPORT virtual void remPreWriteFileCB(ArFunctor *functor); + + /// Adds a callback to be invoked after the map file has been written. + /** + * This method is primarily used to restore the server's directory write status, + * if necessary. + **/ + AREXPORT virtual void addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + + /// Removes a callback from the post-write file list. + AREXPORT virtual void remPostWriteFileCB(ArFunctor *functor); + +// ----------------------------------------------------------------------------- + +protected: + + /// Indicates the current stage of the map change network packets. + enum MapChangeCommand { + START_CHANGES = 0, ///< First packet that contains changes to be applied to the map + CONTINUE_CHANGES = 1, ///< Request to continue applying changes to the map + FINISH_CHANGES = 2, ///< Last packet that contains changes to be applied to the map + CANCEL_CHANGES = 3, ///< Cancel the request to change the map + LAST_CHANGE_COMMAND = CANCEL_CHANGES ///< Last value in the enumeration + }; + + /// Type of data contained in the map change network packet + enum MapChangeDataType { + NO_CHANGE = 0, ///< No change data + SUMMARY_DATA = 1, ///< Summary data, e.g. min/max pos, number of points + INFO_DATA = 2, ///< Any of the info data, e.g. MapInfo, RouteInfo + SUPPLEMENT_DATA = 3, ///< Miscellaneous supplemental data such as origin lat/long/alt + OBJECTS_DATA = 4, ///< Map objects, i.e. Cairn lines + POINTS_DATA = 5, ///< Map data points + LINES_DATA = 6, ///< Map data lines + LAST_CHANGE_DATA_TYPE = LINES_DATA ///< Last value in the enumeration + }; + + /// Miscellaneous constants + enum { + CHANGE_DATA_TYPE_COUNT = LAST_CHANGE_DATA_TYPE + 1, + CHANGE_COMMAND_COUNT = LAST_CHANGE_COMMAND + 1, + MAX_POINTS_IN_PACKET = 1000, + MAX_LINES_IN_PACKET = 500 + }; + + + // --------------------------------------------------------------------------- + // Packet Handlers + // --------------------------------------------------------------------------- + + /// Server handler for packets that contain map change details. + AREXPORT virtual void handleChangePacket(ArServerClient *client, + ArNetPacket *packet); + + AREXPORT virtual void handleRobotChangeReplyPacket(ArServerClient *client, + ArNetPacket *packet); + + /// Client handler for the results of applying the map changes on the server. + AREXPORT virtual void handleChangeReplyPacket(ArNetPacket *packet); + + /// Client handler for the map-changes-in-progress broadcast packet + AREXPORT virtual void handleChangesInProgressPacket(ArNetPacket *packet); + + /// Client handler for the server's idle-processing-pending broadcast packet + AREXPORT virtual void handleIdleProcessingPacket(ArNetPacket *packet); + + /// Client handler for when the robot disconnects or is shutdown. + AREXPORT virtual void handleClientShutdown(); + +protected: + + // --------------------------------------------------------------------------- + // Helper Methods + // --------------------------------------------------------------------------- + + // bool applyMapChanges(std::list &packetList); + + /// Applies all scan data changes that are contained in the given change details. + /** + * Scan data include summary data, map data points, and map data lines. + * If the map contains scan data for multiple sources, then this method + * applies all of the applicable changes. + * + * An Aria map must have been previously associated with the map changer. + **/ + bool applyScanChanges(ArMapChangeDetails *changeDetails); + + /// Applies scan data changes for the specified scan type. + /** + * @param changeDetails the ArMapChangeDetails * that describes how the map should + * be modified; must be non-NULL + * @param scanType the char * identifier of the scan type to be updated + * @param parser the ArFileParser used to parse the changeDetails + **/ + bool applyScanChanges(ArMapChangeDetails *changeDetails, + const char *scanType, + ArFileParser &parser); + + /// Applies the given map changes to the supplemental data in the map. + /** + * @param changeDetails the ArMapChangeDetails * that describes how the map should + * be modified; must be non-NULL + **/ + bool applySupplementChanges(ArMapChangeDetails *changeDetails); + + /// Applies the given map changes to the object data in the map. + /** + * @param changeDetails the ArMapChangeDetails * that describes how the map should + * be modified; must be non-NULL + **/ + bool applyObjectChanges(ArMapChangeDetails *changeDetails); + + /// Applies the given map changes to the info data in the map. + /** + * @param changeDetails the ArMapChangeDetails * that describes how the map should + * be modified; must be non-NULL + **/ + bool applyInfoChanges(ArMapChangeDetails *changeDetails); + + /// Determines whether the two given map objects are the same object. + /** + * If the objects have a name, then the name must be identical. Otherwise, the type + * and position must be the same. + **/ + bool isMatchingObjects(ArMapObject *obj1, + ArMapObject *obj2); + //ArMapChangeDetails *changeDetails); + + /// Creates a list of network packets for the given map change details. + bool convertChangeDetailsToPacketList(ArMapChangeDetails *changeDetails, + std::list *packetListOut, + bool isRelay = false); + + /// Unpacks the given network packet list and populates the given map change details. + bool convertPacketListToChangeDetails(std::list &packetList, + ArMapChangeDetails *changeDetailsOut); + + /// Creates network packets for the specified map change data and adds them to the given list. + /** + * @param dataType the MapChangeDataType that specifies which map data is to be added + * @param changeType the MapLineChangeType that specifies the type of map change (lines + * added or deleted) + * @param scanType the char * identifier of the scan source to add; valid only when + * dataType is SUMMARY_DATA + * @param extra an optional const char * identifier that clarifies which data to add; + * when dataType is INFO_DATA, this is the info name; otherwise, ignored + * @param fileLineSet the ArMapFileLineSet * component of the map change details that + * is to be converted to network packets + * @param packetListOut the list of ArNetPackets to which new packets are added + **/ + bool addFileLineSetPackets(MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + const char *extra, + ArMapFileLineSet *fileLineSet, + std::list *packetListOut); + + /// Inserts header information into the given network packet. + /** + * @param command the MapChangeCommand that specifies which command identifier to add to this packet + * @param dataType the MapChangeDataType that specifies which map data is to be added + * @param changeType the MapLineChangeType that specifies the type of map change (lines + * added or deleted) + * @param scanType the char * identifier of the scan source to add; valid only when + * dataType is SUMMARY_DATA + * @param packet the ArNetPacket * to be modified; must be non-NULL + **/ + void addHeaderToPacket(MapChangeCommand command, + MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + ArNetPacket *packet); + + /// Creates network packets for the specified file line group and adds them to the given list. + bool addGroupToPacketList(MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + ArMapFileLineGroup &group, + std::list *packetListOut); + + /// Creates network packets for the specified file line and adds them to the given list. + bool addFileLineToPacketList(MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + const ArMapFileLine &fileLine, + std::list *packetListOut); + + /// Creates network packets for the given map data points and adds them to the given list. + bool addPointsPackets(ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + std::vector *pointList, + std::list *packetListOut); + + /// Creates network packets for the given map data lines and adds them to the given list. + bool addLinesPackets(ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + std::vector *lineSegmentList, + std::list *packetListOut); + + /// Unpacks the header data from the given network packet. + /** + * @param packet the ArNetPacket * from which to extract the header information; + * must be non-NULL + * @param commandOut the MapChangeCommand * extracted from the packet + * @param origMapIdOut the original ArMapId * extracted from the packet + * @param newMapIdOut the optional new ArMapId * extracted from the packet + * @param dataTypeOut the optional MapChangeDataType * extracted from the packet + * @param changeTypeOut the optional MapLineChangeType * extracted from the packet + * @param scanTypeOut the optional std::string * extracted from the packet + * @return bool true if all of the header information was succesfully extracted; + * false, otherwise + **/ + bool unpackHeader(ArNetPacket *packet, + MapChangeCommand *commandOut, + ArMapId *origMapIdOut, + ArMapId *newMapIdOut = NULL, + MapChangeDataType *dataTypeOut = NULL, + ArMapChangeDetails::MapLineChangeType *changeTypeOut = NULL, + std::string *scanTypeOut = NULL); + + /// Unpacks the specified file line set from the given network packet. + /** + * The file line set is added to the given change details. + **/ + bool unpackFileLineSet(ArNetPacket *packet, + MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + int *numGroups, + int *numChildren, + ArMapChangeDetails *changeDetails); + + /// Unpacks the map data points for the specified scan from the given network packet. + /** + * The data points are added to the given change details. + **/ + bool unpackPoints(ArNetPacket *packet, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + int *numPoints, + ArMapChangeDetails *changeDetails); + + /// Unpacks the map data lines for the specified scan from the given network packet. + /** + * The data lines are added to the given change details. + **/ + bool unpackLines(ArNetPacket *packet, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + int *numLines, + ArMapChangeDetails *changeDetails); + + /// Resets all of the network packets in the given list so that they can be read again. + void resetPacketList(std::list *packetList); + + /// Waits for a reply from the server. + /** + * If a reply is not received within 30 seconds, this method will timeout and return + * false. + * + * @return bool true if the reply was received; false otherwise + **/ + bool waitForReply(ArTime &started); + + bool waitForCentralServerReply(ArTime &started); + + /// Determines whether idle processing is pending on the server. + bool isIdleProcessingPending(); + + /// Adds the given functor to the given callback list. + AREXPORT void addToCallbackList(ArFunctor *functor, + ArListPos::Pos position, + std::list *cbList); + + /// Removes the given functor from the given callback list. + AREXPORT void remFromCallbackList(ArFunctor *functor, + std::list *cbList); + +private: + /// Disabled copy constructor + ArMapChanger(const ArMapChanger &other); + + /// Disabled assignment operator + ArMapChanger &operator=(const ArMapChanger &other); + +protected: + + /// Accumulates the packet list that describes map changes received from a specified client. + struct ClientChangeInfo + { + public: + /// Constructor for changes received from a client + ClientChangeInfo(ArServerClient *client); + + /// Constructor for changes received from a robot on the CS + ClientChangeInfo(ArCentralForwarder *forwarder); + + /// Destructor + ~ClientChangeInfo(); + + /// Adds the given packet to the list + void addPacket(ArNetPacket *packet); + + /// Server client which sent the map changes... + ArServerClient *myClient; + + /// Or the forwarder that sent the map changes + ArCentralForwarder *myForwarder; + + /// Time at which the first packet in this list was received + ArTime myStartTime; + /// Time at which the most recent packet in this list was received + ArTime myLastActivityTime; + /// List of network packets received from the client for these map changes + std::list myPacketList; + }; // end struct ClientChangeInfo + + + /// Aria map currently in use + ArMapInterface *myMap; + /// Copy of the current Aria map, used to make sure the changes can be successfully made + ArMapInterface *myWorkingMap; + + /// Change details to apply to the Aria map + ArMapChangeDetails *myChangeDetails; + /// Number of info types in the associated Aria map + //int myInfoCount; + + /// List of info types in the associated info map + std::list myInfoNames; + + /// Associated server base; non-NULL only when changer instantiated on the server + ArServerBase *myServer; + + /// Associated client switch manager; non-NULL when changer instantiated on robot with EM + ArClientSwitchManager *myClientSwitch; + + /// Whether the client switch manager's serverClient has been initialized with a handler (for EM) + bool myIsServerClientInit; + + + /// Mutex that protects access to the myClient member + ArMutex myClientMutex; + /// Associated client base; non-NULL only when changer instantiated on the client + ArClientBase *myClient; + + /// Mutex that protects access to the myClientInfo member + ArMutex myClientInfoMutex; + /// Information regarding the server client that is currently sending map changes + ClientChangeInfo *myClientInfo; + + /// Mutex that protects access to the interleave data + ArMutex myInterleaveMutex; + /// Whether the client is ready to send another packet + bool myReadyForNextPacket; + /// Whether the client is waiting for a reply from the server + bool myIsWaitingForReturn; + + /// Mutex that protects access to the myIsIdleProcessingPending member + ArMutex myIdleProcessingMutex; + /// Whether the server has data to process once it becomes idle + bool myIsIdleProcessingPending; + + /// List of callbacks to be invoked before the changed map file is written + std::list myPreWriteCBList; + /// List of callbacks to be invoked after the changed map file is written + std::list myPostWriteCBList; + + /// List of server client callbacks to be invoked after the map has been changed + std::list< ArFunctor2 *> *> + myChangeCBList; + + /// List of server client callbacks to be invoked after the map has been changed + std::list< ArFunctor2 *> myRobotChangeReplyCBList; + + /// Server handler for the network packets that describe map changes. + ArFunctor2C myHandleChangePacketCB; + + ArFunctor2C myHandleRobotReplyPacketCB; + + /// Client handler for the map-changes-in-progress packet + ArFunctor1C myHandleChangesInProgressPacketCB; + /// Client handler for the reply packet + ArFunctor1C myHandleReplyPacketCB; + /// Client handler for the idle-processing-in-progress packet + ArFunctor1C myHandleIdleProcessingPacketCB; + /// Handler invoked when the client shuts down + ArFunctorC myClientShutdownCB; + +}; // end class ArMapChanger + +#endif // ARMAPCHANGER diff --git a/Legacy/Aria/ArNetworking/include/ArNetPacket.h b/Legacy/Aria/ArNetworking/include/ArNetPacket.h new file mode 100644 index 0000000..00781fb --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArNetPacket.h @@ -0,0 +1,84 @@ +#ifndef NLNETPACKET_H +#define NLNETPACKET_H + +#include "Aria.h" + +/// our packet for the network stuff +class ArNetPacket : public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArNetPacket( + ArTypes::UByte2 bufferSize = ArNetPacket::MAX_LENGTH + 5); + + /// Copy constructor + AREXPORT ArNetPacket(const ArNetPacket &other); + + /// Assignment operator + AREXPORT ArNetPacket &operator=(const ArNetPacket &other); + + /// Destructor + AREXPORT virtual ~ArNetPacket(); + + + /// Sets the command this packet is + AREXPORT void setCommand(ArTypes::UByte2 command); + /// Gets the command this packet is + AREXPORT ArTypes::UByte2 getCommand(void); + enum { + SIZE_OF_LENGTH = 2, ///< Number of bytes needed to store packet length value + MAX_LENGTH = 32000, ///< Suggested maximum total size of a packet (bytes) + HEADER_LENGTH = 6, ///< Bytes of packet data used for header + FOOTER_LENGTH = 2, ///< Byset of packet data used for footer + + /** Suggested maximum size for data payload (this is the total suggested + packet size minus headers and footers) + */ + MAX_DATA_LENGTH = MAX_LENGTH - HEADER_LENGTH - FOOTER_LENGTH - SIZE_OF_LENGTH + }; + + /// Puts a double into the packet buffer + AREXPORT virtual void doubleToBuf(double val); + /// Gets a double from the packet buffer + AREXPORT virtual double bufToDouble(void); + AREXPORT virtual void empty(void); + AREXPORT virtual void finalizePacket(void); + AREXPORT virtual void resetRead(void); + AREXPORT virtual void duplicatePacket(ArNetPacket *packet); + + /// returns true if the checksum matches what it should be + AREXPORT bool verifyCheckSum(void); + /// returns the checksum, probably used only internally + AREXPORT ArTypes::Byte2 calcCheckSum(void); + + /// Iternal function that sets if we already added the footer(for forwarding) + bool getAddedFooter(void) { return myAddedFooter; } + /// Iternal function that sets if we already added the footer(for forwarding) + void setAddedFooter(bool addedFooter) { myAddedFooter = addedFooter; } + + /// an enum for where the packet came from + enum PacketSource + { + TCP, ///< Came in over tcp + UDP ///< Came in over udp + }; + PacketSource getPacketSource(void) { return myPacketSource; } + void setPacketSource(PacketSource source) { myPacketSource = source; } + void setArbitraryString(const char *string) { myArbitraryString = string; } + const char *getArbitraryString(void) { return myArbitraryString.c_str(); } + +private: + + /// Inserts the header information (command, length, etc.) into the buffer. + void insertHeader(); + + +protected: + PacketSource myPacketSource; + bool myAddedFooter; + std::string myArbitraryString; + ArTypes::UByte2 myCommand; +}; + + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArNetPacketReceiverTcp.h b/Legacy/Aria/ArNetworking/include/ArNetPacketReceiverTcp.h new file mode 100644 index 0000000..eb96486 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArNetPacketReceiverTcp.h @@ -0,0 +1,79 @@ +#ifndef NLNETPACKETRECEIVERTCP_H +#define NLNETPACKETRECEIVERTCP_H + +#include "Aria.h" +#include "ArNetPacket.h" + +/** + This class receives TCP packets from a socket, you need to have an + open socket and give it to the socket with setSocket, then you need + to set up a callback to process packets with setProcessPacketCB, + finally call readData which will read in all the data and call the + processPacketCB. +**/ +class ArNetPacketReceiverTcp +{ +public: + /// Constructor + AREXPORT ArNetPacketReceiverTcp(); + /// Destructor + AREXPORT ~ArNetPacketReceiverTcp(); + + /// Sets the socket this receiver uses + AREXPORT void setSocket(ArSocket *socket); + /// Gets the socket this receiver uses + AREXPORT ArSocket *getSocket(void); + + /// Sets the callback for use when a packet is received + AREXPORT void setProcessPacketCB(ArFunctor1 *functor); + + /// Gets the callback used when a packet is received + AREXPORT ArFunctor1 *getProcessPacketCB(void); + + /// Sets the logging prefix + AREXPORT void setLoggingPrefix(const char *loggingPrefix); + + /// Reads in all the data available calling the processPacketCB + AREXPORT bool readData(void); + + /// Sets whether we're quiet about errors or not + void setQuiet(bool quiet) { myQuiet = quiet; } + /// Gets whether we're quiet about errors or not + bool getQuiet(void) { return myQuiet; } +protected: + enum Ret { + RET_CONN_CLOSED, // the connection was closed (in a good manner) + RET_CONN_ERROR, // the connection was has an error (so close it) + RET_GOT_PACKET, // we got a good packet + RET_BAD_PACKET, // we got a bad packet (checksum wrong) + RET_FAILED_READ, // our read failed (no data) + RET_TIMED_OUT}; // we were reading and timed out + /// Reads in a single packet, returns NULL if not one + AREXPORT Ret readPacket(int msWait); + + + enum State { STATE_SYNC1, STATE_SYNC2, STATE_LENGTH1, + STATE_LENGTH2, STATE_ACQUIRE_DATA }; + + enum { + TOTAL_PACKET_LENGTH = ArNetPacket::MAX_LENGTH+ArNetPacket::HEADER_LENGTH+ArNetPacket::FOOTER_LENGTH + }; + + State myState; + ArFunctor1 *myProcessPacketCB; + bool myQuiet; + ArSocket *mySocket; + ArTime myLastPacket; + ArNetPacket myPacket; + + + char myReadBuff[TOTAL_PACKET_LENGTH]; + int myReadCount; + int myReadLength; + int myReadCommand; + unsigned char mySync1; + unsigned char mySync2; + std::string myLoggingPrefix; +}; + +#endif // NLNETPACKETRECEIVERTCP diff --git a/Legacy/Aria/ArNetworking/include/ArNetPacketReceiverUdp.h b/Legacy/Aria/ArNetworking/include/ArNetPacketReceiverUdp.h new file mode 100644 index 0000000..64393e0 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArNetPacketReceiverUdp.h @@ -0,0 +1,41 @@ +#ifndef NLNETPACKETRECEIVERUDP_H +#define NLNETPACKETRECEIVERUDP_H + +#include "ArNetPacket.h" + +/** + This is the receiver for UDP packets. +**/ + +class ArNetPacketReceiverUdp +{ +public: + AREXPORT ArNetPacketReceiverUdp(); + AREXPORT ~ArNetPacketReceiverUdp(); + + /// Sets the socket this receiver uses + AREXPORT void setSocket(ArSocket *socket); + /// Gets the socket this receiver uses + AREXPORT ArSocket *getSocket(void); + + /// Sets the callback for use when a packet is received + AREXPORT void setProcessPacketCB(ArFunctor2 *functor); + + /// Gets the callback used when a packet is received + AREXPORT ArFunctor2 * + getProcessPacketCB(void); + + /// Reads in all the data available calling the processPacketCB + AREXPORT bool readData(void); + +protected: + ArFunctor2 *myProcessPacketCB; + ArSocket *mySocket; + ArTime myLastPacket; + ArNetPacket myPacket; + char myBuff[ArNetPacket::MAX_LENGTH+20]; + +}; + +#endif // NLNETPACKETRECEIVERUDP_H diff --git a/Legacy/Aria/ArNetworking/include/ArNetPacketSenderTcp.h b/Legacy/Aria/ArNetworking/include/ArNetPacketSenderTcp.h new file mode 100644 index 0000000..4404cca --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArNetPacketSenderTcp.h @@ -0,0 +1,51 @@ +#ifndef ARNETPACKETSENDERTCP_H +#define ARNETPACKETSENDERTCP_H + +#include "Aria.h" +#include "ArNetPacket.h" + +class ArNetPacketSenderTcp +{ +public: + /// Constructor + AREXPORT ArNetPacketSenderTcp(); + /// Destructor + AREXPORT ~ArNetPacketSenderTcp(); + + /// Sets the socket this sender uses + AREXPORT void setSocket(ArSocket *socket); + /// Gets the socket this sender uses + AREXPORT ArSocket *getSocket(void); + + /// Sets the connection timeout + AREXPORT void setBackupTimeout(double connectionTimeoutInMins); + + /// Sets debug logging + AREXPORT void setDebugLogging(bool debugLogging); + + /// Sets the logging prefix + AREXPORT void setLoggingPrefix(const char *prefix); + + /// Sends a packet + AREXPORT void sendPacket(ArNetPacket *packet, + const char *loggingString = ""); + + /// Tries to send the data there is to be sent + AREXPORT bool sendData(void); +protected: + ArMutex myDataMutex; + bool myDebugLogging; + std::string myLoggingPrefix; + ArLog::LogLevel myVerboseLogLevel; + ArSocket *mySocket; + std::list myPacketList; + ArNetPacket *myPacket; + int myAlreadySent; + const char *myBuf; + int myLength; + double myBackupTimeout; + ArTime myLastGoodSend; + +}; + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArNetworking.h b/Legacy/Aria/ArNetworking/include/ArNetworking.h new file mode 100644 index 0000000..a01448c --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArNetworking.h @@ -0,0 +1,188 @@ +#ifndef ARNETWORKING_H +#define ARNETWORKING_H + +#include "ArServerBase.h" +#include "ArServerClient.h" +#include "ArServerCommands.h" +#include "ArClientBase.h" +#include "ArClientCommands.h" +#include "ArMapChanger.h" +#include "ArServerHandlerCamera.h" +#include "ArServerHandlerCameraCollection.h" +#include "ArServerHandlerCommMonitor.h" +#include "ArServerHandlerCommands.h" +#include "ArServerHandlerPopup.h" +#include "ArServerInfoDrawings.h" +#include "ArServerInfoRobot.h" +#include "ArServerInfoSensor.h" +#include "ArServerHandlerMap.h" +#include "ArServerMode.h" +#include "ArServerModeDrive.h" +#include "ArServerModeRatioDrive.h" +#include "ArServerModeStop.h" +#include "ArServerModeWander.h" +#include "ArServerHandlerConfig.h" +#include "ArClientHandlerConfig.h" +#include "ArHybridForwarderVideo.h" +#include "ArServerSimpleCommands.h" +#ifndef WIN32 +#include "ArServerFileUtils.h" +#endif +#include "ArClientFileUtils.h" +#include "ArServerUserInfo.h" +#include "ArClientSimpleConnector.h" +#include "ArServerHandlerMapping.h" +#include "ArServerSimpleOpener.h" +#include "ArServerInfoStrings.h" +#include "ArClientArgUtils.h" +#include "ArServerHandlerPopup.h" +#include "ArCentralManager.h" +#include "ArCentralForwarder.h" +#include "ArClientSwitchManager.h" +#include "ArServerModeIdle.h" +#include "ArTempDirectoryHelper.h" + +/** + \mainpage ArNetworking + + MobileRobots Advanced Robotics Networking Infrastructure (ArNetworking) + Developer's API Reference Manual
+ Copyright 2005 ActivMedia Robotics, LLC. All rights reserved.
+ Copyright 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. All rights reserved. + + + ArNetworking is an extensible networking protocol and infrastructure. It + is used to add networking services to a robot control program, integrated + with ARIA and other MobileRobots software libraries. + + ArNetworking is used to set up a client-server architecture. A client + issues requests to a server to issue a single command the server, + or to start retrieving data from the server at a specified time interval. + A request type is identified by a short string. + + A client may be an operator's graphical interface, or a component requiring + off-board resources (such as a multi-robot planning system, for example). + However, a program onboard the robot could also implement a client, and issue + requests to an offboard server (e.g. to retrieve data from a central database). + + In a typical application, however, a program acting as the server runs on the robot's + computer, and uses ARIA (and possibly ARNL or SONARNL) to control the robot. + This creates a three-tier system: the robot itself is the first tier, and acts as a + "robot server" to a program on its onboard computer which is simultaneously a + "robot client" and an "ArNetworking server". Offboard ArNetworking clients are the final + tier. This three-tier architecture allows a tight, reliable control loop between the robot + control program on the onboard computer, and removes higher level user-interface clients + accross the potentially unreliable network, protecting the more critical robot control program, + and providing a more immediate and flexible user interface. + + ArNetworking can use both TCP and UDP. + + \image html ArNetworking_overview.png Abstract overview of ArNetworking in a typical client-server configuration with one client issuing requests to a server + + \section Servers Servers + + An ArNetworking server program is comprised of an ArServerBase object, to which + callback functors are added for each request type you wish to handle (keyed + by a request identifier string, though this string is internally converted + into a more efficient integer value) using ArServerBase::addData(). + These callbacks are often encapsulated in "ServerHandler" or "ServerInfo" + classes. The ArNetworking library provides a variety of prewritten classes for + providing current state information about the robot, and for teleoperation + control. A callback functor for a request, when invoked, receives an ArNetPacket + object containing the request's payload data, and a pointer + to an object used to send a reply packet to the client. + ArServerBase creates a background thread to asyncronously accept client connections + and receive clients' requests, while your main program thread executes simultaneously. + This thread runs in a loop, and you may add general-purpose callback functors + to be invoked each cycle of this loop using ArServerBase::addCycleCallback(). + + To simplify server program setup, a helper class ArServerSimpleOpener is available. + + The default port number for an ArServerBase object to open is 7272, though + an alternate port number may be used via a command line argument to the program, + or specified in the ArServerBase constructor. + + \subsection ServerModes Server Modes + + ArNetworking also provides a system of server mode classes (see ArServerMode + base class). The server may only be in one mode at a time, each of which + enables and disables ARIA ArAction objects. + + \subsection SimpleServerCommands Simple Server Commands + + ArNetworking includes the ArServerHandlerCommands class that provides a very + simple API for simple "command" requests: requests, perhaps with a few + parameters, that simply perform some action or change some state, and have + no data to reply with. Callback functors added for requests via + an ArServerHandlerCommands object do not receive the request packet data, so they + do not need to do any decoding of that data. Additionally, ArServerHandlerCommands + keeps a list of requests that it manages, which is available to clients. + ArNetworking includes some prewritten classes (ArServerSimpleCom*) which + simply add new commands to an ArServerHandlerCommands object and encapsulate their + request callbacks. + + For example, MobileEyes queries this list on + connection, and if some of these simple + commands are available, it makes a menu in the toolbar called Custom Commands + accessible. This is a way to make special features of your custom robot server + application controllable from MobileEyes. + + \subsection ARNLServerClasses Networking in ARNL and SONARNL + + The ARNL and SONARNL libraries contain some ServerHandler/ServerInfo classes + that implement useful server requests, as well as server Mode classes. + + \subsection PreMadeServices Standard Services Available in ArNetworking + + These are some of the pre-written services which are available in the ArNetworking + library for you to use in your server programs. To use these services, your + server program typically only needs to create and retain an instance of the class, + though some require some additional setup. + +
    +
  • ArServerInfoRobot - Supplies clients with basic robot state information (current position and velocity, active server mode and status, battery voltage)
  • +
  • ArServerInfoSensor - Supplies clients with current sensor readings (Sonar or Laser)
  • +
  • ArServerHandlerMap - Supplies clients with data from an ArMap
  • +
  • ArServerInfoDrawings - Supplies clients with a set of graphical figures to be displayed with the map (e.g. point sets, lines, circles)
  • +
  • ArServerHandlerCamera - Allows clients to control a pan-tilt camera and provides information about its current position
  • +
  • ArServerInfoStrings - A set of general purpose key,value string pairs obtained from a global table (See Aria::getInfoGroup())
  • +
  • ArServerHandlerMapping - Allows clients to trigger collection of laser scan data for use in making a map later (with the Mapper3 application)
  • +
  • ArServerFileToClient, ArServerFileFromClient, ArServerFileLister - Allows clients to upload and download files from the server filesystem
  • +
+ + + \section Clients Clients + + A client program is comprised of an ArClientBase object which must be connected + to a server via a network socket (either TCP or the default, UDP). The server is + identified by network hostname and port number, which may be given + through ArClientBase API or in the program command line arguments. Requests + are made to the server via ArClientBase::request() or ArClientBase::requestOnce(). + Callback functors may be added to the ArClientBase object to receive reply packets. + ArClientBase creates a background thread to asyncronously communicate with the server. + + A client may query a server to discover if a data request type is available using + ArClientBase::dataExists(). + + To simplify client program setup and connection to a server, a helper class + ArClientSimpleConnector is available. + + + \section Auth Authenticated Connections + + A simple scheme for authenticated connections is available in ArNetworking. + When connecting to a server, a client may supply a username and password. + If the server has loaded a user info file, it may reject a connection + with an incorrect password. Data requests may be categorized into + command groups, and which command groups are allowed to which users may + be specified in the user info file. + + The login process is not impossible to defeat with some concerted effort and expertise, + but is sufficient to prevent basic attempts at unauthorized use of a server, and + to present only relevant features for different users' purposes. + + See ArServerBase for more discussion. + +**/ + +#endif // ARNETWORKING diff --git a/Legacy/Aria/ArNetworking/include/ArServerBase.h b/Legacy/Aria/ArNetworking/include/ArServerBase.h new file mode 100644 index 0000000..cfe9a22 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerBase.h @@ -0,0 +1,513 @@ +#ifndef NLSERVERBASE_H +#define NLSERVERBASE_H + +#include "Aria.h" +#include "ArServerCommands.h" +#include "ArServerClient.h" +#include "ArServerData.h" +#include "ArNetPacket.h" +#include "ArNetPacketReceiverUdp.h" +#include "ArServerUserInfo.h" + +/** + Base server for all networking services. + + This class is the "base" server for network services. Start + this server by calling open(), and then running the loop with run() or runAsync(), + (or loopOnce() if it is absolutely neccesary to use your own loop; see the + implementation of run()). + You can then pass this object to the various "ArServerInfo", "ArServerHandler", and ArServerMode classes. + + Data request callbacks are added to an ArServerBase object by calling + addData(). + + This class takes care of locking in its own function calls so you + don't need to worry about locking and unlocking the class before + you do things. + + The counterpart of this class for clients is ArClientBase. + + You can require user names and passwords for making connections to + the server, so each user has a set of permissions for different + command groups. To do this, load configuration from a userInfo file + with loadUserInfo(). You can log the + user info (and what commands users have) with logUserInfo(). You can + log the command groups with logCommandGroups() or + logCommandGroupsToFile(). For a description of the file see + ArServerUserInfo. There is also an example in + ArNetworking/examples/serverDemo.userInfo. + + In addition to the user and password requirement you can set a server "key" + (a special string of text) required (in addition to user and password) + to access the server with setServerKey(), though this is ONLY used if + user and password information is requied (so that older clients can + connect if there's no user and password information required). + + The way that the passwords are transmitted across the network is this: + Upon connection the server sends a randomly generated (for that + connection) string of text to the client which we'll call the + passwordKey. The client then combines the serverKey (a string which must be + known to connect to the server at all), the password, and the + passwordKey (that string that is generated uniquely for each + connection) and comes up with an md5 of that string and sends that + md5 value across the line. The server then compares the md5 from + the client with the md5 generated with the correct information on + the server... if they match the password is good, otherwise it + rejects the connection. This is NOT perfect security but should be + much better then plaintext. If you care about perfect security + then use an ssh tunnel with something like PUTTY from the machine + the client is on to the machine the server is on with an openssh + server set up (this'll likely even work in windows with cygwin) and + set up a firewall on the machine the server is on that disallows + port the server port connection from outside and only allows ssh + from outside (and get a book or three and read those). + + This class now handles identifiers for the ArServerClients... all + server bases will let a client set a self identifier string, and a + here goal... those may be used by any server. Messages can be sent + to just server clients that match that message (so that its easier + to send messages to people who sent commands). + + Master servers (the main connection server base on the central + server) can also give each connection an id number (with + identGetConnectionID). Things that then connect to the other + server bases on a master server (slave servers) should then set + their ConnectionID (with identSetConnectionID) so that things can + relate the different connections together. + + @sa ArServerSimpleOpener + @sa ArClientBase + @sa ArServerMode +**/ + +class ArServerBase: public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArServerBase( + bool addAriaExitCB = true, + const char *serverName = "", + bool addBackupTimeoutToConfig = true, + const char *backupTimeoutName = "RobotToClientTimeoutInMins", + const char *backupTimeoutDesc = "The amount of time the central server can go without sending a packet to the robot successfully (when there are packets to send). A number less than 0 means this won't happen. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", + bool masterServer = false, bool slaveServer = false, + bool logPasswordFailureVerbosely = false, + bool allowSlowPackets = true, bool allowIdlePackets = true, + int maxClientsAllowed = -1); + + /// Destructor + AREXPORT virtual ~ArServerBase(); + + /// Opens the server to accept new client connections + AREXPORT bool open(unsigned int port, const char *openOnIP = NULL, + bool tcpOnly = false); + /// Closes the server + AREXPORT void close(void); + /// Runs the server loop once + AREXPORT void loopOnce(void); + + /// Adds a callback to be called when requests for some data are recieved. + AREXPORT bool addData(const char *name, const char *description, + ArFunctor2 *functor, + const char *argumentDescription, + const char *returnDescription, + const char *commandGroup = NULL, + const char *dataFlags = NULL); + + /// Loads up a set of usernames/passwords/permissions from a file + AREXPORT bool loadUserInfo(const char *fileName, + const char *baseDirectory = ""); + + /// Logs the users and their groups + AREXPORT void logUserInfo(void); + + /// Logs the groups and commands in those groups + AREXPORT void logCommandGroups(void); + + /// Logs the groups and commands in those groups to a file + AREXPORT void logCommandGroupsToFile(const char *fileName); + + /// Logs the command group names and command group descriptions for those names + AREXPORT void setGroupDescription(const char *GrpName, const char *GrpDesc); + + /// Logs the command group names and descriptions + AREXPORT void logGroupDescriptions(void); + + /// Logs the command group names and descriptions to a file + AREXPORT void logGroupDescriptionsToFile(const char *fileName); + + /// Sets a 'key' needed to access the server through any account + AREXPORT void setServerKey(const char *serverKey); + + + /// Tells the server to reject connectings because we're usinga central server + AREXPORT void rejectSinceUsingCentralServer( + const char *centralServerIPString); + + /// Enforces that the server is using this protocol version + AREXPORT void enforceProtocolVersion(const char *protocolVersion); + + /// Enforces that the robots that connect are this type + AREXPORT void enforceType(ArServerCommands::Type type); + + /// Sets the backup timeout + AREXPORT void setBackupTimeout(double timeoutInMins); + + /// Runs the server in this thread + AREXPORT virtual void run(void); + + /// Runs the server in its own thread + AREXPORT virtual void runAsync(void); + + /// Logs the connections + AREXPORT void logConnections(const char *prefix = ""); + + /// Gets the number of clients connected + AREXPORT int getNumClients(void); + + /// Gets the number of a command + AREXPORT unsigned int findCommandFromName(const char *command); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketTcp(ArNetPacket *packet, const char *name); + + /// Broadcasts packets to any client wanting this data that matches the ID + AREXPORT bool broadcastPacketTcpToMatching( + ArNetPacket *packet, const char *name, + ArServerClientIdentifier identifier, bool matchConnectionID = false); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketTcpWithExclusion( + ArNetPacket *packet, const char *name, + ArServerClient *excludeClient, bool match = false, + ArServerClientIdentifier identifier = ArServerClientIdentifier(), + bool matchConnectionID = false); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketUdp(ArNetPacket *packet, const char *name); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketUdpWithExclusion( + ArNetPacket *packet, const char *name, ArServerClient *excludeClient, + bool match = false, + ArServerClientIdentifier identifier = ArServerClientIdentifier(), + bool matchConnectionID = false); + + /// Broadcasts packets to any client wanting this data that matches + AREXPORT bool broadcastPacketUdpToMatching( + ArNetPacket *packet, const char *name, + ArServerClientIdentifier identifier, bool matchConnectionID); + + /// Delays the current thread by the specified msecs, for use after packet sent. + AREXPORT void sleepAfterSend(int msecDelay); + + /// Sees if we have any idle processing pending (idle packets or callbacks) + AREXPORT bool idleProcessingPending(void); + + /// Processes udp packets + AREXPORT void processPacket(ArNetPacket *packet, + struct sockaddr_in *sin); + + /// Sends Udp packets + AREXPORT bool sendUdp(ArNetPacket *packet, + struct sockaddr_in *sin); + + /// Logs the tracking on each client (how many packets and bytes were sent) + AREXPORT void logTracking(bool terse = true); + + /// Clears the tracking on all the clients (resets counters) + AREXPORT void resetTracking(void); + + // the function for the thread + AREXPORT virtual void * runThread(void *arg); + + /// Gets the tcp port we're using + AREXPORT unsigned int getTcpPort(void); + /// Gets the udp port we're using + AREXPORT unsigned int getUdpPort(void); + /// Gets the IP we're opening on (or NULL if there's none) + AREXPORT const char *getOpenOnIP(void); + + /// Add a callback to be called at every cycle + AREXPORT void addCycleCallback(ArFunctor* functor); + + /// Remove a callback to be called at every cycle + AREXPORT void remCycleCallback(ArFunctor* functor); + + /// Add a callback to be invoked when a client has been removed (but before it is deleted) + AREXPORT void addClientRemovedCallback(ArFunctor1 *functor); + /// Remove the callback invoked when a client has been removed + AREXPORT void remClientRemovedCallback(ArFunctor1 *functor); + /// Makes a new serverclient from this socket (for switching, needs no password since this was an outgoing connection to a trusted server) + AREXPORT ArServerClient *makeNewServerClientFromSocket( + ArSocket *socket, bool overrideGeneralReject); + /// Gets the user info we're using (mostly internal for switching) + AREXPORT const ArServerUserInfo *getUserInfo(void) const; + /// Sets the user info we'll use (mostly internal for switching) + AREXPORT void setUserInfo(const ArServerUserInfo *userInfo); + /// Adds a callback for requests in a more advanced manner, for internal use + AREXPORT bool addDataAdvanced( + const char *name, const char *description, + ArFunctor2 *functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup = NULL, const char *dataFlags = NULL, + unsigned int commandNumber = 0, + ArFunctor2 *requestChangedFunctor = NULL, + ArRetFunctor2 + *requestOnceFunctor = NULL); + /// Sets the data flags to add in addition to those passed in + AREXPORT void setAdditionalDataFlags(const char *additionalDataFlags); + /// Gets the frequncy a command is requested (mostly internal) + AREXPORT long getFrequency(unsigned int command, + bool internalCall = false); + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketTcpByCommand( + ArNetPacket *packet, unsigned int command); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketTcpByCommandWithExclusion( + ArNetPacket *packet, unsigned int command, + ArServerClient *excludeClient, bool match = false, + ArServerClientIdentifier identifier = ArServerClientIdentifier(), + bool matchConnectionID = false); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketUdpByCommand( + ArNetPacket *packet, unsigned int command); + + /// Broadcasts packets to any client wanting this data + AREXPORT bool broadcastPacketUdpByCommandWithExclusion( + ArNetPacket *packet, unsigned int command, + ArServerClient *excludeClient, bool match = false, + ArServerClientIdentifier identifier = ArServerClientIdentifier(), + bool matchConnectionID = false); + + /// Closes connection with a given connection ID + AREXPORT void closeConnectionID(ArTypes::UByte4 idNum); + /// Returns if a command has a data flag + AREXPORT bool dataHasFlag(const char *name, const char *dataFlag); + /// Returns if a command has a data flag by command number + AREXPORT bool dataHasFlagByCommand(unsigned int command, + const char *dataFlag); + /// Sets debug logging + AREXPORT void setDebugLogging(bool debugLogging = false); + /// Gets if this is using debug logging + AREXPORT bool getDebugLogging(void); + /// Gets the most clients we've had connected + AREXPORT int getMostClients(void); + + /// Gets if we're allowing idle packets + AREXPORT bool allowingIdlePackets(void); + + /// Adds an idle callback to be called once next time the robot is idle + AREXPORT bool addIdleSingleShotCallback(ArFunctor *functor); + + /// Internal, Sees if we have any slow packets we are waiting to process + AREXPORT bool hasSlowPackets(void); + + /// Internal, Sees if we have any idle packets we are waiting to process + AREXPORT bool hasIdlePackets(void); + + /// Internal, Sees if we have any idle callbacks we are waiting to process + AREXPORT bool hasIdleCallbacks(void); + + /// Internal, sets the maximum number of clients + AREXPORT void internalSetNumClients(int numClients); + + /// Adds a callback when we switch states while starting + AREXPORT void addTooManyClientsCB( + ArFunctor1 *functor, int position = 50) + { myTooManyClientsCBList.addCallback(functor, position); } + /// Removes a callback when we switch to running + AREXPORT void remTooManyClientsCB(ArFunctor1 *functor) + { myTooManyClientsCBList.remCallback(functor); } + + /// Internal call that sets the default frequency as a helper for forwarding (if it's faster than the current default) + AREXPORT bool internalSetDefaultFrequency(const char *command, int frequency); + + /// Internal call to lockup the server (for testing) + AREXPORT void internalLockup(void); +protected: + + /// The command get the ConnectionID of this server client connection + AREXPORT void identGetConnectionID(ArServerClient *client, + ArNetPacket *packet); + /// The command set the ConnectionID of this server client connection + AREXPORT void identSetConnectionID(ArServerClient *client, + ArNetPacket *packet); + /// The command set the self identifier of this server client connection + AREXPORT void identSetSelfIdentifier(ArServerClient *client, + ArNetPacket *packet); + /// The command set the here goal of this server client connection + AREXPORT void identSetHereGoal(ArServerClient *client, ArNetPacket *packet); + + + /// Handles the "startRequestTransaction" packet, and updates the state of the client. + /** + * "Request transactions" are used to indicate that a sequence of request / + * reply packets must be completed before idle processing can proceed. + * Any "startRequestTransaction" MUST be followed by an "endRequestTransaction". + * + * The packets are meant to be used sparingly. They are currently only used + * when the Central Server is determining whether the map file needs to + * be downloaded to the client robot. + * + * @param client the ArServerClient* that sent the request; updated to indicate + * a new transaction is in progress + * @param packet the ArNetPacket* that contains the request (no additional data) + **/ + AREXPORT void handleStartRequestTransaction(ArServerClient *client, + ArNetPacket *packet); + + /// Handles the "endRequestTransaction" packet, and updates the state of the client. + /** + * @param client the ArServerClient* that sent the request; updated to indicate + * that a transaction has completed + * @param packet the ArNetPacket* that contains the request (no additional data) + * @see handleStartRequestTransaction + **/ + AREXPORT void handleEndRequestTransaction(ArServerClient *client, + ArNetPacket *packet); + + /// Returns the number of request transactions in progress for all connected clients. + /** + * @see handleStartRequestTransaction + **/ + AREXPORT int getRequestTransactionCount(); + + + /// accepts new sockets and moves them into the client list + void acceptTcpSockets(void); + /// Internal function for server/client switching + AREXPORT ArServerClient *finishAcceptingSocket( + ArSocket *socket, bool skipPassword = false, + bool overrideGeneralReject = false); + bool processFile(void); + + /// callback for our slow idle thread, which is down below... + /// The command that returns if there is idle processing to do + AREXPORT void netIdleProcessingPending(ArServerClient *client, + ArNetPacket *packet); + + void slowIdleCallback(void); + + + + std::string myServerName; + std::string myLogPrefix; + ArMutex myDataMutex; + ArMutex myClientsMutex; + ArMutex myCycleCallbacksMutex; + bool myTcpOnly; + bool myDebugLogging; + ArLog::LogLevel myVerboseLogLevel; + + unsigned int myTcpPort; + unsigned int myUdpPort; + std::string myOpenOnIP; + // our mapping of the ints to the serverData + std::map myDataMap; + /// our mapping of the group names + std::map myGroupDescription; + + // default frequency (helper for forwarding) + std::map myDefaultFrequency; + + int myRejecting; + std::string myRejectingString; + + std::string myEnforceProtocolVersion; + ArServerCommands::Type myEnforceType; + + double myBackupTimeout; + bool myNewBackupTimeout; + ArMutex myBackupTimeoutMutex; + + ArCallbackList1 myTooManyClientsCBList; + + // the number we're on for the current data + unsigned int myNextDataNumber; + std::string myAdditionalDataFlags; + bool myOpened; + std::list myClients; + ArNetPacketReceiverUdp myUdpReceiver; + ArFunctor2C myProcessPacketCB; + ArRetFunctor2C mySendUdpCB; + ArSocket myTcpSocket; + ArSocket myUdpSocket; + std::list myCycleCallbacks; + std::list *> myClientRemovedCallbacks; + + ArTypes::UByte4 myConnectionNumber; + + ArSocket myAcceptingSocket; + + int myMostClients; + bool myUsingOwnNumClients; + int myNumClients; + + + unsigned int myLoopMSecs; + + ArMutex myAddListMutex; + std::list myAddList; + ArMutex myRemoveSetMutex; + std::set myRemoveSet; + + const ArServerUserInfo *myUserInfo; + bool myLogPasswordFailureVerbosely; + std::string myServerKey; + ArFunctorC myAriaExitCB; + ArRetFunctor2C myGetFrequencyCB; + ArRetFunctorC myProcessFileCB; + + ArFunctor2C myIdentGetConnectionIDCB; + ArFunctor2C myIdentSetConnectionIDCB; + ArFunctor2C myIdentSetSelfIdentifierCB; + ArFunctor2C myIdentSetHereGoalCB; + + ArFunctor2C myStartRequestTransactionCB; + ArFunctor2C myEndRequestTransactionCB; + + ArFunctor2C myIdleProcessingPendingCB; + + bool myAllowSlowPackets; + bool myAllowIdlePackets; + + int myMaxClientsAllowed; + + ArMutex myProcessingSlowIdleMutex; + + + class SlowIdleThread : public ArASyncTask + { + public: + /// Constructor + SlowIdleThread(ArServerBase *serverBase); + /// Destructor + virtual ~SlowIdleThread(void); + virtual void *runThread(void *arg); + protected: + ArServerBase *myServerBase; + }; + friend class ArServerBase::SlowIdleThread; + + SlowIdleThread *mySlowIdleThread; + bool myHaveSlowPackets; + bool myHaveIdlePackets; + + bool myLastIdleProcessingPending; + + ArMutex myIdleCallbacksMutex; + bool myHaveIdleCallbacks; + std::list myIdleCallbacks; +}; + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerClient.h b/Legacy/Aria/ArNetworking/include/ArServerClient.h new file mode 100644 index 0000000..64e997d --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerClient.h @@ -0,0 +1,284 @@ +#ifndef NLSERVERCLIENT_H +#define NLSERVERCLIENT_H + +#include "ArNetPacket.h" +#include "ArServerCommands.h" +#include "ArNetPacketReceiverTcp.h" +#include "ArNetPacketSenderTcp.h" + +class ArServerData; +class ArServerUserInfo; + +#include "ArServerClientData.h" +#include "ArServerClientIdentifier.h" + +/** + This class represents the server's connection to the client, and + contains the socket that the server uses to talk to the client and + the information for sending packets to the client. +**/ + +class ArServerClient +{ +public: + /// The state of the connection + enum ServerState { + STATE_SENT_INTRO, ///< opened socket, sent our intro to the server + STATE_REJECTED, ///< Client was rejected by server + STATE_CONNECTED, ///< Client is connected to server + STATE_DISCONNECTED ///< Client has disconnected from server + }; + + + /// Constructor + AREXPORT ArServerClient( + ArSocket *tcpSocket, unsigned int udpPort, long authKey, + long introKey, ArRetFunctor2 *sendUdpCallback, + std::map *dataMap, + const char *passwordKey, const char *serverKey, + const ArServerUserInfo *userInfo = NULL, + int rejecting = 0, const char *rejectingString = "", + bool debugLogging = false, + const char *serverClientName = "ArServerBase_unknown", + bool logPasswordFailureVerbosely = false, + bool allowSlowPackets = true, bool allowIdlePackets = true, + const char *enforceProtocolVersion = "", + ArServerCommands::Type enforceType = ArServerCommands::TYPE_UNSPECIFIED); + /// Destructor + AREXPORT virtual ~ArServerClient(); + + /// The callback for taking care of the TCP connection + AREXPORT bool tcpCallback(void); + + /// The callback for taking care of slow packets + AREXPORT bool slowPacketCallback(void); + + /// The callback for taking care of idle packets (logic on idle elsewhere) + AREXPORT bool idlePacketCallback(void); + + /// Sets the backup timeout + AREXPORT void setBackupTimeout(double timeoutInMins); + + /// Process the packet whever it came from + AREXPORT void processPacket(ArNetPacket *packet, bool tcp = true); + + /// Send a packet over TCP. + /// The command ID of the outgoing packet will be set to the current command ID + /// (from the incoming packet). + AREXPORT virtual bool sendPacketTcp(ArNetPacket *packet); + /// Send a packet over UDP (unless client only wants TCP; then sends over TCP). + /// The command ID of the outgoing packet will be set to the current command ID + /// (from the incoming packet). + AREXPORT virtual bool sendPacketUdp(ArNetPacket *packet); + + /// Sees if this client has access to a given group + AREXPORT bool hasGroupAccess(const char *group); + + /** Broadcasts a packet over TCP if this client wants this data -- For internal + * use only! + * @internal + */ + AREXPORT void broadcastPacketTcp(ArNetPacket *packet); + + /** Broadcasts a packet over UDP if this client wants this data (unless client only wants tcp then sends over tcp) -- For internal ArNetworking use only! + * @internal + */ + AREXPORT void broadcastPacketUdp(ArNetPacket *packet); + + /// Logs the tracking information (packet and byte counts) + AREXPORT void logTracking(bool terse); + + /// Clears the tracking information (resets counters) + AREXPORT void resetTracking(void); + + /// Gets the IP string of the client + AREXPORT const char *getIPString(void) const; + + /// Gets the identifier of this server client + AREXPORT ArServerClientIdentifier getIdentifier(void) const; + + /// Sets the identifier of this server client + AREXPORT void setIdentifier(ArServerClientIdentifier identifier); + + /// Sends a shutdown command to the socket + AREXPORT void shutdown(void); + + /// Sets the sin (network address) for the UDP socket + AREXPORT void setUdpAddress(struct sockaddr_in *sin); + + /// Gets the sin (network address) for the UDP socket + AREXPORT struct sockaddr_in *getUdpAddress(void); + + /// Gets the authKey used for setting up UDP from this client to the server + AREXPORT long getAuthKey(void); + + /// Processes the auth packets that came from udp + AREXPORT void processAuthPacket(ArNetPacket *packet, struct sockaddr_in *sin); + + /// Handles the requests for packets + AREXPORT void handleRequests(void); + + /// Internal function to get the tcp socket + AREXPORT ArSocket *getTcpSocket(void) { return &myTcpSocket; } + /// Forcibly disconnect a client (for client/server switching) + AREXPORT void forceDisconnect(bool quiet); + /// Gets how often a command is asked for + AREXPORT long getFrequency(ArTypes::UByte2 command); + /// Sets the TCP only flag + AREXPORT void useTcpOnly(void) { myTcpOnly = true; } + /// Gets the tcp only flag + AREXPORT bool isTcpOnly(void) { return myTcpOnly; } + /// Gets the state + AREXPORT ServerState getState(void) { return myState; } + /// Gets if we have any slow packets to process + AREXPORT bool hasSlowPackets(void) { return myHaveSlowPackets; } + /// Gets if we have any idle packets to process + AREXPORT bool hasIdlePackets(void) { return myHaveIdlePackets; } + + + /// Starts a new request transaction, incrementing the count. + /** + * This method is intended to be called solely by the ArServerBase. + * It MUST be followed by a call to endRequestTransaction(). + * + * Request transactions are used under certain circumstances to + * indicate that a number of related request/reply packets must + * be completely processed before background idle processing can + * proceed. See ArServerBase for more information. + **/ + AREXPORT void startRequestTransaction(); + + /// Ends the most recent request transaction, decrementing the count. + /** + * This method is intended to be called solely by the ArServerBase. + * @see startRequestTransaction(). + **/ + AREXPORT bool endRequestTransaction(); + + /// Returns the number of request transactions that are currently in progress. + /** + * This method is intended to be called solely by the ArServerBase. + * @see startRequestTransaction(). + **/ + AREXPORT int getRequestTransactionCount(); + + + /// Returns the command ID for the specified name, or 0 if it is not found + AREXPORT unsigned int findCommandFromName(const char *commandName) const; + + /// Get creation time + AREXPORT ArTime getCreationTime(void) { return myCreationTime; } +protected: + const char *findCommandName(unsigned int command) const; + // Some members so that we don't have to pass the number around + std::list myCommandStack; + std::list myForceTcpStack; + std::list mySlowIdleCommandStack; + std::list mySlowIdleForceTcpStack; + + AREXPORT bool setupPacket(ArNetPacket *packet); + // Pushes a new number onto our little stack of numbers + void pushCommand(unsigned int num); + // Pops the command off the stack + void popCommand(void); + // Pushes a new number onto our little stack of numbers + void pushSlowIdleCommand(unsigned int num); + // Pops the command off the stack + void popSlowIdleCommand(void); + // Gets the command we're on + unsigned int getCommand(); + // Gets the command we're on + bool getForceTcpFlag(); + // Pushes a new forceTcp flag onto our little stack of flags + void pushForceTcpFlag(bool forceTcp); + // Pops the command off the stack + void popForceTcpFlag(void); + // Pushes a new forceTcp flag onto our little stack of flags + void pushSlowIdleForceTcpFlag(bool forceTcp); + // Pops the command off the stack + void popSlowIdleForceTcpFlag(void); + + // this sends a list packet to our client + void sendListPacket(void); + + // this could just be dealth with by seeing if myUserInfo is NULL, + // but that may be confusing + const ArServerUserInfo *myUserInfo; + std::set myGroups; + ArNetPacketSenderTcp myTcpSender; + std::map *myDataMap; + std::list myRequested; + void internalSwitchState(ServerState state); + ServerState myState; + ArTime myStateStart; + bool myUdpConfirmedFrom; + bool myUdpConfirmedTo; + ArSocket myTcpSocket; + ArNetPacketReceiverTcp myTcpReceiver; + ArFunctor2C myProcessPacketCB; + ArRetFunctor2 *mySendUdpCB; + struct sockaddr_in mySin; + long myAuthKey; + long myIntroKey; + bool myTcpOnly; + bool mySentTcpOnly; + std::string myPasswordKey; + std::string myServerKey; + bool myDebugLogging; + ArLog::LogLevel myVerboseLogLevel; + std::string myLogPrefix; + ArServerClientIdentifier myIdentifier; + std::string myIPString; + + double myBackupTimeout; + + int myRejecting; + std::string myRejectingString; + + std::string myEnforceProtocolVersion; + ArServerCommands::Type myEnforceType; + + ArTime myTrackingStarted; + class Tracker + { + public: + Tracker() { reset(); } + virtual ~Tracker() {} + void reset(void) + { myPacketsTcp = 0; myBytesTcp = 0; myPacketsUdp = 0; myBytesUdp = 0; } + long myPacketsTcp; + long myBytesTcp; + long myPacketsUdp; + long myBytesUdp; + }; + AREXPORT void trackPacketSent(ArNetPacket *packet, bool tcp); + AREXPORT void trackPacketReceived(ArNetPacket *packet, ArTypes::UByte2); + std::map myTrackingSentMap; + std::map myTrackingReceivedMap; + bool myLogPasswordFailureVerbosely; + + bool myAllowSlowPackets; + bool myAllowIdlePackets; + + ArThread *mySlowIdleThread; + + bool myHaveSlowPackets; + bool myHaveIdlePackets; + + ArMutex mySlowPacketsMutex; + std::list mySlowPackets; + ArMutex myIdlePacketsMutex; + std::list myIdlePackets; + + /// Number of "request transactions" that are currently in progress for this client. + int myRequestTransactionCount; + /// Mutex for multi-threaded access to the request transaction count. + ArMutex myRequestTransactionMutex; + + ArTime myCreationTime; +}; + + + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerClientData.h b/Legacy/Aria/ArNetworking/include/ArServerClientData.h new file mode 100644 index 0000000..d8898a5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerClientData.h @@ -0,0 +1,40 @@ +#ifndef ARSERVERCLIENTDATA_H +#define ARSERVERCLIENTDATA_H + +#include "Aria.h" + +class ArServerClientData +{ +public: + ArServerClientData(ArServerData *serverData, long mSecInterval, + ArNetPacket *packet) + { + myServerData = serverData; + myMSecInterval = mSecInterval; + myPacket.duplicatePacket(packet); + myReadLength = myPacket.getReadLength(); + myLastSent.setToNow(); + } + virtual ~ArServerClientData() {} + ArServerData *getServerData(void) { return myServerData; } + long getMSec(void) { return myMSecInterval; } + ArNetPacket *getPacket(void) + { myPacket.setReadLength(myReadLength); return &myPacket; } + ArTime getLastSent (void) { return myLastSent; } + void setLastSentToNow(void) { myLastSent.setToNow(); } + void setMSec(long mSec) { myMSecInterval = mSec; } + void setPacket(ArNetPacket *packet) + { + myPacket.duplicatePacket(packet); + myReadLength = myPacket.getReadLength(); + } +protected: + ArServerData *myServerData; + long myMSecInterval; + ArNetPacket myPacket; + unsigned int myReadLength; + ArTime myLastSent; + +}; + +#endif // ARSERVERCLIENTDATA_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerClientIdentifier.h b/Legacy/Aria/ArNetworking/include/ArServerClientIdentifier.h new file mode 100644 index 0000000..dd451f0 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerClientIdentifier.h @@ -0,0 +1,133 @@ +#ifndef ARSERVERCLIENTIDENTIFIER_H +#define ARSERVERCLIENTIDENTIFIER_H + + +/// Class that holds an identifier for a particular serverClient +class ArServerClientIdentifier +{ +public: + /// Constructor + ArServerClientIdentifier() { myConnectionID = 0; rebuildIDString(); } + /// Destructor + virtual ~ArServerClientIdentifier() {} + /// Gets an ID string which is just the other information in this combined + const char *getIDString(void) { return myIDString.c_str(); } + /// set the id num + void setConnectionID(ArTypes::UByte4 idNum) { myConnectionID = idNum; rebuildIDString(); } + /// Gets the id num + ArTypes::UByte4 getConnectionID(void) { return myConnectionID; } + /// Sets the self identifier + void setSelfIdentifier(const char *selfIdentifier) + { + if (selfIdentifier != NULL) + mySelfIdentifier = selfIdentifier; + else + mySelfIdentifier = ""; + rebuildIDString(); + } + /// Gets the self identifier + const char *getSelfIdentifier(void) { return mySelfIdentifier.c_str(); } + /// Sets the here goal + void setHereGoal(const char *selfIdentifier) + { + if (selfIdentifier != NULL) + myHereGoal = selfIdentifier; + else + myHereGoal = ""; + rebuildIDString(); + } + /// Gets the here goal + const char *getHereGoal(void) { return myHereGoal.c_str(); } + /// Sees if an identifier matches + /** + It can either match id, or the other parameters (for the other + parameters if the self id matches its a match, otherwise it + checks the here goal, and if that matches its a match)... this + is so that if someone's set a self id but changes their here + goal they'll still get their messages + */ + bool matches(ArServerClientIdentifier identifier, + bool matchConnectionID) + { + // if the ID's don't match then they don't match, this doesn't + // make sure they've been set like the others because here if it + // isn't set it means its an old client, but if its set it means + // its a new client... and if its one old client, we want to + // send stuff to all the old clients (since we don't know which + // one did it) + if (matchConnectionID && getConnectionID() != identifier.getConnectionID()) + return false; + else if (matchConnectionID) + return true; + + // if they both have identifiers see if they match (if they do + // then we're good) + if (getSelfIdentifier() != NULL && getSelfIdentifier()[0] != '\0' && + identifier.getSelfIdentifier() != NULL && + identifier.getSelfIdentifier()[0] != '\0' && + strcasecmp(getSelfIdentifier(), identifier.getSelfIdentifier()) == 0) + return true; + + // if they both have here goals see if they match + if (getHereGoal() != NULL && getHereGoal()[0] != '\0' && + identifier.getHereGoal() != NULL && + identifier.getHereGoal()[0] != '\0' && + strcasecmp(getHereGoal(), identifier.getHereGoal()) != 0) + return false; + + return true; + } + void rebuildIDString(void) + { + char buf[1024]; + bool first = true; + buf[0] = '\0'; + sprintf(buf, "connectionID %u", myConnectionID); + if (myConnectionID != 0 || !mySelfIdentifier.empty() || + !myHereGoal.empty()) + { + if (myConnectionID != 0) + { + if (first) + myIDString = "("; + else + myIDString += " "; + first = false; + myIDString += buf; + } + if (!mySelfIdentifier.empty()) + { + if (first) + myIDString = "("; + else + myIDString += " "; + first = false; + myIDString += "selfID "; + myIDString += mySelfIdentifier; + } + if (!myHereGoal.empty()) + { + if (first) + myIDString = "("; + else + myIDString += " "; + first = false; + myIDString += "hereGoal "; + myIDString += myHereGoal; + } + myIDString += ")"; + } + else + myIDString = ""; + } +protected: + // the identifiers + ArTypes::UByte4 myConnectionID; + std::string mySelfIdentifier; + std::string myHereGoal; + + // the string that describes them just for debugging + std::string myIDString; +}; + +#endif // ArServerClientIdentifier diff --git a/Legacy/Aria/ArNetworking/include/ArServerCommands.h b/Legacy/Aria/ArNetworking/include/ArServerCommands.h new file mode 100644 index 0000000..84f679d --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerCommands.h @@ -0,0 +1,49 @@ +#ifndef NLSERVERCOMMANDS_H +#define NLSERVERCOMMANDS_H + +/** + The commands from the server to the client +**/ + +class ArServerCommands +{ +public: + enum ServerCommands { + SHUTDOWN = 1, ///< Closes the connection + INTRODUCTION = 2, ///< Introduces the server to the client + UDP_INTRODUCTION = 3, ///< Udp introduction of the server to the client + UDP_CONFIRMATION = 4, ///< Confirmation Udp was received from client + CONNECTED = 5, ///< Server accepts clients connection + REJECTED = 6, ///< Server rejects clients connection, has a byte2, then a string.... these reasons (1 = bad username password, string then is empty, 2 = rejecting connection because using central server, string then is central server IP, 3 = client rejecting server because server has wrong protocol, 4 = server rejected client because client has wrong protocol, 5 = maxClients exceeded, 6 = type of client is specified, but doesn't match) + TCP_ONLY = 7, ///< Server tells client to only send TCP + LIST = 129, ///< Map of the string names for a type to a number along with a long description of the data type + LISTSINGLE = 130, ///< Map of a single type to a number (for late additions to server) along with its description + LISTARGRET = 131, ///< Map of the number to their arguments and returns descriptions + LISTARGRETSINGLE = 132, ///< Map of a single type to a number (for late additions to server) along with its argument and return descriptions + LISTGROUPANDFLAGS = 133, ///< Map of the number to their command groups and data flags + LISTGROUPANDFLAGSSINGLE = 134 ///< Map of a single type to a number (for late additions to server) along with its command group and data flags + }; + + enum Type + { + TYPE_UNSPECIFIED = 0, /// Unspecified (anything can connect) + TYPE_REAL = 1, ///< Only real robots permitted to connect + TYPE_SIMULATED = 2, ///< Only simulated robots permitted to connect + TYPE_NONE = 3 ///< Nothing is permitted to connect + }; + static const char *toString(Type type) + { + if (type == TYPE_UNSPECIFIED) + return "unspecified"; + else if (type == TYPE_REAL) + return "real"; + else if (type == TYPE_SIMULATED) + return "simulated"; + else if (type == TYPE_NONE) + return "none"; + else + return "unknown"; + } +}; + +#endif // NLSERVERCOMMANDS_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerData.h b/Legacy/Aria/ArNetworking/include/ArServerData.h new file mode 100644 index 0000000..0972b02 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerData.h @@ -0,0 +1,70 @@ +#ifndef ARSERVERDATA_H +#define ARSERVERDATA_H + +/// class to hold information about the different data the server has +/** + This class is mostly just for holding all the information about one + of the server data entires in one convenient spot +**/ + +#include "Aria.h" + +class ArServerClient; +class ArNetPacket; + + +class ArServerData +{ +public: + /// Constructor + AREXPORT ArServerData( + const char *name, const char *description, unsigned int command, + ArFunctor2 *functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup = NULL, const char *dataFlags = NULL, + ArRetFunctor1 *getFrequencyFunctor = NULL, + ArFunctor2 *requestChangedFunctor = NULL, + ArRetFunctor2 + *requestOnceFunctor = NULL); + /// Destructor + AREXPORT virtual ~ArServerData(); + const char *getName(void) { return myName.c_str(); } + const char *getDescription(void) { return myDescription.c_str(); } + unsigned int getCommand(void) { return myCommand; } + ArFunctor2 *getFunctor(void) + { return myFunctor; }; + const char *getArgumentDescription(void) + { return myArgumentDescription.c_str(); } + const char *getReturnDescription(void) + { return myReturnDescription.c_str(); } + const char *getCommandGroup(void) + { return myCommandGroup.c_str(); } + ArRetFunctor2 *getRequestOnceFunctor(void) + { return myRequestOnceFunctor; } + AREXPORT bool hasDataFlag(const char *dataFlag); + AREXPORT bool addDataFlags(const char *dataFlags); + AREXPORT bool remDataFlag(const char *dataFlag); + bool isSlowPacket(void) { return mySlowPacket; } + bool isIdlePacket(void) { return myIdlePacket; } + const char *getDataFlagsString(void) + { return myDataFlagsBuilder.getFullString(); } + AREXPORT void callRequestChangedFunctor(void); +protected: + std::string myName; + std::string myDescription; + std::string myArgumentDescription; + std::string myReturnDescription; + std::string myCommandGroup; + std::string myRawDataFlags; + ArMutex myDataMutex; + ArArgumentBuilder myDataFlagsBuilder; + unsigned int myCommand; + ArFunctor2 *myFunctor; + ArRetFunctor1 *myGetFrequencyFunctor; + ArFunctor2 *myRequestChangedFunctor; + ArRetFunctor2 *myRequestOnceFunctor; + bool mySlowPacket; + bool myIdlePacket; +}; + +#endif // ARSERVERDATA_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerFileUtils.h b/Legacy/Aria/ArNetworking/include/ArServerFileUtils.h new file mode 100644 index 0000000..1d6b389 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerFileUtils.h @@ -0,0 +1,244 @@ +#ifndef ARSERVERFILEUTILS_H +#define ARSERVERFILEUTILS_H + +#include "Aria.h" +#include "ArServerBase.h" + + +/// Provides a list of files to clients +/** + * @note Linux only + * + This class is set up so that a client can get file information from + the robot, this class ONLY lists files, and doesn't do any + manipulation of them. You should use this class by using + ArClientFileLister and NOT by using this classes interface + directly, this is because the API is and will remain fairly + volatile, just use ArClientFileLister, if you need more + functionality let us know and we'll add it if its reasonable. +**/ +class ArServerFileLister +{ +public: + /// Constructor + AREXPORT ArServerFileLister(ArServerBase *server, const char *topDir, + const char *defaultUploadDownloadDir = NULL); + /// Destructor + AREXPORT virtual ~ArServerFileLister(); + /// The function that gets the directory listing + AREXPORT void getDirListing(ArServerClient *client, + ArNetPacket *packet); + /// The function that gets the directory listing in a better way + AREXPORT void getDirListingMultiplePackets(ArServerClient *client, + ArNetPacket *packet); + /// The function that gets the default upload/download dir + AREXPORT void getDefaultUploadDownloadDir( + ArServerClient *client, ArNetPacket *packet); +protected: + char myBaseDir[2048]; + std::string myDefaultUploadDownloadDir; + ArServerBase *myServer; + ArFunctor2C myGetDirListingCB; + ArFunctor2C myGetDirListingMultiplePacketsCB; + ArFunctor2C myGetDefaultUploadDownloadDirCB; +}; + +// ---------------------------------------------------------------------------- +// ArServerFileToClient +// ---------------------------------------------------------------------------- + +/// Gets files from the server +/** + * @note Linux only + * + This class is set up so that a client can get files the robot, this + class ONLY gets files. You should use this class by using + ArClientFileToClient and NOT by using this classes interface + directly, this is because the API is and will remain fairly + volatile... if you need more functionality let us know and we'll + add it if its reasonable. +**/ +class ArServerFileToClient +{ +public: + /// Constructor + AREXPORT ArServerFileToClient(ArServerBase *server, const char *topDir); + /// Destructor + AREXPORT virtual ~ArServerFileToClient(); + /// Gets the file + AREXPORT void getFile(ArServerClient *client, + ArNetPacket *packet); + + /// Gets the file, and sets its timestamp to the original server value + AREXPORT void getFileWithTimestamp(ArServerClient *client, + ArNetPacket *packet); + + +protected: + + AREXPORT void doGetFile(ArServerClient *client, + ArNetPacket *packet, + bool isSetTimestamp); + +protected: + + char myBaseDir[2048]; + ArServerBase *myServer; + ArFunctor2C myGetFileCB; + + ArFunctor2C myGetFileWithTimestampCB; +}; + +// ---------------------------------------------------------------------------- +// ArServerFileToClient +// ---------------------------------------------------------------------------- + +/// Puts files onto the server +/** + * @note Linux only + * + This class is set up so that a client can put files on the robot, + this class ONLY puts files. This class will take a file from a + client, writing it into the tempDir given in the constructor, then + after receiving the file it'll move it over to the actual location + requested. You should use this class by using ArClientFileToClient + and NOT by using this classes interface directly, this is because + the API is and will remain fairly volatile... if you need more + functionality let us know and we'll add it if its reasonable. +**/ +class ArServerFileFromClient +{ +public: + /// Constructor + AREXPORT ArServerFileFromClient(ArServerBase *server, const char *topDir, + const char *tempDir); + /// Destructor + AREXPORT virtual ~ArServerFileFromClient(); + /// Puts the file + AREXPORT void putFile(ArServerClient *client, + ArNetPacket *packet); + /// Puts the file with interleaved responses + AREXPORT void putFileInterleaved(ArServerClient *client, + ArNetPacket *packet); + /// Puts the file + AREXPORT void putFileWithTimestamp(ArServerClient *client, + ArNetPacket *packet); + /// Puts the file with interleaved responses + AREXPORT void putFileWithTimestampInterleaved(ArServerClient *client, + ArNetPacket *packet); + + /// Adds a callback to be called before moving from temp dir to final loc + AREXPORT void addPreMoveCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called before moving from temp dir to final loc + AREXPORT void remPreMoveCallback(ArFunctor *functor); + /// Adds a callback to be called after moving from temp dir to final loc + AREXPORT void addPostMoveCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called after moving from temp dir to final loc + AREXPORT void remPostMoveCallback(ArFunctor *functor); + /// Internal call for getting the name of the file we're moving + const char *getMovingFileName(void) { return myMovingFileName.c_str(); } +protected: + + AREXPORT void internalPutFile(ArServerClient *client, + ArNetPacket *packet, + bool interleaved, + bool isSetTimestamp); + + char myBaseDir[2048]; + char myTempDir[2048]; + ArServerBase *myServer; + std::list myPreMoveCallbacks; + std::list myPostMoveCallbacks; + + ArFunctor2C myPutFileCB; + ArFunctor2C myPutFileInterleavedCB; + ArFunctor2C myPutFileWithTimestampCB; + ArFunctor2C myPutFileWithTimestampInterleavedCB; + + std::string myMovingFileName; + + int myFileNumber; + + class FileInfo + { + public: + FileInfo() { myFile = NULL; } + virtual ~FileInfo() {} + std::string myRealFileName; + std::string myTempFileName; + FILE *myFile; + ArTime myStartedTransfer; + ArTime myLastActivity; + time_t myFileTimestamp; + // pointer to the client that is sending the file, we can compare + // this against other client pointers but WE CANNOT ACCESS THE OLD + // ONE since its possible that it disconnected and is an invalid + // pointer + ArServerClient *myClient; + ArTime myClientCreationTime; + }; + + // map of raw filenames to FileInfo (so we don't have to walk it all the time) + std::map myMap; +}; + + +/// Deletes files from the server +/** + * @note Linux only + * + This class is set up so that a client can get delete files on the + robot, this class ONLY deletes files. You should use this class by + using ArClientDeleteFileOnServer and NOT by using this classes + interface directly, this is because the API is and will remain + fairly volatile... if you need more functionality let us know and + we'll add it if its reasonable. +**/ +class ArServerDeleteFileOnServer +{ +public: + /// Constructor + AREXPORT ArServerDeleteFileOnServer(ArServerBase *server, + const char *topDir); + /// Destructor + AREXPORT virtual ~ArServerDeleteFileOnServer(); + /// Deletes the file + AREXPORT void deleteFile(ArServerClient *client, + ArNetPacket *packet); + /// Adds a callback to be called before moving from temp dir to final loc + AREXPORT void addPreDeleteCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called before moving from temp dir to final loc + AREXPORT void remPreDeleteCallback(ArFunctor *functor); + /// Adds a callback to be called after moving from temp dir to final loc + AREXPORT void addPostDeleteCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called after moving from temp dir to final loc + AREXPORT void remPostDeleteCallback(ArFunctor *functor); + /// Gets the filename of the file we're deleting + const char *getDeletingFileName(void) { return myDeletingFileName.c_str(); } +protected: + char myBaseDir[2048]; + ArServerBase *myServer; + ArFunctor2C myDeleteFileCB; + std::string myDeletingFileName; + std::list myPreDeleteCallbacks; + std::list myPostDeleteCallbacks; + +}; + +#endif // ARSERVERFILEUTILS_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerCamera.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerCamera.h new file mode 100644 index 0000000..7c813e6 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerCamera.h @@ -0,0 +1,418 @@ +#ifndef ARSERVERHANDLERCAMERA_H +#define ARSERVERHANDLERCAMERA_H + +#include "Aria.h" + +#include "ArNetworking.h" + +/** Accepts and processes camera pan/tilt/zoom requests from the client, and + provides information about the camera (such as its current position). + + The following requests are accepted. Arguments and return values are stored + in the packet as signed 16-bit values. (They are converted to double-precision + floating point values when received by dividing by 100; to store floating + point values, multiply by 100 first: + packet.byte2ToBuf((ArTypes::Byte2)(100.0 * doubleVal)); or + see also getDoubleFromPacket() and addDoubleToPacket().) + + Each request name is suffixed by the name of the camera to control. If more than one + camera is used, each can have a different name (given in the constructor), and commands for the different cameras + are differentiated by appending the camera name to the command requests listed below. For example, + an ArServerHandlerCamera with camera name of "A" would receive "setCameraRelA". while the + handler with camera name of "B" would receive "setCameraAbsB". If no camera name is given + (typical if just one ArServerHandlerCamera object is created), + just the base requests are used. To provide information to the client about the multiple cameras and their names, use ArCameraCollection and an ArServerHandlerCameraCollection object. + + + + + + + + + + + In addition, some older camera requests are accepted for partial backwards + compatability with old clients: cameraUpdate, cameraInfo, cameraAbs, camera, + and cameraPct. These requests take values as single bytes, rather than multiplied + floats as 2-bytes as the above commands do. Note, these cannot be used in a multi-camera + configuration. + + These requests are in a user permission group called CameraControl. + + In addition to positioning the camera, ArServerHandlerCamera can support additional "modes" for camera control, if additional code is added to update ArServerHandlerCamera with the state of other systems such as navigation. The additional modes are LookAtGoal and LookAtPoint. An external system such as navigation (e.g. ARNL) must keep the camera handler object updated with its current goal by calling cameraModeLookAtGoalSetGoal() and cameraModeLookAtGoalClearGoal(), and ArServerHandlerCamera will continuously point the camera at that point or goal as the robot moves. The network requests associated with setting modes are: +
    +
  • getCameraModeList: Gets the list of modes that this camera + supports
  • +
  • getCameraModeUpdated: Sent when the mode is changed
  • +
  • setCameraMode: Command to change the camera mode (give mode name)
  • +
+*/ +class ArServerHandlerCamera : public ArCameraCollectionItem +{ +private: + static const char *CONTROL_COMMAND_GROUP; + static const char *INFO_COMMAND_GROUP; + static const char *NO_ARGS; +public: + + /// Constructs a new handler for the specified camera. + /** + * @param cameraName the unique char * name of the associated camera + * @param server the ArServerBase * used to send/receive requests + * @param robot the associated ArRobot * + * @param camera the ArPTZ * that provides access to the actual camera + * @param collection the ArCameraCollection * to which to add the + * camera command information; if NULL, then addToCameraCollection() + * must be called manually. + **/ + AREXPORT ArServerHandlerCamera(const char *cameraName, + ArServerBase *server, + ArRobot *robot, + ArPTZ *camera, + ArCameraCollection *collection); + + /// Constructor + /** + * This constructor is maintained for backwards compatibility. It will + * not work in a multi-camera configuration. + * @deprecated + * @param server the ArServerBase * used to send/receive requests + * @param robot the associated ArRobot * + * @param camera the ArPTZ * that provides access to the actual camera + **/ + AREXPORT ArServerHandlerCamera(ArServerBase *server, + ArRobot *robot, + ArPTZ *camera); + + /// Destructor + AREXPORT virtual ~ArServerHandlerCamera(); + + // ----------------------------------------------------------------------------- + // ArCameraCollectionItem Interface: + // ----------------------------------------------------------------------------- + + /// Sends the camera absolute commands to the camera (and puts it in position mode) + AREXPORT void setCameraAbs(double pan, double tilt, double zoom, + bool lockRobot = true); + + /// Sends the camera relative commands to the camera (and puts it in position mode) + AREXPORT void setCameraRel(double pan, double tilt, double zoom, + bool lockRobot = true); + + /// Sends the camera percent commands to the camera (and puts it in position mode) + AREXPORT void setCameraPct(double panPct, double tiltPct, + bool lockRobot = true); + + /// Resets the camera + AREXPORT void resetCamera(bool lockRobot = true); + + /// Puts the camera into a mode where it will look at the goal + AREXPORT void cameraModeLookAtGoal(void); + + /// Puts the camera into a mode where it will look at a point + AREXPORT void cameraModeLookAtPoint(ArPose pose, bool controlZoom = true); + + /// Sets the goal for the camera mode that points at the goal + AREXPORT void cameraModeLookAtGoalSetGoal(ArPose pose); + /// Clears the goal for the camera mode that points at the goal + AREXPORT void cameraModeLookAtGoalClearGoal(void); + + /// Puts the camera in position mode + AREXPORT void cameraModePosition(void); + + + + + + + /// Returns the name of the camera that is controlled by this handler. + /** + * @return char * the unique name of the associated camera (if specified in + * the constructor) + **/ + AREXPORT const char *getCameraName(); + + /// Adds the camera commands to the given collection. + /** + * @param collection the ArCameraCollection to which to add the camera commands + **/ + AREXPORT virtual void addToCameraCollection(ArCameraCollection &collection); + + + // ----------------------------------------------------------------------------- + // Packet Handlers: + // ----------------------------------------------------------------------------- + + // New methods that send/receive "double"s + + /// Handles the getCameraData network packet, returning information in double format. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleGetCameraData(ArServerClient *client, ArNetPacket *packet); + + /// Handles the getCameraInfo network packet, returning information in double format. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleGetCameraInfo(ArServerClient *client, ArNetPacket *packet); + + /// Handles the setCameraAbs network packet, with information in double format. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleSetCameraAbs(ArServerClient *client, ArNetPacket *packet); + + /// Handles the setCameraPct network packet, with information in double format. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleSetCameraPct(ArServerClient *client, ArNetPacket *packet); + + /// Handles the setCameraRel network packet, with information in double format. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleSetCameraRel(ArServerClient *client, ArNetPacket *packet); + + /// Handles the mode list for the camera + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleGetCameraModeList(ArServerClient *client, ArNetPacket *packet); + + /// Handle the mode request, generally this is sent when it changes + /** + * Refer to handleSetCameraMode for a description of the supported modes + * and the various packet structures. + * + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleCameraModeUpdated(ArServerClient *client, + ArNetPacket *packet); + + /// Handle the set mode request + /** + * The following modes are currently supported: + * - Position: The user controls the camera position; no additional parameters + * in the packet + * - LookAtGoal: The robot automatically points the camera in the direction + * of its destination goal; no additional parameters in the packet + * - LookAtPoint: The robot "looks" at a specified point in the map; the packet + * contains: byte4, the x coordinate; byte4, the y coordinate + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleSetCameraMode(ArServerClient *client, + ArNetPacket *packet); + + /// Handle the reset + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleResetCamera(ArServerClient *client, + ArNetPacket *packet); + // Old methods that send/receive ints + + /// Handles the camera network packet, with information stored as byte integers. + AREXPORT void camera(ArServerClient *client, ArNetPacket *packet); + /// Handles the cameraAbs network packet, with information stored as byte integers. + AREXPORT void cameraAbs(ArServerClient *client, ArNetPacket *packet); + /// Handles the cameraPct network packet, with information stored as byte integers. + AREXPORT void cameraPct(ArServerClient *client, ArNetPacket *packet); + /// Handles the cameraUpdate network packet, with information returned as byte2 integers. + AREXPORT void cameraUpdate(ArServerClient *client, ArNetPacket *packet); + /// Handles the cameraInfo network packet, with information returned as byte2 integers. + AREXPORT void cameraInfo(ArServerClient *client, ArNetPacket *packet); + +protected: + + + // ----------------------------------------------------------------------------- + // Helper Methods: + // ----------------------------------------------------------------------------- + + enum { + DOUBLE_FACTOR = 100 ///< Multiplier for putting/getting "double" values to/from a packet + }; + + /// Adds the given value as a "double" to the given network packet. + /** + * The "double" value is really a 2-byte integer multiplied by the DOUBLE_FACTOR. + **/ + AREXPORT void addDoubleToPacket(double val, + ArNetPacket &packet) + { + // TODO: Does this need to be rounded? Any error/overflow checking? + packet.byte2ToBuf((ArTypes::Byte2) (val * DOUBLE_FACTOR)); + } + + + /// Reads a "double" value from the given network packet. + /** + * The "double" value is really a 2-byte integer multiplied by the DOUBLE_FACTOR. + **/ + AREXPORT double getDoubleFromPacket(ArNetPacket &packet) + { + int tempVal = packet.bufToByte2(); + return ((double) tempVal / (double) DOUBLE_FACTOR); + } + + /// Gets the current camera zoom as a ratio of its zoom range. + AREXPORT double getCurrentZoomRatio() + { + if (myCamera->getMaxZoom() != myCamera->getMinZoom()) { + + return ((double)(myCamera->getZoom() - myCamera->getMinZoom())) + / ((double)(myCamera->getMaxZoom() - myCamera->getMinZoom())); + } + else { + return 0; + } + } // end method getCurrentZoomRatio + + + /// Converts the given absolute zoom value to a ratio of the camera's zoom range. + AREXPORT double getZoomRatio(double absZoom) + { + if (myCamera->getMaxZoom() != myCamera->getMinZoom()) { + + return ((double)(absZoom - myCamera->getMinZoom())) + / ((double)(myCamera->getMaxZoom() - myCamera->getMinZoom())); + } + else { + return 0; + } + } // end method getZoomRatio + + + /// Gets the range of the camera's zoom. + AREXPORT double getZoomRange() + { + return myCamera->getMaxZoom() - myCamera->getMinZoom(); + + } // end method getZoomRange + + +private: + + /// Performs initialization common to all constructors. + void init(); + + /// Creates command (packet) names for the current camera. + void createCommandNames(); + + /// Creates the handlers for each of the supported commands. + void createCommandCBs(); + + /// Adds all supported commands to the server. + void addAllCommandsToServer(); + + /// Adds the specified command to the server. + void addCommandToServer(const char *command, + const char *description, + const char *argumentDescription, + const char *returnDescription, + const char *commandGroup); + + /// Removes an unsupported command. + void removeCommand(const char *command); + + /// Adds the information about all supported commands to the camera collection. + void doAddToCameraCollection(ArCameraCollection &collection); + +protected: + + /// Associated robot (primarily used for locking) + ArRobot *myRobot; + /// Server from which requests are received + ArServerBase *myServer; + /// Camera that is controlled + ArPTZ *myCamera; + + /// Unique name of the associated camera + std::string myCameraName; + /// Pointer to the camera collection (if any) + ArCameraCollection *myCameraCollection; + + /// Map of ArCameraCommand names to a unique network packet name + std::map myCommandToPacketNameMap; + /// Map of ArCameraCommand names to the preferred default request interval + std::map myCommandToIntervalMap; + + /// Map of ArCameraCommand names to the callback that handles the packet + std::map *> myCommandToCBMap; + + enum CameraMode + { + CAMERA_MODE_POSITION, + CAMERA_MODE_LOOK_AT_GOAL, + CAMERA_MODE_LOOK_AT_POINT + }; + + ArMutex myModeMutex; + CameraMode myCameraMode; + std::map myCameraModeNameMap; + ArNetPacket myCameraModePacket; + ArPose myLookAtPoint; + bool myPointResetZoom; + ArPose myGoal; + bool myGoalAchieved; + bool myGoalAchievedLast; + bool myGoalResetZoom; + + + void userTask(void); + void buildModePacket(void); + + ArFunctorC myUserTaskCB; + + // Leaving these just in case they are used by someone... + + /// Old (integer-style) handler for the camera packet. + /** + * @deprecated + **/ + ArFunctor2C myCameraCB; + /// Old (integer-style) handler for the cameraAbs packet. + /** + * @deprecated + **/ + ArFunctor2C myCameraAbsCB; + /// Old (integer-style) handler for the cameraUpdate packet. + /** + * @deprecated + **/ + ArFunctor2C myCameraUpdateCB; + /// Old (integer-style) handler for the cameraInfo packet. + /** + * @deprecated + **/ + ArFunctor2C myCameraInfoCB; + +}; // end class ArServerHandlerCamera + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerCameraCollection.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerCameraCollection.h new file mode 100644 index 0000000..a428533 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerCameraCollection.h @@ -0,0 +1,142 @@ +#ifndef ARSERVERHANDLERCAMERACOLLECTION_H +#define ARSERVERHANDLERCAMERACOLLECTION_H + +#include +#include +#include +#include + +#include "ArServerBase.h" +#include "ArServerClient.h" + +/// Provides information to a client about different cameras and how to send requests to their different ArServerHandlerCamera and video image server objects. +/** + * ArServerHandlerCameraCollection defines the network packet handlers to + * transmit information regarding the cameras and their video streams that are installed on the robot. + * + * This class handles the following requests: + *
    + *
  • getCameraList: Replies with a packet containing a 2-byte integer + * indicating the number of cameras. Then, for each camera: + *
      + *
    1. camera name (string)
    2. + *
    3. camera type (string)
    4. + *
    5. camera name for user display (string)
    6. + *
    7. camera type for user display (string)
    8. + *
    9. list of requests that can be sent for this camera, beginning with the 2-byte number of commands, then, for + * each command: + *
        + *
      1. the generic descriptive name (string)
      2. + *
      3. the specific command request name (string)
      4. + *
      5. an appropriate frequency for making this request (4-byte integer)
      6. + *
      + *
    10. + *
    11. list of parameters, beginning with the 2-byte number of parameters, then, + * for each parameter, the parameter definition/value (see ArClientArg for format). + *
    12. + *
    + *
  • + * + *
  • setCameraParams: Set some camera parameters. Begins with camera name + * string, then for each parameter, the parameter name and value (see + * ArClientArg for the format). An empty parameter name string terminates + * the list. In reply, this handler sends a packet confirming the changes + * (see cameraParamUpdated below).
  • + *
+ * + * When a camera is added or a parameter changes, the server broadcasts the + * following packets to each client: + *
    + *
  • cameraListUpdate: no arguments, use getCameraList to get the new list.
  • + * + *
  • cameraParamUpdated: starts with camera name, then a list of parameter + * name and value (see ArClientArg for format). An empty parameter name + * string terminates the list.
  • + *
+ * Note that the cameraParamUpdated is currently only sent in response to a + * setCameraParams request. That is, it does not monitor the actual parameter + * values in the ArCameraCollection. + *

+ * In order to manipulate a particular camera using the request names and other + * information provided by ArServerHandlerCameraCollection, see ArServerHandlerCamera and + * ArVideoServer. + */ +class ArServerHandlerCameraCollection +{ +protected: + /// Name of the network packet to get the camera list. + static const char *GET_COLLECTION_PACKET_NAME; + /// Name of the network packet to set a particular camera parameter. + static const char *SET_PARAMS_PACKET_NAME; + + /// Name of the network packet broadcast when the collection is modified. + static const char *COLLECTION_UPDATED_PACKET_NAME; + /// Name of the network packet broadcast when a parameter value is modified. + static const char *PARAMS_UPDATED_PACKET_NAME; + + /// Command group for these packets. + static const char *COMMAND_GROUP; + +public: + /// Constructor. + /** + * @param server the ArServerBase * used to send/receive requests + * @param cameraCollection the ArCameraCollection * to be transmitted + **/ + AREXPORT ArServerHandlerCameraCollection(ArServerBase *server, + ArCameraCollection *cameraCollection); + /// Destructor. + AREXPORT virtual ~ArServerHandlerCameraCollection(); + + // -------------------------------------------------------------------------- + // Network Packet Handlers + // -------------------------------------------------------------------------- + + /// Handles the request to get the camera list / collection. + /** + * @param client the ArServerClient * that is making the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void getCameraList(ArServerClient *client, ArNetPacket *packet); + + /// Handles the request to edit a camera's parameters. + /** + * @param client the ArServerClient * that is making the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void setParams(ArServerClient *client, ArNetPacket *packet); + + // -------------------------------------------------------------------------- + // ArCameraCollection Modified Callback + // -------------------------------------------------------------------------- + + /// Callback executed when the associated camera collection is modified. + AREXPORT void handleCameraCollectionModified(); + + +private: + + /// Disabled copy ctor + ArServerHandlerCameraCollection(const ArServerHandlerCameraCollection &); + /// Disabled assignment operator + ArServerHandlerCameraCollection &operator=(const ArServerHandlerCameraCollection &); + +protected: + + /// The server used to send/receive requests + ArServerBase *myServer; + /// The associated camera collection + ArCameraCollection *myCameraCollection; + + /// Server callback for the get camera list request + ArFunctor2 *myGetCameraListCB; + /// Server callback for the set parameter request + ArFunctor2 *mySetParamCB; + + /// Notification callback when the camera collection has been modified + ArFunctor *myCollectionModifiedCB; + +}; // end class ArServerHandlerCameraCollection + + +#endif // ARSERVERHANDLERCAMERACOLLECTION_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerCommMonitor.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerCommMonitor.h new file mode 100644 index 0000000..2780c56 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerCommMonitor.h @@ -0,0 +1,125 @@ +#ifndef ARSERVERHANDLERCOMMMONITOR_H +#define ARSERVERHANDLERCOMMMONITOR_H + +#include "Aria.h" + +#include "ArNetworking.h" + +/// Handler that enables the client to monitor communication to the robot server. +/** + * ArServerHandlerCommMonitor defines network packet handlers that simply verify + * the communication between the robot and server. + * + * This class handles the following requests: + *

    + *
  • heartbeatTcp: Packet broadcast (TCP) periodically to confirm that + * the server is alive.
  • + *
  • heartbeatUdp: Packet broadcast (UDP) periodically to confirm that + * the server is alive.
  • + *
  • getHeartbeatInterval: Command to return the expected heartbeat interval. + * Packet contains: + *
      + *
    1. uByte4 : Interval (msecs)
    2. + *
    + *
  • ackCommTcp: Command to acknowledge two-way communication over TCP. + * An empty packet is returned.
  • + *
  • ackCommUdp: Command to acknowledge two-way communication over UDP. + * An empty packet is returned.
  • + *
+**/ +class ArServerHandlerCommMonitor +{ +public: + + enum { + MIN_HEARTBEAT_INTERVAL = 100, + DEFAULT_HEARTBEAT_INTERVAL = 500 + }; + +protected: + /// Name of the network packet broadcast (TCP) to confirm the server is alive. + static const char *HEARTBEAT_TCP_PACKET_NAME; + /// Name of the network packet broadcast (UDP) to confirm the server is alive. + static const char *HEARTBEAT_UDP_PACKET_NAME; + + /// Name of the network packet to get the heartbeat interval. + static const char *GET_HEARTBEAT_INTERVAL_PACKET_NAME; + /// Name of the network packet to confirm TCP communication. + static const char *ACK_COMM_TCP_PACKET_NAME; + /// Name of the network packet to confirm UDP communication. + static const char *ACK_COMM_UDP_PACKET_NAME; + + + static const char *COMMAND_GROUP; + static const char *NO_ARGS; + +public: + + /// Constructs a new handler to monitor communication between the robot server and client. + /** + * @param server the ArServerBase used to send/receive requests + * @param heartBeatInterval How often to send a "heartbeat" packet to the client + **/ + AREXPORT ArServerHandlerCommMonitor(ArServerBase *server, + int heartbeatInterval = DEFAULT_HEARTBEAT_INTERVAL); + + + /// Destructor + AREXPORT virtual ~ArServerHandlerCommMonitor(); + + + // ----------------------------------------------------------------------------- + // Packet Handlers: + // ----------------------------------------------------------------------------- + + /// Handles the getHeartbeatInterval network packet. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleGetHeartbeatInterval(ArServerClient *client, ArNetPacket *packet); + + /// Handles the ackCommTcp network packet. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleAckCommTcp(ArServerClient *client, ArNetPacket *packet); + + + /// Handles the ackCommUdp network packet. + /** + * @param client the ArServerClient * that sent the request + * @param packet the ArNetPacket * that contains the request + **/ + AREXPORT void handleAckCommUdp(ArServerClient *client, ArNetPacket *packet); + + + /// Callback for the server cycle; broadcasts heartbeat packets when interval has elapsed. + AREXPORT void cycleCallback(); + +protected: + + /// Server from which requests are received + ArServerBase *myServer; + + /// Number of msecs between heartbeat broadcasts + int myHeartbeatInterval; + /// Time that the last heartbeat packets were broadcast + ArTime myLastHeartbeatTime; + + /// Callback for getting the heartbeat interval + ArFunctor2C myGetHeartbeatIntervalCB; + /// Callback for replying to the ack request (UDP) + ArFunctor2C myAckCommUdpCB; + /// Callback for replying to the ack request (TCP) + ArFunctor2C myAckCommTcpCB; + /// Cycle callback executed to broadcast the heartbeat packets + ArFunctorC myCycleCB; + +}; // end class ArServerHandlerCommMonitor + +#endif // ARSERVERHANDLERCOMMMONITOR_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerCommands.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerCommands.h new file mode 100644 index 0000000..751bda6 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerCommands.h @@ -0,0 +1,69 @@ +#ifndef ARSERVERHANDLERCOMMANDS_H +#define ARSERVERHANDLERCOMMANDS_H + +#include "Aria.h" +#include "ArServerBase.h" + +/// Class for having commands that can be called easily on the client +/** + You can add commands with addCommand and addStringCommand, you can + get the list of commands by requesting the data "listCommands" and + "listStringCommands". + **/ +class ArServerHandlerCommands +{ +public: + /// Constructor + AREXPORT ArServerHandlerCommands(ArServerBase *server); + /// Destructor + AREXPORT virtual ~ArServerHandlerCommands(); + /// Sets the text server + AREXPORT void setTextServer(ArNetServer *textServer) + { myTextServer = textServer; } + /// Adds a command with no arguments + AREXPORT bool addCommand(const char *name, const char *description, + ArFunctor *functor, + const char *commandGroup = NULL); + /// Adds a command that takes a string argument + AREXPORT bool addStringCommand(const char *name, const char *description, + ArFunctor1 *functor, + const char *commandGroup = NULL); + /// Sets a prefix for commands + AREXPORT void setPrefix(const char *prefix); + /// Gets the prefix + AREXPORT const char *getPrefix(void); + /// The function that lists the commands + AREXPORT void netListCommands(ArServerClient *client, ArNetPacket *packet); + /// The function that lists the string commands + AREXPORT void netListStringCommands(ArServerClient *client, + ArNetPacket *packet); + +protected: + ArServerBase *myServer; + ArNetServer *myTextServer; + void netParseCommand(ArServerClient *client, ArNetPacket *packet, + ArFunctor *functor); + void netParseStringCommand(ArServerClient *client, ArNetPacket *packet, + ArFunctor1 *functor); + + void textParseCommand(char **argv, int argc, ArSocket *socket, ArFunctor *functor); + void textParseStringCommand(char **argv, int argc, ArSocket *socket, + ArFunctor1 *functor); + + std::list myCommands; + std::list myCommandDescriptions; + std::list myStringCommands; + std::list myStringCommandDescriptions; + std::list *> myFunctors; + std::list *> *> myStringFunctors; + std::string myPrefix; + ArFunctor2C myNetListCommandsCB; + ArFunctor2C myNetListStringCommandsCB; + +}; + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerConfig.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerConfig.h new file mode 100644 index 0000000..a684160 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerConfig.h @@ -0,0 +1,321 @@ +#ifndef ARSERVERCONFIGHANDLER_H +#define ARSERVERCONFIGHANDLER_H + +#include "Aria.h" +#include "ArServerBase.h" + +class ArServerClient; + +/// Class for sending and receiving ArConfig data via ArNetworking. +/** + * ArServerHandlerConfig defines the network packet handlers used to transmit + * ArConfig objects to a client, and to modify them based on information + * received from the client. Since the packet structure for the ArConfig is + * rather complex, this class is best used in conjunction with the + * ArClientHandlerConfig. + * + * This class handles the following requests: + *
    + *
  • getConfigBySections/getConfigBySectionsV2: Replies with multiple + * packets, one for each ArConfig section plus an empty packet that + * terminates the reply. Each packet contains the following header + * information: + *
      + *
    1. Section Indicator: Always set to 'S' (byte)
    2. + *
    3. Section Name: (string)
    4. + *
    5. Section Comment: (string)
    6. + *
    7. Section Category Name: (string) Only for getConfigBySectionsV2
    8. + *
    + * For each parameter in the section, the packet then contains a + * a Parameter Indicator (always set to 'P' (byte)) followed by a + * complete description of the parameter (display hints are included). + * See ArClientArgUtils for more information. + *
  • + *
  • getConfig: This request has been superceded by getConfigBySections. (It + * replies with a single packet containing all of the ArConfig + * sections as described above. If the ArConfig is large, then it + * may not be sent successfully. In addition, it contains no parameter + * display hints.) + *
  • + *
  • setConfig: Parses the received packet and updates the robot's + * ArConfig (and saves it to the file). For each modified section, + * the received packet is expected to contain: + *
      + *
    1. Section Indicator: Always set to "Section" (string)
    2. + *
    3. Section Name: (string)
    4. + *
    + * Followed by a brief "text" description of each modified parameter. + * This is the parameter name (string) followed by the parameter value + * formatted as text (string). See ArClientArgUtils for more information. + * + * A reply packet containing a string is sent to the client. If the + * string is empty, then the config was successfully updated. Otherwise, + * the string contains the name of the first parameter that caused an + * error during the update handling. + *
  • + *
  • reloadConfig: Reloads the ArConfig from the text file. + *
  • + *
  • configUpdated: An empty packet is broadcast to all interested clients + * after setConfig or reloadConfig has been completed. The clients may + * then request the modified ArConfig data with getConfigBySections + * (or getConfig). + *
  • + *
  • getConfigDefaults: If a "default" configuration file is available, + * then this command can be used to send the preferred default values + * to the client. The received packet should contain a single string, + * which is the name of the section to be retrieved, or an empty string + * to indicate all sections. + * + * For each requested section, the reply packet contains: + *
      + *
    1. Section Indicator: Always set to "Section" (string)
    2. + *
    3. Section Name: (string)
    4. + *
    + * Followed by a brief "text" description of each default parameter value. + * This is the parameter name (string) followed by the parameter value + * formatted as text (string). See ArClientArgUtils for more information. + *
  • + *
+ * + * If you are using this class with the default file option you'll + * want to make it AFTER you're done adding things to the config, ie + * last, so that the default code can work correctly (it needs to know + * about all the info). +**/ +class ArServerHandlerConfig +{ +public: + + /// Constructor + /** + * @param server the ArServerBase * used to send and receive network packets; + * must be non-NULL + * @param config the ArConfig * that is maintained by this server handler + * @param defaultFile the char * name of the file that contains the default + * values for the ArConfig; if NULL, then getConfigDefaults will not be + * supported + * @param defaultFileBaseDirectory the char * name of the directory that + * contains the default file + **/ + AREXPORT ArServerHandlerConfig(ArServerBase *server, + ArConfig *config, + const char *defaultFile = NULL, + const char *defaultFileBaseDirectory = NULL, + bool allowFactory = true, + const char *robotName = NULL, + bool preventChanges = false, + const char *preventChangesString = NULL); + + /// Destructor + AREXPORT virtual ~ArServerHandlerConfig(); + + // --------------------------------------------------------------------------- + // Network Packet Handlers + // --------------------------------------------------------------------------- + + /// Handles the "reloadConfig" request. + AREXPORT void reloadConfig(ArServerClient *client, ArNetPacket *packet); + + /// Handles the "getConfigBySections" request. + AREXPORT void getConfigBySections(ArServerClient *client, ArNetPacket *packet); + + /// Handles the "getConfigBySectionsV2" request. + AREXPORT void getConfigBySectionsV2(ArServerClient *client, ArNetPacket *packet); + + /// Handles the "getConfigBySectionsV3" request. + AREXPORT void getConfigBySectionsV3(ArServerClient *client, ArNetPacket *packet); + + /// Handles the (deprecated) "getConfig" request. + AREXPORT void getConfig(ArServerClient *client, ArNetPacket *packet); + + /// Handles the "setConfig" request. + AREXPORT void setConfig(ArServerClient *client, ArNetPacket *packet); + + AREXPORT void setConfigBySections(ArServerClient *client, ArNetPacket *packet); + + AREXPORT void setConfigBySectionsV2(ArServerClient *client, ArNetPacket *packet); + + /// Handles the "getConfigDefaults" request. + AREXPORT void getConfigDefaults(ArServerClient *client, ArNetPacket *packet); + + /// Handles the "getConfigSectionFlags" request. + AREXPORT void getConfigSectionFlags(ArServerClient *client, + ArNetPacket *packet); + + /// Handles the "getLastEditablePriority" request. + AREXPORT void getLastEditablePriority(ArServerClient *client, + ArNetPacket *packet); + + // --------------------------------------------------------------------------- + // Callback Methods + // --------------------------------------------------------------------------- + + /// Adds a callback to be called before writing to disk + AREXPORT void addPreWriteCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called before writing to disk + AREXPORT void remPreWriteCallback(ArFunctor *functor); + + /// Adds a callback to be called after writing to disk + AREXPORT void addPostWriteCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called after writing to disk + AREXPORT void remPostWriteCallback(ArFunctor *functor); + + /// Adds a callback to be called when the config is updated + AREXPORT void addConfigUpdatedCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called when the config is updated + AREXPORT void remConfigUpdatedCallback(ArFunctor *functor); + + /// Restarts the IO manually (mostly for because of a config change) + void restartIO(const char *reason); + /// Restarts the software manually (mostly for because of a config change) + void restartSoftware(const char *reason); + /// Restarts the hardware manually (mostly for because of a config change) + void restartHardware(const char *reason); + + /// Adds a callback for when the IO is changed + void addRestartIOCB(ArFunctor *functor, int position = 50) + { myRestartIOCBList.addCallback(functor, position); } + /// Adds a callback for when the IO is changed + void remRestartIOCB(ArFunctor *functor) + { myRestartIOCBList.remCallback(functor); } + + /// Sets a callback for when a RESTART_SERVER config param is changed + AREXPORT void setRestartSoftwareCB(ArFunctor *restartServerCB); + + /// Gets the callback for when a RESTART_SERVER config param is changed + AREXPORT ArFunctor *getRestartSoftwareCB(void); + + /// Sets a callback for when a RESTART_ROBOT config param is changed + AREXPORT void setRestartHardwareCB(ArFunctor *restartRobotCB); + + /// Gets the callback for when a RESTART_ROBOT config param is changed + AREXPORT ArFunctor *getRestartHardwareCB(void); + + /// Locks the config so we don't do anything with it + AREXPORT int lockConfig(void) { return myConfigMutex.lock(); } + /// Tries to lock the config so we don't do anything with it + AREXPORT int tryLockConfig(void) { return myConfigMutex.tryLock(); } + /// Unlocks the config so we can use it again + AREXPORT int unlockConfig(void) { return myConfigMutex.unlock(); } + + /// Writes the config out + AREXPORT bool writeConfig(void); + /// Notifies the clients that the config was updated + AREXPORT bool configUpdated(ArServerClient *client = NULL); + + /// Changes the variables that prevent changes + void setPreventChanges(bool preventChanges = false, + const char *preventChangesString = NULL); + + /// loads the whole of a default file (for internal use) + AREXPORT bool loadDefaultsFromFile(void); + /// Parses a line of the default config (for internal use) + AREXPORT bool loadDefaultsFromPacket(ArNetPacket *packet); + /// Creates an empty default config... + AREXPORT void createEmptyConfigDefaults(void); + + /// Changes if factory is allowed... this is internal, only for when + /// that decision is deferred + void setAllowFactory(bool allowFactory) + { myPermissionAllowFactory = allowFactory; } + /// Changes if factory is allowed... this is internal, only for when + /// that decision is deferred + bool getAllowFactory(void) + { return myPermissionAllowFactory; } +protected: + + AREXPORT void doGetConfigBySections(ArServerClient *client, + ArNetPacket *packet, + int version); + + /// Helper method for the get config callbacks (e.g. getConfigBySections, getConfig, ...). + AREXPORT void handleGetConfig(ArServerClient *client, + ArNetPacket *packet, + bool isMultiplePackets, + ArPriority::Priority lastPriority, + bool isSendIneditablePriorities, + int version); + + /// Helper method for the get config callbacks (e.g. getConfigBySections, getConfig, ...). + AREXPORT bool handleGetConfigSection(ArNetPacket &sending, + ArServerClient *client, + ArNetPacket *packet, + bool isMultiplePackets, + ArPriority::Priority lastPriority, + bool isSendIneditablePriorities, + int version, + ArConfigSection *section, + int startIndex, + int paramCount, + int sectionIndex, + std::set &sentParams); + + + /// Internal method that handles a setConfig packet for myConfig or + /// myDefaults + bool internalSetConfig(ArServerClient *client, + ArNetPacket *packet, + int version, + bool isMultiplePackets = false); + + /// just creates the default config... (internal, don't use) + void createDefaultConfig(const char *defaultFileBaseDir); + /// Adds the default config callbacks; + void addDefaultServerCommands(void); + + /// Determines the last editable priority based on the input flags + ArPriority::Priority findLastEditablePriority(); + + ArPriority::Priority convertToPriority(int priorityVal, + ArPriority::Priority defaultPriority); + + +protected: + + std::string myRobotName; + std::string myLogPrefix; + + ArServerBase *myServer; + ArConfig *myConfig; + + + ArConfig *myDefault; + std::string myDefaultFile; + std::string myDefaultFileBaseDir; + ArMutex myDefaultConfigMutex; + bool myAddedDefaultServerCommands; + + bool myPermissionAllowFactory; + bool myPreventChanges; + std::string myPreventChangesString; + + ArMutex myConfigMutex; + + std::list myPreWriteCallbacks; + std::list myPostWriteCallbacks; + std::list myConfigUpdatedCallbacks; + + ArCallbackList myRestartIOCBList; + ArFunctor *myRestartSoftwareCB; + bool myRestartSoftwareCBSet; + ArFunctor *myRestartHardwareCB; + bool myRestartHardwareCBSet; + + ArFunctor2C myGetConfigBySectionsCB; + ArFunctor2C myGetConfigBySectionsV2CB; + ArFunctor2C myGetConfigBySectionsV3CB; + ArFunctor2C myGetConfigCB; + ArFunctor2C mySetConfigCB; + ArFunctor2C mySetConfigBySectionsCB; + ArFunctor2C mySetConfigBySectionsV2CB; + ArFunctor2C myReloadConfigCB; + ArFunctor2C myGetConfigDefaultsCB; + ArFunctor2C myGetConfigSectionFlagsCB; + ArFunctor2C myGetLastEditablePriorityCB; + +}; + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerMap.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerMap.h new file mode 100644 index 0000000..ba1a739 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerMap.h @@ -0,0 +1,185 @@ +#ifndef ARSERVERMAP_H +#define ARSERVERMAP_H + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArConfig.h" + + +class ArServerClient; + +class ArMapInterface; + +/** @brief Service providing the contents of a map file to the client. + * + * A map can be provided from an ArMap object, or else the + * filename can be given in the global ArConfig object (see Aria::getConfig()) + * as "Map" in the "Files" section. This handler can also be configured to + * only send "point" data, "line" data, or both kinds of data from the map. + * + * This service accepts the following data requests: + *
    + *
  • getMapId + *
  • getMapName + *
  • getMap + *
  • getGoals + *
  • getMapBinary + *
  • getMapMultiScans + *
+ * + * The following data types will also be broadcast to all clients to indicate + * certain events: + *
    + *
  • mapUpdated + *
  • goalsUpdated + *
+ * + * The getMapId request replies with: a map + * source identifier (NULL-terminated string); a filename for the map + * (NULL-terminated string); a checksum value preceded by a 4-byte unsigned + * integer providing the length (in bytes) of that checksum value; the total + * data size of the map contents (4-byte unsigned integer); and a timestamp + * for the map file (last modified, 4-byte signed integer, UNIX time). + * + * The getMapName request replies with a packet containing a + * NULL-terminated string containing the filename of the map, or an empty string + * ("") if there is no map. + * + * The getMap request replies with a series of packets each + * containing one line from the map file (as a null-terminated string), + * followed by an empty packet signifying + * the end of the packet. + * (see the documentation for ArMap for the map file + * format). This data may be written (with newlines added) to a map file, + * or may be parsed directly by an empty ArMap object using ArMap::parseLine() + * and ArMap::parsingComplete(). See tests/mapClient.cpp for an example of usage. + * + * The getGoals request replies with a packet containing a series of NULL-terminated + * strings containing the names of the Goal objects in the map. + * + * The getMapBinary request replies with the map headers and + * objects list (see ArMap for map file format) as text, but supplies point + * "DATA" and/or "LINES" as an undelimited sequence of 2-byte integers. (In + * the case of point data, each pair of integers is a point; for lines, each + * sequence of four integers defines a line). This binary representation of data + * is more compact than the ASCII text representation. This request results in a + * series of packets, with an empty packet signifying the end of the series. + * + * The getMapMultiScans request is similar to getMapBinary, + * but it includes a list of the scan sources, along with the point and lines + * for each scan source in binary format. + * + * The mapUpdated packet is sent to all connected clients whenever + * a new map is loaded or the map is changed. The packet contains no data; the + * new map can be downloaded using one of the above requests. + * + * The goalsUpdated packet is sent to all connected clients + * whenever the list of Goal objects changes in the map or a new map is loaded. + * The packet contains no data; the new list of goals can be downloaded using + * getGoals, or by downloading the entire map. + * + */ +class ArServerHandlerMap +{ +public: + enum DataToSend { LINES = 1, POINTS = 2, BOTH = 3 }; + /// Constructor + AREXPORT ArServerHandlerMap(ArServerBase *server, + ArMapInterface *arMap = NULL, + DataToSend dataToSend = BOTH); + /// Destructor + AREXPORT virtual ~ArServerHandlerMap(); + /// Loads the map from a file + AREXPORT bool loadMap(const char *mapFile); + /// Uses a map already loaded + AREXPORT void useMap(ArMapInterface *mapObj, + bool takeOwnershipOfMap = false); + /// Gets the map object this is using + AREXPORT ArMapInterface *getMap(void); + + /// Handles the request for the map ID. + AREXPORT void serverGetMapId(ArServerClient *client, + ArNetPacket *packet); + /// The command that gets the map name + AREXPORT void serverGetMapName(ArServerClient *client, + ArNetPacket *packet); + /// The command that'll get the map itself + AREXPORT void serverGetMap(ArServerClient *client, + ArNetPacket *packet); + /// The command that gets the map, with the data in binary format for improved performance + AREXPORT void serverGetMapBinary(ArServerClient *client, + ArNetPacket *packet); + + /// Requests that the server send the map, including scan data for multiple sources if available. + AREXPORT void serverGetMapMultiScans(ArServerClient *client, + ArNetPacket *packet); + + /// Requests that the server send the map with the specified maximum features. + AREXPORT void serverGetMapWithMaxCategory(ArServerClient *client, + ArNetPacket *packet); + + /// The command that'll get the goals + AREXPORT void serverGetGoals(ArServerClient *client, + ArNetPacket *packet); + + /// Sets which kind of data we send + AREXPORT void setDataToSend(DataToSend dataToSend) + { myDataToSend = dataToSend; } + /// Gets which kind of data we send + DataToSend getDataToSend(void) { return myDataToSend; } + +protected: + AREXPORT void handleCheckMap(ArServerClient *client, + ArNetPacket *packet); + + AREXPORT void sendMapWithMaxCategory(ArServerClient *client, + const char *maxCategory); + + AREXPORT bool processFile(void); + AREXPORT void mapChanged(void); + // internal function that is used to toss the map to the client + AREXPORT void writeMapToClient(const char *line, ArServerClient *client); + + + AREXPORT void writePointsToClient(int pointCount, + std::vector *points, + ArServerClient *client); + + AREXPORT void writeLinesToClient(int lineCount, + std::vector *points, + ArServerClient *client); + + ArServerBase *myServer; + bool myOwnMap; + DataToSend myDataToSend; + ArMapInterface *myMap; + std::string myMapName; + ArServerHandlerMap *myServerHandlerMap; + + bool myAlreadyLoaded; + char myMapFileName[512]; + char myLastMapFile[1024]; + struct stat myLastMapFileStat; + + ArFunctor2C myGetMapIdCB; + ArFunctor2C myGetMapNameCB; + ArFunctor2C myGetMapCB; + ArFunctor2C myGetMapBinaryCB; + ArFunctor2C myGetMapMultiScansCB; + ArFunctor2C myGetMapMaxCategoryCB; + ArFunctor2C myGetGoalsCB; + ArFunctor2C myCheckMapCB; + ArRetFunctorC myProcessFileCB; + ArFunctorC myMapChangedCB; +}; + +#endif + diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerMapping.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerMapping.h new file mode 100644 index 0000000..0f1e648 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerMapping.h @@ -0,0 +1,193 @@ +#ifndef ARSERVERHANDLERMAPPING_H +#define ARSERVERHANDLERMAPPING_H + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArServerHandlerCommands.h" +#include "ArTempDirectoryHelper.h" + +/// Class that handles the starting, stopping, and status of mapping +class ArServerHandlerMapping +{ +public: + /// Constructor + AREXPORT ArServerHandlerMapping(ArServerBase *server, ArRobot *robot, + ArLaser *laser, + const char *baseDirectory = "", + const char *tempDirectory = "", + bool useReflectorValues = false, + ArLaser *laser2 = NULL, + const char *sickSuffix = NULL, + const char *sick2Suffix = NULL, + std::list *extraLasers = NULL); + /// Deconstructor + AREXPORT virtual ~ArServerHandlerMapping(); + /// Starts a new map unless ones already made + AREXPORT void serverMappingStart(ArServerClient *client, + ArNetPacket *packet); + /// Ends a map + AREXPORT void serverMappingEnd(ArServerClient *client, + ArNetPacket *packet); + /// Gets the mapping status + AREXPORT void serverMappingStatus(ArServerClient *client, + ArNetPacket *packet); + /// Returns if we're mapping or not + AREXPORT bool isMapping(void); + + /// Forces a reading to be taken + AREXPORT void forceReading(void); + + /// Gets the filename we're using (make sure the robot's locked) + AREXPORT const char *getFileName(void); + /// Gets the mapname we're using (make sure the robot's locked) + AREXPORT const char *getMapName(void); + /// Adds the simple commands to the simple command handler passed in + AREXPORT void addSimpleCommands(ArServerHandlerCommands *handlerCommands); + /// Adds a loop start to the log + AREXPORT void simpleLoopStart(ArArgumentBuilder *arg); + /// Adds a loop end to the log + AREXPORT void simpleLoopEnd(ArArgumentBuilder *arg); + /// Adds a string for adding to the log when we start + AREXPORT void addStringForStartOfLogs( + const char *str, ArListPos::Pos position = ArListPos::LAST); + /// Removes a string for adding to the log when we start + AREXPORT void remStringForStartOfLogs(const char *str); + /// Adds a tag to the logg (has robot pose and stuff) (make sure the + /// robot's locked) + AREXPORT void addTagToLog(const char *str); + /// Adds an info to the log (has no robot pose) (make sure the + /// robot's locked) + AREXPORT void addInfoToLog(const char *str); + /// Adds a new type of location data to the logger + AREXPORT bool addLocationData( + const char *name, + ArRetFunctor3 *functor); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Callback Methods + // + // The mapping callbacks are invoked in the order in which they appear + // in this header file. Namely: + // 1. MappingStart + // 2. MappingBegun (this is logically "mapping started") + // 3. MappingEnd + // 4. MappingEnded + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Adds a callback for the start of mapping + AREXPORT void addMappingStartCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for the start of mapping + AREXPORT void remMappingStartCallback(ArFunctor *functor); + + /// Adds a callback for just after mapping has started + AREXPORT void addMappingBegunCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for just after mapping has started + AREXPORT void remMappingBegunCallback(ArFunctor *functor); + + /// Adds a callback for the end of mapping + AREXPORT void addMappingEndCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for the end of mapping + AREXPORT void remMappingEndCallback(ArFunctor *functor); + + /// Adds a callback that is invoked after mapping has been ended. + AREXPORT void addMappingEndedCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback from the list invoked after mapping has been ended. + AREXPORT void remMappingEndedCallback(ArFunctor *functor); + + + /// Adds a callback to be called before moving from temp dir to base dir + AREXPORT void addPreMoveCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called before moving from temp dir to base dir + AREXPORT void remPreMoveCallback(ArFunctor *functor); + + /// Adds a callback to be called after moving from temp dir to base dir + AREXPORT void addPostMoveCallback( + ArFunctor *functor, ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called after moving from temp dir to base dir + AREXPORT void remPostMoveCallback(ArFunctor *functor); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Misc Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// The packet handler for starting/stopping scans from the lcd + AREXPORT bool packetHandler(ArRobotPacket *packet); + /// Get location data map (mostly for internal things) + AREXPORT const std::map *, + ArStrCaseCmpOp> *getLocationDataMap(void); + /// A method to add the strings for the start of a log just straight to an ArMap + AREXPORT void addStringsForStartOfLogToMap(ArMap *arMap); + + + /// Returns a pointer to the optional zip file installed on this handler. + AREXPORT ArZippable *getZipFile(); + + /// Returns a pointer to a second optional zip file used to contain snapshot images. + AREXPORT ArZippable *getSnapshotZipFile(); + + /// Sets the optional zip file installed on this handler. + AREXPORT void setZipFile(ArZippable *zipFile); + + /// Sets the optional zip file installed on this handler. + AREXPORT void setSnapshotZipFile(ArZippable *zipFile); + +protected: + + + AREXPORT std::string makeFilePathName(const char *fileName); + + ArServerBase *myServer; + ArRobot *myRobot; + ArLaser *myLaser; + ArLaser *myLaser2; + bool myUseReflectorValues; + + std::list myMappingStartCallbacks; + std::list myMappingBegunCallbacks; + std::list myMappingEndCallbacks; + std::list myMappingEndedCallbacks; + + std::list myPreMoveCallbacks; + std::list myPostMoveCallbacks; + + std::list myStringsForStartOfLog; + ArLaserLogger *myLaserLogger; + ArLaserLogger *myLaserLogger2; + std::string myMapName; + std::string myFileName; + std::string myFileName2; + + std::string mySuffix; + std::string mySuffix2; + + std::list *myExtraLasers; + + ArTempDirectoryHelper myTempDirectoryHelper; + + /// Optional zip file in which mapping results may be saved + ArZippable *myZipFile; + /// Second optional zip file in which snaphots may be saved + ArZippable *mySnapshotZipFile; + + std::map *, + ArStrCaseCmpOp> myLocationDataMap; + + ArFunctor2C myMappingStartCB; + ArFunctor2C myMappingEndCB; + ArFunctor2C myMappingStatusCB; + ArServerHandlerCommands *myHandlerCommands; + ArRetFunctor1C myPacketHandlerCB; + ArFunctor1C myLoopStartCB; + ArFunctor1C myLoopEndCB; +}; + + + +#endif // ARSERVERHANDLERMAPPING_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerHandlerPopup.h b/Legacy/Aria/ArNetworking/include/ArServerHandlerPopup.h new file mode 100644 index 0000000..3a0cf6c --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerHandlerPopup.h @@ -0,0 +1,256 @@ +#ifndef ARSERVERHANDLERPOPUP_H +#define ARSERVERHANDLERPOPUP_H + +#include "Aria.h" +#include "ArServerBase.h" + + +class ArServerClient; + +class ArServerHandlerPopupInfo; + +/// Class for having generic popups appear in MobileEyes (created on the server) +/** + TODO make the callbacks actually happen +**/ + +class ArServerHandlerPopup +{ +public: + /// Constructor + AREXPORT ArServerHandlerPopup(ArServerBase *server); + /// Destructor + AREXPORT virtual ~ArServerHandlerPopup(); + /// Creates a new popup + AREXPORT ArTypes::Byte4 createPopup( + ArServerHandlerPopupInfo *popupInfo, + ArFunctor2 *callback = NULL); + /// Cancels a popup with the ID + AREXPORT void closePopup(ArTypes::Byte4 id, + const char *closeMessage); + /// The call from the network that the popup was clicked + /// @internal + AREXPORT void netPopupClicked(ArServerClient *client, + ArNetPacket *packet); + /// The call from the network for getting the popup list + /// @internal + AREXPORT void netPopupList(ArServerClient *client, + ArNetPacket *packet); + /// Our cycle callback + /// @internal + AREXPORT void serverCycleCallback(void); + enum PopupType { + NOICON = 0, ///< No icon at all + INFORMATION = 1, ///< Just an informational message + WARNING = 2, ///< A warning + CRITICAL = 3, ///< A critical problem (program failure likely) + QUESTION = 4 ///< A question + }; +protected: + ArServerBase *myServer; + + class PopupData { + public: + /// Constructor (copies and owns popupInfo, leaves callback) + PopupData(ArServerHandlerPopupInfo *popupInfo, + ArTypes::Byte4 id, + ArFunctor2 *callback); + /// Destructor, deleted the popup info + virtual ~PopupData(); + /// The popup info + ArServerHandlerPopupInfo *myPopupInfo; + /// The functor to call when its done + ArFunctor2 *myCallback; + /// When we started this popup + ArTime myStarted; + /// The popup this was serving + ArTypes::Byte4 myID; + + }; + void buildPacket(ArNetPacket *sendingPacket, PopupData *popupData); + + ArMutex myDataMutex; + std::map myMap; + ArTypes::Byte4 myLastID; + ArTime myLastTimeCheck; + ArFunctor2C myNetPopupClickedCB; + ArFunctor2C myNetPopupListCB; + ArFunctorC myServerCycleCB; +}; + +/// Holds the information for a popup +/** + This holds the information for the popup.... So there's a message + box with the title which has in it the message, and has between 1 + and 3 buttons (button0, button1, and button2) with labels of + button0Label, button1Label, and button2Label (if the label is empty + or NULL then there'll be no button), the default button of + defaultButtonNumber (0 - 2) and the escape button number of + escapeButtonNumber (0 - 2)... when a button is pushed the + + @param ignoreIdentifier The identifier to use for ignoring these + boxes, this should be NULL or empty if you don't want this + particular box to be able to be ignored (if any popup with this + identifier is already being ignored this one will be too) + + @param title The title of the box (displayed in the titlebar) + + @param message The string that will be displayed in the message box + (the point of the whole thing) + + @param popupType The type of popup this is, which controls the icon + displayed, may someday affect behavior + + @param defaultButtonPressed The button that enter defaults to (This + should be whatever is most likely) + + @param escapeButtonPressed The button that escape defaults to (this + should be doesn't change the state, ie like cancel), this also + should be whats returned if the X is hit. + + @param button0Label The label that is displayed on button 0, the + leftmost button + + @param timeoutInSeconds the number of seconds we should give people + to respond to the popup before timing it out, 0 means leave it up + forever (note that no clients may be watching this or no one may be + at the console and use this option wisely (way too many untimed out + popups could bog down the server)) + + @param timeoutString The string that will be displayed if a timeout + happens + + @param button0Pressed The string that will be put into the box if + button0 is pressed (this is mainly so that with multiple clients + connected the other clients will get feedback) + + @param button1Label The label that is displayed on button 1 (the + middle button if there are 3, right button if there are two) + + @param button1Pressed The string that will be put into the box if + button1 is pressed (this is mainly so that with multiple clients + connected the other clients will get feedback) + + @param button2Label The label that is displayed on button 2 (the + right button) + + @param button2Pressed The string that will be put into the box if + button2 is pressed (this is mainly so that with multiple clients + connected the other clients will get feedback) + **/ +class ArServerHandlerPopupInfo +{ +public: + /// Constructor + AREXPORT ArServerHandlerPopupInfo( + const char *ignoreIdentifier, const char *title, + const char *message, ArServerHandlerPopup::PopupType popupType, + ArTypes::Byte defaultButtonNumber, + ArTypes::Byte escapeButtonNumber, + int timeoutInSeconds, const char *timeoutString, + const char *button0Label, const char *button0Pressed, + const char *button1Label = "", const char *button1Pressed = "", + const char *button2Label = "", const char *button2Pressed = ""); + + /// Destructor + AREXPORT virtual ~ArServerHandlerPopupInfo(); + /// Copy constructor + AREXPORT ArServerHandlerPopupInfo(const ArServerHandlerPopupInfo &popupInfo); + /// Assignment operator + AREXPORT ArServerHandlerPopupInfo &operator=( + const ArServerHandlerPopupInfo &popupInfo); + + /// Gets the popup identifer (this is used only for ignoring popups, if empty or NULL then it can't be ignored) + const char *getIgnoreIdentifier(void) { return myIgnoreIdentifier.c_str(); } + /// Gets the title (the title of the popup box) + const char *getTitle(void) { return myTitle.c_str(); } + /// Gets the message (the long string that is displayed that explains things) + const char *getMessage(void) { return myMessage.c_str(); } + /// Gets the type (the icon thats displayed and what type of popup it is) + ArServerHandlerPopup::PopupType getPopupType(void) { return myPopupType; } + /// Gets the default button number (whats pressed when enter is hit) + ArTypes::Byte getDefaultButtonNumber(void) { return myDefaultButtonNumber; } + /// Gets the escape button number (whats pressed when escape is hit) + ArTypes::Byte getEscapeButtonNumber(void) { return myEscapeButtonNumber; } + /// Gets the timeout in seconds (0 is never) + int getTimeout(void) { return myTimeout; } + /// Gets the timeout string (the string that is displayed on the popup if timeout occurs) + const char * getTimeoutString(void) + { return myTimeoutString.c_str(); } + /// Gets the button0Label (the label on the leftmost button, must have a label) + const char *getButton0Label(void) { return myButton0Label.c_str(); } + /// Gets the button0Pressed (string sent as box disppears if this button is pressed) + const char *getButton0Pressed(void) { return myButton0Pressed.c_str(); } + + /// Gets the button1Label (the label on the middle button, empty string or NULL for no button) + const char *getButton1Label(void) { return myButton1Label.c_str(); } + /// Gets the button1Pressed (string sent as box disppears if this button is pressed) + const char *getButton1Pressed(void) { return myButton1Pressed.c_str(); } + /// Gets the button2Label (the label on the right button, empty string or NULL for no button) + const char *getButton2Label(void) { return myButton2Label.c_str(); } + /// Gets the button2Pressed (string sent as box disppears if this button is pressed) + const char *getButton2Pressed(void) { return myButton2Pressed.c_str(); } + + /// Gets the popup identifer (this is used only for ignoring popups, if empty or NULL then it can't be ignored) + void setIgnoreIdentifier(const char *identifier) + { if (identifier != NULL) myIgnoreIdentifier = identifier; else myIgnoreIdentifier = ""; } + /// Sets the title (the title of the popup box) + void setTitle(const char *title) + { if (title != NULL) myTitle = title; else myTitle = ""; } + /// Sets the message (the long string that is displayed that explains things) + void setMessage(const char *message) + { if (message != NULL) myMessage = message; else myMessage = ""; } + /// Sets the type (the icon thats displayed and what type of popup it is) + void setPopupType(ArServerHandlerPopup::PopupType popupType) + { myPopupType = popupType; } + /// Sets the default button number (whats pressed when enter is hit) + void setDefaultButtonNumber(ArTypes::Byte defaultButtonNumber) + { myDefaultButtonNumber = defaultButtonNumber; } + /// Sets the escape button number (whats pressed when escape is hit) + void setEscapeButtonNumber(ArTypes::Byte escapeButtonNumber) + { myEscapeButtonNumber = escapeButtonNumber; } + /// Sets the timeout in seconds (0 is never) + void setTimeout(int timeoutInSeconds) + { myTimeout = timeoutInSeconds; } + /// Sets the timeout string (the string that is displayed on the popup if timeout occurs) + void setTimeoutString(const char *timeoutString) + { if (timeoutString != NULL) myTimeoutString = timeoutString; else myTimeoutString = ""; } + /// Sets the button0Label (the label on the leftmost button, must have a label) + void setButton0Label(const char *label) + { if (label != NULL) myButton0Label = label; else myButton0Label = ""; } + /// Sets the button0Pressed (string sent as box disppears if this button is pressed) + void setButton0Pressed(const char *pressed) + { if (pressed != NULL) myButton0Pressed = pressed; else myButton0Pressed = ""; } + /// Sets the button1Label (the label on the middle button, empty string or NULL for no button) + void setButton1Label(const char *label) + { if (label != NULL) myButton1Label = label; else myButton1Label = ""; } + /// Sets the button1Pressed (string sent as box disppears if this button is pressed) + void setButton1Pressed(const char *pressed) + { if (pressed != NULL) myButton1Pressed = pressed; else myButton1Pressed = ""; } + /// Sets the button2Label (the label on the right button, empty string or NULL for no button) + void setButton2Label(const char *label) + { if (label != NULL) myButton2Label = label; else myButton2Label = ""; } + /// Sets the button2Pressed (string sent as box disppears if this button is pressed) + void setButton2Pressed(const char *pressed) + { if (pressed != NULL) myButton2Pressed = pressed; else myButton2Pressed = ""; } + +protected: + std::string myIgnoreIdentifier; + std::string myTitle; + std::string myMessage; + ArServerHandlerPopup::PopupType myPopupType; + ArTypes::Byte myDefaultButtonNumber; + ArTypes::Byte myEscapeButtonNumber; + int myTimeout; + std::string myTimeoutString; + std::string myButton0Label; + std::string myButton0Pressed; + std::string myButton1Label; + std::string myButton1Pressed; + std::string myButton2Label; + std::string myButton2Pressed; +}; + +#endif // ARSERVERHANDLERPOPUP_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerInfoDrawings.h b/Legacy/Aria/ArNetworking/include/ArServerInfoDrawings.h new file mode 100644 index 0000000..447c8bb --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerInfoDrawings.h @@ -0,0 +1,88 @@ +#ifndef ARSERVERINFODRAWINGS_H +#define ARSERVERINFODRAWINGS_H + +#include "Aria.h" +#include "ArServerBase.h" + +class ArServerClient; + +/** Service to provide clients with information about graphical figures to be + displayed with the map. + + Use addDrawing() to add a figure, or use addRangeDevice() or + addRobotsRangeDevice() to automatically create standard drawings for + range devices. + + Clients may use the listDrawings data + request to receive a list of figures and metadata about those figures. + The reply packet to the listDrawings request is as follows: +
    +
  1. Number of figures (4-byte integer)Then, for each figure, the following values are given +
  2. For each figure: +
      +
    1. Figure name (null-terminated string)
    2. +
    3. Shape ID (null-terminated string)
    4. +
    5. Primary color:
        +
      1. Unused (byte)
      2. +
      3. Red (byte)
      4. +
      5. Green (byte)
      6. +
      7. Blue (byte)
      8. +
    6. +
    7. Shape size (4-byte integer)
    8. +
    9. Layer number (4-byte integer)
    10. +
    11. Suggested refresh time (4-byte integer)
    12. +
    13. Secordary color:
        +
      1. Unused (byte)
      2. +
      3. Red (byte)
      4. +
      5. Green (byte)
      6. +
      7. Blue (byte)
      8. +
    14. + +
    +
+ + This command is in the SensorInfo permission group for users. +*/ +class ArServerInfoDrawings +{ +public: + /// Constructor + AREXPORT ArServerInfoDrawings(ArServerBase *server); + /// Destructor + AREXPORT virtual ~ArServerInfoDrawings(); + /// Adds a shape to the set of figures + AREXPORT bool addDrawing(ArDrawingData *drawingData, const char *name, + ArFunctor2 *functor); + /// Adds a specific range device to be drawn (using its default shape) + AREXPORT bool addRangeDevice(ArRangeDevice *rangeDevice); + /// Adds all of the robot's range devices (using their default shape) + AREXPORT bool addRobotsRangeDevices(ArRobot *robot); + /// Client callback: Puts the list of shapes that can be drawn and their metadata into a reply packet (internal use mostly) + AREXPORT void netListDrawings(ArServerClient *client, ArNetPacket *packet); + + AREXPORT void netGetDrawingList(ArServerClient *client, ArNetPacket *packet); + + /// Client callback utility: Puts the current data for the given range device into a reply packet (internal use mostly) + AREXPORT void netRangeDeviceCurrent(ArServerClient *client, + ArNetPacket *packet, + ArRangeDevice *device); + /// Client callback utilit: Puts the cumulative buffer of the given range device into a reply packet (internal use mostly) + AREXPORT void netRangeDeviceCumulative(ArServerClient *client, + ArNetPacket *packet, + ArRangeDevice *device); + /// internal function that gets the drawing data for a drawing + /// @internal + AREXPORT ArDrawingData *internalGetDrawingData(const char *name); + /// internal function that gets the functor for a drawing + /// @internal + AREXPORT ArFunctor2 *internalGetDrawingCallback(const char *name); +protected: + ArServerBase *myServer; + std::map myDrawingDatas; + std::map *, ArStrCaseCmpOp> myDrawingCallbacks; + ArFunctor2C myNetListDrawingsCB; + ArFunctor2C myNetGetDrawingListCB; +}; + + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerInfoRobot.h b/Legacy/Aria/ArNetworking/include/ArServerInfoRobot.h new file mode 100644 index 0000000..94006d8 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerInfoRobot.h @@ -0,0 +1,123 @@ +#ifndef ARSERVERROBOTINFO_H +#define ARSERVERROBOTINFO_H + +#include "Aria.h" +#include "ArServerBase.h" + +class ArServerClient; + +/** Server component providing basic robot status information to clients. + * This service accepts the following data requests: + *
    + *
  • update
  • + *
  • physicalInfo
  • + *
  • batteryInfo
  • + *
  • activityTimeInfo
  • + *
+ * + * For bandwidth savings you should use updateNumbers + * and updateStrings instead of update. + * + * The update request returns data regarding the current + * state of the robot. + * It replies with the following data packet: + *
    + *
  1. Status (Null-terminated string)
  2. + *
  3. Mode (Null-terminated string)
  4. + *
  5. Battery voltage (times 10) (2 Byte integer)
  6. + *
  7. X position (4 byte floating point number)
  8. + *
  9. Y position (4 byte floating point number)
  10. + *
  11. Theta (2-byte floating point number)
  12. + *
  13. Forward velocity (2-byte integer)
  14. + *
  15. Rotation velocity (2-byte integer)
  16. + *
+ * + * The updateNumbers request returns data regarding the current + * state of the robot. + * It replies with the following data packet: + *
    + *
  1. Battery voltage (times 10) (2 Byte integer)
  2. + *
  3. X position (4 byte floating point number)
  4. + *
  5. Y position (4 byte floating point number)
  6. + *
  7. Theta (2-byte floating point number)
  8. + *
  9. Forward velocity (2-byte integer)
  10. + *
  11. Rotation velocity (2-byte integer)
  12. + *
+ * + * The updateStrings request broadcasts data regarding + * the current state of the robot. Request this at -1 to get the + * broadcasts and an initial packet with the inital data. + * It replies with the following data packet: + *
    + *
  1. Status (Null-terminated string)
  2. + *
  3. Mode (Null-terminated string)
  4. + *
+ * + * The physicalInfo request returns data regarding the physical characteristics of + * the robot. This information does not change during the robot execution. It replies with the + * following data packet: + *
    + *
  1. Robot type (Null-terminated string)
  2. + *
  3. Robot sub-type (Null-terminated string)
  4. + *
  5. Robot width in mm (2 byte integer)
  6. + *
  7. Robot front length - mm from center of rotation to front of robot (2 byte integer)
  8. + *
  9. Robot rear length - mm from center of rotation to back of robot (2 byte integer)
  10. + *
+ * + * The batteryInfo request replies with the following data packet: + *
    + *
  1. Warning voltage (double)
  2. + *
  3. Shutdown voltage (double)
  4. + *
+ * + * The activityTimeInfo request replies with the following data packet: + *
    + *
  1. Sec since - the ArServerMode::getActiveModeActivityTimeSecSince value (4-byte int)
  2. + *
+ * + * These requests are in the RobotInfo command group. + */ + +class ArServerInfoRobot +{ +public: + /// Constructor + AREXPORT ArServerInfoRobot(ArServerBase *server, ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArServerInfoRobot(); + /// The function that sends updates about the robot off to the client + AREXPORT void update(ArServerClient *client, ArNetPacket *packet); + /// The function that sends updates about the robot off to the client + AREXPORT void updateNumbers(ArServerClient *client, ArNetPacket *packet); + /// The function that sends updates about the robot off to the client + AREXPORT void updateStrings(ArServerClient *client, ArNetPacket *packet); + /// The function that sends battery info about the robot off to the client + AREXPORT void batteryInfo(ArServerClient *client, ArNetPacket *packet); + /// The function that sends information about the physical robot + AREXPORT void physicalInfo(ArServerClient *client, ArNetPacket *packet); + /// The function that sends information about the time that the server mode was last active + AREXPORT void activityTimeInfo(ArServerClient *client, ArNetPacket *packet); +protected: + ArServerBase *myServer; + ArRobot *myRobot; + + void userTask(void); + + std::string myStatus; + std::string myExtendedStatus; + std::string myMode; + std::string myOldStatus; + std::string myOldExtendedStatus; + std::string myOldMode; + + + ArFunctor2C myUpdateCB; + ArFunctor2C myUpdateNumbersCB; + ArFunctor2C myUpdateStringsCB; + ArFunctor2C myBatteryInfoCB; + ArFunctor2C myPhysicalInfoCB; + ArFunctor2C myActivityTimeInfoCB; + ArFunctorC myUserTaskCB; +}; + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerInfoSensor.h b/Legacy/Aria/ArNetworking/include/ArServerInfoSensor.h new file mode 100644 index 0000000..39e6c87 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerInfoSensor.h @@ -0,0 +1,65 @@ +#ifndef ARSERVERSENSORINFO_H +#define ARSERVERSENSORINFO_H + +#include "Aria.h" +#include "ArServerBase.h" + +class ArServerClient; + +/** Service providing clients with data from range sensors. + * This service accepts the following data requests: + *
    + *
  • getSensorList to get a list of all robot sensors
  • + *
  • getSensorCurrent to get one range sensor's set of current readings
  • + *
  • getSensorCumulative to get one range sensor's set of cumualtive readings
  • + *
+ * + * The getSensorList request replies with the following data packet: + *
    + *
  1. Number of sensors (2-byte integer) + *
  2. For each sensor: + *
    1. sensor name (Null-terminated string)
    + *
  3. + *
+ * + * The getSensorCurrent and getSensorCumulative + * requests must include the following data: + *
    + *
  1. Sensor name (Null-terminated string)
  2. + *
+ * + * The getSensorCurrent and getSensorCumulative + * requests reply with the following data packets: + *
    + *
  1. Number of readings, or -1 for invalid sensor name error (2-byte integer)
  2. + *
  3. Sensor name (null-terminated string)
  4. + *
  5. For each reading: + *
      + *
    1. X coordinate of reading (4-byte integer)
    2. + *
    3. Y coordinate of reading (4-byte integer)
    4. + *
    + *
  6. + *
+ * + * This service's requests are all in the SensorInfo group. + */ +class ArServerInfoSensor +{ +public: + AREXPORT ArServerInfoSensor(ArServerBase *server, ArRobot *robot); + AREXPORT virtual ~ArServerInfoSensor(); + AREXPORT void getSensorList(ArServerClient *client, ArNetPacket *packet); + AREXPORT void getSensorCurrent(ArServerClient *client, ArNetPacket *packet); + AREXPORT void getSensorCumulative(ArServerClient *client, + ArNetPacket *packet); +protected: + ArRobot *myRobot; + ArServerBase *myServer; + ArFunctor2C myGetSensorListCB; + ArFunctor2C myGetSensorCurrentCB; + ArFunctor2C myGetSensorCumulativeCB; + +}; + + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerInfoStrings.h b/Legacy/Aria/ArNetworking/include/ArServerInfoStrings.h new file mode 100644 index 0000000..6669d2f --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerInfoStrings.h @@ -0,0 +1,67 @@ +#ifndef ARSERVERHANDLERSTRINGS_H +#define ARSERVERHANDLERSTRINGS_H + +#include "Aria.h" +#include "ArServerBase.h" + +class ArServerClient; + +/** + This will set up strings to send to MobileEyes so that server + developers can easily add more information. There are different + ways ways you can add a string (they all are the same way + internally). The raw way is addString which takes a functor with a + buffer and a buffer len, the functor then has to fill in the string + when called. The other ways are set up for convenience and are + wrappers in this class around the addString, the other ways are + addStringInt, addStringDouble, addStringBool, these all take a + functor that returns the type and a format string (in addition to + the name and maxLen again). +**/ +class ArServerInfoStrings +{ +public: + /// Constructor + AREXPORT ArServerInfoStrings(ArServerBase *server); + /// Destructor + AREXPORT ~ArServerInfoStrings(); + /// Gets the information about the strings being sent + AREXPORT void netGetStringsInfo(ArServerClient *client, + ArNetPacket *packet); + /// Gets the strings + AREXPORT void netGetStrings(ArServerClient *client, + ArNetPacket *packet); + /// Adds a string to the list in the raw format + AREXPORT void addString(const char *name, ArTypes::UByte2 maxLen, + ArFunctor2 *functor); + /// Gets the functor for adding a string (for ArStringInfoGroup) + ArFunctor3 *> * + getAddStringFunctor(void) { return &myAddStringFunctor; } + + /// Gets a string info holder, for internal purposes + AREXPORT ArStringInfoHolder *internalGetStringInfoHolder(const char *name); + +protected: + ArServerBase *myServer; + + AREXPORT void buildStringsInfoPacket(void); + ArNetPacket myStringInfoPacket; + AREXPORT void buildStringsPacket(void); + ArNetPacket myStringPacket; + ArTime myLastStringPacketBuild; + + std::list myStrings; + ArTypes::UByte2 myMaxMaxLength; + ArMutex myStringsMutex; + ArFunctor3C *> myAddStringFunctor; + + ArFunctor2C myNetGetStringsInfoCB; + ArFunctor2C myNetGetStringsCB; + +}; + +#endif // ARSERVERHANDLERSTRINGS_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerMode.h b/Legacy/Aria/ArNetworking/include/ArServerMode.h new file mode 100644 index 0000000..2d2a175 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerMode.h @@ -0,0 +1,252 @@ +#ifndef ARSERVERMODE_H +#define ARSERVERMODE_H + +#include "Aria.h" +#include "ArServerBase.h" + +class ArServerModeIdle; +class ArServerClient; + +/// A mode for controlling the robot (only one active) + +/** + This is a lot like ArMode but for net control instead... + + Only one mode can control the robot at once, this is made to be + subclassed. Each subclass needs to implement activate and + deactivate, activate MUST call baseActivate and if baseActivate + returns false then the mode is NOT active and shouldn't do + anything. Further each class should set myMode and myStatus to the + mode its in and the things its doing... You can lock your mode in + with lockMode and unlock it with unlockMode but you should redefine + the inherited requestUnlock and unlock yourself and deactivate + gracefully. + + If you want to implement a server mode as a default mode then you also + need to implement checkDefault which will be called when nothing + else is active + + Note that there's a new mechanism in place where if you use + addModeData instead of addData on the ArServerBase the command will + be placed into a map of available modes with commands that can be + gotten by the client. The active mode and whether its locked and + will unlock and such can now be gotten too... this is all so that + different commands can be disabled in client GUIs when they aren't + available. +**/ +class ArServerMode +{ +public: + /// Constructor + AREXPORT ArServerMode(ArRobot *robot, ArServerBase *server, const char *name); + /// Destructor + AREXPORT virtual ~ArServerMode(); + /// This function should return the action group this mode uses + AREXPORT virtual ArActionGroup *getActionGroup(void) { return NULL; } + /** The function called when the mode is activated. Subclasses must implement + * this, but also call baseActivate().- + */ + AREXPORT virtual void activate(void) = 0; + /** The function called when the mode is deactivated. Subclasses must + * implement this, and also call baseDeactivate(). + */ + AREXPORT virtual void deactivate(void) = 0; + /// The function called if the mode is not activated because another mode superceded it. + AREXPORT virtual void activationDenied(void) {} + + /// The ArMode's user task, don't need one, subclass must provide if needed + AREXPORT virtual void userTask(void) {} + /// This will be called if another mode wants the lock broken (can ignore) + AREXPORT virtual void requestUnlock(void) { } + /// This will be called if another mode has to break the lock + AREXPORT virtual void forceUnlock(void); + /// Locks this mode in until its unlocked (mode must be the active mode) + AREXPORT void lockMode(bool willUnlockIfRequested = false); + /// Unlocks the mode so other modes can activate + AREXPORT void unlockMode(void); + /// Gets a string representing the mode we're in + AREXPORT const char *getMode(void) const { return myMode.c_str(); } + /// Gets a string representing the status of the mode we're in + AREXPORT const char *getStatus(void) const { return myStatus.c_str(); } + /// Gets a string representing the extended status of the mode we're + /// in + AREXPORT const char *getExtendedStatus(void) const { return myExtendedStatus.c_str(); } + /// Gets the active mode string + AREXPORT static const char *getActiveModeModeString(void); + /// Gets the active status string + AREXPORT static const char *getActiveModeStatusString(void); + /// Gets the active extended status string + AREXPORT static const char *getActiveModeExtendedStatusString(void); + /// Gets the name of the mode we're in + AREXPORT const char *getName(void) const { return myName.c_str(); } + /// Gets if this mode is active or not + AREXPORT bool isActive(void) const { return myIsActive; } + /// Gets if the active mode is locked or not + AREXPORT static bool isLocked(void); + /// Gets whether we'll unlock if requested or not + AREXPORT static bool willUnlockIfRequested(void); + /// Gets the active mode + AREXPORT static ArServerMode *getActiveMode(void); + /// Gets if we've set our activity time + AREXPORT bool hasSetActivityTime(void) { return myHasSetActivityTime; } + /// Gets the time of our last activity + AREXPORT ArTime getActivityTime(void); + /// Sets that we're active right now + AREXPORT void setActivityTimeToNow(void); + /// Gets the seconds since the activity of our active mode + AREXPORT static int getActiveModeActivityTimeSecSince(void); + /// Gets if the active mode set the activity time this cycle or not + AREXPORT static bool getActiveModeSetActivityThisCycle(void); + /// Sets this mode to default (so if a mode deactivates it activates this) + AREXPORT void addAsDefaultMode(ArListPos::Pos pos = ArListPos::LAST); + /// Sees if this wants to become the default mode + /** + This will be called when there would be no other modes, if this + mode wants to take over it should activate itself, if it doesn't + want to take over it shouldn't activate + **/ + AREXPORT virtual void checkDefault(void) {} + /// This should only be used by careful people and probably not then + AREXPORT void setMode(const char *str) { myMode = str; } + /// This should only be used by careful people and probably not then + /** + This changes the status of the mode and sets the + myStatusSetThisCycle to true. If the mode inheriting is setting + the status in cycles then it should use this status instead and + then clear the myStatusSetThisFlag to false. + **/ + AREXPORT void setStatus(const char *str) + { myStatus = str; myStatusSetThisCycle = true; } + /// Adds data to the list of this mode's commands + + + /// Returns whether the mode should be automatically resumed after it was interrupted + /** + * This method primarily applies when the mode has been interrupted by a + * forced docking situation. In that case, when the docking mode is complete, + * it will resume the interrupted mode -- if this method returns true. This + * would primarily be applicable to very long, complex modes. + * + * The default return value is false. + **/ + AREXPORT virtual bool isAutoResumeAfterInterrupt(); + + + AREXPORT bool addModeData( + const char *name, const char *description, + ArFunctor2 *functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup = NULL, const char *dataFlags = NULL); + /// Gets the list of data for each mode + AREXPORT static void getModeDataList(ArServerClient *client, + ArNetPacket *packet); + /// Gets the info about which mode is active and such + AREXPORT static void getModeInfo(ArServerClient *client, + ArNetPacket *packet); + /// Handles the packet request for the mode busy state. + AREXPORT static void getModeBusy(ArServerClient *client, + ArNetPacket *packet); + + /// Adds a callback for when this class is activated + void addActivateCallback( + ArFunctor *functor, int position = 50) + { myActivateCallbacks.addCallback(functor, position); } + /// Removes a callback for when this class is activated + void remActivateCallback(ArFunctor *functor) + { myActivateCallbacks.remCallback(functor); } + /// Adds a callback for when this class is deactivated + void addDeactivateCallback( + ArFunctor *functor, int position = 50) + { myDeactivateCallbacks.addCallback(functor, position); } + /// Removes a callback for when this class is deactivated + void remDeactivateCallback(ArFunctor *functor) + { myDeactivateCallbacks.remCallback(functor); } + + /// Adds a single shot callback for when this class is deactivated + void addSingleShotDeactivateCallback( + ArFunctor *functor, int position = 50) + { mySingleShotDeactivateCallbacks.addCallback(functor, position); } + /// Removes a single shot callback for when this class is deactivated + void remSingleShotDeactivateCallback(ArFunctor *functor) + { mySingleShotDeactivateCallbacks.remCallback(functor); } + + /// Call that gets our idle mode + AREXPORT static ArServerModeIdle *getIdleMode(void); +protected: + AREXPORT static void modeUserTask(void); + AREXPORT static void buildModeInfoPacket(ArNetPacket *packet); + AREXPORT static std::list *getRequestedActivateModes(void); + AREXPORT void checkBroadcastModeInfoPacket(void); + /** Activates this mode if it can (returns true if it can, false otherwise). + If we have an ArRobot instance (myRobot), then robot motion is stopped. + Activity time is reset, and activate callbacks are called. + */ + AREXPORT bool baseActivate(void); + /** Deactivates this mode. Deactivation callbacks are called. The next mode to + be activated is activated, if any. (E.g. the global default mode) + */ + AREXPORT void baseDeactivate(void); + + ArCallbackList myActivateCallbacks; + ArCallbackList myDeactivateCallbacks; + ArCallbackList mySingleShotDeactivateCallbacks; + + bool myIsActive; + ArRobot *myRobot; + ArServerBase *myServer; + std::string myName; + // inheritors will want to play with these two strings as they are + // what is shown to the user + std::string myMode; + std::string myStatus; + bool myStatusSetThisCycle; + std::string myExtendedStatus; + + // variables for activity time (so we can do things if idle) this + // isn't static so that each mode can have its own + // 'myHasSetActivityTime' so that if a mode doesn't use this scheme + // it doesn't get tromped on + bool myHasSetActivityTime; + bool mySetActivityThisCycle; + ArTime myActivityTime; + ArMutex myActivityTimeMutex; + + AREXPORT static bool ourActiveModeLocked; + AREXPORT static bool ourActiveModeWillUnlockIfRequested; + AREXPORT static ArServerMode *ourActiveMode; + AREXPORT static ArServerMode *ourNextActiveMode; + AREXPORT static ArServerMode *ourLastActiveMode; + AREXPORT static bool ourActiveModeSetActivityThisCycle; + + AREXPORT ArServerMode *getLastActiveMode(); + + AREXPORT static bool ourIsBusy; + AREXPORT static ArServerBase *ourServerBase; + + AREXPORT static std::list ourModes; + AREXPORT static std::list ourDefaultModes; + AREXPORT static std::list ourRequestedActivateModes; + AREXPORT static std::multimap ourModeDataMap; + AREXPORT static ArMutex ourModeDataMapMutex; + + AREXPORT static ArGlobalFunctor2 ourGetModeDataListCB; + AREXPORT static ArGlobalFunctor2 ourGetModeInfoCB; + AREXPORT static ArGlobalFunctor2 ourGetModeBusyCB; + + AREXPORT static bool ourBroadcastActiveModeLocked; + AREXPORT static ArServerMode *ourBroadcastActiveMode; + AREXPORT static bool ourBroadcastActiveModeWillUnlockIfRequested; + AREXPORT static ArGlobalFunctor ourUserTaskCB; + AREXPORT static bool ourUserTaskAdded; + // so we can easily just get the verbose out of this one + ArLog::LogLevel myVerboseLogLevel; + + AREXPORT static ArServerModeIdle *ourIdleMode; + AREXPORT static ArMutex ourIdleModeMutex; + AREXPORT static bool ourIdleModeCreated; +}; + +#endif // ARSERVERMODE_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerModeDrive.h b/Legacy/Aria/ArNetworking/include/ArServerModeDrive.h new file mode 100644 index 0000000..99ee56d --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerModeDrive.h @@ -0,0 +1,56 @@ +#ifndef ARSERVERMODEDRIVE_H +#define ARSERVERMODEDRIVE_H + +#include "ariaTypedefs.h" +#include "Aria.h" +#include "ArNetworking.h" +#include "ArServerMode.h" + +class ArServerModeDrive : public ArServerMode +{ +public: + AREXPORT ArServerModeDrive(ArServerBase *server, ArRobot *robot, + bool takeControlOnJoystick = false); + AREXPORT virtual ~ArServerModeDrive(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + /// This adds commands that'll let you disable and enable safe driving + AREXPORT void addControlCommands(ArServerHandlerCommands *handlerCommands); + AREXPORT void driveJoystick(double vel, + double rotVel, + bool isActivating = true); + AREXPORT void serverDriveJoystick(ArServerClient *client, + ArNetPacket *packet); + AREXPORT virtual void userTask(void); + AREXPORT void setThrottleParams(int lowSpeed, int highSpeed); + AREXPORT virtual ArActionGroup *getActionGroup(void) { return &myDriveGroup;} + AREXPORT void setSafeDriving(bool safe); + AREXPORT bool getSafeDriving(void); + /// this action will be activated in unsafe mode + AREXPORT void setExtraUnsafeAction(ArAction *action) + { myExtraUnsafeAction = action; } +protected: + AREXPORT void serverSafeDrivingEnable(void); + AREXPORT void serverSafeDrivingDisable(void); + AREXPORT void joyUserTask(void); + ArAction *myExtraUnsafeAction; + ArJoyHandler *myJoyHandler; + ArActionJoydrive myJoydriveAction; + ArActionInput *myInputAction; + ArActionStop myStopAction; + ArActionGroupInput myDriveGroup; + ArFunctor2C myServerDriveJoystickCB; + ArFunctorC myJoyUserTaskCB; + bool myDriveSafely; + bool myNewDriveSafely; + double myVel; + double myRotVel; + bool myTakeControlOnJoystick; + // for the simple commands + ArServerHandlerCommands *myHandlerCommands; + ArFunctorC myServerSafeDrivingEnableCB; + ArFunctorC myServerSafeDrivingDisableCB; +}; + + +#endif // ARNETMODEDRIVE_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerModeIdle.h b/Legacy/Aria/ArNetworking/include/ArServerModeIdle.h new file mode 100644 index 0000000..725ee08 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerModeIdle.h @@ -0,0 +1,43 @@ +#ifndef ARNETMODEIDLE_H +#define ARNETMODEIDLE_H + +#include "Aria.h" +#include "ArServerMode.h" + +/// Mode that the ArServerMode infrastructure will activate if someone +/// tries to switch from one mode to another and there's idle +/// processing to be done... +class ArServerModeIdle : public ArServerMode +{ +public: + /// Constructor + AREXPORT ArServerModeIdle(ArServerBase *server, ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArServerModeIdle(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + /// Gets the mode that this mode interrupted (or NULL if none) + AREXPORT void setModeInterrupted(ArServerMode *modeInterrupted); + /// Gets the mode that this mode interrupted (or NULL if it didn't interrupt anything) + AREXPORT ArServerMode *getModeInterrupted(void); + AREXPORT virtual ArActionGroup *getActionGroup(void) { return &myStopGroup; } + /// Adds to the config + AREXPORT void addToConfig(ArConfig *config, const char *section = "Teleop settings"); + /// Sets whether we're using the range devices that depend on location + AREXPORT void setUseLocationDependentDevices( + bool useLocationDependentDevices, bool internal = false); + /// Gets whether we're using the range devices that depend on location + AREXPORT bool getUseLocationDependentDevices(void); +protected: + ArActionDeceleratingLimiter *myLimiterForward; + ArActionDeceleratingLimiter *myLimiterBackward; + ArActionDeceleratingLimiter *myLimiterLateralLeft; + ArActionDeceleratingLimiter *myLimiterLateralRight; + ArActionGroupStop myStopGroup; + bool myUseLocationDependentDevices; + ArServerMode *myModeInterrupted; + ArFunctor2C myNetIdleCB; +}; + +#endif // ARNETMODEIDLE_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerModeRatioDrive.h b/Legacy/Aria/ArNetworking/include/ArServerModeRatioDrive.h new file mode 100644 index 0000000..c5705d5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerModeRatioDrive.h @@ -0,0 +1,132 @@ +#ifndef ARSERVERMODERATIODRIVE_H +#define ARSERVERMODERATIODRIVE_H + +#include "ariaTypedefs.h" +#include "Aria.h" +#include "ArServerMode.h" + +class ArServerHandlerCommands; + +class ArServerModeRatioDrive : public ArServerMode +{ +public: + /// Constructor + AREXPORT ArServerModeRatioDrive(ArServerBase *server, ArRobot *robot, + bool takeControlOnJoystick = true, + bool useComputerJoystick = true, + bool useRobotJoystick = true, + bool useServerCommands = true, + const char *name = "ratioDrive", + bool robotJoystickOverridesLocks = true); + /// Destructor + AREXPORT virtual ~ArServerModeRatioDrive(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + /// This adds commands that'll let you disable and enable safe driving + AREXPORT void addControlCommands(ArServerHandlerCommands *handlerCommands); + /// Sets the ratio drive action + AREXPORT void ratioDrive(double transRatio, + double rotRatio, + double throttleRatio, + bool isActivating = false, + double latRatio = 0); + /// Adds to a config in a section + AREXPORT void addToConfig(ArConfig *config, const char *section); + AREXPORT virtual void userTask(void); + AREXPORT virtual ArActionGroup *getActionGroup(void) { return &myRatioDriveGroup;} + ArActionRatioInput *getActionRatioInput(void) { return myRatioAction; } + /// Sets whether we're safe driving or not + AREXPORT void setSafeDriving(bool safe, bool internal = false); + /// Gets whether we're driving safely or not + AREXPORT bool getSafeDriving(void); + /// Sets whether we're using the range devices that depend on location + AREXPORT void setUseLocationDependentDevices( + bool useLocationDependentDevices, bool internal = false); + /// Gets whether we're using the range devices that depend on location + AREXPORT bool getUseLocationDependentDevices(void); + /// Adds a callback mode for when safe driving is activated + void addSafeDrivingCallback(ArFunctor *functor, int position = 50) + { mySafeDrivingCallbacks.addCallback(functor, position); } + /// Removes a callback mode for when safe driving is activated + void remSafeDrivingCallback(ArFunctor *functor) + { mySafeDrivingCallbacks.remCallback(functor); } + /// Adds a callback mode for when unsafe driving is activated + void addUnsafeDrivingCallback(ArFunctor *functor, int position = 50) + { myUnsafeDrivingCallbacks.addCallback(functor, position); } + /// Removes a callback mode for when unsafe driving is activated + void remUnsafeDrivingCallback(ArFunctor *functor) + { myUnsafeDrivingCallbacks.remCallback(functor); } + /// Adds a callback mode for when trying to back up + void addDrivingBackwardsCallback(ArFunctor *functor, int position = 50) + { myDrivingBackwardsCallbacks.addCallback(functor, position); } + /// Removes a callback mode for when trying to back up + void remDrivingBackwardsCallback(ArFunctor *functor) + { myDrivingBackwardsCallbacks.remCallback(functor); } + +protected: + AREXPORT void serverRatioDrive(ArServerClient *client, + ArNetPacket *packet); + AREXPORT void serverSetSafeDrive(ArServerClient *client, + ArNetPacket *packet); + AREXPORT void serverGetSafeDrive(ArServerClient *client, + ArNetPacket *packet); + AREXPORT void serverSafeDrivingEnable(void); + AREXPORT void serverSafeDrivingDisable(void); + AREXPORT void ratioFireCallback(void); + AREXPORT void joyUserTask(void); + ArJoyHandler *myJoyHandler; + ArRobotJoyHandler *myRobotJoyHandler; + + bool myTakeControlOnJoystick; + bool myUseComputerJoystick; + bool myUseRobotJoystick; + bool myUseServerCommands; + bool myPrinting; + bool myRobotJoystickOverridesLock; + double myTransRatio; + double myRotRatio; + double myThrottleRatio; + double myLatRatio; + + double myTimeout; + + bool myGotServerCommand; + bool myLastTimedOut; + + ArActionDeceleratingLimiter *myLimiterForward; + ArActionDeceleratingLimiter *myLimiterBackward; + ArActionDeceleratingLimiter *myLimiterLateralLeft; + ArActionDeceleratingLimiter *myLimiterLateralRight; + ArRatioInputJoydrive *myJoydrive; + ArRatioInputRobotJoydrive *myRobotJoydrive; + ArActionRatioInput *myRatioAction; + ArActionMovementParameters *myMovementParameters; + ArActionGroup myRatioDriveGroup; + bool myDriveSafely; + bool myNewDriveSafely; + bool myUseLocationDependentDevices; + bool myLastRobotSafeDrive; + + ArTime myLastCommand; + + // SEEKUR + bool mySentRecenter; + + ArCallbackList mySafeDrivingCallbacks; + ArCallbackList myUnsafeDrivingCallbacks; + ArCallbackList myDrivingBackwardsCallbacks; + + ArFunctorC myJoyUserTaskCB; + ArFunctor2C myServerSetSafeDriveCB; + ArFunctor2C myServerGetSafeDriveCB; + ArFunctor2C myServerRatioDriveCB; + ArFunctorC myRatioFireCB; + + // for the simple commands + ArServerHandlerCommands *myHandlerCommands; + ArFunctorC myServerSafeDrivingEnableCB; + ArFunctorC myServerSafeDrivingDisableCB; +}; + + +#endif // ARNETMODERATIODRIVE_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerModeStop.h b/Legacy/Aria/ArNetworking/include/ArServerModeStop.h new file mode 100644 index 0000000..96b7a0b --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerModeStop.h @@ -0,0 +1,37 @@ +#ifndef ARNETMODESTOP_H +#define ARNETMODESTOP_H + +#include "Aria.h" +#include "ArServerMode.h" + +class ArServerModeStop : public ArServerMode +{ +public: + AREXPORT ArServerModeStop(ArServerBase *server, ArRobot *robot, + bool defunct = false); + AREXPORT virtual ~ArServerModeStop(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT void stop(void); + AREXPORT void netStop(ArServerClient *client, ArNetPacket *packet); + AREXPORT virtual void userTask(void); + AREXPORT virtual void checkDefault(void) { activate(); } + AREXPORT virtual ArActionGroup *getActionGroup(void) { return &myStopGroup; } + /// Adds to the config + AREXPORT void addToConfig(ArConfig *config, const char *section = "Teleop settings"); + /// Sets whether we're using the range devices that depend on location + AREXPORT void setUseLocationDependentDevices( + bool useLocationDependentDevices, bool internal = false); + /// Gets whether we're using the range devices that depend on location + AREXPORT bool getUseLocationDependentDevices(void); +protected: + ArActionDeceleratingLimiter *myLimiterForward; + ArActionDeceleratingLimiter *myLimiterBackward; + ArActionDeceleratingLimiter *myLimiterLateralLeft; + ArActionDeceleratingLimiter *myLimiterLateralRight; + ArActionGroupStop myStopGroup; + bool myUseLocationDependentDevices; + ArFunctor2C myNetStopCB; +}; + +#endif // ARNETMODESTOP_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerModeWander.h b/Legacy/Aria/ArNetworking/include/ArServerModeWander.h new file mode 100644 index 0000000..e506bc3 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerModeWander.h @@ -0,0 +1,26 @@ +#ifndef ARNETMODEWANDER_H +#define ARNETMODEWANDER_H + +#include "ariaTypedefs.h" +#include "Aria.h" +#include "ArNetworking.h" +#include "ArServerMode.h" + +class ArServerModeWander : public ArServerMode +{ +public: + AREXPORT ArServerModeWander(ArServerBase *server, ArRobot *robot); + AREXPORT virtual ~ArServerModeWander(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT void wander(void); + AREXPORT void netWander(ArServerClient *client, ArNetPacket *packet); + AREXPORT virtual void userTask(void); + AREXPORT virtual void checkDefault(void) { activate(); } + AREXPORT virtual ArActionGroup *getActionGroup(void) {return &myWanderGroup;} +protected: + ArActionGroupWander myWanderGroup; + ArFunctor2C myNetWanderCB; +}; + +#endif // ARNETMODEWANDER_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerSimpleCommands.h b/Legacy/Aria/ArNetworking/include/ArServerSimpleCommands.h new file mode 100644 index 0000000..20b5bd7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerSimpleCommands.h @@ -0,0 +1,301 @@ +#ifndef ARSERVERSIMPLECOMMANDS_H +#define ARSERVERSIMPLECOMMANDS_H + +#include "Aria.h" +#include "ArServerBase.h" +#include "ArServerHandlerCommands.h" +#include "ArServerHandlerPopup.h" + +/// Class for sending commands to the microcontroller (uC) +/** + This class will let you send commands to the microcontroller (com, + comInt, and com2Bytes). + **/ +class ArServerSimpleComUC +{ +public: + /// Constructor + AREXPORT ArServerSimpleComUC(ArServerHandlerCommands *handlerCommands, + ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArServerSimpleComUC(); + /// Handles the command + AREXPORT void command(ArArgumentBuilder *arg); + /// Handles the motor commands + AREXPORT void motionCommand(ArArgumentBuilder *arg); +protected: + void processCommand(ArArgumentBuilder *arg, bool motionCommand); + ArRobot *myRobot; + ArServerHandlerCommands *myHandlerCommands; + ArFunctor1C myCommandCB; + ArFunctor1C myMotionCommandCB; +}; + +/// Class for enabling or disabling logging of movement commands and data +/** + This just calls ArRobot::setLogMovementSent and + ArRobot::setLogLovementReceived. It makes these available for easy + enabling or disabling on the client side. +**/ +class ArServerSimpleComMovementLogging +{ +public: + /// Constructor + AREXPORT ArServerSimpleComMovementLogging( + ArServerHandlerCommands *handlerCommands, ArRobot *robot, + ArServerHandlerPopup *popupHandler = NULL); + /// Destructor + AREXPORT virtual ~ArServerSimpleComMovementLogging(); + /// Enable logging of movement commands sent to the robot + AREXPORT void logMovementSentEnable(void); + /// Disable logging of movement commands sent to the robot + AREXPORT void logMovementSentDisable(void); + /// Enable logging of movement received from the robot + AREXPORT void logMovementReceivedEnable(void); + /// Disable logging of movement received from the robot + AREXPORT void logMovementReceivedDisable(void); + /// Enable logging of velocities received from the robot + AREXPORT void logVelocitiesReceivedEnable(void); + /// Disable logging of velocities received from the robot + AREXPORT void logVelocitiesReceivedDisable(void); + /// Enable tracking of packets from the robot + AREXPORT void packetsReceivedTrackingEnable(void); + /// Disable tracking of packets from the robot + AREXPORT void packetsReceivedTrackingDisable(void); + /// Enable tracking of packets from the robot + AREXPORT void packetsSentTrackingEnable(void); + /// Disable tracking of packets from the robot + AREXPORT void packetsSentTrackingDisable(void); + /// Enable logging of velocities received from the robot + AREXPORT void logActionsEnable(void); + /// Disable logging of velocities received from the robot + AREXPORT void logActionsDisable(void); + /// Log the status of the actions on the robot + AREXPORT void logActions(void); + /// Popups up the movement parameters + AREXPORT void popupMovementParams(void); + /// Resets the odometer + AREXPORT void resetOdometer(void); +protected: + ArRobot *myRobot; + ArServerHandlerCommands *myHandlerCommands; + ArServerHandlerPopup *myPopupHandler; + + ArFunctorC myLogMovementSentEnableCB; + ArFunctorC myLogMovementSentDisableCB; + ArFunctorC myLogMovementReceivedEnableCB; + ArFunctorC myLogMovementReceivedDisableCB; + ArFunctorC myLogVelocitiesReceivedEnableCB; + ArFunctorC myLogVelocitiesReceivedDisableCB; + ArFunctorC myPacketsReceivedTrackingEnableCB; + ArFunctorC myPacketsReceivedTrackingDisableCB; + ArFunctorC myPacketsSentTrackingEnableCB; + ArFunctorC myPacketsSentTrackingDisableCB; + ArFunctorC myLogActionsEnableCB; + ArFunctorC myLogActionsDisableCB; + + ArFunctorC myLogActionsCB; + ArFunctorC myPopupMovementParamsCB; + ArFunctorC myResetOdometerCB; +}; + +/// Class for enabling or disabling the gyro +/** + This just calls ArAnalogGyro::activate and + ArAnalogGyro::deactivate. If you want to see the gyro data if you + use the robot's movement received (either + ArRobot::setLogMovementReceived or use + ArServerSimpleComMovementLogging) +**/ +class ArServerSimpleComGyro +{ +public: + /// Constructor + AREXPORT ArServerSimpleComGyro( + ArServerHandlerCommands *handlerCommands, ArRobot *robot, + ArAnalogGyro *gyro); + /// Destructor + AREXPORT virtual ~ArServerSimpleComGyro(); + /// Enables the gyro + AREXPORT void gyroEnable(void); + /// Disables the gyro + AREXPORT void gyroDisable(void); +protected: + ArRobot *myRobot; + ArAnalogGyro *myGyro; + ArServerHandlerCommands *myHandlerCommands; + ArFunctorC myGyroEnableCB; + ArFunctorC myGyroDisableCB; +}; + + +/// Request configuration from robot controller and log the result +class ArServerSimpleComLogRobotConfig +{ +public: + AREXPORT ArServerSimpleComLogRobotConfig( + ArServerHandlerCommands *commands, ArRobot* robot, + ArServerHandlerPopup *popupHandler = NULL); + AREXPORT void logConfig(void); + AREXPORT void logMovementConfig(void); + AREXPORT void logOrigConfig(void); + AREXPORT void popupConfig(void); + AREXPORT void popupOrigConfig(void); + AREXPORT void popupMovementConfig(void); +private: + void configPacketArrived(void); + ArServerHandlerCommands *myHandlerCommands; + ArRobot* myRobot; + ArServerHandlerPopup *myPopupHandler; + + bool myLogConfig; + bool myPopupConfig; + bool myLogConfigMovement; + bool myPopupConfigMovement; + + + ArFunctorC myPacketArrivedCB; + ArRobotConfigPacketReader myPacketReader; + ArFunctorC myLogConfigCB; + ArFunctorC myLogMovementConfigCB; + ArFunctorC myLogOrigConfigCB; + ArFunctorC myPopupConfigCB; + ArFunctorC myPopupOrigConfigCB; + ArFunctorC myPopupMovementConfigCB; +}; + +/// Log current ArRobot actions. +class ArServerSimpleComLogActions +{ +public: + AREXPORT ArServerSimpleComLogActions(ArServerHandlerCommands *commands, ArRobot* robot); + AREXPORT void logActions(); +private: + ArRobot* myRobot; + ArFunctorC myCallback; +}; + +class ArServerSimpleServerCommands +{ +public: + AREXPORT ArServerSimpleServerCommands( + ArServerHandlerCommands *commands, ArServerBase *server, + bool addLogConnections = true); + AREXPORT virtual ~ArServerSimpleServerCommands(); + AREXPORT void logTerseTracking(void); + AREXPORT void logVerboseTracking(void); + AREXPORT void resetTracking(void); + AREXPORT void logConnections(void); +private: + ArServerBase *myServer; + ArFunctorC myTerseTrackingCB; + ArFunctorC myVerboseTrackingCB; + ArFunctorC myResetTrackingCB; + ArFunctorC myLogConnectionsCB; + +}; + +/// Class for sending popups out the server +/** + This class will let you make a popup in MobileEyes, mostly for testing + **/ +class ArServerSimplePopup +{ +public: + /// Constructor + AREXPORT ArServerSimplePopup(ArServerHandlerCommands *commands, + ArServerHandlerPopup *popupHandler); + /// Destructor + AREXPORT virtual ~ArServerSimplePopup(); + /// Handles the command + AREXPORT void simplePopup(ArArgumentBuilder *arg); +protected: + ArServerHandlerCommands *myCommands; + ArServerHandlerPopup *myPopupHandler; + ArFunctor1C mySimplePopupCB; +}; + +/// Class that logs a special debug packet from the robot +class ArServerSimpleLogRobotDebugPackets +{ +public: + /// Constructor + AREXPORT ArServerSimpleLogRobotDebugPackets( + ArServerHandlerCommands *commands, ArRobot *robot, + const char *baseDirectory = ""); + /// Destructor + AREXPORT virtual ~ArServerSimpleLogRobotDebugPackets(); + /// Starts the logging + AREXPORT bool startLogging( + const char *fileName = "robotDebugPacketsLog.txt"); + /// Ends the logging + AREXPORT bool stopLogging(void); + /// Internal function that parses the packet + AREXPORT bool packetHandler(ArRobotPacket *packet); + /// Adds the robot debug info to the info group + AREXPORT void addToInfoGroup(ArStringInfoGroup *infoGroup, + const char *name, int whichVal, + const char *format = "%d"); + /// Gets the number of values there are + AREXPORT int getNumValues(void); + /// Gets a particular value + AREXPORT int getValue(int whichVal); +protected: + ArRobot *myRobot; + ArServerHandlerCommands *myCommands; + // the file we write to, if its NULL we're not logging + FILE *myFile; + std::string myBaseDir; + std::map myVals; + int myNumVals; + ArRetFunctor1C myPacketHandlerCB; + ArRetFunctor1C myStartLoggingCB; + ArRetFunctorC myStopLoggingCB; +}; + + +/// Class for sending commands to the microcontroller (uC) +/** + This class will let you send commands to the microcontroller (com, + comInt, and com2Bytes). + **/ +class ArServerSimpleConnectionTester +{ +public: + /// Constructor + AREXPORT ArServerSimpleConnectionTester( + ArServerHandlerCommands *handlerCommands, ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArServerSimpleConnectionTester(); + /// Handles the command + AREXPORT void connectionTestStart(void); + /// Handles the motor commands + AREXPORT void connectionTestStop(void); +protected: + ArRobot *myRobot; + ArServerHandlerCommands *myHandlerCommands; + + bool packetHandler(ArRobotPacket *packet); + void userTask(void); + void log(void); + + bool myFirst; + int myReceivedPackets; + int myMissedPackets; + int myMissedMotorPackets; + int myPacketsThisCycle; + int myCyclesSincePacket; + ArTime myPacketReceived; + ArTime myLastLog; + + ArFunctorC myConnectionTestStartCB; + ArFunctorC myConnectionTestStopCB; + ArRetFunctor1C myPacketHandlerCB; + ArFunctorC myUserTaskCB; +}; + + +#endif diff --git a/Legacy/Aria/ArNetworking/include/ArServerSimpleOpener.h b/Legacy/Aria/ArNetworking/include/ArServerSimpleOpener.h new file mode 100644 index 0000000..5518680 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerSimpleOpener.h @@ -0,0 +1,103 @@ +#ifndef ARSERVERSIMPLEOPENER_H +#define ARSERVERSIMPLEOPENER_H + +#include "Aria.h" + +class ArServerBase; + +/** + @brief Set up and open an ArNetworking server + + Some program command line options affect behavior: + @verbinclude ArServerSimpleOpener_options + + To set the + port the server uses use '-serverPort serverPortNumber' or + '-sp serverPortNumber'. To set the file to look in for user + information use '-userInfo fileName' or "-ui + fileName'. To log out the user information use + '-logUserInfo' or 'lui'. To log out the command groups use + '-logCommandGroups' or '-lcg'. To set the key used for the server + (that the client has to know to connect if using user and password) + use '-serverInfoFile file'. With a file that has in it + 'serverKey serverKey'. You should obviously make sure no one you + don't want to know that server key can read your file that it is + in. + + For more details about all of these options see ArServerBase. + + @sa ArServerBase +**/ +class ArServerSimpleOpener +{ +public: + /// Constructor + AREXPORT ArServerSimpleOpener(ArArgumentParser *parser, + const char *prefix = "", + bool addAriaCallbacks = true); + /// Destructor + AREXPORT ~ArServerSimpleOpener(); + /// Function to open up the server + AREXPORT bool open(ArServerBase *server, const char *baseDirectory = "", + int secondsToTryFor = 240); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Logs the things requested for logging, may check things later + AREXPORT bool checkAndLog(void) const; + /// Returns true if the open failed because of a bad user file + bool wasUserFileBad(void) { return myBadUserFile; } + /// Returns true if the open failed because it couldn't open + bool didOpenFail(void) { return myOpenFailed; } + /** Get the server's port number + * @return the server's port number + */ + int getPort() { return myServerPort; } + + /** Set default server port number (normally 7272). This must be called before + * parsing command line arguments. + * @since 2.7.6 + */ + void setDefaultPort(int port) { myServerPort = port; } + + /// Parses the file for holding the server key + AREXPORT bool parseFile(const char *fileName); + /// Sets the tcpOnly flag + void setServerTcpOnly(bool serverTcpOnly) { myTcpOnly = serverTcpOnly; } +protected: + AREXPORT bool parseArgsWithOutPrefix(ArArgumentParser *parser); + AREXPORT bool parseArgsWithPrefix(ArArgumentParser *parser); + AREXPORT void logOptionsWithOutPrefix(void) const; + AREXPORT void logOptionsWithPrefix(void) const; + + bool fileServerKeyCallback(ArArgumentBuilder *arg); + + void reset(void); + const char *myUserFile; + //const char *myServerKey; + std::string myServerKey; + int myServerPort; + const char *myOpenOnIP; + ArServerBase *myServer; + bool myLogUserInfo; + bool myLogCommandGroups; + bool myTcpOnly; + bool myBadUserFile; + bool myOpenFailed; + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + std::string myPrefix; + + // file parser for the server key file + ArFileParser myFileParser; + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; + ArRetFunctor1C myFileServerKeyCB; +}; + +#endif // ARSERVERSIMPLEOPENER_H diff --git a/Legacy/Aria/ArNetworking/include/ArServerUserInfo.h b/Legacy/Aria/ArNetworking/include/ArServerUserInfo.h new file mode 100644 index 0000000..fb9ee59 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArServerUserInfo.h @@ -0,0 +1,71 @@ +#ifndef ARSERVERUSERINFO_H +#define ARSERVERUSERINFO_H + +#include "Aria.h" + +/// This class holds information about users and loads it from a file +/** + For a description of the algorithm used to match passwords and keys + and all look at the documentation for ArServerBase. + + The file format for this class is set up to be easy to make a new + version of and yet read all the old versions. + + For all of the versions everything after ; or # is ignored. The + version information is then the first line of non comments. + + The first version is described as such: The version string is + 'UserInfoVersion1'. Then there are lines that follow for each user + which are 'user userName password groups'. The passwords are + plain text in the file, though they aren't sent that way over the + network (look at ArServerBase docs for details). + To display the groups available use ArServerBase::logCommandGroups(). + + There is an example user info file in ArNetworking/examples/serverDemo.userInfo + +**/ +class ArServerUserInfo +{ +public: + /// Constructor + AREXPORT ArServerUserInfo(const char *baseDirectory = NULL); + /// Destructor + AREXPORT ~ArServerUserInfo(); + /// Loads the file, returns false if it wasn't there + AREXPORT bool readFile(const char *fileName); + /// Sets the base directory + AREXPORT void setBaseDirectory(const char *baseDirectory); + /// Matchs a user and password, false if user or password is wrong + AREXPORT bool matchUserPassword(const char *user, unsigned char password[16], + const char *passwordKey, + const char *serverKey, + bool logFailureVerbosely = false) const; + AREXPORT bool doNotUse(void) const; + /// Gets the groups a user is in (returns empty set if no user) + AREXPORT std::set getUsersGroups( + const char *user) const; + /// Logs the users and groups + AREXPORT void logUsers(void) const; +protected: + bool v1HeaderCallback(ArArgumentBuilder * arg); + bool v1UserCallback(ArArgumentBuilder * arg); + bool v1DoNotUseCallback(ArArgumentBuilder * arg); + void removeHandlers(void); + void logDigest(unsigned char digest[16]) const; + + ArMutex myDataMutex; + std::map myPasswords; + std::map *, + ArStrCaseCmpOp> myGroups; + ArRetFunctor1C myV1HeaderCB; + ArRetFunctor1C myV1UserCB; + ArRetFunctor1C myV1DoNotUseCB; + std::string myBaseDirectory; + ArFileParser myParser; + bool myGotHeader; + bool myDoNotUse; + bool myLogFailureVerbosely; + +}; + +#endif // ARSERVERUSERINFO_H diff --git a/Legacy/Aria/ArNetworking/include/ArTempDirectoryHelper.h b/Legacy/Aria/ArNetworking/include/ArTempDirectoryHelper.h new file mode 100644 index 0000000..354f957 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/ArTempDirectoryHelper.h @@ -0,0 +1,75 @@ +#ifndef ARTEMPDIRECTORYHELPER_H +#define ARTEMPDIRECTORYHELPER_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" + +/// Helper class that manages the transition of temporary files to the base directory. +class ArTempDirectoryHelper +{ +public: + + /// Constructor + AREXPORT ArTempDirectoryHelper(const char *baseDirectory = "", + const char *tempDirectory = ""); + + /// Destructor + AREXPORT virtual ~ArTempDirectoryHelper(); + + + /// Returns the name of the directory for temporary files. + AREXPORT const char *getTempDirectory(); + /// Returns the name of the target base directory. + AREXPORT const char *getBaseDirectory(); + + + /// Creates a complete file path name for the specified file in the temporary directory. + AREXPORT std::string makeTempFilePathName(const char *fileName); + + /// Creates a complete file path name for the specified file in the base directory. + AREXPORT std::string makeBaseFilePathName(const char *fileName); + + + /// Moves the specified file from the temporary directory to the base directory. + AREXPORT bool moveFileToBaseDirectory(const char *fileName); + + /// Moves the specified files from the temporary directory to the base directory. + AREXPORT bool moveFilesToBaseDirectory + (const std::list &fileNameList); + + + /// Adds a callback to be called before moving from temp dir to base dir + AREXPORT void addPreMoveCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called before moving from temp dir to base dir + AREXPORT void remPreMoveCallback(ArFunctor *functor); + /// Adds a callback to be called after moving from temp dir to base dir + AREXPORT void addPostMoveCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback to be called after moving from temp dir to base dir + AREXPORT void remPostMoveCallback(ArFunctor *functor); + + +protected: + + /// Creates a complete file path name for the specified file and directory. + AREXPORT std::string makeFilePathName(const char *fileName, + const char *dirName); + +protected: + + /// Path name of the base directory + std::string myBaseDirectory; + /// Path name of the temporary directory + std::string myTempDirectory; + + /// List of callbacks invoked before the files are moved + std::list myPreMoveCallbacks; + /// List of callbacks invoked after the files are moved + std::list myPostMoveCallbacks; + +}; // end class ArTempDirectoryHelper + +#endif // ARTEMPDIRECTORYHELPER_H + + diff --git a/Legacy/Aria/ArNetworking/include/md5.h b/Legacy/Aria/ArNetworking/include/md5.h new file mode 100644 index 0000000..d42b62e --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/md5.h @@ -0,0 +1,104 @@ +/* + This is the software we use for doing the md5 checksums, its from + http://sourceforge.net/project/showfiles.php?group_id=42360 +*/ + +/* + Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.h is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Removed support for non-ANSI compilers; removed + references to Ghostscript; clarified derivation from RFC 1321; + now handles byte order either statically or dynamically. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); + added conditionalization for C++ compilation from Martin + Purschke . + 1999-05-03 lpd Original version. + */ + +#ifndef md5_INCLUDED +# define md5_INCLUDED + +/* + * This package supports both compile-time and run-time determination of CPU + * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be + * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is + * defined as non-zero, the code will be compiled to run only on big-endian + * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to + * run on either big- or little-endian CPUs, but will run slightly less + * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. + */ + +typedef unsigned char md5_byte_t; /* 8-bit byte */ +typedef unsigned int md5_word_t; /* 32-bit word */ + +/* Define the state of the MD5 Algorithm. */ +typedef struct md5_state_s { + md5_word_t count[2]; /* message length in bits, lsw first */ + md5_word_t abcd[4]; /* digest buffer */ + md5_byte_t buf[64]; /* accumulate block */ +} md5_state_t; + +// MPL (ActivMedia) taking out the extern since its only being used in c++ +/* +#ifdef __cplusplus +extern "C" +{ +#endif +*/ + +// RH (ActivMedia/MobileRobots) Added "AREXPORT" symbol to all public functions. On Windows, this must be defined +// to either import or export the symbols to/from DLLs. On other platforms, it should be defined to be nothing. + +/* Initialize the algorithm. */ +AREXPORT void md5_init(md5_state_t *pms); + +/* Append a string to the message. */ +AREXPORT void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); + +/* Finish the message and return the digest. */ +AREXPORT void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); + +/// MPL (ActivMedia) taking out the extern since its only being used in c++ +/* +#ifdef __cplusplus +} // end extern "C" +#endif +*/ + +#endif /* md5_INCLUDED */ diff --git a/Legacy/Aria/ArNetworking/include/wrapper.i b/Legacy/Aria/ArNetworking/include/wrapper.i new file mode 100644 index 0000000..3863896 --- /dev/null +++ b/Legacy/Aria/ArNetworking/include/wrapper.i @@ -0,0 +1,268 @@ +/* SWIG Wrapper for ArNetworking */ + +#ifdef SWIGPYTHON +%module(docstring="Python wrapper library for ArNetworking", directors="1") ArNetworkingPy +#else +# ifdef SWIGJAVA +%module(docstring="Java wrapper library for ArNetworking", directors="1") ArNetworkingJava +# else +%module(docstring="Wrapper library for ArNetworking", directors="1") ArNetworking +# endif +#endif + +#ifdef SWIGIMPORTED +#warning Imported ArNetworking wrapper +#endif + +%feature("autodoc", "1"); +/* +%feature("directors", "1");*/ /* Enable on all classes. */ + +%{ +#include +#include "Aria.h" +#include "ArNetworking.h" +#include "../include/wrapper_ExtraClasses.h" +%} +%warnfilter(451) ArUtil; + + +/* Import all of Aria's wrapper classes */ +#ifndef SWIG_IMPORTED_ARIA +#warning ArNetworking importing ARIA wrapper configuration... +%import ../include/wrapper.i +#define SWIG_IMPORTED_ARIA 1 +#endif + + +/* In Java, we need to import the Aria package's namespace */ +%typemap(javaimports) SWIGTYPE %{import com.mobilerobots.Aria.*;%} +%pragma(java) jniclassimports=%{import com.mobilerobots.Aria.*; %} +%pragma(java) moduleimports=%{import com.mobilerobots.Aria.*; %} + + +/* In Java, we need to override how SWIG defines some methods in the wrappers, + * to be public not protected (the defaut javabody typemap is defined in + * java.swg) so that other packages such as ArNetworking and ARNL can access them: + */ +%typemap(javabody) SWIGTYPE %{ + private long swigCPtr; + protected boolean swigCMemOwn; + + /* for internal use by swig only */ + public $javaclassname(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + /* for internal use by swig only */ + public static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +%} + +%typemap(javabody_derived) SWIGTYPE %{ + private long swigCPtr; + + /* for internal use by swig only */ + public $javaclassname(long cPtr, boolean cMemoryOwn) { + super($imclassname.SWIG$javaclassnameUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + /* for internal use by swig only */ + public static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +%} + + +%typemap(javabody) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{ + private long swigCPtr; + + /* for internal use by swig only */ + public $javaclassname(long cPtr, boolean bFutureUse) { + swigCPtr = cPtr; + } + + protected $javaclassname() { + swigCPtr = 0; + } + + /* for internal use by swig only */ + public static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +%} + + + +/* In Python, use typemaps to convert functions to functors: */ +#ifdef SWIGPYTHON +%{ + #include "../include/wrapper_Functors.h" + + class ArPyFunctor_ServerData : + public ArFunctor2 + { + protected: + PyObject *pyFunction; + public: + ArPyFunctor_ServerData(PyObject* _f) : + pyFunction(_f), + ArFunctor2() + { + Py_INCREF(pyFunction); + } + + ~ArPyFunctor_ServerData() { + Py_DECREF(pyFunction); + } + + virtual void invoke() { + Py_FatalError("ArPyFunctor_ServerData (for ) invoked with no arguments!"); + } + + virtual void invoke(ArServerClient *cli) { + Py_FatalError("ArPyFunctor_ServerData must be invoked with exactly 2 arguments (ArServerClient*, ArNetPacket*), 1 given."); + } + + virtual void invoke(ArServerClient *cli, ArNetPacket *pkt) + { + PyObject *args = PyTuple_New(2); + PyObject *cliObj = SWIG_Python_NewPointerObj(cli, SWIGTYPE_p_ArServerClient, 0); + PyObject *pktObj = SWIG_Python_NewPointerObj(pkt, SWIGTYPE_p_ArNetPacket, 0); + PyTuple_SetItem(args, 0, cliObj); + PyTuple_SetItem(args, 1, pktObj); + PyObject *r = PyObject_CallObject(pyFunction, args); + if(!r) + { + fputs("** ArPyFunctor_ServerData: Error calling Python function: ", stderr); + PyErr_Print(); + } + Py_DECREF(args); + } + + virtual const char* getName() { + return (const char*) PyString_AsString(PyObject_Str(pyFunction)); + } + }; + + + class ArPyFunctor_NetPacket: + public ArFunctor1, + ArPyFunctor + { + public: + ArPyFunctor_NetPacket(PyObject* f) : ArFunctor1(), ArPyFunctor(f) + { + } + + virtual void invoke() + { + Py_FatalError("ArPyFonctor_NetPacket (for ) invoked with no arguments!"); + } + + virtual void invoke(ArNetPacket* pkt) + { + PyObject *args = PyTuple_New(1); + PyObject *pktObj = SWIG_Python_NewPointerObj(pkt, SWIGTYPE_p_ArNetPacket, 0); + PyTuple_SetItem(args, 0, pktObj); + PyObject *r = PyObject_CallObject(pyFunction, args); + if(!r) + { + fputs("** ArPyFunctor_NetPacket: Error calling python function: ", stderr); + PyErr_Print(); + } + Py_DECREF(args); + } + + virtual const char* getName() { + return ArPyFunctor::getName(); + } + }; +%} + + +%typemap(in) ArFunctor2* { + $1 = new ArPyFunctor_ServerData($input); // XXX memory leak +} + +%typecheck(SWIG_TYPECHECK_POINTER) ArFunctor2* { + $1 = PyCallable_Check($input); +} + +%typemap(in) ArFunctor1* { + $1 = new ArPyFunctor_NetPacket($input); // XXX memory leak +} + +%typecheck(SWIG_TYPECHECK_POINTER) ArFunctor1* { + $1 = PyCallable_Check($input); +} + + +#endif //SWIGPYTHON + +/* But in Java, just name the functor templates and enable directors so you can subclass them: */ +#ifdef SWIGJAVA +%feature("director") ArFunctor1; +%feature("director") ArFunctor1; +%feature("director") ArFunctor2; +%template(ArFunctor_ServerClient) ArFunctor1; +%template(ArFunctor_NetPacket) ArFunctor1; +%template(ArFunctor_ServerData) ArFunctor2; +#endif + + + +/* include files */ +/* Don't include md5.h */ + +/* base classes */ +%include "ArNetPacket.h" +%include "ArServerBase.h" +%include "ArServerMode.h" + +/* derived classes */ +%include "ArClientArgUtils.h" +%include "ArClientBase.h" +%include "ArClientCommands.h" +%include "ArClientData.h" +%include "ArClientFileUtils.h" +%include "ArClientHandlerConfig.h" +%include "ArClientSimpleConnector.h" +%include "ArHybridForwarderVideo.h" +%include "ArNetPacketReceiverTcp.h" +%include "ArNetPacketReceiverUdp.h" +%include "ArNetPacketSenderTcp.h" +%include "ArServerClient.h" +%include "ArServerClientIdentifier.h" +%include "ArServerClientData.h" +%include "ArServerCommands.h" +%include "ArServerData.h" +#ifndef WIN32 +%include "ArServerFileUtils.h" +#endif +%include "ArServerHandlerCamera.h" +%include "ArServerHandlerCameraCollection.h" +%include "ArServerHandlerCommMonitor.h" +%include "ArServerHandlerCommands.h" +%include "ArServerHandlerConfig.h" +%include "ArServerHandlerMap.h" +%include "ArServerHandlerMapping.h" +%include "ArServerInfoDrawings.h" +%include "ArServerInfoRobot.h" +%include "ArServerInfoSensor.h" +%include "ArServerInfoStrings.h" +%include "ArServerModeDrive.h" +%include "ArServerModeIdle.h" +%include "ArServerModeRatioDrive.h" +%include "ArServerModeStop.h" +%include "ArServerModeWander.h" +%include "ArServerSimpleCommands.h" +%include "ArServerSimpleOpener.h" +%include "ArServerUserInfo.h" + +#include "../include/wrapper_ExtraClasses.h" + +/* The End. */ diff --git a/Legacy/Aria/ArNetworking/javaExamples/Makefile b/Legacy/Aria/ArNetworking/javaExamples/Makefile new file mode 100644 index 0000000..3e9c0ee --- /dev/null +++ b/Legacy/Aria/ArNetworking/javaExamples/Makefile @@ -0,0 +1,48 @@ + +ifdef JAVA_BIN +JAVAC=$(JAVA_BIN)/javac +JAVA=$(JAVA_BIN)/java +else +JAVAC=javac +JAVA=java +endif + +#### Different options for Windows or Linux: +host:=$(shell uname | cut -d _ -f 1) +ifeq ($(host),MINGW32) # host is MINGW32 on Windows: +CLASSPATH_SEP=; +RUNTIME_PATH_VAR=PATH +RUNTIME_LIB_DIR=../../bin +LIB_EXT=dll +LIB_PREFIX= +else +CLASSPATH_SEP=: +RUNTIME_PATH_VAR=LD_LIBRARY_PATH +RUNTIME_LIB_DIR=../../lib +LIB_EXT=so +LIB_PREFIX=lib +endif + + + +all: $(patsubst %.java,%.class,$(wildcard *.java)) + +%.class: %.java ../../java/Aria.jar ../../java/ArNetworking.jar $(RUNTIME_LIB_DIR)/$(LIB_PREFIX)Aria.$(LIB_EXT) $(RUNTIME_LIB_DIR)/$(LIB_PREFIX)ArNetworking.$(LIB_EXT) + @echo $^ + "$(JAVAC)" -classpath "../../java/Aria.jar$(CLASSPATH_SEP)../../java/ArNetworking.jar" $< + +run%: %.class + $(RUNTIME_PATH_VAR)=$$$(RUNTIME_PATH_VAR):$(RUNTIME_LIB_DIR) "$(JAVA)" -cp ../../java/Aria.jar:../../java/ArNetworking.jar:. $* $(ARGS) + +gdb%: %.class + $(RUNTIME_PATH_VAR)=$$$(RUNTIME_PATH_VAR):$(RUNTIME_LIB_DIR) gdb --args "$(JAVA)" -cp ../../java/Aria.jar:../../java/ArNetworking.jar:. $* $(ARGS) + +info: + @echo host=$(host) + @echo "JAVA_BIN=$(JAVA_BIN)" + @echo "JAVAC=$(JAVAC)" + @echo "JAVA=$(JAVA)" + @echo "CLASSPATH_SEP=$(CLASSPATH_SEP)" + @echo "RUNTIME_PATH_VAR=$(RUNTIME_PATH_VAR)" + @echo "RUNTIME_LIB_DIR=$(RUNTIME_LIB_DIR)" + @echo "LIB_EXT=$(LIB_EXT)" diff --git a/Legacy/Aria/ArNetworking/javaExamples/README.txt b/Legacy/Aria/ArNetworking/javaExamples/README.txt new file mode 100644 index 0000000..82c0b98 --- /dev/null +++ b/Legacy/Aria/ArNetworking/javaExamples/README.txt @@ -0,0 +1,71 @@ + + +USING THE JAVA WRAPPER FOR ARNETWORKING + +"Wrapper" libraries for Java have been provided for both Aria and ArNetworking +in Aria's "java" directory ("../java"). This wrapper layer provides a Java API which simply +makes calls into the regular ArNetworking C++ implementation (using JNI). + +To use the ArNetworking Java wrapper you need to download a Java SDK. Sun J2SE JDK +1.6 (Java SE6) was used to build the wrapper. You can download it from: + + http://java.sun.com/javase/downloads + +Find the Java SE Development Kit 6 and click "Download". (Only the JDK +is needed, ARIA does not need Java EE or any other extra Java technologies.) + +The JDK also includes the runtime environment (JRE) that allows you to run +Java programs. If you only need the JRE, it can also +be obtained from . + +Install it on your system, then you should put the bin +directory of the SDK into your PATH environment variable. + +For information about Java on Debian GNU/Linux systems, install the +"java-common" package, and see the Debian Java FAQ in + /usr/share/doc/java-common/debian-java-faq/index.html +Chapter 11 describes how to install the Java 2 SDK from Blackdown using +Apt. + + + +In Windows you must then put the Aria\bin directory into your PATH enviornment +variable so that Java can find the dll needed to run the wrapper (use the System +control panel, or set in in the command shell prior to running java). On Linux, +Aria/lib should be in your LD_LIBRARY_PATH or in /etc/ld.so.conf. + +For an example you should start the simulator, then go into +the javaExamples directory and compile the simple Java +example, and then run it. + +On Windows: + javac -classpath ../../java/Aria.jar;../../java/ArNetworking.jar simple.java + java -cp ../../java/Aria.jar;../../java/ArNetworking.jar;. simple + +On Linux: + javac -classpath ../../java/Aria.jar:../../java/ArNetworking.jar simple.java + java -cp ../../java/Aria.jar:../../java/ArNetworking.jar:. simple + +The difference is the separator in the class path (; vs :). + +The Java wrapper is not as well tested as ArNetworking itself. If you encounter +problems using it, please notify the aria-users mailing list. + + +REBUILDING THE JAVA WRAPPER + +If you want to rebuild the Java wrapper you need to install SWIG: +See You should get at +least version 1.3.17. You then need to set the environment variable +JAVA_INCLUDE to the include directory in your Java SDK, and +JAVA_BIN to the bin directory in your Java SDK. (If you installed +the j2sdk1.4 from Blackdown on Debian, JAVA_INCLUDE should be +/usr/lib/j2se/1.4/include). + +In Linux, set your path so that swig is in the path then run +'make java' in the Aria directory, then again in the ArNetworking directory. + +In Windows with Visual Studio .NET, open java/ArNetworkingJava.vcproj, select +Tools menu -> Options -> Projects -> VC++ Directories and add your SWIG +directory. Then you should just be able to build the library. + diff --git a/Legacy/Aria/ArNetworking/javaExamples/customClientExample.java b/Legacy/Aria/ArNetworking/javaExamples/customClientExample.java new file mode 100644 index 0000000..e0e3111 --- /dev/null +++ b/Legacy/Aria/ArNetworking/javaExamples/customClientExample.java @@ -0,0 +1,76 @@ + +import com.mobilerobots.Aria.*; +import com.mobilerobots.ArNetworking.*; + +class ResponseCallback extends ArFunctor_NetPacket +{ + public void invoke(ArNetPacket packet) + { + System.out.println("customClientExample: ResponseCallback: Got a packet from the server with type " + packet.getCommand()); + } +} + +public class customClientExample { + + + /* This loads all the ArNetworking classes (they will be in the global + * namespace) when this class is loaded: */ + static { + try { + System.loadLibrary("AriaJava"); + System.loadLibrary("ArNetworkingJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code libraries (AriaJava and ArNetworkingJava .so or .DLL) failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) + { + Aria.init(); + + ArClientBase client = new ArClientBase(); + ResponseCallback testCB = new ResponseCallback(); + + ArTime startTime = new ArTime(); + startTime.setToNow(); + System.out.println("customClientExample: trying to connect to a server running on the local host at port 7273..."); + if (!client.blockingConnect("localhost", 7273)) + { + System.err.println("Error: Could not connect to server on localhost:7273, exiting."); + System.exit(1); + } + + System.out.println("customClientExample: Connected after " + startTime.mSecSince() + " msec."); + + client.runAsync(); + + System.out.println("\ncustomClientExample: Adding data handler callbacks..."); + client.addHandler("test", testCB); + client.addHandler("test2", testCB); + client.addHandler("test3", testCB); + client.logDataList(); + + System.out.println("\ncustomClientExample: Requesting \"test\" once..."); + client.requestOnce("test"); + + System.out.println("\ncustomClientExample: Requesting \"test2\" with a frequency of 10ms..."); + client.request("test2", 100); + + System.out.println("\ncustomClientExample: Requesting \"test3\" with a frequency of -1 (updates may happen at any time the server sends them) and waiting 5 sec..."); + client.request("test3", -1); + ArUtil.sleep(5000); + + System.out.println("\ncustomClientExample: Changing request frequency of \"test2\" to 300ms and waiting 5 sec"); + client.request("test2", 300); + ArUtil.sleep(5000); + + System.out.println("\ncustomClientExample: Cancelling \"test2\" request."); + client.requestStop("test2"); + + System.out.println("\ncustomClientExample: waiting 10 seconds, then disconnecting..."); + ArUtil.sleep(10000); + client.disconnect(); + ArUtil.sleep(50); + } +} diff --git a/Legacy/Aria/ArNetworking/javaExamples/customServerExample.java b/Legacy/Aria/ArNetworking/javaExamples/customServerExample.java new file mode 100644 index 0000000..0ee3960 --- /dev/null +++ b/Legacy/Aria/ArNetworking/javaExamples/customServerExample.java @@ -0,0 +1,57 @@ + +import com.mobilerobots.Aria.*; +import com.mobilerobots.ArNetworking.*; + +class RequestCallback extends ArFunctor_ServerData +{ + public void invoke(ArServerClient client, ArNetPacket packet) + { + ArNetPacket sending = new ArNetPacket(); + System.out.println("customServerExample: RequestCallback: responding to a request packet with ID " + packet.getCommand()); + client.sendPacketTcp(sending); // just send back an empty packet. + } +} + +public class customServerExample { + + + /* This loads all the ArNetworking classes (they will be in the global + * namespace) when this class is loaded: */ + static { + try { + System.loadLibrary("AriaJava"); + System.loadLibrary("ArNetworkingJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code libraries (AriaJava and ArNetworkingJava .so or .DLL) failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); + System.exit(1); + } + } + + + public static void main(String[] argv) + { + Aria.init(); + ArServerBase server = new ArServerBase(); + ArNetPacket packet = new ArNetPacket(); // empty packet to test broadcasting + + RequestCallback testCB = new RequestCallback(); + + server.addData("test", "some wierd test", testCB, "none", "none"); + server.addData("test2", "another wierd test", testCB, "none", "none"); + server.addData("test3", "yet another wierd test", testCB, "none", "none"); + if (!server.open(7273)) + { + System.err.println("customServerExample: Could not open server port 7273"); + System.exit(1); + } + server.runAsync(); + System.out.println("customServerExample: ready for customClientExamples to connect on port 7273; will broadcast \"test3\" packet every 4 seconds as well."); + while (server.getRunningWithLock()) + { + ArUtil.sleep(4000); + server.broadcastPacketTcp(packet, "test3"); + } + Aria.shutdown(); + } +} + diff --git a/Legacy/Aria/ArNetworking/javaExamples/simple.java b/Legacy/Aria/ArNetworking/javaExamples/simple.java new file mode 100644 index 0000000..862c7e8 --- /dev/null +++ b/Legacy/Aria/ArNetworking/javaExamples/simple.java @@ -0,0 +1,88 @@ + +import com.mobilerobots.Aria.*; +import com.mobilerobots.ArNetworking.*; + +public class simple { + + /* This loads all the ArNetworking classes (they will be in the global + * namespace) when this class is loaded: */ + static { + try { + System.loadLibrary("AriaJava"); + System.loadLibrary("ArNetworkingJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code libraries (AriaJava and ArNetworkingJava .so or .DLL) failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); + System.exit(1); + } + } + + /* Main program: */ + public static void main(String argv[]) { + System.out.println("Starting Java ArNetworking Test"); + + /* Global Aria class inititalizaton */ + Aria.init(Aria.SigHandleMethod.SIGHANDLE_THREAD, true); + + /* Robot and device objects */ + ArRobot robot = new ArRobot("robot1", true, true, true); + ArSonarDevice sonar = new ArSonarDevice(); + robot.addRangeDevice(sonar); + + /* Make connector and parse arguments from argv */ + ArSimpleConnector conn = new ArSimpleConnector(argv); + if(!Aria.parseArgs()) + { + Aria.logOptions(); + Aria.shutdown(); + System.exit(1); + } + + /* Connect to the robot */ + System.out.println("Connecting to robot..."); + if (!conn.connectRobot(robot)) + { + System.err.println("Could not connect to robot, exiting.\n"); + System.exit(1); + } + + /* Open the sever */ + ArServerBase server = new ArServerBase(); + if(!server.open(7272)) + { + System.err.println("Could not open server on port 7272, exiting."); + System.exit(1); + } + System.out.println("Opened server on port 7272."); + + /* Informational services: */ + ArServerInfoRobot servInfoRobot = new ArServerInfoRobot(server, robot); + ArServerInfoSensor servInfoSensor = new ArServerInfoSensor(server, robot); + ArServerInfoDrawings servInfoDraw = new ArServerInfoDrawings(server); + servInfoDraw.addRobotsRangeDevices(robot); + + /* Control mode services: */ + ArServerModeStop servModeStop = new ArServerModeStop(server, robot); + ArServerModeRatioDrive servModeDrive = new ArServerModeRatioDrive(server, robot); + ArServerModeWander servModeWander = new ArServerModeWander(server, robot); + servModeStop.addAsDefaultMode(); + servModeStop.activate(); + + /* Simple text command service ("custom commands" in MobileEyes): */ + ArServerHandlerCommands commands = new ArServerHandlerCommands(server); + + // Relay microcontroller commands directly: + ArServerSimpleComUC cmdUC = new ArServerSimpleComUC(commands, robot); + + // Log information: + ArServerSimpleComMovementLogging cmdLog = new ArServerSimpleComMovementLogging(commands, robot); + ArServerSimpleComLogRobotConfig cmdConfigLog = new ArServerSimpleComLogRobotConfig(commands, robot); + + + /* Run robot and server threads in the backrgound: */ + System.out.println("Running..."); + robot.enableMotors(); + robot.runAsync(true); + server.runAsync(); + robot.waitForRunExit(); + } +} diff --git a/Legacy/Aria/ArNetworking/pythonExamples/README.txt b/Legacy/Aria/ArNetworking/pythonExamples/README.txt new file mode 100644 index 0000000..85ae1c4 --- /dev/null +++ b/Legacy/Aria/ArNetworking/pythonExamples/README.txt @@ -0,0 +1,22 @@ + +USING THE PYTHON WRAPPER FOR ARNETWORKING + +A "wrapper" module for Python has been provided in ARIA's "python" directory. +This wrapper layer provides a Python API which simply makes calls into the +regular ArNetworking C++ implementation. In general, the Python API mirrors +the C++ API, with some exceptions which are noted in the Reference Manual +for the C++ library. + +The ArNetworking wrapper should be used in conjunction with the ARIA wrapper. +See the README.txt for the ARIA pythonExamples for details. + +To use the wrapper modules, you must add ARIA's python directory to +an environment variable called PYTHONPATH. On Windows, the Aria 'bin' +directory must also be in your PATH variable. + +Note that the Python wrapper API is not as well tested as Aria itself. If +you encounter problems, please notify the aria-users mailing list. Furthermore, +some methods have been omitted or renamed, and you have to do a few things +differently. + + diff --git a/Legacy/Aria/ArNetworking/pythonExamples/customClientExample.py b/Legacy/Aria/ArNetworking/pythonExamples/customClientExample.py new file mode 100644 index 0000000..8c79973 --- /dev/null +++ b/Legacy/Aria/ArNetworking/pythonExamples/customClientExample.py @@ -0,0 +1,66 @@ +from AriaPy import * +from ArNetworkingPy import * +import sys + +def testCB(packet): + print "client: received reply packet with command %d\n" % (packet.getCommand()) + +Aria_init() + +client = ArClientBase() + +startTime = ArTime() +startTime.setToNow() +if not client.blockingConnect("localhost", 7273): + print "Could not connect to server at localhost port 7273, exiting" + Aria_exit(1); +print "client: Took %ld msec to connect\n" % (startTime.mSecSince()) + +client.runAsync() + +client.lock() + +print "Client detected the following data requests on the server:" +client.logDataList() + +print "Adding callback for data requests \"test\", \"test2\", \"test3\"..." +client.addHandler("test", testCB) +client.addHandler("test2", testCB) +client.addHandler("test3", testCB) + + +print "Requesting \"test\" once..." +client.requestOnce("test") + +print "Requesting \"test2\" every 100ms..." +client.request("test2", 100) + +print "Requesting \"test3\" to be sent at server's discrecion..." +client.request("test3", -1) +client.unlock() + +print "Waiting 2 sec..." +ArUtil_sleep(2000) + +print "Changing request frequency of \"test2\" to 300ms..." +client.lock() +client.request("test2", 300) +client.unlock() + +print "Watiing 2 sec..." +ArUtil_sleep(1000) + +print "Stopping request for \"test2\"..." +client.lock() +client.requestStop("test2") +client.unlock() + +print "Waiting 2 sec..." +ArUtil_sleep(2000) + +print "Disconnecting and exiting." +client.lock() +client.disconnect() +client.unlock() +ArUtil_sleep(50) + diff --git a/Legacy/Aria/ArNetworking/pythonExamples/customServerExample.py b/Legacy/Aria/ArNetworking/pythonExamples/customServerExample.py new file mode 100644 index 0000000..f7914b3 --- /dev/null +++ b/Legacy/Aria/ArNetworking/pythonExamples/customServerExample.py @@ -0,0 +1,27 @@ +from AriaPy import * +from ArNetworkingPy import * +import sys + +def requestCallback(client, packet): + replyPacket = ArNetPacket() + replyPacket.strToBuf("Reply"); + print "requestCallback received a packet with command #%d. Sending a reply...\n" % (packet.getCommand()) + client.sendPacketTcp(replyPacket) + +Aria_init() +server = ArServerBase() +packet = ArNetPacket() + +server.addData("test", "some wierd test", requestCallback, "none", "none") +server.addData("test2", "another wierd test", requestCallback, "none", "none") +server.addData("test3", "yet another wierd test", requestCallback, "none", "none") +if not server.open(7273): + print "Error: Could not open server port 7273" + Aria_exit(1) +print "Opened server on port 7273. Connect with customClientExample." +server.runAsync() +while (server.getRunningWithLock()): + ArUtil_sleep(1000) + server.broadcastPacketTcp(packet, "test3") +Aria_exit(0) + diff --git a/Legacy/Aria/ArNetworking/pythonExamples/drawingsExample.py b/Legacy/Aria/ArNetworking/pythonExamples/drawingsExample.py new file mode 100644 index 0000000..eec89e6 --- /dev/null +++ b/Legacy/Aria/ArNetworking/pythonExamples/drawingsExample.py @@ -0,0 +1,204 @@ +from AriaPy import * +from ArNetworkingPy import * +import sys +from math import sin + + +# This is an example server that shows how to draw arbitrary figures in a +# client (e.g. MobileEyes). + + +# These are callbacks that respond to client requests for the drawings' +# geometry data. + + +def exampleHomeDrawingNetCallback(client, requestPkt): + print "exampleHomeDrawingNetCallback" + + reply = ArNetPacket() + + # 7 Vertices + reply.byte4ToBuf(7) + + # Centered on 0,0. + # X: Y: + reply.byte4ToBuf(-500); reply.byte4ToBuf(500); # Vertex 1 + reply.byte4ToBuf(-500); reply.byte4ToBuf(-500); # Vertex 2 + reply.byte4ToBuf(500); reply.byte4ToBuf(-500); # Vertex 3 + reply.byte4ToBuf(500); reply.byte4ToBuf(500); # Vertex 4 + reply.byte4ToBuf(0); reply.byte4ToBuf(1000); # Vertex 5 + reply.byte4ToBuf(-500); reply.byte4ToBuf(500); # Vertex 6 + reply.byte4ToBuf(500); reply.byte4ToBuf(500); # Vertex 7 + + client.sendPacketUdp(reply) + print "exampleHomeDrawingNetCallback Done." + +def exampleDotsDrawingNetCallback(client, requestPkt): + reply = ArNetPacket() + + tik = ArUtil_getTime() % 200 + t = tik / 5.0 + + # Three dots + reply.byte4ToBuf(3) + + # Dot 1: + reply.byte4ToBuf(3000); # X coordinate (mm) + reply.byte4ToBuf((int) (sin(t) * 1000));# Y + + # Dot 2: + reply.byte4ToBuf(3500); # X + reply.byte4ToBuf((int) (sin(t+500) * 1000));# Y + + # Dot 3: + reply.byte4ToBuf(4000); # X + reply.byte4ToBuf((int) (sin(t+1000) * 1000));# Y + + client.sendPacketUdp(reply) + +def exampleXDrawingNetCallback(client, requestPkt): + reply = ArNetPacket() + + # X marks the spot. 2 line segments, so 4 vertices: + reply.byte4ToBuf(4) + + # Segment 1: + reply.byte4ToBuf(-4250); # X1 + reply.byte4ToBuf(250); # Y1 + reply.byte4ToBuf(-3750); # X2 + reply.byte4ToBuf(-250); # Y2 + + # Segment 2: + reply.byte4ToBuf(-4250); # X1 + reply.byte4ToBuf(-250); # Y1 + reply.byte4ToBuf(-3750); # X2 + reply.byte4ToBuf(250); # Y2 + + client.sendPacketUdp(reply) + +def exampleArrowsDrawingNetCallback(client, requestPkt): + # 1 arrow that points at the robot + reply = ArNetPacket() + reply.byte4ToBuf(1) # 1 arrow + reply.byte4ToBuf(0); # Pos. X + reply.byte4ToBuf(700); # Pos. Y + client.sendPacketUdp(reply) + + + + +# Main program: + +Aria_init() +robot = ArRobot() +server = ArServerBase() + +parser = ArArgumentParser(sys.argv) +simpleConnector = ArSimpleConnector(parser) +simpleOpener = ArServerSimpleOpener(parser) + +parser.loadDefaultArguments() + +if not Aria_parseArgs() or not parser.checkHelpAndWarnUnparsed(): + Aria_logOptions() + Aria_exit(1) + + +if not simpleOpener.open(server): + if simpleOpener.wasUserFileBad(): + print "Error: Bad user/password/permissions file." + else: + print "Error: Could not open server port. Use -help to see options." + Aria_exit(1) + + +# Devices +sonarDev = ArSonarDevice() +robot.addRangeDevice(sonarDev) + +irs = ArIRs() +robot.addRangeDevice(irs) + +bumpers = ArBumpers() +robot.addRangeDevice(bumpers) + +sick = ArSick() +robot.addRangeDevice(sick); + + +# attach services to the server +serverInfoRobot = ArServerInfoRobot(server, robot) +serverInfoSensor = ArServerInfoSensor(server, robot) + +# This is the service that provides drawing data to the client. +drawings = ArServerInfoDrawings(server) + +# Convenience function that sets up drawings for all the robot's current +# range devices (using default shape and color info) +drawings.addRobotsRangeDevices(robot) + +# Add our custom drawings + +linedd = ArDrawingData("polyLine", ArColor(255, 0, 0), 2, 49) # shape name, color, size, layer +drawings.addDrawing( linedd, "exampleDrawing_Home", exampleHomeDrawingNetCallback) + +dotsdd = ArDrawingData("polyDots", ArColor(0, 255, 0), 250, 48) +drawings.addDrawing(dotsdd, "exampleDrawing_Dots", exampleDotsDrawingNetCallback) + +segdd = ArDrawingData("polySegments", ArColor(0, 0, 0), 4, 52) +drawings.addDrawing( segdd, "exampleDrawing_XMarksTheSpot", exampleXDrawingNetCallback) + +ardd = ArDrawingData("polyArrows", ArColor(255, 0, 255), 500, 100) +drawings.addDrawing( ardd, "exampleDrawing_Arrows", exampleArrowsDrawingNetCallback) + +# modes for moving the robot +modeStop = ArServerModeStop(server, robot) +modeDrive = ArServerModeDrive(server, robot) +modeRatioDrive = ArServerModeRatioDrive(server, robot) +modeWander = ArServerModeWander(server, robot) +modeStop.addAsDefaultMode() +modeStop.activate() + +# set up some simple commands ("custom commands") +commands = ArServerHandlerCommands(server) +uCCommands = ArServerSimpleComUC(commands, robot) +loggingCommands = ArServerSimpleComMovementLogging(commands, robot) +configCommands = ArServerSimpleComLogRobotConfig(commands, robot) + +# add the commands to enable and disable safe driving to the simple commands +modeDrive.addControlCommands(commands) + + + +# Connect to the robot. +if not simpleConnector.connectRobot(robot): + print "Error: Could not connect to robot... exiting" + Aria_exit(1) + +# set up the laser before handing it to the laser mode +simpleConnector.setupLaser(sick) + +robot.enableMotors() + +# start the robot cycle running in a background thread +robot.runAsync(True) + +# start the laser processing cycle in a background thread +sick.runAsync() + +# connect the laser if it was requested +if not simpleConnector.connectLaser(sick): + print "Error: Could not connect to laser... exiting" + Aria_exit(2) + +# log whatever we wanted to before the runAsync +simpleOpener.checkAndLog() + +# run the server thread in the background +server.runAsync() + +print "Server is now running on port %d..." % (simpleOpener.getPort()) + +robot.waitForRunExit() +Aria_exit(0) + diff --git a/Legacy/Aria/ArNetworking/pythonExamples/simple.py b/Legacy/Aria/ArNetworking/pythonExamples/simple.py new file mode 100644 index 0000000..876ff63 --- /dev/null +++ b/Legacy/Aria/ArNetworking/pythonExamples/simple.py @@ -0,0 +1,77 @@ +from AriaPy import * +from ArNetworkingPy import * +import sys + +# This example demonstrates how to use ArNetworking in Python. + +# Global library initialization, just like the C++ API: +Aria_init() + +# Create a robot object: +robot = ArRobot() + +# make a gyro +gyro = ArAnalogGyro(robot) + +#sonar, must be added to the robot +sonarDev = ArSonarDevice() +#add the sonar to the robot +robot.addRangeDevice(sonarDev) + +# make the core server object: +server = ArServerBase() + +# Create a "simple connector" object and connect to either the simulator +# or the robot. Unlike the C++ API which takes int and char* pointers, +# the Python constructor just takes argv as a list. +print "Connecting..." + +con = ArSimpleConnector(sys.argv) +if (not con.connectRobot(robot)): + print "Could not connect to robot, exiting" + Aria_exit(1) + + +# Open the server on port 7272: +if (not server.open(7272)): + print "Could not open server, exiting" + Aria_exit(1) + +# Create various services and attach them to the core server +serverInfoRobot = ArServerInfoRobot(server, robot) +serverInfoSensor = ArServerInfoSensor(server, robot) +drawings = ArServerInfoDrawings(server) +drawings.addRobotsRangeDevices(robot) + +# ways of moving the robot +modeStop = ArServerModeStop(server, robot) +modeRatioDrive = ArServerModeRatioDrive(server, robot) +modeWander = ArServerModeWander(server, robot) +modeStop.addAsDefaultMode() +modeStop.activate() + +# set up the simple commands ("custom commands" in MobileEyes) +commands = ArServerHandlerCommands(server) +# add the simple commands for the microcontroller +uCCommands = ArServerSimpleComUC(commands, robot) +# add the simple commands for logging +loggingCommands = ArServerSimpleComMovementLogging(commands, robot) +# add the simple commands for the gyro +gyroCommands = ArServerSimpleComGyro(commands, robot, gyro) +# Add the simple command for logging the robot config and orig robot config +configCommands = ArServerSimpleComLogRobotConfig(commands, robot) + + + + +# Run the robot and server threads in the background: +print "Running..." +robot.runAsync(1) + +server.runAsync() + +robot.enableMotors() + +robot.waitForRunExit() + +Aria_exit(0) diff --git a/Legacy/Aria/ArNetworking/src/ArCentralForwarder.cpp b/Legacy/Aria/ArNetworking/src/ArCentralForwarder.cpp new file mode 100644 index 0000000..dbb7e29 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArCentralForwarder.cpp @@ -0,0 +1,923 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArCentralForwarder.h" + + +AREXPORT ArCentralForwarder::ArCentralForwarder( + ArServerBase *mainServer, ArSocket *socket, + const char *robotName, int port, + std::map *usedPorts, + ArFunctor2 *forwarderServerClientRemovedCB, + const char *enforceProtocolVersion, + ArServerCommands::Type enforceType) : + myReceiveDataFunctor(this, &ArCentralForwarder::receiveData), + myInternalRequestChangedFunctor(this, + &ArCentralForwarder::internalRequestChanged), + myInternalRequestOnceFunctor(this, + &ArCentralForwarder::internalRequestOnce, + NULL, NULL, true), + myRobotServerClientRemovedCB( + this, &ArCentralForwarder::robotServerClientRemoved), + myNetCentralHeartbeatCB(this, &ArCentralForwarder::netCentralHeartbeat), + myClientServerClientRemovedCB( + this, &ArCentralForwarder::clientServerClientRemoved) +{ + myMainServer = mainServer; + mySocket = socket; + myRobotName = robotName; + myStartingPort = port; + myUsedPorts = usedPorts; + myForwarderServerClientRemovedCB = forwarderServerClientRemovedCB; + if (enforceProtocolVersion != NULL) + myEnforceProtocolVersion = enforceProtocolVersion; + else + myEnforceProtocolVersion = ""; + myEnforceType = enforceType; + + myPrefix = "ArCentralForwarder_"; + myPrefix += myRobotName; + myPrefix += ": "; + myServer = NULL; + myClient = NULL; + myPort = 0; + myState = STATE_STARTING; + myBeingReplaced = false; + myRobotHasCentralServerHeartbeat = false; +} + + +AREXPORT ArCentralForwarder::~ArCentralForwarder() +{ + if (myServer != NULL) + { + myServer->close(); + delete myServer; + } + + if (myClient != NULL) + { + if (myClient->isConnected()) + myClient->disconnect(); + delete myClient; + } + + // MPL adding this since it looks like it leaks this + if (mySocket != NULL) + { + delete mySocket; + } + + if (myRequestOnces.begin() != myRequestOnces.end()) + ArUtil::deleteSetPairs(myRequestOnces.begin(), myRequestOnces.end()); + myRequestOnces.clear(); + if (myLastRequest.begin() != myLastRequest.end()) + ArUtil::deleteSetPairs(myLastRequest.begin(), myLastRequest.end()); + myLastRequest.clear(); + if (myLastBroadcast.begin() != myLastBroadcast.end()) + ArUtil::deleteSetPairs(myLastBroadcast.begin(), myLastBroadcast.end()); + myLastBroadcast.clear(); +} + +AREXPORT bool ArCentralForwarder::callOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout) +{ + if (myBeingReplaced) + { + ArLog::log(ArLog::Normal, "ArCentralForwarder::%s: being replaced by a duplicate, disconnecting", + myRobotName.c_str()); + return false; + } + + if (myState == STATE_CONNECTED) + { + return connectedCallOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); + } + else if (myState == STATE_CONNECTING) + { + return connectingCallOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); + } + else if (myState == STATE_GATHERING) + { + return gatheringCallOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); + } + else if (myState == STATE_STARTING) + { + return startingCallOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); + } + else + { + ArLog::log(ArLog::Normal, "%s in bad state, disconnecting", + myRobotName.c_str()); + return false; + } + +} + +AREXPORT bool ArCentralForwarder::startingCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout) +{ + myClient = new ArClientBase; + myClient->enforceProtocolVersion(myEnforceProtocolVersion.c_str(), false); + myClient->enforceType(myEnforceType, false); + std::string name; + name = "ArForwarderClient_" + myRobotName; + myClient->setRobotName(name.c_str()); + + if (myClient->internalNonBlockingConnectStart("", 0, true, "", "", + mySocket) != + ArClientBase::NON_BLOCKING_CONTINUE) + { + ArLog::log(ArLog::Normal, + "%sCould not start connect to switching client %s from %s", + myPrefix.c_str(), myRobotName.c_str(), + mySocket->getIPString()); + return false; + } + myState = STATE_CONNECTING; + myLastTcpHeartbeat.setToNow(); + myLastUdpHeartbeat.setToNow(); + return callOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); +} + +AREXPORT bool ArCentralForwarder::connectingCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout) +{ + + ArClientBase::NonBlockingConnectReturn ret; + + if ((ret = myClient->internalNonBlockingConnectContinue()) == + ArClientBase::NON_BLOCKING_CONTINUE) + return true; + else if (ret == ArClientBase::NON_BLOCKING_FAILED) + { + ArLog::log(ArLog::Normal, + "%sCould not connect to switching client %s from %s", + myPrefix.c_str(), myRobotName.c_str(), + mySocket->getIPString()); + return false; + } + else if (ret == ArClientBase::NON_BLOCKING_CONNECTED) + { + myState = STATE_GATHERING; + myLastTcpHeartbeat.setToNow(); + myLastUdpHeartbeat.setToNow(); + return callOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); + } + else + { + ArLog::log(ArLog::Normal, "%sIn unknown state connecting to %s", + myPrefix.c_str(), myRobotName.c_str()); + return false; + } +} + +AREXPORT bool ArCentralForwarder::gatheringCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout) +{ + // if we have a heartbeat timeout make sure we've heard the + // heartbeat within that range + if (heartbeatTimeout >= -.00000001 && + myLastTcpHeartbeat.secSince() >= 5 && + myLastTcpHeartbeat.secSince() / 60.0 > heartbeatTimeout) + { + ArLog::log(ArLog::Normal, + "%sHaven't connected in %g minutes, dropping connection", + myPrefix.c_str(), heartbeatTimeout); + return false; + } + + if (!myClient->getReceivedDataList() || + !myClient->getReceivedArgRetList() || + !myClient->getReceivedGroupAndFlagsList()) + { + myClient->loopOnce(); + return true; + } + + ArLog::log(ArLog::Normal, "%Connected to switching client %s from %s", + myPrefix.c_str(), myRobotName.c_str(), mySocket->getIPString()); + //clientBase->logDataList(); + char serverName[1024]; + sprintf(serverName, "ArForwarderServer_%s", myRobotName.c_str()); + myServer = new ArServerBase(false, serverName, false, "", "", + false, true, + false, + false, false); + myServer->enforceProtocolVersion(myEnforceProtocolVersion.c_str()); + // there's no enforce of type here since this is the proxy for MP/ME + // and such (robots don't connect here) + + myServer->addClientRemovedCallback(&myClientServerClientRemovedCB); + + ArTime startedOpening; + startedOpening.setToNow(); + int port; + bool foundPort; + + std::map::iterator usedIt; + // walk through our ports starting at our starting port + for (port = myStartingPort, foundPort = false; + !foundPort && port < 65536; + port++) + { + // if we've used the port in the last 2 minutes then skip it + if ((usedIt = myUsedPorts->find(port)) != myUsedPorts->end() && + (*usedIt).second != NULL && + ((*usedIt).second->getSec() == 0 || + (*usedIt).second->secSince() < 120)) + { + + ArLog::log(ArLog::Verbose, "%sSkipping port %d", myPrefix.c_str(), port); + continue; + } + + // try to open it + if (myServer->open(port, myMainServer->getOpenOnIP())) + { + foundPort = true; + myPort = port; + } + } + + if (!foundPort) + { + ArLog::log(ArLog::Normal, "%s Could not find port", + myPrefix.c_str()); + } + myServer->setUserInfo(myMainServer->getUserInfo()); + + std::map::const_iterator dIt; + ArClientData *clientData; + + myServer->addClientRemovedCallback(&myRobotServerClientRemovedCB); + + myClient->addHandler("centralHeartbeat", &myNetCentralHeartbeatCB); + myClient->request("centralHeartbeat", 1000); + + if (myClient->dataExists("identSetSelfIdentifier")) + { + ArNetPacket sending; + sending.strToBuf("CentralServer"); + myClient->requestOnce("identSetSelfIdentifier", &sending); + } + + myLastTcpHeartbeat.setToNow(); + myLastUdpHeartbeat.setToNow(); + + for (dIt = myClient->getDataMap()->begin(); + dIt != myClient->getDataMap()->end(); + dIt++) + { + clientData = (*dIt).second; + + if (myMainServer->dataHasFlag(clientData->getName(), + "MAIN_SERVER_ONLY")) + { + ArLog::log(ArLog::Normal, + "%sNot forwarding %s since it is MAIN_SERVER_ONLY", + myPrefix.c_str(), clientData->getName()); + continue; + } + else if (clientData->hasDataFlag("DO_NOT_FORWARD")) + { + ArLog::log(ArLog::Normal, + "%sNot forwarding %s since it is DO_NOT_FORWARD", + myPrefix.c_str(), clientData->getName()); + continue; + } + else if (clientData->hasDataFlag("RETURN_NONE")) + { + myReturnTypes[clientData->getCommand()] = RETURN_NONE; + } + else if (clientData->hasDataFlag("RETURN_SINGLE")) + { + myReturnTypes[clientData->getCommand()] = RETURN_SINGLE; + myRequestOnces[clientData->getCommand()] = + new std::list; + } + else if (clientData->hasDataFlag("RETURN_VIDEO")) + { + ArLog::log(ArLog::Normal, + "%sForwarding %s that is RETURN_VIDEO", + myPrefix.c_str(), clientData->getName()); + myReturnTypes[clientData->getCommand()] = RETURN_VIDEO; + myRequestOnces[clientData->getCommand()] = + new std::list; + } + else if (clientData->hasDataFlag("RETURN_VIDEO_OPTIM")) + { + ArLog::log(ArLog::Normal, + "%sForwarding %s that is RETURN_VIDEO_OPTIM", + myPrefix.c_str(), clientData->getName()); + myReturnTypes[clientData->getCommand()] = RETURN_VIDEO_OPTIM; + myRequestOnces[clientData->getCommand()] = + new std::list; + } + else if (clientData->hasDataFlag("RETURN_UNTIL_EMPTY")) + { + myReturnTypes[clientData->getCommand()] = RETURN_UNTIL_EMPTY; + myRequestOnces[clientData->getCommand()] = + new std::list; + + } + else if (clientData->hasDataFlag("RETURN_COMPLEX")) + { + ArLog::log(ArLog::Normal, + "%sNot forwarding %s since it is a complex return", + myPrefix.c_str(), clientData->getName()); + continue; + } + else + { + ArLog::log(ArLog::Normal, + "%sNot forwarding %s since it is an unknown return (data flags %s)", + myPrefix.c_str(), clientData->getName(), + clientData->getDataFlagsString()); + continue; + } + + setLastRequest(clientData->getCommand()); + setLastBroadcast(clientData->getCommand()); + + myServer->addDataAdvanced( + clientData->getName(), clientData->getDescription(), + NULL, clientData->getArgumentDescription(), + clientData->getReturnDescription(), clientData->getCommandGroup(), + clientData->getDataFlagsString(), clientData->getCommand(), + &myInternalRequestChangedFunctor, + &myInternalRequestOnceFunctor); + + myClient->addHandler(clientData->getName(), &myReceiveDataFunctor); + } + if (myClient->dataExists("centralServerHeartbeat")) + { + ArNetPacket sending; + myRobotHasCentralServerHeartbeat = true; + myLastSentCentralServerHeartbeat.setToNow(); + myClient->requestOnce("centralServerHeartbeat", &sending, true); + myClient->requestOnceUdp("centralServerHeartbeat", &sending, true); + } + myState = STATE_CONNECTED; + return callOnce(heartbeatTimeout, udpHeartbeatTimeout, + robotBackupTimeout, clientBackupTimeout); +} + +AREXPORT bool ArCentralForwarder::connectedCallOnce( + double heartbeatTimeout, double udpHeartbeatTimeout, + double robotBackupTimeout, double clientBackupTimeout) +{ + if (!myClient->isConnected()) + { + ArLog::log(ArLog::Normal, "%sLost connection to robot", + myPrefix.c_str()); + return false; + } + + myClient->setBackupTimeout(robotBackupTimeout); + myServer->setBackupTimeout(clientBackupTimeout); + + if (myRobotHasCentralServerHeartbeat && + myLastSentCentralServerHeartbeat.mSecSince() >= 1000) + { + ArNetPacket sending; + myLastSentCentralServerHeartbeat.setToNow(); + myClient->requestOnce("centralServerHeartbeat", &sending, true); + myClient->requestOnceUdp("centralServerHeartbeat", &sending, true); + } + + myClient->loopOnce(); + myServer->loopOnce(); + + // if we have a heartbeat timeout make sure we've heard the + // heartbeat within that range + if (heartbeatTimeout >= -.00000001 && + myLastTcpHeartbeat.secSince() >= 5 && + myLastTcpHeartbeat.secSince() / 60.0 >= heartbeatTimeout) + { + ArLog::log(ArLog::Normal, "%sHaven't heard from robot in %g minutes, dropping connection", myPrefix.c_str(), heartbeatTimeout); + return false; + } + + // if we have a heartbeat timeout make sure we've heard the + // heartbeat within that range + if ((!myClient->isTcpOnlyFromServer() || !myClient->isTcpOnlyToServer()) && + udpHeartbeatTimeout >= -.00000001 && + myLastUdpHeartbeat.secSince() >= 5 && + myLastUdpHeartbeat.secSince() / 60.0 >= udpHeartbeatTimeout) + { + ArLog::log(ArLog::Normal, + "%sSwitching to TCP only since haven't gotten UDP in %g minutes", + myPrefix.c_str(), udpHeartbeatTimeout); + myClient->setTcpOnlyFromServer(); + myClient->setTcpOnlyToServer(); + } + + return true; +} + +void ArCentralForwarder::robotServerClientRemoved(ArServerClient *client) +{ + std::map *>::iterator rIt; + std::list *requestList = NULL; + std::list::iterator scIt; + + printf("Client disconnected\n"); + for (rIt = myRequestOnces.begin(); rIt != myRequestOnces.end(); rIt++) + { + requestList = (*rIt).second; + // while we have entries for this client we loop and replace them + // with NULLs + bool foundOne = true; + while (foundOne) + { + foundOne = false; + // see if we found one + for (scIt = requestList->begin(); + !foundOne && scIt != requestList->end(); + scIt++) + { + if ((*scIt) == client) + { + foundOne = true; + printf("Got...\n"); + requestList->insert(scIt, (ArServerClient*)NULL); + for (scIt = requestList->begin(); + scIt != requestList->end(); + scIt++) + { + if ((*scIt) == client) + { + requestList->erase(scIt); + printf("Removed request for client %p\n", client); + break; + } + } + } + } + } + } +} + +void ArCentralForwarder::clientServerClientRemoved(ArServerClient *client) +{ + if (client->getState() != ArServerClient::STATE_DISCONNECTED) + myForwarderServerClientRemovedCB->invoke(this, client); +} + + + +void ArCentralForwarder::receiveData(ArNetPacket *packet) +{ + ReturnType returnType; + std::list::iterator it; + ArServerClient *client; + + // chop off the old footer + //packet->setLength(packet->getLength() - ArNetPacket::FOOTER_LENGTH); + packet->setAddedFooter(true); + + /* + if (strcmp(myClient->getName(packet->getCommand(), true), + "getPictureCam1") == 0) + printf("Got getPictureCam1...\n"); + */ + returnType = getReturnType(packet->getCommand()); + //printf("Got a packet in for %s %d\n", myClient->getName(packet->getCommand(), true), packet->getCommand()); + + // this part is seeing if it came from a request_once, if so we + // don't service anything else (so we take care of those things that + // only happen once better then the ones that are mixing... but that + // should be okay) + checkRequestOnces(packet->getCommand()); + if ((returnType == RETURN_SINGLE || returnType == RETURN_UNTIL_EMPTY) && + (it = myRequestOnces[packet->getCommand()]->begin()) != + myRequestOnces[packet->getCommand()]->end()) + { + //if (returnType == RETURN_UNTIL_EMPTY) + //printf("Got a packet for %s with length %d %d\n", myClient->getName(packet->getCommand(), true), packet->getDataLength(), packet->getLength()); + + client = (*it); + if (client != NULL) + { + if (packet->getPacketSource() == ArNetPacket::TCP) + client->sendPacketTcp(packet); + else if (packet->getPacketSource() == ArNetPacket::UDP) + client->sendPacketUdp(packet); + else + { + client->sendPacketTcp(packet); + ArLog::log(ArLog::Normal, + "%sDon't know what type of packet %s is (%d)", + myPrefix.c_str(), + myClient->getName(packet->getCommand(), true), + packet->getPacketSource()); + } + } + if ((returnType == RETURN_UNTIL_EMPTY && packet->getDataLength() == 0) || + returnType == RETURN_SINGLE) + { + //if (returnType == RETURN_UNTIL_EMPTY) + //printf("Got final packet for for %s\n", myClient->getName(packet->getCommand(), true)); + myRequestOnces[packet->getCommand()]->pop_front(); + } + } + else if (returnType == RETURN_VIDEO) + { + // what we do here is send it to the ones that have requested it + // but aren't listening for the broadcast... then we broadcast it + // to everyone whose listening... this should ensure that everyone + // just gets the packet once as often as we see it... + + while ((it = myRequestOnces[packet->getCommand()]->begin()) != + myRequestOnces[packet->getCommand()]->end()) + { + //printf("Sent a single return_single_and_broadcast for %s\n", myClient->getName(packet->getCommand(), true)); + client = (*it); + if (client != NULL && client->getFrequency(packet->getCommand()) == -2) + { + if (packet->getPacketSource() == ArNetPacket::TCP) + client->sendPacketTcp(packet); + else if (packet->getPacketSource() == ArNetPacket::UDP) + client->sendPacketUdp(packet); + else + { + client->sendPacketTcp(packet); + ArLog::log(ArLog::Normal, + "%sDon't know what type of packet %s is (%d)", + myPrefix.c_str(), + myClient->getName(packet->getCommand(), true), + packet->getPacketSource()); + } + } + myRequestOnces[packet->getCommand()]->pop_front(); + } + //printf("Broadcast return_single_and_broadcast for %s\n", myClient->getName(packet->getCommand(), true)); + myLastBroadcast[packet->getCommand()]->setToNow(); + if (packet->getPacketSource() == ArNetPacket::TCP) + { + myServer->broadcastPacketTcpByCommand(packet, packet->getCommand()); + } + else if (packet->getPacketSource() == ArNetPacket::UDP) + { + myServer->broadcastPacketUdpByCommand(packet, packet->getCommand()); + } + else + { + myServer->broadcastPacketTcpByCommand(packet, packet->getCommand()); + ArLog::log(ArLog::Normal, + "%sDon't know what type of packet %s is (%d)", + myPrefix.c_str(), + myClient->getName(packet->getCommand(), true), + packet->getPacketSource()); + } + } + else if (returnType == RETURN_VIDEO_OPTIM) + { + // what we do here is send it to the ones that have requested it + while ((it = myRequestOnces[packet->getCommand()]->begin()) != + myRequestOnces[packet->getCommand()]->end()) + { + client = (*it); + /* + ArLog::log(ArLog::Normal, "%sSent a return_video_optim for %s to %s", + myPrefix.c_str(), + myClient->getName(packet->getCommand(), true), + client->getIPString()); + */ + if (client != NULL) + { + if (packet->getPacketSource() == ArNetPacket::TCP) + client->sendPacketTcp(packet); + else if (packet->getPacketSource() == ArNetPacket::UDP) + client->sendPacketUdp(packet); + else + { + client->sendPacketTcp(packet); + ArLog::log(ArLog::Normal, + "%sDon't know what type of packet %s is (%d)", + myPrefix.c_str(), + myClient->getName(packet->getCommand(), true), + packet->getPacketSource()); + } + } + myRequestOnces[packet->getCommand()]->pop_front(); + } + } + else + { + myLastBroadcast[packet->getCommand()]->setToNow(); + if (packet->getPacketSource() == ArNetPacket::TCP) + { + myServer->broadcastPacketTcpByCommand(packet, packet->getCommand()); + } + else if (packet->getPacketSource() == ArNetPacket::UDP) + { + myServer->broadcastPacketUdpByCommand(packet, packet->getCommand()); + } + else + { + myServer->broadcastPacketTcpByCommand(packet, packet->getCommand()); + ArLog::log(ArLog::Normal, + "%sDon't know what type of packet %s is (%d)", + myPrefix.c_str(), + myClient->getName(packet->getCommand(), true), + packet->getPacketSource()); + } + } + +} + +void ArCentralForwarder::internalRequestChanged(long interval, + unsigned int command) +{ + /* + if (strcmp(myClient->getName(command, true), + "getPictureCam1") == 0) + printf("Changed getPictureCam1 to %d...\n", interval); + */ + if (interval == -2) + { + ArLog::log(ArLog::Verbose, "%sStopping request for %s", + myPrefix.c_str(), myClient->getName(command, true)); + myClient->requestStopByCommand(command); + setLastRequest(command); + } + else + { + ReturnType returnType; + + returnType = getReturnType(command); + if (returnType == RETURN_VIDEO && interval != -1) + { + ArLog::log(ArLog::Verbose, "%sIgnoring a RETURN_VIDEO attempted request of %s at %d interval since RETURN_VIDEOs cannot request at an interval", + myPrefix.c_str(), myClient->getName(command, true), interval); + return; + } + if (returnType == RETURN_VIDEO_OPTIM && interval != -1) + { + ArLog::log(ArLog::Verbose, "%sIgnoring a RETURN_VIDEO_OPTIM attempted request of %s at %d interval since RETURN_VIDEOs cannot request at an interval", + myPrefix.c_str(), myClient->getName(command, true), interval); + return; + } + + ArLog::log(ArLog::Verbose, "%sRequesting %s at interval of %ld", + myPrefix.c_str(), myClient->getName(command, true), interval); + myClient->requestByCommand(command, interval); + setLastRequest(command); + // if the interval is -1 then also requestOnce it so that anyone + // connecting after the first connection can actually get data too + myClient->requestOnceByCommand(command); + } +} + +bool ArCentralForwarder::internalRequestOnce( + ArServerClient *client, ArNetPacket *packet, bool tcp) +{ + ReturnType returnType = RETURN_NONE; + + returnType = getReturnType(packet->getCommand()); + + // chop off the footer + packet->setAddedFooter(true); + /* + if (strcmp(myClient->getName(packet->getCommand(), true), + "getPictureCam1") == 0) + printf("Request once for getPictureCam1...\n"); + */ + // if its video and the last broadcast or request was very recently + // then ignore it so we don't wind up using up our wireless + // bandwidth + // MPL taking this out since it may be causing some problems + /* + if (returnType == RETURN_VIDEO && + (myLastBroadcast[packet->getCommand()]->mSecSince() < 25 || + myLastRequest[packet->getCommand()]->mSecSince() < 25)) + { + ArLog::log(ArLog::Normal, "Ignoring a RETURN_VIDEO of %s since request or broadcast was recent", myClient->getName(packet->getCommand(), true)); + return; + } + */ + // if its a type where we keep track then put it into the list + if (returnType == RETURN_SINGLE || returnType == RETURN_UNTIL_EMPTY || + returnType == RETURN_VIDEO || returnType == RETURN_VIDEO_OPTIM) + { + //if (returnType == RETURN_UNTIL_EMPTY) + //printf("Trying to request once %s\n", myClient->getName(packet->getCommand(), true)); + checkRequestOnces(packet->getCommand()); + myRequestOnces[packet->getCommand()]->push_back(client); + } + + bool ret; + ArLog::log(ArLog::Verbose, "%sRequesting %s once", + myPrefix.c_str(), myClient->getName(packet->getCommand())); + if (tcp) + ret = myClient->requestOnceByCommand(packet->getCommand(), packet); + else + ret = myClient->requestOnceByCommandUdp(packet->getCommand(), packet); + + setLastRequest(packet->getCommand()); + + return ret; +} + + +AREXPORT void ArCentralForwarder::netCentralHeartbeat(ArNetPacket *packet) +{ + if (packet->getPacketSource() == ArNetPacket::TCP) + myLastTcpHeartbeat.setToNow(); + else if (packet->getPacketSource() == ArNetPacket::UDP) + myLastUdpHeartbeat.setToNow(); + else + ArLog::log(ArLog::Normal, + "%sGot unknown packet source for heartbeat packet", + myPrefix.c_str()); +} + +AREXPORT bool ArCentralForwarder::addHandler( + const char *name, ArFunctor1 *functor) +{ + if (myClient != NULL) + { + return myClient->addHandler(name, functor); + } + else + { + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::addHandler: Tried to call while client was still NULL", + getRobotName()); + return false; + } +} + +AREXPORT bool ArCentralForwarder::remHandler(const char *name, ArFunctor1 *functor) +{ + if (myClient != NULL) + { + return myClient->remHandler(name, functor); + } + else + { + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::remHandler: Tried to call while client was still NULL", + getRobotName()); + return false; + } +} + +AREXPORT bool ArCentralForwarder::request(const char *name, long mSec) +{ + if (myServer != NULL) + { + return myServer->internalSetDefaultFrequency(name, mSec); + + } + else + { + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::remHandler: Tried to call while server was still NULL", + getRobotName()); + return false; + } +} + +AREXPORT bool ArCentralForwarder::requestOnce(const char *name, + ArNetPacket *packet, + bool quiet) +{ + if (myClient != NULL) + { + unsigned int commandNum = myClient->findCommandFromName(name); + if (commandNum == 0) + { + if (!quiet) + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::requestOnce: Can't find commandNum for %s", + getRobotName(), name); + return false; + } + //return myClient->requestOnce(name, packet, quiet); + if (packet != NULL) + { + packet->setCommand(commandNum); + packet->finalizePacket(); + return internalRequestOnce(NULL, packet, true); + } + else + { + ArNetPacket tempPacket; + tempPacket.setCommand(commandNum); + tempPacket.finalizePacket(); + return internalRequestOnce(NULL, &tempPacket, true); + } + } + else + { + if (!quiet) + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::requestOnce: Tried to call (for %s) while client was still NULL", + getRobotName(), name); + return false; + } +} + +AREXPORT bool ArCentralForwarder::requestOnceUdp(const char *name, + ArNetPacket *packet, + bool quiet) +{ + if (myClient != NULL) + { + unsigned int commandNum = myClient->findCommandFromName(name); + if (commandNum == 0) + { + if (!quiet) + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::requestOnce: Can't find commandNum for %s", + getRobotName(), name); + return false; + } + //return myClient->requestOnceUdp(name, packet, quiet); + if (packet != NULL) + { + packet->setCommand(commandNum); + packet->finalizePacket(); + return internalRequestOnce(NULL, packet, false); + } + else + { + ArNetPacket tempPacket; + tempPacket.setCommand(commandNum); + tempPacket.finalizePacket(); + return internalRequestOnce(NULL, &tempPacket, false); + } + } + else + { + if (!quiet) + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::requestOnce: Tried to call (for %s) while client was still NULL", + getRobotName(), name); + return false; + } +} + +AREXPORT bool ArCentralForwarder::requestOnceWithString(const char *name, const char *str) +{ + ArNetPacket tempPacket; + tempPacket.strToBuf(str); + + return requestOnce(name, &tempPacket); +} + +AREXPORT bool ArCentralForwarder::dataExists(const char *name) +{ + if (myClient != NULL) + { + return myClient->dataExists(name); + } + else + { + ArLog::log(ArLog::Normal, + "ArCentralForwarder::%s::dataExists: Tried to call while client was still NULL", + getRobotName()); + return false; + } +} + +ArCentralForwarder::ReturnType ArCentralForwarder::getReturnType(int command) +{ + if (myReturnTypes.find(command) != myReturnTypes.end()) + return myReturnTypes[command]; + else + return RETURN_NONE; +} + +void ArCentralForwarder::checkRequestOnces(unsigned int command) +{ + if (myRequestOnces.find(command) == myRequestOnces.end()) + myRequestOnces[command] = new std::list; +} + +void ArCentralForwarder::setLastRequest(unsigned int command) +{ + if (myLastRequest.find(command) == myLastRequest.end()) + myLastRequest[command] = new ArTime; + myLastRequest[command]->setToNow(); +} + +void ArCentralForwarder::setLastBroadcast(unsigned int command) +{ + if (myLastBroadcast.find(command) == myLastBroadcast.end()) + myLastBroadcast[command] = new ArTime; + myLastBroadcast[command]->setToNow(); +} diff --git a/Legacy/Aria/ArNetworking/src/ArCentralManager.cpp b/Legacy/Aria/ArNetworking/src/ArCentralManager.cpp new file mode 100644 index 0000000..0806da1 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArCentralManager.cpp @@ -0,0 +1,712 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArCentralManager.h" + + +ArCentralManager::ArCentralManager(ArServerBase *robotServer, + ArServerBase *clientServer) : + myNetSwitchCB(this, &ArCentralManager::netServerSwitch), + myNetClientListCB(this, &ArCentralManager::netClientList), + myAriaExitCB(this, &ArCentralManager::close), + myProcessFileCB(this, &ArCentralManager::processFile), + myForwarderServerClientRemovedCB( + this, &ArCentralManager::forwarderServerClientRemovedCallback), + myMainServerClientRemovedCB( + this, &ArCentralManager::mainServerClientRemovedCallback) +{ + myMutex.setLogName("ArCentralManager::myCallbackMutex"); + myDataMutex.setLogName("ArCentralManager::myDataMutex"); + setThreadName("ArCentralManager"); + + myRobotServer = robotServer; + myClientServer = clientServer; + + myAriaExitCB.setName("ArCentralManager"); + Aria::addExitCallback(&myAriaExitCB, 25); + + myEnforceType = ArServerCommands::TYPE_UNSPECIFIED; + + myClientBackupTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("CentralServerToClientTimeoutInMins", + &myClientBackupTimeout, + "The amount of time the central server can go without sending a packet to the robot successfully (when there are packets to send). A number less than 0 means this won't happen. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", -1), + "Connection timeouts", ArPriority::DETAILED); + + myRobotBackupTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("CentralServerToRobotTimeoutInMins", + &myRobotBackupTimeout, + "The amount of time the central server can go without sending a packet to the robot successfully (when there are packets to send). A number less than 0 means this won't happen. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", -1), + "Connection timeouts", ArPriority::DETAILED); + + myHeartbeatTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("CentralServerFromRobotTimeoutInMins", + &myHeartbeatTimeout, + "The amount of time the central server can go without hearing a robot's heartbeat without disconnecting it. A number less than 0 means that the robots will never timeout. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", -1), + "Connection timeouts", ArPriority::DETAILED); + + myUdpHeartbeatTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("CentralServerFromRobotUdpTimeoutInMins", + &myUdpHeartbeatTimeout, + "The amount of time the central server can go without hearing a robot's udp heartbeat without disconnecting it (this fails it over to tcp only). A number less than 0 means that the robots will never timeout. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", -1), + "Connection timeouts", ArPriority::DETAILED); + + + myProcessFileCB.setName("ArCentralManager"); + Aria::getConfig()->addProcessFileCB(&myProcessFileCB, -999); + + myRobotServer->addData("switch", "switches the direction of the connection, after this is requested it sends an empty packet denoting acceptance of the switch, then switches this to a client connection", + &myNetSwitchCB, "string: robotName", "empty packet", "RobotInfo", + "RETURN_SINGLE"); + + myRobotServer->addData("centralServerHeartbeat", "Just a data to let the robot's know that this server has the centralServerHeartbeat feature (nothing is actually done with this command)", + NULL, "none", "none", "RobotInfo", + "RETURN_NONE"); + + myClientServer->addData("clientList", "Lists the clients that are connected", + &myNetClientListCB, "none", + "ubyte2: numClients; repeating for [string: hostname (empty means this host); ubyte2: port; string: robot name; string: flags; string: robot ip address]", + "RobotInfo", "RETURN_SINGLE"); + myClientServer->addData("clientAdded", "Broadcast when a client is added", + NULL, "none", + "string: hostname (empty means this host); ubyte2: port; string: robot name; string: flags; string: robot ip address", + "RobotInfo", "RETURN_SINGLE"); + myClientServer->addData("clientRemoved", "Broadcast when a client is removed", + NULL, "none", + "string: hostname (empty means this host); ubyte2: port; string: robot name; string: flags; string: robot ip address", + "RobotInfo", "RETURN_SINGLE"); + + myClientServer = clientServer; + + myClosingConnectionID = 0; + + myMostForwarders = 0; + myMostClients = 0; + + myForwarderServerClientRemovedCB.setName("ArCentralManager"); + + + myMainServerClientRemovedCB.setName("ArCentralManager"); + myClientServer->addClientRemovedCallback(&myMainServerClientRemovedCB); + + runAsync(); +} + +ArCentralManager::~ArCentralManager() +{ +} + +void ArCentralManager::close(void) +{ + std::list::iterator fIt; + ArCentralForwarder *forwarder; + + ArLog::log(ArLog::Normal, "ArCentralManager closing"); + //myDataMutex.lock(); + while ((fIt = myForwarders.begin()) != myForwarders.end()) + { + forwarder = (*fIt); + std::multimap *>::iterator it; + for (it = myForwarderRemovedCBList.begin(); + it != myForwarderRemovedCBList.end(); + it++) + (*it).second->invoke(forwarder); + + myForwarders.pop_front(); + delete forwarder; + + } + //myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "ArCentralManager closed"); +} + +void ArCentralManager::netServerSwitch(ArServerClient *client, ArNetPacket *packet) +{ + char robotName[512]; + std::string uniqueName; + + robotName[0] = '\0'; + + //printf("robotName before '%s'\n", robotName); + + packet->bufToStr(robotName, sizeof(robotName)); + + ArNetPacket sendPacket; + /// acknowledge the switch + client->sendPacketTcp(&sendPacket); + + ArSocket *clientSocket = new ArSocket; + clientSocket->transfer(client->getTcpSocket()); + + client->tcpCallback(); + client->forceDisconnect(true); + + + // make the basis of the unique name + if (robotName[0] != '\0') + uniqueName = robotName; + else + uniqueName = client->getIPString(); + + //printf("Starting with '%s'\n", uniqueName.c_str()); + + myDataMutex.lock(); + // walk through and make the name unique + std::list::iterator fIt; + ArCentralForwarder *forwarder; + /* the old code that made the names unique + bool nameIsUnique = false; + while (!nameIsUnique) + { + nameIsUnique = true; + for (fIt = myForwarders.begin(); + fIt != myForwarders.end() && nameIsUnique; + fIt++) + { + forwarder = (*fIt); + if (strcasecmp(forwarder->getRobotName(), uniqueName.c_str()) == 0) + nameIsUnique = false; + } + if (!nameIsUnique) + uniqueName += "_"; + } + */ + // the new code that drops the duplicates and replaces it with the same name + for (fIt = myForwarders.begin(); fIt != myForwarders.end(); fIt++) + { + forwarder = (*fIt); + if (strcasecmp(forwarder->getRobotName(), uniqueName.c_str()) == 0) + { + ArLog::log(ArLog::Normal, + "ArCentralManager: Will drop old duplicate connection for %s", + uniqueName.c_str()); + forwarder->willReplace(); + } + } + + // remove any pending client duplicates + while (removePendingDuplicateConnections(uniqueName.c_str())); + + // end of new code, though it also had reordering down below in the runthread + + myClientSockets.push_back(clientSocket); + myClientNames.push_back(uniqueName); + + //printf("robotName after '%s'\n", robotName); + // just print out the switch request name if its the same as it came in as + if (strcmp(uniqueName.c_str(), robotName) == 0) + ArLog::log(ArLog::Normal, "Got switch request from %s from %s", + client->getIPString(), uniqueName.c_str()); + // otherwise let them know what the unique name is + if (strcmp(uniqueName.c_str(), robotName) != 0) + ArLog::log(ArLog::Normal, + "Got switch request from %s from %s that started as %s", + client->getIPString(), uniqueName.c_str(), robotName); + //printf("Ended with '%s'\n", uniqueName.c_str()); + myDataMutex.unlock(); +} + +/** + removes pending duplicate connections... has a return since you + must call it until it returns false... this is because of the list + management + */ +bool ArCentralManager::removePendingDuplicateConnections(const char *robotName) +{ + std::list::iterator sIt; + std::list::iterator nIt; + + ArSocket *socket; + std::string checkingName; + + for (sIt = myClientSockets.begin(), nIt = myClientNames.begin(); + sIt != myClientSockets.end() && nIt != myClientNames.end(); + sIt++, nIt++) + { + socket = (*sIt); + checkingName = (*nIt); + + + if (ArUtil::strcasecmp(robotName, checkingName) == 0) + { + ArLog::log(ArLog::Normal, + "ArCentralManager: Removing duplicate pending connection for %s", + robotName); + + myClientSockets.erase(sIt); + myClientNames.erase(nIt); + + // delete the old socket so it closes + delete socket; + + return true; + } + } + + return false; +} + +void ArCentralManager::netClientList(ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + std::list::iterator fIt; + ArCentralForwarder *forwarder; + ArTypes::UByte2 sizeLen; + ArTypes::UByte2 realLen; + unsigned int numConnected = 0; + + myDataMutex.lock(); + sizeLen = sendPacket.getLength(); + sendPacket.uByte2ToBuf(0); + for (fIt = myForwarders.begin(); fIt != myForwarders.end(); fIt++) + { + forwarder = (*fIt); + + if (!forwarder->isConnected()) + continue; + + numConnected++; + sendPacket.strToBuf(""); + sendPacket.uByte2ToBuf(forwarder->getPort()); + sendPacket.strToBuf(forwarder->getRobotName()); + sendPacket.strToBuf(""); + sendPacket.strToBuf( + forwarder->getClient()->getTcpSocket()->getIPString()); + } + + realLen = sendPacket.getLength(); + sendPacket.setLength(sizeLen); + sendPacket.uByte2ToBuf(numConnected); + sendPacket.setLength(realLen); + + myDataMutex.unlock(); + client->sendPacketTcp(&sendPacket); +} + +/// This should be its own thread here +void *ArCentralManager::runThread(void *arg) +{ + std::list::iterator sIt; + std::list::iterator nIt; + std::list::iterator fIt; + ArSocket *socket; + std::string robotName; + ArCentralForwarder *forwarder; + + ArNetPacket *packet; + std::list addPackets; + std::list remPackets; + + + threadStarted(); + while (getRunning()) + { + int numForwarders = 0; + int numClients = 0; + + myDataMutex.lock(); + // this is where the original code to add forwarders was before we + // changed the unique behavior to drop old ones... + + + std::list connectedRemoveList; + std::list unconnectedRemoveList; + for (fIt = myForwarders.begin(); fIt != myForwarders.end(); fIt++) + { + forwarder = (*fIt); + + numForwarders++; + if (forwarder->getServer() != NULL) + numClients += forwarder->getServer()->getNumClients(); + bool connected = forwarder->isConnected(); + bool removed = false; + if (!forwarder->callOnce(myHeartbeatTimeout, myUdpHeartbeatTimeout, + myRobotBackupTimeout, myClientBackupTimeout)) + { + if (connected) + { + ArLog::log(ArLog::Normal, "Will remove forwarder from %s", + forwarder->getRobotName()); + connectedRemoveList.push_back(forwarder); + removed = true; + } + else + { + ArLog::log(ArLog::Normal, "Failed to connect to forwarder from %s", + forwarder->getRobotName()); + unconnectedRemoveList.push_back(forwarder); + removed = true; + } + } + if (!connected && !removed && forwarder->isConnected()) + { + ArLog::log(ArLog::Normal, "Adding forwarder %s", + forwarder->getRobotName()); + ArTime *newTime = new ArTime; + newTime->setSec(0); + myUsedPorts[forwarder->getPort()] = newTime; + + std::multimap *>::iterator it; + for (it = myForwarderAddedCBList.begin(); + it != myForwarderAddedCBList.end(); + it++) + { + if ((*it).second->getName() == NULL || + (*it).second->getName()[0] == '\0') + ArLog::log(ArLog::Normal, "Calling unnamed add functor at %d", + -(*it).first); + else + ArLog::log(ArLog::Normal, "Calling %s add functor at %d", + (*it).second->getName(), -(*it).first); + (*it).second->invoke(forwarder); + } + ArLog::log(ArLog::Normal, "Added forwarder %s", + forwarder->getRobotName()); + ArNetPacket *sendPacket = new ArNetPacket; + sendPacket->strToBuf(""); + sendPacket->uByte2ToBuf(forwarder->getPort()); + sendPacket->strToBuf(forwarder->getRobotName()); + sendPacket->strToBuf(""); + sendPacket->strToBuf( + forwarder->getClient()->getTcpSocket()->getIPString()); + addPackets.push_back(sendPacket); + // MPL added this at the same time as the changes for the deadlock that happened down below + //myClientServer->broadcastPacketTcp(&sendPacket, "clientAdded"); + } + } + + while ((fIt = connectedRemoveList.begin()) != connectedRemoveList.end()) + { + forwarder = (*fIt); + + ArLog::log(ArLog::Normal, "Removing forwarder %s", + forwarder->getRobotName()); + std::multimap *>::iterator it; + for (it = myForwarderRemovedCBList.begin(); + it != myForwarderRemovedCBList.end(); + it++) + { + if ((*it).second->getName() == NULL || + (*it).second->getName()[0] == '\0') + ArLog::log(ArLog::Normal, "Calling unnamed remove functor at %d", + -(*it).first); + else + ArLog::log(ArLog::Normal, "Calling %s remove functor at %d", + (*it).second->getName(), -(*it).first); + (*it).second->invoke(forwarder); + } + + ArLog::log(ArLog::Normal, "Called forwarder removed for %s", + forwarder->getRobotName()); + ArNetPacket *sendPacket = new ArNetPacket; + sendPacket->strToBuf(""); + sendPacket->uByte2ToBuf(forwarder->getPort()); + sendPacket->strToBuf(forwarder->getRobotName()); + sendPacket->strToBuf(""); + sendPacket->strToBuf( + forwarder->getClient()->getTcpSocket()->getIPString()); + // MPL making this just push packets into a list to broadcast at the end since this was deadlocking + //myClientServer->broadcastPacketTcp(&sendPacket, "clientRemoved"); + remPackets.push_back(sendPacket); + + if (myUsedPorts.find(forwarder->getPort()) != myUsedPorts.end() && + myUsedPorts[forwarder->getPort()] != NULL) + myUsedPorts[forwarder->getPort()]->setToNow(); + + myForwarders.remove(forwarder); + delete forwarder; + connectedRemoveList.pop_front(); + ArLog::log(ArLog::Normal, "Removed forwarder"); + + } + + while ((fIt = unconnectedRemoveList.begin()) != + unconnectedRemoveList.end()) + { + forwarder = (*fIt); + ArLog::log(ArLog::Normal, "Removing unconnected forwarder %s", + forwarder->getRobotName()); + + if (myUsedPorts.find(forwarder->getPort()) != myUsedPorts.end() && + myUsedPorts[forwarder->getPort()] != NULL) + myUsedPorts[forwarder->getPort()]->setToNow(); + + myForwarders.remove(forwarder); + delete forwarder; + unconnectedRemoveList.pop_front(); + ArLog::log(ArLog::Normal, "Removed unconnected forwarder"); + } + + + // this code was up above just after the lock before we changed + // the behavior for unique names + while ((sIt = myClientSockets.begin()) != myClientSockets.end() && + (nIt = myClientNames.begin()) != myClientNames.end()) + { + socket = (*sIt); + robotName = (*nIt); + + myClientSockets.pop_front(); + myClientNames.pop_front(); + + ArLog::log(ArLog::Normal, + "New forwarder for socket from %s with name %s", + socket->getIPString(), robotName.c_str()); + + forwarder = new ArCentralForwarder(myClientServer, socket, + robotName.c_str(), + myClientServer->getTcpPort() + 1, + &myUsedPorts, + &myForwarderServerClientRemovedCB, + myEnforceProtocolVersion.c_str(), + myEnforceType); + myForwarders.push_back(forwarder); + } + + numClients += myRobotServer->getNumClients(); + if (myRobotServer != myClientServer) + numClients += myClientServer->getNumClients(); + // end of code moved for change in unique behavior + if (numClients > myMostClients) + { + ArLog::log(ArLog::Normal, "CentralManager: New most clients: %d", + numClients); + myMostClients = numClients; + } + + if (numForwarders > myMostForwarders) + myMostForwarders = numForwarders; + + if (numClients > myMostClients) + { + ArLog::log(ArLog::Normal, "CentralManager: New most forwarders: %d", + numForwarders); + myMostForwarders = numForwarders; + } + + myRobotServer->internalSetNumClients(numForwarders + + myClientSockets.size()); + + myDataMutex.unlock(); + + while (addPackets.begin() != addPackets.end()) + { + packet = addPackets.front(); + myClientServer->broadcastPacketTcp(packet, "clientAdded"); + addPackets.pop_front(); + delete packet; + } + + while (remPackets.begin() != remPackets.end()) + { + packet = remPackets.front(); + myClientServer->broadcastPacketTcp(packet, "clientRemoved"); + remPackets.pop_front(); + delete packet; + } + + ArUtil::sleep(1); + + //make this a REALLY long sleep to test the duplicate pending + //connection code + //ArUtil::sleep(20000); + } + + threadFinished(); + return NULL; +} + + +AREXPORT void ArCentralManager::addForwarderAddedCallback( + ArFunctor1 *functor, int priority) +{ + myCallbackMutex.lock(); + myForwarderAddedCBList.insert( + std::pair *>(-priority, + functor)); + myCallbackMutex.unlock(); +} + +AREXPORT void ArCentralManager::remForwarderAddedCallback( + ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + + std::multimap *>::iterator it; + + for (it = myForwarderAddedCBList.begin(); + it != myForwarderAddedCBList.end(); + ++it) + { + if ((*it).second == functor) + { + myForwarderAddedCBList.erase(it); + myCallbackMutex.unlock(); + remForwarderAddedCallback(functor); + return; + } + } + myCallbackMutex.unlock(); +} + +AREXPORT void ArCentralManager::addForwarderRemovedCallback( + ArFunctor1 *functor, int priority) +{ + myCallbackMutex.lock(); + myForwarderRemovedCBList.insert( + std::pair *>(-priority, + functor)); + myCallbackMutex.unlock(); +} + +AREXPORT void ArCentralManager::remForwarderRemovedCallback( + ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + std::multimap *>::iterator it; + + for (it = myForwarderRemovedCBList.begin(); + it != myForwarderRemovedCBList.end(); + ++it) + { + if ((*it).second == functor) + { + myForwarderRemovedCBList.erase(it); + myCallbackMutex.unlock(); + remForwarderRemovedCallback(functor); + return; + } + } + myCallbackMutex.unlock(); +} + +bool ArCentralManager::processFile(void) +{ + // this should be okay if it isn't locked since it takes care of + //thread safety itself and the client server can't go away, and its + //client tcp sender can't either... and if it locks here when the + //config changes from inside of it calling the clients, then its a + //deadlock + + //myDataMutex.lock(); + if (myClientServer != NULL) + myClientServer->setBackupTimeout(myClientBackupTimeout); + //myDataMutex.unlock(); + return true; +} + +AREXPORT void ArCentralManager::forwarderServerClientRemovedCallback( + ArCentralForwarder *forwarder, ArServerClient *client) +{ + // if this matches we're already closing this so don't do/print anything + if (myClosingConnectionID != 0 && + myClosingConnectionID == client->getIdentifier().getConnectionID()) + return; + + ArLog::log(ArLog::Normal, + "Notifying main server of removal of serverClient for %s %s", + forwarder->getRobotName(), client->getIPString()); + + ArNetPacket sendPacket; + sendPacket.strToBuf(""); + sendPacket.uByte2ToBuf(forwarder->getPort()); + sendPacket.strToBuf(forwarder->getRobotName()); + sendPacket.strToBuf(""); + sendPacket.strToBuf( + forwarder->getClient()->getTcpSocket()->getIPString()); + myClientServer->broadcastPacketTcpToMatching(&sendPacket, "clientRemoved", + client->getIdentifier(), true); + myClientServer->broadcastPacketTcpToMatching(&sendPacket, "clientAdded", + client->getIdentifier(), true); +} + +AREXPORT void ArCentralManager::mainServerClientRemovedCallback( + ArServerClient *client) +{ + ArTypes::UByte4 idNum; + if ((idNum = client->getIdentifier().getConnectionID()) == 0) + return; + + myDataMutex.lock(); + myClosingConnectionID = idNum; + ArLog::log(ArLog::Normal, "ArCentralManager: Lost main connection to %s, closing robot connections to it", client->getIPString()); + std::list::iterator fIt; + ArCentralForwarder *forwarder; + for (fIt = myForwarders.begin(); fIt != myForwarders.end(); fIt++) + { + forwarder = (*fIt); + if (forwarder->getServer() != NULL) + forwarder->getServer()->closeConnectionID(myClosingConnectionID); + } + myClosingConnectionID = 0; + myDataMutex.unlock(); +} + + +void ArCentralManager::logConnections(void) +{ + int numServerClients = 0; + ArLog::log(ArLog::Normal, ""); + ArLog::log(ArLog::Normal, ""); + ArLog::log(ArLog::Normal, "Logging connection information:"); + ArLog::log(ArLog::Normal, "Main client server:"); + myClientServer->logConnections("\t"); + ArLog::log(ArLog::Normal, ""); + numServerClients += myClientServer->getNumClients(); + myDataMutex.lock(); + std::list::iterator fIt; + ArCentralForwarder *forwarder; + for (fIt = myForwarders.begin(); fIt != myForwarders.end(); fIt++) + { + forwarder = (*fIt); + if (forwarder->isConnected()) + { + ArLog::log(ArLog::Normal, "Forwarded connection to %s:", + forwarder->getRobotName()); + forwarder->getServer()->logConnections("\t"); + numServerClients += forwarder->getServer()->getNumClients(); + ArLog::log(ArLog::Normal, ""); + } + else + { + ArLog::log(ArLog::Normal, "Connecting forwarded connection to %s:", + forwarder->getRobotName()); + ArLog::log(ArLog::Normal, ""); + } + } + ArLog::log(ArLog::Normal, ""); + ArLog::log(ArLog::Normal, "Forwarders: %d now %d max", + myForwarders.size(), myMostForwarders); + ArLog::log(ArLog::Normal, "Clients: %d now %d max", + numServerClients, myMostClients); + ArLog::log(ArLog::Normal, ""); + ArLog::log(ArLog::Normal, ""); + myDataMutex.unlock(); + +} + +/// Enforces the that the server is using this protocol version +AREXPORT void ArCentralManager::enforceProtocolVersion(const char *protocolVersion) +{ + myDataMutex.lock(); + if (protocolVersion != NULL) + myEnforceProtocolVersion = protocolVersion; + else + myEnforceProtocolVersion = ""; + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "ArCentralManager: New enforceProtocolVersionSet"); + +} + +AREXPORT void ArCentralManager::enforceType(ArServerCommands::Type type) +{ + myDataMutex.lock(); + myEnforceType = type; + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "ArCentralManager: New enforce type: %s", + ArServerCommands::toString(type)); + +} diff --git a/Legacy/Aria/ArNetworking/src/ArClientArgUtils.cpp b/Legacy/Aria/ArNetworking/src/ArClientArgUtils.cpp new file mode 100644 index 0000000..d47550d --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientArgUtils.cpp @@ -0,0 +1,702 @@ + +#include "Aria.h" +#include "ArExport.h" + +#include "ArClientArgUtils.h" + +#include + +#include "ArNetPacket.h" + +//#define ARDEBUG_CLIENTARGUTILS + +#if (defined(_DEBUG) && defined(ARDEBUG_CLIENTARGUTILS)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +AREXPORT ArClientArg::ArClientArg(bool isDisplayHintParsed, + ArPriority::Priority lastPriority, + int version) : + myIsDisplayHintParsed(isDisplayHintParsed), + myLastPriority(lastPriority), + myVersion(version), + myBuffer(), + myDisplayBuffer() +{} + +AREXPORT ArClientArg::~ArClientArg() +{} + +AREXPORT bool ArClientArg::isSendableParamType(const ArConfigArg &arg) +{ + switch (arg.getType()) { + case ArConfigArg::INT: + case ArConfigArg::DOUBLE: + case ArConfigArg::BOOL: + case ArConfigArg::LIST: + case ArConfigArg::STRING: + case ArConfigArg::SEPARATOR: + return true; + + default: + return false; + } +} + + +AREXPORT bool ArClientArg::createArg(ArNetPacket *packet, + ArConfigArg &argOut) +{ + if (packet == NULL) { + ArLog::log(ArLog::Verbose, "ArClientArg::createArg() cannot unpack NULL packet"); + return false; + } + + bool isSuccess = true; + + char name[32000]; + char description[32000]; + myDisplayBuffer[0] = '\0'; + + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(description, sizeof(description)); + + + char priorityVal = packet->bufToByte(); + + ArPriority::Priority priority = myLastPriority; + if ((priorityVal >= 0) && (priorityVal <= myLastPriority)) { + priority = (ArPriority::Priority) priorityVal; + } + + char argType = packet->bufToByte(); + + switch (argType) { + + case 'B': + case 'b': // Lower case indicates display information contained in packet... + { + if ((argType == 'B') || (myIsDisplayHintParsed)) { + + bool boolVal = false; + if (packet->bufToByte()) { + boolVal = true; + } + //packet->bufToStr(myDisplayBuffer, BUFFER_LENGTH); + argOut = ArConfigArg(name, boolVal, description); + } + else { + isSuccess = false; + } + } + break; + + case 'I': + case 'i': // Lower case indicates display information contained in packet... + { + if ((argType == 'I') || (myIsDisplayHintParsed)) { + + int intVal = packet->bufToByte4(); + int intMin = packet->bufToByte4(); + int intMax = packet->bufToByte4(); + + argOut = ArConfigArg(name, intVal, description, intMin, intMax); + } + else { + isSuccess = false; + } + + } + break; + + case 'D': + case 'd': // Lower case indicates display information contained in packet... + { + if ((argType == 'D') || (myIsDisplayHintParsed)) { + double doubleVal = packet->bufToDouble(); + double doubleMin = packet->bufToDouble(); + double doubleMax = packet->bufToDouble(); + + if (myVersion >= 2) { + int precision = packet->bufToByte4(); + argOut = ArConfigArg(name, doubleVal, description, doubleMin, doubleMax, precision); + } + else { + argOut = ArConfigArg(name, doubleVal, description, doubleMin, doubleMax, -1); + } + } + else { + isSuccess = false; + } + } + break; + + case 'S': + case 's': // Lower case indicates display information contained in packet... + { + if ((argType == 'S') || (myIsDisplayHintParsed)) { + + packet->bufToStr(myBuffer, BUFFER_LENGTH); + + //packet->bufToStr(myDisplayBuffer, BUFFER_LENGTH); + argOut = ArConfigArg(name, myBuffer, description, 0); + } + else { + isSuccess = false; + } + } + break; + + case 'L': + case 'l': // Lower case indicates display information contained in packet... + { + + if ((argType == 'L') || (myIsDisplayHintParsed)) { + + int childCount = packet->bufToByte4(); + + ArConfigArg listArg(ArConfigArg::LIST, name, description); + ArConfigArg childArg; + + for (int i = 0; ((i < childCount) && (isSuccess)); i++) { + isSuccess = createArg(packet, + childArg); + if (isSuccess) { + listArg.addArg(childArg); + } + } + + if (isSuccess) { + argOut = listArg; + } + } + else { + isSuccess = false; + } + } + break; + + case '.': + { + //if (myIsDisplayHintParsed) { + //packet->bufToStr(myDisplayBuffer, BUFFER_LENGTH); + //} + argOut = ArConfigArg(ArConfigArg::SEPARATOR); + } + break; + + default: + + isSuccess = false; + ArLog::log(ArLog::Terse, "ArClientArg::createArg() unsupported param type %c", + argType); + } + + argOut.setConfigPriority(priority); + if (myIsDisplayHintParsed) { + + if (isSuccess) { + packet->bufToStr(myDisplayBuffer, BUFFER_LENGTH); + } + + IFDEBUG( + if (strlen(myDisplayBuffer) > 0) { + ArLog::log(ArLog::Verbose, "ArClientArg::createArg() arg %s has displayHint = %s", + argOut.getName(), myDisplayBuffer); + } + ); + + argOut.setDisplayHint(myDisplayBuffer); + } + + if (myVersion >= 2) { + if (isSuccess) { + packet->bufToStr(myExtraBuffer, BUFFER_LENGTH); + } + + IFDEBUG( + if (strlen(myExtraBuffer) > 0) { + ArLog::log(ArLog::Verbose, "ArClientArg::createArg() arg %s has extra explanation = %s", + argOut.getName(), myExtraBuffer); + } + ); + + argOut.setExtraExplanation(myExtraBuffer); + } // end if + + if (myVersion >= 2) { + char restartVal = packet->bufToByte(); + ArConfigArg::RestartLevel restart = ArConfigArg::NO_RESTART; + if ((restartVal >= 0) && (restartVal <= ArConfigArg::LAST_RESTART_LEVEL)) { + restart = (ArConfigArg::RestartLevel) restartVal; + argOut.setRestartLevel(restart); + } + } + + return isSuccess; + +} // end method createArg + + +AREXPORT bool ArClientArg::createPacket(const ArConfigArg &arg, + ArNetPacket *packet) +{ + if (packet == NULL) { + ArLog::log(ArLog::Verbose, + "ArClientArg::createPacket() cannot create NULL packet"); + return false; + } + + bool isSuccess = true; + + packet->strToBuf(arg.getName()); + packet->strToBuf(arg.getDescription()); + + ArPriority::Priority priority = arg.getConfigPriority(); + if (priority > myLastPriority) { + priority = myLastPriority; + } + + packet->byteToBuf(priority); + + char argType = '\0'; + + switch (arg.getType()) { + case ArConfigArg::BOOL: + + argType = (myIsDisplayHintParsed ? 'b' : 'B'); + + packet->byteToBuf(argType); + packet->byteToBuf(arg.getBool()); + break; + + case ArConfigArg::INT: + + argType = (myIsDisplayHintParsed ? 'i' : 'I'); + packet->byteToBuf(argType); + + packet->byte4ToBuf(arg.getInt()); + packet->byte4ToBuf(arg.getMinInt()); + packet->byte4ToBuf(arg.getMaxInt()); + + break; + + case ArConfigArg::DOUBLE: + + argType = (myIsDisplayHintParsed ? 'd' : 'D'); + packet->byteToBuf(argType); + + packet->doubleToBuf(arg.getDouble()); + packet->doubleToBuf(arg.getMinDouble()); + packet->doubleToBuf(arg.getMaxDouble()); + if (myVersion >= 2) { + packet->byte4ToBuf(arg.getDoublePrecision()); + } + break; + + case ArConfigArg::STRING: + + argType = (myIsDisplayHintParsed ? 's' : 'S'); + packet->byteToBuf(argType); + + packet->strToBuf(arg.getString()); + + break; + + case ArConfigArg::LIST: + { + argType = (myIsDisplayHintParsed ? 'l' : 'L'); + packet->byteToBuf(argType); + + + + std::list childList = arg.getArgs(); + + int sendableCount = 0; + + for (std::list::const_iterator iter1 = childList.begin(); + iter1 != childList.end(); + iter1++) { + if (isSendableParamType(*iter1)) { + sendableCount++; + } + } + + packet->byte4ToBuf(sendableCount); + + for (std::list::const_iterator iter2 = childList.begin(); + ((iter2 != childList.end()) && (isSuccess)); + iter2++) { + if (isSendableParamType(*iter2)) { + if (!createPacket(*iter2, packet)) { + isSuccess = false; + } + } + } // end for each child + } + break; + + case ArConfigArg::SEPARATOR: + + argType = '.'; + packet->byteToBuf(argType); + break; + + default: + + isSuccess = false; + ArLog::log(ArLog::Terse, + "ArClientArg::createPacket() unsupported param type %s", + ArConfigArg::toString(arg.getType())); + + } // end switch type + + if (isSuccess && myIsDisplayHintParsed) { + packet->strToBuf(arg.getDisplayHint()); + } + if (isSuccess && (myVersion >= 2)) { + packet->strToBuf(arg.getExtraExplanation()); + } + if (isSuccess && (myVersion >= 2)) { + packet->byteToBuf(arg.getRestartLevel()); + } + + return isSuccess; + +} // end method createPacket + + + +AREXPORT bool ArClientArg::bufToArgValue(ArNetPacket *packet, + ArConfigArg &arg) +{ + if (packet == NULL) { + return false; + } + + bool isSuccess = true; + + switch (arg.getType()) { + case ArConfigArg::BOOL: + { + bool boolVal = false; + if (packet->bufToByte()) { + boolVal = true; + } + isSuccess = arg.setBool(boolVal); + } + break; + + case ArConfigArg::INT: + { + int intVal = packet->bufToByte4(); + isSuccess = arg.setInt(intVal); + } + break; + + case ArConfigArg::DOUBLE: + { + double doubleVal = packet->bufToDouble(); + isSuccess = arg.setDouble(doubleVal); + } + break; + + case ArConfigArg::STRING: + { + packet->bufToStr(myBuffer, BUFFER_LENGTH); + isSuccess = arg.setString(myBuffer); + } + break; + + case ArConfigArg::LIST: + { + int childCount = packet->bufToByte4(); + + if (childCount > 0) { + + int copiedCount = 0; + + for (size_t c = 0; ((isSuccess) && (c < arg.getArgCount())); c++) { + + ArConfigArg *childArg = arg.getArg(c); + if (childArg == NULL) { + isSuccess = false; + break; + } + if (!isSendableParamType(*childArg)) { + continue; + } + isSuccess = bufToArgValue(packet, + *childArg); + copiedCount++; + + } // end for each arg + + if (copiedCount != childCount) { + ArLog::log(ArLog::Normal, + "Error reading list values, received %i children, copied %i", + childCount, copiedCount); + } + + } // end if children + + } + break; + case ArConfigArg::SEPARATOR: + // There is no value... + break; + + default: + + isSuccess = false; + ArLog::log(ArLog::Terse, "ArClientArg::createPacket() unsupported param type %i", arg.getType()); + + } // end switch type + + return isSuccess; + +} // end method bufToArgValue + + + +AREXPORT bool ArClientArg::argValueToBuf(const ArConfigArg &arg, + ArNetPacket *packet) +{ + if (packet == NULL) { + return false; + } + + bool isSuccess = true; + + switch (arg.getType()) { + case ArConfigArg::BOOL: + + packet->byteToBuf(arg.getBool()); + break; + + case ArConfigArg::INT: + + packet->byte4ToBuf(arg.getInt()); + break; + + case ArConfigArg::DOUBLE: + + packet->doubleToBuf(arg.getDouble()); + break; + + case ArConfigArg::STRING: + + packet->strToBuf(arg.getString()); + break; + + case ArConfigArg::LIST: + { +/**** + packet->byte4ToBuf(arg.getArgCount()); + + std::list childList = arg.getArgs(); + for (std::list::const_iterator iter = childList.begin(); + ((isSuccess) && (iter != childList.end())); + iter++) { + isSuccess = argValueToBuf(*iter, + packet); + } +*****/ + + std::list childList = arg.getArgs(); + + int sendableCount = 0; + + for (std::list::const_iterator iter1 = childList.begin(); + iter1 != childList.end(); + iter1++) { + if (isSendableParamType(*iter1)) { + sendableCount++; + } + } + + packet->byte4ToBuf(sendableCount); + + for (std::list::const_iterator iter2 = childList.begin(); + ((iter2 != childList.end()) && (isSuccess)); + iter2++) { + if (isSendableParamType(*iter2)) { + isSuccess = argValueToBuf(*iter2, + packet); + // if (!createPacket(*iter2, packet)) { + // isSuccess = false; + // } + } + } // end for each child + } + break; + + case ArConfigArg::SEPARATOR: + // There is no value... + break; + + default: + + isSuccess = false; + ArLog::log(ArLog::Terse, "ArClientArg::createPacket() unsupported param type %i", arg.getType()); + + } // end switch type + + return isSuccess; + +} // end method argValueToBuf + + +AREXPORT bool ArClientArg::argTextToBuf(const ArConfigArg &arg, + ArNetPacket *packet) +{ + if (packet == NULL) { + return false; + } + + bool isSuccess = true; + + switch (arg.getType()) { + case ArConfigArg::INT: + snprintf(myBuffer, BUFFER_LENGTH, "%d", arg.getInt()); + break; + case ArConfigArg::DOUBLE: + snprintf(myBuffer, BUFFER_LENGTH, "%g", arg.getDouble()); + break; + case ArConfigArg::BOOL: + snprintf(myBuffer, BUFFER_LENGTH, "%s", + ArUtil::convertBool(arg.getBool())); + break; + + case ArConfigArg::STRING: + snprintf(myBuffer, BUFFER_LENGTH, "%s", arg.getString()); + break; + + case ArConfigArg::LIST: + { + + ArLog::log(ArLog::Terse, + "UNSUPPORTED METHOD ArClientArg::argTextToBuf (LIST)"); + + std::list childList = arg.getArgs(); + + for (std::list::const_iterator iter2 = childList.begin(); + ((iter2 != childList.end()) && (isSuccess)); + iter2++) { + if (isSendableParamType(*iter2)) { + + packet->strToBuf((*iter2).getName()); + + isSuccess = ArClientArg::addArgTextToPacket(*iter2, + packet); + } + } // end for each child + + + int sendableCount = 0; + + // for (std::list::const_iterator iter1 = childList.begin(); +// iter1 != childList.end(); +// iter1++) { +// if (isSendableParamType(*iter1)) { +// sendableCount++; +// } +// } + +// snprintf(myBuffer, BUFFER_LENGTH, "%d", sendableCount); + + } + break; + case ArConfigArg::SEPARATOR: + break; + default: + isSuccess = false; + break; + } // end switch type + + if (isSuccess) { + packet->strToBuf(myBuffer); + } + return isSuccess; + +} // end method argTextToBuf + +AREXPORT bool ArClientArg::addArgTextToPacket(const ArConfigArg &arg, + ArNetPacket *packet) +{ + if (packet == NULL) { + return false; + } + + bool isSuccess = true; + + switch (arg.getType()) { + case ArConfigArg::INT: + packet->strToBuf(arg.getName()); + snprintf(myBuffer, BUFFER_LENGTH, "%d", arg.getInt()); + packet->strToBuf(myBuffer); + break; + case ArConfigArg::DOUBLE: + packet->strToBuf(arg.getName()); + snprintf(myBuffer, BUFFER_LENGTH, "%g", arg.getDouble()); + packet->strToBuf(myBuffer); + break; + case ArConfigArg::BOOL: + packet->strToBuf(arg.getName()); + snprintf(myBuffer, BUFFER_LENGTH, "%s", + ArUtil::convertBool(arg.getBool())); + packet->strToBuf(myBuffer); + break; + + case ArConfigArg::STRING: + packet->strToBuf(arg.getName()); + snprintf(myBuffer, BUFFER_LENGTH, "%s", arg.getString()); + packet->strToBuf(myBuffer); + break; + + case ArConfigArg::LIST: + { + /* snprintf(myBuffer, BUFFER_LENGTH, "%s %s", + ArConfigArg::LIST_BEGIN_TAG, + arg.getName());*/ + + packet->strToBuf(ArConfigArg::LIST_BEGIN_TAG); + packet->strToBuf(arg.getName()); + + std::list childList = arg.getArgs(); + + for (std::list::const_iterator iter2 = childList.begin(); + ((iter2 != childList.end()) && (isSuccess)); + iter2++) { + if (isSendableParamType(*iter2)) { + + // packet->strToBuf((*iter2).getName()); + + isSuccess = ArClientArg::addArgTextToPacket(*iter2, + packet); + } + } // end for each child + + //snprintf(myBuffer, BUFFER_LENGTH, "%s %s", + // ArConfigArg::LIST_END_TAG, + // arg.getName()); + //packet->strToBuf(myBuffer); + + packet->strToBuf(ArConfigArg::LIST_END_TAG); + packet->strToBuf(arg.getName()); + + } + break; + case ArConfigArg::SEPARATOR: + break; + default: + isSuccess = false; + break; + } // end switch type + + return isSuccess; + +} // end method addArgTextToPacket + diff --git a/Legacy/Aria/ArNetworking/src/ArClientBase.cpp b/Legacy/Aria/ArNetworking/src/ArClientBase.cpp new file mode 100644 index 0000000..d04195a --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientBase.cpp @@ -0,0 +1,2332 @@ + +#include "Aria.h" +#include "ArExport.h" +#include "ArClientBase.h" +#include "ArServerCommands.h" +#include "ArClientCommands.h" +#include "md5.h" + +//#define ARDEBUG_CLIENTBASE + +#if (defined(_DEBUG) && defined(ARDEBUG_CLIENTBASE)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +AREXPORT ArClientBase::ArClientBase() : + myLogPrefix(""), + myProcessPacketCB(this, &ArClientBase::processPacket, NULL, true), + myProcessPacketUdpCB(this, &ArClientBase::processPacketUdp) + +{ + myDataMutex.setLogName("ArClientBase::myDataMutex"); + myClientMutex.setLogName("ArClientBase::myClientMutex"); + myMapsMutex.setLogName("ArClientBase::myMapsMutex"); + myStateMutex.setLogName("ArClientBase::myStateMutex"); + myCallbackMutex.setLogName("ArClientBase::myCallbackMutex"); + myCycleCallbackMutex.setLogName("ArClientBase::myCycleCallbackMutex"); + myPacketTrackingMutex.setLogName("ArClientBase::myPacketTrackingMutex"); + + setRobotName("ArClientBase"); + setThreadName("ArClientBase"); + myTcpSender.setSocket(&myTcpSocket); + myTcpReceiver.setSocket(&myTcpSocket); + myTcpReceiver.setProcessPacketCB(&myProcessPacketCB); + myUdpReceiver.setSocket(&myUdpSocket); + myUdpReceiver.setProcessPacketCB(&myProcessPacketUdpCB); + + myDebugLogging = false; + myVerboseLogLevel = ArLog::Verbose; + myEnforceType = ArServerCommands::TYPE_UNSPECIFIED; + + myNonBlockingConnectState = NON_BLOCKING_STATE_NONE; + clear(); + + myTcpSender.setDebugLogging(myDebugLogging); +} + +AREXPORT ArClientBase::~ArClientBase() +{ + clear(); +} + +/** + * The robot name is used solely for log messages. + * @param name an optional char * name of the connected robot to be used in + * the log messages + * @param debugLogging a bool set to true if log messages should be written + * at the Normal level, if false, then they are written as Verbose + * @param robotId an optional int which can be appended to the robot name + * in the log messages; if 0, then only the robot name is logged +**/ +AREXPORT void ArClientBase::setRobotName(const char *name, + bool debugLogging, + int robotId) +{ + myDebugLogging = debugLogging; + myRobotName = ((name != NULL) ? name : ""); + + if (myDebugLogging) + myVerboseLogLevel = ArLog::Normal; + else + myVerboseLogLevel = ArLog::Verbose; + + myLogPrefix = ""; + if (!myRobotName.empty() && (robotId != 0)) { + char buf[512]; + snprintf(buf, sizeof(buf), + "%s[%i]: ", myRobotName.c_str(), robotId); + myLogPrefix = buf; + } + if (!myRobotName.empty() && (robotId == 0)) { + myLogPrefix = myRobotName + ": "; + } + myTcpSender.setLoggingPrefix(myLogPrefix.c_str()); + myTcpReceiver.setLoggingPrefix(myLogPrefix.c_str()); +} + +AREXPORT const char *ArClientBase::getRobotName() const +{ + return myRobotName.c_str(); +} + +AREXPORT const char *ArClientBase::getLogPrefix() const +{ + return myLogPrefix.c_str(); +} + +AREXPORT bool ArClientBase::getDebugLogging(void) +{ + return myDebugLogging; +} + + +void ArClientBase::clear(void) +{ + internalSwitchState(STATE_NO_CONNECTION); + + myServerReportedUdpPort = 0; + myUdpConfirmedFrom = false; + myUdpConfirmedTo = false; + myTcpOnlyTo = false; + myTcpOnlyFrom = false; + myTimeoutTime = 10; + myQuiet = false; + myLastPacketReceived.setToNow(); + + myIsRunningAsync = false; + myDisconnectSoon = false; + myIsStartedDisconnect = false; + myIsStopped = false; + + myRejected = 0; + myRejectedString[0] = '\0'; + + myReceivedDataList = false; + myReceivedArgRetList = false; + myReceivedGroupAndFlagsList = false; + + //resetTracking(); + + myNameIntMap.clear(); + ArUtil::deleteSetPairs(myIntDataMap.begin(), myIntDataMap.end()); + myIntDataMap.clear(); + + /// MPL adding this since these look leaked + ArUtil::deleteSetPairs(myTrackingSentMap.begin(), + myTrackingSentMap.end()); + myTrackingSentMap.clear(); + + ArUtil::deleteSetPairs(myTrackingReceivedMap.begin(), + myTrackingReceivedMap.end()); + myTrackingReceivedMap.clear(); + +} + +/** + cycleCallbacks are called every cycle, and are in no particular + order, since all they should do is send packets, never any + processing + + You cannot add a cycle callback from within a cycle or it will deadlock + @param functor callback to add + +**/ +AREXPORT void ArClientBase::addCycleCallback(ArFunctor *functor) +{ + myCycleCallbackMutex.lock(); + myCycleCallbacks.push_front(functor); + myCycleCallbackMutex.unlock(); +} + +/** + cycleCallbacks are called every cycle, and are in no particular + order, since all they should do is send packets, never any + processing + You cannot remove a cycle callback from within a cycle or it will deadlock + @param functor callback to remove +**/ +AREXPORT void ArClientBase::remCycleCallback(ArFunctor *functor) +{ + myCycleCallbackMutex.lock(); + myCycleCallbacks.remove(functor); + myCycleCallbackMutex.unlock(); +} + + +/** + @param sec This value controls how long the client will give to + connect, it is the argument in number of seconds... if <= 0 then no + timeout will take place. +**/ +AREXPORT void ArClientBase::setConnectTimeoutTime(int sec) +{ + myDataMutex.lock(); + if (sec < 0) + myTimeoutTime = 0; + else + myTimeoutTime = sec; + myDataMutex.unlock(); +} + +/** + @return This value controls how long the client will give to + connect, it is the argument in number of seconds... if <= 0 then no + timeout will take place. +**/ +AREXPORT int ArClientBase::getConnectTimeoutTime(void) +{ + return myTimeoutTime; +} + +/** + @param host the host to connect to + + @param port the port to connect on + + @param log whether to log our connection information using ArLog or not. + Keeping the default value of true is recommended (disabling logging + is usually only for internal and unusual uses). + This setting also applies to logging disconnections and some other I/O events + as well. + + @param user user name, or NULL for none. + @param password password (cleartext), or NULL for none. + @param openOnIP address of the local network interface to use for the outgoing connection, or NULL for any/all. + **/ +AREXPORT bool ArClientBase::blockingConnect(const char *host, int port, + bool log, const char *user, + const char *password, + const char *openOnIP) +{ + return internalBlockingConnect(host, port, log, user, password, NULL, + openOnIP); +} + +AREXPORT bool ArClientBase::internalBlockingConnect( + const char *host, int port, bool log, const char *user, + const char *password, ArSocket *tcpSocket, const char *openOnIP) +{ + NonBlockingConnectReturn ret; + + if ((ret = internalNonBlockingConnectStart( + host, port, log, user, password, tcpSocket, openOnIP)) != + NON_BLOCKING_CONTINUE) + return false; + + while ((ret = internalNonBlockingConnectContinue()) == NON_BLOCKING_CONTINUE) + ArUtil::sleep(1); + + if (ret == NON_BLOCKING_CONNECTED) + return true; + else + return false; +} + +AREXPORT ArClientBase::NonBlockingConnectReturn +ArClientBase::internalNonBlockingConnectStart( + const char *host, int port, bool log, const char *user, + const char *password, ArSocket *tcpSocket, const char *openOnIP) +{ + ArNetPacket packet; + + myDataMutex.lock(); + if (myState == STATE_LOST_CONNECTION) + { + ArLog::log(ArLog::Normal, + "%sTrying a connection on a client that'd lost connection.", + myLogPrefix.c_str()); + clear(); + } + + myDataMutex.unlock(); + + if (myState != STATE_NO_CONNECTION && + myState != STATE_FAILED_CONNECTION && + myState != STATE_REJECTED) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sConnection already established or being connected.", + myLogPrefix.c_str()); + return NON_BLOCKING_FAILED; + } + + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s0", myLogPrefix.c_str()); + myDataMutex.lock(); + // MPL added this here since the no connection state is gotten to by + // a normal disconnect, and won't have had its data cleared + clear(); + myStartedConnection.setToNow(); + + myHost = host; + myQuiet = !log; + myTcpReceiver.setQuiet(myQuiet); + if (user != NULL) + myUser = user; + else + myUser = ""; + if (password != NULL) + myPassword = password; + else + myPassword = ""; + + myDataMutex.unlock(); + if (tcpSocket != NULL) + { + myDataMutex.lock(); + myTcpSocket.transfer(tcpSocket); + internalStartUdp(); + myDataMutex.unlock(); + internalSwitchState(STATE_OPENED_SOCKET); + + } + else + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s1", myLogPrefix.c_str()); + loopOnce(); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s1.1", myLogPrefix.c_str()); + myDataMutex.lock(); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s1.2", myLogPrefix.c_str()); + if (internalConnect(host, port, log, openOnIP)) + { + myDataMutex.unlock(); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s2", myLogPrefix.c_str()); + //break; + } + else + { + myTcpSocket.close(); + myUdpSocket.close(); + internalSwitchState(STATE_FAILED_CONNECTION); + myDataMutex.unlock(); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s3", myLogPrefix.c_str()); + + return NON_BLOCKING_FAILED; + } + //} + } + myNonBlockingConnectState = NON_BLOCKING_STATE_TCP; + return NON_BLOCKING_CONTINUE; +} + + +AREXPORT ArClientBase::NonBlockingConnectReturn +ArClientBase::internalNonBlockingConnectContinue(void) +{ + ArNetPacket packet; + + if (myNonBlockingConnectState == NON_BLOCKING_STATE_TCP) + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s5", myLogPrefix.c_str()); + loopOnce(); + + if (myState == STATE_REJECTED || myState == STATE_NO_CONNECTION || + myState == STATE_LOST_CONNECTION) + { + myTcpSocket.close(); + myUdpSocket.close(); + myNonBlockingConnectState = NON_BLOCKING_STATE_NONE; + return NON_BLOCKING_FAILED; + } + if (myState == STATE_CONNECTED) + { + myStartedUdpConnection.setToNow(); + myNonBlockingConnectState = NON_BLOCKING_STATE_UDP; + return internalNonBlockingConnectContinue(); + } + + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s6 (%d)", myLogPrefix.c_str(), myState); + if (myTimeoutTime > 0 && + myStartedConnection.mSecSince() > myTimeoutTime * 1000.0) + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s7", myLogPrefix.c_str()); + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sConnection timed out.", myLogPrefix.c_str()); + internalSwitchState(STATE_FAILED_CONNECTION); + //myState = STATE_NO_CONNECTION; + myTcpSocket.close(); + myUdpSocket.close(); + myNonBlockingConnectState = NON_BLOCKING_STATE_NONE; + return NON_BLOCKING_FAILED; + } + return NON_BLOCKING_CONTINUE; + } + else if (myNonBlockingConnectState == NON_BLOCKING_STATE_UDP) + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s8", myLogPrefix.c_str()); + loopOnce(); + + if (myState != STATE_CONNECTED) + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s9", myLogPrefix.c_str()); + myTcpSocket.close(); + myUdpSocket.close(); + myNonBlockingConnectState = NON_BLOCKING_STATE_NONE; + return NON_BLOCKING_FAILED; + } + + if ((myUdpConfirmedFrom || myTcpOnlyFrom) && + (myUdpConfirmedTo || myTcpOnlyTo)) + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s10", myLogPrefix.c_str()); + myNonBlockingConnectState = NON_BLOCKING_STATE_NONE; + return NON_BLOCKING_CONNECTED; + } + + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%s11", myLogPrefix.c_str()); + // see if we didn't get udp from + if (myStartedUdpConnection.mSecSince() > myTimeoutTime * .66 * 1000.0 && + !myUdpConfirmedFrom && !myTcpOnlyFrom) + { + packet.empty(); + packet.setCommand(ArClientCommands::TCP_ONLY); + sendPacketTcp(&packet); + myDataMutex.lock(); + myTcpOnlyFrom = true; + myDataMutex.unlock(); + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, + "%sDidn't get confirmation of UDP from server, switching to TCP.", + myLogPrefix.c_str()); + } + // see if we haven't confirmed udp to + if (myStartedUdpConnection.mSecSince() > myTimeoutTime * .66 * 1000.0 && + !myUdpConfirmedTo && !myTcpOnlyTo) + { + packet.empty(); + myDataMutex.lock(); + myTcpOnlyTo = true; + myDataMutex.unlock(); + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, + "%sDidn't get confirmation of UDP to server, switching to TCP.", + myLogPrefix.c_str()); + } + if (myTimeoutTime > 0 && + myStartedUdpConnection.mSecSince() > myTimeoutTime * 1000.0) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, "%sConnection timed out (2).", + myLogPrefix.c_str()); + ArLog::log( + myVerboseLogLevel, "%sTimeout %d startedMSecSince %d startedUdpWaitMSecSince %d udpFrom %d udpTo %d tcpOnlyFrom %d tcpOnlyTo %d", + myLogPrefix.c_str(), + myTimeoutTime, myStartedConnection.mSecSince(), + myStartedUdpConnection.mSecSince(), myUdpConfirmedFrom, + myUdpConfirmedTo, myTcpOnlyFrom, myTcpOnlyTo); + //myState = STATE_NO_CONNECTION; + internalSwitchState(STATE_FAILED_CONNECTION); + } + return NON_BLOCKING_CONTINUE; + } + else if (myNonBlockingConnectState == NON_BLOCKING_STATE_NONE) + { + ArLog::log(ArLog::Normal, "Non blocking connect called when it wasn't started"); + return NON_BLOCKING_FAILED; + } + else + { + ArLog::log(ArLog::Normal, "Non blocking connect called when in unknown state"); + return NON_BLOCKING_FAILED; + } +} + +bool ArClientBase::internalConnect(const char *host, int port, bool obsolete, + const char *openOnIP) +{ + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%sa", myLogPrefix.c_str()); + // if we connect tcp then connect up the udp + if (myTcpSocket.connect(host, port, ArSocket::TCP, openOnIP)) + { + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%sb", myLogPrefix.c_str()); + if (!myTcpSocket.setNonBlock()) + { + ArLog::log(ArLog::Terse, + "%sFailed to set TCP socket nonblock, could not connect", + myLogPrefix.c_str()); + return false; + } + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%sc", myLogPrefix.c_str()); + internalStartUdp(); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%sd", myLogPrefix.c_str()); + if (!myQuiet || myDebugLogging) + ArLog::log(myVerboseLogLevel, + "%sOpened client connection to %s on tcp port %d with my udp port of %d", + myLogPrefix.c_str(), host, port, myUdpPort); + // we can't tell if udp connected or not (because its udp) so just + // say we're good + internalSwitchState(STATE_OPENED_SOCKET); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%se", myLogPrefix.c_str()); + return true; + } + else + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sconnect: Failed to open TCP socket", + myLogPrefix.c_str()); + internalSwitchState(STATE_FAILED_CONNECTION); + return false; + } +} + +void ArClientBase::internalStartUdp(void) +{ + // fire up the udp + if (!myUdpSocket.create(ArSocket::UDP) || + !myUdpSocket.findValidPort(10000) || + !myUdpSocket.setNonBlock()) + { + myUdpSocket.setLinger(0); + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sconnect: Failed to open udp socket, forcing TCP", + myLogPrefix.c_str()); + //internalSwitchState(STATE_FAILED_CONNECTION); + //return false; + myTcpOnlyTo = true; + myTcpOnlyFrom = true; + } + myUdpSinValid = false; + myUdpSin.sin_family=AF_INET; + myUdpSin.sin_addr = *myTcpSocket.inAddr(); + myUdpPort = myUdpSocket.netToHostOrder(myUdpSocket.inPort()); +} + +AREXPORT void ArClientBase::disconnectSoon(void) +{ + myDisconnectSoon = true; +} + +AREXPORT bool ArClientBase::disconnect(void) +{ + bool ret = startNonBlockingDisconnect(); + + ArUtil::sleep(10); + + finishNonBlockingDisconnect(); + + return ret; +} + +AREXPORT bool ArClientBase::startNonBlockingDisconnect() +{ + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, "%sDisconnected from server.", + myLogPrefix.c_str()); + + bool ret = false; + ArNetPacket packet; + + packet.setCommand(ArClientCommands::SHUTDOWN); + ret = sendPacketTcp(&packet); + myTcpSender.sendData(); + + return ret; +} + +AREXPORT void ArClientBase::finishNonBlockingDisconnect() +{ + myTcpSocket.close(); + myUdpSocket.close(); + myState = STATE_NO_CONNECTION; +} + + + +AREXPORT bool ArClientBase::setupPacket(ArNetPacket *packet) +{ + if (myState == STATE_NO_CONNECTION || myState == STATE_FAILED_CONNECTION || + myState == STATE_LOST_CONNECTION || myState == STATE_REJECTED) + return false; + + if (packet->getLength() > ArNetPacket::MAX_LENGTH) + { + ArLog::log(ArLog::Terse, + "%s: setupPacket packet for command %s packet is bad at %d", + myLogPrefix.c_str(), getName(packet->getCommand()), + packet->getLength()); + return false; + } + + packet->finalizePacket(); + return true; +} + +AREXPORT bool ArClientBase::sendPacketTcp(ArNetPacket *packet) +{ + if (!setupPacket(packet)) + { + return false; + } + else + { + trackPacketSent(packet, true); + myTcpSender.sendPacket(packet, myLogPrefix.c_str()); + return true; + } +} + +AREXPORT bool ArClientBase::sendPacketUdp(ArNetPacket *packet) +{ + if (!setupPacket(packet)) + { + return false; + } + else + { + trackPacketSent(packet, false); + if (myUdpSocket.sendTo(packet->getBuf(), packet->getLength(), &myUdpSin) + == packet->getLength()) + { + return true; + } + else + { + return false; + } + } +} + +AREXPORT void ArClientBase::loopOnce(void) +{ + std::list::iterator it; + if (myState != STATE_NO_CONNECTION && myState != STATE_FAILED_CONNECTION && + myState != STATE_LOST_CONNECTION && myState != STATE_REJECTED) + { + if (myDisconnectSoon) + { + if (myIsRunningAsync) { + startNonBlockingDisconnect(); + + ArUtil::sleep(100); + + finishNonBlockingDisconnect(); + } + else { + if (!myIsStartedDisconnect) { + + myIsStartedDisconnect = true; + myStartedShutdown.setToNow(); + startNonBlockingDisconnect(); + } + else if (myStartedShutdown.mSecSince() > 100) { + finishNonBlockingDisconnect(); + } + } + return; + } + // if we couldn't receive tcp data fail + if (!myTcpReceiver.readData()) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, + "%sLost connection to server (couldn't recv).", + myLogPrefix.c_str()); + myTcpSocket.close(); + myUdpSocket.close(); + internalSwitchState(STATE_LOST_CONNECTION); + stopRunning(); + myCallbackMutex.lock(); + for (it = myDisconnectOnErrorCBList.begin(); + it != myDisconnectOnErrorCBList.end(); + ++it) + (*it)->invoke(); + myCallbackMutex.unlock(); + + } + // if we can't receive UDP just make an error log + else if (!myTcpOnlyFrom && !myUdpReceiver.readData()) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, "%sUDP Troubles, continuing", + myLogPrefix.c_str()); + } + if (!myTcpSender.sendData()) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, + "%sLost connection to server (couldn't send).", + myLogPrefix.c_str()); + myTcpSocket.close(); + myUdpSocket.close(); + internalSwitchState(STATE_LOST_CONNECTION); + stopRunning(); + myCallbackMutex.lock(); + for (it = myDisconnectOnErrorCBList.begin(); + it != myDisconnectOnErrorCBList.end(); + ++it) + (*it)->invoke(); + myCallbackMutex.unlock(); + } + } + myCycleCallbackMutex.lock(); + for (it = myCycleCallbacks.begin(); it != myCycleCallbacks.end(); ++it) + (*it)->invoke(); + myCycleCallbackMutex.unlock(); + +} + +AREXPORT void ArClientBase::run(void) +{ + runInThisThread(); +} + +AREXPORT void ArClientBase::runAsync(void) +{ + myIsRunningAsync = true; + create(true, false); +} + +AREXPORT void *ArClientBase::runThread(void *arg) +{ + threadStarted(); + while (myRunning) + { + loopOnce(); + ArUtil::sleep(1); + } + threadFinished(); + return NULL; +} + +AREXPORT void ArClientBase::stopRunning(void) +{ + ArASyncTask::stopRunning(); + myIsStopped = true; +} + +AREXPORT bool ArClientBase::isStopped() +{ + return myIsStopped; +} + + +AREXPORT void ArClientBase::processPacket(ArNetPacket *packet, bool tcp) +{ + ArNetPacket retPacket; + std::list::iterator it; + + myDataMutex.lock(); + myLastPacketReceived.setToNow(); + myDataMutex.unlock(); + + if (myDebugLogging && packet->getCommand() <= 255) + { + ArLog::log(ArLog::Normal, "%sGot command %d", + myLogPrefix.c_str(), packet->getCommand()); + } + + // See if we should close our connection + if (packet->getCommand() == ArServerCommands::SHUTDOWN) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, + "%sServer shutting down and closed connection.", + myLogPrefix.c_str()); + stopRunning(); + disconnect(); + internalSwitchState(STATE_LOST_CONNECTION); + + myCallbackMutex.lock(); + for (it = myServerShutdownCBList.begin(); + it != myServerShutdownCBList.end(); + ++it) + (*it)->invoke(); + myCallbackMutex.unlock(); + } + else if (myState == STATE_CONNECTED) { + + // Some of the following cases are duplicated in the remainder of the + // if-else-if stmt below. (These are mostly error conditions.) This + // is a result of moving the connected state to the top of the big long + // if-else-if stmt since it is the most common scenario. Should probably + // re-examine the redundancies and improve their handling someday.... + switch (packet->getCommand()) { + case ArServerCommands::INTRODUCTION: + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sIntroduction received when not in STATE_OPENED_SOCKET", + myLogPrefix.c_str()); + return; + } + case ArServerCommands::CONNECTED: + { + ArLog::log(ArLog::Terse, + "%sConnected packet received not during STATE_EXCHANGED_INTROS", + myLogPrefix.c_str()); + return; + } + case ArServerCommands::REJECTED: + { + ArLog::log(ArLog::Terse, + "%sRejected packet received after connected", + myLogPrefix.c_str()); + return; + } + + case ArServerCommands::LIST: + case ArServerCommands::LISTSINGLE: + case ArServerCommands::LISTARGRET: + case ArServerCommands::LISTARGRETSINGLE: + case ArServerCommands::LISTGROUPANDFLAGS: + case ArServerCommands::LISTGROUPANDFLAGSSINGLE: + { + myMapsMutex.lock(); + buildList(packet); + myMapsMutex.unlock(); + return; + } + case ArServerCommands::UDP_CONFIRMATION: + { + if (!myQuiet || myDebugLogging) + ArLog::log(myVerboseLogLevel, + "%sClients udp connection to server confirmed.", + myLogPrefix.c_str()); + myDataMutex.lock(); + myUdpConfirmedTo = true; + myDataMutex.unlock(); + return; + } + case ArServerCommands::UDP_INTRODUCTION: + { + ArLog::log(ArLog::Terse, + "%sClient got udp introduction over tcp...", + myLogPrefix.c_str()); + return; + } + case ArServerCommands::TCP_ONLY: + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, "%sClient told to only use tcp.", + myLogPrefix.c_str()); + myDataMutex.lock(); + myTcpOnlyTo = true; + myDataMutex.unlock(); + return; + } + default: + { + std::map::iterator it; + ArClientData *clientData = NULL; + // see if we have the command + myMapsMutex.lock(); + if ((it = myIntDataMap.find(packet->getCommand())) != myIntDataMap.end()) { + clientData = (*it).second; + myMapsMutex.unlock(); + } + else { // command not found + + myMapsMutex.unlock(); + ArLog::log(ArLog::Terse, + "%sGot packet for %d which doesn't exist, packet was %d long", + myLogPrefix.c_str(), packet->getCommand(), packet->getLength()); + packet->log(); + + ArLog::log(ArLog::Terse, "%sPacket: ", myLogPrefix.c_str()); + for (int ijk = 0; ijk < packet->getLength(); ijk++) + ArLog::log(ArLog::Terse, " %d ", + (unsigned char) packet->getBuf()[ijk]); + } + + if (clientData == NULL) + { + ArLog::log(ArLog::Terse, + "%sNull client data for command %d", + myLogPrefix.c_str(), packet->getCommand()); + return; + } + + clientData->lockFunctorList(); + if (clientData->getFunctorList()->begin() == + clientData->getFunctorList()->end()) + { + ArLog::log(myVerboseLogLevel, + "%sNo functor to handle command %d", + myLogPrefix.c_str(), packet->getCommand()); + clientData->unlockFunctorList(); + return; + } + else + { + std::list *>::const_iterator it; + ArFunctor1 *functor = NULL; + + // PS (with KMC help) - make a copy so that we can remove from the list + std::list *> copiedList = *(clientData->getFunctorList()); + + for (it = copiedList.begin(); + it != copiedList.end(); + it++) + //for (it = clientData->getFunctorList()->begin(); + // it != clientData->getFunctorList()->end(); + // it++) + { + packet->resetRead(); + functor = (*it); + functor->invoke(packet); + } + clientData->unlockFunctorList(); + trackPacketReceived(packet, tcp); + + } + + } // end default + return; + + } // end switch command + } + /// see if we've opened the socket and this is an intro + else if (myState == STATE_OPENED_SOCKET && + packet->getCommand() == ArServerCommands::INTRODUCTION) + { + + char buf[512]; + char passwordKey[2048]; + char enforceProtocolVersion[256]; + + myDataMutex.lock(); + // first read the data from the packet + packet->bufToStr(buf, 512); + myServerReportedUdpPort = packet->bufToUByte2(); + + if (!myQuiet || myDebugLogging) + { + if (myServerReportedUdpPort == 0) + ArLog::log(myVerboseLogLevel, "%sConnection to version %s", + myLogPrefix.c_str(), + buf); + else + ArLog::log(myVerboseLogLevel, + "%sConnection to version %s with udp port %u", + myLogPrefix.c_str(), + buf, myServerReportedUdpPort); + } + if (myServerReportedUdpPort == 0) + { + myTcpOnlyTo = true; + myTcpOnlyFrom = true; + } + // set our expected port (its okay if its otherwise) + myUdpSin.sin_port = ArSocket::hostToNetOrder(myServerReportedUdpPort); + // get the keys + myAuthKey = packet->bufToUByte4(); + myIntroKey = packet->bufToUByte4(); + packet->bufToStr(passwordKey, sizeof(passwordKey)); + packet->bufToStr(enforceProtocolVersion, sizeof(enforceProtocolVersion)); + if (!myEnforceProtocolVersion.empty() && + strcasecmp(enforceProtocolVersion, + myEnforceProtocolVersion.c_str()) != 0) + { + myRejected = 3; + strcpy(myRejectedString, "Client rejecting server, since server protocol version does not match"); + ArLog::log(ArLog::Normal, + "%sClient rejecting server, since server protocol version does not match", + myLogPrefix.c_str()); + internalSwitchState(STATE_REJECTED); + return; + } + + // introduce ourself normally via tcp + retPacket.empty(); + retPacket.setCommand(ArClientCommands::INTRODUCTION); + retPacket.uByte2ToBuf(myUdpPort); + retPacket.strToBuf(myUser.c_str()); + // old simple cleartext way + //retPacket.strToBuf(myPassword.c_str()); + md5_state_t md5State; + unsigned char md5Digest[16]; + + md5_init(&md5State); + md5_append(&md5State, (unsigned char *)myServerKey.c_str(), + myServerKey.size()); + md5_append(&md5State, (unsigned char *)passwordKey, strlen(passwordKey)); + md5_append(&md5State, (unsigned char *)myPassword.c_str(), + myPassword.size()); + md5_finish(&md5State, md5Digest); + + retPacket.dataToBuf((const char *)md5Digest, 16); + retPacket.strToBuf(myEnforceProtocolVersion.c_str()); + retPacket.byteToBuf(myEnforceType); + + sendPacketTcp(&retPacket); + + myPassword = "%s"; + bool tcpOnlyFrom = myTcpOnlyFrom; + myDataMutex.unlock(); + if (tcpOnlyFrom) + { + retPacket.empty(); + retPacket.setCommand(ArClientCommands::TCP_ONLY); + sendPacketTcp(&retPacket); + } + internalSwitchState(STATE_EXCHANGED_INTROS); + } + // if we're not at opened socket and got an intro somethings horribly wrong + else if (myState != STATE_OPENED_SOCKET && + packet->getCommand() == ArServerCommands::INTRODUCTION) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sIntroduction received when not in STATE_OPENED_SOCKET", + myLogPrefix.c_str()); + return; + } + // if we're at opened socket and received something other than intro + // then somethings horribly wrong + else if (myState == STATE_OPENED_SOCKET && + packet->getCommand() != ArServerCommands::INTRODUCTION) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Terse, + "%sPacket other than introduction received when in STATE_OPENED_SOCKET", + myLogPrefix.c_str()); + return; + } + // if we've exchanged intros and are waiting for connection or rejection + else if (myState == STATE_EXCHANGED_INTROS && + packet->getCommand() == ArServerCommands::CONNECTED) + { + if (!myQuiet || myDebugLogging) + { + if (myTcpOnlyTo && myTcpOnlyFrom) + ArLog::log(ArLog::Terse, + "%sClient now connected to server (tcp only).", + myLogPrefix.c_str()); + else + ArLog::log(ArLog::Terse, + "%sClient now connected to server.", myLogPrefix.c_str()); + } + internalSwitchState(STATE_WAITING_LIST); + // introduce ourself via udp + retPacket.empty(); + retPacket.setCommand(ArClientCommands::UDP_INTRODUCTION); + myDataMutex.lock(); + retPacket.uByte4ToBuf(myAuthKey); + myDataMutex.unlock(); + sendPacketUdp(&retPacket); + return; + } + // if we've received a connected and aren't at exchanging intros + else if (packet->getCommand() == ArServerCommands::CONNECTED) + { + ArLog::log(ArLog::Terse, + "%sConnected packet received not during STATE_EXCHANGED_INTROS", + myLogPrefix.c_str()); + return; + } + // if we're exchanging intros and were rejected + else if (myState != STATE_CONNECTED && + packet->getCommand() == ArServerCommands::REJECTED) + { + myRejected = packet->bufToByte2(); + packet->bufToStr(myRejectedString, sizeof(myRejectedString)); + if (!myQuiet || myDebugLogging) + { + if (myRejected == 1) + ArLog::log(ArLog::Normal, + "%sServer rejected connection because of bad user/password", + myLogPrefix.c_str()); + else if (myRejected == 2) + ArLog::log(ArLog::Normal, + "%sServer rejected connection since it is using the centralserver at %s", + myLogPrefix.c_str(), myRejectedString); + else if (myRejected == 3) + ArLog::log(ArLog::Normal, + "%sServer rejected for bad reason (3 should be from client side... it reported '%s')", + myLogPrefix.c_str(), myRejectedString); + else if (myRejected == 4) + ArLog::log(ArLog::Normal, + "%sServer rejected client because client using wrong protocol version.", + myLogPrefix.c_str()); + + else + ArLog::log(ArLog::Normal, + "%sServer rejected connection for unknown reason %d '%s'", + myLogPrefix.c_str(), myRejected, myRejectedString); + } + + internalSwitchState(STATE_REJECTED); + return; + } + // if we received rejected and aren't at exchanging intros + else if (packet->getCommand() == ArServerCommands::REJECTED) + { + ArLog::log(ArLog::Terse, + "%sRejected packet received after connected", + myLogPrefix.c_str()); + return; + } + // if we're waiting for our list and get it we're connected + else if (myState == STATE_WAITING_LIST && + packet->getCommand() == ArServerCommands::LIST) + { + internalSwitchState(STATE_CONNECTED); + myDataMutex.lock(); + md5_state_t md5State; + + md5_init(&md5State); + md5_append(&md5State, (unsigned char *)&myAuthKey, sizeof(myAuthKey)); + md5_append(&md5State, (unsigned char *)&myIntroKey, sizeof(myIntroKey)); + long rand = ArMath::random(); + md5_append(&md5State, (unsigned char *)&rand, sizeof(rand)); + unsigned int time = ArUtil::getTime(); + md5_append(&md5State, (unsigned char *)&time, sizeof(time)); + + md5_finish(&md5State, myClientKey); + myDataMutex.unlock(); + myMapsMutex.lock(); + buildList(packet); + myMapsMutex.unlock(); + return; + } + // see if we got any lists when not waiting for them + else if (packet->getCommand() == ArServerCommands::LIST || + packet->getCommand() == ArServerCommands::LISTSINGLE || + packet->getCommand() == ArServerCommands::LISTARGRET || + packet->getCommand() == ArServerCommands::LISTARGRETSINGLE || + packet->getCommand() == ArServerCommands::LISTGROUPANDFLAGS || + packet->getCommand() == ArServerCommands::LISTGROUPANDFLAGSSINGLE) + { + myMapsMutex.lock(); + buildList(packet); + myMapsMutex.unlock(); + return; + } + // if we're in exhanged intros and receive a packet not for that state + else if (myState == STATE_EXCHANGED_INTROS && + packet->getCommand() != ArServerCommands::CONNECTED && + packet->getCommand() != ArServerCommands::REJECTED) + { + ArLog::log(ArLog::Terse, + "%sIn STATE_EXCHANGE_INTROS and received something other than connected or rejected (%d).", myLogPrefix.c_str(), packet->getCommand()); + return; + } + + /*** KMC Moved into switch statement above + // if we're connected and got a udp confirmed packet then everything is good + else if (myState == STATE_CONNECTED && + packet->getCommand() == ArServerCommands::UDP_CONFIRMATION) + { + if (!myQuiet || myDebugLogging) + ArLog::log(myVerboseLogLevel, + "%sClients udp connection to server confirmed.", + myLogPrefix.c_str()); + myDataMutex.lock(); + myUdpConfirmedTo = true; + myDataMutex.unlock(); + return; + } + ***/ + + // if we're not connected and got a udp confirmation it means + // something is wrong + else if (packet->getCommand() == ArServerCommands::UDP_CONFIRMATION) + { + ArLog::log(ArLog::Terse, + "ArClientBase: Udp Confirmation received when not in STATE_CONNECTED"); + return; + } + else if (packet->getCommand() == ArServerCommands::UDP_INTRODUCTION) + { + ArLog::log(ArLog::Terse, + "ArClientBase: Udp Introduction received over tcp... when not in STATE_CONNECTED"); + return; + } + /*** KMC Moved into switch statement above + // if we're connected and got a tcp only packet then everything is good + else if (myState == STATE_CONNECTED && + packet->getCommand() == ArServerCommands::TCP_ONLY) + { + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, "%sClient told to only use tcp.", + myLogPrefix.c_str()); + myDataMutex.lock(); + myTcpOnlyTo = true; + myDataMutex.unlock(); + return; + } + **/ + + /*** KMC Moved into switch statement above + // if none of the above were triggered its just a normal packet + else if (myState == STATE_CONNECTED) + { + std::map::iterator it; + ArClientData *clientData = NULL; + // see if we have the command + myMapsMutex.lock(); + if ((it = myIntDataMap.find(packet->getCommand())) != myIntDataMap.end()) { + clientData = (*it).second; + myMapsMutex.unlock(); + } + else { // command not found + + myMapsMutex.unlock(); + ArLog::log(ArLog::Terse, + "%sGot packet for %d which doesn't exist, packet was %d long", + myLogPrefix.c_str(), packet->getCommand(), packet->getLength()); + packet->log(); + + ArLog::log(ArLog::Terse, "%sPacket: ", myLogPrefix.c_str()); + for (int ijk = 0; ijk < packet->getLength(); ijk++) + ArLog::log(ArLog::Terse, " %d ", + (unsigned char) packet->getBuf()[ijk]); + } + + if (clientData == NULL) + { + ArLog::log(ArLog::Terse, + "%sNull client data for command %d", + myLogPrefix.c_str(), packet->getCommand()); + return; + } + + clientData->lockFunctorList(); + if (clientData->getFunctorList()->begin() == + clientData->getFunctorList()->end()) + { + ArLog::log(myVerboseLogLevel, + "%sNo functor to handle command %d", + myLogPrefix.c_str(), packet->getCommand()); + clientData->unlockFunctorList(); + return; + } + else + { + std::list *>::const_iterator it; + ArFunctor1 *functor = NULL; + + for (it = clientData->getFunctorList()->begin(); + it != clientData->getFunctorList()->end(); + it++) + { + packet->resetRead(); + functor = (*it); + functor->invoke(packet); + } + clientData->unlockFunctorList(); + trackPacketReceived(packet, tcp); + + } + } + ****/ + + else + { + //packet->bufToStr(&str); + //packet->printHex(); + ArLog::log(myVerboseLogLevel, + "%sBogus packet of %u command %d long (probably after close)", + myLogPrefix.c_str(), packet->getCommand(), + packet->getLength()); + } + //sendPacketTcp(packet); + +} + +void ArClientBase::buildList(ArNetPacket *packet) +{ + ArClientData *clientData; + unsigned int listLen; + unsigned int i; + unsigned int command; + char name[512]; + char description[512]; + char argDesc[512]; + char retDesc[512]; + char commandGroup[512]; + char dataFlags[512]; + + // if its a single list snag it and run + if (packet->getCommand() == ArServerCommands::LISTSINGLE) + { + command = packet->bufToUByte2(); + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(description, sizeof(description)); + clientData = new ArClientData(name, description, command, NULL); + ArLog::log(myVerboseLogLevel, + "%sNew entry number %d for data %s with description %s", + myLogPrefix.c_str(), command, name, description); + if (myIntDataMap.find(command) != myIntDataMap.end()) + ArLog::log(ArLog::Normal, + "%sIs already an entry for number %d as data %d\n, overwriting", + myLogPrefix.c_str(), command, + myIntDataMap[command]->getName()); + myNameIntMap[name] = command; + myIntDataMap[command] = clientData; + return; + } + else if (packet->getCommand() == ArServerCommands::LIST) + { + myReceivedDataList = true; + listLen = packet->bufToUByte2(); + // otherwise loop and read them all + for (i = 0; i < listLen; i++) + { + command = packet->bufToUByte2(); + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(description, sizeof(description)); + clientData = new ArClientData(name, description, command, NULL); + ArLog::log(myVerboseLogLevel, + "%sNew entry number %d for data %s with description %s", + myLogPrefix.c_str(), command, name, description); + if (myIntDataMap.find(command) != myIntDataMap.end() && + strcmp(myIntDataMap[command]->getName(), name)) + ArLog::log(ArLog::Normal, + "%sIs already an entry for number %d as data %d\n, overwriting", + myLogPrefix.c_str(), command, + myIntDataMap[command]->getName()); + myNameIntMap[name] = command; + myIntDataMap[command] = clientData; + } + return; + } + // if its a single list snag it and run + else if (packet->getCommand() == ArServerCommands::LISTARGRETSINGLE) + { + command = packet->bufToUByte2(); + clientData = myIntDataMap[command]; + if (clientData == NULL) + { + ArLog::log(ArLog::Normal, + "%sbuildList: Unknown command %s %d", + myLogPrefix.c_str(), getName(packet->getCommand(), true), + packet->getCommand()); + return; + } + packet->bufToStr(argDesc, sizeof(argDesc)); + packet->bufToStr(retDesc, sizeof(retDesc)); + clientData->setArgRetDescs(argDesc, retDesc); + return; + } + else if (packet->getCommand() == ArServerCommands::LISTARGRET) + { + myReceivedArgRetList = true; + listLen = packet->bufToUByte2(); + // otherwise loop and read them all + for (i = 0; i < listLen; i++) + { + command = packet->bufToUByte2(); + clientData = myIntDataMap[command]; + if (clientData == NULL) + { + ArLog::log(ArLog::Normal, + "%sbuildList: Unknown command %s %d", myLogPrefix.c_str(), + getName(packet->getCommand(), true), packet->getCommand()); + // KMC Need to do something here because otherwise it blows up on + // the setArgRetDescs call below... + return; + } + packet->bufToStr(argDesc, sizeof(argDesc)); + packet->bufToStr(retDesc, sizeof(retDesc)); + clientData->setArgRetDescs(argDesc, retDesc); + } + return; + } + // if its a single list snag it and run + else if (packet->getCommand() == ArServerCommands::LISTGROUPANDFLAGSSINGLE) + { + command = packet->bufToUByte2(); + clientData = myIntDataMap[command]; + if (clientData == NULL) + { + ArLog::log(ArLog::Normal, + "%sbuildList: Unknown command %s %d", + myLogPrefix.c_str(), getName(packet->getCommand(), true), + packet->getCommand()); + return; + } + packet->bufToStr(commandGroup, sizeof(commandGroup)); + packet->bufToStr(dataFlags, sizeof(dataFlags)); + clientData->setCommandGroup(commandGroup); + clientData->addDataFlags(dataFlags); + return; + } + else if (packet->getCommand() == ArServerCommands::LISTGROUPANDFLAGS) + { + myReceivedGroupAndFlagsList = true; + listLen = packet->bufToUByte2(); + // otherwise loop and read them all + for (i = 0; i < listLen; i++) + { + command = packet->bufToUByte2(); + clientData = myIntDataMap[command]; + if (clientData == NULL) + { + ArLog::log(ArLog::Normal, + "%sbuildList: Unknown command %s %d", myLogPrefix.c_str(), + getName(packet->getCommand(), true), packet->getCommand()); + // KMC Need to do something here because otherwise it blows up on + // the setArgRetDescs call below... + return; + } + packet->bufToStr(commandGroup, sizeof(commandGroup)); + packet->bufToStr(dataFlags, sizeof(dataFlags)); + clientData->setCommandGroup(commandGroup); + clientData->addDataFlags(dataFlags); + } + return; + } + else + { + ArLog::log(ArLog::Terse, + "%sbuildList: Unhandled packet type %s %d", + myLogPrefix.c_str(), getName(packet->getCommand(), true), + packet->getCommand()); + } +} + +AREXPORT void ArClientBase::processPacketUdp(ArNetPacket *packet, + struct sockaddr_in *sin) +{ + unsigned char *bytes = (unsigned char *)&sin->sin_addr.s_addr; + long introKey; + ArNetPacket retPacket; + + myDataMutex.lock(); + myLastPacketReceived.setToNow(); + // see if its an intro packet and we're connected (or could be but + // not yet know it) + if ((myState == STATE_CONNECTED || myState == STATE_EXCHANGED_INTROS || + myState == STATE_WAITING_LIST) && + packet->getCommand() == ArServerCommands::UDP_INTRODUCTION) + { + // see if we've already confirmed the UDP + if (myUdpConfirmedFrom) + { + myDataMutex.unlock(); + return; + } + introKey = packet->bufToByte4(); + if (myIntroKey != introKey) + { + ArLog::log(ArLog::Terse, + "%sUdp introduction packet received with wrong introKey", + myLogPrefix.c_str()); + myDataMutex.unlock(); + return; + } + if (myServerReportedUdpPort != ArSocket::netToHostOrder(sin->sin_port)) + ArLog::log(myVerboseLogLevel, + "%sPorts don't match, said from server %d and given was %d", + myLogPrefix.c_str(), myServerReportedUdpPort, + ArSocket::netToHostOrder(sin->sin_port)); + myUdpSin.sin_port = sin->sin_port; + myUdpConfirmedFrom = true; + // now confirm to the server we got the UDP packet + retPacket.empty(); + retPacket.setCommand(ArClientCommands::UDP_CONFIRMATION); + if (!myQuiet || myDebugLogging) + ArLog::log(ArLog::Normal, "%sServer connected to us on udp port %d", + myLogPrefix.c_str(), + ArSocket::netToHostOrder(myUdpSin.sin_port)); + myDataMutex.unlock(); + sendPacketTcp(&retPacket); + return; + } + // if we receive an intro packet but aren't connected + else if (packet->getCommand() == ArServerCommands::UDP_INTRODUCTION) + { + ArLog::log(ArLog::Terse, + "%sUdp introduction packet received while not connected", + myLogPrefix.c_str()); + myDataMutex.unlock(); + return; + } + // if its not an intro, make sure it matchs our server + else if (myUdpSin.sin_port == sin->sin_port && + myUdpSin.sin_addr.s_addr == sin->sin_addr.s_addr) + { + // TODO make this reject them if they're not in the user area + myDataMutex.unlock(); + processPacket(packet, false); + myDataMutex.lock(); + } + // if it doesn't warn about it + else + { + ArLog::log(ArLog::Normal, "%sBogus UDP packet from %d.%d.%d.%d %d", + myLogPrefix.c_str(), bytes[0], bytes[1], bytes[2], bytes[3], + ArSocket::netToHostOrder(sin->sin_port)); + } + myDataMutex.unlock(); +} + +void ArClientBase::internalSwitchState(ClientState state) +{ + myState = state; + myStateStarted.setToNow(); +} + +/** + This adds a functor that will be called with a packet whenever a + packet for that name arrives + + Note that if you try and add a handler for a specific piece of data + from within a handler for that specific piece of data you'll + deadlock. + + @param name the name of the data to use with this functor + + @param functor the functor to call with the packet when data with + this name arrives + + @return false is returned if this name doesn't exist in the data + + @pynote Pass a function taking one argument for @arg functor + @javanote Use a subclass of ArFunctor_NetPacket for the @arg functor object. +**/ +AREXPORT bool ArClientBase::addHandler(const char *name, + ArFunctor1 *functor) +{ + if (name == NULL) { + ArLog::log(ArLog::Normal, "%saddHandler: Cannot add NULL name", + myLogPrefix.c_str()); + return false; + } + ArClientData *clientData; + // see if we have this data + myMapsMutex.lock(); + if (myNameIntMap.find(name) == myNameIntMap.end()) + { + ArLog::log(ArLog::Normal, + "%saddHandler: There is no data by the name \"%s\" to handle", + myLogPrefix.c_str(), name); + myMapsMutex.unlock(); + return false; + } + // since we have the data get the pointer to it + clientData = myIntDataMap[myNameIntMap[name]]; + myMapsMutex.unlock(); + + // make sure nothings gone wrong + if (clientData == NULL) + { + ArLog::log(ArLog::Normal, + "%saddHandler: There was no clientData for data \"%s\"", + myLogPrefix.c_str(), name); + return false; + } + clientData->lockFunctorList(); + // see if it already has a functor + if (clientData->getFunctorList()->begin() != + clientData->getFunctorList()->end()) + { + ArLog::log(myVerboseLogLevel, + "%saddHandler: There is already a functor for data \"%s\", adding anyways", + myLogPrefix.c_str(), name); + //return false; + } + // addthe functor + clientData->addFunctor(functor); + clientData->unlockFunctorList(); + return true; +} + +/** + This removes a functor from being called with a packet whenever a + packet for that name arrives + + Note that if you try and remove a handler for a specific piece of + data from within a handler for that specific piece of data you'll + deadlock. + + @param name the name of the data to use with this functor + + @param functor the functor to call with the packet when data with + this name arrives + + @return false is returned if this name doesn't exist in the data +**/ + +AREXPORT bool ArClientBase::remHandler(const char *name, + ArFunctor1 *functor) +{ + ArClientData *clientData; + myMapsMutex.lock(); + // see if we have this client data + if (myNameIntMap.find(name) == myNameIntMap.end()) + { + ArLog::log(ArLog::Normal, + "%sremHandler: There is no data \"%s\"", + myLogPrefix.c_str(), name); + myMapsMutex.unlock(); + return false; + } + if ((clientData = myIntDataMap[myNameIntMap[name]]) == NULL) + { + ArLog::log(ArLog::Normal, "%sremHandler: There was no client data for data \"%s\"", myLogPrefix.c_str(), name); + myMapsMutex.unlock(); + return false; + } + myMapsMutex.unlock(); + // set the functor to NULL + clientData->lockFunctorList(); + clientData->remFunctor(functor); + clientData->unlockFunctorList(); + return true; +} + + +/** + @param name the name of the data to find the command of + + @return 0 if there is no command of that name, the command number + otherwise +**/ +AREXPORT unsigned int ArClientBase::findCommandFromName(const char *name) +{ + std::map::iterator it; + unsigned int ret; + + myMapsMutex.lock(); + if ((it = myNameIntMap.find(name)) == myNameIntMap.end()) + { + ArLog::log(ArLog::Normal, + "%sFinding command for \"%s\" but no data with that name exists", + myLogPrefix.c_str(), name); + myMapsMutex.unlock(); + return 0; + } + ret = (*it).second; + myMapsMutex.unlock(); + return ret; +} + +/** + This requests data from the server for the given name, at a given + interval, optionally passing along data with the request. + + @param name the name of the data to request from the server + + @param mSec request interval: the number of milliseconds we want a refresh on this + data, if this number is 0 then the server will send the information + as often as it is available; if -1, then the server will send the + information only when it changes (for broadcast type packets) + + @param packet a packet to use for the request, may contain data to use as +parameters or arguments along with the request. + **/ +AREXPORT bool ArClientBase::request(const char *name, long mSec, + ArNetPacket *packet) +{ + ArLog::log(myVerboseLogLevel, + "%sRequesting data for \"%s\"", + myLogPrefix.c_str(), name); + return requestByCommand(findCommandFromName(name), mSec, packet); +} + +/** + This requests data from the server for the given name, at mSec + milliseconds interval, optionally passing along data for the + request. + + @param command the command number of the data to request + + @param mSec the number of milliseconds we want a refresh on this + data, if this number is 0 then the server will send the information + as often as it is available; if -1, then the server will send the + information only when it changes (for broadcast type packets) + + @param packet the packet that contains the data to use as argument + **/ +AREXPORT bool ArClientBase::requestByCommand(unsigned int command, + long mSec, ArNetPacket *packet) +{ + ArNetPacket sending; + + sending.setCommand(ArClientCommands::REQUEST); + sending.uByte2ToBuf(command); + sending.byte4ToBuf(mSec); + if (packet != NULL) + { + packet->resetRead(); + sending.dataToBuf(&packet->getBuf()[packet->getReadLength()], + packet->getLength() - packet->getReadLength()); + } + return sendPacketTcp(&sending); +} + + +/** + @param name the name to stop sending +**/ +AREXPORT bool ArClientBase::requestStop(const char *name) +{ + ArLog::log(myVerboseLogLevel, + "%sRequesting stop data for \"%s\"", + myLogPrefix.c_str(), name); + return requestStopByCommand(findCommandFromName(name)); +} + +/** + @param command the command number to stop +**/ +AREXPORT bool ArClientBase::requestStopByCommand(unsigned int command) +{ + ArNetPacket sending; + sending.setCommand(ArClientCommands::REQUESTSTOP); + sending.uByte2ToBuf(command); + return sendPacketTcp(&sending); +} + + +/** + This requests the data from the server, but only once... this is + useful for things like video data that you don't want to clog up + the bandwidth with... its also useful for things like sending + commands + + @param name the name of the data to request + @param packet the packet that contains the data to use as argument + @param quiet a bool set to true to override the verbose logging of this + method (generally for repeating requests); default is false to log. +**/ +AREXPORT bool ArClientBase::requestOnce(const char *name, + ArNetPacket *packet, + bool quiet) +{ + if (!quiet) + ArLog::log(myVerboseLogLevel, + "%sRequesting data once for \"%s\"", myLogPrefix.c_str(), name); + return requestOnceByCommand(findCommandFromName(name), packet); +} + +/** + Send one request over UDP. For example, use this method for + certain kinds of data where constant streaming would be undesirable + (e.g. video images that might saturate the network), or for sending + a simple command. + Note that since the request is sent using UDP, you cannot + assume it will get there or that you will get a response. + + @param name the name of the data to request + @param packet the packet that contains the data to use as argument + @param quiet If true, suppress verbose-level log message +**/ +AREXPORT bool ArClientBase::requestOnceUdp( + const char *name, ArNetPacket *packet, bool quiet) +{ + if (!quiet) + ArLog::log(myVerboseLogLevel, + "%sRequesting data once (UDP) for \"%s\"", + myLogPrefix.c_str(), name); + return requestOnceByCommandUdp(findCommandFromName(name), packet); +} + +/** + This requests the data from the server, but only once... this is + useful for things like video data that you don't want to clog up + the bandwidth with... its also useful for things like sending + commands + + @param command the command number to request + @param packet the packet that contains the data to use as argument +**/ +AREXPORT bool ArClientBase::requestOnceByCommand(unsigned int command, + ArNetPacket *packet) +{ + if (packet != NULL) + { + packet->setCommand(command); + return sendPacketTcp(packet); + } + else + { + ArNetPacket tempPacket; + tempPacket.setCommand(command); + return sendPacketTcp(&tempPacket); + } +} + +/** + This requests the data from the server, but only once... this is + useful for things like video data that you don't want to clog up + the bandwidth with... its also useful for things like sending + commands + + @param command the command number to request + @param packet the packet that contains the data to use as argument +**/ +AREXPORT bool ArClientBase::requestOnceByCommandUdp(unsigned int command, + ArNetPacket *packet) +{ + if (packet != NULL) + { + packet->setCommand(command); + if (!myTcpOnlyTo) + return sendPacketUdp(packet); + else + return sendPacketTcp(packet); + } + else + { + ArNetPacket tempPacket; + tempPacket.setCommand(command); + if (!myTcpOnlyTo) + return sendPacketUdp(&tempPacket); + else + return sendPacketTcp(&tempPacket); + } +} + +/** + This requests the data from the server, but only once... this is + useful for things like video data that you don't want to clog up + the bandwidth with... its also useful for things like sending + commands + + @param name the name of the data to request + @param str a string to send as the packet argument +**/ +AREXPORT bool ArClientBase::requestOnceWithString(const char *name, + const char *str) +{ + std::map::iterator it; + + myMapsMutex.lock(); + if ((it = myNameIntMap.find(name)) == myNameIntMap.end()) + { + ArLog::log(ArLog::Normal, + "%sRequesting data for \"%s\" but no data with that name exists", + myLogPrefix.c_str(), name); + myMapsMutex.unlock(); + return false; + } + myMapsMutex.unlock(); + ArLog::log(myVerboseLogLevel, + "%sRequesting data once for \"%s\"", + myLogPrefix.c_str(), name); + + ArNetPacket tempPacket; + tempPacket.strToBuf(str); + tempPacket.setCommand((*it).second); + return sendPacketTcp(&tempPacket); +} + +/** + @param name the name to stop sending +**/ +AREXPORT bool ArClientBase::dataExists(const char *name) +{ + bool ret; + myMapsMutex.lock(); + ret = (myNameIntMap.find(name) != myNameIntMap.end()); + myMapsMutex.unlock(); + return ret; +} + +AREXPORT void ArClientBase::logDataList(void) +{ + std::map::iterator it; + ArClientData *clientData; + + myMapsMutex.lock(); + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%sAvailable data:", myLogPrefix.c_str()); + for (it = myIntDataMap.begin(); it != myIntDataMap.end(); it++) + { + clientData = (*it).second; + ArLog::log(ArLog::Terse, ""); + ArLog::log(myVerboseLogLevel, "Number %d, %d functors", + clientData->getCommand(), + clientData->getFunctorList()->size()); + ArLog::log(ArLog::Terse, "Data: %s", clientData->getName()); + ArLog::log(ArLog::Terse, "\tDescription: %s", + clientData->getDescription()); + ArLog::log(ArLog::Terse, "\tArgument: %s", + clientData->getArgumentDescription()); + ArLog::log(ArLog::Terse, "\tReturn: %s", + clientData->getReturnDescription()); + ArLog::log(ArLog::Terse, "\tCommandGroup: %s", + clientData->getCommandGroup()); + ArLog::log(ArLog::Terse, "\tDataFlags: %s", + clientData->getDataFlagsString()); + + } + myMapsMutex.unlock(); +} + +/** + @param functor functor created from ArFunctorC which refers to the + function to call. + @param position whether to place the functor first or last + @see remDisconnectOnErrorCB + **/ + +AREXPORT void ArClientBase::addDisconnectOnErrorCB(ArFunctor *functor, + ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myDisconnectOnErrorCBList.push_front(functor); + else if (position == ArListPos::LAST) + myDisconnectOnErrorCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "%saddDisconnectOnErrorCB: Invalid position", + myLogPrefix.c_str()); + myCallbackMutex.unlock(); +} + +/** + @param functor the functor to remove from the list of connect callbacks + @see addDisconnectOnErrorCB +**/ +AREXPORT void ArClientBase::remDisconnectOnErrorCB(ArFunctor *functor) +{ + myCallbackMutex.lock(); + myDisconnectOnErrorCBList.remove(functor); + myCallbackMutex.unlock(); +} + +/** + @param functor functor created from ArFunctorC which refers to the + function to call. + @param position whether to place the functor first or last + @see remServerShutdownCB + **/ + +AREXPORT void ArClientBase::addServerShutdownCB(ArFunctor *functor, + ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myServerShutdownCBList.push_front(functor); + else if (position == ArListPos::LAST) + myServerShutdownCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "%saddServerShutdownCB: Invalid position", myLogPrefix.c_str()); + myCallbackMutex.unlock(); +} + +/** + @param functor the functor to remove from the list of connect callbacks + @see addServerShutdownCB +**/ +AREXPORT void ArClientBase::remServerShutdownCB(ArFunctor *functor) +{ + myCallbackMutex.lock(); + myServerShutdownCBList.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientBase::setTcpOnlyFromServer(void) +{ + ArNetPacket packet; + + packet.setCommand(ArClientCommands::TCP_ONLY); + sendPacketTcp(&packet); + myDataMutex.lock(); + myTcpOnlyFrom = true; + myDataMutex.unlock(); +} + +AREXPORT void ArClientBase::setTcpOnlyToServer(void) +{ + myDataMutex.lock(); + myTcpOnlyTo = true; + myDataMutex.unlock(); +} + +AREXPORT bool ArClientBase::isTcpOnlyFromServer(void) +{ + bool ret; + myDataMutex.lock(); + ret = myTcpOnlyFrom; + myDataMutex.unlock(); + return ret; +} + +AREXPORT bool ArClientBase::isTcpOnlyToServer(void) +{ + bool ret; + myDataMutex.lock(); + ret = myTcpOnlyTo; + myDataMutex.unlock(); + return ret; +} + + +AREXPORT ArTime ArClientBase::getLastPacketReceived(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastPacketReceived; + myDataMutex.unlock(); + return ret; +} + +/** + Sets up the backup timeout, if there are packets to send to the + server and they haven't been sent for longer than this then the + connection is closed. Less than 0 means this won't happen. If + this is positive but less than 5 seconds then 5 seconds is used. +**/ +AREXPORT void ArClientBase::setBackupTimeout(double timeoutInMins) +{ + myBackupTimeout = timeoutInMins; + myTcpSender.setBackupTimeout(myBackupTimeout); +} + +AREXPORT const char *ArClientBase::getName(ArNetPacket *packet, + bool internalCall) +{ + return getName(packet->getCommand(), internalCall); +} + +AREXPORT const char *ArClientBase::getName(unsigned int command, + bool internalCall) +{ + const char *ret; + if (!internalCall) + myMapsMutex.lock(); + std::map::iterator it; + if ((it = myIntDataMap.find(command)) == myIntDataMap.end()) + ret = NULL; + else + ret = (*it).second->getName(); + if (!internalCall) + myMapsMutex.unlock(); + return ret; +} + +AREXPORT void ArClientBase::setServerKey(const char *serverKey, bool log) +{ + myDataMutex.lock(); + myServerKey = serverKey; + myDataMutex.unlock(); + if (log) + ArLog::log(ArLog::Normal, "%sNew server key set", myLogPrefix.c_str()); +} + + +AREXPORT void ArClientBase::enforceProtocolVersion(const char *protocolVersion, + bool log) +{ + myDataMutex.lock(); + if (protocolVersion != NULL) + myEnforceProtocolVersion = protocolVersion; + else + myEnforceProtocolVersion = ""; + myDataMutex.unlock(); + if (log) + ArLog::log(ArLog::Normal, "%sNew enforceProtocolVersionSet", myLogPrefix.c_str()); +} + +AREXPORT void ArClientBase::enforceType(ArServerCommands::Type type, + bool log) +{ + myDataMutex.lock(); + myEnforceType = type; + myDataMutex.unlock(); + if (log) + ArLog::log(ArLog::Normal, "%sNew enforce type: %s", + myLogPrefix.c_str(), ArServerCommands::toString(type)); + +} + +/** + NOTE that this is only valid AFTER the client is connected +**/ +AREXPORT void ArClientBase::getClientKey(unsigned char key[CLIENT_KEY_LENGTH]) +{ + memcpy(key, myClientKey, CLIENT_KEY_LENGTH); +} + +AREXPORT const char *ArClientBase::getHost(void) +{ + const char *ret; + myDataMutex.lock(); + ret = myHost.c_str(); + myDataMutex.unlock(); + return ret; +} + +void ArClientBase::trackPacketSent(ArNetPacket *packet, bool tcp) +{ + myPacketTrackingMutex.lock(); + if (myTrackingSentMap.find(packet->getCommand()) == myTrackingSentMap.end()) + myTrackingSentMap[packet->getCommand()] = new Tracker; + + if (tcp) + { + myTrackingSentMap[packet->getCommand()]->myPacketsTcp++; + myTrackingSentMap[packet->getCommand()]->myBytesTcp += packet->getLength(); + } + else + { + myTrackingSentMap[packet->getCommand()]->myPacketsUdp++; + myTrackingSentMap[packet->getCommand()]->myBytesUdp += packet->getLength(); + } + myPacketTrackingMutex.unlock(); +} + +void ArClientBase::trackPacketReceived(ArNetPacket *packet, + bool tcp) +{ + myPacketTrackingMutex.lock(); + if (myTrackingReceivedMap.find(packet->getCommand()) == + myTrackingReceivedMap.end()) + myTrackingReceivedMap[packet->getCommand()] = new Tracker; + + if (tcp) + { + myTrackingReceivedMap[packet->getCommand()]->myPacketsTcp++; + myTrackingReceivedMap[packet->getCommand()]->myBytesTcp += + packet->getLength(); + } + else + { + myTrackingReceivedMap[packet->getCommand()]->myPacketsUdp++; + myTrackingReceivedMap[packet->getCommand()]->myBytesUdp += + packet->getLength(); + } + myPacketTrackingMutex.unlock(); +} + +AREXPORT void ArClientBase::logTracking(bool terse) +{ + myDataMutex.lock(); + myPacketTrackingMutex.lock(); + std::map::iterator it; + + unsigned int command; + Tracker *tracker = NULL; + long seconds; + + seconds = myTrackingStarted.secSince(); + if (seconds == 0) + seconds = 1; + + const char *namePtr; + char name[512]; + + long packetsReceivedTcp = 0; + long bytesReceivedTcp = 0; + long packetsReceivedUdp = 0; + long bytesReceivedUdp = 0; + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%sReceived tracking (active %d seconds):", + myLogPrefix.c_str(), seconds); + for (it = myTrackingReceivedMap.begin(); it != myTrackingReceivedMap.end(); it++) + { + command = (*it).first; + tracker = (*it).second; + + packetsReceivedTcp += tracker->myPacketsTcp; + bytesReceivedTcp += tracker->myBytesTcp; + packetsReceivedUdp += tracker->myPacketsUdp; + bytesReceivedUdp += tracker->myBytesUdp; + + if ((namePtr = getName(command, true)) != NULL && namePtr[0] != '\0') + snprintf(name, sizeof(name), "%s", namePtr); + // if we're command 255 or less and there's no name its probably + // one of the server commands we don't really need to track + else if (command <= 255) + continue; + // we should know what the name of everything other then the + // server command is, but print if we don't, just in case + else + snprintf(name, sizeof(name), "#%d", command); + + if (terse) + { + ArLog::log(ArLog::Terse, + "%35s %7ld pkts %10ld B %7ld B/sec", + name, tracker->myPacketsTcp + tracker->myPacketsUdp, + tracker->myBytesTcp + tracker->myBytesUdp, + ((tracker->myBytesTcp + tracker->myBytesUdp)/ + seconds)); + } + else + { + ArLog::log(ArLog::Terse, + "%35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/s ", + name, tracker->myPacketsTcp, tracker->myBytesTcp, + tracker->myBytesTcp/seconds, + tracker->myPacketsUdp, tracker->myBytesUdp, + tracker->myBytesUdp/seconds); + } + } + + ArLog::log(ArLog::Terse, ""); + if (terse) + { + ArLog::log(ArLog::Terse, "%-35s %7ld pkts %10ld B %7ld B/sec", + "Total Received", packetsReceivedTcp + packetsReceivedUdp, + bytesReceivedTcp + bytesReceivedUdp, + (bytesReceivedTcp + bytesReceivedUdp) / seconds); + } + else + { + ArLog::log(ArLog::Terse, "%-35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Total Received", packetsReceivedTcp, bytesReceivedTcp, + bytesReceivedTcp/seconds, packetsReceivedUdp, bytesReceivedUdp, + bytesReceivedUdp/seconds); + ArLog::log(ArLog::Terse, "%-35s %7ld tcp rcvs %10ld tcp B %7ld tcp B/S %7ld udp rcvs %10ld udp B %7ld udp B/sec", + "Low level Sockets Received", myTcpSocket.getRecvs(), + myTcpSocket.getBytesRecvd(), + myTcpSocket.getBytesRecvd()/seconds, myUdpSocket.getRecvs(), + myUdpSocket.getBytesRecvd(), + myUdpSocket.getBytesRecvd()/seconds); + } + + long packetsSentTcp = 0; + long bytesSentTcp = 0; + long packetsSentUdp = 0; + long bytesSentUdp = 0; + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%sSent tracking (active %d seconds):", + myLogPrefix.c_str(), seconds); + for (it = myTrackingSentMap.begin(); it != myTrackingSentMap.end(); it++) + { + command = (*it).first; + tracker = (*it).second; + + packetsSentTcp += tracker->myPacketsTcp; + bytesSentTcp += tracker->myBytesTcp; + packetsSentUdp += tracker->myPacketsUdp; + bytesSentUdp += tracker->myBytesUdp; + + if ((namePtr = getName(command, true)) != NULL && namePtr[0] != '\0') + snprintf(name, sizeof(name), "%s", namePtr); + // if we're command 255 or less and there's no name its probably + // one of the server commands we don't really need to track + else if (command <= 255) + continue; + // we should know what the name of everything other then the + // server command is, but print if we don't, just in case + else + snprintf(name, sizeof(name), "#%d", command); + + if (terse) + { + ArLog::log(ArLog::Terse, + "%35s %7ld pkts %10ld B %7ld B/sec", + name, tracker->myPacketsTcp + tracker->myPacketsUdp, + tracker->myBytesTcp + tracker->myBytesUdp, + ((tracker->myBytesTcp + tracker->myBytesUdp)/ + seconds)); + } + else + { + ArLog::log(ArLog::Terse, + "%35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/s ", + name, tracker->myPacketsTcp, tracker->myBytesTcp, + tracker->myBytesTcp/seconds, + tracker->myPacketsUdp, tracker->myBytesUdp, + tracker->myBytesUdp/seconds); + } + } + + ArLog::log(ArLog::Terse, ""); + if (terse) + { + ArLog::log(ArLog::Terse, "%-35s %7ld pkts %10ld B %7ld B/sec", + "Total Sent", packetsSentTcp + packetsSentUdp, + bytesSentTcp + bytesSentUdp, + (bytesSentTcp + bytesSentUdp) / seconds); + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%-35s %7ld pkts %10ld B %7ld B/sec", + "Total Sent and Received", + (packetsSentTcp + packetsSentUdp + + packetsReceivedTcp + packetsReceivedUdp), + (bytesSentTcp + bytesSentUdp + + bytesReceivedTcp + bytesReceivedUdp), + (bytesSentTcp + bytesSentUdp + + bytesReceivedTcp + bytesReceivedUdp) / seconds); + } + else + { + ArLog::log(ArLog::Terse, "%-35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Total Sent", packetsSentTcp, bytesSentTcp, bytesSentTcp / seconds, + packetsSentUdp, bytesSentUdp, bytesSentUdp / seconds); + ArLog::log(ArLog::Terse, "%-35s %7ld tcp snds %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Low level Sockets Sent", myTcpSocket.getSends(), + myTcpSocket.getBytesSent(), + myTcpSocket.getBytesSent() / seconds, myUdpSocket.getSends(), + myUdpSocket.getBytesSent(), + myUdpSocket.getBytesSent() / seconds); + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%-35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Total Sent and Received", packetsSentTcp = packetsReceivedTcp, + bytesSentTcp + bytesReceivedTcp, + (bytesSentTcp + bytesReceivedTcp) / seconds, + packetsSentUdp + packetsReceivedUdp, + bytesSentUdp + bytesReceivedUdp, + (bytesSentUdp + bytesReceivedUdp) / seconds); + } + ArLog::log(ArLog::Terse, ""); + myPacketTrackingMutex.unlock(); + myDataMutex.unlock(); +} + + +AREXPORT void ArClientBase::resetTracking(void) +{ + myPacketTrackingMutex.lock(); + + std::map::iterator it; + + myTrackingStarted.setToNow(); + + for (it = myTrackingSentMap.begin(); it != myTrackingSentMap.end(); it++) + (*it).second->reset(); + + for (it = myTrackingReceivedMap.begin(); + it != myTrackingReceivedMap.end(); + it++) + (*it).second->reset(); + + myTcpSocket.resetTracking(); + myUdpSocket.resetTracking(); + myPacketTrackingMutex.unlock(); +} diff --git a/Legacy/Aria/ArNetworking/src/ArClientData.cpp b/Legacy/Aria/ArNetworking/src/ArClientData.cpp new file mode 100644 index 0000000..21bc8b7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientData.cpp @@ -0,0 +1,53 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArClientData.h" +#include "ArNetPacket.h" + +AREXPORT ArClientData::ArClientData( + const char *name, const char *description, unsigned int command, + ArFunctor1 *functor) : + myDataFlagsBuilder(512, '|') +{ + myDataMutex.setLogName("ArClientData::myDataMutex"); + myMutex.setLogName("ArClientData::myMutex"); + myName = name; + myDescription = description; + myCommand = command; + if (functor != NULL) + addFunctor(functor); +} + +AREXPORT ArClientData::~ArClientData() +{ + +} + +AREXPORT bool ArClientData::hasDataFlag(const char *dataFlag) +{ + myDataMutex.lock(); + size_t i; + for (i = 0; i < myDataFlagsBuilder.getArgc(); i++) + { + if (strcmp(myDataFlagsBuilder.getArg(i), dataFlag) == 0) + { + myDataMutex.unlock(); + return true; + } + } + + myDataMutex.unlock(); + return false; +} + + + +/// Sets the data flags +AREXPORT void ArClientData::addDataFlags(const char *dataFlags) +{ + if (dataFlags != NULL) + { + myDataMutex.lock(); + myDataFlagsBuilder.add(dataFlags); + myDataMutex.unlock(); + } +} diff --git a/Legacy/Aria/ArNetworking/src/ArClientFileUtils.cpp b/Legacy/Aria/ArNetworking/src/ArClientFileUtils.cpp new file mode 100644 index 0000000..db1e2e5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientFileUtils.cpp @@ -0,0 +1,1416 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArClientFileUtils.h" + + +AREXPORT ArClientFileLister::ArClientFileLister(ArClientBase *client) : + myGetDirListingCB(this, &ArClientFileLister::netGetDirListing), + myGetDirListingMultiplePacketsCB( + this, + &ArClientFileLister::netGetDirListingMultiplePackets) +{ + myDataMutex.setLogName("ArClientFileLister::myDataMutex"); + myCallbackMutex.setLogName("ArClientFileLister::myCallbackMutex"); + myClient = client; + + if (myClient->dataExists("getDirListingMultiplePackets")) + { + ArLog::log(ArLog::Verbose, "ArClientFileLister: Using getDirListingMultiplePackets (new)"); + myClient->addHandler("getDirListingMultiplePackets", + &myGetDirListingMultiplePacketsCB); + } + else + { + ArLog::log(ArLog::Verbose, "ArClientFileLister: Using getDirListing (old)"); + myClient->addHandler("getDirListing", &myGetDirListingCB); + } + myCurrentDir[0] = '\0'; + myWaitingForDir[0] = '\0'; + myLastDirMatched = false; + myNewDirListing = false; +} + +AREXPORT ArClientFileLister::~ArClientFileLister() +{ + +} + +AREXPORT bool ArClientFileLister::isAvailable(void) +{ + return (myClient->dataExists("getDirListingMultiplePackets") || + myClient->dataExists("getDirListing")); +} + +void ArClientFileLister::getDirListing(const char *dir) +{ + if (myClient->dataExists("getDirListingMultiplePackets")) + { + myClient->requestOnceWithString("getDirListingMultiplePackets", dir); + myLastDirMatched = false; + myNewDirListing = true; + } + else + { + myClient->requestOnceWithString("getDirListing", dir); + } + +} + +AREXPORT void ArClientFileLister::changeToTopDir(void) +{ + myDataMutex.lock(); + myCurrentDir[0] = '\0'; + myWaitingForDir[0] = '\0'; + myDataMutex.unlock(); + //myClient->requestOnceWithString("getDirListing", ""); + getDirListing(""); + +} + +AREXPORT void ArClientFileLister::changeToDir(const char *dir) +{ + myDataMutex.lock(); + strcpy(myWaitingForDir, myCurrentDir); + if (myWaitingForDir[0] != '\0') + ArUtil::appendSlash(myWaitingForDir, sizeof(myWaitingForDir)); + strncat(myWaitingForDir, dir, + sizeof(myWaitingForDir) - strlen(myWaitingForDir)); + myLastRequested.setToNow(); + //printf("Getting %s\n", myWaitingForDir); + std::string waitingFor = myWaitingForDir; + myDataMutex.unlock(); + //myClient->requestOnceWithString("getDirListing", waitingFor.c_str()); + getDirListing(waitingFor.c_str()); +} + +AREXPORT void ArClientFileLister::changeToAbsDir(const char *dir) +{ + myDataMutex.lock(); + strncpy(myWaitingForDir, dir, sizeof(myWaitingForDir)); + myLastRequested.setToNow(); + //printf("Getting %s\n", myWaitingForDir); + std::string waitingFor = myWaitingForDir; + myDataMutex.unlock(); + //myClient->requestOnceWithString("getDirListing", waitingFor.c_str()); + getDirListing(waitingFor.c_str()); +} + +AREXPORT void ArClientFileLister::upOneDir() +{ + char *str; + myDataMutex.lock(); + + if ( ((str = strrchr(myCurrentDir, '/')) == NULL) && + ((str = strrchr(myCurrentDir, '\\')) == NULL) ) { + myDataMutex.unlock(); + return changeToTopDir(); + } // end if first level down + + strcpy(myWaitingForDir, myCurrentDir); + if (myWaitingForDir[0] != '\0') + { + ArUtil::appendSlash(myWaitingForDir, sizeof(myWaitingForDir)); + // chop off the last couple slashes (ie last directory) + if ((str = strrchr(myWaitingForDir, '/')) != NULL || + (str = strrchr(myWaitingForDir, '\\')) != NULL) + *str = '\0'; + if ((str = strrchr(myWaitingForDir, '/')) != NULL || + (str = strrchr(myWaitingForDir, '\\')) != NULL) { + *str = '\0'; + } + else { + myDataMutex.unlock(); + return changeToTopDir(); + } + } + myLastRequested.setToNow(); + std::string waitingFor = myWaitingForDir; + myDataMutex.unlock(); + //printf("Getting %s\n", myWaitingForDir); + //myClient->requestOnceWithString("getDirListing", waitingFor.c_str()); + getDirListing(waitingFor.c_str()); + +} + +AREXPORT const char *ArClientFileLister::getCurrentDir(void) const +{ + return myCurrentDir; +} + +AREXPORT const char *ArClientFileLister::getWaitingForDir(void) const +{ + return myWaitingForDir; +} + + +AREXPORT void ArClientFileLister::netGetDirListing(ArNetPacket *packet) +{ + char name[2048]; + char directory[2048]; + time_t atime; + time_t mtime; + ArTypes::UByte4 size = 0; + unsigned int num = 0; + unsigned int ret = 0; + unsigned int i = 0; + +// printf("Got packet...\n"); + myDataMutex.lock(); + ret = packet->bufToUByte2(); + if (ret != 0) + { + ArLog::log(ArLog::Normal, + "ArClientFileLister: Bad return for getDirListing of %d", ret); + myDataMutex.unlock(); + callUpdatedCallbacks(ret); + return; + } + packet->bufToStr(directory, sizeof(directory)); + ArLog::log(ArLog::Verbose, + "ArClientFileLister: Got dir listing for %s", directory); + + // if we got it but it wasn't the directory we were waiting for anymore then just skip + if (strcmp(myWaitingForDir, directory) != 0) + { + ArLog::log(ArLog::Normal, + "ArClientFileLister: Got directory '%s' instead of %s (probably fine)", + directory, + myWaitingForDir); + myDataMutex.unlock(); + callUpdatedCallbacks(-1); + return; + } + // dir was good, remember it and get rid of our old stuff + strcpy(myCurrentDir, directory); + + myDirectories.clear(); + myFiles.clear(); + num = packet->bufToUByte2(); + + for (i = 0; i < num; i++) + { + packet->bufToStr(name, sizeof(name)); + atime = packet->bufToUByte4(); + mtime = packet->bufToUByte4(); + size = packet->bufToUByte4(); + myDirectories.push_back(ArClientFileListerItem(name, atime, mtime, + size)); + } + num = packet->bufToUByte2(); + for (i = 0; i < num; i++) + { + packet->bufToStr(name, sizeof(name)); + atime = packet->bufToUByte4(); + mtime = packet->bufToUByte4(); + size = packet->bufToUByte4(); + myFiles.push_back(ArClientFileListerItem(name, atime, mtime, + size)); + } + + myDataMutex.unlock(); + callUpdatedCallbacks(0); +} + +AREXPORT void ArClientFileLister::netGetDirListingMultiplePackets( + ArNetPacket *packet) +{ + int type; + char name[2048]; + char directory[2048]; + time_t atime; + time_t mtime; + ArTypes::UByte4 size; + unsigned int num = 0; + + unsigned int ret = 0; + unsigned int i = 0; + + myDataMutex.lock(); + // if the packet is empty we're done with this one... + if (packet->getDataLength() == 0) + { + // if our last dir matched this is the end of a directory listing + if (myLastDirMatched) + { + myNewDirListing = true; + + myDataMutex.unlock(); + callUpdatedCallbacks(0); + } + // otherwise its from something we were ignoring + else + { + myDataMutex.unlock(); + } + return; + } + + ret = packet->bufToUByte2(); + if (ret != 0) + { + ArLog::log(ArLog::Normal, + "ArClientFileLister: Bad return for getDirListing of %d", ret); + myLastDirMatched = false; + myDataMutex.unlock(); + callUpdatedCallbacks(ret); + return; + } + packet->bufToStr(directory, sizeof(directory)); + // see if this is the dir we want + if (strcmp(myWaitingForDir, directory) == 0) + { + myLastDirMatched = true; + } + // if it wasn't the directory we were waiting for anymore then just skip + else + { + ArLog::log(ArLog::Normal, + "ArClientFileLister: Got directory '%s' instead of %s (probably fine)", + directory, + myWaitingForDir); + myLastDirMatched = false; + myDataMutex.unlock(); + callUpdatedCallbacks(-1); + return; + } + + + if (myNewDirListing) + { + // dir was good, remember it and get rid of our old stuff + strcpy(myCurrentDir, directory); + myDirectories.clear(); + myFiles.clear(); + myNewDirListing = false; + + } + /*** + else { + ArLog::log(ArLog::Verbose, + "ArClientFileLister: Continued dir listing (multiple packets) for %s (%s)", + directory, myCurrentDir); + + } + ***/ + + num = packet->bufToUByte2(); + + ArLog::log(ArLog::Verbose, + "ArClientFileLister: Got dir listing (multiple packets) for %s (num = %i)", + directory, num); + + + for (i = 0; i < num; i++) + { + type = packet->bufToByte(); + packet->bufToStr(name, sizeof(name)); + atime = packet->bufToUByte4(); + mtime = packet->bufToUByte4(); + size = packet->bufToUByte4(); + if (type == 1) + myDirectories.push_back(ArClientFileListerItem(name, atime, mtime, + size)); + else if (type == 2) + myFiles.push_back(ArClientFileListerItem(name, atime, mtime, + size)); + else + ArLog::log(ArLog::Normal, + "ArClientFileLister: Got unknown file type (%d) for file %s (ignoring it)", + type, name); + } + + + + myDataMutex.unlock(); +} + +AREXPORT void ArClientFileLister::log(bool withTimes) +{ + myDataMutex.lock(); + ArLog::log(ArLog::Normal, "In Directory '%s'", getCurrentDir()); + ArLog::log(ArLog::Normal, "%d directories:", myDirectories.size()); + logList(&myDirectories, withTimes); + ArLog::log(ArLog::Normal, "%d Files:", myFiles.size()); + logList(&myFiles, withTimes); + myDataMutex.unlock(); +} + +AREXPORT void ArClientFileLister::logList( + std::list *logThis, + bool withTimes) +{ + std::list::const_iterator it; + char buf[128]; + unsigned int i; + time_t itime; + + for (it = logThis->begin(); it != logThis->end(); it++) + { + ArLog::log(ArLog::Normal, "\t%s", (*it).getName()); + if (!withTimes) + continue; + itime = (*it).getLastAccessedTime(); + strcpy(buf, ctime(&itime)); + // chop the new lines off + for (i = 0; i < sizeof(buf); i++) + if (buf[i] == '\r' || buf[i] == '\n') + buf[i] = '\0'; + ArLog::log(ArLog::Normal, "\t\tlastModified:%s", buf); + itime = (*it).getLastModifiedTime(); + strcpy(buf, ctime(&itime)); + // chop the new lines off + for (i = 0; i < sizeof(buf); i++) + if (buf[i] == '\r' || buf[i] == '\n') + buf[i] = '\0'; + ArLog::log(ArLog::Normal, "\t\tlastAccess: %s", buf); + ArLog::log(ArLog::Normal, "\t\tbytes: %d", (*it).getSize()); + } +} + +AREXPORT std::list +ArClientFileLister::getDirectories(void) const +{ + return myDirectories; +} +AREXPORT std::list +ArClientFileLister::getFiles(void) const +{ + return myFiles; +} + + +AREXPORT void ArClientFileLister::addUpdatedCallback(ArFunctor1 *functor, + ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myUpdatedCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myUpdatedCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientFileListt::addUpdateCallback: Invalid position."); + myCallbackMutex.unlock(); + +} + +AREXPORT void ArClientFileLister::remUpdatedCallback(ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + myUpdatedCallbacks.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientFileLister::callUpdatedCallbacks(int val) +{ + std::list *>::iterator it; + + myCallbackMutex.lock(); + for (it = myUpdatedCallbacks.begin(); it != myUpdatedCallbacks.end(); it++) + (*it)->invoke(val); + myCallbackMutex.unlock(); +} + +AREXPORT ArTime ArClientFileLister::getLastUpdated(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastUpdated; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArTime ArClientFileLister::getLastRequested(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastRequested; + myDataMutex.unlock(); + return ret; +} + +// ----------------------------------------------------------------------------- +// ArClientFileToClient +// ----------------------------------------------------------------------------- + +AREXPORT ArClientFileToClient::ArClientFileToClient(ArClientBase *client) : + myDataMutex(), + myCallbackMutex(), + myClient(client), + myIsWaitingForFile(false), + myDirectory(), + myFileName(), + myWholeFileName(), + myClientFileName(), + myFile(NULL), + myLastRequested(), + myLastReceived(), + myFileReceivedCallbacks(), + myGetFileCB(this, &ArClientFileToClient::netGetFile), + myGetFileWithTimestampCB(this, &ArClientFileToClient::netGetFileWithTimestamp) +{ + myDataMutex.setLogName("ArClientFileToClient::myDataMutex"); + myCallbackMutex.setLogName("ArClientFileToClient::myCallbackMutex"); + + if (myClient != NULL) { + myClient->addHandler("getFile", &myGetFileCB); + myClient->addHandler("getFileWithTimestamp", &myGetFileWithTimestampCB); + } +} + +AREXPORT ArClientFileToClient::~ArClientFileToClient() +{ + +} + +AREXPORT bool ArClientFileToClient::isAvailable(void) +{ + return ((myClient != NULL) && + ( myClient->dataExists("getFile") || + myClient->dataExists("getFileWithTimestamp") )); +} +AREXPORT bool ArClientFileToClient::isAvailableSetTimestamp(void) +{ + return ((myClient != NULL) && + (myClient->dataExists("getFileWithTimestamp"))); +} + + +AREXPORT bool ArClientFileToClient::getFileFromDirectory(const char *directory, + const char *fileName, + const char *clientFileName, + bool isSetTimestamp) +{ + myDataMutex.lock(); + if (fileName == NULL || clientFileName == NULL) + { + ArLog::log(ArLog::Terse, + "ArClientFileToClient: NULL fileName ('%s') or clientFileName ('%s')", + fileName, clientFileName); + myDataMutex.unlock(); + return false; + } + if (!isAvailable()) + { + ArLog::log(ArLog::Normal, "ArClientFileToClient::getFileFromDirectory: Tried to get file but the server doesn't support it."); + return false; + } + + if (myIsWaitingForFile) + { + ArLog::log(ArLog::Terse, + "ArClientFileToClient: already busy downloading a file '%s' cannot download '%s'", + myFileName.c_str(), fileName); + myDataMutex.unlock(); + return false; + } + if (directory != NULL) + myDirectory = directory; + else + myDirectory = ""; + myFileName = fileName; + myClientFileName = clientFileName; + + char *dirStr = NULL; + int dirLen; + if (directory != NULL) + { + dirLen = strlen(directory) + 2; + dirStr = new char[dirLen]; + strncpy(dirStr, directory, dirLen); + // make sure it has a slash + ArUtil::appendSlash(dirStr, dirLen); + // and that the slashes go a consistent direction + ArUtil::fixSlashes(dirStr, dirLen); + } + + int fileLen = strlen(fileName) + 1; + char *fileStr = new char[fileLen]; + strncpy(fileStr, fileName, fileLen); + // and that the slashes go a consistent direction + ArUtil::fixSlashes(fileStr, fileLen); + + if (directory == NULL) + myWholeFileName = ""; + else + myWholeFileName = dirStr; + + myWholeFileName += fileStr; + + ArNetPacket sendPacket; + sendPacket.strToBuf(myWholeFileName.c_str()); + sendPacket.uByte2ToBuf(0); + + if (isSetTimestamp && isAvailableSetTimestamp()) { + myClient->requestOnce("getFileWithTimestamp", &sendPacket); + } + else { + myClient->requestOnce("getFile", &sendPacket); + + if (isSetTimestamp) { + ArLog::log(ArLog::Normal, + "File timestamps are not available, using getFile"); + // TODO: Special return value? + } + } + + myIsWaitingForFile = true; + myLastRequested.setToNow(); + if (dirStr != NULL) + delete[] dirStr; + if (fileStr != NULL) + delete[] fileStr; + myDataMutex.unlock(); + return true; +} + +AREXPORT void ArClientFileToClient::netGetFile(ArNetPacket *packet) +{ + doGetFile(packet, false); +} + +AREXPORT void ArClientFileToClient::netGetFileWithTimestamp(ArNetPacket *packet) +{ + doGetFile(packet, true); +} + +AREXPORT void ArClientFileToClient::doGetFile(ArNetPacket *packet, + bool isSetTimestamp) +{ + char fileName[2048]; + // if its just the empty return packet at the end then don't worry about it + if (packet->getDataLength() == 0) + return; + + myDataMutex.lock(); + int ret = packet->bufToUByte2(); + packet->bufToStr(fileName, sizeof(fileName)); + ArUtil::fixSlashes(fileName, sizeof(fileName)); + if (ArUtil::strcasecmp(fileName, myWholeFileName) != 0) + { + ArLog::log(ArLog::Normal, + "Got data for a file ('%s') we don't want (we want '%s') (ret %d)", + fileName, myWholeFileName.c_str(), ret); + myDataMutex.unlock(); + return; + } + + if (ret != 0) + { + if (myFile != NULL) + { + fclose(myFile); + unlink(myClientFileName.c_str()); + myFile = NULL; + } + ArLog::log(ArLog::Normal, "ArClientFileToClient: Bad return %d on file %s", ret, fileName); + myIsWaitingForFile = false; + myLastReceived.setToNow(); + myDataMutex.unlock(); + callFileReceivedCallbacks(ret); + return; + } + + // Otherwise successful get... + + if (myFile == NULL) + { + ArLog::log(ArLog::Verbose, "Getting file %s", myFileName.c_str()); + if ((myFile = ArUtil::fopen(myClientFileName.c_str(), "wb")) == NULL) + { + ArLog::log(ArLog::Normal, "Can't open '%s' to put file into", + myClientFileName.c_str()); + myIsWaitingForFile = false; + myLastReceived.setToNow(); + myDataMutex.unlock(); + callFileReceivedCallbacks(-2); + return; + } + } + + ArTypes::UByte4 numBytes = 0; + char buf[32000]; + // file should be good here, so just write into it + numBytes = packet->bufToUByte4(); + + time_t modTime = -1; + if (isSetTimestamp) { + modTime = packet->bufToByte4(); + } + + if (numBytes == 0) + { + fclose(myFile); + + + if (isSetTimestamp) { + ArUtil::changeFileTimestamp(myClientFileName.c_str(), modTime); + } + + myFile = NULL; + myIsWaitingForFile = false; + ArLog::log(ArLog::Normal, "Received file %s", myFileName.c_str()); + myLastReceived.setToNow(); + myDataMutex.unlock(); + callFileReceivedCallbacks(0); + return; + } + else + { + ArLog::log(ArLog::Verbose, "Got %d bytes of file '%s'", + numBytes, myFileName.c_str()); + packet->bufToData(buf, numBytes); + fwrite(buf, 1, numBytes, myFile); + myDataMutex.unlock(); + } + +} + + + + + + +AREXPORT void ArClientFileToClient::addFileReceivedCallback( + ArFunctor1 *functor, ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myFileReceivedCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myFileReceivedCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientFileToClient::addUpdateCallback: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientFileToClient::remFileReceivedCallback( + ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + myFileReceivedCallbacks.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientFileToClient::callFileReceivedCallbacks(int val) +{ + std::list *>::iterator it; + myCallbackMutex.lock(); + for (it = myFileReceivedCallbacks.begin(); it != myFileReceivedCallbacks.end(); it++) + (*it)->invoke(val); + myCallbackMutex.unlock(); +} + +AREXPORT const char *ArClientFileToClient::getDirectory(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myDirectory; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT const char *ArClientFileToClient::getFileName(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myFileName; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT const char *ArClientFileToClient::getClientFileName(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myClientFileName; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT void ArClientFileToClient::cancelGet(void) +{ + // Removed the following line because it causes the received packets + // to be dropped, and the file getter remains permanently in the + // waiting for file state. + // myWholeFileName = ""; + // TODO! +} + +AREXPORT bool ArClientFileToClient::isWaitingForFile(void) +{ + bool ret; + myDataMutex.lock(); + ret = myIsWaitingForFile; + myDataMutex.unlock(); + return ret; +} + + +AREXPORT ArTime ArClientFileToClient::getLastReceived(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastReceived; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArTime ArClientFileToClient::getLastRequested(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastRequested; + myDataMutex.unlock(); + return ret; +} + + +AREXPORT ArClientFileFromClient::ArClientFileFromClient(ArClientBase *client) : + myDataMutex(), + myCallbackMutex(), + myClient(client), + myIsWaitingForReturn(false), + myInterleaved(false), + myTimestamp(false), + myCommandName(), + myDirectory(), + myFileName(), + myWholeFileName(), + myClientFileName(), + myReadyForNextPacket(false), + myFile(), + myLastStartedSend(), + myLastCompletedSend(), + myFileSentCallbacks(), + myPutFileCB(this, &ArClientFileFromClient::netPutFile) +{ + myDataMutex.setLogName("ArClientFileFromClient::myDataMutex"); + myCallbackMutex.setLogName("ArClientFileFromClient::myCallbackMutex"); + + if (myClient != NULL) { + myClient->addHandler("putFile", &myPutFileCB); + myClient->addHandler("putFileInterleaved", &myPutFileCB); + myClient->addHandler("putFileWithTimestamp", &myPutFileCB); + myClient->addHandler("putFileWithTimestampInterleaved", &myPutFileCB); + } +} + + +AREXPORT ArClientFileFromClient::~ArClientFileFromClient() +{ + +} + +AREXPORT bool ArClientFileFromClient::isAvailable(void) +{ + return (myClient->dataExists("putFile") || + myClient->dataExists("putFileInterleaved") || + myClient->dataExists("putFileWithTimestamp") || + myClient->dataExists("putFileWithTimestampInterleaved")); +} + +AREXPORT bool ArClientFileFromClient::isAvailableSetTimestamp() +{ + return((myClient != NULL) && ( myClient->dataExists("putFileWithTimestamp") || myClient->dataExists("putFileWithTimestampInterleaved") ) ); +} + +AREXPORT bool ArClientFileFromClient::isAvailableSlow(void) +{ + return myClient->dataExists("putFileInterleaved"); +} + +AREXPORT bool ArClientFileFromClient::isAvailableFast(void) +{ + return myClient->dataExists("putFile"); +} + +AREXPORT bool ArClientFileFromClient::putFileToDirectory + (const char *directory, + const char *fileName, + const char *clientFileName, + SendSpeed sendSpeed, + bool isSetTimestamp) +{ + bool interleaved; + + myDataMutex.lock(); + if (fileName == NULL || fileName[0] == '\0' || + clientFileName == NULL || clientFileName[0] == '\0') + { + ArLog::log(ArLog::Terse, + "ArClientFileFromClient: NULL or empty fileName ('%s') or clientFileName ('%s')", + fileName, clientFileName); + myDataMutex.unlock(); + return false; + } + if (myIsWaitingForReturn) + { + ArLog::log(ArLog::Terse, + "ArClientFileFromClient: already busy uploading a file '%s' cannot upload '%s'", + myFileName.c_str(), fileName); + myDataMutex.unlock(); + return false; + } + + myCommandName = ""; + + if (!isSetTimestamp) { + + if (myClient->dataExists("putFile") && + (sendSpeed == SPEED_FAST || sendSpeed == SPEED_AUTO)) + { + myInterleaved = false; + myTimestamp = false; + myCommandName = "putFile"; + } + else if (myClient->dataExists("putFileInterleaved") && + (sendSpeed == SPEED_SLOW || sendSpeed == SPEED_AUTO)) + { + myInterleaved = true; + myTimestamp = false; + myReadyForNextPacket = false; + myCommandName = "putFileInterleaved"; + } + } + else { // is set timestamp + + if (myClient->dataExists("putFileWithTimestamp") && + (sendSpeed == SPEED_FAST || sendSpeed == SPEED_AUTO)) + { + myInterleaved = false; + myTimestamp = true; + myCommandName = "putFileWithTimestamp"; + } + else if (myClient->dataExists("putFileWithTimestampInterleaved") && + (sendSpeed == SPEED_SLOW || sendSpeed == SPEED_AUTO)) + { + myInterleaved = true; + myTimestamp = true; + myReadyForNextPacket = false; + myCommandName = "putFileWithTimestampInterleaved"; + } + + } // end else set timestamp + + if (ArUtil::isStrEmpty(myCommandName.c_str())) { + + ArLog::log(ArLog::Normal, "ArClientFileFromClient::putFileToDirectory: Tried to put file but the server doesn't support it (or doesn't support it at the speed requested)."); + myDataMutex.unlock(); + return false; + } + + interleaved = myInterleaved; + + if (directory != NULL) + myDirectory = directory; + else + myDirectory = ""; + myFileName = fileName; + myClientFileName = clientFileName; + + char *dirStr = NULL; + int dirLen; + if (directory != NULL) + { + dirLen = strlen(directory) + 2; + dirStr = new char[dirLen]; + strncpy(dirStr, directory, dirLen); + // make sure it has a slash + ArUtil::appendSlash(dirStr, dirLen); + // and that the slashes go a consistent direction + ArUtil::fixSlashes(dirStr, dirLen); + } + + int fileLen = strlen(fileName) + 1; + char *fileStr = new char[fileLen]; + strncpy(fileStr, fileName, fileLen); + // and that the slashes go a consistent direction + ArUtil::fixSlashes(fileStr, fileLen); + + if (directory == NULL) + myWholeFileName = ""; + else + myWholeFileName = dirStr; + + myWholeFileName += fileStr; + + myIsWaitingForReturn = true; + myLastStartedSend.setToNow(); + if (dirStr != NULL) + delete[] dirStr; + if (fileStr != NULL) + delete[] fileStr; + + ArNetPacket sendPacket; + + FILE *file; + if ((file = ArUtil::fopen(myClientFileName.c_str(), "rb")) == NULL) + { + ArLog::log(ArLog::Normal, + "ArClientFileFromClient::putFile: can't open file '%s'", + clientFileName); + myIsWaitingForReturn = false; + myDataMutex.unlock(); + return false; + } + myDataMutex.unlock(); + // tell the server we're sending + + sendPacket.empty(); + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(myWholeFileName.c_str()); + + if (myTimestamp) { + + struct stat fileStat; + time_t timestamp; + + if (stat(myWholeFileName.c_str(), &fileStat) == 0) { + timestamp = fileStat.st_mtime; + } + else { + time(×tamp); + } + + sendPacket.byte4ToBuf(timestamp); + + } // end if timestamp + + myClient->requestOnce(myCommandName.c_str(), &sendPacket); + ArLog::log(ArLog::Normal, "Starting send of file %s", + myWholeFileName.c_str()); + + char buf[30000]; + size_t ret; + + ArTime started; + started.setToNow(); + + // now send the file + while ((ret = fread(buf, 1, sizeof(buf), file)) == sizeof(buf)) + { + // if we're interleaved wait for the next packet + if (interleaved) + { + myDataMutex.lock(); + + // myReadyForNextPacket is set to true when the response is received + // from the server. + while (!myReadyForNextPacket) + { + if (!myIsWaitingForReturn) + { + ArLog::log(ArLog::Normal, + "ArFileFromClient::putFileToDirectory: Put was cancelled or failed."); + myDataMutex.unlock(); + return false; + } + myDataMutex.unlock(); + ArUtil::sleep(1); + + if (started.secSince() > 30) + { + myDataMutex.lock(); + myIsWaitingForReturn = false; + myDataMutex.unlock(); + + ArLog::log(ArLog::Normal, + "ArFileFromClient::putFileToDirectory: No return from client within 30 seconds, failing put."); + return false; + } + myDataMutex.lock(); + + } // end while not ready for next packet + + // Reset the flag so we'll wait for a response during the next loop iteration. + myReadyForNextPacket = false; + + myDataMutex.unlock(); + + } // end if interleaved + + // Reset the time this packet was sent. + started.setToNow(); + + sendPacket.empty(); + sendPacket.uByte2ToBuf(1); + sendPacket.strToBuf(myWholeFileName.c_str()); + sendPacket.uByte4ToBuf(ret); + sendPacket.dataToBuf(buf, ret); + myClient->requestOnce(myCommandName.c_str(), &sendPacket); + //ArLog::log(ArLog::Normal, "Sent packet with %d", ret); + + } // end while more to read... + + if (feof(file)) + { + //printf("end of file\n"); + } + if (ferror(file)) + { + ArLog::log(ArLog::Normal, "ArServerFileFromClient: Error sending file %s", + fileName); + sendPacket.empty(); + sendPacket.uByte2ToBuf(3); + sendPacket.strToBuf(myWholeFileName.c_str()); + myClient->requestOnce(myCommandName.c_str(), &sendPacket); + myDataMutex.lock(); + myIsWaitingForReturn = false; + myDataMutex.unlock(); + return false; + } + + sendPacket.empty(); + sendPacket.uByte2ToBuf(1); + sendPacket.strToBuf(myWholeFileName.c_str()); + sendPacket.uByte4ToBuf(ret); + sendPacket.dataToBuf(buf, ret); + myClient->requestOnce(myCommandName.c_str(), &sendPacket); + //ArLog::log(ArLog::Verbose, "Sent packet with %d", ret); + + + sendPacket.empty(); + sendPacket.uByte2ToBuf(2); + sendPacket.strToBuf(myWholeFileName.c_str()); + myClient->requestOnce(myCommandName.c_str(), &sendPacket); + + if (feof(file)) + { + ArLog::log(ArLog::Normal, "ArServerFileToClient: Sent file %s", fileName); + } + + fclose(file); + return true; +} + +AREXPORT void ArClientFileFromClient::netPutFile(ArNetPacket *packet) +{ + int ret = 0; + bool done = false; + char fileName[2048]; + + myDataMutex.lock(); + if (!myIsWaitingForReturn) + { + myDataMutex.unlock(); + return; + } + ret = packet->bufToUByte2(); + packet->bufToStr(fileName, sizeof(fileName)); + if (myInterleaved && ret == 10) + { + done = false; + myReadyForNextPacket = true; + } + else + { + done = true; + myIsWaitingForReturn = false; + } + myDataMutex.unlock(); + if (done) + callFileSentCallbacks(ret); +} + + +AREXPORT void ArClientFileFromClient::addFileSentCallback( + ArFunctor1 *functor, ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myFileSentCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myFileSentCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientFileFromClient::addUpdateCallback: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientFileFromClient::remFileSentCallback( + ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + myFileSentCallbacks.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientFileFromClient::callFileSentCallbacks(int val) +{ + std::list *>::iterator it; + myCallbackMutex.lock(); + for (it = myFileSentCallbacks.begin(); it != myFileSentCallbacks.end(); it++) + (*it)->invoke(val); + myCallbackMutex.unlock(); +} + +AREXPORT const char *ArClientFileFromClient::getDirectory(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myDirectory; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT const char *ArClientFileFromClient::getFileName(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myFileName; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT const char *ArClientFileFromClient::getClientFileName(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myClientFileName; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT void ArClientFileFromClient::cancelPut(void) +{ + ArNetPacket sendPacket; + + myDataMutex.lock(); + if (myIsWaitingForReturn) + { + myIsWaitingForReturn = false; + + sendPacket.uByte2ToBuf(3); + sendPacket.strToBuf(myWholeFileName.c_str()); + myClient->requestOnce(myCommandName.c_str(), &sendPacket); + } + myDataMutex.unlock(); +} + +AREXPORT bool ArClientFileFromClient::isWaitingForReturn(void) +{ + bool ret; + myDataMutex.lock(); + ret = myIsWaitingForReturn; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArTime ArClientFileFromClient::getLastCompletedSend(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastCompletedSend; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArTime ArClientFileFromClient::getLastStartedSend(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastStartedSend; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArClientDeleteFileOnServer::ArClientDeleteFileOnServer( + ArClientBase *client) : + myDeleteFileCB(this, &ArClientDeleteFileOnServer::netDeleteFile) +{ + myDataMutex.setLogName("ArClientDeleteFileOnServer::myDataMutex"); + myCallbackMutex.setLogName("ArClientDeleteFileOnServer::myCallbackMutex"); + myClient = client; + myClient->addHandler("deleteFile", &myDeleteFileCB); + myIsWaitingForReturn = false; +} + +AREXPORT ArClientDeleteFileOnServer::~ArClientDeleteFileOnServer() +{ + +} + +AREXPORT bool ArClientDeleteFileOnServer::isAvailable(void) +{ + return myClient->dataExists("deleteFile"); +} + +AREXPORT bool ArClientDeleteFileOnServer::deleteFileFromDirectory( + const char *directory, const char *fileName) +{ + myDataMutex.lock(); + if (fileName == NULL || fileName[0] == '\0') + { + ArLog::log(ArLog::Terse, + "ArClientDeleteFileOnServer: NULL or empty fileName ('%s')", + fileName); + myDataMutex.unlock(); + return false; + } + if (!isAvailable()) + { + ArLog::log(ArLog::Normal, "ArClientDeleteFileOnServer::deleteFileFromDirectory: Tried to delete file but the server doesn't support it."); + return false; + } + + if (myIsWaitingForReturn) + { + ArLog::log(ArLog::Terse, + "ArClientDeleteFileOnServer: already busy deleting a file '%s' cannot delete '%s'", + myFileName.c_str(), fileName); + myDataMutex.unlock(); + return false; + } + if (directory != NULL) + myDirectory = directory; + else + myDirectory = ""; + myFileName = fileName; + + char *dirStr = NULL; + int dirLen; + if (directory != NULL) + { + dirLen = strlen(directory) + 2; + dirStr = new char[dirLen]; + strncpy(dirStr, directory, dirLen); + // make sure it has a slash + ArUtil::appendSlash(dirStr, dirLen); + // and that the slashes go a consistent direction + ArUtil::fixSlashes(dirStr, dirLen); + } + + int fileLen = strlen(fileName) + 1; + char *fileStr = new char[fileLen]; + strncpy(fileStr, fileName, fileLen); + // and that the slashes go a consistent direction + ArUtil::fixSlashes(fileStr, fileLen); + + if (directory == NULL) + myWholeFileName = ""; + else + myWholeFileName = dirStr; + + myWholeFileName += fileStr; + + myIsWaitingForReturn = true; + myLastStartedSend.setToNow(); + if (dirStr != NULL) + delete[] dirStr; + if (fileStr != NULL) + delete[] fileStr; + + ArNetPacket sendPacket; + + myDataMutex.unlock(); + // tell the server to delete it + + sendPacket.empty(); + sendPacket.strToBuf(myWholeFileName.c_str()); + myClient->requestOnce("deleteFile", &sendPacket); + ArLog::log(ArLog::Normal, "Requested delete of file %s", + myWholeFileName.c_str()); + return true; +} + +AREXPORT void ArClientDeleteFileOnServer::netDeleteFile(ArNetPacket *packet) +{ + int ret; + char fileName[2048]; + + myDataMutex.lock(); + if (!myIsWaitingForReturn) + { + myDataMutex.unlock(); + return; + } + ret = packet->bufToUByte2(); + packet->bufToStr(fileName, sizeof(fileName)); + //printf("Ret of '%s' is %d\n", fileName, ret); + myIsWaitingForReturn = 0; + myDataMutex.unlock(); + callFileDeletedCallbacks(ret); +} + + +AREXPORT void ArClientDeleteFileOnServer::addFileDeletedCallback( + ArFunctor1 *functor, ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myFileDeletedCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myFileDeletedCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientDeleteFileOnServer::addUpdateCallback: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientDeleteFileOnServer::remFileDeletedCallback( + ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + myFileDeletedCallbacks.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientDeleteFileOnServer::callFileDeletedCallbacks(int val) +{ + std::list *>::iterator it; + + myCallbackMutex.lock(); + for (it = myFileDeletedCallbacks.begin(); + it != myFileDeletedCallbacks.end(); + it++) + (*it)->invoke(val); + myCallbackMutex.unlock(); +} + +AREXPORT const char *ArClientDeleteFileOnServer::getDirectory(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myDirectory; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT const char *ArClientDeleteFileOnServer::getFileName(void) +{ + std::string ret; + myDataMutex.lock(); + ret = myFileName; + myDataMutex.unlock(); + return ret.c_str(); +} + +AREXPORT bool ArClientDeleteFileOnServer::isWaitingForReturn(void) +{ + bool ret; + myDataMutex.lock(); + ret = myIsWaitingForReturn; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArTime ArClientDeleteFileOnServer::getLastCompletedSend(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastCompletedSend; + myDataMutex.unlock(); + return ret; +} + +AREXPORT ArTime ArClientDeleteFileOnServer::getLastStartedSend(void) +{ + ArTime ret; + myDataMutex.lock(); + ret = myLastStartedSend; + myDataMutex.unlock(); + return ret; +} + diff --git a/Legacy/Aria/ArNetworking/src/ArClientHandlerConfig.cpp b/Legacy/Aria/ArNetworking/src/ArClientHandlerConfig.cpp new file mode 100644 index 0000000..20bb5db --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientHandlerConfig.cpp @@ -0,0 +1,1139 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArClientHandlerConfig.h" +#include "ArClientArgUtils.h" + +//#define ARDEBUG_CLIENTHANDLERCONFIG + +#if (defined(_DEBUG) && defined(ARDEBUG_CLIENTHANDLERCONFIG)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +/** + @param client the client base to attach to + @param ignoreBounds whether the ArConfig we have should ignore bounds or not, this should only be used for debugging + @param robotName a name or identifier for the robot the server is controlling, used for logging etc. +*/ +AREXPORT ArClientHandlerConfig::ArClientHandlerConfig(ArClientBase *client, + bool ignoreBounds, + const char *robotName, + const char *logPrefix) : + myRobotName((robotName != NULL) ? robotName : ""), + myLogPrefix((logPrefix != NULL) ? logPrefix : ""), + + myGotConfigCBList(), + mySaveConfigSucceededCBList(), + mySaveConfigFailedCBList(), + myGotConfigDefaultsCBList(), + myGotLastEditablePriorityCBList(), + + myClient(client), + + myConfig(NULL, + false, + ignoreBounds), + myDefaultConfig(NULL), + myLastEditablePriority(ArPriority::LAST_PRIORITY), + + myDataMutex(), + myCallbackMutex(), + + myHaveRequestedLastEditablePriority(false), + myHaveGottenLastEditablePriority(false), + myHaveRequestedConfig(false), + myHaveGottenConfig(false), + myHaveRequestedDefaults(false), + myHaveGottenDefaults(false), + myHaveRequestedDefaultCopy(false), + + myIsQuiet(false), + + myHandleGetConfigBySectionsV3CB + (this, &ArClientHandlerConfig::handleGetConfigBySectionsV3), + myHandleGetConfigBySectionsV2CB + (this, &ArClientHandlerConfig::handleGetConfigBySectionsV2), + myHandleGetConfigBySectionsCB + (this, &ArClientHandlerConfig::handleGetConfigBySections), + myHandleGetConfigCB(this, &ArClientHandlerConfig::handleGetConfig), + myHandleSetConfigCB(this, &ArClientHandlerConfig::handleSetConfig), + myHandleSetConfigBySectionsCB(this, &ArClientHandlerConfig::handleSetConfigBySections), + myHandleSetConfigBySectionsV2CB(this, &ArClientHandlerConfig::handleSetConfigBySectionsV2), + myHandleGetConfigDefaultsCB + (this, &ArClientHandlerConfig::handleGetConfigDefaults), + myHandleGetConfigSectionFlagsCB + (this, &ArClientHandlerConfig::handleGetConfigSectionFlags), + myHandleGetLastEditablePriorityCB + (this, &ArClientHandlerConfig::handleGetLastEditablePriority) + +{ + myDataMutex.setLogName("ArClientConfigHandler::myDataMutex"); + myCallbackMutex.setLogName("ArClientConfigHandler::myCallbackMutex"); + + if ((logPrefix == NULL) && !myRobotName.empty()) { + myLogPrefix = myRobotName + ": "; + } + + myConfig.setConfigName("Server", myRobotName.c_str()); + +} + +AREXPORT ArClientHandlerConfig::~ArClientHandlerConfig() +{ + if (myDefaultConfig != NULL) + delete myDefaultConfig; +} + +/** + This requests the config from the server. The handler's internal state is + reset to indicate that the config hasn't been received. + + If the server supports editable priority levels and the client wishes to + receive parameters of ineditable priorities, then the method + requestLastEditablePriority should be called (and completed) before + requestConfigFromServer is called. + **/ +AREXPORT void ArClientHandlerConfig::requestConfigFromServer(void) +{ + char *getConfigPacketName = "getConfigBySectionsV3"; + bool isInsertPriority = true; + bool isInsertRestartLevel = true; + + ArFunctor1C *getConfigCB = &myHandleGetConfigBySectionsV3CB; + + if (!myClient->dataExists(getConfigPacketName)) { + + getConfigPacketName = "getConfigBySectionsV2"; + getConfigCB = &myHandleGetConfigBySectionsV2CB; + + if (!myClient->dataExists(getConfigPacketName)) { + + getConfigPacketName = "getConfigBySections"; + isInsertRestartLevel = false; + + getConfigCB = &myHandleGetConfigBySectionsCB; + + if (!myClient->dataExists(getConfigPacketName)) { + getConfigPacketName = "getConfig"; + isInsertPriority = false; + + getConfigCB = &myHandleGetConfigCB; + + } // end if packet name does not exist + } // end if + + } // end if packet name does not exist + + char *setConfigPacketName = "setConfigBySectionsV2"; + ArFunctor1C *setConfigCB = &myHandleSetConfigBySectionsV2CB; + + if (!myClient->dataExists(setConfigPacketName)) { + + setConfigPacketName = "setConfigBySections"; + + setConfigCB = &myHandleSetConfigBySectionsCB; + + if (!myClient->dataExists(setConfigPacketName)) { + + setConfigPacketName = "setConfig"; + + setConfigCB = &myHandleSetConfigCB; + + } // end if packet name does not exist + + } // end if packet name does not exist + + myDataMutex.lock(); + ArLog::log(ArLog::Normal, "%sRequesting config from server (with %s, save with %s)", + myLogPrefix.c_str(), getConfigPacketName, setConfigPacketName); + myConfig.clearSections(); + myDataMutex.unlock(); + + myClient->remHandler(getConfigPacketName, getConfigCB); + myClient->addHandler(getConfigPacketName, getConfigCB); + + myClient->remHandler(setConfigPacketName, setConfigCB); + myClient->addHandler(setConfigPacketName, setConfigCB); + + if (myClient->dataExists("getConfigDefaults")) { + myClient->remHandler("getConfigDefaults", &myHandleGetConfigDefaultsCB); + myClient->addHandler("getConfigDefaults", &myHandleGetConfigDefaultsCB); + } + + if (myClient->dataExists("getConfigSectionFlags")) + { + myClient->remHandler("getConfigSectionFlags", + &myHandleGetConfigSectionFlagsCB); + myClient->addHandler("getConfigSectionFlags", + &myHandleGetConfigSectionFlagsCB); + myClient->requestOnce("getConfigSectionFlags"); + } + + bool isInsertLastEditablePriority = true; + if (!myClient->dataExists("getLastEditablePriority")) { + isInsertLastEditablePriority = false; + } + else if (!myHaveGottenLastEditablePriority) { + isInsertLastEditablePriority = false; + ArLog::log(ArLog::Terse, + "%sConfig requested but last editable priority not yet received, using old protocol", + myLogPrefix.c_str()); + } // end else if last editable priority not received + + + if (isInsertPriority) { + ArLog::log(ArLog::Verbose, + "%sRequesting that config has last priority %s", + myLogPrefix.c_str(), + ArPriority::getPriorityName(ArPriority::LAST_PRIORITY)); + + ArNetPacket packet; + packet.byteToBuf(ArPriority::LAST_PRIORITY); + + if (isInsertLastEditablePriority) { + ArLog::log(ArLog::Verbose, + "%sRequesting that config has last editable priority %s", + myLogPrefix.c_str(), + ArPriority::getPriorityName(myLastEditablePriority)); + packet.byteToBuf(myLastEditablePriority); + } + + myClient->requestOnce(getConfigPacketName, &packet); + } + else { // don't insert priority + myClient->requestOnce(getConfigPacketName); + } // end else don't insert priority + + myDataMutex.lock(); + myHaveGottenConfig = false; + myDataMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::handleGetConfigBySectionsV3(ArNetPacket *packet) +{ + handleGetConfigData(packet, true, 3); +} + +AREXPORT void ArClientHandlerConfig::handleGetConfigBySectionsV2(ArNetPacket *packet) +{ + handleGetConfigData(packet, true, 2); +} + +AREXPORT void ArClientHandlerConfig::handleGetConfigBySections(ArNetPacket *packet) +{ + handleGetConfigData(packet, true, 1); +} + +AREXPORT void ArClientHandlerConfig::handleGetConfig(ArNetPacket *packet) +{ + handleGetConfigData(packet, false, 0); +} + +AREXPORT void ArClientHandlerConfig::handleGetConfigData(ArNetPacket *packet, + bool isMultiplePackets, + int version) +{ + char name[32000]; + char comment[32000]; + char categoryName[512]; + + char type; + std::string section; + + // The multiple packets method also sends display hints with the parameters; + // the old single packet method does not. + ArClientArg clientArg(isMultiplePackets, + ArPriority::LAST_PRIORITY, + version); + bool isEmptyPacket = true; + + myDataMutex.lock(); + + while (packet->getDataReadLength() < packet->getDataLength()) + { + isEmptyPacket = false; + + type = packet->bufToByte(); + + if (type == 'S') + { + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(comment, sizeof(comment)); + + if (version >= 2) { + packet->bufToStr(categoryName, sizeof(categoryName)); + int index = 1; + + if (version >= 3) { + + index = packet->bufToUByte2(); + } + if (index <= 1) { + ArLog::log(ArLog::Verbose, "%sReceiving config section %s, %s...", + myLogPrefix.c_str(), categoryName, name); + + myConfig.addSection(categoryName, name, comment); + } + else { + ArLog::log(ArLog::Verbose, "%sAppending to config section %s, %s (packet %i)...", + myLogPrefix.c_str(), categoryName, name, index); + + } + } + else { + ArLog::log(ArLog::Verbose, "%sReceiving config section %s...", + myLogPrefix.c_str(), name); + myConfig.setSectionComment(name, comment); + } + //printf("%c %s %s\n", type, name, comment); + + + + section = name; + + } + else if (type == 'P') + { + ArConfigArg configArg; + + bool isSuccess = clientArg.createArg(packet, + configArg); + + if (isSuccess) { + myConfig.addParamAsIs(configArg, + section.c_str()); + } + else + { + ArLog::log(ArLog::Terse, "ArClientHandlerConfig unknown param type"); + } + } + else // unrecognized header + { + ArLog::log(ArLog::Terse, "ArClientHandlerConfig unknown type"); + } + + } // end while more to read + + if (!isMultiplePackets || isEmptyPacket) { + + ArLog::log(ArLog::Normal, "%sGot config from server.", myLogPrefix.c_str()); + + // KMC 1/22/13 To only log some of the config, substitute the commented + // lines below for the following config->log statement. + IFDEBUG(myConfig.log()); + /*** + std::list sectionNameList; + sectionNameList.push_back("Data Log Settings"); + IFDEBUG(myConfig.log(false, §ionNameList, myLogPrefix.c_str())); + ****/ + + myHaveGottenConfig = true; + } + + myDataMutex.unlock(); + + + + if (myHaveGottenConfig) { + + myCallbackMutex.lock(); + + for (std::list::iterator it = myGotConfigCBList.begin(); + it != myGotConfigCBList.end(); + it++) { + (*it)->invoke(); + } + myCallbackMutex.unlock(); + + } // end if config received + +} // end method handleGetConfigData + +AREXPORT void ArClientHandlerConfig::handleGetConfigSectionFlags( + ArNetPacket *packet) +{ + int numSections = packet->bufToByte4(); + + int i; + + char section[32000]; + char flags[32000]; + + myDataMutex.lock(); + for (i = 0; i < numSections; i++) + { + packet->bufToStr(section, sizeof(section)); + packet->bufToStr(flags, sizeof(flags)); + myConfig.addSectionFlags(section, flags); + } + myDataMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::saveConfigToServer(void) +{ + saveConfigToServer(&myConfig); +} + +AREXPORT void ArClientHandlerConfig::saveConfigToServer( + ArConfig *config, + const std::set *ignoreTheseSections) +{ + //ArConfigArg param; + ArClientArg clientArg; + + bool isMultiplePackets = true; + int version = 2; + char *setConfigPacketName = "setConfigBySectionsV2"; + if (!myClient->dataExists(setConfigPacketName)) { + + setConfigPacketName = "setConfigBySections"; + version = 1; + + if (!myClient->dataExists(setConfigPacketName)) { + version = 0; + isMultiplePackets = false; + setConfigPacketName = "setConfig"; + } + } + + ArNetPacket sending; + ArLog::log(ArLog::Normal, + "%sSaving config to server (with %s)", + myLogPrefix.c_str(), setConfigPacketName); + + + // KMC 1/22/13 To only log some of the config, substitute the commented + // lines below for the following config->log statement. + IFDEBUG(config->log(false, NULL, myLogPrefix.c_str())); + /*** + std::list sectionNameList; + sectionNameList.push_back("Data Log Settings"); + IFDEBUG(config->log(false, §ionNameList, myLogPrefix.c_str())); + ***/ + + + myDataMutex.lock(); + bool isSuccess = true; + std::list *sections = config->getSections(); + for (std::list::iterator sIt = sections->begin(); + (isSuccess && (sIt != sections->end())); + sIt++) + { + ArConfigSection *section = (*sIt); + // if we're ignoring sections and we're ignoring this one, then + // don't send it + if (ignoreTheseSections != NULL && + (ignoreTheseSections->find(section->getName()) != + ignoreTheseSections->end())) + { + ArLog::log(ArLog::Verbose, "Not sending section %s", + section->getName()); + continue; + } + sending.strToBuf("Section"); + sending.strToBuf(section->getName()); + std::list *params = section->getParams(); + + for (std::list::iterator pIt = params->begin(); + pIt != params->end(); + pIt++) + { + ArConfigArg ¶m = (*pIt); + + if (!clientArg.isSendableParamType(param)) { + continue; + } + + clientArg.addArgTextToPacket(param, &sending); + + //sending.strToBuf(param.getName()); + + //clientArg.argTextToBuf(param, &sending); + + } // end for each param + + if (isMultiplePackets) { + + if (!myClient->requestOnce(setConfigPacketName, &sending)) { + + isSuccess = false; + break; + + } + // Empty the packet so that the next section can be sent + sending.empty(); + + } // end if send multiple packets + + } // end for each section + + myDataMutex.unlock(); + + if (isMultiplePackets) { + // Send an empty packet to indicate the end of the config + ArNetPacket emptyPacket; + if (!myClient->requestOnce(setConfigPacketName, &emptyPacket)) { + isSuccess = false; + } + else { + ArLog::log(ArLog::Normal, + "ArClientHandlerConfig sent empty packet"); + } + } + else { + if (!myClient->requestOnce(setConfigPacketName, &sending)) { + isSuccess = false; + } + } + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sclient request to %s failed, invoking callbacks", + myLogPrefix.c_str(), setConfigPacketName); + for (std::list *>::iterator it = mySaveConfigFailedCBList.begin(); + it != mySaveConfigFailedCBList.end(); + it++) { + (*it)->invoke(); + } + } +} + +AREXPORT void ArClientHandlerConfig::handleSetConfig(ArNetPacket *packet) +{ + char buffer[1024]; + packet->bufToStr(buffer, sizeof(buffer)); + + myCallbackMutex.lock(); + if (buffer[0] == '\0') + { + ArLog::log(ArLog::Normal, "%sSaved config to server successfully", myLogPrefix.c_str()); + std::list::iterator it; + for (it = mySaveConfigSucceededCBList.begin(); + it != mySaveConfigSucceededCBList.end(); + it++) + (*it)->invoke(); + } + else + { + ArLog::log(ArLog::Normal, "%sSaving config to server had error: %s", myLogPrefix.c_str(), buffer); + std::list *>::iterator it; + for (it = mySaveConfigFailedCBList.begin(); + it != mySaveConfigFailedCBList.end(); + it++) + (*it)->invoke(buffer); + } + myCallbackMutex.unlock(); +} + +/// Handles the return packet from the setConfig (saveConfigToServer) +AREXPORT void ArClientHandlerConfig::handleSetConfigBySections(ArNetPacket *packet) +{ + char buffer[1024]; + packet->bufToStr(buffer, sizeof(buffer)); + + myCallbackMutex.lock(); + if (buffer[0] == '\0') + { + ArLog::log(ArLog::Normal, "%sSaved config to server successfully", myLogPrefix.c_str()); + std::list::iterator it; + for (it = mySaveConfigSucceededCBList.begin(); + it != mySaveConfigSucceededCBList.end(); + it++) + (*it)->invoke(); + } + else + { + ArLog::log(ArLog::Normal, "%sSaving config to server had error: %s", myLogPrefix.c_str(), buffer); + std::list *>::iterator it; + for (it = mySaveConfigFailedCBList.begin(); + it != mySaveConfigFailedCBList.end(); + it++) + (*it)->invoke(buffer); + } + myCallbackMutex.unlock(); +} + +/// Handles the return packet from the setConfig (saveConfigToServer) +AREXPORT void ArClientHandlerConfig::handleSetConfigBySectionsV2(ArNetPacket *packet) +{ + IFDEBUG(ArLog::log(ArLog::Normal, + "ArClientHandlerConfig::handleSetConfigBySectionsV2()")); + + char sectionBuffer[1024]; + char errorBuffer[1024]; + + packet->bufToStr(sectionBuffer, sizeof(sectionBuffer)); + packet->bufToStr(errorBuffer, sizeof(errorBuffer)); + + if (sectionBuffer[0] == '\0') { + myCallbackMutex.lock(); + if (errorBuffer[0] == '\0') + { + ArLog::log(ArLog::Normal, "%sSaved config to server successfully", myLogPrefix.c_str()); + std::list::iterator it; + for (it = mySaveConfigSucceededCBList.begin(); + it != mySaveConfigSucceededCBList.end(); + it++) + (*it)->invoke(); + } + else + { + ArLog::log(ArLog::Normal, "%sSaving config to server had error: %s", myLogPrefix.c_str(), errorBuffer); + std::list *>::iterator it; + for (it = mySaveConfigFailedCBList.begin(); + it != mySaveConfigFailedCBList.end(); + it++) + (*it)->invoke(errorBuffer); + } + myCallbackMutex.unlock(); + } + else { + myCallbackMutex.lock(); + if (errorBuffer[0] == '\0') + { + ArLog::log(ArLog::Normal, "%sSaved config section %s to server successfully", + myLogPrefix.c_str(), + sectionBuffer); + /*** + std::list::iterator it; + for (it = mySaveConfigSucceededCBList.begin(); + it != mySaveConfigSucceededCBList.end(); + it++) + (*it)->invoke(); + **/ + } + else + { + ArLog::log(ArLog::Normal, "%sSaving config to server had error: %s", myLogPrefix.c_str(), errorBuffer); + std::list *>::iterator it; + for (it = mySaveConfigFailedCBList.begin(); + it != mySaveConfigFailedCBList.end(); + it++) + (*it)->invoke(errorBuffer); + } + myCallbackMutex.unlock(); + } +} + + +AREXPORT void ArClientHandlerConfig::reloadConfigOnServer(void) +{ + myClient->requestOnce("reloadConfig"); +} + +/** + This will get the config, note, it gets the config we're using, so + if you change something while data comes in things will get broken + **/ +AREXPORT ArConfig *ArClientHandlerConfig::getConfig(void) +{ + return &myConfig; +} + +/** + * Returns a pointer to the robot server's default configuration, if + * canRequestDefaults() is true. Note that both requestConfigFromServer() + * and then requestDefaultConfigFromServer() must be called before a + * valid default configuration is available on the client. + * If there is no default configuration, then NULL is returned. +**/ +AREXPORT ArConfig *ArClientHandlerConfig::getDefaultConfig(void) +{ + return myDefaultConfig; +} + +/** + This will get a copy of the config, you can use this with the + safeConfigToServer that takes an argument + **/ +AREXPORT ArConfig ArClientHandlerConfig::getConfigCopy(void) +{ + ArConfig copy; + myDataMutex.lock(); + copy = myConfig; + myDataMutex.unlock(); + return copy; +} + +AREXPORT int ArClientHandlerConfig::lock(void) +{ + return myDataMutex.lock(); +} + +AREXPORT int ArClientHandlerConfig::tryLock(void) +{ + return myDataMutex.tryLock(); +} + +AREXPORT int ArClientHandlerConfig::unlock(void) +{ + return myDataMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; + myConfig.setQuiet(isQuiet); + if (myDefaultConfig != NULL) { + myDefaultConfig->setQuiet(isQuiet); + } + +} + +AREXPORT bool ArClientHandlerConfig::haveGottenConfig(void) +{ + bool ret; + myDataMutex.lock(); + ret = myHaveGottenConfig; + myDataMutex.unlock(); + return ret; +} + +AREXPORT void ArClientHandlerConfig::addGotConfigCB(ArFunctor *functor, + ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myGotConfigCBList.push_front(functor); + else if (position == ArListPos::LAST) + myGotConfigCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientHandlerConfig::addGotConfigCB: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::remGotConfigCB(ArFunctor *functor) +{ + myCallbackMutex.lock(); + myGotConfigCBList.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::addSaveConfigSucceededCB( + ArFunctor *functor, ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + mySaveConfigSucceededCBList.push_front(functor); + else if (position == ArListPos::LAST) + mySaveConfigSucceededCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientHandlerConfig::addSaveConfigSucceededCB: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::remSaveConfigSucceededCB(ArFunctor *functor) +{ + myCallbackMutex.lock(); + mySaveConfigSucceededCBList.remove(functor); + myCallbackMutex.unlock(); +} + + +AREXPORT void ArClientHandlerConfig::addSaveConfigFailedCB( + ArFunctor1 *functor, ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + mySaveConfigFailedCBList.push_front(functor); + else if (position == ArListPos::LAST) + mySaveConfigFailedCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientHandlerConfig::addSaveConfigFailedCB: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::remSaveConfigFailedCB(ArFunctor1 *functor) +{ + myCallbackMutex.lock(); + mySaveConfigFailedCBList.remove(functor); + myCallbackMutex.unlock(); +} + + +AREXPORT void ArClientHandlerConfig::addGotConfigDefaultsCB( + ArFunctor *functor, ArListPos::Pos position) +{ + myCallbackMutex.lock(); + if (position == ArListPos::FIRST) + myGotConfigDefaultsCBList.push_front(functor); + else if (position == ArListPos::LAST) + myGotConfigDefaultsCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArClientHandlerConfig::addGotConfigDefaultsCB: Invalid position."); + myCallbackMutex.unlock(); +} + +AREXPORT void ArClientHandlerConfig::remGotConfigDefaultsCB(ArFunctor *functor) +{ + myCallbackMutex.lock(); + myGotConfigDefaultsCBList.remove(functor); + myCallbackMutex.unlock(); +} + +AREXPORT bool ArClientHandlerConfig::haveRequestedDefaults(void) +{ + bool ret; + myDataMutex.lock(); + ret = myHaveRequestedDefaults || myHaveRequestedDefaultCopy; + myDataMutex.unlock(); + return ret; +} + +AREXPORT bool ArClientHandlerConfig::haveGottenDefaults(void) +{ + bool ret; + myDataMutex.lock(); + ret = myHaveGottenDefaults; + myDataMutex.unlock(); + return ret; +} + +AREXPORT bool ArClientHandlerConfig::canRequestDefaults(void) +{ + return myClient->dataExists("getConfigDefaults"); +} + +AREXPORT bool ArClientHandlerConfig::requestConfigDefaults(void) +{ + if (haveRequestedDefaults()) + { + ArLog::log(ArLog::Normal, + "%sRequestConfigDefaults: Cannot request defaults as there are already some being requested", + myLogPrefix.c_str()); + return false; + } + if (!canRequestDefaults()) + { + ArLog::log(ArLog::Normal, + "%sRequestConfigDefaults: Defaults requested but not available", + myLogPrefix.c_str()); + return false; + } + + ArLog::log(ArLog::Normal, + "%sRequesting config reset to default", + myLogPrefix.c_str()); + + myDataMutex.lock(); + myHaveRequestedDefaults = true; + myHaveGottenDefaults = false; + myHaveRequestedDefaultCopy = false; + myDataMutex.unlock(); + + myClient->requestOnce("getConfigDefaults"); + return true; +} + +AREXPORT bool ArClientHandlerConfig::requestDefaultConfigFromServer(void) +{ + if (haveRequestedDefaults()) + { + ArLog::log(ArLog::Normal, + "%requestDefaultConfigFromServer: Cannot request defaults as there are already some being requested", + myLogPrefix.c_str()); + return false; + } + if (!canRequestDefaults()) + { + ArLog::log(ArLog::Normal, + "%sRequestConfigDefaults: Defaults requested but not available", + myLogPrefix.c_str()); + return false; + } + + + myDataMutex.lock(); + + myHaveRequestedDefaults = false; + myHaveGottenDefaults = false; + myHaveRequestedDefaultCopy = true; + myDataMutex.unlock(); + + myClient->requestOnce("getConfigDefaults"); + return true; +} + +AREXPORT bool ArClientHandlerConfig::requestSectionDefaults( + const char *section) +{ + if (haveRequestedDefaults()) + { + ArLog::log(ArLog::Normal, + "RequestSectionDefaults: Cannot request defaults as there are already some being requested"); + return false; + } + if (!canRequestDefaults()) + { + ArLog::log(ArLog::Normal, + "%sRequestSectionDefaults: Defaults requested but not available", + myLogPrefix.c_str()); + return false; + } + myDataMutex.lock(); + if (myConfig.findSection(section) == NULL) + { + ArLog::log(ArLog::Normal, + "%sRequestSectionDefaults: Section '%s' requested but doesn't exist", + myLogPrefix.c_str(), section); + myDataMutex.unlock(); + return false; + } + + ArLog::log(ArLog::Normal, + "%sRequesting config section %s reset to default", + myLogPrefix.c_str(), + section); + + myHaveRequestedDefaults = true; + myHaveGottenDefaults = false; + myHaveRequestedDefaultCopy = false; + myDataMutex.unlock(); + myClient->requestOnceWithString("getConfigDefaults", section); + return true; +} + + + +AREXPORT void ArClientHandlerConfig::handleGetConfigDefaults( + ArNetPacket *packet) +{ + ArLog::log(ArLog::Normal, "%sreceived default config %s", + myLogPrefix.c_str(), + ((myHaveRequestedDefaultCopy) ? "(copy)" : "(reset)")); + + char param[1024]; + char argument[1024]; + char errorBuffer[1024]; + + myDataMutex.lock(); + + ArConfig *config = NULL; + + // If the config (or a section) is being reset to its default values, + // then we don't want to remove any parameters that are not set -- i.e. + // any parameters that are not contained in the default config. + bool isClearUnsetValues = false; + + if (myHaveRequestedDefaults) { + + config = &myConfig; + } + else if (myHaveRequestedDefaultCopy) { + + // If we have requested a copy of the default configuration, then we + // will want to remove any parameters that haven't been explicitly set. + // (This is because of the next line, which copies the current config + // to the default config.) + isClearUnsetValues = true; + + // The default config is transmitted in an "abbreviated" form -- just + // the section/param names and values. Copy the current config to the + // default before processing the packet so that the parameter types, etc. + // can be preserved. + if (myDefaultConfig == NULL) { + myDefaultConfig = new ArConfig(myConfig); + myDefaultConfig->setConfigName("Default", myRobotName.c_str()); + myDefaultConfig->setQuiet(myIsQuiet); + } + else { + *myDefaultConfig = myConfig; + } + + + config = myDefaultConfig; + } + // if we didn't ask for any of these, then just return since the + // data is for someone else + else + { + myDataMutex.unlock(); + return; + } + + if (config == NULL) { + ArLog::log(ArLog::Normal, + "%serror determining config to populate with default values", + myLogPrefix.c_str()); + myDataMutex.unlock(); + return; + } + + ArArgumentBuilder *builder = NULL; + ArLog::log(ArLog::Normal, "%sGot defaults", myLogPrefix.c_str()); + errorBuffer[0] = '\0'; + + //myDataMutex.lock(); + if (isClearUnsetValues) { + config->clearAllValueSet(); + } + + while (packet->getDataReadLength() < packet->getDataLength()) + { + packet->bufToStr(param, sizeof(param)); + packet->bufToStr(argument, sizeof(argument)); + + + builder = new ArArgumentBuilder; + builder->setQuiet(myIsQuiet); + builder->setExtraString(param); + builder->add(argument); + + if ((strcasecmp(param, "Section") == 0 && + !config->parseSection(builder, errorBuffer, sizeof(errorBuffer))) || + (strcasecmp(param, "Section") != 0 && + !config->parseArgument(builder, errorBuffer, sizeof(errorBuffer)))) + { + ArLog::log(ArLog::Terse, "%shandleGetConfigDefaults: Hideous problem getting defaults, couldn't parse '%s %s'", + myLogPrefix.c_str(), param, argument); + } + else { + IFDEBUG(if (strlen(param) > 0) { + ArLog::log(ArLog::Normal, "%shandleGetConfigDefaults: added default '%s %s'", + myLogPrefix.c_str(), param, argument); } ); + } + delete builder; + builder = NULL; + } + myHaveRequestedDefaults = false; + myHaveRequestedDefaultCopy = false; + myHaveGottenDefaults = true; + + if (isClearUnsetValues) { + config->removeAllUnsetValues(); + } + + IFDEBUG(config->log()); + + myDataMutex.unlock(); + + myCallbackMutex.lock(); + std::list::iterator it; + for (it = myGotConfigDefaultsCBList.begin(); + it != myGotConfigDefaultsCBList.end(); + it++) + (*it)->invoke(); + myCallbackMutex.unlock(); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Last Editable Priority +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +AREXPORT bool ArClientHandlerConfig::requestLastEditablePriorityFromServer() +{ + if (myClient->dataExists("getLastEditablePriority")) { + + myClient->remHandler("getLastEditablePriority", &myHandleGetLastEditablePriorityCB); + myClient->addHandler("getLastEditablePriority", &myHandleGetLastEditablePriorityCB); + myClient->requestOnce("getLastEditablePriority"); + + myDataMutex.lock(); + myHaveRequestedLastEditablePriority = true; + myHaveGottenLastEditablePriority = false; + myDataMutex.unlock(); + + ArLog::log(ArLog::Normal, "%sRequesting last editable priority", + myLogPrefix.c_str()); + + return true; + } + else { // server does not support last editable priority + + ArLog::log(ArLog::Normal, "%sserver does not support last editable priority", + myLogPrefix.c_str()); + return false; + + } // end else server does not support last editable priority + +} // end method requestLastEditablePriorityFromServer + +AREXPORT bool ArClientHandlerConfig::isLastEditablePriorityAvailable() +{ + if ((myClient != NULL) && + (myClient->dataExists("getLastEditablePriority"))) { + return true; + } + else { + return false; + } +} + +AREXPORT bool ArClientHandlerConfig::haveGottenLastEditablePriority() +{ + myDataMutex.lock(); + bool b = myHaveGottenLastEditablePriority; + myDataMutex.unlock(); + + return b; + +} // end method haveGottenLastEditablePriority + +AREXPORT ArPriority::Priority ArClientHandlerConfig::getLastEditablePriority() +{ + myDataMutex.lock(); + ArPriority::Priority p = myLastEditablePriority; + myDataMutex.unlock(); + + return p; + +} // end method getLastEditablePriority + +AREXPORT void ArClientHandlerConfig::addGotLastEditablePriorityCB + (ArFunctor *functor, + int position) +{ + myGotLastEditablePriorityCBList.addCallback(functor, position); + +} // end method addGotLastEditablePriorityCB + +AREXPORT void ArClientHandlerConfig::remGotLastEditablePriorityCB + (ArFunctor *functor) +{ + myGotLastEditablePriorityCBList.remCallback(functor); + +} // end method remGotLastEditablePriorityCB + + +AREXPORT void ArClientHandlerConfig::handleGetLastEditablePriority + (ArNetPacket *packet) +{ + + if (packet == NULL) { + ArLog::log(ArLog::Normal, "%sreceived null packet for getLastEditablePriority", + myLogPrefix.c_str()); + return; + } + + ArPriority::Priority lastPriority = ArPriority::LAST_PRIORITY; + + int tempPriority = packet->bufToByte(); + if ((tempPriority >= 0) && (tempPriority < ArPriority::PRIORITY_COUNT)) { + lastPriority = (ArPriority::Priority) tempPriority; + } + else { + ArLog::log(ArLog::Terse, "%sReceived invalid last editable priority %i", + myLogPrefix.c_str(), + tempPriority); + } + + ArLog::log(ArLog::Normal, "%sReceived last editable priority %s", + myLogPrefix.c_str(), + ArPriority::getPriorityName(lastPriority)); + + myDataMutex.lock(); + myLastEditablePriority = lastPriority; + myHaveRequestedLastEditablePriority = false; + myHaveGottenLastEditablePriority = true; + + myDataMutex.unlock(); + + myGotLastEditablePriorityCBList.invoke(); + +} // end method handleGetLastEditablePriority diff --git a/Legacy/Aria/ArNetworking/src/ArClientSimpleConnector.cpp b/Legacy/Aria/ArNetworking/src/ArClientSimpleConnector.cpp new file mode 100644 index 0000000..b7f30a3 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientSimpleConnector.cpp @@ -0,0 +1,170 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArClientSimpleConnector.h" + +AREXPORT ArClientSimpleConnector::ArClientSimpleConnector(int *argc, char **argv) : + myParseArgsCB(this, &ArClientSimpleConnector::parseArgs), + myLogOptionsCB(this, &ArClientSimpleConnector::logOptions) +{ + reset(); + myParser = new ArArgumentParser(argc, argv); + myOwnParser = true; + myParseArgsCB.setName("ArClientSimpleConnector"); + Aria::addParseArgsCB(&myParseArgsCB, 75); + myLogOptionsCB.setName("ArClientSimpleConnector"); + Aria::addLogOptionsCB(&myLogOptionsCB, 75); +} + +AREXPORT ArClientSimpleConnector::ArClientSimpleConnector(ArArgumentBuilder *builder) : + myParseArgsCB(this, &ArClientSimpleConnector::parseArgs), + myLogOptionsCB(this, &ArClientSimpleConnector::logOptions) +{ + reset(); + myParser = new ArArgumentParser(builder); + myOwnParser = true; + myParseArgsCB.setName("ArClientSimpleConnector"); + Aria::addParseArgsCB(&myParseArgsCB, 75); + myLogOptionsCB.setName("ArClientSimpleConnector"); + Aria::addLogOptionsCB(&myLogOptionsCB, 75); +} + +AREXPORT ArClientSimpleConnector::ArClientSimpleConnector(ArArgumentParser *parser) : + myParseArgsCB(this, &ArClientSimpleConnector::parseArgs), + myLogOptionsCB(this, &ArClientSimpleConnector::logOptions) +{ + reset(); + myParser = parser; + myOwnParser = false; + myParseArgsCB.setName("ArClientSimpleConnector"); + Aria::addParseArgsCB(&myParseArgsCB, 75); + myLogOptionsCB.setName("ArClientSimpleConnector"); + Aria::addLogOptionsCB(&myLogOptionsCB, 75); +} + +AREXPORT ArClientSimpleConnector::~ArClientSimpleConnector(void) +{ + +} + +void ArClientSimpleConnector::reset(void) +{ + myHost = NULL; + myUser = NULL; + myPassword = NULL; + myServerKey = NULL; + myPort = 7272; + myNoPassword = false; + myLogDataList = false; +} + +AREXPORT bool ArClientSimpleConnector::parseArgs(void) +{ + return parseArgs(myParser); +} + +AREXPORT bool ArClientSimpleConnector::parseArgs(ArArgumentParser *parser) +{ + if (parser->checkArgument("-nopassword") || + parser->checkArgument("-np")) + myNoPassword = true; + + if (parser->checkArgument("-logDataList") || + parser->checkArgument("-ldl")) + myLogDataList = true; + + if (!parser->checkParameterArgumentString("-host", + &myHost) || + !parser->checkParameterArgumentInteger("-port", + &myPort) || + !parser->checkParameterArgumentInteger("-p", + &myPort) || + !parser->checkParameterArgumentString("-user", + &myUser) || + !parser->checkParameterArgumentString("-u", + &myUser) || + !parser->checkParameterArgumentString("-password", + &myPassword) || + !parser->checkParameterArgumentString("-pwd", + &myPassword) || + !parser->checkParameterArgumentString("-setServerKey", + &myServerKey) || + !parser->checkParameterArgumentString("-ssk", + &myServerKey)) + + { + return false; + } + + return true; +} + +AREXPORT void ArClientSimpleConnector::logOptions(void) const +{ + ArLog::log(ArLog::Terse, "Options for ArClientSimpleConnector (see docs for more details):"); + ArLog::log(ArLog::Terse, "-host "); + ArLog::log(ArLog::Terse, "-port "); + ArLog::log(ArLog::Terse, "-p "); + ArLog::log(ArLog::Terse, "-user "); + ArLog::log(ArLog::Terse, "-u "); + ArLog::log(ArLog::Terse, "-password "); + ArLog::log(ArLog::Terse, "-pwd "); + ArLog::log(ArLog::Terse, "-nopassword"); + ArLog::log(ArLog::Terse, "-np"); + ArLog::log(ArLog::Terse, "-logDataList"); + ArLog::log(ArLog::Terse, "-ldl"); +} + +AREXPORT bool ArClientSimpleConnector::connectClient(ArClientBase *client, + bool print) +{ + std::string host; + std::string user; + char password[512]; + password[0] = '\0'; + + if (myServerKey != NULL && myServerKey[0] != '\0') + client->setServerKey(myServerKey); + + if (myUser == NULL) + { + user = ""; + } + else + { + user = myUser; + if (myPassword != NULL) + { + strncpy(password, myPassword, sizeof(password) - 1); + password[sizeof(password) - 1] = '\0'; + } + else if (!myNoPassword) + { + printf("Enter password: "); + fgets(password, sizeof(password) - 1, stdin); + unsigned int i; + unsigned int len; + len = strlen(password); + for (i = 0; i < len; i++) + { + if (password[i] == '\r' || password[i] == '\n') + { + password[i] = '\0'; + break; + } + } + } + } + if (myHost != NULL) + host = myHost; + else + host = "localhost"; + + bool ret; + ret = client->blockingConnect(host.c_str(), myPort, print, user.c_str(), + password); + + if (ret && myLogDataList) + client->logDataList(); + + return ret; +} diff --git a/Legacy/Aria/ArNetworking/src/ArClientSwitchManager.cpp b/Legacy/Aria/ArNetworking/src/ArClientSwitchManager.cpp new file mode 100644 index 0000000..434c1fc --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArClientSwitchManager.cpp @@ -0,0 +1,687 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArClientSwitchManager.h" + +AREXPORT ArClientSwitchManager::ArClientSwitchManager( + ArServerBase *serverBase, ArArgumentParser *parser, + const char *serverDesc, const char *clientSoftwareDesc) : + myParseArgsCB(this, &ArClientSwitchManager::parseArgs), + myLogOptionsCB(this, &ArClientSwitchManager::logOptions), + mySocketClosedCB(this, &ArClientSwitchManager::socketClosed), + mySwitchCB(this, &ArClientSwitchManager::clientSwitch), + myNetCentralHeartbeatCB(this, &ArClientSwitchManager::netCentralHeartbeat), + myNetCentralServerHeartbeatCB(this, + &ArClientSwitchManager::netCentralServerHeartbeat), + myFileUserCB(this, &ArClientSwitchManager::fileUserCallback), + myFilePasswordCB(this, &ArClientSwitchManager::filePasswordCallback), + myFileServerKeyCB(this, &ArClientSwitchManager::fileServerKeyCallback), + myProcessFileCB(this, &ArClientSwitchManager::processFile) +{ + myMutex.setLogName("ArClientSwitchManager::myDataMutex"); + myServer = serverBase; + myParser = parser; + myServerDesc = serverDesc; + myClientSoftwareDesc = clientSoftwareDesc; + + setThreadName("ArClientSwitchManager"); + + mySwitchCB.setName("ArClientSwitchManager"); + + myParseArgsCB.setName("ArClientSwitchManager"); + Aria::addParseArgsCB(&myParseArgsCB, 49); + myLogOptionsCB.setName("ArClientSwitchManager"); + Aria::addLogOptionsCB(&myLogOptionsCB, 49); + + myNetCentralHeartbeatCB.setName("ArClientSwitchManager"); + myServer->addData("centralHeartbeat", + "a packet that is requested and used by the central server to make sure there is still a connection, it should not be used by anyone or anything else, note that this sends a response over tcp and udp at the same time", + &myNetCentralHeartbeatCB, "none", "none", "RobotInfo", + "RETURN_SINGLE"); + + myServer->addData("centralServerHeartbeat", + "a packet that is sent by central server to make sure there is still a connection to the robot, it should not be used by anyone or anything else", + &myNetCentralServerHeartbeatCB, "none", "none", "RobotInfo", + "RETURN_SINGLE"); + + myServerBackupTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("RobotToCentralServerTimeoutInMins", + &myServerBackupTimeout, + "The amount of time the robot can go without sending a packet to the central server successfully (when there are packets to send). A number less than 0 means this won't happen. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", + -1), + "Connection timeouts", ArPriority::DETAILED); + + myServerHeartbeatTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("RobotFromCentralServerTimeoutInMins", + &myServerHeartbeatTimeout, + "The amount of time a robot can go without getting the heartbeat from the central server before disconnecting it. A number less than 0 means that the central server will never timeout. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", -1), + "Connection timeouts", ArPriority::DETAILED); + + myServerUdpHeartbeatTimeout = 2; + Aria::getConfig()->addParam( + ArConfigArg("RobotFromCentralServerUdpTimeoutInMins", + &myServerUdpHeartbeatTimeout, + "The amount of time a robot can go without getting the udp heartbeat from the central server before disconnecting it. A number less than 0 means that the central server will never timeout. The time is in minutes but takes doubles (ie .5) (5 seconds is used if the value is positive, but less than that amount)", -1), + "Connection timeouts", ArPriority::DETAILED); + + + myProcessFileCB.setName("ArClientSwitchManager"); + Aria::getConfig()->addProcessFileCB(&myProcessFileCB, -1000); + + myConfigFirstProcess = true; + myConfigConnectToCentralServer = false; + myConfigCentralServer[0] = '\0'; + myConfigIdentifier[0] = '\0'; + + switchState(IDLE); + myClient = NULL; + myServerClient = NULL; + myCentralServerPort = 5000; + + myFileUserCB.setName("ArClientSwitchManager::user"); + myFileParser.addHandler("user", &myFileUserCB); + myFilePasswordCB.setName("ArClientSwitchManager::password"); + myFileParser.addHandler("password", &myFilePasswordCB); + myFileServerKeyCB.setName("ArClientSwitchManager::serverKey"); + myFileParser.addHandler("serverKey", &myFileServerKeyCB); +} + +AREXPORT ArClientSwitchManager::~ArClientSwitchManager() +{ +} + +AREXPORT bool ArClientSwitchManager::isConnected(void) +{ + return myState == CONNECTED; +} + +AREXPORT void ArClientSwitchManager::switchState(State state) +{ + myState = state; + myStartedState.setToNow(); + //myGaveTimeWarning = false; +} + +AREXPORT bool ArClientSwitchManager::parseArgs(void) +{ + const char *centralServer = NULL; + const char *identifier = NULL; + + if (!myParser->checkParameterArgumentString("-centralServer", + ¢ralServer) || + !myParser->checkParameterArgumentString("-cs", ¢ralServer) || + !myParser->checkParameterArgumentInteger("-centralServerPort", + &myCentralServerPort) || + !myParser->checkParameterArgumentInteger("-csp", + &myCentralServerPort) || + !myParser->checkParameterArgumentString("-identifier", &identifier) || + !myParser->checkParameterArgumentString("-id", &identifier)) + return false; + + + bool wasReallySetOnlyTrue = myParser->getWasReallySetOnlyTrue(); + myParser->setWasReallySetOnlyTrue(true); + + bool wasReallySet = false; + const char *centralServerInfoFile = NULL; + while (myParser->checkParameterArgumentString( + "-centralServerInfoFile", ¢ralServerInfoFile, + &wasReallySet, true) && + wasReallySet) + { + if (centralServerInfoFile != NULL && !parseFile(centralServerInfoFile)) + { + myParser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return false; + } + wasReallySet = false; + } + + myParser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + + myDataMutex.lock(); + if (centralServer != NULL && centralServer[0] != '\0') + { + myCentralServer = centralServer; + myState = TRYING_CONNECTION; + } + + if (identifier != NULL && identifier[0] != '\0') + { + myIdentifier = identifier; + } + /* Just don't set it so the server can just set it to the IP + else + { + int nameLen; + char name[512]; + int i; + + nameLen = ArMath::random() % 15 + 1; + for (i = 0; i < nameLen; i++) + name[i] = 'a' + (ArMath::random() % ('z' - 'a')); + name[nameLen] = '\0'; + + myIdentifier = name; + } + */ + myDataMutex.unlock(); + + return true; +} + +AREXPORT void ArClientSwitchManager::logOptions(void) const +{ + ArLog::log(ArLog::Terse, "ArClientSwitchManager options:"); +// ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "-centralServer "); + ArLog::log(ArLog::Terse, "-cs "); + ArLog::log(ArLog::Terse, "-centralServerPort "); + ArLog::log(ArLog::Terse, "-csp "); + ArLog::log(ArLog::Terse, "-identifier "); + ArLog::log(ArLog::Terse, "-id "); + /* + ArLog::log(ArLog::Terse, "-centralServerUser "); + ArLog::log(ArLog::Terse, "-csu "); + ArLog::log(ArLog::Terse, "-centralServerPassword "); + ArLog::log(ArLog::Terse, "-csp "); + ArLog::log(ArLog::Terse, "-centralServerKey "); + ArLog::log(ArLog::Terse, "-csk "); + */ + ArLog::log(ArLog::Terse, "-centralServerInfoFile "); +} + +AREXPORT void ArClientSwitchManager::clientSwitch(ArNetPacket *packet) +{ + //myDataMutex.lock(); + ArLog::log(ArLog::Normal, "Switch acknowledged, switching"); + + myServerClient = myServer->makeNewServerClientFromSocket( + myClient->getTcpSocket(), true); + myServerClient->getTcpSocket()->setCloseCallback(&mySocketClosedCB); + myServerClient->setBackupTimeout(myServerBackupTimeout); + + ArSocket emptySocket; + myClient->getTcpSocket()->transfer(&emptySocket); + + myLastTcpHeartbeat.setToNow(); + myLastUdpHeartbeat.setToNow(); + switchState(CONNECTED); + + char switchStr[1024]; + sprintf(switchStr, "Recovered connection to %s at %s, now connected.", + myServerDesc.c_str(), myCentralServer.c_str()); + myConnectedCBList.invoke(switchStr); + //myDataMutex.unlock(); +} + +AREXPORT void ArClientSwitchManager::socketClosed(void) +{ + myDataMutex.lock(); + if (myState == CONNECTED) + { + myServerClient = NULL; + ArLog::log(ArLog::Normal, "ArClientSwitchManager: Lost connection to central server"); + switchState(LOST_CONNECTION); + + char failedStr[1024]; + sprintf(failedStr, "Lost connection to %s at %s, restarting connection.", + myServerDesc.c_str(), myCentralServer.c_str()); + myFailedConnectCBList.invoke(failedStr); + + } + myDataMutex.unlock(); +} + +AREXPORT void *ArClientSwitchManager::runThread(void *arg) +{ + threadStarted(); + + while (getRunning()) + { + myDataMutex.lock(); + if (myState == IDLE) + { + } + else if (myState == TRYING_CONNECTION) + { + myLastConnectionAttempt.setToNow(); + ArLog::log(ArLog::Normal, "Trying to connect to central server %s", + myCentralServer.c_str()); + myClient = new ArClientBase; + myClient->setRobotName("ClientSwitch", myDebugLogging); + myClient->setServerKey(myServerKey.c_str(), false); + myClient->enforceProtocolVersion(myEnforceProtocolVersion.c_str(), false); + myClient->enforceType(myEnforceType, false); + myLastTcpHeartbeat.setToNow(); + myLastUdpHeartbeat.setToNow(); + if (!myClient->blockingConnect(myCentralServer.c_str(), + myCentralServerPort, false, + myUser.c_str(), myPassword.c_str(), + myServer->getOpenOnIP())) + { + char failedStr[10000]; + char verboseFailedStr[10000]; + if (myClient->wasRejected()) + { + //ArLog::log(ArLog::Normal, + //"Could not connect to %s because it rejected connection (%d, %s)", + //myCentralServer.c_str(), myClient->getRejected(), myClient->getRejectedString()); + if (myClient->getRejected() == 1) + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nBad username and password.", + myServerDesc.c_str(), myCentralServer.c_str()); + sprintf(failedStr, + "Could not connect to %s (Bad username and password)", + myCentralServer.c_str()); + } + else if (myClient->getRejected() == 2) + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nIt rejected this connection because it is not direct.", + myServerDesc.c_str(), myCentralServer.c_str()); + sprintf(failedStr, + "Could not connect to %s (rejected because not a direct connection).", + myCentralServer.c_str()); + } + else if (myClient->getRejected() == 3) + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nIt is a version not supported by this robot's %s.", + myServerDesc.c_str(), myCentralServer.c_str(), + myClientSoftwareDesc.c_str()); + sprintf(failedStr, + "Could not connect to %s (it is not a version supported by this robot's %s)", + myCentralServer.c_str(), myClientSoftwareDesc.c_str()); + } + else if (myClient->getRejected() == 4) + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nIt does not support this robot's %s version.", + myServerDesc.c_str(), myCentralServer.c_str(), + myClientSoftwareDesc.c_str()); + sprintf(failedStr, + "Could not connect to %s at %s (It does not support this robot's %s version)", + myServerDesc.c_str(), myCentralServer.c_str(), + myClientSoftwareDesc.c_str()); + } + else if (myClient->getRejected() == 5) + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nIt's number of licenses has been exceeded.\n\nPlease contact your robot provider for assistance purchasing more licenses.", + myServerDesc.c_str(), myCentralServer.c_str()); + sprintf(failedStr, + "Could not connect to %s (It's number of licenses has been exceeded)", + myCentralServer.c_str()); + } + else if (myClient->getRejected() == 6) + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nIt does not allow connections from %s robots.\n\nPlease contact your robot administrator for assistance.", + myServerDesc.c_str(), myCentralServer.c_str(), + ArServerCommands::toString(myEnforceType)); + sprintf(failedStr, + "Could not connect to %s (It does not allow connections from %s robots)", + myCentralServer.c_str(), + ArServerCommands::toString(myEnforceType)); + } + else + { + sprintf(verboseFailedStr, + "Could not connect to %s at %s\n\nThe reason is '%s'", + myServerDesc.c_str(), myCentralServer.c_str(), myClient->getRejectedString()); + sprintf(failedStr, + "Could not connect to %s (reason %d '%s')", + myCentralServer.c_str(), myClient->getRejected(), + myClient->getRejectedString()); + } + } + else + { + ArLog::log(ArLog::Verbose, + "Could not connect to %s to switch with, not doing anything", + myCentralServer.c_str()); + sprintf(verboseFailedStr, "Could not connect to %s at %s\n\nIt may not be reachable by the robot.", myServerDesc.c_str(), myCentralServer.c_str()); + sprintf(failedStr, "Could not connect to %s", myCentralServer.c_str()); + } + myClient->getTcpSocket()->close(); + delete myClient; + myClient = NULL; + switchState(LOST_CONNECTION); + ArLog::log(ArLog::Normal, "%s", failedStr); + myFailedConnectCBList.invoke(verboseFailedStr); + myDataMutex.unlock(); + continue; + } + + if (!myClient->dataExists("switch")) + { + ArLog::log(ArLog::Normal, + "ArClientSwitchManager: Connected to central server %s but it isn't a central server, going to idle"); + myClient->disconnect(); + delete myClient; + myClient = NULL; + switchState(LOST_CONNECTION); + + char failedStr[1024]; + sprintf(failedStr, "Connected to %s at %s, but it is inappropriate software, disconnecting.\n\nLikely this robot is pointing at another robot.", + myServerDesc.c_str(), myCentralServer.c_str()); + myFailedConnectCBList.invoke(failedStr); + + myDataMutex.unlock(); + continue; + } + + ArNetPacket sendPacket; + ArLog::log(ArLog::Verbose, "Putting in %s\n", myIdentifier.c_str()); + sendPacket.strToBuf(myIdentifier.c_str()); + + if (myClient->dataExists("centralServerHeartbeat")) + { + ArLog::log(ArLog::Normal, "Requesting switch (have heartbeat)"); + myServerHasHeartbeat = true; + } + else + { + ArLog::log(ArLog::Normal, "Requesting switch (no heartbeat)"); + myServerHasHeartbeat = false; + } + + myClient->addHandler("switch", &mySwitchCB); + myClient->requestOnce("switch", &sendPacket); + switchState(CONNECTING); + } + else if (myState == CONNECTING) + { + /* old behavior that just warned + if (!myGaveTimeWarning && myStartedState.secSince() > 10) + { + ArLog::log(ArLog::Normal, "ArClientSwitchManager: Connecting has taken over 10 seconds, probably a problem"); + myGaveTimeWarning = true; + } + myClient->loopOnce(); + myDataMutex.unlock(); + ArUtil::sleep(1); + continue; + */ + // new behavior that starts over + myClient->loopOnce(); + if (myStartedState.secSince() >= 15 && + myLastTcpHeartbeat.secSince() / 60.0 >= myServerHeartbeatTimeout) + { + + ArLog::log(ArLog::Normal, "ArClientSwitchManager: Connecting to central server has taken %.2f minutes, restarting connection", myStartedState.secSince() / 60.0); // this had / 4.0 for no apparent reason, changed it (11/13/2012 MPL) + /// added this to try and eliminate the occasional duplicates + myClient->getTcpSocket()->close(); + delete myClient; + myClient = NULL; + switchState(LOST_CONNECTION); + + char failedStr[1024]; + sprintf(failedStr, "Connection to %s at %s took over %.2f minutes, restarting connection.", + myServerDesc.c_str(), myCentralServer.c_str(), myStartedState.secSince() / 60.0); + myFailedConnectCBList.invoke(failedStr); + + myDataMutex.unlock(); + continue; + } + myDataMutex.unlock(); + ArUtil::sleep(1); + continue; + } + else if (myState == CONNECTED) + { + if (myClient != NULL) + { + delete myClient; + myClient = NULL; + } + // if we have a heartbeat timeout make sure we've heard the + // heartbeat within that range + if (myServerHasHeartbeat && myServerHeartbeatTimeout >= -.00000001 && + myLastTcpHeartbeat.secSince() >= 5 && + myLastTcpHeartbeat.secSince() / 60.0 >= myServerHeartbeatTimeout) + { + ArLog::log(ArLog::Normal, + "ArClientSwitchManager: Dropping connection since haven't heard from central server in %g minutes", + myServerHeartbeatTimeout); + myServerClient->forceDisconnect(false); + myServerClient = NULL; + switchState(LOST_CONNECTION); + + char failedStr[1024]; + sprintf(failedStr, "Dropping connection to %s at %s since the robot hasn't heard from it in over %g minutes, restarting connection.", + myServerDesc.c_str(), myCentralServer.c_str(), myServerHeartbeatTimeout); + myFailedConnectCBList.invoke(failedStr); + + myDataMutex.unlock(); + continue; + } + else if + (myServerHasHeartbeat && !myServerClient->isTcpOnly() && + myServerUdpHeartbeatTimeout >= -.00000001 && + myLastUdpHeartbeat.secSince() >= 5 && + myLastUdpHeartbeat.secSince() / 60.0 >= myServerUdpHeartbeatTimeout) + { + ArLog::log(ArLog::Normal, "ArClientSwitchManager: Switching to TCP only since gotten UDP from central server in %g minutes", + myServerUdpHeartbeatTimeout); + myServerClient->useTcpOnly(); + } + + } + else if (myState == LOST_CONNECTION) + { + if (myLastConnectionAttempt.secSince() > 10) + { + switchState(TRYING_CONNECTION); + } + } + myDataMutex.unlock(); + ArUtil::sleep(100); + } + threadFinished(); + return NULL; +} + +AREXPORT void ArClientSwitchManager::netCentralHeartbeat( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sending; + client->sendPacketTcp(&sending); + client->sendPacketUdp(&sending); +} + +AREXPORT void ArClientSwitchManager::netCentralServerHeartbeat( + ArServerClient *client, ArNetPacket *packet) +{ + myDataMutex.lock(); + if (client != myServerClient) + { + ArLog::log(ArLog::Normal, "Got a central server heartbeat packet from someone that isn't the central server %s", client->getIPString()); + myDataMutex.unlock(); + return; + } + if (packet->getPacketSource() == ArNetPacket::TCP) + myLastTcpHeartbeat.setToNow(); + else if (packet->getPacketSource() == ArNetPacket::UDP) + myLastUdpHeartbeat.setToNow(); + else + ArLog::log(ArLog::Normal, + "Got unknown packet source for central server heartbeat packet"); + myDataMutex.unlock(); +} + +AREXPORT bool ArClientSwitchManager::parseFile(const char *fileName) +{ + ArLog::log(ArLog::Normal, "Loading central server user/password from %s", + fileName); + if (!myFileParser.parseFile(fileName)) + { + + ArLog::log(ArLog::Normal, "Failed parsing central server user/password file %s", + fileName); + return false; + } + return true; +} + +bool ArClientSwitchManager::fileUserCallback(ArArgumentBuilder *arg) +{ + if (arg->getArgc() > 1) + { + ArLog::log(ArLog::Normal, "Bad user line: %s %s", + arg->getExtraString(), arg->getFullString()); + return false; + } + if (arg->getArgc() == 0) + myUser = ""; + else + myUser = arg->getArg(0); + return true; +} + + +bool ArClientSwitchManager::filePasswordCallback(ArArgumentBuilder *arg) +{ + if (arg->getArgc() > 1) + { + ArLog::log(ArLog::Normal, "Bad password line: %s %s", + arg->getExtraString(), arg->getFullString()); + return false; + } + if (arg->getArgc() == 0) + myPassword = ""; + else + myPassword = arg->getArg(0); + return true; +} + +bool ArClientSwitchManager::fileServerKeyCallback(ArArgumentBuilder *arg) +{ + if (arg->getArgc() > 1) + { + ArLog::log(ArLog::Normal, "Bad serverKey line: %s %s", + arg->getExtraString(), arg->getFullString()); + return false; + } + if (arg->getArgc() == 0) + myServerKey = ""; + else + myServerKey = arg->getArg(0); + return true; +} + +AREXPORT const char *ArClientSwitchManager::getCentralServerHostName(void) +{ + if (myCentralServer.size() <= 0) + return NULL; + else + return myCentralServer.c_str(); +} + +AREXPORT const char *ArClientSwitchManager::getIdentifier(void) +{ + if (myIdentifier.size() <= 0) + return NULL; + else + return myIdentifier.c_str(); +} + +bool ArClientSwitchManager::processFile(void) +{ + myDataMutex.lock(); + if (myServerClient != NULL) + myServerClient->setBackupTimeout(myServerBackupTimeout); + + // we only process this once, that's fine since changing it causes + // the software to restart + if (myConfigFirstProcess) + { + // if the config wants to connect to the central server and there + // isn't already a central server set, use the one in the config + if (myConfigConnectToCentralServer && + myCentralServer.empty() && myConfigCentralServer[0] != '\0') + { + myCentralServer = myConfigCentralServer; + myState = TRYING_CONNECTION; + } + + // if we have no identifier set, but the config has one, copy it + // over + if (myIdentifier.empty() && myConfigIdentifier[0] != '\0') + { + myIdentifier = myConfigIdentifier; + } + myConfigFirstProcess = false; + } + + myDataMutex.unlock(); + return true; +} + + +AREXPORT void ArClientSwitchManager::addToConfig( + const char *configSection, + const char *connectName, const char *connectDesc, + const char *addressName, const char *addressDesc) +{ + myConfigFirstProcess = true; + + if (myCentralServer.empty()) + { + Aria::getConfig()->addParam( + ArConfigArg(connectName, &myConfigConnectToCentralServer, + connectDesc), + configSection, ArPriority::ADVANCED, "Checkbox", + ArConfigArg::RESTART_SOFTWARE); + + myConfigDisplayHint = "Visible:"; + myConfigDisplayHint += connectName; + myConfigDisplayHint += "=true"; + + Aria::getConfig()->addParam( + ArConfigArg(addressName, myConfigCentralServer, + addressDesc, + sizeof(myConfigCentralServer)), + configSection, ArPriority::ADVANCED, + getConfigDisplayHint(), + ArConfigArg::RESTART_SOFTWARE); + } + + if (myIdentifier.empty()) + { + Aria::getConfig()->addParam( + ArConfigArg("Identifier", myConfigIdentifier, + "The identifier to use for this robot... After initial setup this should not be changed", + sizeof(myConfigIdentifier)), + configSection, ArPriority::CALIBRATION, + getConfigDisplayHint(), + ArConfigArg::RESTART_SOFTWARE); + } +} + + +/// Enforces the that the server is using this protocol version +AREXPORT void ArClientSwitchManager::enforceProtocolVersion(const char *protocolVersion) +{ + myDataMutex.lock(); + if (protocolVersion != NULL) + myEnforceProtocolVersion = protocolVersion; + else + myEnforceProtocolVersion = ""; + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "ArClientSwitchManager: New enforceProtocolVersionSet"); + +} + +AREXPORT void ArClientSwitchManager::enforceType(ArServerCommands::Type type) +{ + myDataMutex.lock(); + myEnforceType = type; + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "ArClientSwitchManager: New enforce type: %s", + ArServerCommands::toString(type)); + +} diff --git a/Legacy/Aria/ArNetworking/src/ArHybridForwarderVideo.cpp b/Legacy/Aria/ArNetworking/src/ArHybridForwarderVideo.cpp new file mode 100644 index 0000000..56e12e2 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArHybridForwarderVideo.cpp @@ -0,0 +1,240 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArHybridForwarderVideo.h" + +/** + @param server this class will addData the video data to the server + + @param client IF the client is connected to something this class + will get video data from the client and send it out when requested + **/ +AREXPORT ArHybridForwarderVideo::ArHybridForwarderVideo(ArServerBase *server, + ArClientBase *client) +{ + myMutex.setLogName("ArHybridForwarderVideo::myMutex"); + myServer = server; + myClient = client; + finishConstructor(); +} + +/** + This will try to connect a client to the hostname and port given, + IF client connects to something this class will get video data from + the client and send it out when requested + + @param server a base server object + @param hostname the host to connect a client to + @param port the port to connect a client to +**/ +AREXPORT ArHybridForwarderVideo::ArHybridForwarderVideo(ArServerBase *server, + const char *hostname, + int port) +{ + myServer = server; + myClient = new ArClientBase(); + myClient->setConnectTimeoutTime(1); + myClient->blockingConnect(hostname, port, false); + myClient->runAsync(); + finishConstructor(); +} + +AREXPORT ArHybridForwarderVideo::~ArHybridForwarderVideo() +{ + +} + +AREXPORT void ArHybridForwarderVideo::finishConstructor(void) +{ + myClient->lock(); + mySendVideoSizeCB = new ArFunctor2C(this, &ArHybridForwarderVideo::sendVideoSize); + + mySendVideoCB = new ArFunctor2C(this, &ArHybridForwarderVideo::sendVideo); + + myReceiveVideoSizeCB = new ArFunctor1C(this, &ArHybridForwarderVideo::receiveVideoSize); + + myReceiveVideoCB = new ArFunctor1C(this, &ArHybridForwarderVideo::receiveVideo); + + myClientCycleCB = new ArFunctorC( + this, &ArHybridForwarderVideo::clientCycleCallback); + + myReqSent = false; + myLastReqSent.setToNow(); + myLastReceivedVideo.setToNow(); + myVideoRequestTime = 100; + myForwardingVideo = false; + + if (myClient != NULL && myServer != NULL && myClient->isConnected()) + { + myClient->addCycleCallback(myClientCycleCB); + if (myClient->dataExists("videoSize")) + { + myServer->addData("videoSize", + "gets the width and height of the video data", + mySendVideoSizeCB, + "none", "uByte2: width, uByte2: height", + "Video", "RETURN_SINGLE"); + myClient->addHandler("videoSize", myReceiveVideoSizeCB); + myClient->requestOnce("videoSize"); + } + if (myClient->dataExists("sendVideo")) + { + ArLog::log(ArLog::Normal, "Forwarding video."); + myForwardingVideo = true; + myClient->addHandler("sendVideo", myReceiveVideoCB); + ArNetPacket packet; + packet.uByteToBuf(90); + myClient->requestOnce("sendVideo", &packet); + + myIsSendVideoAvailable = + myServer->addData("sendVideo", "gets video from the robot's camera (you should requestOnce this, you shouldn't request it, since you could easily fill the bandwidth that way)", + mySendVideoCB, "uByte: quality (0 - 100)", + "out: uByte2: width, uByte2: height, (len - readLen)*uByte: jpegData", "Video", "RETURN_VIDEO"); + } + } + myClient->unlock(); +} + + +AREXPORT const char *ArHybridForwarderVideo::getCameraName() +{ + return myCameraName.c_str(); +} + +AREXPORT void ArHybridForwarderVideo::setCameraName(const char *cameraName) +{ + if (cameraName != NULL) { + myCameraName = cameraName; + } + else { + myCameraName = ""; + } + +} // end method setCameraName + + +AREXPORT void ArHybridForwarderVideo::addToCameraCollection + (ArCameraCollection &collection) +{ + if (myCameraName.empty()) { + return; + } // end if no camera name + + const char *cameraName = myCameraName.c_str(); + if (!collection.exists(cameraName)) { + + return; + } // end if camera not yet created + + bool isSuccess = true; + + if (myForwardingVideo) { + + std::string packetName = "getPicture" + myCameraName; + + // This is a little unusual to add the handler here, but this method + // should only be called once, so hopefully it's no problem... + isSuccess = myServer->addData(packetName.c_str(), + "Gets video from the robot's camera", + mySendVideoCB, "uByte: quality (0 - 100)", + "out: uByte2: width, uByte2: height, (len - readLen)*uByte: jpegData", "Video"); + + if (isSuccess) { + isSuccess = collection.addCameraCommand + (cameraName, + ArCameraCommands::GET_PICTURE, + packetName.c_str(), + myVideoRequestTime); // TODO ? + } + + if (!isSuccess) { + ArLog::log(ArLog::Verbose, + "Video forwarder could not add camera %s command %s", + cameraName, + packetName.c_str()); + } // end if error occurred + + } // end if forwarding video + + // Left the original addData("sendVideo") in the finishConstructor() + // method - just to try to avoid any backwards compatibility issues. + if (myIsSendVideoAvailable) { + + isSuccess = collection.addCameraCommand + (cameraName, + ArCameraCommands::GET_VIDEO, + "sendVideo", + myVideoRequestTime); // TODO ? + } + +} // end method addToCameraCollection + + + +AREXPORT void ArHybridForwarderVideo::sendVideoSize(ArServerClient *client, + ArNetPacket *packet) +{ + myMutex.lock(); + myReceivedVideoSize.setCommand(packet->getCommand()); + client->sendPacketTcp(&myReceivedVideoSize); + myMutex.unlock(); +} + +AREXPORT void ArHybridForwarderVideo::sendVideo(ArServerClient *client, + ArNetPacket *packet) +{ + //printf("Sending video\n"); + myMutex.lock(); + mySendVideoArgument.duplicatePacket(packet); + mySendVideoArgument.resetRead(); + // MPL fixed the code so that this next line worked, but should + // probably let the base figure out the command (since it does it + // for everything else) + //myReceivedVideo.setCommand(packet->getCommand()); + myReceivedVideo.setCommand(0); + client->sendPacketUdp(&myReceivedVideo); + //printf("Sent video %d\n", myReceivedVideo.getLength()); + myMutex.unlock(); +} + +AREXPORT void ArHybridForwarderVideo::receiveVideoSize(ArNetPacket *packet) +{ + //printf("Receiving video size\n"); + myMutex.lock(); + myReceivedVideoSize.duplicatePacket(packet); + mySendVideoArgument.resetRead(); + myMutex.unlock(); +} + +AREXPORT void ArHybridForwarderVideo::receiveVideo(ArNetPacket *packet) +{ + //printf("Receiving video\n"); + myMutex.lock(); + myReceivedVideo.duplicatePacket(packet); + myReceivedVideo.resetRead(); + myLastReceivedVideo.setToNow(); + myReqSent = false; + myMutex.unlock(); +} + +AREXPORT void ArHybridForwarderVideo::clientCycleCallback(void) +{ + myMutex.lock(); + if ((myLastReceivedVideo.mSecSince() > myVideoRequestTime && !myReqSent) || + (myReqSent && myLastReqSent.mSecSince() > 3000)) + { + //printf("Requesting video\n"); + myClient->requestOnce("sendVideo", &mySendVideoArgument); + myLastReqSent.setToNow(); + myReqSent = true; + } + myMutex.unlock(); +} + +AREXPORT bool ArHybridForwarderVideo::isForwardingVideo(void) const +{ + return myForwardingVideo; +} diff --git a/Legacy/Aria/ArNetworking/src/ArMapChanger.cpp b/Legacy/Aria/ArNetworking/src/ArMapChanger.cpp new file mode 100644 index 0000000..dd019f4 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArMapChanger.cpp @@ -0,0 +1,3212 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArMapChanger.h" + +#include +#include + +#include "ArFileParser.h" +#include "ArMapUtils.h" +#include "ArMD5Calculator.h" + +//#define ARDEBUG_MAP_CHANGER +#ifdef ARDEBUG_MAP_CHANGER +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +const char *ArMapChanger::PROCESS_CHANGES_PACKET_NAME = + "processMapChanges"; + +const char *ArMapChanger::PROCESS_ROBOT_CHANGES_PACKET_NAME = + "processRobotMapObjectChange"; + +const char *ArMapChanger::CHANGES_IN_PROGRESS_PACKET_NAME = + "mapChangesInProgress"; + +const char *ArMapChanger::ROBOT_CHANGES_COMPLETE_PACKET_NAME = + "robotMapObjectChangeComplete"; + +AREXPORT ArMapChanger::ArMapChanger(ArMapInterface *map) : + myMap(map), + myWorkingMap(NULL), + myChangeDetails(NULL), + //myInfoCount((map != NULL) ? map->getInfoCount() : 0), + myInfoNames(), + myServer(NULL), + myClientSwitch(NULL), + myIsServerClientInit(false), + myClientMutex(), + myClient(NULL), + myClientInfoMutex(), + myClientInfo(NULL), + myInterleaveMutex(), + myReadyForNextPacket(false), + myIsWaitingForReturn(false), + myIdleProcessingMutex(), + myIsIdleProcessingPending(false), + myPreWriteCBList(), + myPostWriteCBList(), + myChangeCBList(), + myHandleChangePacketCB(this, &ArMapChanger::handleChangePacket), + myHandleRobotReplyPacketCB(this, &ArMapChanger::handleRobotChangeReplyPacket), + myHandleChangesInProgressPacketCB(this, &ArMapChanger::handleChangesInProgressPacket), + myHandleReplyPacketCB(this, &ArMapChanger::handleChangeReplyPacket), + myHandleIdleProcessingPacketCB(this, &ArMapChanger::handleIdleProcessingPacket), + myClientShutdownCB(this, &ArMapChanger::handleClientShutdown) +{ + if (myMap != NULL) { + myInfoNames = myMap->getInfoNames(); + } +} // end ctor + +AREXPORT ArMapChanger::ArMapChanger(ArServerBase *server, + ArMapInterface *map) : + myMap(map), + myWorkingMap(NULL), + myChangeDetails(NULL), + //myInfoCount((map != NULL) ? map->getInfoCount() : 0), + myInfoNames(), + myServer(server), + myClientSwitch(NULL), + myIsServerClientInit(false), + myClientMutex(), + myClient(NULL), + myClientInfoMutex(), + myClientInfo(NULL), + myInterleaveMutex(), + myReadyForNextPacket(false), + myIsWaitingForReturn(false), + myIdleProcessingMutex(), + myIsIdleProcessingPending(false), + myPreWriteCBList(), + myPostWriteCBList(), + myChangeCBList(), + myHandleChangePacketCB(this, &ArMapChanger::handleChangePacket), + myHandleRobotReplyPacketCB(this, &ArMapChanger::handleRobotChangeReplyPacket), + myHandleChangesInProgressPacketCB(this, &ArMapChanger::handleChangesInProgressPacket), + myHandleReplyPacketCB(this, &ArMapChanger::handleChangeReplyPacket), + myHandleIdleProcessingPacketCB(this, &ArMapChanger::handleIdleProcessingPacket), + myClientShutdownCB(this, &ArMapChanger::handleClientShutdown) +{ + if (myMap != NULL) { + myInfoNames = myMap->getInfoNames(); + } + if (myServer == NULL) { + + return; + } + myServer->addData(PROCESS_CHANGES_PACKET_NAME, + "Applies changes to the map", + &myHandleChangePacketCB, + "TODO", + "TODO", + "Map", + "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData(PROCESS_ROBOT_CHANGES_PACKET_NAME, + "Applies changes originated by the robot to the map", + &myHandleChangePacketCB, // Same handler + "Complex packet containing the map changes. See ArMapChangeDetails.", + "None", + "Map", + "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData(CHANGES_IN_PROGRESS_PACKET_NAME, + "Notifies clients that changes are being applied to the map", + NULL, + "TODO", + "TODO", + "Map", + "RETURN_NONE"); + +} // end ctor + + +AREXPORT ArMapChanger::ArMapChanger(ArClientSwitchManager *clientSwitch, + ArServerBase *server, + ArMapInterface *map) : + myMap(map), + myWorkingMap(NULL), + myChangeDetails(NULL), + //myInfoCount((map != NULL) ? map->getInfoCount() : 0), + myInfoNames(), + myServer(server), + myClientSwitch(clientSwitch), + myIsServerClientInit(false), + myClientMutex(), + myClient(NULL), + myClientInfoMutex(), + myClientInfo(NULL), + myInterleaveMutex(), + myReadyForNextPacket(false), + myIsWaitingForReturn(false), + myIdleProcessingMutex(), + myIsIdleProcessingPending(false), + myPreWriteCBList(), + myPostWriteCBList(), + myChangeCBList(), + myHandleChangePacketCB(this, &ArMapChanger::handleChangePacket), + myHandleRobotReplyPacketCB(this, &ArMapChanger::handleRobotChangeReplyPacket), + myHandleChangesInProgressPacketCB(this, &ArMapChanger::handleChangesInProgressPacket), + myHandleReplyPacketCB(this, &ArMapChanger::handleChangeReplyPacket), + myHandleIdleProcessingPacketCB(this, &ArMapChanger::handleIdleProcessingPacket), + myClientShutdownCB(this, &ArMapChanger::handleClientShutdown) +{ + if (myMap != NULL) { + myInfoNames = myMap->getInfoNames(); + } + if (myServer != NULL) { + + myServer->addData(PROCESS_CHANGES_PACKET_NAME, + "Applies changes to the map", + &myHandleChangePacketCB, + "TODO", + "TODO", + "Map", + "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData(CHANGES_IN_PROGRESS_PACKET_NAME, + "Notifies clients that changes are being applied to the map", + NULL, + "TODO", + "TODO", + "Map", + "RETURN_NONE"); + } + + if ((myClientSwitch != NULL) && + (myClientSwitch->getCentralServerHostName() != NULL)) { + + myServer->addData(PROCESS_ROBOT_CHANGES_PACKET_NAME, + "Applies ARCL/robot-originated changes to the map", + NULL, + "Complex packet containing the map changes. See ArMapChangeDetails.", + "None", + "Map", + "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData(ROBOT_CHANGES_COMPLETE_PACKET_NAME, + "Handles notification that the ARCL/robot-originated changes are complete", + &myHandleRobotReplyPacketCB, + "None", + "string: robot originating changes; uByte2: status (0 = failed, 10 = success)" ); + } // end if + +} // end ctor + +AREXPORT ArMapChanger::ArMapChanger(ArClientBase *client, + const std::list &infoNames) : + myMap(NULL), + myWorkingMap(NULL), + myChangeDetails(NULL), + //myInfoCount(infoCount), + myInfoNames(infoNames), + myServer(NULL), + myClientSwitch(NULL), + myClientMutex(), + myClient(client), + myClientInfoMutex(), + myClientInfo(NULL), + myInterleaveMutex(), + myReadyForNextPacket(false), + myIsWaitingForReturn(false), + myIdleProcessingMutex(), + myIsIdleProcessingPending(false), + myPreWriteCBList(), + myPostWriteCBList(), + myChangeCBList(), + myHandleChangePacketCB(this, &ArMapChanger::handleChangePacket), + myHandleChangesInProgressPacketCB(this, &ArMapChanger::handleChangesInProgressPacket), + myHandleReplyPacketCB(this, &ArMapChanger::handleChangeReplyPacket), + myHandleIdleProcessingPacketCB(this, &ArMapChanger::handleIdleProcessingPacket), + myClientShutdownCB(this, &ArMapChanger::handleClientShutdown) +{ + // myMap is null, so don't do this + // if (myMap != NULL) { + // myInfoNames = myMap->getInfoNames(); + //} + + myClientMutex.setLogName("ArMapChanger_ClientMutex"); + myClientInfoMutex.setLogName("ArMapChanger_ClientInfoMutex"); + + if (myClient == NULL) { + + return; + } + myClientMutex.lock(); + + if (myClient && myClient->dataExists(PROCESS_CHANGES_PACKET_NAME)) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::ctor() server supports map changes"); + + myClient->addHandler(PROCESS_CHANGES_PACKET_NAME, + &myHandleReplyPacketCB); + + } // end if processMapChanges available + + if (myClient && myClient->dataExists(CHANGES_IN_PROGRESS_PACKET_NAME)) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::ctor() server notifies of map changes"); + + myClient->addHandler(CHANGES_IN_PROGRESS_PACKET_NAME, + &myHandleChangesInProgressPacketCB); + + myClient->requestOnce(CHANGES_IN_PROGRESS_PACKET_NAME); + myClient->request(CHANGES_IN_PROGRESS_PACKET_NAME, -1); + } + + if (myClient && myClient->dataExists("idleProcessingPending")) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::ctor() server notifies of idle processing"); + + myClient->addHandler("idleProcessingPending", + &myHandleIdleProcessingPacketCB); + + myClient->requestOnce("idleProcessingPending"); + myClient->request("idleProcessingPending", -1); + } + if (myClient) { + myClient->addServerShutdownCB(&myClientShutdownCB); + myClient->addDisconnectOnErrorCB(&myClientShutdownCB); + } + myClientMutex.unlock(); + +} // end ctor + + +AREXPORT ArMapChanger::~ArMapChanger() +{ + if (myClient != NULL) { + myClient->remHandler(PROCESS_CHANGES_PACKET_NAME, + &myHandleReplyPacketCB); + myClient->remHandler(CHANGES_IN_PROGRESS_PACKET_NAME, + &myHandleChangesInProgressPacketCB); + myClient->remHandler("idleProcessingPending", + &myHandleIdleProcessingPacketCB); + myClient->remServerShutdownCB(&myClientShutdownCB); + myClient->remDisconnectOnErrorCB(&myClientShutdownCB); + } +} + +AREXPORT bool ArMapChanger::sendMapChanges(ArMapChangeDetails *changeDetails) +{ + if (changeDetails == NULL) { + return false; + } + if (myClient == NULL) { + return false; + } + + bool isInterleaved = true; + myInterleaveMutex.lock(); + if (myIsWaitingForReturn) + { + ArLog::log(ArLog::Terse, + "ArMapChanger::sendMapChanges() already busy sending changes"); + myInterleaveMutex.unlock(); + return false; + } + myIsWaitingForReturn = true; + myReadyForNextPacket = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::sendMapChanges() set myIsWaitingForReturn = true && myReadyForNextPacket = false"); + myInterleaveMutex.unlock(); + + + + ArMapId givenOrigMapId; + ArMapId givenNewMapId; + + changeDetails->getOrigMapId(&givenOrigMapId); + changeDetails->getNewMapId(&givenNewMapId); + + + // A giant hack to strip out the source name if we're sending the + // changes back to the original source. + myClientMutex.lock(); + const char *robotName = ((myClient != NULL) ? myClient->getRobotName() : ""); + myClientMutex.unlock(); + + if (!ArUtil::isStrEmpty(robotName) && + !ArUtil::isStrEmpty(givenOrigMapId.getSourceName())) { + if (ArUtil::strcasecmp(robotName, givenOrigMapId.getSourceName()) == 0) { + ArMapId modOrigMapId = givenOrigMapId; + modOrigMapId.setSourceName(NULL); + modOrigMapId.setTimestamp(-1); + changeDetails->setOrigMapId(modOrigMapId); + } + } + if (!ArUtil::isStrEmpty(robotName) && + !ArUtil::isStrEmpty(givenNewMapId.getSourceName())) { + if (ArUtil::strcasecmp(robotName, givenNewMapId.getSourceName()) == 0) { + ArMapId modNewMapId = givenNewMapId; + modNewMapId.setSourceName(NULL); + modNewMapId.setTimestamp(-1); + changeDetails->setNewMapId(modNewMapId); + } + } + + + // TODO Probably just want to send each packet as created... + std::list packetList; + bool isSuccess = convertChangeDetailsToPacketList(changeDetails, + &packetList); + + + if (!isSuccess) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::sendMapChanges() error converting change details to network packets"); + return false; + } + + isSuccess = sendPacketList(packetList); + + changeDetails->setOrigMapId(givenOrigMapId); + changeDetails->setNewMapId(givenNewMapId); + + ArLog::log(ArLog::Normal, + "ArMapChanger::sendMapChanges() changes sent (%i), deleting packet list...", + isSuccess); + + ArUtil::deleteSet(packetList.begin(), packetList.end()); + packetList.clear(); + + + return isSuccess; + +} // end method sendMapChanges + + +/// Sends the given map changes from the robot to the central server. +AREXPORT bool ArMapChanger::sendRobotMapChanges(ArMapChangeDetails *changeDetails) +{ + // KMC TODO This looks a lot like sendMapChanges and should be refactored + // (presuming it works) + + if (changeDetails == NULL) { + return false; + } + if ((myClientSwitch == NULL) || + (myClientSwitch->getServerClient() == NULL)) { + return false; + } + + + bool isInterleaved = true; + myInterleaveMutex.lock(); + if (myIsWaitingForReturn) + { + ArLog::log(ArLog::Terse, + "ArMapChanger: already busy sending changes"); + myInterleaveMutex.unlock(); + return false; + } + myIsWaitingForReturn = true; + myReadyForNextPacket = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::sendRobotMapChanges() set myIsWaitingForReturn = true && myReadyForNextPacket = false"); + myInterleaveMutex.unlock(); + + + + ArMapId givenOrigMapId; + ArMapId givenNewMapId; + + changeDetails->getOrigMapId(&givenOrigMapId); + changeDetails->getNewMapId(&givenNewMapId); + + + // A giant hack to strip out the source name if we're sending the + // changes back to the original source. + myClientMutex.lock(); + std::string robotName = ((myClientSwitch != NULL) ? myClientSwitch->getIdentifier() : ""); + myClientMutex.unlock(); + + if (!ArUtil::isStrEmpty(robotName.c_str()) && + !ArUtil::isStrEmpty(givenOrigMapId.getSourceName())) { + if (ArUtil::strcasecmp(robotName.c_str(), givenOrigMapId.getSourceName()) == 0) { + ArMapId modOrigMapId = givenOrigMapId; + modOrigMapId.setSourceName(NULL); + modOrigMapId.setTimestamp(-1); + changeDetails->setOrigMapId(modOrigMapId); + } + } + if (!ArUtil::isStrEmpty(robotName.c_str()) && + !ArUtil::isStrEmpty(givenNewMapId.getSourceName())) { + if (ArUtil::strcasecmp(robotName.c_str(), givenNewMapId.getSourceName()) == 0) { + ArMapId modNewMapId = givenNewMapId; + modNewMapId.setSourceName(NULL); + modNewMapId.setTimestamp(-1); + changeDetails->setNewMapId(modNewMapId); + } + } + + + // TODO Probably just want to send each packet as created... + std::list packetList; + bool isSuccess = convertChangeDetailsToPacketList(changeDetails, + &packetList); + + + if (!isSuccess) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::sendRobotMapChanges() error converting change details to network packets"); + return false; + } + + isSuccess = sendRobotPacketList(packetList); + + changeDetails->setOrigMapId(givenOrigMapId); + changeDetails->setNewMapId(givenNewMapId); + + ArLog::log(ArLog::Normal, + "ArMapChanger::sendMapChanges() changes sent (%i), deleting packet list...", + isSuccess); + + ArUtil::deleteSet(packetList.begin(), packetList.end()); + packetList.clear(); + + + return isSuccess; + +} // end method sendRobotMapChanges + + +bool ArMapChanger::sendPacketList(const std::list &packetList) { + + bool isInterleaved = true; + + ArTime started; + started.setToNow(); + + for (std::list::const_iterator iter = packetList.begin(); + iter != packetList.end(); + iter++) { + + started.setToNow(); + + ArNetPacket *packet = *iter; + if (packet == NULL) { + continue; + } + myClientMutex.lock(); + if (myClient != NULL) { + myClient->requestOnce(PROCESS_CHANGES_PACKET_NAME, + packet); + } + else { + ArLog::log(ArLog::Terse, + "ArMapChanger::sendPacketList aborted because connection lost"); + myClientMutex.unlock(); + return false; + } + + myClientMutex.unlock(); + + /*** + if (isInterleaved) { + if (!waitForReply(started)) { + return false; + } + } // end if interleaved + ***/ + } // end for each packet + + if (!packetList.empty()) { + if (isInterleaved) { + if (!waitForReply(started)) { + return false; + } + } // end if interleaved + } + + return true; + +} // end method sendPacketList + + + +bool ArMapChanger::sendRobotPacketList(const std::list &packetList) { + + bool isInterleaved = true; + ArLog::log(ArLog::Normal, + "ArMapChanger::sendRobotPacketList() count = %i", packetList.size()); + + ArTime started; + started.setToNow(); + + for (std::list::const_iterator iter = packetList.begin(); + iter != packetList.end(); + iter++) { + + started.setToNow(); + + ArNetPacket *packet = *iter; + if (packet == NULL) { + continue; + } + myClientMutex.lock(); + if ((myClientSwitch != NULL) && + (myClientSwitch->getServerClient() != NULL)) { + + unsigned int mapChangesCommand = myClientSwitch->getServerClient()-> + findCommandFromName(PROCESS_ROBOT_CHANGES_PACKET_NAME); + + packet->setCommand(mapChangesCommand); + + myClientSwitch->getServerClient()->broadcastPacketTcp(packet); + +// PROCESS_ROBOT_CHANGES_PACKET_NAME); + } + else { + ArLog::log(ArLog::Terse, + "ArMapChanger::sendRobotPacketList aborted because connection lost"); + myClientMutex.unlock(); + return false; + } + + myClientMutex.unlock(); + + /*** + if (isInterleaved) { + if (!waitForReply(started)) { + return false; + } + } // end if interleaved + ***/ + } // end for each packet + +/*** KMC Don't actually want to wait for the packet + if (!packetList.empty()) { + if (isInterleaved) { + if (!waitForCentralServerReply(started)) { + return false; + } + } // end if interleaved + } +***/ + return true; + +} // end method sendRobotPacketList + + + +bool ArMapChanger::waitForReply(ArTime &started) +{ + myInterleaveMutex.lock(); + + // myReadyForNextPacket is set to true when the response is received + // from the server. + while (!myReadyForNextPacket) + { + if (!myIsWaitingForReturn) + { + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForReply: Put was cancelled or failed."); + myInterleaveMutex.unlock(); + return false; + } + myInterleaveMutex.unlock(); + + + myClientMutex.lock(); + + if (myClient == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForReply: Client was shutdown."); + myClientMutex.unlock(); + return false; + } + myClientMutex.unlock(); + + ArUtil::sleep(1); + + if (!isIdleProcessingPending()) { + if (started.secSince() > 30) + { + myInterleaveMutex.lock(); + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForReply() set myIsWaitingForReturn = false"); + myIsWaitingForReturn = false; + myInterleaveMutex.unlock(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForReply: No return from client within 30 seconds, failing put."); + return false; + } + } + else { + started.setToNow(); + } + myInterleaveMutex.lock(); + + } // end while not ready for next packet + + // Reset the flag so we'll wait for a response during the next loop iteration. + myReadyForNextPacket = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForReply() set myReadyForNextPacket = false"); + + myInterleaveMutex.unlock(); + + return true; + +} // end method waitForReply + + +bool ArMapChanger::waitForCentralServerReply(ArTime &started) +{ + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForCentralServerReply() called"); + + myInterleaveMutex.lock(); + + // myReadyForNextPacket is set to true when the response is received + // from the server. + while (!myReadyForNextPacket) + { + if (!myIsWaitingForReturn) + { + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForCentralServerReply: Put was cancelled or failed."); + myInterleaveMutex.unlock(); + return false; + } + myInterleaveMutex.unlock(); + +/*** KMC TODO + myClientMutex.lock(); + + if (myClient == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForCentralServerReply: Client was shutdown."); + myClientMutex.unlock(); + return false; + } + myClientMutex.unlock(); +******/ + + ArUtil::sleep(1); + + if (true || !isIdleProcessingPending()) { + if (started.secSince() > 30) + { + myInterleaveMutex.lock(); + myIsWaitingForReturn = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForCentralServerReply() set myIsWaitingForReturn = false (timeout)"); + myInterleaveMutex.unlock(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForCentralServerReply: No return from client within 30 seconds, failing put."); + return false; + } + } + else { + started.setToNow(); + } + myInterleaveMutex.lock(); + + } // end while not ready for next packet + + // Reset the flag so we'll wait for a response during the next loop iteration. + ArLog::log(ArLog::Normal, + "ArMapChanger::waitForCentralServerReply() set myReadyForNextPacket = false"); + myReadyForNextPacket = false; + + myInterleaveMutex.unlock(); + + return true; + +} // end method waitForCentralServerReply + +bool ArMapChanger::isIdleProcessingPending() +{ + myIdleProcessingMutex.lock(); + bool isPending = myIsIdleProcessingPending; + myIdleProcessingMutex.unlock(); + + return isPending; + +} // end method isIdleProcessingPending + + +AREXPORT void ArMapChanger::handleChangeReplyPacket(ArNetPacket *packet) +{ + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangeReplyPacket()")); + + myInterleaveMutex.lock(); + if (!myIsWaitingForReturn) + { + myInterleaveMutex.unlock(); + return; + } + + int ret = packet->bufToUByte2(); + + // packet->bufToStr(fileName, sizeof(fileName)); + // if (myInterleaved && ret == 10) + if (ret == CHANGE_SUCCESS) + { + myReadyForNextPacket = true; + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangeReplyPacket() set myReadyForNextPacket = false"); + + } + else + { + myIsWaitingForReturn = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangeReplyPacket() set myIsWaitingForReturn = false"); + } + myInterleaveMutex.unlock(); + + //if (done) + // callFileSentCallbacks(ret); +} // end method handleChangeReplyPacket + + +AREXPORT void ArMapChanger::handleChangesInProgressPacket(ArNetPacket *packet) +{ + if (packet == NULL) { + return; + } + bool isInProgress = (packet->bufToUByte() != 0); + + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangesInProgressPacket() in progress = %i", + isInProgress); + +} // end method handleChangesInProgressPacket + + +AREXPORT void ArMapChanger::handleIdleProcessingPacket(ArNetPacket *packet) +{ + if (packet == NULL) { + return; + } + unsigned char isPending = packet->bufToByte(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::handleIdleProcessingPacket() idleProcessingPending = %i", + isPending); + + myIdleProcessingMutex.lock(); + myIsIdleProcessingPending = isPending; + myIdleProcessingMutex.unlock(); + +} // end method handleIdleProcessingPacket + + +AREXPORT void ArMapChanger::handleChangePacket(ArServerClient *client, + ArNetPacket *packet) +{ + if (packet == NULL) { + return; + } + + if (myMap == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangePacket no map to change"); + return; + } + + ArNetPacket replyPacket; + bool isChangesStarted = false; + bool isChangesFinished = false; + + ArMapId thisMapId; + myMap->getMapId(&thisMapId); + + MapChangeCommand command; + ArMapId origMapId; + ArMapId newMapId; + + bool isSuccess = unpackHeader(packet, &command, &origMapId, &newMapId); + + if (!isSuccess) { + ArLog::log(ArLog::Terse, + "ArMapChanger::handleChangePacket() cannot unpack header"); + + replyPacket.uByte2ToBuf(CHANGE_FAILED); + client->sendPacketTcp(&replyPacket); + + return; + + } + + // KMC TODO Figure out appropriate "same map" check for deltas from robot + bool isSameMap = true; + + if (!origMapId.isNull()) { + isSameMap = thisMapId.isSameFile(origMapId); + + if (isSameMap) { + if (ArUtil::strcasecmp(thisMapId.getFileName(), + newMapId.getFileName()) != 0) { + // Hopefully this won't happen, but make sure that the client isn't + // renaming the map file. + isSameMap = false; + } + } + } // end if same map + + // TODO: Not sure how to handle this... Right now just allowing changes + // on current map. But may want a big map manager thing later. + if (!isSameMap) { + + + // In the case of changes propagated from the central server, no one + // will be waiting for the replies -- and so the FINISH_CHANGES message + // will be received. Send this server's map ID to the central server + // so that the CS can refresh the file if necessary. (Most likely in + // the case in which the CS and the robot have different + // AramMapInfoMinder's.) + if (command == FINISH_CHANGES) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangePacket() packet received for other map"); + thisMapId.log("This Map"); + origMapId.log("Received Map - Original"); + newMapId.log("Received Map - New"); + + replyPacket.uByte2ToBuf(CHANGE_FAILED); + client->sendPacketTcp(&replyPacket); + + // Have no idea whether this is going to work... + + ArNetPacket mapIdPacket; + + unsigned int mapIdCommand = client->findCommandFromName("getMapId"); + + mapIdPacket.setCommand(mapIdCommand); + ArMapId::toPacket(thisMapId, + &mapIdPacket); + + ArLog::log(ArLog::Normal, + "ArMapChanger::internalChangeMap() packet sending map Id packet command = %i", + mapIdCommand); + + client->sendPacketTcp(&mapIdPacket); + + } + + return; + + } // end if not same map + + + switch (command) { + + case START_CHANGES: + { + myClientInfoMutex.lock(); + // if other client making changes then + if (myClientInfo != NULL) { + // if other client has timed out then + if (myClientInfo->myLastActivityTime.secSince() > 15) { + // TODO notify other client that its being dumped + + delete myClientInfo; + myClientInfo = NULL; + } + else { + + // TODO notify this client that it can't change yet + + myClientInfoMutex.unlock(); + return; + } // end else other client has not timed out + } // end if other client is currently changing same map + + // setup changes for this client + myClientInfo = new ClientChangeInfo(client); + + myClientInfo->addPacket(packet); + + isChangesStarted = true; + + + myClientInfoMutex.unlock(); + + + } + break; + + case CONTINUE_CHANGES: + { + + // append changes for this client + myClientInfoMutex.lock(); + if ((myClientInfo != NULL) && (myClientInfo->myClient == client)) { + + // TODO: Not entirely sure about this... We could build up the + // change details and then apply them... + + // Save a copy of the packet... Want to receive all changes before applying them + + // TODO The copy ctor for ArNetPacket should be disabled if it's not going to work + myClientInfo->addPacket(packet); + } + else { + + // notify the client that something has gone terribly wrong + } + myClientInfoMutex.unlock(); + } + break; + + case FINISH_CHANGES: + { + // apply changes for this client + myClientInfoMutex.lock(); + + if ((myClientInfo != NULL) && (myClientInfo->myClient == client)) { + + // TODO: Probably need to do the apply in a separate thread and have a + // success/fail callback + + myClientInfo->addPacket(packet); + + ArMapChangeDetails *changeDetails = new ArMapChangeDetails(); + + isSuccess = convertPacketListToChangeDetails(myClientInfo->myPacketList, + changeDetails); + + changeDetails->log(); + + ArMapId newMapId; + changeDetails->getNewMapId(&newMapId); + bool isRepackageChanges = (!newMapId.isValidTimestamp()); + + + if (isSuccess) { + + isSuccess = applyMapChanges(changeDetails); + + if (isSuccess) { + + ArLog::log(ArLog::Normal, + "ArMapChanger::internalChangeMap Change details successfully applied to map"); + + } + else { // error applying map changes + ArLog::log(ArLog::Normal, + "ArMapChanger::internalChangeMap Error applying change details to map"); + } // end else error applying map changes + } + else { // error converting packet list + ArLog::log(ArLog::Normal, + "ArMapChanger::internalChangeMap Error converting packet list to map change details"); + } // end else error converting packet list + + + if (isSuccess && !myChangeCBList.empty()) { + + std::list relayPacketList; + if (!isRepackageChanges) { + ArLog::log(ArLog::Normal, + "ArMapChanger::internalChangeMap Relaying original change packets"); + relayPacketList = myClientInfo->myPacketList; + } + else { + ArLog::log(ArLog::Normal, + "ArMapChanger::internalChangeMap Recreating change packets"); + convertChangeDetailsToPacketList(changeDetails, + &relayPacketList, + true); + } + + for (std::list< ArFunctor2 *> *>::iterator cbIter = + myChangeCBList.begin(); + cbIter != myChangeCBList.end(); + cbIter++) { + + ArFunctor2 *> *functor = + *cbIter; + + resetPacketList(&myClientInfo->myPacketList); + + functor->invoke(myClientInfo->myClient, + &relayPacketList); + } + + } // end if changes successfully applied and callbacks + + + delete changeDetails; + + delete myClientInfo; + myClientInfo = NULL; + + } + else { + + // notify the client that something has gone terribly wrong + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangePacket() cannot finish changes from other client"); + isSuccess = false; + + } + + isChangesFinished = true; + + myClientInfoMutex.unlock(); + } + break; + + case CANCEL_CHANGES: + { + // cancel changes for this client + // reset + // apply changes for this client + myClientInfoMutex.lock(); + if ((myClientInfo != NULL) && (myClientInfo->myClient == client)) { + delete myClientInfo; + myClientInfo = NULL; + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangePacket() cancelling changes"); + } + else { + + // notify the client that something has gone terribly wrong + ArLog::log(ArLog::Normal, + "ArMapChanger::handleChangePacket() cannot cancel changes from other client"); + isSuccess = false; + } + + isChangesFinished = true; + + myClientInfoMutex.unlock(); + } + break; + + } // end switch + + + if ((isChangesStarted) && (myServer != NULL)) { + // Broadcast that changes are in progress in order to prevent others from + // applying changes during this time. + // + ArNetPacket inProgressPacket; + inProgressPacket.uByteToBuf(true); + myServer->broadcastPacketTcp(&inProgressPacket, + CHANGES_IN_PROGRESS_PACKET_NAME); + + } + + if (isChangesFinished) { + if (isSuccess) { + replyPacket.uByte2ToBuf(CHANGE_SUCCESS); + } + else { + replyPacket.uByte2ToBuf(CHANGE_FAILED); + // TODO Think about adding an error message + } + client->sendPacketTcp(&replyPacket); + + + if (myServer != NULL) { + // Broadcast that changes are no longer in progress. + // + ArNetPacket inProgressPacket; + inProgressPacket.uByteToBuf(false); + myServer->broadcastPacketTcp(&inProgressPacket, + CHANGES_IN_PROGRESS_PACKET_NAME); + } + } // end if + +} // end method handleChangePacket + + +AREXPORT void ArMapChanger::handleClientShutdown() +{ + ArLog::log(ArLog::Normal, + "ArMapChanger::handleClientShutdown() received"); + + // Doing this so that we don't attempt to remove the handlers in the destructor -- + // which wreaks havoc if the client base has already been deleted. + + myClientMutex.lock(); + myClient = NULL; + myClientMutex.unlock(); + +} // end method handleClientShutdown + + +void ArMapChanger::resetPacketList(std::list *packetList) +{ + if (packetList == NULL) { + return; + } + + for (std::list::iterator iter = packetList->begin(); + iter != packetList->end(); + iter++) { + ArNetPacket *packet = *iter; + if (packet == NULL) { + continue; + } + packet->resetRead(); + } + +} // end method packetList + +/*** +bool ArMapChanger::applyMapChanges(std::list &packetList) +{ + ArMapChangeDetails *changeDetails = new ArMapChangeDetails(); + + bool isSuccess = convertPacketListToChangeDetails(packetList, + changeDetails); + + if (isSuccess) { + isSuccess = applyMapChanges(changeDetails); + + if (isSuccess) { + + ArLog::log(ArLog::Normal, + "Change details successfully applied to map"); + + } + else { // error applying map changes + ArLog::log(ArLog::Normal, + "Error applying change details to map"); + } // end else error applying map changes + } + else { // error converting packet list + ArLog::log(ArLog::Normal, + "Error converting packet list to map change details"); + } // end else error converting packet list + + changeDetails->log(); + + delete changeDetails; + + return isSuccess; +} +***/ + +AREXPORT bool ArMapChanger::applyMapChanges(ArMapChangeDetails *changeDetails) +{ + + if (changeDetails == NULL) { + return false; + } + if (myMap == NULL) { + return false; + } + + myMap->lock(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::applyMapChanges() begin"); + + myWorkingMap = myMap->clone(); + + bool isSuccess = true; + + // -------------------------------------------------------------------------- + // Apply Scan changes... + // + isSuccess = applyScanChanges(changeDetails) && isSuccess; + + // -------------------------------------------------------------------------- + // Apply Supplement changes... + // + isSuccess = applySupplementChanges(changeDetails) && isSuccess; + + // -------------------------------------------------------------------------- + // Apply Object changes... + // + isSuccess = applyObjectChanges(changeDetails) && isSuccess; + + // -------------------------------------------------------------------------- + // Apply Info changes... + // + isSuccess = applyInfoChanges(changeDetails) && isSuccess; + + + ArMapId mapId; + ArMapId changesMapId; + ArMapId newMapId; + + myMap->getMapId(&mapId); + + + + if (isSuccess) { + + changeDetails->getNewMapId(&changesMapId); + + unsigned char tempChecksum[ArMD5Calculator::DIGEST_LENGTH]; + myWorkingMap->calculateChecksum(tempChecksum, + ArMD5Calculator::DIGEST_LENGTH); + + if ((changesMapId.getChecksum () != NULL) && + (memcmp(changesMapId.getChecksum(), + tempChecksum, + ArMD5Calculator::DIGEST_LENGTH) != 0)) { + + char tempChecksumDisplay[ArMD5Calculator::DISPLAY_LENGTH]; + ArMD5Calculator::toDisplay(tempChecksum, + ArMD5Calculator::DIGEST_LENGTH, + tempChecksumDisplay, + ArMD5Calculator::DISPLAY_LENGTH); + + // Different checksums + ArLog::log(ArLog::Normal, +"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\ +Map Checksums different after applying changes\n\ + From Client: %s\n\ + Calculated : %s\n\ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", + changesMapId.getDisplayChecksum(), + tempChecksumDisplay); + + isSuccess = false; + + /*** + // Re-insert this to debug why map changes weren't applied + // successfully. (Run diff on MapChangeError.map and robot's + // current map.) + bool isWriteBadMap = true; + + if (isWriteBadMap) { + myWorkingMap->writeFile("MapChangeError.map"); + } + ***/ + + } // end if different checksums + + } // end if changes successfully applied + + if (isSuccess) { + + myMap->set(myWorkingMap); + + ArLog::log(ArLog::Normal, + "Successfully applied changes to map %s, saving file", + mapId.getFileName()); + + std::list::iterator iter = myPreWriteCBList.begin(); + + for (iter = myPreWriteCBList.begin(); + iter != myPreWriteCBList.end(); + iter++) { + myMap->addPreWriteFileCB(*iter); + } + for (iter = myPostWriteCBList.begin(); + iter != myPostWriteCBList.end(); + iter++) { + myMap->addPostWriteFileCB(*iter); + } + + isSuccess = myMap->writeFile(mapId.getFileName(), + true, + NULL, 0, + changesMapId.getTimestamp()); + + for (iter = myPreWriteCBList.begin(); + iter != myPreWriteCBList.end(); + iter++) { + myMap->remPreWriteFileCB(*iter); + } + for (iter = myPostWriteCBList.begin(); + iter != myPostWriteCBList.end(); + iter++) { + myMap->remPostWriteFileCB(*iter); + } + + myMap->getMapId(&newMapId); + + if (changesMapId.isNull() || (changesMapId == newMapId)) { + // This will actually insert the timestamp into the map ID + changeDetails->setNewMapId(newMapId); + + } + else { + + ArLog::log(ArLog::Normal, +"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\ + Map IDs different after applying changes\n\ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + changesMapId.log("Changes Map ID"); + newMapId.log("New Map ID"); + + isSuccess = false; + + } + } // end if successful + + if (isSuccess) { + + ArLog::log(ArLog::Normal, + "Successfully saved file for map %s, emitting mapChanged", + mapId.getFileName()); + + myMap->mapChanged(); // ??? TODO + } + else { // error occurred + + ArLog::log(ArLog::Terse, + "An error occurred while applying changes to map %s", + mapId.getFileName()); + + // TODO Notify client of error (and hopefully get full map file) + + } // end else error occurred + + delete myWorkingMap; + myWorkingMap = NULL; + + myMap->unlock(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::applyMapChanges() end"); + + return isSuccess; + +} // end method applyMapChanges + + +bool ArMapChanger::applyScanChanges(ArMapChangeDetails *changeDetails) +{ + if ((changeDetails == NULL) || (myWorkingMap == NULL)) { + return false; + } + + std::list *scanTypeList = changeDetails->getScanTypes(); + + if ((scanTypeList == NULL) || (scanTypeList->empty())) { + return true; + } + ArFileParser parser; + bool isSuccess = myWorkingMap->addToFileParser(&parser); + + for (std::list::iterator iter = scanTypeList->begin(); + (isSuccess && (iter != scanTypeList->end())); + iter++) { + + const char *scanType = (*iter).c_str(); + isSuccess = applyScanChanges(changeDetails, scanType, parser); + } + + myWorkingMap->remFromFileParser(&parser); + + return isSuccess; + +} // end for each scan type + + +bool ArMapChanger::applyScanChanges(ArMapChangeDetails *changeDetails, + const char *scanType, + ArFileParser &parser) +{ + + ArLog::log(ArLog::Normal, + "ArMapChanger::applyScanChanges() for scan type %s", + scanType); + + ArMapFileLineSet *newSummaryLines = changeDetails->getChangedSummaryLines + (ArMapChangeDetails::ADDITIONS, + scanType); + if (newSummaryLines == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::applyScanChanges() for scan type %s, error getting added summary lines", + scanType); + return false; + } + + bool isSuccess = true; + + char buf[10000]; + + for (ArMapFileLineSet::iterator iter = newSummaryLines->begin(); + iter != newSummaryLines->end(); + iter++) { + ArMapFileLineGroup &group = *iter; + strncpy(buf, group.getParentLine()->getLineText(), sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + ArLog::log(ArLog::Normal, + "Parsing summary line: %s", + buf); + + isSuccess = parser.parseLine(buf) && isSuccess; + if (!isSuccess) { + + ArLog::log(ArLog::Normal, + "Error parsing summary line: %s", + group.getParentLine()->getLineText()); + } + + } // end for each new summary line + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Process point changes... + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + std::vector *deletedPoints = changeDetails->getChangedPoints + (ArMapChangeDetails::DELETIONS, + scanType); + std::vector *addedPoints = changeDetails->getChangedPoints + (ArMapChangeDetails::ADDITIONS, + scanType); + + std::vector *mapPoints = myWorkingMap->getPoints(scanType); + + if ((deletedPoints == NULL) || (addedPoints == NULL) || (mapPoints == NULL)) { + return false; + } + ArLog::log(ArLog::Normal, + "ArMapChanger::applyScanChanges() for scan type %s initial points: %i deletedPoints: %i addedPoints: %i, numPointsInMap: %i", + scanType, + mapPoints->size(), + deletedPoints->size(), + addedPoints->size(), + myWorkingMap->getNumPoints()); + + std::sort(mapPoints->begin(), mapPoints->end()); + std::sort(deletedPoints->begin(), deletedPoints->end()); + std::sort(addedPoints->begin(), addedPoints->end()); + + /****/ + // Handle the simple but unlikely case that all points were deleted + if (deletedPoints->size() >= mapPoints->size()) { + mapPoints->clear(); + *mapPoints = *addedPoints; + } + else if (deletedPoints->empty()) { + if (!addedPoints->empty()) { + std::vector tempPoints; + tempPoints.reserve(myWorkingMap->getNumPoints(scanType) + addedPoints->size()); + merge(mapPoints->begin(), mapPoints->end(), + addedPoints->begin(), addedPoints->end(), + std::inserter(tempPoints, + tempPoints.begin())); + *mapPoints = tempPoints; + } // end if points were added (but not deleted) + } + else { // some but not all points were deleted + + ArTime timeToDelete; + std::vector tempPoints; + tempPoints.reserve(myWorkingMap->getNumPoints(scanType)); + + set_difference(mapPoints->begin(), mapPoints->end(), + deletedPoints->begin(), deletedPoints->end(), + std::inserter(tempPoints, + tempPoints.begin())); + long int elapsed = timeToDelete.mSecSince(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::applyScanChanges() took %i msecs to apply deletions in %i points (map points size = %i, deleted points size = %i, temp size = %i)", + elapsed, + myWorkingMap->getNumPoints(scanType), + mapPoints->size(), + deletedPoints->size(), + tempPoints.size()); + + if (!addedPoints->empty()) { + mapPoints->clear(); + mapPoints->reserve(tempPoints.size() + addedPoints->size()); + merge(tempPoints.begin(), tempPoints.end(), + addedPoints->begin(), addedPoints->end(), + std::inserter(*mapPoints, + mapPoints->begin())); + } + else { + ArLog::log(ArLog::Normal, + "ArMapChanger::applyScanChanges() copying tempPoints to map points"); + + *mapPoints = tempPoints; + } + + } // end if some but not all points were deleted + + if (myWorkingMap->getNumPoints(scanType) != mapPoints->size()) { + ArLog::log(ArLog::Normal, + "Error changing points: map's numPoints = %i, num points in map = %i", + myWorkingMap->getNumPoints(scanType), + mapPoints->size()); + } + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Process line changes... + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + std::vector *deletedLines = changeDetails->getChangedLineSegments + (ArMapChangeDetails::DELETIONS, + scanType); + std::vector *addedLines = changeDetails->getChangedLineSegments + (ArMapChangeDetails::ADDITIONS, + scanType); + + std::vector *mapLines = myWorkingMap->getLines(scanType); + if ((deletedLines == NULL) || (addedLines == NULL) || (mapLines == NULL)) { + return false; + } + + /****/ + // Handle the simple but unlikely case that all lines were deleted + if (deletedLines->size() >= mapLines->size()) { + mapLines->clear(); + *mapLines = *addedLines; + } + else if (deletedLines->empty()) { + if (!addedLines->empty()) { + std::vector tempLines; + tempLines.reserve(myWorkingMap->getNumLines(scanType) + addedLines->size()); + merge(mapLines->begin(), mapLines->end(), + addedLines->begin(), addedLines->end(), + std::inserter(tempLines, + tempLines.begin())); + *mapLines = tempLines; + } // end if lines were added (but not deleted) + } + else { // some but not all lines were deleted + + ArTime timeToDelete; + std::vector tempLines; + tempLines.reserve(myWorkingMap->getNumLines(scanType)); + + set_difference(mapLines->begin(), mapLines->end(), + deletedLines->begin(), deletedLines->end(), + std::inserter(tempLines, + tempLines.begin())); + long int elapsed = timeToDelete.mSecSince(); + + ArLog::log(ArLog::Normal, + "ArMapChanger::applyScanChanges() took %i msecs to apply deletions in %i lines", + elapsed, + myWorkingMap->getNumLines(scanType)); + + if (!addedLines->empty()) { + mapLines->clear(); + mapLines->reserve(tempLines.size() + addedLines->size()); + merge(tempLines.begin(), tempLines.end(), + addedLines->begin(), addedLines->end(), + std::inserter(*mapLines, + mapLines->begin())); + } + else { + *mapLines = tempLines; + } + + } + + if (myWorkingMap->getNumLines(scanType) != mapLines->size()) { + ArLog::log(ArLog::Normal, + "Error changing lines: map's numLines = %i, num lines in map = %i", + myWorkingMap->getNumLines(scanType), + mapLines->size()); + } + + return isSuccess; + +} // end method applyScanChanges + + + +bool ArMapChanger::applySupplementChanges(ArMapChangeDetails *changeDetails) +{ + + ArMapFileLineSet *newSupplementLines = changeDetails->getChangedSupplementLines + (ArMapChangeDetails::ADDITIONS); + if (newSupplementLines == NULL) { + return false; + } + ArFileParser parser; + bool isSuccess = myWorkingMap->addToFileParser(&parser); + + char buf[10000]; + + for (ArMapFileLineSet::iterator iter = newSupplementLines->begin(); + iter != newSupplementLines->end(); + iter++) { + ArMapFileLineGroup &group = *iter; + strncpy(buf, group.getParentLine()->getLineText(), sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + ArLog::log(ArLog::Normal, + "Parsing supplement line: %s", + buf); + + isSuccess = parser.parseLine(buf) && isSuccess; + if (!isSuccess) { + + ArLog::log(ArLog::Normal, + "Error parsing summary line: %s", + group.getParentLine()->getLineText()); + } + + } // end for each new supplement line + + myWorkingMap->remFromFileParser(&parser); + + return isSuccess; + +} // end method applySupplementChanges + + +bool ArMapChanger::applyObjectChanges(ArMapChangeDetails *changeDetails) +{ + if ((changeDetails == NULL) || (myWorkingMap == NULL)) { + return false; + } + + ArMapFileLineSet *deletedLineSet = changeDetails->getChangedObjectLines + (ArMapChangeDetails::DELETIONS); + ArMapFileLineSet *addedLineSet = changeDetails->getChangedObjectLines + (ArMapChangeDetails::ADDITIONS); + + if ((deletedLineSet == NULL) || (addedLineSet == NULL)) { + // TODO Log error, really shouldn't happen + return false; + } + + if (myWorkingMap->getMapObjects() == NULL) { + return false; + } + + bool isSuccess = true; + + std::list *mapObjectList = new std::list + (*(myWorkingMap->getMapObjects())); + + + for (ArMapFileLineSet::iterator dIter = deletedLineSet->begin(); + dIter != deletedLineSet->end(); + dIter++) { + + ArMapFileLineGroup &group = *dIter; + + ArArgumentBuilder *objectArg = new ArArgumentBuilder(512, '\0', false, true); + objectArg->addPlain(group.getParentLine()->getLineText()); + objectArg->removeArg(0, true); // To get rid of the Cairn + + ArMapObject *objectToDelete = ArMapObject::createMapObject(objectArg); + + if (objectToDelete == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::applyObjectChanges() error creating object to delete"); + isSuccess = false; + continue; + // TODO Return false? + } + + // TODO Check name doesn't already exist? + + std::list::iterator mIter = mapObjectList->begin(); + for (; + mIter != mapObjectList->end(); + mIter++) { + if (isMatchingObjects(objectToDelete, *mIter)) { // , changeDetails)) { + break; + } + } // end for each map object + + if (mIter != mapObjectList->end()) { + mapObjectList->erase(mIter); + } + else { + ArLog::log(ArLog::Normal, + "Could not find matching map object to delete"); + isSuccess = false; + objectToDelete->log(); + } + + delete objectToDelete; + + } // end for each object to delete + + + for (ArMapFileLineSet::iterator aIter = addedLineSet->begin(); + aIter != addedLineSet->end(); + aIter++) { + + ArMapFileLineGroup &group = *aIter; + + ArArgumentBuilder *objectArg = new ArArgumentBuilder(512, '\0', false, true); + objectArg->addPlain(group.getParentLine()->getLineText()); + objectArg->removeArg(0, true); // To get rid of the Cairn + + ArMapObject *objectToAdd = ArMapObject::createMapObject(objectArg); + + if (objectToAdd == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::applyObjectChanges() error creating object to add"); + isSuccess = false; + continue; + // TODO Return false? + } + + // TODO Check name doesn't already exist? + // TODO Alright to mangle order? Or should we reinsert at "right" line? + + mapObjectList->push_back(objectToAdd); + + } // end for each object to add + + myWorkingMap->setMapObjects(mapObjectList); + + ArUtil::deleteSet(mapObjectList->begin(), mapObjectList->end()); + delete mapObjectList; + + return isSuccess; + +} // end method applyObjectChanges + +bool ArMapChanger::isMatchingObjects(ArMapObject *obj1, + ArMapObject *obj2) +{ + // TODO Make this an ArMapObject method + + if ((obj1 == NULL) || (obj2 == NULL)) { + return false; + } + + if (!ArUtil::isStrEmpty(obj1->getName())) { + if (!ArUtil::isStrEmpty(obj2->getName())) { + if (ArUtil::strcasecmp(obj1->getName(), obj2->getName()) == 0) { + return true; + } + else { // names don't match + return false; + } // end else names don't match + } + else { // second object has null name, no match + return false; + } + } // end if object 1 has name + + // Otherwise, objects don't have names... + + if (obj1->hasFromTo() != obj2->hasFromTo()) { + return false; + } + if (ArUtil::strcasecmp(obj1->getType(), obj2->getType()) != 0) { + return false; + } + if (obj1->getPose() != obj2->getPose()) { + return false; + } + if (obj1->hasFromTo()) { + if (obj1->getFromPose() != obj2->getFromPose()) { + return false; + } + if (obj1->getToPose() != obj2->getToPose()) { + return false; + } + } // end if has from to + + if (ArUtil::strcasecmp(obj1->getDescription(), obj2->getDescription()) != 0) { + return false; + } + if (ArUtil::strcasecmp(obj1->getIconName(), obj2->getIconName()) != 0) { + return false; + } + + std::list obj1Lines = obj1->getFromToSegments(); + std::list obj2Lines = obj2->getFromToSegments(); + + if (obj1Lines.size() != obj2Lines.size()) { + return false; + } + + for (std::list::iterator iter1 = obj1Lines.begin(), + iter2 = obj2Lines.begin(); + ((iter1 != obj1Lines.end()) && (iter2 != obj2Lines.end())); + iter1++, iter2++) { + ArLineSegment &seg1 = *iter1; + ArLineSegment &seg2 = *iter2; + + if (seg1 != seg2) { + return false; + } + } // end for each line segment + + return true; + +} // end method isMatchingObjects + + +bool ArMapChanger::applyInfoChanges(ArMapChangeDetails *changeDetails) +{ + if ((changeDetails == NULL) || (myWorkingMap == NULL)) { + return false; + } + bool isSuccess = true; + + std::list changedInfoNames = changeDetails->findChangedInfoNames(); + + + for (std::list::iterator tIter = changedInfoNames.begin(); + tIter != changedInfoNames.end(); + tIter++) { + + const char *infoName = (*tIter).c_str(); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::applyInfoChanges() applying changes to %s", + infoName)); + + ArMapFileLineSet *deletedLineSet = changeDetails->getChangedInfoLines + (infoName, + ArMapChangeDetails::DELETIONS); + ArMapFileLineSet *addedLineSet = changeDetails->getChangedInfoLines + (infoName, + ArMapChangeDetails::ADDITIONS); + + + if ((deletedLineSet == NULL) || (addedLineSet == NULL)) { + // TODO Log error, really shouldn't happen + continue; + } + + std::list *infoList = myWorkingMap->getInfo(infoName); + + if (infoList == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::applyInfoChanges() null info list for %s", + infoName); + + isSuccess = false; + continue; + } + + std::list tempInfoList; + + int lineNum = 0; + bool isParentDeleted = false; + + for (std::list::iterator iter1 = infoList->begin(); + iter1 != infoList->end(); + iter1++) { + + ArArgumentBuilder *arg = *iter1; + lineNum++; + + if (!changeDetails->isChildArg(infoName, arg)) { + isParentDeleted = false; + + std::string namePlusArg = infoName; // myWorkingMap->getInfoName(infoType); + namePlusArg += " "; + namePlusArg += arg->getFullString(); + + ArMapFileLineSet::iterator delLineIter = + deletedLineSet->find(ArMapFileLine(lineNum, + namePlusArg.c_str())); + + if (delLineIter != deletedLineSet->end()) { + + // line has been deleted, do not re-add + isParentDeleted = true; + + ArLog::log(ArLog::Normal, + "Deleted: %s", + arg->getFullString()); + ArLog::log(ArLog::Normal, + "Based on: %s", + namePlusArg.c_str()); + + continue; + } + + } + else if (isParentDeleted) { + continue; + } + + tempInfoList.push_back(new ArArgumentBuilder(*arg)); + + } // end for each original info line + + if (!addedLineSet->empty()) { + + std::list newInfoList; + + int lineNum = 0; + bool isDone = false; + ArMapFileLineSet::iterator addIter = addedLineSet->begin(); + std::list::iterator origIter = tempInfoList.begin(); + + while (!isDone) { + + lineNum++; + + if (addIter != addedLineSet->end()) { + + ArMapFileLineGroup &lineGroup = *addIter; + if (lineGroup.getParentLine()->getLineNum() <= lineNum) { + + // Add arg for parent + ArArgumentBuilder *newArg = new ArArgumentBuilder(512, '\0', false, true); + newArg->addPlain(lineGroup.getParentLine()->getLineText()); + newArg->removeArg(0, true); // To get rid of info name + + newArg->compressQuoted(); + + newInfoList.push_back(newArg); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::applyInfoChanges() adding %s %s", + infoName, + newArg->getFullString())); + + for (std::vector::iterator cIter = lineGroup.getChildLines()->begin(); + cIter != lineGroup.getChildLines()->end(); + cIter++) { + + lineNum++; + ArMapFileLine &line = *cIter; + ArArgumentBuilder *childArg = new ArArgumentBuilder(512, '\0', false, true); + childArg->addPlain(line.getLineText()); + childArg->removeArg(0, true); // To get rid of info name + + childArg->compressQuoted(); + + newInfoList.push_back(childArg); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::applyInfoChanges() adding child %s %s", + infoName, + childArg->getFullString())); + + } // end for each child line + + addIter++; + + continue; + + } // end if line added + } // end if + + if (origIter != tempInfoList.end()) { + ArArgumentBuilder *arg = *origIter; + newInfoList.push_back(arg); + origIter++; + } + + if ((addIter == addedLineSet->end()) && + (origIter == tempInfoList.end())) { + isDone = true; + } + + } // end while not done + + myWorkingMap->setInfo(infoName, &newInfoList); + // Since setInfoList makes a copy, delete the allocated args. + ArUtil::deleteSet(newInfoList.begin(), newInfoList.end()); + } + else { // no lines added + + myWorkingMap->setInfo(infoName, &tempInfoList); + // Since setInfoList makes a copy, delete the allocated args. + ArUtil::deleteSet(tempInfoList.begin(), tempInfoList.end()); + + } // end else no lines added + + } // end for each changed info type + + return isSuccess; + +} // end method applyInfoChanges + +// ----------------------------------------------------------------------------- + +// TODO: Not really sure whether we want to accumulate the packet list... might +// make more sense just to send... + +bool ArMapChanger::convertChangeDetailsToPacketList + (ArMapChangeDetails *changeDetails, + std::list *packetListOut, + bool isRelay) +{ + if (packetListOut == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::convertChangeDetailsToPacketList() packet list"); + return false; + } + packetListOut->clear(); + + myChangeDetails = changeDetails; + + bool isSuccess = true; + + ArMapId newMapId; + changeDetails->getNewMapId(&newMapId); + + std::list *scanTypeList = changeDetails->getScanTypes(); + + // TODO: Not entirely sure that we want to do this here, or in the map + // producer... + if (!isRelay && !ArUtil::isStrEmpty(newMapId.getSourceName())) { + ArLog::log(ArLog::Normal, + "ArMapChanger::convertChangeDetailsToPacketList() removing timestamp source = %s", + newMapId.getSourceName()); + // This map was obtained from a remote source... Rip out the timestamp so + // that the originator can set it to the correct value. + newMapId.setTimestamp(-1); + changeDetails->setNewMapId(newMapId); + } // end if remote map + + ArNetPacket *startPacket = new ArNetPacket(); + addHeaderToPacket(START_CHANGES, + NO_CHANGE, // unused + ArMapChangeDetails::ADDITIONS, // unused + NULL, + startPacket); + packetListOut->push_back(startPacket); + + for (int i = 0; + (isSuccess && (i < ArMapChangeDetails::CHANGE_TYPE_COUNT)); + i++) { + + ArMapChangeDetails::MapLineChangeType changeType = + (ArMapChangeDetails::MapLineChangeType) i; + + std::list::iterator iter = scanTypeList->end(); + + for (iter = scanTypeList->begin(); iter != scanTypeList->end(); iter++) { + const char *scanType = (*iter).c_str(); + isSuccess = isSuccess && + addFileLineSetPackets + (SUMMARY_DATA, + changeType, + scanType, + NULL, + changeDetails->getChangedSummaryLines(changeType, scanType), + packetListOut); + } // end for each scan type + + isSuccess = isSuccess && + addFileLineSetPackets + (SUPPLEMENT_DATA, + changeType, + NULL, + NULL, + changeDetails->getChangedSupplementLines(changeType), + packetListOut); + + + //for (int infoType = 0; infoType < myInfoCount; infoType++) { + for (std::list::iterator iIter = myInfoNames.begin(); + iIter != myInfoNames.end(); + iIter++) { + const char *infoName = (*iIter).c_str(); + + isSuccess = isSuccess && + addFileLineSetPackets + (INFO_DATA, + changeType, + NULL, + infoName, + changeDetails->getChangedInfoLines(infoName, changeType), + packetListOut); + } // end for each info type + + isSuccess = isSuccess && + addFileLineSetPackets + (OBJECTS_DATA, + changeType, + NULL, + NULL, + changeDetails->getChangedObjectLines(changeType), + packetListOut); + + for (iter = scanTypeList->begin(); iter != scanTypeList->end(); iter++) { + const char *scanType = (*iter).c_str(); + isSuccess = isSuccess && + addPointsPackets + (changeType, + scanType, + changeDetails->getChangedPoints(changeType, scanType), + packetListOut); + } // end for each scan type + + for (iter = scanTypeList->begin(); iter != scanTypeList->end(); iter++) { + const char *scanType = (*iter).c_str(); + isSuccess = isSuccess && + addLinesPackets + (changeType, + scanType, + changeDetails->getChangedLineSegments(changeType, scanType), + packetListOut); + } // end for each scan type + + } // end for each change type + + ArNetPacket *endPacket = new ArNetPacket(); + addHeaderToPacket(FINISH_CHANGES, + NO_CHANGE, // unused + ArMapChangeDetails::ADDITIONS, // unused + NULL, + endPacket); + packetListOut->push_back(endPacket); + + myChangeDetails = NULL; + + return isSuccess; + +} // end method convertChangeDetailsToPacketList + + + +bool ArMapChanger::addFileLineSetPackets + (MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + const char *extra, + ArMapFileLineSet *fileLineSet, + std::list *packetListOut) +{ + if (packetListOut == NULL) { + return false; + } + if ((fileLineSet == NULL) || (fileLineSet->empty())) { + return true; + } + + // TODO Could probably make this work similar to the addGroup and addFileLine... + // i.e. append to previous packet if there is room. + + ArNetPacket *packet = new ArNetPacket(); + + addHeaderToPacket(CONTINUE_CHANGES, dataType, changeType, scanType, packet); + + // TODO Someday we should create a new packet defn that sends a string instead + // of the info name index... (i.e. Keep this in mind if any other changes to + // the packet are necessary.) + int extraIndex = -1; + + if ((dataType == INFO_DATA) && (!ArUtil::isStrEmpty(extra))) { + + int i = 0; + for (std::list::iterator iter = myInfoNames.begin(); + iter != myInfoNames.end(); + iter++, i++) { + if (strcasecmp(extra, (*iter).c_str()) == 0) { + extraIndex = i; + break; + } + } // end for each info name + } // end if + + packet->byte4ToBuf(extraIndex); + + packet->byte4ToBuf(fileLineSet->size()); + + packetListOut->push_back(packet); + + bool isAddSuccess = true; + + for (ArMapFileLineSet::iterator iter2 = fileLineSet->begin(); + (isAddSuccess && (iter2 != fileLineSet->end())); + iter2++) { + + ArMapFileLineGroup &group = *iter2; + + isAddSuccess = addGroupToPacketList(dataType, + changeType, + scanType, + group, + packetListOut); + + } // end for each group + + return isAddSuccess; + +} // end method addFileLineSetPackets + + +void ArMapChanger::addHeaderToPacket + (MapChangeCommand command, + MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + ArNetPacket *packet) +{ + + if (myChangeDetails == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::addHeaderToPacket() cannot create packet because no change details"); + return; + } + ArLog::log(ArLog::Normal, + "ArMapChanger::addHeaderToPacket() creating packet for data type %i change type %i", + dataType, changeType); + + packet->uByte2ToBuf(command); + + ArMapId origMapId; + ArMapId newMapId; + myChangeDetails->getOrigMapId(&origMapId); + myChangeDetails->getNewMapId(&newMapId); + + bool isSuccess = true; + + isSuccess = ArMapId::toPacket(origMapId, packet) && isSuccess; + isSuccess = ArMapId::toPacket(newMapId, packet) && isSuccess; + + if ((command != CONTINUE_CHANGES)) { + return; + } + + packet->uByteToBuf(dataType); + packet->uByteToBuf(changeType); + if (scanType != NULL) { + packet->strToBuf(scanType); + } + else { + packet->strToBuf(""); + } + +} // end method addHeaderToPacket + + +bool ArMapChanger::addGroupToPacketList(MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + ArMapFileLineGroup &group, + std::list *packetListOut) +{ + int packetPadding = 1000; + + ArNetPacket *packet = packetListOut->back(); + + for (int i = 0; i < 2; i++) { + if (packet->getLength() + + strlen(group.getParentLine()->getLineText()) + 1 + + 4 // line number + + 4 // child count + + packetPadding > packet->getMaxLength()) { + + if (i == 0) { + + packet = new ArNetPacket(); + addHeaderToPacket(CONTINUE_CHANGES, dataType, changeType, scanType, packet); + + packet->byte4ToBuf(-1); // for continuation + packet->byte4ToBuf(-1); // "" + + packetListOut->push_back(packet); + } + else { + // TODO Log error + return false; + } + } + else { + break; + } // end if line is too long for packet + } // end for each try + + packet->byte4ToBuf(group.getChildLines()->size()); + + packet->byte4ToBuf(group.getParentLine()->getLineNum()); + packet->strToBuf(group.getParentLine()->getLineText()); + + bool isAddSuccess = true; + + for (std::vector::iterator iter = group.getChildLines()->begin(); + (isAddSuccess && (iter != group.getChildLines()->end())); + iter++) { + const ArMapFileLine &fileLine = *iter; + + isAddSuccess = addFileLineToPacketList(dataType, + changeType, + scanType, + fileLine, + packetListOut); + + } + + return isAddSuccess; + +} // end method addGroupToPacketList + + +bool ArMapChanger::addFileLineToPacketList(MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + const ArMapFileLine &fileLine, + std::list *packetListOut) +{ + int packetPadding = 1000; + + ArNetPacket *packet = packetListOut->back(); + + for (int i = 0; i < 2; i++) { + if (packet->getLength() + + strlen(fileLine.getLineText()) + 1 + + 4 // line number + + packetPadding > packet->getMaxLength()) { + + if (i == 0) { + + packet = new ArNetPacket(); + addHeaderToPacket(CONTINUE_CHANGES, dataType, changeType, scanType, packet); + packet->byte4ToBuf(-1); // for continuation + packet->byte4ToBuf(-1); // "" + + packetListOut->push_back(packet); + } + else { + + ArLog::log(ArLog::Normal, + "ArMapChanger::addFileLineToPacketList() line #%i is too long to add", + fileLine.getLineNum()); + return false; + } + } // end if line is too long for packet + } // end for each try + + packet->byte4ToBuf(fileLine.getLineNum()); + packet->strToBuf(fileLine.getLineText()); + + return true; + +} // end method addFileLineToPacketList + + +bool ArMapChanger::addPointsPackets + (ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + std::vector *pointList, + std::list *packetListOut) +{ + if (packetListOut == NULL) { + return false; + } + if ((pointList == NULL) || (pointList->empty())) { + return true; + } + + // TODO Could probably make this work similar to the addGroup and addFileLine... + // i.e. append to previous packet if there is room. + + ArNetPacket *packet = new ArNetPacket(); + addHeaderToPacket(CONTINUE_CHANGES, POINTS_DATA, changeType, scanType, packet); + packet->byte4ToBuf(pointList->size()); + + packetListOut->push_back(packet); + + int currentCount = 0; + + for (std::vector::iterator iter = pointList->begin(); + iter != pointList->end(); + iter++) { + + if (currentCount >= MAX_POINTS_IN_PACKET) { + + ArNetPacket *packet = new ArNetPacket(); + + addHeaderToPacket(CONTINUE_CHANGES, POINTS_DATA, changeType, scanType, packet); + + packet->byte4ToBuf(-1); // for a continuation... + + packetListOut->push_back(packet); + + currentCount = 0; + } + currentCount++; + /*** + ArLog::log(ArLog::Normal, + "Packed: %li %li", + (long int) (*iter).getX(), + (long int) (*iter).getY()); + ***/ + + packet->byte4ToBuf((long int) (*iter).getX()); + packet->byte4ToBuf((long int) (*iter).getY()); + + } // end for each point + + return true; + +} // end method addPointsPackets + + + +bool ArMapChanger::addLinesPackets + (ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + std::vector *lineSegmentList, + std::list *packetListOut) +{ + if (packetListOut == NULL) { + return false; + } + if ((lineSegmentList == NULL) || (lineSegmentList->empty())) { + return true; + } + + // TODO Could probably make this work similar to the addGroup and addFileLine... + // i.e. append to previous packet if there is room. + + ArNetPacket *packet = new ArNetPacket(); + addHeaderToPacket(CONTINUE_CHANGES, LINES_DATA, changeType, scanType, packet); + + packet->byte4ToBuf(lineSegmentList->size()); + + packetListOut->push_back(packet); + + int currentCount = 0; + + for (std::vector::iterator iter = lineSegmentList->begin(); + iter != lineSegmentList->end(); + iter++) { + + if (currentCount >= MAX_LINES_IN_PACKET) { + + ArNetPacket *packet = new ArNetPacket(); + + addHeaderToPacket(CONTINUE_CHANGES, LINES_DATA, changeType, scanType, packet); + packet->byte4ToBuf(-1); // for a continuation... + + packetListOut->push_back(packet); + + currentCount = 0; + } + currentCount++; + + packet->byte4ToBuf((long int) (*iter).getX1()); + packet->byte4ToBuf((long int) (*iter).getY1()); + packet->byte4ToBuf((long int) (*iter).getX2()); + packet->byte4ToBuf((long int) (*iter).getY2()); + + } // end for each point + + return true; + +} // end method addLinesPackets + +// ----------------------------------------------------------------------------- + +bool ArMapChanger::convertPacketListToChangeDetails + (std::list &packetList, + ArMapChangeDetails *changeDetailsOut) +{ + + if (changeDetailsOut == NULL) { + return false; + } + + bool isSuccess = true; + int numPoints = 0; + int numLines = 0; + int numGroups = 0; + int numChildren = 0; + + for (std::list::iterator iter = packetList.begin(); + (isSuccess && iter != packetList.end()); + iter++) { + ArNetPacket *packet = *iter; + if (packet == NULL) { + continue; + } + + MapChangeCommand command = CONTINUE_CHANGES; + ArMapId origMapId; + ArMapId newMapId; + MapChangeDataType dataType = NO_CHANGE; + ArMapChangeDetails::MapLineChangeType changeType =ArMapChangeDetails::ADDITIONS; + std::string scanType; + + bool isSuccess = unpackHeader(packet, + &command, + &origMapId, + &newMapId, + &dataType, + &changeType, + &scanType); + + if (command == START_CHANGES) { + changeDetailsOut->setOrigMapId(origMapId); + changeDetailsOut->setNewMapId(newMapId); + } + + if (command != CONTINUE_CHANGES) { + continue; + } + + switch (dataType) { + + case NO_CHANGE: + break; + + case SUMMARY_DATA: + case INFO_DATA: + case OBJECTS_DATA: + case SUPPLEMENT_DATA: + { + isSuccess = unpackFileLineSet(packet, + dataType, + changeType, + scanType.c_str(), + &numGroups, + &numChildren, + changeDetailsOut); + } + break; + + case POINTS_DATA: + { + isSuccess = unpackPoints(packet, + changeType, + scanType.c_str(), + &numPoints, + changeDetailsOut); + } + break; + case LINES_DATA: + { + isSuccess = unpackLines(packet, + changeType, + scanType.c_str(), + &numLines, + changeDetailsOut); + } + break; + } // end switch dataType + + } // end for each packet + + return isSuccess; + +} // end method convertPacketListToChangeDetails + + +bool ArMapChanger::unpackHeader(ArNetPacket *packet, + MapChangeCommand *commandOut, + ArMapId *origMapIdOut, + ArMapId *newMapIdOut, + MapChangeDataType *dataTypeOut, + ArMapChangeDetails::MapLineChangeType *changeTypeOut, + std::string *scanTypeOut) +{ + if (packet == NULL) { + return false; + } + if ((commandOut == NULL) || (origMapIdOut == NULL)) { + return false; + } + ArTypes::UByte2 commandVal = packet->bufToUByte2(); + + if ((commandVal > LAST_CHANGE_COMMAND)) { + return false; + } + + *commandOut = (MapChangeCommand) commandVal; + + bool isSuccess = true; + + isSuccess = ArMapId::fromPacket(packet, origMapIdOut) && isSuccess; + + if (newMapIdOut == NULL) { + return isSuccess; + } + + isSuccess = ArMapId::fromPacket(packet, newMapIdOut) && isSuccess; + + if ((commandVal != CONTINUE_CHANGES)) { + return isSuccess; + } + + if (dataTypeOut == NULL) { + return isSuccess; + } + + int dataTypeVal = packet->bufToUByte(); + if ((dataTypeVal < 0) || (dataTypeVal > LAST_CHANGE_DATA_TYPE)) { + ArLog::log(ArLog::Normal, + "ArMapChanger::convertPacketListToChangeDetails() data type error (%i)", + dataTypeVal); + return false; + } + *dataTypeOut = (MapChangeDataType) dataTypeVal; + + + if (changeTypeOut == NULL) { + return isSuccess; + } + + int changeTypeVal = packet->bufToUByte(); + if ((changeTypeVal < 0) || (changeTypeVal > ArMapChangeDetails::LAST_CHANGE_TYPE)) { + ArLog::log(ArLog::Normal, + "ArMapChanger::convertPacketListToChangeDetails() change type error (%i)", + changeTypeVal); + return false; + } + + *changeTypeOut = (ArMapChangeDetails::MapLineChangeType) changeTypeVal; + + if (scanTypeOut == NULL) { + return isSuccess; + } + + char buf[512]; + buf[0] = '\0'; + packet->bufToStr(buf, sizeof(buf)); + *scanTypeOut = buf; + + return isSuccess; + +} // end method unpackHeader + +bool ArMapChanger::unpackFileLineSet(ArNetPacket *packet, + MapChangeDataType dataType, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + int *numGroups, + int *numChildren, + ArMapChangeDetails *changeDetails) +{ + + if ((packet == NULL) || (numGroups == NULL) || + (numChildren == NULL) || (changeDetails == NULL)) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() param error"); + return false; + } + + + // TODO Get info type... + int extra = packet->bufToByte4(); + + + int tempGroups = packet->bufToByte4(); + if (tempGroups >= 0) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() setting numGroups to %i", tempGroups)); + *numGroups = tempGroups; + } + else { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() continuing from previous (numGroups = %i)", + *numGroups)); + + } // continuing from previous... + + if (*numGroups <= 0) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() invalid group count %i", + *numGroups); + return false; + } + + + ArMapFileLineSet *fileLineSet = NULL; + + switch (dataType) { + case SUMMARY_DATA: + fileLineSet = changeDetails->getChangedSummaryLines(changeType, scanType); + break; + case INFO_DATA: + { + const char *infoName = NULL; + if ((extra >= 0) && (extra < (int) myInfoNames.size())) { + int i = 0; + for (std::list::iterator iter = myInfoNames.begin(); + iter != myInfoNames.end(); + iter++, i++) { + if (i == extra) { + infoName = (*iter).c_str(); + break; + } + } // end for + } // end if + if (infoName != NULL) { + fileLineSet = changeDetails->getChangedInfoLines(infoName, changeType); + } + } + break; + case OBJECTS_DATA: + fileLineSet = changeDetails->getChangedObjectLines(changeType); + break; + default: + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() unexpected data type %i", + dataType); + return false; + break; + } + + if (fileLineSet == NULL) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() null file line set for %i", + dataType); + return false; + } + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() unpacking packet for data type %i", + dataType)); + + char buf[10000]; + + while ((*numGroups > 0) && + (packet->getReadLength() < packet->getLength()) && + (packet->isValid())) { + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() begin loop, numGroups = %i", + *numGroups)); + + int tempChildren = packet->bufToByte4(); + if (tempChildren >= 0) { + *numChildren = tempChildren; + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() setting numChildren to %i", tempChildren)); + } + else { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() continuing previous children %i", *numChildren)); + } // continuing from previous... + + // Note that it's alright to have 0 children + if (*numChildren < 0) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() invalid child count %i", + *numChildren); + return false; + } + + if (tempChildren >= 0) { + + // this is the parent + int lineNum = packet->bufToByte4(); + packet->bufToStr(buf, sizeof(buf)); + + if (!packet->isValid()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() packet not valid"); + return false; + } + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() creating new group: #%i %s", + lineNum, buf)); + + ArMapFileLineGroup newGroup(ArMapFileLine(lineNum, buf)); + fileLineSet->push_back(newGroup); + + + } + if (*numChildren > 0) { + + if (fileLineSet->empty()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() no parent for children"); + return false; + } + ArMapFileLineGroup &group = fileLineSet->back(); + + while ((*numChildren > 0) && + (packet->getReadLength() < packet->getLength()) && + (packet->isValid())) { + + int childLineNum = packet->bufToByte4(); + packet->bufToStr(buf, sizeof(buf)); + + if (!packet->isValid()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() invalid packet in child read"); + return false; + } + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() creating new child (of #%i): #%i %s", + group.getParentLine()->getLineNum(), + childLineNum, + buf)); + group.getChildLines()->push_back(ArMapFileLine(childLineNum, buf)); + + *numChildren = *numChildren - 1; + + } // end while more children to read + + IFDEBUG( + if (*numChildren <= 0) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() exited inner loop because numChildren = %i", + *numChildren); + + } + else if (packet->getReadLength() >= packet->getLength()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() exited inner loop because readLength (%i) >= length (%i)", + packet->getReadLength(), packet->getLength()); + + } + else if (!packet->isValid()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() exited inner loop because packet not valid"); + + } + ); + + + + } // end if there were children to read + + if (*numChildren == 0) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() done reading group, old num = %i", + *numGroups)); + + + *numGroups = *numGroups - 1; + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() done reading group, new num = %i", + *numGroups)); + } + + } // end while more to read from packet + + IFDEBUG( + if (*numGroups <= 0) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() exited loop because numGroups = %i", + *numGroups); + + } + else if (packet->getReadLength() >= packet->getLength()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() exited loop because readLength (%i) >= length (%i)", + packet->getReadLength(), packet->getLength()); + + } + else if (!packet->isValid()) { + ArLog::log(ArLog::Normal, + "ArMapChanger::unpackFileLineSet() exited loop because packet not valid"); + + } + ); + + return true; + +} // end method unpackFileLineSet + + +bool ArMapChanger::unpackPoints(ArNetPacket *packet, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + int *numPoints, + ArMapChangeDetails *changeDetails) +{ + if ((packet == NULL) || (numPoints == NULL) || (changeDetails == NULL)) { + return false; + } + + int tempPoints = packet->bufToByte4(); + if (tempPoints >= 0) { + *numPoints = tempPoints; + ArLog::log(ArLog::Normal, + "Set numPoints = %i", tempPoints); + } + else {} // continuing from previous... + + if (*numPoints <= 0) { + return false; + } + + std::vector *pointList = changeDetails->getChangedPoints(changeType, scanType); + + for (int i = 0; i < MAX_POINTS_IN_PACKET; i++) { + + long int x = packet->bufToByte4(); + long int y = packet->bufToByte4(); + + ArPose p(x, y); + pointList->push_back(p); + + /*** + ArLog::log(ArLog::Normal, + "Unpacked: %li %li", + (long int) p.getX(), + (long int) p.getY()); + ***/ + + *numPoints = *numPoints - 1; + if (*numPoints == 0) { + // TODO: Make sure packet is empty? + return true; + } + } // end for each point in packet + + // TODO: Make sure packet is empty? + + return true; + +} // end method unpackPoints + +bool ArMapChanger::unpackLines(ArNetPacket *packet, + ArMapChangeDetails::MapLineChangeType changeType, + const char *scanType, + int *numLines, + ArMapChangeDetails *changeDetails) +{ + if ((packet == NULL) || (numLines == NULL) || (changeDetails == NULL)) { + return false; + } + + int tempLines = packet->bufToByte4(); + if (tempLines >= 0) { + *numLines = tempLines; + } + else {} // continuing from previous... + + if (*numLines <= 0) { + return false; + } + + std::vector *lineSegmentList = + changeDetails->getChangedLineSegments(changeType, scanType); + + for (int i = 0; i < MAX_LINES_IN_PACKET; i++) { + + long int x1 = packet->bufToByte4(); + long int y1 = packet->bufToByte4(); + long int x2 = packet->bufToByte4(); + long int y2 = packet->bufToByte4(); + + lineSegmentList->push_back(ArLineSegment(x1, y1, x2, y2)); + *numLines = *numLines - 1; + if (*numLines == 0) { + // TODO: Make sure packet is empty? + return true; + } + } // end for each point in packet + + // TODO: Make sure packet is empty? + + return true; + +} // end method unpackLines + + +AREXPORT bool ArMapChanger::addChangeCB(ArFunctor2 *> *functor) +{ + if (functor == NULL) { + return false; + } + myChangeCBList.push_back(functor); + return true; +} + +AREXPORT bool ArMapChanger::remChangeCB + (ArFunctor2 *> *functor) +{ + if (functor == NULL) { + return false; + } + // TODO Improve return val + myChangeCBList.remove(functor); + return true; + +} + +AREXPORT bool ArMapChanger::addRobotChangeReplyCB + (ArFunctor2 *functor) +{ + if (functor == NULL) { + return false; + } + myRobotChangeReplyCBList.push_back(functor); + return true; + +} // end method addRobotChangeReplyCB + + +AREXPORT bool ArMapChanger::remRobotChangeReplyCB + (ArFunctor2 *functor) +{ + if (functor == NULL) { + return false; + } + // TODO Improve return val + myRobotChangeReplyCBList.remove(functor); + return true; + +} // end method remRobotChangeReplyCB + +// ----------------------------------------------------------------------------- + +ArMapChanger::ClientChangeInfo::ClientChangeInfo(ArServerClient *client) : + myClient(client), + myForwarder(NULL), + myStartTime(), + myLastActivityTime(), + myPacketList() +{ +} + +ArMapChanger::ClientChangeInfo::ClientChangeInfo(ArCentralForwarder *forwarder) : + myClient(NULL), + myForwarder(forwarder), + myStartTime(), + myLastActivityTime(), + myPacketList() +{ +} + + +ArMapChanger::ClientChangeInfo::~ClientChangeInfo() +{ + ArUtil::deleteSet(myPacketList.begin(), myPacketList.end()); + myPacketList.clear(); +} + +void ArMapChanger::ClientChangeInfo::addPacket(ArNetPacket *packet) +{ + if (packet == NULL) { + return; + } + ArNetPacket *packetCopy = new ArNetPacket(); + packetCopy->duplicatePacket(packet); + packetCopy->resetRead(); + + myPacketList.push_back(packetCopy); + +} // end method addPacket + + +AREXPORT void ArMapChanger::addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position) +{ + addToCallbackList(functor, position, &myPreWriteCBList); + +} // end method addPreWriteFileCB + +AREXPORT void ArMapChanger::remPreWriteFileCB(ArFunctor *functor) +{ + remFromCallbackList(functor, &myPreWriteCBList); + +} // end method remPreWriteFileCB + +AREXPORT void ArMapChanger::addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position) +{ + addToCallbackList(functor, position, &myPostWriteCBList); + +} // end method addPostWriteFileCB + +AREXPORT void ArMapChanger::remPostWriteFileCB(ArFunctor *functor) +{ + remFromCallbackList(functor, &myPostWriteCBList); + +} // end method remPostWriteFileCB + + +AREXPORT void ArMapChanger::addToCallbackList(ArFunctor *functor, + ArListPos::Pos position, + std::list *cbList) +{ + if (functor == NULL) { + ArLog::log(ArLog::Terse, + "ArMapChanger::addToCallbackList cannot add null functor"); + return; + } + if (cbList == NULL) { + ArLog::log(ArLog::Terse, + "ArMapChanger::addToCallbackList cannot add functor to null list"); + return; + } + + switch (position) { + case ArListPos::FIRST: + cbList->push_front(functor); + break; + case ArListPos::LAST: + cbList->push_back(functor); + break; + default: + ArLog::log(ArLog::Terse, + "ArMapChanger::addToCallbackList invalid position (%i)", + position); + } // end switch +} // end method addToCallbackList + +AREXPORT void ArMapChanger::remFromCallbackList(ArFunctor *functor, + std::list *cbList) +{ + if (functor == NULL) { + ArLog::log(ArLog::Terse, + "ArMapChanger::remFromCallbackList cannot remove null functor"); + return; + } + if (cbList == NULL) { + ArLog::log(ArLog::Terse, + "ArMapChanger::addToCallbackList cannot remove functor to null list"); + return; + } + cbList->remove(functor); + +} // end method remFromCallbackList + + +AREXPORT void ArMapChanger::handleRobotChangeReplyPacket(ArServerClient *client, + ArNetPacket *packet) +{ + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapChanger::handleRobotChangeReplyPacket()")); + + myInterleaveMutex.lock(); + if (!myIsWaitingForReturn) + { + myInterleaveMutex.unlock(); + return; + } + + char robotName[512]; + packet->bufToStr(robotName, sizeof(robotName)); + + int ret = packet->bufToUByte2(); + + // packet->bufToStr(fileName, sizeof(fileName)); + // if (myInterleaved && ret == 10) + if (ret == CHANGE_SUCCESS) + { + myReadyForNextPacket = true; + myIsWaitingForReturn = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::handleRobotChangeReplyPacket() set myReadyForNextPacket = true && myIsWaitingForReturn = false"); + } + else + { + myIsWaitingForReturn = false; + ArLog::log(ArLog::Normal, + "ArMapChanger::handleRobotChangeReplyPacket() set myIsWaitingForReturn = false"); + } + + myInterleaveMutex.unlock(); + + for (std::list< ArFunctor2 *>::iterator cbIter = + myRobotChangeReplyCBList.begin(); + cbIter != myRobotChangeReplyCBList.end(); + cbIter++) { + + packet->resetRead(); + + ArFunctor2 *functor = *cbIter; + + if (functor != NULL) { + functor->invoke(client, packet); + } + } +} // end method handleRobotChangeReplyPacket + + diff --git a/Legacy/Aria/ArNetworking/src/ArNetPacket.cpp b/Legacy/Aria/ArNetworking/src/ArNetPacket.cpp new file mode 100644 index 0000000..2e4d723 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetPacket.cpp @@ -0,0 +1,212 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArNetPacket.h" + +AREXPORT ArNetPacket::ArNetPacket(ArTypes::UByte2 bufferSize) : + ArBasePacket(bufferSize, ArNetPacket::HEADER_LENGTH, NULL, + ArNetPacket::FOOTER_LENGTH), + myPacketSource(TCP), + myAddedFooter(false), + myArbitraryString(), + myCommand(0) +{ + insertHeader(); +} + +AREXPORT ArNetPacket::ArNetPacket(const ArNetPacket &other) : + ArBasePacket(other), + myPacketSource(other.myPacketSource), + myAddedFooter(other.myAddedFooter), + myArbitraryString(other.myArbitraryString), + myCommand(other.myCommand) +{ +} + +AREXPORT ArNetPacket &ArNetPacket::operator=(const ArNetPacket &other) +{ + if (this != &other) { + ArBasePacket::operator=(other); + myPacketSource = other.myPacketSource; + myAddedFooter = other.myAddedFooter; + myArbitraryString = other.myArbitraryString; + myCommand = other.myCommand; + } + return *this; +} + + +AREXPORT ArNetPacket::~ArNetPacket() +{ + +} + +AREXPORT void ArNetPacket::doubleToBuf(double val) +{ + char buf[256]; + if (val == -HUGE_VAL) + sprintf(buf, "-INF"); + else if (val == HUGE_VAL) + sprintf(buf, "INF"); + else + sprintf(buf, "%g", val); + strToBuf(buf); +} + +AREXPORT double ArNetPacket::bufToDouble(void) +{ + char buf[256]; + char *endPtr; + double ret; + + bufToStr(buf, sizeof(buf)); + if (strncmp(buf, "-INF", sizeof(buf)) == 0) + { + ret = -HUGE_VAL; + return ret; + } + else if (strncmp(buf, "INF", sizeof(buf)) == 0) + { + ret = HUGE_VAL; + return ret; + } + else + { + ret = strtod(buf, &endPtr); + if (endPtr[0] == '\0' && endPtr != buf) + return ret; + else + return 0; + } +} + +AREXPORT void ArNetPacket::empty(void) +{ + myCommand = 0; + myLength = myHeaderLength; + myAddedFooter = false; + resetValid(); +} + + +void ArNetPacket::insertHeader() +{ + int length = myLength; + myLength = 0; + uByteToBuf(0xF); // 1 + uByteToBuf(0xC); // 2 + + if (myAddedFooter) + uByte2ToBuf(length); // 3 & 4 + else + uByte2ToBuf(length+2); // 3 & 4 + + uByte2ToBuf(myCommand); // 5 & 6 + + if (myAddedFooter) + myLength = length - 2; + else + myLength = length; + +} // end method insertHeader + + +AREXPORT void ArNetPacket::finalizePacket(void) +{ + + insertHeader(); + + int chkSum = calcCheckSum(); + byteToBuf((chkSum >> 8) & 0xff ); + byteToBuf(chkSum & 0xff ); + myAddedFooter = true; + //log(); + //printf("%d %d %d\n", myLength ,myCommand, chkSum); +} + +AREXPORT void ArNetPacket::resetRead(void) +{ + myReadLength = 4; + myCommand = bufToUByte2(); + myReadLength = myHeaderLength; + resetValid(); + +} + +AREXPORT void ArNetPacket::setCommand(ArTypes::UByte2 command) +{ + myCommand = command; +} + +AREXPORT ArTypes::UByte2 ArNetPacket::getCommand(void) +{ + return myCommand; +} + +AREXPORT void ArNetPacket::duplicatePacket(ArNetPacket *packet) +{ + myLength = packet->myLength; + + // if (myMaxLength < myLength) + // setMaxLength(packet->myLength); + if (myMaxLength < myLength + packet->myFooterLength) + setMaxLength(packet->myLength + packet->myFooterLength); + + myReadLength = packet->myReadLength; + myHeaderLength = packet->myHeaderLength; + myFooterLength = packet->myFooterLength; + myCommand = packet->myCommand; + myAddedFooter = packet->myAddedFooter; + memcpy(myBuf, packet->getBuf(), packet->myLength + packet->myFooterLength); + myArbitraryString = packet->myArbitraryString; +} + +AREXPORT ArTypes::Byte2 ArNetPacket::calcCheckSum(void) +{ + int c = 0; + + //printf("%d\n", myLength); + //log(); + int i = 3; + int n = myLength - 2; + + while (n > 3) { + + //printf("n %d i %d c %d c1 %d c2 %d\n", n, i, c, myBuf[i], myBuf[i+1]); + c += ((unsigned char)myBuf[i]<<8) | (unsigned char)myBuf[i+1]; + c = c & 0xffff; + n -= 2; + i += 2; + } + //printf("aft n %d i %d c %d\n", n, i, c); + if (n > 0) + c = c ^ (int)((unsigned char) myBuf[i]); + //printf("%d\n", c); + return c; +} + +AREXPORT bool ArNetPacket::verifyCheckSum(void) +{ + ArTypes::Byte2 chksum; + ArTypes::Byte2 calcedChksum; + unsigned char c1, c2; + int length; + + if (myLength - 2 < myHeaderLength) + return false; + + c2 = myBuf[myLength-2]; + c1 = myBuf[myLength-1]; + chksum = (c1 & 0xff) | (c2 << 8); + length = myLength; + myLength = myLength - 2; + calcedChksum = calcCheckSum(); + myLength = length; + + //printf("%d %d\n", chksum, calcedChksum); + if (chksum == calcedChksum) { + return true; + } else { + return false; + } + +} diff --git a/Legacy/Aria/ArNetworking/src/ArNetPacketReceiverTcp.cpp b/Legacy/Aria/ArNetworking/src/ArNetPacketReceiverTcp.cpp new file mode 100644 index 0000000..622626d --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetPacketReceiverTcp.cpp @@ -0,0 +1,328 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArNetPacketReceiverTcp.h" +#ifndef WIN32 +#include "errno.h" +#endif + +AREXPORT ArNetPacketReceiverTcp::ArNetPacketReceiverTcp() : + + myState(STATE_SYNC1), + myProcessPacketCB(NULL), + myQuiet(false), + mySocket(NULL), + myLastPacket(), + myPacket(), + + myReadBuff(), + myReadCount(0), + myReadLength(0), + myReadCommand(0), + mySync1(0xF), + mySync2(0xC), + myLoggingPrefix("") +{ + memset(myReadBuff, 0, TOTAL_PACKET_LENGTH); +} + +AREXPORT ArNetPacketReceiverTcp::~ArNetPacketReceiverTcp() +{ + +} + +/** + Sets the socket that this receiver will use, note that it does not + transfer ownership of the socket. + + @param socket the socket to use for receiving data +**/ +AREXPORT void ArNetPacketReceiverTcp::setSocket(ArSocket *socket) +{ + mySocket = socket; +} + +AREXPORT void ArNetPacketReceiverTcp::setLoggingPrefix( + const char *loggingPrefix) +{ + if (loggingPrefix != NULL && loggingPrefix[0] != '\0') + myLoggingPrefix = loggingPrefix; + else + myLoggingPrefix = ""; +} + +/** + Gets the socket that the receiver is using, note that it does not + have ownership of this socket and that whatever created it should. +**/ +AREXPORT ArSocket *ArNetPacketReceiverTcp::getSocket(void) +{ + return mySocket; +} + +/** + This reads in the available data in the TCP port so that packets + can be fetched with getPacket. If an error occurs that is + unrecoverable false will be returned which means that the socket + owner who is calling this should close the socket and clean up. + + @return false on an error that should cause the socket to be closed, + true with no errors +**/ +AREXPORT bool ArNetPacketReceiverTcp::readData(void) +{ + Ret ret; + + while (1) + { + ret = readPacket(100); + if (ret == RET_TIMED_OUT) + { + // commenting this out since it can happen really often + // sometimes and there's an actual timeout that causes the + // connect to get dropped so the informational printf isn't + // needed + //if (!myQuiet) + //ArLog::log(ArLog::Normal, "%sReadTcp timed out", + //myLoggingPrefix.c_str()); + return true; + } + else if (ret == RET_CONN_CLOSED) + { + if (!myQuiet) + ArLog::log(ArLog::Terse, "%sConnection to %s closed", + myLoggingPrefix.c_str(), mySocket->getIPString()); + return false; + } + else if (ret == RET_CONN_ERROR) + { + if (!myQuiet) + ArLog::log(ArLog::Terse, + "%sConnection to %s had an error and is being closed", + myLoggingPrefix.c_str(), mySocket->getIPString()); + return false; + } + else if (ret == RET_FAILED_READ) + { + // this now just returns true since the previous checks for if + // the failed read was an error or not are handled by readpacket + // now + return true; + } + else if (ret == RET_BAD_PACKET) + { + // well... there was a bad checksum, keep going + } + else if (ret == RET_GOT_PACKET) + { + if (myProcessPacketCB != NULL) + { + //printf("Got in a packet of %d\n", myPacket.getCommand()); + myPacket.setPacketSource(ArNetPacket::TCP); + myProcessPacketCB->invoke(&myPacket); + } + } + else + { + if (!myQuiet) + ArLog::log(ArLog::Terse, "%sArNetPacketReceiverTcp: bad Ret value %d", myLoggingPrefix.c_str(), ret); + return false; + } + } +} + +AREXPORT ArNetPacketReceiverTcp::Ret ArNetPacketReceiverTcp::readPacket(int msWait) +{ + long timeToRunFor = -1; + int numRead = 0; + bool printing = true; + int ret = 0; + unsigned char c = 0; + + ArTime timeDone; + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArNetPacketReceiverTcp::readPacket() error adding msecs (%i)", + msWait); + } + + //printf("Read packet!\n"); + do + { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + + if (myState != STATE_ACQUIRE_DATA) + { + c = 0; + if ((ret = mySocket->read((char *)&c, 1, 0/*timeToRunFor*/)) == -1) + { + if (!mySocket->getBadRead() && myState == STATE_SYNC1) + { + return RET_FAILED_READ; + } + else + { + // if the read is fine, just return timed out + if (!mySocket->getBadRead()) + return RET_TIMED_OUT; + // otherwise return the connection is closed (since that's + // some -1 error other than to try again, meaning a socket + // error of some kind) + else + return RET_CONN_ERROR; + } + } + else if (ret == 0) + { + return RET_CONN_CLOSED; + } + } + + /* + if (myState != STATE_ACQUIRE_DATA) + { + printf("%d", myState); + printf(" %d\n", c); + } + */ + //else + //{ + //printf("\n"); + //} + switch (myState) { + case STATE_SYNC1: + if (c == mySync1) // move on, resetting packet + { + myState = STATE_SYNC2; + myPacket.empty(); + myPacket.setLength(0); + myPacket.uByteToBuf(c); + } + else + { + if (printing) + ArLog::log(ArLog::Verbose, "%sBad char in sync1 %d", myLoggingPrefix.c_str(), c); + return RET_BAD_PACKET; + } + break; + case STATE_SYNC2: + if (c == mySync2) // move on, adding this byte + { + myState = STATE_LENGTH1; + myPacket.uByteToBuf(c); + } + else // go back to beginning, packet hosed + { + if (printing) + ArLog::log(ArLog::Verbose, "%sBad char in sync2 %d, returning to sync1", myLoggingPrefix.c_str(), c); + myState = STATE_SYNC1; + return RET_BAD_PACKET; + } + break; + case STATE_LENGTH1: + myState = STATE_LENGTH2; + myReadLength = ((unsigned int)c & 0xff); + myPacket.uByteToBuf(c); + break; + case STATE_LENGTH2: + myState = STATE_ACQUIRE_DATA; + myReadLength += ((unsigned int)c & 0xff) << 8; + myPacket.uByteToBuf(c); + myReadCount = 0; + break; + case STATE_ACQUIRE_DATA: + if (myReadLength > ArNetPacket::MAX_LENGTH || + myReadLength < myPacket.getHeaderLength() + myPacket.getFooterLength()) + { + if (!myQuiet) + ArLog::log(ArLog::Normal, + "%sArNetPacketReceiverTcp::readPacket: bad packet length, it is %d which is more than max length of %d bytes or less than the minimum %d", + myLoggingPrefix.c_str(), myReadLength, + ArNetPacket::MAX_LENGTH, + myPacket.getHeaderLength() + myPacket.getFooterLength()); + myState = STATE_SYNC1; + return RET_BAD_PACKET; + } + + // here we read until we get as much as we want, OR until + // we go 100 ms without data... its arbitrary but it doesn't happen often + // and it'll mean a bad packet anyways + if (myReadCount < myReadLength - 4) + { + numRead = mySocket->read(myReadBuff + myReadCount, + myReadLength - myReadCount - 4); + //printf("numRead %d myReadLength %d\n", numRead, myReadLength); + // trap if it wasn't data + if (numRead == 0) + return RET_CONN_CLOSED; + else if (numRead < 0) + return RET_FAILED_READ; + // if it was data add it to our number read + myReadCount += numRead; + } + if (myReadCount > myReadLength - 4) + { + if (!myQuiet) + ArLog::log(ArLog::Terse, + "%sRead is greater than it should be at %d > %d", + myLoggingPrefix.c_str(), myReadCount, myReadLength - 4); + } + if (myReadCount == myReadLength - 4) + { + myPacket.dataToBuf(myReadBuff, myReadCount); + + if (myPacket.verifyCheckSum()) + { + myPacket.resetRead(); + // take off the footer from the packets length Variable + /* put this in if you want to see the packets received + //printf("Input "); + myPacket.log(); + */ + // you can also do this next line if you only care about type + //printf("Input %x\n", myPacket.getCommand()); + //myPacket.log(); + myState = STATE_SYNC1; + return RET_GOT_PACKET; + } + else + { + myPacket.resetRead(); + //if (!myQuiet) + ArLog::log(ArLog::Normal, + "%sArNetPacketReceiverTcp::receivePacket: bad packet, bad checksum on packet %d", myLoggingPrefix.c_str(), myPacket.getCommand()); + myState = STATE_SYNC1; + return RET_BAD_PACKET; + } + } + break; + default: + break; + } + } while (timeDone.mSecTo() >= 0 || myState != STATE_SYNC1); + + return RET_TIMED_OUT; + +} + + +/** + @param functor the callback to use when a packet needs to be processed +**/ +AREXPORT void ArNetPacketReceiverTcp::setProcessPacketCB( + ArFunctor1 *functor) +{ + myProcessPacketCB = functor; +} + +/** + @return the callback used when a packet needs to be processed +**/ +AREXPORT ArFunctor1 *ArNetPacketReceiverTcp::getProcessPacketCB(void) +{ + return myProcessPacketCB; +} + + diff --git a/Legacy/Aria/ArNetworking/src/ArNetPacketReceiverUdp.cpp b/Legacy/Aria/ArNetworking/src/ArNetPacketReceiverUdp.cpp new file mode 100644 index 0000000..cf23063 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetPacketReceiverUdp.cpp @@ -0,0 +1,141 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArNetPacketReceiverUdp.h" +#ifndef WIN32 +#include +#endif + +AREXPORT ArNetPacketReceiverUdp::ArNetPacketReceiverUdp() : + myProcessPacketCB(NULL), + mySocket(NULL), + myLastPacket(), + myPacket(), + myBuff() +{ + memset(myBuff, 0, ArNetPacket::MAX_LENGTH+20); + + // one little odd note, this calls setBuf on the packet so that its + // using our own buffer and not its own... this is the only place we + // don't want it to own the buffer + myPacket.setBuf(myBuff, sizeof(myBuff)); +} + +AREXPORT ArNetPacketReceiverUdp::~ArNetPacketReceiverUdp() +{ + +} + +/** + Sets the socket that this receiver will use, note that it does not + transfer ownership of the socket. + + @param socket the socket to use for receiving data +**/ +AREXPORT void ArNetPacketReceiverUdp::setSocket(ArSocket *socket) +{ + mySocket = socket; +} + +/** + Gets the socket that the receiver is using, note that it does not + have ownership of this socket and that whatever created it should. +**/ +AREXPORT ArSocket *ArNetPacketReceiverUdp::getSocket(void) +{ + return mySocket; +} + + +/** + @param functor the callback to use when a packet needs to be processed +**/ +AREXPORT void ArNetPacketReceiverUdp::setProcessPacketCB( + ArFunctor2 *functor) +{ + myProcessPacketCB = functor; +} + +/** + @return the callback used when a packet needs to be processed +**/ +AREXPORT ArFunctor2 *ArNetPacketReceiverUdp::getProcessPacketCB(void) +{ + return myProcessPacketCB; +} + +AREXPORT bool ArNetPacketReceiverUdp::readData(void) +{ + int ret; + int packetLength; + struct sockaddr_in sin; + + if (mySocket == NULL) + { + ArLog::log(ArLog::Verbose, "NULL Udp Socket"); + return false; + } + // while we can read a packet, do it + while ((ret = mySocket->recvFrom(myBuff, sizeof(myBuff), &sin)) > 0) + { + packetLength = (myBuff[3] << 8) | myBuff[2] & 0xff; + if (ret != packetLength) + fprintf(stderr, "packet length %d not equal to udp packet length %d", + packetLength, ret); + myPacket.setLength(packetLength); + myPacket.setBuf(myBuff, sizeof(myBuff)); + if (myPacket.verifyCheckSum()) + { + myPacket.resetRead(); + /* put this in if you want to see the packets received + //printf("Input "); + myPacket.log(); + */ + // you can also do this next line if you only care about type + //printf("Input %x\n", myPacket.getCommand()); + //myPacket.log(); + myPacket.resetRead(); + if (myProcessPacketCB != NULL) + { + myPacket.setPacketSource(ArNetPacket::UDP); + myProcessPacketCB->invoke(&myPacket, &sin); + } + } + else + { + myPacket.resetRead(); + ArLog::log(ArLog::Normal, + "ArNetPacketReceiverUdp::receivePacket: bad packet, bad checksum on packet %d", myPacket.getCommand()); + } + + } + + + + // see why we ran out of packets, if its bad return false so that it + // is known the socket is bad now + if (ret < 0) + { +#ifdef WIN32 + if (WSAGetLastError() == WSAEWOULDBLOCK || WSAGetLastError() == WSAECONNRESET) + return true; + else + ArLog::log(ArLog::Terse, "Failed on read UDP, error %d", WSAGetLastError()); +#endif +#ifndef WIN32 + if (errno == EAGAIN) + return true; + else + ArLog::log(ArLog::Terse, "Failed on read UDP, error %d", errno); +#endif + ArLog::log(ArLog::Terse, "Failed on the udp read"); + return false; + } + else if (ret == 0) + { + printf("Read 0 byte UDP packet\n"); + return true; + } + + return true; + +} diff --git a/Legacy/Aria/ArNetworking/src/ArNetPacketSenderTcp.cpp b/Legacy/Aria/ArNetworking/src/ArNetPacketSenderTcp.cpp new file mode 100644 index 0000000..5479d5d --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetPacketSenderTcp.cpp @@ -0,0 +1,251 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArNetPacketSenderTcp.h" + +AREXPORT ArNetPacketSenderTcp::ArNetPacketSenderTcp() : + mySocket(NULL), + myPacketList(), + myPacket(NULL), + myAlreadySent(false), + myBuf(NULL), + myLength(0) +{ + myDataMutex.setLogName("ArNetPacketSenderTcp::myDataMutex"); + setDebugLogging(false); + myBackupTimeout = -1; + myLastGoodSend.setToNow(); +} + +AREXPORT ArNetPacketSenderTcp::~ArNetPacketSenderTcp() +{ + ArNetPacket *packet; + int i = 0; + long bytes = 0; + while (myPacketList.begin() != myPacketList.end()) + { + i++; + packet = myPacketList.front(); + bytes += packet->getLength(); + myPacketList.pop_front(); + delete packet; + } + if (i > 0) + ArLog::log(ArLog::Normal, "Deleted %d packets of %d bytes", i, bytes); +} + +/** + Sets the socket that this receiver will use, note that it does not + transfer ownership of the socket. + + @param socket the socket to use for receiving data +**/ +AREXPORT void ArNetPacketSenderTcp::setSocket(ArSocket *socket) +{ + myDataMutex.lock(); + mySocket = socket; + myDataMutex.unlock(); +} + +AREXPORT void ArNetPacketSenderTcp::setBackupTimeout( + double connectionTimeoutInMins) +{ + myBackupTimeout = connectionTimeoutInMins; +} + +AREXPORT void ArNetPacketSenderTcp::setLoggingPrefix( + const char *loggingPrefix) +{ + if (loggingPrefix != NULL && loggingPrefix[0] != '\0') + myLoggingPrefix = loggingPrefix; + else + myLoggingPrefix = ""; +} + +AREXPORT void ArNetPacketSenderTcp::setDebugLogging(bool debugLogging) +{ + myDebugLogging = debugLogging; + if (myDebugLogging) + myVerboseLogLevel = ArLog::Normal; + else + myVerboseLogLevel = ArLog::Verbose; +} + +/** + Gets the socket that the receiver is using, note that it does not + have ownership of this socket and that whatever created it should. +**/ +AREXPORT ArSocket *ArNetPacketSenderTcp::getSocket(void) +{ + return mySocket; +} + +AREXPORT void ArNetPacketSenderTcp::sendPacket(ArNetPacket *packet, + const char *loggingString) +{ + ArNetPacket *sendPacket; + sendPacket = new ArNetPacket(packet->getLength() + 5); + sendPacket->duplicatePacket(packet); + if (myDebugLogging && sendPacket->getCommand() <= 255 && + loggingString != NULL && loggingString[0] != '\0') + sendPacket->setArbitraryString(loggingString); + myDataMutex.lock(); + myPacketList.push_back(sendPacket); + /* this shouldn't really ever be in doubt + if (myDebugLogging && sendPacket->getCommand() <= 255 && + loggingString != NULL && loggingString[0] != '\0') + ArLog::log(ArLog::Normal, "%s Sender put command %d in list", + myLoggingPrefix.c_str(), + loggingString, sendPacket->getCommand()); + */ + myDataMutex.unlock(); +} + +AREXPORT bool ArNetPacketSenderTcp::sendData(void) +{ + int ret; + ArTime start; + start.setToNow(); + //printf("sendData %g\n", start.mSecSince() / 1000.0); + myDataMutex.lock(); + // if we have no data to send count it as a good send + if (myPacketList.begin() == myPacketList.end() && myPacket == NULL) + myLastGoodSend.setToNow(); + + while (myPacketList.begin() != myPacketList.end() || myPacket != NULL) + { + if (myPacket == NULL) + { + //printf("!startedSending %g\n", start.mSecSince() / 1000.0); + myPacket = myPacketList.front(); + myPacketList.pop_front(); + myAlreadySent = 0; + myBuf = myPacket->getBuf(); + myLength = myPacket->getLength(); + if (myDebugLogging && myPacket->getCommand() <= 255) + ArLog::log(ArLog::Normal, "%s %s Starting sending tcp command %d", + myLoggingPrefix.c_str(), + myPacket->getArbitraryString(), myPacket->getCommand()); + if (myPacket->getCommand() == 0)// || myPacket->getCommand() > 1000) + { + ArLog::log(ArLog::Normal, "%sgetCommand is %d when it probably shouldn't be", myLoggingPrefix.c_str(), myPacket->getCommand()); + } + } + if (myLength < 0 || myLength > ArNetPacket::MAX_LENGTH) + { + ArLog::log(ArLog::Terse, "%sArNetPacketSenderTcp: getLength for command %d packet is bad at %d", + myLoggingPrefix.c_str(), myPacket->getCommand(), myLength); + delete myPacket; + myPacket = NULL; + continue; + } + if (myLength - myAlreadySent == 0) + ArLog::log(ArLog::Normal, "%sHave no data to send... but ...", + myLoggingPrefix.c_str()); + ret = mySocket->write(&myBuf[myAlreadySent], myLength - myAlreadySent); + if (ret < 0) + { + // we didn't send any data so make sure we've sent some recently enough + if (myBackupTimeout >= -.0000001 && myLastGoodSend.secSince() >= 5 && + myLastGoodSend.secSince() / 60.0 >= myBackupTimeout) + { + ArLog::log(ArLog::Normal, "%sConnection to %s backed up for %g minutes and is being closed", + myLoggingPrefix.c_str(), mySocket->getIPString(), + myBackupTimeout); + myDataMutex.unlock(); + return false; + } + +#ifdef WIN32 + if (WSAGetLastError() == WSAEWOULDBLOCK) + { + myDataMutex.unlock(); + if (myDebugLogging && myPacket->getCommand() <= 255) + ArLog::log(ArLog::Normal, + "%s%sContinue sending tcp command %d, no data could be sent", + myLoggingPrefix.c_str(), myPacket->getArbitraryString(), + myPacket->getCommand()); + return true; + } + else + { + ArLog::log(ArLog::Normal, "%sWindows failed write with error %d on packet %d with length of %d", myLoggingPrefix.c_str(), + WSAGetLastError(), myPacket->getCommand(), myLength); + myDataMutex.unlock(); + return false; + } + +#else + if (errno == EAGAIN)/* || errno == EINTR)*/ + { + myDataMutex.unlock(); + if (myDebugLogging && myPacket->getCommand() <= 255) + ArLog::log(ArLog::Normal, + "%s%sContinue sending tcp command %d, no data could be sent", + myLoggingPrefix.c_str(), + myPacket->getArbitraryString(), myPacket->getCommand()); + return true; + } + else + { + ArLog::log(ArLog::Normal, "%sLinux failed write with error %d on packet %d with length of %d", + myLoggingPrefix.c_str(), errno, myPacket->getCommand(), + myLength); + myDataMutex.unlock(); + return false; + } +#endif + } + else if (ret == 0) + { + // we didn't send any data so make sure we've sent some recently enough + if (myBackupTimeout >= -.0000001 && myLastGoodSend.secSince() >= 5 && + myLastGoodSend.secSince() / 60.0 >= myBackupTimeout) + { + ArLog::log(ArLog::Normal, "%sConnection to %s backed up for %g minutes and is being closed", + myLoggingPrefix.c_str(), mySocket->getIPString(), + myBackupTimeout); + myDataMutex.unlock(); + return false; + } + // If network connectivity goes down for a length of time, and the + // socket's buffer fills, we will have this error. An alternative action + // would be to retain myAlreadySent at its current value and keep trying to + // write data to the socket, in the hope that the network will come back. + ArLog::log(myVerboseLogLevel, "%s Couldn't send packet with command %d and length %d: No data could be sent through socket (%d bytes sent until now).", + myLoggingPrefix.c_str(), myPacket->getCommand(), myLength, + myAlreadySent); + myDataMutex.unlock(); + return true; + } + else if (ret > 0) + { + // we sent some data, count it as a good send + myLastGoodSend.setToNow(); + myAlreadySent += ret; + if (myAlreadySent == myLength) + { + if (myDebugLogging && myPacket->getCommand() <= 255) + ArLog::log(ArLog::Normal, "%s%sFinished sending tcp command %d", + myLoggingPrefix.c_str(), myPacket->getArbitraryString(), + myPacket->getCommand()); + //printf("sent one %g\n", start.mSecSince() / 1000.0); + delete myPacket; + myPacket = NULL; + continue; + } + else if (myDebugLogging && myPacket->getCommand() <= 255) + ArLog::log(ArLog::Normal, + "%s%sContinue sending tcp command %d, sent %d", + myLoggingPrefix.c_str(), myPacket->getArbitraryString(), + myPacket->getCommand(), ret); + + } + else + { + ArLog::log(ArLog::Terse, "%sBad case in sArNetPacketSenderTcp::sendData", + myLoggingPrefix.c_str()); + } + } + myDataMutex.unlock(); + return true; +} diff --git a/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2003.vcproj b/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2003.vcproj new file mode 100644 index 0000000..fd77a38 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2003.vcproj @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2008.vcproj b/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2008.vcproj new file mode 100644 index 0000000..86abac8 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2008.vcproj @@ -0,0 +1,700 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2010.vcxproj b/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2010.vcxproj new file mode 100644 index 0000000..cec75e7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetworkingDLL-vc2010.vcxproj @@ -0,0 +1,298 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + ArNetworkingDLL + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} + ArNetworkingDLL + + + + DynamicLibrary + false + MultiByte + false + v100 + + + DynamicLibrary + false + MultiByte + false + v100 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../../bin/ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../../bin/ + ../../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ArNetworkingDebugVC10 + ArNetworkingVC10 + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\../../lib/ArNetworkingDLL.tlb + + + + + MaxSpeed + AnySuitable + true + ..\include;..\..\include;..\internalLibraries\festival\src\include;..\internalLibraries\speech_tools\include;..\internalLibraries\sphinx2\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + Sync + Default + MultiThreadedDLL + false + false + NotSet + true + $(IntDir)$(TargetName)-VC10.pdb + Level3 + true + CompileAsCpp + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetFileName) + true + ../../lib;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName)-VC10.pdb + false + + + ../../lib/ArNetworkingVC10.lib + MachineX86 + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\../../lib/ArNetworkingDLL.tlb + + + + + Disabled + ..\include;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;ARIADLL_EXPORTS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + false + true + $(IntDir)$(TargetName)-VC10.pdb + Level3 + true + ProgramDatabase + CompileAsCpp + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;ws2_32.lib;AriaDebugVC10.lib;%(AdditionalDependencies) + $(OutDir)$(TargetFileName) + true + ../../lib;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName)-VC10.pdb + false + + + ../../lib/ArNetworkingDebugVC10.lib + MachineX86 + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + Default + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + Default + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + Default + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + Default + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + Default + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + Default + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARSPEECHLIB_EXPORTS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {606257ae-e882-4c66-84c0-72331642d09f} + false + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2003.vcproj b/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2003.vcproj new file mode 100644 index 0000000..34df001 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2003.vcproj @@ -0,0 +1,502 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2008.vcproj b/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2008.vcproj new file mode 100644 index 0000000..a96cf45 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2008.vcproj @@ -0,0 +1,514 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2010.vcxproj b/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2010.vcxproj new file mode 100644 index 0000000..d985424 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArNetworkingStatic-vc2010.vcxproj @@ -0,0 +1,263 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + ArNetworkingStatic + {1D08AFC4-1036-425C-B381-6FE522207D47} + + + + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + true + + + StaticLibrary + false + MultiByte + true + Windows7.1SDK + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../../lib\ + ../obj/$(ProjectName)-$(Configuration)-VC10-Static\ + .\../../lib\ + ../obj/$(ProjectName)-$(Configuration)-VC10-Static\ + $(ProjectName)DebugVC10 + $(ProjectName)VC10 + + + + MaxSpeed + OnlyExplicitInline + ../../include;../include;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;ARIA_STATIC;%(PreprocessorDefinitions) + false + Default + MultiThreaded + false + false + NotSet + true + + + $(IntDir)ArNetworkingStaticVC10.pch + $(IntDir) + $(IntDir) + $(IntDir)$(TargetName)-VC10.pdb + Level3 + true + Default + + + .\../../lib\ArNetworkingStaticVC10.lib + true + %(IgnoreSpecificDefaultLibraries) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + Disabled + ../../include;../include;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;ARIA_STATIC;%(PreprocessorDefinitions) + Default + MultiThreadedDebug + false + true + + + $(IntDir)/ArNetworkingStaticVC10.pch + $(IntDir) + $(IntDir) + $(IntDir)$(TargetName)-VC10.pdb + Level3 + true + EditAndContinue + Default + + + .\../../lib\ArNetworkingStaticDebugVC10.lib + true + libcmtd.lib;%(IgnoreSpecificDefaultLibraries) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/src/ArServerBase.cpp b/Legacy/Aria/ArNetworking/src/ArServerBase.cpp new file mode 100644 index 0000000..c309cc5 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerBase.cpp @@ -0,0 +1,2299 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerBase.h" +#include "ArServerCommands.h" +#include "ArClientCommands.h" +#include "ArServerMode.h" + +//#define ARDEBUG_SERVERBASE + +#if (defined(ARDEBUG_SERVERBASE)) +//#if ((_DEBUG) && defined(ARDEBUG_SERVERBASE)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +/** + @param addAriaExitCB whether to add an exit callback to aria or not + @param serverName the name for logging + @param addBackupTimeoutToConfig whether to add the backup timeout + (to clients of this server) as a config option, if this is true it + sets a default value for the timeout of 2 minutes, if its false it + has no timeout (but you can set one, see + ArServerBase::setBackupTimeout()) + @param backupTimeoutName the name of backup timeout + @param backupTimeoutName the description of backup timeout + @param masterServer If this is a master server (ie a central manager) + @param slaveServer If this is a slave server (ie a central forwarder) + @param logPasswordFailureVerbosely Whether we log password failure verbosely or not + @param allowSlowPackets Whether we allow slow packets (that go in + their own thread) or not... if we don't then they're processed in + the main thread like they have always been + @param allowIdlePackets Whether we allow idle packets (that go in + their own thread and are processed only when the robot is idle) or + not... if we don't then they're processed in the main thread like + they have always been + @param numClientsAllowed This is the number of client connections + allowed, negative values mean allow any number (the default is -1) +**/ + +AREXPORT ArServerBase::ArServerBase(bool addAriaExitCB, + const char * serverName, + bool addBackupTimeoutToConfig, + const char *backupTimeoutName, + const char *backupTimeoutDesc, + bool masterServer, bool slaveServer, + bool logPasswordFailureVerbosely, + bool allowSlowPackets, + bool allowIdlePackets, + int maxClientsAllowed) : + myProcessPacketCB(this, &ArServerBase::processPacket), + mySendUdpCB(this, &ArServerBase::sendUdp), + myAriaExitCB(this, &ArServerBase::close), + myGetFrequencyCB(this, &ArServerBase::getFrequency, 0, true), + myProcessFileCB(this, &ArServerBase::processFile), + myIdentGetConnectionIDCB(this, &ArServerBase::identGetConnectionID), + myIdentSetConnectionIDCB(this, &ArServerBase::identSetConnectionID), + myIdentSetSelfIdentifierCB(this, &ArServerBase::identSetSelfIdentifier), + myIdentSetHereGoalCB(this, &ArServerBase::identSetHereGoal), + myStartRequestTransactionCB(this, &ArServerBase::handleStartRequestTransaction), + myEndRequestTransactionCB(this, &ArServerBase::handleEndRequestTransaction), + myIdleProcessingPendingCB(this, &ArServerBase::netIdleProcessingPending) +{ + + + myDataMutex.setLogName("ArServerBase::myDataMutex"); + myClientsMutex.setLogName("ArServerBase::myClientsMutex"); + myCycleCallbacksMutex.setLogName("ArServerBase::myCycleCallbacksMutex"); + myAddListMutex.setLogName("ArServerBase::myAddListMutex"); + myRemoveSetMutex.setLogName("ArServerBase::myRemoveSetMutex"); + myProcessingSlowIdleMutex.setLogName( + "ArServerBase::myProcessingSlowIdleMutex"); + myIdleCallbacksMutex.setLogName( + "ArServerBase::myIdleCallbacksMutex"); + myBackupTimeoutMutex.setLogName("ArServerBase::myBackupTimeoutMutex"); + + if (serverName != NULL && serverName[0] > 0) + myServerName = serverName; + else + myServerName = "ArServer"; + + myLogPrefix = myServerName + "Base: "; + myDebugLogging = false; + myVerboseLogLevel = ArLog::Verbose; + + setThreadName(myServerName.c_str()); + myTcpPort = 0; + myUdpPort = 0; + myRejecting = 0; + myOpened = false; + myUdpReceiver.setProcessPacketCB(&myProcessPacketCB); + if (slaveServer) + myNextDataNumber = 40000; + else + myNextDataNumber = 256; + myUserInfo = NULL; + myAriaExitCB.setName("ArServerBaseExit"); + if (addAriaExitCB) + Aria::addExitCallback(&myAriaExitCB, 20); + + myLogPasswordFailureVerbosely = logPasswordFailureVerbosely; + myConnectionNumber = 1; + + myMostClients = 0; + myUsingOwnNumClients = true; + myNumClients = 0; + + myLoopMSecs = 1; + + if (slaveServer) + { + myAllowSlowPackets = false; + myAllowIdlePackets = false; + } + else + { + myAllowSlowPackets = allowSlowPackets; + myAllowIdlePackets = allowIdlePackets; + } + mySlowIdleThread = NULL; + + if (myAllowSlowPackets || myAllowIdlePackets) + mySlowIdleThread = new SlowIdleThread(this); + + myHaveSlowPackets = false; + myHaveIdlePackets = false; + myHaveIdleCallbacks = false; + + myMaxClientsAllowed = maxClientsAllowed; + + myEnforceType = ArServerCommands::TYPE_UNSPECIFIED; + + if (addBackupTimeoutToConfig) + { + myBackupTimeout = 10; + Aria::getConfig()->addParam( + ArConfigArg(backupTimeoutName, + &myBackupTimeout, + backupTimeoutDesc, -1), + "Connection timeouts", + ArPriority::DETAILED); + myProcessFileCB.setName("ArServerBase"); + Aria::getConfig()->addProcessFileCB(&myProcessFileCB, -100); + } + else + myBackupTimeout = -1; + + myNewBackupTimeout = false; + + if (masterServer) + { + addData("identGetConnectionID", + "gets an id for this connection, this id should then be set on any connections to the other servers associated with this one (ie the ones for individual robots) so that all the connections to one client can be tied together", + &myIdentGetConnectionIDCB, "none", "ubyte4: id", + "RobotInfo", "RETURN_SINGLE"); + } + + if (slaveServer) + { + addData("identSetConnectionID", + "Sets an id for this connection, this id should then be from the getID on the main connection for this server, this is so that all the connections to one client can be tied together", + &myIdentSetConnectionIDCB, "ubyte4: id", "none", + "RobotInfo", "RETURN_SINGLE"); + } + + addData("identSetSelfIdentifier", + "Sets an arbitrary self identifier for this connection, this can be used by programs to send information back to the same client (if this and the identSetHereGoal)", + &myIdentSetSelfIdentifierCB, "string: selfID", "none", + "RobotInfo", "RETURN_SINGLE"); + + addData("identSetHereGoal", + "Sets an string for the here goal for this connection, this can be used by programs to send information back to the same client (if this and the identSetSelfID match)", + &myIdentSetHereGoalCB, "string: hereGoal", "none", + "RobotInfo", "RETURN_SINGLE"); + + addData("requestOnceReturnIsAlwaysTcp", + "The presence of this command means that any requestOnce commands will have the data sent back to them as tcp... any requestOnceUdp will be returned either as tcp or udp (that is up to the callback sending the data)", + &myIdentSetHereGoalCB, "none", "none", + "RobotInfo", "RETURN_NONE"); + + if (myAllowIdlePackets) + addData("idleProcessingPending", + "The presence of this command means that the server will process packets flagged IDLE_PACKET only when the robot is idle. This packet will be broadcast when the state of idle processing changes.", + &myIdleProcessingPendingCB, "none", "byte: 1 for idle processing pending, 0 for idle processing not pending", + "RobotInfo", "RETURN_SINGLE"); + + addData("requestClientRestart", + "If certain changes on the robot happen the clients may need to restart, this message is broadcast when those changes occur.", + NULL, + "none", + "byte: restartNumber, which is 1 for a restart because of config changes (there will likely be more reasons later); string: human readable reason for restart. (The restartNumber is intended for heavy weight clients, the string is intended for lighter weight clients.)", + "RobotInfo", "RETURN_NONE"); + + + + // The start/end-RequestTransaction packets encapsulate a sequence of related + // messages. Their primary purpose is to delay the execution of any queued + // idle packets until the sequence has completed. (This somewhat implies that + // they shouldn't be used to create a sequence of idle packets.) + // + // Currently, these packets are only used by the Central Server when + // it is determining whether the map file needs to be downloaded to the robot. + // The checkMap or setConfig* commands are executed in the idle thread after + // the download has completed. + // + addData("startRequestTransaction", + "Special packet that marks the beginning of a multiple-packet request-response sequence. Must be followed by an endRequestTransaction packet upon completion.", + &myStartRequestTransactionCB, + "none", + "", + "RobotInfo", "RETURN_NONE"); + + addData("endRequestTransaction", + "Special packet that marks the end of a multiple-packet request-response sequence. Idle processing does not proceed until transaction is ended.", + &myEndRequestTransactionCB, + "none", + "", + "RobotInfo", "RETURN_NONE"); + +} + +AREXPORT ArServerBase::~ArServerBase() +{ + close(); + + if (mySlowIdleThread != NULL) + { + delete mySlowIdleThread; + mySlowIdleThread = NULL; + } +} + +/** + This opens the server up on the given port, you will then need to + run the server for it to actually listen and respond to client connections. + + @param port the port to open the server on + @param openOnIP If not null, only listen on the local network interface with this address + @param tcpOnly If true, only accept TCP connections. If false, use both TCP + and UDP communications with clients. + + @return true if the server could open the port, false otherwise +**/ +AREXPORT bool ArServerBase::open(unsigned int port, const char *openOnIP, + bool tcpOnly) +{ + myDataMutex.lock(); + myTcpPort = port; + myTcpOnly = tcpOnly; + if (openOnIP != NULL) + myOpenOnIP = openOnIP; + else + myOpenOnIP = ""; + + + if (myTcpSocket.open(myTcpPort, ArSocket::TCP, openOnIP)) + { + // This can be taken out since the open does this now + //myTcpSocket.setLinger(0); + myTcpSocket.setNonBlock(); + } + else + { + myOpened = false; + myDataMutex.unlock(); + return false; + } + + if (myTcpOnly) + { + if (openOnIP != NULL) + ArLog::log(ArLog::Normal, + "%sStarted on tcp port %d on ip %s.", + myLogPrefix.c_str(), myTcpPort, openOnIP); + else + ArLog::log(ArLog::Normal, "%sStarted on tcp port %d.", + myLogPrefix.c_str(), myTcpPort); + myOpened = true; + myUdpPort = 0; + myDataMutex.unlock(); + return true; + } + + if (myUdpSocket.create(ArSocket::UDP) && + myUdpSocket.findValidPort(myTcpPort, openOnIP) && + myUdpSocket.setNonBlock()) + { + // not possible on udp? myUdpSocket.setLinger(0); + myUdpPort = ArSocket::netToHostOrder(myUdpSocket.inPort()); + myUdpReceiver.setSocket(&myUdpSocket); + if (openOnIP != NULL) + ArLog::log(ArLog::Normal, + "%sStarted on tcp port %d and udp port %d on ip %s.", + myLogPrefix.c_str(), myTcpPort, myUdpPort, openOnIP); + else + ArLog::log(ArLog::Normal, "%sStarted on tcp port %d and udp port %d.", + myLogPrefix.c_str(), myTcpPort, myUdpPort); + + } + else + { + myOpened = false; + myTcpSocket.close(); + myDataMutex.unlock(); + return false; + } + myOpened = true; + myDataMutex.unlock(); + return true; +} + +AREXPORT void ArServerBase::close(void) +{ + std::list::iterator it; + ArServerClient *client; + + myClientsMutex.lock(); + if (!myOpened) + { + myClientsMutex.unlock(); + return; + } + + ArLog::log(ArLog::Normal, "%sServer shutting down.", + myLogPrefix.c_str()); + myOpened = false; + // now send off the client packets to shut down + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + client->shutdown(); + printf("Sending shutdown\n"); + } + + ArUtil::sleep(10); + + while ((it = myClients.begin()) != myClients.end()) + { + client = (*it); + myClients.pop_front(); + delete client; + } + myTcpSocket.close(); + if (!myTcpOnly) + myUdpSocket.close(); + myClientsMutex.unlock(); + + /// MPL adding this since it looks like its leaked + myDataMutex.lock(); + ArUtil::deleteSetPairs(myDataMap.begin(), myDataMap.end()); + myDataMap.clear(); + myDataMutex.unlock(); +} + +void ArServerBase::acceptTcpSockets(void) +{ + //ArSocket socket; + + //myClientsMutex.lock(); + + // loop while we have new connections to make... we need to make a + // udp auth key for any accepted sockets and send our introduction + // to the client + while (myTcpSocket.accept(&myAcceptingSocket) && + myAcceptingSocket.getFD() >= 0) + { + finishAcceptingSocket(&myAcceptingSocket, false); + } + //myClientsMutex.unlock(); +} + +AREXPORT ArServerClient *ArServerBase::makeNewServerClientFromSocket( + ArSocket *socket, bool overrideGeneralReject) +{ + ArServerClient *serverClient = NULL; + //myDataMutex.lock(); + serverClient = finishAcceptingSocket(socket, true, + overrideGeneralReject); + //myDataMutex.unlock(); + return serverClient; +} + +AREXPORT ArServerClient *ArServerBase::finishAcceptingSocket( + ArSocket *socket, bool skipPassword, + bool overrideGeneralReject) +{ + ArServerClient *client; + bool foundAuthKey; + std::list::iterator it; + bool thisKeyBad; + long authKey; + long introKey; + ArNetPacket packet; + int iterations; + + ArLog::log(ArLog::Normal, "%sNew connection from %s", + myLogPrefix.c_str(), socket->getIPString()); + + myClientsMutex.lock(); + // okay, now loop until we find a key or until we've gone 10000 + // times (huge error but not worth locking up on)... basically + // we're making sure that none of the current clients already have + // this key... they should never have it if random is working + // right... but... + for (foundAuthKey = false, authKey = ArMath::random(), iterations = 0; + !foundAuthKey && iterations < 10000; + iterations++, authKey = ArMath::random()) + { + // see if any of the current clients have this authKey + for (thisKeyBad = false, it = myClients.begin(); + !thisKeyBad && it != myClients.end(); + ++it) + { + if (authKey == (*it)->getAuthKey()) + thisKeyBad = true; + } + // if the key wasn't found above it means its clean, so we found + // a good one and are done + if (!thisKeyBad) + foundAuthKey = true; + } + myClientsMutex.unlock(); + if (!foundAuthKey) + authKey = 0; + // now we pick an introKey which introduces the server to the client + // this one isn't critical that it be unique though, so we just + // set it straight out + introKey = ArMath::random(); + std::string passwordKey; + int numInPasswordKey = ArMath::random() % 100; + int i; + passwordKey = ""; + if (!skipPassword) + { + for (i = 0; i < numInPasswordKey; i++) + passwordKey += '0' + ArMath::random() % ('z' - '0'); + } + int reject; + const char *rejectString; + + char tooManyClientsBuf[1024]; + + // if we have too many clients, reject this because of that... + if (myMaxClientsAllowed > 0 && myNumClients + 1 > myMaxClientsAllowed) + { + sprintf(tooManyClientsBuf, "Server rejecting connection since it would exceed the maximum number of allowed connections (which is %d)", + myMaxClientsAllowed); + reject = 5; + rejectString = tooManyClientsBuf; + + myTooManyClientsCBList.invoke(socket->getIPString()); + } + // if we're overriding the blanket reject it's probably because we + // are rejecting direct connections and this connection is from the + // client switch.... + else if (overrideGeneralReject) + { + reject = 0; + rejectString = ""; + } + else + { + reject = myRejecting; + rejectString = myRejectingString.c_str(); + } + std::string serverClientName = myServerName + "Client_" + socket->getIPString(); + ArLog::log(myVerboseLogLevel, "%sHanding off connection to %s to %s", + myLogPrefix.c_str(), socket->getIPString(), + serverClientName.c_str()); + client = new ArServerClient(socket, myUdpPort, authKey, introKey, + &mySendUdpCB, &myDataMap, + passwordKey.c_str(), myServerKey.c_str(), + myUserInfo, reject, rejectString, + myDebugLogging, serverClientName.c_str(), + myLogPasswordFailureVerbosely, + myAllowSlowPackets, myAllowIdlePackets, + myEnforceProtocolVersion.c_str(), + myEnforceType); + //client->setUdpAddress(socket->sockAddrIn()); + // put the client onto our list of clients... + //myClients.push_front(client); + myAddListMutex.lock(); + myAddList.push_front(client); + myAddListMutex.unlock(); + return client; +} + +AREXPORT int ArServerBase::getNumClients(void) +{ + return myNumClients; +} + +AREXPORT void ArServerBase::run(void) +{ + runInThisThread(); +} + +AREXPORT void ArServerBase::runAsync(void) +{ + create(); +} + +AREXPORT void *ArServerBase::runThread(void *arg) +{ + threadStarted(); + while (myRunning) + { + loopOnce(); + ArUtil::sleep(myLoopMSecs); + } + close(); + threadFinished(); + return NULL; +} + + +/** + This will broadcast this packet to any client that wants this + data.... this no longer excludes things because that doesn't work + well with the central server, so use + broadcastPacketTcpWithExclusion for that if you really want it... + + @param packet the packet to send + @param name the type of data to send + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketTcp(ArNetPacket *packet, + const char *name) +{ + return broadcastPacketTcpWithExclusion(packet, name, NULL); +} + + +/** + This will broadcast this packet to any client that wants this + data.... + + @param packet the packet to send + @param name the type of data to send + @param identifier the identifier to match + @param matchConnectionID true to match the connection ID, false to + match the other ID + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketTcpToMatching( + ArNetPacket *packet, const char *name, + ArServerClientIdentifier identifier, bool matchConnectionID) +{ + return broadcastPacketTcpWithExclusion(packet, name, NULL, true, identifier, + matchConnectionID); +} + +/** + This will broadcast this packet to any client that wants this data. + + @param packet the packet to send + @param name the type of data to send + @param excludeClient don't send data to this client (NULL (the default) just + ignores this feature) + @param match whether to match the identifier or not + @param identifier the identifier to match + @param matchConnectionID true to match the connection ID, false to + match the other ID + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketTcpWithExclusion( + ArNetPacket *packet, const char *name, ArServerClient *excludeClient, + bool match, ArServerClientIdentifier identifier, + bool matchConnectionID) +{ + // first find our number so each client doesn't have to + std::map::iterator it; + unsigned int command = 0; + +// ArLog::log(ArLog::Normal, +// "ArServerBase::broadcastPacketTcpWithExclusion() called"); + + myDataMutex.lock(); +// ArLog::log(ArLog::Normal, +// "ArServerBase::broadcastPacketTcpWithExclusion() data lock obtained"); + for (it = myDataMap.begin(); it != myDataMap.end(); it++) + { + if (!strcmp((*it).second->getName(), name)) + command = (*it).second->getCommand(); + } + if (command == 0) + { + ArLog::log(myVerboseLogLevel, + "ArServerBase::broadcastPacket: no command by name of \"%s\"", + name); + myDataMutex.unlock(); + return false; + } + myDataMutex.unlock(); + return broadcastPacketTcpByCommandWithExclusion( + packet, command, excludeClient, match, identifier, + matchConnectionID); +} + +/** + This will broadcast this packet to any client that wants this + data.... this no longer excludes things because that doesn't work + well with the central server, so use + broadcastPacketTcpByCommandWithExclusion for that... + + @param packet the packet to send + @param command the command number of the data to send + + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketTcpByCommand( + ArNetPacket *packet, unsigned int command) +{ + return broadcastPacketTcpByCommandWithExclusion(packet, command, NULL); +} + +/** + This will broadcast this packet to any client that wants this data. + + @param packet the packet to send + @param command the command number of the data to send + @param excludeClient don't send data to this client (NULL (the default) just + ignores this feature) + @param match whether to match the identifier or not + @param identifier the identifier to match + @param matchConnectionID true to match the connection ID, false to + match the other ID + + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketTcpByCommandWithExclusion( + ArNetPacket *packet, unsigned int command, + ArServerClient *excludeClient, bool match, + ArServerClientIdentifier identifier, bool matchConnectionID) +{ + std::list::iterator lit; + ArServerClient *serverClient; + ArNetPacket emptyPacket; + +// ArLog::log(ArLog::Normal, +// "ArServerBase::broadcastPacketTcpByCommandWithExclusion() called"); + + myClientsMutex.lock(); +// ArLog::log(ArLog::Normal, +// "ArServerBase::broadcastPacketTcpByCommandWithExclusion() client lock obtained"); + emptyPacket.empty(); + + if (!myOpened) + { + ArLog::log(ArLog::Verbose, "ArServerBase::broadcastPacket: server not open to send packet."); + myClientsMutex.unlock(); + return false; + } + + if (packet == NULL) + packet = &emptyPacket; + + packet->setCommand(command); + for (lit = myClients.begin(); lit != myClients.end(); ++lit) + { + serverClient = (*lit); + if (excludeClient != NULL && serverClient == excludeClient) + continue; + if (match && + !serverClient->getIdentifier().matches(identifier, matchConnectionID)) + continue; + serverClient->broadcastPacketTcp(packet); + } + + myClientsMutex.unlock(); + return true; +} + + +/** + This will broadcast this packet to any client that wants this + data.... this no longer excludes things because that doesn't work + well with the central server, so use + broadcastPacketUdpWithExclusion for that if you really want to + + @param packet the packet to send + @param name the type of data to send + + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketUdp(ArNetPacket *packet, + const char *name) +{ + return broadcastPacketUdpWithExclusion(packet, name, NULL); +} + +/** + This will broadcast this packet to any client that wants this + data.... + + @param packet the packet to send + @param name the type of data to send + @param identifier the identifier to match + @param matchConnectionID true to match the connection ID, false to + match the other ID + + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketUdpToMatching( + ArNetPacket *packet, const char *name, + ArServerClientIdentifier identifier, bool matchConnectionID) +{ + return broadcastPacketUdpWithExclusion(packet, name, NULL, true, + identifier, matchConnectionID); +} + +/** + This will broadcast this packet to any client that wants this data. + + @param packet the packet to send + @param name the type of data to send + @param excludeClient don't send data to this client (NULL (the default) just + ignores this feature) + @param match whether to match the identifier or not + @param identifier the identifier to match + @param matchConnectionID true to match the connection ID, false to + match the other ID + @return false if there is no data for this name +**/ + +AREXPORT bool ArServerBase::broadcastPacketUdpWithExclusion( + ArNetPacket *packet, const char *name, ArServerClient *excludeClient, + bool match, ArServerClientIdentifier identifier, + bool matchConnectionID) +{ + // first find our number so each client doesn't have to + std::map::iterator it; + unsigned int command = 0; + + myDataMutex.lock(); + for (it = myDataMap.begin(); it != myDataMap.end(); it++) + { + if (!strcmp((*it).second->getName(), name)) + command = (*it).second->getCommand(); + } + if (command == 0) + { + ArLog::log(myVerboseLogLevel, + "ArServerBase::broadcastPacket: no command by name of \"%s\"", + name); + myDataMutex.unlock(); + return false; + } + myDataMutex.unlock(); + return broadcastPacketUdpByCommandWithExclusion( + packet, command, excludeClient, match, identifier, + matchConnectionID); +} + +/** + This will broadcast this packet to any client that wants this + data.... + + (To restrict what clients the command is sent to, use the + broadcastPacketUdpByCommandWithExclusion() method.) + + @param packet the packet to send + @param command the type of data to send + + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketUdpByCommand( + ArNetPacket *packet, unsigned int command) +{ + return broadcastPacketUdpByCommandWithExclusion(packet, command, NULL); +} + +/** + This will broadcast this packet to any client that wants this data. + + @param packet the packet to send + @param command the type of data to send + @param excludeClient don't send data to this client (NULL (the default) just + ignores this feature) + @param match whether to match the identifier or not + @param identifier the identifier to match + @param matchConnectionID true to match the connection ID, false to + match the other ID + @return false if there is no data for this name +**/ +AREXPORT bool ArServerBase::broadcastPacketUdpByCommandWithExclusion( + ArNetPacket *packet, unsigned int command, + ArServerClient *excludeClient, bool match, + ArServerClientIdentifier identifier, bool matchConnectionID) +{ + std::list::iterator lit; + ArServerClient *serverClient; + ArNetPacket emptyPacket; + + myClientsMutex.lock(); + emptyPacket.empty(); + + if (!myOpened) + { + ArLog::log(ArLog::Verbose, "ArServerBase::broadcastPacket: server not open to send packet."); + myClientsMutex.unlock(); + return false; + } + + if (packet == NULL) + packet = &emptyPacket; + + packet->setCommand(command); + for (lit = myClients.begin(); lit != myClients.end(); ++lit) + { + serverClient = (*lit); + if (excludeClient != NULL && serverClient == excludeClient) + continue; + if (match && + !serverClient->getIdentifier().matches(identifier, matchConnectionID)) + continue; + serverClient->broadcastPacketUdp(packet); + } + myClientsMutex.unlock(); + return true; +} + +/** + @param name Name is the name of the command number to be found + + @return the number of the command or 0 if no command has that name +**/ + +AREXPORT unsigned int ArServerBase::findCommandFromName(const char *name) +{ + // first find our number so each client doesn't have to + std::map::iterator it; + unsigned int num = 0; + myDataMutex.lock(); + + for (it = myDataMap.begin(); it != myDataMap.end(); it++) + { + if (!strcmp((*it).second->getName(), name)) + num = (*it).second->getCommand(); + } + if (num == 0) + { + ArLog::log(myVerboseLogLevel, + "ArServerBase::findCommandFromName: no command by name of \"%s\"", + name); + myDataMutex.unlock(); + return 0; + } + myDataMutex.unlock(); + return num; +} + +/** + This runs the server loop once, normally you'll probably just use + run() or runAsync(), but if you want to drive this server from within your own + loop just call this repeatedly, but do note it takes up no time + at all, so you'll want to put in your own millisecond sleep so it + doesn't monopolize the CPU. + **/ +AREXPORT void ArServerBase::loopOnce(void) +{ + std::list::iterator it; + std::set::iterator setIt; + // for speed we'd use a list of iterators and erase, but for clarity + // this is easier and this won't happen that often + //std::list removeList; + ArServerClient *client; + + myDataMutex.lock(); + if (!myOpened) + { + myDataMutex.unlock(); + return; + } + myDataMutex.unlock(); + + acceptTcpSockets(); + + if (!myTcpOnly) + myUdpReceiver.readData(); + + if (myProcessingSlowIdleMutex.tryLock() == 0) + { + myClientsMutex.lock(); + myAddListMutex.lock(); + while (!myAddList.empty()) + { + myClients.push_back(myAddList.front()); + myAddList.pop_front(); + } + myAddListMutex.unlock(); + myClientsMutex.unlock(); + myProcessingSlowIdleMutex.unlock(); + } + + bool needIdleProcessing = idleProcessingPending(); + if (needIdleProcessing != myLastIdleProcessingPending) + { + ArNetPacket sendingPacket; + if (needIdleProcessing) + sendingPacket.byteToBuf(1); + else + sendingPacket.byteToBuf(0); + broadcastPacketTcp(&sendingPacket, "idleProcessingPending"); + myLastIdleProcessingPending = needIdleProcessing; + } + + myBackupTimeoutMutex.lock(); + + double backupTimeout = myBackupTimeout; + bool newBackupTimeout = myNewBackupTimeout; + myNewBackupTimeout = false; + + myBackupTimeoutMutex.unlock(); + + + bool haveSlowPackets = false; + bool haveIdlePackets = false; + int numClients = 0; + + + // need a recursive lock before we can lock here but we should be + //okay without a lock here (and have been for ages) + //myClientsMutex.lock(); first let the clients handle new data + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + numClients++; + + if (newBackupTimeout) + client->setBackupTimeout(backupTimeout); + + if (!client->tcpCallback()) + { + client->forceDisconnect(true); + myRemoveSetMutex.lock(); + myRemoveSet.insert(client); + myRemoveSetMutex.unlock(); + } + else + { + if (client->hasSlowPackets()) + haveSlowPackets = true; + if (client->hasIdlePackets()) + haveIdlePackets = true; + } + + } + + myHaveSlowPackets = haveSlowPackets; + myHaveIdlePackets = haveIdlePackets; + + // if we're using our own num clients then check the max and set it + if (myUsingOwnNumClients) + { + // remember how many we've had at max so its easier to track down memory + if (numClients > myMostClients) + myMostClients = numClients; + + myNumClients = numClients; + } + else + { + // if not then check the max + if (myNumClients > myMostClients) + myMostClients = myNumClients; + } + + //printf("Before...\n"); + if (myProcessingSlowIdleMutex.tryLock() == 0) + { + //printf("Almost...\n"); + myClientsMutex.lock(); + myRemoveSetMutex.lock(); + //printf("In...\n"); + while ((setIt = myRemoveSet.begin()) != myRemoveSet.end()) + { + client = (*setIt); + myClients.remove(client); + for (std::list *>::iterator rci = myClientRemovedCallbacks.begin(); + rci != myClientRemovedCallbacks.end(); + rci++) { + if (*rci) { + (*rci)->invoke(client); + } + } + + myRemoveSet.erase(client); + delete client; + } + myRemoveSetMutex.unlock(); + myClientsMutex.unlock(); + //printf("out...\n"); + myProcessingSlowIdleMutex.unlock(); + } + + // now let the clients send off their packets + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + client->handleRequests(); + } + // need a recursive lock before we can lock here but we should be + //okay without a lock here (and have been for ages) + //myClientsMutex.unlock(); + myCycleCallbacksMutex.lock(); + // call cycle callbacks + for(std::list::const_iterator f = myCycleCallbacks.begin(); + f != myCycleCallbacks.end(); f++) + { + if(*f) (*f)->invoke(); + } + myCycleCallbacksMutex.unlock(); +} + +AREXPORT void ArServerBase::processPacket(ArNetPacket *packet, struct sockaddr_in *sin) +{ + std::list::iterator it; + unsigned char *bytes = (unsigned char *)&sin->sin_addr.s_addr; + ArServerClient *client; + struct sockaddr_in *clientSin; + + myClientsMutex.lock(); + // if its a udp packet then see if we have its owner + if (packet->getCommand() == ArClientCommands::UDP_INTRODUCTION) + { + long authKey; + bool matched; + + authKey = packet->bufToUByte4(); + for (matched = false, it = myClients.begin(); + !matched && it != myClients.end(); ++it) + { + client = (*it); + if (client->getAuthKey() == authKey) + { + packet->resetRead(); + /* + ArLog::log(ArLog::Normal, "Got process auth from %d.%d.%d.%d %d\n", + bytes[0], bytes[1], bytes[2], bytes[3], + ArSocket::netToHostOrder(sin->sin_port)); + */ + client->processAuthPacket(packet, sin); + } + } + myClientsMutex.unlock(); + return; + } + + // it wasn't the introduction so handle it the normal way + + // walk through our list of clients and see if it was one of them, + // if so return + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + clientSin = client->getUdpAddress(); + if (clientSin->sin_port == sin->sin_port && + clientSin->sin_addr.s_addr == sin->sin_addr.s_addr) + { + client->processPacket(packet, false); + myClientsMutex.unlock(); + return; + } + /* + else + { + bytes = (unsigned char *)&clientSin->sin_addr.s_addr; + printf("Wanted %d.%d.%d.%d %d\n", bytes[0], + bytes[1], bytes[2], bytes[3], + ArSocket::netToHostOrder(clientSin->sin_port)); + } + */ + } + // if it wasn't one of our clients it was from somewhere bogus + //bytes = (unsigned char *)&clientSin->sin_addr.s_addr; + bytes = (unsigned char *)&sin->sin_addr.s_addr; + if (myDataMap.find(packet->getCommand()) != myDataMap.end()) + ArLog::log(ArLog::Normal, + "UDP Packet %s from bogus source %d.%d.%d.%d %d\n", + myDataMap[packet->getCommand()]->getName(), + bytes[0], bytes[1], bytes[2], bytes[3], + ArSocket::netToHostOrder(sin->sin_port)); + else + ArLog::log(ArLog::Normal, + "UDP Packet unknown from bogus source %d.%d.%d.%d %d\n", + bytes[0], bytes[1], bytes[2], bytes[3], + ArSocket::netToHostOrder(sin->sin_port)); + myClientsMutex.unlock(); +} + +AREXPORT bool ArServerBase::sendUdp(ArNetPacket *packet, struct sockaddr_in *sin) +{ + bool ret; + // this doesn't lock since it should only be called from + ret = myUdpSocket.sendTo(packet->getBuf(), packet->getLength(), sin); + return ret; +} + +/** + * @note A callback is called from the server run loop, and if this callback + * does not return in a timely manner data reception will be delayed (blocked). + + + @param name the name of the data + + @param description the more verbose description of what the data is for + + @param functor the functor to call when this data is requested + + @param argumentDescription a description of the arguments expected + + @param returnDescription a description of what the data returns + + @param commandGroup the name of the group this command is in + + @param dataFlags Most people won't need this, its for some advanced + server things... this is a list of data flags separated by | + characters, the flags are listed in ArClientData docs + + @pynote Pass the name of a function or a lambda expression for @arg functor. + @javanote Use a subclass of ArFunctor_ServerData instead of the ArFunctor2 template @arg functor. +**/ +AREXPORT bool ArServerBase::addData( + const char *name, const char *description, + ArFunctor2 * functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup, const char *dataFlags) +{ + return addDataAdvanced(name, description, functor, argumentDescription, + returnDescription, commandGroup, dataFlags); +} + +/** + @copydoc ArServerBase::addData() + + @param advancedCommandNumber 0 for most people... it is the optional number + of the command, this is a very advanced option and is made for some + server forwarding things so basically no one should use it, 0 means + use the auto way... anything else does it manually... the number + needs to be the same or higher as the next number available + + @param requestChangedFunctor functor called with the lowest amount + of time requested for this packet, called whenever the requests for + the packet change, note that 0 and higher means thats how often it + was asked for, -1 means something has requested the data but just + when it is called, and -2 means that nothing wants the data + + @param requestOnceFunctor functor called if this was a request + once... with the server and client just like the normal functor, + but its only called if its a request once, note that both are + called (as long as they aren't NULL of course) + + @sa addData() +**/ + +AREXPORT bool ArServerBase::addDataAdvanced( + const char *name, const char *description, + ArFunctor2 * functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup, const char *dataFlags, + unsigned int advancedCommandNumber, + ArFunctor2 *requestChangedFunctor, + ArRetFunctor2 *requestOnceFunctor) +{ + ArServerData *serverData; + std::map::iterator it; + + myDataMutex.lock(); + + //printf("%s %s\n", name, description); + // if we already have one we can't do this + for (it = myDataMap.begin(); it != myDataMap.end(); it++) + { + if (!strcmp((*it).second->getName(), name)) + { + ArLog::log(ArLog::Verbose, "ArServerBase::addData: already have data for name \"%s\", could not add it.", name); + myDataMutex.unlock(); + return false; + } + } + ArLog::log(ArLog::Verbose, "ArServerBase::addData: name \"%s\" mapped to number %d", name, myNextDataNumber); + if (advancedCommandNumber != 0) + { + // old check from unified command numbers + /* if (advancedCommandNumber < myNextDataNumber) + { + ArLog::log(ArLog::Normal, "ArServerBase::addData: Advanced command number given for %s but the number is too low, it wasn't added", name); + myDataMutex.unlock(); + return false; + } + */ + if (myDataMap.find(advancedCommandNumber) != myDataMap.end()) + { + ArLog::log(ArLog::Normal, "ArServerBase::addData: Advanced command number given for %s is already used, it wasn't added", name); + myDataMutex.unlock(); + return false; + } + serverData = new ArServerData(name, description, advancedCommandNumber, + functor, argumentDescription, + returnDescription, commandGroup, dataFlags, + &myGetFrequencyCB, requestChangedFunctor, + requestOnceFunctor); + if (myAdditionalDataFlags.size() > 0) + serverData->addDataFlags(myAdditionalDataFlags.c_str()); + myDataMap[advancedCommandNumber] = serverData; + myDataMutex.unlock(); + return true; + + } + else + { + serverData = new ArServerData(name, description, myNextDataNumber, + functor, argumentDescription, + returnDescription, commandGroup, dataFlags, + &myGetFrequencyCB, requestChangedFunctor, + requestOnceFunctor); + if (myAdditionalDataFlags.size() > 0) + serverData->addDataFlags(myAdditionalDataFlags.c_str()); + myDataMap[myNextDataNumber] = serverData; + myNextDataNumber++; + myDataMutex.unlock(); + return true; + } +} + + +/** Cycle callbacks are called every cycle, in no particular order. + * @param functor Functor to add. + */ +AREXPORT void ArServerBase::addCycleCallback(ArFunctor* functor) +{ + myCycleCallbacksMutex.lock(); + myCycleCallbacks.push_back(functor); + myCycleCallbacksMutex.unlock(); +} + +/** Cycle callbacks are called every cycle, in no particular order. + * @param functor Functor to remove. If it's not currently in the cycle callback + * list, nothing is done. + */ +AREXPORT void ArServerBase::remCycleCallback(ArFunctor* functor) +{ + myCycleCallbacksMutex.lock(); + myCycleCallbacks.remove(functor); + myCycleCallbacksMutex.unlock(); +} + +/** + * @javanote Use ArFunctor_ServerClient instead of ArFunctor1 + * for @a functor. + */ +AREXPORT void ArServerBase::addClientRemovedCallback(ArFunctor1 *functor) +{ + myDataMutex.lock(); + myClientRemovedCallbacks.push_back(functor); + myDataMutex.unlock(); +} + +/** + * @javanote Use ArFunctor_ServerClient instead of ArFunctor1 + * for @a functor. + */ +AREXPORT void ArServerBase::remClientRemovedCallback(ArFunctor1 *functor) +{ + myDataMutex.lock(); + myClientRemovedCallbacks.remove(functor); + myDataMutex.unlock(); +} + + +AREXPORT bool ArServerBase::loadUserInfo(const char *fileName, + const char *baseDirectory) +{ + if (myUserInfo != NULL) + { + delete myUserInfo; + myUserInfo = NULL; + } + ArServerUserInfo *userInfo = new ArServerUserInfo; + userInfo->setBaseDirectory(baseDirectory); + if (!userInfo->readFile(fileName)) + { + ArLog::log(ArLog::Terse, "%sloadUserInfo: Could not load user info for %s", myLogPrefix.c_str()); + delete userInfo; + return false; + } + if (!userInfo->doNotUse()) + { + ArLog::log(ArLog::Normal, "%sLoaded user information", + myLogPrefix.c_str()); + myDataMutex.lock(); + myUserInfo = userInfo; + myDataMutex.unlock(); + } + else + { + ArLog::log(ArLog::Normal, + "%sLoaded user information but not using it", + myLogPrefix.c_str()); + delete userInfo; + } + return true; +} + +AREXPORT void ArServerBase::logUserInfo(void) +{ + myDataMutex.lock(); + if (myUserInfo == NULL) + ArLog::log(ArLog::Terse, + "%sNo user name or password needed to connect", + myLogPrefix.c_str()); + else + myUserInfo->logUsers(); + myDataMutex.unlock(); +} + +/** + Logs the different groups of commands. It logs the command names + first along with the list of commands in that group. Then it + outputs a list of groups. Useful for building the user/pass file. +**/ +AREXPORT void ArServerBase::logCommandGroups(void) +{ + logCommandGroupsToFile(NULL); +} + +/** + For a description of what this outputs see logCommandGroups +**/ +AREXPORT void ArServerBase::logCommandGroupsToFile(const char *fileName) +{ + std::map::iterator dit; + + std::multimap groups; + std::multimap::iterator git; + + myDataMutex.lock(); + for (dit = myDataMap.begin(); dit != myDataMap.end(); dit++) + { + std::string group; + std::string command; + command = (*dit).second->getName(); + if ((*dit).second->getCommandGroup() == NULL) + group = ""; + else + group = (*dit).second->getCommandGroup(); + + groups.insert(std::pair(group, command)); + } + + FILE *file = NULL; + if (fileName != NULL) + { + file = ArUtil::fopen(fileName, "w"); + } + + char descLine[10000]; + std::string line; + std::string lastGroup; + bool first = true; + bool firstGroup = true; + std::map::iterator dIt; + std::string listOfGroups = "Groups"; + + for (git = groups.begin(); git != groups.end(); git++) + { + if (ArUtil::strcasecmp((*git).first, lastGroup) != 0 || firstGroup) + { + if (!firstGroup) + { + if (file != NULL) + fprintf(file, "%s", line.c_str()); + else + ArLog::log(ArLog::Terse, "%s", line.c_str()); + } + first = true; + firstGroup = false; + lastGroup = (*git).first; + listOfGroups += " "; + if (lastGroup.size() == 0) + listOfGroups += "None"; + else + listOfGroups += lastGroup; + } + if (first) + { + line = "CommandGroup "; + if ((*git).first.size() == 0) + { + line += "None"; + } + else + { + // output the groups description if therei s one + if ((dIt = myGroupDescription.find((*git).first)) != + myGroupDescription.end()) + snprintf(descLine, sizeof(descLine), + "CommandGroup %s has description %s", + (*git).first.c_str(), (*dIt).second.c_str()); + else + snprintf(descLine, sizeof(descLine), + "CommandGroup %s has no description", + (*git).first.c_str()); + if (file != NULL) + fprintf(file, "%s\n", descLine); + else + ArLog::log(ArLog::Terse, "%s", descLine); + + line += (*git).first.c_str(); + } + line += " is"; + + + } + line += " "; + line += (*git).second.c_str(); + first = false; + } + if (!firstGroup && !first) + { + if (file != NULL) + fprintf(file, "%s\n", line.c_str()); + else + ArLog::log(ArLog::Terse, "%s", line.c_str()); + } + if (file != NULL) + fprintf(file, "%s\n", listOfGroups.c_str()); + else + ArLog::log(ArLog::Terse, "%s", listOfGroups.c_str()); + myDataMutex.unlock(); +} + + +/// +///=========================================================================/// +/// Function: setGroupDescription /// +/// Created: 17-Nov-2005 /// +/// Purpose: To permit the user to update the Command Group Descriptions./// +/// Notes: /// +/// /// +/// Revision History: /// +/// WHEN WHO WHAT and/or WHY /// +/// 17-Nov-2005 NJ Created this function. /// +/// /// +///=========================================================================/// +/// +AREXPORT void ArServerBase::setGroupDescription(const char *cmdGrpName, const char *cmdGrpDesc) +{ + myDataMutex.lock(); + myGroupDescription.insert(std::pair(cmdGrpName, cmdGrpDesc)); + myDataMutex.unlock(); +} + + + + + +// Created: 17-Nov-2005 // +// Purpose: +// Notes: // +// Assumption: Command Group Name Map exists already. // +// // +// Revision History: // +// WHEN WHO WHAT and/or WHY // +// 17-Nov-2005 NJ Created this function. // + +AREXPORT void ArServerBase::logGroupDescriptions(void) +{ + // -- This wrapper insures that NULL is the only input passed to the + // logCommandGroupNamesToFile routine. + // This is used if the log is desired over a filename. + logGroupDescriptionsToFile(NULL); // NULL is the only value passed. +} + +AREXPORT void ArServerBase::logGroupDescriptionsToFile(const char *fileName) +{ + myDataMutex.lock(); + std::map::iterator d_itr; // establish map iterator + char line[1024]; + FILE *file = NULL; + if (fileName != NULL) + file = ArUtil::fopen(fileName, "w"); // open file if exists + + // -- Assemble output strings and send to file or log + for (d_itr = myGroupDescription.begin(); d_itr != myGroupDescription.end(); d_itr++) + { + snprintf(line, sizeof(line), "%-29s %s", (*d_itr).first.c_str(), (*d_itr).second.c_str()); + + if (file != NULL) + fprintf(file, "%s\n", line); // send string to file + else + ArLog::log(ArLog::Terse, "%s", line); // send string to log + } + if (fileName != NULL) // task complete notification + fclose (file); + myDataMutex.unlock(); +} + + + +/** + Text string that is the key required when using user and password + information... this is NOT used if there is no user and password + information. +**/ +AREXPORT void ArServerBase::setServerKey(const char *serverKey) +{ + myDataMutex.lock(); + // if this is setting it to empty and its already empty don't print + // a message + if ((serverKey == NULL || serverKey[0] == '\0') && myServerKey.size() > 0) + ArLog::log(ArLog::Normal, "Clearing server key"); + if (serverKey != NULL && serverKey[0] != '\0') + ArLog::log(ArLog::Normal, "Setting new server key"); + if (serverKey != NULL) + myServerKey = serverKey; + else + myServerKey = ""; + myDataMutex.unlock(); +} + +AREXPORT void ArServerBase::rejectSinceUsingCentralServer( + const char *centralServerIPString) +{ + myDataMutex.lock(); + myRejecting = 2; + myRejectingString = centralServerIPString; + myDataMutex.unlock(); +} + + + +AREXPORT void ArServerBase::enforceProtocolVersion(const char *protocolVersion) +{ + myDataMutex.lock(); + if (protocolVersion != NULL) + myEnforceProtocolVersion = protocolVersion; + else + myEnforceProtocolVersion = ""; + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "%sNew enforceProtocolVersionSet", myLogPrefix.c_str()); +} + +AREXPORT void ArServerBase::enforceType(ArServerCommands::Type type) +{ + myDataMutex.lock(); + myEnforceType = type; + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "%sNew enforce type: %s", + myLogPrefix.c_str(), ArServerCommands::toString(type)); + +} + +/** + Sets up the backup timeout, if there are packets to send to clients + and they haven't been sent for longer than this then the connection + is closed. Less than 0 means this won't happen. If this is + positive but less than 5 seconds then 5 seconds is used. +**/ +AREXPORT void ArServerBase::setBackupTimeout(double timeoutInMins) +{ + myBackupTimeoutMutex.lock(); + myBackupTimeout = timeoutInMins; + myNewBackupTimeout = true; + myBackupTimeoutMutex.unlock(); + + /* Taking this out, since it can cause deadlocks in some central + * server circumstances... and doing it next time through is good enough + + std::list::iterator it; +// ArLog::log(ArLog::Normal, "Setting server base backup time to %g\n", myBackupTimeout); + myClientsMutex.lock(); + for (it = myClients.begin(); it != myClients.end(); it++) + (*it)->setBackupTimeout(myBackupTimeout); + myClientsMutex.unlock(); + */ +} + +AREXPORT void ArServerBase::logTracking(bool terse) +{ + std::list::iterator lit; + + myClientsMutex.lock(); + + for (lit = myClients.begin(); lit != myClients.end(); ++lit) + (*lit)->logTracking(terse); + + ArLog::log(ArLog::Terse, ""); + + if (!terse) + { + ArLog::log(ArLog::Terse, "%-85s %7ld udp rcvs %10ld udp B", + "Low Level UDP Received (all conns)", myUdpSocket.getRecvs(), + myUdpSocket.getBytesRecvd()); + ArLog::log(ArLog::Terse, "%-85s %7ld udp snds %10ld udp B", + "Low Level UDP Sent (all conns)", myUdpSocket.getSends(), + myUdpSocket.getBytesSent()); + + ArLog::log(ArLog::Terse, ""); + } + myClientsMutex.unlock(); +} + +AREXPORT void ArServerBase::resetTracking(void) +{ + std::list::iterator lit; + + myClientsMutex.lock(); + + for (lit = myClients.begin(); lit != myClients.end(); ++lit) + (*lit)->resetTracking(); + myClientsMutex.unlock(); + myDataMutex.lock(); + myUdpSocket.resetTracking(); + myDataMutex.unlock(); +} + +AREXPORT const ArServerUserInfo* ArServerBase::getUserInfo(void) const +{ + return myUserInfo; +} + +AREXPORT void ArServerBase::setUserInfo(const ArServerUserInfo *userInfo) +{ + myDataMutex.lock(); + myUserInfo = userInfo; + myDataMutex.unlock(); +} + +/** + @param command the command name as a string + + @param frequency the frequency to get the data, > 0 == + milliseconds, -1 == on broadcast, -2 == never... This function + won't set the value to anything slower than has already been + requested +*/ +AREXPORT bool ArServerBase::internalSetDefaultFrequency( + const char *command, int frequency) +{ + + + // first find our number so each client doesn't have to + std::map::iterator it; + ArServerData *data = NULL; + unsigned int commandNumber = 0; + + myClientsMutex.lock(); + myDataMutex.lock(); + + for (it = myDataMap.begin(); it != myDataMap.end(); it++) + { + if (!strcmp((*it).second->getName(), command)) + { + data = (*it).second; + commandNumber = data->getCommand(); + } + } + + if (commandNumber == 0) + { + myDataMutex.unlock(); + myClientsMutex.unlock(); + ArLog::log(ArLog::Normal, + "%s::setDefaultFrequency: No command of name %s", + myServerName.c_str(), command); + return false; + } + + int freq = -2; + if (myDefaultFrequency.find(commandNumber) != myDefaultFrequency.end()) + freq = myDefaultFrequency[commandNumber]; + + // if the freq is an interval and so is this but this + // is a smaller interval + if (frequency >= 0 && (freq < 0 || (freq >= 0 && frequency < freq))) + freq = frequency; + // if this just wants the data when pushed but freq is still + // at never then set it to when pushed + else if (frequency == -1 && freq == -2) + freq = -1; + + myDefaultFrequency[commandNumber] = freq; + + data->callRequestChangedFunctor(); + + ArLog::log(ArLog::Normal, "%s: Set default frequency for %s (%u) to %d", + myServerName.c_str(), command, commandNumber, freq); + + myDataMutex.unlock(); + myClientsMutex.unlock(); + return true; +} + + +/** + @param command the command number, you can use findCommandFromName + + @param internalCall whether its an internal call or not (whether to + lock or not) + + @return returns lowest amount of time requested for this packet, + note that 0 and higher means thats how often it was asked for, -1 + means nothing requested the data at an interval but wants it when + its been pushed, and -2 means that nothing wants the data +**/ + +AREXPORT long ArServerBase::getFrequency(unsigned int command, + bool internalCall) +{ + std::list::iterator it; + long ret = -2; + long clientFreq; + + if (!internalCall) + myClientsMutex.lock(); + + // if we have a default frequency start with that + if (myDefaultFrequency.find(command) != myDefaultFrequency.end()) + ret = myDefaultFrequency[command]; + + for (it = myClients.begin(); it != myClients.end(); it++) + { + clientFreq = (*it)->getFrequency(command); + // if the ret is an interval and so is this client but this client + // is a smalelr interval + if (clientFreq >= 0 && (ret < 0 || (ret >= 0 && clientFreq < ret))) + ret = clientFreq; + // if this client just wants the data when pushed but ret is still + // at never then set it to when pushed + else if (clientFreq == -1 && ret == -2) + ret = -1; + } + + if (!internalCall) + myClientsMutex.unlock(); + + return ret; +} + +/** + Additional data flags to be added to addData calls (these are added + in with what is there). You can do multiple flags by separating + them with a | character. + **/ +AREXPORT void ArServerBase::setAdditionalDataFlags( + const char *additionalDataFlags) +{ + myDataMutex.lock(); + if (additionalDataFlags == NULL || additionalDataFlags[0] == '\0') + myAdditionalDataFlags = ""; + else + myAdditionalDataFlags = additionalDataFlags; + myDataMutex.unlock(); +} + + +AREXPORT bool ArServerBase::dataHasFlag(const char *name, + const char *dataFlag) +{ + unsigned int command; + if ((command = findCommandFromName(name)) == 0) + { + ArLog::log(ArLog::Verbose, + "ArServerBase::dataHasFlag: %s is not data that is on the server", + name); + return false; + } + + return dataHasFlagByCommand(findCommandFromName(name), dataFlag); +} + +AREXPORT bool ArServerBase::dataHasFlagByCommand(unsigned int command, + const char *dataFlag) +{ + std::map::iterator dIt; + bool ret; + + myDataMutex.lock(); + if ((dIt = myDataMap.find(command)) == myDataMap.end()) + ret = false; + else + ret = (*dIt).second->hasDataFlag(dataFlag); + myDataMutex.unlock(); + + return ret; +} + +AREXPORT unsigned int ArServerBase::getTcpPort(void) +{ + return myTcpPort; +} + +AREXPORT unsigned int ArServerBase::getUdpPort(void) +{ + return myUdpPort; +} + +AREXPORT const char *ArServerBase::getOpenOnIP(void) +{ + if (myOpenOnIP.empty()) + return NULL; + else + return myOpenOnIP.c_str(); +} + +bool ArServerBase::processFile(void) +{ + setBackupTimeout(myBackupTimeout); + return true; +} + +AREXPORT void ArServerBase::identGetConnectionID(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + ArServerClientIdentifier identifier = client->getIdentifier(); + + // if there is an id then just send that ConnectionID + if (identifier.getConnectionID() != 0) + { + sending.uByte4ToBuf(identifier.getConnectionID()); + client->sendPacketTcp(&sending); + } + // otherwise we need to find an ConnectionID for it (don't lock while doing + // this since the client bases can only be active from within the + // server base) + + // we have the id number, but make sure it isn't already taken + // (maybe we'll wrap a 4 byte number, but its unlikely, but better + // safe than sorry) + bool duplicate; + std::list::iterator it; + bool hitZero; + + // this does both the stepping to find a good ID, the for also winds + // up incrementing it after we find one, which I don't like since + // its a side effect, but oh well + for (duplicate = true, hitZero = false; + duplicate; + myConnectionNumber++) + { + if (myConnectionNumber == 0) + { + // if we hit zero once already and are back there, just use 0 + // for an id + if (hitZero) + { + ArLog::log(ArLog::Terse, "ConnectionID hit zero again, giving up"); + break; + } + ArLog::log(ArLog::Terse, "ConnectionID lookup wrapped"); + // otherwise set that we hit zero and go to 1 + hitZero = true; + myConnectionNumber++; + } + + // see if we have any duplicates + for (it = myClients.begin(); + it != myClients.end(); + it++) + { + if (myConnectionNumber != (*it)->getIdentifier().getConnectionID()) + { + duplicate = false; + break; + } + } + } + + identifier.setConnectionID(myConnectionNumber); + client->setIdentifier(identifier); + + sending.uByte4ToBuf(identifier.getConnectionID()); + client->sendPacketTcp(&sending); +} + +AREXPORT void ArServerBase::identSetConnectionID(ArServerClient *client, ArNetPacket *packet) +{ + ArServerClientIdentifier identifier = client->getIdentifier(); + identifier.setConnectionID(packet->bufToUByte4()); + client->setIdentifier(identifier); +} + +AREXPORT void ArServerBase::identSetSelfIdentifier(ArServerClient *client, + ArNetPacket *packet) +{ + char buf[32000]; + packet->bufToStr(buf, sizeof(buf)); + + ArServerClientIdentifier identifier = client->getIdentifier(); + identifier.setSelfIdentifier(buf); + client->setIdentifier(identifier); +} + +AREXPORT void ArServerBase::identSetHereGoal(ArServerClient *client, ArNetPacket *packet) +{ + char buf[32000]; + packet->bufToStr(buf, sizeof(buf)); + + ArServerClientIdentifier identifier = client->getIdentifier(); + identifier.setHereGoal(buf); + client->setIdentifier(identifier); +} + +AREXPORT void ArServerBase::handleStartRequestTransaction(ArServerClient *client, ArNetPacket *packet) +{ + client->startRequestTransaction(); + + ArLog::log(ArLog::Verbose, + "ArServerBase::handleStartRequestTransaction() from %s complete", + client->getIPString()); + +} // end method handleStartRequestTransaction + + +AREXPORT void ArServerBase::handleEndRequestTransaction(ArServerClient *client, ArNetPacket *packet) +{ + if (client->endRequestTransaction()) { + ArLog::log(ArLog::Verbose, + "ArServerBase::handleEndRequestTransaction() from %s complete", + client->getIPString()); + + } + else { + ArLog::log(ArLog::Verbose, + "ArServerBase::handleEndRequestTransaction() error from %s" , + client->getIPString()); + + } + + +} // end method handleEndRequestTransaction + + +AREXPORT int ArServerBase::getRequestTransactionCount() +{ + myClientsMutex.lock(); + int c = 0; + for (std::list::iterator iter = myClients.begin(); + iter != myClients.end(); + iter++) { + ArServerClient *client = *iter; + if (client != NULL) { + c += client->getRequestTransactionCount(); + } + + } // end for each client + + myClientsMutex.unlock(); + + return c; + +} // end method getRequestTransactionCount + + +AREXPORT void ArServerBase::closeConnectionID(ArTypes::UByte4 idNum) +{ + if (idNum == 0) + { + ArLog::log(ArLog::Verbose, "%s: Cannot close connection to id 0", + myLogPrefix.c_str()); + return; + } + + std::list::iterator it; + // for speed we'd use a list of iterators and erase, but for clarity + // this is easier and this won't happen that often + //std::list removeList; + ArServerClient *client; + + myClientsMutex.lock(); + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + if (client->getIdentifier().getConnectionID() == idNum) + { + client->forceDisconnect(true); + myRemoveSetMutex.lock(); + myRemoveSet.insert(client); + myRemoveSetMutex.unlock(); + } + } + /* + while ((it = removeList.begin()) != removeList.end()) + { + client = (*it); + if (myDebugLogging) + ArLog::log(ArLog::Normal, + "%sClosing (by connection id) connection to %s", + myLogPrefix.c_str(), client->getIPString()); + myClients.remove(client); + for (std::list *>::iterator rci = myClientRemovedCallbacks.begin(); + rci != myClientRemovedCallbacks.end(); + rci++) { + if (*rci) { + (*rci)->invoke(client); + } + } + + delete client; + removeList.pop_front(); + } + */ + myClientsMutex.unlock(); +} + +AREXPORT void ArServerBase::logConnections(const char *prefix) +{ + std::list::iterator it; + ArServerClient *client; + + myClientsMutex.lock(); + + ArLog::log(ArLog::Normal, "%sConnections for %s (%d now, %d max)", prefix, + myServerName.c_str(), myClients.size(), myMostClients); + + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + ArLog::log(ArLog::Normal, "%s\t%s", prefix, client->getIPString()); + } + + myClientsMutex.unlock(); +} +/// Sets debug logging +AREXPORT void ArServerBase::setDebugLogging(bool debugLogging) +{ + myDebugLogging = debugLogging; + if (myDebugLogging) + myVerboseLogLevel = ArLog::Normal; + else + myVerboseLogLevel = ArLog::Verbose; +} + +AREXPORT bool ArServerBase::getDebugLogging(void) +{ + return myDebugLogging; +} + +AREXPORT int ArServerBase::getMostClients(void) +{ + return myMostClients; +} + +void ArServerBase::slowIdleCallback(void) +{ + if (!myOpened) + { + ArUtil::sleep(myLoopMSecs); + return; + } + + bool isRequestTransactionInProgress = (getRequestTransactionCount() > 0); + + std::list::iterator it; + ArServerClient *client = NULL; + + std::list::iterator cIt; + ArFunctor *functor = NULL; + + if (myAllowSlowPackets) + { + myProcessingSlowIdleMutex.lock(); + //printf("SLOW...\n"); + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + if (!client->slowPacketCallback()) + { + client->forceDisconnect(true); + myRemoveSetMutex.lock(); + myRemoveSet.insert(client); + myRemoveSetMutex.unlock(); + } + } + //printf("done slow...\n"); + myProcessingSlowIdleMutex.unlock(); + } + + int activityTime = ArServerMode::getActiveModeActivityTimeSecSince(); + + // This check is solely for the purpose of logging a message if idle + // processing is being delayed because a request transaction is still + // in progress. (Could/should be improved so that it does not spam.) + // + // The if statement is similar to the following one -- except with + // isRequestTransactionInProgress inverted. + if (myAllowIdlePackets && + (activityTime < 0 || activityTime > 1) && + isRequestTransactionInProgress) { + ArLog::log(ArLog::Verbose, + "ArServerBase::slowIdleCallback() waiting until request transaction complete"); + } // end if + + + // Don't process idle packets until all "request transactions" are complete. + // These are multi-step handshake sequences that should not be interrupted. + // + if (myAllowIdlePackets && + (activityTime < 0 || activityTime > 1) && + !isRequestTransactionInProgress) + { + /* + if (idleProcessingPending() && ArServerMode::getActiveMode() != NULL) + ArLog::log(myVerboseLogLevel, "Idle processing pending, idle %ld msecs", + ArServerMode::getActiveMode()->getActivityTime().mSecSince()); + */ + + //printf("IDLE...\n"); + + myProcessingSlowIdleMutex.lock(); + + myIdleCallbacksMutex.lock(); + if (myHaveIdleCallbacks) + { + while ((cIt = myIdleCallbacks.begin()) != myIdleCallbacks.end()) + { + functor = (*cIt); + myIdleCallbacks.pop_front(); + myIdleCallbacksMutex.unlock(); + if (functor->getName() != NULL && functor->getName()[0] != '\0') + ArLog::log(myVerboseLogLevel, "Calling idle callback functor %s", + functor->getName()); + else + ArLog::log(myVerboseLogLevel, + "Calling anonymous idle callback functor"); + functor->invoke(); + myIdleCallbacksMutex.lock(); + } + myHaveIdleCallbacks = false; + } + myIdleCallbacksMutex.unlock(); + + for (it = myClients.begin(); it != myClients.end(); ++it) + { + client = (*it); + if (!client->idlePacketCallback()) + { + client->forceDisconnect(true); + myRemoveSetMutex.lock(); + myRemoveSet.insert(client); + myRemoveSetMutex.unlock(); + } + } + //printf("done idle...\n"); + myProcessingSlowIdleMutex.unlock(); + } + ArUtil::sleep(myLoopMSecs); +} + +/** + * Call this method to delay the current thread after a packet has been sent. + * This allows the packet to be transmitted before any subsequent action. + * + * If the call is made in the main server thread, then loop once will be called + * until the specified time has passed. If the call is made in the idle thread, + * then ArUtil::sleep is used. (Note that if ArUtil::sleep() were called in the + * main thread, then the packet would not actually be transmitted until after + * the sleep exits.) +**/ +void ArServerBase::sleepAfterSend(int msecDelay) +{ + if (msecDelay < 0) { + ArLog::log(ArLog::Normal, + "ArServerBase::sleepAfterSend() unexpected msecDelay = %i", + msecDelay); + return; + } + + if (ArThread::self() == mySlowIdleThread) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerBase::sleepAfterSend() about to sleep in idle thread")); + + ArUtil::sleep(msecDelay); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerBase::sleepAfterSend() finished sleep in idle thread")); + } + else { // not idle thread + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerBase::sleepAfterSend() about to loop in main thread")); + + ArTime startTime; + while (startTime.mSecSince() < msecDelay) { + loopOnce(); + ArUtil::sleep(1); + } // end while keep delaying + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerBase::sleepAfterSend() finished loop in main thread")); + + } + +} // end method sleepAfterSend + + +AREXPORT bool ArServerBase::hasSlowPackets(void) +{ + return myHaveSlowPackets; +} + +AREXPORT bool ArServerBase::hasIdlePackets(void) +{ + return myHaveIdlePackets; +} + +AREXPORT bool ArServerBase::hasIdleCallbacks(void) +{ + return myHaveIdleCallbacks; +} + +AREXPORT bool ArServerBase::idleProcessingPending(void) +{ + return myHaveIdleCallbacks || myHaveIdlePackets; +} + +AREXPORT void ArServerBase::netIdleProcessingPending(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendingPacket; + + if (idleProcessingPending()) + sendingPacket.byteToBuf(1); + else + sendingPacket.byteToBuf(0); + + client->sendPacketTcp(&sendingPacket); +} + +AREXPORT bool ArServerBase::allowingIdlePackets(void) +{ + return myAllowIdlePackets; +} + +/** + Note that if idle packets are not allowed then idle callbacks will + not work. + + @return true if the callback was added, false if not +**/ +AREXPORT bool ArServerBase::addIdleSingleShotCallback(ArFunctor *functor) +{ + if (!myAllowIdlePackets) + return false; + + myIdleCallbacksMutex.lock(); + myIdleCallbacks.push_back(functor); + myHaveIdleCallbacks = true; + if (functor->getName() != NULL && functor->getName()[0] != '\0') + ArLog::log(myVerboseLogLevel, + "Adding idle singleshot callback functor %s", + functor->getName()); + else + ArLog::log(myVerboseLogLevel, + "Adding anonymous idle singleshot callback functor"); + myIdleCallbacksMutex.unlock(); + return true; +} + +AREXPORT void ArServerBase::internalSetNumClients(int numClients) +{ + myUsingOwnNumClients = false; + myNumClients = numClients; +} + + +AREXPORT void ArServerBase::internalLockup(void) +{ + ArLog::log(ArLog::Normal, "%s locking up by request", myServerName.c_str()); + myDataMutex.lock(); +} + +ArServerBase::SlowIdleThread::SlowIdleThread(ArServerBase *serverBase) +{ + setThreadName("ArServerBase::SlowIdleThread"); + myServerBase = serverBase; + runAsync(); +} + +ArServerBase::SlowIdleThread::~SlowIdleThread() +{ + +} + +void * ArServerBase::SlowIdleThread::runThread(void *arg) +{ + threadStarted(); + + while (getRunning()) + { + myServerBase->slowIdleCallback(); + } + + threadFinished(); + return NULL; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerClient.cpp b/Legacy/Aria/ArNetworking/src/ArServerClient.cpp new file mode 100644 index 0000000..347b403 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerClient.cpp @@ -0,0 +1,1563 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerClient.h" +#include "ArServerCommands.h" +#include "ArClientCommands.h" +#include "ArServerData.h" +#include "ArServerUserInfo.h" + +/** + In addition to the normal contructorness this contructor starts the + connection between the server and the client going + + @param tcpSocket the socket that has been established between the + client and the server + + @param udpPort the udp port the server is using + + @param authKey this authKey must be presented by the client to the + server on the server's UDP port for the client to be recognized by + the server + + @param introKey this key must be presented by the server to the + client so that the client will recognize the server + + @param sendUdpCallback the callback used to send Udp packets (since + the udp packets need to be sent from the server's udp port and the + serverclient here doesn't have one) + + @param dataMap the map between command numbers and the command data + + @param passwordKey the key (just plain text thats used in an md5 + along with the serverKey and the password over on the client side) + that was generated for the passwords on this exact connection + + @param serverKey the key (just plain text thats used in an md5 + along with the passwordKey and the password over on the client + side) that should be used for any connections to this server + + @param debugLogging If true, log some debug messages + + @param logPasswordFailureVerbosely If true, log password errors at + ArLog::Verbose + level, if false, log them at ArLog::Normal level. + + @param userInfo the pointer to the item that holds our usernames + and passwords + + @param rejecting + + @param rejectingString string to reject with + **/ + +AREXPORT ArServerClient::ArServerClient( + ArSocket *tcpSocket, unsigned int udpPort, long authKey, + long introKey, ArRetFunctor2 *sendUdpCallback, + std::map *dataMap, + const char *passwordKey, const char *serverKey, + const ArServerUserInfo *userInfo, int rejecting, + const char *rejectingString, bool debugLogging, + const char *serverClientName, bool logPasswordFailureVerbosely, + bool allowSlowPackets, bool allowIdlePackets, + const char *enforceProtocolVersion, + ArServerCommands::Type enforceType) : + + myProcessPacketCB(this, &ArServerClient::processPacket, NULL, true), + + myRequestTransactionCount(0), + myRequestTransactionMutex() + +{ + ArNetPacket packet; + + // set our default to no command + pushCommand(0); + + myAuthKey = authKey; + myIntroKey = introKey; + myTcpSocket.transfer(tcpSocket); + myTcpSocket.setCloseCallback(tcpSocket->getCloseCallback()); + myTcpSocket.setNonBlock(); + myTcpReceiver.setSocket(&myTcpSocket); + myTcpReceiver.setProcessPacketCB(&myProcessPacketCB); + myTcpSender.setSocket(&myTcpSocket); + + mySendUdpCB = sendUdpCallback; + myDataMap = dataMap; + if (udpPort == 0) + myTcpOnly = true; + else + myTcpOnly = false; + mySentTcpOnly = myTcpOnly; + + myUserInfo = userInfo; + myPasswordKey = passwordKey; + myServerKey = serverKey; + myRejecting = rejecting; + if (rejectingString != NULL) + myRejectingString = rejectingString; + + myDebugLogging = debugLogging; + if (myDebugLogging) + myVerboseLogLevel = ArLog::Normal; + else + myVerboseLogLevel = ArLog::Verbose; + + myTcpSender.setDebugLogging(myDebugLogging); + + myLogPrefix = serverClientName; + myLogPrefix += ": "; + myTcpSender.setLoggingPrefix(myLogPrefix.c_str()); + myTcpReceiver.setLoggingPrefix(myLogPrefix.c_str()); + + myLogPasswordFailureVerbosely = logPasswordFailureVerbosely; + + if (enforceProtocolVersion != NULL) + myEnforceProtocolVersion = enforceProtocolVersion; + else + myEnforceProtocolVersion = ""; + myEnforceType = enforceType; + + mySlowPacketsMutex.setLogName("ArServerClient::mySlowPacketsMutex"); + myIdlePacketsMutex.setLogName("ArServerClient::myIdlePacketsMutex"); + + myAllowSlowPackets = allowSlowPackets; + myAllowIdlePackets = allowIdlePackets; + + myRequestTransactionMutex.setLogName("ArServerClient::myRequestTransactionMutex"); + + setIdentifier(ArServerClientIdentifier()); + internalSwitchState(STATE_SENT_INTRO); + + packet.empty(); + packet.setCommand(ArServerCommands::INTRODUCTION); + packet.strToBuf("alpha"); + packet.uByte2ToBuf(udpPort); + packet.uByte4ToBuf(myAuthKey); + packet.uByte4ToBuf(myIntroKey); + packet.strToBuf(myPasswordKey.c_str()); + packet.strToBuf(myEnforceProtocolVersion.c_str()); + sendPacketTcp(&packet); + + mySlowIdleThread = NULL; + + myHaveSlowPackets = false; + myHaveIdlePackets = false; + + myCreationTime.setToNow(); + + resetTracking(); +} + +AREXPORT ArServerClient::~ArServerClient() +{ + myTcpReceiver.setSocket(NULL); + myTcpReceiver.setProcessPacketCB(NULL); + myTcpSocket.close(); + + /// MPL fixing a memory leak + // new way to get the request change functor called + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + while ((it = myRequested.begin()) != myRequested.end()) + { + data = (*it); + serverData = (*it)->getServerData(); + myRequested.pop_front(); + delete data; + serverData->callRequestChangedFunctor(); + } + /* old way + ArUtil::deleteSet(myRequested.begin(), myRequested.end()); + myRequested.clear(); + */ + ArUtil::deleteSetPairs(myTrackingSentMap.begin(), + myTrackingSentMap.end()); + myTrackingSentMap.clear(); + + ArUtil::deleteSetPairs(myTrackingReceivedMap.begin(), + myTrackingReceivedMap.end()); + myTrackingReceivedMap.clear(); + + ArUtil::deleteSet(mySlowPackets.begin(), mySlowPackets.end()); + mySlowPackets.clear(); + ArUtil::deleteSet(myIdlePackets.begin(), myIdlePackets.end()); + myIdlePackets.clear(); + +} + +void ArServerClient::internalSwitchState(ServerState state) +{ + myState = state; + myStateStart.setToNow(); + if (myDebugLogging) + ArLog::log(ArLog::Normal, "%sSwitching to state %d", + myLogPrefix.c_str(), (int)state); +} + +AREXPORT void ArServerClient::setBackupTimeout(double timeoutInMins) +{ + myBackupTimeout = timeoutInMins; + myTcpSender.setBackupTimeout(myBackupTimeout); +} + +AREXPORT bool ArServerClient::tcpCallback(void) +{ + if (myState == STATE_REJECTED) + { + myTcpSender.sendData(); + ArUtil::sleep(10); + return false; + } + + if (myState == STATE_DISCONNECTED && (myHaveSlowPackets || + myHaveIdlePackets)) + return true; + + if (myState == STATE_DISCONNECTED) + return false; + + if (myState == STATE_SENT_INTRO && myStateStart.secSince() >= 60) + { + ArLog::log(myVerboseLogLevel, "%sTook too long for %s to connect", + myLogPrefix.c_str(), getIPString()); + return false; + } + + if (myTcpOnly && !mySentTcpOnly) + { + mySentTcpOnly = true; + ArNetPacket sending; + sending.setCommand(ArServerCommands::TCP_ONLY); + sendPacketTcp(&sending); + } + + if (!myTcpReceiver.readData()) + { + ArLog::log(myVerboseLogLevel, "%sTrouble receiving tcp data from %s", + myLogPrefix.c_str(), getIPString()); + internalSwitchState(STATE_DISCONNECTED); + return tcpCallback(); + //return false; + } + if (!myTcpSender.sendData()) + { + ArLog::log(myVerboseLogLevel, "%sTrouble sending tcp data to %s", + myLogPrefix.c_str(), getIPString()); + internalSwitchState(STATE_DISCONNECTED); + return tcpCallback(); + //return false; + } + + return true; +} + +AREXPORT void ArServerClient::handleRequests(void) +{ + if (myState != STATE_CONNECTED) + return; + + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + ArTime lastSent; + + // walk through our list + for (it = myRequested.begin(); it != myRequested.end(); ++it) + { + data = (*it); + lastSent = data->getLastSent(); + // see if this needs to be called + if (data->getMSec() != -1 && + (data->getMSec() == 0 || lastSent.mSecSince() > data->getMSec())) + { + serverData = data->getServerData(); + // call it, then set it so we know we did + pushCommand(serverData->getCommand()); + pushForceTcpFlag(false); + if (serverData->getFunctor() != NULL) + serverData->getFunctor()->invoke(this, data->getPacket()); + popCommand(); + popForceTcpFlag(); + data->setLastSentToNow(); + } + } +} + + +void ArServerClient::sendListPacket(void) +{ + ArNetPacket packet; + std::map::iterator it; + unsigned int count; + unsigned int shortLen; + unsigned int longLen; + ArServerData *serverData; + + // First we send a list of numbers, names and descriptions + packet.setCommand(ArServerCommands::LIST); + + // number of entries (we'll overwrite it later with the right number) + shortLen = packet.getLength(); + packet.uByte2ToBuf(0); + // loop through the data to build the packet + for (it = myDataMap->begin(), count = 0; it != myDataMap->end(); it++) + { + serverData = (*it).second; + if (myUserInfo == NULL || + serverData->getCommandGroup() == NULL || + serverData->getCommandGroup()[0] == '\0' || + myGroups.count(serverData->getCommandGroup()) != 0 || + myGroups.count("all") != 0) + { + count++; + packet.uByte2ToBuf(serverData->getCommand()); + packet.strToBuf(serverData->getName()); + packet.strToBuf(serverData->getDescription()); + } + } + // put the real number of entries in the right spot + longLen = packet.getLength(); + packet.setLength(shortLen); + packet.uByte2ToBuf(count); + packet.setLength(longLen); + + sendPacketTcp(&packet); + + // then we send a list of the arguments and returns... they aren't + // combined so that the packet structure doesn't need to change + packet.empty(); + packet.setCommand(ArServerCommands::LISTARGRET); + + // number of entries (we'll overwrite it later with the right number) + shortLen = packet.getLength(); + packet.uByte2ToBuf(0); + + // loop through the data to build the packet + for (it = myDataMap->begin(), count = 0; it != myDataMap->end(); it++) + { + serverData = (*it).second; + if (myUserInfo == NULL || + serverData->getCommandGroup() == NULL || + serverData->getCommandGroup()[0] == '\0' || + myGroups.count(serverData->getCommandGroup()) != 0 || + myGroups.count("all") != 0) + { + count++; + packet.uByte2ToBuf(serverData->getCommand()); + packet.strToBuf(serverData->getArgumentDescription()); + packet.strToBuf(serverData->getReturnDescription()); + } + + } + // put the real number of entries in the right spot + longLen = packet.getLength(); + packet.setLength(shortLen); + packet.uByte2ToBuf(count); + packet.setLength(longLen); + sendPacketTcp(&packet); + + + // then we send a list of command groups... they aren't + // combined so that the packet structure doesn't need to change + packet.empty(); + packet.setCommand(ArServerCommands::LISTGROUPANDFLAGS); + + // number of entries (we'll overwrite it later with the right number) + shortLen = packet.getLength(); + packet.uByte2ToBuf(0); + + // loop through the data to build the packet + for (it = myDataMap->begin(), count = 0; it != myDataMap->end(); it++) + { + serverData = (*it).second; + if (myUserInfo == NULL || + serverData->getCommandGroup() == NULL || + serverData->getCommandGroup()[0] == '\0' || + myGroups.count(serverData->getCommandGroup()) != 0 || + myGroups.count("all") != 0) + { + count++; + packet.uByte2ToBuf(serverData->getCommand()); + packet.strToBuf(serverData->getCommandGroup()); + packet.strToBuf(serverData->getDataFlagsString()); + } + + } + // put the real number of entries in the right spot + longLen = packet.getLength(); + packet.setLength(shortLen); + packet.uByte2ToBuf(count); + packet.setLength(longLen); + sendPacketTcp(&packet); +} + +AREXPORT void ArServerClient::processPacket(ArNetPacket *packet, bool tcp) +{ + std::string str; + struct sockaddr_in sin; + unsigned int clientUdpPort; + ArNetPacket retPacket; + + //printf("Command number %d\n", packet->getCommand()); + // if we're in intro mode and received back the intro + if (myState == STATE_SENT_INTRO && + packet->getCommand() == ArClientCommands::INTRODUCTION) + { + char user[512]; + unsigned char password[16]; + char enforceProtocolVersion[256]; + clientUdpPort = packet->bufToUByte2(); + packet->bufToStr(user, sizeof(user)); + packet->bufToData((char *)password, 16); + packet->bufToStr(enforceProtocolVersion, sizeof(enforceProtocolVersion)); + ArServerCommands::Type clientType = (ArServerCommands::Type)packet->bufToByte(); + + if (myRejecting != 0) + { + retPacket.empty(); + retPacket.setCommand(ArServerCommands::REJECTED); + retPacket.byte2ToBuf(myRejecting); + retPacket.strToBuf(myRejectingString.c_str()); + sendPacketTcp(&retPacket); + ArLog::log(ArLog::Normal, + "%sRejected connection from %s (%d, %s)", + myLogPrefix.c_str(), getIPString(), myRejecting, + myRejectingString.c_str()); + internalSwitchState(STATE_REJECTED); + return; + } + + if (!myEnforceProtocolVersion.empty() && + strcmp(enforceProtocolVersion, myEnforceProtocolVersion.c_str()) != 0) + { + retPacket.empty(); + retPacket.setCommand(ArServerCommands::REJECTED); + retPacket.byte2ToBuf(4); + retPacket.strToBuf("Server rejecting client connection since protocol version does not match"); + sendPacketTcp(&retPacket); + ArLog::log(ArLog::Normal, "%sServer rejecting client connection since protocol version does not match", myLogPrefix.c_str()); + internalSwitchState(STATE_REJECTED); + } + + if (myEnforceType != ArServerCommands::TYPE_UNSPECIFIED && + (myEnforceType != clientType || + myEnforceType == ArServerCommands::TYPE_NONE)) + { + retPacket.empty(); + retPacket.setCommand(ArServerCommands::REJECTED); + retPacket.byte2ToBuf(6); + retPacket.strToBuf("Server rejecting client connection since type (real or sim) does not match (but is specified)"); + sendPacketTcp(&retPacket); + ArLog::log(ArLog::Normal, "%sServer rejecting client connection since type (real or sim) does not match (but is specified)", myLogPrefix.c_str()); + internalSwitchState(STATE_REJECTED); + } + + // if user info is NULL we're not checking passwords + if (myUserInfo != NULL && + !myUserInfo->matchUserPassword(user, password, myPasswordKey.c_str(), + myServerKey.c_str(), + myLogPasswordFailureVerbosely)) + { + retPacket.empty(); + retPacket.setCommand(ArServerCommands::REJECTED); + retPacket.byte2ToBuf(1); + retPacket.strToBuf(""); + sendPacketTcp(&retPacket); + ArLog::log(ArLog::Normal, "%sRejected user '%s' or password from %s", + myLogPrefix.c_str(), user, getIPString()); + internalSwitchState(STATE_REJECTED); + return; + } + if (myUserInfo != NULL) + myGroups = myUserInfo->getUsersGroups(user); + else + myGroups.clear(); + sin.sin_family = AF_INET; + sin.sin_addr = *myTcpSocket.inAddr(); + sin.sin_port = ArSocket::hostToNetOrder(clientUdpPort); + if (myUserInfo != NULL) + ArLog::log(ArLog::Normal, + "%sClient connected from %s with user %s", + myLogPrefix.c_str(), getIPString(), user); + else + ArLog::log(ArLog::Normal, + "%sClient connected from %s", myLogPrefix.c_str(), + getIPString()); + + setUdpAddress(&sin); + // send that we've connected + retPacket.empty(); + retPacket.setCommand(ArServerCommands::CONNECTED); + sendPacketTcp(&retPacket); + // note that we're connected + internalSwitchState(STATE_CONNECTED); + + // send them the list + sendListPacket(); + // send the udp introduction if we're using udp + if (!myTcpOnly) + { + retPacket.empty(); + retPacket.setCommand(ArServerCommands::UDP_INTRODUCTION); + retPacket.byte4ToBuf(myIntroKey); + sendPacketUdp(&retPacket); + } + } + // if we aren't in intro mode and got an intro somethings wrong + else if (packet->getCommand() == ArClientCommands::INTRODUCTION) + { + ArLog::log(ArLog::Terse, + "%sReceived introduction when not in intro mode", + myLogPrefix.c_str()); + return; + } + // if we got this over tcp then they only want tcp + else if (packet->getCommand() == ArClientCommands::UDP_INTRODUCTION) + { + if (!myTcpOnly) + { + ArLog::log(ArLog::Normal, "%sGot UDP introduction over tcp, assuming client only wants tcp data.", myLogPrefix.c_str()); + myTcpOnly = true; + } + return; + } + // if we're connected and got a udp confirmation + else if ((myState == STATE_CONNECTED || + myState == STATE_SENT_INTRO) && + packet->getCommand() == ArClientCommands::UDP_CONFIRMATION) + { + myUdpConfirmedTo = true; + ArLog::log(myVerboseLogLevel, + "%s: udp connection to client confirmed.", myLogPrefix.c_str()); + return; + } + // if we're not connected (or close) and got a confirmation + else if (packet->getCommand() == ArClientCommands::UDP_CONFIRMATION) + { + ArLog::log(ArLog::Normal, + "%sReceived udp confirmation when not connected.", + myLogPrefix.c_str()); + return; + } + else if (packet->getCommand() == ArClientCommands::TCP_ONLY) + { + ArLog::log(myVerboseLogLevel, "%sClient only wants tcp data.", myLogPrefix.c_str()); + myTcpOnly = true; + return; + } + else if (packet->getCommand() == ArClientCommands::SHUTDOWN) + { + ArLog::log(ArLog::Normal, "%sClient from %s has disconnected.", + myLogPrefix.c_str(), getIPString()); + internalSwitchState(STATE_DISCONNECTED); + return; + } + // if we're connected its a request, then set all that up + else if (myState == STATE_CONNECTED && + packet->getCommand() == ArClientCommands::REQUEST) + { + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + unsigned int command; + long mSec; + // see which one they requested + command = packet->bufToUByte2(); + mSec = packet->bufToByte4(); + + // first we see if we already have this one + for (it = myRequested.begin(); it != myRequested.end(); ++it) + { + data = (*it); + serverData = data->getServerData(); + if (serverData->getCommand() == command) + { + trackPacketReceived(packet, command); + data->setMSec(mSec); + data->setPacket(packet); + data->getPacket()->setCommand(command); + serverData->callRequestChangedFunctor(); + ArLog::log(myVerboseLogLevel, + "%sRevised request for command %s to %d mSec with new argument", + myLogPrefix.c_str(), + findCommandName(serverData->getCommand()), mSec); + return; + } + } + // we didn't have it, so make a new one + std::map::iterator sdit; + if ((sdit = myDataMap->find(command)) == myDataMap->end()) + { + ArLog::log(ArLog::Terse, + "%sGot request for command %d which doesn't exist", + myLogPrefix.c_str(), command); + return; + } + serverData = (*sdit).second; + if (serverData == NULL) + { + ArLog::log(ArLog::Terse, + "%sprocessPackets request handler has NULL serverData", + myLogPrefix.c_str()); + } + if (myUserInfo != NULL && + serverData->getCommandGroup() != NULL && + serverData->getCommandGroup()[0] != '\0' && + myGroups.count(serverData->getCommandGroup()) == 0 && + myGroups.count("all") == 0) + { + ArLog::log(ArLog::Normal, + "%s%s tried to request command '%s' but it doesn't have access to that command", + myLogPrefix.c_str(), getIPString(), + serverData->getName()); + return; + } + trackPacketReceived(packet, command); + data = new ArServerClientData(serverData, mSec, packet); + data->getPacket()->setCommand(command); + ArLog::log(myVerboseLogLevel, + "%sadded request for command %s every %d mSec", + myLogPrefix.c_str(), serverData->getName(), mSec); + if (mSec == 0) + ArLog::log(ArLog::Normal, "%sClient from %s requested command %s every at 0 msec", myLogPrefix.c_str(), + getIPString(), serverData->getName()); + myRequested.push_front(data); + serverData->callRequestChangedFunctor(); + pushCommand(command); + pushForceTcpFlag(false); + if (serverData->getFunctor() != NULL) + serverData->getFunctor()->invoke(this, data->getPacket()); + popCommand(); + popForceTcpFlag(); + return; + } + // if we got a request when we're not connected + else if (packet->getCommand() == ArClientCommands::REQUEST) + { + ArLog::log(ArLog::Normal, + "Got a request while not connected.", + myLogPrefix.c_str()); + return; + } + // if we're connected its a requestStop, then set all that up + else if (myState == STATE_CONNECTED && + packet->getCommand() == ArClientCommands::REQUESTSTOP) + { + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + unsigned int command; + // see which one they requested + command = packet->bufToUByte2(); + + // first we see if we have this one + for (it = myRequested.begin(); it != myRequested.end(); ++it) + { + data = (*it); + serverData = data->getServerData(); + // we have a match, so set the new params then return + if (data->getServerData()->getCommand() == command) + { + trackPacketReceived(packet, command); + myRequested.erase(it); + ArLog::log(myVerboseLogLevel, "%sStopped request for command %s", + myLogPrefix.c_str(), + findCommandName(serverData->getCommand())); + delete data; + serverData->callRequestChangedFunctor(); + return; + } + } + // if we don't have it... that means that it wasn't here + + // find out what to call it + std::map::iterator sdit; + if ((sdit = myDataMap->find(command)) == myDataMap->end()) + { + ArLog::log(ArLog::Terse, + "%sGot a requeststop for command %d which doesn't exist", + myLogPrefix.c_str(), command); + return; + } + trackPacketReceived(packet, command); + serverData = (*sdit).second; + if (serverData == NULL) + ArLog::log(ArLog::Terse, + "%srequeststop handler has NULL serverData on back command %d", + myLogPrefix.c_str(), command); + else + ArLog::log(ArLog::Normal, "%s: Got a stop request for command %s that isn't requested", myLogPrefix.c_str(), serverData->getName()); + return; + } + // if we got a requestStop when we're not connected + else if (packet->getCommand() == ArClientCommands::REQUESTSTOP) + { + ArLog::log(ArLog::Normal, + "%sGot a requeststop while not connected.", + myLogPrefix.c_str()); + return; + } + // if we're connected and its a command to execute just once + else if (myState == STATE_CONNECTED) + { + unsigned int command; + std::map::iterator it; + ArServerData *serverData; + + command = packet->getCommand(); + if ((it = myDataMap->find(command)) == myDataMap->end()) + { + ArLog::log(ArLog::Terse, + "%sArServerClient got request for command %d which doesn't exist", + myLogPrefix.c_str(), command); + return; + } + serverData = (*it).second; + if (myUserInfo != NULL && + serverData->getCommandGroup() != NULL && + serverData->getCommandGroup()[0] != '\0' && + myGroups.count(serverData->getCommandGroup()) == 0 && + myGroups.count("all") == 0) + { + ArLog::log(ArLog::Normal, + "%s%s tried to request command '%s' once but it doesn't have access to that command", myLogPrefix.c_str(), + getIPString(), + serverData->getName()); + return; + } + trackPacketReceived(packet, command); + + // copy it out and return if its an idle packet + if (myAllowIdlePackets && serverData->isIdlePacket()) + { + myHaveIdlePackets = true; + if (command <= 255) + ArLog::log(myVerboseLogLevel, "%sStoring idle command %d", + myLogPrefix.c_str(), command); + else + ArLog::log(myVerboseLogLevel, "%sStoring idle command %s", + myLogPrefix.c_str(), serverData->getName()); + myIdlePacketsMutex.lock(); + ArNetPacket *idlePacket = new ArNetPacket(packet->getLength() + 5); + idlePacket->duplicatePacket(packet); + myIdlePackets.push_back(idlePacket); + myIdlePacketsMutex.unlock(); + return; + } + // If its a slow or an idle packet (and we're not allowing the + // idle behavior) and we allow slow packets then copy it + else if (myAllowSlowPackets && (serverData->isSlowPacket() || + serverData->isIdlePacket())) + { + myHaveSlowPackets = true; + if (command <= 255) + ArLog::log(myVerboseLogLevel, "%sStoring slow command %d", + myLogPrefix.c_str(), command); + else + ArLog::log(myVerboseLogLevel, "%sStoring slow command %s", + myLogPrefix.c_str(), serverData->getName()); + mySlowPacketsMutex.lock(); + ArNetPacket *slowPacket = new ArNetPacket(packet->getLength() + 5); + slowPacket->duplicatePacket(packet); + mySlowPackets.push_back(slowPacket); + mySlowPacketsMutex.unlock(); + return; + } + + + if (command <= 255) + ArLog::log(myVerboseLogLevel, "%sGot command %s", + myLogPrefix.c_str(), serverData->getName()); + else + ArLog::log(ArLog::Verbose, "%sGot command %s", + myLogPrefix.c_str(), serverData->getName()); + pushCommand(command); + pushForceTcpFlag(tcp); + if (serverData->getFunctor() != NULL) + serverData->getFunctor()->invoke(this, packet); + if (serverData->getRequestOnceFunctor() != NULL) + serverData->getRequestOnceFunctor()->invokeR(this, packet); + popCommand(); + popForceTcpFlag(); + return; + } + else + { + ArLog::log(ArLog::Terse, + "%sRogue packet command %s in state %d", myLogPrefix.c_str(), + findCommandName(packet->getCommand()), myState); + } +} + +AREXPORT void ArServerClient::forceDisconnect(bool quiet) +{ + if (!quiet) + ArLog::log(ArLog::Normal, "Client from %s has been forcibly disconnected.", + getIPString()); + internalSwitchState(STATE_DISCONNECTED); +} + +AREXPORT void ArServerClient::processAuthPacket(ArNetPacket *packet, + struct sockaddr_in *sin) +{ + ArNetPacket retPacket; + long authKey; + // check the auth key again, just in case + + authKey = packet->bufToUByte4(); + if (authKey != myAuthKey) + { + ArLog::log(ArLog::Terse, "ArServerClient: authKey given does not match actual authKey, horrible error."); + return; + } + + if (mySin.sin_port != sin->sin_port) + { + ArLog::log(myVerboseLogLevel, + "Client says it is using port %u but is using port %u\n", + ArSocket::netToHostOrder(mySin.sin_port), + ArSocket::netToHostOrder(sin->sin_port)); + } + myUdpConfirmedFrom = true; + mySin.sin_port = sin->sin_port; + mySin.sin_addr = sin->sin_addr; + ArLog::log(myVerboseLogLevel, "Client connected to server on udp port %u", + ArSocket::netToHostOrder(mySin.sin_port)); + // TODO put some state info here to note that its fully udp connected + retPacket.empty(); + retPacket.setCommand(ArServerCommands::UDP_INTRODUCTION); + retPacket.byte4ToBuf(myIntroKey); + sendPacketUdp(&retPacket); + retPacket.empty(); + retPacket.setCommand(ArServerCommands::UDP_CONFIRMATION); + sendPacketTcp(&retPacket); +} + +AREXPORT void ArServerClient::broadcastPacketTcp(ArNetPacket *packet) +{ + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + ArTime lastSent; + + // walk through our list + for (it = myRequested.begin(); it != myRequested.end(); ++it) + { + data = (*it); + serverData = data->getServerData(); + // see if this is our data, if it is send the packet + if (serverData->getCommand() == packet->getCommand()) + { + sendPacketTcp(packet); + return; + } + } + // we didn't have the data to send +} + +AREXPORT void ArServerClient::broadcastPacketUdp(ArNetPacket *packet) +{ + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + ArTime lastSent; + + // walk through our list + for (it = myRequested.begin(); it != myRequested.end(); ++it) + { + data = (*it); + serverData = data->getServerData(); + // see if this is our data, if it is send the packet + if (serverData->getCommand() == packet->getCommand()) + { + sendPacketUdp(packet); + return; + } + } + // we didn't have the data to send +} + +AREXPORT bool ArServerClient::sendPacketTcp(ArNetPacket *packet) +{ + if (!setupPacket(packet)) + { + if (myDebugLogging && packet->getCommand() <= 255) + ArLog::log(ArLog::Normal, + "%s sendPacket: could not set up tcp command %d", + myLogPrefix.c_str(), packet->getCommand()); + return false; + } + else + { + trackPacketSent(packet, true); + + if (myDebugLogging && packet->getCommand() <= 255) + ArLog::log(ArLog::Normal, "%sSending tcp command %d", + myLogPrefix.c_str(), packet->getCommand()); + + myTcpSender.sendPacket(packet, myLogPrefix.c_str()); + return true; + } +} + +AREXPORT bool ArServerClient::sendPacketUdp(ArNetPacket *packet) +{ + if (myTcpOnly || getForceTcpFlag()) + return sendPacketTcp(packet); + + if (!setupPacket(packet)) + { + if (myDebugLogging && packet->getCommand() <= 255) + ArLog::log(ArLog::Normal, + "%s sendPacket: could not set up udp command %d", + myLogPrefix.c_str(), packet->getCommand()); + return false; + } + else if (mySendUdpCB != NULL) + { + trackPacketSent(packet, false); + if (myDebugLogging && packet->getCommand() <= 255) + ArLog::log(ArLog::Normal, "%sSending udp command %d", + myLogPrefix.c_str(), packet->getCommand()); + return mySendUdpCB->invokeR(packet, &mySin); + } + else + { + if (myDebugLogging && packet->getCommand() <= 255) + ArLog::log(ArLog::Normal, "%sCould not send udp command %d", + myLogPrefix.c_str(), packet->getCommand()); + return false; + } +} + +AREXPORT bool ArServerClient::setupPacket(ArNetPacket *packet) +{ + if (packet->getCommand() == 0) + { + if (getCommand() != 0) + { + packet->setCommand(getCommand()); + } + else + { + ArLog::log(ArLog::Terse, "ArServerClient::sendPacket: packet to send has no command and we have no command in the stack"); + return false; + } + } + + if (myState == STATE_DISCONNECTED) + { + if (myDebugLogging && packet->getCommand() <= 255) + ArLog::log(myVerboseLogLevel, "%s sendPacket: command %s trying to be sent while disconnected", myLogPrefix.c_str(), findCommandName(packet->getCommand())); + return false; + } + + if (packet->getLength() > ArNetPacket::MAX_LENGTH) + { + ArLog::log(ArLog::Terse, + "% send packet: Packet for command %s packet is bad at %d", + myLogPrefix.c_str(), findCommandName(packet->getCommand()), + packet->getLength()); + return false; + } + + packet->finalizePacket(); + return true; +} + + +AREXPORT void ArServerClient::setUdpAddress(struct sockaddr_in *sin) +{ + mySin = *sin; +} + +AREXPORT struct sockaddr_in *ArServerClient::getUdpAddress(void) +{ + return &mySin; +} + +AREXPORT long ArServerClient::getAuthKey(void) +{ + return myAuthKey; +} + +unsigned int ArServerClient::getCommand(void) +{ + if (mySlowIdleThread == NULL || ArThread::self() != mySlowIdleThread) + { + if (!myCommandStack.empty()) + return myCommandStack.front(); + else + return 0; + } + else + { + if (!mySlowIdleCommandStack.empty()) + return mySlowIdleCommandStack.front(); + else + return 0; + } +} + +void ArServerClient::pushCommand(unsigned int command) +{ + myCommandStack.push_front(command); +} + +void ArServerClient::popCommand(void) +{ + if (myCommandStack.size() == 0) + { + ArLog::log(ArLog::Terse, + "ArServerClient::popCommand: popCommand tried to be called when stack empty."); + } + myCommandStack.pop_front(); +} + +void ArServerClient::pushSlowIdleCommand(unsigned int command) +{ + mySlowIdleCommandStack.push_front(command); +} + +void ArServerClient::popSlowIdleCommand(void) +{ + if (mySlowIdleCommandStack.size() == 0) + { + ArLog::log(ArLog::Terse, + "ArServerClient::popCommand: popSlowIdleCommand tried to be called when stack empty."); + } + mySlowIdleCommandStack.pop_front(); +} + + +bool ArServerClient::getForceTcpFlag(void) +{ + if (mySlowIdleThread == NULL || ArThread::self() != mySlowIdleThread) + { + if (!myForceTcpStack.empty()) + return myForceTcpStack.front(); + else + return false; + + } + else + { + if (!mySlowIdleForceTcpStack.empty()) + return mySlowIdleForceTcpStack.front(); + else + return false; + } +} + +void ArServerClient::pushForceTcpFlag(bool forceTcp) +{ + myForceTcpStack.push_front(forceTcp); +} + +void ArServerClient::popForceTcpFlag(void) +{ + if (myForceTcpStack.size() == 0) + { + ArLog::log(ArLog::Terse, + "ArServerClient::popForceTcp: popForceTcpFlag tried to be called when stack empty."); + } + myForceTcpStack.pop_front(); +} + + +void ArServerClient::pushSlowIdleForceTcpFlag(bool forceTcp) +{ + mySlowIdleForceTcpStack.push_front(forceTcp); +} + +void ArServerClient::popSlowIdleForceTcpFlag(void) +{ + if (mySlowIdleForceTcpStack.size() == 0) + { + ArLog::log(ArLog::Terse, + "ArServerClient::popForceTcp: popSlowIdleForceTcpFlag tried to be called when stack empty."); + } + mySlowIdleForceTcpStack.pop_front(); +} + +AREXPORT void ArServerClient::shutdown(void) +{ + ArNetPacket packet; + + packet.setCommand(ArServerCommands::SHUTDOWN); + sendPacketTcp(&packet); + myTcpSender.sendData(); +} + +AREXPORT const char *ArServerClient::getIPString(void) const +{ + return myIPString.c_str(); +} + +AREXPORT ArServerClientIdentifier ArServerClient::getIdentifier(void) const +{ + return myIdentifier; +} + +AREXPORT void ArServerClient::setIdentifier( + ArServerClientIdentifier identifier) +{ + std::string oldIPString = myIPString; + + myIdentifier = identifier; + myIPString = myTcpSocket.getRawIPString(); + if (myIdentifier.getIDString() != 0 && + myIdentifier.getIDString()[0] != '\0') + { + myIPString += " "; + myIPString += myIdentifier.getIDString(); + } + + if (!oldIPString.empty() && oldIPString != myIPString) + ArLog::log(ArLog::Normal, "%s%s changed to %s", myLogPrefix.c_str(), + oldIPString.c_str(), getIPString()); + myTcpSocket.setIPString(getIPString()); +} + +void ArServerClient::trackPacketSent(ArNetPacket *packet, bool tcp) +{ + if (myTrackingSentMap.find(packet->getCommand()) == myTrackingSentMap.end()) + myTrackingSentMap[packet->getCommand()] = new Tracker; + + if (tcp) + { + myTrackingSentMap[packet->getCommand()]->myPacketsTcp++; + myTrackingSentMap[packet->getCommand()]->myBytesTcp += packet->getLength(); + } + else + { + myTrackingSentMap[packet->getCommand()]->myPacketsUdp++; + myTrackingSentMap[packet->getCommand()]->myBytesUdp += packet->getLength(); + } +} + +void ArServerClient::trackPacketReceived(ArNetPacket *packet, + ArTypes::UByte2 command) +{ + if (myTrackingReceivedMap.find(command) == myTrackingReceivedMap.end()) + myTrackingReceivedMap[command] = new Tracker; + + if (packet->getPacketSource() == ArNetPacket::TCP) + { + myTrackingReceivedMap[command]->myPacketsTcp++; + myTrackingReceivedMap[command]->myBytesTcp += packet->getLength(); + } + else + { + myTrackingReceivedMap[command]->myPacketsUdp++; + myTrackingReceivedMap[command]->myBytesUdp += packet->getLength(); + } +} + +AREXPORT void ArServerClient::logTracking(bool terse) +{ + std::map::iterator it; + + ArTypes::UByte2 command; + Tracker *tracker = NULL; + long seconds; + + seconds = myTrackingStarted.secSince(); + if (seconds == 0) + seconds = 1; + + char name[512]; + + long packetsReceivedTcp = 0; + long bytesReceivedTcp = 0; + long packetsReceivedUdp = 0; + long bytesReceivedUdp = 0; + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "Received tracking for %s (active %d seconds):", + getIPString(), seconds); + for (it = myTrackingReceivedMap.begin(); it != myTrackingReceivedMap.end(); it++) + { + command = (*it).first; + tracker = (*it).second; + + packetsReceivedTcp += tracker->myPacketsTcp; + bytesReceivedTcp += tracker->myBytesTcp; + packetsReceivedUdp += tracker->myPacketsUdp; + bytesReceivedUdp += tracker->myBytesUdp; + + std::map::iterator nameIt; + if ((nameIt = myDataMap->find(command)) != myDataMap->end()) + snprintf(name, sizeof(name), "%s", (*nameIt).second->getName()); + // if we're command 255 or less and there's no name its probably + // one of the server commands we don't really need to track + else if (command <= 255) + continue; + // we should know what the name of everything other then the + // server command is, but print if we don't, just in case + else + snprintf(name, sizeof(name), "#%d", command); + if (terse) + { + ArLog::log(ArLog::Terse, + "%35s %7ld pkts %10ld B %7ld B/sec", + name, tracker->myPacketsTcp + tracker->myPacketsUdp, + tracker->myBytesTcp + tracker->myBytesUdp, + ((tracker->myBytesTcp + tracker->myBytesUdp)/ + seconds)); + } + else + { + ArLog::log(ArLog::Terse, + "%35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/s ", + name, tracker->myPacketsTcp, tracker->myBytesTcp, + tracker->myBytesTcp/seconds, + tracker->myPacketsUdp, tracker->myBytesUdp, + tracker->myBytesUdp/seconds); + } + } + + ArLog::log(ArLog::Terse, ""); + if (terse) + { + ArLog::log(ArLog::Terse, "%-35s %7ld pkts %10ld B %7ld B/sec", + "Total Received", packetsReceivedTcp + packetsReceivedUdp, + bytesReceivedTcp + bytesReceivedUdp, + (bytesReceivedTcp + bytesReceivedUdp) / seconds); + } + else + { + ArLog::log(ArLog::Terse, "%-35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Total Received", packetsReceivedTcp, bytesReceivedTcp, + bytesReceivedTcp/seconds, packetsReceivedUdp, bytesReceivedUdp, + bytesReceivedUdp/seconds); + ArLog::log(ArLog::Terse, "%-35s %7ld tcp rcvs %10ld tcp B %7ld tcp B/S", + "Low level TCP Received", myTcpSocket.getRecvs(), + myTcpSocket.getBytesRecvd(), + myTcpSocket.getBytesRecvd()/seconds); + } + + long packetsSentTcp = 0; + long bytesSentTcp = 0; + long packetsSentUdp = 0; + long bytesSentUdp = 0; + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "Sent tracking for %s (active %d seconds):", + getIPString(), seconds); + for (it = myTrackingSentMap.begin(); it != myTrackingSentMap.end(); it++) + { + command = (*it).first; + tracker = (*it).second; + + packetsSentTcp += tracker->myPacketsTcp; + bytesSentTcp += tracker->myBytesTcp; + packetsSentUdp += tracker->myPacketsUdp; + bytesSentUdp += tracker->myBytesUdp; + + std::map::iterator nameIt; + if ((nameIt = myDataMap->find(command)) != myDataMap->end()) + snprintf(name, sizeof(name), "%s", (*nameIt).second->getName()); + // if we're command 255 or less and there's no name its probably + // one of the server commands we don't really need to track + else if (command <= 255) + continue; + // we should know what the name of everything other then the + // server command is, but print if we don't, just in case + else + snprintf(name, sizeof(name), "#%d", command); + if (terse) + { + ArLog::log(ArLog::Terse, + "%35s %7ld pkts %10ld B %7ld B/sec", + name, tracker->myPacketsTcp + tracker->myPacketsUdp, + tracker->myBytesTcp + tracker->myBytesUdp, + ((tracker->myBytesTcp + tracker->myBytesUdp)/ + seconds)); + } + else + { + ArLog::log(ArLog::Terse, + "%35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/s ", + name, tracker->myPacketsTcp, tracker->myBytesTcp, + tracker->myBytesTcp/seconds, + tracker->myPacketsUdp, tracker->myBytesUdp, + tracker->myBytesUdp/seconds); + } + } + + ArLog::log(ArLog::Terse, ""); + if (terse) + { + ArLog::log(ArLog::Terse, "%-35s %7ld pkts %10ld B %7ld B/sec", + "Total Sent", packetsSentTcp + packetsSentUdp, + bytesSentTcp + bytesSentUdp, + (bytesSentTcp + bytesSentUdp) / seconds); + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%-35s %7ld pkts %10ld B %7ld B/sec", + "Total Sent and Received", + (packetsSentTcp + packetsSentUdp + + packetsReceivedTcp + packetsReceivedUdp), + (bytesSentTcp + bytesSentUdp + + bytesReceivedTcp + bytesReceivedUdp), + (bytesSentTcp + bytesSentUdp + + bytesReceivedTcp + bytesReceivedUdp) / seconds); + } + else + { + ArLog::log(ArLog::Terse, "%-35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Total Sent", packetsSentTcp, bytesSentTcp, + bytesSentTcp / seconds, + packetsSentUdp, bytesSentUdp, bytesSentUdp / seconds); + ArLog::log(ArLog::Terse, "%-35s %7ld tcp snds %10ld tcp B %7ld tcp B/S", + "Low level TCP Sent", myTcpSocket.getSends(), + myTcpSocket.getBytesSent(), + myTcpSocket.getBytesSent() / seconds); + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%-35s %7ld tcp pkts %10ld tcp B %7ld tcp B/S %7ld udp pkts %10ld udp B %7ld udp B/sec", + "Total Sent and Received", packetsSentTcp = packetsReceivedTcp, + bytesSentTcp + bytesReceivedTcp, + (bytesSentTcp + bytesReceivedTcp) / seconds, + packetsSentUdp + packetsReceivedUdp, + bytesSentUdp + bytesReceivedUdp, + (bytesSentUdp + bytesReceivedUdp) / seconds); + } + + ArLog::log(ArLog::Terse, ""); +} + + +AREXPORT void ArServerClient::resetTracking(void) +{ + std::map::iterator it; + + myTrackingStarted.setToNow(); + + for (it = myTrackingSentMap.begin(); it != myTrackingSentMap.end(); it++) + (*it).second->reset(); + + for (it = myTrackingReceivedMap.begin(); + it != myTrackingReceivedMap.end(); + it++) + (*it).second->reset(); + + myTcpSocket.resetTracking(); +} + +AREXPORT bool ArServerClient::hasGroupAccess(const char *group) +{ + if (myUserInfo == NULL || group == NULL || group[0] == '\0' || + myGroups.count(group) > 0 || myGroups.count("all") > 0) + return true; + else + return false; +} + +/** + @param command the command number, you can use findCommandFromName + + @return returns lowest amount of time requested for this packet, + note that 0 and higher means thats how often it was asked for, -1 + means nothing requested the data at an interval but wants it when + its been pushed, and -2 means that nothing wants the data +**/ + +AREXPORT long ArServerClient::getFrequency(ArTypes::UByte2 command) +{ + std::list::iterator it; + ArServerClientData *data; + ArServerData *serverData; + + // walk through our list + for (it = myRequested.begin(); it != myRequested.end(); ++it) + { + data = (*it); + serverData = data->getServerData(); + // see if this is our data, if it is send the packet + if (serverData->getCommand() == command) + { + if (data->getMSec() >= 0) + return data->getMSec(); + else + return -1; + } + } + return -2; +} + + +AREXPORT void ArServerClient::startRequestTransaction() +{ + myRequestTransactionMutex.lock(); + myRequestTransactionCount++; + myRequestTransactionMutex.unlock(); + +} // end method startRequestTransaction + + +AREXPORT bool ArServerClient::endRequestTransaction() +{ + bool isSuccess = false; + myRequestTransactionMutex.lock(); + if (myRequestTransactionCount > 0) { + myRequestTransactionCount--; + isSuccess = true; + } + else { + ArLog::log(ArLog::Normal, + "ArServerClient::endRequestTransaction() transaction not in progress"); + } + myRequestTransactionMutex.unlock(); + + return isSuccess; + +} // end method endRequestTransaction + + +AREXPORT int ArServerClient::getRequestTransactionCount() +{ + myRequestTransactionMutex.lock(); + int c = myRequestTransactionCount; + myRequestTransactionMutex.unlock(); + + return c; + +} // end method getRequestTransactionCount + +/** + * Note that this method is not very efficient; it performs a linear search + * of all commands. +**/ +AREXPORT unsigned int ArServerClient::findCommandFromName(const char *commandName) const +{ + if (ArUtil::isStrEmpty(commandName)) { + return 0; + } + + for (std::map::const_iterator iter = + myDataMap->begin(); + iter != myDataMap->end(); + iter++) { + if (strcmp(commandName, (*iter).second->getName()) == 0) { + return iter->first; + } + } + return 0; + +} // end method findCommandFromName + + +const char *ArServerClient::findCommandName(unsigned int command) const +{ + std::map::const_iterator nameIt; + if ((nameIt = myDataMap->find(command)) != myDataMap->end()) + return (*nameIt).second->getName(); + else + return NULL; +} + + +AREXPORT bool ArServerClient::slowPacketCallback(void) +{ + ArNetPacket *slowPacket; + unsigned int command; + std::map::iterator it; + ArServerData *serverData; + + if (mySlowIdleThread == NULL) + mySlowIdleThread = ArThread::self(); + + mySlowPacketsMutex.lock(); + while (!mySlowPackets.empty()) + { + slowPacket = mySlowPackets.front(); + mySlowPackets.pop_front(); + mySlowPacketsMutex.unlock(); + + command = slowPacket->getCommand(); + if ((it = myDataMap->find(command)) == myDataMap->end()) + { + ArLog::log(ArLog::Terse, + "%sArServerClient got request for command %d which doesn't exist during slow... very odd", + myLogPrefix.c_str(), command); + delete slowPacket; + return false; + } + serverData = (*it).second; + + ArLog::log(myVerboseLogLevel, "Processing slow command %s", + serverData->getName()); + + pushSlowIdleCommand(command); + pushSlowIdleForceTcpFlag(true); + + if (serverData->getFunctor() != NULL) + serverData->getFunctor()->invoke(this, slowPacket); + if (serverData->getRequestOnceFunctor() != NULL) + serverData->getRequestOnceFunctor()->invokeR(this, slowPacket); + + popSlowIdleCommand(); + popSlowIdleForceTcpFlag(); + + delete slowPacket; + mySlowPacketsMutex.lock(); + } + mySlowPacketsMutex.unlock(); + myHaveSlowPackets = false; + return true; +} + +AREXPORT bool ArServerClient::idlePacketCallback(void) +{ + ArNetPacket *idlePacket; + unsigned int command; + std::map::iterator it; + ArServerData *serverData; + + if (mySlowIdleThread == NULL) + mySlowIdleThread = ArThread::self(); + + myIdlePacketsMutex.lock(); + while (!myIdlePackets.empty()) + { + idlePacket = myIdlePackets.front(); + myIdlePackets.pop_front(); + myIdlePacketsMutex.unlock(); + + command = idlePacket->getCommand(); + if ((it = myDataMap->find(command)) == myDataMap->end()) + { + ArLog::log(ArLog::Terse, + "%sArServerClient got request for command %d which doesn't exist during idle... very odd", + myLogPrefix.c_str(), command); + delete idlePacket; + return false; + } + serverData = (*it).second; + + ArLog::log(myVerboseLogLevel, "Processing idle command %s", + serverData->getName()); + + pushSlowIdleCommand(command); + pushSlowIdleForceTcpFlag(true); + + if (serverData->getFunctor() != NULL) + serverData->getFunctor()->invoke(this, idlePacket); + if (serverData->getRequestOnceFunctor() != NULL) + serverData->getRequestOnceFunctor()->invokeR(this, idlePacket); + + popSlowIdleCommand(); + popSlowIdleForceTcpFlag(); + + delete idlePacket; + myIdlePacketsMutex.lock(); + } + myIdlePacketsMutex.unlock(); + + myHaveIdlePackets = false; + return true; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerData.cpp b/Legacy/Aria/ArNetworking/src/ArServerData.cpp new file mode 100644 index 0000000..2fa89dc --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerData.cpp @@ -0,0 +1,95 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerData.h" +#include "ArServerClient.h" +#include "ArNetPacket.h" + +AREXPORT ArServerData::ArServerData( + const char *name, const char *description, unsigned int command, + ArFunctor2 *functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup, const char *dataFlags, + ArRetFunctor1 *getFrequencyFunctor, + ArFunctor2 *requestChangedFunctor, + ArRetFunctor2 + *requestOnceFunctor) : + myDataFlagsBuilder(512, '|') +{ + myDataMutex.setLogName("ArServerData::myDataMutex"); + myName = name; + myDescription = description; + myReturnDescription = returnDescription; + myArgumentDescription = argumentDescription; + myCommand = command; + myFunctor = functor; + if (commandGroup != NULL) + myCommandGroup = commandGroup; + else + myCommandGroup = ""; + myGetFrequencyFunctor = getFrequencyFunctor; + myRequestChangedFunctor = requestChangedFunctor; + myRequestOnceFunctor = requestOnceFunctor; + if (dataFlags != NULL) + { + myDataFlagsBuilder.add(dataFlags); + } + + mySlowPacket = hasDataFlag("SLOW_PACKET"); + myIdlePacket = hasDataFlag("IDLE_PACKET"); +} + +AREXPORT ArServerData::~ArServerData() +{ + +} + +AREXPORT bool ArServerData::hasDataFlag(const char *dataFlag) +{ + myDataMutex.lock(); + size_t i; + for (i = 0; i < myDataFlagsBuilder.getArgc(); i++) + { + if (strcmp(myDataFlagsBuilder.getArg(i), dataFlag) == 0) + { + myDataMutex.unlock(); + return true; + } + } + + myDataMutex.unlock(); + return false; +} + +AREXPORT bool ArServerData::addDataFlags(const char *dataFlags) +{ + myDataMutex.lock(); + myDataFlagsBuilder.add(dataFlags); + myDataMutex.unlock(); + return true; +} + +AREXPORT bool ArServerData::remDataFlag(const char *dataFlag) +{ + myDataMutex.lock(); + size_t i; + for (i = myDataFlagsBuilder.getArgc(); i < myDataFlagsBuilder.getArgc(); i++) + { + if (strcmp(myDataFlagsBuilder.getArg(i), dataFlag) == 0) + { + myDataFlagsBuilder.removeArg(i); + myDataMutex.unlock(); + return true; + } + } + + myDataMutex.unlock(); + return false; +} + +AREXPORT void ArServerData::callRequestChangedFunctor(void) +{ + if (myGetFrequencyFunctor == NULL || myRequestChangedFunctor == NULL) + return; + myRequestChangedFunctor->invoke( + myGetFrequencyFunctor->invokeR(myCommand), myCommand); +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerFileUtils.cpp b/Legacy/Aria/ArNetworking/src/ArServerFileUtils.cpp new file mode 100644 index 0000000..ee5767c --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerFileUtils.cpp @@ -0,0 +1,1352 @@ +#ifndef WIN32 +#include "Aria.h" +#include "ArExport.h" +#include "ArServerFileUtils.h" + +#include +#include +#include + + +AREXPORT ArServerFileLister::ArServerFileLister( + ArServerBase *server, const char *topDir, + const char *defaultUploadDownloadDir) : + myGetDirListingCB(this, &ArServerFileLister::getDirListing), + myGetDirListingMultiplePacketsCB(this, &ArServerFileLister::getDirListingMultiplePackets), + myGetDefaultUploadDownloadDirCB( + this, + &ArServerFileLister::getDefaultUploadDownloadDir) +{ + myServer = server; + myServer->addData("getDirListing", + "Gets the directory listing of a given directory (from the current working directory), you should probably use a class from ArClientFileUtils instead of calling this directly", + &myGetDirListingCB, "string: directory to get listing of", + "ubyte2: return code, 0 = good, 1 = tried to go outside allowed area, 2 = no such directory (or can't read); string: directoryListed; IF return was 0 then ubyte2: numDirectories; repeating numDirectories (string: name; ubyte4: access_time; ubyte4: modified_time); ubyte2: numFiles; repeating numFiles (string: name; ubyte4: access_time; ubyte4: modified_time);", + "FileAccess", "RETURN_SINGLE|SLOW_PACKET"); + + myServer->addData("getDirListingMultiplePackets", + "Gets the directory listing of a given directory possibly broken up into multiple packets (from the current working directory), you should probably use a class from ArClientFileUtils instead of calling this directly", + &myGetDirListingMultiplePacketsCB, + "string: directory to get listing of", + "ubyte2: return code, 0 = good, 1 = tried to go outside allowed area, 2 = no such directory (or can't read); string: directoryListed; IF return was 0 then ubyte2: numEntries; repeating numEntries (byte: type (1 for dir or 2 for file) string: name; ubyte4: access_time; ubyte4: modified_time)", + "FileAccess", "RETURN_UNTIL_EMPTY|SLOW_PACKET"); + + if (defaultUploadDownloadDir == NULL) + myDefaultUploadDownloadDir = ""; + else + myDefaultUploadDownloadDir = defaultUploadDownloadDir; + + if (!myDefaultUploadDownloadDir.empty()) + myServer->addData("getDefaultUploadDownloadDir", + "Gets the default directory that should be used for upload/download", + &myGetDefaultUploadDownloadDirCB, "none", + "string: defaultUploadDownloadDir", + "FileAccess", "RETURN_SINGLE|SLOW_PACKET"); + + + // snag our base dir and make sure we have enough room for a / + strncpy(myBaseDir, topDir, sizeof(myBaseDir) - 2); + myBaseDir[sizeof(myBaseDir) - 2] = '\0'; + // make sure it has a slash + ArUtil::appendSlash(myBaseDir, sizeof(myBaseDir)); + // make sure the slashes go the right direction + ArUtil::fixSlashes(myBaseDir, sizeof(myBaseDir)); +} + +AREXPORT ArServerFileLister::~ArServerFileLister() +{ + +} + +AREXPORT void ArServerFileLister::getDirListing(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendPacket; + size_t ui; + size_t len; + + bool printing = false; + + char directory[2048]; + packet->bufToStr(directory, sizeof(directory)); + + if (printing) + printf("'%s' requested\n", directory); + len = strlen(directory); + // first advance to the first non space + for (ui = 0; + ui < len && directory[ui] != '\0' && isspace(directory[ui]); + ui++); + + char *dirStr = new char[len + 3]; + + // now copy in the rest + strncpy(dirStr, directory, len - ui); + // make sure its null terminated + dirStr[len - ui] = '\0'; + + if (dirStr[0] == '/' || dirStr[0] == '~' || + dirStr[0] == '\\' || strstr(dirStr, "..") != NULL) + { + ArLog::log(ArLog::Normal, "ArServerFileLister: '%s' tried to access outside allowed area", dirStr); + delete[] dirStr; + sendPacket.uByte2ToBuf(1); + // put in the directory name + sendPacket.strToBuf(directory); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + return; + } + + // if its not empty make sure its set up right + if (strlen(dirStr) > 0) + { + // make sure it has a slash + ArUtil::appendSlash(dirStr, len + 2); + // make sure the slashes go the right direction + ArUtil::fixSlashes(dirStr, len + 2); + } + + // put our base and where we want to go together + std::string wholeDir; + wholeDir = myBaseDir; + wholeDir += dirStr; + + DIR *dir; + struct dirent *ent; + struct stat statBuf; + std::set dirs; + std::map dirToATime; + std::map dirToMTime; + std::map dirToSize; + std::set files; + std::map fileToATime; + std::map fileToMTime; + std::map fileToSize; + std::set::iterator it; + std::string str; + + if ((dir = opendir(wholeDir.c_str())) == NULL) + { + ArLog::log(ArLog::Normal, "ArServerFileLister: No such directory '%s' from base '%s' plus directory '%s'", + directory, myBaseDir, dirStr); + delete[] dirStr; + sendPacket.uByte2ToBuf(2); + // put in the directory name + sendPacket.strToBuf(directory); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + return; + } + while ((ent = readdir(dir)) != NULL) + { + // this works because if the first one goes it short circuits the second + if ((it = dirs.find(ent->d_name)) != dirs.end() || + (it = files.find(ent->d_name)) != files.end()) + { + ArLog::log(ArLog::Normal, + "ArServerFileLister: %s duplicates '%s'", + ent->d_name, (*it).c_str()); + continue; + } + if (ent->d_name[0] == '.') + continue; + str = wholeDir.c_str(); + str += ent->d_name; + if (printing) + printf("name %s\n", str.c_str()); + if (stat(str.c_str(), &statBuf) == 0) + { + if (S_ISREG(statBuf.st_mode)) + { + files.insert(ent->d_name); + fileToATime[ent->d_name] = statBuf.st_atime; + fileToMTime[ent->d_name] = statBuf.st_mtime; + fileToSize[ent->d_name] = statBuf.st_size; + //printf("File %s\n", ent.d_name); + } + if (S_ISDIR(statBuf.st_mode)) + { + dirs.insert(ent->d_name); + dirToATime[ent->d_name] = statBuf.st_atime; + dirToMTime[ent->d_name] = statBuf.st_mtime; + dirToSize[ent->d_name] = statBuf.st_size; + //printf("Dir %s\n", ent.d_name); + } + } + else + { + ArLog::log(ArLog::Normal, "Cannot stat %s in %s", ent->d_name, wholeDir.c_str()); + } + } + // we got here so the return is 0 (good) + sendPacket.uByte2ToBuf(0); + // put in the directory name + sendPacket.strToBuf(directory); + if (printing) + printf("Sending %s\n", directory); + if (printing) + printf("Dirs:\n"); + // put in how many directories we have + sendPacket.uByte2ToBuf(dirs.size()); + for (it = dirs.begin(); it != dirs.end(); it++) + { + sendPacket.strToBuf((*it).c_str()); + sendPacket.uByte4ToBuf(dirToATime[(*it)]); + sendPacket.uByte4ToBuf(dirToMTime[(*it)]); + sendPacket.uByte4ToBuf(dirToSize[(*it)]); + } + + if (printing) + { + printf("\n"); + printf("Files:\n"); + } + sendPacket.uByte2ToBuf(files.size()); + for (it = files.begin(); it != files.end(); it++) + { + sendPacket.strToBuf((*it).c_str()); + sendPacket.uByte4ToBuf(fileToATime[(*it)]); + sendPacket.uByte4ToBuf(fileToMTime[(*it)]); + sendPacket.uByte4ToBuf(fileToSize[(*it)]); + if (printing) + { + time_t atime = fileToATime[(*it)]; + time_t mtime = fileToMTime[(*it)]; + printf("\tname: %s\n", (*it).c_str()); + printf("\t\tlastAccessed: %s", ctime(&atime)); + printf("\t\tlastModified: %s", ctime(&mtime)); + printf("\t\tsize: %d", fileToSize[(*it)]); + } + } + delete[] dirStr; + if (client != NULL) + client->sendPacketTcp(&sendPacket); + closedir(dir); +} + +AREXPORT void ArServerFileLister::getDirListingMultiplePackets( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + size_t ui; + size_t len; + + bool printing = false; + + char directory[2048]; + packet->bufToStr(directory, sizeof(directory)); + + if (printing) + printf("'%s' requested\n", directory); + len = strlen(directory); + // first advance to the first non space + for (ui = 0; + ui < len && directory[ui] != '\0' && isspace(directory[ui]); + ui++); + + char *dirStr = new char[len + 3]; + + // now copy in the rest + strncpy(dirStr, directory, len - ui); + // make sure its null terminated + dirStr[len - ui] = '\0'; + + if (dirStr[0] == '/' || dirStr[0] == '~' || + dirStr[0] == '\\' || strstr(dirStr, "..") != NULL) + { + ArLog::log(ArLog::Normal, "ArServerFileLister: '%s' tried to access outside allowed area", dirStr); + delete[] dirStr; + sendPacket.uByte2ToBuf(1); + // put in the directory name + sendPacket.strToBuf(directory); + if (client != NULL) + { + client->sendPacketTcp(&sendPacket); + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + } + return; + } + + // if its not empty make sure its set up right + if (strlen(dirStr) > 0) + { + // make sure it has a slash + ArUtil::appendSlash(dirStr, len + 2); + // make sure the slashes go the right direction + ArUtil::fixSlashes(dirStr, len + 2); + } + + // put our base and where we want to go together + std::string wholeDir; + wholeDir = myBaseDir; + wholeDir += dirStr; + + DIR *dir; + struct dirent *ent; + struct stat statBuf; + std::set dirs; + std::map dirToATime; + std::map dirToMTime; + std::map dirToSize; + std::set files; + std::map fileToATime; + std::map fileToMTime; + std::map fileToSize; + std::set::iterator it; + std::string str; + ArTypes::UByte2 numEntries = 0; + int type; + + if ((dir = opendir(wholeDir.c_str())) == NULL) + { + ArLog::log(ArLog::Normal, "ArServerFileLister: No such directory '%s' from base '%s' plus directory '%s'", + directory, myBaseDir, dirStr); + delete[] dirStr; + sendPacket.uByte2ToBuf(2); + // put in the directory name + sendPacket.strToBuf(directory); + if (client != NULL) + { + client->sendPacketTcp(&sendPacket); + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + } + return; + } + + // we got here so the return is 0 (good) + sendPacket.uByte2ToBuf(0); + // put in the directory name + sendPacket.strToBuf(directory); + + ArTypes::UByte2 numEntriesLen = sendPacket.getLength(); + ArTypes::UByte2 realLen; + // put in a placeholder for how many directories we have + sendPacket.uByte2ToBuf(0); + + while ((ent = readdir(dir)) != NULL) + { + // this works because if the first one goes it short circuits the second + if ((it = dirs.find(ent->d_name)) != dirs.end() || + (it = files.find(ent->d_name)) != files.end()) + { + ArLog::log(ArLog::Normal, + "ArServerFileLister: %s duplicates '%s'", + ent->d_name, (*it).c_str()); + continue; + } + if (ent->d_name[0] == '.') + continue; + str = wholeDir.c_str(); + str += ent->d_name; + if (printing) + printf("name %s\n", str.c_str()); + if (stat(str.c_str(), &statBuf) == 0) + { + if (S_ISREG(statBuf.st_mode)) + type = 2; + else if (S_ISDIR(statBuf.st_mode)) + type = 1; + else + type = 0; + + if (type == 0) + continue; + + if (sendPacket.getDataLength() + strlen(ent->d_name) + 12 >= + ArNetPacket::MAX_DATA_LENGTH) + { + // put in the number of entries in that packet + realLen = sendPacket.getLength(); + sendPacket.setLength(numEntriesLen); + sendPacket.uByte2ToBuf(numEntries); + sendPacket.setLength(realLen); + + // and send it + if (client != NULL) + client->sendPacketTcp(&sendPacket); + + sendPacket.empty(); + // then rebuild the start of it + sendPacket.uByte2ToBuf(0); + // put in the directory name + sendPacket.strToBuf(directory); + + numEntriesLen = sendPacket.getLength(); + // put in a placeholder for how many directories we have + sendPacket.uByte2ToBuf(0); + + // and reset our counter + numEntries = 0; + } + numEntries++; + sendPacket.byteToBuf(type); + sendPacket.strToBuf(ent->d_name); + sendPacket.uByte4ToBuf(statBuf.st_atime); + sendPacket.uByte4ToBuf(statBuf.st_mtime); + sendPacket.uByte4ToBuf(statBuf.st_size); + } + else + { + ArLog::log(ArLog::Normal, "Cannot stat %s in %s", ent->d_name, wholeDir.c_str()); + } + } + + + // put in the number of entries in that packet + realLen = sendPacket.getLength(); + sendPacket.setLength(numEntriesLen); + sendPacket.uByte2ToBuf(numEntries); + sendPacket.setLength(realLen); + + // and send it + if (client != NULL) + client->sendPacketTcp(&sendPacket); + + delete[] dirStr; + + // then send our empty packet to say we're done + sendPacket.empty(); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + + closedir(dir); +} + +AREXPORT void ArServerFileLister::getDefaultUploadDownloadDir( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + sendPacket.strToBuf(myDefaultUploadDownloadDir.c_str()); + client->sendPacketTcp(&sendPacket); +} + + + +// ----------------------------------------------------------------------------- +// ArServerFileToClient +// ----------------------------------------------------------------------------- + + +AREXPORT ArServerFileToClient::ArServerFileToClient(ArServerBase *server, + const char *topDir) : + myGetFileCB(this, &ArServerFileToClient::getFile), + myGetFileWithTimestampCB(this, &ArServerFileToClient::getFileWithTimestamp) +{ + myServer = server; + myServer->addData("getFile", + "Gets a file (use ArClientFileToClient instead of calling this directly since this interface may change)", + &myGetFileCB, "string: file to get; byte2: operation, 0 == get, 1 == cancel (these aren't implemented yet but will be)", + "ubyte2: return code, 0 = good (sending file), 1 = tried to go outside allowed area, 2 = no such file (or can't read), 3 = empty file name, 4 = error reading file (can happen after some good values) ; string: fileGotten;IF return was 0 then ubyte4: numBytes (number of bytes in this packet, 0 means end of file; numBytes of data", + "FileAccess", "RETURN_UNTIL_EMPTY|SLOW_PACKET"); + + myServer->addData("getFileWithTimestamp", + "Gets a file (use ArClientFileToClient instead of calling this directly since this interface may change)", + &myGetFileWithTimestampCB, + "string: file to get; byte2: operation, 0 == get, 1 == cancel (these aren't implemented yet but will be)", + "ubyte2: return code, 0 = good (sending file), 1 = tried to go outside allowed area, 2 = no such file (or can't read), 3 = empty file name, 4 = error reading file (can happen after some good values) ; string: fileGotten; IF return was 0 then byte4: time_t that file was last modified; ubyte4: numBytes (number of bytes in the file buffer in this packet, 0 means end of file); data buffer that is numBytes in length", + "FileAccess", "RETURN_UNTIL_EMPTY|SLOW_PACKET"); + + // snag our base dir and make sure we have enough room for a / + strncpy(myBaseDir, topDir, sizeof(myBaseDir) - 2); + myBaseDir[sizeof(myBaseDir) - 2] = '\0'; + // make sure it has a slash + ArUtil::appendSlash(myBaseDir, sizeof(myBaseDir)); + // make sure the slashes go the right direction + ArUtil::fixSlashes(myBaseDir, sizeof(myBaseDir)); +} + +AREXPORT ArServerFileToClient::~ArServerFileToClient() +{ + +} + + + +AREXPORT void ArServerFileToClient::getFile(ArServerClient *client, + ArNetPacket *packet) +{ + doGetFile(client, packet, false); +} + +AREXPORT void ArServerFileToClient::getFileWithTimestamp + (ArServerClient *client, + ArNetPacket *packet) +{ + doGetFile(client, packet, true); +} + + + +AREXPORT void ArServerFileToClient::doGetFile(ArServerClient *client, + ArNetPacket *packet, + bool isSetTimestamp) +{ + ArNetPacket sendPacket; + + char fileNameRaw[2048]; + packet->bufToStr(fileNameRaw, sizeof(fileNameRaw)); + + // should check for operation here, but thats not implemented yet + + char fileNameCooked[2048]; + strcpy(fileNameCooked, fileNameRaw); + ArUtil::fixSlashes(fileNameCooked, sizeof(fileNameCooked)); + + + char fileName[2048]; + if (!ArUtil::matchCase(myBaseDir, fileNameCooked, + fileName, sizeof(fileName))) + { + ArLog::log(ArLog::Normal, + "ArServerFileToClient: can't open file '%s'", fileNameRaw); + sendPacket.uByte2ToBuf(2); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + // send an empty packet so that forwarding knows we're done + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + return; + } + + size_t len = strlen(fileName); + size_t ui = 0; + + // first advance to the first non space + for (ui = 0; + ui < len && fileName[ui] != '\0' && isspace(fileName[ui]); + ui++); + + char *fileStr = new char[len + 3]; + + // now copy in the rest + strncpy(fileStr, fileName, len - ui); + // make sure its null terminated + fileStr[len - ui] = '\0'; + + if (fileStr[0] == '/' || fileStr[0] == '~' || + fileStr[0] == '\\' || strstr(fileStr, "..") != NULL) + { + ArLog::log(ArLog::Normal, + "ArServerFileToClient: '%s' tried to access outside allowed area", + fileStr); + delete[] fileStr; + sendPacket.uByte2ToBuf(1); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + // send an empty packet so that forwarding knows we're done + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + return; + } + + if (strlen(fileStr) > 0) + { + ArUtil::fixSlashes(fileStr, len + 2); + } + else + { + ArLog::log(ArLog::Normal, + "ArServerFileToClient: can't get file, empty filename"); + delete[] fileStr; + sendPacket.uByte2ToBuf(3); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + // send an empty packet so that forwarding knows we're done + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + return; + } + + // walk from our base down and try to find the first by name + // ignoring case + + // put our base and where we want to go together + std::string wholeName; + wholeName = myBaseDir; + wholeName += fileStr; + + delete[] fileStr; + + ArLog::log(ArLog::Verbose, + "ArServerFileToClient: Trying to open %s from base %s", + wholeName.c_str(), myBaseDir); + + struct stat fileStat; + stat(wholeName.c_str(), &fileStat); + + FILE *file = NULL; + if ((file = ArUtil::fopen(wholeName.c_str(), "rb")) == NULL) + { + ArLog::log(ArLog::Normal, + "ArServerFileToClient: can't open file '%s'", fileName); + sendPacket.uByte2ToBuf(2); + sendPacket.strToBuf(fileNameRaw); + + + client->sendPacketTcp(&sendPacket); + // send an empty packet so that forwarding knows we're done + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + return; + } + + + + char buf[30000]; + size_t ret = 0; + // now send the file + while ((ret = fread(buf, 1, sizeof(buf), file)) == sizeof(buf)) + { + sendPacket.empty(); + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(fileNameRaw); + sendPacket.uByte4ToBuf(ret); + if (isSetTimestamp) { + sendPacket.byte4ToBuf(fileStat.st_mtime); + } + sendPacket.dataToBuf(buf, ret); + client->sendPacketTcp(&sendPacket); + //printf("Sent packet with %d\n", ret); + } // end while more to read + + + if (ferror(file)) + { + ArLog::log(ArLog::Normal, "ArServerFileToClient: Error sending file %s", + fileName); + sendPacket.empty(); + sendPacket.uByte2ToBuf(4); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + // send an empty packet so that forwarding knows we're done + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + return; + } + + // Send the remnants from the last iteration of the while loop above + if (ret != 0) { + + sendPacket.empty(); + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(fileNameRaw); + sendPacket.uByte4ToBuf(ret); + if (isSetTimestamp) { + sendPacket.byte4ToBuf(fileStat.st_mtime); + } + sendPacket.dataToBuf(buf, ret); + //printf("Sent packet with %d\n", ret); + client->sendPacketTcp(&sendPacket); + } + + // Send a zero size to indicate that the file is ndone + sendPacket.empty(); + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(fileNameRaw); + sendPacket.uByte4ToBuf(0); + if (isSetTimestamp) { + sendPacket.byte4ToBuf(fileStat.st_mtime); + } + + + //printf("Sent packet end\n"); + client->sendPacketTcp(&sendPacket); + + + // send an empty packet so that forwarding knows we're done + sendPacket.empty(); + client->sendPacketTcp(&sendPacket); + + if (feof(file)) + { + ArLog::log(ArLog::Normal, "ArServerFileToClient: Sent file %s to %s", + fileName, client->getIPString()); + } + fclose(file); + +} + +// ----------------------------------------------------------------------------- +// ArServerFileFromClient +// ----------------------------------------------------------------------------- + +AREXPORT ArServerFileFromClient::ArServerFileFromClient(ArServerBase *server, + const char *topDir, + const char *tempDir) : + myPutFileCB(this, &ArServerFileFromClient::putFile), + myPutFileInterleavedCB(this, &ArServerFileFromClient::putFileInterleaved), + myPutFileWithTimestampCB(this, &ArServerFileFromClient::putFileWithTimestamp), + myPutFileWithTimestampInterleavedCB(this, &ArServerFileFromClient::putFileWithTimestampInterleaved) +{ + + myServer = server; + + myServer->addData("putFile", + "Puts a file (use ArClientFileFromClient instead of calling this directly since this interface may change)", + &myPutFileCB, "uByte2: command, 0 = start file, 1 = continue file, 2 done with file, 3 = cancel put; string: file being sent; IF command == 1 then uByte4: numBytes; numBytes of data", + "uByte2: return code, 0 = good (got file), 1 = getting file, 2 = tried to go outside allowed area, 3 = bad directory, 4 = empty file name (or other problem with fileName), 5 = can't write temp file, 6 = error moving file from temp to perm, 7 = another client putting file, 8 = timeout (no activity for 15 seconds) and another client wanted to put the file, 9 = client adding to, finishing, or canceling a file the server doesn't have; string: fileName", + "FileAccess", "RETURN_COMPLEX|SLOW_PACKET|DO_NOT_FORWARD"); + + myServer->addData("putFileInterleaved", + "Puts a file (use ArClientFileFromClient instead of calling this directly since this interface may change)", + &myPutFileInterleavedCB, "uByte2: command, 0 = start file, 1 = continue file, 2 done with file, 3 = cancel put; string: file being sent; IF command == 1 then uByte4: numBytes; numBytes of data", + "uByte2: return code, 0 = good (got file), 1 = getting file, 2 = tried to go outside allowed area, 3 = bad directory, 4 = empty file name (or other problem with fileName), 5 = can't write temp file, 6 = error moving file from temp to perm, 7 = another client putting file, 8 = timeout (no activity for 15 seconds) and another client wanted to put the file, 9 = client adding to, finishing, or canceling a file the server doesn't have, 10 = gotPacket, awaiting next packet, 11 = cancelled put; string: fileName", + "FileAccess", "RETURN_SINGLE|SLOW_PACKET|DO_NOT_FORWARD"); + + myServer->addData("putFileWithTimestamp", + "Puts a file and sets its modified time (use ArClientFileFromClient instead of calling this directly since this interface may change)", + &myPutFileWithTimestampCB, + "uByte2: command, 0 = start file, 1 = continue file, 2 done with file, 3 = cancel put; string: file being sent; IF command == 0 then byte4: time_t last modified; IF command == 1 then uByte4: numBytes; numBytes of data", + "uByte2: return code, 0 = good (got file), 1 = getting file, 2 = tried to go outside allowed area, 3 = bad directory, 4 = empty file name (or other problem with fileName), 5 = can't write temp file, 6 = error moving file from temp to perm, 7 = another client putting file, 8 = timeout (no activity for 15 seconds) and another client wanted to put the file, 9 = client adding to, finishing, or canceling a file the server doesn't have; string: fileName", + "FileAccess", "RETURN_COMPLEX|SLOW_PACKET|DO_NOT_FORWARD"); + + myServer->addData("putFileWithTimestampInterleaved", + "Puts a file and sets its modified time (use ArClientFileFromClient instead of calling this directly since this interface may change)", + &myPutFileInterleavedCB, + "uByte2: command, 0 = start file, 1 = continue file, 2 done with file, 3 = cancel put; string: file being sent; IF command == 0 then byte4: time_t last modified; IF command == 1 then uByte4: numBytes; numBytes of data", + "uByte2: return code, 0 = good (got file), 1 = getting file, 2 = tried to go outside allowed area, 3 = bad directory, 4 = empty file name (or other problem with fileName), 5 = can't write temp file, 6 = error moving file from temp to perm, 7 = another client putting file, 8 = timeout (no activity for 15 seconds) and another client wanted to put the file, 9 = client adding to, finishing, or canceling a file the server doesn't have, 10 = gotPacket, awaiting next packet, 11 = cancelled put; string: fileName", + "FileAccess", "RETURN_SINGLE|SLOW_PACKET|DO_NOT_FORWARD"); + + myFileNumber = 0; + // snag our base dir and make sure we have enough room for a / + strncpy(myBaseDir, topDir, sizeof(myBaseDir) - 2); + myBaseDir[sizeof(myBaseDir) - 2] = '\0'; + // make sure it has a slash + ArUtil::appendSlash(myBaseDir, sizeof(myBaseDir)); + // make sure the slashes go the right direction + ArUtil::fixSlashes(myBaseDir, sizeof(myBaseDir)); + // snag our base dir and make sure we have enough room for a / + strncpy(myTempDir, tempDir, sizeof(myTempDir) - 2); + myTempDir[sizeof(myTempDir) - 2] = '\0'; + // make sure it has a slash + ArUtil::appendSlash(myTempDir, sizeof(myTempDir)); + // make sure the slashes go the right direction + ArUtil::fixSlashes(myTempDir, sizeof(myTempDir)); +} + +AREXPORT ArServerFileFromClient::~ArServerFileFromClient() +{ + +} + + +AREXPORT void ArServerFileFromClient::putFile(ArServerClient *client, + ArNetPacket *packet) +{ + internalPutFile(client, packet, false, false); +} + +AREXPORT void ArServerFileFromClient::putFileInterleaved + (ArServerClient *client, + ArNetPacket *packet) +{ + internalPutFile(client, packet, true, false); +} + +AREXPORT void ArServerFileFromClient::putFileWithTimestamp + (ArServerClient *client, + ArNetPacket *packet) +{ + internalPutFile(client, packet, false, true); +} + +AREXPORT void ArServerFileFromClient::putFileWithTimestampInterleaved + (ArServerClient *client, + ArNetPacket *packet) +{ + internalPutFile(client, packet, true, true); +} + +AREXPORT void ArServerFileFromClient::internalPutFile(ArServerClient *client, + ArNetPacket *packet, + bool interleaved, + bool isSetTimestamp) +{ + ArNetPacket sendPacket; + std::list::iterator fit; + std::map::iterator it; + + FileInfo *info = NULL; + + std::string fileName; + char fileNameRaw[2048]; + fileNameRaw[0] = '\0'; + + ArTypes::UByte2 doing = packet->bufToUByte2(); + + packet->bufToStr(fileNameRaw, sizeof(fileNameRaw)); + if (doing == 0) + { + char directoryRaw[2048]; + directoryRaw[0] = '\0'; + char fileNamePart[2048]; + fileNamePart[0] = '\0'; + if (!ArUtil::getDirectory(fileNameRaw, + directoryRaw, + sizeof(directoryRaw)) || + !ArUtil::getFileName(fileNameRaw, + fileNamePart, + sizeof(fileNamePart))) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Problem with filename '%s'", + fileNameRaw); + sendPacket.uByte2ToBuf(4); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + // just added this 4/5/06 + return; + } + +// ArUtil::appendSlash(directoryRaw, sizeof(directoryRaw)); + + char directory[2048]; + printf("DirectoryRaw %s\n", directoryRaw); + if (strlen(directoryRaw) == 0) + { + //strcpy(directory, "."); + strcpy(directory, myBaseDir); + } + else if (!ArUtil::matchCase(myBaseDir, + directoryRaw, + directory, + sizeof(directory))) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Bad directory for '%s'", + fileNameRaw); + sendPacket.uByte2ToBuf(3); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + + char tmpDir[2048]; + tmpDir[0] = '\0'; + //sprintf(tmpDir, "%s", tmpDir, directory); + strcpy(tmpDir, directory); + ArUtil::appendSlash(tmpDir, sizeof(tmpDir)); + char matchedFileName[2048]; + + if (ArUtil::matchCase(tmpDir, fileNamePart, + matchedFileName, + sizeof(matchedFileName))) + { + fileName = tmpDir; + fileName += matchedFileName; + //printf("matched from %s %s\n", tmpDir, matchedFileName); + } + else + { + fileName = tmpDir; + fileName += fileNamePart; + //printf("unmatched from %s %s\n", tmpDir, fileNamePart); + } + + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Checking file %s (as %s)", + fileNameRaw, fileName.c_str()); + + for (it = myMap.begin(); it != myMap.end(); it++) + { + info = (*it).second; + // see if a client is messing with this file + if (ArUtil::strcasecmp(info->myRealFileName, fileName) == 0) + { + // see if the other one messing with this timed out, if so let 'em know + if (info->myLastActivity.secSince() > 15) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Another client wants to start putting file '%s' and old client was inactive", + (*it).first.c_str()); + if (!interleaved) + { + sendPacket.uByte2ToBuf(8); + sendPacket.strToBuf((*it).first.c_str()); + // NOT_EXCLUDING this isn't excluding anymore because it + // used to cause problems... this may cause some + // problems, but hopefully the event doesn't happen much, + // and at least this way things'll be able to retry easier + myServer->broadcastPacketTcp(&sendPacket, "putFile");//, client); + } + myMap.erase((*it).first); + delete info; + break; + } + // otherwise let this guy know its busy + else + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Another client putting file '%s'", + fileNameRaw); + sendPacket.uByte2ToBuf(7); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + } + } + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Receiving file %s (as %s)", + fileNameRaw, fileName.c_str()); + + char tempFileName[3200]; + tempFileName[0] = '\0'; + sprintf(tempFileName, "%sArServerFileFromClient.%d.%d", myTempDir, getpid(), myFileNumber); + myFileNumber++; + + ArLog::log(ArLog::Normal, + "Using temp file name %s\n", tempFileName); + // see if we can open the temp file + FILE *file; + if ((file = ArUtil::fopen(tempFileName, "wb")) != NULL) + { + info = new FileInfo; + info->myRealFileName = fileName; + info->myTempFileName = tempFileName; + info->myFile = file; + info->myStartedTransfer.setToNow(); + info->myLastActivity.setToNow(); + // We can compare against this client pointer but we cannot + // access anything on it since it could have disconnected and be + // an invalid pointer now + info->myClient = client; + info->myClientCreationTime = client->getCreationTime(); + if (isSetTimestamp) { + info->myFileTimestamp = packet->bufToByte4(); + + char timeBuf[500]; + strftime(timeBuf, sizeof(timeBuf), "%c", localtime(&info->myFileTimestamp)); + + ArLog::log(ArLog::Normal, + "ArServerFileFromClient will set timestamp to %s", + timeBuf); + } + else { + info->myFileTimestamp = -1; + } + + myMap[fileNameRaw] = info; + if (interleaved) + { + //printf("Sending continue\n"); + sendPacket.uByte2ToBuf(10); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + } + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, + "ArServerFileFromClient: Can't open tmp file for '%s' (tried '%s')", + fileNameRaw, tempFileName); + sendPacket.uByte2ToBuf(5); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + } + else if (doing == 1) + { + // see if we can find this file + if ((it = myMap.find(fileNameRaw)) == myMap.end()) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Couldn't find entry for '%s'", + fileNameRaw); + sendPacket.uByte2ToBuf(9); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + info = (*it).second; + + // make sure this client is the one sending the file, otherwise + // just ignore it + if (info->myClient != client || + !info->myClientCreationTime.isAt(client->getCreationTime())) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Got contents packet for file '%s' from the wrong client, ignoring it", + fileNameRaw); + // we don't send back a packet here, because we already did in + // the 0 command (starting send), but the client ignored it + // (probably cause it was doing a fast/stacked file transfer) + return; + } + + // write the data to the file and increment last activity + ArTypes::UByte4 numBytes; + char buf[32000]; + numBytes = packet->bufToUByte4(); + packet->bufToData(buf, numBytes); + fwrite(buf, 1, numBytes, info->myFile); + info->myLastActivity.setToNow(); + + if (interleaved) + { + sendPacket.uByte2ToBuf(10); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + } + ArLog::log(ArLog::Verbose, "Continuing put file %s (%d bytes)", + fileNameRaw, numBytes); + + } + else if (doing == 2) + { + // see if we can find this file + if ((it = myMap.find(fileNameRaw)) == myMap.end()) + { + ArLog::log(ArLog::Normal, "ArUtil: Couldn't find entry for '%s'", fileNameRaw); + sendPacket.uByte2ToBuf(9); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + info = (*it).second; + + // make sure this client is the one sending the file, otherwise + // just ignore it + if (info->myClient != client || + !info->myClientCreationTime.isAt(client->getCreationTime())) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Got end packet for file '%s' from the wrong client, ignoring it", + fileNameRaw); + // we don't send back a packet here, because we already did in + // the 0 command (starting send), but the client ignored it + // (probably cause it was doing a fast/stacked file transfer) + return; + } + + fclose(info->myFile); + info->myFile = NULL; + + char systemBuf[6400]; +#ifndef WIN32 + char *mvName = "mv -f"; +#else + char *mvName = "move"; +#endif + sprintf(systemBuf, "%s \"%s\" \"%s\"", mvName, info->myTempFileName.c_str(), + info->myRealFileName.c_str()); + + + myMovingFileName = info->myRealFileName; + + // call our pre move callbacks + for (fit = myPreMoveCallbacks.begin(); + fit != myPreMoveCallbacks.end(); + fit++) + (*fit)->invoke(); + + // move file + int ret; + if ((ret = system(systemBuf)) == 0) + { + if (isSetTimestamp) { + ArUtil::changeFileTimestamp(info->myRealFileName.c_str(), + info->myFileTimestamp); + } + + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + ArLog::log(ArLog::Normal, "Done with file %s from %s", fileNameRaw, + client->getIPString()); + myMap.erase((*it).first); + delete info; + } + else + { + sendPacket.uByte2ToBuf(6); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + unlink(info->myTempFileName.c_str()); + myMap.erase((*it).first); + delete info; + ArLog::log(ArLog::Normal, "Couldn't move temp file for %s (ret of '%s' is %d)", fileNameRaw, systemBuf, ret); + } + + // call our post move callbacks + for (fit = myPostMoveCallbacks.begin(); + fit != myPostMoveCallbacks.end(); + fit++) { + (*fit)->invoke(); + } + + myMovingFileName = ""; + } + else if (doing == 3) + { + if ((it = myMap.find(fileNameRaw)) == myMap.end()) + { + ArLog::log(ArLog::Normal, "ArUtil: Couldn't find entry to cancel for '%s'", fileNameRaw); + sendPacket.uByte2ToBuf(9); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + info = (*it).second; + + // make sure this client is the one sending the file, otherwise + // just ignore it + if (info->myClient != client || + !info->myClientCreationTime.isAt(client->getCreationTime())) + { + ArLog::log(ArLog::Normal, + "ArServerFileFromClient: Got cancel packet for file '%s' from the wrong client, ignoring it", + fileNameRaw); + // we don't send back a packet here, because we already did in + // the 0 command (starting send), but the client ignored it + // (probably cause it was doing a fast/stacked file transfer) + return; + } + + fclose(info->myFile); + info->myFile = NULL; + + unlink(info->myTempFileName.c_str()); + myMap.erase((*it).first); + delete info; + + ArLog::log(ArLog::Normal, "Cancelling file %s", fileNameRaw); + if (interleaved) + { + sendPacket.uByte2ToBuf(11); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + } + } + else + { + ArLog::log(ArLog::Normal, "Unknown command %d for file %s", doing, + fileNameRaw); + } +} + +AREXPORT void ArServerFileFromClient::addPreMoveCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPreMoveCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPreMoveCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerFileFromClient::addPreMoveCallback: Invalid position."); +} + +AREXPORT void ArServerFileFromClient::remPreMoveCallback( + ArFunctor *functor) +{ + myPreMoveCallbacks.remove(functor); +} + +AREXPORT void ArServerFileFromClient::addPostMoveCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPostMoveCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPostMoveCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerFileFromClient::addPostMoveCallback: Invalid position."); +} + +AREXPORT void ArServerFileFromClient::remPostMoveCallback( + ArFunctor *functor) +{ + myPostMoveCallbacks.remove(functor); +} + + +AREXPORT ArServerDeleteFileOnServer::ArServerDeleteFileOnServer( + ArServerBase *server, const char *topDir) : + myDeleteFileCB(this, &ArServerDeleteFileOnServer::deleteFile) +{ + myServer = server; + myServer->addData("deleteFile", + "Deletes a file (use ArClientDeleteFileOnServer instead of calling this directly since this interface may change)", + &myDeleteFileCB, "string: file to delete", + "ubyte2: return code, 0 = good (deleted file file), 1 = tried to go outside allowed area, 2 = no such file (or can't read it), 3 = empty file name, string: fileDeleted", + "FileAccess", "RETURN_SINGLE|SLOW_PACKET"); + + // snag our base dir and make sure we have enough room for a / + strncpy(myBaseDir, topDir, sizeof(myBaseDir) - 2); + myBaseDir[sizeof(myBaseDir) - 2] = '\0'; + // make sure it has a slash + ArUtil::appendSlash(myBaseDir, sizeof(myBaseDir)); + // make sure the slashes go the right direction + ArUtil::fixSlashes(myBaseDir, sizeof(myBaseDir)); +} + +AREXPORT ArServerDeleteFileOnServer::~ArServerDeleteFileOnServer() +{ + +} + + + +AREXPORT void ArServerDeleteFileOnServer::deleteFile(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendPacket; + size_t ui; + size_t len; + std::list::iterator fit; + char fileNameRaw[2048]; + packet->bufToStr(fileNameRaw, sizeof(fileNameRaw)); + + // should check for operation here, but thats not implemented yet + + char fileNameCooked[2048]; + strcpy(fileNameCooked, fileNameRaw); + ArUtil::fixSlashes(fileNameCooked, sizeof(fileNameCooked)); + + + char fileName[2048]; + if (!ArUtil::matchCase(myBaseDir, fileNameCooked, + fileName, sizeof(fileName))) + { + ArLog::log(ArLog::Normal, + "ArServerDeleteFileOnServer: can't read file '%s'", + fileNameRaw); + sendPacket.uByte2ToBuf(2); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + + len = strlen(fileName); + // first advance to the first non space + for (ui = 0; + ui < len && fileName[ui] != '\0' && isspace(fileName[ui]); + ui++); + + char *fileStr = new char[len + 3]; + + // now copy in the rest + strncpy(fileStr, fileName, len - ui); + // make sure its null terminated + fileStr[len - ui] = '\0'; + + if (fileStr[0] == '/' || fileStr[0] == '~' || + fileStr[0] == '\\' || strstr(fileStr, "..") != NULL) + { + ArLog::log(ArLog::Normal, + "ArServerDeleteFileOnServer: '%s' tried to access outside allowed area", + fileStr); + delete[] fileStr; + sendPacket.uByte2ToBuf(1); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + + if (strlen(fileStr) > 0) + { + ArUtil::fixSlashes(fileStr, len + 2); + } + else + { + ArLog::log(ArLog::Normal, + "ArServerDeleteFileOnServer: can't delete file, empty filename"); + delete[] fileStr; + sendPacket.uByte2ToBuf(3); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + return; + } + + // walk from our base down and try to find the first by name + // ignoring case + + // put our base and where we want to go together + std::string wholeName; + wholeName = myBaseDir; + wholeName += fileStr; + + delete[] fileStr; + + ArLog::log(ArLog::Verbose, + "ArServerDeleteFileOnServer: Trying to delete %s from base %s", + wholeName.c_str(), myBaseDir); + + myDeletingFileName = fileNameRaw; + + // call our pre delete callbacks + for (fit = myPreDeleteCallbacks.begin(); + fit != myPreDeleteCallbacks.end(); + fit++) + (*fit)->invoke(); + + if (unlink(wholeName.c_str()) == 0) + { + ArLog::log(ArLog::Normal, + "ArServerDeleteFileOnServer: Deleted file %s for %s", + fileName, client->getIPString()); + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + } + else + { + ArLog::log(ArLog::Normal, + "ArServerDeleteFileOnServer: can't unlink file '%s'", fileName); + sendPacket.uByte2ToBuf(2); + sendPacket.strToBuf(fileNameRaw); + client->sendPacketTcp(&sendPacket); + } + + // call our post delete callbacks + for (fit = myPostDeleteCallbacks.begin(); + fit != myPostDeleteCallbacks.end(); + fit++) + (*fit)->invoke(); + + myDeletingFileName = ""; +} + +AREXPORT void ArServerDeleteFileOnServer::addPreDeleteCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPreDeleteCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPreDeleteCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerDeleteFileOnServer::addPreDeleteCallback: Invalid position."); +} + +AREXPORT void ArServerDeleteFileOnServer::remPreDeleteCallback( + ArFunctor *functor) +{ + myPreDeleteCallbacks.remove(functor); +} + +AREXPORT void ArServerDeleteFileOnServer::addPostDeleteCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPostDeleteCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPostDeleteCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerDeleteFileOnServer::addPostDeleteCallback: Invalid position."); +} + +AREXPORT void ArServerDeleteFileOnServer::remPostDeleteCallback( + ArFunctor *functor) +{ + myPostDeleteCallbacks.remove(functor); +} + +#endif // WIN32 diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerCamera.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerCamera.cpp new file mode 100644 index 0000000..6a2b996 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerCamera.cpp @@ -0,0 +1,1306 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerCamera.h" + +const char *ArServerHandlerCamera::CONTROL_COMMAND_GROUP = "CameraControl"; +const char *ArServerHandlerCamera::INFO_COMMAND_GROUP = "CameraInfo"; +const char *ArServerHandlerCamera::NO_ARGS = "None"; + +//#define DEBUG_ARSERVERHANDLERCAMERA + +#if (defined(_DEBUG) && defined(DEBUG_ARSERVERHANDLERCAMERA)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +/** + @param robot The robot we're attached to (mostly used for locking the camera before sending commands) + @param server The server we're putting commands into + @param camera The camera we're going to command and give information from... it can be NULL in which case no commands are added + **/ +AREXPORT ArServerHandlerCamera::ArServerHandlerCamera(ArServerBase *server, + ArRobot *robot, + ArPTZ *camera) : + ArCameraCollectionItem(), + myRobot(robot), + myServer(server), + myCamera(camera), + myCameraName(), + myCameraCollection(NULL), + myCommandToPacketNameMap(), + myCommandToIntervalMap(), + myCommandToCBMap(), + + myUserTaskCB(this, &ArServerHandlerCamera::userTask), + myCameraCB(this, &ArServerHandlerCamera::camera), + myCameraAbsCB(this, &ArServerHandlerCamera::cameraAbs), + myCameraUpdateCB(this, &ArServerHandlerCamera::cameraUpdate), + myCameraInfoCB(this, &ArServerHandlerCamera::cameraInfo) +{ + init(); +} + +AREXPORT ArServerHandlerCamera::ArServerHandlerCamera + (const char *cameraName, + ArServerBase *server, + ArRobot *robot, + ArPTZ *camera, + ArCameraCollection *collection) : + ArCameraCollectionItem(), + myRobot(robot), + myServer(server), + myCamera(camera), + myCameraName(cameraName), + myCameraCollection(collection), + myCommandToPacketNameMap(), + myCommandToIntervalMap(), + myCommandToCBMap(), + + myModeMutex(), + myCameraMode(CAMERA_MODE_POSITION), + myCameraModeNameMap(), + myCameraModePacket(), + myLookAtPoint(), + myPointResetZoom(false), + myGoal(), + myGoalAchieved(true), + myGoalAchievedLast(false), + myGoalResetZoom(false), + + myUserTaskCB(this, &ArServerHandlerCamera::userTask), + myCameraCB(this, &ArServerHandlerCamera::camera), + myCameraAbsCB(this, &ArServerHandlerCamera::cameraAbs), + myCameraUpdateCB(this, &ArServerHandlerCamera::cameraUpdate), + myCameraInfoCB(this, &ArServerHandlerCamera::cameraInfo) +{ + init(); + + if (myCameraCollection != NULL) { + doAddToCameraCollection(*myCameraCollection); + } +} // end ctor + +AREXPORT ArServerHandlerCamera::~ArServerHandlerCamera() +{ + for (std::map *>::iterator iter = + myCommandToCBMap.begin(); + iter != myCommandToCBMap.end(); + iter++) { + + // TODO: REALLY should remove the callback from myServer (but there's currently + // no way to do so... + + delete iter->second; + iter->second = NULL; + + } // end for each callback + + myCommandToCBMap.clear(); + +} // end dtor + + +void ArServerHandlerCamera::init() +{ + myModeMutex.setLogName("ArServerHandlerCamera::myModeMutex"); + + createCommandNames(); + + createCommandCBs(); + + addAllCommandsToServer(); + + myCameraMode = CAMERA_MODE_POSITION; + myGoalAchieved = true; + myUserTaskCB.setName("ArServerHandlerCamera"); + if (myRobot != NULL) + myRobot->addUserTask("ArServerHandlerCamera", 50, &myUserTaskCB); + + myCameraModeNameMap[CAMERA_MODE_POSITION] = "Position"; + myCameraModeNameMap[CAMERA_MODE_LOOK_AT_GOAL] = "LookAtGoal"; + myCameraModeNameMap[CAMERA_MODE_LOOK_AT_POINT] = "LookAtPoint"; + +} // end method init + + +AREXPORT const char *ArServerHandlerCamera::getCameraName() +{ + return myCameraName.c_str(); +} + +void ArServerHandlerCamera::createCommandNames() +{ + myCommandToPacketNameMap[ArCameraCommands::GET_CAMERA_DATA] = "getCameraData"; + myCommandToPacketNameMap[ArCameraCommands::GET_CAMERA_INFO] = "getCameraInfo"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_ABS] = "setCameraAbs"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_PCT] = "setCameraPct"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_REL] = "setCameraRel"; + + myCommandToPacketNameMap[ArCameraCommands::GET_CAMERA_MODE_LIST] = "getCameraModeList"; + myCommandToPacketNameMap[ArCameraCommands::CAMERA_MODE_UPDATED] = "cameraModeUpdated"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_MODE] = "setCameraMode"; + myCommandToPacketNameMap[ArCameraCommands::RESET_CAMERA] = "resetCamera"; + + if (!myCameraName.empty()) { + + for (std::map::iterator iter = myCommandToPacketNameMap.begin(); + iter != myCommandToPacketNameMap.end(); + iter++) { + + std::string baseCommandName = iter->second; + iter->second = baseCommandName + myCameraName; + + } // end for each command + } // end if camera name specified + + + // Do these afterwards so that the name does NOT get mangled. (??) + // This preserves some aspect of backwards compatibility... + + myCommandToPacketNameMap[ArCameraCommands::GET_CAMERA_DATA_INT] = "cameraUpdate"; + myCommandToPacketNameMap[ArCameraCommands::GET_CAMERA_INFO_INT] = "cameraInfo"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_ABS_INT] = "cameraAbs"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_REL_INT] = "camera"; + myCommandToPacketNameMap[ArCameraCommands::SET_CAMERA_PCT_INT] = "cameraPct"; + +} // end method createCommandNames + + +void ArServerHandlerCamera::createCommandCBs() +{ + + myCommandToCBMap[ArCameraCommands::GET_CAMERA_DATA] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleGetCameraData); + // Default interval for requesting camera info + myCommandToIntervalMap[ArCameraCommands::GET_CAMERA_DATA] = 100; + + myCommandToCBMap[ArCameraCommands::GET_CAMERA_INFO] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleGetCameraInfo); + + myCommandToCBMap[ArCameraCommands::SET_CAMERA_ABS] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleSetCameraAbs); + + myCommandToCBMap[ArCameraCommands::SET_CAMERA_PCT] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleSetCameraPct); + + myCommandToCBMap[ArCameraCommands::SET_CAMERA_REL] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleSetCameraRel); + + myCommandToCBMap[ArCameraCommands::GET_CAMERA_DATA_INT] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::cameraUpdate); + + myCommandToCBMap[ArCameraCommands::GET_CAMERA_INFO_INT] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::cameraInfo); + + myCommandToCBMap[ArCameraCommands::SET_CAMERA_ABS_INT] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::cameraAbs); + + myCommandToCBMap[ArCameraCommands::SET_CAMERA_REL_INT] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::camera); + + myCommandToCBMap[ArCameraCommands::SET_CAMERA_PCT_INT] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::cameraPct); + + myCommandToCBMap[ArCameraCommands::GET_CAMERA_MODE_LIST] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleGetCameraModeList); + myCommandToCBMap[ArCameraCommands::CAMERA_MODE_UPDATED] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleCameraModeUpdated); + myCommandToCBMap[ArCameraCommands::SET_CAMERA_MODE] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleSetCameraMode); + myCommandToCBMap[ArCameraCommands::RESET_CAMERA] = + new ArFunctor2C + (this, + &ArServerHandlerCamera::handleResetCamera); + +} // end method createCommandCBs + + +void ArServerHandlerCamera::addAllCommandsToServer() +{ + if (myServer == NULL) { + ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::addAllCommandsToServer() cannot add to NULL server"); + return; + } + + // + addCommandToServer + (ArCameraCommands::GET_CAMERA_DATA, + "Get \"double\" information about camera position. (factor == 100)", + NO_ARGS, + "byte2: pan * factor, byte2: tilt * factor, byte2: zoomPercent * factor (optional)", + INFO_COMMAND_GROUP); + + addCommandToServer + (ArCameraCommands::GET_CAMERA_INFO, + "Get (\"double\") information about the camera's pan, tilt, and (optional) zoom ranges. (factor == 100)", + NO_ARGS, + "byte2: minPan * factor, byte2: maxPan * factor byte2: minTilt * factor, byte2: maxTilt * factor, byte2: minZoom * factor, byte2: maxZoom * factor, byte: isZoomAvailable", + INFO_COMMAND_GROUP); + + addCommandToServer + (ArCameraCommands::SET_CAMERA_ABS, + "Sends absolute (\"double\") pan, tilt, and zoom (optional) commands to the camera. (factor == 100)", + NO_ARGS, + "byte2: pan * factor, byte2: tilt * factor, byte2: zoom * factor (optional)", + CONTROL_COMMAND_GROUP); + + if ((myCamera != NULL) && (myCamera->canGetFOV())) { + addCommandToServer + (ArCameraCommands::SET_CAMERA_PCT, + "Sends (\"double\") pan, tilt, and zoom (optional) commands to point camera, as percent of visible frame. (factor == 100)", + NO_ARGS, + "byte2: panOffset * factor, byte2: tiltOffset * factor, byte2: zoom * factor (optional)", + CONTROL_COMMAND_GROUP); + } + else { + removeCommand(ArCameraCommands::SET_CAMERA_PCT); + } + + addCommandToServer + (ArCameraCommands::SET_CAMERA_REL, + "Sends (\"double\") pan, tilt, and zoom (optional) commands to the camera, relative to its current position. (factor == 100)", + NO_ARGS, + "byte2: relPan * factor, byte2: relTilt * factor, byte2: relZoom * factor (optional)", + CONTROL_COMMAND_GROUP); + + addCommandToServer(ArCameraCommands::GET_CAMERA_MODE_LIST, + "Gets the list of modes this camera supports", + NO_ARGS, + "ubyte2: numModes; string: modeName", + INFO_COMMAND_GROUP); + + + addCommandToServer(ArCameraCommands::CAMERA_MODE_UPDATED, + "Sent whenever the camera mode is updated", + NO_ARGS, + "string: modeName; ", + INFO_COMMAND_GROUP); + + addCommandToServer(ArCameraCommands::SET_CAMERA_MODE, + "Sets the mode of the camera", + "string: modeName; ", + NO_ARGS, + CONTROL_COMMAND_GROUP); + + addCommandToServer(ArCameraCommands::RESET_CAMERA, + "Resets the camera to 0 0 0 and may reinitialize it (depending on camera)", + NO_ARGS, + NO_ARGS, + CONTROL_COMMAND_GROUP); + + + // Continue to support old-style integer commands for backward compatibility.... + + addCommandToServer + (ArCameraCommands::GET_CAMERA_DATA_INT, + "Get (integer) information about camera position", + NO_ARGS, + "byte2: pan, byte2: tilt, byte2: zoom (optional)", + INFO_COMMAND_GROUP); + + addCommandToServer + (ArCameraCommands::GET_CAMERA_INFO_INT, + "Get (integer) information about the camera's pan, tilt, and (optional) zoom ranges", + NO_ARGS, + "byte2: minPan, byte2: maxPan byte2: minTilt, byte2: maxTilt, byte2: minZoom, byte2: maxZoom, byte: isZoomAvailable", + INFO_COMMAND_GROUP); + + addCommandToServer + (ArCameraCommands::SET_CAMERA_REL_INT, + "Sends (integer) pan, tilt, and zoom (optional) commands to the camera, relative to its current position", + NO_ARGS, + "byte: relPan, byte: relTilt, byte: relZoom (optional)", + CONTROL_COMMAND_GROUP); + + addCommandToServer + (ArCameraCommands::SET_CAMERA_ABS_INT, + "Sends absolute (integer) pan, tilt, and zoom (optional) commands to the camera", + NO_ARGS, + "byte: pan, byte: tilt, byte: zoom (optional)", + CONTROL_COMMAND_GROUP); + + addCommandToServer + (ArCameraCommands::SET_CAMERA_PCT_INT, + "Sends (integer) pan, tilt commands to the camera, as percent of visible frame", + NO_ARGS, + "byte: pan, byte: tilt, byte: zoom (optional)", + CONTROL_COMMAND_GROUP); + +} // end method addToServer + + +void ArServerHandlerCamera::addCommandToServer(const char *command, + const char *description, + const char *argumentDescription, + const char *returnDescription, + const char *commandGroup) +{ + if (command == NULL) { + ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::addCommandToServer() cannot add NULL command"); + return; + } + + std::map::iterator iter = + myCommandToPacketNameMap.find(command); + + if (iter == myCommandToPacketNameMap.end()) { + ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::addCommandToServer() cannot find packet name for command %s", + command); + return; + } + + const char *packetName = iter->second.c_str(); + ArFunctor2 *callback = NULL; + + std::map *>::iterator cbIter = + myCommandToCBMap.find(command); + if (cbIter != myCommandToCBMap.end()) { + callback = cbIter->second; + } + if (callback == NULL) { + ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::addCommandToServer() cannot find callback for command %s", + command); + } + + bool isSuccess = true; + + /** + * It'd be kind of nice if we could do something along the following lines + * so that the PTZ controls do not show up in ME. (Not entirely sure how + * though because - at least in the case of VCC4 - there's a four second + * timeout before the comm is deemed unidirectional.) + if ((myCamera != NULL) && + (!myCamera->isBidirectionalComm()) && + (strcmp(commandGroup, CONTROL_COMMAND_GROUP) == 0)) { + isSuccess = false; + } + **/ + + if (isSuccess) { + isSuccess = myServer->addData + (packetName, + description, + callback, + argumentDescription, + returnDescription, + commandGroup, "RETURN_SINGLE"); + } + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::addCommandToServer() error adding server handler for packet %s", + packetName); + removeCommand(command); + } + +} // end method addCommandToServer + + +void ArServerHandlerCamera::doAddToCameraCollection(ArCameraCollection &collection) +{ + if (myCameraName.empty()) { + + return; + } // end if no camera name + + const char *cameraName = myCameraName.c_str(); + if (!collection.exists(cameraName)) { + + return; + } // end if camera not yet created + + for (std::map::iterator iter = myCommandToPacketNameMap.begin(); + iter != myCommandToPacketNameMap.end(); + iter++) { + + const char *command = iter->first.c_str(); + const char *packetName = iter->second.c_str(); + + int requestInterval = -1; + std::map::iterator nIter = myCommandToIntervalMap.find(command); + if (nIter != myCommandToIntervalMap.end()) { + requestInterval = nIter->second; + } + + bool isSuccess = collection.addCameraCommand(cameraName, + command, + packetName, + requestInterval); + + if (!isSuccess) { + + } // end if error occurred + + } // end for each command +} // end method doAddToCameraCollection + + +void ArServerHandlerCamera::removeCommand(const char *command) +{ + std::map::iterator iter = myCommandToPacketNameMap.find(command); + if (iter != myCommandToPacketNameMap.end()) { + myCommandToPacketNameMap.erase(iter); + } + + std::map *>::iterator cbIter = + myCommandToCBMap.find(command); + if (cbIter != myCommandToCBMap.end()) { + delete cbIter->second; + cbIter->second = NULL; + myCommandToCBMap.erase(cbIter); + } + +} // end method removeCommand + + +AREXPORT void ArServerHandlerCamera::addToCameraCollection(ArCameraCollection &collection) +{ + doAddToCameraCollection(collection); +} + +// ----------------------------------------------------------------------------- +// Packet Handlers: +// ----------------------------------------------------------------------------- + +AREXPORT void ArServerHandlerCamera::handleGetCameraData(ArServerClient *client, + ArNetPacket *packet) +{ + if ((client == NULL) || (myRobot == NULL) || (myCamera == NULL)) { + return; + } + + ArNetPacket sendPacket; + + myRobot->lock(); + double pan = myCamera->getPan(); + double tilt = myCamera->getTilt(); + double zoom = (getCurrentZoomRatio() * 100.0); + + myRobot->unlock(); + + addDoubleToPacket(pan, sendPacket); + addDoubleToPacket(tilt, sendPacket); + addDoubleToPacket(zoom, sendPacket); + + client->sendPacketUdp(&sendPacket); + +} // end method handleGetCameraData + + +AREXPORT void ArServerHandlerCamera::handleGetCameraInfo(ArServerClient *client, + ArNetPacket *packet) +{ + if ((client == NULL) || (myRobot == NULL) || (myCamera == NULL)) { + return; + } + + ArNetPacket sendPacket; + + myRobot->lock(); + + double minPan = myCamera->getMaxNegPan(); + double maxPan = myCamera->getMaxPosPan(); + double minTilt = myCamera->getMaxNegTilt(); + double maxTilt = myCamera->getMaxPosTilt(); + double minZoom = 0; + double maxZoom = 100; + bool isZoomAvailable = myCamera->canZoom(); + + ArLog::log(ArLog::Verbose, + "ArServerHandlerCamera: client requested camera info (my camera name is %s), returning: minPan %f maxPan %f minTilt %f maxTilt %f minZoom %f maxZoom %f isZoomAvailable %d", + myCameraName.c_str(), minPan, maxPan, minTilt, maxTilt, minZoom, maxZoom, isZoomAvailable); + + myRobot->unlock(); + + addDoubleToPacket(minPan, sendPacket); + addDoubleToPacket(maxPan, sendPacket); + addDoubleToPacket(minTilt, sendPacket); + addDoubleToPacket(maxTilt, sendPacket); + addDoubleToPacket(minZoom, sendPacket); + addDoubleToPacket(maxZoom, sendPacket); + + sendPacket.byteToBuf(isZoomAvailable); + + client->sendPacketUdp(&sendPacket); + +} // end method handleGetCameraInfo + + +AREXPORT void ArServerHandlerCamera::handleSetCameraAbs(ArServerClient *client, + ArNetPacket *packet) +{ + if ((packet == NULL) || (myRobot == NULL) || (myCamera == NULL)) { + return; + } + + double pan = getDoubleFromPacket(*packet); + double tilt = getDoubleFromPacket(*packet); + double zoom = getDoubleFromPacket(*packet); + + setCameraAbs(pan, tilt, zoom); + +} // end method handleSetCameraAbs + + +AREXPORT void ArServerHandlerCamera::handleSetCameraRel(ArServerClient *client, + ArNetPacket *packet) +{ + if (packet == NULL) { + return; + } + + //double invAtZoom = 1; + + double pan = getDoubleFromPacket(*packet); + double tilt = getDoubleFromPacket(*packet); + double zoom = getDoubleFromPacket(*packet); + + setCameraRel(pan, tilt, zoom); + +} // end method handleSetCameraRel + + +AREXPORT void ArServerHandlerCamera::handleSetCameraPct(ArServerClient *client, + ArNetPacket *packet) +{ + + if (!myCamera->canGetFOV()) + { + ArLog::log(ArLog::Normal, "ArServerHandlerCamera::cameraPct called when camera can't get the FOV"); + return; + } + // Values range -100 to 100. 0 indicates no change. + //int panPct = packet->bufToByte(); + //int tiltPct = -packet->bufToByte(); + + double panPct = getDoubleFromPacket(*packet); + double tiltPct = -(getDoubleFromPacket(*packet)); + + setCameraPct(panPct, tiltPct); + +} // end method handleSetCameraPct + + +// ---------------------------------------------------------------------------- +// Old Packet Handlers (integers, for backwards compatibility) +// ---------------------------------------------------------------------------- + + +AREXPORT void ArServerHandlerCamera::camera(ArServerClient *client, + ArNetPacket *packet) +{ + + //double invAtZoom = 1; + + int pan = packet->bufToByte(); + int tilt = packet->bufToByte(); + int zoom = packet->bufToByte(); + + setCameraRel(pan, tilt, zoom); + +} // end method camera + + +AREXPORT void ArServerHandlerCamera::cameraAbs(ArServerClient *client, + ArNetPacket *packet) +{ + + int pan = packet->bufToByte(); + int tilt = packet->bufToByte(); + int zoom = packet->bufToByte(); + + setCameraAbs(pan, tilt, zoom); + +} // end method cameraAbs + + +AREXPORT void ArServerHandlerCamera::cameraPct(ArServerClient *client, + ArNetPacket *packet) +{ + + if (!myCamera->canGetFOV()) + { + ArLog::log(ArLog::Normal, "ArServerHandlerCamera::cameraPct called when camera can't get the FOV"); + return; + } + // Values range -100 to 100. 0 indicates no change. + int panPct = packet->bufToByte(); + int tiltPct = -packet->bufToByte(); + + setCameraPct(panPct, tiltPct); + +} // end method cameraPct + + +AREXPORT void ArServerHandlerCamera::cameraUpdate(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket send; + + myRobot->lock(); + int pan = ArMath::roundInt(myCamera->getPan()); + int tilt = ArMath::roundInt(myCamera->getTilt()); + int zoom = ArMath::roundInt(myCamera->getZoom()/((double)(myCamera->getMaxZoom() - myCamera->getMinZoom()) + myCamera->getMinZoom()) * 100.0); + + myRobot->unlock(); + + send.byte2ToBuf(pan); + send.byte2ToBuf(tilt); + send.byte2ToBuf(zoom); + client->sendPacketUdp(&send); + +} // end method cameraUpdate + + +AREXPORT void ArServerHandlerCamera::cameraInfo(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket send; + + myRobot->lock(); + + int minPan = ArMath::roundInt(myCamera->getMaxNegPan()); + int maxPan = ArMath::roundInt(myCamera->getMaxPosPan()); + int minTilt = ArMath::roundInt(myCamera->getMaxNegTilt()); + int maxTilt = ArMath::roundInt(myCamera->getMaxPosTilt()); + int minZoom = 0; + int maxZoom = 100; + bool isZoomAvailable = myCamera->canZoom(); + //ArLog::log(ArLog::Normal, "minPan %d maxPan %d minTilt %d maxTilt %d minZoom %d maxZoom %d isZoomAvailable %d", minPan, maxPan, minTilt, maxTilt, minZoom, maxZoom, isZoomAvailable); + + myRobot->unlock(); + + send.byte2ToBuf(minPan); + send.byte2ToBuf(maxPan); + send.byte2ToBuf(minTilt); + send.byte2ToBuf(maxTilt); + send.byte2ToBuf(minZoom); + send.byte2ToBuf(maxZoom); + send.byteToBuf(isZoomAvailable); + + client->sendPacketUdp(&send); + +} // end method cameraInfo + + +/** + @param pan the degrees to pan to (absolute) + @param tilt the degrees to tilt to (absolute) + @param zoom the percent (number between 0 and 100) to pan to (absolute) + @param lockRobot whether to lock the robot or not +**/ + +AREXPORT void ArServerHandlerCamera::setCameraAbs( + double pan, double tilt, double zoom, bool lockRobot) +{ + if (zoom > 100) + zoom = 100; + else if (zoom < 0) + zoom = 0; + + if (lockRobot) + myRobot->lock(); + + cameraModePosition(); + + myCamera->panTilt(pan, tilt); + + double absZoom = myCamera->getMinZoom() + ((zoom / 100.0) * getZoomRange()); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::handleSetCameraAbs() p = %f, t = %f, z = %f, calc absZoom = %f", + pan, tilt, zoom, absZoom)); + + myCamera->zoom(ArMath::roundInt(absZoom)); + + if (lockRobot) + myRobot->unlock(); + +} // end method doSetCameraAbs + + +/** + @param pan the degrees to pan to (relative) + @param tilt the degrees to tilt to (relative) + @param zoom the percent (number between 0 and 100) to change pan by (relative) + @param lockRobot whether to lock the robot or not +**/ + +AREXPORT void ArServerHandlerCamera::setCameraRel( + double pan, double tilt, double zoom, bool lockRobot) +{ + if ((myRobot == NULL) || (myCamera == NULL)) { + return; + } + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::doSetCameraRel() p = %f, t = %f, z = %f", + pan, tilt, zoom)); + + // The camera mode is set to position only if the pan or tilt changed. + + double invAtZoom = 1; + + if (myCamera->getMaxZoom() - myCamera->getMinZoom() != 0) + { + // see what zoom we're at so we can modify total pan and tilt amounts by it + invAtZoom = 1 - getCurrentZoomRatio(); + + //totalPanAmount /= atZoom / (100 / (double) totalPanAmount); + //totalTiltAmount /= atZoom / (100 / (double) totalTiltAmount); + if (invAtZoom < .01) + invAtZoom = .01; + if (invAtZoom > 1.01) + invAtZoom = 1; + } + else + { + invAtZoom = 1; + } + + if (pan > 0) + pan = ceil(pan * invAtZoom); + else + pan = floor(pan * invAtZoom); + + if (tilt > 0) + tilt = ceil(tilt * invAtZoom); + else + tilt = floor(tilt * invAtZoom); + + if (lockRobot) + myRobot->lock(); + + if (zoom != 0) + { + double newZoomPct = (getCurrentZoomRatio() * 100.0) + zoom; + + double newAbsZoom = myCamera->getMinZoom() + ((newZoomPct / 100.0) * getZoomRange()); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::handleSetCameraRel() newZoomPct = %f, newAbsZoom = %f", + newZoomPct, newAbsZoom)); + + myCamera->zoom(ArMath::roundInt(newAbsZoom)); + + } // end if zoom change + + // Only want to pan... + if ((pan == 0) && (tilt != 0)) + { + cameraModePosition(); + myCamera->tiltRel(tilt); + } + // Only want to tilt... + else if ((pan != 0) && (tilt == 0)) + { + cameraModePosition(); + myCamera->panRel(pan); + } + else if (pan != 0 && tilt != 0) + { // pan and tilt... + cameraModePosition(); + myCamera->panTiltRel(pan, tilt); + } + + if (lockRobot) + myRobot->unlock(); + +} // end method doSetCameraRel + + + +/** + @param panPct the double percent offset from the image frame center + by which to pan the camera; values range -100 to 100. 0 indicates + no change. + + @param tiltPct the double percent offset from the image + frame center by which to tilt the camera; values range -100 to 100. + 0 indicates no change. + + @param lockRobot whether to lock the robot or not +**/ + +AREXPORT void ArServerHandlerCamera::setCameraPct( + double panPct, double tiltPct, bool lockRobot) +{ + cameraModePosition(); + + double zoom = getCurrentZoomRatio(); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::handleSetCameraPct() panPct = %f, tiltPct = %f curZoomRatio = %f", + panPct, tiltPct, zoom)); + + /* + So first we find the field of view we're at, this is interpolated + from the max and min zooms... with an exponential factor (because + empircally it seemed to be needed + */ + + double exponent = M_PI/2; // found this to be 1.6 so this seems a + // likely guess + double fov = ((myCamera->getFOVAtMinZoom() - myCamera->getFOVAtMaxZoom()) * + pow((1 - zoom), exponent) + + myCamera->getFOVAtMaxZoom()); + + + double oldTilt = myCamera->getTilt(); + double oldPan = myCamera->getPan(); + + + /* + So this whole thing is done as a vector calculations... so first + we find where our old x, y, z value was to start with then we add + in the x, y, z change from the left/right component of the image + click and from the up/down component of the image click to find + our final x, y, z and then we figure out the pan/tilt that points + us there... this is basically all assuming a unit sphere (ie + length 1) + + One thing that could be done to make it more accurate is to remove + some of the error (ie right now from going straight right in the + image at 0 all we do is add x, if we removed a little y too to + normalize it on the unit sphere it'd be more accurate). + **/ + + /* + + Derivation of these equations (for finding the x, y, z from + current pan tilt) + + | , + | /|z + | / | + |/t |y + -)--|------- + / \)p| / + / h\ | / x + / \|/ + + + Where pan and tilt are the values we're panned and tilted at now + and x, y, and z are the coords in the unit sphere that we + have... h is the hypoenuse of the line projected down into the + x/y plane + + + sin tilt = z / 1 (because its the unit sphere) +! sin tilt = z -, + | + tan tilt = z / hyp | + tan tilt = sin tilt / hyp <-' + hyp = sin tilt / tan tilt -, -, + | | + sin pan = x / hyp | | + sin pan * hyp = x | | + x = hyp * sin pan | | +! x = (sin tilt/tan tilt) * sin pan <-' | + | + cos pan = y / hyp | + cos pan * hyp = y | + y = hyp * sin pan | +! y = (sin tilt/tan tilt) * cos pan <-' + + + The old X here should be sin(tilt) + --------- * sin(pan) + tan(tilt) + + The old Y here should be sin(tilt) + --------- * cos(pan) + tan(tilt) + + The old z here should be sin(tilt); + + The funkiness is because of divide by zeros and stuff, this is + supposed to be the hypot though and so it can't really ever be 0 or + infnity so just cap the thing + **/ + double sinTiltOverTanTilt; + if (fabs(oldTilt) < .01) + sinTiltOverTanTilt = 1; + else + sinTiltOverTanTilt = ArMath::sin(oldTilt) / ArMath::tan(oldTilt); + double oldX = sinTiltOverTanTilt * ArMath::sin(oldPan); + double oldY = sinTiltOverTanTilt * ArMath::cos(oldPan); + double oldZ = ArMath::sin(oldTilt); + + // figure out the angle of the left/right point in the image + double lr = panPct / 100.0 * fov/2.0; + + /** + Figure how much the x/y/z components of the left/right vector, + this part is pretty straightforward since its just multiplying + the left/right vector by the cos or sin to get the component in + that direction (which is based on the pan) + + @verbatim + ------------------ y + |\)lr | + | \ | sin lr + | \ | + | \ | + | \| + x + @endverbatim + + That derives the sin lr for the length of the vector... for how + much of that is in which direction + + @verbatim + dx = sin lr * sin pan + ------------------------- y + |\)pan | + | \ | + | \slr | dy = sin lr * cos pan + | \ | + | \ | + | \ | + | \| + x + @endverbatim + + Where slr is the sin lr derived above and pan is the pan angle + (since we're doing vectors the position we calculate these + components from doesn't matter so we just move it back to 0 to + make life easier)... + + The - on the sin is needed, I think its because the camera pans + positive to the right and negative to the left instead of + positive to the right. + + **/ + double lrDx = + ArMath::sin(lr) * ArMath::cos(oldPan); + double lrDy = - ArMath::sin(lr) * ArMath::sin(oldPan); + double lrDz = 0; + + // the angle of the up/down point in the image + double ud = tiltPct / 100.0 * fov/2.0 *.71; + + /** + Figure how much the x/y/z components of the up/down vector, + + So for x and y first we find how much is in the x/y plane + (sin(ud) * sin(oldTilt)) and then we multiply that by the same + sin or cos of the pan to see how much is in which coord... + + For z we just multiply the up/down vector by the cos to find what + the movement in z is. + **/ + double udDx = - (ArMath::sin(ud) * ArMath::sin(oldTilt) * + ArMath::sin(oldPan)); + double udDy = - (ArMath::sin(ud) * ArMath::sin(oldTilt) * + ArMath::cos(oldPan)); + double udDz = ArMath::sin(ud) * ArMath::cos(oldTilt); + + + /** + Now add the original vector, the vector from left/right and the + vector from up/down together. + **/ + double x = oldX + lrDx + udDx; + double y = oldY + lrDy + udDy; + double z = oldZ + lrDz + udDz; + + + /** + Now find where we have to pan and tilt to... + + | , + | /|z + | / | + |/t |y + -)--|------- + / \)p| / + / h\ | / x + / \|/ + + Where x, y, and z are the values we found above and tilt and pan + are the tilt (angle of the line off of the x/y plane) and pan + values (angle of the line within the x/y plain) we need to point + at that point, h is the hypotenuse of the line projected into the + x/y plane. + + + + tan pan = x / y +! pan = atan (x / y) + + cos pan = y / hyp + hyp = y / cos pan + + sin pan = x / hyp + hyp = x / sin pan + + tan tilt = z / hyp + +! tilt = atan (z / hyp) + (substitute in one of the hyps) + **/ + + /** + Pan is easy since its just the atan of x and y. + **/ + double newPan = ArMath::atan2(x, y); + double tiltDenom; + /** + This denom can be either y/cos(pan) or x / sin(pan) depending on + which solution you use and we use them in a way that won't get us + a divide by 0. + **/ + if (fabs(oldPan) < 1) + tiltDenom = y / ArMath::cos(newPan); + else if (fabs(oldPan - 90) < 1) + tiltDenom = x / ArMath::sin(newPan); + else + tiltDenom = (y / ArMath::cos(newPan) + x / ArMath::sin(newPan)) / 2; + double newTilt = ArMath::atan2(z, tiltDenom); + if (lockRobot) + myRobot->lock(); + myCamera->panTilt(newPan, newTilt); + if (lockRobot) + myRobot->unlock(); + /* + ArLog::log(ArLog::Normal, "w %f h %f zoom %f fov %g oldPan %g oldTilt %g oldx %g oldy %g oldz %g x %g y %g z %g newPan %g newTilt %g", + w, h, zoom, fov, oldPan, oldTilt, oldX, oldY, oldZ, x, y, z, newPan, newTilt); + */ + +} // end method doSetCameraPct + +// ---------------------------------------------------------------------------- +// Helper Methods +// ---------------------------------------------------------------------------- + +AREXPORT void ArServerHandlerCamera::handleGetCameraModeList( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sending; + + myModeMutex.lock(); + sending.uByte2ToBuf(myCameraModeNameMap.size()); + + std::map::iterator it; + for (it = myCameraModeNameMap.begin(); it != myCameraModeNameMap.end(); it++) + { + sending.strToBuf((*it).second.c_str()); + } + myModeMutex.unlock(); + client->sendPacketTcp(&sending); +} + +AREXPORT void ArServerHandlerCamera::handleCameraModeUpdated( + ArServerClient *client, ArNetPacket *packet) +{ + myModeMutex.lock(); + client->sendPacketTcp(&myCameraModePacket); + myModeMutex.unlock(); +} + +AREXPORT void ArServerHandlerCamera::handleSetCameraMode( + ArServerClient *client, ArNetPacket *packet) +{ + char modeName[512]; + packet->bufToStr(modeName, sizeof(modeName)); + + + CameraMode newMode; + std::map::iterator it; + ArPose lookPoint; + + for (it = myCameraModeNameMap.begin(); it != myCameraModeNameMap.end(); it++) + { + if (ArUtil::strcasecmp((*it).second, modeName) == 0) + { + newMode = (*it).first; + if (newMode == CAMERA_MODE_POSITION) + { + cameraModePosition(); + } + else if (newMode == CAMERA_MODE_LOOK_AT_GOAL) + { + cameraModeLookAtGoal(); + } + else if (newMode == CAMERA_MODE_LOOK_AT_POINT) + { + lookPoint.setX(packet->bufToByte4()); + lookPoint.setY(packet->bufToByte4()); + cameraModeLookAtPoint(lookPoint); + } + return; + } + } + + ArLog::log(ArLog::Normal, + "ArServerHandlerCamera::%s: Could not find mode %s to switch to", + myCameraName.c_str(), modeName); +} + +void ArServerHandlerCamera::userTask(void) +{ + myModeMutex.lock(); + if (myCameraMode == CAMERA_MODE_LOOK_AT_GOAL) + { + if (!myGoalResetZoom) + { + myCamera->zoom(0); + myGoalResetZoom = true; + } + if (!myGoalAchieved) + { + myCamera->panTilt(-myRobot->findDeltaHeadingTo(myGoal), 0); + } + else if (!myGoalAchievedLast) + { + myCamera->panTilt(0, 0); + myGoalAchievedLast = true; + } + } + if (myCameraMode == CAMERA_MODE_LOOK_AT_POINT) + { + if (!myPointResetZoom) + { + myCamera->zoom(0); + myPointResetZoom = true; + } + myCamera->panTilt(-myRobot->findDeltaHeadingTo(myLookAtPoint), 0); + } + myModeMutex.unlock(); +} + +void ArServerHandlerCamera::buildModePacket(void) +{ + myCameraModePacket.empty(); + + myCameraModePacket.strToBuf(myCameraModeNameMap[myCameraMode].c_str()); + if (myCameraMode == CAMERA_MODE_LOOK_AT_POINT) + { + myCameraModePacket.byte4ToBuf( + ArMath::roundInt(myLookAtPoint.getX())); + myCameraModePacket.byte4ToBuf( + ArMath::roundInt(myLookAtPoint.getY())); + } +} + +AREXPORT void ArServerHandlerCamera::cameraModePosition(void) +{ + myModeMutex.lock(); + if (myCameraMode != CAMERA_MODE_POSITION) + { + ArLog::log(ArLog::Normal, "Looking by position"); + myCameraMode = CAMERA_MODE_POSITION; + buildModePacket(); + myServer->broadcastPacketTcp( + &myCameraModePacket, + myCommandToPacketNameMap[ + ArCameraCommands::CAMERA_MODE_UPDATED].c_str()); + + } + myModeMutex.unlock(); +} + +AREXPORT void ArServerHandlerCamera::cameraModeLookAtGoal(void) +{ + myModeMutex.lock(); + if (myCameraMode != CAMERA_MODE_LOOK_AT_GOAL) + { + ArLog::log(ArLog::Normal, "Looking at goal"); + myCameraMode = CAMERA_MODE_LOOK_AT_GOAL; + myGoalAchievedLast = myGoalAchieved; + myGoalResetZoom = false; + + buildModePacket(); + myServer->broadcastPacketTcp( + &myCameraModePacket, + myCommandToPacketNameMap[ + ArCameraCommands::CAMERA_MODE_UPDATED].c_str()); + } + myModeMutex.unlock(); +} + +AREXPORT void ArServerHandlerCamera::cameraModeLookAtPoint(ArPose pose, + bool controlZoom) +{ + myModeMutex.lock(); + if (myCameraMode != CAMERA_MODE_LOOK_AT_POINT || + myLookAtPoint.findDistanceTo(pose) > 1) + { + ArLog::log(ArLog::Normal, "Looking at point %.0f %.0f", + pose.getX(), pose.getY()); + if (myCameraMode != CAMERA_MODE_LOOK_AT_POINT && controlZoom) + myPointResetZoom = false; + myCameraMode = CAMERA_MODE_LOOK_AT_POINT; + myLookAtPoint = pose; + buildModePacket(); + myServer->broadcastPacketTcp( + &myCameraModePacket, + myCommandToPacketNameMap[ + ArCameraCommands::CAMERA_MODE_UPDATED].c_str()); + } + myModeMutex.unlock(); +} + +AREXPORT void ArServerHandlerCamera::cameraModeLookAtGoalSetGoal(ArPose pose) +{ + myModeMutex.lock(); + myGoal = pose; + myGoalAchieved = false; + myGoalAchievedLast = false; + myGoalResetZoom = false; + myModeMutex.unlock(); +} + +AREXPORT void ArServerHandlerCamera::cameraModeLookAtGoalClearGoal(void) +{ + myModeMutex.lock(); + myGoalAchieved = true; + myModeMutex.unlock(); +} + +AREXPORT void ArServerHandlerCamera::handleResetCamera( + ArServerClient *client, ArNetPacket *packet) +{ + resetCamera(); +} + +AREXPORT void ArServerHandlerCamera::resetCamera(bool lockRobot) +{ + if (lockRobot) + myRobot->lock(); + myCamera->reset(); + if (lockRobot) + myRobot->unlock(); + cameraModePosition(); +} + diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerCameraCollection.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerCameraCollection.cpp new file mode 100644 index 0000000..2fb86dd --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerCameraCollection.cpp @@ -0,0 +1,300 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerCameraCollection.h" + + +#include +#include "ArClientArgUtils.h" + +const char *ArServerHandlerCameraCollection::GET_COLLECTION_PACKET_NAME = + "getCameraList"; +const char *ArServerHandlerCameraCollection::COLLECTION_UPDATED_PACKET_NAME = + "cameraListUpdated"; +const char *ArServerHandlerCameraCollection::SET_PARAMS_PACKET_NAME = + "setCameraParams"; +const char *ArServerHandlerCameraCollection::PARAMS_UPDATED_PACKET_NAME = + "cameraParamUpdated"; + +const char *ArServerHandlerCameraCollection::COMMAND_GROUP = + "CameraInfo"; // ?? + + +AREXPORT ArServerHandlerCameraCollection::ArServerHandlerCameraCollection + (ArServerBase *server, + ArCameraCollection *cameraCollection) : + myServer(server), + myCameraCollection(cameraCollection), + myGetCameraListCB(NULL), + mySetParamCB(NULL), + myCollectionModifiedCB(NULL) +{ + if (myServer != NULL) + { + myGetCameraListCB = new ArFunctor2C + (this, + &ArServerHandlerCameraCollection::getCameraList); + + myServer->addData(GET_COLLECTION_PACKET_NAME, + "Gets information about the robot's cameras.", + myGetCameraListCB, + "none", + "byte2: numCameras, repeating for numCameras: { string: cameraName, string: cameraType, string: displayName, string: displayType, byte2: numCommands, repeating for numCommands: {string: command, string: cameraCommandName byte4: requestInterval } byte2: numParams, repeating for numParams: {see ArConfigArg format}}", + COMMAND_GROUP, "RETURN_SINGLE"); // ??? + + + mySetParamCB = new ArFunctor2C + (this, + &ArServerHandlerCameraCollection::setParams); + + myServer->addData(SET_PARAMS_PACKET_NAME, + "Sets the specified camera parameters.", + mySetParamCB, + "string: cameraName, repeating for each param: { string: paramName, }, empty paramName terminates list", + "string: cameraName, repeating for each modified param: { string: paramName, }, empty paramName terminates list", + COMMAND_GROUP, "RETURN_SINGLE"); // ??? + + + myServer->addData(COLLECTION_UPDATED_PACKET_NAME, + "Single packet is sent when the camera collection has been modified.", + NULL, + "none", + "none", + COMMAND_GROUP, "RETURN_SINGLE"); + + myServer->addData(PARAMS_UPDATED_PACKET_NAME, + "Packet is sent when the camera parameters have been modified.", + NULL, + "none", + "string: cameraName, repeating for each modified param: { string: paramName, }, empty paramName terminates list", + COMMAND_GROUP, "RETURN_SINGLE"); // ??? + + } // end if server + + if (myCameraCollection != NULL) { + + myCollectionModifiedCB = new ArFunctorC + (this, + &ArServerHandlerCameraCollection::handleCameraCollectionModified); + + myCameraCollection->addModifiedCB(myCollectionModifiedCB); + + } // end if camera collection + +} // end ctor + +AREXPORT ArServerHandlerCameraCollection::~ArServerHandlerCameraCollection() +{ + if ((myCameraCollection != NULL) && + (myCollectionModifiedCB != NULL)) { + + myCameraCollection->removeModifiedCB(myCollectionModifiedCB); + delete myCollectionModifiedCB; + myCollectionModifiedCB = NULL; + + } // end if camera collection + + // TODO remove and delete server CB + +} // end dtor + + +AREXPORT void ArServerHandlerCameraCollection::getCameraList(ArServerClient *client, + ArNetPacket *packet) +{ + if (client == NULL) { + return; // Something very bad has happened... + } + + ArNetPacket sendPacket; + + if (myCameraCollection == NULL) { + sendPacket.byte2ToBuf(0); + client->sendPacketTcp(&sendPacket); + } + + // This lack of recursive locks is troublesome... Data might + // change between calls... + + std::list cameraNames; + myCameraCollection->getCameraNames(cameraNames); + + sendPacket.byte2ToBuf(cameraNames.size()); + + for (std::list::iterator iter = cameraNames.begin(); + iter != cameraNames.end(); + iter++) { + + const char *curName = iter->c_str(); + + sendPacket.strToBuf(curName); + + // TODO: ArNetPacket will NOT behave correctly if the given str is NULL + // Fix this somehow... + + sendPacket.strToBuf(myCameraCollection->getCameraType(curName)); + sendPacket.strToBuf(myCameraCollection->getDisplayName(curName)); + sendPacket.strToBuf(myCameraCollection->getDisplayType(curName)); + + // Send commands... + + std::list commands; + myCameraCollection->getCameraCommands(curName, commands); + + sendPacket.byte2ToBuf(commands.size()); + + for (std::list::iterator comIter = commands.begin(); + comIter != commands.end(); + comIter++) { + + const char *curCommand = comIter->c_str(); + + sendPacket.strToBuf(curCommand); + sendPacket.strToBuf(myCameraCollection->getCommandName(curName, curCommand)); + sendPacket.byte4ToBuf(myCameraCollection->getRequestInterval(curName, curCommand)); + + } // end for each command + + // Send parameters... + + std::list params; + myCameraCollection->getParameterNames(curName, params); + + sendPacket.byte2ToBuf(params.size()); + + ArConfigArg arg; + ArClientArg clientArg; + + bool isSuccess = true; + + for (std::list::iterator paramIter = params.begin(); + paramIter != params.end(); + paramIter++) { + + const char *paramName = paramIter->c_str(); + + isSuccess = myCameraCollection->getParameter(curName, + paramName, + arg); + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "ArServerHandlerCameraCollection::getCameraList() could not find param %s", paramName); + continue; + } + + // Add the current parameter to the packet + isSuccess = clientArg.createPacket(arg, &sendPacket); + + } // end for each parameter + + } // end for each camera + + client->sendPacketTcp(&sendPacket); + +} // end method getCameraList + + + +AREXPORT void ArServerHandlerCameraCollection::setParams(ArServerClient *client, + ArNetPacket *packet) +{ + if ((packet == NULL) || (myCameraCollection == NULL)) { + return; + } + char buffer[512]; + + packet->bufToStr(buffer, sizeof(buffer)); + std::string cameraName = buffer; + + ArNetPacket paramUpdatedPacket; + paramUpdatedPacket.strToBuf(cameraName.c_str()); + + ArConfigArg arg; + ArClientArg clientArg; + bool isSuccess = true; + bool isParamUpdated = false; + + bool isDone = false; + + while (!isDone) { + + packet->bufToStr(buffer, sizeof(buffer)); + std::string paramName = buffer; + + if (paramName.empty()) { + isDone = true; + break; + } + + isSuccess = myCameraCollection->getParameter(cameraName.c_str(), + paramName.c_str(), + arg); + + if (!isSuccess) { + ArLog::log(ArLog::Verbose, + "ArServerHandlerCameraCollection::setParams() could not find camera %s, param %s", + cameraName.c_str(), paramName.c_str()); + continue; + } + + isSuccess = clientArg.bufToArgValue(packet, arg); + + if (!isSuccess) { + continue; + } + + isSuccess = myCameraCollection->setParameter(cameraName.c_str(), arg); + + if (!isSuccess) { + continue; + } + + paramUpdatedPacket.strToBuf(arg.getName()); + clientArg.argValueToBuf(arg, ¶mUpdatedPacket); + isParamUpdated = true; + + } // end for each param + + // TODO Send a confirmation back, or just use the broadcast packet? (If a, then add + // client to broadcast) + + // Add an empty string to indicate the last parameter... + paramUpdatedPacket.strToBuf(""); + + // Haven't quite decided whether to send the update packet, or a success/error notice... + client->sendPacketTcp(¶mUpdatedPacket); + + + if (isParamUpdated) { + // NOT_EXCLUDING this used to not send it to the client, but no + // longer has that behavior since it causes problems with the + // central server + myServer->broadcastPacketTcp(¶mUpdatedPacket, + PARAMS_UPDATED_PACKET_NAME); + } + + /** + // TODO: Add error message? + ArNetPacket retPacket; + retPacket->strToBuf(""); + client->sendPacketTcp(&retPacket); + **/ + +} // end method setParams + + +AREXPORT void ArServerHandlerCameraCollection::handleCameraCollectionModified() +{ + if (myServer == NULL) { + return; + } + ArNetPacket emptyPacket; + myServer->broadcastPacketTcp(&emptyPacket, COLLECTION_UPDATED_PACKET_NAME); + +} // end method handleCameraCollectionModified + + + diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerCommMonitor.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerCommMonitor.cpp new file mode 100644 index 0000000..2b2c805 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerCommMonitor.cpp @@ -0,0 +1,138 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerCommMonitor.h" + +const char *ArServerHandlerCommMonitor::HEARTBEAT_TCP_PACKET_NAME = "heartbeatTcp"; +const char *ArServerHandlerCommMonitor::HEARTBEAT_UDP_PACKET_NAME = "heartbeatUdp"; + +const char *ArServerHandlerCommMonitor::GET_HEARTBEAT_INTERVAL_PACKET_NAME = "getHeartbeatInterval"; +const char *ArServerHandlerCommMonitor::ACK_COMM_TCP_PACKET_NAME = "ackCommTcp"; +const char *ArServerHandlerCommMonitor::ACK_COMM_UDP_PACKET_NAME = "ackCommUdp"; +const char *ArServerHandlerCommMonitor::COMMAND_GROUP = "RobotInfo"; +const char *ArServerHandlerCommMonitor::NO_ARGS = "None"; + + +ArServerHandlerCommMonitor::ArServerHandlerCommMonitor + (ArServerBase *server, + int heartbeatInterval) : + myServer(server), + myHeartbeatInterval(heartbeatInterval), + myLastHeartbeatTime(), + myGetHeartbeatIntervalCB(this, &ArServerHandlerCommMonitor::handleGetHeartbeatInterval), + myAckCommUdpCB(this, &ArServerHandlerCommMonitor::handleAckCommUdp), + myAckCommTcpCB(this, &ArServerHandlerCommMonitor::handleAckCommTcp), + myCycleCB(this, &ArServerHandlerCommMonitor::cycleCallback) +{ + // Do not allow intervals too small... + if (myHeartbeatInterval < MIN_HEARTBEAT_INTERVAL) { + myHeartbeatInterval = DEFAULT_HEARTBEAT_INTERVAL; + } + + myServer->addData(HEARTBEAT_TCP_PACKET_NAME, + "Packet is broadcast (TCP) at regular intervals to confirm that server is alive.", + NULL, + NO_ARGS, + NO_ARGS, + COMMAND_GROUP, "RETURN_SINGLE"); + + myServer->addData(HEARTBEAT_UDP_PACKET_NAME, + "Packet is broadcast (UDP) at regular intervals to confirm that server is alive.", + NULL, + NO_ARGS, + NO_ARGS, + COMMAND_GROUP, "RETURN_SINGLE"); + + myServer->addData(GET_HEARTBEAT_INTERVAL_PACKET_NAME, + "Gets the expected heartbeat interval (msecs); this is an approximate value depending on the server cycle time.", + &myGetHeartbeatIntervalCB, + NO_ARGS, + "uByte4: expected heartbeat interval (msecs)", + COMMAND_GROUP, "RETURN_SINGLE"); + + myServer->addData(ACK_COMM_TCP_PACKET_NAME, + "Acknowledges two-way communication over TCP", + &myAckCommTcpCB, + NO_ARGS, + NO_ARGS, + COMMAND_GROUP, "RETURN_SINGLE"); + + myServer->addData(ACK_COMM_UDP_PACKET_NAME, + "Acknowledges two-way communication over UDP", + &myAckCommUdpCB, + NO_ARGS, + NO_ARGS, + COMMAND_GROUP, "RETURN_SINGLE"); + + + myServer->addCycleCallback(&myCycleCB); + +} // end ctor + + +ArServerHandlerCommMonitor::~ArServerHandlerCommMonitor() +{ + // TODO Remove CBs from server? +} + + +AREXPORT void ArServerHandlerCommMonitor::handleGetHeartbeatInterval + (ArServerClient *client, + ArNetPacket *packet) +{ + if (client == NULL) { + return; // Something very bad has happened... + } + + ArNetPacket sendPacket; + sendPacket.uByte4ToBuf(myHeartbeatInterval); + + client->sendPacketTcp(&sendPacket); + +} // end method handleGetHeartbeatInterval + + +AREXPORT void ArServerHandlerCommMonitor::handleAckCommTcp(ArServerClient *client, + ArNetPacket *packet) +{ + if (client == NULL) { + return; // Something very bad has happened... + } + + ArNetPacket sendPacket; + + client->sendPacketTcp(&sendPacket); + +} // end method handleAckCommTcp + + +AREXPORT void ArServerHandlerCommMonitor::handleAckCommUdp(ArServerClient *client, + ArNetPacket *packet) +{ + if (client == NULL) { + return; // Something very bad has happened... + } + + ArNetPacket sendPacket; + + client->sendPacketUdp(&sendPacket); + +} // end method handleAckCommUdp + + +AREXPORT void ArServerHandlerCommMonitor::cycleCallback() +{ + if (myLastHeartbeatTime.mSecSince() < myHeartbeatInterval) { + return; + } + + ArNetPacket sendPacket; + + myServer->broadcastPacketTcp(&sendPacket, HEARTBEAT_TCP_PACKET_NAME); + myServer->broadcastPacketUdp(&sendPacket, HEARTBEAT_UDP_PACKET_NAME); + + myLastHeartbeatTime.setToNow(); + +} // end method cycleCallback + + + diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerCommands.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerCommands.cpp new file mode 100644 index 0000000..af28f58 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerCommands.cpp @@ -0,0 +1,296 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerCommands.h" + +AREXPORT ArServerHandlerCommands::ArServerHandlerCommands( + ArServerBase *server) : + myNetListCommandsCB(this, &ArServerHandlerCommands::netListCommands), + myNetListStringCommandsCB(this, + &ArServerHandlerCommands::netListStringCommands) +{ + myServer = server; + myTextServer = NULL; + if (myServer != NULL) + { + myServer->addData("listCommands", + "Gets a list of simple commands that can be sent to the server", + &myNetListCommandsCB, "none", "byte2: numberOfCommands, string: name, string: description", + "CustomCommands", "RETURN_SINGLE"); + + myServer->addData("listStringCommands", + "Gets a list of commands that can be sent to the server with string arguments", + &myNetListStringCommandsCB, "none", "byte2: numberOfCommands, string: name, string: description", "CustomCommands", "RETURN_SINGLE"); + } + +} + +AREXPORT ArServerHandlerCommands::~ArServerHandlerCommands() +{ + ArUtil::deleteSet(myFunctors.begin(), myFunctors.end()); + myFunctors.clear(); + ArUtil::deleteSet(myStringFunctors.begin(), myStringFunctors.end()); + myStringFunctors.clear(); +} + +/** + @param name the name of the command to add + @param description the description used for this command + @param functor the functor to call + @param commandGroup the command group this should be in, if NULL defaults + to CustomCommands + **/ +AREXPORT bool ArServerHandlerCommands::addCommand( + const char *name, const char *description, ArFunctor *functor, + const char *commandGroup) +{ + std::string realName; + + if (myPrefix.size() != 0) + realName = myPrefix; + + realName += name; + + ArFunctor3 *fun = + new ArFunctor3C(this, + &ArServerHandlerCommands::netParseCommand, + NULL, NULL, functor); + + std::string group; + if (myServer == NULL) + { + ArLog::log(ArLog::Normal, "Commands::addCommand: server is NULL"); + delete fun; + return false; + } + if (commandGroup != NULL) + group = commandGroup; + else + group = "CustomCommands"; + if (myServer->addData(realName.c_str(), description, fun, "none", "none", + group.c_str(), "RETURN_NONE")) + { + myCommands.push_back(realName.c_str()); + myCommandDescriptions.push_back(description); + myFunctors.push_back(fun); + ArLog::log(ArLog::Verbose, "Added simple command %s", realName.c_str()); + + if (myTextServer != NULL) { + std::string temp = "CustCmd"; + std::string custCmd = temp + name; + + ArFunctor4 *custFun = + new ArFunctor4C(this, + &ArServerHandlerCommands::textParseCommand, + NULL, 0, NULL, functor); + + std::string desc = description; + std::string trimmedDesc = desc.substr(0, desc.find("\n",0)); + + myTextServer->addCommand (custCmd.c_str(), custFun, + trimmedDesc.c_str()); + + } + + + return true; + } + else + { + delete fun; + ArLog::log(ArLog::Normal, + "Could not add simple command %s", realName.c_str()); + return false; + } + +} + +/** + @param name the name of the command to add + @param description the description used for this command + @param functor the functor to call (takes an argument builder) + @param commandGroup the command group this should be in, if NULL defaults + to CustomCommands + **/ +AREXPORT bool ArServerHandlerCommands::addStringCommand( + const char *name, const char *description, + ArFunctor1 *functor, const char *commandGroup) +{ + std::string realName; + + if (myPrefix.size() != 0) + realName = myPrefix; + + realName += name; + + ArFunctor3 *> *fun = new + ArFunctor3C *>(this, + &ArServerHandlerCommands::netParseStringCommand, + NULL, NULL, functor); + + if (myServer == NULL) + { + ArLog::log(ArLog::Normal, "Commands::addStringCommand: server is NULL"); + delete fun; + return false; + } + std::string group; + if (commandGroup != NULL) + group = commandGroup; + else + group = "CustomCommands"; + if (myServer->addData(realName.c_str(), description, fun, + "string: argumentToCommand", "none", group.c_str(), + "RETURN_NONE")) + { + myStringCommands.push_back(realName.c_str()); + myStringCommandDescriptions.push_back(description); + myStringFunctors.push_back(fun); + ArLog::log(ArLog::Verbose, "Added simple command with string %s", + realName.c_str()); + + + if (myTextServer != NULL) { + std::string temp = "CustCmd"; + std::string custCmd = temp + name; + + ArFunctor4 *> *custFun = + new ArFunctor4C *>(this, + &ArServerHandlerCommands::textParseStringCommand, + NULL, 0, NULL, functor); + + std::string desc = description; + std::string trimmedDesc = desc.substr(0, desc.find("\n",0)); + + myTextServer->addCommand (custCmd.c_str(), custFun, + trimmedDesc.c_str()); + + } + + return true; + } + else + { + delete fun; + ArLog::log(ArLog::Normal, + "Could not add simple command with string %s", + realName.c_str()); + return false; + } +} + +void ArServerHandlerCommands::netParseCommand(ArServerClient *client, + ArNetPacket *packet, + ArFunctor *functor) +{ + if (functor == NULL) + { + ArLog::log(ArLog::Terse, "Command has NULL functor"); + return; + } + functor->invoke(); +} + +void ArServerHandlerCommands::netParseStringCommand( + ArServerClient *client, ArNetPacket *packet, + ArFunctor1 *functor) +{ + char buf[1024]; + if (packet == NULL) + { + ArLog::log(ArLog::Terse, "String command has NULL packet"); + return; + } + if (functor == NULL) + { + ArLog::log(ArLog::Terse, "String command has NULL functor"); + return; + } + packet->bufToStr(buf, sizeof(buf)); + ArArgumentBuilder arg; + arg.add(buf); + arg.setFullString(buf); + functor->invoke(&arg); +} + + +void ArServerHandlerCommands::textParseCommand( + char **argv, int argc, + ArSocket *socket, + ArFunctor *functor) +{ + + if (functor == NULL) + { + ArLog::log(ArLog::Terse, "Command has NULL functor"); + return; + } + functor->invoke(); + +} + + +void ArServerHandlerCommands::textParseStringCommand( + char **argv, int argc, + ArSocket *socket, + ArFunctor1 *functor) +{ + + if (functor == NULL) + { + ArLog::log(ArLog::Terse, "String command has NULL functor"); + return; + } + ArArgumentBuilder arg; + arg.addStrings(argc - 1, &argv[1]); + functor->invoke(&arg); +} + +AREXPORT void ArServerHandlerCommands::netListCommands(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendPacket; + std::list::iterator commIt; + std::list::iterator descIt; + sendPacket.byte2ToBuf(myCommands.size()); + for (commIt = myCommands.begin(), descIt = myCommandDescriptions.begin(); + commIt != myCommands.end() && descIt != myCommandDescriptions.end(); + commIt++, descIt++) + { + sendPacket.strToBuf((*commIt).c_str()); + sendPacket.strToBuf((*descIt).c_str()); + } + client->sendPacketTcp(&sendPacket); +} + +AREXPORT void ArServerHandlerCommands::netListStringCommands( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + std::list::iterator commIt; + std::list::iterator descIt; + sendPacket.byte2ToBuf(myStringCommands.size()); + for (commIt = myStringCommands.begin(), + descIt = myStringCommandDescriptions.begin(); + commIt != myStringCommands.end() && + descIt != myStringCommandDescriptions.end(); + commIt++, descIt++) + { + sendPacket.strToBuf((*commIt).c_str()); + sendPacket.strToBuf((*descIt).c_str()); + } + client->sendPacketTcp(&sendPacket); +} + +AREXPORT void ArServerHandlerCommands::setPrefix(const char *prefix) +{ + myPrefix = prefix; +} + +AREXPORT const char *ArServerHandlerCommands::getPrefix(void) +{ + return myPrefix.c_str(); +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerConfig.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerConfig.cpp new file mode 100644 index 0000000..0a59599 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerConfig.cpp @@ -0,0 +1,1618 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerConfig.h" + +#include "ArClientArgUtils.h" + +//#define ARDEBUG_SERVERHANDLERCONFIG + +#if (defined(_DEBUG) && defined(ARDEBUG_SERVERHANDLERCONFIG)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +/** +@param server the server to add data to + +@param config the config to serve up + +@param defaultFile if this is given the config will try to copy the +config given and then load the default file into that config and +then serve data so clients can get those defaults + +@param defaultFileBaseDirectory base directory for the default file +**/ +AREXPORT ArServerHandlerConfig::ArServerHandlerConfig( + ArServerBase *server, ArConfig *config, const char *defaultFile, + const char *defaultFileBaseDirectory, bool allowFactory, + const char *robotName, bool preventChanges, + const char *preventChangesString) : + myRobotName((robotName != NULL) ? robotName : ""), + myLogPrefix(""), + myServer(server), + myConfig(config), + myDefault(NULL), + myPreWriteCallbacks(), + myPostWriteCallbacks(), + myRestartSoftwareCB(NULL), + myRestartSoftwareCBSet(false), + myRestartHardwareCB(NULL), + myRestartHardwareCBSet(false), + myGetConfigBySectionsCB(this, &ArServerHandlerConfig::getConfigBySections), + myGetConfigBySectionsV2CB(this, &ArServerHandlerConfig::getConfigBySectionsV2), + myGetConfigBySectionsV3CB(this, &ArServerHandlerConfig::getConfigBySectionsV3), + myGetConfigCB(this, &ArServerHandlerConfig::getConfig), + mySetConfigCB(this, &ArServerHandlerConfig::setConfig), + mySetConfigBySectionsCB(this, &ArServerHandlerConfig::setConfigBySections), + mySetConfigBySectionsV2CB(this, &ArServerHandlerConfig::setConfigBySectionsV2), + myReloadConfigCB(this, &ArServerHandlerConfig::reloadConfig), + myGetConfigDefaultsCB(this, &ArServerHandlerConfig::getConfigDefaults), + myGetConfigSectionFlagsCB(this, + &ArServerHandlerConfig::getConfigSectionFlags), + myGetLastEditablePriorityCB(this, + &ArServerHandlerConfig::getLastEditablePriority) +{ + myPermissionAllowFactory = allowFactory; + myPreventChanges = preventChanges; + if (preventChangesString != NULL) + myPreventChangesString = preventChangesString; + else + myPreventChangesString = "Changes prevented for unspecified reason"; + + if (!myRobotName.empty()) { + myLogPrefix = myRobotName + ": "; + } + myDefaultConfigMutex.setLogName( + "ArServerHandlerConfig::myDefaultConfigMutex"); + myConfigMutex.setLogName("ArServerHandlerConfig::myConfigMutex"); + myAddedDefaultServerCommands = false; + + myServer->addData("getConfigBySectionsV3", + "Gets the complete configuration information from the server", + &myGetConfigBySectionsV3CB, + "none", + "Advanced configuration retrieval, including handling of very big sections. Use ArClientHandlerConfig if desired.", + "ConfigEditing", "RETURN_UNTIL_EMPTY"); + + + myServer->addData("getConfigBySectionsV2", + "Gets the complete configuration information from the server", + &myGetConfigBySectionsV2CB, + "none", + "Advanced configuration retrieval, including restart level and list objects. Use ArClientHandlerConfig if desired.", + "ConfigEditing", "RETURN_UNTIL_EMPTY"); + + myServer->addData("getConfigBySections", + "Gets the configuration information from the server", + &myGetConfigBySectionsCB, + "none", + "A single packet is sent for each config section. Too complex to describe here. Use ArClientHandlerConfig if desired.", + "ConfigEditing", "RETURN_UNTIL_EMPTY"); + + myServer->addData("getConfig", + "gets the configuration information from the server", + &myGetConfigCB, + "none", + "deprecated (getConfigBySections is preferred). Too complex to describe here. Use ArClientHandlerConfig if desired.", + "ConfigEditing", "RETURN_SINGLE"); + + myServer->addData("setConfig", + "takes a config back from the client to use", + &mySetConfigCB, + "Repeating pairs of strings which are parameter name and value to parse", + "string: if empty setConfig worked, if the string isn't empty then it is the first error that occured (all non-error parameters are parsed, and only the first error is reported)", + "ConfigEditing", "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData("setConfigBySections", + "Saves the configuration received from the client, with each section in an individual packet", + &mySetConfigBySectionsCB, + "Section; string: section name; Repeating pairs of strings which are parameter name and value to parse", + "string: if empty setConfig worked, if the string isn't empty then it is the first error that occured (all non-error parameters are parsed, and only the first error is reported)", + "ConfigEditing", "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData("setConfigBySectionsV2", + "Saves the configuration received from the client, with each section in an individual packet", + &mySetConfigBySectionsV2CB, + "Section; string: section name; Repeating pairs of strings which are parameter name and value to parse", + "string: sectionName, or empty if end marker; string: if empty setConfig worked, if the string isn't empty then it is the first error that occured (all non-error parameters are parsed, and only the first error is reported)", + "ConfigEditing", "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData("reloadConfig", + "reloads the configuration file last loaded", + &myReloadConfigCB, "none", "none", + "ConfigEditing", "RETURN_SINGLE|IDLE_PACKET"); + + myServer->addData("configUpdated", + "gets sent when the config is updated", + NULL, "none", "none", + "ConfigEditing", "RETURN_SINGLE"); + + myServer->addData("getConfigSectionFlags", + "gets the flags for each section of the config", + &myGetConfigSectionFlagsCB, + "none", + "byte4: number of sections; repeating for number of sections (string: section; string: flags (separated by |))", + "ConfigEditing", "RETURN_SINGLE"); + + myServer->addData("getLastEditablePriority", + "Returns the last priority that may be edited by the user; e.g. EXPERT or FACTORY", + &myGetLastEditablePriorityCB, + "none", + "byte: the last ArPriority::Priority value for which parameters may be edited", + "ConfigEditing", "RETURN_SINGLE"); + + myServer->addData("configCausingRestart", + "When a config parameter that causes a restart is broadcast 1 second before the restart...", + NULL, "none", + "byte: 1 == software restart, 2 == hardware restart", + "RobotInfo", "RETURN_NONE"); + + if (defaultFile != NULL) + myDefaultFile = defaultFile; + if (defaultFileBaseDirectory != NULL) + myDefaultFileBaseDir = defaultFileBaseDirectory; + loadDefaultsFromFile(); +} + +AREXPORT ArServerHandlerConfig::~ArServerHandlerConfig() +{ + if (myDefault != NULL) + delete myDefault; +} + +AREXPORT bool ArServerHandlerConfig::loadDefaultsFromFile(void) +{ + bool ret = true; + + lockConfig(); + if (myDefault != NULL) + { + delete myDefault; + myDefault = NULL; + } + + if (!myDefaultFile.empty()) + { + ArLog::log(ArLog::Normal, "%sWill attempt to load default file '%s'", + myLogPrefix.c_str(), myDefaultFile.c_str()); + createDefaultConfig(myDefaultFileBaseDir.c_str()); + myDefault->clearAllValueSet(); + // now fill in that copy + myDefault->setPermissions(true, false); + if (myDefault->parseFile(myDefaultFile.c_str())) + { + addDefaultServerCommands(); + } + else + { + ret = false; + ArLog::log(ArLog::Normal, + "%sDid not load default file '%s' successfully, not allowing getDefault", + myLogPrefix.c_str(), + myDefaultFile.c_str()); + delete myDefault; + myDefault = NULL; + } + if (myDefault != NULL) + myDefault->removeAllUnsetValues(); + } + unlockConfig(); + ArNetPacket emptyPacket; + myServer->broadcastPacketTcp(&emptyPacket, "configDefaultsUpdated"); + return ret; +} + +AREXPORT bool ArServerHandlerConfig::loadDefaultsFromPacket( + ArNetPacket *packet) +{ + bool ret = true; + + lockConfig(); + if (myDefault != NULL) + { + delete myDefault; + myDefault = NULL; + } + + createDefaultConfig(NULL); + myDefault->clearAllValueSet(); + // now fill in that copy + if (internalSetConfig(NULL, packet, 0)) + { + addDefaultServerCommands(); + } + else + { + ArLog::log(ArLog::Normal, + "%sDid not load default from packet successfully, not allowing getDefault", + myLogPrefix.c_str()); + delete myDefault; + myDefault = NULL; + } + if (myDefault != NULL) + myDefault->removeAllUnsetValues(); + unlockConfig(); + ArNetPacket emptyPacket; + myServer->broadcastPacketTcp(&emptyPacket, "configDefaultsUpdated"); + return ret; +} + +AREXPORT void ArServerHandlerConfig::createEmptyConfigDefaults(void) +{ + lockConfig(); + if (myDefault != NULL) + { + delete myDefault; + myDefault = NULL; + } + + addDefaultServerCommands(); + unlockConfig(); + ArNetPacket emptyPacket; + myServer->broadcastPacketTcp(&emptyPacket, "configDefaultsUpdated"); +} + +/** + @internal + + doesn't delete the old one, do that if you're going to call this + yourself and make sure you lock around all that (okay, it deletes + it now, but the stuff that calls it should still take care of it) +**/ +void ArServerHandlerConfig::createDefaultConfig(const char *defaultFileBaseDir) +{ + if (myDefault != NULL) + { + delete myDefault; + myDefault = NULL; + } + // copy that config (basedir will be NULL if we're not loading from + // a file)... don't have the default save unknown values + myDefault = new ArConfig(defaultFileBaseDir, false, false, false, false); + + std::list::iterator sectionIt; + std::list::iterator paramIt; + ArConfigSection *section = NULL; + std::list *params = NULL; + ArConfigArg param; + for (sectionIt = myConfig->getSections()->begin(); + sectionIt != myConfig->getSections()->end(); + sectionIt++) + { + section = (*sectionIt); + params = section->getParams(); + + + for (paramIt = params->begin(); paramIt != params->end(); paramIt++) + { + param.copyAndDetach(*paramIt); + + myDefault->addParam(param); + + + // switch (param.getType()) { + // case ArConfigArg::INT: + //myDefault->addParam( + // ArConfigArg(param.getName(), param.getInt(), + // param.getDescription(), + // param.getMinInt(), param.getMaxInt()), + // section->getName(), + // param.getConfigPriority(), + // param.getDisplayHint()); + //break; + // case ArConfigArg::DOUBLE: + //myDefault->addParam( + // ArConfigArg(param.getName(), param.getDouble(), + // param.getDescription(), + // param.getMinDouble(), param.getMaxDouble()), + // section->getName(), + // param.getConfigPriority(), + // param.getDisplayHint()); + //break; + // + // case ArConfigArg::BOOL: + //myDefault->addParam( + // ArConfigArg(param.getName(), param.getBool(), + // param.getDescription()), + // section->getName(), + // param.getConfigPriority(), + // param.getDisplayHint()); + //break; + // + // case ArConfigArg::STRING: + //myDefault->addParam( + // ArConfigArg(param.getName(), (char *)param.getString(), + // param.getDescription(), 0), + // section->getName(), + // param.getConfigPriority(), + // param.getDisplayHint()); + //break; + // + // case ArConfigArg::SEPARATOR: + // myDefault->addParam( + // ArConfigArg(ArConfigArg::SEPARATOR), + // section->getName(), + // param.getConfigPriority(), + // param.getDisplayHint()); + //break; + // default: + //break; + // } // end switch param type + } // end for each param + } // end for each section +} // create default config + +void ArServerHandlerConfig::addDefaultServerCommands(void) +{ + if (myAddedDefaultServerCommands) + return; + + myServer->addData("getConfigDefaults", + "Gets the config default values ", + &myGetConfigDefaultsCB, + "string: section to load, empty string means get the whole thing", + "repeating strings that are the parameters and arguments to parse, but use ArClientHandlerConfig to handle this if you want", + "ConfigEditing"); + myServer->addData("configDefaultsUpdated", + "Gets sent when the config defaults are updated", + NULL, "none", "none", + "ConfigEditing", "RETURN_SINGLE"); + myAddedDefaultServerCommands = true; +} + +/** + * @param client the ArServerClient * to which to send the config + * @param packet the ArNetPacket * which accompanied the client's request + * @param isMultiplePackets a bool set to true if the server should send a + * packet for each config section followed by the empty packet; false if + * the server should send the entire config in one packet (i.e. the old style) + * @param lastPriority the last ArPriority::Priority that should be sent + * to the client (this is the greatest numerical value and the least + * semantic priority). +**/ +AREXPORT void ArServerHandlerConfig::handleGetConfig + (ArServerClient *client, + ArNetPacket *packet, + bool isMultiplePackets, + ArPriority::Priority lastPriority, + bool isSendIneditablePriorities, + int version) +{ + + ArConfigArg param; + + // The multiple packets method also sends display hints with the parameters; + // the old single packet method does not. + ArClientArg clientArg(isMultiplePackets, + lastPriority, + version); + + + std::set sent; + + ArNetPacket sending; + ArLog::log(ArLog::Normal, + "%sConfig requested.", + myLogPrefix.c_str()); + + std::list *sections = myConfig->getSections(); + for (std::list::iterator sIt = sections->begin(); + sIt != sections->end(); + sIt++) + { + // Clear the packet... + if (isMultiplePackets) { + sending.empty(); + } + + // clear out the sent list between sections + sent.clear(); + + ArConfigSection *section = (*sIt); + if (section == NULL) { + continue; + } + std::list *params = section->getParams(); + +bool isSectionSuccess = handleGetConfigSection(sending, + client, + packet, + isMultiplePackets, + lastPriority, + isSendIneditablePriorities, + version, + section, + 0, + params->size(), + 1, + sent); + + + //sending.byteToBuf('S'); + //sending.strToBuf(section->getName()); + //sending.strToBuf(section->getComment()); + //if (version >= 2) { + // sending.strToBuf(section->getCategoryName()); + //} + + //ArLog::log(ArLog::Verbose, + // "%sSending config section %s...", + // myLogPrefix.c_str(), + // section->getName()); + + ////printf("S %s %s\n", section->getName(), section->getComment()); + //std::list *params = section->getParams(); + //for (std::list::iterator pIt = params->begin(); + // pIt != params->end(); + // pIt++) + //{ + // param = (*pIt); + + // if ((!isSendIneditablePriorities) && + // (param.getConfigPriority() > lastEditablePriority)) { + // ArLog::log(ArLog::Verbose, + // "%sNot sending parameter %s priority %s ineditable", + // myLogPrefix.c_str(), + // param.getName(), + // ArPriority::getPriorityName(param.getConfigPriority())); + // continue; + // } // end if ineditable param + + + // bool isCheckableName = + // (param.getType() != ArConfigArg::DESCRIPTION_HOLDER && + // param.getType() != ArConfigArg::SEPARATOR && + // param.getType() != ArConfigArg::STRING_HOLDER); + + // // if we've already sent it don't send it again + // if (isCheckableName && + // sent.find(param.getName()) != sent.end()) { + // continue; + // } + // else if (isCheckableName) { + // sent.insert(param.getName()); + // } + + // if (clientArg.isSendableParamType(param)) + // { + // sending.byteToBuf('P'); + + // bool isSuccess = clientArg.createPacket(param, + // &sending); + + // } + //} // end for each parameter + + //if (!sending.isValid()) { + + // ArLog::log(ArLog::Terse, + // "%sConfig section %s cannot be sent; packet size exceeded", + // myLogPrefix.c_str(), + // section->getName()); + + //} // end if length exceeded... + //else if (isMultiplePackets) { + + // client->sendPacketTcp(&sending); + + //} // end else send in chunks... + + } // end for each section + + // If sending each section in individual packets, then send an empty packet + // to indicate the end of the config data. + if (isMultiplePackets) { + + sending.empty(); + client->sendPacketTcp(&sending); + } + else { // send the entire config in one packet + + // If the config is too big to fit in the packet, then just send an empty + // packet (to try to prevent an older client from crashing) + // TODO: Is there any better way to notify the user of an error.... + if (!sending.isValid()) { + ArLog::log(ArLog::Terse, + "%sError sending config; packet size exceeded", + myLogPrefix.c_str()); + sending.empty(); + } + + client->sendPacketTcp(&sending); + + } // end else send the entire packet + +} // end method getConfigBySections + + +AREXPORT bool ArServerHandlerConfig::handleGetConfigSection + (ArNetPacket &sending, + ArServerClient *client, + ArNetPacket *packet, + bool isMultiplePackets, + ArPriority::Priority lastPriority, + bool isSendIneditablePriorities, + int version, + ArConfigSection *section, + int startIndex, + int paramCount, + int sectionIndex, + std::set &sentParams) +{ + // The multiple packets method also sends display hints with the parameters; + // the old single packet method does not. + ArClientArg clientArg(isMultiplePackets, + lastPriority, + version); + + ArPriority::Priority lastEditablePriority = findLastEditablePriority(); + + sending.byteToBuf('S'); + sending.strToBuf(section->getName()); + sending.strToBuf(section->getComment()); + if (version >= 2) { + sending.strToBuf(section->getCategoryName()); + } + if (version >= 3) { + sending.uByte2ToBuf(sectionIndex); + } + + ArLog::log(ArLog::Verbose, + "%sSending config section %s...", + myLogPrefix.c_str(), + section->getName()); + bool isSuccess = true; + + std::list *params = section->getParams(); + + + int successCount = 0; + int curIndex = 0; + int count = 0; + //printf("S %s %s\n", section->getName(), section->getComment()); + for (std::list::iterator pIt = params->begin(); + ((pIt != params->end()) && (isSuccess)); + pIt++, curIndex++) + { + if (curIndex < startIndex) { + continue; + } + count++; + if (count > paramCount) { + break; + } + ArConfigArg ¶m = (*pIt); + + if ((!isSendIneditablePriorities) && + (param.getConfigPriority() > lastEditablePriority)) { + ArLog::log(ArLog::Verbose, + "%sNot sending parameter %s priority %s ineditable", + myLogPrefix.c_str(), + param.getName(), + ArPriority::getPriorityName(param.getConfigPriority())); + continue; + } // end if ineditable param + + + bool isCheckableName = + (param.getType() != ArConfigArg::DESCRIPTION_HOLDER && + param.getType() != ArConfigArg::SEPARATOR && + param.getType() != ArConfigArg::STRING_HOLDER); + + // if we've already sent it don't send it again + if (isCheckableName && + sentParams.find(param.getName()) != sentParams.end()) { + continue; + } + else if (isCheckableName) { + sentParams.insert(param.getName()); + } + + + if (clientArg.isSendableParamType(param)) + { + sending.byteToBuf('P'); + + isSuccess = clientArg.createPacket(param, + &sending); + if (isSuccess && sending.isValid()) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig added param %s to packet", + param.getName())); + successCount++; + } + + } + } // end for each parameter + + + if ((!sending.isValid()) || (!isSuccess)) { + + if (version >= 3) { + + if (successCount == 0) { + ArLog::log(ArLog::Normal, + "ArServerHandlerConfig No successful param sent for section %s", + section->getName()); + return false; + } + + sentParams.clear(); + + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig About to send front for section %s", + section->getName())); + + sending.empty(); + bool isFrontSuccess = handleGetConfigSection + (sending, + client, + packet, + isMultiplePackets, + lastPriority, + isSendIneditablePriorities, + version, + section, + startIndex, + successCount, + sectionIndex, + sentParams); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig About to send rear for section %s", + section->getName())); + + sending.empty(); + bool isRearSuccess = handleGetConfigSection + (sending, + client, + packet, + isMultiplePackets, + lastPriority, + isSendIneditablePriorities, + version, + section, + startIndex + successCount, + count - successCount, + sectionIndex + 1, + sentParams); + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig Finished sending %s", + section->getName())); + return (isFrontSuccess && isRearSuccess); + + } + else { + + + ArLog::log(ArLog::Terse, + "%sConfig section %s cannot be sent; packet size exceeded", + myLogPrefix.c_str(), + section->getName()); + + return false; + } + + } // end if length exceeded... + else if (isMultiplePackets) { + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig sending packet to client")); + + client->sendPacketTcp(&sending); + + return true; + + } // end else send in chunks... + + return true; + +} // end method handleGetConfigSection + +AREXPORT void ArServerHandlerConfig::getConfigBySectionsV3(ArServerClient *client, + ArNetPacket *packet) +{ + doGetConfigBySections(client, packet, 3); + +} // end method getConfigBySectionsV2 + +AREXPORT void ArServerHandlerConfig::getConfigBySectionsV2(ArServerClient *client, + ArNetPacket *packet) +{ + doGetConfigBySections(client, packet, 2); + +} // end method getConfigBySectionsV2 + +AREXPORT void ArServerHandlerConfig::getConfigBySections(ArServerClient *client, + ArNetPacket *packet) +{ + doGetConfigBySections(client, packet, 1); + +} // end method getConfigBySections + +AREXPORT void ArServerHandlerConfig::doGetConfigBySections(ArServerClient *client, + ArNetPacket *packet, + int version) +{ + // The default value of lastPriority is DETAILED because that was the + // original last value and some of the older clients cannot handle + // anything greater. + ArPriority::Priority lastPriority = ArPriority::DETAILED; + + bool isSendIneditablePriorities = false; + ArPriority::Priority lastEditablePriority = findLastEditablePriority(); + + // Newer clients insert a priority value into the packet. This is + // the last priority (i.e. greatest numerical value) that the client + // can handle. + if ((packet != NULL) && + (packet->getDataReadLength() < packet->getDataLength())) { + + char priorityVal = packet->bufToByte(); + ArLog::log(ArLog::Verbose, + "%sSending config with maximum priority value set to %i", + myLogPrefix.c_str(), + priorityVal); + + lastPriority = convertToPriority(priorityVal, lastPriority); + + /*** + if ((priorityVal >= 0) && (priorityVal <= ArPriority::LAST_PRIORITY)) { + lastPriority = (ArPriority::Priority) priorityVal; + } + else if (priorityVal > ArPriority::LAST_PRIORITY) { + // This is just to handle the unlikely case that more priorities + // are added. That is, both the server and client can handle more + // than DETAILED -- and the client can handle even more than the + // server. + lastPriority = ArPriority::LAST_PRIORITY; + } + ***/ + + // If the packet contains more information, it is the last priority + // that may be edited by the client; this means that the client + // is relatively new and can handle editable versus display-only + // (or hidden) priorities; send the ineditable priorities too + if (packet->getDataReadLength() < packet->getDataLength()) { + + priorityVal = packet->bufToByte(); + lastEditablePriority = convertToPriority(priorityVal, + ArPriority::LAST_PRIORITY); + + ArLog::log(ArLog::Verbose, + "%sReceived last editable priority %s in config request", + myLogPrefix.c_str(), + ArPriority::getPriorityName(lastEditablePriority)); + + if (lastEditablePriority != findLastEditablePriority()) { + // Not sure whether this is really a critical error... + ArLog::log(ArLog::Normal, + "%sReceived unexpected last editable priority %s (expected %s)", + myLogPrefix.c_str(), + ArPriority::getPriorityName(lastEditablePriority), + ArPriority::getPriorityName(findLastEditablePriority())); + } + + isSendIneditablePriorities = true; + + } // end if packet contains last editable priority + + } // end if packet is not empty + + handleGetConfig(client, + packet, + true, // multiple packets + lastPriority, + isSendIneditablePriorities, + version); + +} // end method getConfigBySections + + + + +ArPriority::Priority ArServerHandlerConfig::findLastEditablePriority() +{ + // KMC 10/26/12 Changed from EXPERT to CALIBRATION + ArPriority::Priority lastPriority = ArPriority::CALIBRATION; + // KMC 10/26/12 ...and removed this because I'm under the impression that + // we're not currently supporting the (not) "allow factory" permission +// if (myPermissionAllowFactory) { +// lastPriority = ArPriority::CALIBRATION; +// } + return lastPriority; +} + + +ArPriority::Priority ArServerHandlerConfig::convertToPriority + (int priorityVal, + ArPriority::Priority defaultPriority) +{ + ArPriority::Priority priority = defaultPriority; + + if ((priorityVal >= 0) && (priorityVal <= ArPriority::LAST_PRIORITY)) { + priority = (ArPriority::Priority) priorityVal; + } + else if (priorityVal > ArPriority::LAST_PRIORITY) { + // This is just to handle the unlikely case that more priorities + // are added. That is, both the server and client can handle more + // than DETAILED -- and the client can handle even more than the + // server. + priority = ArPriority::LAST_PRIORITY; + } + + return priority; + +} // end method converToPriority + + +AREXPORT void ArServerHandlerConfig::getConfig(ArServerClient *client, + ArNetPacket *packet) +{ + handleGetConfig(client, + packet, + false, // single packet + ArPriority::DETAILED, // older clients can't handle greater priorities + false, // older clients don't have ineditable priorities + false); // older clients also don't have restart levels +} + + + +AREXPORT void ArServerHandlerConfig::setConfig(ArServerClient *client, + ArNetPacket *packet) +{ + // MPL 9/13/12 added this lock when I added the setPreventChanges + // function call + myConfigMutex.lock(); + if (myPreventChanges) + { + ArNetPacket retPacket; + retPacket.strToBuf(myPreventChangesString.c_str()); + ArLog::log(ArLog::Normal, "SetConfig prevented because '%s'", + myPreventChangesString.c_str()); + if (client != NULL) + { + client->sendPacketTcp(&retPacket); + ArNetPacket emptyPacket; + emptyPacket.setCommand(myServer->findCommandFromName("configUpdated")); + client->sendPacketTcp(&emptyPacket); + } + return; + } + myConfigMutex.unlock(); + + internalSetConfig(client, packet, 0); +} + +AREXPORT void ArServerHandlerConfig::setConfigBySections(ArServerClient *client, + ArNetPacket *packet) +{ + // MPL 9/13/12 added this lock when I added the setPreventChanges + // function call + myConfigMutex.lock(); + if (myPreventChanges) + { + ArNetPacket retPacket; + retPacket.strToBuf(myPreventChangesString.c_str()); + ArLog::log(ArLog::Normal, "SetConfigBySections prevented because '%s'", + myPreventChangesString.c_str()); + if (client != NULL) + { + client->sendPacketTcp(&retPacket); + ArNetPacket emptyPacket; + emptyPacket.setCommand(myServer->findCommandFromName("configUpdated")); + client->sendPacketTcp(&emptyPacket); + } + return; + } + myConfigMutex.unlock(); + + internalSetConfig(client, packet, 1, true); +} + +AREXPORT void ArServerHandlerConfig::setConfigBySectionsV2(ArServerClient *client, + ArNetPacket *packet) +{ + // MPL 9/13/12 added this lock when I added the setPreventChanges + // function call + myConfigMutex.lock(); + if (myPreventChanges) + { + ArNetPacket retPacket; + retPacket.strToBuf(myPreventChangesString.c_str()); + ArLog::log(ArLog::Normal, "SetConfigBySections prevented because '%s'", + myPreventChangesString.c_str()); + if (client != NULL) + { + client->sendPacketTcp(&retPacket); + ArNetPacket emptyPacket; + emptyPacket.setCommand(myServer->findCommandFromName("configUpdated")); + client->sendPacketTcp(&emptyPacket); + } + return; + } + myConfigMutex.unlock(); + + internalSetConfig(client, packet, 2, true); +} + +/** + @param client If client is NULL it means use the default config + @param packet request packet containing config options +**/ + +bool ArServerHandlerConfig::internalSetConfig(ArServerClient *client, + ArNetPacket *packet, + int version, + bool isMultiplePackets) +{ + char param[1024]; + char argument[1024]; + char errorBuffer[1024]; + char firstError[1024]; + ArNetPacket retPacket; + ArConfig *config; + bool ret = true; + + if (client != NULL) + config = myConfig; + else + config = myDefault; + + if (client != NULL) + lockConfig(); + + if (client != NULL) + config->setPermissions(myPermissionAllowFactory, false); + else + config->setPermissions(true, false); + + ArArgumentBuilder *builder = NULL; + if (client != NULL) + ArLog::log(ArLog::Normal, "%sGot new config from client %s", + myLogPrefix.c_str(), + client->getIPString()); + else + ArLog::log(ArLog::Verbose, + "%sNew default config", + myLogPrefix.c_str()); + errorBuffer[0] = '\0'; + firstError[0] = '\0'; + std::string sectionName; + + if (!isMultiplePackets) { + config->resetRestartLevelNeeded(); + } + + bool isEmptyPacket = true; + + while (packet->getDataReadLength() < packet->getDataLength()) + { + isEmptyPacket = false; + + packet->bufToStr(param, sizeof(param)); + packet->bufToStr(argument, sizeof(argument)); + + builder = new ArArgumentBuilder; + builder->setExtraString(param); + builder->addPlain(argument); + + ArLog::log(ArLog::Verbose, "Config: \"%s\" \"%s\"", param, argument); + + // if the param name here is "Section" we need to parse sections, + // otherwise we parse the argument + if (strcasecmp(param, "Section") == 0) { + + if (builder->getArgc() > 0) { +// ArLog::log(ArLog::Normal, +// "***** Receiving config section %s", +// builder->getArg(0)); + sectionName = builder->getArg(0); + } + if (!config->parseSection(builder, errorBuffer, sizeof(errorBuffer))) { + if (firstError[0] == '\0') { + strcpy(firstError, errorBuffer); + } // end if no error yet + } // end if error parsing section + + } + else if (strcasecmp(param, ArConfigArg::LIST_BEGIN_TAG) == 0) { + + if (!config->parseListBegin(builder, errorBuffer, sizeof(errorBuffer))) { + if (firstError[0] == '\0') + strcpy(firstError, errorBuffer); + } + + } + else if (strcasecmp(param, ArConfigArg::LIST_END_TAG) == 0) { + + if (!config->parseListEnd(builder, errorBuffer, sizeof(errorBuffer))) { + if (firstError[0] == '\0') + strcpy(firstError, errorBuffer); + } + + } + else if ((strcasecmp(param, "Section") != 0 && + !config->parseArgument(builder, errorBuffer, sizeof(errorBuffer)))) + { + if (firstError[0] == '\0') + strcpy(firstError, errorBuffer); + } + delete builder; + builder = NULL; + } + if (version >= 2) { + + // ArLog::log(ArLog::Normal, + // " ----- adding %s to retPacket", + // sectionName.c_str()); + + retPacket.strToBuf(sectionName.c_str()); + } // end if version >= 2 + + if (isMultiplePackets && !isEmptyPacket) { + if (firstError[0] != '\0') + { + ret = false; + if (client != NULL) + ArLog::log(ArLog::Normal, + "%sNew config from client %s had at least this problem: %s", + myLogPrefix.c_str(), + client->getIPString(), firstError); + else + ArLog::log(ArLog::Normal, + "%sNew default config had at least this problem: %s", + myLogPrefix.c_str(), + firstError); + + retPacket.strToBuf(firstError); + } + //printf("Sending "); + //retPacket.log(); + if (client != NULL) + client->sendPacketTcp(&retPacket); + if (client != NULL) + unlockConfig(); + // MPL 12/9/2012 don't update the config since it's only partial so far + // if (client != NULL) + // configUpdated(client); + + return ret; + + } + + // KMC 1/22/13 To only log some of the config, substitute the commented + // lines below for the following config->log statement. + + IFDEBUG(config->log(false, NULL, myLogPrefix.c_str())); + /*** + std::list sectionNameList; + sectionNameList.push_back("Data Log Settings"); + IFDEBUG(config->log(false, §ionNameList, myLogPrefix.c_str())); + ***/ + + if (firstError[0] == '\0') + { + if (config->callProcessFileCallBacks(true, + errorBuffer, + sizeof(errorBuffer))) + { + if (client != NULL) + ArLog::log(ArLog::Normal, + "%sNew config from client %s was fine.", + myLogPrefix.c_str(), + client->getIPString()); + else + ArLog::log(ArLog::Verbose, + "%sNew default config was fine.", + myLogPrefix.c_str()); + retPacket.strToBuf(""); + writeConfig(); + } + else // error processing config callbacks + { + ret = false; + if (firstError[0] == '\0') + strcpy(firstError, errorBuffer); + // if its still empty it means we didn't have anything good in the errorBuffer + if (firstError[0] == '\0') + strcpy(firstError, "Error processing"); + + if (client != NULL) + ArLog::log(ArLog::Normal, + "%sNew config from client %s had errors processing ('%s').", + myLogPrefix.c_str(), + client->getIPString(), firstError); + + else + ArLog::log(ArLog::Normal, + "%sNew default config had errors processing ('%s').", + myLogPrefix.c_str(), + firstError); + retPacket.strToBuf(firstError); + } + } + // } + // KMC Not sure about this.... Seems like it would be good to return the + // error as soon as possible -- but what affect on client? + else // if (firstError[0] != '\0') + { + ret = false; + if (client != NULL) + ArLog::log(ArLog::Normal, + "%sNew config from client %s had at least this problem: %s", + myLogPrefix.c_str(), + client->getIPString(), firstError); + else + ArLog::log(ArLog::Normal, + "%sNew default config had at least this problem: %s", + myLogPrefix.c_str(), + firstError); + + retPacket.strToBuf(firstError); + } + //printf("Sending "); + //retPacket.log(); + if (client != NULL) + client->sendPacketTcp(&retPacket); + if (client != NULL) + unlockConfig(); + if (client != NULL) + configUpdated(client); + + ArConfigArg::RestartLevel restartLevel = config->getRestartLevelNeeded(); + + config->resetRestartLevelNeeded(); + + // if we're changing main config then we need to do more + if (config == myConfig) + { + if (ret) + { + if (restartLevel == ArConfigArg::RESTART_CLIENT) + { + ArLog::log(ArLog::Normal, "%sRequesting client restart because RESTART_CLIENT (%d) config param(s) changed", + myLogPrefix.c_str(), restartLevel); + ArNetPacket clientRestartPacket; + clientRestartPacket.byteToBuf(1); + clientRestartPacket.strToBuf( + "Client restart requested because of config change"); + + myServer->broadcastPacketTcp(&clientRestartPacket, + "requestClientRestart"); + } + else if (restartLevel == ArConfigArg::RESTART_IO) + { + restartIO("RESTART_IO config param(s) changed"); + } + else if (restartLevel == ArConfigArg::RESTART_SOFTWARE) + { + restartSoftware("RESTART_SOFTWARE config param(s) changed"); + } + else if (restartLevel == ArConfigArg::RESTART_HARDWARE) + { + restartHardware("RESTART_HARDWARE config param(s) changed"); + } + } + // if we couldn't successfully load the config... then reload a new + // config (since otherwise some values can linger when they + // shouldn't) + else + { + ArLog::log(ArLog::Normal, + "%sReloading config.", + myLogPrefix.c_str()); + reloadConfig(NULL, NULL); + } + } + + config->resetRestartLevelNeeded(); + return ret; +} + +AREXPORT void ArServerHandlerConfig::reloadConfig(ArServerClient *client, + ArNetPacket *packet) +{ + if (client != NULL) + ArLog::log(ArLog::Normal, "%sReloading config for %s.", + myLogPrefix.c_str(), client->getIPString()); + + bool isNotify = true; + + lockConfig(); + myConfig->setPermissions(myPermissionAllowFactory, false); + // this isn't going to cause any restarts ever, but that's + // intentional since by definition if we're reloading the config + // we're actively using we don't need a restart + if (!myConfig->parseFile(myConfig->getFileName(), true)) { + ArLog::log(ArLog::Normal, + "ArServerHandlerConfig::reloadConfig() error parsing config file %s", + myConfig->getFileName()); + + // reloadConfig is called by internalSetConfig when the received configuration + // fails to load. In this case, the client and packet are both set to NULL. + // If the received configuration and the file both fail to load, then the + // configUpdated packet should be suppressed. Otherwise, the robot and the + // central server can enter a nasty infinite loop of perpetual config downloads. + // (See Bug 13306.) + if ((client == NULL) && (packet == NULL)) { + + isNotify = false; + ArLog::log(ArLog::Normal, + "ArServerHandlerConfig::reloadConfig() suppressing configUpdated() because received config also in error "); + + } + + } // end if error occurred parsing config file + + if (isNotify) { + configUpdated(); + } + + unlockConfig(); +} + +AREXPORT void ArServerHandlerConfig::getConfigDefaults(ArServerClient *client, + ArNetPacket *packet) +{ + char sectionRequested[512]; + sectionRequested[0] = '\0'; + ArNetPacket sending; + + if (myDefault == NULL) + { + ArLog::log(ArLog::Normal, + "%sArServerHandlerConfig::getConfigDefaults: No default config to get", + myLogPrefix.c_str()); + client->sendPacketTcp(&sending); + return; + } + myConfigMutex.lock(); + // if we have a section name pick it up, otherwise we send everything + if (packet->getDataReadLength() < packet->getDataLength()) + packet->bufToStr(sectionRequested, sizeof(sectionRequested)); + + //ArConfigArg param; + + ArClientArg clientArg; + + if (sectionRequested[0] == '\0') + ArLog::log(ArLog::Normal, + "%sSending all defaults to client", + myLogPrefix.c_str()); + else + ArLog::log(ArLog::Normal, + "%sSending defaults for section '%s' to client", + myLogPrefix.c_str(), + sectionRequested); + + + std::list *sections = myDefault->getSections(); + + for (std::list::iterator sIt = sections->begin(); + sIt != sections->end(); + sIt++) + { + ArConfigSection *section = (*sIt); + + if (section == NULL) { + continue; // Should never happen... + } + + // if we're not sending them all and not in the right section just cont + if (sectionRequested[0] != '\0' && + ArUtil::strcasecmp(sectionRequested, section->getName()) != 0) { + continue; + } + + sending.strToBuf("Section"); + sending.strToBuf(section->getName()); + + std::list *params = section->getParams(); + + for (std::list::iterator pIt = params->begin(); + pIt != params->end(); + pIt++) + { + ArConfigArg ¶m = (*pIt); + + if (!clientArg.isSendableParamType(param)) { + continue; + } + + sending.strToBuf(param.getName()); + clientArg.argTextToBuf(param, &sending); + + } // end for each param + } // end for each section + myConfigMutex.unlock(); + + client->sendPacketTcp(&sending); +} + + +AREXPORT void ArServerHandlerConfig::addPreWriteCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPreWriteCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPreWriteCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "%sArServerHandlerConfig::addPreWriteCallback: Invalid position.", + myLogPrefix.c_str()); +} + +AREXPORT void ArServerHandlerConfig::remPreWriteCallback( + ArFunctor *functor) +{ + myPreWriteCallbacks.remove(functor); +} + +AREXPORT void ArServerHandlerConfig::addPostWriteCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPostWriteCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPostWriteCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "%sArServerHandlerConfig::addPostWriteCallback: Invalid position.", + myLogPrefix.c_str()); +} + +AREXPORT void ArServerHandlerConfig::remPostWriteCallback( + ArFunctor *functor) +{ + myPostWriteCallbacks.remove(functor); +} + +AREXPORT void ArServerHandlerConfig::addConfigUpdatedCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myConfigUpdatedCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myConfigUpdatedCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "%sArServerHandlerConfig::addConfigUpdatedCallback: Invalid position.", + myLogPrefix.c_str()); +} + +AREXPORT void ArServerHandlerConfig::remConfigUpdatedCallback( + ArFunctor *functor) +{ + myConfigUpdatedCallbacks.remove(functor); +} + +AREXPORT bool ArServerHandlerConfig::writeConfig(void) +{ + bool ret; + std::list::iterator fit; + + if (myConfig->getFileName() != NULL && + strlen(myConfig->getFileName()) > 0) + { + // call our pre write callbacks + for (fit = myPreWriteCallbacks.begin(); + fit != myPreWriteCallbacks.end(); + fit++) + { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig::writeConfig() invoking pre-write callback %s", + (%fit)->getName())); + + (*fit)->invoke(); + } + +//ArLog::logBacktrace(ArLog::Normal); + // write it + ArLog::log(ArLog::Normal, + "%sWriting config file %s", + myLogPrefix.c_str(), + myConfig->getFileName()); + ret = myConfig->writeFile(myConfig->getFileName()); + + + // call our post write callbacks + for (fit = myPostWriteCallbacks.begin(); + fit != myPostWriteCallbacks.end(); + fit++) + { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArServerHandlerConfig::writeConfig() invoking post-write callback %s", + (%fit)->getName())); + (*fit)->invoke(); + } + } + else + { + ArLog::log(ArLog::Normal, "%sCannot write config since myConfig has no filename", + myLogPrefix.c_str()); + } + return ret; +} + +AREXPORT bool ArServerHandlerConfig::configUpdated(ArServerClient *client) +{ + ArNetPacket emptyPacket; + + std::list::iterator fit; + + // call our post write callbacks + for (fit = myConfigUpdatedCallbacks.begin(); + fit != myConfigUpdatedCallbacks.end(); + fit++) + { + (*fit)->invoke(); + } + // this one is okay to exclude, because if the central server is + // managing the config then its handling those updates and what not + return myServer->broadcastPacketTcpWithExclusion(&emptyPacket, + "configUpdated", client); +} + +AREXPORT void ArServerHandlerConfig::getConfigSectionFlags( + ArServerClient *client, ArNetPacket *packet) +{ + ArLog::log(ArLog::Normal, + "%sConfig section flags requested.", + myLogPrefix.c_str()); + + ArNetPacket sending; + + std::list *sections = myConfig->getSections(); + std::list::iterator sIt; + sending.byte4ToBuf(sections->size()); + + for (sIt = sections->begin(); sIt != sections->end(); sIt++) + { + + ArConfigSection *section = (*sIt); + if (section == NULL) + { + sending.strToBuf(""); + sending.strToBuf(""); + } + else + { + sending.strToBuf(section->getName()); + sending.strToBuf(section->getFlags()); + } + } + client->sendPacketTcp(&sending); +} + + +AREXPORT void ArServerHandlerConfig::getLastEditablePriority + (ArServerClient *client, + ArNetPacket *packet) +{ + + ArPriority::Priority lastPriority = ArPriority::EXPERT; + if (myPermissionAllowFactory) { + lastPriority = ArPriority::FACTORY; + } + ArLog::log(ArLog::Verbose, + "%sArServerHandlerConfig::getLastEditablePriority returning %s", + myLogPrefix.c_str(), + ArPriority::getPriorityName(lastPriority)); + + ArNetPacket sending; + sending.byteToBuf(lastPriority); + + client->sendPacketTcp(&sending); + +} // end method getLastEditablePriority + +AREXPORT void ArServerHandlerConfig::setRestartSoftwareCB( + ArFunctor *restartServerCB) +{ + myRestartSoftwareCB = restartServerCB; + myRestartSoftwareCBSet = true; +} + +AREXPORT ArFunctor *ArServerHandlerConfig::getRestartSoftwareCB(void) +{ + return myRestartSoftwareCB; +} + +AREXPORT void ArServerHandlerConfig::setRestartHardwareCB(ArFunctor *restartRobotCB) +{ + myRestartHardwareCB = restartRobotCB; + myRestartHardwareCBSet = true; +} + +AREXPORT ArFunctor *ArServerHandlerConfig::getRestartHardwareCB(void) +{ + return myRestartHardwareCB; +} + +/// Changes the variables that prevent changes +AREXPORT void ArServerHandlerConfig::setPreventChanges(bool preventChanges, const char *preventChangesString) +{ + myConfigMutex.lock(); + myPreventChanges = preventChanges; + if (preventChangesString != NULL) + myPreventChangesString = preventChangesString; + else + myPreventChangesString = "Changes prevented for unspecified reason"; + myConfigMutex.unlock(); +} + +AREXPORT void ArServerHandlerConfig::restartIO(const char *reason) +{ + ArLog::log(ArLog::Normal, "%sRequesting restartIO because '%s'", + myLogPrefix.c_str(), reason); + myRestartIOCBList.invoke(); +} + +AREXPORT void ArServerHandlerConfig::restartSoftware(const char *reason) +{ + ArLog::log(ArLog::Normal, "%sAbout to broadcast configCausingRestart (software)", + myLogPrefix.c_str()); + + ArNetPacket sendPacket; + sendPacket.byteToBuf(1); + + myServer->broadcastPacketTcp(&sendPacket, + "configCausingRestart"); + + + myServer->sleepAfterSend(1000); +// ArUtil::sleep(1* 1000); + + // if the functor was set to a value, call it + if (myRestartSoftwareCB != NULL) + { + ArLog::log(ArLog::Normal, "%sRestarting software because '%s'", + myLogPrefix.c_str(), reason); + myRestartSoftwareCB->invoke(); + } + // if it was never set then just exit + else if (!myRestartSoftwareCBSet) + { + ArLog::log(ArLog::Normal, "%sExiting because '%s' but no restartServer functor set", + myLogPrefix.c_str(), reason); + Aria::exit(0); + } + // if it was explicitly set to NULL we do nothing (mostly for + // the central server) +} + +AREXPORT void ArServerHandlerConfig::restartHardware(const char *reason) +{ + ArLog::log(ArLog::Normal, "%sAbout to broadcast configCausingRestart (hardware)", + myLogPrefix.c_str()); + + ArNetPacket sendPacket; + sendPacket.byteToBuf(2); + myServer->broadcastPacketTcp(&sendPacket, + "configCausingRestart"); + + myServer->sleepAfterSend(1000); +// ArUtil::sleep(1* 1000); + + // if the functor was set to a value, call it + if (myRestartHardwareCB != NULL) + { + ArLog::log(ArLog::Normal, "%sRestarting entire robot because '%s'", + myLogPrefix.c_str(), reason); + myRestartHardwareCB->invoke(); + } + // if it was never set then just exit + else if (!myRestartHardwareCBSet) + { + ArLog::log(ArLog::Normal, "%sExiting because '%s' but no restartRobot functor set", + myLogPrefix.c_str(), reason); + Aria::exit(0); + } + // if it was explicitly set to NULL we do nothing (mostly for + // the central server) +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerMap.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerMap.cpp new file mode 100644 index 0000000..37fc8d1 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerMap.cpp @@ -0,0 +1,890 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerMap.h" +#ifdef WIN32 +#include +#include +#endif + +#include "ArMap.h" + +/** + @param server the server to add our data too + + @param arMap If this points to a map file then this will simply + serve up that map file and add in a map changed cb for that map, + otherwise it'll operate via the Aria::getConfig. + + @param dataToSend Which data to send, just the lines, the points, + or both + **/ +AREXPORT ArServerHandlerMap::ArServerHandlerMap(ArServerBase *server, + ArMapInterface *arMap, + DataToSend dataToSend) : + myGetMapIdCB(this, &ArServerHandlerMap::serverGetMapId), + myGetMapNameCB(this, &ArServerHandlerMap::serverGetMapName), + myGetMapCB(this, &ArServerHandlerMap::serverGetMap), + myGetMapBinaryCB(this, &ArServerHandlerMap::serverGetMapBinary), + myGetMapMultiScansCB(this, &ArServerHandlerMap::serverGetMapMultiScans), + myGetMapMaxCategoryCB(this, &ArServerHandlerMap::serverGetMapWithMaxCategory), + myGetGoalsCB(this, &ArServerHandlerMap::serverGetGoals), + myCheckMapCB(this, &ArServerHandlerMap::handleCheckMap), + myProcessFileCB(this, &ArServerHandlerMap::processFile), + myMapChangedCB(this, &ArServerHandlerMap::mapChanged) +{ + myServer = server; + myOwnMap = false; + myMap = arMap; + setDataToSend(dataToSend); + myMapChangedCB.setName("ArServerHandlerMap"); + myProcessFileCB.setName("ArServerHandlerMap"); + if (myMap != NULL) + { + strcpy(myMapFileName, myMap->getFileName()); + myAlreadyLoaded = false; + myOwnMap = false; + myMap->addMapChangedCB(&myMapChangedCB, ArListPos::FIRST); + } + else + { + myMapFileName[0] = '\0'; + Aria::getConfig()->addParam(ArConfigArg("Map", myMapFileName, + "map file to load", + sizeof(myMapFileName)), + "Files", + ArPriority::IMPORTANT); + Aria::getConfig()->setSectionComment("Files", + "The files where important data is stored"); + Aria::getConfig()->addProcessFileCB(&myProcessFileCB, 95); + } + + + if (myServer != NULL) + { + myServer->addData("getMapId", "Gets the ID of the map being used", + &myGetMapIdCB, + "none", + "string: map name (empty string if no maps)", // TODO! + "Map", + "RETURN_SINGLE"); + + myServer->addData("getMapName", "gets the name of the map being used", + &myGetMapNameCB, "none", "string: map name (empty string if no maps)", "Map", "RETURN_SINGLE"); + + // The "getMapBinary" request replaces the old text-based "getMap" request. + myServer->addData("getMapBinary", "gets the map objects as ascii and the data points as binary", + &myGetMapBinaryCB, + "none", + "packets of ': line' for header, followed by packets of ': numPtsInPacket, (:x, :y)*' until numPtsInPacket == 0", + "Map", "RETURN_UNTIL_EMPTY"); + + // + myServer->addData("getMapMultiScans", + "Deprecated; getMapWithMaxCategory is preferred", + &myGetMapMultiScansCB, + "none", + "packets of ': line' for header, followed by packets of ': numPtsInPacket, (:x, :y)*' until numPtsInPacket == 0", + "Map", "RETURN_UNTIL_EMPTY"); + + myServer->addData("getMapWithMaxCategory", + "Requests the map with the specified maximum features; header and info are ascii, data points and lines are binary", + &myGetMapMaxCategoryCB, + "string: category (one of the constants defined in ArMapInterface)", + "packets of ': line' for header, followed by packets of ': numPtsInPacket, (:x, :y)*' until numPtsInPacket == 0", + "Map", "RETURN_UNTIL_EMPTY"); + + + + myServer->addData("getMap", "gets the map as a set of ascii lines", + &myGetMapCB, "none", + "packets of ': line' followed by a packet with an empty string to denote end (if only empty string then no map)", + "Map", "RETURN_UNTIL_EMPTY"); + myServer->addData("mapUpdated", "a single packet is sent to this when the map is updated and this denotes a new getMap and getMapName should be requested", + NULL, "none", "none", + "Map", "RETURN_SINGLE"); + myServer->addData("getGoals", "gets the list of goals", + &myGetGoalsCB, "none", + " string: goal", "Map", "RETURN_SINGLE"); + myServer->addData("goalsUpdated", "a single packet is sent to this when the goals are updated and this denotes a new getGoals should be requested", + NULL, "none", "none", + "Map", "RETURN_SINGLE"); + + myServer->addData("checkMap", + "Requests that the server check whether the map needs to be read", + &myCheckMapCB, + "none", + "none", + "Map", + "RETURN_NONE|IDLE_PACKET"); + + + } +} + +AREXPORT ArServerHandlerMap::~ArServerHandlerMap() +{ + +} + +AREXPORT bool ArServerHandlerMap::loadMap(const char *mapFile) +{ + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::loadMap(%s)", + mapFile); + + ArNetPacket emptyPacket; + if (myMap != NULL) + { + if (myOwnMap) + delete myMap; + myMap = NULL; + } + myMap = new ArMapSimple(NULL); + + myMapName = mapFile; + myOwnMap = true; + bool ret = myMap->readFile(mapFile); + + myServer->broadcastPacketTcp(&emptyPacket, "mapUpdated"); + myServer->broadcastPacketTcp(&emptyPacket, "goalsUpdated"); + + return ret; +} + + +/** + Use the map object given, note that this will not take ownership of the map unless you tell + **/ +AREXPORT void ArServerHandlerMap::useMap(ArMapInterface *mapObj, + bool takeOwnershipOfMap) +{ + ArNetPacket emptyPacket; + if (myMap != NULL) + { + if (myOwnMap) + delete myMap; + myMap = NULL; + } + myMap = mapObj; + myMapName = myMap->getFileName(); + myOwnMap = takeOwnershipOfMap; + myServer->broadcastPacketTcp(&emptyPacket, "mapUpdated"); + myServer->broadcastPacketTcp(&emptyPacket, "goalsUpdated"); +} + +AREXPORT ArMapInterface *ArServerHandlerMap::getMap(void) +{ + return myMap; +} + + +/** @internal */ +AREXPORT void ArServerHandlerMap::serverGetMapId(ArServerClient *client, + ArNetPacket *packet) +{ + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::serverGetMapId() map ID requested by %s", + ((client != NULL) ? client->getIPString() : "NULL")); + + // To force the problem described in Bug 11160 to become reproducible + // instead of highly intermittent, uncomment the following sleep. + // ArUtil::sleep(1000); + + + ArNetPacket sendPacket; + ArMapId mapId; + if (myMap != NULL) + { + bool isSuccess = myMap->getMapId(&mapId); + if (isSuccess) { + } + else { + mapId = ArMapId(); + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::serverGetMapId() error getting map ID from map"); + } + } + else { + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::serverGetMapId() map is NULL"); + + } + + mapId.log("ArServerHandlerMap::serverGetMapId"); + + + ArMapId::toPacket(mapId, + &sendPacket); + + + client->sendPacketTcp(&sendPacket); + + +} // end method serverGetMapId + + +/** @internal */ +AREXPORT void ArServerHandlerMap::serverGetMapName(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendPacket; + if (myMap == NULL) + { + sendPacket.strToBuf(""); + client->sendPacketTcp(&sendPacket); + } + else + { + sendPacket.strToBuf(myMap->getFileName()); + client->sendPacketTcp(&sendPacket); + } +} + +/** @internal */ +AREXPORT void ArServerHandlerMap::writeMapToClient(const char *line, + ArServerClient *client) +{ + ArNetPacket sendPacket; + sendPacket.strToBuf(line); + client->sendPacketTcp(&sendPacket); +} + +/** @internal */ +AREXPORT void ArServerHandlerMap::writePointsToClient( + int pointCount, + std::vector *points, + ArServerClient *client) +{ + ArNetPacket sendPacket; + + // Should never happen... + if (points == NULL) { + // Send 0 points just so the client doesn't hang + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + return; + } + + ArLog::log(ArLog::Verbose, + "ArServerHandlerMap::writePointsToClient() pointCount = %i, vector size = %i", + pointCount, (int) points->size()); + + // Neither should this, but just in case... + if (pointCount > (int) points->size()) { + pointCount = points->size(); + } + + int maxInPacketCount = 1000; // Maximum number of points sent in a packet + int currentCount = 0; // Number put into the current packet + int remainingCount = pointCount; // Total number of points remaining to be sent + bool isStartPacket = true; // Whether a new packet is being started + + int totalCount = 0; + + for (std::vector::iterator pointIt = points->begin(); + pointIt != points->end(); + pointIt++) { + + // Start a new packet if the previous one was sent (or there is no + // previous one) + if (isStartPacket) { + + isStartPacket = false; + + sendPacket.empty(); + currentCount = 0; + + // Leftover points... + if (maxInPacketCount > remainingCount) { + maxInPacketCount = remainingCount; + } + + // The first item in the packet is the number of points contained + sendPacket.byte4ToBuf(maxInPacketCount); + + } // end if starting a new packet + + // Add the current point to the packet (think that the test should + // always be true) + if (currentCount < maxInPacketCount) { + + currentCount++; + remainingCount--; + + sendPacket.byte4ToBuf( + ArMath::roundInt((*pointIt).getX())); + sendPacket.byte4ToBuf( + ArMath::roundInt((*pointIt).getY())); + } + + // If the packet is full, send it and then start a new one + if (currentCount == maxInPacketCount) { + + totalCount += currentCount; + + client->sendPacketTcp(&sendPacket); + //ArUtil::sleep(1); + + isStartPacket = true; + } + + } // end for each point + + ArLog::log(ArLog::Verbose, + "ArServerHandlerMap::writePointsToClient() totalCount = %i", + totalCount); + + // Send 0 points to indicate that all have been sent + if (false) { + sendPacket.empty(); + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + } + +} // end writePointsToClient + +/** @internal */ +AREXPORT void ArServerHandlerMap::writeLinesToClient( + int lineCount, + std::vector *lines, + ArServerClient *client) +{ + ArNetPacket sendPacket; + + // Should never happen... + if (lines == NULL) { + // Send 0 points just so the client doesn't hang + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + return; + } + + ArLog::log(ArLog::Verbose, + "ArServerHandlerMap::writeLinesToClient() pointCount = %i, vector size = %i", + lineCount, (int) lines->size()); + + // Neither should this, but just in case... + if (lineCount > (int) lines->size()) { + lineCount = lines->size(); + } + + int maxInPacketCount = 1000; // Maximum number of points sent in a packet + int currentCount = 0; // Number put into the current packet + int remainingCount = lineCount; // Total number of points remaining to be sent + bool isStartPacket = true; // Whether a new packet is being started + + int totalCount = 0; + + for (std::vector::iterator lineIt = lines->begin(); + lineIt != lines->end(); + lineIt++) + { + + // Start a new packet if the previous one was sent (or there is no + // previous one) + if (isStartPacket) { + + isStartPacket = false; + + sendPacket.empty(); + currentCount = 0; + + // Leftover points... + if (maxInPacketCount > remainingCount) { + maxInPacketCount = remainingCount; + } + + // The first item in the packet is the number of points contained + sendPacket.byte4ToBuf(maxInPacketCount); + + } // end if starting a new packet + + // Add the current point to the packet (think that the test should + // always be true) + if (currentCount < maxInPacketCount) { + + currentCount++; + remainingCount--; + + sendPacket.byte4ToBuf( + ArMath::roundInt((*lineIt).getX1())); + sendPacket.byte4ToBuf( + ArMath::roundInt((*lineIt).getY1())); + sendPacket.byte4ToBuf( + ArMath::roundInt((*lineIt).getX2())); + sendPacket.byte4ToBuf( + ArMath::roundInt((*lineIt).getY2())); + } + + // If the packet is full, send it and then start a new one + if (currentCount == maxInPacketCount) { + + totalCount += currentCount; + + client->sendPacketTcp(&sendPacket); + //ArUtil::sleep(1); + + isStartPacket = true; + } + + } // end for each point + + ArLog::log(ArLog::Verbose, + "ArServerHandlerMap::writePointsToClient() totalCount = %i", + totalCount); + + // Send 0 points to indicate that all have been sent + if (false) { + sendPacket.empty(); + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + } + +} // end writePointsToClient + + +/** @internal */ +AREXPORT void ArServerHandlerMap::serverGetMap(ArServerClient *client, + ArNetPacket *packet) +{ + ArLog::log(ArLog::Verbose, "Starting sending map to client"); + if (myMap == NULL) + { + writeMapToClient("", client); + return; + } + + myMap->lock(); + // This functor is used to send the entire map in text format. + ArFunctor1 *functor = + new ArFunctor2C + (this, + &ArServerHandlerMap::writeMapToClient, + NULL, + client); + // Send the map + myMap->writeToFunctor(functor, ""); + + delete functor; + // Send an empty packet to indicate the end of the map. + writeMapToClient("", client); + + // send an empty packet to say we're done + ArNetPacket emptyPacket; + client->sendPacketTcp(&emptyPacket); + + myMap->unlock(); + ArLog::log(ArLog::Verbose, "Finished sending map to client"); + +} + +AREXPORT void ArServerHandlerMap::serverGetMapBinary(ArServerClient *client, + ArNetPacket *packet) +{ + ArLog::log(ArLog::Verbose, "Starting sending map (binary) to client"); + if (myMap == NULL) + { + writeMapToClient("", client); + return; + } + + myMap->lock(); + // This functor is used to send the map header and objects in text format. + ArFunctor1 *textFunctor = + new ArFunctor2C + (this, + &ArServerHandlerMap::writeMapToClient, + NULL, + client); + + // This functor is used to send the map data lines in binary format (since + // it is faster). + ArFunctor2 *> *linesFunctor = + new ArFunctor3C *, ArServerClient *> + (this, + &ArServerHandlerMap::writeLinesToClient, + 0, + NULL, + client); + + // This functor is used to send the map data points in binary format (since + // it is faster). + ArFunctor2 *> *pointsFunctor = + new ArFunctor3C *, ArServerClient *> + (this, + &ArServerHandlerMap::writePointsToClient, + 0, + NULL, + client); + + // Send the map up to but not including the DATA tag. + myMap->writeObjectsToFunctor(textFunctor, + "", + true, // Only send one scan type + ArMapInterface::MAP_CATEGORY_2D); + + std::list scanTypeList = myMap->getScanTypes(); + + bool isAnyLinesExist = false; + + for (std::list::iterator iter = scanTypeList.begin(); + iter != scanTypeList.end(); + iter++) { + const char *scanType = (*iter).c_str(); + if ((myMap->getLines(scanType) != NULL) && + (!myMap->getLines(scanType)->empty())) { + isAnyLinesExist = true; + break; + } + } // end for each scan type + + // see if we want to send the lines and make sure we have lines + if ((myDataToSend == LINES || myDataToSend == BOTH) && + isAnyLinesExist) + { + writeMapToClient("LINES", client); + + /*** + myMap->writeLinesToFunctor(linesFunctor, + NULL, + ARMAP_SUMMARY_SCAN_TYPE); + + ***/ + for (std::list::iterator iter = scanTypeList.begin(); + iter != scanTypeList.end(); + iter++) { + const char *scanType = (*iter).c_str(); + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::serverGetMapBinary() sending lines for %s", + scanType); + + myMap->writeLinesToFunctor(linesFunctor, scanType, NULL); + + } // end for each scan type + + ArNetPacket sendPacket; + sendPacket.empty(); + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + + /****/ + } + + // Always write the points (even if empty) because this signifies + // the end of the map for the client. + //if (myMap->getPoints()->begin() != myMap->getPoints()->end()) + //{ + writeMapToClient("DATA", client); + // if we want to send points then send 'em + if (myDataToSend == POINTS || myDataToSend == BOTH) + { + // myMap->writePointsToFunctor(pointsFunctor, NULL, sendScanType); + /**/ + for (std::list::iterator iter = scanTypeList.begin(); + iter != scanTypeList.end(); + iter++) { + const char *scanType = (*iter).c_str(); + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::serverGetMapBinary() sending points for %s", + scanType); + myMap->writePointsToFunctor(pointsFunctor, scanType, NULL); + } // end for each scan type + /**/ + ArNetPacket sendPacket; + sendPacket.empty(); + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + } + // if not just say we're done + else + writeMapToClient("", client); + //} + + // send an empty packet to say we're done + ArNetPacket emptyPacket; + client->sendPacketTcp(&emptyPacket); + + myMap->unlock(); + ArLog::log(ArLog::Verbose, "Finished sending map (binary) to client"); + + // delete textFunctor; + + delete textFunctor; + textFunctor = NULL; + delete linesFunctor; + linesFunctor = NULL; + delete pointsFunctor; + pointsFunctor = NULL; + +} + +AREXPORT void ArServerHandlerMap::serverGetMapMultiScans(ArServerClient *client, + ArNetPacket *packet) +{ + + sendMapWithMaxCategory(client, ArMapInterface::MAP_CATEGORY_2D_MULTI_SOURCES); + +} // end method serverGetMapMultiScans + + +/// Requests that the server send the map with the specified maximum features. +AREXPORT void ArServerHandlerMap::serverGetMapWithMaxCategory(ArServerClient *client, + ArNetPacket *packet) +{ + + std::string category = ArMapInterface::MAP_CATEGORY_2D; + if (packet != NULL) { + + char tempBuf[512]; + packet->bufToStr(tempBuf, sizeof(tempBuf)); + category = tempBuf; + + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::serverGetMapWithMaxCategory() %s requested", + tempBuf); + } + + if ((category.empty()) || + (ArUtil::strcasecmp(category, ArMapInterface::MAP_CATEGORY_2D) == 0) ) { + + serverGetMapBinary(client, packet); + + } + else if ((ArUtil::strcasecmp(category, ArMapInterface::MAP_CATEGORY_2D_MULTI_SOURCES) == 0) || + (ArUtil::strcasecmp(category, ArMapInterface::MAP_CATEGORY_2D_EXTENDED) == 0)) { + + sendMapWithMaxCategory(client, category.c_str()); + } + else { // unrecognized request + + ArLog::log(ArLog::Normal, + "ArServerHandlerMap does not recognize request for %s, sending max known map (%s)", + category.c_str(), + ArMapInterface::MAP_CATEGORY_2D_EXTENDED); + + sendMapWithMaxCategory(client, ArMapInterface::MAP_CATEGORY_2D_EXTENDED); + } + +} // end method serverGetMapWithMaxCategory + + +AREXPORT void ArServerHandlerMap::sendMapWithMaxCategory(ArServerClient *client, + const char *maxCategory) +{ + ArLog::LogLevel level = ArLog::Verbose; + + ArLog::log(level, + "Starting sending map (%s) to client", maxCategory); + + if (myMap == NULL) + { + ArLog::log(level, + "ArServerHandlerMap::sendMapWithMaxCategory() NULL map"); + + writeMapToClient("", client); + return; + } + + myMap->lock(); + // This functor is used to send the map header and objects in text format. + ArFunctor1 *textFunctor = + new ArFunctor2C + (this, + &ArServerHandlerMap::writeMapToClient, + NULL, + client); + + // This functor is used to send the map data lines in binary format (since + // it is faster). + ArFunctor2 *> *linesFunctor = + new ArFunctor3C *, ArServerClient *> + (this, + &ArServerHandlerMap::writeLinesToClient, + 0, + NULL, + client); + + // This functor is used to send the map data points in binary format (since + // it is faster). + ArFunctor2 *> *pointsFunctor = + new ArFunctor3C *, ArServerClient *> + (this, + &ArServerHandlerMap::writePointsToClient, + 0, + NULL, + client); + + // Send the map up to but not including the DATA tag. + myMap->writeObjectsToFunctor(textFunctor, + "", + false, + maxCategory); + + std::list scanTypeList = myMap->getScanTypes(); + + if (!scanTypeList.empty()) { + + // see if we want to send the lines and make sure we have lines + if (myDataToSend == LINES || myDataToSend == BOTH) { + + for (std::list::iterator iter = scanTypeList.begin(); + iter != scanTypeList.end(); + iter++) { + const char *scanType = (*iter).c_str(); + if ((myMap->getLines(scanType) != NULL) && + (!myMap->getLines(scanType)->empty())) { + + myMap->writeLinesToFunctor(linesFunctor, + scanType, + textFunctor); + ArNetPacket sendPacket; + sendPacket.empty(); + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + } + } + } + if (myDataToSend == POINTS || myDataToSend == BOTH) { + + // TODO This is different than getMapBinary -- in that DATA is not necessarily + // always sent. Is this going to be a problem? + + for (std::list::iterator iter = scanTypeList.begin(); + iter != scanTypeList.end(); + iter++) { + const char *scanType = (*iter).c_str(); + if ((myMap->getPoints(scanType) != NULL) && + (!myMap->getPoints(scanType)->empty())) { + + myMap->writePointsToFunctor(pointsFunctor, + scanType, + textFunctor); + ArNetPacket sendPacket; + sendPacket.empty(); + sendPacket.byte4ToBuf(0); + client->sendPacketTcp(&sendPacket); + } + } + } + } // end if scan types + + // send an empty packet to say we're done + ArNetPacket emptyPacket; + client->sendPacketTcp(&emptyPacket); + + myMap->unlock(); + ArLog::log(level, "Finished sending map (%s) to client", maxCategory); + + // delete textFunctor; + + delete textFunctor; + textFunctor = NULL; + delete linesFunctor; + linesFunctor = NULL; + delete pointsFunctor; + pointsFunctor = NULL; + +} // end method sendMapWithMaxCategory + + + +/** @internal */ +AREXPORT void ArServerHandlerMap::serverGetGoals(ArServerClient *client, + ArNetPacket *packet) +{ + std::list::iterator objIt; + ArMapObject* obj; + ArPose goal; + ArNetPacket sendPacket; + + for (objIt = myMap->getMapObjects()->begin(); + objIt != myMap->getMapObjects()->end(); + objIt++) + { + // + // Get the forbidden lines and fill the occupancy grid there. + // + obj = (*objIt); + if (obj == NULL) + break; + if (strcasecmp(obj->getType(), "GoalWithHeading") == 0 || + strcasecmp(obj->getType(), "Goal") == 0) + { + sendPacket.strToBuf(obj->getName()); + } + } + client->sendPacketTcp(&sendPacket); +} + +AREXPORT void ArServerHandlerMap::mapChanged(void) +{ + ArNetPacket emptyPacket; + ArLog::log(ArLog::Normal, + "ArServerHandlerMap::mapChanged() orig = %s new = %s", + myMapFileName, + myMap->getFileName()); + + strncpy(myMapFileName, myMap->getFileName(), 512); + myMapFileName[511] = 0; + myServer->broadcastPacketTcp(&emptyPacket, "mapUpdated"); + myServer->broadcastPacketTcp(&emptyPacket, "goalsUpdated"); +} + + +AREXPORT void ArServerHandlerMap::handleCheckMap(ArServerClient *client, + ArNetPacket *packet) +{ + + if (!myOwnMap) { + ArLog::log(ArLog::Normal, "ArServerHandlerMap::handleCheckMap map not owned"); + myMap->refresh(); + + } + else { + ArLog::log(ArLog::Normal, "ArServerHandlerMap::handleCheckMap map is owned, checking config"); + processFile(); + } + +} // end method handleCheckMap + + +/** @internal */ +AREXPORT bool ArServerHandlerMap::processFile(void) +{ + struct stat mapFileStat; + + if (myMapFileName[0] == '\0') + { + ArLog::log(ArLog::Normal, "ArServerHandlerMap::processFile: No map file"); + return true; + } + + if (stat(myMapFileName, &mapFileStat) != 0) + { + ArLog::log(ArLog::Terse, "Cannot stat file"); + return false; + } + // see if we need to load the map file + if (!myAlreadyLoaded || + strcmp(myMapFileName, myLastMapFile) != 0 || + mapFileStat.st_mtime != myLastMapFileStat.st_mtime || + mapFileStat.st_ctime != myLastMapFileStat.st_ctime) + { + myAlreadyLoaded = true; + strcpy(myLastMapFile, myMapFileName); + memcpy(&myLastMapFileStat, &mapFileStat, sizeof(mapFileStat)); + + ArLog::log(ArLog::Terse, "Loading map %s", myMapFileName); + if (!loadMap(myMapFileName)) + { + ArLog::log(ArLog::Terse, "Failed loading map %s", myMapFileName); + return false; + } + ArLog::log(ArLog::Terse, "Loaded map %s", myMapFileName); + return true; + } + myAlreadyLoaded = true; + ArLog::log(ArLog::Normal, "ArServerHandlerMapConfig: File did not need reloading"); + return true; +} + diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerMapping.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerMapping.cpp new file mode 100644 index 0000000..9a2e36a --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerMapping.cpp @@ -0,0 +1,713 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerMapping.h" + +/** + @param server the server to add the handlers too + + @param robot the robot to map from + + @param laser the laser to map with + + @param baseDirectory the directory to put the map file into when + its done, NULL or an empty string means into the working directory + + @param tempDirectory the directory to put the map file into while + its being created, if this is NULL or empty it'll use the base directory + **/ +AREXPORT ArServerHandlerMapping::ArServerHandlerMapping( + ArServerBase *server, ArRobot *robot, ArLaser *laser, + const char *baseDirectory, const char *tempDirectory, + bool useReflectorValues, ArLaser *laser2, + const char *suffix, const char *suffix2, + std::list *extraLasers) : + myTempDirectoryHelper(baseDirectory, tempDirectory), + myZipFile(NULL), + mySnapshotZipFile(NULL), + myMappingStartCB(this, &ArServerHandlerMapping::serverMappingStart), + myMappingEndCB(this, &ArServerHandlerMapping::serverMappingEnd), + myMappingStatusCB(this, &ArServerHandlerMapping::serverMappingStatus), + myPacketHandlerCB(this, &ArServerHandlerMapping::packetHandler), + myLoopStartCB(this, &ArServerHandlerMapping::simpleLoopStart), + myLoopEndCB(this, &ArServerHandlerMapping::simpleLoopEnd) +{ + myServer = server; + myRobot = robot; + myLaser = laser; + myUseReflectorValues = useReflectorValues; + + myLaser2 = laser2; + if (suffix != NULL) + mySuffix = suffix; + if (suffix2 != NULL) + mySuffix2 = suffix2; + + myExtraLasers = extraLasers; + + if (myServer != NULL) + { + myServer->addData("mappingStart", "Starts making a map", + &myMappingStartCB, "string: name of map file", + "byte: 0 (started mapping), 1 (already mapping), 2 (could not start map)", + "Mapping", "RETURN_SINGLE"); + myServer->addData("mappingEnd", "Stops making a map", + &myMappingEndCB, "none", + "byte: 0 (ended mapping), 1 (no mapping to end), 2 (could not move temporary file to permanent file)", + "Mapping", "RETURN_SINGLE"); + myServer->addData("mappingStatus", "Gets the status of mapping", + &myMappingStatusCB, "none", + "string: mapName if mapping, empty string if not mapping", + "RobotInfo", "RETURN_SINGLE"); + myServer->addData("mappingStatusBroadcast", "Gets the status of mapping, also sent when mapping starts or ends (this is a new/better mappingStatus)", + &myMappingStatusCB, "none", + "string: mapName if mapping, empty string if not mapping", + "RobotInfo", "RETURN_SINGLE"); + } + myLaserLogger = NULL; + myLaserLogger2 = NULL; + myMapName = ""; + myFileName = ""; + myHandlerCommands = NULL; + + myPacketHandlerCB.setName("ArServerHandlerMapping"); + if (myRobot != NULL) + myRobot->addPacketHandler(&myPacketHandlerCB); +} + +AREXPORT ArServerHandlerMapping::~ArServerHandlerMapping() +{ + if (myLaserLogger != NULL) + { + delete myLaserLogger; + myLaserLogger = NULL; + } + + if (myLaserLogger2 != NULL) + { + delete myLaserLogger; + myLaserLogger = NULL; + } +} + +AREXPORT void ArServerHandlerMapping::serverMappingStart( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + char buf[512]; + packet->bufToStr(buf, sizeof(buf)); + + // see if we're already mapping + if (myLaserLogger != NULL) + { + ArLog::log(ArLog::Normal, "MappingStart: Map already being made"); + sendPacket.byteToBuf(1); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + return; + } + + + myRobot->lock(); + + // lower case everything (to avoid case conflicts) + ArUtil::lower(buf, buf, sizeof(buf)); + myMapName = buf; + + myFileName = myMapName; + if (!mySuffix.empty()) + myFileName += mySuffix; + if (strstr(myMapName.c_str(), ".2d") == NULL) + myFileName += ".2d"; + + if (myLaser2 != NULL) + { + myFileName2 = myMapName; + if (!mySuffix2.empty()) + myFileName2 += mySuffix2; + if (strstr(myMapName.c_str(), ".2d") == NULL) + myFileName2 += ".2d"; + } + + + // call our mapping started callbacks + std::list::iterator fit; + ArFunctor *functor; + for (fit = myMappingStartCallbacks.begin(); + fit != myMappingStartCallbacks.end(); + fit++) + { + functor = (*fit); + functor->invoke(); + } + + + myLaserLogger = new ArLaserLogger(myRobot, myLaser, 300, 25, myFileName.c_str(), + true, Aria::getJoyHandler(), + myTempDirectoryHelper.getTempDirectory(), + myUseReflectorValues, + Aria::getRobotJoyHandler(), + &myLocationDataMap, + myExtraLasers); + if (myLaserLogger == NULL) + { + ArLog::log(ArLog::Normal, "MappingStart: myLaserLogger == NULL"); + sendPacket.byteToBuf(2); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + myMapName = ""; + myFileName = ""; + myRobot->unlock(); + return; + } + if (!myLaserLogger->wasFileOpenedSuccessfully()) + { + ArLog::log(ArLog::Normal, "MappingStart: Cannot open map file %s", + myFileName.c_str()); + sendPacket.byteToBuf(2); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + myMapName = ""; + myFileName = ""; + delete myLaserLogger; + myLaserLogger = NULL; + myRobot->unlock(); + return; + } + + if (myLaser2 != NULL) + { + myLaserLogger2 = new ArLaserLogger(myRobot, myLaser2, 300, 25, + myFileName2.c_str(), + true, Aria::getJoyHandler(), + myTempDirectoryHelper.getTempDirectory(), + myUseReflectorValues, + Aria::getRobotJoyHandler(), + &myLocationDataMap); + } + + // toss our strings for the start on there + std::list::iterator it; + + for (it = myStringsForStartOfLog.begin(); + it != myStringsForStartOfLog.end(); + it++) + { + myLaserLogger->addInfoToLogPlain((*it).c_str()); + if (myLaserLogger2 != NULL) + myLaserLogger2->addInfoToLogPlain((*it).c_str()); + } + + // call our mapping started callbacks + for (fit = myMappingBegunCallbacks.begin(); + fit != myMappingBegunCallbacks.end(); + fit++) + { + functor = (*fit); + functor->invoke(); + } + + + myRobot->unlock(); + + + ArLog::log(ArLog::Normal, "MappingStart: Map %s started", + myMapName.c_str()); + sendPacket.byteToBuf(0); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + + ArNetPacket broadcastPacket; + broadcastPacket.strToBuf(myFileName.c_str()); + myServer->broadcastPacketTcp(&broadcastPacket, "mappingStatusBroadcast"); +} + + +AREXPORT void ArServerHandlerMapping::serverMappingEnd( + ArServerClient *client, ArNetPacket *packet) +{ + std::list::iterator fit; + + ArNetPacket sendPacket; + if (myLaserLogger == NULL) + { + ArLog::log(ArLog::Normal, "MappingEnd: No map being made"); + sendPacket.byteToBuf(1); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + return; + } + + myRobot->lock(); + + delete myLaserLogger; + myLaserLogger = NULL; + + bool haveFile2 = false; + + if (myLaserLogger2 != NULL) + { + haveFile2 = true; + delete myLaserLogger2; + myLaserLogger2 = NULL; + } + + + std::list sourceFileNameList; + sourceFileNameList.push_back(myFileName); + if (haveFile2) { + sourceFileNameList.push_back(myFileName2); + } + + bool isSuccess = myTempDirectoryHelper.moveFilesToBaseDirectory + (sourceFileNameList); + + if (isSuccess) { + sendPacket.uByte2ToBuf(0); + } + else { + sendPacket.uByte2ToBuf(2); + } + + + ArLog::log(ArLog::Normal, "MappingEnd: Stopped mapping %s", + myFileName.c_str()); + + // call our mapping end callbacks + for (fit = myMappingEndCallbacks.begin(); + fit != myMappingEndCallbacks.end(); + fit++) + (*fit)->invoke(); + + + // Call the mapping ended callbacks + for (fit = myMappingEndedCallbacks.begin(); + fit != myMappingEndedCallbacks.end(); + fit++) { + (*fit)->invoke(); + } + + // Clear the internal file names + myMapName = ""; + myFileName = ""; + + myRobot->unlock(); + if (client != NULL) + client->sendPacketTcp(&sendPacket); + + ArNetPacket broadcastPacket; + broadcastPacket.strToBuf(myFileName.c_str()); + myServer->broadcastPacketTcp(&broadcastPacket, "mappingStatusBroadcast"); +} + + +AREXPORT void ArServerHandlerMapping::serverMappingStatus( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + sendPacket.strToBuf(myMapName.c_str()); + client->sendPacketTcp(&sendPacket); +} + +AREXPORT void ArServerHandlerMapping::addStringForStartOfLogs( + const char *str, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myStringsForStartOfLog.push_front(str); + else if (position == ArListPos::LAST) + myStringsForStartOfLog.push_back(str); + else + ArLog::log(ArLog::Terse, "ArServerHandlerMapping::addStringForStartOfLogs: Invalid position."); +} + +AREXPORT void ArServerHandlerMapping::remStringForStartOfLogs( + const char *str) +{ + myStringsForStartOfLog.remove(str); +} + +AREXPORT void ArServerHandlerMapping::addMappingStartCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myMappingStartCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myMappingStartCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerHandlerMapping::addMappingStartCallback: Invalid position."); +} + +AREXPORT void ArServerHandlerMapping::remMappingStartCallback( + ArFunctor *functor) +{ + myMappingStartCallbacks.remove(functor); +} + +AREXPORT void ArServerHandlerMapping::addMappingBegunCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myMappingBegunCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myMappingBegunCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerHandlerMapping::addMappingBegunCallback: Invalid position."); +} + +AREXPORT void ArServerHandlerMapping::remMappingBegunCallback( + ArFunctor *functor) +{ + myMappingBegunCallbacks.remove(functor); +} + +AREXPORT void ArServerHandlerMapping::addMappingEndCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myMappingEndCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myMappingEndCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerHandlerMapping::addMappingEndCallback: Invalid position."); +} + +AREXPORT void ArServerHandlerMapping::remMappingEndCallback( + ArFunctor *functor) +{ + myMappingEndCallbacks.remove(functor); +} + + +AREXPORT void ArServerHandlerMapping::addMappingEndedCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myMappingEndedCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myMappingEndedCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArServerHandlerMapping::addMappingEndedCallback: Invalid position."); +} + +AREXPORT void ArServerHandlerMapping::remMappingEndedCallback( + ArFunctor *functor) +{ + myMappingEndedCallbacks.remove(functor); +} + + + + +AREXPORT void ArServerHandlerMapping::addPreMoveCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + myTempDirectoryHelper.addPreMoveCallback(functor, position); +} + +AREXPORT void ArServerHandlerMapping::remPreMoveCallback( + ArFunctor *functor) +{ + myTempDirectoryHelper.remPreMoveCallback(functor); +} + +AREXPORT void ArServerHandlerMapping::addPostMoveCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + myTempDirectoryHelper.addPostMoveCallback(functor, position); +} + +AREXPORT void ArServerHandlerMapping::remPostMoveCallback( + ArFunctor *functor) +{ + myTempDirectoryHelper.remPostMoveCallback(functor); +} + + + +AREXPORT void ArServerHandlerMapping::addSimpleCommands( + ArServerHandlerCommands *handlerCommands) +{ + myHandlerCommands = handlerCommands; + myHandlerCommands->addStringCommand( + "mappingLoopStart", + "If mapping is happening it starts a new loop with the tag of the given string", + &myLoopStartCB); + + myHandlerCommands->addStringCommand( + "mappingLoopEnd", + "If mapping is happening it ends a loop with the tag of the given string", + &myLoopEndCB); +} + +AREXPORT void ArServerHandlerMapping::simpleLoopStart(ArArgumentBuilder *arg) +{ + if (myLaserLogger != NULL) + myLaserLogger->addTagToLog("loop start %s", arg->getFullString()); + if (myLaserLogger2 != NULL) + myLaserLogger2->addTagToLog("loop start %s", arg->getFullString()); +} + +AREXPORT void ArServerHandlerMapping::simpleLoopEnd(ArArgumentBuilder *arg) +{ + if (myLaserLogger != NULL) + myLaserLogger->addTagToLog("loop stop %s", arg->getFullString()); + if (myLaserLogger2 != NULL) + myLaserLogger2->addTagToLog("loop stop %s", arg->getFullString()); +} + +/// The packet handler for starting/stopping scans from the lcd +AREXPORT bool ArServerHandlerMapping::packetHandler(ArRobotPacket *packet) +{ + // we return these as processed to help out the ArLaserLogger class + if (packet->getID() == 0x96) + return true; + + if (packet->getID() != 0x97) + return false; + + myRobot->unlock(); + char argument = packet->bufToByte(); + if (argument == 1) + { + // see if we're already mapping + if (myLaserLogger != NULL) + { + ArLog::log(ArLog::Normal, + "ArServerHandlerMapping::packetHandler: Start scan requested when already mapping"); + } + else + { + // build a name + time_t now; + struct tm nowStruct; + now = time(NULL); + char buf[1024]; + + if (ArUtil::localtime(&now, &nowStruct)) + { + sprintf(buf, "%02d%02d%02d_%02d%02d%02d", + (nowStruct.tm_year%100), nowStruct.tm_mon+1, nowStruct.tm_mday, + nowStruct.tm_hour, nowStruct.tm_min, nowStruct.tm_sec); + } + else + { + ArLog::log(ArLog::Normal, + "ArServerHandlerMapping::packetHandler: Could not make good packet name (error getting time), so just naming it \"lcd\""); + sprintf(buf, "lcd"); + } + + ArLog::log(ArLog::Normal, "Starting scan '%s' from LCD", buf); + ArNetPacket fakePacket; + fakePacket.strToBuf(buf); + fakePacket.finalizePacket(); + serverMappingStart(NULL, &fakePacket); + } + } + else if (argument == 0) + { + if (myLaserLogger == NULL) + { + ArLog::log(ArLog::Normal, + "ArServerHandlerMapping::packetHandler: Stop scan requested when not mapping"); + } + else + { + ArLog::log(ArLog::Normal, "Stopping scan from LCD"); + serverMappingEnd(NULL, NULL); + } + } + else + { + ArLog::log(ArLog::Normal, "ArServerHandlerMapping::packetHandler: Unknown scan argument %d", argument); + } + myRobot->lock(); + return true; +} + +AREXPORT void ArServerHandlerMapping::addTagToLog(const char *str) +{ + if (myLaserLogger != NULL) + myLaserLogger->addTagToLogPlain(str); + if (myLaserLogger2 != NULL) + myLaserLogger2->addTagToLogPlain(str); +} + +AREXPORT void ArServerHandlerMapping::addInfoToLog(const char *str) +{ + if (myLaserLogger != NULL) + myLaserLogger->addInfoToLogPlain(str); + if (myLaserLogger2 != NULL) + myLaserLogger2->addInfoToLogPlain(str); +} + +AREXPORT const char * ArServerHandlerMapping::getFileName(void) +{ + return myFileName.c_str(); +} + +AREXPORT const char * ArServerHandlerMapping::getMapName(void) +{ + return myMapName.c_str(); +} + +AREXPORT bool ArServerHandlerMapping::isMapping(void) +{ + if (myLaserLogger != NULL) + return true; + else + return false; +} + +AREXPORT bool ArServerHandlerMapping::addLocationData( + const char *name, + ArRetFunctor3 *functor) +{ + if (myLocationDataMap.find(name) != myLocationDataMap.end()) + { + ArLog::log(ArLog::Normal, "ArServerHandlerMapping::addLocationData: Already have location data for %s", name); + return false; + } + ArLog::log(ArLog::Normal, "ArServerHandlerMapping: Added location data %s", + name); + myLocationDataMap[name] = functor; + return true; +} + + /// Get location data map (mostly for internal things) +AREXPORT const std::map *, + ArStrCaseCmpOp> * +ArServerHandlerMapping::getLocationDataMap(void) +{ + return &myLocationDataMap; +} + + +AREXPORT void ArServerHandlerMapping::addStringsForStartOfLogToMap( + ArMap *arMap) +{ + std::list::iterator it; + std::string str; + ArArgumentBuilder *builder; + + for (it = myStringsForStartOfLog.begin(); + it != myStringsForStartOfLog.end(); + it++) + { + str = (*it); + builder = new ArArgumentBuilder; + builder->add(str.c_str()); + if (strcasecmp(builder->getArg(0), "LogInfoStrip:") == 0) + { + builder->removeArg(0, true); + printf("lis %s\n", builder->getFullString()); + + } + std::list infoNames = arMap->getInfoNames(); + for (std::list::iterator iter = infoNames.begin(); + iter != infoNames.end(); + iter++) + { + const char *curName = (*iter).c_str(); + + if (strcasecmp(builder->getArg(0), curName) == 0) + { + builder->removeArg(0, true); + arMap->getInfo(curName)->push_back(builder); + builder = NULL; + break; + } + } + if (builder != NULL) + delete builder; + } +} + + +/** + * When the optional zip file feature is used, this method should be called with + * a valid file in the context of a "mapping start" callback. The file should + * have been opened in ZIP_MODE, and should remain open until after all of the + * "mapping end" callbacks have completed. The file should be closed and this + * method should be called with a NULL pointer within the context of a "mapping + * ended" callback. + * + * It is the application's responsibility to create and manage the zip file. + * Not all applications will use this feature. + * + * @param zipFile a pointer to the optional ArZippable instance in which + * scan results can be stored +**/ +AREXPORT void ArServerHandlerMapping::setZipFile(ArZippable *zipFile) +{ + myZipFile = zipFile; +} + +/** + * If snapshots are enabled when the optional zip file feature is used, this + * method should be called with a valid file in the context of a "mapping start" + * callback. The file should have been opened in ZIP_MODE, and should remain + * open until after all of the "mapping end" callbacks have completed. The file + * should be closed and this method should be called with a NULL pointer within + * the context of a "mapping ended" callback. The file should then be added to + * the main mapping zip file. + * + * It is the application's responsibility to create and manage the zip file. + * Not all applications will use this feature. + * + * @param zipFile a pointer to the optional ArZippable instance in which + * snapshots can be stored +**/ +AREXPORT void ArServerHandlerMapping::setSnapshotZipFile(ArZippable *zipFile) +{ + mySnapshotZipFile = zipFile; +} + +/** + * This method returns a pointer to the optional zip file associated with the + * mapping session. The file should be opened before the "mapping begun" + * callbacks are invoked, and should be closed after the "mapping end" callbacks are + * invoked. + * + * It is the application's responsibility to create and manage the zip file. + * Not all applications will use this feature. + * + * @param zipFile a pointer to the optional ArZippable instance in which + * scan results can be stored; NULL if there is no active zip file +**/ +AREXPORT ArZippable *ArServerHandlerMapping::getZipFile() +{ + return myZipFile; + +} // end method getZipFile + +/** + * This method returns a pointer to a second optional zip file associated with the + * mapping session. It contains the snapshot images, and is eventually added to the + * main mapping zip file. The file should be opened before the "mapping begun" + * callbacks are invoked, and should be closed after the "mapping end" callbacks are + * invoked. + * + * It is the application's responsibility to create and manage the zip file. + * Not all applications will use this feature. + * + * @param zipFile a pointer to the optional ArZippable instance in which + * scan results can be stored; NULL if there is no active zip file +**/ +AREXPORT ArZippable *ArServerHandlerMapping::getSnapshotZipFile() +{ + return mySnapshotZipFile; + +} // end method getZipFile + + +AREXPORT void ArServerHandlerMapping::forceReading(void) +{ + if (myLaserLogger != NULL) + myLaserLogger->takeReading(); + if (myLaserLogger2 != NULL) + myLaserLogger2->takeReading(); +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerHandlerPopup.cpp b/Legacy/Aria/ArNetworking/src/ArServerHandlerPopup.cpp new file mode 100644 index 0000000..bb71666 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerHandlerPopup.cpp @@ -0,0 +1,413 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerHandlerPopup.h" + +ArServerHandlerPopup::PopupData::PopupData( + ArServerHandlerPopupInfo *popupInfo, ArTypes::Byte4 id, + ArFunctor2 *callback) +{ + myPopupInfo = new ArServerHandlerPopupInfo(*popupInfo); + myID = id; + myCallback = callback; + myStarted.setToNow(); +} + +ArServerHandlerPopup::PopupData::~PopupData() +{ + delete myPopupInfo; +} + +AREXPORT ArServerHandlerPopup::ArServerHandlerPopup(ArServerBase *server) : + myNetPopupClickedCB(this, &ArServerHandlerPopup::netPopupClicked), + myNetPopupListCB(this, &ArServerHandlerPopup::netPopupList), + myServerCycleCB(this, &ArServerHandlerPopup::serverCycleCallback) +{ + myDataMutex.setLogName("ArServerHandlerPopup::myDataMutex"); + myServer = server; + myServer->addData( + "popupCreate", + "Tells the gui to create a new popup", + NULL, + "none (you can't send this command to the server)", + "byte4: id of this particular popup; string: ignoreIdentifier; string: title; string: message; byte: popupType (0 = NoIcon, 1 = Information, 2 = Warning, 3 = Critical, 4 = Question); string: button0Label; string: button1Label; string: button2Label; byte: defaultButton; byte: escapeButton", + "PopupGui", "RETURN_SINGLE"); + myServer->addData( + "popupClose", + "Closes a popup that was created", + NULL, + "none (you can't send this command to the server)", + "byte4: id of the popup to close; string: string to display", + "PopupGui", "RETURN_SINGLE"); + myServer->addData( + "popupClicked", + "Returns the clicked data of a popup ", + &myNetPopupClickedCB, + "byte4: id of the popup that was clicked; byte: buttonClicked", + "no response", + "PopupGui", "RETURN_NONE"); + myServer->addData( + "popupList", + "Resends all the popupCreates to this client that asked for this", + &myNetPopupListCB, + "none", + "technically none, but it resends all the popupCreate events that are active", + "PopupGui", "RETURN_NONE"); + myServer->addCycleCallback(&myServerCycleCB); + myLastTimeCheck.setToNow(); + myLastID = 0; + +} + + +AREXPORT ArServerHandlerPopup::~ArServerHandlerPopup() +{ + +} + + +/** + Creates a popup, for information about whats in the popup see + ArServerHandlerPopupInfo... this just describes what happens with + the popup... + + So you pass in a popupInfo for the popup you want and a functor to + call when buttons in the popup are pushed, this returns an id for + that popup, which you can use to cancel the popup and so you know + which popup this is.... the callback (if there is one) will be + called when the popup has a button pushed with the id and the + number of the button or -1 if the popup timed out or -2 if it was + canceled. The popup has a timeout, so that if no clients are + connected watching for popups or if no one is paying attention that + things can move on easily. + + @param popupInfo the information that describes the popup... this + class makes a copy of the information so you can do whatever you + want with the information after you've called this function (ie + change the button and call it again or whatever) + + @param callback The class will call this function when one of the + buttons is pressed in the popup on one of the clients, the callback + will be called with the long int being the ID, and the int being + the button that is pushed (or -1 if the timeout happened or -2 if + it was closed) + **/ +AREXPORT ArTypes::Byte4 ArServerHandlerPopup::createPopup( + ArServerHandlerPopupInfo *popupInfo, + ArFunctor2 *callback) +{ + PopupData *popupData; + ArTypes::Byte4 retID; + + myDataMutex.lock(); + // first find a good id + myLastID++; + if (myLastID < 0) + myLastID = 1; + //printf("Checking if id %u is good\n", myLastID); + while (myMap.find(myLastID) != myMap.end()) + { + myLastID++; + if (myLastID < 0) + myLastID = 1; + } + //printf("Got id %d\n", myLastID); + popupData = new PopupData(popupInfo, myLastID, callback); + myMap[myLastID] = popupData; + + ArNetPacket sendingPacket; + buildPacket(&sendingPacket, popupData); + + /* + printf("!!! %s %s %s\n", + popupData->myPopupInfo->getButton0Label(), + popupData->myPopupInfo->getButton1Label(), + popupData->myPopupInfo->getButton2Label()); + */ + myServer->broadcastPacketTcp(&sendingPacket, "popupCreate"); + retID = myLastID; + myDataMutex.unlock(); + return retID; +} + +void ArServerHandlerPopup::buildPacket(ArNetPacket *sendingPacket, + PopupData *popupData) +{ + sendingPacket->byte4ToBuf(popupData->myID); + sendingPacket->strToBuf(popupData->myPopupInfo->getIgnoreIdentifier()); + sendingPacket->strToBuf(popupData->myPopupInfo->getTitle()); + sendingPacket->strToBuf(popupData->myPopupInfo->getMessage()); + sendingPacket->byteToBuf((ArTypes::Byte) + popupData->myPopupInfo->getPopupType()); + sendingPacket->strToBuf(popupData->myPopupInfo->getButton0Label()); + sendingPacket->strToBuf(popupData->myPopupInfo->getButton1Label()); + sendingPacket->strToBuf(popupData->myPopupInfo->getButton2Label()); + sendingPacket->byteToBuf(popupData->myPopupInfo->getDefaultButtonNumber()); + sendingPacket->byteToBuf(popupData->myPopupInfo->getEscapeButtonNumber()); +} + +AREXPORT void ArServerHandlerPopup::closePopup(ArTypes::Byte4 id, + const char *closeMessage) +{ + ArNetPacket sendingPacket; + PopupData *popupData; + std::map::iterator it; + + myDataMutex.lock(); + if ((it = myMap.find(id)) == myMap.end()) + { + ArLog::log(ArLog::Verbose, + "Cannot close popup %u as it doesn't exist (anymore at least)", + id); + myDataMutex.unlock(); + } + else + { + popupData = (*it).second; + sendingPacket.byte4ToBuf(id); + sendingPacket.strToBuf(closeMessage); + myMap.erase(id); + myDataMutex.unlock(); + delete popupData; + if (popupData->myCallback != NULL) + popupData->myCallback->invoke(popupData->myID, -2); + myServer->broadcastPacketTcp(&sendingPacket, "popupClose"); + } +} + +AREXPORT void ArServerHandlerPopup::netPopupClicked(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendingPacket; + PopupData *popupData; + std::map::iterator it; + + ArTypes::Byte4 id; + ArTypes::Byte button; + + id = packet->bufToByte4(); + button = packet->bufToByte(); + + myDataMutex.lock(); + if ((it = myMap.find(id)) == myMap.end()) + { + ArLog::log(ArLog::Verbose, + "Cannot close popup %u for client %s as it doesn't exist (anymore at least)", + id, client->getIPString()); + myDataMutex.unlock(); + } + else + { + popupData = (*it).second; + sendingPacket.byte4ToBuf(id); + if (button == 0) + sendingPacket.strToBuf(popupData->myPopupInfo->getButton0Pressed()); + else if (button == 1) + sendingPacket.strToBuf(popupData->myPopupInfo->getButton1Pressed()); + else if (button == 2) + sendingPacket.strToBuf(popupData->myPopupInfo->getButton2Pressed()); + else + sendingPacket.strToBuf("Popup closed because of odd click"); + myMap.erase(id); + myDataMutex.unlock(); + if (popupData->myCallback != NULL) + popupData->myCallback->invoke(popupData->myID, button); + delete popupData; + myServer->broadcastPacketTcp(&sendingPacket, "popupClose"); + } + + +} + +AREXPORT void ArServerHandlerPopup::netPopupList(ArServerClient *client, + ArNetPacket *packet) +{ + ArLog::log(ArLog::Normal, "Sending popup list"); + + std::map::iterator it; + ArNetPacket sendingPacket; + PopupData *popupData; + + myDataMutex.lock(); + for (it = myMap.begin(); it != myMap.end(); it++) + { + popupData = (*it).second; + sendingPacket.empty(); + + ArLog::log(ArLog::Normal, "Sending popup %d", popupData->myID); + buildPacket(&sendingPacket, popupData); + sendingPacket.setCommand(myServer->findCommandFromName("popupCreate")); + + client->sendPacketTcp(&sendingPacket); + } + + sendingPacket.empty(); + client->sendPacketTcp(&sendingPacket); + ArLog::log(ArLog::Normal, "Sent popups"); + myDataMutex.unlock(); +} + +AREXPORT void ArServerHandlerPopup::serverCycleCallback(void) +{ + std::map::iterator it; + ArNetPacket sendingPacket; + PopupData *popupData; + int timeout; + + std::list doneIDs; + std::list donePopups; + myDataMutex.lock(); + // only check it if we haven't checked it lately + if (myLastTimeCheck.mSecSince() > 1000) + { + myLastTimeCheck.setToNow(); + for (it = myMap.begin(); it != myMap.end(); it++) + { + popupData = (*it).second; + if ((timeout = popupData->myPopupInfo->getTimeout()) > 0 && + popupData->myStarted.secSince() >= timeout) + { + sendingPacket.empty(); + sendingPacket.byte4ToBuf((*it).first); + sendingPacket.strToBuf(popupData->myPopupInfo->getTimeoutString()); + myServer->broadcastPacketTcp(&sendingPacket, "popupClose"); + doneIDs.push_back((*it).first); + donePopups.push_back(popupData); + + } + } + } + while (doneIDs.begin() != doneIDs.end()) + { + myMap.erase((*doneIDs.begin())); + doneIDs.pop_front(); + } + myDataMutex.unlock(); + + std::list::iterator donePopupIt; + while ((donePopupIt = donePopups.begin()) != donePopups.end()) + { + popupData = (*donePopupIt); + if (popupData->myCallback != NULL) + popupData->myCallback->invoke(popupData->myID, -1); + delete popupData; + donePopups.pop_front(); + } +} + + +AREXPORT ArServerHandlerPopupInfo::ArServerHandlerPopupInfo( + const char *ignoreIdentifier, const char *title, const char *message, + ArServerHandlerPopup::PopupType popupType, + ArTypes::Byte defaultButtonNumber, ArTypes::Byte escapeButtonNumber, + int timeoutInSeconds, const char *timeoutString, + const char *button0Label, const char *button0Pressed, + const char *button1Label, const char *button1Pressed, + const char *button2Label, const char *button2Pressed) +{ + if (ignoreIdentifier != NULL) + myIgnoreIdentifier = ignoreIdentifier; + else + myIgnoreIdentifier = ""; + if (title != NULL) + myTitle = title; + else + myTitle = ""; + if (message != NULL) + myMessage = message; + else + myMessage = ""; + myPopupType = popupType; + myDefaultButtonNumber = defaultButtonNumber; + myEscapeButtonNumber = escapeButtonNumber; + myTimeout = timeoutInSeconds; + if (timeoutString != NULL) + myTimeoutString = timeoutString; + else + myTimeoutString = ""; + + if (button0Label != NULL) + myButton0Label = button0Label; + else + myButton0Label = ""; + if (button0Pressed != NULL) + myButton0Pressed = button0Pressed; + else + myButton0Pressed = ""; + if (button1Label != NULL) + myButton1Label = button1Label; + else + myButton1Label = ""; + if (button1Pressed != NULL) + myButton1Pressed = button1Pressed; + else + myButton1Pressed = ""; + if (button2Label != NULL) + myButton2Label = button2Label; + else + myButton2Label = ""; + if (button2Pressed != NULL) + myButton2Pressed = button2Pressed; + else + myButton2Pressed = ""; + + /* + printf("@@ 0l %s 0p %s 1l %s 1p %s 2l %s 2p%s\n", + myButton0Label.c_str(), myButton0Pressed.c_str(), + myButton1Label.c_str(), myButton1Pressed.c_str(), + myButton2Label.c_str(), myButton2Pressed.c_str()); + */ +} + +AREXPORT ArServerHandlerPopupInfo::~ArServerHandlerPopupInfo() +{ + +} + +AREXPORT ArServerHandlerPopupInfo::ArServerHandlerPopupInfo( + const ArServerHandlerPopupInfo &popupInfo) +{ + myIgnoreIdentifier = popupInfo.myIgnoreIdentifier; + myTitle = popupInfo.myTitle; + myMessage = popupInfo.myMessage; + myPopupType = popupInfo.myPopupType; + myDefaultButtonNumber = popupInfo.myDefaultButtonNumber; + myEscapeButtonNumber = popupInfo.myEscapeButtonNumber; + myTimeout = popupInfo.myTimeout; + myTimeoutString = popupInfo.myTimeoutString; + myButton0Label = popupInfo.myButton0Label; + myButton0Pressed = popupInfo.myButton0Pressed; + myButton1Label = popupInfo.myButton1Label; + myButton1Pressed = popupInfo.myButton1Pressed; + myButton2Label = popupInfo.myButton2Label; + myButton2Pressed = popupInfo.myButton2Pressed; + /* + printf("## 0l %s 0p %s 1l %s 1p %s 2l %s 2p%s\n", + myButton0Label.c_str(), myButton0Pressed.c_str(), + myButton1Label.c_str(), myButton1Pressed.c_str(), + myButton2Label.c_str(), myButton2Pressed.c_str()); + */ +} + + +AREXPORT ArServerHandlerPopupInfo &ArServerHandlerPopupInfo::operator=( + const ArServerHandlerPopupInfo &popupInfo) +{ + if (this != &popupInfo) + { + myIgnoreIdentifier = popupInfo.myIgnoreIdentifier; + myTitle = popupInfo.myTitle; + myMessage = popupInfo.myMessage; + myPopupType = popupInfo.myPopupType; + myDefaultButtonNumber = popupInfo.myDefaultButtonNumber; + myEscapeButtonNumber = popupInfo.myEscapeButtonNumber; + myTimeout = popupInfo.myTimeout; + myTimeoutString = popupInfo.myTimeoutString; + myButton0Label = popupInfo.myButton0Label; + myButton0Pressed = popupInfo.myButton0Pressed; + myButton1Label = popupInfo.myButton1Label; + myButton1Pressed = popupInfo.myButton1Pressed; + myButton2Label = popupInfo.myButton2Label; + myButton2Pressed = popupInfo.myButton2Pressed; + } + return *this; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerInfoDrawings.cpp b/Legacy/Aria/ArNetworking/src/ArServerInfoDrawings.cpp new file mode 100644 index 0000000..6ad8175 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerInfoDrawings.cpp @@ -0,0 +1,265 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerInfoDrawings.h" + +AREXPORT ArServerInfoDrawings::ArServerInfoDrawings(ArServerBase *server) : + myNetListDrawingsCB(this, &ArServerInfoDrawings::netListDrawings), + myNetGetDrawingListCB(this, &ArServerInfoDrawings::netGetDrawingList) +{ + myServer = server; + + if (myServer != NULL) + { + myServer->addData("listDrawings", + "Deprecated; use getDrawingList instead. Gets a list of things that can be drawn", + &myNetListDrawingsCB, + "none", + "byte4: numDrawings, string: name, string: shape, byte4: primaryColor(0RGB), byte4: size, byte4: layer, byte4: defaultRefreshTime(0 == don't request refresh), byte4: secondaryColor(0RGB)", "SensorInfo", "RETURN_SINGLE"); + myServer->addData("getDrawingList", + "Gets a list of items to be drawn on the map. Each packet contains one drawing. Terminates on empty packet.", + &myNetGetDrawingListCB, + "none", + "For each drawing, a packet that contains: string: name, string: shape, byte4: primaryColor(0RGB), byte4: size, byte4: layer, byte4: defaultRefreshTime(0 == don't request refresh), byte4: secondaryColor(0RGB), string: visibility", + "SensorInfo", "RETURN_UNTIL_EMPTY"); + } + +} + +AREXPORT ArServerInfoDrawings::~ArServerInfoDrawings() +{ + +} + +/** + @note 'name' must be unique. + If the name is unique, the given drawing data is stored to be returned + in response to the "listDrawings" client request, and a new data request + is created with the given name and functor. This functor must send + a reply packet to the client containing a 4-byte integer indicating the + number of coordinates or vertices in the figure, followed by a pair of + 4-byte integers for each coordinate or vertex in global map space. + For example, if drawingData describes a polyDots shape, + then the functor must create a packet, add a 4-byte integer indicating the + number of dots, then for each dot, add an integer for the X coordinate followed + by an integer for the Y coordinate. + */ +AREXPORT bool ArServerInfoDrawings::addDrawing(ArDrawingData *drawingData, + const char *name, + ArFunctor2 *functor) +{ + if (myDrawingDatas.find(name) != myDrawingDatas.end() || + myDrawingCallbacks.find(name) != myDrawingCallbacks.end()) + { + ArLog::log(ArLog::Normal, "ArServerInfoDrawings::addDrawing: Already a drawing of name '%s'", name); + return false; + } + if (myServer == NULL || + !myServer->addData(name, "", functor, "none", + "See getDrawingList for the information on how this drawing should be drawn, and the documentation in ArDrawingData for that information means.", "SensorInfo", + "RETURN_SINGLE")) + { + ArLog::log(ArLog::Normal, + "ArServerInfoDrawings::addDrawing: Could not add data of name '%s' to server", + name); + return false; + } + myDrawingDatas[name] = drawingData; + myDrawingCallbacks[name] = functor; + return true; +} + +AREXPORT void ArServerInfoDrawings::netListDrawings(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendingPacket; + std::map::iterator it; + + sendingPacket.byte4ToBuf(myDrawingDatas.size()); + for (it = myDrawingDatas.begin(); it != myDrawingDatas.end(); it++) + { + sendingPacket.strToBuf((*it).first.c_str()); + sendingPacket.strToBuf((*it).second->getShape()); + sendingPacket.byte4ToBuf((*it).second->getPrimaryColor().colorToByte4()); + sendingPacket.byte4ToBuf((*it).second->getSize()); + sendingPacket.byte4ToBuf((*it).second->getLayer()); + sendingPacket.uByte4ToBuf((*it).second->getDefaultRefreshTime()); + sendingPacket.byte4ToBuf((*it).second->getSecondaryColor().colorToByte4()); + } + client->sendPacketTcp(&sendingPacket); +} + +AREXPORT void ArServerInfoDrawings::netGetDrawingList(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendingPacket; + + // TODO: Any need to protect the map by a mutex? + + for (std::map::iterator it = + myDrawingDatas.begin(); + it != myDrawingDatas.end(); + it++) + { + sendingPacket.empty(); + + sendingPacket.strToBuf((*it).first.c_str()); + sendingPacket.strToBuf((*it).second->getShape()); + sendingPacket.byte4ToBuf((*it).second->getPrimaryColor().colorToByte4()); + sendingPacket.byte4ToBuf((*it).second->getSize()); + sendingPacket.byte4ToBuf((*it).second->getLayer()); + sendingPacket.uByte4ToBuf((*it).second->getDefaultRefreshTime()); + sendingPacket.byte4ToBuf((*it).second->getSecondaryColor().colorToByte4()); + sendingPacket.strToBuf((*it).second->getVisibility()); + + client->sendPacketTcp(&sendingPacket); + + } // end for each drawing + + sendingPacket.empty(); + client->sendPacketTcp(&sendingPacket); +} + +AREXPORT bool ArServerInfoDrawings::addRangeDevice(ArRangeDevice *rangeDevice) +{ + bool ret = true; + char name[512]; + if (myServer == NULL) + { + ArLog::log(ArLog::Normal, "ArServerInfoDrawings::addRangeDeviceForDrawing: srever is NULL"); + return false; + } + sprintf(name, "%sCurrent", rangeDevice->getName()); + // LEAK a little when called, shouldn't be called more than a few + // times and isn't a leak unless its called more than once + if (rangeDevice->getCurrentDrawingData() != NULL && + !addDrawing(rangeDevice->getCurrentDrawingData(), name, + new ArFunctor3C(this, &ArServerInfoDrawings::netRangeDeviceCurrent, NULL, NULL, rangeDevice))) + { + ArLog::log(ArLog::Normal, + "ArServerInfoDrawings::addRangeDevice: Could not add data for range device '%s' to server ('%s')", rangeDevice->getName(), name); + ret = false; + } + sprintf(name, "%sCumulative", rangeDevice->getName()); + if (rangeDevice->getCumulativeDrawingData() != NULL && + !addDrawing(rangeDevice->getCumulativeDrawingData(), name, + new ArFunctor3C(this, &ArServerInfoDrawings::netRangeDeviceCumulative, NULL, NULL, rangeDevice))) + { + ArLog::log(ArLog::Normal, + "ArServerInfoDrawings::addRangeDevice: Could not add data for range device '%s' to server ('%s')", rangeDevice->getName(), name); + ret = false; + } + return ret; +} + +AREXPORT bool ArServerInfoDrawings::addRobotsRangeDevices(ArRobot *robot) +{ + std::list::iterator it; + bool ret = true; + ArRangeDevice *device; + //printf("0\n"); + if (robot == NULL || robot->getRangeDeviceList() == NULL) + { + ArLog::log(ArLog::Terse, "InfoDrawings::addRobotsRangeDevices: Robot or robot's range device list is NULL"); + return false; + } + //printf("1\n"); + for (it = robot->getRangeDeviceList()->begin(); + it != robot->getRangeDeviceList()->end(); + it++) + { + device = (*it); + //printf("2 %s\n", device->getName()); + device->lockDevice(); + if (!addRangeDevice(device)) + ret = false; + device->unlockDevice(); + } + //printf("3\n"); + return ret; +} + +AREXPORT void ArServerInfoDrawings::netRangeDeviceCurrent( + ArServerClient *client, ArNetPacket *packet, ArRangeDevice *device) +{ + ArNetPacket sendPacket; + std::list *readings; + std::list::iterator it; + + device->lockDevice(); + readings = device->getCurrentBuffer(); + if (readings == NULL) + { + ArLog::log(ArLog::Verbose, "ArServerInfoDrawing::netRangeDeviceCurrent: No current buffer for %s", device->getName()); + device->unlockDevice(); + sendPacket.byte4ToBuf(0); + client->sendPacketUdp(&sendPacket); + return; + } + + sendPacket.byte4ToBuf(readings->size()); + for (it = readings->begin(); it != readings->end(); it++) + { + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getX())); + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getY())); + } + device->unlockDevice(); + client->sendPacketUdp(&sendPacket); + +} + + +AREXPORT void ArServerInfoDrawings::netRangeDeviceCumulative( + ArServerClient *client, ArNetPacket *packet, ArRangeDevice *device) +{ + ArNetPacket sendPacket; + std::list *readings; + std::list::iterator it; + + device->lockDevice(); + readings = device->getCumulativeBuffer(); + if (readings == NULL) + { + ArLog::log(ArLog::Verbose, "ArServerInfoDrawing::netRangeDeviceCumulative: No cumulative buffer for %s", device->getName()); + device->unlockDevice(); + sendPacket.byte4ToBuf(0); + client->sendPacketUdp(&sendPacket); + return; + } + + sendPacket.byte4ToBuf(readings->size()); + for (it = readings->begin(); it != readings->end(); it++) + { + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getX())); + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getY())); + } + device->unlockDevice(); + client->sendPacketUdp(&sendPacket); + +} + + +AREXPORT ArDrawingData *ArServerInfoDrawings::internalGetDrawingData( + const char *name) +{ + if (myDrawingDatas.find(name) == myDrawingDatas.end()) + { + ArLog::log(ArLog::Normal, "ArServerInfoDrawings::internalGetDrawingData: No drawing of name '%s'", name); + return NULL; + } + return myDrawingDatas[name]; +} + +AREXPORT ArFunctor2 *ArServerInfoDrawings::internalGetDrawingCallback(const char *name) +{ + if (myDrawingCallbacks.find(name) == myDrawingCallbacks.end()) + { + ArLog::log(ArLog::Normal, "ArServerInfoDrawings::internalGetDrawingCallback: No drawing of name '%s'", name); + return NULL; + } + return myDrawingCallbacks[name]; +} + diff --git a/Legacy/Aria/ArNetworking/src/ArServerInfoRobot.cpp b/Legacy/Aria/ArNetworking/src/ArServerInfoRobot.cpp new file mode 100644 index 0000000..66b4cf9 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerInfoRobot.cpp @@ -0,0 +1,270 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerInfoRobot.h" +#include "ArServerMode.h" + + +AREXPORT ArServerInfoRobot::ArServerInfoRobot(ArServerBase *server, + ArRobot *robot) : + myUpdateCB(this, &ArServerInfoRobot::update), + myUpdateNumbersCB(this, &ArServerInfoRobot::updateNumbers), + myUpdateStringsCB(this, &ArServerInfoRobot::updateStrings), + myBatteryInfoCB(this, &ArServerInfoRobot::batteryInfo), + myPhysicalInfoCB(this, &ArServerInfoRobot::physicalInfo), + myActivityTimeInfoCB(this, &ArServerInfoRobot::activityTimeInfo), + myUserTaskCB(this, &ArServerInfoRobot::userTask) +{ + myServer = server; + myRobot = robot; + + myServer->addData("update", + "gets an update about the important robot status (you should request this at an interval)... for bandwidth savings this is deprecated in favor of updateNumbers and updateStrings", + &myUpdateCB, "none", + "string: status; string: mode; byte2: 10 * battery; byte4: x; byte4: y; byte2: th; byte2: transVel; byte2: rotVel, byte2: latVel, byte: temperature (deg c, -128 means unknown)", "RobotInfo", + "RETURN_SINGLE"); + + myServer->addData("updateNumbers", + "gets an update about the important robot status (you should request this at an interval)", + &myUpdateNumbersCB, "none", + "byte2: 10 * battery; byte4: x; byte4: y; byte2: th; byte2: transVel; byte2: rotVel, byte2: latVel, byte: temperature (deg c, -128 means unknown)", "RobotInfo", + "RETURN_SINGLE"); + + myServer->addData("updateStrings", + "gets an update about the important robot status (you should ask for this at -1 interval since it is broadcast when the strings change)", + &myUpdateStringsCB, "none", + "string: status; string: mode; string: extended status (this has newlines)", "RobotInfo", + "RETURN_SINGLE"); + + + myServer->addData("batteryInfo", + "gets the low battery voltage and shutdown voltage (you only need to request this once)", + &myBatteryInfoCB, "none", + "double: low battery voltage, double: shutdown battery voltage: ubyte: voltageIsStateOfCharge, if 0 voltage (including update voltage) is really voltage, if 1 voltage (including update voltage) is state of charge", + "RobotInfo", + "RETURN_SINGLE"); + + myServer->addData("physicalInfo", + "gets the information about the physical robot (you only need to request this once)", + &myPhysicalInfoCB, "none", + "string: robotType; string: robotSubType; byte2: robotWidth; byte2: robotLengthFront; byte2: robotLengthRear; byte: 0 means no lateral control, 1 means lateral control", + "RobotInfo", "RETURN_SINGLE"); + + myServer->addData("activityTimeInfo", + "Returns information about the active server mode's last activity time", + &myActivityTimeInfoCB, "none", + "byte4: seconds since", + "RobotInfo", "RETURN_SINGLE"); + myUserTaskCB.setName("ArServerInfoRobot"); + myRobot->addUserTask("ArServerInfoRobot", 50, &myUserTaskCB); + +} + +AREXPORT ArServerInfoRobot::~ArServerInfoRobot() +{ +} + +AREXPORT void ArServerInfoRobot::update(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + + myRobot->lock(); + + ArServerMode *netMode; + if ((netMode = ArServerMode::getActiveMode()) != NULL) + { + sending.strToBuf(netMode->getStatus()); + sending.strToBuf(netMode->getMode()); + } + else + { + sending.strToBuf("Unknown status"); + sending.strToBuf("Unknown mode"); + } + + + //ArLog::log(ArLog::Normal, + // "ArServerInfoRobot::update() havestateofcharge = %d, soc = %f, real = %f, reg = %f", + // myRobot->haveStateOfCharge(), + // myRobot->getStateOfCharge(), + // myRobot->getRealBatteryVoltage(), + // myRobot->getBatteryVoltage()); + + if (myRobot->haveStateOfCharge()) + sending.byte2ToBuf(ArMath::roundInt(myRobot->getStateOfCharge() * 10)); + else if (myRobot->getRealBatteryVoltage() > 0) + sending.byte2ToBuf(ArMath::roundInt( + myRobot->getRealBatteryVoltage() * 10)); + else + sending.byte2ToBuf(ArMath::roundInt( + myRobot->getBatteryVoltage() * 10)); + + sending.byte4ToBuf((int)myRobot->getX()); + sending.byte4ToBuf((int)myRobot->getY()); + sending.byte2ToBuf((int)myRobot->getTh()); + sending.byte2ToBuf((int)myRobot->getVel()); + sending.byte2ToBuf((int)myRobot->getRotVel()); + sending.byte2ToBuf((int)myRobot->getLatVel()); + sending.byteToBuf((char)myRobot->getTemperature()); + //sending.byte2ToBuf((int)myRobot->getPayloadNumSlots()); + myRobot->unlock(); + + client->sendPacketUdp(&sending); +} + +AREXPORT void ArServerInfoRobot::updateNumbers(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + + myRobot->lock(); + + if (myRobot->haveStateOfCharge()) + sending.byte2ToBuf(ArMath::roundInt(myRobot->getStateOfCharge() * 10)); + else if (myRobot->getRealBatteryVoltage() > 0) + sending.byte2ToBuf(ArMath::roundInt( + myRobot->getRealBatteryVoltage() * 10)); + else + sending.byte2ToBuf(ArMath::roundInt( + myRobot->getBatteryVoltage() * 10)); + sending.byte4ToBuf((int)myRobot->getX()); + sending.byte4ToBuf((int)myRobot->getY()); + sending.byte2ToBuf((int)myRobot->getTh()); + sending.byte2ToBuf((int)myRobot->getVel()); + sending.byte2ToBuf((int)myRobot->getRotVel()); + sending.byte2ToBuf((int)myRobot->getLatVel()); + sending.byteToBuf((char)myRobot->getTemperature()); + //sending.byte2ToBuf((int)myRobot->getPayloadNumSlots()); + myRobot->unlock(); + + client->sendPacketUdp(&sending); +} + +AREXPORT void ArServerInfoRobot::updateStrings(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + + myRobot->lock(); + sending.strToBuf(myStatus.c_str()); + sending.strToBuf(myMode.c_str()); + sending.strToBuf(myExtendedStatus.c_str()); + myRobot->unlock(); + + client->sendPacketTcp(&sending); +} + + +AREXPORT void ArServerInfoRobot::batteryInfo(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + + myRobot->lock(); + if (myRobot->haveStateOfCharge()) + { + sending.doubleToBuf(myRobot->getStateOfChargeLow()); + sending.doubleToBuf(myRobot->getStateOfChargeShutdown()); + // voltage is really state of charge + sending.uByteToBuf(1); + } + else + { + const ArRobotConfigPacketReader *reader; + reader = myRobot->getOrigRobotConfig(); + if (reader != NULL && reader->hasPacketArrived()) + { + if (reader->getLowBattery() != 0) + sending.doubleToBuf(reader->getLowBattery() * .1); + else + sending.doubleToBuf(11.5); + if (reader->getShutdownVoltage() != 0) + sending.doubleToBuf(reader->getShutdownVoltage() * .1); + else + sending.doubleToBuf(11); + } + else + { + sending.doubleToBuf(11.5); + sending.doubleToBuf(11); + } + // voltage is voltage, not state of charge + sending.uByteToBuf(0); + } + + myRobot->unlock(); + client->sendPacketTcp(&sending); + +} + + +AREXPORT void ArServerInfoRobot::physicalInfo(ArServerClient *client, + ArNetPacket *packet) + +{ + ArNetPacket sending; + + myRobot->lock(); + sending.strToBuf(myRobot->getRobotType()); + sending.strToBuf(myRobot->getRobotSubType()); + sending.byte2ToBuf((int)myRobot->getRobotWidth()); + sending.byte2ToBuf((int)myRobot->getRobotLengthFront()); + sending.byte2ToBuf((int)myRobot->getRobotLengthRear()); + if (!myRobot->hasLatVel()) + sending.byteToBuf(0); + else + sending.byteToBuf(1); + myRobot->unlock(); + + client->sendPacketTcp(&sending); +} + + +AREXPORT void ArServerInfoRobot::activityTimeInfo( + ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + + // TODO Not entirely sure whether the robot needs to be locked here, but + // it seems like it shouldn't hurt. + // + myRobot->lock(); + sending.byte4ToBuf(ArServerMode::getActiveModeActivityTimeSecSince()); + myRobot->unlock(); + + client->sendPacketTcp(&sending); + +} // end method activityTimeInfo + +void ArServerInfoRobot::userTask(void) +{ + ArServerMode *netMode; + ArNetPacket sending; + + if ((netMode = ArServerMode::getActiveMode()) != NULL) + { + myStatus = netMode->getStatus(); + myExtendedStatus = netMode->getExtendedStatus(); + if (myExtendedStatus.empty()) + myExtendedStatus = myStatus; + myMode = netMode->getMode(); + } + else + { + myStatus = "Unknown status"; + myExtendedStatus = "Unknown extended status"; + myMode = "Unknown mode"; + } + if (myStatus != myOldStatus || myMode != myOldMode || + myExtendedStatus != myOldExtendedStatus) + { + sending.strToBuf(myStatus.c_str()); + sending.strToBuf(myMode.c_str()); + sending.strToBuf(myExtendedStatus.c_str()); + myServer->broadcastPacketTcp(&sending, "updateStrings"); + } + myOldStatus = myStatus; + myOldMode = myMode; + myOldExtendedStatus = myExtendedStatus; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerInfoSensor.cpp b/Legacy/Aria/ArNetworking/src/ArServerInfoSensor.cpp new file mode 100644 index 0000000..37ebb37 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerInfoSensor.cpp @@ -0,0 +1,177 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerInfoSensor.h" + +AREXPORT ArServerInfoSensor::ArServerInfoSensor(ArServerBase *server, ArRobot *robot) : + myGetSensorListCB(this, &ArServerInfoSensor::getSensorList), + myGetSensorCurrentCB(this, &ArServerInfoSensor::getSensorCurrent), + myGetSensorCumulativeCB(this, &ArServerInfoSensor::getSensorCumulative) + +{ + myRobot = robot; + myServer = server; + + if (myServer != NULL) + { + /* + These are set as RETURN_COMPLEX since they won't work with the + connection forwarding stuff (since that can't deal with requests + set up like this) + */ + myServer->addData("getSensorList", + "gets a list of sensors attached to the robot", + &myGetSensorListCB, + "none", + "byte2: numSensors, repeating for numSensors: string: sensorName", + "SensorInfo", "RETURN_COMPLEX"); + + myServer->addData("getSensorCurrent", + "gets the current sensor readings for requested sensors", + &myGetSensorCurrentCB, + "string: sensorName", + "byte2: numReadings string: sensorName, repeating for numReadings times: byte4: x byte4: y.... if numReadings is -1 it means no sensor by that name", + "SensorInfo", "RETURN_COMPLEX"); + + myServer->addData("getSensorCumulative", + "gets the cumulative sensor readings for requested sensors", + &myGetSensorCumulativeCB, + "string: sensorName", + "byte2: numReadings string: sensorName, repeating for numReadings times: byte4: x byte4: y.... if numReadings is -1 it means no sensor by that name", + "SensorInfo", "RETURN_COMPLEX"); + } +} + +AREXPORT ArServerInfoSensor::~ArServerInfoSensor() +{ + +} + +AREXPORT void ArServerInfoSensor::getSensorList(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sendPacket; + std::list *devList; + std::list::iterator it; + + myRobot->lock(); + devList = myRobot->getRangeDeviceList(); + + if (devList == NULL) + { + myRobot->unlock(); + client->sendPacketUdp(&sendPacket); + return; + } + + sendPacket.byte2ToBuf(devList->size()); + + for (it = devList->begin(); it != devList->end(); it++) + { + sendPacket.strToBuf((*it)->getName()); + } + myRobot->unlock(); + client->sendPacketUdp(&sendPacket); +} + + +AREXPORT void ArServerInfoSensor::getSensorCurrent(ArServerClient *client, + ArNetPacket *packet) +{ + ArRangeDevice *dev; + char sensor[512]; + std::list *readings; + std::list::iterator it; + + while (packet->getDataLength() > packet->getDataReadLength()) + { + ArNetPacket sendPacket; + + // find out the sensor they want + packet->bufToStr(sensor, sizeof(sensor)); + myRobot->lock(); + if ((dev = myRobot->findRangeDevice(sensor)) == NULL) + { + myRobot->unlock(); + ArLog::log(ArLog::Verbose, "ArServerInfoSensor::getSensorCurrent: No sensor %s", sensor); + sendPacket.byte2ToBuf(-1); + sendPacket.strToBuf(sensor); + client->sendPacketUdp(&sendPacket); + continue; + } + + myRobot->unlock(); + dev->lockDevice(); + readings = dev->getCurrentBuffer(); + if (readings == NULL) + { + dev->unlockDevice(); + ArLog::log(ArLog::Verbose, "ArServerInfoSensor::getSensorCurrent: No current buffer for %s", sensor); + sendPacket.byte2ToBuf(0); + sendPacket.strToBuf(sensor); + client->sendPacketUdp(&sendPacket); + continue; + } + + sendPacket.byte2ToBuf(readings->size()); + sendPacket.strToBuf(sensor); + for (it = readings->begin(); it != readings->end(); it++) + { + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getX())); + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getY())); + } + dev->unlockDevice(); + client->sendPacketUdp(&sendPacket); + } + + +} + +AREXPORT void ArServerInfoSensor::getSensorCumulative(ArServerClient *client, + ArNetPacket *packet) +{ + ArRangeDevice *dev; + char sensor[512]; + std::list *readings; + std::list::iterator it; + + while (packet->getDataLength() > packet->getDataReadLength()) + { + ArNetPacket sendPacket; + // find out the sensor they want + packet->bufToStr(sensor, sizeof(sensor)); + myRobot->lock(); + if ((dev = myRobot->findRangeDevice(sensor)) == NULL) + { + myRobot->unlock(); + ArLog::log(ArLog::Verbose, "ArServerInfoSensor::getSensorCumulative: No sensor %s", sensor); + sendPacket.byte2ToBuf(-1); + sendPacket.strToBuf(sensor); + client->sendPacketUdp(&sendPacket); + continue; + } + + myRobot->unlock(); + dev->lockDevice(); + readings = dev->getCumulativeBuffer(); + if (readings == NULL) + { + dev->unlockDevice(); + ArLog::log(ArLog::Verbose, "ArServerInfoSensor::getSensorCumulative: No current buffer for %s", sensor); + sendPacket.byte2ToBuf(0); + sendPacket.strToBuf(sensor); + client->sendPacketUdp(&sendPacket); + continue; + } + + sendPacket.byte2ToBuf(readings->size()); + sendPacket.strToBuf(sensor); + for (it = readings->begin(); it != readings->end(); it++) + { + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getX())); + sendPacket.byte4ToBuf(ArMath::roundInt((*it)->getY())); + } + dev->unlockDevice(); + client->sendPacketUdp(&sendPacket); + } + +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerInfoStrings.cpp b/Legacy/Aria/ArNetworking/src/ArServerInfoStrings.cpp new file mode 100644 index 0000000..ab0ccc4 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerInfoStrings.cpp @@ -0,0 +1,138 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerInfoStrings.h" + +AREXPORT ArServerInfoStrings::ArServerInfoStrings(ArServerBase *server) : + myAddStringFunctor(this, &ArServerInfoStrings::addString), + myNetGetStringsInfoCB(this, &ArServerInfoStrings::netGetStringsInfo), + myNetGetStringsCB(this, &ArServerInfoStrings::netGetStrings) +{ + myStringsMutex.setLogName("ArServerInfoStrings::mySTringsMutex"); + myServer = server; + if (myServer != NULL) + { + myServer->addData("getStringsInfo", + "Gets the information about the 'getStrings' command", + &myNetGetStringsInfoCB, + "none", + "uByte2: count; repeating count times string: name, uByte2: maxlength", + "NavigationInfo", "RETURN_SINGLE"); + myServer->addData("getStrings", + "Gets the strings, for info about them see getStringsInfo", + &myNetGetStringsCB, + "none", + "byte2: count, repeating count: string", + "NavigationInfo", "RETURN_SINGLE"); + + } + myMaxMaxLength = 512; +} + +AREXPORT ArServerInfoStrings::~ArServerInfoStrings() +{ + +} + +AREXPORT void ArServerInfoStrings::buildStringsInfoPacket(void) +{ + myStringsMutex.lock(); + std::list::iterator it; + ArStringInfoHolder *info; + + myStringInfoPacket.empty(); + ArTypes::UByte2 count; + count = myStrings.size(); + myStringInfoPacket.uByte2ToBuf(count); + for (it = myStrings.begin(); it != myStrings.end(); it++) + { + info = (*it); + myStringInfoPacket.strToBuf(info->getName()); + myStringInfoPacket.uByte2ToBuf(info->getMaxLength()); + } + myStringsMutex.unlock(); +} + +AREXPORT void ArServerInfoStrings::buildStringsPacket(void) +{ + myStringsMutex.lock(); + + /* This part didn't work since the last string packet build was + * never set, so just commenting it since it caused problems when + * the value wrapped + if (myLastStringPacketBuild.mSecSince() < 100) + { + myStringsMutex.unlock(); + return; + } + */ + + myStringPacket.empty(); + std::list::iterator it; + ArStringInfoHolder *info; + + char *buf; + buf = new char[myMaxMaxLength+1]; + + for (it = myStrings.begin(); it != myStrings.end(); it++) + { + info = (*it); + info->getFunctor()->invoke(buf, info->getMaxLength()); + myStringPacket.strToBuf(buf); + } + + delete[] buf; + + myStringsMutex.unlock(); +} + +AREXPORT void ArServerInfoStrings::netGetStringsInfo(ArServerClient *client, + ArNetPacket *packet) +{ + buildStringsInfoPacket(); + client->sendPacketTcp(&myStringInfoPacket); +} + +AREXPORT void ArServerInfoStrings::netGetStrings(ArServerClient *client, + ArNetPacket *packet) +{ + buildStringsPacket(); + client->sendPacketTcp(&myStringPacket); +} + + +AREXPORT void ArServerInfoStrings::addString( + const char *name, ArTypes::UByte2 maxLength, + ArFunctor2 *functor) +{ + myStringsMutex.lock(); + if (myMaxMaxLength < maxLength) + myMaxMaxLength = maxLength; + myStrings.push_back(new ArStringInfoHolder(name, maxLength, functor)); + myStringsMutex.unlock(); + buildStringsInfoPacket(); + myServer->broadcastPacketTcp(&myStringInfoPacket, "getStringsInfo"); +} + + +AREXPORT ArStringInfoHolder *ArServerInfoStrings::internalGetStringInfoHolder( + const char *name) +{ + myStringsMutex.lock(); + std::list::iterator it; + ArStringInfoHolder *info; + + for (it = myStrings.begin(); it != myStrings.end(); it++) + { + info = (*it); + if (ArUtil::strcasecmp(info->getName(), name) == 0) + { + myStringsMutex.unlock(); + return info; + } + myStringInfoPacket.strToBuf(info->getName()); + myStringInfoPacket.uByte2ToBuf(info->getMaxLength()); + } + + myStringsMutex.unlock(); + return NULL; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerMode.cpp b/Legacy/Aria/ArNetworking/src/ArServerMode.cpp new file mode 100644 index 0000000..c61e053 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerMode.cpp @@ -0,0 +1,682 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerMode.h" +#include "ArServerModeIdle.h" +#include + +AREXPORT bool ArServerMode::ourActiveModeLocked = false; +AREXPORT bool ArServerMode::ourActiveModeWillUnlockIfRequested = false; +AREXPORT ArServerMode *ArServerMode::ourActiveMode = NULL; +AREXPORT ArServerMode *ArServerMode::ourNextActiveMode = NULL; +AREXPORT ArServerMode *ArServerMode::ourLastActiveMode = NULL; +AREXPORT std::list ArServerMode::ourDefaultModes; +AREXPORT std::list ArServerMode::ourRequestedActivateModes; +AREXPORT std::list ArServerMode::ourModes; +AREXPORT bool ArServerMode::ourUserTaskAdded = false; +AREXPORT ArGlobalFunctor ArServerMode::ourUserTaskCB( + ArServerMode::modeUserTask); +AREXPORT std::multimap ArServerMode::ourModeDataMap; +AREXPORT ArMutex ArServerMode::ourModeDataMapMutex; +AREXPORT ArGlobalFunctor2 ArServerMode::ourGetModeDataListCB( + ArServerMode::getModeDataList); +AREXPORT ArGlobalFunctor2 ArServerMode::ourGetModeInfoCB( + ArServerMode::getModeInfo); +AREXPORT ArGlobalFunctor2 + ArServerMode::ourGetModeBusyCB(ArServerMode::getModeBusy); + +AREXPORT bool ArServerMode::ourBroadcastActiveModeLocked = false; +AREXPORT ArServerMode *ArServerMode::ourBroadcastActiveMode = NULL; +AREXPORT bool ArServerMode::ourBroadcastActiveModeWillUnlockIfRequested = false; +AREXPORT bool ArServerMode::ourIsBusy = false; +AREXPORT ArServerBase *ArServerMode::ourServerBase = NULL; +AREXPORT ArServerModeIdle *ArServerMode::ourIdleMode = NULL; +AREXPORT ArMutex ArServerMode::ourIdleModeMutex; +AREXPORT bool ArServerMode::ourIdleModeCreated = false; +AREXPORT bool ArServerMode::ourActiveModeSetActivityThisCycle = false; + +AREXPORT void ArServerMode::modeUserTask(void) +{ + if (ourActiveMode != NULL) + { + ourActiveMode->mySetActivityThisCycle = false; + ourActiveMode->userTask(); + if (ourActiveMode != NULL) + ourActiveModeSetActivityThisCycle = ourActiveMode->mySetActivityThisCycle; + else + ourActiveModeSetActivityThisCycle = true; + } + else + { + std::list::iterator it; + for (it = ourDefaultModes.begin(); + it != ourDefaultModes.end() && ourActiveMode == NULL; + it++) + { + ArLog::log(ArLog::Terse, "Checking default on %s mode", (*it)->getName()); + (*it)->checkDefault(); + if (ourActiveMode != NULL) + { + ArLog::log(ArLog::Normal, "Activated %s mode as default", (*it)->getName()); + break; + } + } // end for each default mode + } // end else no active mode + + bool wasBusy = ourIsBusy; + // It seems to me that we wouldn't want to call the robot busy if there is no + // active mode. (Perhaps getActiveModeActivityTimeSecSince() should return + // something besides zero in this case.) + ourIsBusy = ((ourActiveMode != NULL) && + (ArServerMode::getActiveModeActivityTimeSecSince() == 0)); + + if (wasBusy != ourIsBusy) { + + if (ourServerBase != NULL) { + + //ArLog::log(ArLog::Normal, "ArServerMode busy changed: %i", ourIsBusy); + + ArNetPacket packet; + packet.byteToBuf(ourIsBusy); + + ourServerBase->broadcastPacketTcp(&packet, "modeBusyChanged"); + } + } // end if busy changed + +} // end method modeUserTask + + +AREXPORT ArServerMode::ArServerMode(ArRobot *robot, ArServerBase *server, + const char *name) +{ + ourModeDataMapMutex.setLogName("ArServerMode::ourModeDataMapMutex"); + + myName = name; + std::replace(myName.begin(), myName.end(), ' ', '_'); + + std::string activityMutexName; + activityMutexName = "ArServerMode::"; + activityMutexName += myName; + activityMutexName += "::myActivityTimeMutex"; + myActivityTimeMutex.setLogName(activityMutexName.c_str()); + myVerboseLogLevel = ArLog::Verbose; + myRobot = robot; + myServer = server; + myIsActive = false; + myStatusSetThisCycle = false; + ourModes.push_front(this); + myHasSetActivityTime = false; + mySetActivityThisCycle = false; + + std::string cbListName; + cbListName = "ArServerMode::"; + cbListName += myName; + cbListName += "::myActivateCallbacks"; + myActivateCallbacks.setName(cbListName.c_str()); + + cbListName = "ArServerMode::"; + cbListName += myName; + cbListName += "::myDeactivateCallbacks"; + myDeactivateCallbacks.setName(cbListName.c_str()); + + cbListName = "ArServerMode::"; + cbListName += myName; + cbListName += "::mySingleShotDeactivateCallbacks"; + mySingleShotDeactivateCallbacks.setName(cbListName.c_str()); + mySingleShotDeactivateCallbacks.setSingleShot(true); + + if (!ourUserTaskAdded) + { + ourUserTaskAdded = true; + myRobot->addUserTask("server mode", 50, &ourUserTaskCB); + myServer->addData("getModeDataList", "Gets the list of commands associated with modes.", + &ourGetModeDataListCB, + "none", + "ubyte4: numData; repeating numData times, string: mode; string: data", + "RobotInfo", "RETURN_SINGLE"); + myServer->addData("getModeInfo", "Gets the current mode active and if its locked and will or won't unlock (for lists of which commands are with which modes use getModeDataList) commands associated with modes.", + &ourGetModeInfoCB, + "none", + "string: mode; uByte: locked (1 == locked, 0 == unlocked); uByte: willUnlockIfRequested (1 == will, 0 == won't)", + "RobotInfo", "RETURN_SINGLE"); + + myServer->addData("modeBusyChanged", + "Broadcast when the busy state (non-zero idle time) of the active mode changes", + &ourGetModeBusyCB, + "None", + "byte: 1 if busy, 0 if idle", + "RobotInfo", + "RETURN_SINGLE"); + + } // end if static tasks and handlers not yet added + + // Storing the first occurrence of the server base for use in the static + // modeUserTask method. In general, there seems to be a single server base which + // isn't deleted during the program execution. However, if this should change, + // then will need to add a way of resetting the static ourServerBase. + if (ourServerBase == NULL) { + ourServerBase = server; + } + + ourIdleModeMutex.lock(); + if (ourIdleMode == NULL && !ourIdleModeCreated) + { + ourIdleModeCreated = true; + ourIdleModeMutex.unlock(); + ourIdleMode = new ArServerModeIdle(server, robot); + } + else + { + ourIdleModeMutex.unlock(); + } +} // end ctor + +AREXPORT ArServerMode::~ArServerMode() +{ + +} + +AREXPORT void ArServerMode::lockMode(bool willUnlockIfRequested) +{ + if (!myIsActive || ourActiveMode != this) + { + ArLog::log(myVerboseLogLevel, "ArServerMode::lockMode: mode %s could not lock because it is not active", getName()); + return; + } + ourActiveModeLocked = true; + ourActiveModeWillUnlockIfRequested = willUnlockIfRequested; + ArLog::log(myVerboseLogLevel, "Locked into %s mode, will unlock %s", + getName(), ArUtil::convertBool(willUnlockIfRequested)); + checkBroadcastModeInfoPacket(); +} + +AREXPORT void ArServerMode::unlockMode(void) +{ + if (!myIsActive || ourActiveMode != this) + { + ArLog::log(myVerboseLogLevel, "ArServerMode::unlockMode: mode %s could not unlock because it is not locked", getName()); + return; + } + ourActiveModeLocked = false; + ourActiveModeWillUnlockIfRequested = false; + ArLog::log(myVerboseLogLevel, "Unlocked from %s mode", getName()); + checkBroadcastModeInfoPacket(); +} + +/** + This should only be called from places where a forced unlock _HAS_ + to happen, ie on a robot joystick, but modes should do whatever + they have to in this to turn things off or what not. +**/ +AREXPORT void ArServerMode::forceUnlock(void) +{ + ArLog::log(ArLog::Terse, "Mode %s being forcibly unlocked", getName()); + unlockMode(); +} + +/// Gets whether we'll unlock if requested or not +AREXPORT bool ArServerMode::willUnlockIfRequested(void) +{ + if (ourActiveMode == NULL || !ourActiveModeLocked || + (ourActiveModeLocked && ourActiveModeWillUnlockIfRequested)) + return true; + else + return false; +} + +/// Gets if the active mode is locked or not +AREXPORT bool ArServerMode::isLocked(void) +{ + if (ourActiveMode == NULL || !ourActiveModeLocked) + return false; + else + return true; +} + +AREXPORT bool ArServerMode::isAutoResumeAfterInterrupt() +{ + return false; +} + + +/** + Makes this mode active if it can... If this returns false then the + mode's activate() method should just return... Note that before calling + this a mode should have already made sure it can activate... This also + calls the activate callbacks (only if the mode will be allowed to + activate of course). + + IMPORTANT: This method must only be called within the context of the + activate() method. + **/ + +AREXPORT bool ArServerMode::baseActivate(void) +{ + + // if we're locked then return false so nothing else activates + if (ourActiveMode != NULL && ourActiveMode != this && ourActiveModeLocked) + { + ArLog::log(myVerboseLogLevel, "Could not switch to %s mode because of lock.", + getName()); + + // request our active mode to unlock + // + // KMC: Moved the following line so that it is called after this mode is pushed + // onto the ourRequestedActivatedModes queue. Under certain conditions, + // the requestUnlock() call results in a mode being deactivated and the next + // queued mode being activated. This mode will essentially be pushed onto the + // queue too late -- and will either be ignored or activated at an unexpected + // time. (An example scenario occurs when the robot is going to dock, and the + // go-to-goal mode attempts to activate.) + // ourActiveMode->requestUnlock(); + + ArLog::log(myVerboseLogLevel, "Removing this (%s) from requested activate modes", + getName()); + + ourRequestedActivateModes.remove(this); + ArLog::log(myVerboseLogLevel, "Mode %s wants to be activated, adding to requested activate modes.", getName()); + + ourRequestedActivateModes.push_front(this); + + ourActiveMode->requestUnlock(); + + return false; + + } + + if (this != ourIdleMode && myServer->idleProcessingPending()) + { + if (ourActiveMode == ourIdleMode) + { + ArLog::log(myVerboseLogLevel, + "Since idle already active didn't set nextActiveMode when mode %s tried to activate, just returning", this->getName()); + return false; + } + ourNextActiveMode = ourIdleMode; + if (ourActiveMode != NULL) + ArLog::log(myVerboseLogLevel, + "Setting nextActiveMode explicitly to idle mode from mode %s trying to activate while %s is active", this->getName(), ourActiveMode->getName()); + else + ArLog::log(myVerboseLogLevel, + "Setting nextActiveMode explicitly to idle mode from mode %s trying to activate while no mode is active", this->getName()); + + if (ourActiveMode != NULL && ourActiveMode != ourIdleMode) + { + ourIdleMode->setModeInterrupted(ourActiveMode); + ourActiveMode->deactivate(); + } + ArLog::log(myVerboseLogLevel, "Removing this (%s) from requested activate modes", + getName()); + ourRequestedActivateModes.remove(this); + ArLog::log(myVerboseLogLevel, "Mode %s wants to be activated, denying for now because of idle, but adding to requested activate modes", getName()); + ourRequestedActivateModes.push_front(this); + ourIdleMode->activate(); + return false; + } + + ourNextActiveMode = this; + if (ourActiveMode != NULL) + ArLog::log(myVerboseLogLevel, "Setting nextActiveMode to mode %s (ourActiveMode %s)", + ourNextActiveMode->getName(), ourActiveMode->getName()); + else + ArLog::log(myVerboseLogLevel, "Setting nextActiveMode to mode %s (ourActiveMode NULL)", + ourNextActiveMode->getName()); + if (ourActiveMode != NULL) + ourActiveMode->deactivate(); + + myIsActive = true; + myActivityTimeMutex.lock(); + myActivityTime.setToNow(); + myActivityTimeMutex.unlock(); + + /* + if (myRobot != NULL) + { + myRobot->addUserTask(myName.c_str(), 50, &myUserTaskCB); + } + */ + ourLastActiveMode = ourActiveMode; + ourActiveMode = this; + ourNextActiveMode = NULL; + + ArLog::log(myVerboseLogLevel, "Setting nextActiveMode to NULL"); + if (myRobot != NULL) + { + myRobot->stop(); + myRobot->clearDirectMotion(); + } + /// Call our activate callbacks + myActivateCallbacks.invoke(); + /// Set the activity time to now, but do NOT set the flag, since that flag is used to determine if a particular mode has used it or not + ArLog::log(myVerboseLogLevel, "Activated %s mode", getName()); + checkBroadcastModeInfoPacket(); + return true; +} + +/** + Whenever a mode uses this it should already have done all of its + own deactivations (this also calls the deactive callbacks) + **/ +AREXPORT void ArServerMode::baseDeactivate(void) +{ + std::list::iterator it; + /* + for (it = ourDefaultModes.begin(); + it != ourDefaultModes.end(); + it++) + { + ArLog::log(myVerboseLogLevel, "defaults are %s mode", (*it)->getName()); + } + */ + // if we're the active mode, we're deactivating, and we're locked, then unlock + if (ourActiveMode != NULL && ourActiveMode == this && ourActiveModeLocked) + unlockMode(); + /* + if (myRobot != NULL) + myRobot->remUserTask(&myUserTaskCB); + */ + myIsActive = false; + if (ourActiveMode == this) + { + ourLastActiveMode = ourActiveMode; + ourActiveMode = NULL; + } + myDeactivateCallbacks.invoke(); + mySingleShotDeactivateCallbacks.invoke(); + + ArLog::log(myVerboseLogLevel, "Deactivated %s mode", getName()); + + if (ourNextActiveMode == NULL) + { + ArLog::log(myVerboseLogLevel, "No next active mode %s"); + + // walk through until one of these is ready + while ((it = ourRequestedActivateModes.begin()) != + ourRequestedActivateModes.end()) + { + std::string name; + name = (*it)->getName(); + ArLog::log(myVerboseLogLevel,"Trying to activate %s", name.c_str()); + + (*it)->activate(); + + if (ourActiveMode == ourIdleMode) + { + ArLog::log(myVerboseLogLevel, "Idle mode activated instead, so leaving the requestedActivateModes alone"); + return; + } + + ArLog::log(myVerboseLogLevel, "Popping front of requested activate modes (%s)"); + + ourRequestedActivateModes.pop_front(); + + if (ourActiveMode != NULL) + { + ArLog::log(myVerboseLogLevel, "and did, clearing requested activate modes (size = %i)", + ourRequestedActivateModes.size()); + // now clear out the old modes so that we don't wind up + // stacking too much. First, notify them that they will not be activated. + for (std::list::iterator dIter = ourRequestedActivateModes.begin(); + dIter != ourRequestedActivateModes.end(); + dIter++) + { + ArServerMode *deniedMode = *dIter; + if (deniedMode != NULL) + { + deniedMode->activationDenied(); + } + } + + ourRequestedActivateModes.clear(); + + ArLog::log(myVerboseLogLevel, + "Deactivate %s mode returns (1)", getName()); + return; + } + } // end while modes to activate + + ArLog::log(myVerboseLogLevel, "Deactivate did not activate any modes, clearing requested activate modes (size = %i)", ourRequestedActivateModes.size()); + + // now clear out the old modes so that we don't wind up stacking + // too much (should be empty anyways here, just make sure. (Same logic + // as above about notifying the mode that it won't be activated.) + for (std::list::iterator dIter = ourRequestedActivateModes.begin(); + dIter != ourRequestedActivateModes.end(); + dIter++) { + ArServerMode *deniedMode = *dIter; + if (deniedMode != NULL) { + deniedMode->activationDenied(); + } + } + ourRequestedActivateModes.clear(); + + for (it = ourDefaultModes.begin(); + it != ourDefaultModes.end() && ourActiveMode == NULL; + it++) + { + ArLog::log(ArLog::Normal, "Checking default on %s mode", (*it)->getName()); + (*it)->checkDefault(); + if (ourActiveMode != NULL) + { + //printf("and did\n"); + ArLog::log(myVerboseLogLevel, + "Deactivate %s mode returns (2)", getName()); + return; + } + } + } + else + { + ArLog::log(myVerboseLogLevel, "Our next active mode %s, removing it from requested activate modes", ourNextActiveMode->getName()); + ourRequestedActivateModes.remove(ourNextActiveMode); + } + ArLog::log(myVerboseLogLevel, + "Deactivate %s mode returns (3)", getName()); + +} + +/** + The default mode is activated whenever a mode is deactivated, even + if a mode is deactivated only for another mode to be activated + **/ +AREXPORT void ArServerMode::addAsDefaultMode(ArListPos::Pos pos) +{ + ArLog::log(ArLog::Normal, "Mode %s added as default mode", getName()); + if (pos == ArListPos::LAST) + ourDefaultModes.push_back(this); + else if (pos == ArListPos::FIRST) + ourDefaultModes.push_front(this); + else + { + ArLog::log(ArLog::Terse, "ArServerMode::addAsDefaultMode: bad list position."); + ourDefaultModes.push_front(this); + } +} + +AREXPORT ArTime ArServerMode::getActivityTime(void) +{ + ArTime ret; + myActivityTimeMutex.lock(); + ret = myActivityTime; + myActivityTimeMutex.unlock(); + return ret; +} + +AREXPORT void ArServerMode::setActivityTimeToNow(void) +{ + myActivityTimeMutex.lock(); + myHasSetActivityTime = true; + mySetActivityThisCycle = true; + myActivityTime.setToNow(); + myActivityTimeMutex.unlock(); +} + +AREXPORT int ArServerMode::getActiveModeActivityTimeSecSince(void) +{ + // chop this to an int so its easier to use, if you care about it + // use the getActivityTime on the ourActiveMode + if (ourActiveMode != NULL) + return (int)ourActiveMode->getActivityTime().secSince(); + else + return -1; +} + +AREXPORT bool ArServerMode::getActiveModeSetActivityThisCycle(void) +{ + return ourActiveModeSetActivityThisCycle; +} + +AREXPORT const char *ArServerMode::getActiveModeModeString(void) +{ + if (ourActiveMode != NULL) + return ourActiveMode->getMode(); + else + return NULL; +} + + +AREXPORT const char *ArServerMode::getActiveModeStatusString(void) +{ + if (ourActiveMode != NULL) + return ourActiveMode->getStatus(); + else + return NULL; +} + +AREXPORT const char *ArServerMode::getActiveModeExtendedStatusString(void) +{ + if (ourActiveMode != NULL) + return ourActiveMode->getExtendedStatus(); + else + return NULL; +} + +/** + This basically just notes the commands associated with a mode so + that clients can know what can and can't happen based on what mode + is active/locked/etc. You should call it only if the addData on + the ArServerBase returns true (since otherwise it means that + command wasn't added). +**/ +AREXPORT bool ArServerMode::addModeData( + const char *name, const char *description, + ArFunctor2 *functor, + const char *argumentDescription, const char *returnDescription, + const char *commandGroup, const char *dataFlags) +{ + if (myServer->addData(name, description, functor, argumentDescription, + returnDescription, commandGroup, dataFlags)) + { + ourModeDataMapMutex.lock(); + ourModeDataMap.insert(std::pair(myName, name)); + ourModeDataMapMutex.unlock(); + return true; + } + else + { + ArLog::log(ArLog::Normal, "ArServerMode %s: Could not add mode data %s", + myName.c_str(), name); + return false; + } + +} + +/** + This returns the list of which data is in which mode +**/ +AREXPORT void ArServerMode::getModeDataList(ArServerClient *client, + ArNetPacket *packet) + +{ + ourModeDataMapMutex.lock(); + ArNetPacket sending; + sending.uByte4ToBuf(ourModeDataMap.size()); + std::multimap::iterator it; + for (it = ourModeDataMap.begin(); it != ourModeDataMap.end(); it++) + { + sending.strToBuf((*it).first.c_str()); + sending.strToBuf((*it).second.c_str()); + } + ourModeDataMapMutex.unlock(); + client->sendPacketTcp(&sending); +} + +/** + This will get the info about the current active mode +**/ +AREXPORT void ArServerMode::getModeInfo(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + buildModeInfoPacket(&sending); + client->sendPacketTcp(&sending); +} + +AREXPORT void ArServerMode::buildModeInfoPacket(ArNetPacket *sending) +{ + if (ourActiveMode != NULL) + { + sending->strToBuf(ourActiveMode->getName()); + if (ourActiveModeLocked) + sending->uByteToBuf(1); + else + sending->uByteToBuf(0); + if (ourActiveModeWillUnlockIfRequested) + sending->uByteToBuf(1); + else + sending->uByteToBuf(0); + } + else + { + sending->strToBuf(""); + sending->uByteToBuf(0); + sending->uByteToBuf(0); + } + return; +} + +AREXPORT void ArServerMode::checkBroadcastModeInfoPacket(void) +{ + if (ourActiveMode != ourBroadcastActiveMode || + ourActiveModeLocked != ourBroadcastActiveModeLocked || + ourActiveModeWillUnlockIfRequested != + ourBroadcastActiveModeWillUnlockIfRequested) + { + ArNetPacket sending; + buildModeInfoPacket(&sending); + myServer->broadcastPacketTcp(&sending, "getModeInfo"); + } + + ourBroadcastActiveMode = ourActiveMode; + ourBroadcastActiveModeLocked = ourActiveModeLocked; + ourBroadcastActiveModeWillUnlockIfRequested = ourActiveModeWillUnlockIfRequested; +} + +AREXPORT ArServerMode* ArServerMode::getActiveMode(void) +{ + return ourActiveMode; +} + +AREXPORT ArServerMode* ArServerMode::getLastActiveMode() +{ + return ourLastActiveMode; +} + +AREXPORT ArServerModeIdle* ArServerMode::getIdleMode(void) { return ourIdleMode; } + +AREXPORT std::list *ArServerMode::getRequestedActivateModes(void) +{ + return &ourRequestedActivateModes; +} + +AREXPORT void ArServerMode::getModeBusy(ArServerClient *client, + ArNetPacket *packet) +{ + ArNetPacket sending; + sending.byteToBuf(ourIsBusy); + client->sendPacketTcp(&sending); +} + + + diff --git a/Legacy/Aria/ArNetworking/src/ArServerModeDrive.cpp b/Legacy/Aria/ArNetworking/src/ArServerModeDrive.cpp new file mode 100644 index 0000000..06de5df --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerModeDrive.cpp @@ -0,0 +1,244 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerModeDrive.h" + +AREXPORT ArServerModeDrive::ArServerModeDrive(ArServerBase *server, + ArRobot *robot, + bool takeControlOnJoystick) : + ArServerMode(robot, server, "drive"), + myDriveGroup(robot), + myServerDriveJoystickCB(this, &ArServerModeDrive::serverDriveJoystick), + myJoyUserTaskCB(this, &ArServerModeDrive::joyUserTask), + myServerSafeDrivingEnableCB(this, + &ArServerModeDrive::serverSafeDrivingEnable), + myServerSafeDrivingDisableCB(this, + &ArServerModeDrive::serverSafeDrivingDisable) +{ + myHandlerCommands = NULL; + myTakeControlOnJoystick = takeControlOnJoystick; + myDriveSafely = true; + myJoydriveAction.setStopIfNoButtonPressed(false); + myDriveGroup.addAction(&myJoydriveAction, 75); + myDriveGroup.addAction(&myStopAction, 60); + myInputAction = myDriveGroup.getActionInput(); + setThrottleParams(200, 2000); + myExtraUnsafeAction = NULL; + if (myServer != NULL) + { + addModeData("driveJoystick", + "drives the robot as with a joystick", + &myServerDriveJoystickCB, + "byte2: vel, byte2: rotVel", + "none", "Movement", "RETURN_NONE"); + } + if ((myJoyHandler = Aria::getJoyHandler()) == NULL) + { + myJoyHandler = new ArJoyHandler; + myJoyHandler->init(); + Aria::setJoyHandler(myJoyHandler); + } + myRobot->addUserTask("driveJoyUserTask", 75, &myJoyUserTaskCB); +} + +AREXPORT ArServerModeDrive::~ArServerModeDrive() +{ + +} + +AREXPORT void ArServerModeDrive::activate(void) +{ + driveJoystick(0, 0, true); +} + +AREXPORT void ArServerModeDrive::deactivate(void) +{ + myDriveGroup.deactivate(); + baseDeactivate(); +} + +AREXPORT void ArServerModeDrive::setSafeDriving(bool safe) +{ + // if this is a change then print it + if (safe != myDriveSafely) + { + if (safe) + { + ArLog::log(ArLog::Normal, "Driving safely again"); + } + else + { + ArLog::log(ArLog::Normal, "Driving UNSAFELY"); + } + myNewDriveSafely = true; + } + myDriveSafely = safe; + if (isActive()) + driveJoystick(myVel, myRotVel); +} + +AREXPORT bool ArServerModeDrive::getSafeDriving(void) +{ + return myDriveSafely; +} + +AREXPORT void ArServerModeDrive::serverSafeDrivingEnable(void) +{ + myRobot->lock(); + setSafeDriving(true); + myRobot->unlock(); +} + +AREXPORT void ArServerModeDrive::serverSafeDrivingDisable(void) +{ + myRobot->lock(); + setSafeDriving(false); + myRobot->unlock(); +} + +AREXPORT void ArServerModeDrive::addControlCommands(ArServerHandlerCommands *handlerCommands) +{ + myHandlerCommands = handlerCommands; + myHandlerCommands->addCommand( + "safeDrivingEnable", + "Enables safe driving, which will attempt to prevent collisions (default)", + &myServerSafeDrivingEnableCB, "UnsafeMovement"); + myHandlerCommands->addCommand( + "safeDrivingDisable", + "Disables safe driving, this is UNSAFE and will let you drive your robot into things or down stairs, use at your own risk", + &myServerSafeDrivingDisableCB, "UnsafeMovement"); +} + +AREXPORT void ArServerModeDrive::setThrottleParams(int lowSpeed, int highSpeed) +{ + myJoydriveAction.setThrottleParams(lowSpeed, highSpeed); +} + + +/** + * @param vel Forward velocity + * @param rotVel Rotational velocity + * @param isActivating a bool set to true only if this method is called from the activate() + * method, otherwise false +**/ +AREXPORT void ArServerModeDrive::driveJoystick(double vel, double rotVel, bool isActivating) +{ + bool wasActive; + wasActive = isActive(); + + myVel = vel; + myRotVel = rotVel; + + // KMC: Changed the following test to include isActivating. + // if (!wasActive && !baseActivate()) + // return; + + // The baseActivate() method should only be called in the context of the activate() + // method. + if (isActivating && !wasActive) { + if (!baseActivate()) { + return; + } + } // end if activating and wasn't previously active + + + // This is to handle the case where ratioDrive is called outside the + // activate() method, and the activation was not successful. + if (!isActive()) { + return; + } + + if (!wasActive || myNewDriveSafely) + { + myRobot->clearDirectMotion(); + if (myDriveSafely) + { + myDriveGroup.activateExclusive(); + myMode = "Drive"; + ArLog::log(ArLog::Verbose, "Driving safely"); + } + else + { + myRobot->deactivateActions(); + myJoydriveAction.activate(); + myInputAction->activate(); + if (myExtraUnsafeAction != NULL) + myExtraUnsafeAction->activate(); + myMode = "UNSAFE Drive"; + ArLog::log(ArLog::Verbose, "Driving unsafely"); + } + } + myNewDriveSafely = false; + + myVel = vel; + myRotVel = rotVel; + + myDriveGroup.setVel(vel); + myDriveGroup.setRotVel(rotVel); + + setActivityTimeToNow(); +} + +AREXPORT void ArServerModeDrive::serverDriveJoystick(ArServerClient *client, + ArNetPacket *packet) +{ + double vel; + double rotVel; + + vel = packet->bufToByte2(); + rotVel = packet->bufToByte2(); + myRobot->lock(); + + // Activate if necessary. Note that this is done before the ratioDrive + // call because we want the new ratio values to be applied after the + // default ones. + if (!isActive()) { + activate(); + } + driveJoystick(vel, rotVel); + myRobot->unlock(); +} + +AREXPORT void ArServerModeDrive::joyUserTask(void) +{ + // if we're not active but we should be + if (myTakeControlOnJoystick && !isActive() && + myJoyHandler->haveJoystick() && myJoyHandler->getButton(1)) + { + if (ArServerMode::getActiveMode() != NULL) + ArLog::log(ArLog::Normal, + "ArServerModeDrive: Activating instead of %s because of local joystick", ArServerMode::getActiveMode()->getName()); + else + ArLog::log(ArLog::Normal, + "ArServerModeDrive: Activating because of local joystick"); + activate(); + } +} + +AREXPORT void ArServerModeDrive::userTask(void) +{ + // Sets the robot so that we always thing we're trying to move in + // this mode + myRobot->forceTryingToMove(); + + if (myJoyHandler->haveJoystick() && myJoyHandler->getButton(1)) + setActivityTimeToNow(); + if (!myStatusSetThisCycle) + { + if (myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + myStatus = "Stalled"; + // this works because if the motors stalled above caught it, if + // not and more values it means a stall + else if (myRobot->getStallValue()) + myStatus = "Bumped"; + else if (ArMath::fabs(myRobot->getVel()) < 2 && + ArMath::fabs(myRobot->getRotVel()) < 2) + myStatus = "Stopped"; + else + myStatus = "Driving"; + } + myStatusSetThisCycle = false; +} + + + + diff --git a/Legacy/Aria/ArNetworking/src/ArServerModeIdle.cpp b/Legacy/Aria/ArNetworking/src/ArServerModeIdle.cpp new file mode 100644 index 0000000..3aa0029 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerModeIdle.cpp @@ -0,0 +1,163 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerModeIdle.h" + +AREXPORT ArServerModeIdle::ArServerModeIdle(ArServerBase *server, + ArRobot *robot) : + ArServerMode(robot, server, "idle"), + myStopGroup(robot) +{ + myStatus = "Idle processing"; + myMode = "Idle"; + + myUseLocationDependentDevices = true; + + myModeInterrupted = NULL; + + myLimiterForward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterForward"); + myStopGroup.addAction(myLimiterForward, 150); + + myLimiterBackward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterBackward", + ArActionDeceleratingLimiter::BACKWARDS); + myStopGroup.addAction(myLimiterBackward, 149); + + myLimiterLateralLeft = NULL; + if (myRobot->hasLatVel()) + { + myLimiterLateralLeft = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralLeft", + ArActionDeceleratingLimiter::LATERAL_LEFT); + myStopGroup.addAction(myLimiterLateralLeft, 148); + } + + myLimiterLateralRight = NULL; + if (myRobot->hasLatVel()) + { + myLimiterLateralRight = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralRight", + ArActionDeceleratingLimiter::LATERAL_RIGHT); + myStopGroup.addAction(myLimiterLateralRight, 147); + } + + + +} + +AREXPORT ArServerModeIdle::~ArServerModeIdle() +{ + +} + +AREXPORT void ArServerModeIdle::activate(void) +{ + if (isActive()) + return; + + if (!baseActivate()) + { + /* + ArLog::log(ArLog::Normal, + "IDLE: Clearing mode interrupted since could not activate..."); + */ + myModeInterrupted = NULL; + return; + } + + //ArLog::log(ArLog::Normal, "IDLE... um... %p", myModeInterrupted); + + myRobot->stop(); + myRobot->clearDirectMotion(); + myStopGroup.activateExclusive(); + setActivityTimeToNow(); + ArLog::log(ArLog::Normal, "Idle processing mode activated"); +} + +AREXPORT void ArServerModeIdle::deactivate(void) +{ + ArLog::log(ArLog::Normal, "Idle processing mode deactivating"); + myStopGroup.deactivate(); + baseDeactivate(); +} + +AREXPORT void ArServerModeIdle::userTask(void) +{ + if (fabs(myRobot->getVel()) > 2 || fabs(myRobot->getRotVel()) > 2 || + (myRobot->hasLatVel() && fabs(myRobot->getLatVel()) > 2)) + { + myStatus = "Stopping"; + setActivityTimeToNow(); + } + else + { + myStatus = "Idle processing"; + } + + //ArLog::log(ArLog::Normal, "Idle mode called"); + if (!myServer->idleProcessingPending()) + { + //ArLog::log(ArLog::Normal, "Idle mode done"); + deactivate(); + } +} + +AREXPORT void ArServerModeIdle::addToConfig(ArConfig *config, + const char *section) +{ + myLimiterForward->addToConfig(config, section, "Forward"); + myLimiterBackward->addToConfig(config, section, "Backward"); + if (myLimiterLateralLeft != NULL) + myLimiterLateralLeft->addToConfig(config, section, "Lateral"); + if (myLimiterLateralRight != NULL) + myLimiterLateralRight->addToConfig(config, section, "Lateral"); +} + +AREXPORT void ArServerModeIdle::setUseLocationDependentDevices( + bool useLocationDependentDevices, bool internal) +{ + if (!internal) + myRobot->lock(); + // if this is a change then print it + if (useLocationDependentDevices != myUseLocationDependentDevices) + { + myUseLocationDependentDevices = useLocationDependentDevices; + myLimiterForward->setUseLocationDependentDevices( + myUseLocationDependentDevices); + myLimiterBackward->setUseLocationDependentDevices( + myUseLocationDependentDevices); + if (myLimiterLateralLeft != NULL) + myLimiterLateralLeft->setUseLocationDependentDevices( + myUseLocationDependentDevices); + if (myLimiterLateralRight != NULL) + myLimiterLateralRight->setUseLocationDependentDevices( + myUseLocationDependentDevices); + } + if (!internal) + myRobot->unlock(); +} + +AREXPORT bool ArServerModeIdle::getUseLocationDependentDevices(void) +{ + return myUseLocationDependentDevices; +} + + +AREXPORT void ArServerModeIdle::setModeInterrupted( + ArServerMode *modeInterrupted) +{ + /* + if (modeInterrupted != NULL) + ArLog::log(ArLog::Normal, "IDLE: Setting mode interrupted to %s", + modeInterrupted->getName()); + else + ArLog::log(ArLog::Normal, "IDLE: Setting mode interrupted to NULL"); + */ + myModeInterrupted = modeInterrupted; +} + +AREXPORT ArServerMode *ArServerModeIdle::getModeInterrupted(void) +{ + return myModeInterrupted; +} + diff --git a/Legacy/Aria/ArNetworking/src/ArServerModeRatioDrive.cpp b/Legacy/Aria/ArNetworking/src/ArServerModeRatioDrive.cpp new file mode 100644 index 0000000..f531259 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerModeRatioDrive.cpp @@ -0,0 +1,543 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerModeRatioDrive.h" +#include "ArServerHandlerCommands.h" + +AREXPORT ArServerModeRatioDrive::ArServerModeRatioDrive( + ArServerBase *server, ArRobot *robot, bool takeControlOnJoystick, + bool useComputerJoystick, bool useRobotJoystick, + bool useServerCommands, const char *name, + bool robotJoystickOverridesLocks) : + ArServerMode(robot, server, name), + myRatioDriveGroup(robot), + myJoyUserTaskCB(this, &ArServerModeRatioDrive::joyUserTask), + myServerSetSafeDriveCB(this, + &ArServerModeRatioDrive::serverSetSafeDrive), + myServerGetSafeDriveCB(this, + &ArServerModeRatioDrive::serverGetSafeDrive), + myServerRatioDriveCB(this, &ArServerModeRatioDrive::serverRatioDrive), + myRatioFireCB(this, &ArServerModeRatioDrive::ratioFireCallback), + myServerSafeDrivingEnableCB(this, + &ArServerModeRatioDrive::serverSafeDrivingEnable), + myServerSafeDrivingDisableCB(this, + &ArServerModeRatioDrive::serverSafeDrivingDisable) +{ + myHandlerCommands = NULL; + myDriveSafely = true; + myTakeControlOnJoystick = takeControlOnJoystick; + myUseComputerJoystick = useComputerJoystick; + myUseRobotJoystick = useRobotJoystick; + myUseServerCommands = useServerCommands; + myUseLocationDependentDevices = true; + myRobotJoystickOverridesLock = robotJoystickOverridesLocks; + myTimeout = 2; + myGotServerCommand = true; + + myLastTimedOut = false; + + // SEEKUR + mySentRecenter = false; + + // add the actions, put the ratio input on top, then have the + // limiters since the ratio doesn't touch decel except lightly + // whereas the limiter will touch it strongly + + myRatioAction = new ArActionRatioInput; + myRatioDriveGroup.addAction(myRatioAction, 50); + + myLimiterForward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterForward", ArActionDeceleratingLimiter::FORWARDS); + myRatioDriveGroup.addAction(myLimiterForward, 40); + + myLimiterBackward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterBackward", + ArActionDeceleratingLimiter::BACKWARDS); + myRatioDriveGroup.addAction(myLimiterBackward, 39); + + myLimiterLateralLeft = NULL; + myLimiterLateralRight = NULL; + if (myRobot->hasLatVel()) + { + myLimiterLateralLeft = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralLeft", + ArActionDeceleratingLimiter::LATERAL_LEFT); + myRatioDriveGroup.addAction(myLimiterLateralLeft, 38); + myLimiterLateralRight = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralRight", + ArActionDeceleratingLimiter::LATERAL_RIGHT); + myRatioDriveGroup.addAction(myLimiterLateralRight, 37); + } + + myMovementParameters = new ArActionMovementParameters("TeleopMovementParameters", false); + myRatioDriveGroup.addAction(myMovementParameters, 1); + + myRatioFireCB.setName("ArServerModeRatioDrive"); + myRatioAction->addFireCallback(30, &myRatioFireCB); + + myLastRobotSafeDrive = true; + + if (myServer != NULL && myUseServerCommands) + { + addModeData("ratioDrive", "drives the robot as with a joystick", + &myServerRatioDriveCB, + "double: transRatio; double: rotRatio; double: throttleRatio ", + "none", "Movement", "RETURN_NONE"); + myServer->addData("setSafeDrive", + "sets whether we drive the robot safely or not", + &myServerSetSafeDriveCB, + "byte: 1 == drive safely, 0 == drive unsafely", + "none", "UnsafeMovement", "RETURN_NONE"); + myServer->addData("getSafeDrive", + "gets whether we drive the robot safely or not", + &myServerGetSafeDriveCB, + "none", + "byte: 1 == driving safely, 0 == driving unsafely", + "Movement", "RETURN_SINGLE"); + } + + if (myUseComputerJoystick) + { + myJoydrive = new ArRatioInputJoydrive(robot, myRatioAction); + if ((myJoyHandler = Aria::getJoyHandler()) == NULL) + { + myJoyHandler = new ArJoyHandler; + myJoyHandler->init(); + Aria::setJoyHandler(myJoyHandler); + } + } + if (myUseRobotJoystick) + { + myRobotJoydrive = new ArRatioInputRobotJoydrive(robot, myRatioAction); + if ((myRobotJoyHandler = Aria::getRobotJoyHandler()) == NULL) + { + myRobotJoyHandler = new ArRobotJoyHandler(robot); + Aria::setRobotJoyHandler(myRobotJoyHandler); + } + } + if (myUseRobotJoystick || myUseComputerJoystick) + { + std::string taskName = name; + taskName += "::joyUserTask"; + myRobot->addUserTask(taskName.c_str(), 75, &myJoyUserTaskCB); + } + + myPrinting = false; +} + +AREXPORT ArServerModeRatioDrive::~ArServerModeRatioDrive() +{ + +} + +AREXPORT void ArServerModeRatioDrive::addToConfig(ArConfig *config, + const char *section) +{ + config->addParam( + ArConfigArg( + "Timeout", &myTimeout, + "If there are no commands for this period of time, then the robot will stop. 0 Disables. This is a double so you can do like .1 seconds if you want.", 0), + section, ArPriority::ADVANCED); + myRatioAction->addToConfig(config, section); + myLimiterForward->addToConfig(config, section, "Forward"); + myLimiterBackward->addToConfig(config, section, "Backward"); + if (myLimiterLateralLeft != NULL) + myLimiterLateralLeft->addToConfig(config, section, "Lateral"); + if (myLimiterLateralRight != NULL) + myLimiterLateralRight->addToConfig(config, section, "Lateral"); + myMovementParameters->addToConfig(config, section, "Teleop"); + +} + +AREXPORT void ArServerModeRatioDrive::activate(void) +{ + //if (!baseActivate()) { + // return; + //} + ratioDrive(0, 0, 100, true); +} + +AREXPORT void ArServerModeRatioDrive::deactivate(void) +{ + myRatioDriveGroup.deactivate(); + baseDeactivate(); +} + +AREXPORT void ArServerModeRatioDrive::setSafeDriving(bool safe, bool internal) +{ + if (!internal) + myRobot->lock(); + // if this is a change then print it + if (safe != myDriveSafely) + { + if (safe) + { + ArLog::log(ArLog::Normal, "%s: Driving safely again", myName.c_str()); + } + else + { + ArLog::log(ArLog::Normal, "%s: Driving UNSAFELY", myName.c_str()); + } + myNewDriveSafely = true; + } + myDriveSafely = safe; + // ratioDrive is only called if this mode is already active (and now just sends 0s) + if (isActive()) + ratioDrive(0, 0, 0, false, 0); + /* + ratioDrive(myRatioAction->getTransRatio(), + myRatioAction->getRotRatio(), + myRatioAction->getThrottleRatio()); + */ + if (!internal) + myRobot->unlock(); +} + +AREXPORT bool ArServerModeRatioDrive::getSafeDriving(void) +{ + return myDriveSafely; +} + +AREXPORT void ArServerModeRatioDrive::serverSafeDrivingEnable(void) +{ + setSafeDriving(true); +} + +AREXPORT void ArServerModeRatioDrive::serverSafeDrivingDisable(void) +{ + setSafeDriving(false); +} + +AREXPORT void ArServerModeRatioDrive::addControlCommands(ArServerHandlerCommands *handlerCommands) +{ + if (!myUseServerCommands) + { + ArLog::log(ArLog::Normal, + "ArServerModeRatioDrive::addControlCommands: Tried to add control commands to a ratio drive not using the server"); + return; + } + myHandlerCommands = handlerCommands; + myHandlerCommands->addCommand( + "safeRatioDrivingEnable", + "Enables safe driving with ratioDrive, which will attempt to prevent collisions (default)", + &myServerSafeDrivingEnableCB, "UnsafeMovement"); + myHandlerCommands->addCommand( + "safeRatioDrivingDisable", + "Disables safe driving with ratioDrive, this is UNSAFE and will let you drive your robot into things or down stairs, use at your own risk", + &myServerSafeDrivingDisableCB, "UnsafeMovement"); +} + + +/** + * @param isActivating a bool set to true only if this method is called from the activate() + * method, otherwise false + * @param transRatio Amount of forward velocity to request + * @param rotRatio Amount of rotational velocity to request + * @param throttleRatio Amount of speed to request + * @param latRatio amount of lateral velocity to request (if robot supports it) +**/ +AREXPORT void ArServerModeRatioDrive::ratioDrive( + double transRatio, double rotRatio, double throttleRatio, + bool isActivating, double latRatio) +{ + bool wasActive; + wasActive = isActive(); + + myTransRatio = transRatio; + myRotRatio = rotRatio; + myThrottleRatio = throttleRatio; + myLatRatio = latRatio; + + // KMC: Changed the following test to include isActivating. + // if (!wasActive && !baseActivate()) + // return; + + // The baseActivate() method should only be called in the context of the activate() + // method. + if (isActivating && !wasActive) { + if (!baseActivate()) { + return; + } + } // end if activating and wasn't previously active + + // This is to handle the case where ratioDrive is called outside the + // activate() method, and the activation was not successful. + if (!isActive()) { + return; + } + + if (!wasActive || myNewDriveSafely) + { + myRobot->clearDirectMotion(); + if (myDriveSafely) + { + myRatioDriveGroup.activateExclusive(); + myMode = "Drive"; + ArLog::log(ArLog::Normal, "%s: Driving safely", myName.c_str()); + } + else + { + myRobot->deactivateActions(); + myRatioAction->activate(); + myMode = "UNSAFE Drive"; + ArLog::log(ArLog::Normal, "%s: Driving unsafely", myName.c_str()); + } + if (myDriveSafely) + mySafeDrivingCallbacks.invoke(); + else + myUnsafeDrivingCallbacks.invoke(); + } + myNewDriveSafely = false; + + // MPL why is this here twice? + myTransRatio = transRatio; + myRotRatio = rotRatio; + myThrottleRatio = throttleRatio; + myLatRatio = latRatio; + + setActivityTimeToNow(); + myLastCommand.setToNow(); + + + // SEEKUR + mySentRecenter = false; + + if (myPrinting) + ArLog::log(ArLog::Normal, "%s: cmd %.0f %.0f %.0f %.0f", + getName(), transRatio, rotRatio, throttleRatio, latRatio); + if (myTransRatio < -0.1) + myDrivingBackwardsCallbacks.invoke(); + //myRatioAction.setRatios(transRatio, rotRatio, throttleRatio); +} + +AREXPORT void ArServerModeRatioDrive::serverRatioDrive(ArServerClient *client, + ArNetPacket *packet) +{ + double transRatio = packet->bufToDouble(); + double rotRatio = packet->bufToDouble(); + double throttleRatio = packet->bufToDouble(); + double lateralRatio = packet->bufToDouble(); + + myGotServerCommand = true; + + if (!myDriveSafely && !client->hasGroupAccess("UnsafeMovement")) + serverSafeDrivingEnable(); + myRobot->lock(); + + // Activate if necessary. Note that this is done before the ratioDrive + // call because we want the new ratio values to be applied after the + // default ones. + if (!isActive()) { + activate(); + } + + if (myPrinting) + ArLog::log(ArLog::Normal, + "%s: serverCmd (%s) trans %.0f rot %.0f lat %.0f ratio %.0f", + + getName(), client->getIPString(), + transRatio, rotRatio, lateralRatio, throttleRatio); + + ratioDrive(transRatio, rotRatio, throttleRatio, false, lateralRatio); + myRobot->unlock(); +} + +AREXPORT void ArServerModeRatioDrive::serverSetSafeDrive( + ArServerClient *client, ArNetPacket *packet) +{ + if (packet->bufToUByte() == 0) + setSafeDriving(false); + else + setSafeDriving(true); +} + +AREXPORT void ArServerModeRatioDrive::serverGetSafeDrive( + ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendPacket; + if (getSafeDriving()) + sendPacket.uByteToBuf(1); + else + sendPacket.uByteToBuf(0); + + client->sendPacketTcp(&sendPacket); +} + + +AREXPORT void ArServerModeRatioDrive::joyUserTask(void) +{ + // if we're not active but we should be + if (myTakeControlOnJoystick && !isActive() && + ((myUseComputerJoystick && myJoyHandler->haveJoystick() && + myJoyHandler->getButton(1)) || + (myUseRobotJoystick && myRobotJoyHandler->gotData() && + myRobotJoyHandler->getButton1()))) + { + if (ArServerMode::getActiveMode() != NULL) + ArLog::log(ArLog::Normal, + "%s: Activating instead of %s because of local joystick", + myName.c_str(), + ArServerMode::getActiveMode()->getName()); + else + ArLog::log(ArLog::Normal, + "%s: Activating because of local joystick", + myName.c_str()); + // if we're locked and are overriding that lock for the robot + // joystick and it was the robot joystick that caused it to happen + if (myUseRobotJoystick && myRobotJoyHandler->gotData() && + myRobotJoyHandler->getButton1() && myRobotJoystickOverridesLock && + ArServerMode::ourActiveModeLocked) + { + ArLog::log(ArLog::Terse, "Robot joystick is overriding locked mode %s", + ourActiveMode->getName()); + ourActiveMode->forceUnlock(); + myRobot->enableMotors(); + } + activate(); + } + bool unsafeRobotDrive; + if (myUseRobotJoystick && myRobotJoyHandler->gotData() && + ((unsafeRobotDrive = + (bool)(myRobot->getFaultFlags() & ArUtil::BIT15)) != + !myLastRobotSafeDrive)) + { + myLastRobotSafeDrive = !unsafeRobotDrive; + setSafeDriving(myLastRobotSafeDrive, true); + } +} + +AREXPORT void ArServerModeRatioDrive::userTask(void) +{ + // Sets the robot so that we always think we're trying to move in + // this mode + myRobot->forceTryingToMove(); + + bool moving = (fabs(myRobot->getVel()) > 1 || + fabs(myRobot->getRotVel()) > 1 || + fabs(myRobot->getLatVel()) > 1); + + bool wantToMove; + if ((myTransRatio < .1 && myRotRatio < .1 && myLatRatio < .1) || + myThrottleRatio < .1) + wantToMove = false; + else + wantToMove = true; + + // if the joystick is pushed then set that we're active, server + // commands'll go into ratioDrive and set it there too + if ((myUseComputerJoystick && myJoyHandler->haveJoystick() && + myJoyHandler->getButton(1)) || + (myUseRobotJoystick && myRobotJoyHandler->gotData() && + myRobotJoyHandler->getButton1()) || + (myUseServerCommands && myGotServerCommand) || + moving) + { + setActivityTimeToNow(); + } + + myGotServerCommand = false; + + bool timedOut = false; + // if we want to move, and there is a timeout, and the activity time is + // greater than the timeout, then stop the robot + if (wantToMove && + myTimeout > .0000001 && + myLastCommand.mSecSince()/1000.0 >= myTimeout) + + { + if (!myLastTimedOut) + { + ArLog::log(ArLog::Normal, "Stopping the robot since teleop timed out"); + myRobot->stop(); + myRobot->clearDirectMotion(); + ArTime lastCommand = myLastCommand; + ratioDrive(0, 0, 0, false, 0); + myLastCommand = lastCommand; + } + timedOut = true; + } + + myLastTimedOut = timedOut; + + // SEEKUR (needed for prototype versions) + /* + if (myRobot->hasLatVel() && !mySentRecenter && + getActivityTime().secSince() >= 10) + { + mySentRecenter = true; + myRobot->com(120); + } + */ + + if (!myStatusSetThisCycle) + { + if (myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + myStatus = "Stalled"; + // this works because if the motors stalled above caught it, if + // not and more values it means a stall + else if (myRobot->getStallValue()) + myStatus = "Bumped"; + else if (ArMath::fabs(myRobot->getVel()) < 2 && + ArMath::fabs(myRobot->getRotVel()) < 1 && + (!myRobot->hasLatVel() || ArMath::fabs(myRobot->getLatVel()) < 2)) + myStatus = "Stopped"; + else + myStatus = "Driving"; + } + + myStatusSetThisCycle = false; +} // end method userTask + + +AREXPORT void ArServerModeRatioDrive::ratioFireCallback(void) +{ + if (myPrinting) + ArLog::log(ArLog::Normal, "ArServerModeRatioDrive: TransRatio=%.0f RotRatio=%.0f ThrottleRatio=%.0f LatRatio=%.0f", + myTransRatio, myRotRatio, myThrottleRatio, myLatRatio); + myRatioAction->setRatios(myTransRatio, myRotRatio, myThrottleRatio, + myLatRatio); +} + +AREXPORT void ArServerModeRatioDrive::setUseLocationDependentDevices( + bool useLocationDependentDevices, bool internal) +{ + if (!internal) + myRobot->lock(); + // if this is a change then print it + if (useLocationDependentDevices != myUseLocationDependentDevices) + { + if (useLocationDependentDevices) + { + ArLog::log(ArLog::Normal, "%s: Using location dependent range devices", + myName.c_str()); + } + else + { + ArLog::log(ArLog::Normal, + "%s: Not using location dependent range devices", + myName.c_str()); + } + myUseLocationDependentDevices = useLocationDependentDevices; + myLimiterForward->setUseLocationDependentDevices( + myUseLocationDependentDevices); + myLimiterBackward->setUseLocationDependentDevices( + myUseLocationDependentDevices); + if (myLimiterLateralLeft != NULL) + myLimiterLateralLeft->setUseLocationDependentDevices( + myUseLocationDependentDevices); + if (myLimiterLateralRight != NULL) + myLimiterLateralRight->setUseLocationDependentDevices( + myUseLocationDependentDevices); + + } + if (!internal) + myRobot->unlock(); +} + +AREXPORT bool ArServerModeRatioDrive::getUseLocationDependentDevices(void) +{ + return myUseLocationDependentDevices; +} + + + + diff --git a/Legacy/Aria/ArNetworking/src/ArServerModeStop.cpp b/Legacy/Aria/ArNetworking/src/ArServerModeStop.cpp new file mode 100644 index 0000000..fcd1be4 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerModeStop.cpp @@ -0,0 +1,139 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerModeStop.h" + +AREXPORT ArServerModeStop::ArServerModeStop(ArServerBase *server, + ArRobot *robot, + bool defunct) : + ArServerMode(robot, server, "stop"), + myStopGroup(robot), + myNetStopCB(this, &ArServerModeStop::netStop) +{ + myMode = "Stop"; + if (myServer != NULL) + { + addModeData("stop", "stops the robot", &myNetStopCB, + "none", "none", "Stop", "RETURN_NONE"); + } + + myUseLocationDependentDevices = true; + + myLimiterForward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterForward"); + myStopGroup.addAction(myLimiterForward, 150); + + myLimiterBackward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterBackward", + ArActionDeceleratingLimiter::BACKWARDS); + myStopGroup.addAction(myLimiterBackward, 149); + + myLimiterLateralLeft = NULL; + if (myRobot->hasLatVel()) + { + myLimiterLateralLeft = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralLeft", + ArActionDeceleratingLimiter::LATERAL_LEFT); + myStopGroup.addAction(myLimiterLateralLeft, 148); + } + + myLimiterLateralRight = NULL; + if (myRobot->hasLatVel()) + { + myLimiterLateralRight = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralRight", + ArActionDeceleratingLimiter::LATERAL_RIGHT); + myStopGroup.addAction(myLimiterLateralRight, 147); + } + +} + +AREXPORT ArServerModeStop::~ArServerModeStop() +{ + +} + +AREXPORT void ArServerModeStop::activate(void) +{ + if (isActive() || !baseActivate()) + return; + setActivityTimeToNow(); + myRobot->stop(); + myRobot->clearDirectMotion(); + myStopGroup.activateExclusive(); + myStatus = "Stopping"; +} + +AREXPORT void ArServerModeStop::deactivate(void) +{ + myStopGroup.deactivate(); + baseDeactivate(); +} + +AREXPORT void ArServerModeStop::stop(void) +{ + activate(); +} + +AREXPORT void ArServerModeStop::netStop(ArServerClient *client, + ArNetPacket *packet) +{ + setActivityTimeToNow(); + myRobot->lock(); + ArLog::log(ArLog::Verbose, "Stopping"); + stop(); + myRobot->unlock(); +} + +AREXPORT void ArServerModeStop::userTask(void) +{ + if (myRobot->getVel() < 2 && myRobot->getRotVel() < 2) + { + myStatus = "Stopped"; + } + else + { + setActivityTimeToNow(); + myStatus = "Stopping"; + } +} + +AREXPORT void ArServerModeStop::addToConfig(ArConfig *config, + const char *section) +{ + myLimiterForward->addToConfig(config, section, "Forward"); + myLimiterBackward->addToConfig(config, section, "Backward"); + if (myLimiterLateralLeft != NULL) + myLimiterLateralLeft->addToConfig(config, section, "Lateral"); + if (myLimiterLateralRight != NULL) + myLimiterLateralRight->addToConfig(config, section, "Lateral"); +} + +AREXPORT void ArServerModeStop::setUseLocationDependentDevices( + bool useLocationDependentDevices, bool internal) +{ + if (!internal) + myRobot->lock(); + // if this is a change then print it + if (useLocationDependentDevices != myUseLocationDependentDevices) + { + myUseLocationDependentDevices = useLocationDependentDevices; + myLimiterForward->setUseLocationDependentDevices( + myUseLocationDependentDevices); + myLimiterBackward->setUseLocationDependentDevices( + myUseLocationDependentDevices); + if (myLimiterLateralLeft != NULL) + myLimiterLateralLeft->setUseLocationDependentDevices( + myUseLocationDependentDevices); + if (myLimiterLateralRight != NULL) + myLimiterLateralRight->setUseLocationDependentDevices( + myUseLocationDependentDevices); + } + if (!internal) + myRobot->unlock(); +} + +AREXPORT bool ArServerModeStop::getUseLocationDependentDevices(void) +{ + return myUseLocationDependentDevices; +} + diff --git a/Legacy/Aria/ArNetworking/src/ArServerModeWander.cpp b/Legacy/Aria/ArNetworking/src/ArServerModeWander.cpp new file mode 100644 index 0000000..58a565d --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerModeWander.cpp @@ -0,0 +1,64 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerModeWander.h" + +AREXPORT ArServerModeWander::ArServerModeWander(ArServerBase *server, ArRobot *robot) : + ArServerMode(robot, server, "wander"), + myWanderGroup(robot), + myNetWanderCB(this, &ArServerModeWander::netWander) +{ + myMode = "Wander"; + if (myServer != NULL) + { + addModeData("wander", "makes the robot wander", &myNetWanderCB, + "none", "none", "Movement", "RETURN_NONE"); + } +} + +AREXPORT ArServerModeWander::~ArServerModeWander() +{ + +} + +AREXPORT void ArServerModeWander::activate(void) +{ + if (!baseActivate()) + return; + + setActivityTimeToNow(); + myRobot->clearDirectMotion(); + myWanderGroup.activateExclusive(); + myStatus = "Wandering"; +} + +AREXPORT void ArServerModeWander::deactivate(void) +{ + myWanderGroup.deactivate(); + baseDeactivate(); +} + +AREXPORT void ArServerModeWander::wander(void) +{ + activate(); +} + +AREXPORT void ArServerModeWander::netWander(ArServerClient *client, + ArNetPacket *packet) +{ + myRobot->lock(); + ArLog::log(ArLog::Verbose, "Wandering"); + wander(); + myRobot->unlock(); + setActivityTimeToNow(); +} + +AREXPORT void ArServerModeWander::userTask(void) +{ + setActivityTimeToNow(); + + // Sets the robot so that we always thing we're trying to move in + // this mode + myRobot->forceTryingToMove(); + + //myStatus = "Wandering"; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerSimpleCommands.cpp b/Legacy/Aria/ArNetworking/src/ArServerSimpleCommands.cpp new file mode 100644 index 0000000..2a08f41 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerSimpleCommands.cpp @@ -0,0 +1,971 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerBase.h" +#include "ArServerSimpleCommands.h" + +AREXPORT ArServerSimpleComUC::ArServerSimpleComUC( + ArServerHandlerCommands *handlerCommands, ArRobot *robot) : + myCommandCB(this, &ArServerSimpleComUC::command), + myMotionCommandCB(this, &ArServerSimpleComUC::motionCommand) +{ + myHandlerCommands = handlerCommands; + myRobot = robot; + if (myHandlerCommands != NULL) + { + myHandlerCommands->addStringCommand("MicroControllerCommand", + "MicroController (uC) command mode has three ways to send commands:\ncom: \ncomInt: \ncom2Bytes: ", &myCommandCB); + myHandlerCommands->addStringCommand("MicroControllerMotionCommand", + "MicroController (uC) motion commands will suspend normal motion commands to the microcontroller and ONLY the motion commands will be in charge. This will last until the server mode is changed or stop is pressed (unless the server mode is locked, ie docking). This has four ways to send commands:\ncom: \ncomInt: \ncom2Bytes: :", &myMotionCommandCB); + } +} + +AREXPORT ArServerSimpleComUC::~ArServerSimpleComUC() +{ +} + + +AREXPORT void ArServerSimpleComUC::command(ArArgumentBuilder *arg) +{ + processCommand(arg, false); +} + +AREXPORT void ArServerSimpleComUC::motionCommand(ArArgumentBuilder *arg) +{ + processCommand(arg, true); +} + +void ArServerSimpleComUC::processCommand(ArArgumentBuilder *arg, + bool motionCommand) +{ + int command; + int int1; + int int2; + + std::string prefix; + + if (!motionCommand) + prefix = "uCCommand: "; + else + prefix = "uCMotionCommand: "; + myRobot->lock(); + if (motionCommand) + myRobot->stopStateReflection(); + if (arg->getFullString() == NULL || arg->getFullString()[0] == '\0' || + arg->getArgc() == 0) + { + if (motionCommand) + { + ArLog::log(ArLog::Terse, "%sReset to normal control.", + prefix.c_str()); + myRobot->stop(); + myRobot->clearDirectMotion(); + } + else + ArLog::log(ArLog::Terse, "%sSyntax error, no arguments.", + prefix.c_str()); + } + else if (arg->getArgc() == 1) + { + command = arg->getArgInt(0); + if (command < 0 || command > 255 || !arg->isArgInt(0)) + { + ArLog::log(ArLog::Terse, + "%sInvalid command, must be an integer between 0 and 255", + prefix.c_str()); + } + else + { + ArLog::log(ArLog::Terse, "%scom(%d)", prefix.c_str(), command); + myRobot->com(command); + } + } + else if (arg->getArgc() == 2) + { + command = arg->getArgInt(0); + int1 = arg->getArgInt(1); + if (command < 0 || command > 255 || !arg->isArgInt(0)) + { + ArLog::log(ArLog::Terse, + "%sInvalid command, must be an integer between 0 and 255", + prefix.c_str()); + } + else if (int1 < -32767 || int1 > 65536 || !arg->isArgInt(1)) + { + ArLog::log(ArLog::Terse, + "%sInvalid integer, must be an integer between -32767 and 65536", + prefix.c_str()); + } + else + { + ArLog::log(ArLog::Terse, "%scomInt(%d, %d)", prefix.c_str(), command, + int1); + myRobot->comInt(command, int1); + } + } + else if (arg->getArgc() == 3) + { + command = arg->getArgInt(0); + int1 = arg->getArgInt(1); + int2 = arg->getArgInt(2); + if (command < 0 || command > 255 || !arg->isArgInt(0)) + { + ArLog::log(ArLog::Terse, + "%sInvalid command, must be between 0 and 255", + prefix.c_str()); + } + else if (int1 < -128 || int1 > 255 || !arg->isArgInt(1)) + { + ArLog::log(ArLog::Terse, + "%sInvalid byte1, must be an integer between -128 and 127, or between 0 and 255", prefix.c_str()); + } + else if (int2 < -128 || int2 > 255 || !arg->isArgInt(2)) + { + ArLog::log(ArLog::Terse, + "%sInvalid byte2, must be an integer between -128 and 127, or between 0 and 255", prefix.c_str()); + } + else + { + ArLog::log(ArLog::Terse, + "%scom2Bytes(%d, %d, %d)", + prefix.c_str(), command, int1, int2); + myRobot->com2Bytes(command, int1, int2); + } + } + else + { + ArLog::log(ArLog::Terse, "%sSyntax error, too many arguments", + prefix.c_str()); + } + myRobot->unlock(); +} + + +AREXPORT ArServerSimpleComMovementLogging::ArServerSimpleComMovementLogging( + ArServerHandlerCommands *handlerCommands, ArRobot *robot, + ArServerHandlerPopup *popupHandler) : + myLogMovementSentEnableCB(this, + &ArServerSimpleComMovementLogging::logMovementSentEnable), + myLogMovementSentDisableCB(this, + &ArServerSimpleComMovementLogging::logMovementSentDisable), + myLogMovementReceivedEnableCB(this, + &ArServerSimpleComMovementLogging::logMovementReceivedEnable), + myLogMovementReceivedDisableCB(this, + &ArServerSimpleComMovementLogging::logMovementReceivedDisable), + myLogVelocitiesReceivedEnableCB(this, + &ArServerSimpleComMovementLogging::logVelocitiesReceivedEnable), + myLogVelocitiesReceivedDisableCB(this, + &ArServerSimpleComMovementLogging::logVelocitiesReceivedDisable), + myPacketsReceivedTrackingEnableCB(this, + &ArServerSimpleComMovementLogging::packetsReceivedTrackingEnable), + myPacketsReceivedTrackingDisableCB(this, + &ArServerSimpleComMovementLogging::packetsReceivedTrackingDisable), + myPacketsSentTrackingEnableCB(this, + &ArServerSimpleComMovementLogging::packetsSentTrackingEnable), + myPacketsSentTrackingDisableCB(this, + &ArServerSimpleComMovementLogging::packetsSentTrackingDisable), + myLogActionsEnableCB(this, + &ArServerSimpleComMovementLogging::logActionsEnable), + myLogActionsDisableCB(this, + &ArServerSimpleComMovementLogging::logActionsDisable), + myLogActionsCB(this, &ArServerSimpleComMovementLogging::logActions), + myPopupMovementParamsCB(this, + &ArServerSimpleComMovementLogging::popupMovementParams), + myResetOdometerCB(this, &ArServerSimpleComMovementLogging::resetOdometer) +{ + myHandlerCommands = handlerCommands; + myRobot = robot; + myPopupHandler = popupHandler; + myHandlerCommands->addCommand( + "LogMovementSentEnable", + "Enables logging of the movement commands sent to the robot", + &myLogMovementSentEnableCB); + myHandlerCommands->addCommand( + "LogMovementSentDisable", + "Disables logging of the movement commands sent to the robot", + &myLogMovementSentDisableCB); + myHandlerCommands->addCommand( + "LogMovementReceivedEnable", + "Enables logging of the movement data received from the robot", + &myLogMovementReceivedEnableCB); + myHandlerCommands->addCommand( + "LogMovementReceivedDisable", + "Disables logging of the movement data received from the robot", + &myLogMovementReceivedDisableCB); + myHandlerCommands->addCommand( + "LogVelocitiesReceivedEnable", + "Enables logging of the velocity data received from the robot", + &myLogVelocitiesReceivedEnableCB); + myHandlerCommands->addCommand( + "LogVelocitiesReceivedDisable", + "Disables logging of the velocity data received from the robot", + &myLogVelocitiesReceivedDisableCB); + myHandlerCommands->addCommand( + "PacketsReceivedTrackingEnable", + "Enables tracking of packets received from the robot", + &myPacketsReceivedTrackingEnableCB); + myHandlerCommands->addCommand( + "PacketsReceivedTrackingDisable", + "Disables tracking of packets received from the robot", + &myPacketsReceivedTrackingDisableCB); + myHandlerCommands->addCommand( + "PacketsSentTrackingEnable", + "Enables tracking of packets sent to the robot", + &myPacketsSentTrackingEnableCB); + myHandlerCommands->addCommand( + "PacketsSentTrackingDisable", + "Disables tracking of packets sent to the robot", + &myPacketsSentTrackingDisableCB); + myHandlerCommands->addCommand( + "LogActionsEnable", + "Enables continual logging of the actions", + &myLogActionsEnableCB); + myHandlerCommands->addCommand( + "LogActionsDisable", + "Disables continual logging of the actions", + &myLogActionsDisableCB); + myHandlerCommands->addCommand( + "LogActions", + "Logs the state of the actions on the robot once", + &myLogActionsCB); + if (myPopupHandler != NULL) + { + myHandlerCommands->addCommand( + "PopupMovementParams", + "Creates a popup with the movement parameters for this robot", + &myPopupMovementParamsCB); + } + myHandlerCommands->addCommand( + "ResetTripOdometer", + "Resets the robot's trip odometer", + &myResetOdometerCB); + +} + +AREXPORT ArServerSimpleComMovementLogging::~ArServerSimpleComMovementLogging() +{ +} + +AREXPORT void ArServerSimpleComMovementLogging::logMovementSentEnable(void) +{ + myRobot->lock(); + myRobot->setLogMovementSent(true); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logMovementSentDisable(void) +{ + myRobot->lock(); + myRobot->setLogMovementSent(false); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logMovementReceivedEnable(void) +{ + myRobot->lock(); + myRobot->setLogMovementReceived(true); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logMovementReceivedDisable(void) +{ + myRobot->lock(); + myRobot->setLogMovementReceived(false); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logVelocitiesReceivedEnable(void) +{ + myRobot->lock(); + myRobot->setLogVelocitiesReceived(true); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logVelocitiesReceivedDisable(void) +{ + myRobot->lock(); + myRobot->setLogVelocitiesReceived(false); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::packetsReceivedTrackingEnable(void) +{ + myRobot->lock(); + myRobot->setPacketsReceivedTracking(true); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::packetsReceivedTrackingDisable(void) +{ + myRobot->lock(); + myRobot->setPacketsReceivedTracking(false); + myRobot->unlock(); +} + + +AREXPORT void ArServerSimpleComMovementLogging::packetsSentTrackingEnable(void) +{ + myRobot->lock(); + myRobot->setPacketsSentTracking(true); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::packetsSentTrackingDisable(void) +{ + myRobot->lock(); + myRobot->setPacketsSentTracking(false); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logActionsEnable(void) +{ + myRobot->lock(); + myRobot->setLogActions(true); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logActionsDisable(void) +{ + myRobot->lock(); + myRobot->setLogActions(false); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::logActions(void) +{ + myRobot->lock(); + myRobot->logActions(); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComMovementLogging::popupMovementParams(void) +{ + char buf[32000]; + myRobot->lock(); + sprintf(buf, "AbsoluteMaxTransVel %.0f AbsoluteMaxTransNegVel %.0f\nTransVelMax %.0f TransNegVelMax %.0f\n\nAbsoluteMaxTransAccel %.0f AbsoluteMaxTransDecel %.0f\nTransAccel %.0f TransDecel %.0f\n\nAbsoluteMaxRotVel %.0f AbsoluteMaxRotAccel %.0f AbsoluteMaxRotDecel %.0f\nRotVelMax %.0f RotAccel %.0f RotDecel %.0f", + myRobot->getAbsoluteMaxTransVel(), + myRobot->getAbsoluteMaxTransNegVel(), + myRobot->getTransVelMax(), + myRobot->getTransNegVelMax(), + myRobot->getAbsoluteMaxTransAccel(), + myRobot->getAbsoluteMaxTransDecel(), + myRobot->getTransAccel(), + myRobot->getTransDecel(), + myRobot->getAbsoluteMaxRotVel(), + myRobot->getAbsoluteMaxRotAccel(), + myRobot->getAbsoluteMaxRotDecel(), + myRobot->getRotVelMax(), + myRobot->getRotAccel(), + myRobot->getRotDecel()); + if (myRobot->hasLatVel()) + sprintf(buf, "%s\n\nAbsoluteMaxLatVel %.0f AbsoluteMaxLatAccel %.0f AbsoluteMaxLatDecel %.0f\nLatVelMax %.0f LatAccel %.0f LatDecel %.0f", + buf, + myRobot->getAbsoluteMaxLatVel(), + myRobot->getAbsoluteMaxLatAccel(), + myRobot->getAbsoluteMaxLatDecel(), + myRobot->getLatVelMax(), + myRobot->getLatAccel(), + myRobot->getLatDecel()); + + ArServerHandlerPopupInfo popupInfo( + NULL, "Robot Movement Parameters", buf, + ArServerHandlerPopup::INFORMATION, + 0, 0, 0, NULL, "OK", "Done viewing movement parameters"); + + myPopupHandler->createPopup(&popupInfo); + myRobot->unlock(); +} +AREXPORT ArServerSimpleComGyro::ArServerSimpleComGyro( + ArServerHandlerCommands *handlerCommands, ArRobot *robot, + ArAnalogGyro *gyro) : + myGyroEnableCB(this, &ArServerSimpleComGyro::gyroEnable), + myGyroDisableCB(this, &ArServerSimpleComGyro::gyroDisable) +{ + myHandlerCommands = handlerCommands; + myRobot = robot; + myGyro = gyro; + myHandlerCommands->addCommand("GyroEnable", + "Enables the gyro", + &myGyroEnableCB); + myHandlerCommands->addCommand("GyroDisable", + "Disables the gyro", + &myGyroDisableCB); +} + +AREXPORT void ArServerSimpleComMovementLogging::resetOdometer(void) +{ + myRobot->lock(); + myRobot->resetTripOdometer(); + myRobot->unlock(); +} + +AREXPORT ArServerSimpleComGyro::~ArServerSimpleComGyro() +{ +} + +AREXPORT void ArServerSimpleComGyro::gyroEnable(void) +{ + myRobot->lock(); + if (myGyro != NULL) + myGyro->activate(); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComGyro::gyroDisable(void) +{ + myRobot->lock(); + if (myGyro != NULL) + myGyro->deactivate(); + myRobot->unlock(); +} + +AREXPORT ArServerSimpleComLogRobotConfig::ArServerSimpleComLogRobotConfig( + ArServerHandlerCommands *commands, ArRobot* robot, + ArServerHandlerPopup *popupHandler) : + myPacketArrivedCB(this, + &ArServerSimpleComLogRobotConfig::configPacketArrived), + myPacketReader(robot, false, &myPacketArrivedCB), + myLogConfigCB(this, &ArServerSimpleComLogRobotConfig::logConfig), + myLogMovementConfigCB( + this, &ArServerSimpleComLogRobotConfig::logMovementConfig), + myLogOrigConfigCB(this, &ArServerSimpleComLogRobotConfig::logOrigConfig), + myPopupConfigCB(this, &ArServerSimpleComLogRobotConfig::popupConfig), + myPopupOrigConfigCB(this, &ArServerSimpleComLogRobotConfig::popupOrigConfig), + myPopupMovementConfigCB( + this, &ArServerSimpleComLogRobotConfig::popupMovementConfig) +{ + myRobot = robot; + myHandlerCommands = commands; + myPopupHandler = popupHandler; + + myLogConfig = false; + myPopupConfig = false; + myLogConfigMovement = false; + myPopupConfigMovement = false; + + commands->addCommand("LogRobotConfig", + "Get current robot configuration and write it to the server log.", + &myLogConfigCB); + commands->addCommand("LogRobotConfigOrig", + "Logs the original config packet the robot sent on connection.", + &myLogOrigConfigCB); + commands->addCommand("LogRobotConfigMovement", + "Get current robot configuration and write the movement part to the server log.", + &myLogMovementConfigCB); + if (myPopupHandler != NULL) + { + commands->addCommand("PopupRobotConfig", + "Popups up the current robot configuration.", + &myPopupConfigCB); + commands->addCommand("PopupRobotConfigOrig", + "Popups up the original config packet the robot sent on connection.", + &myPopupOrigConfigCB); + commands->addCommand("PopupRobotConfigMovement", + "Popups up the movement part of the current robot configuration.", + &myPopupMovementConfigCB); + + } +} + + +AREXPORT void ArServerSimpleComLogRobotConfig::logConfig(void) +{ + ArLog::log(ArLog::Normal, "Server received logRobotConfig command. Config packet requested"); + myRobot->lock(); + myPacketReader.requestPacket(); + myLogConfig = true; + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComLogRobotConfig::logMovementConfig(void) +{ + ArLog::log(ArLog::Normal, "Server received logRobotConfigMovement command. Config packet requested"); + myRobot->lock(); + myPacketReader.requestPacket(); + myLogConfigMovement = true; + myRobot->unlock(); +} + + +AREXPORT void ArServerSimpleComLogRobotConfig::logOrigConfig(void) +{ + myRobot->lock(); + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived()) + { + ArLog::log(ArLog::Normal, "-- Orig Config Packet: --"); + myRobot->getOrigRobotConfig()->log(); + ArLog::log(ArLog::Normal, "-- End Orig Config --"); + } + else + { + ArLog::log(ArLog::Normal, + "Cannot log Orig Config since it was never received."); + } + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComLogRobotConfig::popupConfig(void) +{ + ArLog::log(ArLog::Normal, "Server received popupRobotConfig command. Config packet requested"); + myRobot->lock(); + myPacketReader.requestPacket(); + myPopupConfig = true; + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComLogRobotConfig::popupMovementConfig(void) +{ + ArLog::log(ArLog::Normal, "Server received popupRobotConfigMovement command. Config packet requested"); + myRobot->lock(); + myPacketReader.requestPacket(); + myPopupConfigMovement = true; + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleComLogRobotConfig::popupOrigConfig(void) +{ + myRobot->lock(); + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived()) + { + std::string str; + str = myRobot->getOrigRobotConfig()->buildString(); + ArServerHandlerPopupInfo popupInfo( + NULL, "Orig robot config", str.c_str(), + ArServerHandlerPopup::INFORMATION, + 0, 0, 0, NULL, "OK", "Done viewing orig robot config parameters"); + + myPopupHandler->createPopup(&popupInfo); + } + else + { + ArLog::log(ArLog::Normal, + "Cannot log Orig Config since it was never received."); + } + myRobot->unlock(); +} + +void ArServerSimpleComLogRobotConfig::configPacketArrived(void) +{ + if (myLogConfig) + { + ArLog::log(ArLog::Normal, "-- Robot Config Movement Packet Returned: --"); + myPacketReader.log(); + ArLog::log(ArLog::Normal, "-- End Config --"); + } + if (myLogConfigMovement) + { + ArLog::log(ArLog::Normal, "-- Robot Config Movement Packet Returned: --"); + myPacketReader.logMovement(); + ArLog::log(ArLog::Normal, "-- End Config --"); + } + if (myPopupConfig) + { + std::string str; + str = myPacketReader.buildString(); + ArServerHandlerPopupInfo popupInfo( + NULL, "Robot config", str.c_str(), + ArServerHandlerPopup::INFORMATION, + 0, 0, 0, NULL, "OK", "Done viewing robot config parameters"); + + myPopupHandler->createPopup(&popupInfo); + + } + if (myPopupConfigMovement) + { + std::string str; + str = "_______________________________________________________\n"; + str += myPacketReader.buildStringMovement(); + ArServerHandlerPopupInfo popupInfo( + NULL, "Robot config movement", str.c_str(), + ArServerHandlerPopup::INFORMATION, + 0, 0, 0, NULL, "OK", + "Done viewing robot config movement parameters"); + myPopupHandler->createPopup(&popupInfo); + } + myLogConfig = false; + myPopupConfig = false; + myLogConfigMovement = false; + myPopupConfigMovement = false; +} + +AREXPORT ArServerSimpleComLogActions::ArServerSimpleComLogActions(ArServerHandlerCommands *commands, ArRobot* robot) : + myRobot(robot), myCallback(this, &ArServerSimpleComLogActions::logActions) +{ + commands->addCommand("LogActions", "Write current ArRobot actions to server log file.", + &myCallback); +} + +AREXPORT void ArServerSimpleComLogActions::logActions() +{ + ArLog::log(ArLog::Normal, "Server simple command logActions: current ArRobot actions are:"); + myRobot->logActions(); +} + +AREXPORT ArServerSimpleServerCommands::ArServerSimpleServerCommands( + ArServerHandlerCommands *commands, ArServerBase *server, + bool addLogConnections) : + myTerseTrackingCB(this, &ArServerSimpleServerCommands::logTerseTracking), + myVerboseTrackingCB(this, &ArServerSimpleServerCommands::logVerboseTracking), + myResetTrackingCB(this, &ArServerSimpleServerCommands::resetTracking), + myLogConnectionsCB(this, &ArServerSimpleServerCommands::logConnections) +{ + myServer = server; + commands->addCommand("NetworkTrackingLogTerse", + "Logs the information about client commands sent and received:", + &myTerseTrackingCB); + commands->addCommand("NetworkTrackingLogVerbose", + "Logs verbosely (broken up by tcp/udp) the information about client commands sent and received:", + &myVerboseTrackingCB); + + commands->addCommand("NetworkTrackingReset", + "Resets the information about client commands sent and received:", + &myResetTrackingCB); + if (addLogConnections) + commands->addCommand("NetworkLogConnections", + "Logs the connections to the server", + &myLogConnectionsCB); +} + +AREXPORT ArServerSimpleServerCommands::~ArServerSimpleServerCommands() +{ +} + +AREXPORT void ArServerSimpleServerCommands::logTerseTracking() +{ + myServer->logTracking(true); +} + +AREXPORT void ArServerSimpleServerCommands::logVerboseTracking() +{ + myServer->logTracking(false); +} + +AREXPORT void ArServerSimpleServerCommands::resetTracking() +{ + myServer->resetTracking(); +} + +AREXPORT void ArServerSimpleServerCommands::logConnections() +{ + myServer->logConnections(); +} + +AREXPORT ArServerSimplePopup::ArServerSimplePopup( + ArServerHandlerCommands *commands, + ArServerHandlerPopup *popupHandler) : + mySimplePopupCB(this, &ArServerSimplePopup::simplePopup) +{ + myCommands = commands; + myPopupHandler = popupHandler; + myCommands->addStringCommand( + "SimplePopup", + "\"\" \"<message>\" \"<button>\" <int:timeout>", + &mySimplePopupCB); +} + +AREXPORT ArServerSimplePopup::~ArServerSimplePopup() +{ +} + +AREXPORT void ArServerSimplePopup::simplePopup(ArArgumentBuilder *arg) +{ + + arg->compressQuoted(true); + + if (arg->getArgc() < 4) + { + ArLog::log(ArLog::Terse, + "simplePopup: Syntax error, not enough arguments."); + return; + } + + ArServerHandlerPopupInfo popupInfo( + arg->getArg(0), arg->getArg(0), + arg->getArg(1), ArServerHandlerPopup::INFORMATION, + 0, 0, arg->getArgInt(3), arg->getArg(1), + arg->getArg(2), arg->getArg(1)); + myPopupHandler->createPopup(&popupInfo); +} + +AREXPORT ArServerSimpleLogRobotDebugPackets::ArServerSimpleLogRobotDebugPackets( + ArServerHandlerCommands *commands, ArRobot *robot, + const char *baseDirectory) : + myPacketHandlerCB(this, &ArServerSimpleLogRobotDebugPackets::packetHandler), + myStartLoggingCB(this, &ArServerSimpleLogRobotDebugPackets::startLogging, + "robotDebugPacketsLog.txt"), + myStopLoggingCB(this, &ArServerSimpleLogRobotDebugPackets::stopLogging) +{ + myRobot = robot; + myCommands = commands; + + myPacketHandlerCB.setName("ArServerSimpleLogRobotDebugPackets::packetHandler"); + myStartLoggingCB.setName("ArLogRobotDebugPacktets::startLogging"); + myStopLoggingCB.setName("ArLogRobotDebugPacktets::stopLogging"); + + myRobot->addPacketHandler(&myPacketHandlerCB); + myCommands->addCommand("RobotDebugPacketLoggingEnable", + "Starts logging robot debug packets to file", + &myStartLoggingCB); + + myCommands->addCommand("RobotDebugPacketLoggingDisable", + "Stops logging robot debug packets to file", + &myStopLoggingCB); + + myFile = NULL; + if (baseDirectory != NULL && baseDirectory[0] != '\0') + myBaseDir = baseDirectory; + else + myBaseDir = ""; +} + +AREXPORT ArServerSimpleLogRobotDebugPackets::~ArServerSimpleLogRobotDebugPackets() +{ + myRobot->remPacketHandler(&myPacketHandlerCB); +} + +AREXPORT bool ArServerSimpleLogRobotDebugPackets::packetHandler(ArRobotPacket *packet) +{ + if (packet->getID() != 0xfc || myFile == NULL) + return false; + + int numIntsInGroup = 0; + int numGroups = 0; + + numIntsInGroup = packet->bufToByte(); + numGroups = packet->bufToByte(); + + myNumVals = numIntsInGroup; + + if (numIntsInGroup == 0 || numGroups == 0) + { + ArLog::log(ArLog::Normal, "numIntsInGroup %d numGroups %d", + numIntsInGroup, numGroups); + return true; + } + + int i; + int j; + int val; + char buf[2048]; + char *timeStr; + int timeLen = 20; // this is a value based on the standard length of + // ctime return + time_t now; + for (i = 0; i < numGroups; i++) + { + now = time(NULL); + timeStr = ctime(&now); + // get take just the portion of the time we want + strncpy(buf, timeStr, timeLen); + buf[timeLen] = '\0'; + for (j = 0; j < numIntsInGroup; j++) + { + val = packet->bufToByte2(); + myVals[j] = val; + sprintf(buf, "%s\t%d", buf, val); + } + fprintf(myFile, "%s\n", buf); + } + return true; +} + +AREXPORT bool ArServerSimpleLogRobotDebugPackets::startLogging(const char *fileName) +{ + std::string realFileName; + + if (myFile != NULL) + stopLogging(); + + if (fileName == NULL || fileName[0] == '\0') + { + ArLog::log(ArLog::Normal, "ArServerSimpleLogRobotDebugPackets::startLogging: Empty filename given, cannot log"); + return false; + } + + if (fileName[0] == '/' || fileName[0] == '\\') + { + realFileName = fileName; + } + else + { + realFileName = myBaseDir; + realFileName += fileName; + } + + + if ((myFile = ArUtil::fopen(realFileName.c_str(), "w")) == NULL) + { + ArLog::log(ArLog::Terse, + "ArServerSimpleLogRobotDebugPackets::startLogging: Could not open file %s for writing", + realFileName.c_str()); + return false; + } + + ArLog::log(ArLog::Normal, + "ArServerSimpleLogRobotDebugPackets::startLogging: Logging to file %s", + realFileName.c_str()); + myRobot->lock(); + myRobot->comInt(251, 1); + myRobot->unlock(); + return true; +} + +AREXPORT bool ArServerSimpleLogRobotDebugPackets::stopLogging(void) +{ + if (myFile != NULL) + { + ArLog::log(ArLog::Normal, "ArServerSimpleLogRobotDebugPackets::stopLogging: Stopping"); + fclose(myFile); + myFile = NULL; + } + myRobot->lock(); + myRobot->comInt(251, 0); + myRobot->unlock(); + return true; +} + +AREXPORT void ArServerSimpleLogRobotDebugPackets::addToInfoGroup( + ArStringInfoGroup *infoGroup, const char *name, int whichVal, + const char *format) +{ + infoGroup->addStringInt( + name, 8, + new ArRetFunctor1C<int, ArServerSimpleLogRobotDebugPackets, int>( + this, + &ArServerSimpleLogRobotDebugPackets::getValue, whichVal), + format); +} + +AREXPORT int ArServerSimpleLogRobotDebugPackets::getNumValues(void) +{ + return myNumVals; +} + +AREXPORT int ArServerSimpleLogRobotDebugPackets::getValue(int whichVal) +{ + if (myVals.find(whichVal) == myVals.end()) + return 0; + else + return myVals[whichVal]; +} + +AREXPORT ArServerSimpleConnectionTester::ArServerSimpleConnectionTester( + ArServerHandlerCommands *handlerCommands, ArRobot *robot) : + myConnectionTestStartCB(this, &ArServerSimpleConnectionTester::connectionTestStart), + myConnectionTestStopCB(this, &ArServerSimpleConnectionTester::connectionTestStop), + myPacketHandlerCB(this, &ArServerSimpleConnectionTester::packetHandler), + myUserTaskCB(this, &ArServerSimpleConnectionTester::userTask) +{ + myRobot = robot; + myHandlerCommands = handlerCommands; + + if (myHandlerCommands) + { + myHandlerCommands->addCommand( + "ConnectionTesterStart", + "Starts testing the connection to the robot", + &myConnectionTestStartCB); + myHandlerCommands->addCommand( + "ConnectionTesterStop", + "Stops testing the connection to the robot", + &myConnectionTestStopCB); + } + + myPacketHandlerCB.setName("ArServerSimpleConnectionTester::packetHandler"); + myUserTaskCB.setName("ArServerSimpleConnectionTester::userTask"); + +} + +AREXPORT ArServerSimpleConnectionTester::~ArServerSimpleConnectionTester() +{ +} + + +AREXPORT void ArServerSimpleConnectionTester::connectionTestStart(void) +{ + ArLog::log(ArLog::Normal, "ConnectionTester: Starting test"); + myRobot->lock(); + myFirst = true; + myRobot->remPacketHandler(&myPacketHandlerCB); + myRobot->addPacketHandler(&myPacketHandlerCB, ArListPos::FIRST); + myRobot->remUserTask(&myUserTaskCB); + myRobot->addUserTask("connectionTester", 50, &myUserTaskCB); + myRobot->unlock(); +} + +AREXPORT void ArServerSimpleConnectionTester::connectionTestStop(void) +{ + ArLog::log(ArLog::Normal, "ConnectionTester: Stopping test"); + myRobot->lock(); + log(); + myRobot->remPacketHandler(&myPacketHandlerCB); + myRobot->remUserTask(&myUserTaskCB); + myRobot->unlock(); +} + +bool ArServerSimpleConnectionTester::packetHandler(ArRobotPacket *packet) +{ + if (packet->getID() == 0x90) + { + myReceivedPackets++; + myPacketsThisCycle++; + myPacketReceived.setToNow(); + return true; + } + return false; +} + +void ArServerSimpleConnectionTester::userTask(void) +{ + if (myFirst) + { + myRobot->comInt(ArCommands::ENCODER, 1); + myFirst = false; + myReceivedPackets = 0; + myMissedPackets = 0; + myMissedMotorPackets = 0; + myPacketsThisCycle = 0; + myCyclesSincePacket = 0; + myPacketReceived.setToNow(); + myLastLog.setToNow(); + log(); + return; + } + + if (myCyclesSincePacket > 2 && myPacketReceived.mSecSince() > 200) + { + myMissedPackets++; + log(); + myRobot->comInt(ArCommands::ENCODER, 1); + } + /* + if (myPacketsThisCycle > 1) + { + myMissedMotorPackets++; + log(); + } + */ + if (myPacketsThisCycle == 0) + myCyclesSincePacket++; + + if (myPacketsThisCycle > 0) + myRobot->comInt(ArCommands::ENCODER, 1); + + if (myLastLog.secSince() >= 15) + { + log(); + myLastLog.setToNow(); + } + + myPacketsThisCycle = 0; +} + +void ArServerSimpleConnectionTester::log(void) +{ + ArLog::log(ArLog::Normal, "ConnectionTester: Received %d packets, missed %d packets, mpacs %d", + myReceivedPackets, myMissedPackets, myRobot->getMotorPacCount()); + +} + + diff --git a/Legacy/Aria/ArNetworking/src/ArServerSimpleOpener.cpp b/Legacy/Aria/ArNetworking/src/ArServerSimpleOpener.cpp new file mode 100644 index 0000000..514510e --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerSimpleOpener.cpp @@ -0,0 +1,333 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerBase.h" +#include "ArServerSimpleOpener.h" + + +/** + @param parser the parser to use for information + **/ +AREXPORT ArServerSimpleOpener::ArServerSimpleOpener( + ArArgumentParser *parser, const char *prefix, + bool addAriaCallbacks) : + myParseArgsCB(this, &ArServerSimpleOpener::parseArgs), + myLogOptionsCB(this, &ArServerSimpleOpener::logOptions), + myFileServerKeyCB(this, &ArServerSimpleOpener::fileServerKeyCallback) +{ + myParser = parser; + myOwnParser = false; + if (prefix != NULL) + myPrefix = prefix; + else + myPrefix = ""; + + myUserFile = NULL; + myServerPort = 7272; + myLogUserInfo = false; + myLogCommandGroups = false; + myServer = NULL; + myOpenOnIP = NULL; + myTcpOnly = false; + + std::string functorName; + functorName = prefix; + functorName += "ArServerSimpleOpener"; + + if (addAriaCallbacks) + { + myParseArgsCB.setName(functorName.c_str()); + Aria::addParseArgsCB(&myParseArgsCB, 60); + myLogOptionsCB.setName(functorName.c_str()); + Aria::addLogOptionsCB(&myLogOptionsCB, 60); + } + + myFileServerKeyCB.setName("ArServerSimpleOpener::serverKey"); + myFileParser.addHandler("serverKey", &myFileServerKeyCB); +} + +AREXPORT ArServerSimpleOpener::~ArServerSimpleOpener(void) +{ + +} + +AREXPORT bool ArServerSimpleOpener::parseArgs(void) +{ + return parseArgs(myParser); +} + +AREXPORT bool ArServerSimpleOpener::parseArgs(ArArgumentParser *parser) +{ + if (myPrefix.size() > 0) + return parseArgsWithPrefix(parser); + else + return parseArgsWithOutPrefix(parser); + +} + +AREXPORT bool ArServerSimpleOpener::parseArgsWithOutPrefix(ArArgumentParser *parser) +{ + + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue(false); + + if (parser->checkArgument("-lui") || + parser->checkArgument("-logUserInfo")) + { + myLogUserInfo = true; + } + + if (parser->checkArgument("-lcg") || + parser->checkArgument("-logCommandGroups")) + { + myLogCommandGroups = true; + } + + if (parser->checkArgument("-serverTcpOnly")) + { + myTcpOnly = true; + } + + if (!parser->checkParameterArgumentString("-ui", + &myUserFile) || + !parser->checkParameterArgumentString("-userInfo", + &myUserFile) || + !parser->checkParameterArgumentInteger("-sp", + &myServerPort) || + !parser->checkParameterArgumentInteger("-serverPort", + &myServerPort) || + !parser->checkParameterArgumentString("-sip", + &myOpenOnIP) || + !parser->checkParameterArgumentString("-serverIP", + &myOpenOnIP)) + + /*|| + !parser->checkParameterArgumentString("-setServerKey", + &myServerKey) || + !parser->checkParameterArgumentString("-ssk", + &myServerKey))*/ + { + return false; + } + + bool wasReallySet; + const char *serverInfoFile = NULL; + while (myParser->checkParameterArgumentString( + "-serverInfoFile", &serverInfoFile, + &wasReallySet, true) && + wasReallySet) + { + if (serverInfoFile != NULL && !parseFile(serverInfoFile)) + { + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return false; + } + } + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return true; +} + +AREXPORT bool ArServerSimpleOpener::parseArgsWithPrefix( + ArArgumentParser *parser) +{ + + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue(true); + + if (parser->checkArgumentVar("-%sLogUserInfo", myPrefix.c_str())) + { + myLogUserInfo = true; + } + + if (parser->checkArgumentVar("-%sLogCommandGroups", myPrefix.c_str())) + { + myLogCommandGroups = true; + } + + if (parser->checkArgumentVar("-%sTcpOnly", myPrefix.c_str())) + { + myTcpOnly = true; + } + + if (!parser->checkParameterArgumentStringVar( + NULL, &myUserFile, "-%sUserInfo", myPrefix.c_str()) || + !parser->checkParameterArgumentStringVar( + NULL, &myOpenOnIP, "-%sServerIP", myPrefix.c_str()) || + !parser->checkParameterArgumentIntegerVar( + NULL, &myServerPort, "-%sServerPort", myPrefix.c_str())) + /*|| + !parser->checkParameterArgumentStringVar( + NULL, &myServerKey, "-%sSetServerKey", myPrefix.c_str()))*/ + { + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return false; + } + + bool wasReallySet; + const char *serverInfoFile = NULL; + if (myParser->checkParameterArgumentStringVar( + &wasReallySet, &serverInfoFile, "-%sServerInfoFile", + myPrefix.c_str()) && + wasReallySet) + { + if (serverInfoFile != NULL && !parseFile(serverInfoFile)) + { + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return false; + } + } + + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return true; +} + +AREXPORT void ArServerSimpleOpener::logOptions(void) const +{ + if (myPrefix.size() > 0) + logOptionsWithPrefix(); + else + logOptionsWithOutPrefix(); +} + +AREXPORT void ArServerSimpleOpener::logOptionsWithOutPrefix(void) const +{ + // ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "Options for ArServerSimpleOpener:"); + ArLog::log(ArLog::Terse, "-serverPort <serverPortNumber>"); + ArLog::log(ArLog::Terse, "-sp <serverPortNumber>"); + ArLog::log(ArLog::Terse, "-serverIP <serverIPToOpenOn>"); + ArLog::log(ArLog::Terse, "-sip <serverIPToOpenOn>"); + ArLog::log(ArLog::Terse, "-serverTcpOnly"); + ArLog::log(ArLog::Terse, "-userInfo <userInfoFileName>"); + ArLog::log(ArLog::Terse, "-ui <userInfoFileName>"); + ArLog::log(ArLog::Terse, "-logUserInfo"); + ArLog::log(ArLog::Terse, "-lui"); + ArLog::log(ArLog::Terse, "-logCommandGroups"); + ArLog::log(ArLog::Terse, "-lcg"); + /* + ArLog::log(ArLog::Terse, "-setServerKey <key>"); + ArLog::log(ArLog::Terse, "-ssk <key>"); + */ + ArLog::log(ArLog::Terse, "-serverInfoFile <file>"); + ArLog::log(ArLog::Terse, ""); +} + +AREXPORT void ArServerSimpleOpener::logOptionsWithPrefix(void) const +{ + //ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "Options for ArServerSimpleOpener:"); + ArLog::log(ArLog::Terse, "-%sServerPort <serverPortNumber>", + myPrefix.c_str()); + ArLog::log(ArLog::Terse, "-%sServerIP <serverIPToOpenOn>", + myPrefix.c_str()); + ArLog::log(ArLog::Terse, "-%sServerTcpOnly", + myPrefix.c_str()); + ArLog::log(ArLog::Terse, "-%sUserInfo <userInfoFileName>", + myPrefix.c_str()); + ArLog::log(ArLog::Terse, "-%sLogUserInfo", myPrefix.c_str()); + ArLog::log(ArLog::Terse, "-%sLogCommandGroups", myPrefix.c_str()); + /*ArLog::log(ArLog::Terse, "-%sSetServerKey <key>", + myPrefix.c_str()); + */ + ArLog::log(ArLog::Terse, "-%sServerInfoFile <file>", + myPrefix.c_str()); + ArLog::log(ArLog::Terse, ""); +} + +/** + @param server the server to operate on + + @param baseDirectory the base directory (solely for loading user + information) + + @param secondsToTryFor this is the number of seconds to try opening + for, 0 means only try to open once + **/ +AREXPORT bool ArServerSimpleOpener::open(ArServerBase *server, + const char *baseDirectory, + int secondsToTryFor) +{ + ArTime startedServer; + bool serverOpened; + startedServer.setToNow(); + myBadUserFile = false; + myOpenFailed = false; + + if (secondsToTryFor < 0) + secondsToTryFor = 0; + + server->setServerKey(myServerKey.c_str()); + + if (myUserFile != NULL && myUserFile[0] != '\0' && + !server->loadUserInfo(myUserFile, baseDirectory)) + { + ArLog::log(ArLog::Normal, "ArServerSimpleOpener: Bad user file"); + myBadUserFile = true; + return false; + } + + while (Aria::getRunning() && + (serverOpened = + server->open(myServerPort, myOpenOnIP, myTcpOnly)) == false) + { + if (secondsToTryFor == 0) + { + ArLog::log(ArLog::Normal, "Could not open server on port %d", myServerPort); + myOpenFailed = true; + return false; + } + if (startedServer.secSince() > secondsToTryFor) + { + ArLog::log(ArLog::Normal, "Could not open server on port %d even after %d seconds", + myServerPort, secondsToTryFor); + myOpenFailed = true; + return false; + } + ArLog::log(ArLog::Normal, "Can't open server on port %d yet, waiting", myServerPort); + ArUtil::sleep(1000); + } + + if (serverOpened) + myServer = server; + + return serverOpened; +} + +AREXPORT bool ArServerSimpleOpener::checkAndLog(void) const +{ + if (myServer != NULL && myLogCommandGroups) + myServer->logCommandGroups(); + + if (myServer != NULL && myLogUserInfo) + myServer->logUserInfo(); + + + return true; +} + +bool ArServerSimpleOpener::fileServerKeyCallback(ArArgumentBuilder *arg) +{ + if (arg->getArgc() > 1) + { + ArLog::log(ArLog::Normal, "Bad serverKey line: %s %s", + arg->getExtraString(), arg->getFullString()); + return false; + } + if (arg->getArgc() == 0) + myServerKey = ""; + else + myServerKey = arg->getArg(0); + return true; +} + +AREXPORT bool ArServerSimpleOpener::parseFile(const char *fileName) +{ + ArLog::log(ArLog::Normal, "Loading server key from %s", + fileName); + if (!myFileParser.parseFile(fileName)) + { + ArLog::log(ArLog::Normal, "Failed parsing server key file %s", + fileName); + return false; + } + return true; +} diff --git a/Legacy/Aria/ArNetworking/src/ArServerUserInfo.cpp b/Legacy/Aria/ArNetworking/src/ArServerUserInfo.cpp new file mode 100644 index 0000000..4b0d1db --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArServerUserInfo.cpp @@ -0,0 +1,273 @@ +#include "Aria.h" +#include "ArExport.h" +#include "ArServerUserInfo.h" +#include "md5.h" + +AREXPORT ArServerUserInfo::ArServerUserInfo(const char *baseDirectory) : + myV1HeaderCB(this, &ArServerUserInfo::v1HeaderCallback), + myV1UserCB(this, &ArServerUserInfo::v1UserCallback), + myV1DoNotUseCB(this, &ArServerUserInfo::v1DoNotUseCallback) +{ + myDataMutex.setLogName("ArServerUserInfo::myDataMutex"); + myParser.setBaseDirectory(baseDirectory); + myGotHeader = false; + myDoNotUse = false; + myLogFailureVerbosely = false; +} + +AREXPORT ArServerUserInfo::~ArServerUserInfo() +{ + +} + +AREXPORT void ArServerUserInfo::setBaseDirectory(const char *baseDirectory) +{ + myDataMutex.lock(); + myParser.setBaseDirectory(baseDirectory); + myDataMutex.unlock(); +} + + +bool ArServerUserInfo::v1HeaderCallback(ArArgumentBuilder * arg) +{ + removeHandlers(); + if (myParser.addHandler("user", &myV1UserCB) && + myParser.addHandler("doNotUse", &myV1DoNotUseCB)) + { + myGotHeader = true; + myDoNotUse = false; + return true; + } + else + { + ArLog::log(ArLog::Terse, "ArServerUserInfo::Could not add user info callback"); + return false; + } +} + +bool ArServerUserInfo::v1UserCallback(ArArgumentBuilder * arg) +{ + if (arg->getArgc() < 2) + { + ArLog::log(ArLog::Normal, "ArServerUserInfo: Not enough arguments to user info 'user <user> <password> <reapingOptional:group>"); + return false; + } + + const char *user; + const char *password; + user = arg->getArg(0); + if (!ArUtil::isOnlyAlphaNumeric(user)) + { + ArLog::log(ArLog::Normal, "ArServerUserInfo: user '%s' has non-alpha-numeric characters in it", user); + return false; + } + password = arg->getArg(1); + if (!ArUtil::isOnlyAlphaNumeric(password)) + { + ArLog::log(ArLog::Normal, "ArServerUserInfo: password has non-alpha-numeric characters in it"); + return false; + } + + if (myPasswords.find(user) != myPasswords.end()) + { + ArLog::log(ArLog::Terse, "ArServerUserInfo: Already a user with name %s", user); + return false; + } + //printf("Adding user %s with password %s and groups\n", user, password); + myPasswords[user] = password; + + std::set<std::string, ArStrCaseCmpOp> *groups; + groups = new std::set<std::string, ArStrCaseCmpOp>; + myGroups[user] = groups; + + unsigned int i; + for (i = 2; i < arg->getArgc(); i++) + { + groups->insert(arg->getArg(i)); + } + return true; +} + +bool ArServerUserInfo::v1DoNotUseCallback(ArArgumentBuilder * arg) +{ + myDoNotUse = true; + return true; +} + +void ArServerUserInfo::removeHandlers(void) +{ + myParser.remHandler(&myV1HeaderCB); + myParser.remHandler(&myV1UserCB); +} + +AREXPORT bool ArServerUserInfo::readFile(const char *fileName) +{ + myDataMutex.lock(); + removeHandlers(); + myPasswords.clear(); + ArUtil::deleteSetPairs(myGroups.begin(), myGroups.end()); + myGroups.clear(); + myParser.addHandler("UserInfoVersion1", &myV1HeaderCB); + myGotHeader = false; + if (!myParser.parseFile(fileName, false)) + { + myDataMutex.unlock(); + ArLog::log(ArLog::Terse, "Problem loading server user info"); + return false; + } + removeHandlers(); + if (myGotHeader) + { + myDataMutex.unlock(); + ArLog::log(ArLog::Verbose, "Loaded server user info"); + return true; + } + else + { + myDataMutex.unlock(); + ArLog::log(ArLog::Normal, "Problem loading server user info: no header"); + return false; + } +} + +AREXPORT bool ArServerUserInfo::matchUserPassword( + const char *user, unsigned char password[16], const char *passwordKey, + const char *serverKey, bool logFailureVerbosely) const +{ + std::map<std::string, std::string, ArStrCaseCmpOp>::const_iterator it; + if (!ArUtil::isOnlyAlphaNumeric(user)) + { + ArLog::log(ArLog::Normal, + "ArServerUserInfo: login denied: user '%s' has non alpha-numeric characters", + user); + return false; + } + it = myPasswords.find(user); + if (it == myPasswords.end()) + { + ArLog::log(ArLog::Normal, "ArServerUserInfo: login denied: No user %s", + user); + return false; + } + /* thd old simple clear text way + if (ArUtil::strcmp((*it).second, password) != 0) + { + ArLog::log(ArLog::Normal, + "ArServerUserInfo: login denied: Wrong password for user %s", + user); + return false; + }*/ + md5_state_t md5State; + unsigned char md5Digest[16]; + + md5_init(&md5State); + md5_append(&md5State, (unsigned char *)serverKey, strlen(serverKey)); + md5_append(&md5State, (unsigned char *)passwordKey, strlen(passwordKey)); + md5_append(&md5State, (unsigned char *)(*it).second.c_str(), + (*it).second.size()); + md5_finish(&md5State, md5Digest); + + if (memcmp(md5Digest, password, 16) != 0) + { + + ArLog::log(ArLog::Normal, + "ArServerUserInfo: login denied: Wrong password for user %s", + user); + if (logFailureVerbosely) + { + ArLog::log(ArLog::Terse, "The server key is '%s'", serverKey); + ArLog::log(ArLog::Terse, "The password seed is '%s'", passwordKey); + ArLog::log(ArLog::Terse, "The resulting digest is: "); + logDigest(md5Digest); + ArLog::log(ArLog::Terse, "The returned password is:"); + logDigest(password); + } + return false; + } + return true; +} + +AREXPORT std::set<std::string, ArStrCaseCmpOp> +ArServerUserInfo::getUsersGroups(const char *user) const +{ + std::map<std::string, std::set<std::string, ArStrCaseCmpOp> *, ArStrCaseCmpOp>::const_iterator sit; + std::set<std::string, ArStrCaseCmpOp> ret; + + if ((sit = myGroups.find(user)) == myGroups.end()) + { + ArLog::log(ArLog::Terse, "No user %s", user); + return ret; + } + + ret = *((*sit).second); + return ret; +} + +AREXPORT void ArServerUserInfo::logUsers(void) const +{ + std::map<std::string, std::string, ArStrCaseCmpOp>::const_iterator it; + std::set<std::string, ArStrCaseCmpOp> groups; + std::set<std::string, ArStrCaseCmpOp>::const_iterator git; + std::string line; + if (myDoNotUse) + ArLog::log(ArLog::Terse, "The user info should not be used"); + else + ArLog::log(ArLog::Terse, "The user info should be used"); + for (it = myPasswords.begin(); it != myPasswords.end(); it++) + { + line = "User "; + line += (*it).first; + line += " has groups:"; + + groups = getUsersGroups((*it).first.c_str()); + /* + if ((sit = myGroups.find((*it).first)) == myGroups.end()) + { + ArLog::log(ArLog::Terse, "ArServerUserInfo::logUsersAndGroups: Hideous error with the groups of user '%s'", (*it).first.c_str()); + continue; + } + groups = (*sit).second; + */ + for (git = groups.begin(); git != groups.end(); git++) + { + line += " "; + line += (*git); + } + ArLog::log(ArLog::Terse, line.c_str()); + } +} + +AREXPORT bool ArServerUserInfo::doNotUse(void) const +{ + return myDoNotUse; +} + + +void ArServerUserInfo::logDigest(unsigned char digest[16]) const +{ + int i; + char buf[1024]; + buf[0] = '\0'; + int highNibble; + char highChar; + int lowNibble; + char lowChar; + for (i = 0; i < 16; i++) + { + highNibble = ((unsigned char)digest[i] >> 4) & 0xf; + if (highNibble <= 9) + highChar = '0' + highNibble; + else + highChar = 'a' + highNibble - 10; + lowNibble = (unsigned char)digest[i] & 0xf; + if (lowNibble <= 9) + lowChar = '0' + lowNibble; + else + lowChar = 'a' + lowNibble - 10; + sprintf(buf, "%s%c%c ", buf, highChar, lowChar); + } + ArLog::log(ArLog::Terse, buf); +} + + + diff --git a/Legacy/Aria/ArNetworking/src/ArTempDirectoryHelper.cpp b/Legacy/Aria/ArNetworking/src/ArTempDirectoryHelper.cpp new file mode 100644 index 0000000..9d95830 --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/ArTempDirectoryHelper.cpp @@ -0,0 +1,250 @@ +#include "ArExport.h" + +#include "ArTempDirectoryHelper.h" + +#include "ArLog.h" +#include "ariaUtil.h" + +AREXPORT ArTempDirectoryHelper::ArTempDirectoryHelper + (const char *baseDirectory, + const char *tempDirectory) : + myBaseDirectory((baseDirectory != NULL) ? baseDirectory : ""), + myTempDirectory((tempDirectory != NULL) ? tempDirectory : ""), + myPreMoveCallbacks(), + myPostMoveCallbacks() +{ + if (myTempDirectory.empty()) { + myTempDirectory = myBaseDirectory; + } +} // end ctor + +AREXPORT ArTempDirectoryHelper::~ArTempDirectoryHelper() +{ +} + + +AREXPORT const char *ArTempDirectoryHelper::getTempDirectory() +{ + return myTempDirectory.c_str(); +} + + +AREXPORT const char *ArTempDirectoryHelper::getBaseDirectory() +{ + return myBaseDirectory.c_str(); +} + + + +AREXPORT bool ArTempDirectoryHelper::moveFileToBaseDirectory + (const char *fileName) +{ + if (!ArUtil::isStrEmpty(fileName)) { + std::list<std::string> fileNameList; + fileNameList.push_back(fileName); + return moveFilesToBaseDirectory(fileNameList); + } + else { + ArLog::log(ArLog::Normal, + "ArTempDirectoryHelper::moveFileToBaseDirectory() cannot move empty file name"); + return false; + } + +} // end method moveFileToBaseDirectory + + + +AREXPORT bool ArTempDirectoryHelper::moveFilesToBaseDirectory + (const std::list<std::string> &fileNameList) +{ + + bool isSuccess = true; + + // now, if our temp directory and base directory are different we + // need to move it and put the result in the packet, otherwise put + // in we're okay + if (ArUtil::strcasecmp(myBaseDirectory, myTempDirectory) != 0) + { +#ifndef WIN32 + char *mvName = "mv"; +#else + char *mvName = "move"; +#endif + + char systemBuf[6400]; + char fromBuf[1024]; + char toBuf[1024]; + + bool isFirstMoveCmd = true; + + for (std::list<std::string>::const_iterator iter = fileNameList.begin(); + iter != fileNameList.end(); + iter++) { + + + std::string sourceFileName = *iter; + + if (sourceFileName.empty()) { + continue; // Nothing to be done for this file... + } + + if (myTempDirectory.size() > 0) { + snprintf(fromBuf, sizeof(fromBuf), "%s%s", + myTempDirectory.c_str(), sourceFileName.c_str()); + } + else { + snprintf(fromBuf, sizeof(fromBuf), "%s", + sourceFileName.c_str()); + } + + ArUtil::fixSlashes(fromBuf, sizeof(fromBuf)); + + if (myBaseDirectory.size() > 0) { + snprintf(toBuf, sizeof(toBuf), "%s%s", + myBaseDirectory.c_str(), sourceFileName.c_str()); + } + else { + snprintf(toBuf, sizeof(toBuf), "%s", sourceFileName.c_str()); + } + + ArUtil::fixSlashes(toBuf, sizeof(toBuf)); + + // Create the move command + sprintf(systemBuf, "%s \"%s\" \"%s\"", mvName, fromBuf, toBuf); + + ArLog::log(ArLog::Normal, "Moving with '%s'", systemBuf); + + // Call our pre move callbacks + if (isFirstMoveCmd) { + isFirstMoveCmd = false; + + for (std::list<ArFunctor *>::iterator preIt = myPreMoveCallbacks.begin(); + preIt != myPreMoveCallbacks.end(); + preIt++) { + (*preIt)->invoke(); + } + } // end if first move command + + // move file + int ret = system(systemBuf); + if (ret == 0) + { + ArLog::log(ArLog::Verbose, + "ArTempDirectoryHelper: Moved file %s (with %s)", + sourceFileName.c_str(), + systemBuf); + + if (iter == fileNameList.begin()) { + isSuccess = true; + } + } + else // error moving file + { + ArLog::log(ArLog::Normal, + "ArTempDirectoryHelper: Couldn't move %s (ret of '%s' is %d) removing file", + sourceFileName.c_str(), + systemBuf, + ret); + + unlink(fromBuf); + if (iter == fileNameList.begin()) { + isSuccess = false; + } + } // end else error moving file + } // end for each file + + // If files were moved, then call the post move callbacks + if (!isFirstMoveCmd) { + for (std::list<ArFunctor *>::iterator postIt = myPostMoveCallbacks.begin(); + postIt != myPostMoveCallbacks.end(); + postIt++) { + (*postIt)->invoke(); + } + } + + } // end if files need to be moved + + return isSuccess; + +} // end method moveFilesToBaseDirectory + + +AREXPORT std::string ArTempDirectoryHelper::makeTempFilePathName + (const char *fileName) +{ + return makeFilePathName(fileName, + myTempDirectory.c_str()); +} + +AREXPORT std::string ArTempDirectoryHelper::makeBaseFilePathName + (const char *fileName) +{ + return makeFilePathName(fileName, + myBaseDirectory.c_str()); +} + +AREXPORT std::string ArTempDirectoryHelper::makeFilePathName + (const char *fileName, + const char *dirName) +{ + + if (ArUtil::isStrEmpty(fileName)) { + return ""; + } + + std::string filePathName; + + if ((!ArUtil::isStrEmpty(dirName)) && + (fileName[0] != '/') && + (fileName[0] != '\\') ) { + filePathName = myTempDirectory; + filePathName += fileName; + } + else { + filePathName = fileName; + } + + return filePathName; + +} // end method makeFilePathName + + +AREXPORT void ArTempDirectoryHelper::addPreMoveCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPreMoveCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPreMoveCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArTempDirectoryHelper::addPreMoveCallback: Invalid position."); +} + + +AREXPORT void ArTempDirectoryHelper::remPreMoveCallback( + ArFunctor *functor) +{ + myPreMoveCallbacks.remove(functor); +} + + +AREXPORT void ArTempDirectoryHelper::addPostMoveCallback( + ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPostMoveCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myPostMoveCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArTempDirectoryHelper::addPostMoveCallback: Invalid position."); +} + + +AREXPORT void ArTempDirectoryHelper::remPostMoveCallback( + ArFunctor *functor) +{ + myPostMoveCallbacks.remove(functor); +} + diff --git a/Legacy/Aria/ArNetworking/src/md5.cpp b/Legacy/Aria/ArNetworking/src/md5.cpp new file mode 100644 index 0000000..b5e5f9e --- /dev/null +++ b/Legacy/Aria/ArNetworking/src/md5.cpp @@ -0,0 +1,390 @@ +/* + MPL (ActivMedia) renamed to a cpp file + +*/ + +/* RH (ActivMedia/MobileRobots) including header from ARIA which defines AREXPORT to export + functions from Windows DLLs, and added AREXPORT to functions defined below: +*/ +#include "ArExport.h" + +/* + Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.c is L. Peter Deutsch + <ghost@aladdin.com>. Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order + either statically or dynamically; added missing #include <string.h> + in library. + 2002-03-11 lpd Corrected argument list for main(), and added int return + type, in test program and T value program. + 2002-02-21 lpd Added missing #include <stdio.h> in test program. + 2000-07-03 lpd Patched to eliminate warnings about "constant is + unsigned in ANSI C, signed in traditional"; made test program + self-checking. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). + 1999-05-03 lpd Original version. + */ + +#include "md5.h" +#include <string.h> + +#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ +#ifdef ARCH_IS_BIG_ENDIAN +# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) +#else +# define BYTE_ORDER 0 +#endif + +#define T_MASK ((md5_word_t)~0) +#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) +#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) +#define T3 0x242070db +#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) +#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) +#define T6 0x4787c62a +#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) +#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) +#define T9 0x698098d8 +#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) +#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) +#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) +#define T13 0x6b901122 +#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) +#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) +#define T16 0x49b40821 +#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) +#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) +#define T19 0x265e5a51 +#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) +#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) +#define T22 0x02441453 +#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) +#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) +#define T25 0x21e1cde6 +#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) +#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) +#define T28 0x455a14ed +#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) +#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) +#define T31 0x676f02d9 +#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) +#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) +#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) +#define T35 0x6d9d6122 +#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) +#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) +#define T38 0x4bdecfa9 +#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) +#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) +#define T41 0x289b7ec6 +#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) +#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) +#define T44 0x04881d05 +#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) +#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) +#define T47 0x1fa27cf8 +#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) +#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) +#define T50 0x432aff97 +#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) +#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) +#define T53 0x655b59c3 +#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) +#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) +#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) +#define T57 0x6fa87e4f +#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) +#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) +#define T60 0x4e0811a1 +#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) +#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) +#define T63 0x2ad7d2bb +#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) + + +static void +md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) +{ + md5_word_t + a = pms->abcd[0], b = pms->abcd[1], + c = pms->abcd[2], d = pms->abcd[3]; + md5_word_t t; +#if BYTE_ORDER > 0 + /* Define storage only for big-endian CPUs. */ + md5_word_t X[16]; +#else + /* Define storage for little-endian or both types of CPUs. */ + md5_word_t xbuf[16]; + const md5_word_t *X; +#endif + + { +#if BYTE_ORDER == 0 + /* + * Determine dynamically whether this is a big-endian or + * little-endian machine, since we can use a more efficient + * algorithm on the latter. + */ + static const int w = 1; + + if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ +#endif +#if BYTE_ORDER <= 0 /* little-endian */ + { + /* + * On little-endian machines, we can process properly aligned + * data without copying it. + */ + if (!((data - (const md5_byte_t *)0) & 3)) { + /* data are properly aligned */ + X = (const md5_word_t *)data; + } else { + /* not aligned */ + memcpy(xbuf, data, 64); + X = xbuf; + } + } +#endif +#if BYTE_ORDER == 0 + else /* dynamic big-endian */ +#endif +#if BYTE_ORDER >= 0 /* big-endian */ + { + /* + * On big-endian machines, we must arrange the bytes in the + * right order. + */ + const md5_byte_t *xp = data; + int i; + +# if BYTE_ORDER == 0 + X = xbuf; /* (dynamic only) */ +# else +# define xbuf X /* (static only) */ +# endif + for (i = 0; i < 16; ++i, xp += 4) + xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); + } +#endif + } + +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) + + /* Round 1. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ +#define F(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + F(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 7, T1); + SET(d, a, b, c, 1, 12, T2); + SET(c, d, a, b, 2, 17, T3); + SET(b, c, d, a, 3, 22, T4); + SET(a, b, c, d, 4, 7, T5); + SET(d, a, b, c, 5, 12, T6); + SET(c, d, a, b, 6, 17, T7); + SET(b, c, d, a, 7, 22, T8); + SET(a, b, c, d, 8, 7, T9); + SET(d, a, b, c, 9, 12, T10); + SET(c, d, a, b, 10, 17, T11); + SET(b, c, d, a, 11, 22, T12); + SET(a, b, c, d, 12, 7, T13); + SET(d, a, b, c, 13, 12, T14); + SET(c, d, a, b, 14, 17, T15); + SET(b, c, d, a, 15, 22, T16); +#undef SET + + /* Round 2. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ +#define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + G(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 1, 5, T17); + SET(d, a, b, c, 6, 9, T18); + SET(c, d, a, b, 11, 14, T19); + SET(b, c, d, a, 0, 20, T20); + SET(a, b, c, d, 5, 5, T21); + SET(d, a, b, c, 10, 9, T22); + SET(c, d, a, b, 15, 14, T23); + SET(b, c, d, a, 4, 20, T24); + SET(a, b, c, d, 9, 5, T25); + SET(d, a, b, c, 14, 9, T26); + SET(c, d, a, b, 3, 14, T27); + SET(b, c, d, a, 8, 20, T28); + SET(a, b, c, d, 13, 5, T29); + SET(d, a, b, c, 2, 9, T30); + SET(c, d, a, b, 7, 14, T31); + SET(b, c, d, a, 12, 20, T32); +#undef SET + + /* Round 3. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + H(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 5, 4, T33); + SET(d, a, b, c, 8, 11, T34); + SET(c, d, a, b, 11, 16, T35); + SET(b, c, d, a, 14, 23, T36); + SET(a, b, c, d, 1, 4, T37); + SET(d, a, b, c, 4, 11, T38); + SET(c, d, a, b, 7, 16, T39); + SET(b, c, d, a, 10, 23, T40); + SET(a, b, c, d, 13, 4, T41); + SET(d, a, b, c, 0, 11, T42); + SET(c, d, a, b, 3, 16, T43); + SET(b, c, d, a, 6, 23, T44); + SET(a, b, c, d, 9, 4, T45); + SET(d, a, b, c, 12, 11, T46); + SET(c, d, a, b, 15, 16, T47); + SET(b, c, d, a, 2, 23, T48); +#undef SET + + /* Round 4. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ +#define I(x, y, z) ((y) ^ ((x) | ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + I(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 6, T49); + SET(d, a, b, c, 7, 10, T50); + SET(c, d, a, b, 14, 15, T51); + SET(b, c, d, a, 5, 21, T52); + SET(a, b, c, d, 12, 6, T53); + SET(d, a, b, c, 3, 10, T54); + SET(c, d, a, b, 10, 15, T55); + SET(b, c, d, a, 1, 21, T56); + SET(a, b, c, d, 8, 6, T57); + SET(d, a, b, c, 15, 10, T58); + SET(c, d, a, b, 6, 15, T59); + SET(b, c, d, a, 13, 21, T60); + SET(a, b, c, d, 4, 6, T61); + SET(d, a, b, c, 11, 10, T62); + SET(c, d, a, b, 2, 15, T63); + SET(b, c, d, a, 9, 21, T64); +#undef SET + + /* Then perform the following additions. (That is increment each + of the four registers by the value it had before this block + was started.) */ + pms->abcd[0] += a; + pms->abcd[1] += b; + pms->abcd[2] += c; + pms->abcd[3] += d; +} + +AREXPORT void +md5_init(md5_state_t *pms) +{ + pms->count[0] = pms->count[1] = 0; + pms->abcd[0] = 0x67452301; + pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; + pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; + pms->abcd[3] = 0x10325476; +} + +AREXPORT void +md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) +{ + const md5_byte_t *p = data; + int left = nbytes; + int offset = (pms->count[0] >> 3) & 63; + md5_word_t nbits = (md5_word_t)(nbytes << 3); + + if (nbytes <= 0) + return; + + /* Update the message length. */ + pms->count[1] += nbytes >> 29; + pms->count[0] += nbits; + if (pms->count[0] < nbits) + pms->count[1]++; + + /* Process an initial partial block. */ + if (offset) { + int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); + + memcpy(pms->buf + offset, p, copy); + if (offset + copy < 64) + return; + p += copy; + left -= copy; + md5_process(pms, pms->buf); + } + + /* Process full blocks. */ + for (; left >= 64; p += 64, left -= 64) + md5_process(pms, p); + + /* Process a final partial block. */ + if (left) + memcpy(pms->buf, p, left); +} + +AREXPORT void +md5_finish(md5_state_t *pms, md5_byte_t digest[16]) +{ + static const md5_byte_t pad[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + md5_byte_t data[8]; + int i; + + /* Save the length before padding. */ + for (i = 0; i < 8; ++i) + data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); + /* Pad to 56 bytes mod 64. */ + md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); + /* Append the length. */ + md5_append(pms, data, 8); + for (i = 0; i < 16; ++i) + digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); +} diff --git a/Legacy/Aria/ArNetworking/tests/Makefile b/Legacy/Aria/ArNetworking/tests/Makefile new file mode 100644 index 0000000..83d812d --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/Makefile @@ -0,0 +1,9 @@ + +.PHONY: all + +all: + $(MAKE) -C .. tests + +%: %.cpp + $(MAKE) -C .. tests/$@ + diff --git a/Legacy/Aria/ArNetworking/tests/baseTest.cpp b/Legacy/Aria/ArNetworking/tests/baseTest.cpp new file mode 100644 index 0000000..e875b1f --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/baseTest.cpp @@ -0,0 +1,62 @@ +#include "Aria.h" +#include "ArNetworking.h" + + + + +/* Key handler for the escape key: shutdown all of Aria. */ +void escape(void) +{ + printf("esc pressed, shutting down aria\n"); + Aria::shutdown(); +} + +int main(int argc, char **argv) +{ + Aria::init(); + + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + printf("Connected to server.\n"); + + + /* Create a key handler and also tell Aria about it */ + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + + /* Global escape-key handler to shut everythnig down */ + ArGlobalFunctor escapeCB(&escape); + keyHandler.addKeyHandler(ArKeyHandler::ESCAPE, &escapeCB); + + client.runAsync(); + + while (client.getRunningWithLock()) + { + keyHandler.checkKeys(); + ArUtil::sleep(100); + } + + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/cameraModeClient.cpp b/Legacy/Aria/ArNetworking/tests/cameraModeClient.cpp new file mode 100644 index 0000000..8a454bd --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/cameraModeClient.cpp @@ -0,0 +1,85 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void getCameraModeList(ArNetPacket *packet) +{ + ArTypes::UByte2 numModes; + + numModes = packet->bufToUByte2(); + + printf("%d camera modes:\n", numModes); + char modeName[512]; + for (int i = 0; i < numModes; i++) + { + packet->bufToStr(modeName, sizeof(modeName)); + printf("\t%s\n", modeName); + } +} + +void cameraModeUpdated(ArNetPacket *packet) +{ + char modeName[512]; + packet->bufToStr(modeName, sizeof(modeName)); + printf("Switched to mode %s\n", modeName); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArClientBase client; + std::string host; + + + ArArgumentParser parser(&argc, argv); + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server rejected connection, exiting\n"); + else + printf("Could not connect to server, exiting\n"); + exit(1); + } + + + client.addHandler("getCameraModeListCam1", + new ArGlobalFunctor1<ArNetPacket *>(&getCameraModeList)); + + client.requestOnce("getCameraModeListCam1"); + + ArNetPacket sending; + + // This does the look at goal mode + sending.empty(); + sending.strToBuf("lookAtGoal"); + client.requestOnce("setCameraModeCam1", &sending); + + // This does the look at point mode (at 0 0); + + sending.empty(); + sending.strToBuf("lookAtPoint"); + sending.byte4ToBuf(1157); + sending.byte4ToBuf(-15786); + client.requestOnce("setCameraModeCam1", &sending); + + while (Aria::getRunning() && client.isConnected()) + { + client.loopOnce(); + ArUtil::sleep(1000); + } + Aria::shutdown(); + return 0; + +}; diff --git a/Legacy/Aria/ArNetworking/tests/clientLoadMap.cpp b/Legacy/Aria/ArNetworking/tests/clientLoadMap.cpp new file mode 100644 index 0000000..9690c33 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/clientLoadMap.cpp @@ -0,0 +1,52 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + client.runAsync(); + + ArNetPacket sending; + // We have to tell it what section we're sending + sending.strToBuf("Section"); + // The map is in the files section + sending.strToBuf("Files"); + // The parameter name + sending.strToBuf("Map"); + // The value of the parameter + sending.strToBuf("entire2.map"); + + // you could put in however many of these you want... + + client.requestOnce("setConfig", &sending); + + // you have to give the client some time to send the command + ArUtil::sleep(500); + + + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/ArNetworking/tests/clientLocalizeToPose.cpp b/Legacy/Aria/ArNetworking/tests/clientLocalizeToPose.cpp new file mode 100644 index 0000000..dbe1c39 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/clientLocalizeToPose.cpp @@ -0,0 +1,56 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + if (parser.getArgc() < 4 || parser.getArgc() > 6) + { + printf("usage: %s <x> <y> <th> <optional:xyspread> <optional:thspread>", argv[0]); + exit(1); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + client.runAsync(); + + ArNetPacket sending; + // put in the arguments (you can see what they are from doing -lcl on clientDemo) + sending.byte4ToBuf(atoi(parser.getArg(1))); + sending.byte4ToBuf(atoi(parser.getArg(2))); + sending.byte4ToBuf(atoi(parser.getArg(3))); + if (parser.getArgc() > 4) + sending.uByte4ToBuf(atoi(parser.getArg(4))); + if (parser.getArgc() > 5) + sending.uByte4ToBuf(atoi(parser.getArg(5))); + // send the packet + client.requestOnce("localizeToPose", &sending); + + // you have to give the client some time to send the command + ArUtil::sleep(500); + + + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/ArNetworking/tests/clientPatrol.cpp b/Legacy/Aria/ArNetworking/tests/clientPatrol.cpp new file mode 100644 index 0000000..2e0b48d --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/clientPatrol.cpp @@ -0,0 +1,50 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + client.runAsync(); + + ArNetPacket sending; + // We have to tell it what route we want to patrol + sending.strToBuf("hallways"); + // tell it how much many times we want to patrol (<= 0 == forever) + sending.byte4ToBuf(0); + + client.requestOnce("patrolRouteCount", &sending); + + // note that there's also another call (patrol) that just has it always + // patrol forever but this gives you more options and is only + // slightly more complicated (just give it that byte4) + + // you have to give the client some time to send the command + ArUtil::sleep(500); + + + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/ArNetworking/tests/clientTest.vcproj b/Legacy/Aria/ArNetworking/tests/clientTest.vcproj new file mode 100644 index 0000000..a9d0308 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/clientTest.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="clientTest" + SccProjectName="" + SccLocalPath=""> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\../../bin" + IntermediateDirectory=".\../../obj" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\include,..\..\include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile=".\../../obj/clientTest.pch" + AssemblerListingLocation=".\../../obj/" + ObjectFile=".\../../obj/" + ProgramDataBaseFileName=".\../../obj/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="Aria.lib ArNetworking.lib odbc32.lib odbccp32.lib" + OutputFile=".\../../bin/clientTest.exe" + Version="1.0" + LinkIncremental="2" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\lib" + GenerateDebugInformation="TRUE" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\../../bin/clientTest.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\../../bin" + IntermediateDirectory=".\../../obj" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\include,..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile=".\../../obj/clientTest.pch" + AssemblerListingLocation=".\../../obj/" + ObjectFile=".\../../obj/" + ProgramDataBaseFileName=".\../../obj/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="Aria.lib odbc32.lib odbccp32.lib" + OutputFile=".\../../bin/clientTest.exe" + Version="1.0" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\lib" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\../../bin/clientTest.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + <File + RelativePath="clientTest.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl"> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Legacy/Aria/ArNetworking/tests/commandTestClient.cpp b/Legacy/Aria/ArNetworking/tests/commandTestClient.cpp new file mode 100644 index 0000000..86ea48b --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/commandTestClient.cpp @@ -0,0 +1,94 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArClientBase client; + +void commandList(ArNetPacket *packet) +{ + char name[512]; + char description[512]; + int numCommands; + int i; + + numCommands = packet->bufToByte2(); + printf("%d commands\n", numCommands); + for (i = 0; i < numCommands; i++) + { + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(description, sizeof(description)); + printf("%-20s%s\n", name, description); + client.requestOnce(name); + } + +} + +void stringCommandList(ArNetPacket *packet) +{ + char name[512]; + char description[512]; + int numCommands; + int i; + char buf[512]; + + numCommands = packet->bufToByte2(); + printf("%d string commands\n", numCommands); + for (i = 0; i < numCommands; i++) + { + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(description, sizeof(description)); + printf("%-20s%s\n", name, description); + sprintf(buf, "%ld some random fun string %ld", ArMath::random(), + ArMath::random()); + client.requestOnceWithString(name, buf); + } + +} + + + +int main(int argc, char **argv) +{ + + std::string hostname; + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + if (argc == 1) + hostname = "localhost"; + else + hostname = argv[1]; + if (!client.blockingConnect(hostname.c_str(), 7272)) + { + printf("Could not connect to server, exiting\n"); + exit(1); + } + ArGlobalFunctor1<ArNetPacket *> commandCB(&commandList); + ArGlobalFunctor1<ArNetPacket *> stringCommandCB(&stringCommandList); + client.addHandler("listCommands", &commandCB); + client.addHandler("listStringCommands", &stringCommandCB); + client.requestOnce("listCommands"); + client.requestOnce("listStringCommands"); + /* + client.requestOnce("Function1"); + client.requestOnce("Function2"); + client.requestOnce("Function3"); + client.requestOnce("Function1"); + client.requestOnceWithString("StringFunction4", "Some string!"); + client.requestOnceWithString("StringFunction5", "funfunfun"); + client.requestOnceWithString("StringFunction6", "six"); + client.requestOnceWithString("StringFunction4", "Some other string!"); + */ + client.runAsync(); + while (client.getRunningWithLock()) + { + ArUtil::sleep(1); + //printf("%d ms since last data\n", client.getLastPacketReceived().mSecSince()); + } + Aria::shutdown(); + return 0; + +} + + + + diff --git a/Legacy/Aria/ArNetworking/tests/commandTestServer.cpp b/Legacy/Aria/ArNetworking/tests/commandTestServer.cpp new file mode 100644 index 0000000..3140b79 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/commandTestServer.cpp @@ -0,0 +1,67 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void function1(void) +{ + printf("Function1 called\n"); +} + +void function2(void) +{ + printf("Function2 called\n"); +} + +void function3(void) +{ + printf("Function3 called\n"); +} + +void function4(ArArgumentBuilder *arg) +{ + printf("Function4 called with string '%s'\n", arg->getFullString()); +} + +void function5(ArArgumentBuilder *arg) +{ + printf("Function5 called with string '%s'\n", arg->getFullString()); +} + +void function6(ArArgumentBuilder *arg) +{ + printf("Function6 called with string '%s'\n", arg->getFullString()); +} + + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + + ArServerHandlerCommands commands(&server); + commands.addCommand("Function1", "Call the function that is number 1!", + new ArGlobalFunctor(&function1)); + commands.addCommand("Function2", "Second function to call", + new ArGlobalFunctor(&function2)); + commands.addCommand("Function3", "Tree climb", + new ArGlobalFunctor(&function3)); + commands.addStringCommand("StringFunction4", + "Print a string in function 4", + new ArGlobalFunctor1< + ArArgumentBuilder *>(&function4)); + commands.addStringCommand("StringFunction5", + "Prints a string given (5)", + new ArGlobalFunctor1< + ArArgumentBuilder *>(&function5)); + commands.addStringCommand("StringFunction6", + "Print out a value for function 6", + new ArGlobalFunctor1< + ArArgumentBuilder *>(&function6)); + + server.run(); +} diff --git a/Legacy/Aria/ArNetworking/tests/fileClient.cpp b/Legacy/Aria/ArNetworking/tests/fileClient.cpp new file mode 100644 index 0000000..c1a18ed --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/fileClient.cpp @@ -0,0 +1,217 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArClientFileLister *fileLister; +ArClientFileToClient *fileToClient; +ArClientFileFromClient *fileFromClient; +ArClientDeleteFileOnServer *deleteFileOnServer; + +bool done = false; + +void updated(int ret) +{ + done = true; + if (ret == 0) + fileLister->log(false); + else + printf("Bad update %d\n", ret); +} + +void fileReceived(int ret) +{ + done = true; + if (ret == 0) + printf("Got file '%s'\n", fileToClient->getFileName()); + else + printf("Didn't get file '%s' because %d\n", fileToClient->getFileName(), + ret); +} + +void fileSent(int ret) +{ + done = true; + if (ret == 0) + printf("Sent file '%s'\n", fileFromClient->getFileName()); + else + printf("Didn't send file '%s' because %d\n", + fileFromClient->getFileName(), + ret); +} + +void fileDeleted(int ret) +{ + done = true; + if (ret == 0) + printf("Deleted file '%s'\n", deleteFileOnServer->getFileName()); + else + printf("Didn't delete file '%s' because %d\n", + deleteFileOnServer->getFileName(), + ret); +} + +void waitForDone(void) +{ + while (!done && Aria::getRunning()) + ArUtil::sleep(1); + done = false; +} + +int main(int argc, char **argv) +{ + std::string hostname; + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArClientBase client; + + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + fileLister = new ArClientFileLister(&client); + fileLister->addUpdatedCallback(new ArGlobalFunctor1<int>(&updated)); + + fileToClient = new ArClientFileToClient(&client); + fileToClient->addFileReceivedCallback( + new ArGlobalFunctor1<int>(&fileReceived)); + + fileFromClient = new ArClientFileFromClient(&client); + fileFromClient->addFileSentCallback( + new ArGlobalFunctor1<int>(&fileSent)); + + deleteFileOnServer = new ArClientDeleteFileOnServer(&client); + deleteFileOnServer->addFileDeletedCallback( + new ArGlobalFunctor1<int>(&fileDeleted)); + + client.runAsync(); + + /* + if (deleteFileOnServer->deleteFileFromDirectory(NULL, "all.bob")) + waitForDone(); + else + printf("Error deleting file\n"); + + if (deleteFileOnServer->deleteFileFromDirectory("1", "all.bob")) + waitForDone(); + else + printf("Error deleting file\n"); + + if (deleteFileOnServer->deleteFileFromDirectory("1/3", "all.bob")) + waitForDone(); + else + printf("Error deleting file\n"); + + + if (deleteFileOnServer->deleteFileFromDirectory("fun", "all.bob")) + waitForDone(); + else + printf("Error deleting file\n"); + + if (deleteFileOnServer->deleteFileFromDirectory("argh", "all.bob")) + waitForDone(); + else + printf("Error deleting file\n"); + */ + + /* + done = false; + if (fileFromClient->putFileToDirectory("argh", "png", "app_logo.png", ArClientFileFromClient::SPEED_SLOW)) + waitForDone(); + else + printf("Error before sending file\n"); + */ + done = false; + if (fileFromClient->putFileToDirectory(NULL, "dox", "doxygen.conf", ArClientFileFromClient::SPEED_SLOW)) + waitForDone(); + else + printf("Error before sending file\n"); + + +/* + done = false; + if (fileFromClient->putFileToDirectory("argh", "png", "app_logo.png") + waitForDone(); + else + printf("Error before sending file\n"); + + done = false; + if (fileFromClient->putFileToDirectory(NULL, "dox", "doxygen.conf") + waitForDone(); + else + printf("Error before sending file\n"); +*/ +/* + fileLister->changeToTopDir(); + waitForDone(); + fileLister->changeToDir("argh"); + waitForDone(); + fileLister->log(true); + + fileToClient->getFileFromDirectory("argh\\um", "doxygen", "slashes"); + waitForDone(); + fileToClient->getFileFromDirectory("argh", "DOXYGEN.Conf", "blah.um.2"); + waitForDone(); + fileToClient->getFileFromDirectory("argh", "wehlkjadsf", "blah.um.2"); + waitForDone(); + fileToClient->getFileFromDirectory("argh", "1", "blah.um"); + waitForDone(); + fileToClient->getFileFromDirectory(NULL, "1", "blah.um.2"); + waitForDone(); + */ + /* + fileToClient->getFileFromDirectory(NULL, "all.map", "all.map.2"); + waitForDone(); + + fileToClient->getFileFromDirectory(NULL, "um.map", "all.map.2"); + waitForDone(); + + fileToClient->getFileFromDirectory(NULL, "all.map", "all.map.3"); + waitForDone(); + + fileToClient->getFileFromDirectory(NULL, "configClient.txt", "something"); + waitForDone(); + + */ + + /* + fileLister->changeToTopDir(); + waitForDone(); + fileLister->changeToDir("0level"); + waitForDone(); + fileLister->changeToDir("1level"); + waitForDone(); + fileLister->upOneDir(); + waitForDone(); + fileLister->changeToDir("1level2"); + waitForDone(); + */ + + + + Aria::shutdown(); + return 0; + +} + + + + diff --git a/Legacy/Aria/ArNetworking/tests/fileClientRaw.cpp b/Legacy/Aria/ArNetworking/tests/fileClientRaw.cpp new file mode 100644 index 0000000..5dd0ee2 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/fileClientRaw.cpp @@ -0,0 +1,228 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArClientBase client; + +void getDirListing(ArNetPacket *packet) +{ + char name[2048]; + char directory[2048]; + time_t atime; + time_t mtime; + unsigned int num; + unsigned int ret; + unsigned int i; + + ret = packet->bufToUByte2(); + if (ret != 0) + { + printf("Bad return %d\n", ret); + exit(1); + } + packet->bufToStr(directory, sizeof(directory)); + printf("In directory '%s'\n", directory); + num = packet->bufToUByte2(); + printf("%d directories\n", num); + for (i = 0; i < num; i++) + { + packet->bufToStr(name, sizeof(name)); + atime = packet->bufToUByte4(); + mtime = packet->bufToUByte4(); + printf("\t%s\n", name); + printf("\t\t%s", ctime(&atime)); + printf("\t\t%s", ctime(&mtime)); + } + num = packet->bufToUByte2(); + printf("%d files\n", num); + for (i = 0; i < num; i++) + { + packet->bufToStr(name, sizeof(name)); + atime = packet->bufToUByte4(); + mtime = packet->bufToUByte4(); + printf("\t%s\n", name); + printf("\t\t%s", ctime(&atime)); + printf("\t\t%s", ctime(&mtime)); + } + exit(0); +} + +FILE *file = NULL; + +void netGetFile(ArNetPacket *packet) +{ + int ret; + char fileName[2048]; + ret = packet->bufToUByte2(); + packet->bufToStr(fileName, sizeof(fileName)); + if (ret != 0) + { + printf("Bad return %d on file %s\n", ret, fileName); + exit(1); + } + if (file == NULL) + { + printf("Getting file %s\n", fileName); + if ((file = ArUtil::fopen("fileClientRaw.dump", "w")) == NULL) + { + printf("Can't open fileClientRaw.dump to dump file into\n"); + exit(2); + } + } + ArTypes::UByte4 numBytes; + char buf[32000]; + // file should be good here, so just write into it + numBytes = packet->bufToUByte4(); + if (numBytes == 0) + { + printf("Got all of file %s\n", fileName); + fclose(file); + exit(0); + } + else + { + printf("Got %d bytes of file %s\n", numBytes, fileName); + packet->bufToData(buf, numBytes); + fwrite(buf, 1, numBytes, file); + } +} + +void netPutFile(ArNetPacket *packet) +{ + int ret; + char fileName[2048]; + + ret = packet->bufToUByte2(); + packet->bufToStr(fileName, sizeof(fileName)); + + printf("Ret of '%s' is %d\n", fileName, ret); +} + +void putFile(char *fileName, char *asFileName) +{ + ArNetPacket sendPacket; + size_t ui; + size_t len; + + FILE *file; + if ((file = ArUtil::fopen(fileName, "r")) == NULL) + { + ArLog::log(ArLog::Normal, + "putFile: can't open file '%s'", fileName); + return; + } + + // tell the server we're sending + + sendPacket.empty(); + sendPacket.uByte2ToBuf(0); + sendPacket.strToBuf(asFileName); + client.requestOnce("putFile", &sendPacket); + printf("Starting send of file %s\n", fileName); + + char buf[30000]; + size_t ret; + // now send the file + while ((ret = fread(buf, 1, sizeof(buf), file)) == sizeof(buf)) + { + sendPacket.empty(); + sendPacket.uByte2ToBuf(1); + sendPacket.strToBuf(asFileName); + sendPacket.uByte4ToBuf(ret); + sendPacket.dataToBuf(buf, ret); + client.requestOnce("putFile", &sendPacket); + printf("Sent packet with %d\n", ret); + } + if (ferror(file)) + { + ArLog::log(ArLog::Normal, "ArServerFileToClient: Error sending file %s", + fileName); + sendPacket.empty(); + sendPacket.uByte2ToBuf(3); + sendPacket.strToBuf(asFileName); + client.requestOnce("putFile", &sendPacket); + return; + } + + sendPacket.empty(); + sendPacket.uByte2ToBuf(1); + sendPacket.strToBuf(asFileName); + sendPacket.uByte4ToBuf(ret); + sendPacket.dataToBuf(buf, ret); + client.requestOnce("putFile", &sendPacket); + printf("Sent packet with %d\n", ret); + + + sendPacket.empty(); + sendPacket.uByte2ToBuf(2); + sendPacket.strToBuf(asFileName); + client.requestOnce("putFile", &sendPacket); + + if (feof(file)) + { + ArLog::log(ArLog::Normal, "ArServerFileToClient: Sent file %s", fileName); + } + + fclose(file); +} + +void netDeleteFile(ArNetPacket *packet) +{ + int ret; + char fileName[2048]; + + ret = packet->bufToUByte2(); + packet->bufToStr(fileName, sizeof(fileName)); + + printf("Delete file ret of '%s' is %d\n", fileName, ret); +} + +int main(int argc, char **argv) +{ + + std::string hostname; + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + if (argc == 1) + hostname = "localhost"; + else + hostname = argv[1]; + if (!client.blockingConnect(hostname.c_str(), 7272)) + { + printf("Could not connect to server, exiting\n"); + exit(1); + } + + + /* + ArGlobalFunctor1<ArNetPacket *> getDirListingCB(&getDirListing); + client.addHandler("getDirListing", &getDirListingCB); + //client.requestOnceWithString("getDirListing", ""); + + ArGlobalFunctor1<ArNetPacket *> getFileCB(&netGetFile); + client.addHandler("getFile", &getFileCB); + client.requestOnceWithString("getFile", "all.bob"); + + ArGlobalFunctor1<ArNetPacket *> netPutFileCB(&netPutFile); + client.addHandler("putFile", &netPutFileCB); + putFile("doxygen.conf", "ArGH/DoxYGEN"); + */ + + ArGlobalFunctor1<ArNetPacket *> deleteFileCB(&netDeleteFile); + client.addHandler("deleteFile", &deleteFileCB); + client.requestOnceWithString("deleteFile", "1/all.bob"); + + client.runAsync(); + + while (client.getRunningWithLock()) + { + ArUtil::sleep(1); + } + Aria::shutdown(); + return 0; + +} + + + + diff --git a/Legacy/Aria/ArNetworking/tests/fileServer.cpp b/Legacy/Aria/ArNetworking/tests/fileServer.cpp new file mode 100644 index 0000000..50d0f3a --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/fileServer.cpp @@ -0,0 +1,20 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + + ArServerFileLister fileLister(&server, "."); + ArServerFileToClient fileToClient(&server, "."); + ArServerFileFromClient fileFromClient(&server, ".", "/tmp"); + ArServerDeleteFileOnServer fileDeleter(&server, "."); + server.run(); +} diff --git a/Legacy/Aria/ArNetworking/tests/fileToServer.cpp b/Legacy/Aria/ArNetworking/tests/fileToServer.cpp new file mode 100644 index 0000000..42e7fc7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/fileToServer.cpp @@ -0,0 +1,155 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArClientFileLister *fileLister; +ArClientFileToClient *fileToClient; +ArClientFileFromClient *fileFromClient; +ArClientDeleteFileOnServer *deleteFileOnServer; + +bool done = false; + +void updated(int ret) +{ + done = true; + if (ret == 0) + fileLister->log(false); + else + printf("Bad update %d\n", ret); +} + +void fileReceived(int ret) +{ + done = true; + if (ret == 0) + printf("Got file '%s'\n", fileToClient->getFileName()); + else + printf("Didn't get file '%s' because %d\n", fileToClient->getFileName(), + ret); +} + +void fileSent(int ret) +{ + done = true; + if (ret == 0) + printf("Sent file '%s'\n", fileFromClient->getFileName()); + else + printf("Didn't send file '%s' because %d\n", + fileFromClient->getFileName(), + ret); +} + +void fileDeleted(int ret) +{ + done = true; + if (ret == 0) + printf("Deleted file '%s'\n", deleteFileOnServer->getFileName()); + else + printf("Didn't delete file '%s' because %d\n", + deleteFileOnServer->getFileName(), + ret); +} + +void waitForDone(void) +{ + while (!done && Aria::getRunning()) + ArUtil::sleep(1); + done = false; +} + +int main(int argc, char **argv) +{ + std::string hostname; + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArClientBase client; + + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + ArClientFileFromClient::SendSpeed speed = ArClientFileFromClient::SPEED_AUTO; + + + if (parser.checkArgument("-speed_fast")) + { + ArLog::log(ArLog::Normal, "Putting file with speed_fast"); + speed = ArClientFileFromClient::SPEED_FAST; + } + else if (parser.checkArgument("-speed_slow")) + { + ArLog::log(ArLog::Normal, "Putting file with speed_slow"); + speed = ArClientFileFromClient::SPEED_SLOW; + } + else + { + ArLog::log(ArLog::Normal, "Putting file with speed_auto"); + } + + bool pauseAfterSend; + + if (parser.checkArgument("-pauseAfterSend")) + { + ArLog::log(ArLog::Normal, "Will pause after send"); + pauseAfterSend = true; + } + else + { + ArLog::log(ArLog::Normal, "Will not pause after send"); + pauseAfterSend = false; + } + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed(1) || + parser.getArgc() <= 1) + { + ArLog::log(ArLog::Normal, "%s <fileName> [-speed_fast] [-speed_slow] [-pauseAfterSend]", + argv[0]); + ArLog::log(ArLog::Normal, "Default send speed is speed_auto"); + ArLog::log(ArLog::Normal, ""); + Aria::logOptions(); + exit(0); + } + + const char *fileName = parser.getArg(1); + + + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + fileFromClient = new ArClientFileFromClient(&client); + fileFromClient->addFileSentCallback( + new ArGlobalFunctor1<int>(&fileSent)); + + client.runAsync(); + + done = false; + if (!fileFromClient->putFileToDirectory(NULL, fileName, fileName, + speed)) + { + printf("Error before sending file\n"); + Aria::exit(1); + } + + waitForDone(); + + if (pauseAfterSend) + ArUtil::sleep(10000); + + Aria::exit(0); + return 255; +} + + + + diff --git a/Legacy/Aria/ArNetworking/tests/idleClient.cpp b/Legacy/Aria/ArNetworking/tests/idleClient.cpp new file mode 100644 index 0000000..bc92d6f --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/idleClient.cpp @@ -0,0 +1,58 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +void idleProcessingPending(ArNetPacket *packet) +{ + if (packet->bufToByte() == 1) + printf("Idle processing pending\n"); + else + printf("No idle processing pending\n"); +} + +int main(int argc, char **argv) +{ + + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Normal); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + ArGlobalFunctor1<ArNetPacket *> idleProcessingPendingCB( + &idleProcessingPending); + client.addHandler("idleProcessingPending", &idleProcessingPendingCB); + client.request("idleProcessingPending", -1); + + client.runAsync(); + while (client.getRunningWithLock()) + { + ArUtil::sleep(1); + //printf("%d ms since last data\n", client.getLastPacketReceived().mSecSince()); + } + Aria::shutdown(); + return 0; + +} + + + + diff --git a/Legacy/Aria/ArNetworking/tests/infoDrawingClient.cpp b/Legacy/Aria/ArNetworking/tests/infoDrawingClient.cpp new file mode 100644 index 0000000..2c3404a --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/infoDrawingClient.cpp @@ -0,0 +1,133 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArClientBase client; + +// suppress the output of drawings until we get the whole list in and then for a few seconds beyond that +bool getDrawingListDone = true; +ArTime getDrawingListDoneTime; + +void drawingData(ArNetPacket *packet) +{ + if (getDrawingListDone && getDrawingListDoneTime.secSince() < 5) + return; + + int x, y; + int numReadings; + int i; + + numReadings = packet->bufToByte4(); + + if (numReadings == 0) + { + printf("No readings for sensor %s\n\n", client.getName(packet)); + return; + } + + printf("Readings (%d) for %s:", numReadings, client.getName(packet)); + for (i = 0; i < numReadings; i++) + { + x = packet->bufToByte4(); + y = packet->bufToByte4(); + printf(" (%d %d)", x, y); + } + printf("\n\n"); +} + +ArGlobalFunctor1<ArNetPacket *> drawingDataCB(&drawingData); + +void getDrawingList(ArNetPacket *packet) +{ + int numDrawings; + int i; + char name[512]; + char shape[512]; + char visibility[512]; + long primary, size, layer, secondary; + unsigned long refresh; + + if (packet->getDataReadLength() == packet->getDataLength()) + { + ArLog::log(ArLog::Normal, ""); + ArLog::log(ArLog::Normal, "Done with getDrawingList, will begin logging drawing data in 5 seconds"); + getDrawingListDone = true; + getDrawingListDoneTime.setToNow(); + return; + } + + packet->bufToStr(name, sizeof(name)); + packet->bufToStr(shape, sizeof(shape)); + primary = packet->bufToByte4(); + size = packet->bufToByte4(); + layer = packet->bufToByte4(); + refresh = packet->bufToByte4(); + secondary = packet->bufToByte4(); + packet->bufToStr(visibility, sizeof(visibility)); + + ArLog::log(ArLog::Normal, "name %-40s shape %20s", name, shape); + ArLog::log(ArLog::Normal, + "\tprimary %08x size %2d layer %2d refresh %4u secondary %08x", + primary, size, layer, refresh, secondary); + + if (strcasecmp(visibility, "On") == 0 || + strcasecmp(visibility, "DefaultOn") == 0) + { + client.addHandler(name, &drawingDataCB); + client.request(name, refresh); + ArLog::log(ArLog::Normal, "\tRequesting %s since visibilty %s", name, visibility); + } + else + { + ArLog::log(ArLog::Normal, "\tNot requesting %s since visibilty %s", name, visibility); + } + +} + +int main(int argc, char **argv) +{ + + std::string hostname; + ArGlobalFunctor1<ArNetPacket *> getDrawingListCB(&getDrawingList); + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + printf("Connected to server.\n"); + + client.addHandler("getDrawingList", &getDrawingListCB); + client.requestOnce("getDrawingList"); + + client.runAsync(); + while (client.getRunningWithLock()) + { + ArUtil::sleep(1); + //printf("%d ms since last data\n", client.getLastPacketReceived().mSecSince()); + } + Aria::shutdown(); + return 0; + +} diff --git a/Legacy/Aria/ArNetworking/tests/infoDrawingServer.cpp b/Legacy/Aria/ArNetworking/tests/infoDrawingServer.cpp new file mode 100644 index 0000000..41c263f --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/infoDrawingServer.cpp @@ -0,0 +1,30 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void sendEmpty(ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sendingPacket; + sendingPacket.byteToBuf(0); + client->sendPacketTcp(&sendingPacket); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + ArGlobalFunctor2<ArServerClient *, ArNetPacket *> sendEmptyCB(&sendEmpty); + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + + ArServerInfoDrawings drawing(&server); + + ArDrawingData arrows("polyarrow", ArColor(0, 0, 255), 5, 50); + ArDrawingData dots("polydots", ArColor(0, 255, 0), 12, 50); + drawing.addDrawing(&arrows, "arrows", &sendEmptyCB); + drawing.addDrawing(&dots, "dots", &sendEmptyCB); + server.run(); + +} diff --git a/Legacy/Aria/ArNetworking/tests/mapClient.cpp b/Legacy/Aria/ArNetworking/tests/mapClient.cpp new file mode 100644 index 0000000..9db6041 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/mapClient.cpp @@ -0,0 +1,79 @@ +#include "Aria.h" +#include "ArNetworking.h" + +ArMap arMap; +ArClientBase client; +ArTime start; + +void handleGetMapName(ArNetPacket *packet) +{ + char buffer[512]; + + packet->bufToStr(buffer, sizeof(buffer)); + printf("MapFile: %s\n", buffer); +} + +void handleGetMap(ArNetPacket *packet) +{ + char buffer[10000]; + + if (packet->getDataReadLength() == packet->getDataLength()) + { + printf("Empty packet signifying end of map (for central forward)\n"); + return; + } + + packet->bufToStr(buffer, sizeof(buffer)); + // if we got an end of line char instead of a line it means the map is over + if (buffer[0] == '\0') + { + printf("Map took %g seconds\n", start.mSecSince() / 1000.0); + arMap.parsingComplete(); + arMap.writeFile("mapExample.map"); + //client.disconnect(); + //exit(0); + } + else + { + //printf("line '%s'\n", buffer); + arMap.parseLine(buffer); + } + +} + +int main(int argc, char **argv) +{ + + ArGlobalFunctor1<ArNetPacket *> getMapNameCB(handleGetMapName); + ArGlobalFunctor1<ArNetPacket *> getMapCB(handleGetMap); + + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + exit(1); + } + + client.addHandler("getMap", &getMapCB); + client.addHandler("getMapName", &getMapNameCB); + client.requestOnce("getMapName"); + start.setToNow(); + client.requestOnce("getMap"); + + client.run(); + +} diff --git a/Legacy/Aria/ArNetworking/tests/mapServer.cpp b/Legacy/Aria/ArNetworking/tests/mapServer.cpp new file mode 100644 index 0000000..2d13dce --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/mapServer.cpp @@ -0,0 +1,27 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +int main(int argc, char **argv) +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArServerBase server; + ArMap arMap; + + if (argc < 2) + { + printf("Usage: %s <mapToServe>\n", argv[0]); + exit(2); + } + arMap.readFile(argv[1]); + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + + ArServerHandlerMap netMap(&server, &arMap); + server.run(); + +} diff --git a/Legacy/Aria/ArNetworking/tests/md5test.cpp b/Legacy/Aria/ArNetworking/tests/md5test.cpp new file mode 100644 index 0000000..94f4e03 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/md5test.cpp @@ -0,0 +1,143 @@ +/* + The test program (called md5main.c by them) that came with the md5 + package from http://sourceforge.net/project/showfiles.php?group_id=42360 +*/ + +/* + Copyright (C) 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.c is L. Peter Deutsch + <ghost@aladdin.com>. Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Splits off main program into a separate file, md5main.c. + */ + +#include "md5.h" +#include <math.h> +#include <stdio.h> +#include <string.h> + +/* + * This file builds an executable that performs various functions related + * to the MD5 library. Typical compilation: + * gcc -o md5main -lm md5main.c md5.c + */ +static const char *const usage = "\ +Usage:\n\ + md5main --test # run the self-test (A.5 of RFC 1321)\n\ + md5main --t-values # print the T values for the library\n\ + md5main --version # print the version of the package\n\ +"; +static const char *const version = "2002-04-13"; + +/* Run the self-test. */ +static int +do_test(void) +{ + static const char *const test[7*2] = { + "", "d41d8cd98f00b204e9800998ecf8427e", + "a", "0cc175b9c0f1b6a831c399e269772661", + "abc", "900150983cd24fb0d6963f7d28e17f72", + "message digest", "f96b697d7cb7938d525a2f31aaf161d0", + "abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "d174ab98d277d9f5a5611c2c9f419d9f", + "12345678901234567890123456789012345678901234567890123456789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a" + }; + int i; + int status = 0; + + for (i = 0; i < 7*2; i += 2) { + md5_state_t state; + md5_byte_t digest[16]; + char hex_output[16*2 + 1]; + int di; + + md5_init(&state); + md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i])); + md5_finish(&state, digest); + for (di = 0; di < 16; ++di) + sprintf(hex_output + di * 2, "%02x", digest[di]); + if (strcmp(hex_output, test[i + 1])) { + printf("MD5 (\"%s\") = ", test[i]); + puts(hex_output); + printf("**** ERROR, should be: %s\n", test[i + 1]); + status = 1; + } + } + if (status == 0) + puts("md5 self-test completed successfully."); + return status; +} + +/* Print the T values. */ +static int +do_t_values(void) +{ + int i; + for (i = 1; i <= 64; ++i) { + unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i))); + + /* + * The following nonsense is only to avoid compiler warnings about + * "integer constant is unsigned in ANSI C, signed with -traditional". + */ + if (v >> 31) { + printf("#define T%d /* 0x%08lx */ (T_MASK ^ 0x%08lx)\n", i, + v, (unsigned long)(unsigned int)(~v)); + } else { + printf("#define T%d 0x%08lx\n", i, v); + } + } + return 0; +} + +/* Main program */ +int +main(int argc, char *argv[]) +{ + if (argc == 2) { + if (!strcmp(argv[1], "--test")) + return do_test(); + if (!strcmp(argv[1], "--t-values")) + return do_t_values(); + if (!strcmp(argv[1], "--version")) { + puts(version); + return 0; + } + } + puts(usage); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/modeInfoClient.cpp b/Legacy/Aria/ArNetworking/tests/modeInfoClient.cpp new file mode 100644 index 0000000..e03bd14 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/modeInfoClient.cpp @@ -0,0 +1,86 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +void getModeDataList(ArNetPacket *packet) +{ + char mode[512]; + char data[512]; + int numData; + int i; + + numData = packet->bufToByte4(); + printf("%d data in modes\n", numData); + for (i = 0; i < numData; i++) + { + packet->bufToStr(mode, sizeof(mode)); + packet->bufToStr(data, sizeof(data)); + printf("%-20s%s\n", mode, data); + } +} + +void getModeInfo(ArNetPacket *packet) +{ + char mode[512]; + unsigned char locked; + unsigned char willUnlock; + + packet->bufToStr(mode, sizeof(mode)); + locked = packet->bufToUByte(); + willUnlock = packet->bufToUByte(); + + printf("Mode: %s locked: %d willUnlockIfRequested: %d\n", + mode, locked, willUnlock); + +} + + + +int main(int argc, char **argv) +{ + + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Normal); + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + parser.loadDefaultArguments(); + + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + ArGlobalFunctor1<ArNetPacket *> getModeDataListCB(&getModeDataList); + ArGlobalFunctor1<ArNetPacket *> getModeInfoCB(&getModeInfo); + client.addHandler("getModeDataList", &getModeDataListCB); + client.requestOnce("getModeDataList"); + client.addHandler("getModeInfo", &getModeInfoCB); + client.request("getModeInfo", -1); + + client.runAsync(); + while (client.getRunningWithLock()) + { + ArUtil::sleep(1); + //printf("%d ms since last data\n", client.getLastPacketReceived().mSecSince()); + } + Aria::shutdown(); + return 0; + +} + + + + diff --git a/Legacy/Aria/ArNetworking/tests/reloadConfig.cpp b/Legacy/Aria/ArNetworking/tests/reloadConfig.cpp new file mode 100644 index 0000000..cb47080 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/reloadConfig.cpp @@ -0,0 +1,48 @@ +#include "Aria.h" +#include "ArNetworking.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArClientBase client; + std::string host; + + + ArArgumentParser parser(&argc, argv); + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!clientConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + clientConnector.logOptions(); + exit(0); + } + + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server rejected connection, exiting\n"); + else + printf("Could not connect to server, exiting\n"); + exit(1); + } + + + client.requestOnce("reloadConfig"); + + + ArTime start; + start.setToNow(); + while (Aria::getRunning() && client.isConnected()) + { + client.loopOnce(); + ArUtil::sleep(ArMath::random() % 10000); + client.requestOnce("reloadConfig"); + } + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/serverTest.vcproj b/Legacy/Aria/ArNetworking/tests/serverTest.vcproj new file mode 100644 index 0000000..1035a85 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/serverTest.vcproj @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="serverTest" + ProjectGUID="{3C7E4CF6-F6E6-452B-99F8-ACF4266730F4}" + SccProjectName="" + SccLocalPath=""> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\../../binNet" + IntermediateDirectory=".\../../objNet" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\include,..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="TRUE" + BasicRuntimeChecks="0" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile=".\../../objNet/serverTest.pch" + AssemblerListingLocation=".\../../objNet/" + ObjectFile=".\../../objNet/" + ProgramDataBaseFileName=".\../../objNet/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="Aria.lib ArNetworking.lib odbc32.lib odbccp32.lib" + OutputFile=".\../../binNet/serverTest.exe" + Version="1.0" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\libNet" + GenerateDebugInformation="TRUE" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\../../bin/serverTest.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool" + RelativePath="binNet"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\../../binNet" + IntermediateDirectory=".\../../objNet" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\include,..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="TRUE" + BasicRuntimeChecks="0" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile=".\../../objNet/serverTest.pch" + AssemblerListingLocation=".\../../objNet/" + ObjectFile=".\../../objNet/" + ProgramDataBaseFileName=".\../../objNet/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="Aria.lib ArNetworking.lib odbc32.lib odbccp32.lib" + OutputFile=".\../../binNet/serverTest.exe" + Version="1.0" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\libNet" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\../../bin/serverTest.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool" + RelativePath="binNet"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + <File + RelativePath="serverTest.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl"> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Legacy/Aria/ArNetworking/tests/simpleServerTest.cpp b/Legacy/Aria/ArNetworking/tests/simpleServerTest.cpp new file mode 100644 index 0000000..a65ba48 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/simpleServerTest.cpp @@ -0,0 +1,16 @@ +#include "Aria.h" +#include "ArServerBase.h" + + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + server.run(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/standaloneClientDemo.cpp b/Legacy/Aria/ArNetworking/tests/standaloneClientDemo.cpp new file mode 100644 index 0000000..0ea8026 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/standaloneClientDemo.cpp @@ -0,0 +1,161 @@ +#include "Aria.h" +#include "ArNetworking.h" + +class InputHandler +{ +public: + InputHandler(ArClientBase *client, ArKeyHandler *keyHandler); + virtual ~InputHandler(void); + void up(void); + void down(void); + void left(void); + void right(void); + void space(void); +protected: + ArClientBase *myClient; + ArKeyHandler *myKeyHandler; + ArFunctorC<InputHandler> myUpCB; + ArFunctorC<InputHandler> myDownCB; + ArFunctorC<InputHandler> myLeftCB; + ArFunctorC<InputHandler> myRightCB; + ArFunctorC<InputHandler> mySpaceCB; +}; + +InputHandler::InputHandler(ArClientBase *client, ArKeyHandler *keyHandler) : + myUpCB(this, &InputHandler::up), + myDownCB(this, &InputHandler::down), + myLeftCB(this, &InputHandler::left), + myRightCB(this, &InputHandler::right), + mySpaceCB(this, &InputHandler::space) +{ + myClient = client; + myKeyHandler = keyHandler; + myKeyHandler->addKeyHandler(ArKeyHandler::UP, &myUpCB); + myKeyHandler->addKeyHandler(ArKeyHandler::DOWN, &myDownCB); + myKeyHandler->addKeyHandler(ArKeyHandler::LEFT, &myLeftCB); + myKeyHandler->addKeyHandler(ArKeyHandler::RIGHT, &myRightCB); + myKeyHandler->addKeyHandler(ArKeyHandler::SPACE, &mySpaceCB); +} + +InputHandler::~InputHandler(void) +{ + +} + +void InputHandler::up(void) +{ + ArNetPacket packet; + packet.doubleToBuf(25); + myClient->requestOnce("deltaVel", &packet); +} + +void InputHandler::down(void) +{ + ArNetPacket packet; + packet.doubleToBuf(-25); + myClient->requestOnce("deltaVel", &packet); +} + +void InputHandler::left(void) +{ + ArNetPacket packet; + packet.doubleToBuf(3.2); + myClient->requestOnce("deltaHeading", &packet); +} + +void InputHandler::right(void) +{ + ArNetPacket packet; + packet.doubleToBuf(-3.2); + myClient->requestOnce("deltaHeading", &packet); +} + +void InputHandler::space(void) +{ + ArNetPacket packet; + packet.doubleToBuf(0.00001); + myClient->requestOnce("setVel", &packet); + myClient->requestOnce("deltaHeading", &packet); +} + +class OutputHandler +{ +public: + OutputHandler(ArClientBase *client); + virtual ~OutputHandler(void); + void handleOutput(ArNetPacket *packet); +protected: + double myX; + double myY; + double myTh; + double myVel; + double myRotVel; + double myVoltage; + ArClientBase *myClient; + ArFunctor1C<OutputHandler, ArNetPacket *> myHandleOutputCB; + +}; + +OutputHandler::OutputHandler(ArClientBase *client) : + myHandleOutputCB(this, &OutputHandler::handleOutput) +{ + myClient = client; + myClient->addHandler("output", &myHandleOutputCB); + myClient->request("output", 100); +} + +OutputHandler::~OutputHandler(void) +{ + myClient->requestStop("output"); +} + +void OutputHandler::handleOutput(ArNetPacket *packet) +{ + myX = packet->bufToByte4(); + myY = packet->bufToByte4(); + myTh = packet->bufToByte2()/10.0; + myVel = packet->bufToByte2(); + myRotVel = packet->bufToByte2(); + myVoltage = packet->bufToByte2()/10.0; + printf("\rx: %6.0f y: %6.0f th: %5.1f vel: %4.0f rotVel: %3.0f voltage: %4.1f", + myX, myY, myTh, myVel, myRotVel, myVoltage); + fflush(stdout); +} + + +void escape(void) +{ + Aria::shutdown(); +} + +int main(int argc, char **argv) +{ + char* host = "localhost"; + if(argc > 1) + host = argv[1]; + Aria::init(); + ArClientBase client; + ArGlobalFunctor escapeCB(&escape); + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + + + printf("Connecting to standaloneServerDemo at %s:%d...\n", host, 7272); + if (!client.blockingConnect(host, 7272)) + { + printf("Could not connect to server, exiting\n"); + exit(1); + } + InputHandler inputHandler(&client, &keyHandler); + OutputHandler outputHandler(&client); + keyHandler.addKeyHandler(ArKeyHandler::ESCAPE, &escapeCB); + client.runAsync(); + while (client.getRunningWithLock()) + { + keyHandler.checkKeys(); + ArUtil::sleep(1); + } + keyHandler.restore(); + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/standaloneServerDemo.cpp b/Legacy/Aria/ArNetworking/tests/standaloneServerDemo.cpp new file mode 100644 index 0000000..3456b03 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/standaloneServerDemo.cpp @@ -0,0 +1,191 @@ +#include "Aria.h" +#include "ArNetworking.h" + +class InputHandler +{ +public: + InputHandler(ArServerBase *server, ArRobot *robot); + virtual ~InputHandler(void); + void setVel(ArServerClient *client, ArNetPacket *packet); + void deltaVel(ArServerClient *client, ArNetPacket *packet); + void deltaHeading(ArServerClient *client, ArNetPacket *packet); +protected: + ArActionInput myActionInput; + ArRobot *myRobot; + ArServerBase *myServer; + ArFunctor2C<InputHandler, ArServerClient *, ArNetPacket *> mySetVelCB; + ArFunctor2C<InputHandler, ArServerClient *, ArNetPacket *> myDeltaVelCB; + ArFunctor2C<InputHandler, ArServerClient *, ArNetPacket *> myDeltaHeadingCB; +}; + +InputHandler::InputHandler(ArServerBase *server, ArRobot *robot) : + mySetVelCB(this, &InputHandler::setVel), + myDeltaVelCB(this, &InputHandler::deltaVel), + myDeltaHeadingCB(this, &InputHandler::deltaHeading) +{ + myRobot = robot; + myServer = server; + myRobot->addAction(&myActionInput, 50); + myServer->addData("setVel", "sets the velocity of the robot", &mySetVelCB, + "double: vel", "none"); + myServer->addData("deltaVel", "changes the velocity of the robot", + &myDeltaVelCB, "double: deltaVel", "none"); + myServer->addData("deltaHeading", "changes the heading of the robot", + &myDeltaHeadingCB, "double: deltaHeading", "none"); +} + +InputHandler::~InputHandler(void) +{ + myRobot->remAction(&myActionInput); + /*myServer->remData("setVel"); + myServer->remData("deltaVel"); + myServer->remData("deltaHeading");*/ +} + +void InputHandler::setVel(ArServerClient *client, ArNetPacket *packet) +{ + double vel = packet->bufToDouble(); + //printf("Vel %g\n", vel); + myActionInput.setVel(vel); +} + +void InputHandler::deltaVel(ArServerClient *client, ArNetPacket *packet) +{ + double delta = packet->bufToDouble(); + //printf("DeltaVel %g\n", delta); + //myActionInput.deltaVel(delta); // deltaVel has been removed from ArActionInput + myActionInput.setVel(myRobot->getVel() + delta); +} + +void InputHandler::deltaHeading(ArServerClient *client, ArNetPacket *packet) +{ + double delta = packet->bufToDouble(); + //printf("DeltaHeading %g\n", delta); + myActionInput.deltaHeadingFromCurrent(delta); +} + +class OutputHandler +{ +public: + OutputHandler(ArServerBase *server, ArRobot *robot); + virtual ~OutputHandler(void); + void buildOutput(void); + void output(ArServerClient *client, ArNetPacket *packet); + +protected: + ArServerBase *myServer; + ArRobot *myRobot; + ArMutex myPacketMutex; + ArNetPacket myBuiltPacket; + ArNetPacket mySendingPacket; + ArFunctor2C<OutputHandler, ArServerClient *, ArNetPacket *> myOutputCB; + ArFunctorC<OutputHandler> myTaskCB; +}; + +OutputHandler::OutputHandler(ArServerBase *server, ArRobot *robot) : + myOutputCB(this, &OutputHandler::output), + myTaskCB(this, &OutputHandler::buildOutput) +{ + myServer = server; + myRobot = robot; + myServer->addData("output", "gives the status of the robot", &myOutputCB, + "none", "byte4: x, byte4: y, byte2: th*10, byte2: vel, byte2: rotvel, byte2: battery*10"); + myRobot->addUserTask("output", 50, &myTaskCB); +} + +OutputHandler::~OutputHandler(void) +{ + +} + +void OutputHandler::buildOutput(void) +{ + myPacketMutex.lock(); + myBuiltPacket.empty(); + myBuiltPacket.byte4ToBuf(ArMath::roundInt(myRobot->getX())); + myBuiltPacket.byte4ToBuf(ArMath::roundInt(myRobot->getY())); + myBuiltPacket.byte2ToBuf(ArMath::roundInt(myRobot->getTh())); + myBuiltPacket.byte2ToBuf(ArMath::roundInt(myRobot->getVel())); + myBuiltPacket.byte2ToBuf(ArMath::roundInt(myRobot->getRotVel())); + myBuiltPacket.byte2ToBuf(ArMath::roundInt( + myRobot->getBatteryVoltage() * 10)); + myPacketMutex.unlock(); +} + +void OutputHandler::output(ArServerClient *client, ArNetPacket *packet) +{ + myPacketMutex.lock(); + mySendingPacket.duplicatePacket(&myBuiltPacket); + myPacketMutex.unlock(); + client->sendPacketTcp(&mySendingPacket); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArServerBase server; + // the serial connection (robot) + ArSerialConnection serConn; + // tcp connection (sim) + ArTcpConnection tcpConn; + // robot + ArRobot robot; + + // first open the server up + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + // attach stuff to the server + InputHandler inputHandler(&server, &robot); + OutputHandler outputHandler(&server, &robot); + // now let it spin off in its own thread + server.runAsync(); + + + tcpConn.setPort(); + // see if we can get to the simulator (true is success) + if (tcpConn.openSimple()) + { + // we could get to the sim, so set the robots device connection to the sim + printf("Connecting to simulator through tcp.\n"); + robot.setDeviceConnection(&tcpConn); + } + else + { + // we couldn't get to the sim, so set the port on the serial + // connection and then set the serial connection as the robots + // device + + // modify the next line if you're not using the first serial port + // to talk to your robot + serConn.setPort(); + printf( + "Could not connect to simulator, connecting to robot through serial.\n"); + robot.setDeviceConnection(&serConn); + } + + // try to connect, if we fail exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + // enable the motors, disable amigobot sounds + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::BUMPSTALL, 0); + + // run the robot, true here so that the run will exit if connection lost + robot.run(true); + + // now exit + Aria::shutdown(); + + + + return 0; +} + + diff --git a/Legacy/Aria/ArNetworking/tests/switchServer.cpp b/Legacy/Aria/ArNetworking/tests/switchServer.cpp new file mode 100644 index 0000000..64a6069 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/switchServer.cpp @@ -0,0 +1,61 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +void forwarderAdded(ArCentralForwarder *forwarder) +{ + printf("@ Forwarder added for %s\n", + forwarder->getRobotName()); +} + +void forwarderRemoved(ArCentralForwarder *forwarder) +{ + printf("@ Forwarder removed for %s\n", + forwarder->getRobotName()); +} + +int main(int argc, char **argv) +{ + Aria::init(); + + ArServerBase robotServer; + if (!robotServer.open(5000)) + { + printf("Could not open robot server port\n"); + Aria::exit(1); + } + + ArServerBase clientServer; + if (!clientServer.open(7272)) + { + printf("Could not open robot server port\n"); + Aria::exit(1); + } + + ArCentralManager switchManager(&robotServer, &clientServer); + + switchManager.addForwarderAddedCallback( + new ArGlobalFunctor1<ArCentralForwarder *>(&forwarderAdded), + 100); + switchManager.addForwarderRemovedCallback( + new ArGlobalFunctor1<ArCentralForwarder *>(&forwarderRemoved), + 100); + + // Start a small handler to monitor communication between the server and + // client. + ArServerHandlerCommMonitor commMonitor(&clientServer); + + ArServerHandlerCommands commands(&clientServer); + commands.setPrefix("CentralServer"); + + ArServerSimpleServerCommands serverCommands(&commands, &clientServer, + false); + commands.addCommand( + "NetworkLogConnections", "Logs the connections to the central server, and to all the forwarded connections", + new ArFunctorC<ArCentralManager> + (&switchManager, &ArCentralManager::logConnections)); + + clientServer.runAsync(); + robotServer.run(); + Aria::exit(0); +} diff --git a/Legacy/Aria/ArNetworking/tests/switchWatcher.cpp b/Legacy/Aria/ArNetworking/tests/switchWatcher.cpp new file mode 100644 index 0000000..6ebe91b --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/switchWatcher.cpp @@ -0,0 +1,105 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +void clientListHandler(ArNetPacket *packet) +{ + int numClients; + int i; + char hostName[512]; + int port; + char robotName[512]; + char flags[512]; + char robotIP[512]; + + + numClients = packet->bufToUByte2(); + printf("%d clients connected to server\n", numClients); + for (i = 0; i < numClients; i++) + { + packet->bufToStr(hostName, sizeof(hostName)); + port = packet->bufToUByte2(); + packet->bufToStr(robotName, sizeof(robotName)); + packet->bufToStr(flags, sizeof(flags)); + packet->bufToStr(robotIP, sizeof(robotIP)); + printf("\tHost: '%s' Port: %d ID: '%s' Flags: %s IP: %s\n", hostName, port, robotName, flags, robotIP); + } + printf("\n"); +} + + +void clientRemovedHandler(ArNetPacket *packet) +{ + char hostName[512]; + int port; + char robotName[512]; + char flags[512]; + char robotIP[512]; + + packet->bufToStr(hostName, sizeof(hostName)); + port = packet->bufToUByte2(); + packet->bufToStr(robotName, sizeof(robotName)); + packet->bufToStr(flags, sizeof(flags)); + packet->bufToStr(robotIP, sizeof(robotIP)); + printf("Removed Host: '%s' Port: %d ID: '%s' Flags: %s IP: %s\n", hostName, port, robotName, flags, robotIP); +} + +void clientAddedHandler(ArNetPacket *packet) +{ + char hostName[512]; + int port; + char robotName[512]; + char flags[512]; + char robotIP[512]; + + packet->bufToStr(hostName, sizeof(hostName)); + port = packet->bufToUByte2(); + packet->bufToStr(robotName, sizeof(robotName)); + packet->bufToStr(flags, sizeof(flags)); + packet->bufToStr(robotIP, sizeof(robotIP)); + printf("Added Host: '%s' Port: %d ID: '%s' Flags: %s IP: %s\n", hostName, port, robotName, flags, robotIP); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArGlobalFunctor1<ArNetPacket *> clientListHandlerCB(&clientListHandler); + ArGlobalFunctor1<ArNetPacket *> clientAddedHandlerCB(&clientAddedHandler); + ArGlobalFunctor1<ArNetPacket *> clientRemovedHandlerCB(&clientRemovedHandler); + ArNetPacket packet; + + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + printf("Connected to server.\n"); + + client.addHandler("clientList", &clientListHandlerCB); + client.requestOnce("clientList"); + client.addHandler("clientRemoved", &clientRemovedHandlerCB); + client.request("clientRemoved", -1); + client.addHandler("clientAdded", &clientAddedHandlerCB); + client.request("clientAdded", -1); + client.run(); + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/testClient.cpp b/Legacy/Aria/ArNetworking/tests/testClient.cpp new file mode 100644 index 0000000..8d8a607 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/testClient.cpp @@ -0,0 +1,53 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void test(ArNetPacket *packet) +{ + printf("command %d\n", packet->getCommand()); +} + +int main(int argc, char **argv) +{ + ArClientBase client; + ArGlobalFunctor1<ArNetPacket *> testCB(&test); + + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArTime startTime; + startTime.setToNow(); + if (!client.blockingConnect("localhost", 7273)) + { + printf("Could not connect to server, exiting\n"); + exit(1); + } + printf("Took %ld msec to connect\n", startTime.mSecSince()); + + client.runAsync(); + + client.lock(); + client.addHandler("test", &testCB); + client.addHandler("test2", &testCB); + client.addHandler("test3", &testCB); + client.logDataList(); + + client.requestOnce("test"); + client.request("test2", 100); + client.request("test3", -1); + client.unlock(); + ArUtil::sleep(1000); + printf("Changing speed\n"); + client.lock(); + client.request("test2", 300); + client.unlock(); + ArUtil::sleep(1000); + client.lock(); + client.requestStop("test2"); + client.unlock(); + + ArUtil::sleep(1000); + client.lock(); + client.disconnect(); + client.unlock(); + ArUtil::sleep(50); + exit(0); +} diff --git a/Legacy/Aria/ArNetworking/tests/testRequestOnce.cpp b/Legacy/Aria/ArNetworking/tests/testRequestOnce.cpp new file mode 100644 index 0000000..dd67165 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/testRequestOnce.cpp @@ -0,0 +1,71 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void handleUpdate(ArNetPacket *packet) +{ + if (packet->getPacketSource() == ArNetPacket::TCP) + printf("Tcp ... \n"); + else + printf("Udp ... \n"); +} + +int main(int argc, char **argv) +{ + ArClientBase client; + ArGlobalFunctor1<ArNetPacket *> handleUpdateCB(&handleUpdate); + + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArTime startTime; + startTime.setToNow(); + + /* Aria components use this to get options off the command line: */ + ArArgumentParser parser(&argc, argv); + + /* This will be used to connect our client to the server, including + * various bits of handshaking (e.g. sending a password, retrieving a list + * of data requests and commands...) + * It will get the hostname from the -host command line argument: */ + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + /* Check for -help, and unhandled arguments: */ + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + + /* Connect our client object to the remote server: */ + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + printf("Took %ld msec to connect\n", startTime.mSecSince()); + + client.runAsync(); + + client.lock(); + client.addHandler("update", &handleUpdateCB); + + client.requestOnce("update"); + client.unlock(); + ArUtil::sleep(1000); + + client.lock(); + client.requestOnceUdp("update"); + client.unlock(); + ArUtil::sleep(1000); + client.lock(); + client.disconnect(); + client.unlock(); + ArUtil::sleep(50); + exit(0); +} diff --git a/Legacy/Aria/ArNetworking/tests/testServer.cpp b/Legacy/Aria/ArNetworking/tests/testServer.cpp new file mode 100644 index 0000000..42d8500 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/testServer.cpp @@ -0,0 +1,35 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void testFunction(ArServerClient *client, ArNetPacket *packet) +{ + ArNetPacket sending; + printf("responding to a packet of command %d\n", packet->getCommand()); + client->sendPacketTcp(&sending); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArGlobalFunctor2<ArServerClient *, ArNetPacket *> testCB(&testFunction); + ArServerBase server; + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArNetPacket packet; + + server.addData("test", "some wierd test", &testCB, "none", "none"); + server.addData("test2", "another wierd test", &testCB, "none", "none"); + server.addData("test3", "yet another wierd test", &testCB, "none", "none"); + if (!server.open(7273)) + { + printf("Could not open server port\n"); + exit(1); + } + server.runAsync(); + while (server.getRunningWithLock()) + { + ArUtil::sleep(1000); + server.broadcastPacketTcp(&packet, "test3"); + } + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/ArNetworking/tests/testStatic.vcproj b/Legacy/Aria/ArNetworking/tests/testStatic.vcproj new file mode 100644 index 0000000..b5b2f57 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/testStatic.vcproj @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="testStatic" + ProjectGUID="{7AEA7E4D-0984-4A16-8A3F-AF36B1A27836}" + SccProjectName="" + SccLocalPath=""> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\../../bin" + IntermediateDirectory=".\../../obj/debug" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\include,..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ARIA_STATIC" + StringPooling="TRUE" + BasicRuntimeChecks="0" + RuntimeLibrary="1" + BufferSecurityCheck="FALSE" + EnableFunctionLevelLinking="FALSE" + RuntimeTypeInfo="TRUE" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + Version="1.0" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\lib" + GenerateDebugInformation="TRUE" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\../../bin/testStatic.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool" + RelativePath="binNet"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\../../bin" + IntermediateDirectory=".\../../obj/release" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\include,..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ARIA_STATIC" + StringPooling="FALSE" + BasicRuntimeChecks="0" + RuntimeLibrary="0" + BufferSecurityCheck="FALSE" + EnableFunctionLevelLinking="FALSE" + RuntimeTypeInfo="TRUE" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="winmm.lib wsock32.lib" + Version="1.0" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\lib" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\../../bin/testStatic.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool" + RelativePath="binNet"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + <File + RelativePath=".\proprietarySeekurDrive.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl"> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Legacy/Aria/ArNetworking/tests/userServerTest.cpp b/Legacy/Aria/ArNetworking/tests/userServerTest.cpp new file mode 100644 index 0000000..fd503f7 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/userServerTest.cpp @@ -0,0 +1,152 @@ +#include "Aria.h" +#include "ArNetworking.h" + + +int main(int argc, char **argv) +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + // robot + ArRobot robot; + /// our server + ArServerBase server; + + // set up our parser + ArArgumentParser parser(&argc, argv); + // set up our simple connector + ArSimpleConnector simpleConnector(&parser); + + // set up a gyro + ArAnalogGyro gyro(&robot); + + // load the default arguments + parser.loadDefaultArguments(); + + // parse the command line... fail and print the help if the parsing fails + // or if the help was requested + if (!simpleConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + simpleConnector.logOptions(); + exit(1); + } + + if (!server.loadUserInfo("userServerTest.userInfo")) + { + printf("Could not load user info, exiting\n"); + exit(1); + } + + server.logUsers(); + + // first open the server up + if (!server.open(7272)) + { + printf("Could not open server port\n"); + exit(1); + } + + // sonar, must be added to the robot + ArSonarDevice sonarDev; + // add the sonar to the robot + robot.addRangeDevice(&sonarDev); + + ArIRs irs; + robot.addRangeDevice(&irs); + + ArBumpers bumpers; + robot.addRangeDevice(&bumpers); + + // a laser in case one is used + ArSick sick(361, 180); + // add the laser to the robot + robot.addRangeDevice(&sick); + + + + + // attach stuff to the server + ArServerInfoRobot serverInfoRobot(&server, &robot); + ArServerInfoSensor serverInfoSensor(&server, &robot); + ArServerInfoDrawings drawings(&server); + drawings.addRobotsRangeDevices(&robot); + + // ways of moving the robot + ArServerModeStop modeStop(&server, &robot); + ArServerModeDrive modeDrive(&server, &robot); + ArServerModeRatioDrive modeRatioDrive(&server, &robot); + ArServerModeWander modeWander(&server, &robot); + modeStop.addAsDefaultMode(); + modeStop.activate(); + + // set up the simple commands + ArServerHandlerCommands commands(&server); + // add the commands for the microcontroller + ArServerSimpleComUC uCCommands(&commands, &robot); + // add the commands for logging + ArServerSimpleComMovementLogging loggingCommands(&commands, &robot); + // add the commands for the gyro + ArServerSimpleComGyro gyroCommands(&commands, &robot, &gyro); + + // add the commands to enable and disable safe driving to the simple commands + modeDrive.addControlCommands(&commands); + + // Forward any video if we have some to forward.. this will forward + // from SAV or ACTS, you can find both on our website + // http://robots.activmedia.com, ACTS is for color tracking and is + // charged for but SAV just does software A/V transmitting and is + // free to all our customers... just run ACTS or SAV before you + // start this program and this class here will forward video from it + // to MobileEyes + ArHybridForwarderVideo videoForwarder(&server, "localhost", 7070); + + // make a camera to use in case we have video + ArPTZ *camera = NULL; + ArServerHandlerCamera *handlerCamera = NULL; + // if we have video then set up a camera + if (videoForwarder.isForwardingVideo()) + { + bool invertedCamera = false; + camera = new ArVCC4(&robot, invertedCamera, + ArVCC4::COMM_UNKNOWN, true, true); + camera->init(); + handlerCamera = new ArServerHandlerCamera(&server, &robot, camera); + } + + server.logCommandGroups(); + server.logCommandGroupsToFile("userServerTest.commandGroups"); + + // now let it spin off in its own thread + server.runAsync(); + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // set up the laser before handing it to the laser mode + simpleConnector.setupLaser(&sick); + + robot.enableMotors(); + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + sick.runAsync(); + + // connect the laser if it was requested + if (!simpleConnector.connectLaser(&sick)) + { + printf("Could not connect to laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.waitForRunExit(); + // now exit + Aria::shutdown(); + exit(0); +} + + diff --git a/Legacy/Aria/ArNetworking/tests/userServerTest.userInfo b/Legacy/Aria/ArNetworking/tests/userServerTest.userInfo new file mode 100644 index 0000000..f5242b4 --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/userServerTest.userInfo @@ -0,0 +1,4 @@ +UserInfoVersion1 +user bob isFUN RobotInfo +user user activmedia CustomCommands Movement RobotInfo SensorInfo Stop UnsafeMovement +user administrator activmedia all \ No newline at end of file diff --git a/Legacy/Aria/ArNetworking/tests/watchDockInfo.cpp b/Legacy/Aria/ArNetworking/tests/watchDockInfo.cpp new file mode 100644 index 0000000..583a0fa --- /dev/null +++ b/Legacy/Aria/ArNetworking/tests/watchDockInfo.cpp @@ -0,0 +1,103 @@ +#include "Aria.h" +#include "ArNetworking.h" + +void dockInfoChanged(ArNetPacket *packet) +{ + int state = packet->bufToUByte(); + int forcedDock = packet->bufToUByte(); + int secondsToShutdown = packet->bufToUByte2(); + + std::string stateStr; + std::string forcedStr; + + if (state == 0) + stateStr = " Undocked"; + else if (state == 1) + stateStr = " Docking"; + else if (state == 2) + stateStr = " Docked"; + else if (state == 3) + stateStr = "Undocking"; + else + stateStr = " Unknown"; + + if (forcedDock == 0) + forcedStr = "false"; + else if (forcedDock == 1) + forcedStr = " true"; + else + forcedStr = "unknown"; + + if (secondsToShutdown == 0) + ArLog::log(ArLog::Normal, "State: %s Forced: %s Shutdown: never", + stateStr.c_str(), forcedStr.c_str()); + else + ArLog::log(ArLog::Normal, "State: %s Forced: %s Shutdown: %d", + stateStr.c_str(), forcedStr.c_str(), secondsToShutdown); + +} + + + +/* Key handler for the escape key: shutdown all of Aria. */ +void escape(void) +{ + printf("esc pressed, shutting down aria\n"); + Aria::shutdown(); +} + +int main(int argc, char **argv) +{ + Aria::init(); + + ArClientBase client; + + ArArgumentParser parser(&argc, argv); + + ArClientSimpleConnector clientConnector(&parser); + + parser.loadDefaultArguments(); + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(0); + } + + if (!clientConnector.connectClient(&client)) + { + if (client.wasRejected()) + printf("Server '%s' rejected connection, exiting\n", client.getHost()); + else + printf("Could not connect to server '%s', exiting\n", client.getHost()); + exit(1); + } + + printf("Connected to server.\n"); + + + /* Create a key handler and also tell Aria about it */ + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + + /* Global escape-key handler to shut everythnig down */ + ArGlobalFunctor escapeCB(&escape); + keyHandler.addKeyHandler(ArKeyHandler::ESCAPE, &escapeCB); + + client.addHandler("dockInfoChanged", new ArGlobalFunctor1<ArNetPacket *>(&dockInfoChanged)); + client.requestOnce("dockInfoChanged"); + client.request("dockInfoChanged", -1); + + client.runAsync(); + + while (client.getRunningWithLock()) + { + keyHandler.checkKeys(); + ArUtil::sleep(100); + } + + /* The client stopped running, due to disconnection from the server, general + * Aria shutdown, or some other reason. */ + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/Aria-Reference.html b/Legacy/Aria/Aria-Reference.html new file mode 100644 index 0000000..48d1b0e --- /dev/null +++ b/Legacy/Aria/Aria-Reference.html @@ -0,0 +1,16 @@ +<html> +<head> +<title>ARIA Documentation + + + +

ARIA Index

+
+
+
+
+
(If the ARIA index isn't loaded automatically,
please click +the above hyperlink,
or locate the index.html page in +docs/.)
+ + diff --git a/Legacy/Aria/Changes.txt b/Legacy/Aria/Changes.txt new file mode 100644 index 0000000..6bb4c20 --- /dev/null +++ b/Legacy/Aria/Changes.txt @@ -0,0 +1,1450 @@ +Aria 2.8.0 +August 22, 2013 +--------------------------- + +This release adds support for the Pioneer LX. The Pioneer LX is the first +of a new type of robots referred to as the MTX generation or type. MTX is +largely compatible with previous Pioneer type robots, with the exception of +connections to sonar, battery, LCD, IO and some other components. The +ARIA API is largely the same, remaining transparently compatible, but you may +need to use some MTX-specific classes for certain MTX-specific fetaures, in +particular general purpose IO via the ArMTXIO class. See the MTX-specific +example programs in the examples/ directory for examples of use of these +features. A more detailed summary of classes added or changes made for MTX is +below. + +2.8.0 has been released for Linux only. A release with Windows support is +forthcoming. + +MTX LCD display implementation is incomplete in 2.8.0. An update will be +released in the future with complete LCD support (with robot firmware upgrade +if needed.) + +Analog IO support is incomplete, this will also be added in the next update. + +Additional changes made in this release of ARIA include: + * Support for the SICK TiM300 laser rangefinder. Use the tim3xx laser type + identifier in robot configuration or command-line parameters. (Implemented + internally as a variant in ArLMS1xx class) + * ArRobot disables the robot motors explicitly before disconnecting on exit + * ArActionDeceleratingLimiter now has option to limit rotation as well as + translation + * ArActionLimiterRot added, which can be used to limit rotation separately + from other actions. + * ArActionTriangleDriveTo improved + * List parameter type added (and other API changes) to ArConfig, though not + generally used in ARIA or ARNL yet. + * ArRobotJoyHandler can now be connected to ArConfig for user control of + some parameters. + * SICK S300 support has been improved + * RS-422 support in ArSerialConnection now available in Windows as well as + Linux + * ArSonarAutoDisabler can now be temporarily supressed with a method or + functor call. + * ArSoundsQueue can call callbacks before and after each item is played. + * Signed and unsigned long int values can now be added to ArStringInfoGroup + * strSuffixCmp(), strSuffixCaseCmp(), stripQuotes() methods added to ArUtil + * Equal and not equal (== and !=) operators added to ArLine + * Negative and positive rotational velocity limits separated in + ArActionDesired + * ArArgumentBuilder handling of spaces and quotes can be customized a bit + * State of charge, lateral velocity, and battery data added to ArDataLogger. + * ArLog::logBacktrace() added for Linux, which calls Linux backtrace() system + call. + * Diagnostic ArMutex lock timing can be used on Windows now. + * ArFunctor classes added which can pass five arguments + +ArNetworking changes include: + * Number of connected clients can be limited in ArServerBase + * ArServerHandlerMapping can call callbacks before and after mapping is done, + and can also be given additional ArLaser interfaces to include in the scan + log. + * ArServerMode objects have a new "extended status" field which can hold + details in addition to mode name and status field. This is also provided + to clients for the active server mode by ArServerInfoRobot in addition to + existing mode name and status. Extended status may contain multiple lines + (normal status is expected to not contain any newlines) + +Details of MTX (Pioneer LX) additions: + * ArMTXIO class added. Communicates with "mtx" operating system driver to + interface with MTX digital general purpose IO and power control. + * ArSonarConnector and ArSonarMTX classes. By default the connection to MTX sonar + is handled automatically by ArRobotConnector, no changes to existing + software need to be made. The existing ArSonarDevice and ArRobot API can be + used with MTX sonar. + * ArBatteryConnector and ArBatteryMTX classes. By default, the connection to MTX + battery is handled automatically by ArRobotConnector, no changes to existing + software needs to be made. The state of charge and other information is + available in the existing ArRobot API. Extra diagnostic information about + the batter(ies) is provided in ArBatteryMTX objects which can be obtained + from ArRobot. + * Default Pioneer LX parameters have been built in to ARIA for "pioneer-lx" + type robots and a pioneer-lx.p + parameter file is included in the params directory. Early revisions of + the MTX core report a robot subtype of "marc_devel" which is assumed to be + an LX. + * A Pioneer LX model has been added to MobileSim 0.7.3 + * mtxIO, mtxPowerControl and mtxWheelLights examples added. Other examples + including demo have been updated to use ArRobotConnector and other current + classes for MTX/LX compatability. + * New command identifiers added to ArCommands + + + +Aria 2.7.6 +March 29, 2013 +--------------------------- +* Added ArPTZConnector, which can automatically create ArPTZ subclass instances + based on configuration information read from robot parameer files (params/.p, + params/.p) and program command line arguments. (See also the new ArVideo library + now available with this ARIA release.) Some common functionality (inverted, limits) has + also been moved from individual ArPTZ subclasses into the ArPTZ class. +* Robot parameters (ArRobotParams, defaults, and .p files) now contain parameters for PTZ and video devices + (used by new ArPTZConnector and ArVideo library) +* The way subclasses of ArPTZ implement methods has changed. Inverting the axes + and other common functionality is now done in ArPTZ, subclasses implement _i + internal methods instead. This is transparent to most users, but if you have + created a new subclass of ArPTZ you may need to update your class. +* Increased GPS connection timeout to 20sec. +* Added support for simulated or dummy GPS +* Added new NMEA messages: GPHDG, GPHDM, GPHDT (for receivers with integrated compass) +* Misc. documentation fixes and improvements, including class categories (e.g. essential, + optional, device interfaces, actions, etc.) +* Desired sound playback volume can be set in ArSoundPlayer (implemented for Linux with + sox tool). +* Some SWIG and Windows DLL export fixes. +* ArUtil::isOnlyNumeric() and ArUtil::isOnlyAlphaNumeric() now accept '+' and + '-' characters as valid parts of numeric and alphanumeric strings. + +Aria 2.7.5.2 +August 2, 2012 +--------------------------- + +* Fixed regression in which start and end FOV angles couldn't be set in + robot parameter files for LMS1xx laser rangefinders. + +Aria 2.7.5.1 +July 9, 2012 +--------------------------- + +* ArRVisionPTZ now defaults to automatically connecting through serial port + COM3, rather than requring you to manually set it up with an + ArDeviceConnection object (though this is still possible.) +* Fixed system installation of Python pacakges on Debian -- + now installs in correct Python version directory + /usr/lib/python2.5/site-pacakges instead of old 2.4 directory. + +Aria 2.7.5 +June 12, 2012 +--------------------------- + +* Fixed bug in ArLMS1xx class that prevented connecting to LMS-100 or LMS-111. + It now has correct default resolution option, and allow selecting both half or + quarter degree resolution. +* You can now select one, half or quarter degree resolution if connecting to an + LMS-500, rather than just one as in 2.7.4. +* Made some minor updates to examples. Added new example lasers.cpp showing + how to connect to one or more lasers (from parameters) and obtain data from + them. Added rvisionCameraExample.cpp (conect to RVision camera). Added seekurPower.cpp + utility (control seekur power ports). +* Default position for a second laser on a Seekur Jr. corrected (reverse-mounted on the + back of the robot. this can be changed in parameters.) +* Default/builtin laser parameter type for Seekur changed to lms1xx +* ArDPPTU now reads the PTU's position back from the device. This position is returned for + getPan() and getTilt() and canGetRealPanTilt() now returns true if this data has been + received from the device. +* ArDPPTU now queries the position resolution (conversion factor) from the device itself + rather than requiring specifying D46 or D47 in the constructor. (But you can still specify + these to force hardcoded conversion factors for those specific models.) + +Aria 2.7.4 +March 13, 2012 +--------------------------- + +* Added SICK LMS-500 support. +* Added SICK S-300 and S-3000 support +* Added Keyence SZ series laser support +* Added lms1xx robot types to automatic parameter generation (generated by + utils/makeParams) +* Added RS-422 support (for Linux) to ArSerialConnection +* Added more Visual Studio 2010 projects (for most libraries and examples) +* Fixed bug in ArTime::mSecSince(ArTime since) in which very large value would be + truncated in internal arithmetic resulting in incorrect output. Now valid within range of a long. (Note ArTime also has + methods that return "long long" values, which should be used in situations + when very long time differences are possible.) +* Change to ArPTZ to allow Pan/tilt/zoom cameras to now be connected to the + third auxilliary robot serial port (AUX3), which is available in newer SH + Pioneers. (Previously only AUX1 and AUX2 were possible.) +* Minor fix to NMEA parser +* Better error reporting in ArSocket +* Minor fix to baud selection in ArSerialConnection on Windows + +This version of Aria is compatible with other Aria 2.7 releases and will work +with any software built with Aria 2.7. + +Aria 2.7.3 +September 8, 2011 +--------------------------- + +* Fixed minor bug in ArLMS1XX (was not ignoring some invalid readings, if the + LMS100 was returning a nonzero but impossibly small range) +* Fixed minor bug in demo's laser mode (would show incorrect values initially) +* Fixed minor bug in examples/sickLogger.cpp, which would prevent the laser + log from being processed by Mapper3. Also updated sickLogger.cpp to change + use of deprecated classes to their replacements. +* Includes support for URG SCIP 2.0 via ArUrg_2.0 class and "urg2.0" laser + type. +* Fixed bug in ArActionLimiterBackwards +* Added parameter files p3dx-sh-lms1xx.p, p3at-sh-lms1xx.p, + peoplebot-sh-lms1xx.p with standard mounting locations of SICK LMS-100/111 + laser, and lms1xx laser type selected for primary laser. +* Added project files for Visual Studio 2010 + +Aria 2.7.2 +January 7, 2010 +--------------------------- + +* Added Seekur Jr. support +* Added support for distinct "research patrolbot" robot type +* Added SICK LMS 100 support +* Added experimental Novatel SPAN GPS support +* Fixed a bug in ArLaser (not enough space in buffer for all laser readings if + more than 180) +* Added parameter files researchPB.p, mt400.p, seekurjr.p. + +This version of libAria should be compatible with libAria 2.7.0 and dependent +libraries built with 2.7.0 should work with this version. + + + +Aria 2.7.1 +September 9, 2009 +--------------------------- + +Bugs fixed: + * Fixed problems connecting to laser, mainly in demo: Serial port + is now opened when entering laser mode (when laser is really connected + to) rather than on startup, and fixed an uninitialized variable in ArLM2xx. + * Fixed possible incorrect error return when connecting to an URG laser + with ArUrg::blockingConnect(). + +This version of libAria is compatible with libAria 2.7.0 and dependent +libraries built with 2.7.0 will work with this version. + + + +Aria 2.7.0 +April 30, 2009 +--------------------------- + +Summary: + +Among many other changes and improvements, Aria 2.7.0 includes: + * New ArRobotConnector and ArLaserConnector classes replace the old + ArSimpleConnector. ArSimpleConnector is still available however. + * New improved support for multiple heterogenous laser rangefinding + devices in ArLaserConnector, ArRobot, and generally in ARIA. Configure + what devices are available on an individual robot, and device options, + in the robot parameter file, Aria.args file, or program command line options. + * Visual Studio 2008 project files are included; VC2003 project files + have been renamed. + * Java 1.6 is now used to build Java libraries rather than 1.4; you must + either upgrade to 1.6 (J2SE JDK release 6), or rebuild the Java + wrapper libraries with 1.4 if you must continue using 1.4. + * Java wrapper libraries are now contained in Java packages: + com.mobilerobots.Aria for ARIA, and com.mobilerobots.ArNetworking for + ArNetworking. + * On Windows, the ws2_32 sockets library is now used instead of the + older wsock32 library. + * On Linux, a better monotonic clock is used if the OS supports it. + This requires that all programs now link with librt (-lrt) on Linux. + * Aria now includes classes to support the RVision PTZ camera, Hokuyo URG + laser, some additional GPS data (if receiver provides it), lateral motion + on a Seekur robot, and various other miscellaneous improvements and features. + +Read below for a complete list and more information. Upgrading MobileEyes +to 2.2.4 or later is also recommended for teleoperation to work right. + +Important Linux compilation change: + + * ARIA now uses the monotonic system clock if available, via the librt + system library. Therefore all programs using ARIA must now link to + librt using the -lrt link flag, in addition to libAria, libpthread + and libdl as before. The ARIA examples and tests Makefiles have + been updated, but you must update your own Makefiles or other + build systems. This change only applies to building on Linux. + +Important laser range device class changes: + + * Made support for lasers much more generic, this involves the rest + of the changes in this section. There's compatibility classes for + all of the old code, so existing code should still compile. The + one exception to this is the 'second laser' parameters in the .p + file will no longer be read so you'll need to change them to 'Laser + 2 settings'. + * There is now an ArLaser class that does most everything that ArSick + used to do in terms of filtering and callbacks and such, the names + and arguments are sometimes slightly different. ArLaser is a + superset of everything that can be set on any of the lasers, so + that it can be generically configured. + * Made a new ArLMS2xx class to replace ArSick. ArSick is now a + legacy class with all of the old functions on it that old code + should still work. + * Added ArUrg class to support for Hokuyo URG URG-04LX if using the + SCIP 1.1 protocol). + * Made ArRobotConnector and ArLaserConnector to replace + ArSimpleConnector (which is now a legacy class that uses the new + classes). ArRobotConnector has the same functionality as before, + but can autoParse the args when blockingConnect is called. + ArLaserConnector will create lasers and add them to the robot and + configure them with the arguments from the command line (though it + does pull the device connection information from the .p file). + Lasers wind up named _ (except the legacy + sick of course). Lasers themselves will configure themselves with + the information in the .p file (as long as that parameter wasn't + already set by the command line). + * Made the laser type and parameter information so that it is stored + in the .p and can be passed into the command line. + * Made it so that the robot should be connected (with + ArRobotConnector) before the Aria::parseArgs call, so that the + types in the .p files and what not can be used. The legacy code + works without this (because it only works with one type of laser). + * ArUtil now has a createLaser call that will create a laser of a + given type, and a getCreateLaserTypes that will list the types that + can be created. This is mostly for use by the new ArLaserConnector. + * ArUtil now has a createDeviceConnection call that will create a + device connection of a given type and try to connect it to a given + port, and a getCreateDeviceConnectionTypes that will list the + device connection types that can be created. This is mostly for + use by the new ArLaserConnector, but could be used by other things + too. + * Made ArRobot so that it has a mapping of laser numbers to lasers, + so that classes can pull out lasers without as much work. It + doesn't do anything with these at all. Lasers are automatically + added to the robot by ArLaserConnector now... They still have to be + added as range devices to do anything, which automatically happens + in the ArLaserConnector now. The calls for this are + ArRobot::addlaser, ArRobot::remLaser, ArRobot::findLaser, and + ArRobot::getLaserMap + * The LaserIgnore parameter in the .p file and the corresponding + command line arguments (-laserAdditionalIgnoreReadings) can now + take ranges (begin-end), the multiple arguments can be separated by + commas (with or without extra spaces), or it can be separated + simply by spaces as the old ones were (though that won't work from + the command line). + * Simulated lasers are now done totally differently than before + (unless you are using the ArSick legacy class where the behavior is + unchanged). There is new class called ArSimulatedLaser that + basically takes over for the normal laser class of that type and + can be configured the exact same way, but gets its readings from + the simulator. This is all handled transparently by + ArLaserConnector. Right now this will only deal with 1 laser, but + later there will be modifications to MobileSim and Aria to allow it + to work with multiple lasers. These wind up with the name + sim__. + * Made ArModeLaser (the laser mode in demo) so that it would work + with multiple lasers + * Lasers maximum range can now be set in the .p file. This is mostly + for if you want to shorten it from the default. + * Lasers now don't have a current buffer size passed in, it is now + set to whatever the maximum number of readings will be when the + laser connects (based on degrees and increment). ArSick remains + the same as it was. + * Lasers cumulative buffer size can now be set in the .p file, the + default is now 200. ArSick remains the same as it was. + +See also changes in ARIA 2.6.0, below. + +Changes: + * Project files for Visual Studio 2008 (Version 9) are now + included. These are named with a "-vc2008" at the end, and + libraries built using these projects are named with a "VC9" suffix + before the .lib or .dll extension. Project files for Visual Studio + 2003 (Version 7) have been (mostly) renamed to end with "-vc2003", + though libraries built using these projects have the same names as + before. + * Java 1.6 is now used to build the Java wrapper library on Windows + and Debian Linux. You should upgrade to Java 1.6 if you are still + using 1.4. If you get an error message referring to a "bad class + file" in Aria.jar, that the "wrong version 50.0, should be 48.0", then + it's due to using 1.4 with the Aria classes built using Java 1.6. + * Java wrapper libraries are now contained in packages: com.mobilerobots.Aria + for Aria, and com.mobilerobots.ArNetworking for ArNetworking. You must change + Java programs to import the Aria and ArNetworking packages by adding these + lines (near the top of the program file): + import com.mobilerobots.Aria.*; + import com.mobilerobots.ArNetworking.*; + * On Windows, ArSocket now uses the better ws2_32 sockets library, rather + than the old wsock32 library. Aria and ArNetworking project files (for + libraries and example programs) have been changed to link to this + library, but you should also remove the wsock32 "additional library + dependency" from the Linker settings of any project files + for programs that might still have it. Linux ArSocket is unchanged. + * For non-windows platforms ArTime will use a monotonic clock + (clock_gettime) if it is supported by the OS (it looks like linux + kernel 2.6 and up support this). If it isn't available it'll + continue to use the non-monotonic clock (gettimeofday) that has + issues if the time on the platform is changed. In Windows the + clock was always monotonic (timeGetTime). + ArTime::usingMonotonicClock is available to see if the clock is + monotonic (make sure you've done an Aria::init before you use it + though). + * ArArgumentParser now takes const char* arguments instead of char* + * Made ArSocket (and therefore ArTcpConnection) so that if you give + the hostname as hostname:port that it will override the passed in + port number. This is mostly for default ports on the laser, but + could be useful for other device connections (so there don't need + to be multiple arguments to each thing). + * Some changes to ArArgumentParser with how it deals with the + wasReallySet parameters, described more in the documentation for + the class. + * ArServerModeRatioDrive now expects to receive commands every 2 + seconds (or faster) from a client; if it doesn't receive a new + command after 2 seconds, it stops the robot. This stops the robot + if there is a loss or degradation of network connectivity while + driving. You must upgrade to MobileEyes 2.2.4 or later for teleoperation + to work correctly with this version of Aria. + +See also the changes in ARIA 2.6.0 below. + +Additions: + * In ArNetworking, there are now server simple commands for + microcontrollerCommand and microcontrollerMotionCommand, + microcontrollerMotionCommand will susped the normal state + reflection so that you can just send motion commands down (like 'd' + mode in demo). + * Added ArUrg (laser) class. + * Added support for the newer DP PTU-D47 to the ArDPPTU class. Select + the D47 by passing PANTILT_PTUD47 as second argument to the ArDPPTU + constructor. + * Added support for the RVision PTZ camera + * ArUtil now has a setFileCloseOnExec() function call. This function + makes a call to fork() or exec() close a file or socket. + * ArUtil now has fopen, open, open, creat, and popen functions that + will call the new setFileCloseOnExec() function for the new + file or socket. It is recommended that these functions always + be used to avoid resource leaks if a program uses exec() or fork(). + * Made ArKeyHandler so that it could take a FILE * pointer instead of + always using stdin, and has the option to not take the keys in the + constructor... these will only do anything in non Windows platforms + * ArGPS reads and provides some additional GPS info (if the receiver + provides it) + * ArFunctor and ArCallbackList now have setNameVar, and ArMutex now + has setLogNameVar. These functions take printf style arguments to + make it easier to set the names for more complicated uses + * There is now an Aria::remExitCallback which will make sure that it + isn't exiting before removing a callback, since that would break + the looping. Aria::addExitCallback will now make sure it isn't + exiting before adding a callback (which shouldn't be needed, + but...) + +Bug fixes: + + * In Windows the ArThread::self and ArThread::osSelf previously did + not work at all since it was returning a constant that meant the + current thread (it used GetCurrentThread instead of + GetCurrentThreadId)... they do now work, but the + ArThread::ThreadType has been redefined to be a DWORD instead of a + HANDLE... all existing code should work after a recompile as long + as it was using the ThreadType define. ArThread in windows now + keeps track of the thread handle separately so uses it where it + used to. This bug also means that some of the thread + infrastructure wasn't entirely working in Windows (like shutting + the threads all down on a shutdown). + * Modified ArSocket::open() (and therefore ArNetServer and ArServerBase) + so that it calls setLinger(0), setReuseAddress(), setNonBlock() + between creating the socket and binding the port, since apparently + SO_REUSEADDR does not work unless you use it this way. This should + prevent the times when programs couldn't start because they were + waiting for a port that was just closed. + * The Linux part of ArMutex was checking all of the return values + wrong... so would never return an actual error happened... that's + been fixed. This probably didn't matter except with tryLock() which + would return that it had the lock when it really didn't (tryLock() + is never used by ARIA itself or any example programs, and is rarely + needed in most programs). + * ArNetServer and ArServerBase now have a member socket they use to + accept new client connections instead of creating a new socket + (and all the resources that go along with that) every single time + they were called. + * Modified the ArPose constructor so that it normalizes the given theta + to be in the range -180 to 180. This is consistent with the + behavior of the setPose() and setTh() methods. + * ArSocket will now set its socket file descriptors so that they will be closed + if an exec() system call is used. + * Fixed bug in ArDPPTU that crashed given pan values < -51 when in PTUD47 mode. + (or possibly effectively ignored the pan value on some computers.) + * In ArMap (and ArMapInterface-related classes), if built on Windows, when loading + or saving a file, a filename starting with a possible Windows drive letter is + recognized as an absolute path rather than a relative path within ArMap's baseDirectory + path. (The file name must start with "x:\" where x is any one upper- or lowercase + alphabetic character, i.e. a-z or A-Z.) + * Fixed various errors reported by GCC versions 4+. + + +See also the changes in ARIA 2.6.0 below. + +Aria 2.6.0 +August 3, 2007 +--------------------------- + +(Limited release) + +Important changes and bug fixes: + * Support for Seekur's lateral velocity (sideways motion) in ArRobot, Actions, + and ArNetworking teleoperation servers. + * Java wrapper libraries are now contained in packages: com.mobilerobots.Aria + for Aria, and com.mobilerobots.ArNetworking for ArNetworking. You must change + Java programs to import the Aria and ArNetworking packages by adding these + lines (near the top of the program file): + import com.mobilerobots.Aria.*; + import com.mobilerobots.ArNetworking.*; + * ArActionDeceleratingLimiter change to contructor so it can work + with the lateral motion, it takes an enum now instead of a bool, + old true would be ArActionDeceleratingLimiter::FORWARDS, and old + false would be ::BACKWARDS + * New firmware has a kinematics delay value it sends us (because + using the gyro can cause the microcontroller to send us older but + more correct odometry). ArRobot now takes this delay into account + when putting information in for the pose interpolation. + This change should be transparent to everyone... but there + might be more forward projection in data returned from + ArRobot::getPoseInterpPosition() and + ArRobot::getEncoderPoseInterpPosition(). ArSick already takes this + into account. The forward projection on ArInterpolation is more + forgiving of future projections too (allows 50% projection instead + of 3%) + * Made it so an Aria.args file that was empty no longer resulted in + an uninitialized string (change was to ArUtil::getStringFromFile) + * ArSoundsQueue::speak() has been renamed to speakf(), and replaced + by a new speak() method which does not take printf-style varargs. + * Added support for a TCM2 compass connected directly to the + computer. The ArTCM2 class is now an interface to both kinds of + compass. Use an ArCompassConnector to create a compass object based + on command-line arguments (default is ArTCM2Robot), and call + blockingConnect()to connect to the compass (see demo.cpp for + example). Almost everyone should use ArTCM2Robot ("robot" type). + * Fixed various errors reported by GCC 4+. + +Enhancements: + * ArSimpleConnector now has arguments to log packets received and + sent, movement received and sent, velocity received, and actions. + * Moved timeout configuration into a section called 'Connection timeouts' and + renamed them to be clearer + * Made ArNetworking timeouts for To as well as From, these relate to if the data + is backing up and is to prevent extreme memory usage that could + kill the program, and would happen if a connection from a + client/robot/centralServer wouldn't take more data but didn't get + closed (which is really a networking problem) + * Added support for Trimble AgGPS, improved ArGPS class interface. + * NMEA parser (used for GPS and compass data) is now available seperately + for use with other NMEA devices as needed. + * Information about laser height and a possible second laser may be given + in robot params (won't generally be used for most robots). + * More optional diagnostic logging, especially in ArMutex objects + * Added "odometer" and "trip odometer" to ArRobot. These keep track of total + distance travelled and turned over the course of the program run. + "Trip" odometer may be reset at different events. + + + + +Aria 2.5.1 +February 22, 2007 +--------------------------- + + * Adds support for gyro-corrected heading automatically calculated by + the microcontroller firmware (requires updated firmware), and for + obtaining the odometry calculation delay (firmware's delay between + reading odometers and reporting heading and pose to to the + client). If the firmware supports it, ARIA now normally uses the + firmware's integrated gyro heading rather than calculating it on + the client side. + * Fixes memory leak in ArNetworking (some stored packets were not + deleted if ArNetPacketSenderTcp was destroyed) + * Fixed method declarations in ArSystemStatus to be legal C++ and + work with GCC 4 + + + +Aria 2.5.0 +December 1, 2006 +--------------------------- + +Important Changes and Bug Fixes: + * The ArServerHandlerMapping start and end mapping callbacks now have + the robot locked (they didn't used to) + * Modified ArPTZ so that the functions for pan and tilt take doubles + instead of integers so we can get finer grained movement, updated + ArVCC4, ArSonyPTZ, ArAMPTU, and ArDPPTU for this. Tested ArVCC4 + and ArSonyPTZ and they worked fine, if there are problems with this + or with the AMPTU or ArDPPTU send email to aria-users. Modified + ArServerHandlerCamera to fix for the change too. + * ArNetworking: Removed some functions from ArServerInfoStrings to manually + add items. Instead, ArServerInfoStrings receives data from Aria's new + ArStringInfoGroup global data store. + * ArActionDesired behavior changed slightly in that now for the + transMaxVel, transNegMaxVel, transAccel, transDecel, rotMaxVel, + rotAccel, and rotDecel can now just use the slowest value (so that + if you have multiple things trying to set a maximum speed they + don't have to coordinate each can just set the slowest and the + slowest is what is used) (note of course that decel uses the + fastest decel instead). You can specify the old behavior when you + do the sets on these if you want to (its not recommended and won't + work with the built in actions). + * All libraries are built with -fPIC for greater binary compatability when + linking at runtime. + * Added Aria::parseArgs() and Aria::logOptions(), and the functions + Aria::addParseArgsCB() and Aria::addLogOptionsCB() for classes/modules + to add functors that parseArgs() and logOptions() call; modified all + the things that parse arguments and log options to use these new functions + (old code will still work since the functions still work when called directly, + but this usage is deprecated) + * ArNetworking: ArServerBase and ArClientBase should be threadsafe, + you shouldn't need to worry about locking and unlocking them when doing + things and may cause problems if you do + * ArServerBase::broadcastPacketTcp and + ArServerBase::broadcastPacketUdp will no longer take clients to not + send the data too, this is because that behavior does not work with + the central server... there's now a WithExclusion command for each + of these if you need that behavior (its not recommended) + * Python wrapper now requires Python 2.4, except on RedHat 7.3 where it + still uses Python 2.2 (which is the last Python released for RHL). + You can install python2.4 if on Debian, or download for Windows or other + systems at . + +Enhancements: + * Added new ArSonarAutoDisabler that turns off the sonar if the + robot is stopped for a period of time and re-enables them when the robot + moves; ArNetworking's ArServerModeStop no longer turns off the sonar. + * Made ArArgumentParser::loadDefaultArguments so it can put them in + something other than the first position + * Modified ArConfig so that it can save unknown sections and + parameters, so that information isn't lost if nothing knows about it + this run + * Added ArActionDriveDistance, an action which will just take a + distance and drive forward that distance + * ArNetworking: Added ArServerMode::setWillUnlockIfRequested and + getWillUnlockIfRequested to get the info about whether we'll unlock + if requested or not (so other things can tell if docking is forced + or not) + * ArNetworking: Added code so that ArServerMode can keep track of + which data (commands) belong to which mode and a test program for + that (ArNetworking/tests/modeInfoClient.cpp) and added the new call + to ArServerMode::addData to all existing ArServerModes. + ArNetworking clients can get this information + * Added new simulator commands to ArCommands enum + * Added support for SICK reflectance (for reflector markers); also + added support for retrieving extended-info laser packets from the + simulator (which contain reflectance information) + * ArNetworking: Added boolean to ArServerMode::lockMode (defaults to + old behavior) which indicates if the mode will unlock if requested + or not and added ArServerMode::willUnlockIfRequested to get the + info about whether we'll unlock if requested or not + * ArNetworking: Added code to ArServerBase so that clients can get + which mode is active and if its locked or not, and if it'll unlock + if requested or not + * New class ArSystemStatus (for Linux only). + * Modifed some code in ArKeyHandler and ArNetworking/ArNetpacketReceiverTcp + so that they'd work better on Mac OS X + * There's now network usage tracking in ArNetworking (by packet type) + see logTracking and resetTracking in ArServerBase, there's also an + ArServerSimpleServerCommands that'll let you do these things over + the network + * Fixed a crash bug on shutdown with adding actions to ArActionGroups + then deleting them + * Fixed the Aria::signalHandlerCB and Aria::exit so that it + couldn't loop anymore (previously it would loop if you did an + Aria::shutdown and that caused a segfault) + * Added ArServerClient::hasGroupAccess so that an ArNetworking call + can check to see if a client has access to some group, note that + this is generally not needed since the command won't be called if + the user doesn't have access to that group (its for the next enhancement) + * Made ArServerModeRatioDrive so that if a user didn't have access to + unsafe drive mode and tried to drive the robot while it was in + unsafe mode the mode would kick back over into safe driving mode + * Made ArSickLogger so that it takes in a robot joy handler too and + changed the way it takes goals a little, now if you press a button + for a goal you have to let it go before another goal is taken (this + is instead of a time/distance/turn based check) Also changed it so + that if you were adding goals it'd only check if you had a + keyhandler, it wouldn't add a keyhandler + * Made ArServerModeMapping so that when it makes a new ArSickLogger + it passes in Aria::getJoyHandler and Aria::getRobotJoyHandler as + well as now telling it to add goals + * ArServerHandlerCamera now has different modes and can look at goals + as it is driving to them, look at points, and can adjust its + position relative to the image, and some commands to set the + position on the camera but play well with the modes while doing + it... + * Added ArNetServer calls to send to a specific client, this is so + that one doesn't have to worry about if the socket was closed or + not... this may have a better method later + * Added some calls to the ArServerHandlerConfig to make it a little + more generically usable + * Added requestOnceUdp and findCommandByName to ArClientBase + * Added examples/gotoActionExample.cpp + * Added ArRobot::getRobotLengthFront and ArRobot::getRobotLengthRear + with associated entries in the parameters file, if either value is + zero then it will be set to half of the robot length + * Added ArRobot::getAbsoluteMaxTransAccel, + ArRobot::getAbsoluteMaxTransDecel, ArRobot::getAbsoluteMaxRotAccel, + and ArRobot::getAbsoluteMaxRotDecel which will report the top + values (accel and decel are the same on the pioneers now but + someday may not be)... these (like the versions for the max vels) + are set from the config packet if its there, otherwise they are set + to an arbitrary value (unlike the max vel ones which come from a + param file).... made ArActionMovementParams use this value + * ArMapObject now has getFromToSegments which can get the rotated + line segments so that everyone doesn't have to calculate the + rotated rectangles on their own + * New ArGPS, ArGPSConnector and ArNovatelGPS classes to receive data + from Global Positioning System devices, and the Novatel ProPak G2 + in particular. + * Made ArRobot so that it has a new method isTryingToMove that is set + to true if the robot is trying to move even if it isn't moving + (this is mainly for where the robot isn't moving because an action + is stopping it from hitting something), there's a forceTryingToMove + to go with this for things that want the robot always look like its + trying to move + * Made ArSonarAutoDisabler so that it'd use the new isTryingToMove + flag and so that it would assume its the only thing changing the + sonar, since the ArRobot::areSonarEnabled will return false if the + robot has no sonar, or if they are disabled + * Added a flag to range devices so they can say if they're location + dependent or not (for use with the next enhancement) + * Added a flag to the ArRobot functions that check all the range + devices to say whether to ignore range devices that are location + dependent (so that its easy to say ignore forbidden lines from the + robot joystick) + + +Aria 2.4.3 +December 7, 2005 +--------------------------- + + Uses -fPIC flag when building Linux shared libraries for greater compatability. + +Aria 2.4.1 +October 14, 2005 +--------------------------- + +Fixes: + * Moved accessors for protected static members in ArSoundPlayer out of header file + (MSVC tried to inline them, and failed to link because the members were not + exported from the DLL) + +Aria 2.4.0 +September 15, 2005 +--------------------------- + + +Fixes: + * Made ArActionDeceleratingLimiter honor the UseEStop flag + * Changed ArSignalHandler_LIN to work with the newer + Linux kernels/libs (e.g. in Debian), changes are documented in runThread + for the curious (It seems that if you try and hit control c in near the + time of a system call sometimes it will break signal handling but that + looked like it happened before this revision too) + * Improvements to ArSocket so that it doesn't try and look up + localhost when it opens (since it uses INADDR_ANY anyways, and all + the look up would do is slow down things on some machines without + DNS setup), also in Linux a failed lookup on a host will no longer + then try localhost (it never should have) + * Changed ArAnalogGyro so that if it got no encoder readings from + the robot but did get readings from the gyro that it would just use the + gyro readings + * Revamped ArActionInput... + * removed deltaHeading and deltaVel function from ArActionInput + (since they weren't used and are broken), if you need them send + email to the aria-users list and we'll put it (or something that + takes care of that function) back in... + * added setHeading and made the stuff there simpler + * Made it so that sonar readings are set to be ignored until they have gotten + data + +Important Changes: + * If ArRobot can't find a parameter file for a robot AND has no internal + parameters for the robot type, it will now fail the connection rather than + using (probably unsuitable) default values. + * The wrapper Java code is now distributed as Aria.jar and + ArNetworking.jar rather than separate .class files. + +Enhancements: + * Added access to ArRobot for the interpolated encoder position, this is + now used for the encoder pose on the SICK raw readings + (ArRobot::getEncoderPoseInterpPosition) + * ArSick::processPacket: the name and meaning of the deinterlacePose + is now deinterlaceDelta, I don't imagine anyone uses it except for + some internal code or I'd make it more backwards compatible + * Added ArServerInfoStrings to the ArNetworking library, it can send + arbitrary strings from a server out to MobileEyes for MobileEyes to + display + * Added the ability to log abitrary strings (ie like above) to + ArDataLogger + * Added ArConstFunctors and ArConstRetFunctors so that you could use + the above string functions with the const functions in ArRobot. + * NOTE: In a future release some currently non-const methods will become + const. + * Generalized some ArSoundsQueue callbacks. Some public methods have been deprecated. + addItem(ItemType, const char*, int) has been replaced by addItem(Item), and + createDefaultSpeechItem() and createDefaultFileItem() were added. + * Added a setIgnoreThisReading on the ArSensorReading class + * ArNetworking library now has Python and Java wrappers! (Thanks to Swig) + * Changed things a little so that ArRangeBuffer now additionally has + getClosestPolarInList and getClosestBoxInList so that you can do + these operations on arbitrary lists of readings (for instance from + transformed readings) more easily (you can also just make your own buffer) + * Added a targetPose to ArRangeBuffer box checking so that you can + see if a point is closer to someplace other than the robot + * ArArgumentParser functions now generally have arguments so you + avoid just get one argument (previously it'd always recurse and + find you the last argument) + + + + + +Aria 2.3.3 +May 31, 2005 +--------------------------- + +Fixes: + * Position mode can display some new flags + * Initialize a variable in position mode + + + +Aria 2.3.2 +May 24, 2005 +--------------------------- + +Fixes: + * Cleans up some warning messages seen in Windows + * Companion to ARNL 1.3-2 with important fixes. + * Fixes uninitialized variable in ArModePosition. + + +Aria 2.3.1 +May 23, 2005 +--------------------------- + +Fixes: + * Fixed a bug in the filtering of ArRangeDevice readings that caused odd + behavior in Windows + * Put a log message into the default signal handling if exit was occuring + +Enhancements: + * Modified ArServerModeStop so it doesn't always turn off sonar when stopped + (depends on an argument in the constructor), SONARNL uses the new behavior + so that you don't need to move before you can localize + + +Aria 2.3.0 +May 16, 2005 +---------------------------- + +Critical Changes: + + * Aria::exit has been enhanced with callbacks (see Aria::addExitCallback) + and will now just exit the program instead of trying to get threads to cooperate. + * This has been made the default way to exit on signals (segfaults + and control C for instance). + * Exit has also been made the default way that ArRobot will call if escape is + pressed to shut things down (see ArRobot::setKeyHandler for the + way to use the old behavior). + * Aria::init and ArRobot::ArRobot now have new parameters to control + this behavior. Java code will require updating for this new parameter. + This is so that things can be more consistent between programs and exit + conditions with less code required in the programs, generally it just works + better. + * SRIsim binary has been removed. Use MobileSim instead. + * MS Visual C++ 6 project files have been moved into the vc++6 subdirectory, + and are no longer maintained. Use Visual C++ 7.1 (.NET) instead. + +Fixes: + * Bug fix in ArSoundsQueue::resume(). + * ArFileParser can now remove its remainder handlers in remHandler + +Enhancements: + * ArMap now deals with lines (for SONARNL, MobileSim, etc.) + * ArMap now deals with RouteInfo (for ARAM, just ignore for Aria and Arnl) + * Added ability to track velocities coming back from the robot, see + ArRobot::setLogVelocitiedReceived, also added it to + ArServerSimpleComMovementLogging + * Added ability to track packets received and sent more easily, see + ArRobot::setPacketsReceivedTracking and + ArRobot::setPacketsSentTracking. Also added these to the + ArServerSimpleComMovementLogging. + * polySegments shape added to ArDrawingData + +Aria 2.2-0 +March 29, 2005 +---------------------------- + +Critical Changes: + * Sonar position parameters are now given from center of rotation + * Replaced old ArSpeech library with three new rewritten libraries. + +Fixes: + * Bug fix in ArNetworking TCP packet sender which might have caused some + data to be lost + * Removed problematic methods ArPTZ::getReal{Pan,Tilt,Zoom} + * Removed all the references to using a std::string in ariaUtil's ArUtil + that would allocate or modify memory since if used in windows dll's + these'll cause major problems, made them take char *, + ArUtil::splitString is removed (use ArArgumentBuilder), commented out + stripDir and stripFile since they have problems and it doesn't seem + worth fixing + +Enhancements: + * ArRobot returns the actual battery voltage from the robot (Rather than + scaling to 13v) if you call ArRobot::getRealBatteryVoltage and have a + recent OS on the microcontroller (otherwise gives the scaled value) + * New robot parameter files for SH-based robots (p3dx-sh, p3at-sh, + patrolbot-sh, peoplebot-sh, powerbot-sh). Fixed P3AT's laser Y position + to 0. + * ArConfig: improved error handling, sections now operate fully and permit + the same parameter in multiple sections to be handled properly. + * New ArUtil and ArMath functions: findMax, findMin, log2, isOnlyAlphaNumeric + * ArActionTriangleDriveTo improved for greater accuracy + * ArRobot::getRobotLength() and ArRobot::getRobotWidth() added + * ArActionMovementParameters added, it can set all the vels and accels/decels + in the action so that you can have different action groups drive more + differently easier + * New Joydrive and Input classes (ArActionRatioInput and ArRatioInput*), + and server mode and handlers in ArNetworking for "Ratio drive", + to which you give front/back/left/right percentages of a maximum velocity. + Server can also enable/disable safe drive mode. + * New ArRobotJoyHandler class for getting joystick information from recent + OS on the microcontroller + * New ArNetworing classes: ArServerSimpleOpener, ArClientSimpleConnector. + * New class: ArActionGotoStraight + * New class: ArDataLogger + * Changed ArRobot::moveTo to keep range devices locked the whole time its + modifying things and now it doesn't use applyTransform (which probably + shouldn't be used) + * Added new action ArActionDeceleratingLimiter which will crank up the + deceleration to avoid a collision if it needs to (up to throwing an estop) + * New ArActionGroupNewInput using the new ArioInput + * New ArSoundsQueue and ArSoundPlayer classes + * New speech synthesis and recognition design, with implementations using + Festival and Cepstral (synthesis) and Sphinx (recognition) in separate + libraries. Aria now has a common base class for synthesis, ArSpeechSynth. + (Replace old ArSpeech library) + * ArKeyHandler supports more special function keys + * ArSimpleConnector may be used in Java and Python by passing in the + language's normal argv object (main() argument in Java, sys.argv in Python) + * New classes in ArNetworking in ArServerFileUtils and ArClientFileUtils for + transfering files over the ArNetworking connection, really only works in + Linux (and is mostly for the new feature in Mapper3) + * User and password information can now be required to connect with + ArNetworking, see the ArNetworking overview in the documentation for more + details (and ArNetworking/examples/serverDemo.userInfo); + +Aria 2.1-3 +October 12, 2004 +---------------------------- + * Special prerelease, with various Aria changes, and new ArSpeech_* setup [reed] + +Aria 2.1-2 +?? +---------------------------- + * Special prerelease? + +Aria 2.1-1 +23 August 2004 +--------------------------- + + ? + +Aria 2.1 +11 August 2004 +---------------------------- + + ArRangeDevices now have some information about how they should be + drawn in programs like MobileEyes (see the ArNetworking notes on + ArServerInfoDrawings). See setCurrentDrawingData and + setCumulativeDrawingData. + + ArTCM2 class added to handle the TCM2 compass. + + ArRobot now has information about the IR on a robot (stored in the .p + files). + + ArSick can now ignore readings at certain angles (stored in the .p + files). + + demo now has a command mode which will send commands down to the robot + directly. This stops state reflection (with the new + ArRobot::stopStateReflection) so you can send motion commands to the + robot without problems. + + demo's position mode can now activate and deactivate the gyro and now + has a mode where it can control just one of heading or velocity. + + demo now has a mode for viewing the TCM2 compass data. + + New range devices, ArForbiddenRangeDevice (makes forbidden lines in a + map into range device readings), ArBumpers (makes bumper triggers into + range device readings), and ArIRs (makes IRs into range device + readings). + + You can now activate and deactivate the ArAnalogGyro. + + ArActionBumpers now works dynamically with differing bumper numbers. + + ArArgumentBuilder will now take a set of strings (addStrings) and will + allow you put put them a particular place in the list. + + ArArgumentParser will now let you load default arguments that will + then be parsed as if passed in on the command line + (loadDefaultArguments loads these). This is for things like passing + in the robot port or laser port to all your programs. See the class + description for more details. Aria::init and Arnl::init add files to + the list, for Aria its the file /etc/Aria.args and environmental + variable $ARIAARGS and for Arnl it adds /etc/Arnl.args and + environmental variable $ARNLARGS. The parser therefor has a function + checkHelpAndWarnUnparsed to call instead of the old check against + argc. If you use this new feature you'll want to check against + parser.getArgc if you care about variable count since after + loadDefaultArguments is called the parser will no longer be using + the argc passed in (since it had to add). + + ArSimpleConnector can now configure a sick to use the different number + of degrees and the different increments. + + ArVCC4 can now handle some other Cannon camera types. + + Changed things to check #ifndef WIN32 instead of #ifdef linux to make + things easier for people using Aria on non linux but still unix + platforms. + + The priorities for ArConfig are now different (there are only 3). + + ArNetworking Changes + -------------------- + + ArServerInfoDrawing takes range devices (or all the range devices on a + robot) and provides it through an ArNetworking server (to draw in MobileEyes). + They will then be drawing by MobileEyes. The supported types + right now are PolyDots (takes a list of points and draw dots of a + given size at those points), PolyPoints (takes a list of points and + draw small points at those points), PolyLine (takes a list of points + through which it draws a line), PolyArrow (takes a list of points + through which it draws arrows pointing at the robot). + ArServerInfoDrawing can also just take a functor which'll return a + packet to draw so that you can draw whatever arbitrary information you + like. + + ArServerHandlerCommands provides a list of commands through the ArNetworking + server, and calls a functor or a functor with string argument when the command + is received (These are displayed as "Custom Commands" in MobileEyes). + + ArServerSimpleCommandsUC is a class which will hook into + ArServerHandlerCommands and let you send commands to the + microcontroller (uC). Note that if you use motion commands with this + the ArRobot state reflection on the server is still going on so you'll + want to hold enter (for the tool) or control s (for the toolbar) in + MobileEyes. + + New ArServerHandlerCamera class to control an ArPTZ through ArNetworking + + ArHybridForwardVideo will connect to a running video server and + forward video from that server out through its server. + These video servers are either our color tracking + software (ACTS, purchased separately) or our SAV (software a/v) + transmission software (free to all our customers). + + ArClientBase::logDataList will now log not only the name and + description of the data available but also the return description and + argument description. + + ArNetPacket now has doubleToBuf and bufToDouble. + + ArServerHandlerMap now optionally take a map instance in the + constructor in which case it won't worry about loading a map itself + and will instead use the given map (and hook into the its map + reloaded callback). + + ArConfig information can be passed from the server to the client and + vice versa now. MobileEyes has a GUI editing tool for configuration + data (ARNL guiServer lets people edit arnl.p). + + ArClientBase requestOnceWithString does a request once on the given + name using a packet with the string passed in put in the buffer. + + + + +Aria 2.0 +11 February 2004 +---------------------------- + + ArNetworking library added! ARNL and MobileEyes were also released. + + ArConfig now a new class ArConfigArg instead of ArArg, ArConfigArg can + also makememory to hold things and is more set up for working with + ArNetworking (and hides some things from people just trying to use the + base ArArg stuff). ArConfig::writeFile now writes priorities of the + config out but has a parameter not to. + + ArConfig now has sections to it and doesn't need to be subclassed + from, there is also an Aria::getConfig so that you can have one config + for all the options in a program without as much coordination + required. + + The demo program and ArSimpleConnector now have shortcuts for arguments + along with a new flag -connectLaser which will have it connect the + laser (only in demo and ArNetworking example serverDemo right now). + You can also now just pass one hyphen (-) but two (--) will still work + fine. + + The simulator will now use rotational and translational accelerations + and decelerations independently and respond appropriately to these. + Previously rotational acceleration was linked to translational + acceleration and there was no deceleration parameter as acceleration + parameter was used for deceleration too. If you set the accel/decel + params in your robot's parameter file these will be sent to the + simulator which will respond appropriately. Note that too large + values will cause the simulator to act erratically. + + ArRangeDevice now has generic code to keep current and cumulative + readings. + + Signal handling should work appropriately now. + + New params in the parameter file. GyroScaler and LaserTh, RobotWidth + and RobotLength. GyroScaler is used with an ArAnalogGyro to calibrate + it (figure out the error and then adjust this scaler to compensate). + + There is new code in that deinterlaces sick laser readings if you are + operating at 1/2 degree increments (the reading aren't interlaced with + any other mode). Mapping does not yet take advantage of this. + + ArArgumentParser has some new functions to make life easier and now + tries parsin with a - extra) + + ArUtil has a few new functions e.g. ArUtil::atof which deals with inf + and -inf correctly (to help Windows). + + ArNetServer can log data sent and received. + + ArRobot has some new functions (requestIOPackets, stopIOPackets, + requestEncoderPackets, stopEncoderPackets, getIOAnalogVoltage (which + like all the getIO calls you need to call requestIOPackets to use), + getLeftEncoder and getRightEncoder (which you have to call + requestEncoderPackets to use)) + + There's a new class ArLineFinder which finds lines from a range device + that puts in rawReadings which at this point is really only the ArSick + class. It will find the lines in a reading which can be used to do + different things. ArActionTriangleDriveTo now exists which uses this + class, these are used with the docking stations that we have. + + Other miscellaneous small fixes. + + + +Aria 1.3-2 +8 September 2003 +---------------------------- + + RequestIOPackets was on for all robots instead of just the newer + PeopleBots which wound up sending too much data and broke a few + things. Its off now except for the PeopleBots that need it, but the + following fixes are in place so that things will still work well with + that amount of data. + + Before if you had a lot of data (a gyro, lots of sonar data, and were + requesting IO) you could wind up where Aria would spend all of its + time receiving data and none doing anything with it, this was only at + 9600 baud and more data than most people ever send back and forth. It + did this because it tried to process all incoming data before running + its loop, now it'll only try to do this for a half a cycle's worth of + time. + + The warning messages for when things take too long now clearly + indicate that they are in fact merely warnings. + + A new release of AROS should be out this week, if you are using this + version (1.9) or newer and are connecting over a serial port the + connection will be automatically shifted up to 38.4 baud after the + connection is made. Aria sends a command to the robot to tell it to + change baud rates, then changes its own baud rate in reflection. If + either side doesn't hear from the other for a half second it fails + back over to the previous baud rate. You can disable this behavior by + changing SwitchToBaudRate to 0 in your parameter files. You can also + set it higher (up to 115200) if you wish, you must use the normal baud + rates of 9600 19200 38400 56800 or 115200. + + +Aria 1.3 ? +11 August 2003 +---------------------------- + + (BasicSuite Mapper and LaserMapper (ScanStudio) were both also released) + + Code for the new gyroscopic correction system is integrated in with + the base level Aria code. The class is ArAnalogGyro. If your robot + has a gyro mode then in the Aria demo in position mode the raw gyro + and raw robot headings will show up. + + ArRobot now requests a configPacket from the robot after it connects + and waits for that before saying it is connected (it times out within + a few seconds so it will work okay with pioneer 1s and other old + robots, but everyone with anything but a pioneer 1 should get the new + AROS or P2OS version since it has one critical bug fix). + + ArActions have gotten a major upgrade as they can now set the + accelerations and decelerations the robot uses. The values an action + sets will be used as long as an action sets an accel, decel, or rot + vel max when an action isn't setting them anymore these values all + reset to the values the robot had at connection (the reason the + configPacket reader was implemented). trans vel max is still taken + care of in software. You can also set these values on the robot so + that ArRobot will ignore the ones from the configPacket, look at + setRotVelMax, setRotAccel, setRotDecel, setTransVelMax, setTransAccel + and setTransDecel. You can now also use rot vel with the actions, + note that this does not mix at all with the heading modes and that + whichever mode is used first is what will be used the other will be + ignored. + + ArRobot has a stabilizing time that can be set with + ArRobot::setStabilizingTime so that it will wait a set amount of time + after the initial connection is made before saying it is connected and + calling the connect callbacks. This stabilizing time right now is + only used for the gyro (since needs to find the center while the + robots not moving before it can be used). + + There is now a warning time for the robot cycle time + (ArRobot::setWarningTime). If the robot sync tasks take longer than + this time a warning is issued. If any individual task takes longer + then that task is also warned over. Default is 200 ms, 0 disables it. + + The sick filtering code has been changed. Look at that class for + specifics but one main thing is that readings will now be filtered and + thrown away if they are too old, but this like all filtering is + configurable. There was code that ignored some readings on the sides + of the robot but this was gotten rid of since it sometimes caused + trouble because it would sometimes hold readings that should have been + discarded. + + New class called ArConfig for having configuration + files of different sorts, the mechanism that reads/writes .p files was + overhauled to use this instead of the old ArPref* system that has been + removed. The new system is much more robust and usable than the old + system. + + The wrapper.i file needed for rebuilding the Java and Python wrappers + is now included. If you have any trouble with the wrappers in the + stock Aria please send me an email. + + The demo and anything using the ArSimpleConnector can now change the + baud by using the switch --robotBaud in the command line. + + The code for ArVCC4 has been upgraded a little bit and now has the + ability to enable or disable the getting of the position from the + camera. + + The option not to do state reflecting has been removed from the + constructor since no one I'd heard of used it and it was making things + too complicated for little benefit. + + The general Aria static class now has functions for setting and + getting ArJoyHandlers like it has for key handlers. + + ArUtil had strcasecmp functions added for comparing the cases of + strings and char *s without paying attention to case. Also has a + function call to convert a value to true or false for easier + logging/understanding. There's also a function to lower an entire + string. + + A few other minor bug fixes and additions. + +Aria 1.2 +4 March 2003 +---------------------------- + + Aria now supports Java and Python (Wrappers generated by Swig). + A number of names of member functions have changed to accomodate this + (since they were keywords in one of these languages). The most important + one is that the different print members are now called log (since thats + what they do). + + There are a couple of more complicated features that don't work yet in + these languages. The only unimplemented feature of SWIG is virtual + function overloading which means that you will not be able to make + your own ArActions in Java or Python, but you can always add them to + the C++ library and use them in Java or Python. + You also will not be able to make your own ArFunctors + for callbacks, but again where thats needed you can make objects in + the C++ library and use them in Java or Python. For this deficiency + language specific workarounds could likely be written by users, which + I could incorporate or if there are large numbers of people using + these wrappers we may develop these on our own. + + Also note with python, if you use non-interactive mode the program + will crash on exit. In interactive mode you should do + robot.disconnect(); Aria.shutdown() before you exit to avoid a crash, + or you can add these to the simple.py for non-interactive mode. + + Note that there are no Java or Python wrappers for anything but Aria. + If people use this wrapper and want wrappers for the other packages I + will probably make them. If you use either of the wrappers and have + feedback about it, feel free to send it to me. + + ArSick now has a cumulative buffer (it had none before) which + is filtered for readings that the laser doesn't see anymore (ie + transient obstacles). + + ArRangeDevice now has a buffer that is ArPoseWithTime instead of + ArPose, people may need to change their iterators. Cumulative + readings older than a certian time can now be flushed. + + Accessors in Aria are now const. Some functions have both a const and + non const function. No one should really even notice this except for + the people who want to use it. + + The Cannon VCC4 camera got an improvement in that it now uses + bidirectioncal communication. + + New ArSimpleConnector class that should make it easier to connect to + the simulator or real robot with an ArRobot or ArSick. Also supports + the command line options the demo uses. It is used in + examples/demo.cpp examples/wander.cpp examples/teleop.cpp + examples/sickWander.cpp examples/sickTeleop.cpp. + + As always there were more bug fixes and improvements. + + +Aria 1.1-11b +29 Jan 2003 +--------------------------- + + * Fixes errors in windows packages + +Aria 1.1-11 +23 Jan 2003 +---------------------------- + + ? + +Aria 1.1-10 +13 November 2002 +---------------------------- + + ? + +Aria 1.1-8 +10 October 2002 +---------------------------- + + ? + +Aria 1.1-7 ? +5 September 2002 +---------------------------- + + * The addition of new robot types for use with the new H8 controller + * Preventing the robot from jumping to the origin on connect + * Fixed a memory leak in ArBasePacket + * Fixed a corrupted file in the Windows distribution of ArSpeech. + + +Aria 1.1-5 ? +12 July 2002 +---------------------------- + + This mostly fixes some problems with sonars from an over-agressive other + bug fix I did. It didn't process the last parameter of the sonar and + wound up thinking it was pointing forward (0, 0, 0). It has a few + other small fixes but nothing major (some previous parsing errors used + to crash Saphira but Kurt fixed it so it didn't). + + This may fix the sonar localization issue reported today, I'm not + sure. If not you can try doing an mcSetGauss after moving a robot + back to locate the samples there. If that works and it isn't an issue + let me know. + + +Aria 1.1-2 +10 May 2002 +---------------------------- + + * rewritten ipthru program (examples/ipthru.cpp) + * Fixes and minor additions + +Aria 1.1 +11 March 2002 +---------------------------- + + * ArSick class added to support the Sick laser rangefinder. + * New unified demo program that'll control basically everything on the + robot, gripper, camera, all that. + * New examples sickWander.cpp and sickTeleop.cpp which + demonstrate how to configure the laser. + + +Aria 1.0-3 +26 February 2002 +---------------------------- + + * ArActionGroup added. + * Minor bug fixes. + + +Aria 1.0-2 +?? +---------------------------- + + ? + +Aria 1.0-1 +?? +---------------------------- + + ? + + +Aria 1.0 +21 December 2001 +---------------------------- + + * First full, official ARIA release! + + * ArAction::run renamed to ArAction::fire + * Better documentation + * ArKeyHandler added + + +Aria 0.71 +8 November 2001 +---------------------------- + +Fix to the simulator in Windows + +Aria 0.7 +6 November 2001 +---------------------------- + +First public beta + +You can now do a setPort on an ArSerialConnection or ArTcpConnection +instead of having to open it... the robot connect will then open it +(and fail if it can't open it). The only time you really need to open +it yourself is if you want to do error checking and do different +things if the open fails. + +The sync loop now just waits in the packet handler all the time, and +the packet handler finally returns (which runs the main sync loop) as +soon as it gets a SIP from the packet. There is a flag to the ArRobot +contructor if you don't want to use this new behavior. + + +Aria 0.6 +13 September 2001 +---------------------------- + + * Internal beta + diff --git a/Legacy/Aria/CommandLineOptions.txt b/Legacy/Aria/CommandLineOptions.txt new file mode 100644 index 0000000..99c9236 --- /dev/null +++ b/Legacy/Aria/CommandLineOptions.txt @@ -0,0 +1,370 @@ + +ARIA 2.8.0 + +Summary of command line options + +Some classes in ARIA and ArNetworking check a program's run time options to +specify parameters and options. These options are used to configure run time +accessory device parameters (ports, speeds, etc.) used by ARIA; host names, +port numbers, etc. used by ArNetworking; and various other run time options. +Options may be given as program arguments on the command line, or globally +saved as defaults in the file /etc/Aria.args if on Linux, or in the ARIAARGS +environment variable. Arguments given on the command line may override some +internal defaults or values read from the robot parameter files. + +Note, an option will be available only in programs that instantiate an +object of the class that uses it. Some programs may also check for +program-specific command line options. + +Use the special "-help" command line option to cause a program to +print out its available options. + +A list of options used by each class follows. + + +ArRobotConnector +---------------- +Options for ArRobotConnector (see docs for more details): + +Robot options: +-remoteHost +-rh +-robotPort +-rp +-robotBaud +-rb +-remoteRobotTcpPort +-rrtp +-remoteIsSim +-ris +-remoteIsNotSim +-rins +-robotLogPacketsReceived +-rlpr +-robotLogPacketsSent +-rlps +-robotLogMovementReceived +-rlmr +-robotLogMovementSent +-rlms +-robotLogVelocitiesReceived +-rlvr +-robotLogActions +-rla + +ArLaserConnector +---------------- +Laser types and options may also be set in the robot parameter file. See the +ARIA reference documentation for details. + +If a program supports multiple lasers, then options for additional lasers +after the first are given by appending the laser number (e.g. -laserType2) +To enable use of a laser, choose its type with the -laserType options +(e.g.: -laserType lms2xx -laserType2 urg2.0) + +The default laser type for the primary laser (laser 1) is specified in the +robot type parameter file in the ARIA "params" directory. For many robots +it is "lms2xx", the SICK LMS200. For some it is "lms1xx", for the SICK +LMS100 or LMS111. + +Instruct a program to connect to a laser using the -connectLaser option +or by setting LaserAutoConnect to true in the robot's parameter file. +If a program requires use of a laser it usually always attempts to connect to +the primary laser, however. + +The index number is optional in any options for the primary laser; i.e. 1 is +assumed if the index number is omitted. + + + +For laser type "lms2xx" (SICK LMS-200): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 32000 +-laserDegrees <100|180> +-ld <100|180> +-laserIncrement +-li +-laserUnits <1mm|1cm|10cm> +-lu <1mm|1cm|10cm> +-laserReflectorBits <1ref|2ref|3ref> +-lrb <1ref|2ref|3ref> +-laserPowerControlled +-lpc +-laserStartingBaud <9600|19200|38400> +-lsb <9600|19200|38400> +-laserAutoBaud <9600|19200|38400> +-lab <9600|19200|38400> +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "lms1xx" (SICK LMS-100, LMS-111, etc.): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 20000 +-laserDegreesStart +-lds + is a double between -135 and 135 +-laserDegreesEnd +-lde + is a double between -135 and 135 +-laserIncrement +-li +-laserReflectorBits +-lrb +-laserPowerControlled +-lpc +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "urg2.0" (URG with SCIP 2.0): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 262144 +-laserDegreesStart +-lds + is a double between -180 and 180 +-laserDegreesEnd +-lde + is a double between -180 and 180 +-laserIncrementByDegrees +-libd + is a double between 0 and 180 +-laserStartingBaud <0|019200|057600|115200|250000|500000|750000> +-lsb <0|019200|057600|115200|250000|500000|750000> +-laserAutoBaud <0|019200|057600|115200|250000|500000|750000> +-lab <0|019200|057600|115200|250000|500000|750000> +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "urg" (URG with old SCIP 1.0): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 4095 +-laserDegreesStart +-lds + is a double between -135 and 135 +-laserDegreesEnd +-lde + is a double between -135 and 135 +-laserIncrementByDegrees +-libd + is a double between 0 and 135 +-laserStartingBaud <019200|057600|115200|250000|500000|750000> +-lsb <019200|057600|115200|250000|500000|750000> +-laserAutoBaud <019200|057600|115200|250000|500000|750000> +-lab <019200|057600|115200|250000|500000|750000> +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "lms5XX" (SICK LMS-500): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 20000 +-laserIncrement +-li +-laserReflectorBits +-lrb +-laserPowerControlled +-lpc +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "sZseries" (Keyence SZ): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 16382 +-laserDegreesStart +-lds + is a double between -135 and -135 +-laserDegreesEnd +-lde + is a double between 135 and 135 +-laserIncrementByDegrees +-libd + is a double between 0.5 and 0.5 +-laserPowerControlled +-lpc +-laserStartingBaud <9600|19200|38400|57600|115200|230400|460800> +-lsb <9600|19200|38400|57600|115200|230400|460800> +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "s3series" (SICK S-300, S-3000, etc.): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 20000 +-laserDegreesStart +-lds + is a double between -135 and -135 +-laserDegreesEnd +-lde + is a double between 135 and 135 +-laserIncrement +-li +-laserPowerControlled +-lpc +-laserStartingBaud <9600|19200|38400|57600|115200|230400|460800> +-lsb <9600|19200|38400|57600|115200|230400|460800> +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +For laser type "tim3XX" (SICK TiM300): + +-laserPort +-lp +-laserPortType +-lpt +-remoteLaserTcpPort +-rltp +-laserFlipped +-lf +-laserMaxRange +-lmr + is an unsigned int less than 20000 +-laserDegreesStart +-lds + is a double between -135 and 135 +-laserDegreesEnd +-lde + is a double between -135 and 135 +-laserIncrement +-li +-laserReflectorBits +-lrb +-laserPowerControlled +-lpc +-laserStartingBaud <115200> +-lsb <115200> +-laserAdditionalIgnoreReadings +-lair + is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100' + +ArPTZConnector +-------------- +Common PTU and Camera PTZ options: + + -ptzType Select PTZ/PTU type. Required. Available types are: + dpptu + rvision + sony + vcc + vcc4 + vcc50i + -ptzInverted If true, reverse tilt and pan axes for cameras mounted upside down. + +Only one of the following sets of connection parameters may be given: + +For computer serial port connections: + -ptzSerialPort Serial port name. + +For Pioneer robot auxilliary serial port connections: + -ptzRobotAuxSerialPort <1|2|3> Use specified Pioneer robot auxilliary serial port. + +For network connections: + -ptzAddress
Network address or hostname for network connection. + -ptzTcpPort TCP port number for network connections. + +Parameters for multiple cameras/units may be given like: -ptz1Type, -ptz2Type, -ptz3Type, etc. +Some PTZ/PTU types may accept additional type-specific options. Refer to option documentation text specific to those types. + +ArGPSConnector +-------------- +GPS options: +-gpsType Select GPS device type (default: standard) +-gpsPort Use the given serial port (default: /dev/ttyS1) +-gpsBaud Use the given serial Baud rate (default: 9600) +-remoteGpsTcpHost Use a TCP connection instead of serial, and connect to remote host +-remoteGpsTcpPort Use the given port number for TCP connection, if using TCP. (default 8103) + +ArCompassConnector +------------------ +Compass options: +-compassType Select compass device type (default: robot) +-compassPort Serial port for "serialTCM" type compass. (default: /dev/ttyS3) + +ArSonarConnector +---------------- +Options for ArSonarConnector: +-sonarLogPacketsReceived +-slpr +-sonarLogPacketsSent +-slps + +Options shown are for currently set up sonars. Activate sonars with -sonarType option +to see options for that sonar (e.g. "-help -sonarType1 sonarMTX"). +Valid sonar types are: mtx + +See docs for details. + + diff --git a/Legacy/Aria/INSTALL.txt b/Legacy/Aria/INSTALL.txt new file mode 100644 index 0000000..ceef64b --- /dev/null +++ b/Legacy/Aria/INSTALL.txt @@ -0,0 +1,7 @@ + +To install the contents of this .tgz package in /usr/local, +run "make install" as the root user, or "sudo make install" +if you have the "sudo" tool. + +See README.txt for more information on getting started. + diff --git a/Legacy/Aria/LICENSE.txt b/Legacy/Aria/LICENSE.txt new file mode 100644 index 0000000..0158861 --- /dev/null +++ b/Legacy/Aria/LICENSE.txt @@ -0,0 +1,424 @@ + + ARIA + MobileRobots Advanced Robotics Interface for Applications + + License + +Note that this license applies to programs which use ARIA +via both dynamic and static linking or loading, including +dynamic loading and linking at runtime (e.g. using ArModule, +Windows LoadLibrary, Unix dlopen, or similar. In other words +if you have a plugin which uses ARIA in any way that plugin +must also be distributed under this license.) + +(Also note that the text of the GPL below is copyrighted by the +Free Software Foundation, but that the instance of code that it +refers to (ARIA) is copyrighted by ActivMedia Robotics +LLC and MobileRobots Inc.) + +----------------------------------------------------------------- + + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away +your freedom to share and change it. By contrast, the GNU +General Public License is intended to guarantee your +freedom to share and change free software--to make sure the +software is free for all its users. This General Public +License applies to most of the Free Software Foundation's +software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) +You can apply it to your programs, too. + + When we speak of free software, we are referring to +freedom, not price. Our General Public Licenses are +designed to make sure that you have the freedom to +distribute copies of free software (and charge for this +service if you wish), that you receive source code or can +get it if you want it, that you can change the software or +use pieces of it in new free programs; and that you know +you can do these things. + + To protect your rights, we need to make restrictions that +forbid anyone to deny you these rights or to ask you to +surrender the rights. These restrictions translate to +certain responsibilities for you if you distribute copies +of the software, or if you modify it. + + For example, if you distribute copies of such a program, +whether gratis or for a fee, you must give the recipients +all the rights that you have. You must make sure that +they, too, receive or can get the source code. And you +must show them these terms so they know their rights. + + We protect your rights with two steps: (1) copyright the +software, and (2) offer you this license which gives you +legal permission to copy, distribute and/or modify the +software. + + Also, for each author's protection and ours, we want to +make certain that everyone understands that there is no +warranty for this free software. If the software is +modified by someone else and passed on, we want its +recipients to know that what they have is not the original, +so that any problems introduced by others will not reflect +on the original authors' reputations. + + Finally, any free program is threatened constantly by +software patents. We wish to avoid the danger that +redistributors of a free program will individually obtain +patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must +be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, +distribution and modification follow. + + GNU GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work +which contains a notice placed by the copyright holder +saying it may be distributed under the terms of this +General Public License. The "Program", below, refers to +any such program or work, and a "work based on the Program" +means either the Program or any derivative work under +copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with +modifications and/or translated into another language. +(Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and +modification are not covered by this License; they are +outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only +if its contents constitute a work based on the Program +(independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the +Program's source code as you receive it, in any medium, +provided that you conspicuously and appropriately publish +on each copy an appropriate copyright notice and disclaimer +of warranty; keep intact all the notices that refer to this +License and to the absence of any warranty; and give any +other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a +copy, and you may at your option offer warranty protection +in exchange for a fee. + + 2. You may modify your copy or copies of the Program or +any portion of it, thus forming a work based on the +Program, and copy and distribute such modifications or work +under the terms of Section 1 above, provided that you also +meet all of these conditions: + + a) You must cause the modified files to carry prominent + notices stating that you changed the files and the date of + any change. + + b) You must cause any work that you distribute or + publish, that in whole or in part contains or is derived + from the Program or any part thereof, to be licensed as a + whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands + interactively when run, you must cause it, when started + running for such interactive use in the most ordinary way, + to print or display an announcement including an + appropriate copyright notice and a notice that there is no + warranty (or else, saying that you provide a warranty) and + that users may redistribute the program under these + conditions, and telling the user how to view a copy of + this License. (Exception: if the Program itself is + interactive but does not normally print such an + announcement, your work based on the Program is not + required to print an announcement.) These requirements +apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and +can be reasonably considered independent and separate works +in themselves, then this License, and its terms, do not +apply to those sections when you distribute them as +separate works. But when you distribute the same sections +as part of a whole which is a work based on the Program, +the distribution of the whole must be on the terms of this +License, whose permissions for other licensees extend to +the entire whole, and thus to each and every part +regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights +or contest your rights to work written entirely by you; +rather, the intent is to exercise the right to control the +distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on +the Program with the Program (or with a work based on the +Program) on a volume of a storage or distribution medium +does not bring the other work under the scope of this +License. + + 3. You may copy and distribute the Program (or a work +based on it, under Section 2) in object code or executable +form under the terms of Sections 1 and 2 above provided +that you also do one of the following: + + a) Accompany it with the complete corresponding + machine-readable source code, which must be distributed + under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least + three years, to give any third party, for a charge no more + than your cost of physically performing source + distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the + terms of Sections 1 and 2 above on a medium customarily + used for software interchange; or, + + c) Accompany it with the information you received as to + the offer to distribute corresponding source code. + (This alternative is allowed only for noncommercial + distribution and only if you received the program in + object code or executable form with such an offer, in + accord with Subsection b above.) + +The source code for a work means the preferred form of the +work for making modifications to it. For an executable +work, complete source code means all the source code for +all modules it contains, plus any associated interface +definition files, plus the scripts used to control +compilation and installation of the executable. However, +as a special exception, the source code distributed need +not include anything that is normally distributed (in +either source or binary form) with the major components +(compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by +offering access to copy from a designated place, then +offering equivalent access to copy the source code from the +same place counts as distribution of the source code, even +though third parties are not compelled to copy the source +along with the object code. + + + + 4. You may not copy, modify, sublicense, or distribute +the Program except as expressly provided under this +License. Any attempt otherwise to copy, modify, sublicense +or distribute the Program is void, and will automatically +terminate your rights under this License. However, parties +who have received copies, or rights, from you under this +License will not have their licenses terminated so long as +such parties remain in full compliance. + + 5. You are not required to accept this License, since you +have not signed it. However, nothing else grants you +permission to modify or distribute the Program or its +derivative works. These actions are prohibited by law if +you do not accept this License. Therefore, by modifying or +distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, +distributing or modifying the Program or works based on it. + + 6. Each time you redistribute the Program (or any work +based on the Program), the recipient automatically receives +a license from the original licensor to copy, distribute or +modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. You are +not responsible for enforcing compliance by third parties +to this License. + + 7. If, as a consequence of a court judgment or allegation +of patent infringement or for any other reason (not limited +to patent issues), conditions are imposed on you (whether +by court order, agreement or otherwise) that contradict the +conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as +to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a +consequence you may not distribute the Program at all. +For example, if a patent license would not permit +royalty-free redistribution of the Program by all those who +receive copies directly or indirectly through you, then the +only way you could satisfy both it and this License would +be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or +unenforceable under any particular circumstance, the +balance of the section is intended to apply and the section +as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to +infringe any patents or other property right claims or to +contest validity of any such claims; this section has the +sole purpose of protecting the integrity of the free +software distribution system, which is implemented by +public license practices. Many people have made generous +contributions to the wide range of software distributed +through that system in reliance on consistent application +of that system; it is up to the author/donor to decide if +he or she is willing to distribute software through any +other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is +believed to be a consequence of the rest of this License. + + + + 8. If the distribution and/or use of the Program is +restricted in certain countries either by patents or by +copyrighted interfaces, the original copyright holder who +places the Program under this License may add an explicit +geographical distribution limitation excluding those +countries, so that distribution is permitted only in or +among countries not thus excluded. In such case, this +License incorporates the limitation as if written in the +body of this License. + + 9. The Free Software Foundation may publish revised +and/or new versions of the General Public License from time +to time. Such new versions will be similar in spirit to +the present version, but may differ in detail to address +new problems or concerns. + +Each version is given a distinguishing version number. If +the Program specifies a version number of this License +which applies to it and "any later version", you have the +option of following the terms and conditions either of that +version or of any later version published by the Free +Software Foundation. If the Program does not specify a +version number of this License, you may choose any version +ever published by the Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into +other free programs whose distribution conditions are +different, write to the author to ask for permission. For +software which is copyrighted by the Free Software +Foundation, write to the Free Software Foundation; we +sometimes make exceptions for this. Our decision will be +guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the +sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE +IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING +THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM +PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY +SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR +AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY +OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM +AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING +ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM +(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY +OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of +the greatest possible use to the public, the best way to +achieve this is to make it free software which everyone can +redistribute and change under these terms. + + To do so, attach the following notices to the program. +It is safest to attach them to the start of each source +file to most effectively convey the exclusion of warranty; +and each file should have at least the "copyright" line and +a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General + Public License as published by the Free Software + Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. You should have received a copy of + the GNU General Public License along with this program; + if not, write to the Free Software Foundation, Inc., 59 + Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic +and paper mail. + +If the program is interactive, make it output a short +notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of + author Gnomovision comes with ABSOLUTELY NO WARRANTY; + for details type `show w'. This is free software, and + you are welcome to redistribute it under certain + conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show +the appropriate parts of the General Public License. Of +course, the commands you use may be called something other +than `show w' and `show c'; they could even be mouse-clicks +or menu items--whatever suits your program. + +You should also get your employer (if you work as a +programmer) or your school, if any, to sign a "copyright +disclaimer" for the program, if necessary. Here is a +sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest + in the program 'Gnomovision' (which makes passes at + compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating +your program into proprietary programs. If your program is +a subroutine library, you may consider it more useful to +permit linking proprietary applications with the library. +If this is what you want to do, use the GNU Library General +Public License instead of this License. + + + diff --git a/Legacy/Aria/Makefile b/Legacy/Aria/Makefile new file mode 100644 index 0000000..0bad62a --- /dev/null +++ b/Legacy/Aria/Makefile @@ -0,0 +1,776 @@ +#### +#### Aria top level makefile +#### +#### +#### Internal variables: +#### +#### CFILEEXT -- This is to denote the file extension that is used. This is +#### used by the build rules to figure out which files to build. +#### ie: cpp +#### ie: cxx +#### ie: cc + +# Make sure we're using a compiler (we probably don't need to define +# it but we have been so here it is unless it was already set) +ifndef CXX +CXX:=g++ +endif + +#### +#### General variables +#### + +CFILEEXT:=cpp +# this is set up with the extra layer since the python wrapper needs exceptions +# but I didn't want to have two sets of defines +BARECXXFLAGS:=-g -Wall -D_REENTRANT #-pg -fprofile-arcs +CXXFLAGS+=$(BARECXXFLAGS) -fno-exceptions +CXXINC:=-Iinclude +CXXLINK=-Llib -lAria +CXXSTATICLINK:=-Llib -Xlinker -Bstatic -lAria -Xlinker -Bdynamic + +host:=$(shell uname | cut -d _ -f 1) +ifeq ($(host),MINGW32) + $(info Building on MinGW) + #CXXFLAGS+=-mwindows -mms-bitfields -D__MINGW__ -DMINGW + CXXFLAGS+=-mms-bitfields -D__MINGW__ -DMINGW + CXXLINK+=-lpthreadGC2 -lwinmm -lws2_32 -lstdc++ + CXXSTATICLINK+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic -lwinmm -lws2_32 -lstdc++ + binsuffix:=.exe +else + BARECXXFLAGS+=-fPIC + CXXLINK+=-lpthread -ldl -lrt + CXXSTATICLINK+=-Xlinker -Bdynamic -lpthread -ldl -lrt -Xlinker -Bstatic -lstdc++ -Xlinker -Bdynamic + binsuffix:= +endif + + +ifndef JAVAC +ifdef JAVA_BIN +JAVAC:=$(JAVA_BIN)/javac +else +JAVAC:=javac +endif #ifdef JAVA_BIN +endif #ifndef JAVAC + +ifndef JAR +ifdef JAVA_BIN +JAR:=$(JAVA_BIN)/jar +else +JAR:=jar +endif #ifdef JAVA_BIN +endif #ifndef JAR + +#### +#### Aria build variables +#### + +# Default targets to build in the default rule: +TARGETS:=lib/libAria.so examples/demo$(binsuffix) + +# Default static libraries and examples: +STATIC_TARGETS:=lib/libAria.a examples/demoStatic$(binsuffix) + +# Lots of targets, to build in the everything rule: +ALL_TARGETS:=lib/libAria.so utils examples tests docs params lib/libArNetworking.so swig arnetworking_docs arnetworking_swig clib/libArNetworking.a $(STATIC_TARGETS) + +CFILES:= \ + ArAction.cpp \ + ArActionAvoidFront.cpp \ + ArActionAvoidSide.cpp \ + ArActionBumpers.cpp \ + ArActionColorFollow.cpp \ + ArActionConstantVelocity.cpp \ + ArActionDeceleratingLimiter.cpp \ + ArActionDesired.cpp \ + ArActionDriveDistance.cpp \ + ArActionGoto.cpp \ + ArActionGotoStraight.cpp \ + ArActionGroup.cpp \ + ArActionGroups.cpp \ + ArActionInput.cpp \ + ArActionIRs.cpp \ + ArActionJoydrive.cpp \ + ArActionKeydrive.cpp \ + ArActionLimiterBackwards.cpp \ + ArActionLimiterForwards.cpp \ + ArActionLimiterRot.cpp \ + ArActionLimiterTableSensor.cpp \ + ArActionMovementParameters.cpp \ + ArActionMovementParametersDebugging.cpp \ + ArActionRatioInput.cpp \ + ArActionRobotJoydrive.cpp \ + ArActionStallRecover.cpp \ + ArActionStop.cpp \ + ArActionTriangleDriveTo.cpp \ + ArActionTurn.cpp \ + ArACTS.cpp \ + ArAMPTU.cpp \ + ArAnalogGyro.cpp \ + ArArg.cpp \ + ArArgumentBuilder.cpp \ + ArArgumentParser.cpp \ + ArASyncTask.cpp \ + ArBasePacket.cpp \ + ArBatteryConnector.cpp \ + ArBatteryMTX.cpp \ + ArBumpers.cpp \ + ArCameraCommands.cpp \ + ArCameraCollection.cpp \ + ArCondition_LIN.cpp \ + ArConfig.cpp \ + ArConfigArg.cpp \ + ArConfigGroup.cpp \ + ArDataLogger.cpp \ + ArDeviceConnection.cpp \ + ArDPPTU.cpp \ + ArFileParser.cpp \ + ArForbiddenRangeDevice.cpp \ + ArFunctorASyncTask.cpp \ + ArGPS.cpp \ + ArGPSConnector.cpp \ + ArGPSCoords.cpp \ + ArGripper.cpp \ + ArInterpolation.cpp \ + ArIrrfDevice.cpp \ + ArIRs.cpp \ + ArJoyHandler.cpp \ + ArKeyHandler.cpp \ + ArLaser.cpp \ + ArLaserConnector.cpp \ + ArLaserFilter.cpp \ + ArLaserLogger.cpp \ + ArLaserReflectorDevice.cpp \ + ArLCDConnector.cpp \ + ArLCDMTX.cpp \ + ArLineFinder.cpp \ + ArLMS1XX.cpp \ + ArLMS2xx.cpp \ + ArLMS2xxPacket.cpp \ + ArLMS2xxPacketReceiver.cpp \ + ArLog.cpp \ + ArLogFileConnection.cpp \ + ArMap.cpp \ + ArMapComponents.cpp \ + ArMapInterface.cpp \ + ArMapObject.cpp \ + ArMapUtils.cpp \ + ArMD5Calculator.cpp \ + ArMode.cpp \ + ArModes.cpp \ + ArModule.cpp \ + ArModuleLoader.cpp \ + ArMutex.cpp \ + ArMutex_LIN.cpp \ + ArNetServer.cpp \ + ArNMEAParser.cpp \ + ArNovatelGPS.cpp \ + ArP2Arm.cpp \ + ArPriorityResolver.cpp \ + ArPTZ.cpp \ + ArPTZConnector.cpp \ + ArRangeBuffer.cpp \ + ArRangeDevice.cpp \ + ArRangeDeviceThreaded.cpp \ + ArRatioInputKeydrive.cpp \ + ArRatioInputJoydrive.cpp \ + ArRatioInputRobotJoydrive.cpp \ + ArRecurrentTask.cpp \ + ArRobot.cpp \ + ArRobotBatteryPacketReader.cpp \ + ArRobotConfig.cpp \ + ArRobotConfigPacketReader.cpp \ + ArRobotConnector.cpp \ + ArRobotJoyHandler.cpp \ + ArRobotPacket.cpp \ + ArRobotPacketReceiver.cpp \ + ArRobotPacketReaderThread.cpp \ + ArRobotPacketSender.cpp \ + ArRobotParams.cpp \ + ArRobotTypes.cpp \ + ArRVisionPTZ.cpp \ + ArS3Series.cpp \ + ArSZSeries.cpp \ + ArSick.cpp \ + ArSimpleConnector.cpp \ + ArSimulatedLaser.cpp \ + ArSocket.cpp \ + ArSonarConnector.cpp \ + ArSonarDevice.cpp \ + ArSonarMTX.cpp \ + ArSensorReading.cpp \ + ArSonyPTZ.cpp \ + ArSoundsQueue.cpp \ + ArSoundPlayer.cpp \ + ArStringInfoGroup.cpp \ + ArSyncLoop.cpp \ + ArSyncTask.cpp \ + ArSystemStatus.cpp \ + ArSonarAutoDisabler.cpp \ + ArSpeech.cpp \ + ArTCM2.cpp \ + ArTCMCompassDirect.cpp \ + ArTCMCompassRobot.cpp \ + ArTcpConnection.cpp \ + ArThread.cpp \ + ArThread_LIN.cpp \ + ArTransform.cpp \ + ArTrimbleGPS.cpp \ + ArUrg.cpp \ + ArUrg_2_0.cpp \ + ArVCC4.cpp \ + Aria.cpp \ + ariaUtil.cpp \ + md5.cpp + +# Omit some Linux-only classes, and replace others with Win32 implementations. +ifeq ($(host),MINGW32) + CFILES+=ArSocket_WIN.cpp \ + ArJoyHandler_WIN.cpp \ + ArSerialConnection_WIN.cpp \ + ArSignalHandler_WIN.cpp +else + CFILES+=ArSocket_LIN.cpp \ + ArJoyHandler_LIN.cpp \ + ArSerialConnection_LIN.cpp \ + ArSignalHandler_LIN.cpp \ + ArVersalogicIO.cpp \ + ArMTXIO.cpp +endif + + + + +#### +#### Utility variables. No need to touch these. +#### + +OTFILES:=$(patsubst %.$(CFILEEXT),%.o,$(CFILES)) +OFILES:=$(patsubst %,obj/%,$(OTFILES)) +EXAMPLES_CPP:=$(shell find examples -name "*.$(CFILEEXT)" | grep -v Mod.cpp | grep -v proprietary) +EXAMPLES:=$(patsubst %.$(CFILEEXT),%$(binsuffix),$(EXAMPLES_CPP)) +EXAMPLES_STATIC:=$(patsubst %,%Static$(binsuffix),$(EXAMPLES)) +MOD_EXAMPLES_CPP:=$(shell find examples -name "*.$(CFILEEXT)" | grep Mod.cpp) +MOD_EXAMPLES:=$(patsubst %.$(CFILEEXT),%.so,$(MOD_EXAMPLES_CPP)) +TESTS_CPP:=$(shell find tests -name "*.$(CFILEEXT)" | grep -v Mod.cpp | grep -v proprietary) +MOD_TESTS_CPP:=$(shell find tests -name "*Mod.$(CFILEEXT)") +MOD_TESTS:=$(patsubst %.$(CFILEEXT),%.so,$(MOD_TESTS_CPP)) +TESTS:=$(patsubst %.$(CFILEEXT),%$(binsuffix),$(TESTS_CPP)) +TESTS_STATIC:=$(patsubst %,%Static$(binsuffix),$(TESTS)) +ADVANCED_CPP:=$(shell find advanced -name "*.$(CFILEEXT)" | grep -v Mod.cpp | grep -v proprietary) +ADVANCED:=$(patsubst %.$(CFILEEXT),%,$(ADVANCED_CPP)) +UTILS_CPP:=$(shell find utils -name "*.$(CFILEEXT)") +UTILS:=$(patsubst %.$(CFILEEXT),%$(binsuffix),$(UTILS_CPP)) +SRC_FILES:=$(patsubst %,src/%,$(CFILES)) +HEADER_FILES:=$(shell find include -type f -name \*.h) + + + + +#### +#### General rules for user invocation +#### + +# Default Rule +all: dirs $(TARGETS) + +# Build all targets, docs, params, etc. etc. +everything: dirs $(ALL_TARGETS) + +static: dirs $(STATIC_TARGETS) + +# Build everything required for distribution packages +dist-all: lib/libAria.so params docs CommandLineOptions.txt.in \ + lib/libArNetworking.so ArNetworking/CommandLineOptions.txt.in examples/demo \ + examples/demoStatic ArNetworking/examples/serverDemo \ + ArNetworking/examples/serverDemoStatic ArNetworking/examples/clientDemo \ + ArNetworking/examples/clientDemoStatic java python arnetworking_swig \ + arnetworking_docs + +examples: $(EXAMPLES) + +modExamples: $(MOD_EXAMPLES) + +tests: $(TESTS) $(MOD_TESTS) + +advanced: $(ADVANCED) + +utils: $(UTILS) + +cleanDep: + -rm Makefile.dep `find . -name Makefile.dep` + +# directories that might not exist: +dirs: + @mkdir -p -v obj + @mkdir -p -v lib + +docs: doc +doc: docs/index.html +docs/index.html: $(SRC_FILES) $(HEADER_FILES) $(EXAMPLES_CPP) docs/overview.dox docs/options/all_options.dox docs/params.dox + @echo Removing old documentation... + $(MAKE) cleanDoc + @echo Running dist/make-doc.sh to generate HTML API documentation... + dist/make-doc.sh dev ARIA_DIST_NO_NTP=1 + +arnetworking_swig: + $(MAKE) -C ArNetworking java python + +arnetworking_docs: + $(MAKE) -C ArNetworking docs + +help: + @echo To make most things, run \'make\' or \'make all\' + @echo Some useful targets include: + @echo " allLibs, cleanAllLibs, depAllLibs (do all subdirectories)" + @echo " clean" + @echo " dep" + @echo " cleanDep" + @echo " docs" + @echo " cleanAll (also cleans ArNetworking, java, python, etc.)" + @echo " examples" + @echo " tests" + @echo " utils" + @echo " python" + @echo " cleanPython" + @echo " java" + @echo " cleanJava" + @echo " examples/, where examples/.cpp is an example program source file." + @echo " tests/, where tests/.cpp is a test program source file." + @echo " allLibs (try to build all auxilliary libraries that you have installed by running make in each directory starting with \"Ar\")" + @echo " cleanAllLibs, depAllLibs (do make clean or make dep in the \"Ar*\" auxilliary libraries)" + @echo " install (if this is a source tar.gz package)" + +info: + @echo ARIA=$(ARIA) + @echo CXX=$(CXX) + @echo CXXFLAGS=$(CXXFLAGS) + @echo CXXINC=$(CXXINC) + @echo CXXLINK=$(CXXLINK) + @echo CXXSTATICLINK=$(CXXSTATICLINK) + @echo ALL_TARGETS=$(ALL_TARGETS) + @echo + @echo JAVAC=$(JAVAC) + @echo JAR=$(JAR) + @echo + @echo Use \'make moreinfo\' for info about individual files, etc. + +moreinfo: + @echo CFILES=$(CFILES) + @echo + @echo EXAMPLES=$(EXAMPLES) + @echo + @echo MOD_EXAMPLES=$(MOD_EXAMPLES) + @echo + @echo TESTS=$(TESTS) + @echo + @echo MOD_TESTS=$(MOD_TESTS) + @echo + @echo ADVANCED=$(ADVANCED) + @echo + @echo UTILS=$(UTILS) + @echo + @echo SRC_FILES=$(SRC_FILES) + @echo + @echo HEADER_FILES=$(HEADER_FILES) + + + +clean: cleanUtils cleanExamples cleanModules cleanTests cleanAdvanced + -rm -f lib/libAria.a lib/libAria.so $(OFILES) `find . -name core` `find . -name '*~'` obj/AriaPy.o obj/AriaJava.o + +cleanUtils: + -rm -f $(UTILS) + +cleanExamples: + -rm -f $(EXAMPLES) $(EXAMPLES_STATIC) + +cleanTests: + -rm -f $(TESTS) $(TESTS_STATIC) + +cleanAdvanced: + -rm -f $(ADVANCED) + +cleanModules: + -rm -f $(MOD_EXAMPLES) + +cleanDoc: + -rm docs/*.html docs/*.png docs/doxygen.css + +cleandoc: cleanDoc + +cleanPython: + -rm python/_AriaPy.so + -rm python/AriaPy.py + -rm python/AriaPy.pyc + -rm python/AriaPy_wrap.cpp + -rm python/AriaPy_wrap.h + -rm obj/AriaPy_wrap.o + +cleanpython: cleanPython + +dep: clean + if [ -f `echo src/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM src/*.cpp | \ + awk '$$1 ~ /:/{printf "obj/%s\n", $$0} $$1 !~ /:/' > Makefile.dep; fi + if [ -f `echo examples/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM examples/*.cpp | \ + awk '$$1 ~ /:/{printf "examples/%s$(binsuffix)\n", $$0} $$1 !~ /:/' | \ + sed 's/\.o//' >> Makefile.dep; fi + if [ -f `echo utils/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM utils/*.cpp | \ + awk '$$1 ~ /:/{printf "utils/%s$(binsuffix)\n", $$0} $$1 !~ /:/' | \ + sed 's/\.o//' >> Makefile.dep; fi + if [ -f `echo tests/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM tests/*.cpp | \ + awk '$$1 ~ /:/{printf "tests/%s$(binsuffix)\n", $$0} $$1 !~ /:/' | \ + sed 's/\.o//' >> Makefile.dep; fi + if [ -f `echo advanced/*.cpp | cut -d' ' -f1` ]; then \ + $(CXX) $(CXXFLAGS) $(CXXINC) -MM advanced/*.cpp | \ + awk '$$1 ~ /:/{printf "advanced/%s$(binsuffix)\n", $$0} $$1 !~ /:/' | \ + sed 's/\.o//' >> Makefile.dep; fi + +Makefile.dep: + $(MAKE) dep + +depAll: cleanDep + make dep; + for dir in `find . -maxdepth 1 -name "Ar*" -xtype d`; do cd $$dir; make dep; cd ..; done + +cleanAll: clean + rm -f lib/lib*.so* + for dir in `find . -maxdepth 1 -name "Ar*" -xtype d`; do cd $$dir; make clean; cd ..; done + $(MAKE) -C ArVideo cleanAll + $(MAKE) -C ArNetworking cleanAll + +fullCleanAll: cleanAll cleanJava cleanPython + rm -f lib/lib*.so* + rm -f obj/*.o* + for dir in `find . -maxdepth 1 -name "Ar*" -xtype d`; do cd $$dir; make fullClean; cd ..; done + + + +params: utils/makeParams$(binsuffix) + -mkdir params + utils/makeParams$(binsuffix) + +CommandLineOptions.txt.in docs/options/all_options.dox: utils/genCommandLineOptionDocs$(binsuffix) src/ArSimpleConnector.cpp src/ArGPSConnector.cpp src/ArTCM2.cpp + -mkdir docs/options + utils/genCommandLineOptionDocs$(binsuffix) + +alllibs: allLibs + +allLibs: all + find . -type d -and -name Ar\* -maxdepth 1 -exec $(MAKE) -C \{\} \; + +cleanAllLibs: clean cleanJava cleanPython cleanDep + for dir in `find . -maxdepth 1 -name "Ar*" -xtype d`; do $(MAKE) -C $$dir clean cleanAll; done + +cleanalllibs: cleanAllLibs + +checkAll: + $(MAKE) everything > checkAll.log 2>&1 + $(MAKE) allLibs >> checkAll.log 2>&1 + grep -n -v 'Error 1 (ignored)' checkAll.log | grep -C 4 'Error' > checkAll-Errors.log + @echo + @echo Errors were: + @echo + @cat checkAll-Errors.log + @echo + @echo Error log also saved as checkAll-Errors.log. Full log saved as checkAll.log. + +#### +#### Swig wrappers +#### + +ifndef SWIG +SWIG=swig +endif + +### Python wrapper: ### + + +ifdef PYTHON_INCLUDE +PYTHON_INCLUDE_FLAGS=-I$(PYTHON_INCLUDE) +else +ifdef DIST_INSTALL +$(warning WARNING using default value of /usr/include/python2.5 for PYTHON_INCLUDE directory. Set PYTHON_INCLUDE environment variable if you would like to use a different version of the Python C development library to build the Python ARIA wrapper.) +endif +PYTHON_INCLUDE:=/usr/include/python2.5 +PYTHON_INCLUDE_FLAGS=-I/usr/include/python2.5 +endif + +python: python/_AriaPy.so python/AriaPy.py + +py: python + +python-doc: python/AriaPy.html + +python/AriaPy.html: python/AriaPy.py + cd python; pydoc -w AriaPy + +python/AriaPy_wrap.cpp python/AriaPy.py: include/wrapper.i include/*.h + -rm -f `find python -maxdepth 1 -xtype f -name "*Aria*" | grep -v .ds | grep -v .sln | grep -v .vcproj` + cd python; $(SWIG) -Wall -c++ -python -modern -module AriaPy -Dlinux -DAREXPORT -o AriaPy_wrap.cpp -I../include ../include/wrapper.i + +python/_AriaPy.so: obj/AriaPy_wrap.o lib/libAria.so Makefile.dep + if ! test -f $(PYTHON_INCLUDE)/Python.h; then echo Error: $(PYTHON_INCLUDE)/Python.h not found. Is the Python development package installed on this system? Is PYTHON_INCLUDE set correctly?; exit 1; fi + $(CXX) -shared -o $(@) obj/AriaPy_wrap.o $(CXXLINK) + +obj/AriaPy_wrap.o: python/AriaPy_wrap.cpp + mkdir -p obj + @ if test -z "$(PYTHON_INCLUDE)"; then echo "*** Error: PYTHON_INCLUDE is not set, cannot build ARIA python wrapper"; fi + if ! test -f $(PYTHON_INCLUDE)/Python.h; then echo Error: $(PYTHON_INCLUDE)/Python.h not found. Is the Python development package installed on this system? Is PYTHON_INCLUDE set correctly?; exit 1; fi + $(CXX) -c $(BARECXXFLAGS) $(CXXINC) $(PYTHON_INCLUDE_FLAGS) $< -o $@ + + +### Java Wrapper: ### + + + +java: lib/libAriaJava.so java/Aria.jar + +java/Aria.jar: java/com/mobilerobots/Aria/ArRobot.class + cd java; $(JAR) cf Aria.jar com/mobilerobots/Aria/*.class + +cleanJava: + -rm -f `find java -xtype f -maxdepth 1 | grep -v .ds | grep -v .sln | grep -v .vcproj` + -rm lib/libAriaJava.so + -rm java/AriaJava_wrap.cpp + -rm java/AriaJava_wrap.h + -rm obj/AriaJava_wrap.o + +cleanjava: cleanJava + +cleanSwigJava: + -rm -r java/Aria.jar java/com/mobilerobots/Aria + +lib/libAriaJava.so: obj/AriaJava_wrap.o lib/libAria.so Makefile.dep + $(CXX) -shared -o $(@) obj/AriaJava_wrap.o $(CXXLINK) + +obj/AriaJava_wrap.o: java/AriaJava_wrap.cpp + @ if test -z "$(JAVA_INCLUDE)"; then echo "Error: JAVA_INCLUDE is not set, compiling AriaJava_wrap.cpp will fail!"; fi + @ test -n "$(JAVA_INCLUDE)" + @ if test \! -d "$(JAVA_INCLUDE)"; then echo "Error: JAVA_INCLUDE directory $(JAVA_INCLUDE) does not exist, compiling AriaJava_wrap.cpp will fail!"; fi + @ test -d "$(JAVA_INCLUDE)" + mkdir -p obj + $(CXX) -c $(BARECXXFLAGS) $(CXXINC) -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/linux $< -o $@ + +java/AriaJava_wrap.cpp java/com/mobilerobots/Aria/ArRobot.java: include/wrapper.i $(HEADER_FILES) + -mkdir -p java/com/mobilerobots/Aria; rm java/com/mobilerobots/Aria/*.java java/AriaJava_wrap.cpp java/AriaJava_wrap.h; $(SWIG) -Wall -c++ -java -package com.mobilerobots.Aria -outdir java/com/mobilerobots/Aria -module AriaJava -Dlinux -DAREXPORT -o java/AriaJava_wrap.cpp -Iinclude include/wrapper.i + +# The sed script is a hack to let subclasses outside of Aria work for ArFunctor; +# for some reason SWIG doesn't use my %typmeap(javabody) for ArFunctor. +# \ +# && sed 's/protected static long getCPtr/public ArFunctor() { this(0, false); } public static long getCPtr/' java/com/mobilerobots/Aria/ArFunctor.java > ArFunctor.java.tmp \ +# && mv ArFunctor.java.tmp java/com/mobilerobots/Aria/ArFunctor.java + +# It is much faster to compile them all at once. Use ArRobot.java/class as a +# stand-in for all java files and all class files. +java/com/mobilerobots/Aria/ArRobot.class: java/com/mobilerobots/Aria/ArRobot.java + rm java/com/mobilerobots/Aria/*.class; $(JAVAC) -classpath java java/com/mobilerobots/Aria/*.java + + +java/ArNetworking.jar: FORCE + $(MAKE) -C ArNetworking ../$@ + +lib/libArNetworkingJava.so: FORCE + $(MAKE) -C ArNetworking ../$@ + +python/ArNetworkingPy.py: FORCE + $(MAKE) -C ArNetworking ../$@ + +python/_ArNetworkingPy.so: FORCE + $(MAKE) -C ArNetworking ../$@ + + +#### +#### Targets to actually build binaries (libraries, programs) +#### + +lib/libAria.so: $(OFILES) Makefile.dep + $(CXX) -shared -o $(@) $(OFILES) + +lib/libAria.a: $(OFILES) Makefile.dep + ar -cr $(@) $(OFILES) + ranlib $(@) + +examples/%.so: examples/%.$(CFILEEXT) lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) -shared $< -o $@ + +examples/%$(binsuffix): examples/%.$(CFILEEXT) lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXLINK) + +examples/%Static$(binsuffix): examples/%.$(CFILEEXT) lib/libAria.a Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXSTATICLINK) + if test -n "$$NOSTRIP"; then strip $@; fi + +tests/%.so: tests/%.$(CFILEEXT) lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) -shared $< -o $@ + +tests/%$(binsuffix): tests/%.$(CFILEEXT) lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXLINK) + +tests/%Static$(binsuffix): tests/%.$(CFILEEXT) lib/libAria.a Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXSTATICLINK) + if test -n "$$NOSTRIP"; then strip $@; fi + +advanced/%.so: advanced/%.$(CFILEEXT) lib/libAria.so + $(CXX) $(CXXFLAGS) $(CXXINC) -shared $< -o $@ + +advanced/%$(binsuffix): advanced/%.$(CFILEEXT) lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXLINK) + +advanced/%Static$(binsuffix): advanced/%.$(CFILEEXT) lib/libAria.a Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXSTATICLINK) + #strip $@ + +utils/%$(binsuffix): utils/%.$(CFILEEXT) lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXLINK) + +utils/%Static$(binsuffix): utils/%.$(CFILEEXT) lib/libAria.a Makefile.dep + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $@ $(CXXSTATICLINK) + #strip $@ + +utils/genCommandLineOptionDocs$(binsuffix): utils/genCommandLineOptionDocs.cpp lib/libAria.so Makefile.dep + $(CXX) $(CXXFLAGS) -DFOR_ARIA $(CXXINC) $< -o $@ $(CXXLINK) + +ifneq ($(binsuffix),) +examples/%: examples/%$(binsuffix) +utils/%: utils/%$(binsuffix) +advanced/%: advanced/%$(binsuffix) +tests/%: tests/$(binsuffix) +endif + +obj/%.o : src/%.cpp Makefile.dep + @mkdir -p obj + $(CXX) -c $(CXXFLAGS) $(CXXINC) $< -o $@ + +obj/%.o : src/%.c Makefile.dep + @mjdir -p obj + $(CXX) -c $(CXXFLAGS) $(CXXINC) $< -o $@ + +include/%.i: include/%.h Makefile.dep + $(CXX) -E $(CXXFLAGS) $(CXXINC) $< -o $@ + +src/%.i: src/%.cpp Makefile.dep + $(CXX) -E $(CXXFLAGS) $(CXXINC) $< -o $@ + +# Don't build .o files if their library is up to date with respect to source files: +.INTERMEDIATE: $(OFILES) + +# But don't delete .o files if we do make them in order to make a library: +.PRECIOUS: $(OFILES) + + +# To build things in the ArNetworking subdirectory: + +lib/libArNetworking.so: FORCE + $(MAKE) -C ArNetworking ../$@ + +lib/libArNetworking.a: FORCE + $(MAKE) -C ArNetworking ../$@ + +ArNetworking/examples/%: ArNetworking/examples/%.cpp lib/libArNetworking.so + $(MAKE) -C ArNetworking examples/$* + +ArNetworking/examples/%Static: ArNetworking/examples/%.cpp lib/libArNetworking.a + $(MAKE) -C ArNetworking examples/$*Static + +#ArNetworking/docs/index.html: FORCE +# $(MAKE) -C ArNetworking docs/index.html + +ArNetworking/%: FORCE + $(MAKE) -C ArNetworking $* + +# This rule doesn't actually produce its target, so anything depending on it +# will always get remade. +FORCE: + + +#### +#### Installation and distribution +#### + + +ifndef INSTALL_DIR +INSTALL_DIR=/usr/local/Aria +endif + +ifndef SYSTEM_ETC_DIR +SYSTEM_ETC_DIR=/etc +endif + +# What to put in /etc/Aria: +ifndef STORED_INSTALL_DIR +STORED_INSTALL_DIR=$(INSTALL_DIR) +endif + +# How to run 'install' for the install rule: +ifndef INSTALL +INSTALL:=install --preserve-timestamps +endif + + +dist: FORCE + dist/dist.sh + +dist-install: install + +# Install rule. This can be used by users or ARIA developers; in the latter +# case it also installs various files needed to make a release distribution. +# Override installation locations with INSTALL_DIR environment variable. +# Things are installed group-writable so as to be hacked upon. +install: + @echo -------------------------------------- + @echo Installing ARIA in $(DESTDIR)$(INSTALL_DIR)... + @echo -------------------------------------- + $(INSTALL) -m 775 -d $(DESTDIR)$(INSTALL_DIR) + find include src tests utils params docs examples advanced maps \ + ArNetworking java javaExamples python pythonExamples obj \ + \( -name \*.o -or -name core -or -name CVS -or -name .\* -or -name \*~ -or -name tmp -or -name proprietary* -or -name \*.bak -or -name \*.class \) -prune \ + -or -type d -exec $(INSTALL) -d -m 777 $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ + -or -type l -exec cp --no-dereference \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ + -or -name \*.a -exec $(INSTALL) -D -m 666 \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ + -or -perm +1 -exec $(INSTALL) -D --strip -m 777 \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ + -or -exec $(INSTALL) -D -m 666 \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; + $(INSTALL) -D -m 664 LICENSE.txt INSTALL.txt README.txt Makefile Aria-Reference.html version.txt Changes.txt CommandLineOptions.txt icon.png $(DESTDIR)$(INSTALL_DIR)/ + $(INSTALL) -D -m 666 Makefile.dep doxygen.conf $(DESTDIR)$(INSTALL_DIR)/ + $(INSTALL) -D -m 664 bin/SIMULATOR_README.txt $(DESTDIR)$(INSTALL_DIR)/bin/SIMULATOR_README.txt + $(INSTALL) -d -m 777 $(DESTDIR)$(INSTALL_DIR)/lib/ + $(INSTALL) -D --strip -m 666 lib/libAria.so lib/libArNetworking.so lib/libAriaJava.so lib/libArNetworkingJava.so $(DESTDIR)$(INSTALL_DIR)/lib/ + @if test -z "$(DIST_INSTALL)"; then \ + echo "if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi" ;\ + if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi ;\ + echo "echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria" ;\ + echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria ;\ + echo ------------------------------------------------------------------------------------ ;\ + echo ARIA has been installed in $(DESTDIR)$(INSTALL_DIR). ;\ + echo ;\ + echo To be able to use the ARIA libraries, you must now add $(DESTDIR)$(INSTALL_DIR)/lib ;\ + echo to your LD_LIBRARY_PATH environment variable, or to the /etc/ld.so.conf system file, ;\ + echo then run \'ldconfig\';\ + echo ------------------------------------------------------------------------------------ ;\ + fi + +# echo ;\ +# echo The files are owned by the group \"users\", and all members of that group ;\ +# echo can enter the directory, read files, and modify the \"examples\" directory. ;\ + +### +### Make optimization, tell it what rules aren't files: +### +.PHONY: all everything examples modExamples tests advanced utils cleanDep docs doc dirs help info moreinfo clean cleanUtils cleanExamples cleanTests cleanAdvanced cleanModules cleanDoc cleanPython dep depAll cleanAll params allLibs python python-doc java cleanJava install alllibs arnetworking_swig arnetworking_docs params swig help info moreinfo py python-doc cleanSwigJava checkAll + +### Autogenerated dependencies: +# Just see if there is a Makefile.dep, if so include one... there +# should be one because various rules above depend on Makefile.dep. +# Note, use this ifeq/wildcard hacok rather than "-include" directive to +# prevent Make from trying to create Makefile.dep itself if missing during the +# recursive call to $(MAKE) dep. (it just keeps +# calling make dep recursively). +ifeq (Makefile.dep,$(wildcard Makefile.dep)) +include Makefile.dep +# End of the Makefile.dep check +endif + diff --git a/Legacy/Aria/Makefile.dep b/Legacy/Aria/Makefile.dep new file mode 100644 index 0000000..298fc0b --- /dev/null +++ b/Legacy/Aria/Makefile.dep @@ -0,0 +1,14508 @@ +obj/ArACTS.o: src/ArACTS.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArACTS.h include/ariaTypedefs.h include/ArTcpConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArSocket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h +obj/ArAMPTU.o: src/ArAMPTU.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArAMPTU.h include/ariaTypedefs.h include/ArBasePacket.h \ + include/ArPTZ.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArCommands.h include/ArPTZConnector.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ariaInternal.h include/ArStringInfoGroup.h include/ArCommands.h \ + include/ArLog.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h +obj/ArASyncTask.o: src/ArASyncTask.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArASyncTask.h include/ariaTypedefs.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArThread.h include/ArMutex.h include/ArLog.h \ + include/ArLog.h +obj/ArAction.o: src/ArAction.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArResolver.h include/ariaTypedefs.h include/ArActionDesired.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArAction.h include/ArArg.h \ + include/ArLog.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h +obj/ArActionAvoidFront.o: src/ArActionAvoidFront.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionAvoidFront.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArAction.h include/ArArg.h \ + include/ArActionDesired.h include/ArResolver.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArLog.h +obj/ArActionAvoidSide.o: src/ArActionAvoidSide.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionAvoidSide.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionBumpers.o: src/ArActionBumpers.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionBumpers.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionColorFollow.o: src/ArActionColorFollow.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionColorFollow.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArAction.h include/ArArg.h \ + include/ArActionDesired.h include/ArACTS.h include/ArTcpConnection.h \ + include/ArDeviceConnection.h include/ArBasePacket.h include/ArSocket.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArPTZ.h \ + include/ArCommands.h include/ArPTZConnector.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArResolver.h include/ArRobot.h +obj/ArActionConstantVelocity.o: src/ArActionConstantVelocity.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArActionConstantVelocity.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h +obj/ArActionDeceleratingLimiter.o: src/ArActionDeceleratingLimiter.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArActionDeceleratingLimiter.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArRobotConfigPacketReader.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h +obj/ArActionDesired.o: src/ArActionDesired.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionDesired.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +obj/ArActionDriveDistance.o: src/ArActionDriveDistance.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionDriveDistance.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArAction.h include/ArArg.h include/ArActionDesired.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionGoto.o: src/ArActionGoto.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionGoto.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArAction.h include/ArArg.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionGotoStraight.o: src/ArActionGotoStraight.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionGotoStraight.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArAction.h include/ArArg.h include/ArActionDesired.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionGroup.o: src/ArActionGroup.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionGroup.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArLog.h +obj/ArActionGroups.o: src/ArActionGroups.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionGroup.h include/ariaTypedefs.h \ + include/ArActionGroups.h include/ArActionGroup.h \ + include/ArActionColorFollow.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArAction.h include/ArArg.h include/ArActionDesired.h \ + include/ArACTS.h include/ArTcpConnection.h include/ArDeviceConnection.h \ + include/ArBasePacket.h include/ArSocket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArPTZ.h \ + include/ArCommands.h include/ArPTZConnector.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArActionLimiterTableSensor.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionInput.h include/ArActionStop.h \ + include/ArActionStallRecover.h include/ArActionBumpers.h \ + include/ArActionAvoidFront.h include/ArActionConstantVelocity.h \ + include/ArActionJoydrive.h include/ArJoyHandler.h \ + include/ArActionKeydrive.h include/ArActionDeceleratingLimiter.h \ + include/ArActionRatioInput.h include/ArRatioInputKeydrive.h \ + include/ArActionRatioInput.h include/ArRatioInputJoydrive.h \ + include/ArRatioInputRobotJoydrive.h +obj/ArActionIRs.o: src/ArActionIRs.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArActionIRs.h include/ariaTypedefs.h include/ArAction.h \ + include/ArArg.h include/ariaUtil.h include/ArLog.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArCommands.h +obj/ArActionInput.o: src/ArActionInput.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionInput.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionJoydrive.o: src/ArActionJoydrive.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionJoydrive.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArJoyHandler.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArActionKeydrive.o: src/ArActionKeydrive.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionKeydrive.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArKeyHandler.h +obj/ArActionLimiterBackwards.o: src/ArActionLimiterBackwards.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArActionLimiterBackwards.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionLimiterForwards.o: src/ArActionLimiterForwards.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArActionLimiterForwards.h \ + include/ariaTypedefs.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionLimiterRot.o: src/ArActionLimiterRot.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionLimiterRot.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArRobotConfigPacketReader.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h +obj/ArActionLimiterTableSensor.o: src/ArActionLimiterTableSensor.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArActionLimiterTableSensor.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionMovementParameters.o: src/ArActionMovementParameters.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArActionMovementParameters.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArMapObject.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionMovementParametersDebugging.o: \ + src/ArActionMovementParametersDebugging.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionMovementParametersDebugging.h \ + include/ariaTypedefs.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h \ + include/ArMapObject.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionRatioInput.o: src/ArActionRatioInput.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionRatioInput.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionRobotJoydrive.o: src/ArActionRobotJoydrive.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionRobotJoydrive.h \ + include/ariaTypedefs.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArCommands.h +obj/ArActionStallRecover.o: src/ArActionStallRecover.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRobot.h include/ariaTypedefs.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArResolver.h include/ArActionStallRecover.h include/ArAction.h \ + include/ArArg.h +obj/ArActionStop.o: src/ArActionStop.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionStop.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArActionTriangleDriveTo.o: src/ArActionTriangleDriveTo.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArActionTriangleDriveTo.h \ + include/ariaTypedefs.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h \ + include/ArLineFinder.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArActionTurn.o: src/ArActionTurn.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArActionTurn.h include/ariaTypedefs.h \ + include/ArAction.h include/ArArg.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h +obj/ArAnalogGyro.o: src/ArAnalogGyro.cpp include/ariaOSDef.h \ + include/ArCommands.h include/ArExport.h include/ArAnalogGyro.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArRobotConfigPacketReader.h +obj/ArArg.o: src/ArArg.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArArg.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLog.h include/ArArgumentBuilder.h +obj/ArArgumentBuilder.o: src/ArArgumentBuilder.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArArgumentBuilder.h include/ariaTypedefs.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h +obj/ArArgumentParser.o: src/ArArgumentParser.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArArgumentBuilder.h include/ariaTypedefs.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ariaUtil.h include/ArLog.h include/ArArgumentParser.h +obj/ArBasePacket.o: src/ArBasePacket.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArBasePacket.h include/ariaTypedefs.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h +obj/ArBatteryConnector.o: src/ArBatteryConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArBatteryConnector.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobotConnector.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArBatteryMTX.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArRobot.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArCommands.h \ + include/ArRobotConfigPacketReader.h +obj/ArBatteryMTX.o: src/ArBatteryMTX.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArBatteryMTX.h include/ariaTypedefs.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArRobotConnector.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ArTcpConnection.h \ + include/ArSocket.h include/ArSensorReading.h \ + include/ArSerialConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArBumpers.o: src/ArBumpers.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArRobot.h include/ariaTypedefs.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArBumpers.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h +obj/ArCameraCollection.o: src/ArCameraCollection.cpp include/ArExport.h \ + include/ariaUtil.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArCameraCollection.h include/ArConfigArg.h include/ariaUtil.h +obj/ArCameraCommands.o: src/ArCameraCommands.cpp include/ArExport.h \ + include/ariaUtil.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArCameraCommands.h include/ariaUtil.h +obj/ArCondition_LIN.o: src/ArCondition_LIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArCondition.h include/ArMutex.h \ + include/ariaTypedefs.h include/ArLog.h include/ArFunctor.h \ + include/ariaOSDef.h +obj/ArCondition_WIN.o: src/ArCondition_WIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArCondition.h include/ArMutex.h \ + include/ariaTypedefs.h include/ArLog.h include/ArFunctor.h \ + include/ariaOSDef.h +obj/ArConfig.o: src/ArConfig.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArConfig.h include/ArConfigArg.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArArgumentBuilder.h include/ArLog.h +obj/ArConfigArg.o: src/ArConfigArg.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArConfigArg.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLog.h include/ArArgumentBuilder.h \ + include/ArFileParser.h +obj/ArConfigGroup.o: src/ArConfigGroup.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArConfigGroup.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArArgumentBuilder.h include/ArLog.h +obj/ArDPPTU.o: src/ArDPPTU.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArDPPTU.h include/ariaTypedefs.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArPTZ.h include/ArCommands.h include/ArPTZConnector.h \ + include/ariaInternal.h include/ArStringInfoGroup.h include/ArCommands.h \ + include/ArBasePacket.h include/ariaInternal.h \ + include/ArDeviceConnection.h +obj/ArDataLogger.o: src/ArDataLogger.cpp include/ariaOSDef.h \ + include/ArExport.h include/ArRobot.h include/ariaTypedefs.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArConfig.h include/ArDataLogger.h \ + include/ArRobotBatteryPacketReader.h +obj/ArDeviceConnection.o: src/ArDeviceConnection.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArDeviceConnection.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h +obj/ArFileParser.o: src/ArFileParser.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArFileParser.h include/ariaTypedefs.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFunctor.h include/ariaOSDef.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArLog.h include/ariaUtil.h +obj/ArForbiddenRangeDevice.o: src/ArForbiddenRangeDevice.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArRobot.h \ + include/ariaTypedefs.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ariaUtil.h \ + include/ArForbiddenRangeDevice.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArDrawingData.h include/ArMapInterface.h \ + include/ArMapObject.h include/ArMapUtils.h +obj/ArFunctorASyncTask.o: src/ArFunctorASyncTask.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArFunctorASyncTask.h include/ariaTypedefs.h \ + include/ArASyncTask.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArThread.h include/ArMutex.h include/ArLog.h +obj/ArGPS.o: src/ArGPS.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArGPS.h include/ariaTypedefs.h include/ArFunctor.h \ + include/ariaOSDef.h include/ariaUtil.h include/ArLog.h include/ArMutex.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArNMEAParser.h include/ArDeviceConnection.h \ + include/ArBasePacket.h include/ArDeviceConnection.h \ + include/ArRobotPacket.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArCommands.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArGPSConnector.o: src/ArGPSConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArGPSConnector.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArGPS.h include/ArNMEAParser.h \ + include/ArDeviceConnection.h include/ArBasePacket.h include/ArGPS.h \ + include/ArDeviceConnection.h include/ArSerialConnection.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArNovatelGPS.h include/ArTrimbleGPS.h +obj/ArGPSCoords.o: src/ArGPSCoords.cpp include/ArExport.h include/ariaOSDef.h \ + include/ariaUtil.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArLog.h \ + include/ArGPSCoords.h +obj/ArGripper.o: src/ArGripper.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArGripper.h include/ariaTypedefs.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h +obj/ArIRs.o: src/ArIRs.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArRobot.h include/ariaTypedefs.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ariaUtil.h \ + include/ArIRs.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h +obj/ArInterpolation.o: src/ArInterpolation.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArInterpolation.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +obj/ArIrrfDevice.o: src/ArIrrfDevice.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArIrrfDevice.h include/ariaTypedefs.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArCommands.h +obj/ArJoyHandler.o: src/ArJoyHandler.cpp include/ariaOSDef.h \ + include/ArExport.h include/ArJoyHandler.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ariaUtil.h +obj/ArJoyHandler_LIN.o: src/ArJoyHandler_LIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArJoyHandler.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLog.h include/ariaUtil.h +obj/ArJoyHandler_WIN.o: src/ArJoyHandler_WIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArJoyHandler.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +obj/ArKeyHandler.o: src/ArKeyHandler.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArKeyHandler.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArLog.h \ + include/ArMutex.h include/ariaInternal.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h +obj/ArLCDConnector.o: src/ArLCDConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArLCDConnector.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobotConnector.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArLCDMTX.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArRobot.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArCommands.h \ + include/ArRobotConfigPacketReader.h +obj/ArLCDMTX.o: src/ArLCDMTX.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArLCDMTX.h include/ariaTypedefs.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArRobotConnector.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ArTcpConnection.h \ + include/ArSocket.h include/ArSensorReading.h \ + include/ArSerialConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSystemStatus.h +obj/ArLMS1XX.o: src/ArLMS1XX.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArLMS1XX.h include/ariaTypedefs.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArTransform.h include/ArSensorReading.h \ + include/ArDrawingData.h include/ArFunctorASyncTask.h \ + include/ArASyncTask.h include/ArThread.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArLMS2xx.o: src/ArLMS2xx.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArLMS2xx.h include/ariaTypedefs.h include/ArLMS2xxPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArLMS2xxPacketReceiver.h include/ArDeviceConnection.h \ + include/ArRobotPacket.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArTransform.h include/ArSensorReading.h \ + include/ArDrawingData.h include/ArFunctorASyncTask.h \ + include/ArASyncTask.h include/ArThread.h include/ArCondition.h \ + include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArLMS2xxPacket.o: src/ArLMS2xxPacket.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArLMS2xxPacket.h include/ariaTypedefs.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h +obj/ArLMS2xxPacketReceiver.o: src/ArLMS2xxPacketReceiver.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArLMS2xxPacketReceiver.h \ + include/ariaTypedefs.h include/ArDeviceConnection.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArLMS2xxPacket.h include/ArLog.h include/ariaUtil.h +obj/ArLaser.o: src/ArLaser.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArLaser.h include/ariaTypedefs.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArDeviceConnection.h +obj/ArLaserConnector.o: src/ArLaserConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArLaserConnector.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobotConnector.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSick.h include/ArLaser.h \ + include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArUrg.h \ + include/ArSimulatedLaser.h include/ArCommands.h \ + include/ArRobotConfigPacketReader.h +obj/ArLaserFilter.o: src/ArLaserFilter.cpp include/ArExport.h \ + include/ArLaserFilter.h include/ArLaser.h include/ariaTypedefs.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArConfig.h +obj/ArLaserLogger.o: src/ArLaserLogger.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArLaserLogger.h include/ariaUtil.h \ + include/ariaTypedefs.h include/ArLog.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArJoyHandler.h \ + include/ArRobotJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArLaserReflectorDevice.o: src/ArLaserReflectorDevice.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArSick.h \ + include/ariaTypedefs.h include/ArRobotPacket.h include/ArBasePacket.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArTransform.h include/ArSensorReading.h \ + include/ArDrawingData.h include/ArFunctorASyncTask.h \ + include/ArASyncTask.h include/ArThread.h include/ArCondition.h \ + include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArDeviceConnection.h \ + include/ArLaserReflectorDevice.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h +obj/ArLineFinder.o: src/ArLineFinder.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArLineFinder.h include/ariaTypedefs.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h +obj/ArLog.o: src/ArLog.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArLog.h include/ariaTypedefs.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h include/ariaInternal.h \ + include/ArConfig.h include/ArStringInfoGroup.h +obj/ArLogFileConnection.o: src/ArLogFileConnection.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArLogFileConnection.h \ + include/ArDeviceConnection.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h include/ArLog.h \ + include/ariaUtil.h +obj/ArMD5Calculator.o: src/ArMD5Calculator.cpp include/ArExport.h \ + include/ArMD5Calculator.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/md5.h include/ariaOSDef.h \ + include/ariaInternal.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ArLog.h +obj/ArMTXIO.o: src/ArMTXIO.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArMTXIO.h include/ariaTypedefs.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArMap.o: src/ArMap.cpp include/ArExport.h include/ariaOSDef.h \ + include/ariaInternal.h include/ArMutex.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ArMap.h include/ArMapComponents.h \ + include/ArMapInterface.h include/ArMapObject.h include/ArMapUtils.h \ + include/ArLog.h +obj/ArMapComponents.o: src/ArMapComponents.cpp include/ArExport.h \ + include/ArMapComponents.h include/ArMapInterface.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArMapObject.h include/ArMapUtils.h include/ArHasFileName.h \ + include/ArFileParser.h include/ArMapUtils.h include/ArMD5Calculator.h \ + include/md5.h +obj/ArMapInterface.o: src/ArMapInterface.cpp include/ArExport.h \ + include/ariaOSDef.h include/ariaInternal.h include/ArMutex.h \ + include/ariaTypedefs.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArConfig.h include/ArConfigArg.h include/ariaUtil.h \ + include/ArLog.h include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ArMapInterface.h \ + include/ArMapObject.h include/ArMapUtils.h +obj/ArMapObject.o: src/ArMapObject.cpp include/ArExport.h \ + include/ArMapObject.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +obj/ArMapUtils.o: src/ArMapUtils.cpp include/ArExport.h include/ArMapUtils.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ariaUtil.h include/ArBasePacket.h include/ArMapComponents.h \ + include/ArMapInterface.h include/ArMapObject.h include/ArMapUtils.h \ + include/ArHasFileName.h include/ArMD5Calculator.h include/md5.h +obj/ArMode.o: src/ArMode.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArMode.h include/ariaTypedefs.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArModes.o: src/ArModes.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArMode.h include/ariaTypedefs.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArModes.h include/ArMode.h \ + include/ArActionGroups.h include/ArActionGroup.h \ + include/ArActionColorFollow.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArAction.h include/ArArg.h include/ArActionDesired.h \ + include/ArACTS.h include/ArTcpConnection.h include/ArDeviceConnection.h \ + include/ArBasePacket.h include/ArSocket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArPTZ.h \ + include/ArCommands.h include/ArPTZConnector.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArGripper.h \ + include/ArSerialConnection.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArRobotConfigPacketReader.h \ + include/ArKeyHandler.h include/ArSonyPTZ.h include/ArVCC4.h \ + include/ArDPPTU.h include/ArAMPTU.h include/ArRVisionPTZ.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArAnalogGyro.h \ + include/ArRobotConfigPacketReader.h include/ariaInternal.h +obj/ArModule.o: src/ArModule.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArModule.h include/ariaTypedefs.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h +obj/ArModuleLoader.o: src/ArModuleLoader.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArModuleLoader.h include/ariaTypedefs.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArModule.h include/ArLog.h +obj/ArMutex.o: src/ArMutex.cpp include/ArExport.h include/ArMutex.h \ + include/ariaTypedefs.h include/ariaOSDef.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArThread.h +obj/ArMutex_LIN.o: src/ArMutex_LIN.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArMutex.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArThread.h include/ArLog.h include/ariaUtil.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ariaInternal.h include/ArConfig.h include/ArConfigArg.h \ + include/ariaUtil.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ArFunctor.h +obj/ArMutex_WIN.o: src/ArMutex_WIN.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArMutex.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArFunctor.h include/ArThread.h include/ArLog.h \ + include/ariaInternal.h include/ArConfig.h include/ArConfigArg.h \ + include/ariaUtil.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArStringInfoGroup.h +obj/ArNMEAParser.o: src/ArNMEAParser.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArNMEAParser.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArDeviceConnection.h \ + include/ArBasePacket.h +obj/ArNetServer.o: src/ArNetServer.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArNetServer.h include/ariaTypedefs.h include/ArSocket.h \ + include/ArMutex.h include/ariaUtil.h include/ArLog.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArLog.h \ + include/ariaUtil.h include/ArSyncTask.h include/ArArgumentBuilder.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArNovatelGPS.o: src/ArNovatelGPS.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArNovatelGPS.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArGPS.h include/ArNMEAParser.h \ + include/ArDeviceConnection.h include/ArBasePacket.h \ + include/ArDeviceConnection.h +obj/ArP2Arm.o: src/ArP2Arm.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArP2Arm.h include/ArRobot.h include/ariaTypedefs.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArPTZ.o: src/ArPTZ.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArPTZ.h include/ariaTypedefs.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArCommands.h include/ArPTZConnector.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArRobotPacket.h include/ArCommands.h \ + include/ArDeviceConnection.h +obj/ArPTZConnector.o: src/ArPTZConnector.cpp include/ArExport.h \ + include/ariaUtil.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ariaInternal.h include/ArConfig.h include/ArConfigArg.h \ + include/ariaUtil.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ArLog.h include/ArFunctor.h \ + include/ArPTZ.h include/ArCommands.h include/ArPTZConnector.h \ + include/ArRobotParams.h include/ariaInternal.h include/ArPTZConnector.h \ + include/ArConfig.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArRobotParams.h +obj/ArPriorityResolver.o: src/ArPriorityResolver.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArPriorityResolver.h include/ArResolver.h \ + include/ariaTypedefs.h include/ArActionDesired.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArAction.h include/ArArg.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArInterpolation.h include/ArKeyHandler.h +obj/ArRVisionPTZ.o: src/ArRVisionPTZ.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRVisionPTZ.h include/ariaTypedefs.h \ + include/ArBasePacket.h include/ArPTZ.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArCommands.h include/ArPTZConnector.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h +obj/ArRangeBuffer.o: src/ArRangeBuffer.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ariaTypedefs.h include/ArLog.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h include/ArLog.h +obj/ArRangeDevice.o: src/ArRangeDevice.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRangeDevice.h include/ariaTypedefs.h \ + include/ArRangeBuffer.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h +obj/ArRangeDeviceThreaded.o: src/ArRangeDeviceThreaded.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRangeDeviceThreaded.h \ + include/ariaTypedefs.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h +obj/ArRatioInputJoydrive.o: src/ArRatioInputJoydrive.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRatioInputJoydrive.h \ + include/ariaTypedefs.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h \ + include/ArActionRatioInput.h include/ArJoyHandler.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArRatioInputKeydrive.o: src/ArRatioInputKeydrive.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRatioInputKeydrive.h \ + include/ariaTypedefs.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h \ + include/ArActionRatioInput.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArKeyHandler.h +obj/ArRatioInputRobotJoydrive.o: src/ArRatioInputRobotJoydrive.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArRatioInputRobotJoydrive.h include/ariaTypedefs.h \ + include/ArActionRatioInput.h include/ArAction.h include/ArArg.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArActionDesired.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArRobotJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h include/ArCommands.h +obj/ArRecurrentTask.o: src/ArRecurrentTask.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArASyncTask.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArThread.h \ + include/ArMutex.h include/ArLog.h include/ArLog.h \ + include/ArRecurrentTask.h include/ArASyncTask.h +obj/ArRobot.o: src/ArRobot.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArRobot.h include/ariaTypedefs.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArLog.h \ + include/ArDeviceConnection.h include/ArTcpConnection.h \ + include/ArDeviceConnection.h include/ArSocket.h \ + include/ArSerialConnection.h include/ArLogFileConnection.h \ + include/ariaUtil.h include/ArSocket.h include/ArCommands.h \ + include/ArRobotTypes.h include/ArSignalHandler.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArRobotConfigPacketReader.h include/ArRobotBatteryPacketReader.h \ + include/ariaInternal.h include/ArStringInfoGroup.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArFunctorASyncTask.h include/ArBatteryMTX.h include/ArRobot.h \ + include/ArRobotConnector.h include/ArSerialConnection.h \ + include/ArTcpConnection.h include/ArSonarMTX.h include/ArLCDMTX.h +obj/ArRobotBatteryPacketReader.o: src/ArRobotBatteryPacketReader.cpp \ + include/ariaOSDef.h include/ArExport.h \ + include/ArRobotBatteryPacketReader.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArRobotPacket.h \ + include/ArCommands.h +obj/ArRobotConfig.o: src/ArRobotConfig.cpp include/ariaOSDef.h \ + include/ArExport.h include/ArConfig.h include/ArConfigArg.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArRobotConfig.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArAnalogGyro.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArRobotConfigPacketReader.o: src/ArRobotConfigPacketReader.cpp \ + include/ariaOSDef.h include/ArExport.h \ + include/ArRobotConfigPacketReader.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArRobotPacket.h include/ArCommands.h +obj/ArRobotConnector.o: src/ArRobotConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRobotConnector.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArRobotJoyHandler.o: src/ArRobotJoyHandler.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRobotJoyHandler.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h include/ArCommands.h +obj/ArRobotPacket.o: src/ArRobotPacket.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRobotPacket.h include/ariaTypedefs.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h +obj/ArRobotPacketReaderThread.o: src/ArRobotPacketReaderThread.cpp \ + include/ArExport.h include/ariaOSDef.h \ + include/ArRobotPacketReaderThread.h include/ariaTypedefs.h \ + include/ArASyncTask.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArThread.h include/ArMutex.h include/ArLog.h include/ArLog.h \ + include/ariaUtil.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h +obj/ArRobotPacketReceiver.o: src/ArRobotPacketReceiver.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArDeviceConnection.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArRobotPacketReceiver.h include/ArRobotPacket.h \ + include/ArLogFileConnection.h include/ArDeviceConnection.h \ + include/ArLog.h include/ariaUtil.h +obj/ArRobotPacketSender.o: src/ArRobotPacketSender.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArDeviceConnection.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h +obj/ArRobotParams.o: src/ArRobotParams.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRobotParams.h include/ariaTypedefs.h \ + include/ArConfig.h include/ArConfigArg.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArFileParser.h \ + include/ArHasFileName.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArRobotTypes.o: src/ArRobotTypes.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArRobotTypes.h include/ariaUtil.h \ + include/ariaTypedefs.h include/ArLog.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArLog.h +obj/ArS3Series.o: src/ArS3Series.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArS3Series.h include/ariaTypedefs.h include/ariaOSDef.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArTransform.h include/ArSensorReading.h \ + include/ArDrawingData.h include/ArFunctorASyncTask.h \ + include/ArASyncTask.h include/ArThread.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArSZSeries.o: src/ArSZSeries.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArSZSeries.h include/ariaTypedefs.h include/ariaOSDef.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArTransform.h include/ArSensorReading.h \ + include/ArDrawingData.h include/ArFunctorASyncTask.h \ + include/ArASyncTask.h include/ArThread.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/ArSensorReading.o: src/ArSensorReading.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSensorReading.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h include/ariaUtil.h +obj/ArSerialConnection_LIN.o: src/ArSerialConnection_LIN.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArSerialConnection.h \ + include/ariaTypedefs.h include/ArDeviceConnection.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h include/ArLog.h \ + include/ariaUtil.h +obj/ArSerialConnection_WIN.o: src/ArSerialConnection_WIN.cpp \ + include/ArExport.h include/ariaOSDef.h include/ArSerialConnection.h \ + include/ariaTypedefs.h include/ArDeviceConnection.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h include/ArLog.h \ + include/ariaUtil.h +obj/ArSick.o: src/ArSick.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArSick.h include/ariaTypedefs.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ArTransform.h include/ArSensorReading.h \ + include/ArDrawingData.h include/ArFunctorASyncTask.h \ + include/ArASyncTask.h include/ArThread.h include/ArCondition.h \ + include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArDeviceConnection.h \ + include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArSignalHandler_LIN.o: src/ArSignalHandler_LIN.cpp include/ArExport.h \ + include/ArSignalHandler.h include/ariaTypedefs.h include/ArASyncTask.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArThread.h \ + include/ArMutex.h include/ArLog.h include/ArLog.h include/ariaInternal.h \ + include/ArConfig.h include/ArConfigArg.h include/ariaUtil.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h +obj/ArSignalHandler_WIN.o: src/ArSignalHandler_WIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSignalHandler.h include/ariaTypedefs.h \ + include/ArASyncTask.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArThread.h include/ArMutex.h include/ArLog.h include/ArLog.h +obj/ArSimpleConnector.o: src/ArSimpleConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSimpleConnector.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArSick.h include/ArLaser.h \ + include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArSimulatedLaser.o: src/ArSimulatedLaser.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSimulatedLaser.h include/ariaTypedefs.h \ + include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h +obj/ArSocket.o: src/ArSocket.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArSocket.h include/ariaTypedefs.h include/ArMutex.h \ + include/ariaUtil.h include/ArLog.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLog.h +obj/ArSocket_LIN.o: src/ArSocket_LIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSocket.h include/ariaTypedefs.h \ + include/ArMutex.h include/ariaUtil.h include/ArLog.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLog.h include/ArFunctor.h +obj/ArSocket_WIN.o: src/ArSocket_WIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSocket.h include/ariaTypedefs.h \ + include/ArMutex.h include/ariaUtil.h include/ArLog.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArLog.h include/ArFunctor.h +obj/ArSonarAutoDisabler.o: src/ArSonarAutoDisabler.cpp include/ariaOSDef.h \ + include/ArCommands.h include/ArExport.h include/ArSonarAutoDisabler.h \ + include/ariaTypedefs.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h +obj/ArSonarConnector.o: src/ArSonarConnector.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSonarConnector.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArRobotConnector.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSonarMTX.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArRobot.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArCommands.h \ + include/ArRobotConfigPacketReader.h +obj/ArSonarDevice.o: src/ArSonarDevice.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArSonarDevice.h include/ariaTypedefs.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSensorReading.h include/ArRobot.h +obj/ArSonarMTX.o: src/ArSonarMTX.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArSonarMTX.h include/ariaTypedefs.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSensorReading.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArSonyPTZ.o: src/ArSonyPTZ.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArSonyPTZ.h include/ariaTypedefs.h include/ArBasePacket.h \ + include/ArPTZ.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArCommands.h include/ArPTZConnector.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ariaInternal.h include/ArStringInfoGroup.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h +obj/ArSoundPlayer.o: src/ArSoundPlayer.cpp include/ArExport.h \ + include/ArSoundPlayer.h include/ArFunctor.h include/ariaTypedefs.h \ + include/ariaOSDef.h include/ArLog.h include/ArMutex.h include/ariaUtil.h \ + include/ArLog.h include/ArArgumentParser.h include/ArArgumentBuilder.h +obj/ArSoundsQueue.o: src/ArSoundsQueue.cpp include/ArExport.h include/ArLog.h \ + include/ariaTypedefs.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArSoundsQueue.h include/ArASyncTask.h include/ArThread.h \ + include/ArCondition.h include/ArSpeech.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArSoundPlayer.h +obj/ArSpeech.o: src/ArSpeech.cpp include/ArExport.h include/ArSpeech.h \ + include/ariaTypedefs.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArConfig.h include/ArConfigArg.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArConfig.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArStringInfoGroup.o: src/ArStringInfoGroup.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArStringInfoGroup.h include/ariaUtil.h \ + include/ariaTypedefs.h include/ArLog.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +obj/ArSyncLoop.o: src/ArSyncLoop.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArSyncLoop.h include/ariaTypedefs.h include/ArASyncTask.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArThread.h \ + include/ArMutex.h include/ArLog.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArLog.h include/ariaUtil.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h \ + include/ArRobotPacketReceiver.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h +obj/ArSyncTask.o: src/ArSyncTask.cpp include/ArExport.h include/ariaOSDef.h \ + include/ariaUtil.h include/ariaTypedefs.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArLog.h +obj/ArSystemStatus.o: src/ArSystemStatus.cpp include/ArExport.h \ + include/ariaInternal.h include/ArMutex.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ariaOSDef.h include/ariaUtil.h \ + include/ArSystemStatus.h include/ArASyncTask.h include/ArThread.h +obj/ArTCM2.o: src/ArTCM2.cpp include/ArExport.h include/ariaOSDef.h \ + include/ariaInternal.h include/ArMutex.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ariaUtil.h include/ArTCM2.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArTCMCompassDirect.h \ + include/ArDeviceConnection.h include/ArTCM2.h include/ArNMEAParser.h \ + include/ArTCMCompassRobot.h include/ArCommands.h +obj/ArTCMCompassDirect.o: src/ArTCMCompassDirect.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArTCMCompassDirect.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArDeviceConnection.h \ + include/ArBasePacket.h include/ArTCM2.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArNMEAParser.h include/ArDeviceConnection.h \ + include/ArSerialConnection.h include/ariaUtil.h +obj/ArTCMCompassRobot.o: src/ArTCMCompassRobot.cpp include/ariaOSDef.h \ + include/ArExport.h include/ArCommands.h include/ArRobot.h \ + include/ariaTypedefs.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArBasePacket.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArTCMCompassRobot.h include/ArCommands.h include/ArRobot.h \ + include/ArTCM2.h +obj/ArTcpConnection.o: src/ArTcpConnection.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArTcpConnection.h \ + include/ArDeviceConnection.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h include/ArSocket.h \ + include/ArLog.h include/ariaUtil.h +obj/ArThread.o: src/ArThread.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArThread.h include/ariaTypedefs.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArLog.h include/ArLog.h +obj/ArThread_LIN.o: src/ArThread_LIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArThread.h include/ariaTypedefs.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArLog.h include/ArLog.h include/ArSignalHandler.h \ + include/ArASyncTask.h include/ArThread.h +obj/ArThread_WIN.o: src/ArThread_WIN.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArThread.h include/ariaTypedefs.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArLog.h include/ArLog.h include/ArSignalHandler.h \ + include/ArASyncTask.h include/ArThread.h include/ariaUtil.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h +obj/ArTransform.o: src/ArTransform.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArTransform.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +obj/ArTrimbleGPS.o: src/ArTrimbleGPS.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArTrimbleGPS.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArGPS.h include/ArNMEAParser.h \ + include/ArDeviceConnection.h include/ArBasePacket.h \ + include/ArDeviceConnection.h +obj/ArUrg.o: src/ArUrg.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArUrg.h include/ariaTypedefs.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h \ + include/ArDeviceConnection.h include/ArBasePacket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArUrg_2_0.o: src/ArUrg_2_0.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArUrg_2_0.h include/ariaTypedefs.h include/ArLaser.h \ + include/ArRangeDeviceThreaded.h include/ArRangeDevice.h \ + include/ArRangeBuffer.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArTransform.h include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h \ + include/ArDeviceConnection.h include/ArBasePacket.h include/ArRobot.h \ + include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArConfig.h include/ArConfigArg.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArActionDesired.h include/ArResolver.h \ + include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArSerialConnection.h include/ariaInternal.h \ + include/ArStringInfoGroup.h +obj/ArVCC4.o: src/ArVCC4.cpp include/ArExport.h include/ariaOSDef.h \ + include/ArVCC4.h include/ariaTypedefs.h include/ArBasePacket.h \ + include/ArPTZ.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArCommands.h include/ArPTZConnector.h include/ariaUtil.h \ + include/ArLog.h include/ArMutex.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ArCommands.h include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacket.h include/ArRobotPacketReceiver.h \ + include/ArSyncTask.h include/ArTaskState.h include/ArSensorReading.h \ + include/ArTransform.h include/ArCondition.h include/ArSyncLoop.h \ + include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h +obj/ArVersalogicIO.o: src/ArVersalogicIO.cpp include/ArExport.h \ + include/ariaOSDef.h include/ArVersalogicIO.h include/ariaTypedefs.h \ + include/ArRobot.h include/ArRobotPacketSender.h include/ArRobotPacket.h \ + include/ArBasePacket.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ariaOSDef.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h +obj/Aria.o: src/Aria.cpp include/ArExport.h include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArSocket.h \ + include/ArSignalHandler.h include/ArKeyHandler.h include/ArJoyHandler.h \ + include/ArModuleLoader.h include/ArRobotJoyHandler.h \ + include/ArSystemStatus.h include/ArPTZConnector.h include/ArRVisionPTZ.h \ + include/ArVCC4.h include/ArDPPTU.h include/ArSonyPTZ.h +obj/ariaUtil.o: src/ariaUtil.cpp include/ArExport.h include/ariaOSDef.h \ + include/ariaInternal.h include/ArMutex.h include/ariaTypedefs.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArConfig.h \ + include/ArConfigArg.h include/ariaUtil.h include/ArLog.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArFileParser.h include/ArHasFileName.h \ + include/ArStringInfoGroup.h include/ariaTypedefs.h include/ariaUtil.h \ + include/ArSick.h include/ArRobotPacket.h include/ArBasePacket.h \ + include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArTransform.h \ + include/ArSensorReading.h include/ArDrawingData.h \ + include/ArFunctorASyncTask.h include/ArASyncTask.h include/ArThread.h \ + include/ArCondition.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArDeviceConnection.h \ + include/ArUrg.h include/ArLMS1XX.h include/ArS3Series.h \ + include/ArUrg_2_0.h include/ArSZSeries.h include/ArSonarMTX.h \ + include/ArRobot.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSyncLoop.h \ + include/ArRobotPacketReaderThread.h include/ArRobotParams.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArBatteryMTX.h include/ArRobotConnector.h \ + include/ArSerialConnection.h include/ArTcpConnection.h \ + include/ArSocket.h include/ArLCDMTX.h include/ArSerialConnection.h \ + include/ArTcpConnection.h +obj/md5.o: src/md5.cpp include/ArExport.h include/md5.h +obj/proprietaryArGnuplot.o: src/proprietaryArGnuplot.cpp \ + include/proprietaryArGnuplot.h include/ariaUtil.h include/ariaTypedefs.h \ + include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArExport.h include/ariaOSDef.h +examples/actionExample: examples/actionExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/actionGroupExample: examples/actionGroupExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/actsColorFollowingExample: examples/actsColorFollowingExample.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/armExample: examples/armExample.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/auxSerialExample: examples/auxSerialExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/cameraPTZExample: examples/cameraPTZExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/configExample: examples/configExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/demo: examples/demo.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/directMotionExample: examples/directMotionExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/dpptuExample: examples/dpptuExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/functorExample: examples/functorExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/gotoActionExample: examples/gotoActionExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/gpsExample: examples/gpsExample.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArGPS.h \ + include/ArGPSConnector.h include/ArTrimbleGPS.h \ + include/ArTCMCompassDirect.h +examples/gpsRobotTaskExample: examples/gpsRobotTaskExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArGPS.h \ + include/ArGPSConnector.h +examples/gripperExample: examples/gripperExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/gyroExample: examples/gyroExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArAnalogGyro.h +examples/imuExample: examples/imuExample.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/ipthru: examples/ipthru.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/joydriveActionExample: examples/joydriveActionExample.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/joydriveThreaded: examples/joydriveThreaded.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/joydriveUserTask: examples/joydriveUserTask.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/laserConnect: examples/laserConnect.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/lasers: examples/lasers.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/lineFinderExample: examples/lineFinderExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/moduleExample: examples/moduleExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/moduleExample_Mod: examples/moduleExample_Mod.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/mtxWheelLights: examples/mtxWheelLights.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/netServerExample: examples/netServerExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryCoreIOTest: examples/proprietaryCoreIOTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryCoreTempTesting: examples/proprietaryCoreTempTesting.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryDataLogger: examples/proprietaryDataLogger.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryDataLoggerWander: examples/proprietaryDataLoggerWander.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryForwarder: examples/proprietaryForwarder.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryFostTest: examples/proprietaryFostTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryLaserPlans: examples/proprietaryLaserPlans.cpp \ + examples/proprietaryLaserPlans.h include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryMinkingB01Demo: examples/proprietaryMinkingB01Demo.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryPatrolBotButtonTest: \ + examples/proprietaryPatrolBotButtonTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryPatrolBotIOTest: examples/proprietaryPatrolBotIOTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryPlansTest: examples/proprietaryPlansTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryPolarZPAN200Test: examples/proprietaryPolarZPAN200Test.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryRMTServoTest: examples/proprietaryRMTServoTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryRobotLooker: examples/proprietaryRobotLooker.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/proprietaryWheelDemo: examples/proprietaryWheelDemo.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/robotConnectionCallbacks: examples/robotConnectionCallbacks.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/robotSyncTaskExample: examples/robotSyncTaskExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/seekurPower: examples/seekurPower.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/sickLogger: examples/sickLogger.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/sickRobotExample: examples/sickRobotExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/sickTeleop: examples/sickTeleop.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/simpleConnect: examples/simpleConnect.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/simpleMotionCommands: examples/simpleMotionCommands.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/socketClientExample: examples/socketClientExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/socketServerExample: examples/socketServerExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/soundsQueueExample: examples/soundsQueueExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArSoundsQueue.h include/ArSoundPlayer.h +examples/teleopActionsExample: examples/teleopActionsExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/threadExample: examples/threadExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/triangleDriveToActionExample: examples/triangleDriveToActionExample.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/twoRobotWander: examples/twoRobotWander.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/wander: examples/wander.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +examples/wanderAndLogData: examples/wanderAndLogData.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +utils/addSfWorldLinesToArMap: utils/addSfWorldLinesToArMap.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +utils/convertSfWorldToArMap: utils/convertSfWorldToArMap.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +utils/genCommandLineOptionDocs: utils/genCommandLineOptionDocs.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +utils/makeParams: utils/makeParams.cpp include/ariaOSDef.h include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArRobotTypes.h +tests/ArTestConfig: tests/ArTestConfig.cpp tests/ArTestConfig.h \ + include/ArConfig.h include/ArConfigArg.h include/ariaTypedefs.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArFileParser.h \ + include/ArHasFileName.h include/ArConfigArg.h +tests/absoluteHeadingActionTest: tests/absoluteHeadingActionTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/accDecelMaxTest: tests/accDecelMaxTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/actionArgumentTest: tests/actionArgumentTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/actionAverageTest: tests/actionAverageTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/actionManagementTest: tests/actionManagementTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/actsTest: tests/actsTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/angleBetweenTest: tests/angleBetweenTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/angleFixTest: tests/angleFixTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/angleTest: tests/angleTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/asyncConnectTest: tests/asyncConnectTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/auxSerialTest: tests/auxSerialTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/batteryTest: tests/batteryTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/callbackTest: tests/callbackTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/chargeTest: tests/chargeTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/compassDirect: tests/compassDirect.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArTCMCompassDirect.h +tests/compassDirectCalib: tests/compassDirectCalib.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArKeyHandler.h \ + include/ArTCMCompassDirect.h +tests/configSectionTest: tests/configSectionTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/configTest: tests/configTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/connectTest: tests/connectTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/connectionTest: tests/connectionTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/dcdTest: tests/dcdTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/deleteArgs: tests/deleteArgs.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/driveFast: tests/driveFast.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/driveHardDirect: tests/driveHardDirect.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/encoderCorrectionTest: tests/encoderCorrectionTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/encoderTest: tests/encoderTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/fileParserTest: tests/fileParserTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/functorTest: tests/functorTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/gotoTest: tests/gotoTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/gpsCoordsTest: tests/gpsCoordsTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArGPSCoords.h +tests/gpsInternals: tests/gpsInternals.cpp include/ArGPS.h \ + include/ariaTypedefs.h include/ArFunctor.h include/ariaOSDef.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArNMEAParser.h include/ArDeviceConnection.h \ + include/ArBasePacket.h +tests/gripperStateFlagsTest: tests/gripperStateFlagsTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/gyroDrive: tests/gyroDrive.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/hardDriveWander: tests/hardDriveWander.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/interpolationTest: tests/interpolationTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/ioTest: tests/ioTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/joytest: tests/joytest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/keyHandlerTest: tests/keyHandlerTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/keys: tests/keys.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/lineTest: tests/lineTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ariaUtil.h +tests/lms2xxTest: tests/lms2xxTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/logRobotJoystick: tests/logRobotJoystick.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/logSIPData: tests/logSIPData.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/logSIPs: tests/logSIPs.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/mapTest: tests/mapTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/mathTests: tests/mathTests.cpp include/ariaUtil.h \ + include/ariaTypedefs.h include/ArLog.h include/ArMutex.h \ + include/ArFunctor.h include/ariaOSDef.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h +tests/moduleActionExample: tests/moduleActionExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/moduleActionExample2_Mod: tests/moduleActionExample2_Mod.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/moduleActionExample_Mod: tests/moduleActionExample_Mod.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/moveCommandTest: tests/moveCommandTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/moveRobotInSim: tests/moveRobotInSim.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/moveRobotTest: tests/moveRobotTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/mutexLockWarning: tests/mutexLockWarning.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/nmeaParser: tests/nmeaParser.cpp include/ArNMEAParser.h \ + include/ariaTypedefs.h include/ArFunctor.h include/ariaOSDef.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArDeviceConnection.h include/ArBasePacket.h +tests/optoIOtest: tests/optoIOtest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/p2osSlamTest: tests/p2osSlamTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/poseTest: tests/poseTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryCommand: tests/proprietaryCommand.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryConfigLeakTest: tests/proprietaryConfigLeakTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryGenericIOpowerTest: tests/proprietaryGenericIOpowerTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryGnuplotTest: tests/proprietaryGnuplotTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/proprietaryArGnuplot.h +tests/proprietaryH8Test: tests/proprietaryH8Test.cpp \ + tests/proprietaryH8Test.h include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArFunctor.h +tests/proprietaryLCDWrite: tests/proprietaryLCDWrite.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryLCDtest: tests/proprietaryLCDtest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryMappingTest: tests/proprietaryMappingTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryPDBTest: tests/proprietaryPDBTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/proprietaryArGnuplot.h +tests/proprietaryPowerBoardTest: tests/proprietaryPowerBoardTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryPowerDockMonitor: tests/proprietaryPowerDockMonitor.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietarySaftTestAllCommands: \ + tests/proprietarySaftTestAllCommands.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietarySeekurPDBPowerCycle: \ + tests/proprietarySeekurPDBPowerCycle.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryShowLeftRight: tests/proprietaryShowLeftRight.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArSoundPlayer.h +tests/proprietarySoundPlayerWithMuchMalloc: \ + tests/proprietarySoundPlayerWithMuchMalloc.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArSoundPlayer.h +tests/proprietarySpARCSburnin: tests/proprietarySpARCSburnin.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietarySpARCSburninViauARCS: \ + tests/proprietarySpARCSburninViauARCS.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietarySpARCStest: tests/proprietarySpARCStest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietarySpARCSviauARCStest: tests/proprietarySpARCSviauARCStest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryTestGenerator: tests/proprietaryTestGenerator.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/proprietaryTonyBox: tests/proprietaryTonyBox.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/ptzTest: tests/ptzTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/robotConfigPacketReaderTest: tests/robotConfigPacketReaderTest.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/robotListTest: tests/robotListTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/robotPacketHandlerTest: tests/robotPacketHandlerTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/rotVelActionExample: tests/rotVelActionExample.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/runtimeTest: tests/runtimeTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/samePriorityActionTest: tests/samePriorityActionTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/serialDump: tests/serialDump.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/serialTest: tests/serialTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/serialTest2: tests/serialTest2.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/showFirmwareParameters: tests/showFirmwareParameters.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sickMiddleTest: tests/sickMiddleTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sickQuadrantReadings: tests/sickQuadrantReadings.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sickSafeAutoLogger: tests/sickSafeAutoLogger.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sickSimpleTest: tests/sickSimpleTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sickTest: tests/sickTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sickTestAll: tests/sickTestAll.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/signalTest: tests/signalTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sonarAutoDisablerTest: tests/sonarAutoDisablerTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sonarDeviceTest: tests/sonarDeviceTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sonarMonitor: tests/sonarMonitor.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sonarQuadrantReadings: tests/sonarQuadrantReadings.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/sonarTest: tests/sonarTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/soundPlayer: tests/soundPlayer.cpp include/ArSoundPlayer.h \ + include/ArFunctor.h include/ariaTypedefs.h include/ariaOSDef.h +tests/stallTest: tests/stallTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/stressTest: tests/stressTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/stripQuoteTest: tests/stripQuoteTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/systemCallTest: tests/systemCallTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/systemStatusBasic: tests/systemStatusBasic.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArSystemStatus.h +tests/systemStatusThread: tests/systemStatusThread.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h include/ArSystemStatus.h +tests/tcm2Test: tests/tcm2Test.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/tcpConnectionTest: tests/tcpConnectionTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/testAbsoluteMaxesCommand: tests/testAbsoluteMaxesCommand.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/testCOM: tests/testCOM.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/testMobileSim: tests/testMobileSim.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/threadTest: tests/threadTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/timePrinter: tests/timePrinter.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/timeTest: tests/timeTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/timingTest: tests/timingTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/transformTest: tests/transformTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/triangleAccuracyTest: tests/triangleAccuracyTest.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/usertasktest: tests/usertasktest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/vcc4Test: tests/vcc4Test.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/velTest: tests/velTest.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +tests/wanderAndLogBumps: tests/wanderAndLogBumps.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/actsDemo: advanced/actsDemo.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/actsDemoSimple: advanced/actsDemoSimple.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/amptuDemo: advanced/amptuDemo.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/condition: advanced/condition.cpp include/Aria.h include/ariaOSDef.h \ + include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/functorListsAndStdAlgorithms: advanced/functorListsAndStdAlgorithms.cpp \ + include/Aria.h include/ariaOSDef.h include/ariaTypedefs.h \ + include/ArSerialConnection.h include/ArDeviceConnection.h \ + include/ariaUtil.h include/ArLog.h include/ArMutex.h include/ArFunctor.h \ + include/ArArgumentParser.h include/ArArgumentBuilder.h \ + include/ArBasePacket.h include/ArTcpConnection.h include/ArSocket.h \ + include/ArSimpleConnector.h include/ArRobotConnector.h \ + include/ArLaserConnector.h include/ArLogFileConnection.h \ + include/ArRobotPacket.h include/ArRobotPacketSender.h \ + include/ArRobotPacketReceiver.h include/ArRobotConfigPacketReader.h \ + include/ArRobotTypes.h include/ArRobotParams.h include/ArConfig.h \ + include/ArConfigArg.h include/ArFileParser.h include/ArHasFileName.h \ + include/ArConfigGroup.h include/ArRobot.h include/ArSyncTask.h \ + include/ArTaskState.h include/ArSensorReading.h include/ArTransform.h \ + include/ArCondition.h include/ArSyncLoop.h include/ArASyncTask.h \ + include/ArThread.h include/ArRobotPacketReaderThread.h \ + include/ArActionDesired.h include/ArResolver.h include/ArInterpolation.h \ + include/ArKeyHandler.h include/ArCommands.h include/ArJoyHandler.h \ + include/ariaInternal.h include/ArStringInfoGroup.h \ + include/ArSonarDevice.h include/ArRangeDevice.h include/ArRangeBuffer.h \ + include/ArDrawingData.h include/ArPriorityResolver.h include/ArAction.h \ + include/ArArg.h include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/joydriveActionMod: advanced/joydriveActionMod.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/joydriveActionModule: advanced/joydriveActionModule.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/joydriveUserControl: advanced/joydriveUserControl.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/peoplebotDemo: advanced/peoplebotDemo.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/sickAutoLogger: advanced/sickAutoLogger.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/sickSpinLogger: advanced/sickSpinLogger.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h +advanced/sickSquareLogger: advanced/sickSquareLogger.cpp include/Aria.h \ + include/ariaOSDef.h include/ariaTypedefs.h include/ArSerialConnection.h \ + include/ArDeviceConnection.h include/ariaUtil.h include/ArLog.h \ + include/ArMutex.h include/ArFunctor.h include/ArArgumentParser.h \ + include/ArArgumentBuilder.h include/ArBasePacket.h \ + include/ArTcpConnection.h include/ArSocket.h include/ArSimpleConnector.h \ + include/ArRobotConnector.h include/ArLaserConnector.h \ + include/ArLogFileConnection.h include/ArRobotPacket.h \ + include/ArRobotPacketSender.h include/ArRobotPacketReceiver.h \ + include/ArRobotConfigPacketReader.h include/ArRobotTypes.h \ + include/ArRobotParams.h include/ArConfig.h include/ArConfigArg.h \ + include/ArFileParser.h include/ArHasFileName.h include/ArConfigGroup.h \ + include/ArRobot.h include/ArSyncTask.h include/ArTaskState.h \ + include/ArSensorReading.h include/ArTransform.h include/ArCondition.h \ + include/ArSyncLoop.h include/ArASyncTask.h include/ArThread.h \ + include/ArRobotPacketReaderThread.h include/ArActionDesired.h \ + include/ArResolver.h include/ArInterpolation.h include/ArKeyHandler.h \ + include/ArCommands.h include/ArJoyHandler.h include/ariaInternal.h \ + include/ArStringInfoGroup.h include/ArSonarDevice.h \ + include/ArRangeDevice.h include/ArRangeBuffer.h include/ArDrawingData.h \ + include/ArPriorityResolver.h include/ArAction.h include/ArArg.h \ + include/ArActionGroup.h include/ArActionGroups.h \ + include/ArActionColorFollow.h include/ArACTS.h include/ArPTZ.h \ + include/ArPTZConnector.h include/ArActionDeceleratingLimiter.h \ + include/ArActionLimiterForwards.h include/ArActionLimiterBackwards.h \ + include/ArActionLimiterTableSensor.h include/ArActionBumpers.h \ + include/ArActionIRs.h include/ArActionStallRecover.h \ + include/ArActionAvoidFront.h include/ArActionAvoidSide.h \ + include/ArActionConstantVelocity.h include/ArActionInput.h \ + include/ArActionRobotJoydrive.h include/ArActionJoydrive.h \ + include/ArActionKeydrive.h include/ArActionTriangleDriveTo.h \ + include/ArLineFinder.h include/ArActionTurn.h \ + include/ArActionRatioInput.h include/ArActionStop.h \ + include/ArActionGoto.h include/ArModule.h include/ArModuleLoader.h \ + include/ArRecurrentTask.h include/ArGripper.h include/ArSonyPTZ.h \ + include/ArRVisionPTZ.h include/ArAMPTU.h include/ArP2Arm.h \ + include/ArSick.h include/ArLaser.h include/ArRangeDeviceThreaded.h \ + include/ArFunctorASyncTask.h include/ArLMS2xx.h include/ArLMS2xxPacket.h \ + include/ArLMS2xxPacketReceiver.h include/ArLaserLogger.h \ + include/ArIrrfDevice.h include/ArDPPTU.h include/ArVCC4.h \ + include/ArMode.h include/ArModes.h include/ArTCMCompassRobot.h \ + include/ArTCM2.h include/ArNetServer.h include/ArSignalHandler.h \ + include/ArAnalogGyro.h include/ArMapInterface.h include/ArMapObject.h \ + include/ArMapUtils.h include/ArMap.h include/ArMapComponents.h \ + include/ArBumpers.h include/ArIRs.h include/ArForbiddenRangeDevice.h \ + include/ArVersalogicIO.h include/ArMTXIO.h \ + include/ArActionGotoStraight.h include/ArDataLogger.h \ + include/ArRobotJoyHandler.h include/ArRatioInputKeydrive.h \ + include/ArRatioInputJoydrive.h include/ArRatioInputRobotJoydrive.h \ + include/ArActionMovementParameters.h include/ArSoundPlayer.h \ + include/ArSoundsQueue.h include/ArSpeech.h include/ArCameraCollection.h \ + include/ArCameraCommands.h include/ArSonarAutoDisabler.h \ + include/ArActionDriveDistance.h include/ArLaserReflectorDevice.h \ + include/ArRobotConfig.h include/ArTCMCompassDirect.h \ + include/ArNMEAParser.h include/ArLaserFilter.h include/ArUrg.h \ + include/ArGPS.h include/ArTrimbleGPS.h include/ArNovatelGPS.h \ + include/ArGPSCoords.h include/ArSonarConnector.h \ + include/ArBatteryConnector.h include/ArLCDConnector.h \ + include/ArSonarMTX.h include/ArBatteryMTX.h include/ArLCDMTX.h \ + include/ArSimulatedLaser.h include/ArExitErrorSource.h \ + include/ArActionLimiterRot.h include/ArRobotBatteryPacketReader.h \ + include/ArLMS1XX.h include/ArUrg_2_0.h \ + include/ArActionMovementParametersDebugging.h include/ArZippable.h \ + include/ArS3Series.h include/ArSZSeries.h diff --git a/Legacy/Aria/README.txt b/Legacy/Aria/README.txt new file mode 100644 index 0000000..1ea395a --- /dev/null +++ b/Legacy/Aria/README.txt @@ -0,0 +1,546 @@ + +ARIA +==== + +Adept MobileRobots Advanced Robotics Interface for Applications +--------------------------------------------------------------- + +Version 2.8.0 + +Linux + +Copyright 2002, 2003, 2004, 2005 +ActivMedia Robotics, LLC. All rights reserved. + +Copyright 2006, 2007, 2008, 2009 +MobileRobots Inc. All rights reserved. + +Copyright 2010, 2011, 2012, 2013 +Adept Technology. All rights reserved. + +See LICENSE.txt for full license information about ARIA. + +Please read this document for important details about using ARIA. + +Contents +======== + +* Introduction +* Documentation +* Licenses and Sharing +* ARIA Package +* Files of Note +* Compiling programs that use ARIA + * Windows + * Linux + * Using ARIA's Makefiles + * Using your own Makefile or other build system + * Setting variables for ARIA Makefiles + * Learning more about using Linux + * Learning more about C++ +* Using ARIA from Python and Java +* Simulator + +Introduction +============ + +Welcome to the Adept MobileRobots Advanced Robotics Interface for Applications (ARIA). +ARIA is an object-oriented, application programming interface (API) for +Adept MobileRobots (and ActivMedia) line of intelligent mobile robots, including +Pioneer 2/3 DX and AT, PeopleBot, PowerBot, AmigoBot, PatrolBot/Guiabot, +Seekur and SeekurJr mobile robots. + +Written in the C++ language, ARIA is client-side software for easy, +high-performance access to and management of the robot server, as well +to the many accessory robot sensors and effectors, and useful utilities. + +ARIA can be run multi- or single-threaded, using its own wrapper +around Linux pthreads and WIN32 threads. Use ARIA in many different +ways, from simple command-control of the robot server for direct-drive +navigation, to development of higher-level intelligent actions (aka +behaviors). Add your own features and modifications to ARIA: It's +open-source! + +The ARIA package includes both source code and pre-build libraries +and example programs. These libraries and programs were build with +GCC 3.4 if on Linux, and MS Visual Studio .NET 2003 (7.1), Visual C++ +Express 2008 (9.0) or Visual C++ Express 2010 (10.0) if on Windows. +Using these compilers for development is recommended. + +NOTE: If you use a different compiler or compiler version, you must +rebuild the ARIA libraries to ensure link compatability. + +See below for more information about building programs with ARIA +on Windows and Linux and using the Windows and Linux development tools. + + +Documentation and Help +====================== + +Follow the INSTALL text instructions to install ARIA on your Linux or +Windows workstation or robot computer. System requirements are included +in the INSTALL.txt file. + +ARIA includes a full API Reference Manual in HTML format. This manual, +Aria-Reference.html (and in the docs/ directory), includes documentation +about each of the classes and methods in ARIA, as well as a comprehensive +overview describing how to get stated understanding and using ARIA. In +addition, ARIA includes several example programs in the examples/ +(start with simpleConnect.cpp, then explore the others) and +advanced/ directories, and the header files and source code are included +in include/ and src/ as well. + +The ArNetworking library has its own reference manual, +ArNetworking-Reference.html in the ArNetworking subdirectory, and examples +in ArNetworking/examples. + +If you plan on using the Java or Python wrapper libraries, see the +javaExamples, pythonExamples, ArNetworking/javaExamples and +ArNetworking/pythonExamples directories for important information in +README files, and example programs. You should also read the Aria Reference +manual for general information about Aria -- the API in the wrapper libraries +are almost identical to the C++ API. + +If you have any problems or questions using ARIA or your robot, the +MobileRobots support site provides: + + * A FAQ (Frequently Asked Questions) list, at + * A knowlege base of information on robot hardware and software, at + * All robot and device manuals + * The Aria-Users mailing list, where you can discuss Aria with other users and + MobileRobots software developers: + * Search the archives at + * Join the list at + * Information on contacting MobileRobots technical support. + +License and Sharing +=================== + +ARIA is released under the GNU Public License, which means that if you +distribute any work which uses ARIA, you must distribute the entire +source code to that work under the GPS as well. Read the included +LICENSE text for details. We open-sourced ARIA under GPL with full +source code not only for your convenience, but also so that you can +share your enhancements to the software. If you wish your enhancements +to make it into our future ARIA versions, you will need to assign the +copyright on those changes to Adept. Contact lafary@mobilerobots.com +with these changes or with questions about this. + +Accordingly, please do share your work, and please sign up for the +exclusive aria-users@mobilerobots.com newslist so that you can benefit +from others' work, too. + +ARIA may instead be relicensed for proprietary, closed source applications. +Contact sales@mobilerobots.com for details. + +For answers to frequently asked questions about what the GPL allows +and requires, see + + +The ARIA Package +================ + +Aria/: + docs The API Reference Manual: Extensive documentation of all of ARIA + examples ARIA examples -- a good place to start; see examples/README.txt + include ARIA header (*.h) files + src ARIA source code (*.cpp) files + lib Libraries (.lib files for Windows, .so files for Linux) + bin Contains Windows binaries and DLLs. + params Robot definition (parameter) files ("p3dx.p", for example) + tests Test files, somewhat esoteric but useful during ARIA development + utils Utility commands, not generally needed + advanced Advanced demos, not for the faint of heart (or ARIA novice) + python Python wrapper package + java Java wrapper package + +Aria/ArNetworking/: (A library used to facilitate network communication) + docs API Reference Manual for ArNetworking + examples ArNetworking examples + include ArNetworking header (*.h) files, of course + src ArNetworking source (*.cpp) files + python Python wrapper package + java Java wrapper package + + +Other ARIA Files of Note +======================== + +LICENSE.txt GPL license; agree to this to use ARIA +Aria-vc2003.sln MSVC++ 2003 solution for building ARIA and 'demo'. +Aria-vc2008.sln MSVC++ 2008 solution file for building ARIA and demo. +Aria-VC2010.sln MSVC++ 2010 solution file forbuilding Aria and demo. +examples/All_examples-vc2003.sln + MSVC++ 2003 solution for building all of the examples +examples/All_examples-vc2008.sln + MSVC++ 2008 solution for building all of the examples +examples/All_examples-vc2010.sln + MSVC++ 2010 solution for building all of the examples +Makefile Linux makefile (GNU Make) for building ARIA and examples +Makefile.dep Linux dependency file +INSTALL.txt More information about installing ARIA +README.txt This file; also see READMEs in advanced/, examples/, and tests/ +Changes.txt Summary of changes in each version of ARIA + + +Building programs that use ARIA +=============================== + +Windows +------- + +On Windows, use Microsoft Visual Studio .NET 2003 (MS Visual C++ 7.1), +Visual C++ 2008 (VC9), or Visual C++ 2010 (VC10). + +Note: If you use a different version of Visual C++, you must rebuild +the ARIA libraries. We recommand and support only these versions; other +versions may or may not work. + +You can add your new project the Visual Studio solution files provided with ARIA if you +wish, or create a new solution and add your new project as well as projects +for the ARIA libraries you use. + +Now you must configure your project to find ARIA. These instructions +assume a default installation; if you installed ARIA elsewhere you +must use different paths. If you keep your Visual Studo project within +Aria's directory, you can also use relative paths (e.g. "..\lib" for the +library path). + +Aria libraries are provided in two variants, "Debug" libraries that use +the "Multithreaded Debug DLL" runtime library, and non-Debug (or "Release") libraries +that use the plain "Multithreaded DLL" runtime library. The ARIA solutions +use a "Debug" and a "Release" configuration to select these variants; you +can also use these configuration names as well if you wish. + +1. Create new configuration in the solution: Release and Debug. + +2. From the Project Menu, choose to edit your projects Properties. Or + right-click on the project in the Solution Explorer and choose Properties. + +To edit your new project's configuration properties, right click on the +project in the solution explorer pane and choose Properties. + +3. Change the "Configuration" (upper left of the dialog) menu to "All + Configurations". + +4. Click on the "General" section + + * Set "Output Files" to "C:\Program Files\MobileRobots\Aria\bin" + (Aria's bin directory, where Aria.dll etc. are). Or, if you want your + program saved in a different directory, you must put Aria's bin directory + in your system PATH environment variable, or copy the DLLs to your own + output directory. + + * You may want to change Intermediate Files. A useful value is + "obj\$(ConfigurationName)". + + * (Visual Studio 2003) Set "Use Managed Extensions" to "no". + + * (Visual C++ 2008) Set "Common Language Runtime Support" to "No Common + Language Runtime Support" + +5. Click on the "Link" or "Linker" section. + + * Click on the "Input" subsection. + + * To "Additional Library Path" add "C:\Program Files\MobileRobots\Aria\lib". + + * Change the "Configuration" menu (upper left of the window) to "Debug" + + * (Visual Studio 2003) To "Additional Dependencies", add: + AriaDebug.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworkingDebug.lib ws2_32.lib + + * (Visual C++ 2008) To "Additional Dependencies", add: + AriaDebugVC9.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworkingDebugVC9.lib ws2_32.lib + + * Change the "Configuration" menu to "Release" + + * (Visual Studio 2003) To "Additional Dependencies", add: + Aria.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworking.lib ws2_32.lib + + * (Visual C++ 2008) To "Additional Dependencies", add: + AriaVC9.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworkingVC9.lib ws2_32.lib + + * Change the "Configuration" menu (upper left of the window) to "Debug" + + * If using Visual Studio 2003, To "Additional Dependencies", add: + AriaDebug.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworkingDebug.lib ws2_32.lib + + * Or, if using Visual Studio 2008, To "Additional Dependencies", add: + AriaDebugVC9.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworkingDebugVC9.lib ws2_32.lib + + * Change the "Configuration" menu to "Release" + + * If using Visual Studio 2003, To "Additional Dependencies", add: + Aria.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworking.lib ws2_32.lib + + * Or, if using Visual Studio 2008, To "Additional Dependencies", add: + AriaVC9.lib winmm.lib advapi32.lib + If you are using the ArNetworking library, also add: + ArNetworkingVC9.lib ws2_32.lib + + * Change the "Configuration" menu back to "All Configurations" + +6. Click on the "C++" section. + + * Click on the "General" subsection + + * To "Additional Include Directories" add + "C:\Program Files\MobileRobots\Aria\include". + + * Click on the "Code Generation" subsection + + * Change the "Configuration" menu (upper left of the window) to "Debug". + + * Under the "Use run-time library" pulldown select "Debug + Multithreaded DLL". + + * Change the "Configuration" menu (upper left of the screen) to "Release". + + * Under the "Use run-time library" pulldown select "Multithreaded DLL". + + * Change the "Configuration" menu back to "All Configurations" + +Linux +----- + +On GNU/Linux two tools are used: the compiler (GCC), which compiles +and/or links a single file, and Make, which is used to manage +building multiple files and their dependencies. If you need to +deal with multiple files, you can copy a Makefile and modify it, +or create a new one. + +Note: In packages for Debian and Ubuntu, the shared libraries were built with the +standard G++ version provided with the system. You must use +the same version of G++ or a compatible version to build programs that +link against it, or rebuild ARIA using your preferrend G++ version. (On +Debian and Ubuntu systems, the default g++ and gcc compiler versions may be changed +using the 'galternatives' program or the 'update-alternatives' command). + +When compiling ARIA or its examples, you may also temporarily override the +C++ compiler command ('g++' by default) by setting the CXX environment +variable before or while running make. E.g.: "make CXX=g++-3.4" or +"export CXX=g++-3.4; make". + +More information and documentation about GCC is available at +, and in the gcc 'man' page. More information +about Make is at . Several graphical +IDE applications are available for use with GCC, though none are +currently supported by MobileRobots. + + + +### Using ARIA's Makefiles on Linux: ### + +The ARIA Makefile is able to build any program consisting +of one source code file in the 'examples', 'tests', or 'advanced' +directory. For example, if your source code file is +'examples/newProgram.cpp', then you can run 'make examples/newProgram' +from the top-level Aria directory, or 'make newProgram' from within +the 'examples' directory, to build it. This makes it easy to copy +one of the example programs to a new name and modify it -- a good way +to learn how to use ARIA. + + + +### Using ARIA from your own Makefile or other build system: ### + +If you want to keep your program in a different place than the Aria +examples directory, and use your own Makefile or other build tool, +you need to use the following g++ options to compile the program: + + -fPIC -I/usr/local/Aria/include + +If you wish, you may also use -g and -Wall for debugging information +and useful warnings. Aria does not use exceptions, so you may also +use -fno-exceptions if you wish; this will cause any use of exceptions +in your program to trigger a compile error. + +For linking with libAria use these options: + + -L/usr/local/Aria/lib -lAria -lpthread -ldl -lrt + +If you are also using ArNetworking, use the following compile option +in addition to the Aria options above: + + -I/usr/local/Aria/ArNetworking/include + +And for linking to libArNetworking: + + -lArNetworking + + +A Makefile for a program called "program" with source file "program.cpp" +might look something like this: + + + all: program + + CFLAGS=-fPIC -g -Wall + ARIA_INCLUDE=-I/usr/local/Aria/include + ARIA_LINK=-L/usr/local/Aria/lib -lAria -lpthread -ldl + + %: %.cpp + $(CXX) $(CFLAGS) $(ARIA_INCLUDE) $< -o $@ $(ARIA_LINK) + + +Refer to the GNU Make manual or +other books or documentation about Make to learn more. + + +### Setting variables for ARIA Makefiles ### + +You can add compile options to the following variables used in the ARIA +Makefiles, or replace default values. These can be set on the command +line when running `make`, for example: + + make CXX="g++-4.6" + +CXXFLAGS Additional compile flags passed to the C++ compiler. You + can add GCC options to enable profiling, optimizations, etc. + For example, to rebuild ARIA optimized for the Atom CPU + found in the LX/MTX embedded computer, add -mtune=atom and -O2: + make clean; make CXXFLAGS="-mtune=atom -O2" + These compiler flags will be used in addition to ARIA's + default flags. + +CXX Specify the C++ compiler command to use. The default is g++ or c++. + You can use this to use a different version of g++, or to give the + full path to g++, or to try a different compiler other than G++. + +JAVAC If rebuilding the Java wrapper library, this specifies the Java + compiler command to use. Default is "javac". + +JAR If rebuilding the Java wrapper library, this specifies the JAR + archiver command to use. Default is "jar". + +JAVA_BIN If rebuilding the Java wrapper library, this specifies a directory + containing JDK commands such as javac and jar. + +SWIG If rebuilding the Java and/or Python wrapper libraries, this + specifies the swig command used. Default is swig. + +PYTHON_INCLUDE + If rebuilding the Python wrapper library, this specifies the Python + include directory. Default is /usr/include/python2.5. You usually + need to specify this if building on a Linux other than Debian 5. + +INSTALL_DIR +SYSTEM_ETC_DIR + Directories used when installing ARIA from source with the + `make install` command. + +INSTALL How to run the `install` tool. Default is "install --preserve-timestamps" + + + +Learning more about using Linux: +-------------------------------- + +If you are new to using GNU/Linux, some guides on getting started can be +found at the following sites: + + * If your robot is using RedHat (it displays "RedHat Linux" on the console), + start with + . + More at . + + * If your robot is using Debian, start with + . More is at + . + + * If your robot is using Ubuntu 12.04, refer to + for documentation + and help. + + * is a repository of many different guides, FAQ and + HOWTO documents about Linux in general, including various programming + and system administration tasks. Note however that many details can + differ between Linux distributions and not all HOWTO documents will + be relevant to your distribution. + +For more depth, there are many books about using Linux, consult your +local computer bookseller. The ideal way to learn about Linux is to work +with an experienced colleague who can demonstrate things and answer +questions as they arise. + + + +Learning C++ +------------ + +If you are new to C++ programming, the definitive guide is Bjarne +Stroustrup's book "The C++ Programming Language". The book +"C++ In a Nutshell", published by O'Reilly & Associates, is a +good quick guide and reference. There are also several websites +and many other books about C++. + + +Using ARIA from Java or Python +============================== + +Even though ARIA was written in C++, it is possible to use ARIA from +the Java and Python programming languages as well. The directories +'python' and 'java' contain Python and Java packages automatically generated +by the 'swig' tool (http://www.swig.org) which mirror the ARIA API +closely, and are "wrappers" around the native ARIA library: When you call +an ARIA function in a Python or Java program, the wrapper re-marshalls the +function arguments and makes the equivalent call into the C++ ARIA library. +See the 'pythonExamples' and 'javaExamples' directories for more information +and example programs. See the ARIA API Reference Manual in 'docs' for +some more information. + +More about the Python programming language is at . +More about the Java programming language is at . + + +Using ARIA from Matlab or Simulink +================================== + +As of ARIA 2.8, it is possible to use a small but essential subset of ARIA features +from Matlab and Simulink. This is done via MEX functions and a +pure-C wrapper library called ariac. Matlab functions and Simulink +blocks are provided for essential robot operation such as velocity control, +receiving position estimate and other basic information. New functions +can be added to this interface using the already-implemented functions +as examples. + +See matlab/README.txt for details. + + + +MobileSim Simulator +=================== + +SRIsim is no longer included with Aria. There is now a seperately +downloadable MobileSim simulator at our support webpage +. MobileSim is compatible with SRISim, +but adds many new features. + + + + +------------------------- +Adept MobileRobots +10 Columbia Drive +Amherst, NH, 03031. USA + +support@mobilerobots.com +http://robots.mobilerobots.com +http://www.mobilerobots.com + + diff --git a/Legacy/Aria/advanced/Makefile b/Legacy/Aria/advanced/Makefile new file mode 100644 index 0000000..f6f02b0 --- /dev/null +++ b/Legacy/Aria/advanced/Makefile @@ -0,0 +1,32 @@ +# A simple $(MAKE)file to cause make to go look in the top directory. A simple +# convenience. + +%.so: %.cpp + $(MAKE) -C .. advanced/$@ + +%: %.cpp + $(MAKE) -C .. advanced/$@ + +all: + $(MAKE) -C .. advanced + +clean: + $(MAKE) -C .. cleanAdvanced + +# netAudioAndSpeech needs extra libraries: + +ifndef CXX +CXX=g++ +endif + +netAudioAndSpeech: netAudioAndSpeech.cpp ../lib/libArNetAudio.so ../lib/libArNetworking.so ../lib/libArSpeechSynth_Cepstral.so ../lib/libAria.so + $(CXX) $(CFLAGS) -o $@ -I../include -I../ArNetworking/include -I../ArNetAudio/include -I../ArSpeechSynth_Cepstral/include $< -L../lib -lArNetAudio -lArNetworking -lArSpeechSynth_Cepstral -lAria -lswift -lspeex -lportaudio -lportmixer + + +# Make dependent libraries. Assumes that lib is in sibling directory with +# matching name. +../lib/lib%.so: ../%/src/*.cpp ../%/include/*.h + $(MAKE) -C ../$* $@ + +../lib/libAria.so: + $(MAKE) -C .. lib/libAria.so diff --git a/Legacy/Aria/advanced/README.txt b/Legacy/Aria/advanced/README.txt new file mode 100644 index 0000000..2526ec3 --- /dev/null +++ b/Legacy/Aria/advanced/README.txt @@ -0,0 +1,30 @@ +This directory has various advanced demo applications, they are largely +undocumented, but do some cool things. It also contains some examples +using more obscure or less-used features or devices. +------------------------------------------------------------------------------- + +actsDemo - This one picks up a block (channel 2) and carrys it back and forth +between two placards (channels 1 and 3) + +actsDemoSimple - Like the above but it picks up a block (channel 2) and simply +takes it to a placard (channel 1) then stops + +condition - Example of how to use a condition variable (threading) + +joydriveUserControl - A normal joydrive program, but where control remains in +the users hands instead of ARIAs + +peoplebotDemo - Picks up a block (channel 2) from a table and takes it back +and forth between two placards also sitting on tables (channels 1 and 3) + +amptuDemo - Demo of the old AMPTU device. + +sickSpinLogger, sickSquareLogger, sickAutoLogger - Variations of the sickLogger +example that drive the robot automatically rather than using user joystick +operation. + +joydriveActionMod, joydriveActionModule - More examples of using ArModule to +load plugins at runtime. + +functorListsAndStdAlgorithms - using the STL functions with lists +of ArFunctor objects. diff --git a/Legacy/Aria/advanced/actsDemo.cpp b/Legacy/Aria/advanced/actsDemo.cpp new file mode 100644 index 0000000..976eaaf --- /dev/null +++ b/Legacy/Aria/advanced/actsDemo.cpp @@ -0,0 +1,1015 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +class DriveTo : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + DriveTo(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony); + ~DriveTo(void); + ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArSonyPTZ *mySony; + int myChannel; + bool myPickup; + State myState; + ArTime myLastSeen; +}; + +DriveTo::DriveTo(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony) : + ArAction("DriveTo", "Drives to something.") +{ + myActs = acts; + myGripper = gripper; + mySony = sony; + myChannel = 0; + myState = STATE_FAILED; + setChannel(1); +} + +DriveTo::~DriveTo(void) +{ + +} + +ArActionDesired *DriveTo::fire(ArActionDesired currentDesired) +{ + ArACTSBlob blob; + double xRel, yRel; + + if (myState == STATE_SUCCEEDED || myState == STATE_FAILED) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (myState == STATE_START_LOOKING) + { + myState = STATE_LOOKING; + myLastSeen.setToNow(); + } + + if (myActs->getNumBlobs(myChannel) == 0 || + !myActs->getBlob(myChannel, 1, &blob)) + { + if (myLastSeen.mSecSince() > 1000) + { + printf("DriveTo: Lost the blob, failed.\n"); + myState = STATE_FAILED; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + } + else + { + myLastSeen.setToNow(); + } + + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH; + yRel = (double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + + //printf("xRel %.3f yRel %.3f\n", xRel, yRel); + + myDesired.reset(); + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (currentDesired.getMaxVelStrength() > 0 && + currentDesired.getMaxVel() < 125) + { + printf("DriveTo: Close to a wall of some sort, succeeded.\n"); + myState = STATE_SUCCEEDED; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (ArMath::fabs(xRel) < .10) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 10); + myDesired.setDeltaHeading(-xRel * 10); + } + myDesired.setVel(300); + return &myDesired; +} + +bool DriveTo::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + + +class PickUp : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + PickUp(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony); + ~PickUp(void); + ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArSonyPTZ *mySony; + int myChannel; + bool myPickup; + bool myTried; + bool myPointedDown; + State myState; + ArPose myLastPose; + ArTime myLastMoved; + ArTime myLastSeen; + ArTime mySentLiftDown; + ArTime myTriedStart; + bool myWaitingOnGripper; +}; + +PickUp::PickUp(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony) : + ArAction("PickUp", "Picks up something.") +{ + myActs = acts; + myGripper = gripper; + mySony = sony; + myChannel = 0; + myState = STATE_FAILED; +} + +PickUp::~PickUp(void) +{ + +} + +ArActionDesired *PickUp::fire(ArActionDesired currentDesired) +{ + ArPose pose; + ArACTSBlob blob; + bool blobSeen = false; + double xRel, yRel; + double dist; + + myDesired.reset(); + if (myState == STATE_SUCCEEDED) + { + //printf("PickUp: Succeeded\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myState == STATE_FAILED) + { + //printf("PickUp: Failed\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (myState == STATE_START_LOOKING) + { + myGripper->gripOpen(); + ArUtil::sleep(3); + myGripper->liftDown(); + mySentLiftDown.setToNow(); + myPointedDown = false; + myState = STATE_LOOKING; + myLastSeen.setToNow(); + myTried = false; + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + myWaitingOnGripper = true; + printf("@@@@@ Pickup: Lowering lift\n"); + } + + // we want to sit still until the lift is down or for a second and a half + if (myWaitingOnGripper) + { + if (mySentLiftDown.mSecSince() < 500 || + ((!myGripper->isLiftMaxed() || myGripper->getGripState() != 2) + && mySentLiftDown.mSecSince() < 5000)) + { + myGripper->liftDown(); + myGripper->gripOpen(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + else + { + myWaitingOnGripper = false; + } + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (myGripper->getBreakBeamState() != 0) + { + if (myGripper->getGripState() == 2) + { + printf("PickUp: Succeeded, have block.\n"); + myGripper->liftUp(); + myState = STATE_SUCCEEDED; + } + else if (!myTried) + { + myGripper->gripClose(); + printf("PickUp: Trying to pick up.\n"); + myTried = true; + myTriedStart.setToNow(); + } + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + // this means that the grippers are closed, but we don't have anything in + // them, ie that we failed to get the block + else if (myTried && (myGripper->getGripState() == 2 || + myTriedStart.mSecSince() > 5000)) + { + myState = STATE_FAILED; + myGripper->gripOpen(); + ArUtil::sleep(3); + myGripper->liftUp(); + printf("PickUp: Grippers closed, didn't get a block, failed.\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + pose = myRobot->getPose(); + dist = myLastPose.findDistanceTo(pose); + if (dist < 5 && myLastMoved.mSecSince() > 1500) + { + printf("PickUp: Failed, no movement in the last 1500 msec.\n"); + myState = STATE_FAILED; + myGripper->gripOpen(); + myGripper->liftUp(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (dist > 5) + { + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (myActs->getNumBlobs(myChannel) == 0 || + !(blobSeen = myActs->getBlob(myChannel, 1, &blob))) + { + if (((!myPointedDown && myLastSeen.mSecSince() > 1500) || + (myPointedDown && myLastSeen.mSecSince() > 4000)) && + myGripper->getBreakBeamState() == 0) + { + printf("PickUp: Lost the blob, failed, last saw it %ld msec ago.\n", + myLastSeen.mSecSince()); + myState = STATE_FAILED; + myGripper->gripOpen(); + ArUtil::sleep(3); + myGripper->liftUp(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + } + else + myLastSeen.setToNow(); + + + if (blobSeen) + { + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH; + yRel = (double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + //printf("xRel %.3f yRel %.3f:\n", xRel, yRel); + } + else + { + //printf("No blob: "); + } + + if (blobSeen && yRel < 0.2 && !myPointedDown) + { + printf("PickUp: Pointing the camera down!!!\n"); + mySony->panTilt(0, -ArSonyPTZ::MAX_TILT); + myPointedDown = true; + } + + + if (!blobSeen || ArMath::fabs(xRel) < .10) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 10); + if (ArMath::fabs(-xRel * 10) <= 10) + myDesired.setDeltaHeading(-xRel * 10); + else if (-xRel > 0) + myDesired.setDeltaHeading(10); + else + myDesired.setDeltaHeading(-10); + } + myDesired.setVel(150); + return &myDesired; +} + +bool PickUp::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class Acquire : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + Acquire(ArACTS_1_2 *acts, ArGripper *gripper); + virtual ~Acquire(void); + ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } +protected: + State myState; + int myChannel; + ArSectors myFirstTurn; + ArSectors mySecondTurn; + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArTime myStartUp; + bool myTryingGripper; +}; + +Acquire::Acquire(ArACTS_1_2 *acts, ArGripper *gripper) : + ArAction("Acquire", "Turns until it can find the given channel, gives up after 1 revolution") +{ + myActs = acts; + myGripper = gripper; + myState = STATE_FAILED; +} + +Acquire::~Acquire(void) +{ +} + +ArActionDesired *Acquire::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + myDesired.setVel(0); + switch (myState) { + case STATE_START_LOOKING: + myFirstTurn.clear(); + mySecondTurn.clear(); + myState = STATE_LOOKING; + myGripper->liftUp(); + myGripper->gripClose(); + printf("Acquire: Raising lift\n"); + myStartUp.setToNow(); + myTryingGripper = true; + case STATE_LOOKING: + if (myTryingGripper && (myStartUp.mSecSince() < 600 || + ((!myGripper->isLiftMaxed() || + myGripper->getGripState() != 2) && + myStartUp.mSecSince() < 5000))) + { + myGripper->liftUp(); + myGripper->gripClose(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myTryingGripper) + { + printf("Acquire: Done raising lift %ld after started.\n", + myStartUp.mSecSince()); + myTryingGripper = false; + } + if (myActs->getNumBlobs(myChannel) > 0) + { + myDesired.setDeltaHeading(0); + myState = STATE_SUCCEEDED; + printf("Acquire: Succeeded!\n"); + } + else if (myFirstTurn.didAll() && mySecondTurn.didAll()) + { + myDesired.setDeltaHeading(0); + myState = STATE_FAILED; + printf("Acquire: Did two revolutions, didn't see the blob, Failed!\n"); + } + else + { + myFirstTurn.update(myRobot->getTh()); + if (myFirstTurn.didAll()) + mySecondTurn.update(myRobot->getTh()); + myDesired.setDeltaHeading(8); + } + return &myDesired; + default: + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } +} + +bool Acquire::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class TakeBlockToWall +{ +public: + enum State { + STATE_START, + STATE_ACQUIRE_BLOCK, + STATE_PICKUP_BLOCK, + STATE_BACKUP, + STATE_ACQUIRE_BLOCK2, + STATE_PICKUP_BLOCK2, + STATE_ACQUIRE_DROP_WALL, + STATE_DRIVETO_DROP_WALL, + STATE_DROP, + STATE_DROP_BACKUP, + STATE_ACQUIRE_LAP_WALL, + STATE_DRIVETO_LAP_WALL, + STATE_SWITCH, + STATE_FAILED + }; + TakeBlockToWall(ArRobot *robot, ArGripper *gripper, ArSonyPTZ *sony, + Acquire *acquire, DriveTo *driveTo, PickUp *pickup, + ArActionConstantVelocity *backup); + ~TakeBlockToWall(void); + void handler(void); + void setState(State state) + { myState = state; myNewState = true; myStateStart.setToNow(); } + enum Color { + COLOR_FIRST_WALL = 1, + COLOR_SECOND_WALL = 3, + COLOR_BLOCK = 2 + }; + +protected: + ArTime myStateStart; + ArRobot *myRobot; + ArFunctorC myHandlerCB; + ArGripper *myGripper; + ArSonyPTZ *mySony; + Acquire *myAcquire; + DriveTo *myDriveTo; + PickUp *myPickUp; + ArActionConstantVelocity *myBackup; + State myState; + Color myDropWall; + Color myLapWall; + bool myNewState; + bool myGripOpenSent; +}; + +TakeBlockToWall::TakeBlockToWall(ArRobot *robot, ArGripper *gripper, + ArSonyPTZ *sony, Acquire *acquire, + DriveTo *driveTo, PickUp *pickUp, + ArActionConstantVelocity *backup) : + myHandlerCB(this, &TakeBlockToWall::handler) +{ + myRobot = robot; + myRobot->addUserTask("TakeBlockToWall", 75, &myHandlerCB); + myGripper = gripper; + myAcquire = acquire; + myDriveTo = driveTo; + myPickUp = pickUp; + mySony = sony; + myBackup = backup; + myState = STATE_START; + myNewState = true; +} + +TakeBlockToWall::~TakeBlockToWall(void) +{ +} + +void TakeBlockToWall::handler(void) +{ + Color tempColor; + + switch (myState) + { + case STATE_START: + setState(STATE_ACQUIRE_BLOCK); + myDropWall = COLOR_FIRST_WALL; + myLapWall = COLOR_SECOND_WALL; + printf("!! Started state handling!\n"); + //handler(); + return; + break; + case STATE_ACQUIRE_BLOCK: + if (myNewState) + { + printf("!! Acquire block\n"); + myNewState = false; + mySony->panTilt(0, -10); + myAcquire->activate(); + myAcquire->setChannel(COLOR_BLOCK); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myGripper->getGripState() == 2 && + myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock: Successful (have cube?)\n"); + setState(STATE_ACQUIRE_DROP_WALL); + //handler(); + return; + } + else if (myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock: Successful (cube in gripper?)\n"); + setState(STATE_PICKUP_BLOCK); + //handler(); + return; + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStart.mSecSince() > 35000) + { + printf("###### AcqiureBlock: failed\n"); + setState(STATE_BACKUP); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireBlock: successful\n"); + setState(STATE_PICKUP_BLOCK); + //handler(); + return; + } + break; + case STATE_PICKUP_BLOCK: + if (myNewState) + { + printf("!! Pickup block\n"); + myNewState = false; + mySony->panTilt(0, -15); + myAcquire->deactivate(); + myPickUp->activate(); + myPickUp->setChannel(COLOR_BLOCK); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myPickUp->getState() == PickUp::STATE_FAILED) + { + printf("###### PickUpBlock: failed\n"); + setState(STATE_BACKUP); + //handler(); + return; + } + else if (myPickUp->getState() == PickUp::STATE_SUCCEEDED) + { + printf("###### PickUpBlock: successful\n"); + setState(STATE_ACQUIRE_DROP_WALL); + //handler(); + return; + } + break; + case STATE_BACKUP: + if (myNewState) + { + printf("!! Backup\n"); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->activate(); + myNewState = false; + } + if (myStateStart.mSecSince() > 2000) + { + printf("###### Backup: done\n"); + setState(STATE_ACQUIRE_BLOCK2); + //handler(); + return; + } + break; + case STATE_ACQUIRE_BLOCK2: + if (myNewState) + { + printf("!! Acquire block 2\n"); + myNewState = false; + mySony->panTilt(0, -25); + myAcquire->activate(); + myAcquire->setChannel(COLOR_BLOCK); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myGripper->getGripState() == 2 && + myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock2: Successful (have cube?)\n"); + setState(STATE_ACQUIRE_DROP_WALL); + //handler(); + return; + } + else if (myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock2: Successful (cube in gripper?)\n"); + setState(STATE_PICKUP_BLOCK2); + //handler(); + return; + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStart.mSecSince() > 35000) + { + printf("###### AcqiureBlock2: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireBlock2: successful\n"); + setState(STATE_PICKUP_BLOCK2); + //handler(); + return; + } + break; + case STATE_PICKUP_BLOCK2: + if (myNewState) + { + printf("!! Pickup block 2\n"); + myNewState = false; + myAcquire->deactivate(); + myPickUp->activate(); + mySony->panTilt(0, -25); + myPickUp->setChannel(COLOR_BLOCK); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myPickUp->getState() == PickUp::STATE_FAILED) + { + printf("###### PickUpBlock2: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myPickUp->getState() == PickUp::STATE_SUCCEEDED) + { + printf("###### PickUpBlock2: successful\n"); + setState(STATE_ACQUIRE_DROP_WALL); + //handler(); + return; + } + break; + case STATE_ACQUIRE_DROP_WALL: + if (myNewState) + { + printf("!! Acquire Drop wall, channel %d\n", myDropWall); + myNewState = false; + mySony->panTilt(0, -5); + myAcquire->activate(); + myAcquire->setChannel(myDropWall); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myGripper->getGripState() != 2 || + myGripper->getBreakBeamState() == 0) + { + printf("###### AcquireDropWall:: failed (lost cube)\n"); + setState(STATE_BACKUP); + //handler(); + return; + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStart.mSecSince() > 35000) + { + printf("###### AcquireDropWall:: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireDropWall: successful\n"); + setState(STATE_DRIVETO_DROP_WALL); + //handler(); + return; + } + break; + case STATE_DRIVETO_DROP_WALL: + if (myNewState) + { + printf("!! Driveto Drop wall, channel %d\n", myDropWall); + myNewState = false; + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->activate(); + myDriveTo->setChannel(myDropWall); + myBackup->deactivate(); + } + if (myGripper->getGripState() != 2 || + myGripper->getBreakBeamState() == 0) + { + printf("###### DriveToDropWall:: failed (lost cube)\n"); + setState(STATE_BACKUP); + //handler(); + return; + } + if (myDriveTo->getState() == DriveTo::STATE_FAILED) + { + printf("###### DriveToDropWall: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myDriveTo->getState() == DriveTo::STATE_SUCCEEDED) + { + printf("###### DriveToDropWall: succesful\n"); + setState(STATE_DROP); + //handler(); + return; + } + break; + case STATE_DROP: + if (myNewState) + { + printf("!! Drop\n"); + printf("@@@@@ Drop lowering lift\n"); + myGripper->liftDown(); + myNewState = false; + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + myGripOpenSent = false; + } + + myGripper->liftDown(); + if ((myStateStart.mSecSince() > 500 && + myGripper->isLiftMaxed() && myStateStart.mSecSince() < 5000) || + myStateStart.mSecSince() > 5000) + { + myGripper->gripOpen(); + /*if (!myGripOpenSent) + { + ArUtil::sleep(3); + myGripper->gripOpen(); + } + myGripOpenSent = true; + */ + } + if (myGripper->getGripState() == 1 || myStateStart.mSecSince() > 6000) + { + printf("###### Drop: success\n"); + setState(STATE_DROP_BACKUP); + //handler(); + return; + } + break; + case STATE_DROP_BACKUP: + if (myNewState) + { + printf("!! Drop backup\n"); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->activate(); + myNewState = false; + } + if (myStateStart.mSecSince() > 2000) + { + printf("###### Drop_Backup: done\n"); + setState(STATE_ACQUIRE_LAP_WALL); + //handler(); + return; + } + break; + case STATE_ACQUIRE_LAP_WALL: + if (myNewState) + { + printf("!! Acquire Lap wall, channel %d\n", myLapWall); + myNewState = false; + mySony->panTilt(0, -5); + myAcquire->activate(); + myAcquire->setChannel(myLapWall); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStart.mSecSince() > 35000) + { + printf("###### AcquireLapWall:: failed\n"); + setState(STATE_SWITCH); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireLapWall: successful\n"); + setState(STATE_DRIVETO_LAP_WALL); + //handler(); + return; + } + break; + case STATE_DRIVETO_LAP_WALL: + if (myNewState) + { + printf("!! Driveto Lap wall, channel %d\n", myLapWall); + myNewState = false; + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->activate(); + myDriveTo->setChannel(myLapWall); + myBackup->deactivate(); + } + if (myDriveTo->getState() == DriveTo::STATE_FAILED) + { + printf("###### DriveToLapWall: failed\n"); + setState(STATE_SWITCH); + //handler(); + return; + } + else if (myDriveTo->getState() == DriveTo::STATE_SUCCEEDED) + { + printf("###### DriveToLapWall: succesful\n"); + setState(STATE_SWITCH); + //handler(); + return; + } + break; + case STATE_SWITCH: + printf("!! Switching walls around.\n"); + tempColor = myDropWall; + myDropWall = myLapWall; + myLapWall = tempColor; + setState(STATE_ACQUIRE_BLOCK); + //handler(); + return; + case STATE_FAILED: + printf("@@@@@ Failed to complete the task!\n"); + myRobot->comInt(ArCommands::SONAR, 0); + ArUtil::sleep(50); + myRobot->comStr(ArCommands::SAY, "\52\77\37\62\42\70"); + ArUtil::sleep(500); + Aria::shutdown(); + myRobot->disconnect(); + myRobot->stopRunning(); + return; + } + +} + +int main(void) +{ + ArSerialConnection con; + ArRobot robot; + int ret; + std::string str; + ArActionLimiterForwards limiter("speed limiter near", 300, 600, 250); + ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 400); + ArActionLimiterBackwards backwardsLimiter; + ArActionConstantVelocity stop("stop", 0); + ArActionConstantVelocity backup("backup", -200); + ArSonarDevice sonar; + ArACTS_1_2 acts; + ArSonyPTZ sony(&robot); + ArGripper gripper(&robot, ArGripper::GENIO); + + Acquire acq(&acts, &gripper); + DriveTo driveTo(&acts, &gripper, &sony); + PickUp pickUp(&acts, &gripper, &sony); + + TakeBlockToWall takeBlock(&robot, &gripper, &sony, &acq, &driveTo, &pickUp, + &backup); + + Aria::init(); + + if (!acts.openPort(&robot)) + { + printf("Could not connect to acts\n"); + exit(1); + } + + robot.addRangeDevice(&sonar); + //con.setBaud(38400); + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + sony.init(); + ArUtil::sleep(1000); + //robot.setAbsoluteMaxTransVel(400); + + robot.setStateReflectionRefreshTime(250); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + ArUtil::sleep(200); + robot.addAction(&limiter, 100); + robot.addAction(&limiterFar, 99); + robot.addAction(&backwardsLimiter, 98); + robot.addAction(&acq, 77); + robot.addAction(&driveTo, 76); + robot.addAction(&pickUp, 75); + robot.addAction(&backup, 50); + robot.addAction(&stop, 30); + + robot.run(true); + + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/advanced/actsDemoSimple.cpp b/Legacy/Aria/advanced/actsDemoSimple.cpp new file mode 100644 index 0000000..5b8d160 --- /dev/null +++ b/Legacy/Aria/advanced/actsDemoSimple.cpp @@ -0,0 +1,751 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class DriveTo : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + DriveTo(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony); + ~DriveTo(void); + ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArSonyPTZ *mySony; + int myChannel; + bool myPickup; + State myState; + ArTime myLastSeen; +}; + +DriveTo::DriveTo(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony) : + ArAction("DriveTo", "Drives to something.") +{ + myActs = acts; + myGripper = gripper; + mySony = sony; + myChannel = 0; + myState = STATE_FAILED; + setChannel(1); +} + +DriveTo::~DriveTo(void) +{ + +} + +ArActionDesired *DriveTo::fire(ArActionDesired currentDesired) +{ + ArACTSBlob blob; + double xRel, yRel; + + if (myState == STATE_START_LOOKING) + { + myGripper->gripClose(); + myGripper->liftUp(); + mySony->panTilt(0, -5); + myState = STATE_LOOKING; + myLastSeen.setToNow(); + } + + if (myActs->getNumBlobs(myChannel) == 0 || + !myActs->getBlob(myChannel, 1, &blob)) + { + if (myLastSeen.mSecSince() > 1000) + { + printf("DriveTo: Lost the blob, failed.\n"); + myState = STATE_FAILED; + return NULL; + } + } + else + { + myLastSeen.setToNow(); + } + + if (myState == STATE_SUCCEEDED || myState == STATE_FAILED) + { + return NULL; + } + + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH; + yRel = (double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + + //printf("xRel %.3f yRel %.3f\n", xRel, yRel); + + myDesired.reset(); + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (currentDesired.getMaxVelStrength() > 0 && + currentDesired.getMaxVel() < 50) + { + printf("DriveTo: Close to a wall of some sort, succeeded.\n"); + myState = STATE_SUCCEEDED; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (ArMath::fabs(xRel) < .10) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 10); + myDesired.setDeltaHeading(-xRel * 10); + } + myDesired.setVel(300); + return &myDesired; +} + +bool DriveTo::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + + +class PickUp : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + PickUp(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony); + ~PickUp(void); + ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArSonyPTZ *mySony; + int myChannel; + bool myPickup; + bool myTried; + bool myPointedDown; + State myState; + ArPose myLastPose; + ArTime myLastMoved; + ArTime myLastSeen; + ArTime mySentLiftDown; +}; + +PickUp::PickUp(ArACTS_1_2 *acts, ArGripper *gripper, ArSonyPTZ *sony) : + ArAction("PickUp", "Picks up something.") +{ + myActs = acts; + myGripper = gripper; + mySony = sony; + myChannel = 0; + myState = STATE_FAILED; +} + +PickUp::~PickUp(void) +{ + +} + +ArActionDesired *PickUp::fire(ArActionDesired currentDesired) +{ + ArPose pose; + ArACTSBlob blob; + bool blobSeen = false; + double xRel, yRel; + double dist; + + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (myState == STATE_START_LOOKING) + { + myGripper->gripOpen(); + myGripper->liftDown(); + mySentLiftDown.setToNow(); + mySony->panTilt(0, -15); + myPointedDown = false; + myState = STATE_LOOKING; + myLastSeen.setToNow(); + myTried = false; + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + // we want to sit still until the lift is down or for a second and a half + if (!((mySentLiftDown.mSecSince() > 200 && myGripper->isLiftMaxed()) || + mySentLiftDown.mSecSince() > 1500)) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + return &myDesired; + } + + + if (myState == STATE_SUCCEEDED) + { + //printf("PickUp: Succeeded\n"); + return NULL; + } + else if (myState == STATE_FAILED) + { + //printf("PickUp: Failed\n"); + return NULL; + } + + pose = myRobot->getPose(); + dist = myLastPose.findDistanceTo(pose); + if (dist < 10 && myLastMoved.mSecSince() > 1500) + { + printf("PickUp: Failed, no movement in the last 1500 msec.\n"); + myState = STATE_FAILED; + return NULL; + } + else if (dist > 10) + { + myLastMoved.setToNow(); + } + + if (myActs->getNumBlobs(myChannel) == 0 || + !(blobSeen = myActs->getBlob(myChannel, 1, &blob))) + { + if (((!myPointedDown && myLastSeen.mSecSince() > 1500) || + (myPointedDown && myLastSeen.mSecSince() > 4000)) && + myGripper->getBreakBeamState() == 0) + { + printf("PickUp: Lost the blob, failed, last saw it %ld msec ago.\n", + myLastSeen.mSecSince()); + myState = STATE_FAILED; + return NULL; + } + } + else + myLastSeen.setToNow(); + + + if (blobSeen) + { + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH; + yRel = (double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + //printf("xRel %.3f yRel %.3f:\n", xRel, yRel); + } + else + { + //printf("No blob: "); + } + + myDesired.reset(); + if (myGripper->getBreakBeamState() != 0) + { + if (myGripper->getGripState() == 2) + { + printf("PickUp: Succeeded, have block.\n"); + myState = STATE_SUCCEEDED; + } + else if (!myTried) + { + myGripper->gripClose(); + printf("PickUp: Trying to pick up.\n"); + myTried = true; + } + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + // this means that the grippers are closed, but we don't have anything in + // them, ie that we failed to get the block + else if (myTried && myGripper->getGripState() == 2) + { + myState = STATE_FAILED; + printf("PickUp: Grippers closed, didn't get a block, failed.\n"); + return NULL; + } + + if (blobSeen && yRel < 0.2 && !myPointedDown) + { + printf("PickUp: Pointing the camera down!!!\n"); + mySony->panTilt(0, -ArSonyPTZ::MAX_TILT); + myPointedDown = true; + } + + + if (!blobSeen || ArMath::fabs(xRel) < .10) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 10); + myDesired.setDeltaHeading(-xRel * 10); + } + myDesired.setVel(150); + return &myDesired; +} + +bool PickUp::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class Acquire : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + Acquire(ArACTS_1_2 *acts); + virtual ~Acquire(void); + ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } +protected: + State myState; + int myChannel; + int myStartAngle; + ArSectors myFirstTurn; + ArSectors mySecondTurn; + ArActionDesired myDesired; + ArACTS_1_2 *myActs; +}; + +Acquire::Acquire(ArACTS_1_2 *acts) : + ArAction("Acquire", "Turns until it can find the given channel, gives up after 1 revolution") +{ + myActs = acts; + myState = STATE_FAILED; +} + +Acquire::~Acquire(void) +{ +} + +ArActionDesired *Acquire::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + switch (myState) { + case STATE_START_LOOKING: + myFirstTurn.clear(); + mySecondTurn.clear(); + myState = STATE_LOOKING; + case STATE_LOOKING: + if (myActs->getNumBlobs(myChannel) > 0) + { + myDesired.setDeltaHeading(0); + myState = STATE_SUCCEEDED; + printf("Acquire: Succeeded!\n"); + } + else if (myFirstTurn.didAll() && mySecondTurn.didAll()) + { + myDesired.setDeltaHeading(0); + myState = STATE_FAILED; + printf("Acquire: Did two revolutions, didn't see the blob, Failed!\n"); + } + else + { + myFirstTurn.update(myRobot->getTh()); + if (myFirstTurn.didAll()) + mySecondTurn.update(myRobot->getTh()); + myDesired.setDeltaHeading(8); + } + return &myDesired; + default: + return NULL; + } +} + +bool Acquire::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class TakeBlockToWall +{ +public: + enum State { + STATE_START, + STATE_ACQUIRE_BLOCK, + STATE_PICKUP_BLOCK, + STATE_BACKUP, + STATE_PICKUP_BLOCK2, + STATE_ACQUIRE_WALL, + STATE_DRIVETO_WALL, + STATE_DROP, + STATE_SUCCEEDED, + STATE_FAILED + }; + TakeBlockToWall(ArRobot *robot, ArGripper *gripper, ArSonyPTZ *sony, + Acquire *acquire, DriveTo *driveTo, PickUp *pickup, + ArActionConstantVelocity *backup); + ~TakeBlockToWall(void); + void handler(void); + void setState(State state) + { myState = state; myNewState = true; myStateStart.setToNow(); } + enum { + COLOR_FIRST_WALL = 1, + COLOR_SECOND_WALL = 3, + COLOR_BLOCK = 2 + }; + +protected: + ArTime myStateStart; + ArRobot *myRobot; + ArFunctorC myHandlerCB; + ArGripper *myGripper; + ArSonyPTZ *mySony; + Acquire *myAcquire; + DriveTo *myDriveTo; + PickUp *myPickUp; + ArActionConstantVelocity *myBackup; + State myState; + bool myNewState; +}; + +TakeBlockToWall::TakeBlockToWall(ArRobot *robot, ArGripper *gripper, + ArSonyPTZ *sony, Acquire *acquire, + DriveTo *driveTo, PickUp *pickUp, + ArActionConstantVelocity *backup) : + myHandlerCB(this, &TakeBlockToWall::handler) +{ + myRobot = robot; + myRobot->addUserTask("TakeBlockToWall", 75, &myHandlerCB); + myGripper = gripper; + myAcquire = acquire; + myDriveTo = driveTo; + myPickUp = pickUp; + mySony = sony; + myBackup = backup; + myState = STATE_START; + myNewState = true; +} + +TakeBlockToWall::~TakeBlockToWall(void) +{ +} + +void TakeBlockToWall::handler(void) +{ + switch (myState) + { + case STATE_START: + setState(STATE_ACQUIRE_BLOCK); + printf("Started state handling!\n"); + handler(); + return; + break; + case STATE_ACQUIRE_BLOCK: + if (myNewState) + { + myNewState = false; + mySony->panTilt(0, -10); + myAcquire->activate(); + myAcquire->setChannel(COLOR_BLOCK); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myAcquire->getState() == Acquire::STATE_FAILED) + { + printf("## AcqiureBlock: failed\n"); + setState(STATE_FAILED); + handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("## AcquireBlock: successful\n"); + setState(STATE_PICKUP_BLOCK); + handler(); + return; + } + break; + case STATE_PICKUP_BLOCK: + if (myNewState) + { + myNewState = false; + myAcquire->deactivate(); + myPickUp->activate(); + myPickUp->setChannel(COLOR_BLOCK); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myPickUp->getState() == PickUp::STATE_FAILED) + { + printf("## PickUpBlock: failed\n"); + setState(STATE_BACKUP); + handler(); + return; + } + else if (myPickUp->getState() == PickUp::STATE_SUCCEEDED) + { + printf("## PickUpBlock: successful\n"); + setState(STATE_ACQUIRE_WALL); + myGripper->liftUp(); + handler(); + return; + } + break; + case STATE_BACKUP: + if (myNewState) + { + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->activate(); + } + if (myStateStart.mSecSince() > 2000) + { + printf("## Backup: done\n"); + setState(STATE_PICKUP_BLOCK2); + handler(); + return; + } + break; + case STATE_PICKUP_BLOCK2: + if (myNewState) + { + myNewState = false; + myAcquire->deactivate(); + myPickUp->activate(); + myPickUp->setChannel(COLOR_BLOCK); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myPickUp->getState() == PickUp::STATE_FAILED) + { + printf("## PickUpBlock2: failed\n"); + setState(STATE_FAILED); + handler(); + return; + } + else if (myPickUp->getState() == PickUp::STATE_SUCCEEDED) + { + printf("## PickUpBlock2: successful\n"); + setState(STATE_ACQUIRE_WALL); + myGripper->liftUp(); + handler(); + return; + } + break; + case STATE_ACQUIRE_WALL: + if (myNewState) + { + myNewState = false; + mySony->panTilt(0, -5); + myAcquire->activate(); + myAcquire->setChannel(COLOR_FIRST_WALL); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myBackup->deactivate(); + } + if (myAcquire->getState() == Acquire::STATE_FAILED) + { + printf("## AcquireWall:: failed\n"); + setState(STATE_FAILED); + handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("## AcquireWall: successful\n"); + setState(STATE_DRIVETO_WALL); + handler(); + return; + } + break; + case STATE_DRIVETO_WALL: + if (myNewState) + { + myNewState = false; + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->activate(); + myDriveTo->setChannel(COLOR_FIRST_WALL); + myBackup->deactivate(); + } + if (myDriveTo->getState() == DriveTo::STATE_FAILED) + { + printf("## DriveToWall: failed\n"); + setState(STATE_FAILED); + handler(); + return; + } + else if (myDriveTo->getState() == DriveTo::STATE_SUCCEEDED) + { + printf("## DriveToWall: succesful\n"); + setState(STATE_DROP); + handler(); + return; + } + break; + case STATE_DROP: + if (myNewState) + { + myGripper->liftDown(); + myNewState = false; + } + + if (myStateStart.mSecSince() > 3500) + { + myGripper->gripOpen(); + } + if (myStateStart.mSecSince() > 5500) + { + printf("## Drop: success\n"); + setState(STATE_SUCCEEDED); + handler(); + return; + } + break; + case STATE_SUCCEEDED: + printf("Succeeded at the task!\n"); + Aria::shutdown(); + myRobot->disconnect(); + myRobot->stopRunning(); + return; + case STATE_FAILED: + printf("Failed to complete the task!\n"); + Aria::shutdown(); + myRobot->disconnect(); + myRobot->stopRunning(); + return; + default: + printf("TakeBlockToWall::handler: Unknown state!\n"); + + } + +} + +int main(void) +{ + ArSerialConnection con; + ArRobot robot; + int ret; + std::string str; + ArActionLimiterForwards limiter("speed limiter near", 300, 600, 250); + ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 400); + ArActionLimiterBackwards backwardsLimiter; + ArActionConstantVelocity stop("stop", 0); + ArActionConstantVelocity backup("backup", -200); + ArSonarDevice sonar; + ArACTS_1_2 acts; + ArGripper gripper(&robot); + ArSonyPTZ sony(&robot); + + Acquire acq(&acts); + DriveTo driveTo(&acts, &gripper, &sony); + PickUp pickUp(&acts, &gripper, &sony); + + TakeBlockToWall takeBlock(&robot, &gripper, &sony, &acq, &driveTo, &pickUp, + &backup); + + Aria::init(); + + acts.openPort(&robot); + + robot.addRangeDevice(&sonar); + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + sony.init(); + ArUtil::sleep(1000); + robot.setAbsoluteMaxTransVel(400); + + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + ArUtil::sleep(200); + robot.addAction(&limiter, 100); + robot.addAction(&limiterFar, 99); + robot.addAction(&backwardsLimiter, 98); + robot.addAction(&acq, 77); + robot.addAction(&driveTo, 76); + robot.addAction(&pickUp, 75); + robot.addAction(&backup, 50); + robot.addAction(&stop, 30); + + robot.run(true); + + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/advanced/amptuDemo.cpp b/Legacy/Aria/advanced/amptuDemo.cpp new file mode 100644 index 0000000..bb848e6 --- /dev/null +++ b/Legacy/Aria/advanced/amptuDemo.cpp @@ -0,0 +1,198 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This is basically just a demo of how to use the AMPTU, but made fancy so + you can drive around the robot and look at stuff with the camera. Press + button 1 to drive the robot and button two to move the camera. +*/ + +/* + This class is the core of this demo, it adds itself to the robot given + as a user task, then drives the robot and camera from the joystick +*/ +class Joydrive +{ +public: + // constructor + Joydrive(ArRobot *robot); + // destructor, its just empty + ~Joydrive(void) {} + + // the callback function + void drive(void); + +protected: + // the rotational max for the robot + int myRotValRobot; + // translational max for the robot + int myTransValRobot; + // pan max for the camera + int myPanValCamera; + // tilt max for the camera + int myTiltValCamera; + // the joystick handler + ArJoyHandler myJoyHandler; + // the camera + ArAMPTU myCam; + // whether the camera has been inited or not + bool myCamInited; + // pointer to the robot + ArRobot *myRobot; + // callback for the drive function + ArFunctorC myDriveCB; +}; + +/* + Constructor, sets the robot pointer, and some initial values, also note the + use of constructor chaining on myCam and myDriveCB. +*/ +Joydrive::Joydrive(ArRobot *robot) : + myCam(robot), + myDriveCB(this, &Joydrive::drive) +{ + // set the robot pointer and add the joydrive as a user task + myRobot = robot; + myRobot->addUserTask("joydrive", 50, &myDriveCB); + + // initialize some variables + myRotValRobot = 100; + myTransValRobot = 700; + myPanValCamera = 8; + myTiltValCamera = 6; + myCamInited = false; + + // initialize the joystick + myJoyHandler.init(); + // see if we have a joystick, and let user know the results + if (myJoyHandler.haveJoystick()) + { + printf("Have a joystick\n\n"); + } + // we don't have a joystick, so get out + else + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + Aria::shutdown(); + exit(0); + } +} + +// the important function +void Joydrive::drive(void) +{ + int trans, rot; + int pan, tilt; + + // if the camera isn't initialized, initialize it here... it has to be + // done here instead of above because it needs to be done when the + // robot is connected + if (!myCamInited && myRobot->isConnected()) + { + myCam.init(); + myCamInited = true; + } + + // if joystick button one is pushed, then drive the robot + if (myJoyHandler.haveJoystick() && myJoyHandler.getButton(1)) + { + // set the speeds on the joyhandler so we get the values out we want + myJoyHandler.setSpeeds(myRotValRobot, myTransValRobot); + // get the values from the joyhandler + myJoyHandler.getAdjusted(&rot, &trans); + // set the velocities + myRobot->setVel(trans); + myRobot->setRotVel(-rot); + } + // if the joystick button one isn't pushed, stop the robot + else + { + myRobot->setVel(0); + myRobot->setRotVel(0); + } + + // if button two is pressed then move the camera + if (myJoyHandler.haveJoystick() && myJoyHandler.getButton(2)) + { + // set the speeds so we get out the values we want + myJoyHandler.setSpeeds(myPanValCamera, myTiltValCamera); + // get the values + myJoyHandler.getAdjusted(&pan, &tilt); + // move the camera + myCam.panTilt(myCam.getPan() + pan, myCam.getTilt() + tilt); + } + +} + +int main(int argc, char **argv) +{ + // just some stuff for returns + std::string str; + int ret; + + // robots connection + ArSerialConnection con; + // the robot, this turns state reflection off + ArRobot robot(NULL, false); + // the joydrive as defined above, this also adds itself as a user task + Joydrive joyd(&robot); + + // mandatory init + Aria::init(); + + // open the connection, if it fails, exit + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + // set the connection o nthe robot + robot.setDeviceConnection(&con); + // connect, if we fail, exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // turn off the sonar, enable the motors, turn off amigobot sounds + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // run, if we lose connection to the robot, exit + robot.run(true); + + // shutdown and go away + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/advanced/amptuDemo.vcproj b/Legacy/Aria/advanced/amptuDemo.vcproj new file mode 100644 index 0000000..f4ddf97 --- /dev/null +++ b/Legacy/Aria/advanced/amptuDemo.vcproj @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/advanced/condition.cpp b/Legacy/Aria/advanced/condition.cpp new file mode 100644 index 0000000..b967f9c --- /dev/null +++ b/Legacy/Aria/advanced/condition.cpp @@ -0,0 +1,143 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include +#include +#include "Aria.h" + + +/* + This example is to show how to use a condition variable. Conditions + are usefull for delaying the execution of a thread until some time later + when some other part of the program wants to wake it up. + + This program has 5 threads. The main thread and 4 worker threads. The + worker threads all wait on the condition variable to be woken up. When + they are woken up they print that fact and then go right back to sleep + waiting on the condition variable. + + The main thread randomly sleeps between 100ms and 500ms and then wakes + up a single thread. It does this 10 times then tells all the threads + to exit and waits for them to do so. The main thread then exits, which + ends the program. + + This is simply an example of how to make threads wait for something to + happen without doing a busy loop, which takes up CPU time. +*/ + + +// The thread class +class Task : public ArASyncTask +{ +public: + + Task(int num, ArCondition *cond); + virtual ~Task() {} + + // The run loop of the thread. + void * runThread(void *arg); + +protected: + + int myNum; + ArCondition *myCond; +}; + + +// Constructor +Task::Task(int num, ArCondition *cond) : + myNum(num), + myCond(cond) +{ + setThreadName("Task"); +} + +// The main loop for the threads. It checks to see if its still running. +// If not, it exits. The running variable is managed by ArThread. While its +// running, it waits on the condition variable. +void * Task::runThread(void *arg) +{ + threadStarted(); + while (getRunning()) + { + printf("Task %d waiting\n", myNum); + myCond->wait(); + printf("Task %d woke up\n", myNum); + } + + return(NULL); +} + + +int main() +{ + int i, sleepTime; + // The condition the threads will be using + ArCondition cond; + // The threads + Task task1(1, &cond); + Task task2(2, &cond); + Task task3(3, &cond); + Task task4(4, &cond); + + // Initialize Aria, which in turn initializes the thread layer + Aria::init(); + + // Initialize the rand() function + srand((unsigned)time(NULL)); + + // Lets start all correct threads. + task1.create(); + task2.create(); + task3.create(); + task4.create(); + + // Lets wake up the threads at different random times + for (i=0; i<10; ++i) + { + sleepTime=rand()%400+100; + printf("Main: Sleeping %dms\n", sleepTime); + ArUtil::sleep(sleepTime); + printf("Main: Waking up a thread\n"); + cond.signal(); + } + + printf("Exiting\n"); + + // Stop all the threads, which sets their running variable to false + ArThread::stopAll(); + + // Now that all the threads are marked as not running, wake them up + // so that we can exit the program gracefully. + cond.broadcast(); + + // Wait for all the threads to exit + ArThread::joinAll(); + + // Uninit Aria + Aria::uninit(); + + return(0); +} diff --git a/Legacy/Aria/advanced/functorListsAndStdAlgorithms.cpp b/Legacy/Aria/advanced/functorListsAndStdAlgorithms.cpp new file mode 100644 index 0000000..dd24eba --- /dev/null +++ b/Legacy/Aria/advanced/functorListsAndStdAlgorithms.cpp @@ -0,0 +1,127 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* + * This example shows how to use adapters to use STL algorithms + * with ARIA functors. + * An adapter is an STL function object that calls a method pointer + * (like &ArFunctor::invoke) on whatever object it's applied to when + * invoked with the STL convention (which uses operator().) + * + * This lets you use ARIA functors in STL algorithms (which normally + * only work on STL function objects): + * + * STL Algorithm -> STL Function Pointer Adapter -> ARIA Functor -> + * ARIA Functor Target Method + * + * + * Things end up looking kind of redundant + * +*/ + + +#include +#include +#include +#include +#include + +#include "Aria.h" + + +/* + This is the class that contains some methods to use as callbacks targets. +*/ +class CallbackClass +{ +public: + + void callback1(); + void callback2(int i); + bool callback3(const char *str); +}; + +void CallbackClass::callback1() +{ + printf("Invoked callback1\n"); +} + +void CallbackClass::callback2(int i) +{ + printf("Invoked callback2 with argument of '%d'\n", i); +} + +bool CallbackClass::callback3(const char *str) +{ + printf("Invoked callback3 with argument of '%s'\n", str); + return(true); +} + + +// But not all functor targets need to be in a class: +void globalFunction() +{ + std::cout << "Invoked globalFunction." << std::endl; +} + +int main() +{ + CallbackClass cb; + + + // For functors with no arguments: + std::list functors; + ArFunctorC functor1(cb, &CallbackClass::callback1); + functors.push_back(&functor1); + functors.push_back(&functor1); + functors.push_back(&functor1); + std::for_each(functors.begin(), functors.end(), + std::mem_fun(&ArFunctor::invoke)); + + // For functors with arguments, give mem_fun template parameters. + std::list*> functorsWithArg; + ArFunctor1C functor2(cb, &CallbackClass::callback2); + std::mem_fun1_t, int> f(&ArFunctor1::invoke); + functorsWithArg.push_back(&functor2); + functorsWithArg.push_back(&functor2); + functorsWithArg.push_back(&functor2); + std::for_each(functorsWithArg.begin(), functorsWithArg.end(), std::bind2nd(f, 42)); + + // You can use other STL algorithms if your functor returns something. + // count_if will invoke each functor, and return the number of functor + // invocations that returned true (in this case, 3, since they will + // always return true) + std::list*> functorsWithRet; + ArRetFunctor1C + functor3(cb, &CallbackClass::callback3); + std::mem_fun1_t, const char*> rf(&ArRetFunctor1::invokeR); + functorsWithRet.push_back(&functor3); + functorsWithRet.push_back(&functor3); + functorsWithRet.push_back(&functor3); + int c = std::count_if(functorsWithRet.begin(), functorsWithRet.end(), std::bind2nd(rf, "testing")); + std::cout << "Count=" << c << std::endl; + + return(0); +} diff --git a/Legacy/Aria/advanced/joydriveActionMod.cpp b/Legacy/Aria/advanced/joydriveActionMod.cpp new file mode 100644 index 0000000..1a2a716 --- /dev/null +++ b/Legacy/Aria/advanced/joydriveActionMod.cpp @@ -0,0 +1,136 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +// the action which'll drive the robot +class JoydriveAction : public ArAction +{ +public: + // constructor + JoydriveAction(void); + // empty destructor + virtual ~JoydriveAction(void); + //the fire which will actually tell the resolver what to do + virtual ArActionDesired *fire(ArActionDesired currentDesired); + // whether the joystick is initalized or not + bool joystickInited(void); +protected: + // action desired + ArActionDesired myDesired; + // joystick handler + ArJoyHandler myJoyHandler; +}; + +class JoydriveMod : public ArModule +{ +public: + + bool init(ArRobot *robot, void *argument = NULL); + bool exit(); +}; + +JoydriveMod aModule; +ARDEF_MODULE(aModule); +JoydriveAction aJDAct; + +bool JoydriveMod::init(ArRobot *robot, void *argument) +{ + if (!aJDAct.joystickInited()) + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + return(false); + } + + robot->addAction(&aJDAct, 100); + + return(true); +} + +bool JoydriveMod::exit() +{ + return(true); +} + + +/* + Note the use of constructor chaining with ArAction. +*/ +JoydriveAction::JoydriveAction(void) : + ArAction("Joydrive Action", "This action reads the joystick and sets the translational and rotational velocity based on this.") +{ + // initialize the joystick + myJoyHandler.init(); + // set up the speed parameters on the joystick + myJoyHandler.setSpeeds(50, 700); +} + +JoydriveAction::~JoydriveAction(void) +{ + // it just removes itself from the robots action list + if (myRobot != NULL) + myRobot->remAction(this); +} + +// whether the joystick is there or not +bool JoydriveAction::joystickInited(void) +{ + return myJoyHandler.haveJoystick(); +} + +// the guts of the thing +ArActionDesired *JoydriveAction::fire(ArActionDesired currentDesired) +{ + int rot, trans; + + // print out some info about hte robot + printf("\rx %6.1f y %6.1f tth %6.1f vel %7.1f mpacs %3d", myRobot->getX(), + myRobot->getY(), myRobot->getTh(), myRobot->getVel(), + myRobot->getMotorPacCount()); + fflush(stdout); + + // see if one of the buttons is pushed, if so drive + if (myJoyHandler.haveJoystick() && (myJoyHandler.getButton(1) || + myJoyHandler.getButton(2))) + { + // get the readings from the joystick + myJoyHandler.getAdjusted(&rot, &trans); + // set what we want to do + myDesired.setVel(trans); + myDesired.setDeltaHeading(-rot); + // return the actionDesired + return &myDesired; + } + else + { + // set what we want to do + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + // return the actionDesired + return &myDesired; + } +} + diff --git a/Legacy/Aria/advanced/joydriveActionMod.vcproj b/Legacy/Aria/advanced/joydriveActionMod.vcproj new file mode 100644 index 0000000..e31922b --- /dev/null +++ b/Legacy/Aria/advanced/joydriveActionMod.vcproj @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/advanced/joydriveActionModule.cpp b/Legacy/Aria/advanced/joydriveActionModule.cpp new file mode 100644 index 0000000..aa85633 --- /dev/null +++ b/Legacy/Aria/advanced/joydriveActionModule.cpp @@ -0,0 +1,88 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +void printStatus(ArModuleLoader::Status status) +{ + if (status == ArModuleLoader::STATUS_ALREADY_LOADED) + printf("Module already loaded\n"); + else if (status == ArModuleLoader::STATUS_FAILED_OPEN) + printf("Failed to find or open the simpleMod module\n"); + else if (status == ArModuleLoader::STATUS_INVALID) + printf("Invalid file\n"); + else if (status == ArModuleLoader::STATUS_INIT_FAILED) + printf("Module Init failed\n"); + else if (status == ArModuleLoader::STATUS_SUCCESS) + printf("Module succedded\n"); + else if (status == ArModuleLoader::STATUS_EXIT_FAILED) + printf("Module exit sequence failed\n"); +} + +int main() +{ + ArModuleLoader::Status status; + ArSerialConnection con; + ArRobot robot; + int ret; + std::string str; + + Aria::init(); + + status=ArModuleLoader::load("./joydriveActionMod", &robot); + printStatus(status); + + if (status == ArModuleLoader::STATUS_INIT_FAILED) + return(1); + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + robot.run(true); + + status=ArModuleLoader::close("./joydriveActionMod"); + printStatus(status); + + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/advanced/joydriveActionModule.vcproj b/Legacy/Aria/advanced/joydriveActionModule.vcproj new file mode 100644 index 0000000..caf48cb --- /dev/null +++ b/Legacy/Aria/advanced/joydriveActionModule.vcproj @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/advanced/joydriveUserControl.cpp b/Legacy/Aria/advanced/joydriveUserControl.cpp new file mode 100644 index 0000000..3e4a784 --- /dev/null +++ b/Legacy/Aria/advanced/joydriveUserControl.cpp @@ -0,0 +1,110 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + std::string str; + int ret; + time_t lastTime; + int trans, rot; + + ArJoyHandler joyHandler; + ArSerialConnection con; + ArRobot robot(NULL, false); + + joyHandler.init(); + joyHandler.setSpeeds(100, 700); + + if (joyHandler.haveJoystick()) + { + printf("Have a joystick\n\n"); + } + else + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); +// exit(0); + } + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + exit(0); + } + + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + //robot.comInt(ArCommands::ENCODER, 1); + + //robot.comStrN(ArCommands::SAY, "\1\6\2\105", 4); + + lastTime = time(NULL); + while (1) + { + if (!robot.isConnected()) + { + printf("No longer connected to robot, exiting.\n"); + exit(0); + } + robot.loopOnce(); + if (lastTime != time(NULL)) + { + printf("\rx %6.1f y %6.1f tth %6.1f vel %7.1f mpacs %3d", robot.getX(), + robot.getY(), robot.getTh(), robot.getVel(), + robot.getMotorPacCount()); + fflush(stdout); + lastTime = time(NULL); + } + if (joyHandler.haveJoystick() && (joyHandler.getButton(1) || + joyHandler.getButton(2))) + { + if (ArMath::fabs(robot.getVel()) < 10.0) + robot.comInt(ArCommands::ENABLE, 1); + joyHandler.getAdjusted(&rot, &trans); + robot.comInt(ArCommands::VEL, trans); + robot.comInt(ArCommands::RVEL, -rot); + } + else + { + robot.comInt(ArCommands::VEL, 0); + robot.comInt(ArCommands::RVEL, 0); + } + ArUtil::sleep(100); + } + + +} + diff --git a/Legacy/Aria/advanced/peoplebotDemo.cpp b/Legacy/Aria/advanced/peoplebotDemo.cpp new file mode 100644 index 0000000..4d7144b --- /dev/null +++ b/Legacy/Aria/advanced/peoplebotDemo.cpp @@ -0,0 +1,1582 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +#define CAMERA_X_CORRECTION 0 +//-.085 +#define BACKUP_DIST -600 +#define BACKUP_TIME 3000 + +class ArActionTableSensorLimiter : public ArAction +{ +public: + ArActionTableSensorLimiter(void); + virtual ~ArActionTableSensorLimiter(void) {} + virtual ArActionDesired *fire(ArActionDesired currentDesired); +protected: + ArActionDesired myDesired; +}; + +ArActionTableSensorLimiter::ArActionTableSensorLimiter(void) : + ArAction("Table sensor limiter") +{ + +} + +ArActionDesired *ArActionTableSensorLimiter::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + +// Note the following commented out section will not work with IR's that +// are sent through byte 4 of the IO packet. +// Reference the NewTableSensingIR parameter + /* + printf("%d ", myRobot->getDigIn()); + if (!(myRobot->getDigIn() & ArUtil::BIT0)) + printf("leftTable "); + if (!(myRobot->getDigIn() & ArUtil::BIT1)) + printf("rightTable "); + if (!(myRobot->getDigIn() & ArUtil::BIT3)) + printf("leftBREAK "); + if (!(myRobot->getDigIn() & ArUtil::BIT2)) + printf("rightBREAK "); + printf("\n"); + */ + + if (myRobot->isLeftTableSensingIRTriggered() || + myRobot->isRightTableSensingIRTriggered()) + { + myDesired.setMaxVel(0); + return &myDesired; + } + return NULL; +} + +class DriveTo : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + DriveTo(ArACTS_1_2 *acts, ArGripper *gripper, ArPTZ *amptu); + ~DriveTo(void); + virtual ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArPTZ *myAMPTU; + ArPose myLastPose; + ArTime myLastMoved; + int myChannel; + bool myPickup; + State myState; + ArTime myLastSeen; +}; + +DriveTo::DriveTo(ArACTS_1_2 *acts, ArGripper *gripper, ArPTZ *amptu) : + ArAction("DriveTo", "Drives to something.") +{ + myActs = acts; + myGripper = gripper; + myAMPTU = amptu; + myChannel = 0; + myState = STATE_FAILED; + //setChannel(1); +} + +DriveTo::~DriveTo(void) +{ + +} + +ArActionDesired *DriveTo::fire(ArActionDesired currentDesired) +{ + ArACTSBlob blob; + double xRel, yRel; + ArPose pose; + double dist; + + if (myState == STATE_SUCCEEDED || myState == STATE_FAILED) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (myState == STATE_START_LOOKING) + { + myState = STATE_LOOKING; + myLastSeen.setToNow(); + myLastPose = myRobot->getPose(); + myLastMoved.setToNow(); + } + + pose = myRobot->getPose(); + dist = myLastPose.findDistanceTo(pose); + if (dist < 5 && myLastMoved.mSecSince() > 1500) + { + printf("DriveTo: Failed, no movement in the last 1500 msec.\n"); + myState = STATE_FAILED; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (dist > 5) + { + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (myActs->getNumBlobs(myChannel) == 0 || + !myActs->getBlob(myChannel, 1, &blob)) + { + if (myLastSeen.mSecSince() > 1000) + { + printf("DriveTo: Lost the blob, failed.\n"); + myState = STATE_FAILED; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + } + else + { + myLastSeen.setToNow(); + } + + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH + CAMERA_X_CORRECTION; + yRel = (double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + + //printf("xRel %.3f yRel %.3f\n", xRel, yRel); + + myDesired.reset(); + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (currentDesired.getMaxVelStrength() > 0 && + currentDesired.getMaxVel() < 125) + { + printf("DriveTo: Close to a wall of some sort, succeeded.\n"); + myState = STATE_SUCCEEDED; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (ArMath::fabs(xRel) < .10) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 20); + if (-xRel > 1.0) + myDesired.setDeltaHeading(20); + else if (-xRel < -1.0) + myDesired.setDeltaHeading(-20); + else + myDesired.setDeltaHeading(-xRel * 20); + } + myDesired.setVel(150); + return &myDesired; +} + +bool DriveTo::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + + +class PickUp : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + PickUp(ArACTS_1_2 *acts, ArGripper *gripper, ArPTZ *amptu); + ~PickUp(void); + virtual ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArPTZ *myAMPTU; + int myChannel; + bool myPickup; + bool myTried; + bool myPointedDown; + State myState; + ArPose myLastPose; + ArTime myLastMoved; + ArTime myLastSeen; + ArTime mySentGripper; + ArTime myTriedStart; + bool myWaitingOnGripper; + bool myWaitingOnLower; + bool myWaitingOnRaised; + bool myStartRaised; + bool myLowered; +}; + +PickUp::PickUp(ArACTS_1_2 *acts, ArGripper *gripper, ArPTZ *amptu) : + ArAction("PickUp", "Picks up something.") +{ + myActs = acts; + myGripper = gripper; + myAMPTU = amptu; + myChannel = 0; + myState = STATE_FAILED; + //setChannel(2); +} + +PickUp::~PickUp(void) +{ + +} + +ArActionDesired *PickUp::fire(ArActionDesired currentDesired) +{ + ArPose pose; + ArACTSBlob blob; + bool blobSeen = false; + double xRel, yRel; + double dist; + + + myDesired.reset(); + if (myState == STATE_SUCCEEDED) + { + //printf("PickUp: Succeeded\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myState == STATE_FAILED) + { + //printf("PickUp: Failed\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (myActs->getNumBlobs(myChannel) > 0 && + (blobSeen = myActs->getBlob(myChannel, 1, &blob))) + { + myLastSeen.setToNow(); + } + + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (myState == STATE_START_LOOKING) + { + myGripper->gripOpen(); + mySentGripper.setToNow(); + myPointedDown = false; + myState = STATE_LOOKING; + myLastSeen.setToNow(); + myTried = false; + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + myWaitingOnGripper = true; + myWaitingOnLower = false; + myLowered = false; + myWaitingOnRaised = false; + myStartRaised = false; + printf("@@@@@ Pickup: Starting\n"); + } + + // we want to sit still until the lift is down or for a second and a half + + if (myWaitingOnGripper) + { + if (mySentGripper.mSecSince() < 500 || + (myGripper->getGripState() != 1 + && mySentGripper.mSecSince() < 2000)) + { + myGripper->gripOpen(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + else + { + myWaitingOnGripper = false; + } + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + //printf("sensors %d %d stall %d %d\n",!(myRobot->getDigIn() & ArUtil::BIT2), + //!(myRobot->getDigIn() & ArUtil::BIT3), + //myRobot->isLeftMotorStalled(), myRobot->isRightMotorStalled()); + if ((myRobot->isLeftBreakBeamTriggered() && + myRobot->isRightBreakBeamTriggered()) || + myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + { + if (!myWaitingOnLower && !myLowered && !myWaitingOnRaised) + { + myWaitingOnLower = true; + printf("PickUp: Lowering gripper\n"); + mySentGripper.setToNow(); + } + } + if (myWaitingOnLower) + { + /// TODO + if (mySentGripper.mSecSince() < 600 || + (!myGripper->isLiftMaxed() + && mySentGripper.mSecSince() < 20000)) + { + myGripper->liftDown(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + else + { + myWaitingOnLower = false; + myWaitingOnRaised = true; + myStartRaised = true; + } + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (myWaitingOnRaised) + { + if (myStartRaised) + { + printf("PickUp: Raising gripper a little bit\n"); + myGripper->liftCarry(15); + mySentGripper.setToNow(); + myStartRaised = false; + } + if (mySentGripper.mSecSince() > 1000) + { + printf("PickUp: Raised the gripper a little bit\n"); + myWaitingOnRaised = false; + myLowered = true; + } + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + + if (myLowered && myGripper->getBreakBeamState() != 0) + { + if (!myTried) + { + printf("PickUp: Trying to pick up.\n"); + myTriedStart.setToNow(); + } + myTried = true; + myGripper->gripClose(); + if (myGripper->getGripState() == 2 || myTriedStart.mSecSince() > 5000) + { + printf("PickUp: Succeeded, have block.\n"); + myGripper->liftUp(); + myState = STATE_SUCCEEDED; + } + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + // this means that the grippers are closed, but we don't have anything in + // them, ie that we failed to get the block + else if (myTried && (myGripper->getGripState() == 2 || + myTriedStart.mSecSince() > 5000)) + { + myState = STATE_FAILED; + myGripper->gripOpen(); + ArUtil::sleep(3); + myGripper->liftUp(); + printf("PickUp: Grippers closed, didn't get a block, failed.\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + + pose = myRobot->getPose(); + dist = myLastPose.findDistanceTo(pose); + if (dist < 5 && myLastMoved.mSecSince() > 2500) + { + printf("PickUp: Failed, no movement in the last 2500 msec.\n"); + myState = STATE_FAILED; + myGripper->gripOpen(); + myGripper->liftUp(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (dist > 5) + { + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (!blobSeen) + { + if (((!myPointedDown && myLastSeen.mSecSince() > 1500) || + (myPointedDown && myLastSeen.mSecSince() > 4000)) && + myGripper->getBreakBeamState() == 0) + { + printf("PickUp: Lost the blob, failed, last saw it %ld msec ago.\n", + myLastSeen.mSecSince()); + myState = STATE_FAILED; + myGripper->gripOpen(); + ArUtil::sleep(3); + myGripper->liftUp(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + } + else + myLastSeen.setToNow(); + + if (blobSeen) + { + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH + CAMERA_X_CORRECTION; + yRel = -(double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + //printf("xRel %.3f yRel %.3f: ", xRel, yRel); + } + else + { + //printf("No blob: "); + } + + if (blobSeen && yRel < -.2 && !myPointedDown) + { + printf("PickUp: Pointing the camera down!!!\n"); + myAMPTU->panTilt(0, -75); + myPointedDown = true; + } + + + if (!blobSeen || ArMath::fabs(xRel) < .001) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 30); + if (-xRel > 1.0) + myDesired.setDeltaHeading(30); + else if (-xRel < -1.0) + myDesired.setDeltaHeading(-30); + else + myDesired.setDeltaHeading(-xRel * 30); + } + if (myRobot->isLeftTableSensingIRTriggered() || + myRobot->isRightTableSensingIRTriggered()) + myDesired.setVel(50); + else + myDesired.setVel(100); + return &myDesired; +} + +bool PickUp::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class DropOff : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + DropOff(ArACTS_1_2 *acts, ArGripper *gripper, ArPTZ *amptu); + ~DropOff(void); + virtual ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } + enum { + WIDTH = 160, + HEIGHT = 120 + }; +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArPTZ *myAMPTU; + int myChannel; + bool myPickup; + bool myTried; + bool myPointedDown; + State myState; + ArPose myLastPose; + ArTime myLastMoved; + ArTime myLastSeen; + ArTime mySentGripper; + ArTime myTriedStart; + bool myWaitingOnGripper; + bool myWaitingOnLower; + bool myWaitingOnRaised; + bool myStartRaised; + bool myLowered; +}; + +DropOff::DropOff(ArACTS_1_2 *acts, ArGripper *gripper, ArPTZ *amptu) : + ArAction("DropOff", "Picks up something.") +{ + myActs = acts; + myGripper = gripper; + myAMPTU = amptu; + myChannel = 0; + myState = STATE_FAILED; + //setChannel(2); +} + +DropOff::~DropOff(void) +{ + +} + +ArActionDesired *DropOff::fire(ArActionDesired currentDesired) +{ + ArPose pose; + ArACTSBlob blob; + bool blobSeen = false; + double xRel, yRel; + double dist; + + + myDesired.reset(); + if (myState == STATE_SUCCEEDED) + { + printf("DropOff: Succeeded\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myState == STATE_FAILED) + { + printf("DropOff: Failed\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (myActs->getNumBlobs(myChannel) > 0 && + (blobSeen = myActs->getBlob(myChannel, 1, &blob))) + { + myLastSeen.setToNow(); + } + + // this if the stuff we want to do if we're not going to just drive forward + // and home in on the color, ie the pickup-specific stuff + if (myState == STATE_START_LOOKING) + { + mySentGripper.setToNow(); + myPointedDown = false; + myState = STATE_LOOKING; + myLastSeen.setToNow(); + myTried = false; + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + //myWaitingOnGripper = true; + myWaitingOnLower = false; + myLowered = false; + myWaitingOnRaised = false; + myStartRaised = false; + printf("@@@@@ DropOff: Starting\n"); + } + + // we want to sit still until the lift is down or for a second and a half + /* + if (myWaitingOnGripper) + { + if (mySentGripper.mSecSince() < 500 || + (myGripper->getGripState() != 1 + && mySentGripper.mSecSince() < 4000)) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + else + { + myWaitingOnGripper = false; + } + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + */ + //printf("sensors %d %d stall %d %d\n",!(myRobot->getDigIn() & ArUtil::BIT2), + //!(myRobot->getDigIn() & ArUtil::BIT3), + //myRobot->isLeftMotorStalled(), myRobot->isRightMotorStalled()); + if ((myRobot->isLeftBreakBeamTriggered() && + myRobot->isRightBreakBeamTriggered()) || + myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + { + if (!myWaitingOnLower && !myLowered && !myWaitingOnRaised) + { + myWaitingOnLower = true; + printf("DropOff: Lowering gripper\n"); + mySentGripper.setToNow(); + } + } + if (myWaitingOnLower) + { + /// TODO + if (mySentGripper.mSecSince() < 600 || + (!myGripper->isLiftMaxed() && mySentGripper.mSecSince() < 20000)) + { + myGripper->liftDown(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + else + { + printf("DropOff: Lowered!\n"); + myWaitingOnLower = false; + myWaitingOnRaised = true; + myStartRaised = true; + } + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (myWaitingOnRaised) + { + if (myStartRaised) + { + printf("DropOff: Raising gripper a little bit\n"); + myGripper->liftCarry(15); + mySentGripper.setToNow(); + myStartRaised = false; + } + if (mySentGripper.mSecSince() > 1000) + { + printf("DropOff: Raised the gripper a little bit\n"); + myWaitingOnRaised = false; + myLowered = true; + } + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + return &myDesired; + } + + if (myLowered) + { + if (!myTried) + { + printf("DropOff: Trying to let go of the block.\n"); + myTriedStart.setToNow(); + myTried = true; + } + myGripper->gripOpen(); + if (myGripper->getGripState() == 1 || myTriedStart.mSecSince() > 3000) + { + printf("DropOff: Succeeded, dropped off the block.\n"); + myGripper->liftUp(); + myState = STATE_SUCCEEDED; + } + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + pose = myRobot->getPose(); + dist = myLastPose.findDistanceTo(pose); + if (dist < 5 && myLastMoved.mSecSince() > 2500) + { + printf("DropOff: Failed, no movement in the last 2500 msec.\n"); + myState = STATE_FAILED; + myGripper->gripOpen(); + myGripper->liftUp(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (dist > 5) + { + myLastMoved.setToNow(); + myLastPose = myRobot->getPose(); + } + + if (!blobSeen) + { + if (((!myPointedDown && myLastSeen.mSecSince() > 1500) || + (myPointedDown && myLastSeen.mSecSince() > 4000)) && + myGripper->getBreakBeamState() == 0) + { + printf("DropOff: Lost the blob, failed, last saw it %ld msec ago.\n", + myLastSeen.mSecSince()); + myState = STATE_FAILED; + myGripper->gripOpen(); + ArUtil::sleep(3); + myGripper->liftUp(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + } + else + myLastSeen.setToNow(); + + if (blobSeen) + { + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH + CAMERA_X_CORRECTION; + yRel = -(double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + //printf("xRel %.3f yRel %.3f: ", xRel, yRel); + } + else + { + //printf("No blob: "); + } + + if (blobSeen && yRel < -.2 && !myPointedDown) + { + printf("DropOff: Pointing the camera down!!!\n"); + myAMPTU->panTilt(0, -75); + myPointedDown = true; + } + + + if (!blobSeen || ArMath::fabs(xRel) < .001) + { + //printf("Going straight ahead\n"); + myDesired.setDeltaHeading(0); + } + else + { + //printf("Turning %.2f\n", -xRel * 30); + if (-xRel > 1.0) + myDesired.setDeltaHeading(30); + else if (-xRel < -1.0) + myDesired.setDeltaHeading(-30); + else + myDesired.setDeltaHeading(-xRel * 30); + } + if (myRobot->isLeftTableSensingIRTriggered() || + myRobot->isRightTableSensingIRTriggered()) + myDesired.setVel(50); + else + myDesired.setVel(100); + return &myDesired; +} + +bool DropOff::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class Acquire : public ArAction +{ +public: + enum State { + STATE_START_LOOKING, + STATE_LOOKING, + STATE_FAILED, + STATE_SUCCEEDED + }; + Acquire(ArACTS_1_2 *acts, ArGripper *gripper); + virtual ~Acquire(void); + virtual ArActionDesired *fire(ArActionDesired currentDesired); + bool setChannel(int channel); + State getState(void) { return myState; } +protected: + State myState; + int myChannel; + ArSectors myFirstTurn; + ArSectors mySecondTurn; + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArGripper *myGripper; + ArTime myStartUp; + bool myTryingGripper; +}; + +Acquire::Acquire(ArACTS_1_2 *acts, ArGripper *gripper) : + ArAction("Acquire", "Turns until it can find the given channel, gives up after 1 revolution") +{ + myActs = acts; + myGripper = gripper; + myState = STATE_FAILED; +} + +Acquire::~Acquire(void) +{ +} + +ArActionDesired *Acquire::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + myDesired.setVel(0); + //printf("%d %d %d\n", myActs->getNumBlobs(1),myActs->getNumBlobs(2), + //myActs->getNumBlobs(3)); + switch (myState) { + case STATE_START_LOOKING: + myFirstTurn.clear(); + mySecondTurn.clear(); + myState = STATE_LOOKING; + myGripper->liftUp(); + myGripper->gripClose(); + printf("Acquire: Raising lift\n"); + myStartUp.setToNow(); + myTryingGripper = true; + case STATE_LOOKING: + /// TODO + if (myTryingGripper && (myStartUp.mSecSince() < 600 || + ((!myGripper->isLiftMaxed() || + myGripper->getGripState() != 2) && + myStartUp.mSecSince() < 20000))) + { + myGripper->liftUp(); + myGripper->gripClose(); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myTryingGripper) + { + printf("Acquire: Done raising lift %ld after started.\n", + myStartUp.mSecSince()); + myTryingGripper = false; + } + if (myActs->getNumBlobs(myChannel) > 0) + { + myDesired.setDeltaHeading(0); + myState = STATE_SUCCEEDED; + printf("Acquire: Succeeded!\n"); + } + else if (myFirstTurn.didAll() && mySecondTurn.didAll()) + { + myDesired.setDeltaHeading(0); + myState = STATE_FAILED; + printf("Acquire: Did two revolutions, didn't see the blob, Failed!\n"); + } + else + { + myFirstTurn.update(myRobot->getTh()); + if (myFirstTurn.didAll()) + mySecondTurn.update(myRobot->getTh()); + myDesired.setDeltaHeading(8); + } + return &myDesired; + default: + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } +} + +bool Acquire::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + myState = STATE_START_LOOKING; + return true; + } + else + return false; +} + +class TakeBlockToWall +{ +public: + enum State { + STATE_START, + STATE_ACQUIRE_BLOCK, + STATE_PICKUP_BLOCK, + STATE_BACKUP, + STATE_FORWARD, + STATE_ACQUIRE_BLOCK2, + STATE_PICKUP_BLOCK2, + STATE_PICKUP_BACKUP, + STATE_ACQUIRE_DROP_WALL, + STATE_DRIVETO_DROP_WALL, + STATE_DROP_BACKUP, + STATE_ACQUIRE_LAP_WALL, + STATE_DRIVETO_LAP_WALL, + STATE_BACKUP_LAP_WALL, + STATE_FORWARD_LAP_WALL, + STATE_SWITCH, + STATE_FAILED + }; + TakeBlockToWall(ArRobot *robot, ArGripper *gripper, ArPTZ *amptu, + Acquire *acquire, DriveTo *driveTo, PickUp *pickUp, + DropOff *dropOff, + ArActionTableSensorLimiter *tableLimiter); + ~TakeBlockToWall(void); + void handler(void); + void setState(State state); + enum Color { + COLOR_FIRST_WALL = 1, + COLOR_SECOND_WALL = 3, + COLOR_BLOCK = 2 + }; + +protected: + ArTime myStateStartTime; + ArPose myStateStartPos; + ArRobot *myRobot; + ArFunctorC myHandlerCB; + ArGripper *myGripper; + ArPTZ *myAMPTU; + Acquire *myAcquire; + DriveTo *myDriveTo; + DropOff *myDropOff; + PickUp *myPickUp; + ArActionTableSensorLimiter *myTableLimiter; + State myState; + Color myDropWall; + Color myLapWall; + bool myNewState; + bool myGripOpenSent; +}; + +TakeBlockToWall::TakeBlockToWall(ArRobot *robot, ArGripper *gripper, + ArPTZ *amptu, Acquire *acquire, + DriveTo *driveTo, PickUp *pickUp, + DropOff *dropOff, + ArActionTableSensorLimiter *tableLimiter) : + myHandlerCB(this, &TakeBlockToWall::handler) +{ + myRobot = robot; + myRobot->addUserTask("TakeBlockToWall", 75, &myHandlerCB); + myGripper = gripper; + myAcquire = acquire; + myDriveTo = driveTo; + myDropOff = dropOff; + myTableLimiter = tableLimiter; + myPickUp = pickUp; + myAMPTU = amptu; + myState = STATE_START; + myNewState = true; +} + +TakeBlockToWall::~TakeBlockToWall(void) +{ +} + +void TakeBlockToWall::setState(State state) +{ + myState = state; + myNewState = true; + myStateStartTime.setToNow(); + myStateStartPos = myRobot->getPose(); +} + + +void TakeBlockToWall::handler(void) +{ + Color tempColor; + + switch (myState) + { + case STATE_START: + setState(STATE_ACQUIRE_BLOCK); + myDropWall = COLOR_FIRST_WALL; + myLapWall = COLOR_SECOND_WALL; + printf("!! Started state handling!\n"); + //handler(); + return; + break; + case STATE_ACQUIRE_BLOCK: + if (myNewState) + { + printf("!! Acquire block\n"); + myNewState = false; + myAMPTU->panTilt(0, -40); + myAcquire->activate(); + myAcquire->setChannel(COLOR_BLOCK); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myGripper->getGripState() == 2 && + myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock: Successful (have cube?)\n"); + setState(STATE_PICKUP_BACKUP); + //handler(); + return; + } + else if (myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock: Successful (cube in gripper?)\n"); + setState(STATE_PICKUP_BLOCK); + //handler(); + return; + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStartTime.mSecSince() > 35000) + { + printf("###### AcqiureBlock: failed\n"); + setState(STATE_BACKUP); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireBlock: successful\n"); + setState(STATE_PICKUP_BLOCK); + //handler(); + return; + } + break; + case STATE_PICKUP_BLOCK: + if (myNewState) + { + printf("!! Pickup block\n"); + myNewState = false; + myAMPTU->panTilt(0, -35); + myAcquire->deactivate(); + myPickUp->activate(); + myPickUp->setChannel(COLOR_BLOCK); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myPickUp->getState() == PickUp::STATE_FAILED) + { + printf("###### PickUpBlock: failed\n"); + setState(STATE_BACKUP); + //handler(); + return; + } + else if (myPickUp->getState() == PickUp::STATE_SUCCEEDED) + { + printf("###### PickUpBlock: successful\n"); + setState(STATE_PICKUP_BACKUP); + //handler(); + return; + } + break; + case STATE_BACKUP: + if (myNewState) + { + myNewState = false; + myRobot->move(BACKUP_DIST * .75); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + { + printf("###### Backup: Failed, going forwards\n"); + myRobot->clearDirectMotion(); + setState(STATE_FORWARD); + } + if (myStateStartTime.mSecSince() > BACKUP_TIME || + myStateStartPos.findDistanceTo(myRobot->getPose()) > BACKUP_DIST * .95 * .75) + { + printf("###### Backup: Succeeded\n"); + myRobot->clearDirectMotion(); + setState(STATE_ACQUIRE_BLOCK2); + //handler(); + return; + } + break; + case STATE_FORWARD: + if (myNewState) + { + myNewState = false; + myRobot->move(-BACKUP_DIST * .75); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + { + printf("###### Forward: Failed\n"); + myRobot->clearDirectMotion(); + setState(STATE_FAILED); + } + if (myStateStartTime.mSecSince() > BACKUP_TIME || + myStateStartPos.findDistanceTo(myRobot->getPose()) > + ArMath::fabs(BACKUP_DIST * .95 * .75)) + { + printf("###### Forward: Succeeded\n"); + myRobot->clearDirectMotion(); + setState(STATE_ACQUIRE_BLOCK2); + //handler(); + return; + } + break; + case STATE_ACQUIRE_BLOCK2: + if (myNewState) + { + printf("!! Acquire block 2\n"); + myNewState = false; + myAMPTU->panTilt(0, -40); + myAcquire->activate(); + myAcquire->setChannel(COLOR_BLOCK); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myGripper->getGripState() == 2 && + myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock2: Successful (have cube?)\n"); + setState(STATE_PICKUP_BACKUP); + //handler(); + return; + } + else if (myGripper->getBreakBeamState() != 0) + { + printf("###### AcquireBlock2: Successful (cube in gripper?)\n"); + setState(STATE_PICKUP_BLOCK2); + //handler(); + return; + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStartTime.mSecSince() > 35000) + { + printf("###### AcqiureBlock2: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireBlock2: successful\n"); + setState(STATE_PICKUP_BLOCK2); + //handler(); + return; + } + break; + case STATE_PICKUP_BLOCK2: + if (myNewState) + { + printf("!! Pickup block 2\n"); + myNewState = false; + myAcquire->deactivate(); + myPickUp->activate(); + myAMPTU->panTilt(0, -55); + myPickUp->setChannel(COLOR_BLOCK); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myPickUp->getState() == PickUp::STATE_FAILED) + { + printf("###### PickUpBlock2: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myPickUp->getState() == PickUp::STATE_SUCCEEDED) + { + printf("###### PickUpBlock2: successful\n"); + setState(STATE_PICKUP_BACKUP); + //handler(); + return; + } + break; + case STATE_PICKUP_BACKUP: + if (myNewState) + { + myNewState = false; + myRobot->move(BACKUP_DIST); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myStateStartTime.mSecSince() > BACKUP_TIME || + myStateStartPos.findDistanceTo(myRobot->getPose()) > + ArMath::fabs(BACKUP_DIST * .95)) + { + printf("###### PickUp_BackUp: done\n"); + myRobot->clearDirectMotion(); + setState(STATE_ACQUIRE_DROP_WALL); + //handler(); + return; + } + break; + case STATE_ACQUIRE_DROP_WALL: + if (myNewState) + { + printf("!! Acquire Drop wall, channel %d\n", myDropWall); + myNewState = false; + myAMPTU->panTilt(0, -30); + myAcquire->activate(); + myAcquire->setChannel(myDropWall); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myGripper->getGripState() != 2 || + myGripper->getBreakBeamState() == 0) + { + printf("###### AcquireDropWall:: failed (lost cube %d %d)\n", + myGripper->getGripState(), myGripper->getBreakBeamState()); + setState(STATE_BACKUP); + //handler(); + return; + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStartTime.mSecSince() > 35000) + { + printf("###### AcquireDropWall:: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireDropWall: successful\n"); + setState(STATE_DRIVETO_DROP_WALL); + //handler(); + return; + } + break; + case STATE_DRIVETO_DROP_WALL: + if (myNewState) + { + printf("!! DropOff Drop wall, channel %d\n", myDropWall); + myNewState = false; + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->activate(); + myDropOff->setChannel(myDropWall); + myTableLimiter->deactivate(); + } + if (myDropOff->getState() == DropOff::STATE_FAILED) + { + printf("###### DropOffDropWall: failed\n"); + setState(STATE_FAILED); + //handler(); + return; + } + else if (myDropOff->getState() == DropOff::STATE_SUCCEEDED) + { + printf("###### DropOffDropWall: succesful\n"); + setState(STATE_DROP_BACKUP); + //handler(); + return; + } + break; + case STATE_DROP_BACKUP: + if (myNewState) + { + myNewState = false; + myRobot->move(BACKUP_DIST); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myStateStartTime.mSecSince() > BACKUP_TIME || + myStateStartPos.findDistanceTo(myRobot->getPose()) > + ArMath::fabs(BACKUP_DIST * .95)) + { + printf("###### Drop_Backup: done\n"); + myRobot->clearDirectMotion(); + setState(STATE_ACQUIRE_LAP_WALL); + //handler(); + return; + } + break; + case STATE_ACQUIRE_LAP_WALL: + if (myNewState) + { + printf("!! Acquire Lap wall, channel %d\n", myLapWall); + myNewState = false; + myAMPTU->panTilt(0, -30); + myAcquire->activate(); + myAcquire->setChannel(myLapWall); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->activate(); + } + if (myAcquire->getState() == Acquire::STATE_FAILED || + myStateStartTime.mSecSince() > 35000) + { + printf("###### AcquireLapWall:: failed\n"); + setState(STATE_SWITCH); + //handler(); + return; + } + else if (myAcquire->getState() == Acquire::STATE_SUCCEEDED) + { + printf("###### AcquireLapWall: successful\n"); + setState(STATE_DRIVETO_LAP_WALL); + //handler(); + return; + } + break; + case STATE_DRIVETO_LAP_WALL: + if (myNewState) + { + printf("!! Driveto Lap wall, channel %d\n", myLapWall); + myNewState = false; + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->activate(); + myDriveTo->setChannel(myLapWall); + myDropOff->deactivate(); + myTableLimiter->activate(); + } + if (myDriveTo->getState() == DriveTo::STATE_FAILED) + { + printf("###### DriveToLapWall: failed\n"); + setState(STATE_BACKUP_LAP_WALL); + //handler(); + return; + } + else if (myDriveTo->getState() == DriveTo::STATE_SUCCEEDED) + { + printf("###### DriveToLapWall: succesful\n"); + setState(STATE_BACKUP_LAP_WALL); + //handler(); + return; + } + break; + case STATE_BACKUP_LAP_WALL: + if (myNewState) + { + myNewState = false; + myRobot->move(BACKUP_DIST * .75); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + { + printf("###### BackupLapWall: Failed, going forwards\n"); + myRobot->clearDirectMotion(); + setState(STATE_FORWARD_LAP_WALL); + } + if (myStateStartTime.mSecSince() > BACKUP_TIME || + myStateStartPos.findDistanceTo(myRobot->getPose()) > + ArMath::fabs(BACKUP_DIST * .95 * .75)) + { + printf("###### BackupLapWall: Succeeded\n"); + myRobot->clearDirectMotion(); + setState(STATE_SWITCH); + //handler(); + return; + } + break; + case STATE_FORWARD_LAP_WALL: + if (myNewState) + { + myNewState = false; + myRobot->move(-BACKUP_DIST * .75); + myAcquire->deactivate(); + myPickUp->deactivate(); + myDriveTo->deactivate(); + myDropOff->deactivate(); + myTableLimiter->deactivate(); + } + if (myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) + { + printf("###### ForwardLapWall: Failed\n"); + myRobot->clearDirectMotion(); + setState(STATE_FAILED); + } + if (myStateStartTime.mSecSince() > BACKUP_TIME || + myStateStartPos.findDistanceTo(myRobot->getPose()) > + ArMath::fabs(BACKUP_DIST * .95 * .75)) + { + printf("###### ForwardLapWall: Succeeded\n"); + myRobot->clearDirectMotion(); + setState(STATE_SWITCH); + //handler(); + return; + } + break; + + case STATE_SWITCH: + printf("!! Switching walls around.\n"); + tempColor = myDropWall; + myDropWall = myLapWall; + myLapWall = tempColor; + setState(STATE_ACQUIRE_BLOCK); + //handler(); + return; + case STATE_FAILED: + printf("@@@@@ Failed to complete the task!\n"); + myRobot->comInt(ArCommands::SONAR, 0); + ArUtil::sleep(50); + myRobot->comStr(ArCommands::SAY, "\52\77\37\62\42\70"); + ArUtil::sleep(500); + Aria::shutdown(); + myRobot->disconnect(); + myRobot->stopRunning(); + return; + } + +} + +int main(void) +{ + ArSerialConnection con; + ArRobot robot; + int ret; + std::string str; + ArActionLimiterForwards limiter("speed limiter near", 225, 600, 250); + ArActionLimiterForwards limiterFar("speed limiter far", 225, 1100, 400); + ArActionTableSensorLimiter tableLimiter; + ArActionLimiterBackwards backwardsLimiter; + ArActionConstantVelocity stop("stop", 0); + ArSonarDevice sonar; + ArACTS_1_2 acts; + ArPTZ *ptz; + ptz = new ArVCC4(&robot, true); + ArGripper gripper(&robot); + + Acquire acq(&acts, &gripper); + DriveTo driveTo(&acts, &gripper, ptz); + DropOff dropOff(&acts, &gripper, ptz); + PickUp pickUp(&acts, &gripper, ptz); + + + TakeBlockToWall takeBlock(&robot, &gripper, ptz, &acq, &driveTo, &pickUp, + &dropOff, &tableLimiter); + + if (!acts.openPort(&robot)) + { + printf("Could not connect to acts, exiting\n"); + exit(0); + } + Aria::init(); + + robot.addRangeDevice(&sonar); + //con.setBaud(38400); + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + ptz->init(); + ArUtil::sleep(8000); + printf("### 2222\n"); + ptz->panTilt(0, -40); + printf("### whee\n"); + ArUtil::sleep(8000); + robot.setAbsoluteMaxTransVel(400); + + robot.setStateReflectionRefreshTime(250); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + ArUtil::sleep(200); + robot.addAction(&tableLimiter, 100); + robot.addAction(&limiter, 99); + robot.addAction(&limiterFar, 98); + robot.addAction(&backwardsLimiter, 97); + robot.addAction(&acq, 77); + robot.addAction(&driveTo, 76); + robot.addAction(&pickUp, 75); + robot.addAction(&dropOff, 74); + robot.addAction(&stop, 30); + + robot.run(true); + + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/advanced/sickAutoLogger.cpp b/Legacy/Aria/advanced/sickAutoLogger.cpp new file mode 100644 index 0000000..ca9eb53 --- /dev/null +++ b/Legacy/Aria/advanced/sickAutoLogger.cpp @@ -0,0 +1,217 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + bool done; + double distToTravel = 2300; + + // whether to use the sim for the laser or not, if you use the sim + // for hte laser, you have to use the sim for the robot too + bool useSim = false; + // the laser + ArSick sick; + // connection + ArDeviceConnection *con; + // Laser connection + ArSerialConnection laserCon; + // robot + ArRobot robot; + + // set a default filename + //std::string filename = "c:\\log\\1scans.2d"; + std::string filename = "1scans.2d"; + // see if we want to use a different filename + //if (argc > 1) + //Lfilename = argv[1]; + printf("Logging to file %s\n", filename.c_str()); + // start the logger with good values + sick.configureShort(useSim, ArSick::BAUD38400, + ArSick::DEGREES180, ArSick::INCREMENT_HALF); + ArSickLogger logger(&robot, &sick, 300, 25, filename.c_str()); + + // mandatory init + Aria::init(); + + // add it to the robot + robot.addRangeDevice(&sick); + + //ArAnalogGyro gyro(&robot); + + + // if we're not using the sim, make a serial connection and set it up + if (!useSim) + { + ArSerialConnection *serCon; + serCon = new ArSerialConnection; + serCon->setPort(); + //serCon->setBaud(38400); + con = serCon; + } + // if we are using the sim, set up a tcp connection + else + { + ArTcpConnection *tcpCon; + tcpCon = new ArTcpConnection; + tcpCon->setPort(); + con = tcpCon; + } + + // set the connection on the robot + robot.setDeviceConnection(con); + // try to connect, if we fail exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + + // set up a key handler so escape exits and attach to the robot + ArKeyHandler keyHandler; + robot.attachKeyHandler(&keyHandler); + + // run the robot, true here so that the run will exit if connection lost + robot.runAsync(true); + + + + // if we're not using the sim, set up the port for the laser + if (!useSim) + { + laserCon.setPort(ArUtil::COM3); + sick.setDeviceConnection(&laserCon); + } + + + // now that we're connected to the robot, connect to the laser + sick.runAsync(); + + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + robot.disconnect(); + Aria::shutdown(); + return 1; + } + +#ifdef WIN32 + // wait until someone pushes the motor button to go + while (1) + { + robot.lock(); + if (!robot.isRunning()) + exit(0); + if (robot.areMotorsEnabled()) + { + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(100); + } +#endif + + // basically from here on down the robot just cruises around a bit + + robot.lock(); + // enable the motors, disable amigobot sounds + robot.comInt(ArCommands::ENABLE, 1); + + ArTime startTime; + // move a couple meters + robot.move(distToTravel); + robot.unlock(); + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + robot.setHeading(0); + done = robot.isMoveDone(60); + robot.unlock(); + } while (!done); + + /* + // rotate a few times + robot.lock(); + robot.setVel(0); + robot.setRotVel(60); + robot.unlock(); + ArUtil::sleep(12000); + */ + + robot.lock(); + robot.setHeading(180); + robot.unlock(); + do { + ArUtil::sleep(100); + robot.lock(); + robot.setHeading(180); + done = robot.isHeadingDone(); + robot.unlock(); + } while (!done); + + // move a couple meters + robot.lock(); + robot.move(distToTravel); + robot.unlock(); + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + robot.setHeading(180); + done = robot.isMoveDone(60); + robot.unlock(); + } while (!done); + + robot.lock(); + robot.setHeading(0); + robot.setVel(0); + robot.unlock(); + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + robot.setHeading(0); + done = robot.isHeadingDone(); + robot.unlock(); + } while (!done); + + + sick.lockDevice(); + sick.disconnect(); + sick.unlockDevice(); + robot.lock(); + robot.disconnect(); + robot.unlock(); + // now exit + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/advanced/sickAutoLogger.vcproj b/Legacy/Aria/advanced/sickAutoLogger.vcproj new file mode 100644 index 0000000..01fec3c --- /dev/null +++ b/Legacy/Aria/advanced/sickAutoLogger.vcproj @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/advanced/sickSpinLogger.cpp b/Legacy/Aria/advanced/sickSpinLogger.cpp new file mode 100644 index 0000000..7f6c957 --- /dev/null +++ b/Legacy/Aria/advanced/sickSpinLogger.cpp @@ -0,0 +1,162 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + bool done; + double distToTravel = 2300; + + // whether to use the sim for the laser or not, if you use the sim + // for hte laser, you have to use the sim for the robot too + bool useSim = false; + // the laser + ArSick sick; + // connection + ArDeviceConnection *con; + // Laser connection + ArSerialConnection laserCon; + // robot + ArRobot robot; + + // set a default filename + //std::string filename = "c:\\log\\1scans.2d"; + std::string filename = "1scans.2d"; + // see if we want to use a different filename + //if (argc > 1) + //Lfilename = argv[1]; + printf("Logging to file %s\n", filename.c_str()); + // start the logger with good values + sick.configureShort(useSim, ArSick::BAUD38400, + ArSick::DEGREES180, ArSick::INCREMENT_HALF); + ArSickLogger logger(&robot, &sick, 300, 25, filename.c_str()); + + // mandatory init + Aria::init(); + + // add it to the robot + robot.addRangeDevice(&sick); + + //ArAnalogGyro gyro(&robot); + + + // if we're not using the sim, make a serial connection and set it up + if (!useSim) + { + ArSerialConnection *serCon; + serCon = new ArSerialConnection; + serCon->setPort(); + //serCon->setBaud(38400); + con = serCon; + } + // if we are using the sim, set up a tcp connection + else + { + ArTcpConnection *tcpCon; + tcpCon = new ArTcpConnection; + tcpCon->setPort(); + con = tcpCon; + } + + // set the connection on the robot + robot.setDeviceConnection(con); + // try to connect, if we fail exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + + // set up a key handler so escape exits and attach to the robot + ArKeyHandler keyHandler; + robot.attachKeyHandler(&keyHandler); + + // run the robot, true here so that the run will exit if connection lost + robot.runAsync(true); + + + + // if we're not using the sim, set up the port for the laser + if (!useSim) + { + laserCon.setPort(ArUtil::COM3); + sick.setDeviceConnection(&laserCon); + } + + + // now that we're connected to the robot, connect to the laser + sick.runAsync(); + + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + robot.disconnect(); + Aria::shutdown(); + return 1; + } + +#ifdef WIN32 + // wait until someone pushes the motor button to go + while (1) + { + robot.lock(); + if (!robot.isRunning()) + exit(0); + if (robot.areMotorsEnabled()) + { + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(100); + } +#endif + + // basically from here on down the robot just cruises around a bit + + robot.lock(); + // enable the motors, disable amigobot sounds + robot.comInt(ArCommands::ENABLE, 1); + + // move a couple meters + robot.setRotVel(3000); + robot.unlock(); + + ArUtil::sleep(15 * 1000); + + robot.lock(); + robot.disconnect(); + robot.unlock(); + keyHandler.restore(); + exit(1); + + // now exit + return 0; +} + diff --git a/Legacy/Aria/advanced/sickSquareLogger.cpp b/Legacy/Aria/advanced/sickSquareLogger.cpp new file mode 100644 index 0000000..e55f980 --- /dev/null +++ b/Legacy/Aria/advanced/sickSquareLogger.cpp @@ -0,0 +1,214 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArRobot *robot; + +void printer(void) +{ + printf("vel %5.0f rot vel %5.0f\n", robot->getVel(), robot->getRotVel()); +} + + +int main(int argc, char **argv) +{ + double speed = 1000; + double squareSide = 2000; + + // whether to use the sim for the laser or not, if you use the sim + // for hte laser, you have to use the sim for the robot too + // robot + robot = new ArRobot; + // the laser + ArSick sick; + // set up our simpleConnector + ArSimpleConnector simpleConnector(&argc, argv); + + // set up a key handler so escape exits and attach to the robot + ArKeyHandler keyHandler; + robot->attachKeyHandler(&keyHandler); + + // parse its arguments + if (simpleConnector.parseArgs()) + { + simpleConnector.logOptions(); + keyHandler.restore(); + exit(1); + } + + // if there are more arguments left then it means we didn't + // understand an option + /* + if (argc > 1) + { + simpleConnector.logOptions(); + keyHandler.restore(); + exit(1); + } + */ + + // set a default filename + //std::string filename = "c:\\log\\1scans.2d"; + std::string filename = "1scans.2d"; + // see if we want to use a different filename + //if (argc > 1) + //Lfilename = argv[1]; + printf("Logging to file %s\n", filename.c_str()); + // start the logger with good values + + //sick.configureShort(useSim, ArSick::BAUD38400, ArSick::DEGREES180, ArSick::INCREMENT_HALF); + ArSickLogger logger(robot, &sick, 300, 25, filename.c_str()); + + // mandatory init + Aria::init(); + + // add it to the robot + robot->addRangeDevice(&sick); + + //ArAnalogGyro gyro(robot); + + + // set up the robot for connecting + if (!simpleConnector.connectRobot(robot)) + { + printf("Could not connect to robot->.. exiting\n"); + Aria::shutdown(); + return 1; + } + + robot->setRotVelMax(300); + robot->setRotAccel(300); + robot->setRotDecel(300); + + robot->setAbsoluteMaxTransVel(2000); + robot->setTransVelMax(2000); + robot->setTransAccel(500); + robot->setTransDecel(500); + /* + robot->comInt(82, 30); // rotkp + robot->comInt(83, 200); // rotkv + robot->comInt(84, 0); // rotki + robot->comInt(85, 15); // transkp + robot->comInt(86, 450); // transkv + robot->comInt(87, 4); // transki + */ + robot->comInt(82, 30); // rotkp + robot->comInt(83, 200); // rotkv + robot->comInt(84, 0); // rotki + robot->comInt(85, 30); // transkp + robot->comInt(86, 450); // transkv + robot->comInt(87, 4); // transki + // run the robot, true here so that the run will exit if connection lost + robot->runAsync(true); + + + + // set up the laser before handing it to the laser mode + simpleConnector.setupLaser(&sick); + + // now that we're connected to the robot, connect to the laser + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + robot->disconnect(); + Aria::shutdown(); + return 1; + } + + robot->lock(); + robot->addUserTask("printer", 50, new ArGlobalFunctor(&printer)); + robot->unlock(); + +#ifdef WIN32 + // wait until someone pushes the motor button to go + while (1) + { + robot->lock(); + if (!robot->isRunning()) + exit(0); + if (robot->areMotorsEnabled()) + { + robot->unlock(); + break; + } + robot->unlock(); + ArUtil::sleep(100); + } +#endif + + // basically from here on down the robot just cruises around a bit + + printf("Starting moving\n"); + robot->lock(); + // enable the motors, disable amigobot sounds + robot->comInt(ArCommands::ENABLE, 1); + robot->setHeading(0); + robot->setVel(1000); + robot->unlock(); + + ArUtil::sleep(speed / 500.0 * 1000.0); + printf("Should be up to speed, moving on first side\n"); + ArUtil::sleep(squareSide / speed * 1000); + printf("Turning to second side\n"); + robot->lock(); + robot->setHeading(90); + robot->setVel(speed); + robot->unlock(); + ArUtil::sleep(squareSide / speed * 1000); + printf("Turning to third side\n"); + robot->lock(); + robot->setHeading(180); + robot->setVel(speed); + robot->unlock(); + ArUtil::sleep(squareSide / speed * 1000); + printf("Turning to last side\n"); + robot->lock(); + robot->setHeading(-90); + robot->setVel(speed); + robot->unlock(); + ArUtil::sleep(squareSide / speed * 1000); + printf("Pointing back original direction and stopping\n"); + robot->lock(); + robot->setHeading(0); + robot->setVel(0); + robot->unlock(); + ArUtil::sleep(300); + + printf("Stopped\n"); + sick.lockDevice(); + sick.disconnect(); + sick.unlockDevice(); + robot->lock(); + robot->disconnect(); + robot->unlock(); + + // now exit + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/bin/SIMULATOR_README.txt b/Legacy/Aria/bin/SIMULATOR_README.txt new file mode 100644 index 0000000..dafd0fc --- /dev/null +++ b/Legacy/Aria/bin/SIMULATOR_README.txt @@ -0,0 +1,3 @@ +SRIsim is no longer included with Aria. There is now a separately +downloadable MobileSim simulator at our support webpage +http://robots.activmedia.com diff --git a/Legacy/Aria/docs/figures/Amigobot.jpg b/Legacy/Aria/docs/figures/Amigobot.jpg new file mode 100644 index 0000000..861a188 Binary files /dev/null and b/Legacy/Aria/docs/figures/Amigobot.jpg differ diff --git a/Legacy/Aria/docs/figures/ArRangeDevice_currentReadingPolar.dia b/Legacy/Aria/docs/figures/ArRangeDevice_currentReadingPolar.dia new file mode 100644 index 0000000..ec255a4 Binary files /dev/null and b/Legacy/Aria/docs/figures/ArRangeDevice_currentReadingPolar.dia differ diff --git a/Legacy/Aria/docs/figures/ArRangeDevice_currentReadingPolar.png b/Legacy/Aria/docs/figures/ArRangeDevice_currentReadingPolar.png new file mode 100644 index 0000000..0c09cb6 Binary files /dev/null and b/Legacy/Aria/docs/figures/ArRangeDevice_currentReadingPolar.png differ diff --git a/Legacy/Aria/docs/figures/ArRobot_Task_Cycle.dia b/Legacy/Aria/docs/figures/ArRobot_Task_Cycle.dia new file mode 100644 index 0000000..7bdc319 Binary files /dev/null and b/Legacy/Aria/docs/figures/ArRobot_Task_Cycle.dia differ diff --git a/Legacy/Aria/docs/figures/ArRobot_Task_Cycle.png b/Legacy/Aria/docs/figures/ArRobot_Task_Cycle.png new file mode 100644 index 0000000..144d086 Binary files /dev/null and b/Legacy/Aria/docs/figures/ArRobot_Task_Cycle.png differ diff --git a/Legacy/Aria/docs/figures/MobileSim_with_laser.png b/Legacy/Aria/docs/figures/MobileSim_with_laser.png new file mode 100644 index 0000000..c15784c Binary files /dev/null and b/Legacy/Aria/docs/figures/MobileSim_with_laser.png differ diff --git a/Legacy/Aria/docs/figures/Robot_Communication_Options.png b/Legacy/Aria/docs/figures/Robot_Communication_Options.png new file mode 100644 index 0000000..fc59a5a Binary files /dev/null and b/Legacy/Aria/docs/figures/Robot_Communication_Options.png differ diff --git a/Legacy/Aria/docs/figures/Robot_Communications_Options.dia b/Legacy/Aria/docs/figures/Robot_Communications_Options.dia new file mode 100644 index 0000000..294a38f Binary files /dev/null and b/Legacy/Aria/docs/figures/Robot_Communications_Options.dia differ diff --git a/Legacy/Aria/docs/overview.dox b/Legacy/Aria/docs/overview.dox new file mode 100644 index 0000000..8faf5c4 --- /dev/null +++ b/Legacy/Aria/docs/overview.dox @@ -0,0 +1,1879 @@ + +/** + @defgroup ImportantClasses Important Classes + @brief These classes are essential far all programs using Aria to control a robot. + + @defgroup OptionalClasses Optional Classes + @brief These classes provide additional features that may be used in some programs. + + @defgroup ActionClasses Predefined ArAction Classes + @brief These classes implement component behaviors as ArAction subclasses (see ArAction and the overview for more details on actions) + + @defgroup DeviceClasses Device Interface Classes + @brief These classes provide interfaces to hardware devices such as sensors. Some use +"connector" objects for configure, connection and sometimes to create the +interface objects. Read documentation fro details. + + @defgroup UtilityClasses Utility Classes + @brief These classes provide useful cross-platform system tools, math and string tools, and other miscellaneous programming utilities. + + @defgroup MTX MTX/Pioneer LX Specific Classes + @brief These classes are only used on Pioneer LX and other MTX-type robots. +*/ + +/** + \mainpage ARIA Developer's Reference Manual + +MobileRobots Advanced Robotics Interface for Applications (ARIA) + +

+Copyright 2002, 2003, 2004, 2005 ActivMedia Robotics, LLC. All rights reserved.
+Copyright 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. All rights reserved.
+Copyright 2011, 2012, 2013 Adept Technology. All rights reserved. +

+ + +\htmlonly + +\endhtmlonly + +\section toc Contents +
    +
  • \ref intro +
      +
    • \ref javapython
    • +
    • \ref matlab
    • +
    +
  • +
  • \ref licensing
  • +
  • \ref AriaPackage +
      +
    • \ref arpack
    • +
    • \ref arpackother
    • +
    +
  • +
  • \ref codingConventions
  • +
  • \ref arCliServ
  • +
  • \ref commClasses +
      +
    • \ref connectRobot
    • +
    +
  • +
  • \ref HardwareConfiguration +
      +
    • \ref RobotParameterFiles
    • +
    • \ref RuntimeOptions
    • +
    +
  • +
  • \ref robot +
      +
    • \ref commands
    • +
    • \ref packetHandlers
    • +
    • \ref CommandPackets
    • +
    • \ref syncRobot
    • +
    • \ref stateReflection
    • +
    • \ref callback
    • +
    +
  • +
  • \ref ClientCommands +
      +
    • \ref robotDirectCommands
    • +
    • \ref robotMotionCommands
    • +
    • \ref actions
    • +
    • \ref actionDesired
    • +
    • \ref resolvers
    • +
    • \ref predefinedActions
    • +
    • \ref actionInteractions
    • +
    +
  • +
  • \ref rangeDevices
  • +
  • \ref functors
  • +
  • \ref userInput
  • +
  • \ref threading +
      +
    • \ref syncObject
    • +
    • \ref asynctasks
    • +
    +
  • +
  • \ref aria
  • +
+ +\subsection tocToolbox Additional tools in the ARIA toolbox: +
    +
  • \ref devices
  • +
  • \ref utility
  • +
  • \ref arconfig
  • +
  • \ref sockets
  • +
  • \ref arinfogroup
  • +
  • \ref maps
  • +
  • \ref ArNetworking
  • +
  • \ref sound
  • +
+ +\subsection tocDevHelp Helpful information about C++ development with ARIA: +
    +
  • \ref emacs
  • +
  • \ref noneverydayC +
      +
    • \ref stl
    • +
    • \ref defaultArgs
    • +
    • \ref constructorChaining
    • +
    • \ref charsAndStrings
    • +
    • \ref arexport
    • +
    • \ref exceptions
    • +
    +
  • +
+ + +\subsection tocAdv Advanced Usage: +
    +
  • \ref pieceMealUse
  • +
  • \ref hardConnectRobot +
      +
    • \ref openDevice
    • +
    • \ref devConnect
    • +
    • \ref connrw
    • +
    +
  • +
+ + \section intro Introduction + +Welcome to ARIA, an object-oriented, robot control +applications-programming interface for MobileRobots (and ActivMedia) +intelligent mobile robots. + +Written in the C++ language, ARIA is client-side software for easy, +high-performance access to and management of the robot, as well +as to the many accessory robot sensors and effectors. ARIA includes +many useful utilities for general robot programming and cross-platform +(Linux and Windows) programming as well. + +You can access ARIA at different +levels, from simply sending commands to the robot through ArRobot +to development of higher-level intelligent behavior using @ref actions. +(For a description of how to integrate parts of ARIA with +your other code, see \ref pieceMealUse.) + +An auxiliary library called ArNetworking is also included with ARIA. +ArNetworking provides an easy to use, extensible framework for communication with +remote programs over a network, such as MobileEyes. + +This page contains an overview of ARIA. Read this overview to become familiar +with the ARIA library and how to get started using it. +Click a class or function link to view its details. +A selection of the most important ARIA classes is listed in @ref +ImportantClasses in the menu to the left, as well as @ref OptionalClasses, @ref +DeviceClasses, @ref UtilityClasses and @ref ActionClasses. All +classes are available in the full class list and hierarchy links on the left. + +New users should view this document along with the ARIA examples, README.txt, and +your robot's operating manual as well. + +You can download new versions of ARIA from http://robots.mobilerobots.com/ARIA + + \subsection whouses What is ARIA? How does it relate to other MobileRobots software? + +ARIA is a programming library (SDK) for C++ programmers +who want to access their MobileRobots or ActivMedia platform and accessories at either +a high or low level. +ARIA is also for those who have already prepared robot-control software and want to +deploy it on one or more MobileRobots or ActivMedia mobile robot platforms. +ARIA also provides various tools useful for robot programming in general. + +In addition to providing a complete robot and accessory API to developers, +ARIA also serves as a +foundation for other libraries providing additional +capabilities: For creating applications with built-in advanced navigation routines, +you can use the additional ARNL or SONARNL libraries. To communicate with the +MobileEyes graphical display/control program, or for general +communication over the network, you can use ArNetworking. ArNetworking is +included with ARIA in the ArNetworking directory. +See the ArNetworking Reference +Manual for more information. + +Other libraries are available as well for specialized purposes, including +speech synthesis and recognition, audio stream recording, playback and network +transmission, video image capture, color tracking, etc. +Browse the MobileRobots support web pages http://www.activrobots.com and +http://robots.mobilerobots.com for these libraries and other mobile robotics +resources, including the MobileSim simulator which can be used used for +programming and debugging before driving an actual robot. + +Programmers working with ARIA should be familiar with +using typical C++ concepts, including +using classes and objects with simple inheritance, pointers, memory management, +the STL containers, and the compiling and linking process. (See below +for notes about accessing ARIA from Python or Java.) Experience with +multiple threads is also helpful. + +Read on for information about the key pieces of ARIA and how to get started. +See the README.txt file for a brief practical overview of ARIA software development +on Linux and Windows. Many example programs are available as well. + + \subsection javapython Java and Python + +ARIA, ArNetworking, ARNL and SONARNL now work in Java and Python! Each library has a +Java wrapper and a Python +wrapper. This means that you can write +ARIA programs in Java or Python almost as if ARIA itself was written in these +languages. This wrapper is automatically generated by SWIG, +and the Python and Java APIs are almost the same as the +C++ library. Exceptions will be noted in this reference manual. + +Read javaExamples/README.txt file for directions on how to use +the Java wrapper and pythonExamples/README.txt for directions +on how to use the Python wrapper, and likewise see ArNetworking/javaExamples +and ArNetworking/pythonExamples for information about and examples of the +ArNetworking Java and Python wrappers. + + \subsection matlab Matlab + +A subset of essential robot control and accessor functions from ARIA are now also available for use in +Matlab. See matlab/README.txt for instructions on how to create +and use this interface, and notes on what is available and what its requirements and supported platforms are. + + \section licensing License and Sharing + +ARIA is released under the GNU Public License, which means that the entire +source code is included and may be copied. However, if you +distribute any work which incorporates ARIA, you must also distribute the entire +source code to that work, including ARIA with any modifications you may have +made, under the same license terms. Read the included license text for +details. We open-sourced ARIA under the GPL not only for your convenience, +but also so that you could share your enhancements to the software with the +robotics community (you can share them via the aria-users mailing list). If +you wish your enhancements to make it into the ARIA baseline, you will +need to assign the copyright on those changes to MobileRobots, contact +aria-support@mobilerobots.com with these changes or with questions about +this. + +Accordingly, please do share your work, and please sign up for the +exclusive ARIA-users@mobilerobots.com newslist so that you can benefit +from others' work, too. + +For answers to frequently asked questions about what the GPL allows +and requires, see http://www.gnu.org/licenses/gpl-faq.html . + +On the other hand, ARIA may be also licensed for proprietary, closed-source applications. +Contact sales@mobilerobots.com for details. + + \section AriaPackage The ARIA Package + + \subsection arpack ARIA/ + +\htmlonly +
+
README.txt
+
Getting started; essential info. Includes tips on installing + ARIA, rebuilding it, building example programs, and + using platform development tools. + Also see the README files in the examples/, advanced/, and tests/ + directories.
+ +
LICENSE.txt
+
GPL license for redistributing ARIA or programs using ARIA
+ +
Changes.txt
+
Summary of changes featured in each version of ARIA
+ +
INSTALL.txt
+
Detailed instructions for installing ARIA on different platforms
+ +
docs/
+
Library reference documentation (this manual).
+ +
examples/
+
ARIA example programs -- a good place to start. Also see the Examples + section of this reference manual; selected examples are also linked from + classes and methods used by those examples. +
+ + +
include/
+
Header files for ARIA
+ +
src/
+
ARIA C++ source code files
+ +
params/
+
Robot definition (parameter) files (p3dx.p, for example). + Mostly used transparently by ARIA, but can be customized + if neccesary. +
+ +
lib/
+
Win32 DLL export library (.lib) files and Linux shared library (.so) + files
+ +
bin/
+
Win32 binaries and DLLs
+
+\endhtmlonly + + \subsection arpackother Other ARIA Files of Note + +\htmlonly +
+
Aria.sln
MS Visual C++ workspace for building + ARIA libraries and examples
+
Aria.vcproj
MSVC++ project file used in Aria.sln + for the ARIA library.
+
Makefile
Linux makefile for building ARIA and + examples
+
Makefile.dep
Linux file dependency rules (used internally + by Makefile)
+
utils/
+
Utility programs, used internally by MobileRobots software development, + plus some file format conversion tools +
+
ArNetworking/
Networking infrastructure library, + included with ARIA, but a separate library
+
tests/
Test files, somewhat esoteric but + useful during ARIA development
+
advanced/
Advanced demos and examples, not + always for the faint of heart (or ARIA novice)
+
pythonExamples/
Information about and examples of + using ARIA via Python
+
javaExamples/
Information about and examples of + using ARIA via Java
+
python/
Contains ARIA Python module and + other files
+
java/
Contains ARIA Java package and other + files
+
+\endhtmlonly + + \section codingConventions Documentation and Coding Convention + +ARIA follows the following coding conventions: + +
    +
  1. Class names begin with "Ar" and are in mixed case.
  2. +
  3. Enums and other constants either begin with a capital letter or are all in caps.
  4. +
  5. Avoid preprocessor definitions whenever possible (instead using enumerations or inline methods)
  6. +
  7. Member variables in classes are prefixed with 'my'.
  8. +
  9. Static variables in classes are prefixed with 'our'.
  10. +
  11. Member function names start with a lower case.
  12. +
  13. Capitalize each word except the first one in a variable or method name; likeThisForExample
  14. +
  15. All classes may be used in a multi-threaded program, either by being + inherently threadsafe, or (more typically) by providing an API for protecting it by + locking mutexes. See class documentation for notes on access from + multiple threads. +
  16. +
+ +@sa @ref emacs + + \section arCliServ ARIA-Robot Client-Server Relationship + +For those of you who are familiar with SRI International's Saphira +software and ActivMedia Robotics' mobile robots and their related +technologies, the underlying client-server control architecture for +the mobile platform, sensors, and accessories hasn't changed much in +ARIA. It's just gotten a lot better and more accessible. + +The core mobile robot "server" proceses are implemented in the Pioneer and AmigoBot Operating +System firmware (ARCOS, AROS, P2OS, AmigOS, etc.), which runs +on the robot's microcontroller. +These proceses manage the more critical and time-sensitive low-level tasks of robot control and operation, including +maintaining requested motion and heading state and estimating position from odometry, as well as acquiring sensor information +(sonar and compass, for example) and driving many accessory components like +the PTZ camera, TCM2 compass/inclinometer, and the Pioneer 5-DOF +Arm. The robot, its microcontroller, firmware, and integrated devices (such as +sonar) together are sometimes referred +to as the "robot platform". The robot firmware does not, however, perform any high-level robotic tasks. +Rather, it is the job of an intelligent client running on a connected +PC to perform these application-level robotic control strategies and tasks, +such as obstacle detection and avoidance, sensor fusion, localization, +features recognition, mapping, intelligent navigation, PTZ camera +control, Arm motion, and much more. ARIA's role is to support these client applications +and their communcation with the robot firmware, to any devices that connect to +the computer rather than the robot platform, and to remote software via a +network. + +The heart of ARIA is the ArRobot class. This class manages the communication +cycle with the firmware, receiving and providing access to data about the +robot platform's operating state, +triggering tasks within that cycle and determining commands to be sent back +to the robot (see @ref actions and @ref syncRobot). It also serves as a container for references to other ARIA objects +(such as range devices) and a toolbox of general functions related to the mobile +robot. + +Through its @ref actions infrastructure, ARIA provides a powerful +mechanism for combining independent behaviors to achieve +coordinated motion control and intelligent guidance. With +Actions, you easily implement the motion aspects of applications +such as guided teleoperation, visual tracking, autonomous navigation, etc. + +Other ARIA classes provide interfaces to +access and control accessory sensors and devices, +including operation and state reflection for sonar and laser range +finders, pan-tilt units, arms, inertial navigation devices, and many +others. + + + \section commClasses Robot Communication + +One of the most important functions of ARIA, and one of the first and +things that your application program must do, is to establish +the connection between an ArRobot object instance and the robot platform +operating system (firmware). + +In addition to the mobile robot itself, some accessories, +such as the sonar, the Pioneer Gripper, PTZ cameras, Pioneer Arm, compass, and others, are +internally connected to the robot microcontroller's AUX or digital I/O +lines, and use the robot connection as well (therefore the interface +classes for these objects require a reference to an ArRobot object, +which must be connected for the devices to work). Other accessories, such as +the SICK laser, video capture cards, etc. are connected directly to the onboard +computer. + +There are several ways to connect a computer running ARIA to the robot's +microcontroller or to a simulator. +This figure provides +a schematic overview of the many ARIA-robot communication options. +Consult your robot Operations Manual for more information about computer-robot +hardware setup and communications. + + \subsection connectRobot Connecting with a Robot or the Simulator + +An ArRobotConnector object is used to set up and +perform the connection to the robot, based on robot parameter files, +and run-time configuration via command-line +arguments (see \ref HardwareConfiguration). Similarly, ArLaserConnector +is used to connect to laser rangefinding devices. (Other connectors are +also used for other kinds of accessory devices.) +ArRobotConnector and ArLaserConnector are used in most of the example programs, including +@ref simpleConnect.cpp, @ref wander.cpp, and @ref demo.cpp. (Some +example still use the older ArSimpleConnector). +ArRobotConnector will first try to connect to +a simulator on a local TCP port, and if no simulator is running, it will then +connect to the robot on a local serial port. +This makes it easy to develop and debug your program using the simulator, then +simply copy it onto the robot's computer and run without modification. +ArRobotConnector also parses some command line arguments if supplied, which +can explicitly specify a remote hostname and/or port to connect with via TCP, +or to specify an alternate local serial port to use for robot connection, +as well as other options. If a program uses ArRobotConnector, running it +with the "-help" command line argument will print a list of options. + +Here is an example which uses ArRobotConnector to connect the ArRobot and +ArLaserConnector to connect to a laser rangefinder. +@code +#include "Aria.h" +int main(int argc, char** argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + + // Try connecting to the robot. + if(!robotConnector.connectRobot(&robot)) + { + // Error! + ArLog::log(ArLog::Terse, "Error, could not connect to robot.\n"); + robotConnector.logOptions(); + Aria::exit(1); + } + + // Run the ArRobot processing/task cycle thread. + robot.runAsync(true); + + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + + // Parse command line arguments (there may be arguments specifying + // what lasers to try to connect to) + if(!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(2); + } + + // Try connecting to all lasers specified in the robot's parameter file + // and in command line arguments + if(!laserConnector.connectLasers()) + { + ArLog::log(ArLog::Terse, "Error, could not connect to lasers.\n"); + Aria::logOptions(); + Aria::exit(3); + } + + // Now we're connected, and the robot and laser objects are running in + // background threads reading and processing data. (You can get access + // to the ArLaser objects using ArRobot::findLaser() or + // ArRobot::getLaserMap(). + ... +@endcode + + + \section HardwareConfiguration Specifying Details about Robot and Device Connections + +On any individual robot, there are many possible combinations of hardware +accessories, and several options for connecting accessories to the robot +and computer. The device interface and connector classes (ArRobotConnector, +ArLaserConnector, etc.) need information about what devices are connected +and how they are connected, especially if they vary from their defaults. + +This information is obtained from two sources: ARIA's parameter file(s) for +the robot, +and from program runtime arguments via ArArgumentParser (which reads +default program argument values from /etc/Aria.args (on Linux) and the ARIAARGS +environment variable (on both Linux and Windows), then reads current +program arguments from the command line). + +Some examples of hardware configuration options that may need to be +specified are what kinds of laser rangefinders are connected, and +to which ports, laser connection and data parameters, what kind +of GPS is connected and to what port (if a GPS is used). Furthermore, +if you are connecting to a robot over a wireless TCP connection from an offboard +computer rather than an onboard computer, you must provide a runtime +command line argument giving the robot network name (and optionally port number). + +\subsection RobotParameterFiles Robot Parameter Files + +Robot parameter files are read by ARIA after a connection to the robot is +made and the robot type and individual name are obtained (see @ref +connectRobot). These files provide ARIA with robot-specific conversion factors +and physical charactaristics, as well as accessory device connection information. + +See @ref ParamFiles for more information. + +\subsection RuntimeOptions Program Runtime Options + +Various classes in ARIA (notably the Connector classes) use program runtime +options (a/k/a command-line arguments). + +See @ref CommandLineOptions for a summary of all the options that various +classes in ARIA accept. + +Arguments are provided to other ARIA classes by an ArArgumentParser +object. All ARIA programs should create an ArArgumentParser, call +ArArgumentParser::loadDefaultArguments() to load any arguments that +appear in the /etc/Aria.args file or ARIAARGS environment variable, +and provide that object to any class constructors that accept it. +Once all such objects are created, you can call Aria::logOptions() to +print out a summary of all relevant options (e.g. call Aria::logOptions(); +and Aria::exit() if ArArgumentParser::checkHelpAndWarnUnparsed() returns +true, because the user gave the --help option). Finally, call +Aria::parseArgs() to cause each of them to check the ArArgumentParser for +their respective arguments. + + + + \section robot ArRobot + +ArRobot is the heart of an ARIA program, acting as +robot communications gateway, central manager +of robot state, tool for synchronizing program-added tasks and callbacks, +ArAction objects, etc. + + \subsection commands Client Commands and Server Information Packets + +Client-server communications between ARIA and a +mobile robot platform or simulator use packet-based +protocols. (In this context, the client is the software using +ARIA to operate a robot, and the server is the robot platform's firmware.) +The details of the client-server protocol can be found in your robot's +Operations or Technical Manual. + +ArRobot (using the +ArDeviceConnection, ArRobotPacketReceiver, ArRobotPacketSender, ArRobotPacket, +and ArSerialConnection classes) +handles the details of constructing and sending a +command packets to the robot as well as receiving and decoding +the packets recieved from the robot server. + + \subsection packetHandlers Packet Handlers + +Server Information Packets (SIPs) are packets sent by the robot server +containing information updates about the +robot and its accessories. +The standard SIP is sent by the +robot to a connected client automatically every 100 milliseconds +(this frequency may be configured in the firmware parameters). +It contains the robot's current position and estimates, +current translational and rotational speeds, sonar +reading updates, battery voltage, analog and digital I/O states, and more. +These data are stored and used +by ArRobot's State Reflection (see \ref stateReflection +below) and are accessible via methods of the ArRobot class. +(Note, within the ArRobot source code the standard SIP is also called a "motor" packet.) + +Extended SIPs use the same packet format as the +standard SIP, but with a different packet "type" code. Examples of extended +SIPs include I/O port data, data from the gripper, or special robot +data like raw encoder data. +To receive extended SIPs, the client program +must request them. In ARIA, this is normally done by the device interface +classes (see @ref devices) when they are initialized or when the robot connection is established. +You may also attach your own custom packet handlers to ArRobot using +ArRobot::addPacketHandler(). You can use this to do your own additional processing +of extended SIP data, or if creating an alternate implementation of a device +interface class. + + \subsection CommandPackets Command Packets + +To control the robot platform, a client program sends command packets +through the robot connection. This can be done using %ArRobot's @ref +robotMotionCommands, using @ref actions, or at the most basic level, +@ref robotDirectCommands. +Each of these methods results in command packets sent to +the robot. This means that if both Actions and motion commands are used, +or if independent program modules are sending motion commands, they may conflict. +See \ref ClientCommands below for more about sending motion commands. + + + \subsection syncRobot Robot Synchronization Cycle + +The standard SIP is sent on a constant cycle, and reception of this +SIP triggers a new iteration of ArRobot's +synchronized task processing cycle. +This cycle consists of a series of tasks, +including SIP packet handling, invocation of sensor interpretation tasks, action handling and +resolution, state reflection, and invocation of user tasks, in that order. +Since the task cycle is (normally) triggered by the +reception of each SIP (unless the robot platform begins to fails to send SIPs +or the task cycle is explicitly dissasociated from the robot connection -- see +below), each task will be invoked in a predictable order, +have the most recent data to act upon, no task will miss an opportunity +to use a SIP, and as long as the tasks do not take too much time to execute, +each SIP is handled as soon as possible after the robot sends it. + +@image html ArRobot_Task_Cycle.png Overview of the ArRobot task cycle + +To begin the processing cycle, call ArRobot::run() to enter +the cycle synchronously, or ArRobot::runAsync() to run the cycle +in a new background thread. ArRobot::stopRunning() stops the +processing cycle. + +ArRobot provides methods to add your own sensor-interpretation +and generic user task callbacks. To add a task callback, create an ArFunctor +function object (see \ref functors) and +then add it using ArRobot::addSensorInterpTask() or +ArRobot::addUserTask(). These tasks +can be removed using ArRobot::remSensorInterpTask() or +ArRobot::remUserTask(). + +ArRobot locks it's mutex (see ArRobot::lock() and ArRobot::unlock()) during +each iteration of the task cycle, so your task callbacks must not lock this +mutex--a deadlock will occur. +(However, locks must still be used for safe access to any other thread +or ArAsyncTask, such as lasers and other range devices, or ARNL's planning or +localization tasks.) This mutex lock protects ArRobot data from +modification by other threads (if they correctly use the lock during access), +and interruption of the series of tasks. So if you access ArRobot from any other thread (including the main +thread, if you used ArRobot::runAsync() to run the task cycle), you must +use ArRobot::lock() and ArRobot::unlock() to lock and unlock the robot before +and after any method call or use of any data in ArRobot. + +It is also possible to run the processing cycle without a connection to a robot, +if desired. +This alternative cycle is not triggered by receiving a packet, instead it has its own +steady, "chained" cycle time (default is 100 milliseconds which you may +examine and reset with ArRobot::getCycleTime() and +ArRobot::setCycleTime()). +You may also explicitly disassociate ArRobot's processing cycle from incoming +SIP processing at any time by calling ArRobot::setCycleChained() ("Chained" means that it is +the end of a previous cycle that triggers the next after suitable delay to meet +the desired cycle frequency). However, in doing so, +you may degrade performance, as the robot's cycle will only be +run every ArRobot::getCycleTime() milliseconds, and each time only the most recently +read (oldest) SIP is used (even if the robot has sent more than one since the +last cycle). + + +ArRobot's synchronization task list is ipmlemented as a tree, with five +major branches. Though it is uncommon to do so, a client program may modify this +tree or disable branch tasks of the tree. +If a particular task is disabled, none of its +children will be called. +The root of the task tree can be obtained by calling ArRobot::getSyncTaskRoot(), +which returns an ArSyncTask object. + + +@warning A user task or sensor interpretation task must run quickly. If one or more +user tasks or actions runs such that the task cycle takes too long (more that 100ms) +then the performance and behavior of the robot and of ARIA-robot communications +will be negatively affected. In particular, do not call any functions that +could block or wait for an unknown amount of time (such as locking a mutex +that could be locked for a long time by another thread) +or do any long loops waiting for a condition. Long-running activity can be performed +in a separate asynchronous thread (See ArASyncTask) instead, and results can be +shared with the user task via storage which is protected by a mutex only during +immediate reading and writing of the storage variables. + + + \subsection stateReflection State Reflection + +State reflection in the ArRobot class is the way ARIA maintains +a snapshot of the robot's operating conditions and values, such +as estimated pose, current velocity, battery voltage, etc. +as extracted from the latest standard SIP. ArRobot methods for +examining these values include ArRobot::getPose(), ArRobot::getX(), +ArRobot::getY(), ArRobot::getTh(), ArRobot::getVel(), ArRobot::getRotVel(), +ArRobot::getBatteryVoltage(), ArRobot::isLeftMotorStalled(), +ArRobot::isRightMotorStalled(), ArRobot::getCompass(), +ArRobot::getAnalogPortSelected(), ArRobot::getAnalog(), ArRobot::getDigIn(), +ArRobot::getDigOut(). + +The standard SIP also contains sonar reading updates, which are +reflected in ArRobot and examined with the methods: +ArRobot::getNumSonar(), ArRobot::getSonarRange(), ArRobot::isSonarNew(), +ArRobot::getSonarReading(), ArRobot::getClosestSonarRange(), +ArRobot::getClosestSonarNumber(). The sonar interface class, ArSonarDevice, +also receives this information (see \ref rangeDevices). + +ArRobot also uses the state reflection task to send previously requested +motion commands (see @ref robotMotionCommands) to the robot, so the motion +commands sent to the robot reflects those desired values set in ArRobot's state +reflection by actions or motion command methods, and also so that the watchdog +on the robot does not time out and disable the robot (if no motion command is +set, ArCommands::PULSE is sent each cycle). +You can further tune state reflection's motion command sending rate if neccesary with ArRobot::setStateReflectionRefreshTime().) +If desired, you may turn the motion-control state reflector off in the +ArRobot::ArRobot() constructor (set the @a doStateReflection parameter to +false). This will cause motion command functions to only be send the command once directly to the +robot whenever they are called, rather than storing the command to send each cycle. + + \subsection callback Robot Callbacks + +There are a number of useful callbacks invoked by ArRobot on connection +events. You can add and remove them with the functions +ArRobot::addConnectCB(), ArRobot::remConnectCB(), +ArRobot::addFailedConnectCB(), ArRobot::remFailedConnectCB(), +ArRobot::addDisconnectNormallyCB(), ArRobot::remDisconnectNormallyCB(), +ArRobot::addDisconnectOnErrorCB(), ArRobot::remDisconnectOnErrorCB(), +ArRobot::addRunExitCB(), ArRobot::remRunExitCB(). Read their individual +documentation pages for details. + +@sa @ref robotConnectionCallbacks.cpp + + + \section ClientCommands Controlling the robot with Commands and Actions + +Your ARIA client can drive the robot and run its various accessories +through ArRobot's Direct Commands, Motion Commands, or through Actions. + +@note The robot's movement speed will be limited by several parameters. First, +the maximum velocities, accelerations and decelerations given in ARIA's robot +parameter file (.p file) (TransVelMax, +RotVelMax, TransAccel, TransDecel, RotAccel, RotDecel, and for the Seekur only, +LatVelMax, LatAccel and LatDecel) are used to limit motion +commands sent by ARIA, if the value is nonzero. Next, the max velocities given in the +robot firmware (ARCOS) configuration are used to limit motion commands recieved by the robot. +All of these maximum values can be changed at runtime with the ArRobot::setTransVelMax(), +ArRobot::setRotVelMax(), and for the Seekur only, ArRobot::setLatVelMax() calls. +These calls change the parameters in the robot firmware, as well as in ARIA. +That is, they override any maximum values given in the robot parameter file (.p file). +Finally, the "Top" parameters in the firmware (ARCOS) configuration limit +speeds; these cannot be changed at runtime, only using the configuration +program. Most robot parameter files use 0 values as maximums, disabling ARIA's +initial limiting check; however, to make the Seekur easier to initially teleoperate at safe +speeds, the velocity limits in seekur.p are set. Change these limits to 0 to remove +those speed limits, and use the platform's defaults, or use ArRobot's methods to +change them at program runtime. + + \subsection robotDirectCommands Direct Commands + +At the lowest level of robot access, you may send any command packet directly to the robot +or simulator platform through ArRobot. Direct commands consist of a 1-byte command +number followed by none or more arguments, as defined by the robot's +operating system (ARCOS, AROS, P2OS, AmigOS, etc.). For example, the command +number 4, ENABLE, enables the robot's motors if accompanied by the +argument 1, and disables the motors with the argument 0. +Use ArRobot::com() for commands that +have no argument, such as PULSE; ArRobot::comInt() for a 2-byte integer +argument, signed or unsigned, such as the motors ENABLE command; +ArRobot::com2Bytes() for commands that accept two individual bytes +as the argument, such as the VEL2 command; and ArRobot::comStr() or +ArRobot::comStrN() for a null-terminated or fixed-length +string argument, respectively, such as the sonar POLLING +sequencing command. + +The ArCommands class contains an enum with all the direct commands; +ArCommands::ENABLE, for example. Not all Direct Commands are supported by every +MobileRobots robot, but unrecognized (or malformed) +commands are simply ignored. + +Please consult your robot's technical manual for details, such +as the Chapter 6 in the Pioneer 3 +Operations Manual, for client command numbers and syntax. + +For most commands, a method exists in ArRobot that either sends the command +immediately, or stores it for the state reflection task to send. However, +the direct command methods allow you to send any unusual or special commands +directly to the robot platform or simulator, without any intervening processing. + + \subsection robotMotionCommands Motion Command Functions + +At a level just above ArRobot's Direct Commands are the Motion +Command Functions. These are explicit simple movement commands sent by ArRobot's +state reflection task. +For example, ArRobot::setVel() to set the translational velocity, +ArRobot::setRotVel to set rotational velocity, ArRobot::setVel2() to +or set each wheel speeds separately, ArRobot::setHeading() to set a +global heading angle to turn to, ArRobot::move() to drive a given distance, +or ArRobot::stop() to stop all motion. ArRobot also provides methods +for setting speed limits beyond the limits set in the firmware configuration. +These motion functions work at part of with @ref stateReflection, and ArRobot may +resend commands each cycle to try to achieve the desired state. + +Be aware that a Direct or a Motion Command may conflict with controls +from Actions or other upper-level processes and lead to unexpected +consequences. Use ArRobot::clearDirectMotion() to cancel the overriding +effect of a previously set Motion Command so that your Action is able to regain +control the robot. Or limit the time a Motion Command prevents other +motion actions with ArRobot::setDirectMotionPrecedenceTime(). Otherwise, +the Motion Command will prevent actions forever. Use +ArRobot::getDirectMotionPrecedenceTime() to see how long a Motion +Command takes precedence once set. + + \subsection actions Actions + +While simple sequences motion commands can be easy to use, trying to achieve +more sophisticated motion using only motion commands +can quickly become difficult. To make it possible to define +complex behaviors out of independent, reusable components, +ARIA provides the higher-level Actions system. +Actions are individual objects that independently +provide motion requests which are evaluated and then combined each cycle +to produce a final set of movement commands. This allows you to build complex +behavior from simple building blocks for dynamic and continuous motion control. + +Actions are defined by creating a subclass of the ArAction the base class +which overloads the ArAction::fire() method. +See the @ref actionExample.cpp example program. +ARIA also includes some useful pre-made action classes (see @ref ActionClasses +for a list). Include these in your programs, or use them as examples when +creating your own custom ArAction subclass. + +Actions are attached to an ArRobot object with ArRobot::addAction(), along with +a priority which determines its position in the action list. +ArAction::setRobot() is called on an action object when it is added to a robot. +You can override this in your action subclass. (For example, this would be useful to add a +connection callback, if there were some calculations you wished to do +upon connection to the robot.) + +Actions are evaluated by ArRobot's action resolver in descending order of priority +(highest priority first, lowest priority last) in each task cycle just prior +to @ref stateReflection. The action resolver invokes each action's fire() +method, combining their desired motion commands (the ArActionDesired objects +they return) to a +single ArActionDesired object, which is then used in state reflection to send +motion commands to the robot. + +@note Sending simple motion commands (e.g. by using ArRobot::setVel()) while +actions are also active can result in conflicts between your simple motion +commands and the action resolver's commands. See the discussion of +@ref robotMotionCommands above. + +As the resolver is invoking each action, by it passes +the current desired motion combined from the previously invoked, higher priority +actions, as the currentDesired argument to fire(). +This can be useful information if +needed. (For example, a stall-recovery action could +be programmed not to exert its motion effects if it has been +pre-empted by a stop action, so this stall-recovery action would check +currentDesired to see if either the "strength" is "used up" or if there is a maximum +velocity, and if so, reset its own state.) However, there is no need +for an action to pay attention to the currentDesired if not necessary. + +@warning An action must run quickly. If one or more actions or robot +user tasks runs such that the task cycle takes too long (more that 100ms) +then the performance and behavior of the robot and of ARIA-robot communications +will be negatively affected. In particular, do not call any functions that +could block or wait for an unknown amount of time (such as locking a mutex +that could be locked for a long time by another thread) +or do any long loops waiting for a condition. Long-running activity can be performed +in a separate asynchronous thread (See ArASyncTask) instead, and results can be +shared with the action via storage which is protected by a mutex only during +immediate reading and writing of the storage variables. + + \subsection actionDesired Action Desired + +ArActionDesired objects are used to pass desired action channel values +and strengths out of an ArAction::fire() method back to the resolver. +An ArActionDesired object should always be +reset (ArActionDesired::reset()) before it is reused. + +There are six action channels: velocity (ArActionDesired::setVel), +heading (ArActionDesired::setDeltaHeading or +ArActionDesired::setHeading for absolute heading), +maximum forward translational velocity +(ArActionDesired::setMaxVel), maximum reverse translational velocity +(ArActionDesired::setMaxNegVel), and maximum rotational velocity +(ArActionDesired::setMaxRotVel). + +An action gives each channel a strength between 0.0, the lowest, and 1.0, +the highest. Strengths are used by the resolver to compute the +relative effect of the associated channel when combining multiple +actions' desired movements. + +The maximum velocity, maximum negative velocity, and maximum +rotational velocity channels simply impose speed limits and thereby +indirectly control the robot. + +For more advanced usage, ArActionDesired objects can be merged +(ArActionDesired::merge) and averaged (ArActionDesired::startAverage, +ArActionDesired::addAverage, ArActionDesired::endAverage). + + \subsection resolvers The Action Resolver + +ArResolver is the base action resolver class. ArPriorityResolver is +the default resolver used by ArRobot. + +The resolver used by ArRobot may be changed by calling ArRobot::setResolver, +if you wish to create an alternative ArResolver implementation. +There may only be one resolver per ArRobot object. +(Though a resolver could contain +within it multiple resolvers of its own.) Note that although a robot has +one particular resolver bound to it, a resolver instance is not tied to +any robot. + +The priority resolver works by iterating through the action list in descending +priority (from greatest priority value to lowest), setting each robot movement channel (trans. velocity, heading, +max. velocity, etc.) based on +the contributing actions' desired values (as returned from their fire() methods) +in proportion to their +respective strengths as well as the actions' priorities, updating each movement channel +until its strength becomes 1.0 or the action +list is exhausted. Once a channel's accumulated strength reaches 1.0, no more changes may be made to +that channel (this is how higher priority actions can prevent lower priority +actions from changing a channel). Same-priority actions are averaged together if +they both provide outputs for the same channel. + +As an example, the following table illustrates at each step an action's desired value +and strength for the velocity channel, and the resulting change to +the resolver's final velocity channel value and strength decision, +for four fictional actions (A, B, C and D): + +
setCameraRel Command to pan and tilt the camera from the + current position by the values given in the + first two arguments. If a third argument is + given, zoom from the current position.
setCameraAbs Command to pan and tilt the camera to the + absolute positions given by the first two + arguments. If a third argument is given, set + the zoom to that absolute position.
setCameraPct Command to pan and tilt the camera to the + given positions as percentage of their overall + ranges.
getCameraData Data request to get current pan and tilt values. + Also get zoom value if available.
getCameraInfo Data request to get pan and tilt ranges. Also + gets the zoom range if available.
+ + + + + + + +
step # action priority value of action's desired-velocity channel strength of action's desired-velocity channel current final velocity value current final velocity strength
1 A 4 -400 0.25 -400 0.25
2 B 3 -100 1.0 Combined for use in step 4
3 C 3 200 0.50
4 B&C 3 0 0.75 -100 1.0
5 D 1 500 0.50 no change no change
final result-1001.0
+ + +Notice in the example that the same-priority actions B and C are +averaged before being combined with the previously computed values from step 1. +The resulting combination is: +( (B desired velocity: -100) X (B velocity strength: 1.0) + +(C desired velocity: 200) X (C velocity strength: 0.5) ) / 2 => (-100 + 100) / 2 => 0 +Therefore actions B and C end up cancelling each other out. Combining this result with +the "currentDesired" values computed in step 1 gives +(step 1 desired velocity: -400) X (step 1 velocity strength: 0.25) + (step 4 +desired velocity: 0) X +(step 4 velocity strength: 0.75) => -100. + +In this example, it turns out that at step 5, action D has no effect since the +strength for this channel has reached 1.0 at step 4, before that action was +considered by the resolver. + +The same method is used for all of the other channels. + + \subsection predefinedActions Predefined Actions + +ARIA includes several predefined action classes. +See @ref ActionClasses for a list. Include these in your programs, or use them as examples when +creating your own custom ArAction subclass. + +Movement action classes have an "ArAction" prefix and set +either or both the translational velocity (setVel) and heading +(setDeltaHeading and setHeading) channels to effect motion. Limiting action classes +are prefixed with "ArActionLimiter" and set one or more of the +maximum translational and rotational velocity channels, to slow down or +prevent motion, usually based on conditions such as nearby sensor readings. + +See the ArAction base class's list of subclasses. + + \subsection actionInteractions Mixing Actions + +Actions are most useful when mixed. The @ref teleopActionsExample.cpp +example program is a good +example of mixing limiting and movement actions. It creates +several limiting actions, including Limiter, LimiterFar, and so +on, and two movement actions, joydriveAct and +keydriveAct. The limiting actions have higher priority than the +movement ones, thereby preventing driving if it might be potentially unsafe +due to obstacles detected by sensors. + +This example also illustrates fundamental, yet very powerful features +of ARIA actions and how they contribute to the overall behavior of the +mobile robot. Because they are individuals, contributing discretely to +the movements of the robot, actions are easily reusable. For example, a +limiting action that prevents the robot from crashing +into a wall when translating forward, can be used, as is, in +another ARIA program and have the identical effect, except that +instead of driving the robot with a joystick, the new program's +lower-priority movement action might use color-tracking to have the +robot follow a rolling ball. The ball-following action doesn't need +to know anything about the finer arts of safe navigation--the +higher-priority limiting actions take care of that. + +Another ARIA example program, @ref wander.cpp demonstrates how +different movement actions can be used and how they interact. The +stall-recover action in wander (ArActionStallRecover) influences the +robot's movements only when the motors are stalled, disabling the +lower priority actions by using up all translational and rotational +strength until the robot has extracted from the stall. You should also +examine %ArActionStallRecover.cpp in the src/ directory +to see how the action changes its motion control +influences based on the stall state. +Also note how ArActionAvoidFront and ArActionConstantVelocity +interact. + + \subsection actionGroups Action Groups + +Action groups allow you to easily enable (activate) or disable (de-activate) +a set of actions at once. +You must first create an ArActionGroup attached to an ArRobot. Then, when you +add an ArAction to the ArActionGroup, it is automatically added to the ArRobot, as +well as to the group. + +Several predefined action groups are provided by ARIA. + +@sa @ref actionGroupExample.cpp + + + \section rangeDevices Range Devices + +Range devices (ArRangeDevice) are abstractions of sensors which detect +the presence of obstacles in the space around the robot, providing +a series of spatial readings over time. +ARIA's range device classes transform all readings into specific points in the same +two-dimensional global coordinate system. (This is the same coordinate system +as ArRobot's pose). + +Currently, the main +ArRangeDevice implementations included with ARIA are: sonar (ArSonarDevice), +laser (ArLaser and subclasses), the robot bumpers (ArBumpers), and the "table-sensing" infrared +sensors of a PeopleBot (ArIRs). Camera and 3D range devices (MobileRanger +devices) are supported by separate software. +In addition, ArForbiddenRangeDevice is a "virtual" range device that creates range readings +that border "forbidden area" and "forbidden line" regions +in an ArMap, and ArRangeDeviceFilter processes the output +another ArRangeDevice object in a few ways and provides the processed data through the +ArRangeDevice interface. Its parameters can be modified on line through +ArConfig. + +ArRangeDevice holds two kinds of ArRangeBuffer objects to store readings: +current and +cumulative, though not all ArRangeDevice implementations supply data to the +cumulative buffer. The current buffer contains the +most recent set of readings; the cumulative buffer contains readings gathered +over a longer period time, limited by the buffer's size (see +ArRangeBuffer::setSize()). + +Some range devices also provide "raw" readings, which are the original values given +by the device itself. Some range devices are also considered "Planar", which +means that the readings may undergo some processing to remove duplicates etc., +and which include raw readings. This includes the lasers. + +Range devices are connected to a specific ArRobot instance, to obtain +position and other information from the robot when readings are received and +stored, and also to provide a way to find all range devices attached to the robot. +Some range devices use the robot connection to communicate to their device (e.g. +ArSonarDevice, +ArBumpers, ArIRs). +Attach an ArRangeDevice to your ArRobot object with ArRobot::addRangeDevice() and +remove it with ArRobot::remRangeDevice(). The list of all attached devices +can be queried using ArRobot::findRangeDevice() and ArRobot::hasRangeDevice(). +The list can be obtained by calling ArRobot::getRangeDeviceList(). + +(Note that although sonar are integrated with the robot microcontroller, and +the microcontroller always sends sonar data to the robot (if the robot has +sonar), you still must attach an ArSonarDevice object to the robot to use it.) + +ArRangeDevice also includes some methods to help find the closest reading to the +robot within a selected box, or a polar sector: +ArRangeDevice::currentReadingPolar(), +ArRangeDevice::currentReadingBox(), +ArRangeDevice::cumulativeReadingPolar(), +ArRangeDevice::cumulativeReadingBox(). + +ArRobot also includes similar methods to do common operations on all +attached range devices, +including ArRobot::checkRangeDevicesCurrentPolar(), +ArRobot::checkRangeDevicesCurrentBox(), +ArRobot::checkRangesDevicesCumulativePolar(), and +ArRobot::checkRangeDevicesCumulativeBox() to find the closest range reading +to the robot within some region. + +Each range device has a mutex +(Use ArRangeDevice::lockDevice() and ArRangeDevice::unlockDevice() to lock +and unlock it) +so that it can be accessed safely by multiple threads. For +example, ArLMS2xx uses a thread to read data from a laser, but the +checkRangeDevice functions in ArRobot lockDevice() so they can read +the data without conflicting with ArLMS2xx's data-reading thread, then use +unlockDevice() when done. See \ref threading for more about threading in ARIA. + + + + + \section functors Functors + +Functors are used throughout ARIA. +Functor is short for function pointer. A Functor lets you call a +function without knowing the declaration of the function. Instead, the +compiler and linker figure out how to properly call the function. + +Function pointers are fully supported by the C language. C++ treats +function pointers like C, but to call class methods, an instance object +is required, as well as type information about the class. +Therefore, ARIA contains a set of template classes to contain this information. + +ARIA makes heavy use of ArFunctors as "callback" functions. +To instantiate a functor, you first need to +identify how many arguments the function needs and if it returns a +value. Many times a pointer to the abstract ArFunctor base class is used, which +can be invoked with no arguments and no return value. +Subclasses are used for functions with different numbers of arguments +and return values. ArFunctor1, ArFunctor2, +ArRetFunctor, ArRetFunctor1, and ArRetFunctor2 for example. When invoked, +the arguments may be supplied which are passed to the target function or +method, and a return value may also be given. The types for the arguments +and/or return value are given as template arguments. + +When creating a functor object, however, you must also provide the type +and instance of an object to invoke the method of; or explicitly state +that the function is a class-less global function. Do this by using one +of the concrete base classes of ArFunctor instead of the abstract classes: +ArFunctorC, ArFunctor1C, ArFunctor2C, ArRetFunctorC, ArRetFunctor1C, +ArRetFunctor2C, ArGlobalFunctor, ArGlobalFunctor1, etc. + +Example: + +@code + class ExampleClass { + public: + void aFunction(int n); + }; + + ... + + ExampleClass obj; + ArFunctor1C functor(&obj, &ExampleClass::aFunction); + + ... + + functor.invoke(42); +@endcode + +ExampleClass is a class which contains a function called +aFunction(). The functor functor is declared +as an ArFunctor1C, a functor which invokes a class method +and takes one argument. The template parameters specify the type of the +class (ExampleClass) and the type of the method argument +(int). functor is then initialized with +a pointer to the ExampleClass instance to call the +method on, and a pointer to the class method to call. When a functor +is contained within the class, it is typcially initialized in the +constructor, giving this as the object instance. + +A functor must be initialized with the method to call and, if a "C" functor, +a class instance. An unitilialized functor will crash at runtime when invoked. + +It is also possible to give values for the method arguments in the functor +initialization, see ArFunctor documentation for details. + +Once the functor object is created in this fashion, it can now be +passed to another function or object that wants a callback functor. And the +method ExampleClass::aFunction() will be called on the object +obj when the functor is invoked. + +To invoke a functor, simply call the invoke() function +on the functor. If it takes arguments, call invoke() with those +arguments. If the functor has a return value, call invokeR. The +return value of the function will be passed back through the invokeR() +function. If the functor was initialized with argument values, +and invoke() is called without argument values, the argument values +provided at initialization are passed. + + + + + \section userInput Keyboard and Joystick Input + +ARIA provides several classes getting live joystick and keyboard input, +and action classes (see @ref actions) that use that input to drive the robot. + +ArJoyHandler is a cross-platform interface to joystick data. +It's key functions are ArJoyHandler::getButtons, ArJoyHandler::getAdjusted, +ArJoyHandler::setSpeeds, and ArJoyHandler::getDoubles. + +ArKeyHandler is a cross-platform interface for recieving single keystroke +events (instead of buffered lines of text). +It's key function is ArKeyHandler::addKeyHandler, +which binds a specific key to a given functor. It contains an enum +ArKeyHandler::KEY that contains values for special keys. +You can also attach a key handler to a robot with ArRobot::attachKeyHandler(), +which adds some default key handlers, including a handler for Escape that +disconnects and exits the program (especially useful on Windows, where Ctrl-C +or the terminal close box won't properly clean up). +Since a PC can only have ony keyboard, ARIA keeps an ArKeyHandler pointer +globally, which may be queried with Aria::getKeyHandler(). + +@note if you are using Linux, creating a key handler will make the program hang +if put into the background with Ctrl-Z. + +ARIA provides two simple actions, ArActionKeydrive and ArActionJoydrive, to +drive a robot from keyboard and joystick input. +These actions are used by +the @ref teleopActionsExample.cpp example program. +ARIA also provides a more flexible +ArActionRatioInput, which can combine several input sources (such as keyboard, +computer joystick, robot-platform (microcontroller) joystick, +or teleoperation commands recieved via ArNetworking) in a more +consistent and configurable manner. See the class documentation for more +details. + + + + + + \section threading Threading + +ARIA is highly multi-threaded. This section presents some of the +critical concepts behind writing threaded ARIA code. + +ARIA provides a number of support classes to make it easier to write +object-oriented threaded code. They are: ArASyncTask, ArCondition, +ArMutex, and ArThread. + +Thread-safe code mostly means proper coordination between threads when +handling the same data. You want to avoid the problem of one +or more threads reading or writing the data at the same time that other +threads read or write the data. +data. To prevent this problem from happening, the data needs to be +protected with synchronization objects. + + \subsection syncObject Thread Syncronizing Objects + +In ARIA, the synchronization objects are ArMutex and ArCondition. +ArMutex is the most useful one. ArMutex (mutex is short for mutual +exclusion.) provides a wrapper around system calls (pthreads functions +on Linux and CriticalSection functions on Windows) that +exclude other threads from continuing while the mutex object is "locked". +When threads lock a mutex while accessing shared data, it is ensured +that only one thread is accessing that shared data at a time. +Therefore, the proper way to use a mutex is to lock it right +before accessing the shared data, and to always unlock it when done. +If the mutex is not already locked, then it becomes locked and the thread +continues. If the mutex is already locked by another thread, then it blocks +in the lock call until the other thread unlocks it. If a mutex is never +unlocked (e.g. a function returns due to an error condition without unlocking +it), then any further attempts to lock it will block forever, creating +a "deadlock". +See the mutex example program to see how ArMutex is used. The documentation of a method +may indicate whether locking is necessary before using it; in general, +when using an object that may be shared by other threads, +all threads using it must lock the same mutex (usually contained within +the object's class with methods provided for locking and unlocking) while using +the object. + +ArCondition is an occasionally used utility that puts the current thread to sleep until another thread +signals it to wake up and continue executing. This can be used to wait in a +thread for an indefinite amount of time until some event occurs in a another +thread which signals the ArCondition. + + \subsection asynctasks Asynchronous Task Class + +ARIA provides the ArASyncTask which can be subclassed to implement a +long-running thread and its state +as an object. As opposed to robot-syncronized tasks, asynchronous tasks run +in seperate threads. Like ArMutex, this class wraps the operating system's threading +calls in a cross-platform way. Typically, an ArASyncTask will reperesent a +thread that runs in a loop for the entire program. + +To use ArASyncTask, derive a class from ArASyncTask and +override the ArASyncTask::runThread() function. This function is +automatically called within the new thread when that new thread +gets created. To create and start the thread, call +ArASyncTask::create(). When the ArASyncTask::runThread() function +exits, the thread will exit and be destroyed. Seperate threads can +request that the task exit by calling ArASyncTask::stopRunning(), and within the thread, +you can check for this request with ArASyncTask::getRunningWithLock(). + +This class is mainly a convenience wrapper around ArThread so that you +can easily create your own object that encapsulates the concept of a +thread. + + + + + \section aria Global Data + +The static Aria class contains miscellaneous global data in ARIA. + +ARIA contains a list of all the ArRobot instances. Use the +Aria::findRobot() to find a robot by name, or use Aria::getRobotList() +to get a list of the robots. + +Use Aria::getDirectory() to find ARIA's top-level path +(Usually either C:\\Program Files\\MobileRobots\\%Aria on Windows, or +/usr/local/Aria on Linux). This is useful, +for instance, to locate +robot parameter files for individual operational details. Use +Aria::setDirectory() to change this path for the run of the program if +you feel the need to override what ARIA has decided. + +Call Aria::init() at program start to perform global initialization, and use +Aria::exit() to exit all ARIA threads before exiting your program. + +The Aria class also contains global objects for sharing configuration +parameters and other information: see \ref arconfig and \ref arinfogroup +sections below. + +@sa @ref arconfig +@sa @ref arinfogroup + + + + \section devices Device and Accessory Interface Classes + +ARIA includes classes to communicate with various kinds of devices. + +(Many of these devices are optional accessories, and not all robots have them +installed.) + +Some are mentioned below. See @ref DeviceClasses for a list. + +
    +
  • Range devices. See @ref rangeDevices for more about range devices. +
      +
    • The various subclasses of ArLaser are for laser rangefinder sensors. Use ArLaserConnector + to automatically create and set up ArLaser objects of the appropriate +types based on robot and program configuration parameters. The lasers created by ArLaserConnector will be available as ArLaser objects stored in ArRobot.
    • +
    • ArSonarDevice for Pioneer and Amigobot built-in sonar.
    • +
    • ArBumpers treats the robot's bumper switch triggers as positions for range device + readings.
    • +
    • ArRangeDeviceFilter provides an ArRangeDevice interface to data from any + other range device that has been filtered in different ways.
    • +
    • ArForbiddenRangeDevice is a virtual range device that returns readings + indicating the edges of forbidden lines and forbidden areas from + an ArMap
    • +
    • ArIRs treats triggers of a Peoplebot's infrared "table" sensors as + positions for range device readings.
    • +
    + devices +
  • + +
  • Pan/Tilt servos and camera bases. + ArPTZ defines a common interface, and subclasses access specific devices, + including: +
      +
    • ArVCC4 provides pan, tilt, zoom and other control of a Canon camera + via the robot microcontroller's AUX serial port.
    • +
    • ArSonyPTZ provides pan, tilt, zoom and other actions of a Sony camera + via the robot microcontroller's AUX serial port.
    • +
    • ArDPPTU provides control of a Directed Perceptions Pan/Tilt unit (used + for stereo cameras).
    • +
    +
  • + +
  • ArAnalogGyro provides data from the optional analog gyro on Pioneer, +PeopleBot, PatrolBot, PowerBot or AmigoBot. If the HasGyro parameter in the robot's +internal firmware configuration is 2 (the default on most robots), then the robot automatically uses the gyro for +position correction before sending its pose estimate to ARIA. However, +if GyroType is 1, then create an ArAnalogGyro object to begin receiving data +from the robot and allow it to apply those corrections to the position in the +ArRobot object. + + The gyro also measures its own temperature as part of its operation, + and ArAnalogGyro makes that value available as well. +
  • + +
  • ArGripper provides access to a Pioneer gripper.
  • + +
  • ArP2Arm provides access to a Pioneer arm.
  • + +
  • ArTCM2 provides access to an on-board TCM2 compass, if present.
  • + +
  • ArACTS_1_2 communicates with the ACTS program to get object tracking + information. + +
  • ArVersalogicIO provides access to the digital and analog I/O ports + on Versalogic motherboards (Linux only). (Support depends on + whether the robot has a Versalogic motherboard, and which board it has.)
  • + + +
  • ArSystemStatus provides data about the operating system (Linux only) + such as CPU usage and wireless network signal strength. +
  • + +
  • ArGPS provides access to data received from a Global Positioning System + device. Subclasses implement special actions required for specific devices, + such as ArNovatelGPS for the NovAtel G2 and similar devices and ArTrimbleGPS +for the Trimble GPS. Use ArGPSConnector to create the appropriate ArGPS device +based on robot and program configuration parameters. +
  • +
+ +Some device interfaces are provided by additional libraries, as well. See +those libraries for details. + + + + + + + + \section utility Utility Classes + +Some of the general-purpose utility classes included with are ArMath, ArUtil, ArTime, ArPose, ArLog, +ArSectors, ArRingQueue, ArLineFinder, the GPS-related subclasses of Ar3DPoint, ArMD5Calculator +(and the functions in md5.h), ArMutex, ArCondition and ArASyncTask. See @ref +UtilityClasses for a list of utility classes. + + \section arconfig ArConfig + +ArConfig is a mechanism for storing configuration parameters for different +independent modules in a text file. The global Aria class +maintains a global ArConfig pointer which any program module may access. +Use ArConfig::addParam to register a new parameter with ArConfig, and use +ArConfig::addProcessFileCB to register a callback functor called when the +configuration changes (by loading the file with ArConfig::parseFile, or other +means such as an update from a remote client via ArNetworking). + + \section arinfogroup Shared Info Groups + +In a program composed of multiple independent modules, it is often necessary +to exchange or combine data between them in a general and immediate way. To do this, ARIA provides +the ArStringInfoGroup class, of which the global ARIA class contains an instance +(in addition to an ArConfig instance used specifically for configuration information +which changes infrequently, by loading a file or by user input.) +An example of ArStringInfoGroup is the ArServerInfoStrings class contained in +the ArNetworking auxiliary library. At program initialization, a callback +functor may be added to the global ArStringInfoGroup object which on invocation immediately passes a +string key/value pair from the ArStringInfoGroup object over to an ArServerInfoStrings +object, which provides access to this data over the network (e.g. to MobileEyes). +Independent components of the program may then change the values in the InfoGroup +object without needing any special +knowledge of the recipients of the data (in this example is the +ArServerInfoStrings class). Since MobileEyes displays this data in a small table +next to other robot information like position in speed, this is a useful way +to provide informative statistics about the robot and software's current operation. +(On Linux, for example, you could use the ArSystemStatus class to publish +information from the operating system, like CPU load). + + \section maps Maps + +In mobile robot applications, you will often need to store a map of the robot's +environment to use in navigation, localization, etc. ARIA provides the ArMap +class for reading map data from a file, obtaining and modifying its contents in your +application, and writing it back to file. An ArMap contains data about the +sensed/sensable environment (walls, obstacles, etc.), and human-provided +objects such as goal points. + +The \ref MapFileFormat page describes the map file format in detail. + +ARNL, SONARNL and MobileSim all use ArMap format map files. + + \section sockets Sockets + +The ArSocket class is a wrapper around the socket network +communication layer of your operating system. ARIA mostly uses +ArSocket to open a server port and to connect to another server port. + +To connect to a port, simply construct a socket containing the +hostname or IP address of the host, a port number, and the ARIA socket +type (TCP or UDP). For example: + +@code + ArSocket sock("host.name.com", 4040, ArSocket::TCP); +@endcode + +Or call the ArSocket::connect() function, such as: + +@code + ArSocket sock; + sock.connect("host.name.com", 4040, ArSocket::TCP); +@endcode + +To open a server on (for example) port 4040, simply construct a socket: + +@code + ArSocket sock(4040, true, ArSocket::TCP); +@endcode + +Or call open(4040, ArSocket::TCP) on an ArSocket object constructed +with the default constructor. + + + \section ArNetworking ArNetworking + + For a more advanced networking infrastructure, see the ArNetworking companion + library, + distributed with ARIA. ArNetworking provides an extensible system of + data requests and updates between client and server applications via TCP or + UDP, using the same base "packet" concept as robot communication. + For example, use ArNetworking to connect multiple robots working together, + off-board user interfaces to on-board control servers, or robot control programs to + off-board data resources. + + \section sound Sound and Speech + + + ARIA provides foundation sound support, and separate libraries use this + for speech and network audio. + +
    + +
  1. ARIA's ArSoundsQueue provides a method for handling sound output + generated by various components of a large ARIA application in sequence + and in loops. + It is a sound playback and speech synthesis manager, which + uses a thread-safe queue of sound and speech synthesis requests, and runs + a background processing thread for it. Use this for most of your non-trivial + audio playback and voice synthesis needs. + The speech synthesis libraries, the voice recognition library, and the NetAudio + library are designed to be used in conjunction with this class to coordinate their + usage of the sound device. +
  2. + +
  3. ARIA's ArSoundPlayer provides a basic cross-platform sound-file playback + capability. + Sound files are in WAV (Windows RIFF) format. This class provides static methods + that can be used by ArSoundsQueue for sound file playback. +
  4. + +
  5. Separate libraries provide wrappers around some + speech synthesis (Text-to-speech) and recognition products: +
      +
    • The ArSpeechSynth_Festival library uses the free Festival system from the + University of Edinburgh to perform speech synthesis. It provides + the ArFestival class as a wrapper around Festival. +
    • +
    • The ArSpeechSynth_Cepstral library uses the Swift library from + Cepstral, Inc. to perform speech synthesis. It provides the ArCepstral + class for this. ArCepstral offers a few extra features over + ArFestival, and Cepstral, Inc. provides high quality voices for use with Swift. +
    • +
    • The ArSpeechRec_Sphinx library uses Sphinx from Carnegie Mellon + University to perform speech recognition. ArSphinx provides an interface to this. +
    • +
    +
  6. + +

    Functions common to both of the speech synthesis libraries are included in a base + class, ArSpeechSynth. +

    + +
  7. The separate ArNetAudio library provides network voice audio recording, transmission and playback: +
      +
    • ArNetAudioServer automatically decodes and plays or records and + encodes audio for a network server (typically running on a robot's on-board + computer) and sends and receives the encoded audio to/from a client.
    • +
    • ArNetAudioClient automatically decodes and plays or records and + encodes audio for a network client, sending and receiving the encoded + audio to/from a server (i.e. a robot's on-board computer).
    • +
    • ArNetAudioIO is the common class performing cross-platform Audio I/O + (via the free PortAudio library), and voice encoding/decoding (via the free Speex codec). + It is used by ArNetAudioClient and ArNetAudioServer, but is also available for + stand alone use. +
    • +
    +
  8. + + +
+ + \section emacs Emacs + +Here is the configuration specification the developers at MobileRobots +Inc. use in their .emacs files, in case you want to modify the +code using emacs and not deal with differences in indentation and +such. + +
+    (setq c-default-style '((other . "user")))
+    (c-set-offset 'substatement-open 0)
+    (c-set-offset 'defun-block-intro 2)
+    (c-set-offset 'statement-block-intro 2)
+    (c-set-offset 'substatement 2)
+    (c-set-offset 'topmost-intro -2)
+    (c-set-offset 'arglist-intro '++)
+    (c-set-offset 'statement-case-intro '*)
+    (c-set-offset 'member-init-intro 2)
+    (c-set-offset 'inline-open 0)
+    (c-set-offset 'brace-list-intro 2)
+    (c-set-offset 'statement-cont 0)
+    (defvar c-mode-hook 'c++-mode)
+
+ + \section noneverydayC Non-everyday use of C++ + +ARIA uses some features of C++ that some programmers may not be aware of yet, +and includes some workarounds for platform differences. + + \subsection stl Standard Template Library + +ARIA makes heavy use of the C++ standard template library (STL). So you +should understand the STL in order to get the best use from some of +the more advanced parts of ARIA. + + \subsection defaultArgs Default Arguments + +In the function declaration a default value for an argument may be specified. +Arguments with default values may then be omitted from the function call. + +For example, after declaring this function with a default value for its integer +argument: +@code + void foo(int number = 3); +@endcode +it can be used in two different ways: +@code + // Use the default value for the argument: + foo(); + + // Or, use don't use the default: + foo(99); +@endcode + +This behavior is quite useful for having defaults for more obscure options +you will usually not need to change, but still allowing you to change them if +necessary without making ARIA more complex. + +Also note that the function definition must not have the assignment in +it, only the declaration. Therefore the definition if our example function would +look like this: +@code + void foo(int number) + { + //... + } +@endcode + + \subsection constructorChaining Constructor Chaining + +Constructor chaining is quite simple though sometimes not used by C++ programmers. Each +constructor can give arguments to the constructors of the member +variables it contains and to the constructors of classes from which it inherits. For +example if you have: + +@code + class BaseClass + { + public: + BaseClass(int someNumber); + }; +@endcode +and +@code + class SubClass : public BaseClass + { + public: + SubClass(void); + int anotherNumber; + }; +@endcode +When you write your constructor for SubClass you can initialize both +baseClass and anotherNumber: +@code + SubClass::SubClass(void) : BaseClass(3), anotherNumber(37) + { + // ... + } +@endcode +Note how the constructors to be initialized must follow a colon (:) after the +constructor, and be separated by commas. Member variables +must be initialized in the order they are in the class. Note +that initializing integers is not all that unique or useful, but using +this to initialize callback \ref functors is quite useful. + +Constructor chaining is used in many many places by ARIA, thus it must +be understood in order to understand ARIA, but the above is all that +really needs to be known. + + \subsection charsAndStrings Chars and Strings, Win workaround + +During development problems were encountered with Windows if +a std::string was passed into a DLL. Thus for all input to ARIA +const char * is used, but for all internal storage and all reporting +std::strings are passed back out of ARIA. + + \subsection arexport AREXPORT + +Because of the Windows set up for using DLLs, this macro is used +to take care of the required declaration attributes for DLLs. Largely +users do not need to worry about AREXPORT, but only functions which have +AREXPORT and inline functions are usable with DLLs in Windows (all of the +ARIA functions which are documented in this manual are usable). + + \subsection exceptions Exceptions + +ARIA neither throws nor catches any exceptions. + + + + + + \section Advanced Topics and Esoterica + + \subsection pieceMealUse Piecemeal Use of ARIA + +The most basic layer of ARIA is ArDeviceConnection and subclasses, which +handle low-level communication with the robot server. On top of the +connection layer, we have a packet layer--ArBasePacket and +ArRobotPacket--the basic algorithms for constructing command packets +and decoding server information packets. + +Above the packet layer is the packet handler classes, +ArRobotPacketReceiver and ArRobotPacketSender, when send and receive +packets to and from the robot. Finally, on top of all these lowest +layers is ArRobot, which is a gathering point for all things, but can +be used in a quite basic format without all of the bells and whistles. +ArRobot has built-in tasks, actions, state reflection and so forth, all +of which can be disabled from the constructor (ArRobot::ArRobot) and +ignored or reimplemented. + +Also note that if all you do is turn off state reflection, which only +affects sending ArRobot-mediated motion commands to the robot, not +receiving SIPs from the robot, none of the other activities which +ArRobot engages on its loop will take up hardly any time, so it +probably isn't worth building your own set of tasks, but the power to +do so is there for the intrepid. + +One other thing worth noting is that you can call ArRobot::loopOnce() +and it will run through its loop a single time and return. This is so +that you can use ARIA from your own control structure. If you are +using loopOnce you may also find it beneficial to call +ArRobot::incCounter, so that the loop counter will be updated. You +could also just call ArRobot::packetHandler, ArRobot::actionHandler, +or ArRobot::stateReflector on your own, as these are the most +important internal functions, though if you make your own loop you +should probably call ArRobot::incCounter any way that you do it, as +this is how sonar are known to be new or not, and such. + +We recommend that whatever you do you use the same type of strict +threading/locking that ARIA observes. + + + \subsection hardConnectRobot Connecting with a Robot or the Simulator the hard way + +ArDeviceConnection is ARIA's communications object; ArSerialConnection +and ArTcpConnection are its built-in children most commonly used to +manage communication between a MobileRobots or ActivMedia robot or the robot +simulator, respectively. These classes are not device-specific, +however, so use ArSerialConnection, for instance, to also configure a +serial port and establish a connection with a robot accessory, such as +with the SICK laser range finder. + + + \subsection openDevice Opening the Connection + +After creating and opening a device connection, associate it with its +ARIA device handlers, most commonly with ArRobot::setDeviceConnection +for the robot or the simulator. + +For example, early in an ARIA program, specify the connection device and +associate it with the robot: + +@code + ArTcpConnection con; + ArRobot robot; +@endcode + +Later in the program, after initializing the ARIA system +(Aria::init(); is mandatory), set the Connection port to its default +values (for TCP, host is "localhost" and port number is 8101), and +then open the port: + +@code + con.setPort(); + if (!con.openSimple()) + { + printf("Open failed."); + Aria::shutdown(); + return 1; + } +@endcode + +TCP and Serial connections have their own implementation of open which +is not inherited, but has default arguments that make the generic open +work for the all default cases. And open returns a status integer +which can be passed to the re-implemented and inherited +ArDeviceConnection::getOpenMessage in order to retrieve related status +string, which is useful in reporting errors to the user without having +to know about the underlying device. + + \subsection devConnect Robot Client-Server Connection + +After associating the device with the robot, now connect with the +robot's servers, ArRobot::blockingConnect or ArRobot::asyncConnect, for +example, to establish the client-server connection between ARIA +ArRobot and the robot microcontroller or robot +simulator. The blockingConnect method doesn't return from the call until +a connection succeeds or fails: + +@code + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... Exiting."); + Aria::shutdown(); + return 1; + } +@endcode + +The previous examples connect with the simulator through a TCP +socket on your PC. Use tcpConn.setPort(host, port) to set the TCP +hostname or IP address and related socket number to another machine on +the network. For instance, use tcpConn.setPort("bill", 8101); to +connect to the simulator which is running on the networked computer +"bill" through port 8101. + +Replace ArTcpConnection con; with ArSerialConnection con; +to connect with a robot through the default serial port (/dev/ttyS0 +or COM1), or another you specify with ArSerialConnection::setPort(), + such as con.setPort("COM3");. + +At some point, you may want to open the port with the more +verbose con.open(). + + \subsection connrw Connection Read, Write, Close and Timestamping + +The two main functions of a device connection are +ArDeviceConnection::read and ArDeviceConnection::write. Simple +enough. ArDeviceConnection::close also is inherited and important. You +probably won't use direct read or write to the robot device, although +you could. Rather, ArRobot provides a host of convenient methods that +package your robot commands, and gather and distribute the various +robot information packets, so that you don't have to attend those +mundane details. See the next section for details. + +All ArDeviceConnection subclasses have support for timestamping +(ArDeviceConnection::getTimeRead). With the robot connection, +timestamping merely says what time a robot SIP came in, which can be +useful for interpolating the robot's location more precisely. + + + +*/ + + + + diff --git a/Legacy/Aria/docs/params.dox b/Legacy/Aria/docs/params.dox new file mode 100644 index 0000000..11973dc --- /dev/null +++ b/Legacy/Aria/docs/params.dox @@ -0,0 +1,285 @@ + + +/** + +@page ParamFiles Robot Parameter Files + +ARIA's robot parameter files contain information that can differ between +different robot model types (e.g. "p3dx", "p3dx-sh", "p3at", "p3at-sh", +"amigo", "amigo-sh", etc.), and between +individual robots. This includes some physical dimensions, device connection +settings, and protocol conversion factors. The parameter files are included +with ARIA and are installed along with the rest of ARIA in the "params" +subdirectory. These files always end with ".p". + +The parameter files are read by ArRobot after it connects to the robot, and +stored in the ArRobot and ArRobotParams classes (Use +ArRobot::getRobotParams() to get a pointer to its ArRobotParams object.) + +When ArRobot connects to a robot it receives strings identifying the robot model +(the model's Pioneer "subtype" or "subclass") and an individual robot nickname. It uses +these names to load parameter files. It first loads the parameter file that +corresponds to the model subtype, e.g. "p3dx-sh.p" or "powerbot.p" and stores +those parameters. A log message is printed indicating that it loaded parameters +from that file. ARIA includes robot parameter files for all current robot types. +If such a file cannot be found, but ARIA recognizes the robot +subtype, it stores internal default constants as those parameter values, and +prints a log message indicating this. + +Next, if a file exists which corresponds +to this particular robot's nickname (name.p), then it loads that file, +which can override any settings provided in the robot type parameters or +defaults. + +An individual robot's nickname is stored in the robot firmware configuration, +and may be changed using the firmware configuration tool. For example, if a +robot uses the ARCOS firmware for the SH microcontroller, connect with ARCOScf +and change the "Name" parameter, then save the new configuration. Each robot is +assigned a unique name when assembled and configured by MobileRobots, but you +may change it if you want to use your own names. However, if you change the +name stored in the firmware configuration, you must rename its parameter files +in any ARIA or ARNL/SONARNL/MOGS installation on all computers that connect to +it as well. + +In almost all circumstances, modifying +the standard parameters for robot types is unneccesary; change your robot's name.p +instead. + + +@section ParamFileDeviceParams Device Parameters + +The most common parameters that must be changed in name.p are parameters +regarding how some of an individual robot's devices are connected to the robot +or the onboard computer, if an individual robot has a unique configuration. + +If you are using a name.p file, and later remove ARIA, reinstall the operating system and +erase the disk, make a backup of this file. If you change any connections, or +need to recreate a lost name.p file, however, you can edit name.p +in the "params" subdirectory. + + +In addition to the parameter files, if a program is using ARIA's argument parsing and +connector classes, then it can be executed with command-line arguments which +also affect robot and device parameters (see @ref CommandLineOptions), and may override some of the device +parameters given in the parameter file. + +@subsection ParamFileGeneralParams General Robot Parameters + +The "General settings", "Conversion factors" and "Movement control +parameters" sections give some general parameters about the robot. +Many of these parameters are invariant for all instances of a particular robot +type (such as the conversion factors, class/subclass names), and should not be +changed. You could change the physical dimensions if you have modified the +robot; +ARNL uses these when path planning. You can also set @a SwitchToBaudRate +to 0 to disable the automatic renegotiation of connection data rate after ARIA +connects (if, for example, this causes problems with your particular +computer or a USB-serial device). + +For example, p3dx-sh.p contains the following: + +@verbatim +Section General settings +Class Pioneer ; general type of robot +Subclass p3dx-sh ; specific type of robot +RobotRadius 250 ; radius in mm +RobotDiagonal 120 ; half-height to diagonal of octagon +RobotWidth 425 ; width in mm +RobotLength 511 ; length in mm of the whole robot +RobotLengthFront 210 ; length in mm to the front of the robot (if this is 0 + ; (or non existant) this value will be set to half of + ; RobotLength) +RobotLengthRear 301 ; length in mm to the rear of the robot (if this is 0 + ; (or non existant) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration +@endverbatim + + +@subsection ParamFileLaserParams Laser Rangefinding Devices + +For each laser rangefinder device, a "Laser parameters" section is added to the parameter +file. + +@verbatim +Section Laser parameters +LaserType lms2xx ; type of laser +LaserPortType ; type of port the laser is on +LaserPort COM3 ; port the laser is on +LaserAutoConnect false ; if the laser connector should autoconnect this laser + ; or not +LaserFlipped false ; if the laser is upside-down or not +LaserPowerControlled true ; if the power to the laser is controlled by serial port connection, and ARIA should wait for laser initialization after opening connection +LaserMaxRange 0 ; Max range of the laser, 0 to use default (only use + ; if you want to shorten it from the default), mm +LaserX 21 ; x location of laser, mm +LaserY 0 ; y location of laser, mm +LaserTh 0 ; rotation of laser, deg +LaserZ 0 ; height of the laser off the ground, mm (0 means + ; unknown) +LaserIgnore ; Readings within a degree of the listed degrees + ; (separated by a space) will be ignored +LaserStartDegrees ; start degrees for the sensor (leave blank for + ; default, use this to constrain the range) (double) +LaserEndDegrees ; start degrees for the sensor (leave blank for + ; default, use this to constrain the range) (double) +LaserDegreesChoice ; degrees choice for the sensor (leave blank for + ; default, use this to constrain the range) +LaserIncrement ; Increment for the sensor (leave blank for default, + ; use this to have a custom increment) (double) +LaserIncrementChoice ; Increment for the sensor (leave blank for default, + ; use this to have a larger increment) +LaserUnitsChoice ; Units for the sensor (leave blank for default, use + ; this to have a larger units) +LaserReflectorBitsChoice ; ReflectorBits for the sensor (leave blank for + ; default, use this to have a larger units) +LaserStartingBaudChoice ; StartingBaud for the sensor (leave blank for + ; default, use this to have a larger StartingBaud) +LaserAutoBaudChoice ; AutoBaud for the sensor (leave blank for default, + ; use this to have a larger units) +@endverbatim + +The first and default laser is in the "Laser parameters" section. The second laser +is in "Laser 2 parameters", the third in "Laser 3 parameters", and so on. + +@a LaserType indicates the kind of laser device present: lms2xx for a SICK LMS 200 and compatible, +or urg for an Hokoyu URG or UTM. Other types will be added as support is added to ARIA. + +@a LaserPortType and @a LaserPort indicate how the laser is connected to the onboard computer. +@a LaserPortType currently is either blank or has the value serial for a serial port. +@a LaserPort identifies which port of the given type to use: COM1, COM2, COM3, etc. +for the first, second, third, etc. serial ports (use the "COM" notation both on Linux and Windows). +As support for other connection types such as USB and TCP are added in the future new types will be possible. + +@a LaserAutoConnect indicates whether an ArLaserConnector object should automatically connect to the laser. If false, +then a program must specifically request that the connector initiate the connection; however most programs do this +if they expect to use a laser. + +@a LaserFlipped, @a LaserX, @a LaserY, @a LaserTh, and @a LaserZ indicate the +physical positioning of the laser on the robot. X, Y, Z and Th give its position +relative to the center of the robot. If @a LaserFlipped is true then the order +of the readings supplied by ArRangeDevice objects is reversed, so the order is +correct for a laser mounted upside-down from normal. + +You can list a set of degree values for which laser readings should be ignored +after @a LaserIgnore. Use this if parts of the robot or mounted equipment +obscure the laser's field of detection and cause undesirable readings. + +@a LaserPowerControlled indidcates whether ARIA should expect that the laser's +power state is controlled by the data device connection (e.g. serial port). +If true, ARIA should (re)-initialize the laser +after opening the connection, and wait for the laser to finish initializing. +If false ARIA should expect to be able to read valid data soon after opening +the connection. This value should be left as is for any particular type of +robot, unless you have modified the way the laser is connected from the +standard installation. + +The other parameters affect the configuration of the laser itself, and their +meaning may depend on the type of laser. You may leave them empty (supply no +value) to use defaults for that type. + +@subsection ParamFileGPSParams GPS Devices + +@verbatim +Section GPS parameters +GPSPossessed false ; if the robot has a gps +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) +@endverbatim + +@subsection ParamFileOtherDeviceParams Other Accessory Device Flags and Options + +The "Accessories" section contains advisory flags indicating whether the robot +has certain optional accessories. These are reflected in ArRobot and programs +can check them to determine the robot's capabilities, but ARIA's internal +default behavior is generally not affected by them: + +@verbatim +Section Accessories the robot has +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot +@endverbatim + +The "Sonar" and "IR" parameters sections indicates the physical layout of the sonar +and IR proximity sensors (if any). ARIA will use +these to position obstacle readings in space. The "Num" value must be accurate +with respect to the number of "Unit" lines that follow, but ARIA uses the number of readings +actually supplied by the firmware when calculating and storing readings. (For +example, if the robot only provides 8 sonar range readings, only 8 obstacle +positions will be calculated and stored.) + +(Example from p3dx-sh.p:) + +@verbatim +Section Sonar parameters +SonarNum 16 ; number of sonar on the robot +; SonarUnit +SonarUnit 0 69 136 90 +SonarUnit 1 114 119 50 +SonarUnit 2 148 78 30 +SonarUnit 3 166 27 10 +SonarUnit 4 166 -27 -10 +SonarUnit 5 148 -78 -30 +SonarUnit 6 114 -119 -50 +SonarUnit 7 69 -136 -90 +SonarUnit 8 -157 -136 -90 +SonarUnit 9 -203 -119 -130 +SonarUnit 10 -237 -78 -150 +SonarUnit 11 -255 -27 -170 +SonarUnit 12 -255 27 170 +SonarUnit 13 -237 78 150 +SonarUnit 14 -203 119 130 +SonarUnit 15 -157 136 90 + +Section IR parameters +IRNum 0 ; number of IRs on the robot +; For each IR, give a line like this: +; IRUnit +@endverbatim + +The "Compass parameters" section indicates what kind of compass and compass +installation method the robot has. Almost all robots have a "robot" integrated +compass, serialTCM is never used in normal production robots. + +@verbatim +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM +@endverbatim + +*/ diff --git a/Legacy/Aria/doxygen.conf b/Legacy/Aria/doxygen.conf new file mode 100644 index 0000000..b7ad0d5 --- /dev/null +++ b/Legacy/Aria/doxygen.conf @@ -0,0 +1,1316 @@ +# Doxyfile 1.5.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file that +# follow. The default is UTF-8 which is also the encoding used for all text before +# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into +# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of +# possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = Aria + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 2.8.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = NO + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = \ + "javanote=

Java Wrapper Library: " \ + "java=

Java Wrapper Library: " \ + "pynote=

Python Wrapper Library: " \ + "python=

Python Wrapper Library: " \ + "swignote=

Java and Python Wrappers: " \ + "swig=

Java and Python Wrappers: " \ + "swigomit=

Java and Python Wrappers: Not available in Java or Python wrapper libraries. " \ + "notwindows=@note Not available on Windows " \ + "windowsonly=@note Available on Windows only " \ + "linuxonly=@note Available on Linux only " \ + "added=

Added: in ARIA " + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be extracted +# and appear in the documentation as a namespace called 'anonymous_namespace{file}', +# where file will be replaced with the base name of the file that contains the anonymous +# namespace. By default anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = NO + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = \ + docs/overview.dox \ + docs/params.dox \ + docs/options/all_options.dox \ + src/ \ + include/ \ + examples/ + +# This tag can be used to specify the character encoding of the source files that +# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default +# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. +# See http://www.gnu.org/software/libiconv for the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = *.cpp \ + *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +# Exclude any file that starts with the word proprietary. These files should +# never be publically distributed or referenced in any documentation. +EXCLUDE_PATTERNS = proprietary* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the output. +# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, +# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = examples/ docs/options/ + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = *.cpp *_options + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = docs/figures + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH +# then you must also enable this option. If you don't then doxygen will produce +# a warning and turn it on anyway + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = Ar + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = ./ + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = YES + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = letter + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = YES + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +# Define AREXPORT to be empty, so it gets removed from docs: +PREDEFINED = AREXPORT= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = docs/Aria.tag + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to +# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to +# specify the directory where the mscgen tool resides. If left empty the tool is assumed to +# be found in the default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the number +# of direct children of the root node in a graph is already larger than +# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/Legacy/Aria/examples/All_Examples-vc2003.sln b/Legacy/Aria/examples/All_Examples-vc2003.sln new file mode 100644 index 0000000..2de0236 --- /dev/null +++ b/Legacy/Aria/examples/All_Examples-vc2003.sln @@ -0,0 +1,325 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionExample", "actionExample-vc2003.vcproj", "{2B257343-C6CC-4017-87B6-959D447DA735}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo-vc2003.vcproj", "{2FE13778-630C-434B-B3C0-AE0352E274CE}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gyroExample", "gyroExample-vc2003.vcproj", "{1A8C458C-0086-4788-AF12-F1DFA5EBAD53}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipthru", "ipthru-vc2003.vcproj", "{B0CD9146-122F-49FD-A12A-7A970514DFB1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveThreaded", "joydriveThreaded-vc2003.vcproj", "{B6C39214-2167-4B3D-8C01-2D98A5642F8E}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveUserTask", "joydriveUserTask-vc2003.vcproj", "{B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sickLogger", "sickLogger-vc2003.vcproj", "{F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sickTeleop", "sickTeleop-vc2003.vcproj", "{705A253A-1107-4575-9F3D-B3A20420F731}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sonyPTZDemo", "sonyPTZDemo-vc2003.vcproj", "{F7696DAA-98A9-4E34-B6DE-5AAF4D2314D0}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twoRobotWander", "twoRobotWander-vc2003.vcproj", "{587F7690-442B-4568-A0BF-75CBF57EF3FF}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wander", "wander-vc2003.vcproj", "{5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2003.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wanderAndLogData", "wanderAndLogData-vc2003.vcproj", "{06616FA8-EBC6-4B23-B70C-E332A19160F1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionGroupExample", "actionGroupExample-vc2003.vcproj", "{7AD289AA-1C88-4EF2-B095-3234C613A08D}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socketClientExample", "socketClientExample-vc2003.vcproj", "{5571A55D-018E-485E-802E-D3F200D587DC}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "armExample", "armExample-vc2003.vcproj", "{731EC481-379F-4041-BEBD-358C26ACE117}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "auxSerialExample", "auxSerialExample-vc2003.vcproj", "{77DBE5F8-13CD-49FB-A4D9-35E360EC8992}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "directMotionExample", "directMotionExample-vc2003.vcproj", "{BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpptuExample", "dpptuExample-vc2003.vcproj", "{EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "functorExample", "functorExample-vc2003.vcproj", "{4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gotoActionExample", "gotoActionExample-vc2003.vcproj", "{FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gripperExample", "gripperExample-vc2003.vcproj", "{8DB12A26-FF33-46BE-800E-2CBB06774473}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveActionExample", "joydriveActionExample-vc2003.vcproj", "{7E142B72-A049-4AB6-AB31-AEA652955B02}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netServerExample", "netServerExample-vc2003.vcproj", "{806CF3BE-8A4D-4C32-8574-58F3E85CA08C}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "robotSyncTaskExample", "robotSyncTaskExample-vc2003.vcproj", "{69571F42-5098-41FB-B8A8-19ECCCDB9BB3}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socketServerExample", "socketServerExample-vc2003.vcproj", "{CD42EA8C-AEEC-4B0A-AAE5-C8096EB9ACDF}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundsQueueExample", "soundsQueueExample-vc2003.vcproj", "{2F512A11-402E-496D-B20C-806414BDFE9F}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "teleopActionsExample", "teleopActionsExample-vc2003.vcproj", "{9E2494B2-5359-47C8-9122-549EDD467615}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcc4CameraExample", "vcc4CameraExample-vc2003.vcproj", "{F1757D78-5C7C-468D-AB53-7571B3F48975}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpsExample", "gpsExample-vc2003.vcproj", "{39B4C09E-E4E3-457F-B96C-B85D03C93B55}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simpleConnect", "simpleConnect-vc2003.vcproj", "{D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "..\src\AriaStatic-vc2003.vcproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actsColorFollowingExample", "actsColorFollowingExample-vc2003.vcproj", "{E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadExample", "threadExample-vc2003.vcproj", "{8280A5D9-7E6E-420F-9E54-F08314A23983}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demoStatic", "demoStatic-vc2003.vcproj", "{261FB793-1763-411D-A71B-D8FD9DB3B704}" + ProjectSection(ProjectDependencies) = postProject + {527BBF7C-631F-486B-8E4F-EA594299A71A} = {527BBF7C-631F-486B-8E4F-EA594299A71A} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {2B257343-C6CC-4017-87B6-959D447DA735}.Debug.ActiveCfg = Debug|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Debug.Build.0 = Debug|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Release.ActiveCfg = Release|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Release.Build.0 = Release|Win32 + {2FE13778-630C-434B-B3C0-AE0352E274CE}.Debug.ActiveCfg = Debug|Win32 + {2FE13778-630C-434B-B3C0-AE0352E274CE}.Debug.Build.0 = Debug|Win32 + {2FE13778-630C-434B-B3C0-AE0352E274CE}.Release.ActiveCfg = Release|Win32 + {2FE13778-630C-434B-B3C0-AE0352E274CE}.Release.Build.0 = Release|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Debug.ActiveCfg = Debug|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Debug.Build.0 = Debug|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Release.ActiveCfg = Release|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Release.Build.0 = Release|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Debug.ActiveCfg = Debug|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Debug.Build.0 = Debug|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Release.ActiveCfg = Release|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Release.Build.0 = Release|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Debug.ActiveCfg = Debug|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Debug.Build.0 = Debug|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Release.ActiveCfg = Release|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Release.Build.0 = Release|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Debug.ActiveCfg = Debug|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Debug.Build.0 = Debug|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Release.ActiveCfg = Release|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Release.Build.0 = Release|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Debug.ActiveCfg = Debug|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Debug.Build.0 = Debug|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Release.ActiveCfg = Release|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Release.Build.0 = Release|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Debug.ActiveCfg = Debug|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Debug.Build.0 = Debug|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Release.ActiveCfg = Release|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Release.Build.0 = Release|Win32 + {F7696DAA-98A9-4E34-B6DE-5AAF4D2314D0}.Debug.ActiveCfg = Debug|Win32 + {F7696DAA-98A9-4E34-B6DE-5AAF4D2314D0}.Debug.Build.0 = Debug|Win32 + {F7696DAA-98A9-4E34-B6DE-5AAF4D2314D0}.Release.ActiveCfg = Release|Win32 + {F7696DAA-98A9-4E34-B6DE-5AAF4D2314D0}.Release.Build.0 = Release|Win32 + {587F7690-442B-4568-A0BF-75CBF57EF3FF}.Debug.ActiveCfg = Debug|Win32 + {587F7690-442B-4568-A0BF-75CBF57EF3FF}.Debug.Build.0 = Debug|Win32 + {587F7690-442B-4568-A0BF-75CBF57EF3FF}.Release.ActiveCfg = Release|Win32 + {587F7690-442B-4568-A0BF-75CBF57EF3FF}.Release.Build.0 = Release|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Debug.ActiveCfg = Debug|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Debug.Build.0 = Debug|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Release.ActiveCfg = Release|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Release.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.Build.0 = Release|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Debug.ActiveCfg = Debug|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Debug.Build.0 = Debug|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Release.ActiveCfg = Release|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Release.Build.0 = Release|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Debug.ActiveCfg = Debug|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Debug.Build.0 = Debug|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Release.ActiveCfg = Release|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Release.Build.0 = Release|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Debug.ActiveCfg = Debug|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Debug.Build.0 = Debug|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Release.ActiveCfg = Release|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Release.Build.0 = Release|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Debug.ActiveCfg = Debug|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Debug.Build.0 = Debug|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Release.ActiveCfg = Release|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Release.Build.0 = Release|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Debug.ActiveCfg = Debug|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Debug.Build.0 = Debug|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Release.ActiveCfg = Release|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Release.Build.0 = Release|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Debug.ActiveCfg = Debug|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Debug.Build.0 = Debug|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Release.ActiveCfg = Release|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Release.Build.0 = Release|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Debug.ActiveCfg = Debug|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Debug.Build.0 = Debug|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Release.ActiveCfg = Release|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Release.Build.0 = Release|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Debug.ActiveCfg = Debug|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Debug.Build.0 = Debug|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Release.ActiveCfg = Release|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Release.Build.0 = Release|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Debug.ActiveCfg = Debug|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Debug.Build.0 = Debug|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Release.ActiveCfg = Release|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Release.Build.0 = Release|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Debug.ActiveCfg = Debug|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Debug.Build.0 = Debug|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Release.ActiveCfg = Release|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Release.Build.0 = Release|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Debug.ActiveCfg = Debug|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Debug.Build.0 = Debug|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Release.ActiveCfg = Release|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Release.Build.0 = Release|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Debug.ActiveCfg = Debug|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Debug.Build.0 = Debug|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Release.ActiveCfg = Release|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Release.Build.0 = Release|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Debug.ActiveCfg = Debug|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Debug.Build.0 = Debug|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Release.ActiveCfg = Release|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Release.Build.0 = Release|Win32 + {CD42EA8C-AEEC-4B0A-AAE5-C8096EB9ACDF}.Debug.ActiveCfg = Debug|Win32 + {CD42EA8C-AEEC-4B0A-AAE5-C8096EB9ACDF}.Debug.Build.0 = Debug|Win32 + {CD42EA8C-AEEC-4B0A-AAE5-C8096EB9ACDF}.Release.ActiveCfg = Release|Win32 + {CD42EA8C-AEEC-4B0A-AAE5-C8096EB9ACDF}.Release.Build.0 = Release|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Debug.ActiveCfg = Debug|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Debug.Build.0 = Debug|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Release.ActiveCfg = Release|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Release.Build.0 = Release|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Debug.ActiveCfg = Debug|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Debug.Build.0 = Debug|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Release.ActiveCfg = Release|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Release.Build.0 = Release|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Debug.ActiveCfg = Debug|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Debug.Build.0 = Debug|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Release.ActiveCfg = Release|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Release.Build.0 = Release|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Debug.ActiveCfg = Debug|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Debug.Build.0 = Debug|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Release.ActiveCfg = Release|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Release.Build.0 = Release|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Debug.ActiveCfg = Debug|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Debug.Build.0 = Debug|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Release.ActiveCfg = Release|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Release.Build.0 = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.Build.0 = Release|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Debug.ActiveCfg = Debug|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Debug.Build.0 = Debug|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Release.ActiveCfg = Release|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Release.Build.0 = Release|Win32 + {8280A5D9-7E6E-420F-9E54-F08314A23983}.Debug.ActiveCfg = Debug|Win32 + {8280A5D9-7E6E-420F-9E54-F08314A23983}.Debug.Build.0 = Debug|Win32 + {8280A5D9-7E6E-420F-9E54-F08314A23983}.Release.ActiveCfg = Release|Win32 + {8280A5D9-7E6E-420F-9E54-F08314A23983}.Release.Build.0 = Release|Win32 + {261FB793-1763-411D-A71B-D8FD9DB3B704}.Debug.ActiveCfg = Debug|Win32 + {261FB793-1763-411D-A71B-D8FD9DB3B704}.Debug.Build.0 = Debug|Win32 + {261FB793-1763-411D-A71B-D8FD9DB3B704}.Release.ActiveCfg = Release|Win32 + {261FB793-1763-411D-A71B-D8FD9DB3B704}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/examples/All_Examples-vc2008.sln b/Legacy/Aria/examples/All_Examples-vc2008.sln new file mode 100644 index 0000000..79b9af0 --- /dev/null +++ b/Legacy/Aria/examples/All_Examples-vc2008.sln @@ -0,0 +1,286 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionExample", "actionExample-vc2008.vcproj", "{2B257343-C6CC-4017-87B6-959D447DA735}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo-vc2008.vcproj", "{E1137892-32C1-4250-8784-8D48A6BEE2DD}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gyroExample", "gyroExample-vc2008.vcproj", "{1A8C458C-0086-4788-AF12-F1DFA5EBAD53}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipthru", "ipthru-vc2008.vcproj", "{B0CD9146-122F-49FD-A12A-7A970514DFB1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveThreaded", "joydriveThreaded-vc2008.vcproj", "{B6C39214-2167-4B3D-8C01-2D98A5642F8E}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveUserTask", "joydriveUserTask-vc2008.vcproj", "{B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sickLogger", "sickLogger-vc2008.vcproj", "{F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sickTeleop", "sickTeleop-vc2008.vcproj", "{705A253A-1107-4575-9F3D-B3A20420F731}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wander", "wander-vc2008.vcproj", "{5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2008.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wanderAndLogData", "wanderAndLogData-vc2008.vcproj", "{06616FA8-EBC6-4B23-B70C-E332A19160F1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionGroupExample", "actionGroupExample-vc2008.vcproj", "{7AD289AA-1C88-4EF2-B095-3234C613A08D}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socketClientExample", "socketClientExample-vc2008.vcproj", "{5571A55D-018E-485E-802E-D3F200D587DC}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "armExample", "armExample-vc2008.vcproj", "{731EC481-379F-4041-BEBD-358C26ACE117}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "auxSerialExample", "auxSerialExample-vc2008.vcproj", "{77DBE5F8-13CD-49FB-A4D9-35E360EC8992}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "directMotionExample", "directMotionExample-vc2008.vcproj", "{BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpptuExample", "dpptuExample-vc2008.vcproj", "{EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "functorExample", "functorExample-vc2008.vcproj", "{4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gotoActionExample", "gotoActionExample-vc2008.vcproj", "{FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gripperExample", "gripperExample-vc2008.vcproj", "{8DB12A26-FF33-46BE-800E-2CBB06774473}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveActionExample", "joydriveActionExample-vc2008.vcproj", "{7E142B72-A049-4AB6-AB31-AEA652955B02}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netServerExample", "netServerExample-vc2008.vcproj", "{806CF3BE-8A4D-4C32-8574-58F3E85CA08C}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "robotSyncTaskExample", "robotSyncTaskExample-vc2008.vcproj", "{69571F42-5098-41FB-B8A8-19ECCCDB9BB3}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundsQueueExample", "soundsQueueExample-vc2008.vcproj", "{2F512A11-402E-496D-B20C-806414BDFE9F}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "teleopActionsExample", "teleopActionsExample-vc2008.vcproj", "{9E2494B2-5359-47C8-9122-549EDD467615}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcc4CameraExample", "vcc4CameraExample-vc2008.vcproj", "{F1757D78-5C7C-468D-AB53-7571B3F48975}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpsExample", "gpsExample-vc2008.vcproj", "{39B4C09E-E4E3-457F-B96C-B85D03C93B55}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simpleConnect", "simpleConnect-vc2008.vcproj", "{D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "..\src\AriaStatic-vc2008.vcproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actsColorFollowingExample", "actsColorFollowingExample-vc2008.vcproj", "{E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadExample", "threadExample-vc2008.vcproj", "{4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2B257343-C6CC-4017-87B6-959D447DA735}.Debug|Win32.ActiveCfg = Debug|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Debug|Win32.Build.0 = Debug|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Release|Win32.ActiveCfg = Release|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Release|Win32.Build.0 = Release|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Debug|Win32.Build.0 = Debug|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Release|Win32.ActiveCfg = Release|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Release|Win32.Build.0 = Release|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Debug|Win32.ActiveCfg = Debug|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Debug|Win32.Build.0 = Debug|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Release|Win32.ActiveCfg = Release|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Release|Win32.Build.0 = Release|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Debug|Win32.ActiveCfg = Debug|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Debug|Win32.Build.0 = Debug|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Release|Win32.ActiveCfg = Release|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Release|Win32.Build.0 = Release|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Debug|Win32.Build.0 = Debug|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Release|Win32.ActiveCfg = Release|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Release|Win32.Build.0 = Release|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Debug|Win32.Build.0 = Debug|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Release|Win32.ActiveCfg = Release|Win32 + {B6F8EFCF-6C73-4C5C-98F4-0166E0DB0B53}.Release|Win32.Build.0 = Release|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Debug|Win32.Build.0 = Debug|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Release|Win32.ActiveCfg = Release|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Release|Win32.Build.0 = Release|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Debug|Win32.ActiveCfg = Debug|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Debug|Win32.Build.0 = Debug|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Release|Win32.ActiveCfg = Release|Win32 + {705A253A-1107-4575-9F3D-B3A20420F731}.Release|Win32.Build.0 = Release|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Debug|Win32.ActiveCfg = Debug|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Debug|Win32.Build.0 = Debug|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Release|Win32.ActiveCfg = Release|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Release|Win32.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.Build.0 = Release|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Debug|Win32.Build.0 = Debug|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Release|Win32.ActiveCfg = Release|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Release|Win32.Build.0 = Release|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Debug|Win32.ActiveCfg = Debug|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Debug|Win32.Build.0 = Debug|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Release|Win32.ActiveCfg = Release|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Release|Win32.Build.0 = Release|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Debug|Win32.ActiveCfg = Debug|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Debug|Win32.Build.0 = Debug|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Release|Win32.ActiveCfg = Release|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Release|Win32.Build.0 = Release|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Debug|Win32.ActiveCfg = Debug|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Debug|Win32.Build.0 = Debug|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Release|Win32.ActiveCfg = Release|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Release|Win32.Build.0 = Release|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Debug|Win32.ActiveCfg = Debug|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Debug|Win32.Build.0 = Debug|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Release|Win32.ActiveCfg = Release|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Release|Win32.Build.0 = Release|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Debug|Win32.Build.0 = Debug|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Release|Win32.ActiveCfg = Release|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Release|Win32.Build.0 = Release|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Debug|Win32.Build.0 = Debug|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Release|Win32.ActiveCfg = Release|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Release|Win32.Build.0 = Release|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Debug|Win32.Build.0 = Debug|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Release|Win32.ActiveCfg = Release|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Release|Win32.Build.0 = Release|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Debug|Win32.ActiveCfg = Debug|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Debug|Win32.Build.0 = Debug|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Release|Win32.ActiveCfg = Release|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Release|Win32.Build.0 = Release|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Debug|Win32.ActiveCfg = Debug|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Debug|Win32.Build.0 = Debug|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Release|Win32.ActiveCfg = Release|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Release|Win32.Build.0 = Release|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Debug|Win32.ActiveCfg = Debug|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Debug|Win32.Build.0 = Debug|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Release|Win32.ActiveCfg = Release|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Release|Win32.Build.0 = Release|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Debug|Win32.ActiveCfg = Debug|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Debug|Win32.Build.0 = Debug|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Release|Win32.ActiveCfg = Release|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Release|Win32.Build.0 = Release|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Debug|Win32.ActiveCfg = Debug|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Debug|Win32.Build.0 = Debug|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Release|Win32.ActiveCfg = Release|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Release|Win32.Build.0 = Release|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Debug|Win32.Build.0 = Debug|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Release|Win32.ActiveCfg = Release|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Release|Win32.Build.0 = Release|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Debug|Win32.Build.0 = Debug|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Release|Win32.ActiveCfg = Release|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Release|Win32.Build.0 = Release|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Debug|Win32.ActiveCfg = Debug|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Debug|Win32.Build.0 = Debug|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Release|Win32.ActiveCfg = Release|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Release|Win32.Build.0 = Release|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Debug|Win32.ActiveCfg = Debug|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Debug|Win32.Build.0 = Debug|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Release|Win32.ActiveCfg = Release|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Release|Win32.Build.0 = Release|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Debug|Win32.ActiveCfg = Debug|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Debug|Win32.Build.0 = Debug|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Release|Win32.ActiveCfg = Release|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Release|Win32.Build.0 = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug|Win32.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug|Win32.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release|Win32.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release|Win32.Build.0 = Release|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Debug|Win32.Build.0 = Debug|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Release|Win32.ActiveCfg = Release|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Release|Win32.Build.0 = Release|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Debug|Win32.ActiveCfg = Debug|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Debug|Win32.Build.0 = Debug|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Release|Win32.ActiveCfg = Release|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/examples/All_Examples-vc2010.sln b/Legacy/Aria/examples/All_Examples-vc2010.sln new file mode 100644 index 0000000..e7091db --- /dev/null +++ b/Legacy/Aria/examples/All_Examples-vc2010.sln @@ -0,0 +1,265 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionExample", "actionExample-vc2010.vcxproj", "{2B257343-C6CC-4017-87B6-959D447DA735}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo-vc2010.vcxproj", "{E1137892-32C1-4250-8784-8D48A6BEE2DD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gyroExample", "gyroExample-vc2010.vcxproj", "{1A8C458C-0086-4788-AF12-F1DFA5EBAD53}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipthru", "ipthru-vc2010.vcxproj", "{B0CD9146-122F-49FD-A12A-7A970514DFB1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveThreaded", "joydriveThreaded-vc2010.vcxproj", "{B6C39214-2167-4B3D-8C01-2D98A5642F8E}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sickLogger", "sickLogger-vc2010.vcxproj", "{F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wander", "wander-vc2010.vcxproj", "{5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2010.vcxproj", "{606257AE-E882-4C66-84C0-72331642D09F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wanderAndLogData", "wanderAndLogData-vc2010.vcxproj", "{06616FA8-EBC6-4B23-B70C-E332A19160F1}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionGroupExample", "actionGroupExample-vc2010.vcxproj", "{7AD289AA-1C88-4EF2-B095-3234C613A08D}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socketClientExample", "socketClientExample-vc2010.vcxproj", "{5571A55D-018E-485E-802E-D3F200D587DC}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "armExample", "armExample-vc2010.vcxproj", "{731EC481-379F-4041-BEBD-358C26ACE117}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "auxSerialExample", "auxSerialExample-vc2010.vcxproj", "{77DBE5F8-13CD-49FB-A4D9-35E360EC8992}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "directMotionExample", "directMotionExample-vc2010.vcxproj", "{BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpptuExample", "dpptuExample-vc2010.vcxproj", "{EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "functorExample", "functorExample-vc2010.vcxproj", "{4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gotoActionExample", "gotoActionExample-vc2010.vcxproj", "{FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gripperExample", "gripperExample-vc2010.vcxproj", "{8DB12A26-FF33-46BE-800E-2CBB06774473}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joydriveActionExample", "joydriveActionExample-vc2010.vcxproj", "{7E142B72-A049-4AB6-AB31-AEA652955B02}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netServerExample", "netServerExample-vc2010.vcxproj", "{806CF3BE-8A4D-4C32-8574-58F3E85CA08C}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "robotSyncTaskExample", "robotSyncTaskExample-vc2010.vcxproj", "{69571F42-5098-41FB-B8A8-19ECCCDB9BB3}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundsQueueExample", "soundsQueueExample-vc2010.vcxproj", "{2F512A11-402E-496D-B20C-806414BDFE9F}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "teleopActionsExample", "teleopActionsExample-vc2010.vcxproj", "{9E2494B2-5359-47C8-9122-549EDD467615}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcc4CameraExample", "vcc4CameraExample-vc2010.vcxproj", "{F1757D78-5C7C-468D-AB53-7571B3F48975}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpsExample", "gpsExample-vc2010.vcxproj", "{39B4C09E-E4E3-457F-B96C-B85D03C93B55}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simpleConnect", "simpleConnect-vc2010.vcxproj", "{D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "..\src\AriaStatic-vc2010.vcxproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actsColorFollowingExample", "actsColorFollowingExample-vc2010.vcxproj", "{E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadExample", "threadExample-vc2010.vcxproj", "{4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2B257343-C6CC-4017-87B6-959D447DA735}.Debug|Win32.ActiveCfg = Debug|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Debug|Win32.Build.0 = Debug|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Release|Win32.ActiveCfg = Release|Win32 + {2B257343-C6CC-4017-87B6-959D447DA735}.Release|Win32.Build.0 = Release|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Debug|Win32.Build.0 = Debug|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Release|Win32.ActiveCfg = Release|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Release|Win32.Build.0 = Release|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Debug|Win32.ActiveCfg = Debug|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Debug|Win32.Build.0 = Debug|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Release|Win32.ActiveCfg = Release|Win32 + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53}.Release|Win32.Build.0 = Release|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Debug|Win32.ActiveCfg = Debug|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Debug|Win32.Build.0 = Debug|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Release|Win32.ActiveCfg = Release|Win32 + {B0CD9146-122F-49FD-A12A-7A970514DFB1}.Release|Win32.Build.0 = Release|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Debug|Win32.Build.0 = Debug|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Release|Win32.ActiveCfg = Release|Win32 + {B6C39214-2167-4B3D-8C01-2D98A5642F8E}.Release|Win32.Build.0 = Release|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Debug|Win32.Build.0 = Debug|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Release|Win32.ActiveCfg = Release|Win32 + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F}.Release|Win32.Build.0 = Release|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Debug|Win32.ActiveCfg = Debug|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Debug|Win32.Build.0 = Debug|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Release|Win32.ActiveCfg = Release|Win32 + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3}.Release|Win32.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.Build.0 = Release|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Debug|Win32.Build.0 = Debug|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Release|Win32.ActiveCfg = Release|Win32 + {06616FA8-EBC6-4B23-B70C-E332A19160F1}.Release|Win32.Build.0 = Release|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Debug|Win32.ActiveCfg = Debug|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Debug|Win32.Build.0 = Debug|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Release|Win32.ActiveCfg = Release|Win32 + {7AD289AA-1C88-4EF2-B095-3234C613A08D}.Release|Win32.Build.0 = Release|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Debug|Win32.ActiveCfg = Debug|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Debug|Win32.Build.0 = Debug|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Release|Win32.ActiveCfg = Release|Win32 + {5571A55D-018E-485E-802E-D3F200D587DC}.Release|Win32.Build.0 = Release|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Debug|Win32.ActiveCfg = Debug|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Debug|Win32.Build.0 = Debug|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Release|Win32.ActiveCfg = Release|Win32 + {731EC481-379F-4041-BEBD-358C26ACE117}.Release|Win32.Build.0 = Release|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Debug|Win32.ActiveCfg = Debug|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Debug|Win32.Build.0 = Debug|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Release|Win32.ActiveCfg = Release|Win32 + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992}.Release|Win32.Build.0 = Release|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Debug|Win32.Build.0 = Debug|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Release|Win32.ActiveCfg = Release|Win32 + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF}.Release|Win32.Build.0 = Release|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Debug|Win32.Build.0 = Debug|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Release|Win32.ActiveCfg = Release|Win32 + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C}.Release|Win32.Build.0 = Release|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Debug|Win32.Build.0 = Debug|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Release|Win32.ActiveCfg = Release|Win32 + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D}.Release|Win32.Build.0 = Release|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Debug|Win32.ActiveCfg = Debug|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Debug|Win32.Build.0 = Debug|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Release|Win32.ActiveCfg = Release|Win32 + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067}.Release|Win32.Build.0 = Release|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Debug|Win32.ActiveCfg = Debug|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Debug|Win32.Build.0 = Debug|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Release|Win32.ActiveCfg = Release|Win32 + {8DB12A26-FF33-46BE-800E-2CBB06774473}.Release|Win32.Build.0 = Release|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Debug|Win32.ActiveCfg = Debug|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Debug|Win32.Build.0 = Debug|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Release|Win32.ActiveCfg = Release|Win32 + {7E142B72-A049-4AB6-AB31-AEA652955B02}.Release|Win32.Build.0 = Release|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Debug|Win32.ActiveCfg = Debug|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Debug|Win32.Build.0 = Debug|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Release|Win32.ActiveCfg = Release|Win32 + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C}.Release|Win32.Build.0 = Release|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Debug|Win32.ActiveCfg = Debug|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Debug|Win32.Build.0 = Debug|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Release|Win32.ActiveCfg = Release|Win32 + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3}.Release|Win32.Build.0 = Release|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Debug|Win32.Build.0 = Debug|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Release|Win32.ActiveCfg = Release|Win32 + {2F512A11-402E-496D-B20C-806414BDFE9F}.Release|Win32.Build.0 = Release|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Debug|Win32.Build.0 = Debug|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Release|Win32.ActiveCfg = Release|Win32 + {9E2494B2-5359-47C8-9122-549EDD467615}.Release|Win32.Build.0 = Release|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Debug|Win32.ActiveCfg = Debug|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Debug|Win32.Build.0 = Debug|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Release|Win32.ActiveCfg = Release|Win32 + {F1757D78-5C7C-468D-AB53-7571B3F48975}.Release|Win32.Build.0 = Release|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Debug|Win32.ActiveCfg = Debug|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Debug|Win32.Build.0 = Debug|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Release|Win32.ActiveCfg = Release|Win32 + {39B4C09E-E4E3-457F-B96C-B85D03C93B55}.Release|Win32.Build.0 = Release|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Debug|Win32.ActiveCfg = Debug|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Debug|Win32.Build.0 = Debug|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Release|Win32.ActiveCfg = Release|Win32 + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667}.Release|Win32.Build.0 = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug|Win32.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug|Win32.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release|Win32.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release|Win32.Build.0 = Release|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Debug|Win32.Build.0 = Debug|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Release|Win32.ActiveCfg = Release|Win32 + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0}.Release|Win32.Build.0 = Release|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Debug|Win32.ActiveCfg = Debug|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Debug|Win32.Build.0 = Debug|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Release|Win32.ActiveCfg = Release|Win32 + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/examples/Makefile b/Legacy/Aria/examples/Makefile new file mode 100644 index 0000000..496ce27 --- /dev/null +++ b/Legacy/Aria/examples/Makefile @@ -0,0 +1,30 @@ +# A simple $(MAKE)file to cause make to go look in the top directory. A simple +# convenience. + +all: lib + $(MAKE) -C .. examples + +lib: + $(MAKE) -C .. lib/libAria.so + +%.so: ../lib/libAria.so %.cpp + $(MAKE) -C .. examples/$@ + +%: ../lib/libAria.so %.cpp + $(MAKE) -C .. examples/$@ + +%Static: ../lib/libAria.a %.cpp + $(MAKE) -C .. examples/$@ + +clean: + $(MAKE) -C .. cleanExamples + +../lib/libAria.so: FORCE + $(MAKE) -C .. dirs lib/libAria.so + +../lib/libAria.a: FORCE + $(MAKE) -C .. dirs lib/libAria.a + +FORCE: + +.PHONY: all FORCE clean lib diff --git a/Legacy/Aria/examples/README.txt b/Legacy/Aria/examples/README.txt new file mode 100644 index 0000000..26fe309 --- /dev/null +++ b/Legacy/Aria/examples/README.txt @@ -0,0 +1,104 @@ +This directory has various example pieces of code and Microsoft VC++ +project files. + +The two most useful example programs are teleopActionsExample and +wander. TeleopActionsExample does guarded teleoperation, so you +can drive the robot around without running into walls. +Wander just has the robot wander, ie drive forward until there is +an obstacle, avoid it, then keep driving. lasers shows how to +connect to laser rangefinder(s) and use the data from them. + +The smallest, simplest example program is simpleConnect. It just +connects to the robot, prints some information, then disconnects +and exits. + + +Partial list of examples: +------------------------------------------------------------------------------- + + +demo - Uses "Modes" defined in ARIA to provide keyboard control of many +different robot features. Use this utility to experiment and test the robot's +hardware. + +simpleConnect - The smallest example program. It just connects to the robot. + +simpleUserTask - Demonstrates how to make a simple user task + +robotSyncTaskExample - simple example of ArRobot synchronized task callbacks + +lasers - Demonstrates how to connect to one or more laser rangefinder devices +as defined in robot and program parameters, and obtain data from them. + +directMotionDemo - Drives the robot around using the basic direct +motion commands (no ArActions or obstacle avoidance). it also runs the +robot in its own thread, and has examples of connection handler callbacks. + +actionExample - Defines a couple of custom ArAction classes, and uses them. + +actionGroup - Program that uses action groups to switch back and forth +between wander and teleop mode + +cameraPTZExample - Connect to PTZ camera or PTU (depending on robot parameter +file configuration or command line arguments). + +dpptuExample - A program to control the Directed Perception PTU with the keyboard. + +functor - An example program on the basic use of functors. + +gotoActionExample - An example of how to use ArActionGoto to go to many different +points and not just one + +gpsExample - An example showing how to get data from a GPS + +gripperDemo - Program that moves the robot and controls the gripper with the +joystick, note this doesn't do obstacle avoidance + +actsColorFolowingExample - A simple program that uses ACTS and a VC-C4 camera to move the +robot toward a color blob. + +joydriveActionExample - Uses an action that reads the robot to drive the joystick, +does not do obstacle avoidance + +joydriveThreaded - Program to drive the robot with a joystick. This one +uses its own ArASyncTask to drive the joystick handler. This is a good +example to look at to see how threading works. This does not do obstacle +avoidance, this also has a connection handler + +joydriveUserTask - Program to drive the robot with a joystick. This one +uses a user task to drive the joystick handler, does not do obstacle avoidance + +getAuxExample - An example program that uses the getAux command and +talks about how to use the getAux to do actual work + +moduleExample - Tests the loadable modules in a simple way + +socketClientExample - This program works with socketServerExample to +demonstrate ArSockets + +socketServerExample - A program to demonstrate ArSocket, works with +socketClientExample + +sickLineFinderSimple - An example of using the laser sensor line finding +class and lets you save the lines + +threadExample - Demonstrates ARIA's threading tools + +soundsQueueExamples - Demonstrates use of the ArSoundsQueue sound/speech queue + +teleopActionsExample - This uses ARIA's powerful Actions system to drive +the robot around using input from the keyboard or a joystick, but does +obstacle avoidance so the robot won't run into things (if it can sense +them with sonar or laser). + +wander - Makes the robot wander around, turning to avoid any sensed obstacles. +Uses sonar and laser (if available) to detect obstacles. + +wanderAndLogData - similar to wander, but prints out all kinds of runtime +information about the robot + +(others) - there are several other example programs in this directory not +listed here. Some are for older or less common hardware, or show some +advanced features of ARIA that only some users will need. Browse them +and read their descriptions (in comments at the top of source files) +for more information. diff --git a/Legacy/Aria/examples/actionExample-vc2003.vcproj b/Legacy/Aria/examples/actionExample-vc2003.vcproj new file mode 100644 index 0000000..363267f --- /dev/null +++ b/Legacy/Aria/examples/actionExample-vc2003.vcproj @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actionExample-vc2008.vcproj b/Legacy/Aria/examples/actionExample-vc2008.vcproj new file mode 100644 index 0000000..2ca5ab2 --- /dev/null +++ b/Legacy/Aria/examples/actionExample-vc2008.vcproj @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actionExample-vc2010.vcxproj b/Legacy/Aria/examples/actionExample-vc2010.vcxproj new file mode 100644 index 0000000..94049f4 --- /dev/null +++ b/Legacy/Aria/examples/actionExample-vc2010.vcxproj @@ -0,0 +1,155 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + actionExample + {2B257343-C6CC-4017-87B6-959D447DA735} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actionExample.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /verbose:lib %(AdditionalOptions) + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + OLDNAMES.lib;%(IgnoreSpecificDefaultLibraries) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actionExample.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/actionExample.cpp b/Legacy/Aria/examples/actionExample.cpp new file mode 100644 index 0000000..15da600 --- /dev/null +++ b/Legacy/Aria/examples/actionExample.cpp @@ -0,0 +1,337 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** +@example actionExample.cpp An example program demonstrating how to make and use new actions. + +This example program creates two new actions, Go and Turn. Go will drive the robot forward safely, +while Turn will avoid obstacles detected by the sonar by turning. +This program also adds a predefined +action from Aria which tries to recover from stalls (hit something and +can't move forward) by backing and turning. + +Each of these actions have the normal constructor and destructor, note that +the constructors use constructor chaining to create their ArAction part +correctly. Each action then also implements the essential virtual method, +fire(). This fire function is called by the action resolver, and +returns values that, in combination with other actions' desired behavior, +determine the driving commands sent to the robot. + +Also note that each of these actions override the setRobot function; these +implementations obtain the sonar device from the robot in addition to doing the +needed caching of the robot pointer. This is what you should do if you +care about the presence or absence of a particular sensor. If you don't +care about any particular sensor you could just use one of the checkRangeDevice... +methods in ArRobot (there are four of them). +Also note that these are very naive actions, they are simply an example +of how to use actions. + +See the @ref actions Actions section of the Aria reference manual overview for more details about actions. + +Note that actions must take a small amount of time to execute, to avoid +delaying the robot synchronization cycle. + +*/ + + +/* + * Action that drives the robot forward, but stops if obstacles are + * detected by sonar. + */ +class ActionGo : public ArAction +{ +public: + // constructor, sets myMaxSpeed and myStopDistance + ActionGo(double maxSpeed, double stopDistance); + // destructor. does not need to do anything + virtual ~ActionGo(void) {}; + // called by the action resolver to obtain this action's requested behavior + virtual ArActionDesired *fire(ArActionDesired currentDesired); + // store the robot pointer, and it's ArSonarDevice object, or deactivate this action if there is no sonar. + virtual void setRobot(ArRobot *robot); +protected: + // the sonar device object obtained from the robot by setRobot() + ArRangeDevice *mySonar; + + + /* Our current desired action: fire() modifies this object and returns + to the action resolver a pointer to this object. + This object is kept as a class member so that it persists after fire() + returns (otherwise fire() would have to create a new object each invocation, + but would never be able to delete that object). + */ + ArActionDesired myDesired; + + double myMaxSpeed; + double myStopDistance; +}; + + +/* Action that turns the robot away from obstacles detected by the + * sonar. */ +class ActionTurn : public ArAction +{ +public: + // constructor, sets the turnThreshold, and turnAmount + ActionTurn(double turnThreshold, double turnAmount); + // destructor, its just empty, we don't need to do anything + virtual ~ActionTurn(void) {}; + // fire, this is what the resolver calls to figure out what this action wants + virtual ArActionDesired *fire(ArActionDesired currentDesired); + // sets the robot pointer, also gets the sonar device, or deactivates this action if there is no sonar. + virtual void setRobot(ArRobot *robot); +protected: + // this is to hold the sonar device form the robot + ArRangeDevice *mySonar; + // what the action wants to do; used by the action resover after fire() + ArActionDesired myDesired; + // distance at which to start turning + double myTurnThreshold; + // amount to turn when turning is needed + double myTurnAmount; + // remember which turn direction we requested, to help keep turns smooth + int myTurning; // -1 == left, 1 == right, 0 == none +}; + +/* + Note the use of constructor chaining with + ArAction(actionName). Also note how it uses setNextArgument, which makes it so that + other parts of the program could find out what parameters this action has, and possibly modify them. +*/ +ActionGo::ActionGo(double maxSpeed, double stopDistance) : + ArAction("Go") +{ + mySonar = NULL; + myMaxSpeed = maxSpeed; + myStopDistance = stopDistance; + setNextArgument(ArArg("maximum speed", &myMaxSpeed, "Maximum speed to go.")); + setNextArgument(ArArg("stop distance", &myStopDistance, "Distance at which to stop.")); +} + +/* + Override ArAction::setRobot() to get the sonar device from the robot, or deactivate this action if it is missing. + You must also call ArAction::setRobot() to properly store + the ArRobot pointer in the ArAction base class. +*/ +void ActionGo::setRobot(ArRobot *robot) +{ + ArAction::setRobot(robot); + mySonar = robot->findRangeDevice("sonar"); + if (robot == NULL) + { + ArLog::log(ArLog::Terse, "actionExample: ActionGo: Warning: I found no sonar, deactivating."); + deactivate(); + } +} + +/* + This fire is the whole point of the action. + currentDesired is the combined desired action from other actions + previously processed by the action resolver. In this case, we're + not interested in that, we will set our desired + forward velocity in the myDesired member, and return it. + + Note that myDesired must be a class member, since this method + will return a pointer to myDesired to the caller. If we had + declared the desired action as a local variable in this method, + the pointer we returned would be invalid after this method + returned. +*/ +ArActionDesired *ActionGo::fire(ArActionDesired currentDesired) +{ + double range; + double speed; + + // reset the actionDesired (must be done), to clear + // its previous values. + myDesired.reset(); + + // if the sonar is null we can't do anything, so deactivate + if (mySonar == NULL) + { + deactivate(); + return NULL; + } + // get the range of the sonar + range = mySonar->currentReadingPolar(-70, 70) - myRobot->getRobotRadius(); + // if the range is greater than the stop distance, find some speed to go + if (range > myStopDistance) + { + // just an arbitrary speed based on the range + speed = range * .3; + // if that speed is greater than our max, cap it + if (speed > myMaxSpeed) + speed = myMaxSpeed; + // now set the velocity + myDesired.setVel(speed); + } + // the range was less than the stop distance, so request stop + else + { + myDesired.setVel(0); + } + // return a pointer to the actionDesired to the resolver to make our request + return &myDesired; +} + + +/* + This is the ActionTurn constructor, note the use of constructor chaining + with the ArAction. also note how it uses setNextArgument, which makes + it so that other things can see what parameters this action has, and + set them. It also initializes the classes variables. +*/ +ActionTurn::ActionTurn(double turnThreshold, double turnAmount) : + ArAction("Turn") +{ + myTurnThreshold = turnThreshold; + myTurnAmount = turnAmount; + setNextArgument(ArArg("turn threshold (mm)", &myTurnThreshold, "The number of mm away from obstacle to begin turnning.")); + setNextArgument(ArArg("turn amount (deg)", &myTurnAmount, "The number of degress to turn if turning.")); + myTurning = 0; +} + +/* + Sets the myRobot pointer (all setRobot overloaded functions must do this), + finds the sonar device from the robot, and if the sonar isn't there, + then it deactivates itself. +*/ +void ActionTurn::setRobot(ArRobot *robot) +{ + ArAction::setRobot(robot); + mySonar = robot->findRangeDevice("sonar"); + if (mySonar == NULL) + { + ArLog::log(ArLog::Terse, "actionExample: ActionTurn: Warning: I found no sonar, deactivating."); + deactivate(); + } +} + +/* + This is the guts of the Turn action. +*/ +ArActionDesired *ActionTurn::fire(ArActionDesired currentDesired) +{ + double leftRange, rightRange; + // reset the actionDesired (must be done) + myDesired.reset(); + // if the sonar is null we can't do anything, so deactivate + if (mySonar == NULL) + { + deactivate(); + return NULL; + } + // Get the left readings and right readings off of the sonar + leftRange = (mySonar->currentReadingPolar(0, 100) - + myRobot->getRobotRadius()); + rightRange = (mySonar->currentReadingPolar(-100, 0) - + myRobot->getRobotRadius()); + // if neither left nor right range is within the turn threshold, + // reset the turning variable and don't turn + if (leftRange > myTurnThreshold && rightRange > myTurnThreshold) + { + myTurning = 0; + myDesired.setDeltaHeading(0); + } + // if we're already turning some direction, keep turning that direction + else if (myTurning) + { + myDesired.setDeltaHeading(myTurnAmount * myTurning); + } + // if we're not turning already, but need to, and left is closer, turn right + // and set the turning variable so we turn the same direction for as long as + // we need to + else if (leftRange < rightRange) + { + myTurning = -1; + myDesired.setDeltaHeading(myTurnAmount * myTurning); + } + // if we're not turning already, but need to, and right is closer, turn left + // and set the turning variable so we turn the same direction for as long as + // we need to + else + { + myTurning = 1; + myDesired.setDeltaHeading(myTurnAmount * myTurning); + } + // return a pointer to the actionDesired, so resolver knows what to do + return &myDesired; +} + + + +int main(int argc, char** argv) +{ + Aria::init(); + + ArSimpleConnector conn(&argc, argv); + ArRobot robot; + ArSonarDevice sonar; + + // Create instances of the actions defined above, plus ArActionStallRecover, + // a predefined action from Aria. + ActionGo go(500, 350); + ActionTurn turn(400, 10); + ArActionStallRecover recover; + + + // Parse all command-line arguments + if(!Aria::parseArgs()) + { + Aria::logOptions(); + return 1; + } + + // Connect to the robot + if(!conn.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "actionExample: Could not connect to robot! Exiting."); + return 2; + } + + // Add the range device to the robot. You should add all the range + // devices and such before you add actions + robot.addRangeDevice(&sonar); + + + // Add our actions in order. The second argument is the priority, + // with higher priority actions going first, and possibly pre-empting lower + // priority actions. + robot.addAction(&recover, 100); + robot.addAction(&go, 50); + robot.addAction(&turn, 49); + + // Enable the motors, disable amigobot sounds + robot.enableMotors(); + + // Run the robot processing cycle. + // 'true' means to return if it loses connection, + // after which we exit the program. + robot.run(true); + + Aria::exit(0); +} diff --git a/Legacy/Aria/examples/actionExample.vcproj b/Legacy/Aria/examples/actionExample.vcproj new file mode 100644 index 0000000..755a3b8 --- /dev/null +++ b/Legacy/Aria/examples/actionExample.vcproj @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actionGroupExample-vc2003.vcproj b/Legacy/Aria/examples/actionGroupExample-vc2003.vcproj new file mode 100644 index 0000000..1adbdfb --- /dev/null +++ b/Legacy/Aria/examples/actionGroupExample-vc2003.vcproj @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actionGroupExample-vc2008.vcproj b/Legacy/Aria/examples/actionGroupExample-vc2008.vcproj new file mode 100644 index 0000000..2e0c47d --- /dev/null +++ b/Legacy/Aria/examples/actionGroupExample-vc2008.vcproj @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actionGroupExample-vc2010.vcxproj b/Legacy/Aria/examples/actionGroupExample-vc2010.vcxproj new file mode 100644 index 0000000..2289d6c --- /dev/null +++ b/Legacy/Aria/examples/actionGroupExample-vc2010.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + actionGroupExample + {7AD289AA-1C88-4EF2-B095-3234C613A08D} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actionGroup.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + true + ..\lib;%(AdditionalLibraryDirectories) + false + .\../bin/actionGroup.pdb + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actionGroup.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + true + ..\lib;%(AdditionalLibraryDirectories) + false + .\../bin/actionGroup.pdb + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/actionGroupExample.cpp b/Legacy/Aria/examples/actionGroupExample.cpp new file mode 100644 index 0000000..a975e62 --- /dev/null +++ b/Legacy/Aria/examples/actionGroupExample.cpp @@ -0,0 +1,173 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example actionGroupExample.cpp Example of using ArActionGroup objects to switch + * between two different kinds of behavior. + * + * This program creates two action groups, a teleoperation + * group and a wander group. Each group contains actions + * that together effect the desired behavior: in teleoperation + * mode, input actions allow the robot to be driven by keyboard + * or joystick, and higher-priority limiter actions help avoid obstacles. + * In wander mode, a constant-velocity action drives the robot + * forward, but higher-priority avoidance actions make the robot + * turn away from obstacles, or back up if an obstacle is hit or + * the motors stall. Keyboard commands (the T and W keys) are + * used to switch between the two modes, by activating the + * action group for the chosen mode. + * + * @see ArActionGroup + * @see @ref actions overview + * @see actionExample.cpp + */ + +ArActionGroup *teleop; +ArActionGroup *wander; + +// Activate the teleop action group. activateExlcusive() causes +// all other active action groups to be deactivated. +void teleopMode(void) +{ + teleop->activateExclusive(); + printf("\n== Teleoperation Mode ==\n"); + printf(" Use the arrow keys to drive, and the spacebar to stop.\n For joystick control hold the trigger button.\n Press 'w' to switch to wander mode.\n Press escape to exit.\n"); +} + +// Activate the wander action group. activateExlcusive() causes +// all other active action groups to be deactivated. +void wanderMode(void) +{ + wander->activateExclusive(); + printf("\n== Wander Mode ==\n"); + printf(" The robot will now just wander around avoiding things.\n Press 't' to switch to teleop mode.\n Press escape to exit.\n"); +} + + +int main(int argc, char** argv) +{ + Aria::init(); + ArArgumentParser argParser(&argc, argv); + ArSimpleConnector con(&argParser); + ArRobot robot; + ArSonarDevice sonar; + + argParser.loadDefaultArguments(); + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + return 1; + } + + /* - the action group for teleoperation actions: */ + teleop = new ArActionGroup(&robot); + + // don't hit any tables (if the robot has IR table sensors) + teleop->addAction(new ArActionLimiterTableSensor, 100); + + // limiter for close obstacles + teleop->addAction(new ArActionLimiterForwards("speed limiter near", + 300, 600, 250), 95); + + // limiter for far away obstacles + teleop->addAction(new ArActionLimiterForwards("speed limiter far", + 300, 1100, 400), 90); + + // limiter so we don't bump things backwards + teleop->addAction(new ArActionLimiterBackwards, 85); + + // the joydrive action (drive from joystick) + ArActionJoydrive joydriveAct("joydrive", 400, 15); + teleop->addAction(&joydriveAct, 50); + + // the keydrive action (drive from keyboard) + teleop->addAction(new ArActionKeydrive, 45); + + + + /* - the action group for wander actions: */ + wander = new ArActionGroup(&robot); + + // if we're stalled we want to back up and recover + wander->addAction(new ArActionStallRecover, 100); + + // react to bumpers + wander->addAction(new ArActionBumpers, 75); + + // turn to avoid things closer to us + wander->addAction(new ArActionAvoidFront("Avoid Front Near", 225, 0), 50); + + // turn avoid things further away + wander->addAction(new ArActionAvoidFront, 45); + + // keep moving + wander->addAction(new ArActionConstantVelocity("Constant Velocity", 400), 25); + + + + /* - use key commands to switch modes, and use keyboard + * and joystick as inputs for teleoperation actions. */ + + // create key handler if Aria does not already have one + ArKeyHandler *keyHandler = Aria::getKeyHandler(); + if (keyHandler == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + robot.attachKeyHandler(keyHandler); + } + + // set the callbacks + ArGlobalFunctor teleopCB(&teleopMode); + ArGlobalFunctor wanderCB(&wanderMode); + keyHandler->addKeyHandler('w', &wanderCB); + keyHandler->addKeyHandler('W', &wanderCB); + keyHandler->addKeyHandler('t', &teleopCB); + keyHandler->addKeyHandler('T', &teleopCB); + + // if we don't have a joystick, let 'em know + if (!joydriveAct.joystickInited()) + printf("Note: Do not have a joystick, only the arrow keys on the keyboard will work.\n"); + + // set the joystick so it won't do anything if the button isn't pressed + joydriveAct.setStopIfNoButtonPressed(false); + + + /* - connect to the robot, then enter teleoperation mode. */ + + robot.addRangeDevice(&sonar); + if(!con.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "actionGroupExample: Could not connect to the robot."); + Aria::exit(1); + } + + robot.enableMotors(); + teleopMode(); + robot.run(true); + + Aria::exit(0); +} diff --git a/Legacy/Aria/examples/actionGroupExample.vcproj b/Legacy/Aria/examples/actionGroupExample.vcproj new file mode 100644 index 0000000..979ad01 --- /dev/null +++ b/Legacy/Aria/examples/actionGroupExample.vcproj @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actsColorFollowingExample-vc2003.vcproj b/Legacy/Aria/examples/actsColorFollowingExample-vc2003.vcproj new file mode 100644 index 0000000..d889c17 --- /dev/null +++ b/Legacy/Aria/examples/actsColorFollowingExample-vc2003.vcproj @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actsColorFollowingExample-vc2008.vcproj b/Legacy/Aria/examples/actsColorFollowingExample-vc2008.vcproj new file mode 100644 index 0000000..8ac73d2 --- /dev/null +++ b/Legacy/Aria/examples/actsColorFollowingExample-vc2008.vcproj @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/actsColorFollowingExample-vc2010.vcxproj b/Legacy/Aria/examples/actsColorFollowingExample-vc2010.vcxproj new file mode 100644 index 0000000..888edb7 --- /dev/null +++ b/Legacy/Aria/examples/actsColorFollowingExample-vc2010.vcxproj @@ -0,0 +1,224 @@ + + + + + CLR Debug + Win32 + + + Debug + Win32 + + + Release + Win32 + + + + actsColorFollowingExample + {E17D0EDD-D945-4DC4-9C7C-FA21E2933FB0} + + + + Application + false + MultiByte + false + + + Application + false + MultiByte + false + + + Application + false + MultiByte + false + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../bin + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../bin + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../bin + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actsColorFollowingExample.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actsColorFollowingExample.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + false + true + + + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + true + true + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/actsColorFollowingExample.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + false + true + + + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;winmm.lib;AriaDebugVC9.lib;%(AdditionalDependencies) + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + true + true + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/actsColorFollowingExample.cpp b/Legacy/Aria/examples/actsColorFollowingExample.cpp new file mode 100644 index 0000000..39817a9 --- /dev/null +++ b/Legacy/Aria/examples/actsColorFollowingExample.cpp @@ -0,0 +1,335 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example actsColorFollowingExample.cpp Connects to the ACTS program, and + * uses an ArAction subclass to drive the robot towards the largest detected + * blob. + */ + +#include "Aria.h" + + + +// Chase is an action that moves the robot toward the largest blob that +// appears in it's current field of view. +class Chase : public ArAction +{ + +public: + + // The state of the chase action + enum State { + NO_TARGET, // There is no target in view + TARGET, // This is a target in view + }; + + // Constructor + Chase(ArACTS_1_2 *acts, ArVCC4 *camera); + + // Destructor + ~Chase(void); + + // The action + ArActionDesired *fire(ArActionDesired currentDesired); + + // Set the ACTS channel that we want to get blob info from + bool setChannel(int channel); + + // Return the current state of this action + State getState(void) { return myState; } + + // Height and width of pixels from frame-grabber + enum { + WIDTH = 160, + HEIGHT = 120 + }; + +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArVCC4 *myCamera; + ArTime myLastSeen; + State myState; + int myChannel; + int myMaxTime; +}; + + +// Constructor: Initialize the chase action +Chase::Chase(ArACTS_1_2 *acts, ArVCC4 *camera) : + ArAction("Chase", "Chases the largest blob.") +{ + myActs = acts; + myCamera = camera; + myChannel = 0; + myState = NO_TARGET; + setChannel(1); + myLastSeen.setToNow(); + myMaxTime = 1000; +} + +// Destructor +Chase::~Chase(void) {} + + +// The chase action +ArActionDesired *Chase::fire(ArActionDesired currentDesired) +{ + ArACTSBlob blob; + ArACTSBlob largestBlob; + + bool flag = false; + + int numberOfBlobs; + int blobArea = 10; + + double xRel, yRel; + + // Reset the desired action + myDesired.reset(); + + numberOfBlobs = myActs->getNumBlobs(myChannel); + + // If there are blobs to be seen, set the time to now + if(numberOfBlobs != 0) + { + for(int i = 0; i < numberOfBlobs; i++) + { + myActs->getBlob(myChannel, i + 1, &blob); + if(blob.getArea() > blobArea) + { + flag = true; + blobArea = blob.getArea(); + largestBlob = blob; + } + } + + myLastSeen.setToNow(); + } + + // If we have not seen a blob in a while... + if (myLastSeen.mSecSince() > myMaxTime) + { + if(myState != NO_TARGET) ArLog::log(ArLog::Normal, "Target Lost"); + myState = NO_TARGET; + } + else + { + // If we see a blob and haven't seen one before.. + if(myState != TARGET) { + ArLog::log(ArLog::Normal, "Target Aquired"); + ArLog::log(ArLog::Normal, "(Using channel %d with %d blobs)", myChannel, numberOfBlobs); + } + myState = TARGET; + } + + if(myState == TARGET && flag == true) + { + // Determine where the largest blob's center of gravity + // is relative to the center of the camera + xRel = (double)(largestBlob.getXCG() - WIDTH/2.0) / (double)WIDTH; + yRel = (double)(largestBlob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + + // Tilt the camera toward the blob + if(!(ArMath::fabs(yRel) < .20)) + { + if (-yRel > 0) + myCamera->tiltRel(1); + else + myCamera->tiltRel(-1); + } + + // Set the heading and velocity for the robot + if (ArMath::fabs(xRel) < .10) + { + myDesired.setDeltaHeading(0); + } + else + { + if (ArMath::fabs(-xRel * 10) <= 10) + myDesired.setDeltaHeading(-xRel * 10); + else if (-xRel > 0) + myDesired.setDeltaHeading(10); + else + myDesired.setDeltaHeading(-10); + + } + + myDesired.setVel(200); + return &myDesired; + } + + // If we have no target, then don't set any action and let lower priority + // actions (e.g. stop) control the robot. + return &myDesired; +} + +// Set the channel that the blob info will be obtained from +bool Chase::setChannel(int channel) +{ + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + return true; + } + else + return false; +} + + + + +// Callback to enable/disable the keyboard driving action +void toggleAction(ArAction* action) +{ + if(action->isActive()) { + action->deactivate(); + ArLog::log(ArLog::Normal, "%s action is now deactivated.", action->getName()); + } + else { + action->activate(); + ArLog::log(ArLog::Normal, "%s action is now activated.", action->getName()); + } +} + + + +// Main function +int main(int argc, char** argv) +{ + Aria::init(); + + // The robot + ArRobot robot; + + // A key handler to take input from keyboard + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + + // Sonar for basic obstacle avoidance + ArSonarDevice sonar; + + // The camera (Cannon VC-C4) + ArVCC4 vcc4 (&robot); + + // ACTS, for tracking blobs of color + ArACTS_1_2 acts; + + // command line arguments + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + + // The simple way to connect to things (takes arguments from argParser) + ArSimpleConnector simpleConnector(&argParser); + + // Parse the arguments + if (!Aria::parseArgs()) + { + Aria::logOptions(); + keyHandler.restore(); + Aria::exit(1); + return 1; + } + + // Robot motion limiter actions (if obstacles are detected by sonar) + ArActionLimiterForwards limiter("speed limiter near", 350, 800, 200); + ArActionLimiterForwards limiterFar("speed limiter far", 400, 1250, 300); + ArActionLimiterBackwards backwardsLimiter; + ArActionConstantVelocity stop("stop", 0); + //ArActionConstantVelocity backup("backup", -200); + + + // The color following action, defined above + Chase chase(&acts, &vcc4); + + // Keyboard teleoperation action + ArActionKeydrive keydriveAction; + + // Use the "a" key to activate/deactivate keydrive mode + keyHandler.addKeyHandler('a', new ArGlobalFunctor1(&toggleAction, &keydriveAction)); + + // Let Aria know about the key handler + Aria::setKeyHandler(&keyHandler); + + // Add the key handler to the robot + robot.attachKeyHandler(&keyHandler); + + // Add the sonar to the robot + robot.addRangeDevice(&sonar); + + // Connect to the robot + if (!simpleConnector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "Error: Could not connect to robot... exiting\n"); + keyHandler.restore(); + Aria::exit(1); + } + + // Open a connection to ACTS + if(!acts.openPort(&robot)) + { + ArLog::log(ArLog::Terse, "Error: Could not connect to ACTS... exiting."); + keyHandler.restore(); + Aria::exit(2); + } + + // Initialize the camera + vcc4.init(); + + // Wait a second..... + ArUtil::sleep(1000); + + // Artificially keep the robot from going too fast + robot.setAbsoluteMaxTransVel(400); + + // Enable the motors + robot.comInt(ArCommands::ENABLE, 1); + + // Turn off the amigobot sounds + robot.comInt(ArCommands::SOUNDTOG, 0); + + // Wait.... + ArUtil::sleep(200); + + // Add the actions to the robot in descending order of importance. + robot.addAction(&limiter, 7); + robot.addAction(&limiterFar, 6); + robot.addAction(&backwardsLimiter, 5); + robot.addAction(&keydriveAction, 4); + robot.addAction(&chase, 3); + robot.addAction(&stop, 1); + + // Start with keydrive action disabled. Use the 'a' key to turn it on. + keydriveAction.deactivate(); + + // Run the robot processing cycle until the connection is lost + ArLog::log(ArLog::Normal, "Running. Train ACTS to detect a color to drive towards an object, or use 'a' key to switch to keyboard driving mode."); + robot.run(true); + + Aria::exit(0); + return 0; +} + diff --git a/Legacy/Aria/examples/armExample-vc2003.vcproj b/Legacy/Aria/examples/armExample-vc2003.vcproj new file mode 100644 index 0000000..7e783b6 --- /dev/null +++ b/Legacy/Aria/examples/armExample-vc2003.vcproj @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/armExample-vc2008.vcproj b/Legacy/Aria/examples/armExample-vc2008.vcproj new file mode 100644 index 0000000..1f253a6 --- /dev/null +++ b/Legacy/Aria/examples/armExample-vc2008.vcproj @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/armExample-vc2010.vcxproj b/Legacy/Aria/examples/armExample-vc2010.vcxproj new file mode 100644 index 0000000..3febe2e --- /dev/null +++ b/Legacy/Aria/examples/armExample-vc2010.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + armExample + {731EC481-379F-4041-BEBD-358C26ACE117} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\Release/P2ArmSimple.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + true + ..\lib;%(AdditionalLibraryDirectories) + false + .\Release/P2ArmSimple.pdb + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\Debug/P2ArmSimple.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + true + ..\lib;%(AdditionalLibraryDirectories) + false + .\Debug/P2ArmSimple.pdb + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/armExample.cpp b/Legacy/Aria/examples/armExample.cpp new file mode 100644 index 0000000..7028d82 --- /dev/null +++ b/Legacy/Aria/examples/armExample.cpp @@ -0,0 +1,162 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example armExample.cpp Example program showing use of the original 5DOF P2 arm accessory. + * + * Demonstrates how to connect with the Pioneer 2 controller + * and set up the P2Arm class, including the ARMpac handler. + * It simply queries and prints the status of the arm, moving it to a position, then exits. + * Note, The P2Arm class is only for use with the microcontroller-integrated original 5DOF + * Pioneer 2 arm (Robotica arm). The newer Energid Cyton 7DOF arm is accessed through + * separate cyton libraries. + * +*/ + +int main(int argc, char **argv) +{ + Aria::init(); + ArSimpleConnector con(&argc, argv); + ArRobot robot; + ArP2Arm arm; + + + if(!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + ArLog::log(ArLog::Normal, "armExample: Connecting to the robot."); + if(!con.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "armExample: Could not connect to the robot. Exiting."); + Aria::exit(1); + return 1; + } + robot.runAsync(true); + + // turn off sonar + robot.comInt(28, 0); + + // Set up and initialize the arm + arm.setRobot(&robot); + if (arm.init() != ArP2Arm::SUCCESS) + { + ArLog::log(ArLog::Terse, "armExample: Error initializing the P2 Arm!"); + return 1; + } + + // Print out some of the settings + P2ArmJoint *joint; + printf("Current joint info:\nJoint Vel Home Center\n"); + for (int i=1; i<=ArP2Arm::NumJoints; i++) + { + joint = arm.getJoint(i); + printf(" %2i: %5i %5i %5i\n", i, joint->myVel, joint->myHome, joint->myCenter); + } + printf("\n"); + + // Put the arm to work + printf("Powering on (takes a couple seconds to stabilize)\n"); + arm.powerOn(); + + // Request one status packet and print out the arm's status + printf("Current arm status:\n"); + arm.requestStatus(ArP2Arm::StatusSingle); + ArUtil::sleep(200); // Give time to get the packet + printf("Arm Status: "); + if (arm.getStatus() & ArP2Arm::ArmGood) + printf("Good=1 "); + else + printf("Good=0 "); + if (arm.getStatus() & ArP2Arm::ArmInited) + printf("Inited=1 "); + else + printf("Inited=0 "); + if (arm.getStatus() & ArP2Arm::ArmPower) + printf("Power=1 "); + else + printf("Power=0 "); + if (arm.getStatus() & ArP2Arm::ArmHoming) + printf("Homing=1 "); + else + printf("Homing=0 "); + printf("\n\n"); + + // Move the arm joints to specific positions + printf("Moving Arm...\n"); + int deploy_offset[] = {0, -100, 10, 40, 80, -55, 20}; + for (int i=1; i<=ArP2Arm::NumJoints; i++) + { + joint = arm.getJoint(i); + arm.moveToTicks(i, joint->myCenter + deploy_offset[i]); + } + + // Wait for arm to achieve new position, printing joint positions and M for + // moving, NM for not moving. + arm.requestStatus(ArP2Arm::StatusContinuous); + ArUtil::sleep(300); // wait a moment for arm status packet update with joints moving + bool moving = true; + while (moving) + { + moving = false; + printf("Joints: "); + for (int i=1; i<=ArP2Arm::NumJoints; i++) + { + printf("[%d] %.0f, ", i, arm.getJointPos(i)); + if (arm.getMoving(i)) + { + printf("M; "); + moving = true; + } + else + { + printf("NM; "); + } + } + printf("\r"); + } + printf("\n\n"); + + // Return arm to park, wait, and disconnect. (Though the arm will automatically park + // on client disconnect) + printf("Parking arm.\n"); + arm.park(); + + // Wait 5 seconds or until arm shuts off + for(int i = 5; (i > 0) && (arm.getStatus() & ArP2Arm::ArmPower); i--) + { + ArUtil::sleep(1000); + } + + // Disconnect from robot, etc., and exit. + printf("Shutting down ARIA and exiting.\n"); + Aria::exit(0); + return(0); +} + diff --git a/Legacy/Aria/examples/auxSerialExample-vc2003.vcproj b/Legacy/Aria/examples/auxSerialExample-vc2003.vcproj new file mode 100644 index 0000000..90967e6 --- /dev/null +++ b/Legacy/Aria/examples/auxSerialExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/auxSerialExample-vc2008.vcproj b/Legacy/Aria/examples/auxSerialExample-vc2008.vcproj new file mode 100644 index 0000000..6fdb3d0 --- /dev/null +++ b/Legacy/Aria/examples/auxSerialExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/auxSerialExample-vc2010.vcxproj b/Legacy/Aria/examples/auxSerialExample-vc2010.vcxproj new file mode 100644 index 0000000..392ad2e --- /dev/null +++ b/Legacy/Aria/examples/auxSerialExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + auxSerialExample + {77DBE5F8-13CD-49FB-A4D9-35E360EC8992} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/getAuxExample.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/getAuxExample.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/auxSerialExample.cpp b/Legacy/Aria/examples/auxSerialExample.cpp new file mode 100644 index 0000000..8c7fe14 --- /dev/null +++ b/Legacy/Aria/examples/auxSerialExample.cpp @@ -0,0 +1,152 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example auxSerialExample.cpp + * Demonstrates the use of a robot packet handler to recieve data from a device + * attached to the robot microcontroller's auxilliary serial port. + + This example shows how to use the GETAUX command and how to recieve SERAUX + serial port data. + To use this example, you must have the auxilliary serial port AUX1 on the + microcontroller (inside the robot) connected to a device that is sending text data. + + You can connect AUX1 to a computer through an RS-232 cable with a NULL modem adapter, + and run a program such as minicom (Linux) or HyperTerminal (Windows). Then just + type to send data to the AUX1 port. Configure minicom or HyperTerminal to have + the following serial port settings: + 9600 baud + 8 data bits, 1 stop bit, no parity + No flow control (not hardware, not software)! + + This program creates a packet handler function (getAuxPrinter) + and adds it to the ArRobot object. All packets recieved from the robot + are passed to all packet handlers. getAuxPrinter() checks whether the packet + is an SERAUX packet, and if so, prints out the data contained within the packet. + If a newline or carriage return character is recieved, then it sends a command + to send data back out through the AUX serial port. The packet handler then sends + a GETAUX command to the robot to request more data. +*/ + +// our robot object +ArRobot *robot; + +/** + Packet handler that simply prints out each byte of a packet as a + character, then sends another request for more data (using GETAUX command). + When it receives a newline or carriage return, it also replies + using the TTY2 command with a string ("Hello, world!\n\r"). +*/ +bool getAuxPrinter(ArRobotPacket *packet) +{ + char c; + + // If this is not an aux. serial data packet, then return false to allow other + // packet handlers to recieve the packet. The packet type ID numbers are found + // in the description of the GETAUX commands in the robot manual. + if (packet->getID() != 0xb0) // 0xB0 is SERAUXpac. SERAUX2pac is 0xB8, SERAUX3pac is 0xC8. + return false; + + // Get bytes out of the packet buffer and print them. + while (packet->getReadLength () < packet->getLength() - 2) + { + c = packet->bufToUByte(); + if (c == '\r' || c == '\n') + { + putchar('\n'); + + // How to send data to the serial port. See robot manual + // (but note that TTY2 is for the AUX1 port, TTY3 for AUX2, etc.) + robot->comStr(ArCommands::TTY2, "Hello, World!\n\r"); + } + else + putchar(c); + fflush(stdout); + } + + + // Request more data: + robot->comInt(ArCommands::GETAUX, 1); + + // To request 12 bytes at a time, specify that instead: + //robot->comInt(ArCommands::GETAUX, 12); + + // If you wanted to recieve information from the second aux. serial port, use + // the GETAUX2 command instead; but the packet returned will also have a + // different type ID. + //robot->comInt(ArCommands::GETAUX2, 1); + + + // Return true to indicate to ArRobot that we have handled this packet. + return true; +} + + +int main(int argc, char **argv) +{ + Aria::init(); + + ArArgumentParser argParser(&argc, argv); + ArSimpleConnector conn(&argParser); + argParser.loadDefaultArguments(); + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + return 1; + } + + // This is a global pointer so the global functions can use it. + robot = new ArRobot; + + // functor for the packet handler + ArGlobalRetFunctor1 getAuxCB(&getAuxPrinter); + // add our packet handler as the first one in the list + robot->addPacketHandler(&getAuxCB, ArListPos::FIRST); + + // Connect to the robot + if(!conn.connectRobot(robot)) + { + ArLog::log(ArLog::Terse, "getAuxExample: Error connecting to the robot."); + return 2; + } + + ArLog::log(ArLog::Normal, "getAuxExample: Connected to the robot. Sending command to change AUX1 baud rate to 9600..."); + robot->comInt(ArCommands::AUX1BAUD, 0); // See robot manual + + // Send the first GETAUX request + robot->comInt(ArCommands::GETAUX, 1); + + // If you wanted to recieve information from the second aux. serial port, use + // the GETAUX2 command instead; but the packet returned will also have a + // different type ID. + //robot->comInt(ArCommands::GETAUX2, 1); + + // run the robot until disconnect, then shutdown and exit. + robot->run(true); + Aria::exit(0); + return 0; +} + diff --git a/Legacy/Aria/examples/cameraPTZExample.cpp b/Legacy/Aria/examples/cameraPTZExample.cpp new file mode 100644 index 0000000..6413f62 --- /dev/null +++ b/Legacy/Aria/examples/cameraPTZExample.cpp @@ -0,0 +1,167 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +//#include "ArVideo.h" + +/** @example cameraPTZExample.cpp This is an example showing how to connect to + * and use a camera's PTZ control (or DPPTU) + * + * This program can control PTZ cameras with support built in to the ARIA + * library: Canon VCC 4/5, Sony PTZ, RVision, and DPPTU. To control the Axis + * network cameras, see example programs in the ArVideo library instead. + * + * PTZ type and connection parameters are read from robot parameter file if + * available, or use command-line arguments to override the robot parameter + * file. Run with --help for a complete list of command-line options available. + * + * For example, to connect to Canon VCC on robot auxilliary serial port, use: + * ./cameraPTZExample -ptzType vcc4 + * + * To connect to Canon VCC on serial port COM4, use: + * ./cameraPTZExample -ptzType vcc4 -ptzSerialPort COM4 + * or on Linux this works too: + * ./cameraPTZExample -ptzType vcc4 -ptzSerialPort /dev/ttyS3 + * + * To connect to RVision camera, use: + * ./cameraPTZExample -ptzType rvision + * + * To connect to DPPTU use: + * ./cameraPTZExample -ptzType dpptu + * + * Canon VCC defaults to use the microcontroller port Aux1. Use + * -ptzRobotAuxSerialPort or -ptzSerialPort arguments to change. + */ + + +int main(int argc, char **argv) +{ + Aria::init(); + //ArVideo::init(); +// ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + + // This is used to create and configure the PTZ interface object based on the + // robot's parameter file and this program's command line options (run with + // -help for list). Must be created before calling Aria::parseArgs(). + ArPTZConnector ptzConnector(&parser, &robot); + + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "cameraPTZExample: Warning, Could not connect to the robot. Won't use robot parameter file for defaults"); + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + ArLog::log(ArLog::Normal, "cameraPTZExample: Connected."); + + robot.runAsync(true); + + // Create and connect to all PTZs given in robot parameter file and command + // line. + const int PauseTime = 3500; // ms + ptzConnector.connect(); + ArUtil::sleep(PauseTime*2); + for(size_t i = 0; i < ptzConnector.getNumPTZs(); ++i) + { + ArLog::log(ArLog::Normal, "cameraPTZExample: [getPTZ(%d)..]", i); + + ArPTZ *ptz = ptzConnector.getPTZ(i); + if(!ptz) + { + ArLog::log(ArLog::Normal, "cameraPTZExample: there is no PTZ %d.", i+1); + continue; + } + + ArLog::log(ArLog::Normal, "cameraPTZExample: ===== PTZ #%d is a %s =====", i+1, ptz->getTypeName()); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan left -90.."); + ptz->pan(-90); + ArUtil::sleep(PauseTime); + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan position is now %f (%s).", ptz->getPan(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + if(!ArMath::compareFloats(ptz->getPan(), -90, 1)) + ArLog::log(ArLog::Normal, "cameraPTZExample: Warning: pan position is more than one degree different from command -90."); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan right 90.."); + ptz->pan(90); + ArUtil::sleep(PauseTime); + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan position is now %f. (%s)", ptz->getPan(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + if(!ArMath::compareFloats(ptz->getPan(), 90, 1)) + ArLog::log(ArLog::Normal, "cameraPTZExample: Warning: pan position is more than one degree different from command 90."); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan center 0.."); + ptz->pan(0); + ArUtil::sleep(PauseTime); + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan position is now %f (%s).", ptz->getPan(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + if(!ArMath::compareFloats(ptz->getPan(), 0, 1)) + ArLog::log(ArLog::Normal, "cameraPTZExample: Warning: pan position is more than one degree different from command 0."); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt up 90.."); + ptz->tilt(90); + ArUtil::sleep(PauseTime); + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt position is now %f(%s).", ptz->getTilt(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + if(!ArMath::compareFloats(ptz->getTilt(), 90, 1)) + ArLog::log(ArLog::Normal, "cameraPTZExample: Warning: tilt position is more than one degree different from command 90."); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt down -20.."); + ptz->tilt(-20); + ArUtil::sleep(PauseTime); + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt position is now %f(%s).", ptz->getTilt(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + if(!ArMath::compareFloats(ptz->getTilt(), -20, 1)) + ArLog::log(ArLog::Normal, "cameraPTZExample: Warning: tilt position is more than one degree different from command -20."); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt center 0.."); + ptz->tilt(0); + ArUtil::sleep(PauseTime); + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt position is now %f (%s).", ptz->getTilt(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + if(!ArMath::compareFloats(ptz->getTilt(), 0, 1)) + ArLog::log(ArLog::Normal, "cameraPTZExample: Warning: tilt position is more than one degree different from command 0."); + + ArLog::log(ArLog::Normal, "cameraPTZExample: Reset.."); + ptz->reset(); + ArLog::log(ArLog::Normal, "cameraPTZExample: Pan position is now %f (%s).", ptz->getPan(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + ArLog::log(ArLog::Normal, "cameraPTZExample: Tilt position is now %f (%s).", ptz->getTilt(), (ptz->canGetRealPanTilt()?"real position from camera":"last command sent")); + ArUtil::sleep(PauseTime); + } + + ArLog::log(ArLog::Normal, "cameraPTZExample: Ending robot thread.."); + robot.stopRunning(); + + // wait for the thread to stop + robot.waitForRunExit(); + + // exit + ArLog::log(ArLog::Normal, "cameraPTZExample: Exiting."); + Aria::exit(0); + return 0; +} + diff --git a/Legacy/Aria/examples/cameraPTZExample.vcxproj b/Legacy/Aria/examples/cameraPTZExample.vcxproj new file mode 100644 index 0000000..bc488a3 --- /dev/null +++ b/Legacy/Aria/examples/cameraPTZExample.vcxproj @@ -0,0 +1,154 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D641D2B7-3B96-437A-96F9-7F7B2B1FDC2F} + cameraPTZExample + cameraPTZExample + + + + Application + true + MultiByte + + + Application + true + MultiByte + Windows7.1SDK + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + Windows7.1SDK + + + + + + + + + + + + + + + + + + + ../../bin/ + + + ../../bin64/ + + + ../obj/$(ProjectName)-$(Configuration)-VC10/ + $(ProjectName)_d + + + ../obj64/$(ProjectName)-$(Configuration)-VC10/ + + + ../../bin/ + + + ../../bin64/ + + + ../obj/$(ProjectName)-$(Configuration)-VC10/ + + + ../obj64/$(ProjectName)-$(Configuration)-VC10/ + + + + Level3 + Disabled + ../include;../../include;../../ArNetworking/include + + + true + AriaDebugVC10.lib;ArNetworkingDebugVC10.lib;ws2_32.lib;winmm.lib + ../../lib + + + + + Level3 + Disabled + ../include;../../include;../../ArNetworking/include + + + true + AriaDebugVC10.lib;ArNetworkingDebugVC10.lib;ws2_32.lib;winmm.lib + ../../lib + + + + + Level3 + MaxSpeed + true + true + ../include;../../include;../../ArNetworking/include + + + true + true + true + AriaVC10.lib;ArNetworkingVC10.lib;ws2_32.lib;winmm.lib + ../../lib + + + + + Level3 + MaxSpeed + true + true + ../include;../../include;../../ArNetworking/include + + + true + true + true + AriaVC10.lib;ArNetworkingVC10.lib;ws2_32.lib;winmm.lib + ../../lib + + + + + + + + + diff --git a/Legacy/Aria/examples/configExample.cpp b/Legacy/Aria/examples/configExample.cpp new file mode 100644 index 0000000..18c9125 --- /dev/null +++ b/Legacy/Aria/examples/configExample.cpp @@ -0,0 +1,155 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example configExample.cpp Example program demonstrating the use of ArConfig + * + * This program shows how to use ArConfig to store configuration parameters + * and load/save them from a file. + * + * The ArNetworking library includes server classes that will let you + * use a remote client such as MobileEyes to view and change the configuration. + * See ArNetworking documentation and examples. + */ + +class ConfigExample +{ + ArConfig* myConfig; + int myIntParam; + double myDoubleParam; + bool myBoolParam; + char myStringParam[256]; + ArRetFunctorC myProcessConfigCB; + +public: + ConfigExample(): + myIntParam(0), + myDoubleParam(0.5), + myBoolParam(false), + myProcessConfigCB(this, &ConfigExample::processConfigFile) + { + // The global Aria class contains an ArConfig object. You can create + // other instances of ArConfig, but this is how you can share one ArConfig + // among various program modules. + // If you want to store a config parameter in ArConfig, first you must add + // it to the ArConfig object. Parameters are stored in sections, and + // they affect a variable via a pointer provided in an ArConfigArg + // object: + ArConfig* config = Aria::getConfig(); + config->setSectionComment("Example Section", "Contains parameters created by the configExample"); + + // Add an integer which ranges from -10 to 10: + config->addParam( ArConfigArg("ExampleIntegerParameter", &myIntParam, "Example parameter integer.", -10, 10), "Example Section", ArPriority::NORMAL); + + // Add a floating point number which ranges from 0.0 to 1.0: + config->addParam( ArConfigArg("ExampleDoubleParameter", &myDoubleParam, "Example double precision floating point number.", 0.0, 1.0), "Example Section", ArPriority::NORMAL); + + // Essential parameters can be placed in the "Important" priority level: + config->addParam( ArConfigArg("ExampleBoolParameter", &myBoolParam, "Example boolean parameter."), "Example Section", ArPriority::IMPORTANT); + + // Unimportant parameters can be placed in the "Trivial" priority level: + myStringParam[0] = '\0'; // make string empty + config->addParam( ArConfigArg("ExampleStringParameter", myStringParam, "Example string parameter.", 256), "Example Section", ArPriority::TRIVIAL); + + // You can set a callback to be invoked when the configuration changes, in + // case you need to respond to any changes in the parameter values: + config->addProcessFileCB(&myProcessConfigCB, 0); + } + + + // Method called by config process callback when a new file is loaded. + // It can return false to indicate an error, or true to indicate no error. + bool processConfigFile() + { + ArLog::log(ArLog::Normal, "configExample: Config changed. New values: int=%d, float=%f, bool=%s, string=\"%s\".", myIntParam, myDoubleParam, myBoolParam?"true":"false", myStringParam); + return true; + } +}; + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + if (argc < 2 || !Aria::parseArgs() || argParser.checkArgument("-help")) + { + ArLog::log(ArLog::Terse, "configExample usage: configExample .\nFor example, \"configExample examples/configExample.cfg\"."); + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + // Object containing config parameters, and responding to changes: + ConfigExample configExample; + + // Load a config file given on the command line into the global + // ArConfig object kept by Aria. Normally ArConfig expects config + // files to be in the main ARIA directory (i.e. /usr/local/Aria or + // a directory specified by the $ARIA environment variable). + char error[512]; + const char* filename = argParser.getArg(1); + ArConfig* config = Aria::getConfig(); + ArLog::log(ArLog::Normal, "configExample: loading configuration file \"%s\"...", filename); + if (! config->parseFile(filename, true, false, error, 512) ) + { + ArLog::log(ArLog::Terse, "configExample: Error loading configuration file \"%s\" %s. Try \"examples/configExample.cfg\".", filename, error); + Aria::exit(-1); + return -1; + } + + ArLog::log(ArLog::Normal, "configExample: Loaded configuration file \"%s\".", filename); + + // After changing a config value, you should invoke the callbacks: + ArConfigSection* section = config->findSection("Example Section"); + if (section) + { + ArConfigArg* arg = section->findParam("ExampleBoolParameter"); + if (arg) + { + arg->setBool(!arg->getBool()); + if (! config->callProcessFileCallBacks(false, error, 512) ) + { + ArLog::log(ArLog::Terse, "configExample: Error processing modified config: %s.", error); + } + else + { + ArLog::log(ArLog::Normal, "configExample: Successfully modified config and invoked callbacks."); + } + } + } + + // You can save the configuration as well: + ArLog::log(ArLog::Normal, "configExample: Saving configuration..."); + if(!config->writeFile(filename)) + { + ArLog::log(ArLog::Terse, "configExample: Error saving configuration to file \"%s\"!", filename); + } + + // end of program. + ArLog::log(ArLog::Normal, "configExample: end of program."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/demo b/Legacy/Aria/examples/demo new file mode 100755 index 0000000..aefbb29 Binary files /dev/null and b/Legacy/Aria/examples/demo differ diff --git a/Legacy/Aria/examples/demo-vc2003.vcproj b/Legacy/Aria/examples/demo-vc2003.vcproj new file mode 100644 index 0000000..0f7dc21 --- /dev/null +++ b/Legacy/Aria/examples/demo-vc2003.vcproj @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/demo-vc2008.vcproj b/Legacy/Aria/examples/demo-vc2008.vcproj new file mode 100644 index 0000000..265c526 --- /dev/null +++ b/Legacy/Aria/examples/demo-vc2008.vcproj @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/demo-vc2010.vcxproj b/Legacy/Aria/examples/demo-vc2010.vcxproj new file mode 100644 index 0000000..12796cb --- /dev/null +++ b/Legacy/Aria/examples/demo-vc2010.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + demo + {E1137892-32C1-4250-8784-8D48A6BEE2DD} + + + + Application + false + MultiByte + false + v100 + + + Application + false + MultiByte + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../bin/ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../bin/ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName)Debug + $(ProjectName) + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/demo.tlb + + + + + MaxSpeed + AnySuitable + true + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + + + Level3 + true + + + Default + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + $(OutDir)$(TargetFileName) + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/demo.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + false + true + + + true + Level3 + true + ProgramDatabase + Default + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + $(OutDir)$(TargetFileName) + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + true + true + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/demo.cpp b/Legacy/Aria/examples/demo.cpp new file mode 100644 index 0000000..4829f27 --- /dev/null +++ b/Legacy/Aria/examples/demo.cpp @@ -0,0 +1,214 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example demo.cpp General purpose testing and demo program, using ArMode + * classes to provide keyboard control of various robot functions. + * + * demo uses ArMode subclasses from ARIA. These modes + * provide keyboard control of various aspects and accessories of + * the robot, and can be re-used in your programs if you wish. + * The ArMode classes are defined in %ArModes.cpp. + * + * "demo" is a useful program for testing out the operation of the robot + * for diagnostic or demonstration purposes. Other example programs + * focus on individual areas. + */ + +int main(int argc, char** argv) +{ + // Initialize some global data + Aria::init(); + + // If you want ArLog to print "Verbose" level messages uncomment this: + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + // This object parses program options from the command line + ArArgumentParser parser(&argc, argv); + + // Load some default values for command line arguments from /etc/Aria.args + // (Linux) or the ARIAARGS environment variable. + parser.loadDefaultArguments(); + + // Central object that is an interface to the robot and its integrated + // devices, and which manages control of the robot by the rest of the program. + ArRobot robot; + + // Object that connects to the robot or simulator using program options + ArRobotConnector robotConnector(&parser, &robot); + + // If the robot has an Analog Gyro, this object will activate it, and + // if the robot does not automatically use the gyro to correct heading, + // this object reads data from it and corrects the pose in ArRobot + ArAnalogGyro gyro(&robot); + + // Connect to the robot, get some initial data from it such as type and name, + // and then load parameter files for this robot. + if (!robotConnector.connectRobot()) + { + // Error connecting: + // if the user gave the -help argumentp, then just print out what happened, + // and continue so options can be displayed later. + if (!parser.checkHelpAndWarnUnparsed()) + { + ArLog::log(ArLog::Terse, "Could not connect to robot, will not have parameter file so options displayed later may not include everything"); + } + // otherwise abort + else + { + ArLog::log(ArLog::Terse, "Error, could not connect to robot."); + Aria::logOptions(); + Aria::exit(1); + } + } + + if(!robot.isConnected()) + { + ArLog::log(ArLog::Terse, "Internal error: robot connector succeeded but ArRobot::isConnected() is false!"); + } + + // Connector for laser rangefinders + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + + // Connector for compasses + ArCompassConnector compassConnector(&parser); + + // Parse the command line options. Fail and print the help message if the parsing fails + // or if the help was requested with the -help option + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + // Used to access and process sonar range data + ArSonarDevice sonarDev; + + // Used to perform actions when keyboard keys are pressed + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + + // ArRobot contains an exit action for the Escape key. It also + // stores a pointer to the keyhandler so that other parts of the program can + // use the same keyhandler. + robot.attachKeyHandler(&keyHandler); + printf("You may press escape to exit\n"); + + // Attach sonarDev to the robot so it gets data from it. + robot.addRangeDevice(&sonarDev); + + + // Start the robot task loop running in a new background thread. The 'true' argument means if it loses + // connection the task loop stops and the thread exits. + robot.runAsync(true); + + // Connect to the laser(s) if lasers were configured in this robot's parameter + // file or on the command line, and run laser processing thread if applicable + // for that laser class. For the purposes of this demo, add all + // possible lasers to ArRobot's list rather than just the ones that were + // connected by this call so when you enter laser mode, you + // can then interactively choose which laser to use from that list of all + // lasers mentioned in robot parameters and on command line. Normally, + // only connected lasers are put in ArRobot's list. + if (!laserConnector.connectLasers( + false, // continue after connection failures + false, // add only connected lasers to ArRobot + true // add all lasers to ArRobot + )) + { + printf("Could not connect to lasers... exiting\n"); + Aria::exit(2); + } + +/* not needed, robot connector will do it by default + if (!sonarConnector.connectSonars( + false, // continue after connection failures + false, // add only connected lasers to ArRobot + true // add all lasers to ArRobot + )) + { + printf("Could not connect to sonars... exiting\n"); + Aria::exit(2); + } +*/ + + // Create and connect to the compass if the robot has one. + ArTCM2 *compass = compassConnector.create(&robot); + if(compass && !compass->blockingConnect()) { + compass = NULL; + } + + // Sleep for a second so some messages from the initial responses + // from robots and cameras and such can catch up + ArUtil::sleep(1000); + + // We need to lock the robot since we'll be setting up these modes + // while the robot task loop thread is already running, and they + // need to access some shared data in ArRobot. + robot.lock(); + + // now add all the modes for this demo + // these classes are defined in ArModes.cpp in ARIA's source code. + + if(robot.getOrigRobotConfig()->getHasGripper()) + new ArModeGripper(&robot, "gripper", 'g', 'G'); + else + ArLog::log(ArLog::Normal, "Robot does not indicate that it has a gripper."); + ArModeActs actsMode(&robot, "acts", 'a', 'A'); + ArModeTCM2 tcm2(&robot, "tcm2", 'm', 'M', compass); + ArModeIO io(&robot, "io", 'i', 'I'); + ArModeConfig cfg(&robot, "report robot config", 'o' , 'O'); + ArModeCommand command(&robot, "command", 'd', 'D'); + ArModeCamera camera(&robot, "camera", 'c', 'C'); + ArModePosition position(&robot, "position", 'p', 'P', &gyro); + ArModeSonar sonar(&robot, "sonar", 's', 'S'); + ArModeBumps bumps(&robot, "bumps", 'b', 'B'); + ArModeLaser laser(&robot, "laser", 'l', 'L'); + ArModeWander wander(&robot, "wander", 'w', 'W'); + ArModeUnguardedTeleop unguardedTeleop(&robot, "unguarded teleop", 'u', 'U'); + ArModeTeleop teleop(&robot, "teleop", 't', 'T'); + + + // activate the default mode + teleop.activate(); + + // turn on the motors + robot.comInt(ArCommands::ENABLE, 1); + + robot.unlock(); + + // Block execution of the main thread here and wait for the robot's task loop + // thread to exit (e.g. by robot disconnecting, escape key pressed, or OS + // signal) + robot.waitForRunExit(); + + Aria::exit(0); + return 0; + +} + diff --git a/Legacy/Aria/examples/demoStatic-vc2003.vcproj b/Legacy/Aria/examples/demoStatic-vc2003.vcproj new file mode 100644 index 0000000..97ce029 --- /dev/null +++ b/Legacy/Aria/examples/demoStatic-vc2003.vcproj @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/demoStatic-vc2008.vcproj b/Legacy/Aria/examples/demoStatic-vc2008.vcproj new file mode 100644 index 0000000..0f167d3 --- /dev/null +++ b/Legacy/Aria/examples/demoStatic-vc2008.vcproj @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/demoStatic-vc2010.vcxproj b/Legacy/Aria/examples/demoStatic-vc2010.vcxproj new file mode 100644 index 0000000..2ffe391 --- /dev/null +++ b/Legacy/Aria/examples/demoStatic-vc2010.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + demoStatic + {B7623346-D762-4325-BC88-B85E84E78D19} + demoStatic + ManagedCProj + + + + Application + MultiByte + false + + + Application + MultiByte + false + v100 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + true + ..\bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + demoStaticDebug + $(ProjectName) + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebug + false + + + Level3 + ProgramDatabase + true + + + false + + + AriaStaticDebugVC10.lib;ws2_32.lib;winmm.lib;advapi32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetFileName) + true + ..\lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + true + false + + + NotSet + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + AnySuitable + true + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + false + MultiThreaded + false + true + + + Level3 + ProgramDatabase + true + + + AriaStaticVC10.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetFileName) + true + ..\lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + false + false + + + + + NotSet + + + + + true + true + + + true + true + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/directMotionExample-vc2003.vcproj b/Legacy/Aria/examples/directMotionExample-vc2003.vcproj new file mode 100644 index 0000000..b11d44e --- /dev/null +++ b/Legacy/Aria/examples/directMotionExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/directMotionExample-vc2008.vcproj b/Legacy/Aria/examples/directMotionExample-vc2008.vcproj new file mode 100644 index 0000000..a2ca73b --- /dev/null +++ b/Legacy/Aria/examples/directMotionExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/directMotionExample-vc2010.vcxproj b/Legacy/Aria/examples/directMotionExample-vc2010.vcxproj new file mode 100644 index 0000000..e435c19 --- /dev/null +++ b/Legacy/Aria/examples/directMotionExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + directMotionExample + {BD31FF37-DDBD-4BBD-9ABC-5DE439735DBF} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/directMotionDemo.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/directMotionDemo.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/directMotionExample.cpp b/Legacy/Aria/examples/directMotionExample.cpp new file mode 100644 index 0000000..6ce7bdd --- /dev/null +++ b/Legacy/Aria/examples/directMotionExample.cpp @@ -0,0 +1,338 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example directMotionExample.cpp Sends a sequence of motion commands directly + * to the robot using ArRobot's direct motion command methods. + + This demo starts up the robot in its own thread, then calls a series of the + motion commands methods in ArRobot to simply send commands directly + to the robot (rather than using e.g. ArAction objects.) + + Note that if you want to stop direct motion + commands and let ArActions take over, you must call ArRobot::clearDirectMotion() (otherwise ArRobot may continue sending motion commands that conflict + with the requests of the action resolver). + See the section on motion commands and actions for details. +*/ + +/* + This is a connection handler class, to demonstrate how to run code in + response to events such as the program connecting an disconnecting + from the robot. +*/ +class ConnHandler +{ +public: + // Constructor + ConnHandler(ArRobot *robot); + // Destructor, its just empty + ~ConnHandler(void) {} + // to be called if the connection was made + void connected(void); + // to call if the connection failed + void connFail(void); + // to be called if the connection was lost + void disconnected(void); +protected: + // robot pointer + ArRobot *myRobot; + // the functor callbacks + ArFunctorC myConnectedCB; + ArFunctorC myConnFailCB; + ArFunctorC myDisconnectedCB; +}; + +ConnHandler::ConnHandler(ArRobot *robot) : + myConnectedCB(this, &ConnHandler::connected), + myConnFailCB(this, &ConnHandler::connFail), + myDisconnectedCB(this, &ConnHandler::disconnected) + +{ + myRobot = robot; + myRobot->addConnectCB(&myConnectedCB, ArListPos::FIRST); + myRobot->addFailedConnectCB(&myConnFailCB, ArListPos::FIRST); + myRobot->addDisconnectNormallyCB(&myDisconnectedCB, ArListPos::FIRST); + myRobot->addDisconnectOnErrorCB(&myDisconnectedCB, ArListPos::FIRST); +} + +// just exit if the connection failed +void ConnHandler::connFail(void) +{ + printf("directMotionDemo connection handler: Failed to connect.\n"); + myRobot->stopRunning(); + Aria::exit(1); + return; +} + +// turn on motors, and off sonar, and off amigobot sounds, when connected +void ConnHandler::connected(void) +{ + printf("directMotionDemo connection handler: Connected\n"); + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::ENABLE, 1); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +// lost connection, so just exit +void ConnHandler::disconnected(void) +{ + printf("directMotionDemo connection handler: Lost connection, exiting program.\n"); + Aria::exit(0); +} + + + +int main(int argc, char **argv) +{ + Aria::init(); + + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + + + ArRobot robot; + ArRobotConnector con(&argParser, &robot); + + // the connection handler from above + ConnHandler ch(&robot); + + if(!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + if(!con.connectRobot()) + { + ArLog::log(ArLog::Normal, "directMotionExample: Could not connect to the robot. Exiting."); + + if(argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + } + Aria::exit(1); + return 1; + } + + ArLog::log(ArLog::Normal, "directMotionExample: Connected."); + + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + // Run the robot processing cycle in its own thread. Note that after starting this + // thread, we must lock and unlock the ArRobot object before and after + // accessing it. + robot.runAsync(false); + + + // Send the robot a series of motion commands directly, sleeping for a + // few seconds afterwards to give the robot time to execute them. + printf("directMotionExample: Setting rot velocity to 100 deg/sec then sleeping 3 seconds\n"); + robot.lock(); + robot.setRotVel(100); + robot.unlock(); + ArUtil::sleep(3*1000); + printf("Stopping\n"); + robot.lock(); + robot.setRotVel(0); + robot.unlock(); + ArUtil::sleep(200); + + printf("directMotionExample: Telling the robot to go 300 mm on left wheel and 100 mm on right wheel for 5 seconds\n"); + robot.lock(); + robot.setVel2(300, 100); + robot.unlock(); + ArTime start; + start.setToNow(); + while (1) + { + robot.lock(); + if (start.mSecSince() > 5000) + { + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(50); + } + + printf("directMotionExample: Telling the robot to move forwards one meter, then sleeping 5 seconds\n"); + robot.lock(); + robot.move(1000); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (robot.isMoveDone()) + { + printf("directMotionExample: Finished distance\n"); + robot.unlock(); + break; + } + if (start.mSecSince() > 5000) + { + printf("directMotionExample: Distance timed out\n"); + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(50); + } + printf("directMotionExample: Telling the robot to move backwards one meter, then sleeping 5 seconds\n"); + robot.lock(); + robot.move(-1000); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (robot.isMoveDone()) + { + printf("directMotionExample: Finished distance\n"); + robot.unlock(); + break; + } + if (start.mSecSince() > 10000) + { + printf("directMotionExample: Distance timed out\n"); + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(50); + } + printf("directMotionExample: Telling the robot to turn to 180, then sleeping 4 seconds\n"); + robot.lock(); + robot.setHeading(180); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (robot.isHeadingDone(5)) + { + printf("directMotionExample: Finished turn\n"); + robot.unlock(); + break; + } + if (start.mSecSince() > 5000) + { + printf("directMotionExample: Turn timed out\n"); + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(100); + } + printf("directMotionExample: Telling the robot to turn to 90, then sleeping 2 seconds\n"); + robot.lock(); + robot.setHeading(90); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (robot.isHeadingDone(5)) + { + printf("directMotionExample: Finished turn\n"); + robot.unlock(); + break; + } + if (start.mSecSince() > 5000) + { + printf("directMotionExample: turn timed out\n"); + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(100); + } + printf("directMotionExample: Setting vel2 to 200 mm/sec on both wheels, then sleeping 3 seconds\n"); + robot.lock(); + robot.setVel2(200, 200); + robot.unlock(); + ArUtil::sleep(3000); + printf("directMotionExample: Stopping the robot, then sleeping for 2 seconds\n"); + robot.lock(); + robot.stop(); + robot.unlock(); + ArUtil::sleep(2000); + printf("directMotionExample: Setting velocity to 200 mm/sec then sleeping 3 seconds\n"); + robot.lock(); + robot.setVel(200); + robot.unlock(); + ArUtil::sleep(3000); + printf("directMotionExample: Stopping the robot, then sleeping for 2 seconds\n"); + robot.lock(); + robot.stop(); + robot.unlock(); + ArUtil::sleep(2000); + printf("directMotionExample: Setting vel2 with 0 on left wheel, 200 mm/sec on right, then sleeping 5 seconds\n"); + robot.lock(); + robot.setVel2(0, 200); + robot.unlock(); + ArUtil::sleep(5000); + printf("directMotionExample: Telling the robot to rotate at 50 deg/sec then sleeping 5 seconds\n"); + robot.lock(); + robot.setRotVel(50); + robot.unlock(); + ArUtil::sleep(5000); + printf("directMotionExample: Telling the robot to rotate at -50 deg/sec then sleeping 5 seconds\n"); + robot.lock(); + robot.setRotVel(-50); + robot.unlock(); + ArUtil::sleep(5000); + printf("directMotionExample: Setting vel2 with 0 on both wheels, then sleeping 3 seconds\n"); + robot.lock(); + robot.setVel2(0, 0); + robot.unlock(); + ArUtil::sleep(3000); + printf("directMotionExample: Now having the robot change heading by -125 degrees, then sleeping for 6 seconds\n"); + robot.lock(); + robot.setDeltaHeading(-125); + robot.unlock(); + ArUtil::sleep(6000); + printf("directMotionExample: Now having the robot change heading by 45 degrees, then sleeping for 6 seconds\n"); + robot.lock(); + robot.setDeltaHeading(45); + robot.unlock(); + ArUtil::sleep(6000); + printf("directMotionExample: Setting vel2 with 200 on left wheel, 0 on right wheel, then sleeping 5 seconds\n"); + robot.lock(); + robot.setVel2(200, 0); + robot.unlock(); + ArUtil::sleep(5000); + + printf("directMotionExample: Done, exiting.\n"); + Aria::exit(0); + return 0; +} + diff --git a/Legacy/Aria/examples/dpptuExample-vc2003.vcproj b/Legacy/Aria/examples/dpptuExample-vc2003.vcproj new file mode 100644 index 0000000..9ad20c0 --- /dev/null +++ b/Legacy/Aria/examples/dpptuExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/dpptuExample-vc2008.vcproj b/Legacy/Aria/examples/dpptuExample-vc2008.vcproj new file mode 100644 index 0000000..41ebd1d --- /dev/null +++ b/Legacy/Aria/examples/dpptuExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/dpptuExample-vc2010.vcxproj b/Legacy/Aria/examples/dpptuExample-vc2010.vcxproj new file mode 100644 index 0000000..40c629a --- /dev/null +++ b/Legacy/Aria/examples/dpptuExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + dpptuExample + {EE1BFE24-2F7E-475C-A2F9-B11065EB6F5C} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/dpptuDemo.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/dpptuDemo.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/dpptuExample.cpp b/Legacy/Aria/examples/dpptuExample.cpp new file mode 100644 index 0000000..1d9cc0b --- /dev/null +++ b/Legacy/Aria/examples/dpptuExample.cpp @@ -0,0 +1,600 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example dpptuExample.cpp Shows how to control the Directed Perception + * pan-tilt unit using ArDPPTU class directly. + * + * This program lets you use the keyboard to control the DPPTU. It uses the same acceleration and slew rates for the pan and tilt axes. + * + * It is also possible to specify the type of PTU in program configuration + * (in the ARIA robot parameter files or program command-line arguments) + * instead. For an example of that, see cameraPTZExample.cpp instead. + +Commands: +_________________ + +UP,DOWN -- tilt up/down by one positional increment +LEFT,RIGHT -- pan left/right by one positional increment +SPACE -- perform reset calibration +I -- initialize PTU to default settings +<,> -- increase/decrease the posIncrement by 0.5 degree ++,- -- increase/decrease the speed by 1 degree/sec +A -- awaits the completion of last issued positional command +R -- change pan/tilt movements to relative or absolute movements +Z -- move pan and tilt axes to zero +1 -- move to stored position 1 (-90, 0) +2 -- move to stored position 2 (90, 0) +3 -- move to stored position 3 (0, -45) +4 -- move to stored position 4 (0, 30) +M -- Enter or Exit monitor (continuous scan) mode +H -- Halt all motion +S -- print current variable values +ESC -- quit +*/ + +// If defined, use this computer serial port. If not defined, use first robot +// aux. serial port. Most robots have the DPPTU on COM2 if on Linux and COM4 on +// Windows, if not equipped with other accessories which might require those +// ports (e.g. GPS or Laser). +#define SERIAL_PORT ArUtil::COM4 + + +// Determines type of DPPTU to set internal conversion factors. See enum of +// types in ArDPPTU class for possible values. +//#define PTU_TYPE ArDPPTU::PANTILT_PTUD46 + +// by how much the < and > keys change the position command increment in this +// example +#define POS_INC_ADJUSTMENT 1 + +/* + This class is the core of this demo, it adds itself to the robot given + as a user task, and contains key handler callbacks to control the PTU. +*/ +class KeyPTU +{ +public: + // constructor + KeyPTU(ArRobot *robot); + ~KeyPTU(void); + + void up(void); + void down(void); + void left(void); + void right(void); + void space(void); + void i(void); + void plus(void); + void minus(void); + void greater(void); + void less(void); + void question(void); + void status(void); + void a(void); + void m(void); + void h(void); + void r(void); + void gotoPos(double p, double t); + + // the callback function + void drive(void); + +protected: + int myPanValPTU; + int myTiltValPTU; + + int myDesiredPanPos; + int myDesiredTiltPos; + int mySlew; + int myPosIncrement; + int mySlewIncrement; + + int POS_INCREMENT_ADJUSTMENT; + + bool myMonitor; + bool myReset; + bool myInit; + bool myAbsolute; + + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + ArFunctorC mySpaceCB; + ArFunctorC myICB; + ArFunctorC myPlusCB; + ArFunctorC myMinusCB; + ArFunctorC myGreaterCB; + ArFunctorC myLessCB; + ArFunctorC myQuestionCB; + ArFunctorC mySCB; + ArFunctorC myACB; + ArFunctorC myMCB; + ArFunctorC myHCB; + ArFunctorC myRCB; + ArFunctor2C myPos0CB; + ArFunctor2C myPos1CB; + ArFunctor2C myPos2CB; + ArFunctor2C myPos3CB; + ArFunctor2C myPos4CB; + + + // the PTU + ArDPPTU myPTU; + + + // whether the PTU has been inited or not + bool myPTUInited; + // pointer to the robot + ArRobot *myRobot; + // callback for the drive function + ArFunctorC myDriveCB; + + ArSerialConnection *mySerialConnection; +}; + +/* + Constructor, sets the robot pointer, and some initial values, also note the + use of constructor chaining on myPTU and myDriveCB. +*/ +KeyPTU::KeyPTU(ArRobot *robot) : + myUpCB(this, &KeyPTU::up), + myDownCB(this, &KeyPTU::down), + myLeftCB(this, &KeyPTU::left), + myRightCB(this, &KeyPTU::right), + mySpaceCB(this, &KeyPTU::space), + myICB(this, &KeyPTU::i), + myPlusCB(this, &KeyPTU::plus), + myMinusCB(this, &KeyPTU::minus), + myGreaterCB(this, &KeyPTU::greater), + myLessCB(this, &KeyPTU::less), + myQuestionCB(this, &KeyPTU::question), + mySCB(this, &KeyPTU::status), + myACB(this, &KeyPTU::a), + myMCB(this, &KeyPTU::m), + myHCB(this, &KeyPTU::h), + myRCB(this, &KeyPTU::r), + myPos0CB(this, &KeyPTU::gotoPos, 0, 0), + myPos1CB(this, &KeyPTU::gotoPos, -90.0, 0.0), + myPos2CB(this, &KeyPTU::gotoPos, 90.0, 0.0), + myPos3CB(this, &KeyPTU::gotoPos, 0.0, -45.0), + myPos4CB(this, &KeyPTU::gotoPos, 0.0, 30.0), + myPTU(robot), + myDriveCB(this, &KeyPTU::drive), + mySerialConnection(NULL) +{ +#ifdef SERIAL_PORT + mySerialConnection = new ArSerialConnection; + ArLog::log(ArLog::Normal, "dpptuExample: connecting to DPPTU over computer serial port %s.", SERIAL_PORT); + if(mySerialConnection->open(SERIAL_PORT) != 0) + { + ArLog::log(ArLog::Terse, "dpptuExample: Error: Could not open computer serial port %s for DPPTU!", SERIAL_PORT); + Aria::exit(5); + } + myPTU.setDeviceConnection(mySerialConnection); +#endif + + // set the robot pointer and add the KeyPTU as user task + ArKeyHandler *keyHandler; + myRobot = robot; + myRobot->addSensorInterpTask("KeyPTU", 50, &myDriveCB); + + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + myRobot->attachKeyHandler(keyHandler); + } + + if (!keyHandler->addKeyHandler(ArKeyHandler::UP, &myUpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for up, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::DOWN, &myDownCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for down, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::LEFT, &myLeftCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for left, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::RIGHT, &myRightCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for right, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::SPACE, &mySpaceCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for space, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('i', &myICB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'i', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('+', &myPlusCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '+', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('-', &myMinusCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '-', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('>', &myGreaterCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '>', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('<', &myLessCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '<', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('?', &myQuestionCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '?', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('s', &mySCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'S', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('a', &myACB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'A', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('z', &myPos0CB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'Z', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('m', &myMCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'M', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('h', &myHCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'H', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('r', &myRCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'R', keydrive will not work correctly."); + + + if(!keyHandler->addKeyHandler('Z', &myPos0CB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'Z', keydrive will not work correctly."); + + if(!keyHandler->addKeyHandler('1', &myPos1CB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '1', keydrive will not work correctly."); + + if(!keyHandler->addKeyHandler('2', &myPos2CB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '2', keydrive will not work correctly."); + + if(!keyHandler->addKeyHandler('3', &myPos3CB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '3', keydrive will not work correctly."); + + if(!keyHandler->addKeyHandler('4', &myPos4CB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '4', keydrive will not work correctly."); + + // initialize some variables + myReset = false; + myInit = true; + myDesiredPanPos = 0; + myDesiredTiltPos = 0; + myPosIncrement = 1; + mySlewIncrement = 1; + myPTUInited = false; + myMonitor = false; + +} + +KeyPTU::~KeyPTU() +{ + if(mySerialConnection) + { + myPTU.setDeviceConnection(NULL); + delete mySerialConnection; + } +} + + + +void KeyPTU::left(void) +{ + myDesiredPanPos += myPosIncrement; + + if (myDesiredPanPos > myPTU.getMaxPosPan()) + myDesiredPanPos = myPTU.getMaxPosPan(); +} + +void KeyPTU::right(void) +{ + myDesiredPanPos -= myPosIncrement; + + if (myDesiredPanPos < myPTU.getMaxNegPan()) + myDesiredPanPos = myPTU.getMaxNegPan(); +} + +void KeyPTU::up(void) +{ + myDesiredTiltPos += myPosIncrement; + + if (myDesiredTiltPos > myPTU.getMaxPosTilt()) + myDesiredTiltPos = myPTU.getMaxPosTilt(); +} + +void KeyPTU::down(void) +{ + myDesiredTiltPos -= myPosIncrement; + + if (myDesiredTiltPos < myPTU.getMaxNegTilt()) + myDesiredTiltPos = myPTU.getMaxNegTilt(); +} + +void KeyPTU::space(void) +{ + myReset = true; +} + +void KeyPTU::i(void) +{ + myInit = true; +} + +void KeyPTU::plus(void) +{ + mySlew += mySlewIncrement; + + if (mySlew > myPTU.getMaxPanSlew()) + mySlew = myPTU.getMaxPanSlew(); + + status(); +} + +void KeyPTU::minus(void) +{ + mySlew -= mySlewIncrement; + + if (mySlew < myPTU.getMinPanSlew()) + mySlew = myPTU.getMinPanSlew(); + + status(); +} + +void KeyPTU::greater(void) +{ + myPosIncrement += POS_INCREMENT_ADJUSTMENT; + + if (myPosIncrement > myPTU.getMaxPosPan()) + myPosIncrement = myPTU.getMaxPosPan(); + + status(); +} + +void KeyPTU::less(void) +{ + myPosIncrement -= POS_INCREMENT_ADJUSTMENT; + + if (myPosIncrement < 0) + myPosIncrement = 0; + + status(); +} + +void KeyPTU::a(void) +{ + myPTU.awaitExec(); + ArLog::log(ArLog::Normal, "AwaitExecution command sent"); +} + +void KeyPTU::gotoPos(double p, double t) +{ + myDesiredPanPos = p; + myDesiredTiltPos = t; + status(); +} + +void KeyPTU::question(void) +{ + ArLog::log(ArLog::Normal, "\r\nCommands:\r\n_________________\r\n"); + ArLog::log(ArLog::Normal, "UP,DOWN -- tilt up/down by one positional increment"); + ArLog::log(ArLog::Normal, "LEFT,RIGHT -- pan left/right by one positional increment"); + ArLog::log(ArLog::Normal, "SPACE -- perform reset calibration"); + ArLog::log(ArLog::Normal, "I -- initialize PTU to default settings"); + ArLog::log(ArLog::Normal, "<,> -- increase/decrease the posIncrement by %f degree(s)", POS_INC_ADJUSTMENT); + ArLog::log(ArLog::Normal, "+,- -- increase/decrease the speed by 1 degree/sec"); + ArLog::log(ArLog::Normal, "A -- awaits the completion of last issued positional command"); + ArLog::log(ArLog::Normal, "R -- change pan/tilt movements to relative or absolute movements"); + ArLog::log(ArLog::Normal, "Z -- move pan and tilt axes to zero"); + ArLog::log(ArLog::Normal, "1 -- move to stored position 1 (-90, 0)"); + ArLog::log(ArLog::Normal, "2 -- move to stored position 2 (90, 0)"); + ArLog::log(ArLog::Normal, "3 -- move to stored position 3 (0, -45)"); + ArLog::log(ArLog::Normal, "4 -- move to stored position 4 (0, 30)"); + ArLog::log(ArLog::Normal, "M -- Enter or Exit monitor (continuous scan) mode"); + ArLog::log(ArLog::Normal, "H -- Halt all motion"); + ArLog::log(ArLog::Normal, "S -- print current variable values"); + ArLog::log(ArLog::Normal, "ESC -- exit program"); + ArLog::log(ArLog::Normal, "\r\n"); +} + +void KeyPTU::status(void) +{ + ArLog::log(ArLog::Normal, "\r\nStatus:\r\n_________________\r\n"); + ArLog::log(ArLog::Normal, "Last Pan Command = %.1f deg", myPTU.getLastPanRequest()); + ArLog::log(ArLog::Normal, "Last Tilt Command = %.1f deg", myPTU.getLastTiltRequest()); + ArLog::log(ArLog::Normal, "Current Pan Position = %.1f deg", myPTU.getPan()); + ArLog::log(ArLog::Normal, "Current Tilt Position = %.1f deg", myPTU.getTilt()); + ArLog::log(ArLog::Normal, "Pan Slew Rate = %d deg/sec", myPTU.getPanSlew()); + ArLog::log(ArLog::Normal, "Tilt Slew Rate = %d deg/sec", myPTU.getTiltSlew()); + ArLog::log(ArLog::Normal, "Position Increment = %d deg", myPosIncrement); + if (myAbsolute) + ArLog::log(ArLog::Normal, "Positional-movements using absolute commands"); + else + ArLog::log(ArLog::Normal, "Positional-movements using relative commands"); + ArLog::log(ArLog::Normal, "\r\n"); +} + +void KeyPTU::m(void) +{ + if (!myMonitor) + { + ArLog::log(ArLog::Normal, "Entering Monitor mode - hit 'M' to disable"); + myMonitor = true; + myPTU.initMon(-60,60,30,-30); + } + else + { + myPTU.blank(); //Blank packet exits monitor mode + myMonitor = false; + } +} + +void KeyPTU::h(void) +{ + myPTU.haltAll(); +} + +void KeyPTU::r(void) +{ + if (!myAbsolute) + { + myAbsolute = true; + } + else + { + myAbsolute = false; + } + status(); +} + + +// the important function +void KeyPTU::drive(void) +{ + + // if the PTU isn't initialized, initialize it here... it has to be + // done here instead of above because it needs to be done when the + // robot is connected + if (!myPTUInited && myRobot->isConnected()) + { + ArLog::log(ArLog::Normal, "Initializing ArDPPTU..."); + myPTU.init(); + ArLog::log(ArLog::Normal, "Resetting PTU and performing self-calibration..."); + myPTU.resetCalib(); + myPTU.awaitExec(); // DPPTU will wait for self-calibration to end before executing the following commands (though they will still be sent) + mySlew = myPTU.getPanSlew(); //uses only pan slew rate + myPTU.awaitExec(); + myPTUInited = true; + myInit = false; + myAbsolute = true; + } + + if (myInit == true) // User hit initialization key + { + ArLog::log(ArLog::Normal, "Initializing PTU..."); + myPTU.init(); + myInit = false; + myDesiredPanPos = myPTU.getPan(); + myDesiredTiltPos = myPTU.getTilt(); + mySlew = myPTU.getPanSlew(); //uses only pan slew rate + myReset = false; + } + + if (myReset == true) // User hit reset key + { + ArLog::log(ArLog::Normal, "Resetting PTU and performing self-calibration..."); + myPTU.resetCalib(); + myPTU.awaitExec(); + myDesiredPanPos = myPTU.getPan(); + myDesiredTiltPos = myPTU.getTilt(); + myReset = false; + } + else // User did nothing, or hit a key that changed myDesiredPanPos, myDesiredTiltPos, or mySlew (so request PTU to move if those changed since last request) + { + + // Some PTUs can determine their current position (with encoders, etc) and return that. + // canGetRealPanTilt() will return true in this case, and getPan() and + // getTilt() will return those received values. Otherwise, getPan() and + // getTilt() return the last commanded values. getLastPanRequest() and + // getLastTiltRequest() will always return the last commanded values sent by + // ArDPPTU (so in the case that canGetRealPanTilt() is false, getPan() and + // getTilt() return the same pair of values as getLastPanRequest() and + // getLastTiltRequest(). ArDPPTU::canGetRealPanTilt() is initialally false, + // but once the first set of pan and tilt positions is read back from the + // PTU device, it becomes true. + if(myPTU.canGetRealPanTilt()) + printf("Position (%.1f deg, %.1f deg) [Incr. %d deg] Press ? for help \r", myPTU.getPan(), myPTU.getTilt(), myPosIncrement); + else + printf("Requested (%.1f deg, %.1f deg) [Incr. %d deg] Press ? for help \r", myPTU.getPan(), myPTU.getTilt(), myPosIncrement); + + if (myDesiredPanPos != myPTU.getLastPanRequest()) + { + if (myAbsolute) + myPTU.pan(myDesiredPanPos); + else + myPTU.panRel(myDesiredPanPos - myPTU.getPan()); + } + + if (myDesiredTiltPos != myPTU.getLastTiltRequest()) + { + if (myAbsolute) + myPTU.tilt(myDesiredTiltPos); + else + myPTU.tiltRel(myDesiredTiltPos - myPTU.getTilt()); + } + + if (mySlew != myPTU.getPanSlew()) + { + myPTU.panSlew(mySlew); + myPTU.tiltSlew(mySlew); + } + + } + +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "dpptuExample: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + } + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "dpptuExample: Connected to robot."); + + robot.runAsync(true); + + // an object for keyboard control, class defined above, this also adds itself as a user task + KeyPTU ptu(&robot); + + + // turn off the sonar + robot.comInt(ArCommands::SONAR, 0); + + printf("Press '?' for available commands\r\n"); + + // run, if we lose connection to the robot, exit + robot.waitForRunExit(); + + Aria::exit(0); +} + diff --git a/Legacy/Aria/examples/functorExample-vc2003.vcproj b/Legacy/Aria/examples/functorExample-vc2003.vcproj new file mode 100644 index 0000000..7351782 --- /dev/null +++ b/Legacy/Aria/examples/functorExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/functorExample-vc2008.vcproj b/Legacy/Aria/examples/functorExample-vc2008.vcproj new file mode 100644 index 0000000..fcbac63 --- /dev/null +++ b/Legacy/Aria/examples/functorExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/functorExample-vc2010.vcxproj b/Legacy/Aria/examples/functorExample-vc2010.vcxproj new file mode 100644 index 0000000..5220523 --- /dev/null +++ b/Legacy/Aria/examples/functorExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + functorExample + {4AD6E4D3-7C44-4697-8794-BFBA43BFE13D} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/functor.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/functor.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/functorExample.cpp b/Legacy/Aria/examples/functorExample.cpp new file mode 100644 index 0000000..0130532 --- /dev/null +++ b/Legacy/Aria/examples/functorExample.cpp @@ -0,0 +1,162 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#include +#include "Aria.h" + + +/** @example functorExample.cpp Illustrates the use of functors + * + * @sa @ref functors in the ARIA overview + */ + +/* + This is a class that has some callback methods. Functors which refer to these + callbacks will be passed to the DriverClass. +*/ +class CallbackContainer +{ +public: + + void callback1(); + void callback2(int i); + bool callback3(const char *str); +}; + +void CallbackContainer::callback1() +{ + printf("CallbackContainer::callback1 called.\n"); +} + +void CallbackContainer::callback2(int i) +{ + printf("CallbackContainer::callback2 called with argument of '%d'\n", i); +} + +bool CallbackContainer::callback3(const char *str) +{ + printf("CallbackContainer::callback3 called with argument of '%s'.\n", str); + return(true); +} + +/* + * Functors can also invoke global functions. + */ + +void globalCallback() +{ + printf("globalCallback() called.\n"); +} + + +/* + This is a "driver" class. It takes three functors of different types and + will invoke the three functors. This is a typical use of + functors: to pass information or event notifications between loosely + coupled objects. +*/ +class DriverClass +{ +public: + + void invokeFunctors(); + + void setCallback1(ArFunctor *func) {myFunc1=func;} + void setCallback2(ArFunctor1 *func) {myFunc2=func;} + void setCallback3(ArRetFunctor1 *func) {myFunc3=func;} + + +protected: + + ArFunctor *myFunc1; + ArFunctor1 *myFunc2; + ArRetFunctor1 *myFunc3; +}; + +void DriverClass::invokeFunctors() +{ + bool ret; + + printf("Invoking functor1... "); + myFunc1->invoke(); + + printf("Invoking functor2... "); + myFunc2->invoke(23); + + + /* + For functors with return values, use invorkeR() instead of invoke() + to get the return value. The invoke() function can also be used to invoke + the functor, but the return value is lost. (And is a possible source + of memory leaks if you were supposed to free a pointer returned.) + */ + printf("Invoking functor3... "); + ret=myFunc3->invokeR("This is a string argument"); + if (ret) + printf("\t-> functor3 returned 'true'\n"); + else + printf("\t-> functor3 returned 'false'\n"); +} + +int main() +{ + CallbackContainer cb; + DriverClass driver; + + ArFunctorC functor1(cb, &CallbackContainer::callback1); + ArFunctor1C functor2(cb, &CallbackContainer::callback2); + ArRetFunctor1C + functor3(cb, &CallbackContainer::callback3); + + driver.setCallback1(&functor1); + driver.setCallback2(&functor2); + driver.setCallback3(&functor3); + + driver.invokeFunctors(); + + /* You can make functors that target global functions too. */ + ArGlobalFunctor globalFunctor(&globalCallback); + printf("Invoking globalFunctor... "); + globalFunctor.invoke(); + + /* You can also include the values of arguments in an ArFunctor object, if you + * want to use the same value in every invocation of the functor. + */ + ArFunctor1C functor4(cb, &CallbackContainer::callback2, 42); + printf("Invoking functor with constant argument... "); + functor4.invoke(); + + /* Functors can be downcast to parent interface classes, as long as their invocation + * does not require arguments. + */ + ArFunctor* baseFunctor = &functor4; + printf("Invoking downcast functor... "); + baseFunctor->invoke(); + + + return(0); +} diff --git a/Legacy/Aria/examples/gotoActionExample-vc2003.vcproj b/Legacy/Aria/examples/gotoActionExample-vc2003.vcproj new file mode 100644 index 0000000..56e335e --- /dev/null +++ b/Legacy/Aria/examples/gotoActionExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gotoActionExample-vc2008.vcproj b/Legacy/Aria/examples/gotoActionExample-vc2008.vcproj new file mode 100644 index 0000000..9785eb7 --- /dev/null +++ b/Legacy/Aria/examples/gotoActionExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gotoActionExample-vc2010.vcxproj b/Legacy/Aria/examples/gotoActionExample-vc2010.vcxproj new file mode 100644 index 0000000..aa04c41 --- /dev/null +++ b/Legacy/Aria/examples/gotoActionExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + gotoActionExample + {FAD55BE4-E1C6-436D-BC7D-B0674FB8C067} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/goto.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/goto.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/gotoActionExample.cpp b/Legacy/Aria/examples/gotoActionExample.cpp new file mode 100644 index 0000000..532a295 --- /dev/null +++ b/Legacy/Aria/examples/gotoActionExample.cpp @@ -0,0 +1,143 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example gotoActionExample.cpp Uses ArActionGoto to drive the robot in a square + + This program will make the robot drive in a 2.5x2.5 meter square by + setting each corner in turn as the goal for an ArActionGoto action. + It also uses speed limiting actions to avoid collisions. After some + time, it cancels the goal (and the robot stops due to a stopping action) + and exits. + + Press escape to shut down Aria and exit. +*/ + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArSimpleConnector simpleConnector(&parser); + ArRobot robot; + ArSonarDevice sonar; + ArAnalogGyro gyro(&robot); + robot.addRangeDevice(&sonar); + + // Make a key handler, so that escape will shut down the program + // cleanly + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + robot.attachKeyHandler(&keyHandler); + printf("You may press escape to exit\n"); + + // Collision avoidance actions at higher priority + ArActionLimiterForwards limiterAction("speed limiter near", 300, 600, 250); + ArActionLimiterForwards limiterFarAction("speed limiter far", 300, 1100, 400); + ArActionLimiterTableSensor tableLimiterAction; + robot.addAction(&tableLimiterAction, 100); + robot.addAction(&limiterAction, 95); + robot.addAction(&limiterFarAction, 90); + + // Goto action at lower priority + ArActionGoto gotoPoseAction("goto"); + robot.addAction(&gotoPoseAction, 50); + + // Stop action at lower priority, so the robot stops if it has no goal + ArActionStop stopAction("stop"); + robot.addAction(&stopAction, 40); + + // Parse all command line arguments + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + // Connect to the robot + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + return 1; + } + robot.runAsync(true); + + // turn on the motors, turn off amigobot sounds + robot.enableMotors(); + robot.comInt(ArCommands::SOUNDTOG, 0); + + const int duration = 30000; //msec + ArLog::log(ArLog::Normal, "Going to four goals in turn for %d seconds, then cancelling goal and exiting.", duration/1000); + + bool first = true; + int goalNum = 0; + ArTime start; + start.setToNow(); + while (Aria::getRunning()) + { + robot.lock(); + + // Choose a new goal if this is the first loop iteration, or if we + // achieved the previous goal. + if (first || gotoPoseAction.haveAchievedGoal()) + { + first = false; + goalNum++; + if (goalNum > 4) + goalNum = 1; // start again at goal #1 + + // set our positions for the different goals + if (goalNum == 1) + gotoPoseAction.setGoal(ArPose(2500, 0)); + else if (goalNum == 2) + gotoPoseAction.setGoal(ArPose(2500, 2500)); + else if (goalNum == 3) + gotoPoseAction.setGoal(ArPose(0, 2500)); + else if (goalNum == 4) + gotoPoseAction.setGoal(ArPose(0, 0)); + + ArLog::log(ArLog::Normal, "Going to next goal at %.0f %.0f", + gotoPoseAction.getGoal().getX(), gotoPoseAction.getGoal().getY()); + } + + if(start.mSecSince() >= duration) { + ArLog::log(ArLog::Normal, "%d seconds have elapsed. Cancelling current goal, waiting 3 seconds, and exiting.", duration/1000); + gotoPoseAction.cancelGoal(); + robot.unlock(); + ArUtil::sleep(3000); + break; + } + + robot.unlock(); + ArUtil::sleep(100); + } + + // Robot disconnected or time elapsed, shut down + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/gpsExample-vc2003.vcproj b/Legacy/Aria/examples/gpsExample-vc2003.vcproj new file mode 100644 index 0000000..3b5a40f --- /dev/null +++ b/Legacy/Aria/examples/gpsExample-vc2003.vcproj @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gpsExample-vc2008.vcproj b/Legacy/Aria/examples/gpsExample-vc2008.vcproj new file mode 100644 index 0000000..b5a0fb0 --- /dev/null +++ b/Legacy/Aria/examples/gpsExample-vc2008.vcproj @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gpsExample-vc2010.vcxproj b/Legacy/Aria/examples/gpsExample-vc2010.vcxproj new file mode 100644 index 0000000..29d4047 --- /dev/null +++ b/Legacy/Aria/examples/gpsExample-vc2010.vcxproj @@ -0,0 +1,106 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + gpsExample + {39B4C09E-E4E3-457F-B96C-B85D03C93B55} + gpsExample + ManagedCProj + + + + Application + MultiByte + false + + + Application + MultiByte + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + true + ../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + true + Level3 + ProgramDatabase + + + AriaDebugVC10.lib + $(OutDir)$(ProjectName).exe + ..\lib;%(AdditionalLibraryDirectories) + true + true + false + + + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + MultiThreaded + Level3 + ProgramDatabase + + + $(OutDir)$(ProjectName).exe + true + false + + + AriaVC10.lib + ..\lib;%(AdditionalLibraryDirectories) + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/gpsExample.cpp b/Legacy/Aria/examples/gpsExample.cpp new file mode 100644 index 0000000..810a3d3 --- /dev/null +++ b/Legacy/Aria/examples/gpsExample.cpp @@ -0,0 +1,136 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example gpsExample.cpp Example program to connect to a GPS and read and + * display data on the terminal. + * Also tries to connect to a TCM compass through the computer serial port, and + * use that to set the ArGPS compass data. + */ + +#include "Aria.h" +#include "ArGPS.h" +#include "ArGPSConnector.h" +#include "ArTrimbleGPS.h" +#include "ArTCMCompassDirect.h" +#include + +int main(int argc, char** argv) +{ + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + ArSimpleConnector connector(&argParser); + ArGPSConnector gpsConnector(&argParser); + + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + ArLog::log(ArLog::Terse, "gpsExample options:\n -printTable Print data to standard output in regular columns rather than a refreshing terminal display, and print more digits of precision"); + return 1; + } + + // Try connecting to robot + ArRobot robot; + if(!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "gpsExample: Warning: Could not connect to robot. Will not be able to switch GPS power on, or load GPS options from this robot's parameter file."); + } + else + { + ArLog::log(ArLog::Normal, "gpsExample: Connected to robot."); + robot.runAsync(true); + } + + // check command line arguments for -printTable + bool printTable = argParser.checkArgument("printTable"); + + // On the Seekur, power to the GPS receiver is switched on by this command. + // (A third argument of 0 would turn it off). On other robots this command is + // ignored. + robot.com2Bytes(116, 6, 1); + + // Try connecting to a GPS. We pass the robot pointetr to the connector so it + // can check the robot parameters for this robot type for default values for + // GPS device connection information (receiver type, serial port, etc.) + ArLog::log(ArLog::Normal, "gpsExample: Connecting to GPS, it may take a few seconds..."); + ArGPS *gps = gpsConnector.createGPS(&robot); + if(!gps || !gps->connect()) + { + ArLog::log(ArLog::Terse, "gpsExample: Error connecting to GPS device. Try -gpsType, -gpsPort, and/or -gpsBaud command-line arguments. Use -help for help."); + return -1; + } + + if(gpsConnector.getGPSType() == ArGPSConnector::Simulator) + { + ArLog::log(ArLog::Normal, "gpsExample: GPS is a simulator. Setting dummy position."); + (dynamic_cast(gps))->setDummyPosition(42.80709, -71.579047, 100); + } + + + ArLog::log(ArLog::Normal, "gpsExample: Reading data..."); + ArTime lastReadTime; + if(printTable) + gps->printDataLabelsHeader(); + while(true) + { + int r = gps->read(); + if(r & ArGPS::ReadError) + { + ArLog::log(ArLog::Terse, "gpsExample: Warning: error reading GPS data."); + ArUtil::sleep(1000); + continue; + } + + + if(r & ArGPS::ReadUpdated) + { + if(printTable) + { + gps->printData(false); + printf("\n"); + } + else + { + gps->printData(); + printf("\r"); + } + fflush(stdout); + ArUtil::sleep(500); + lastReadTime.setToNow(); + continue; + } else { + if(lastReadTime.secSince() >= 5) { + ArLog::log(ArLog::Terse, "gpsExample: Warning: haven't recieved any data from GPS for more than 5 seconds!"); + } + ArUtil::sleep(1000); + continue; + } + + } + return 0; +} diff --git a/Legacy/Aria/examples/gpsRobotTaskExample.cpp b/Legacy/Aria/examples/gpsRobotTaskExample.cpp new file mode 100644 index 0000000..94fe59f --- /dev/null +++ b/Legacy/Aria/examples/gpsRobotTaskExample.cpp @@ -0,0 +1,199 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#include "Aria.h" +#include "ArGPS.h" +#include "ArGPSConnector.h" + +#include + + +/** @example gpsRobotTaskExample.cpp Connects to both robot and GPS, allows + * teleoperation, and prints robot position and GPS data. + */ + + +/* + * This class encapsulates an ArRobot sensor interpretation task that prints the + * last set of GPS data along with a local timestamp and current robot pose to + * standard output. + * + * This class also contains a mutex, which it locks during the task (while + * accessing the ArGPS object). If another thread is also accessing the GPS, + * you can lock this mutex. + */ +class GPSLogTask { + +public: + GPSLogTask(ArRobot *robot, ArGPS *gps, ArJoyHandler *joy = NULL) : + myRobot(robot), + myGPS(gps), + myTaskFunctor(this, &GPSLogTask::doTask), + myJoyHandler(joy), + myButtonDown(false) + { + myRobot->addSensorInterpTask("GPS", ArListPos::LAST, &myTaskFunctor); + puts("RobotX\tRobotY\tRobotTh\tRobotVel\tRobotRotVel\tRobotLatVel\tLatitude\tLongitude\tAltitude\tSpeed\tGPSTimeSec\tGPSTimeMSec\tFixType\tNumSats\tPDOP\tHDOP\tVDOP\tGPSDataReceived"); + } + + void lock() { myMutex.lock(); } + void unlock() { myMutex.unlock(); } + +protected: + + void doTask() + { + // print a mark if a joystick button is pressed (other than 1, which is + // needed to drive) + if(myJoyHandler) + { + for(unsigned int b = 2; b <= myJoyHandler->getNumButtons(); ++b) + if(myJoyHandler->getButton(b)) { + if(!myButtonDown) + printf("--------------- Joystick button %d pressed.\n", b); + myButtonDown = true; + } + else + myButtonDown = false; + } + + lock(); + int f = myGPS->read(50); + printf("%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f" + "\t%2.8f\t%2.8f\t%4.4f\t%4.4f" + "\t%lu\t%lu\t%s" + "\t%u\t%2.4f\t%2.4f\t%2.4f" + "\t%s\n", + myRobot->getX(), myRobot->getY(), myRobot->getTh(), myRobot->getVel(), myRobot->getRotVel(), (myRobot->hasLatVel())?(myRobot->getLatVel()):0, + myGPS->getLatitude(), myGPS->getLongitude(), myGPS->getAltitude(), myGPS->getSpeed(), + myGPS->getGPSPositionTimestamp().getSec(), myGPS->getGPSPositionTimestamp().getMSec(), myGPS->getFixTypeName(), + myGPS->getNumSatellitesTracked(), myGPS->getPDOP(), myGPS->getHDOP(), myGPS->getVDOP(), + ((f&ArGPS::ReadUpdated)?"yes":"no") + ); + unlock(); + } + +private: + ArRobot *myRobot; + ArGPS *myGPS; + ArFunctorC myTaskFunctor; + ArMutex myMutex; + ArJoyHandler *myJoyHandler; + bool myButtonDown; +}; + + + +int main(int argc, char** argv) +{ + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + + ArArgumentParser argParser(&argc, argv); + ArSimpleConnector connector(&argParser); + ArGPSConnector gpsConnector(&argParser); + ArRobot robot; + + ArActionLimiterForwards nearLimitAction("limit near", 300, 600, 250); + ArActionLimiterForwards farLimitAction("limit far", 300, 1100, 400); + ArActionLimiterBackwards limitBackwardsAction; + ArActionJoydrive joydriveAction; + ArActionKeydrive keydriveAction; + + ArSonarDevice sonar; + ArSick laser; + + argParser.loadDefaultArguments(); + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + return -1; + } + + robot.addRangeDevice(&sonar); + robot.addRangeDevice(&laser); + + ArLog::log(ArLog::Normal, "gpsRobotTaskExample: Connecting to robot..."); + if(!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "gpsRobotTaskExample: Could not connect to the robot. Exiting."); + return -2; + } + ArLog::log(ArLog::Normal, "gpsRobotTaskExample: Connected to the robot."); + + + // Connect to GPS + ArLog::log(ArLog::Normal, "gpsRobotTaskExample: Connecting to GPS, it may take a few seconds..."); + ArGPS *gps = gpsConnector.createGPS(&robot); + assert(gps); + if(!gps || !(gps->connect())) + { + ArLog::log(ArLog::Terse, "gpsRobotTaskExample: Error connecting to GPS device. Try -gpsType, -gpsPort, and/or -gpsBaud command-line arguments. Use -help for help. Exiting."); + return -3; + } + + + // Create an GPSLogTask which will register a task with the robot. + GPSLogTask gpsTask(&robot, gps, joydriveAction.getJoyHandler()->haveJoystick() ? joydriveAction.getJoyHandler() : NULL); + + + // Add actions + robot.addAction(&nearLimitAction, 100); + robot.addAction(&farLimitAction, 90); + robot.addAction(&limitBackwardsAction, 80); + robot.addAction(&joydriveAction, 50); + robot.addAction(&keydriveAction, 40); + + // allow keydrive action to drive robot even if joystick button isn't pressed + joydriveAction.setStopIfNoButtonPressed(false); + + // Start the robot running + robot.runAsync(true); + + // Connect to the laser + connector.setupLaser(&laser); + laser.runAsync(); + if(!laser.blockingConnect()) + ArLog::log(ArLog::Normal, "gpsRobotTaskExample: Warning, could not connect to SICK laser, will not use it."); + + robot.lock(); + + robot.enableMotors(); + robot.comInt(47, 1); // enable joystick driving on some robots + + // Add exit callback to reset/unwrap steering wheels on seekur (critical if the robot doesn't have sliprings); does nothing for other robots + Aria::addExitCallback(new ArRetFunctor1C(&robot, &ArRobot::com, (unsigned char)120)); + Aria::addExitCallback(new ArRetFunctor1C(&robot, &ArRobot::com, (unsigned char)120)); + + robot.unlock(); + + ArLog::log(ArLog::Normal, "gpsRobotTaskExample: Running... (drive robot with joystick or arrow keys)"); + robot.waitForRunExit(); + + + return 0; +} diff --git a/Legacy/Aria/examples/gripperExample-vc2003.vcproj b/Legacy/Aria/examples/gripperExample-vc2003.vcproj new file mode 100644 index 0000000..d5c2534 --- /dev/null +++ b/Legacy/Aria/examples/gripperExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gripperExample-vc2008.vcproj b/Legacy/Aria/examples/gripperExample-vc2008.vcproj new file mode 100644 index 0000000..1b5f38f --- /dev/null +++ b/Legacy/Aria/examples/gripperExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gripperExample-vc2010.vcxproj b/Legacy/Aria/examples/gripperExample-vc2010.vcxproj new file mode 100644 index 0000000..c9fc891 --- /dev/null +++ b/Legacy/Aria/examples/gripperExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + gripperExample + {8DB12A26-FF33-46BE-800E-2CBB06774473} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/gripperDemo.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/gripperDemo.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/gripperExample.cpp b/Legacy/Aria/examples/gripperExample.cpp new file mode 100644 index 0000000..93dd91e --- /dev/null +++ b/Legacy/Aria/examples/gripperExample.cpp @@ -0,0 +1,208 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example gripperExample.cpp Example program demonstrating use of the Pioneer gripper. + * + * Shows how to control the Pioneer 2DOF gripper accessory. + * In addition to the arrow keys to teleoperate the robot, + * Use the following keyboard keys to control it: + * u Lift the gripper up + * d Lift the gripper down + * o Open the gripper + * c Close the gripper + * s Stop gripper movement. + * + * + * @sa ArModeGripper (the gripper control mode used in the "demo" program) + * +*/ + +#include "Aria.h" + +// Adds robot callback to print gripper status. +class PrintGripStatus +{ + ArGripper* myGripper; + ArFunctorC myPrintCB; +public: + PrintGripStatus(ArGripper* gripper) : + myGripper(gripper), + myPrintCB(this, &PrintGripStatus::printStatus) + { + } + + void addRobotTask(ArRobot* robot) + { + robot->addUserTask("PrintGripStatus", 10, &myPrintCB); + } + + void printStatus() + { + myGripper->logState(); + } +}; + +// Adds key handler callbacks for controlling the gripper +class GripperControlHandler +{ + ArGripper* myGripper; + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myOpenCB; + ArFunctorC myCloseCB; + ArFunctorC myStopCB; +public: + GripperControlHandler(ArGripper* gripper) : + myGripper(gripper), + myUpCB(this, &GripperControlHandler::liftUp), + myDownCB(this, &GripperControlHandler::liftDown), + myOpenCB(this, &GripperControlHandler::open), + myCloseCB(this, &GripperControlHandler::close), + myStopCB(this, &GripperControlHandler::stop) + { + } + + void addKeyHandlers(ArRobot *robot) + { + ArKeyHandler *keyHandler = Aria::getKeyHandler(); + if(keyHandler == NULL) + { + keyHandler = new ArKeyHandler(); + Aria::setKeyHandler(keyHandler); + robot->attachKeyHandler(keyHandler); + } + keyHandler->addKeyHandler(ArKeyHandler::PAGEUP, &myUpCB); + keyHandler->addKeyHandler('u', &myUpCB); + keyHandler->addKeyHandler(ArKeyHandler::PAGEDOWN, &myDownCB); + keyHandler->addKeyHandler('d', &myDownCB); + keyHandler->addKeyHandler('o', &myOpenCB); + keyHandler->addKeyHandler('c', &myCloseCB); + keyHandler->addKeyHandler('s', &myStopCB); + } + + void liftUp() + { + ArLog::log(ArLog::Normal, "Moving gripper lift up..."); + myGripper->liftUp(); + } + + void liftDown() + { + ArLog::log(ArLog::Normal, "Moving gripper lift down..."); + myGripper->liftDown(); + } + + void stop() + { + ArLog::log(ArLog::Normal, "Stopping gripper..."); + myGripper->gripperHalt(); // stops both lift an grip + //myGripper->liftStop(); // stops just the lift + //myGripper->gripStop(); // stops just the gripper + } + + void close() + { + ArLog::log(ArLog::Normal, "Closing gripper..."); + myGripper->gripClose(); + } + + void open() + { + ArLog::log(ArLog::Normal, "Opening gripper..."); + myGripper->gripOpen(); + } + +}; + +int main(int argc, char **argv) +{ + + Aria::init(); + ArRobot robot; + ArArgumentParser argParser(&argc, argv); + ArSimpleConnector connector(&argParser); + ArGripper gripper(&robot); + ArSonarDevice sonar; + robot.addRangeDevice(&sonar); + + argParser.loadDefaultArguments(); + + if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + if (!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "gripperExample: Could not connect to robot... exiting"); + Aria::exit(2); + return 2; + } + ArLog::log(ArLog::Normal, "gripperExample: Connected to robot."); + + ArLog::log(ArLog::Normal, "gripperExample: GripperType=%d", gripper.getType()); + gripper.logState(); + if(gripper.getType() == ArGripper::NOGRIPPER) + { + ArLog::log(ArLog::Terse, "gripperExample: Error: Robot does not have a gripper. Exiting."); + Aria::exit(-1); + return -1; + } + + // Teleoperation actions with obstacle-collision avoidance + ArActionLimiterTableSensor tableLimit; + robot.addAction(&tableLimit, 110); + ArActionLimiterForwards limitNearAction("near", 300, 600, 250); + robot.addAction(&limitNearAction, 100); + ArActionLimiterForwards limitFarAction("far", 300, 1100, 400); + robot.addAction(&limitFarAction, 90); + ArActionLimiterBackwards limitBackAction; + robot.addAction(&limitBackAction, 50); + ArActionJoydrive joydriveAction("joydrive", 400, 15); + robot.addAction(&joydriveAction, 40); + joydriveAction.setStopIfNoButtonPressed(false); + ArActionKeydrive keydriveAction; + robot.addAction(&keydriveAction, 30); + + + // Handlers to control the gripper and print out info (classes defined above) + PrintGripStatus printStatus(&gripper); + GripperControlHandler gripControl(&gripper); + printStatus.addRobotTask(&robot); + gripControl.addKeyHandlers(&robot); + + // enable motors and run (if we lose connection to the robot, exit) + ArLog::log(ArLog::Normal, "You may now operate the robot with arrow keys or joystick. Operate the gripper with the u, d, o, c, and page up/page down keys."); + robot.enableMotors(); + robot.run(true); + + Aria::exit(0); + return 0; +} + + diff --git a/Legacy/Aria/examples/gyroExample-vc2003.vcproj b/Legacy/Aria/examples/gyroExample-vc2003.vcproj new file mode 100644 index 0000000..a5aae40 --- /dev/null +++ b/Legacy/Aria/examples/gyroExample-vc2003.vcproj @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gyroExample-vc2008.vcproj b/Legacy/Aria/examples/gyroExample-vc2008.vcproj new file mode 100644 index 0000000..7946f69 --- /dev/null +++ b/Legacy/Aria/examples/gyroExample-vc2008.vcproj @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/gyroExample-vc2010.vcxproj b/Legacy/Aria/examples/gyroExample-vc2010.vcxproj new file mode 100644 index 0000000..8193445 --- /dev/null +++ b/Legacy/Aria/examples/gyroExample-vc2010.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + gyroExample + {1A8C458C-0086-4788-AF12-F1DFA5EBAD53} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/gyroExample.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/gyroExample.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/gyroExample.cpp b/Legacy/Aria/examples/gyroExample.cpp new file mode 100644 index 0000000..b6b1fc1 --- /dev/null +++ b/Legacy/Aria/examples/gyroExample.cpp @@ -0,0 +1,199 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/** @example gyroExample.cpp Example program that activates an onboard gyro if it exists and uses its data to correct the robot pose. + * + * This program uses ArActionKeydrive and ArActionJoydrive to allow + * teleoperation with the keyboard or joystick, and displays gyro data. + * Additional keys (numbers 0-9 and letters q, w, e, r, t, y, u, i, o, p) + * activate preset rotation velocities. + * +*/ + +#include "Aria.h" +#include "ArAnalogGyro.h" + + +class GyroTask +{ +public: + // the constructor, it must use constructor chaining to intialize its base + // class ArSimpleUserTask + GyroTask(ArRobot *robot); + // empty destructor + ~GyroTask(void) {} + + // the task we want to do + void doTask(void); + + bool handlePacket(ArRobotPacket *pkt); +protected: + //double myHeading; + ArAnalogGyro *myGyro; + ArRobot *myRobot; + ArFunctorC myTaskCB; + ArRetFunctor1C myPacketHandlerCB; + bool gotGyroPacket; +}; + + +// the constructor, note how it uses chaining to initialize the myTaskCB +GyroTask::GyroTask(ArRobot *robot) : + myTaskCB(this, &GyroTask::doTask), + myPacketHandlerCB(this, &GyroTask::handlePacket), + gotGyroPacket(false) +{ + ArKeyHandler *keyHandler; + myRobot = robot; + // just add it to the robot + myRobot->addUserTask("GyroTask", 50, &myTaskCB); + myRobot->addPacketHandler(&myPacketHandlerCB, ArListPos::LAST); + myRobot->comInt(ArCommands::GYRO, 2); + myGyro = new ArAnalogGyro(myRobot); + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + if (myRobot != NULL) + myRobot->attachKeyHandler(keyHandler); + else + ArLog::log(ArLog::Terse, "GyroTask: No robot to attach a keyHandler to, keyHandling won't work... either make your own keyHandler and drive it yourself, make a keyhandler and attach it to a robot, or give this a robot to attach to."); + } + keyHandler->addKeyHandler('1', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 10)); + keyHandler->addKeyHandler('2', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 20)); + keyHandler->addKeyHandler('3', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 30)); + keyHandler->addKeyHandler('4', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 40)); + keyHandler->addKeyHandler('5', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 50)); + keyHandler->addKeyHandler('6', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 60)); + keyHandler->addKeyHandler('7', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 70)); + keyHandler->addKeyHandler('8', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 80)); + keyHandler->addKeyHandler('9', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 90)); + keyHandler->addKeyHandler('0', new ArFunctor1C(myRobot,&ArRobot::setRotVel, 100)); + + keyHandler->addKeyHandler('q', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -10)); + keyHandler->addKeyHandler('w', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -20)); + keyHandler->addKeyHandler('e', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -30)); + keyHandler->addKeyHandler('r', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -40)); + keyHandler->addKeyHandler('t', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -50)); + keyHandler->addKeyHandler('y', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -60)); + keyHandler->addKeyHandler('u', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -70)); + keyHandler->addKeyHandler('i', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -80)); + keyHandler->addKeyHandler('o', new ArFunctor1C(myRobot,&ArRobot::setRotVel, -90)); + keyHandler->addKeyHandler('p', new ArFunctor1C(myRobot, &ArRobot::setRotVel, -100)); + + keyHandler->addKeyHandler('a', new ArFunctor1C(myRobot, &ArRobot::setHeading, 0)); + keyHandler->addKeyHandler('s', new ArFunctor1C(myRobot, &ArRobot::setHeading, 90)); + keyHandler->addKeyHandler('d', new ArFunctor1C(myRobot, &ArRobot::setHeading, 180)); + keyHandler->addKeyHandler('f', new ArFunctor1C(myRobot, &ArRobot::setHeading, 270)); + +} + +void GyroTask::doTask(void) +{ + /* + double degrees = -((myRobot->getAnalog() * 5.0 / 255) - 2.509) * 150 / 2.5 * 1.265; + if (fabs(degrees) < 2) + degrees = 0; + myHeading += degrees * .025; + printf("%10f %10f %10f %10f\n", myRobot->getAnalog() * 5.0 / 255, degrees, + myRobot->getRotVel(), myHeading); + fflush(stdout); + */ + printf("gyro th (mode 1 only):%8.4f encoder th:%8.4f ArRobot mixed th:%8.4f temp:%d ave:%g gyro packets:%s\n", myGyro->getHeading(), myRobot->getRawEncoderPose().getTh(), myRobot->getTh(), myGyro->getTemperature(), myGyro->getAverage(), gotGyroPacket?"received":"not received"); +} + + +bool GyroTask::handlePacket(ArRobotPacket *pkt) +{ + if(pkt->getID() == 152) + gotGyroPacket = true; + return true; +} + + +int main(int argc, char **argv) +{ + Aria::init(); + ArRobot robot; + + // the joydrive action + ArActionJoydrive joydriveAct; + // the keydrive action + ArActionKeydrive keydriveAct; + + GyroTask gyro(&robot); + + // sonar device, so the limiter will work, this must be added to the robot + ArSonarDevice sonar; + + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobotConnector connector(&parser, &robot); + if (!Aria::parseArgs() || argc > 1) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + + printf("This program will allow you to use a joystick or keyboard to control the robot.\nYou can use the arrow keys to drive, and the spacebar to stop.\nFor joystick control press the trigger button and then drive.\nPress escape to exit.\n"); + + + // if we don't have a joystick, let 'em know + if (!joydriveAct.joystickInited()) + printf("Do not have a joystick, only the arrow keys on the keyboard will work.\n"); + + // set the joystick so it won't do anything if the button isn't pressed + joydriveAct.setStopIfNoButtonPressed(false); + + // add the sonar to the robot + robot.addRangeDevice(&sonar); + + // try to connect, if we fail exit + if (!connector.connectRobot()) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + return 1; + } + + robot.comInt(ArCommands::ENABLE, 1); + + robot.addAction(&joydriveAct, 50); + robot.addAction(&keydriveAct, 45); + + // set the joydrive action so it'll let the keydrive action fire if + // there is no button pressed + joydriveAct.setStopIfNoButtonPressed(false); + + + // run the robot, true here so that the run will exit if connection lost + robot.run(true); + + // now exit + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/imuExample.cpp b/Legacy/Aria/examples/imuExample.cpp new file mode 100644 index 0000000..0337acf --- /dev/null +++ b/Legacy/Aria/examples/imuExample.cpp @@ -0,0 +1,171 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/** @example imuExample.cpp Example of gathering IMU data from Seekur + + Sample program that demonstrates how to get IMU data from an IMU on + a Seekur-class robot (from SeekurOS). Only some Seekurs have IMUs. + + [Some Pioneers also have + gyros that are integrated into the robot and normally automatically + correct data or which can optionally return the data seperately + (using different packets and different ARIA interface in ArAnalogGyro).] + + The data comes back in a custom packet with + ID 0x9A. It's requested with client command 26. + + Press escape to exit the program. + + */ + +#include "Aria.h" +#include + +bool imuPacketHandler(ArRobotPacket* packet) { + if (packet->getID() != 0x9a) { + //ArLog::log(ArLog::Normal, "ignoring packet with id: %d", packet->getID()); + return false; + } + int timeSince = packet->bufToByte(); + int numPerAxis = packet->bufToByte(); + + ArLog::log(ArLog::Normal, "got IMUpac, %dms since readings took place, %d readings per axis", timeSince, numPerAxis); + int i; + int range; + double x = 0.0; + double y = 0.0; + double z = 0.0; + double multiplier = 0.0; + double offset = 0.0; + int numGyroAxes = packet->bufToByte(); + for (i=1; i <= numPerAxis; i++) { + x = 0.0; + y = 0.0; + z = 0.0; + range = packet->bufToByte(); + if (range == 3) { + multiplier = 0.07326; + offset = 0.0; + } + else if (range == 2) { + multiplier = 0.03663; + offset = 0.0; + } + else if (range == 1) { + multiplier = 0.01832; + offset = 0.0; + } + if (numGyroAxes >= 1) { + x = (packet->bufToByte2() * multiplier) + offset; + } + if (numGyroAxes >= 2) { + y = (packet->bufToByte2() * multiplier) + offset; + } + if (numGyroAxes >= 3) { + z = (packet->bufToByte2() * multiplier) + offset; + } + ArLog::log(ArLog::Normal, "gyro: reading %d of %d, x: %10.4f deg/s, y: %10.4f deg/s, z: %10.4f deg/s", + i, numPerAxis, x, y, z); + } + int numAccelAxes = packet->bufToByte(); + for (i=1; i <= numPerAxis; i++) { + x = 0.0; + y = 0.0; + z = 0.0; + multiplier = 0.002522 * 9806.65; + offset = 0.0; + if (numAccelAxes >= 1) { + x = (packet->bufToByte2() * multiplier) + offset; + } + if (numAccelAxes >= 2) { + y = (packet->bufToByte2() * multiplier) + offset; + } + if (numAccelAxes >= 3) { + z = (packet->bufToByte2() * multiplier) + offset; + } + ArLog::log(ArLog::Normal, "accel: reading %d of %d, x: %10.4f mg, y: %10.4f mg, z: %10.4f mg", + i, numPerAxis, x, y, z); + } + int numTemperatureAxes = packet->bufToByte(); + for (i=1; i <= numPerAxis; i++) { + x = 0.0; + y = 0.0; + z = 0.0; + multiplier = 0.1453; + offset = 25.0; + if (numTemperatureAxes >= 1) { + x = (packet->bufToByte2() * multiplier) + offset; + } + if (numTemperatureAxes >= 2) { + y = (packet->bufToByte2() * multiplier) + offset; + } + if (numTemperatureAxes >= 3) { + z = (packet->bufToByte2() * multiplier) + offset; + } + ArLog::log(ArLog::Normal, "temperature: reading %d of %d, x: %10.4f degC, y: %10.4f degC, z: %10.4f degC", + i, numPerAxis, x, y, z); + } + ArLog::log(ArLog::Normal, ""); + ArLog::log(ArLog::Normal, ""); + + return true; +} + +int main(int argc, char **argv) { + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Normal, "", true); + ArArgumentParser parser(&argc, argv); + ArRobot *robot = new ArRobot; + ArSimpleConnector simpleConnector(&parser); + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + robot->attachKeyHandler(&keyHandler); + + parser.loadDefaultArguments(); + if (!simpleConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed(1)) { + simpleConnector.logOptions(); + keyHandler.restore(); + Aria::exit(1); + } + if (!simpleConnector.connectRobot(robot)) { + ArLog::log(ArLog::Terse, "Error connecting to robot."); + Aria::shutdown(); + keyHandler.restore(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "Connected to robot."); + ArGlobalRetFunctor1 myImuPacketHandler(&imuPacketHandler); + robot->addPacketHandler(&myImuPacketHandler, ArListPos::FIRST); + robot->runAsync(true); + ArUtil::sleep(500); + robot->lock(); + robot->comInt(26, 2); // request IMU packets continuously + ArLog::log(ArLog::Normal, "Requested IMU packets, waiting..."); + robot->unlock(); + robot->waitForRunExit(); + Aria::shutdown(); + exit(0); +} + diff --git a/Legacy/Aria/examples/ipthru-vc2003.vcproj b/Legacy/Aria/examples/ipthru-vc2003.vcproj new file mode 100644 index 0000000..dbbcacf --- /dev/null +++ b/Legacy/Aria/examples/ipthru-vc2003.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/ipthru-vc2008.vcproj b/Legacy/Aria/examples/ipthru-vc2008.vcproj new file mode 100644 index 0000000..7fd4fce --- /dev/null +++ b/Legacy/Aria/examples/ipthru-vc2008.vcproj @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/ipthru-vc2010.vcxproj b/Legacy/Aria/examples/ipthru-vc2010.vcxproj new file mode 100644 index 0000000..c18e7a0 --- /dev/null +++ b/Legacy/Aria/examples/ipthru-vc2010.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + ipthru + {B0CD9146-122F-49FD-A12A-7A970514DFB1} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/ipthru.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/ipthru.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/ipthru.cpp b/Legacy/Aria/examples/ipthru.cpp new file mode 100644 index 0000000..b5522d8 --- /dev/null +++ b/Legacy/Aria/examples/ipthru.cpp @@ -0,0 +1,237 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/* + Utility that forwards data back and forth from a tcp port to a serial + port. This can be used to run programs on your workstation instead + of the robot's onboard computer, or to bridge networks. + However, it can negatively impact performance, and may cause some things + to simply not work; we do not recommend or support using this program + other than for quick testing or development. +*/ + +void usage(char *progName) +{ + printf("There are four ways to use %s\n", progName); + printf("%s\t\t\tUses a robot, port 8101 and %s\n", progName, ArUtil::COM1); + printf("%s laser\t\tUses a laser, port 8102 and %s\n", progName, ArUtil::COM3); + printf("%s \n", progName); + printf("%s laser\n", progName); + printf("-----------------------------------------------------------\n"); + printf("portNumToForwardFrom: The tcp port to listen on.\n"); + printf("portNameToForwardTo: The serial port name to open.\n"); + printf("laser: option, if given it'll use laser packet receivers and not robot packet receivers.\n"); +} + +int main(int argc, char **argv) +{ + // this is how long to wait after there's been no data to close the + // connection.. if its 0 and its using robot it'll set it to 5000 (5 + // seconds), if its 0 and using laser, it'll set it to 60000 (60 + // seconds, which is needed if the sick driver is controlling power + int timeout = 0; + // true will print out packets as they come and go, false won't + bool tracePackets = false; + + // The socket objects + ArSocket masterSock, clientSock; + // The connections + ArTcpConnection clientConn; + ArSerialConnection robotConn; + // the receivers, first for the robot + ArRobotPacketReceiver clientRec(&clientConn); + ArRobotPacketReceiver robotRec(&robotConn); + // then for the laser + ArSickPacketReceiver clientSickRec(&clientConn, 0, false, true); + ArSickPacketReceiver robotSickRec(&robotConn); + // how about a packet + ArBasePacket *packet; + // our timer for how often we test the client + ArTime lastClientTest; + ArTime lastData; + // where we're forwarding from and to + int portNumber; + const char *portName; + // if we're using the robot or the laser + bool useRobot; + + if (argc == 1) + { + printf("Using robot and port 8101 and serial connection %s, by default.\n", ArUtil::COM1); + useRobot = true; + portNumber = 8101; + portName = ArUtil::COM1; + } + else if (argc == 2) + { + // if laser isn't the last arg, somethings wrong + if (strcmp(argv[1], "laser") != 0) + { + usage(argv[0]); + return -1; + } + useRobot = false; + portNumber = 8102; + portName = ArUtil::COM3; + printf("Using laser and port %d and serial connection %s, by command line arguments.\n", portNumber, portName); + printf("(Note: Requests to change BAUD rate cannot be fulfilled; use 9600 rate only.)\n"); + } + else if (argc == 3) + { + if ((portNumber = atoi(argv[1])) <= 0) + { + usage(argv[0]); + return -1; + } + portName = argv[2]; + printf("Using robot and port %d and serial connection %s, by command line arguments.\n", portNumber, portName); + } + else if (argc == 4) + { + if ((portNumber = atoi(argv[1])) <= 0) + { + usage(argv[0]); + return -1; + } + // if laser isn't the last arg, somethings wrong + if (strcmp(argv[3], "laser") != 0) + { + usage(argv[0]); + return -1; + } + useRobot = false; + portName = argv[2]; + printf("Using laser and port %d and serial connection %s, by command line arguments.\n", portNumber, portName); + printf("(Note: Requests to change BAUD rate cannot be fulfilled; use 9600 rate only.)\n"); + } + else + { + usage(argv[0]); + return -1; + } + if (timeout == 0 && useRobot) + timeout = 5000; + else if (timeout == 0) + timeout = 60000; + + // Initialize Aria. For Windows, this absolutely must be done. Because + // Windows does not initialize the socket layer for each program. Each + // program must initialize the sockets itself. + Aria::init(Aria::SIGHANDLE_NONE); + + // Lets open the master socket + if (masterSock.open(portNumber, ArSocket::TCP)) + printf("Opened the master port at %d\n", portNumber); + else + { + printf("Failed to open the master port at %d: %s\n", + portNumber, masterSock.getErrorStr().c_str()); + return -1; + } + + // just go forever + while (1) + { + // Lets wait for the client to connect to us. + if (masterSock.accept(&clientSock)) + printf("Client has connected\n"); + else + printf("Error in accepting a connection from the client: %s\n", + masterSock.getErrorStr().c_str()); + + // now set up our connection so our packet receivers work + clientConn.setSocket(&clientSock); + clientConn.setStatus(ArDeviceConnection::STATUS_OPEN); + lastClientTest.setToNow(); + lastData.setToNow(); + // open up the robot port + if (robotConn.open(portName) != 0) + { + printf("Could not open robot port %s.\n", portName); + return -1; + } + + // while we're open, just read from one port and write to the other + while (clientSock.getFD() >= 0) + { + // get our packet + if (useRobot) + packet = clientRec.receivePacket(1); + else + packet = clientSickRec.receivePacket(1); + // see if we had one + if (packet != NULL) + { + if (tracePackets) + { + printf("Client "); + packet->log(); + } + robotConn.writePacket(packet); + lastData.setToNow(); + } + // get our packet + if (useRobot) + packet = robotRec.receivePacket(1); + else + packet = robotSickRec.receivePacket(1); + // see if we had one + if (packet != NULL) + { + if (tracePackets) + { + printf("Robot "); + packet->log(); + } + clientConn.writePacket(packet); + lastData.setToNow(); + } + ArUtil::sleep(1); + // If no datas gone by in timeout ms assume our connection is broken + if (lastData.mSecSince() > timeout) + { + printf("No data received in %d milliseconds, closing connection.\n", + timeout); + clientConn.close(); + } + } + // Now lets close the connection to the client + clientConn.close(); + printf("Socket to client closed\n"); + robotConn.close(); + } + // And lets close the master port + masterSock.close(); + printf("Master socket closed and program exiting\n"); + + // Uninitialize Aria + Aria::uninit(); + + // All done + return(0); +} diff --git a/Legacy/Aria/examples/joydriveActionExample-vc2003.vcproj b/Legacy/Aria/examples/joydriveActionExample-vc2003.vcproj new file mode 100644 index 0000000..3bebd0a --- /dev/null +++ b/Legacy/Aria/examples/joydriveActionExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveActionExample-vc2008.vcproj b/Legacy/Aria/examples/joydriveActionExample-vc2008.vcproj new file mode 100644 index 0000000..a7b2126 --- /dev/null +++ b/Legacy/Aria/examples/joydriveActionExample-vc2008.vcproj @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveActionExample-vc2010.vcproj b/Legacy/Aria/examples/joydriveActionExample-vc2010.vcproj new file mode 100644 index 0000000..a7b2126 --- /dev/null +++ b/Legacy/Aria/examples/joydriveActionExample-vc2010.vcproj @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveActionExample.cpp b/Legacy/Aria/examples/joydriveActionExample.cpp new file mode 100644 index 0000000..87596ab --- /dev/null +++ b/Legacy/Aria/examples/joydriveActionExample.cpp @@ -0,0 +1,155 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example joydriveActionExample.cpp Example ArAction object that uses + * ArJoyHandler to get joystick input. + * + This program just drives the robot around with a joystick, + by way of an ArAction class which reads data fram an ArJoyHandler. + Its a practical example of actions. +*/ + +// the action which will drive the robot +class JoydriveAction : public ArAction +{ +public: + // constructor + JoydriveAction(void); + // empty destructor + virtual ~JoydriveAction(void); + //the fire which will actually tell the resolver what to do + virtual ArActionDesired *fire(ArActionDesired currentDesired); + // whether the joystick is initalized or not + bool joystickInited(void); +protected: + // action desired + ArActionDesired myDesired; + // joystick handler + ArJoyHandler myJoyHandler; +}; + +/* + Note the use of constructor chaining with ArAction. +*/ +JoydriveAction::JoydriveAction(void) : + ArAction("Joydrive Action", "This action reads the joystick and sets the translational and rotational velocity based on this.") +{ + // initialize the joystick + myJoyHandler.init(); + // set up the speed parameters on the joystick + myJoyHandler.setSpeeds(50, 700); +} + +JoydriveAction::~JoydriveAction(void) +{ +} + +// whether the joystick is there or not +bool JoydriveAction::joystickInited(void) +{ + return myJoyHandler.haveJoystick(); +} + +// the guts of the thing +ArActionDesired *JoydriveAction::fire(ArActionDesired currentDesired) +{ + int rot, trans; + + // print out some info about hte robot + printf("\rx %6.1f y %6.1f tth %6.1f vel %7.1f mpacs %3d", myRobot->getX(), + myRobot->getY(), myRobot->getTh(), myRobot->getVel(), + myRobot->getMotorPacCount()); + fflush(stdout); + + // see if one of the buttons is pushed, if so drive + if (myJoyHandler.haveJoystick() && (myJoyHandler.getButton(1) || + myJoyHandler.getButton(2))) + { + // get the readings from the joystick + myJoyHandler.getAdjusted(&rot, &trans); + // set what we want to do + myDesired.setVel(trans); + myDesired.setDeltaHeading(-rot); + // return the actionDesired + return &myDesired; + } + else + { + // set what we want to do + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + // return the actionDesired + return &myDesired; + } +} + + +int main(int argc, char **argv) +{ + ArRobot robot; + Aria::init(); + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + return 1; + } + + // Instance of the JoydriveAction class defined above + JoydriveAction jdAct; + + // if the joydrive action couldn't find the joystick, then exit. + if (!jdAct.joystickInited()) + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + Aria::exit(1); + return 1; + } + + // Connect to the robot + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + return 2; + } + + + // disable sonar, enable motors, disable amigobot sound + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the action + robot.addAction(&jdAct, 100); + // run the robot, true so it'll exit if we lose connection + robot.run(true); + + // now exit program + Aria::exit(0); + return 0; +} + diff --git a/Legacy/Aria/examples/joydriveThreaded-vc2003.vcproj b/Legacy/Aria/examples/joydriveThreaded-vc2003.vcproj new file mode 100644 index 0000000..11708c8 --- /dev/null +++ b/Legacy/Aria/examples/joydriveThreaded-vc2003.vcproj @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveThreaded-vc2008.vcproj b/Legacy/Aria/examples/joydriveThreaded-vc2008.vcproj new file mode 100644 index 0000000..660c2b8 --- /dev/null +++ b/Legacy/Aria/examples/joydriveThreaded-vc2008.vcproj @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveThreaded-vc2010.vcxproj b/Legacy/Aria/examples/joydriveThreaded-vc2010.vcxproj new file mode 100644 index 0000000..742d379 --- /dev/null +++ b/Legacy/Aria/examples/joydriveThreaded-vc2010.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + joydriveThreaded + {B6C39214-2167-4B3D-8C01-2D98A5642F8E} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/joydriveThreaded.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/joydriveThreaded.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/joydriveThreaded.cpp b/Legacy/Aria/examples/joydriveThreaded.cpp new file mode 100644 index 0000000..db2251d --- /dev/null +++ b/Legacy/Aria/examples/joydriveThreaded.cpp @@ -0,0 +1,265 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This program just drives the robot around with a joystick. + + This example shows an example of a program making a thread for its own use + (reading the joystick and driving the robot), having the robot run in its + own thread, and then keeping its main thread to itself. Demonstrates the + thread locking that must be done for threads to work safely. If you don't + know or understand threading, or you don't need threading, you probably + shouldn't do it this way, as it is more complicated. +*/ + +/* + This class creates its own thread, and then runs in the thread, controlling + the robot with the joystick. +*/ +class Joydrive : public ArASyncTask +{ +public: + // constructor + Joydrive(ArRobot *robot); + // empty destructor + ~Joydrive(void) {} + + // the function to run in the new thread, this just is called once, so + // only return when you want th ethread to exit + virtual void * runThread(void *arg); + +protected: + // joystick handler + ArJoyHandler myJoyHandler; + // robot pointer + ArRobot *myRobot; +}; + +// a nice simple constructor +Joydrive::Joydrive(ArRobot *robot) +{ + setThreadName("Joydrive"); + // set the robot pointer + myRobot = robot; + // initialize the joystick + myJoyHandler.init(); + // set up the joystick so we'll get the speeds out we want + myJoyHandler.setSpeeds(40, 700); + + // see if we have a joystick, and let the users know + if (myJoyHandler.haveJoystick()) + { + printf("Have a joystick\n\n"); + } + // if we don't have a joystick, then print error message and exit + else + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + Aria::exit(1); // exit program with error code 1 + } + + // this is what creates are own thread, its from the ArASyncTask + create(); +} + +// this is the function called in the new thread +void *Joydrive::runThread(void *arg) +{ + threadStarted(); + + int trans, rot; + + // only run while running, ie play nice and pay attention to the thread + //being shutdown + while (myRunning) + { + // lock the robot before touching it + myRobot->lock(); + if (!myRobot->isConnected()) + { + myRobot->unlock(); + break; + } + // print out some information about the robot + printf("\rx %6.1f y %6.1f tth %6.1f vel %7.1f mpacs %3d ", + myRobot->getX(), myRobot->getY(), myRobot->getTh(), + myRobot->getVel(), myRobot->getMotorPacCount()); + fflush(stdout); + // if one of the joystick buttons is pushed, drive the robot + if (myJoyHandler.haveJoystick() && (myJoyHandler.getButton(1) || + myJoyHandler.getButton(2))) + { + // get out the values from the joystick + myJoyHandler.getAdjusted(&rot, &trans); + // drive the robot + myRobot->setVel(trans); + myRobot->setRotVel(-rot); + } + // if no buttons are pushed stop the robot + else + { + myRobot->setVel(0); + myRobot->setRotVel(0); + } + // unlock the robot, so everything else can run + myRobot->unlock(); + // now take a little nap + ArUtil::sleep(50); + } + // return out here, means the thread is done + return NULL; +} + +/* + This is a connection handler, fairly simple, but quite useful, esp when + the robot is running in another thread. +*/ +class ConnHandler +{ +public: + // constructor + ConnHandler(ArRobot *robot, Joydrive *jd); + // Destructor, its just empty + ~ConnHandler(void) {} + // to be called if the connection was made + void connected(void); + // to call if the connection failed + void connFail(void); + // to be called if the connection was lost + void disconnected(void); +protected: + // robot pointer + ArRobot *myRobot; + // pointer to joydrive + Joydrive *myJoydrive; + // the functor callbacks + ArFunctorC *myConnectedCB; + ArFunctorC *myConnFailCB; + ArFunctorC *myDisconnectedCB; + +}; + +// the mythical constructor +ConnHandler::ConnHandler(ArRobot *robot, Joydrive *jd) +{ + // set the pointers + myRobot = robot; + myJoydrive = jd; + + // now create the functor callbacks, then set them on the robot + myConnectedCB = new ArFunctorC(this, &ConnHandler::connected); + myRobot->addConnectCB(myConnectedCB, ArListPos::FIRST); + myConnFailCB = new ArFunctorC(this, &ConnHandler::connFail); + myRobot->addFailedConnectCB(myConnFailCB, ArListPos::FIRST); + myDisconnectedCB = new ArFunctorC(this, + &ConnHandler::disconnected); + myRobot->addDisconnectNormallyCB(myDisconnectedCB, ArListPos::FIRST); + myRobot->addDisconnectOnErrorCB(myDisconnectedCB, ArListPos::FIRST); +} + +// when we connect turn off the sonar, turn on the motors, and disable amigobot +// sound +void ConnHandler::connected(void) +{ + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::ENABLE, 1); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +// just exit if we failed to connect +void ConnHandler::connFail(void) +{ + printf("Failed to connect.\n"); + myRobot->stopRunning(); + myJoydrive->stopRunning(); + Aria::exit(2); // exit program with error code 2 +} + +// if we lost connection then exit +void ConnHandler::disconnected(void) +{ + printf("Lost connection\n"); + myRobot->stopRunning(); + myJoydrive->stopRunning(); + Aria::exit(3); // exit program with error code 3 +} + +int main(int argc, char **argv) +{ + std::string str; + int ret; + + // connection to the robot + ArTcpConnection con; + // the robot + ArRobot robot; + + // ake the joydrive object, which also creates its own thread + Joydrive joyd(&robot); + + // the connection handler + ConnHandler ch(&robot, &joyd); + + // init aria, which will make a dedicated signal handling thread + Aria::init(Aria::SIGHANDLE_THREAD); + + // open the connection with default args, exit if it fails + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + + // set the connection on the robot + robot.setDeviceConnection(&con); + + // run the robot in its own thread + robot.runAsync(false); + + // have the robot connect asyncronously (so its loop is still running) + // if this fails it means that the robot isn't running in its own thread + if (!robot.asyncConnect()) + { + printf( + "asyncConnect failed because robot is not running in its own thread.\n"); + Aria::shutdown(); + return 1; + } + + // now we just wait for the robot to be done running + printf("Waiting for the robot's run to exit.\n"); + robot.waitForRunExit(); + // then we exit + printf("exiting main\n"); + Aria::exit(0); // exit program + return 0; +} + + diff --git a/Legacy/Aria/examples/joydriveUserTask-vc2003.vcproj b/Legacy/Aria/examples/joydriveUserTask-vc2003.vcproj new file mode 100644 index 0000000..beeaede --- /dev/null +++ b/Legacy/Aria/examples/joydriveUserTask-vc2003.vcproj @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveUserTask-vc2008.vcproj b/Legacy/Aria/examples/joydriveUserTask-vc2008.vcproj new file mode 100644 index 0000000..f8dc9ec --- /dev/null +++ b/Legacy/Aria/examples/joydriveUserTask-vc2008.vcproj @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/joydriveUserTask.cpp b/Legacy/Aria/examples/joydriveUserTask.cpp new file mode 100644 index 0000000..04a3139 --- /dev/null +++ b/Legacy/Aria/examples/joydriveUserTask.cpp @@ -0,0 +1,165 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This program just drives the robot around with a joystick. + + This example uses a user task which has a joystick handler to drive the + robot. +*/ + +// the clas which'll have the task to drive the robot +class Joydrive +{ +public: + // the constructor + Joydrive(ArRobot *robot); + // the destructor + ~Joydrive(void); + + // the function which'll drive the robot + void drive(void); + +protected: + // the joystick handler + ArJoyHandler myJoyHandler; + // robot pointer + ArRobot *myRobot; + // the callback + ArFunctorC myDriveCB; +}; + +/* + the constructor, note the use of constructor chaining +*/ +Joydrive::Joydrive(ArRobot *robot) : + myDriveCB(this, &Joydrive::drive) +{ + // set the robot, and add joydrive as a task + myRobot = robot; + if (myRobot != NULL) + myRobot->addUserTask("joydrive", 50, &myDriveCB); + + // initialize the joystick handler + myJoyHandler.init(); + // set the values we'll get back out of the joystick handler + myJoyHandler.setSpeeds(100, 700); + + // see if we have the joystick, and let the user know + if (myJoyHandler.haveJoystick()) + { + printf("Have a joystick\n\n"); + } + // we don't have a joystick, exit + else + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + Aria::exit(1); + } +} + +Joydrive::~Joydrive(void) +{ + // remove the user task from the robot + if (myRobot != NULL) + myRobot->remUserTask(&myDriveCB); +} + +void Joydrive::drive(void) +{ + int trans, rot; + + // print out some data about the robot + printf("\rx %6.1f y %6.1f tth %6.1f vel %7.1f mpacs %3d ", + myRobot->getX(), myRobot->getY(), myRobot->getTh(), + myRobot->getVel(), myRobot->getMotorPacCount()); + fflush(stdout); + + // see if a joystick butotn is pushed, if so drive + if (myJoyHandler.haveJoystick() && (myJoyHandler.getButton(1) || + myJoyHandler.getButton(2))) + { + // get the values out of the joystick handler + myJoyHandler.getAdjusted(&rot, &trans); + // drive the robot + myRobot->setVel(trans); + myRobot->setRotVel(-rot); + } + // if a button isn't pushed, stop the robot + else + { + myRobot->setVel(0); + myRobot->setRotVel(0); + } +} + +int main(int argc, char **argv) +{ + std::string str; + int ret; + + // connection + ArTcpConnection con; + // robot, this starts it with state reflecting turned off + ArRobot robot(NULL, false); + // make the joydrive instance, which adds its task to the robot + Joydrive joyd(&robot); + + // mandatory aria initialization + Aria::init(); + + // open the connection, if it fails, exit + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::exit(1); + return 1; + } + + // set the robots connection + robot.setDeviceConnection(&con); + // try to connect, if we fail exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + return 1; + } + + // turn off sonar, turn the motors on, turn off amigobot sound + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // run the robot, true so that if connection is lost the run stops + robot.run(true); + // now exit + Aria::exit(0); // exit program + return 0; +} + diff --git a/Legacy/Aria/examples/laserConnect.cpp b/Legacy/Aria/examples/laserConnect.cpp new file mode 100644 index 0000000..50e4e8f --- /dev/null +++ b/Legacy/Aria/examples/laserConnect.cpp @@ -0,0 +1,133 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example laserConnect.cpp example showing how to connect to laser rangefinders attached to the robot and retrieve data from them. What kinds of laser or lasers are connected to the robot, and their parameters, are loaded from the robot's parameter file in the params directory. First the default for this type of mobile robot is loaded (e.g. p3dx-sh.p for a Pioneer 3 DX), followed by a parameter file specific to this individual robot (based on its 'name'), if such a parameter file exists. Laser parameters may also be given as command line options, use the -help option to list them. This program will only connect to any lasers that have LaserAutoConnect true in the parameter file, or if the -connectLaser or -cl command-line options are given. You may need to edit the parameter file for your robot to set LaserAutoConnect to true. + + TODO: show how to force laser connect even if autoconnect is false. + * + * This program will work either with the MobileSim simulator or on a real + * robot's onboard computer. (Or use -remoteHost to connect to a wireless + * ethernet-serial bridge.) + */ + +int main(int argc, char **argv) +{ + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Verbose); + ArRobot robot; + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + + ArRobotConnector robotConnector(&parser, &robot); + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + + // Connect to the robot, get some initial data from it such as type and name, + // and then load parameter files for this robot. + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "lasersExample: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(2); + return 2; + } + + ArLog::log(ArLog::Normal, "lasersExample: Connected to robot."); + + // Start the robot processing cycle running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + + // Connect to laser(s) as defined in parameter files. + // (Some flags are available as arguments to connectLasers() to control error behavior and to control which lasers are put in the list of lasers stored by ArRobot. See docs for details.) + if(!laserConnector.connectLasers()) + { + ArLog::log(ArLog::Terse, "Could not connect to configured lasers. Exiting."); + Aria::exit(3); + return 3; + } + + // Allow some time to read laser data + ArUtil::sleep(500); + + ArLog::log(ArLog::Normal, "Connected to all lasers."); + + // Print out some data from each connected laser. + while(robot.isConnected()) + { + int numLasers = 0; + + // Get a pointer to ArRobot's list of connected lasers. We will lock the robot while using it to prevent changes by tasks in the robot's background task thread or any other threads. Each laser has an index. You can also store the laser's index or name (laser->getName()) and use that to get a reference (pointer) to the laser object using ArRobot::findLaser(). + robot.lock(); + std::map *lasers = robot.getLaserMap(); + + for(std::map::const_iterator i = lasers->begin(); i != lasers->end(); ++i) + { + int laserIndex = (*i).first; + ArLaser* laser = (*i).second; + if(!laser) + continue; + ++numLasers; + laser->lockDevice(); + + // The current readings are a set of obstacle readings (with X,Y positions as well as other attributes) that are the most recent set from teh laser. + std::list *currentReadings = laser->getCurrentBuffer(); // see ArRangeDevice interface doc + + // There is a utility to find the closest reading wthin a range of degrees around the laser, here we use this laser's full field of view (start to end) + // If there are no valid closest readings within the given range, dist will be greater than laser->getMaxRange(). + double angle = 0; + double dist = laser->currentReadingPolar(laser->getStartDegrees(), laser->getEndDegrees(), &angle); + + ArLog::log(ArLog::Normal, "Laser #%d (%s): %s. Have %d 'current' readings. Closest reading is at %3.0f degrees and is %2.4f meters away.", laserIndex, laser->getName(), (laser->isConnected() ? "connected" : "NOT CONNECTED"), currentReadings->size(), angle, dist/1000.0); + laser->unlockDevice(); + } + if(numLasers == 0) + ArLog::log(ArLog::Normal, "No lasers."); + else + ArLog::log(ArLog::Normal, ""); + + // Unlock robot and sleep for 5 seconds before next loop. + robot.unlock(); + ArUtil::sleep(5000); + } + + ArLog::log(ArLog::Normal, "lasersExample: exiting."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/lasers.cpp b/Legacy/Aria/examples/lasers.cpp new file mode 100644 index 0000000..a3f74f9 --- /dev/null +++ b/Legacy/Aria/examples/lasers.cpp @@ -0,0 +1,133 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example lasers.cpp example showing how to connect to laser rangefinders attached to the robot and retrieve data from them. What kinds of laser or lasers are connected to the robot, and their parameters, are loaded from the robot's parameter file in the params directory. First the default for this type of mobile robot is loaded (e.g. p3dx-sh.p for a Pioneer 3 DX), followed by a parameter file specific to this individual robot (based on its 'name'), if such a parameter file exists. Laser parameters may also be given as command line options, use the -help option to list them. This program will only connect to any lasers that have LaserAutoConnect true in the parameter file, or if the -connectLaser or -cl command-line options are given. You may need to edit the parameter file for your robot to set LaserAutoConnect to true. + + TODO: show how to force laser connect even if autoconnect is false. + * + * This program will work either with the MobileSim simulator or on a real + * robot's onboard computer. (Or use -remoteHost to connect to a wireless + * ethernet-serial bridge.) + */ + +int main(int argc, char **argv) +{ + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Verbose); + ArRobot robot; + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + + ArRobotConnector robotConnector(&parser, &robot); + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + + // Connect to the robot, get some initial data from it such as type and name, + // and then load parameter files for this robot. + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "lasersExample: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(2); + return 2; + } + + ArLog::log(ArLog::Normal, "lasersExample: Connected to robot."); + + // Start the robot processing cycle running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + + // Connect to laser(s) as defined in parameter files. + // (Some flags are available as arguments to connectLasers() to control error behavior and to control which lasers are put in the list of lasers stored by ArRobot. See docs for details.) + if(!laserConnector.connectLasers()) + { + ArLog::log(ArLog::Terse, "Could not connect to configured lasers. Exiting."); + Aria::exit(3); + return 3; + } + + // Allow some time to read laser data + ArUtil::sleep(500); + + ArLog::log(ArLog::Normal, "Connected to all lasers."); + + // Print out some data from each connected laser. + while(robot.isConnected()) + { + int numLasers = 0; + + // Get a pointer to ArRobot's list of connected lasers. We will lock the robot while using it to prevent changes by tasks in the robot's background task thread or any other threads. Each laser has an index. You can also store the laser's index or name (laser->getName()) and use that to get a reference (pointer) to the laser object using ArRobot::findLaser(). + robot.lock(); + std::map *lasers = robot.getLaserMap(); + + for(std::map::const_iterator i = lasers->begin(); i != lasers->end(); ++i) + { + int laserIndex = (*i).first; + ArLaser* laser = (*i).second; + if(!laser) + continue; + ++numLasers; + laser->lockDevice(); + + // The current readings are a set of obstacle readings (with X,Y positions as well as other attributes) that are the most recent set from teh laser. + std::list *currentReadings = laser->getCurrentBuffer(); // see ArRangeDevice interface doc + + // There is a utility to find the closest reading wthin a range of degrees around the laser, here we use this laser's full field of view (start to end) + // If there are no valid closest readings within the given range, dist will be greater than laser->getMaxRange(). + double angle = 0; + double dist = laser->currentReadingPolar(laser->getStartDegrees(), laser->getEndDegrees(), &angle); + + ArLog::log(ArLog::Normal, "Laser #%d (%s): %s. Have %d 'current' readings. Closest reading is at %3.0f degrees and is %2.4f meters away.", laserIndex, laser->getName(), (laser->isConnected() ? "connected" : "NOT CONNECTED"), currentReadings->size(), angle, dist/1000.0); + laser->unlockDevice(); + } + if(numLasers == 0) + ArLog::log(ArLog::Normal, "No lasers."); + else + ArLog::log(ArLog::Normal, ""); + + // Unlock robot and sleep for 5 seconds before next loop. + robot.unlock(); + ArUtil::sleep(5000); + } + + ArLog::log(ArLog::Normal, "lasersExample: exiting."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/lineFinderExample.cpp b/Legacy/Aria/examples/lineFinderExample.cpp new file mode 100644 index 0000000..cb597cd --- /dev/null +++ b/Legacy/Aria/examples/lineFinderExample.cpp @@ -0,0 +1,103 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example lineFinderExample.cpp Simple example of Aria's line-finder utility, + * which uses data from a laser rangefinder to detect a continues line of + * points. + * + * This example program will constantly search for a line-like pattern in the + * sensor readings of a laser rangefinder. If you press the 'f' key, those + * points will be saved in 'points' and 'lines' files. Use arrow keys or + * joystick to teleoperate the robot. + */ + +int main(int argc, char **argv) +{ + Aria::init(); + + ArSimpleConnector connector(&argc, argv); + ArRobot robot; + ArSick sick; + + if (!Aria::parseArgs() || argc > 1) + { + Aria::logOptions(); + Aria::exit(1); // exit program with error code 1 + return 1; + } + + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + robot.attachKeyHandler(&keyHandler); + + + robot.addRangeDevice(&sick); + + // Create the ArLineFinder object. Set it to log lots of information about its + // processing. + ArLineFinder lineFinder(&sick); + lineFinder.setVerbose(true); + + // Add key callbacks that simply call the ArLineFinder::getLinesAndSaveThem() + // function, which searches for lines in the current set of laser sensor + // readings, and saves them in files with the names 'points' and 'lines'. + ArFunctorC findLineCB(&lineFinder, + &ArLineFinder::getLinesAndSaveThem); + keyHandler.addKeyHandler('f', &findLineCB); + keyHandler.addKeyHandler('F', &findLineCB); + + + ArLog::log(ArLog::Normal, "lineFinderExample: connecting to robot..."); + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); // exit program with error code 1 + return 1; + } + robot.runAsync(true); + + // now set up the laser + ArLog::log(ArLog::Normal, "lineFinderExample: connecting to SICK laser..."); + connector.setupLaser(&sick); + sick.runAsync(); + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::exit(1); + return 1; + } + + printf("If you press the 'f' key the points and lines found will be saved\n"); + printf("Into the 'points' and 'lines' file in the current working directory\n"); + + robot.waitForRunExit(); + Aria::exit(0); + return 0; +} + + + diff --git a/Legacy/Aria/examples/moduleExample.cpp b/Legacy/Aria/examples/moduleExample.cpp new file mode 100644 index 0000000..32f92e6 --- /dev/null +++ b/Legacy/Aria/examples/moduleExample.cpp @@ -0,0 +1,103 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example moduleExample.cpp Example demonstrating how to load an ArModule + * + This is a simple program that loads the module moduleExample_Mod, which is + defined in moduleExample_Mod.cpp. The + program simply calls ArModuleLoader::load() with a short message + argument and ArModuleLoader::reload with no argument and finally + calls ArModuleLoader::close(). The return status of the load(), + reload(), and close() are checked and printed out. + ArModuleLoader uses the name of the module file without the platform-specific + suffix (i.e. ".dll" on Windows and ".so" on Linux) to load the module. + + @sa moduleExample_Mod.cpp. + @sa ArModuleLoader in the reference manual. +*/ + + +void printStatus(ArModuleLoader::Status status) +{ + if (status == ArModuleLoader::STATUS_ALREADY_LOADED) + ArLog::log(ArLog::Terse, "moduleExample: Module already loaded."); + else if (status == ArModuleLoader::STATUS_FAILED_OPEN) + ArLog::log(ArLog::Terse, "moduleExample: Failed to find or open the simpleMod module."); + else if (status == ArModuleLoader::STATUS_INVALID) + ArLog::log(ArLog::Terse, "moduleExample: Invalid file."); + else if (status == ArModuleLoader::STATUS_INIT_FAILED) + ArLog::log(ArLog::Terse, "moduleExample: Module Init failed."); + else if (status == ArModuleLoader::STATUS_SUCCESS) + ArLog::log(ArLog::Terse, "moduleExample: Module succedded."); + else if (status == ArModuleLoader::STATUS_EXIT_FAILED) + ArLog::log(ArLog::Terse, "moduleExample: Module exit sequence failed."); + else if (status == ArModuleLoader::STATUS_NOT_FOUND) + ArLog::log(ArLog::Terse, "moduleExample: Module not found."); + else + ArLog::log(ArLog::Terse, "moduleExample: Module returned unknown status!"); + ArLog::log(ArLog::Terse, ""); +} + +int main(int argc, char **argv) +{ + + Aria::init(); + + ArArgumentParser parser(&argc, argv); + // set up our simple connector + ArSimpleConnector simpleConnector(&parser); + ArRobot robot; + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + } + + robot.runAsync(true); + + ArModuleLoader::Status status; + std::string str; + + ArLog::log(ArLog::Terse, "moduleExample: Loading the module \"moduleExample_Mod\" with a string argument..."); + status=ArModuleLoader::load("./moduleExample_Mod", &robot, (char *)"You've loaded a module!"); + printStatus(status); + //ArLog::log(ArLog::Terse, "moduleExample: Reloading the module with no argument..."); + //status=ArModuleLoader::reload("./moduleExample_Mod", &robot); + //printStatus(status); + + //ArLog::log(ArLog::Terse, "moduleExample: Closing the module..."); + //status=ArModuleLoader::close("./moduleExample_Mod"); + //printStatus(status); + + ArUtil::sleep(3000); + + Aria::exit(0); + return(0); +} diff --git a/Legacy/Aria/examples/moduleExample.vcproj b/Legacy/Aria/examples/moduleExample.vcproj new file mode 100644 index 0000000..5f4760c --- /dev/null +++ b/Legacy/Aria/examples/moduleExample.vcproj @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/moduleExample_Mod.cpp b/Legacy/Aria/examples/moduleExample_Mod.cpp new file mode 100644 index 0000000..a5808c3 --- /dev/null +++ b/Legacy/Aria/examples/moduleExample_Mod.cpp @@ -0,0 +1,85 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example moduleExample_Mod.cpp + * @brief Example demonstrating how to implement a module with ArModule + * + This is a simple example of how to define a module of code that Aria's ArModuleLoader class can dynamically load at runtime. + On Windows, loadable modules are DLL files. On Linux, they are shared object (.so) + files (ARIA's Makefiles can compile any source file ending in "Mod.cpp" into + a .so, so to build this module, run "make moduleExample_Mod.so"). + ArModuleLoader knows about these platform conventions, so only the base name + (without the .dll or .so suffix) is used to load it. + To implement a loadable module, you derive a class from ArModule, + instantiate the pure virtual functions init() and exit(), and create an + instance of that class. The two functions simply print out the equivalent + of Hello World. An important part is the global instance of the class + and the call to the macro ARDEF_MODULE(). Without that macro invocation, + Aria will never be able to invoke those two functions. + + The program moduleExample.cpp is designed to load this module and check the + error return. + + @sa moduleExample.cpp. + @sa ArModule in the reference manual. +*/ + + +class SimpleMod : public ArModule +{ +public: + + bool init(ArRobot *robot, void *argument = NULL); + bool exit(); +}; + +SimpleMod aModule; +ARDEF_MODULE(aModule); + +bool SimpleMod::init(ArRobot *robot, void *argument) +{ + ArLog::log(ArLog::Terse, "module: init(%p) called in the loaded module!", robot); + if (argument != NULL) + ArLog::log(ArLog::Terse, "module: Argument given to ArModuleLoader::load was the string '%s'.", + (char *)argument); + else + ArLog::log(ArLog::Terse, "module: No argument was given to ArModuleLoader (this is OK)."); + + // Do stuff here... + + return(true); +} + +bool SimpleMod::exit() +{ + ArLog::log(ArLog::Terse, "module: exit() called."); + + // Do stuff here... + + return(true); +} diff --git a/Legacy/Aria/examples/moduleExample_Mod.vcproj b/Legacy/Aria/examples/moduleExample_Mod.vcproj new file mode 100644 index 0000000..c8e2c2d --- /dev/null +++ b/Legacy/Aria/examples/moduleExample_Mod.vcproj @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/mtxIO.cpp b/Legacy/Aria/examples/mtxIO.cpp new file mode 100644 index 0000000..795c4b7 --- /dev/null +++ b/Legacy/Aria/examples/mtxIO.cpp @@ -0,0 +1,159 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include "ArMTXIO.h" + +/** @example mtxIO.cpp Sets patterns on digital outputs and acts on digital + * inputs. Attach LEDs to the outputs and buttons to the digital inputs to + * use. (See the Pioneer LX manual and robots.mobilerobots.com for more + * details.) + * The 'mtx' Linux kernel module must be loaded, and the /dev/mtx character + * device must have been created (see mtxIODriver documentation). You must + * have read/write access to /dev/mtx. + */ + +void printBits(unsigned short c) { + int i; + for (i=0; i < 16; i++) { + if (i == 8) { + ArLog::log(ArLog::Normal, " "); + } + if (0x8000 & (c << i)) { + ArLog::log(ArLog::Normal, "1"); + } + else { + ArLog::log(ArLog::Normal, "0"); + } + } + ArLog::log(ArLog::Normal, " (0x%04x) ", c); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "mtxIO: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "mtxIO: Connected."); + robot.comInt(ArCommands::JOYINFO, 0); + + ArMTXIO mtxIO; + + if(!mtxIO.isEnabled()) + { + ArLog::log(ArLog::Terse, "mtxIO: Error opening MTX IO device interface!"); + Aria::exit(4); + } + + robot.runAsync(true); + + unsigned char out = 1; + while(true) + { + mtxIO.lock(); + + // print state of inputs + unsigned char inp; + mtxIO.getDigitalInputMon1(&inp); + printBits(inp); + mtxIO.getDigitalInputMon2(&inp); + printBits(inp); + + + +/* shouldn't be neccesary + unsigned char cur; + + // get current state + if(!mtxIO.getDigitalOutputControl1(&cur)) + { + ArLog::log(ArLog::Terse, "mtxIO: Error getting current state of output control 1"); + mtxIO.unlock(); + Aria::exit(2); + } +*/ + + // set new state on both output banks + + if(!mtxIO.setDigitalOutputControl1(&out)) + { + ArLog::log(ArLog::Terse, "mtxIO: Error setting state of output control 1"); + mtxIO.unlock(); + Aria::exit(3); + } + + if(!mtxIO.setDigitalOutputControl2(&out)) + { + ArLog::log(ArLog::Terse, "mtxIO: Error setting state of output control 2"); + mtxIO.unlock(); + Aria::exit(3); + } + + // wait + mtxIO.unlock(); + ArUtil::sleep(500); + + // shift + + out = out << 1; + if(out == 0) out = 1; + + } + + + Aria::exit(0); + + // wait + mtxIO.unlock(); + ArUtil::sleep(500); + + // shift + out = out << 1; + if(out == 0) out = 1; + } + + + Aria::exit(0); + +} diff --git a/Legacy/Aria/examples/mtxLCDDisplay.cpp b/Legacy/Aria/examples/mtxLCDDisplay.cpp new file mode 100644 index 0000000..59634a2 --- /dev/null +++ b/Legacy/Aria/examples/mtxLCDDisplay.cpp @@ -0,0 +1,86 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example mtxLCDDisplay.cpp Display text on the MTX LCD display */ + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "mtxLCDDisplay: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + robot.comInt(ArCommands::JOYINFO, 0); + + robot.runAsync(true); // ArLCDMTX uses an ArRobot task to communicate with the LCD. + + ArLCDMTX* lcd = robot.findLCD(1); + if(!lcd) + { + ArLog::log(ArLog::Normal, "Not connected to an LCD display. Use --help for options to customize nonstandard LCD connections."); + Aria::exit(2); + } + + lcd->setMainStatus("Hello, world."); + lcd->setTextStatus("text status"); + +#if 0 + for(unsigned char i = 0; i < 100; i += 10) + { + ArUtil::sleep(200); + lcd->setSystemMeters(i, i); + } + for(unsigned char i = 100; i >= 0; i -= 10) + { + ArUtil::sleep(200); + lcd->setSystemMeters(i, i); + } +#endif + + robot.waitForRunExit(); + + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/mtxPowerControl.cpp b/Legacy/Aria/examples/mtxPowerControl.cpp new file mode 100644 index 0000000..5a29f89 --- /dev/null +++ b/Legacy/Aria/examples/mtxPowerControl.cpp @@ -0,0 +1,114 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include "ArMTXIO.h" + +/** @example mtxPowerControl.cpp Shows how to turn power outputs on and off on + * MTX. + * The 'mtx' Linux kernel module must be loaded, and the /dev/mtx character + * device must have been created (see mtxPowerControlDriver documentation). You must + * have read/write access to /dev/mtx. + */ + +void testPower(ArMTXIO& io, const char* name, int bank, int bit, const char *conndesc) +{ + io.lock(); + ArLog::log(ArLog::Terse, "mtxPowerControl: Turning on %s (bank %d bit %d) for 3 seconds. This is at connector %s", name, bank, bit, conndesc); + io.setPowerOutput(bank, bit, true); + io.unlock(); + ArUtil::sleep(3000); + io.lock(); + ArLog::log(ArLog::Terse, "mtxPowerControl: Turning off %s.", name); + io.setPowerOutput(bank, bit, false); + io.unlock(); + ArUtil::sleep(3000); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "mtxPowerControl: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "mtxPowerControl: Connected."); + robot.comInt(ArCommands::JOYINFO, 0); + + ArMTXIO io; + + if(!io.isEnabled()) + { + ArLog::log(ArLog::Terse, "mtxPowerControl: Error opening MTX IO device interface!"); + Aria::exit(4); + } + + robot.runAsync(true); + + // Note that bank and bits are 0-indexed, so 1 is subtracted here to effect + // that. + testPower(io, "Aux_5V_Out", 3-1, 1-1, "AUX POWER pin #4"); + testPower(io, "Aux_12V_Out", 3-1, 2-1, "AUX POWER pin #5"); + testPower(io, "Aux_20V_Out", 3-1, 3-1, "AUX POWER pin #6"); + testPower(io, "Aux_24V_Raw_1", 2-1, 5-1, "USER POWER pin #7"); + testPower(io, "Aux_24V_Raw_2", 2-1, 6-1, "USER POWER pin #8"); + testPower(io, "Aux_24V_Raw_3_4", 2-1, 7-1, "USER POWER pins 9, 10 (no estop), 11, 12 with estop)"); + + + // You can control power to robot components as well. See manual for more + // info. + // LRF power is bank 1 bit 3 + // Wheel lights is bank 1 bit 6 + // Sonar 1 power is bank 1 bit 7 + // Sonar 2 power is bank 1 bit 8 + // Audio amp. is bank 3 bit 5 + // USB 1+2 is Bank 2 bit 1 (USB12_5V_SW on AUX SENSORS pin 9, and on USB connectors 1 and 2) + // USB 3 is Bank 2 bit 2 (USB3_5V_SW on AUX SENSORS pin 14, and on USB connector 3) + // Aux laser 1 power is bank 2 bit 3 (vert) (Vertical_Laser_Power, AUX SENSORS pins 5 and 10) + // Aux laser 2 power is bank 2 bit 4 (foot) (Foot_Laser_Power, AUX SENSORS pin 15 + + + + ArLog::log(ArLog::Terse, "mtxPowerControl: Exit"); + Aria::exit(0); + +} diff --git a/Legacy/Aria/examples/mtxWheelLights.cpp b/Legacy/Aria/examples/mtxWheelLights.cpp new file mode 100644 index 0000000..72a80ee --- /dev/null +++ b/Legacy/Aria/examples/mtxWheelLights.cpp @@ -0,0 +1,106 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example mtxWheelLights.cpp Shows possible MTX wheel lamp states */ + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "mtxWheelLights: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "mtxWheelLights: Connected."); + robot.runAsync(true); + + struct { + ArTypes::UByte pattern; + ArTypes::Byte value; + ArTypes::UByte flags; + ArTypes::UByte flags2; + } lamp; + + lamp.value = 0; + lamp.flags = 0; + lamp.flags2 = 0; + + const int sleeptime = 3000; + + for(lamp.pattern = 1; lamp.pattern <= 10; ++(lamp.pattern)) + { + ArLog::log(ArLog::Normal, "mtxWheelLights: pattern %d...", lamp.pattern); + robot.comDataN(ArCommands::WHEEL_LIGHT, (const char*)&lamp, 4); + ArUtil::sleep(sleeptime); + + if(lamp.pattern == 6) + { + for(lamp.value = 0; lamp.value <= 100; lamp.value += 10) + { + ArLog::log(ArLog::Normal, "mtxWheelLights: pattern %d with value %d...", lamp.pattern, lamp.value); + robot.comDataN(ArCommands::WHEEL_LIGHT, (const char*)&lamp, 4); + ArUtil::sleep(sleeptime); + } + lamp.value = 0; + } + else + { + lamp.value = 50; + ArLog::log(ArLog::Normal, "mtxWheelLights: patterd %d with value 50...", lamp.pattern); + robot.comDataN(ArCommands::WHEEL_LIGHT, (const char*)&lamp, 4); + ArUtil::sleep(sleeptime); + lamp.value = 0; + } + + + ArLog::log(ArLog::Normal, "mtxWheelLights: pattern %d with warning flag...", lamp.pattern); + lamp.flags |= ArUtil::BIT1; + robot.comDataN(ArCommands::WHEEL_LIGHT, (const char*)&lamp, 4); + ArUtil::sleep(sleeptime); + lamp.flags = 0; + } + + ArLog::log(ArLog::Normal, "mtxWheelLights: Exiting."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/netServerExample-vc2003.vcproj b/Legacy/Aria/examples/netServerExample-vc2003.vcproj new file mode 100644 index 0000000..daeb328 --- /dev/null +++ b/Legacy/Aria/examples/netServerExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/netServerExample-vc2008.vcproj b/Legacy/Aria/examples/netServerExample-vc2008.vcproj new file mode 100644 index 0000000..35263cd --- /dev/null +++ b/Legacy/Aria/examples/netServerExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/netServerExample-vc2010.vcxproj b/Legacy/Aria/examples/netServerExample-vc2010.vcxproj new file mode 100644 index 0000000..f020c26 --- /dev/null +++ b/Legacy/Aria/examples/netServerExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + netServerExample + {806CF3BE-8A4D-4C32-8574-58F3E85CA08C} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/netServerSimple.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/netServerSimple.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/netServerExample.cpp b/Legacy/Aria/examples/netServerExample.cpp new file mode 100644 index 0000000..350b78f --- /dev/null +++ b/Legacy/Aria/examples/netServerExample.cpp @@ -0,0 +1,91 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example netServerExample.cpp Shows how to use ArNetServer, a simple text + * command receiver + */ + +// To use the net server, start this program, then use the 'telnet' program to connect to localhost +// on TCP port 7171 by running this command: +// telnet localhost 7171 +// When connected and prompted for a password, type in: +// password +// and press enter. Then you can enter a command. Use the 'help' command to print available commands. +// For this program, try "test" and "test2" with and without additional arguments. +// ArNetServer is a simple way to provide a quick remote control interface for a robot control +// program running on the robot's onboard computer over wireless networking, if you don't want to +// use the ArNetworking library and MobileEyes. (You can provide both options in a program however, +// ArNetworking and ArNetServer use different TCP ports and will both run fine in the same program.) + +// This function just prints out what the client entered and then sends some +// data back. You could modify it to, for example, control the robot with +// different commands. +void test(char **argv, int argc, ArSocket *socket) +{ + int i; + printf("Client said: "); + for (i = 0; i < argc; ++i) + printf("\t%s\n", argv[i]); + printf("\n"); + socket->writeString("Thank you, command received."); +} + + +int main(int argc, char **argv) +{ + // Initialize Aria + Aria::init(); + // we need a server + ArNetServer server; + // a callback for our test function + ArGlobalFunctor3 testCB(&test); + + // start the server up without a robot on port 7171 with a password + // of password and allow multiple clients + if (!server.open(NULL, 7171, "password", true)) + { + printf("Could not open server.\n"); + Aria::exit(1); + return 1; + } + + // add our test command + server.addCommand("test", &testCB, "this simply prints out the command given on the server"); + server.addCommand("test2", &testCB, "this simply prints out the command given on the server"); + + //server.setLoggingDataSent(true); + //server.setLoggingDataReceived(true); + // run while the server is running + while (server.isOpen() && Aria::getRunning()) + { + server.runOnce(); + ArUtil::sleep(1); + } + server.close(); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/robotConnectionCallbacks.cpp b/Legacy/Aria/examples/robotConnectionCallbacks.cpp new file mode 100644 index 0000000..9839c3e --- /dev/null +++ b/Legacy/Aria/examples/robotConnectionCallbacks.cpp @@ -0,0 +1,144 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example robotConnectionCallbacks.cpp Demonstrates how callbacks can be registered with ArRobot to be + * called when a connection succeeds or fails. +*/ + +/* + This class contains the methods called by the connection callback functors. +*/ +class ConnHandler +{ +public: + // Constructor + ConnHandler(ArRobot *robot); + + // Destructor, its just empty + ~ConnHandler(void) {} + + // called if the connection was sucessfully made + void connected(void); + + // called if the connection failed. stop the robot processing thread. + void connectionFailed(void); + + // called when the connection is closed + void disconnected(void); + + // called if the connection is lost due to an error + void connectionLost(void); + +protected: + // keep a robot pointer + ArRobot *myRobot; + + // the functor callbacks + ArFunctorC myConnectedCB; + ArFunctorC myConnFailCB; + ArFunctorC myDisconnectedCB; + ArFunctorC myConnLostCB; +}; + +/* ConnHandler constructor. Initialize functor objects, then + * add them as connection handler callbacks with the robot object. +*/ +ConnHandler::ConnHandler(ArRobot *robot) : + myConnectedCB(this, &ConnHandler::connected), + myConnFailCB(this, &ConnHandler::connectionFailed), + myDisconnectedCB(this, &ConnHandler::disconnected), + myConnLostCB(this, &ConnHandler::connectionLost) + +{ + // keep a robot pointer for use by the handler callback methods + myRobot = robot; + + // add the callbacks to the robot + myRobot->addConnectCB(&myConnectedCB, ArListPos::FIRST); + myRobot->addFailedConnectCB(&myConnFailCB, ArListPos::FIRST); + myRobot->addDisconnectNormallyCB(&myDisconnectedCB, ArListPos::FIRST); + myRobot->addDisconnectOnErrorCB(&myDisconnectedCB, ArListPos::FIRST); +} + +// just exit if the connection failed +void ConnHandler::connectionFailed(void) +{ + ArLog::log(ArLog::Normal, "ConnHandler: Connection failed. Exiting the program."); + Aria::exit(1); +} + +void ConnHandler::connected(void) +{ + ArLog::log(ArLog::Normal, "ConnHandler: Connected. Turning off sonar,"); + // turn off sonar, turn off amigobot sounds + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +// disconnected +void ConnHandler::disconnected(void) +{ + ArLog::log(ArLog::Normal, "ConnHandler: Connection closed. Exiting the program."); + Aria::exit(0); +} + +// lost connection due to errror, exit +void ConnHandler::connectionLost(void) +{ + ArLog::log(ArLog::Normal, "ConnHandler: Lost connection due to an error! Exiting the program!"); + Aria::exit(1); +} + + + +int main(int argc, char **argv) +{ + Aria::init(); + ArRobot robot; + ArArgumentParser argParser(&argc, argv); + ArSimpleConnector con(&argParser); + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + return 1; + } + + // Create a connection handler object, defined above, then try to connect to the + // robot. + ConnHandler ch(&robot); + con.connectRobot(&robot); + robot.runAsync(true); + + // Sleep for 10 seconds, then request that ArRobot stop its thread. + ArLog::log(ArLog::Normal, "Sleeping for 10 seconds..."); + ArUtil::sleep(10000); + ArLog::log(ArLog::Normal, "...requesting that the robot thread exit, then shutting down ARIA and exiting."); + robot.stopRunning(); + Aria::exit(0); + return 0; +} + diff --git a/Legacy/Aria/examples/robotSyncTaskExample-vc2003.vcproj b/Legacy/Aria/examples/robotSyncTaskExample-vc2003.vcproj new file mode 100644 index 0000000..7d3a58e --- /dev/null +++ b/Legacy/Aria/examples/robotSyncTaskExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/robotSyncTaskExample-vc2008.vcproj b/Legacy/Aria/examples/robotSyncTaskExample-vc2008.vcproj new file mode 100644 index 0000000..e0e0168 --- /dev/null +++ b/Legacy/Aria/examples/robotSyncTaskExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/robotSyncTaskExample-vc2010.vcxproj b/Legacy/Aria/examples/robotSyncTaskExample-vc2010.vcxproj new file mode 100644 index 0000000..c48c67f --- /dev/null +++ b/Legacy/Aria/examples/robotSyncTaskExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + robotSyncTaskExample + {69571F42-5098-41FB-B8A8-19ECCCDB9BB3} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/simpleUserTask.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/simpleUserTask.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/robotSyncTaskExample.cpp b/Legacy/Aria/examples/robotSyncTaskExample.cpp new file mode 100644 index 0000000..57474c0 --- /dev/null +++ b/Legacy/Aria/examples/robotSyncTaskExample.cpp @@ -0,0 +1,130 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example robotSyncTaskExample.cpp Shows how to add a task callback to ArRobot's synchronization/processing cycle + + A sensor interpretation task callback is invoked + by the ArRobot object every cycle as it runs, which records the robot's current + pose and velocity. + + Note that tasks must take a small amount of time to execute, to avoid delaying the + robot cycle. +*/ + +class PrintingTask +{ +public: + // Constructor. Adds our 'user task' to the given robot object. + PrintingTask(ArRobot *robot); + + // Destructor. Removes our user task from the robot + ~PrintingTask(void); + + // This method will be called by the callback functor + void doTask(void); +protected: + ArRobot *myRobot; + + // The functor to add to the robot for our 'user task'. + ArFunctorC myTaskCB; +}; + + +// the constructor (note how it uses chaining to initialize myTaskCB) +PrintingTask::PrintingTask(ArRobot *robot) : + myTaskCB(this, &PrintingTask::doTask) +{ + myRobot = robot; + // just add it to the robot + myRobot->addSensorInterpTask("PrintingTask", 50, &myTaskCB); +} + +PrintingTask::~PrintingTask() +{ + myRobot->remSensorInterpTask(&myTaskCB); +} + +void PrintingTask::doTask(void) +{ + // print out some info about the robot + printf("\rx %6.1f y %6.1f th %6.1f vel %7.1f mpacs %3d", myRobot->getX(), + myRobot->getY(), myRobot->getTh(), myRobot->getVel(), + myRobot->getMotorPacCount()); + fflush(stdout); + + // Need sensor readings? Try myRobot->getRangeDevices() to get all + // range devices, then for each device in the list, call lockDevice(), + // getCurrentBuffer() to get a list of recent sensor reading positions, then + // unlockDevice(). +} + +int main(int argc, char** argv) +{ + // the connection + ArSimpleConnector con(&argc, argv); + if(!con.parseArgs()) + { + con.logOptions(); + return 1; + } + + // robot + ArRobot robot; + + // sonar array range device + ArSonarDevice sonar; + + // This object encapsulates the task we want to do every cycle. + // Upon creation, it puts a callback functor in the ArRobot object + // as a 'user task'. + PrintingTask pt(&robot); + + // initialize aria + Aria::init(); + + // add the sonar object to the robot + robot.addRangeDevice(&sonar); + + // open the connection to the robot; if this fails exit + if(!con.connectRobot(&robot)) + { + printf("Could not connect to the robot.\n"); + return 2; + } + printf("Connected to the robot. (Press Ctrl-C to exit)\n"); + + + // Start the robot process cycle running. Each cycle, it calls the robot's + // tasks. When the PrintingTask was created above, it added a new + // task to the robot. 'true' means that if the robot connection + // is lost, then ArRobot's processing cycle ends and this call returns. + robot.run(true); + + printf("Disconnected. Goodbye.\n"); + + return 0; +} diff --git a/Legacy/Aria/examples/seekurPower.cpp b/Legacy/Aria/examples/seekurPower.cpp new file mode 100644 index 0000000..1e34ee0 --- /dev/null +++ b/Legacy/Aria/examples/seekurPower.cpp @@ -0,0 +1,189 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example seekurPower.cpp Control Seekur or Seekur Jr. accessory power + * switching from command line options. Run with -help for help on command + * line options. See robot manuals and notes on http://robots.mobilerobots.com + * for more information. + */ + +typedef struct { + const char *option; + int port; + const char *description; + int set; +} powerspec; + +powerspec PowerSpecs[] = { + {"pc2", 1, "Turn onboard computer #2 on or off.", 0}, + {"pc3", 13, "Turn onboard computer #3 on or off.", 0}, + {"pc4", 14, "Turn onboard computer #4 on or off", 0}, + {"pc5", 15, "Turn onboard computer #5 on or off.", 0}, + {"lrf1", 9, "Turn laser rangefinder #1 on or off.", 0}, + {"lrf2", 24, "Turn laser rangefinder #2 on or off.", 0}, + {"lrf1heat", 11, "Turn laser rangefinder #1's heater on or off.", 0}, + {"lrf2heat", 27, "Turn laser rangefinder #2's heater on or off.", 0}, + {"gps", 6, "Turn GPS receeiver on or off.", 0}, + {"poe", 4, "Turn 12V Power over Ethernet port on or off.", 0}, + {"lan", 5, "Turn internal LAN ethernet switch on or off.", 0}, + {"camera", 12, "Turn the 24V RVision camera on or off.", 0}, + {"rvision", 12, "Turn the 24V RVision camera on or off.", 0}, + {"ptu1", 9, "Turn pan/tilt unit #1 on or off.", 0}, + {"ptu2", 22, "Turn pan/tilt unit #2 on or off.", 0}, + {"ptu3", 23, "Turn pan/tilt unit #3 on or off.", 0}, + {"arm", 29, "Turn the 24V manipulator arm on or off.", 0}, + {"armcam", 7, "Turn the arm camera or other 12V arm accessories on or off.", 0} +}; + +int main(int argc, char **argv) +{ + int numPowerSpecs = sizeof(PowerSpecs)/sizeof(powerspec); + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "seekurPower: Error: Could not connect to the robot."); + Aria::logOptions(); + Aria::exit(1); + } + + if (!Aria::parseArgs() || parser.checkArgument("help")) + { + Aria::logOptions(); + ArLog::log(ArLog::Terse, "Options for seekurPower command (your robot may not have some of these devices):"); + ArLog::log(ArLog::Terse, "- \t\tTurn port on or off, or reset by turning off then on again. Refer to robot documentation or http://robots.mobilerobots.com/wiki/Seekur_Switched_Power_Outputs for list and notes."); + for(int i = 0; i < numPowerSpecs; ++i) + ArLog::log(ArLog::Terse, "-%s \t\t%s (port %d)", PowerSpecs[i].option, PowerSpecs[i].description, PowerSpecs[i].port); + ArLog::log(ArLog::Terse, "-robotOff\t\tTurn whole robot off"); + Aria::exit(2); + } + + if(parser.checkArgument("-robotOff")) + { + ArLog::log(ArLog::Terse, "-robotOff given -- powering down entire robot with command #119 in 5 seconds..."); + for(int i = 5; i > 0; --i) + { + ArLog::log(ArLog::Terse, "Shutting down in %d seconds...", i); + ArUtil::sleep(1000); + } + robot.com(119); + Aria::exit(0); + } + + + std::list todo; + + int nargs = parser.getArgc(); + for(int argi = 1; argi < nargs; ++argi) + { + const char *opt = parser.getArg(argi); + if(opt[0] != '-') + { + ArLog::log(ArLog::Terse, "seekurPower: Error: invalid option %s. Use -help for list of options.", opt); + Aria::exit(4); + } + ++opt; + if(opt[0] == '-') + ++opt; + bool found = false; + if(argi == nargs-1) // option given as last argument, with no value + { + ArLog::log(ArLog::Terse, "seekurPower: Error: Missing argument to last option %s. Specify on, off or reset.", opt); + Aria::exit(7); + } + const char *val = parser.getArg(++argi); + for(int pi = 0; pi < numPowerSpecs; ++pi) + { + powerspec ps = PowerSpecs[pi]; + if(strcmp(opt, ps.option) == 0) + { + found = true; + if(strcmp(val, "on") == 0) + ps.set = 1; + else if(strcmp(val, "off") == 0) + ps.set = 0; + else if(strcmp(val, "reset") == 0) + ps.set = 2; + else + { + ArLog::log(ArLog::Terse, "seekurPower: Error: Invalid value '%s' for option %s. Use on, off or reset.", val, opt); + Aria::exit(6); + } + todo.push_back(ps); + break; + } + } + if(!found) + { + if(ArUtil::isOnlyNumeric(opt)) + { + found = true; + powerspec ps; + ps.option = opt; + ps.description = NULL; + ps.port = atoi(opt); + if(strcmp(val, "on") == 0) + ps.set = 1; + else if(strcmp(val, "off") == 0) + ps.set = 0; + else if(strcmp(val, "reset") == 0) + ps.set = 2; + todo.push_back(ps); + } + } + if(!found) + { + ArLog::log(ArLog::Terse, "seekurPower: Warning: unrecognized option %s. Use -help for list of options.", opt); + } + } + + + for(std::list::const_iterator i = todo.begin(); i != todo.end(); ++i) + { + powerspec ps = *i; + if(ps.set == 2) + { + ArLog::log(ArLog::Normal, "seekurPower: Switching %s (port %d) off, waiting 2 seconds., then switching it back on again...", ps.option, ps.port); + robot.com2Bytes(116, ps.port, 0); + ArUtil::sleep(2000); + robot.com2Bytes(116, ps.port, 1); + } + else + { + ArLog::log(ArLog::Normal, "seekurPower: Switching %s (port %d) %s...", ps.option, ps.port, ps.set?"on":"off"); + robot.com2Bytes(116, ps.port, ps.set); + } + } + + + Aria::exit(0); +} + diff --git a/Legacy/Aria/examples/sickLogger-vc2003.vcproj b/Legacy/Aria/examples/sickLogger-vc2003.vcproj new file mode 100644 index 0000000..38f878d --- /dev/null +++ b/Legacy/Aria/examples/sickLogger-vc2003.vcproj @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/sickLogger-vc2008.vcproj b/Legacy/Aria/examples/sickLogger-vc2008.vcproj new file mode 100644 index 0000000..e902540 --- /dev/null +++ b/Legacy/Aria/examples/sickLogger-vc2008.vcproj @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/sickLogger-vc2010.vcxproj b/Legacy/Aria/examples/sickLogger-vc2010.vcxproj new file mode 100644 index 0000000..90866a7 --- /dev/null +++ b/Legacy/Aria/examples/sickLogger-vc2010.vcxproj @@ -0,0 +1,286 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + sickLogger + {F2F3B4A0-9CDF-494F-B7B8-9442EBB6BA5F} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10-$(PlatformShortName)/ + ../obj/$(ProjectName)-$(Configuration)-VC10-$(PlatformShortName)/ + false + false + .\../bin\ + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10-$(PlatformShortName)/ + ../obj/$(ProjectName)-$(Configuration)-VC10-$(PlatformShortName)/ + false + false + $(ProjectName).DebugVC10 + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/sickLogger.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC9.lib + $(OutDir)$(ProjectName)DebugVC10.exe + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/sickLogger.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC9.lib + $(OutDir)$(ProjectName)DebugVC10.exe + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/sickLogger.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + Sync + Default + MultiThreadedDLL + false + false + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + $(OutDir)$(ProjectName)VC10.exe + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/sickLogger.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + Sync + Default + MultiThreadedDLL + false + false + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + $(OutDir)$(ProjectName)VC10.exe + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/sickLogger.cpp b/Legacy/Aria/examples/sickLogger.cpp new file mode 100644 index 0000000..b419b7b --- /dev/null +++ b/Legacy/Aria/examples/sickLogger.cpp @@ -0,0 +1,151 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* +This program will let you joystick the robot around, and take logs for +the mapper while you drive, automatically... + +Control: + +Attach an analog joystick to the joyport on the robot, not on the +computer. Now calibrate the joystick: Leaving the stick centered, +press the trigger button for a second or so, then release it. Now +rotate the stick around its extremes two or three times, holding it in +each corner for a second or two. You are now ready to drive. You can +then drive the robot by holding the trigger and moving the joystick. +To make goals you can press the top button on the joystick (this +requires AROS1_5). + +You could also attach USB joystick attached to robot computer (this +depends on having a robot equiped with an accessible usb port): To +drive the robot just press the trigger button and then move the +joystick how you wish the robot to move. You can use the throttle on +the side of the joystick to control the maximum (and hence scaled) +speed at which the robot drives. To make a goal you can press any of +the other buttons on the joystick itself (button 2, 3, or 4). + +You could run this with the keyboard, but not very versatile. Use the +arrow keys to control the robot, and press g to make a goal. +*/ + + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + ArAnalogGyro analogGyro(&robot); + + // Always connect to the laser, and add half-degree increment and 180 degrees as default arguments for + // laser + parser.addDefaultArgument("-connectLaser -laserDegrees 180 -laserIncrement half"); + + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "sickLagger: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + } + + if(!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + robot.attachKeyHandler(&keyHandler); + +#ifdef WIN32 + printf("Pausing 5 seconds so you can disconnect VNC if you are using it.\n"); + ArUtil::sleep(5000); +#endif + + + std::string filename = "1scans.2d"; + if (argc > 1) + filename = argv[1]; + printf("Logging to file %s\n", filename.c_str()); + + + + + ArActionGroupRatioDriveUnsafe group(&robot); + group.activateExclusive(); + + robot.runAsync(true); + + if(!laserConnector.connectLasers(false, false, true)) + { + ArLog::log(ArLog::Terse, "sickLogger: Error: Could not connect to laser(s). Use -help to list options."); + Aria::exit(3); + } + + + // Allow some time for first set of laser reading to arrive + ArUtil::sleep(500); + + + // enable the motors, disable amigobot sounds + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUND, 32); + robot.comInt(ArCommands::SOUNDTOG, 0); + // enable the joystick driving from the one connected to the microcontroller + robot.comInt(ArCommands::JOYDRIVE, 1); + + // Create the logging object + // This must be created after the robot and laser are connected so it can get + // correct parameters from them. + // The third argmument is how far the robot must travel before a new laser + // scan is logged. + // The fourth argument is how many degrees the robot must rotate before a new + // laser scan is logged. The sixth boolean argument is whether to place a goal + // when the g or G key is pressed (by adding a handler to the global + // ArKeyHandler) or when the robots joystick button is + // pressed. + ArLaser *laser = robot.findLaser(1); + if(!laser) + { + ArLog::log(ArLog::Terse, "sickLogger: Error, not connected to any lasers."); + Aria::exit(2); + } + ArLaserLogger logger(&robot, laser, 300, 25, filename.c_str(), true); + + // just hang out and wait for the end + robot.waitForRunExit(); + + Aria::exit(0); +} diff --git a/Legacy/Aria/examples/sickLoggerStatic-vc2003.vcproj b/Legacy/Aria/examples/sickLoggerStatic-vc2003.vcproj new file mode 100644 index 0000000..0d10061 --- /dev/null +++ b/Legacy/Aria/examples/sickLoggerStatic-vc2003.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/sickRobotExample.cpp b/Legacy/Aria/examples/sickRobotExample.cpp new file mode 100644 index 0000000..38a5da7 --- /dev/null +++ b/Legacy/Aria/examples/sickRobotExample.cpp @@ -0,0 +1,145 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This program connects to a robot, then to a laser, then prints out + some readings, and finally exits. +*/ + +int main(int argc, char **argv) +{ + // parse our args and make sure they were all accounted for + ArSimpleConnector connector(&argc, argv); + + // the robot + ArRobot robot; + // the laser + ArSick sick; + // all the information for our printing out + double dist, angle; + std::list *readings; + std::list::iterator it; + double farDist, farAngle; + bool found; + + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + Aria::exit(1); + return 1; + } + + // add the laser to the robot + robot.addRangeDevice(&sick); + + // try to connect, if we fail exit + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + return 1; + } + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + // now set up the laser + connector.setupLaser(&sick); + printf("filter threshold (distance to other readings) for current buffer is %0.2f mm\n", sick.getFilterNearDist()); + printf("timeout on current readings is %d sec. (0 means disabled).\n", sick.getMaxSecondsToKeepCurrent()); + + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + printf("Connected\n"); + ArUtil::sleep(500); + + int times = 0; + while (times++ < 3) + { + //dist = sick.getCurrentBuffer().getClosestPolar(-90, 90, ArPose(0, 0), 30000, &angle); + sick.lockDevice(); + + /* Current closest reading within a degree range */ + dist = sick.currentReadingPolar(-90, 90, &angle); + if (dist < sick.getMaxRange()) + printf("Closest reading %.2f mm away at %.2f degrees\n", dist, angle); + else + printf("No close reading.\n"); + + /* Print current buffer of reading positions (maybe filtered) */ + readings = sick.getCurrentBuffer(); + int i = 0; + for (it = readings->begin(), found = false; it != readings->end(); it++) + { + i++; + dist = (*it)->findDistanceTo(ArPose(0, 0)); + angle = (*it)->findAngleTo(ArPose(0, 0)); + if (!found || dist > farDist) + { + found = true; + farDist = dist; + farAngle = angle; + } + } + printf("%d readings in current buffer\n", i); + if (found) + printf("Furthest reading %.2f mm away at %.2f degrees\n", + farDist, farAngle); + else + printf("No far reading found.\n"); + + /* Print set of raw, unfiltered readings */ + int nign = 0; + printf("%lu raw readings.\n", sick.getRawReadings()->size()); + for(std::list::const_iterator ri = sick.getRawReadings()->begin(); ri != sick.getRawReadings()->end(); ++ri) + { + if((*ri)->getIgnoreThisReading()) { + ++nign; + } + } + printf("%d readings are being ignored (nothing detected at those angles)\n", nign); + + sick.unlockDevice(); + ArUtil::sleep(100); + + puts(""); + } + + Aria::exit(0); + return 0; +} + + + + diff --git a/Legacy/Aria/examples/sickTeleop-vc2003.vcproj b/Legacy/Aria/examples/sickTeleop-vc2003.vcproj new file mode 100644 index 0000000..47a0e80 --- /dev/null +++ b/Legacy/Aria/examples/sickTeleop-vc2003.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/sickTeleop-vc2008.vcproj b/Legacy/Aria/examples/sickTeleop-vc2008.vcproj new file mode 100644 index 0000000..abfc544 --- /dev/null +++ b/Legacy/Aria/examples/sickTeleop-vc2008.vcproj @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/sickTeleop.cpp b/Legacy/Aria/examples/sickTeleop.cpp new file mode 100644 index 0000000..8a2b70b --- /dev/null +++ b/Legacy/Aria/examples/sickTeleop.cpp @@ -0,0 +1,124 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This is an example of how to use the limiting actions. + + It requires a SICK laser. Use either a joystick or keyboard + to drive the robot. If the SICK laser detects obstacles, actions + slow down the robot as it approaches. + + The way it works is that it has a limiting behavior higher priority + than the joydrive and keydrive actions. So if the limiting behaviors + detect obstacles that are too close, they set speed limits proportional + to the distance that slow down the robot and eventually prevent the + joydrive and keydrive actions from having any effect on the robot. +*/ + + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + argParser.addDefaultArgument("-connectLaser"); // also by default always try to connect to the first laser. + + ArRobot robot; + ArRobotConnector robotConnector(&argParser, &robot); + ArLaserConnector laserConnector(&argParser, &robot, &robotConnector); + + ArActionJoydrive jdAct; + ArActionKeydrive keyAct; + + // limiter for close obstacles + ArActionLimiterForwards limiter("speed limiter near", 300, 600, 250); + + // limiter for far away obstacles + ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 400); + + // limiter that uses the IR sensors on a Peoplebot, if equipped + ArActionLimiterTableSensor tableLimiter; + + // limiter so we don't bump things backwards + ArActionLimiterBackwards backwardsLimiter; + + + if(!robotConnector.connectRobot()) + { + printf("Could not connect to robot... exiting\n"); + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + if(!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + printf("Could not connect to robot... exiting\n"); + Aria::logOptions(); + Aria::exit(2); + return 2; + } + + ArLog::log(ArLog::Normal, "Connected to robot."); + robot.runAsync(true); + + // laserConnector uses parameters from the robot parameter file(s) and from + // command line options to determine what kinds of lasers the robot has and + // how to connect to them. See the section on robot parameter files in the + // ARIA API Reference Manual, and the ArLaserConnector class documentation. + + if(!laserConnector.connectLasers()) + { + ArLog::log(ArLog::Terse, "Error connecting to configured lasers (see robot parameter file(s) and command line options)"); + Aria::exit(3); + return 3; + } + + // If laserConnector succeeded in connecting to lasers, ArLaser interface + // objects for them are stored in a + // list in the ArRobot object (robot). ArRobot can automatically use them in + // its utilities for checking range devices for obstacles, and you can query + // that list. (ArLaser is a subclass of ArRangeDevice.) + + // enable the motors, disable amigobot sounds + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions, use high priority numbers for the limitier actions. + robot.addAction(&tableLimiter, 100); + robot.addAction(&limiter, 95); + robot.addAction(&limiterFar, 90); + robot.addAction(&backwardsLimiter, 85); + robot.addAction(&keyAct, 51); + robot.addAction(&jdAct, 50); + + // wait for end of robot connection + robot.waitForRunExit(); + + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/simpleConnect-vc2003.vcproj b/Legacy/Aria/examples/simpleConnect-vc2003.vcproj new file mode 100644 index 0000000..1388a84 --- /dev/null +++ b/Legacy/Aria/examples/simpleConnect-vc2003.vcproj @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/simpleConnect-vc2008.vcproj b/Legacy/Aria/examples/simpleConnect-vc2008.vcproj new file mode 100644 index 0000000..58d53d8 --- /dev/null +++ b/Legacy/Aria/examples/simpleConnect-vc2008.vcproj @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/simpleConnect-vc2010.vcxproj b/Legacy/Aria/examples/simpleConnect-vc2010.vcxproj new file mode 100644 index 0000000..baef08d --- /dev/null +++ b/Legacy/Aria/examples/simpleConnect-vc2010.vcxproj @@ -0,0 +1,156 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + simpleConnect + {D6C8A2A9-C3E1-4F70-924D-BDEA60B4C667} + + + + Application + false + MultiByte + false + + + Application + false + MultiByte + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/simpleConnect.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/simpleConnect.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + true + true + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/simpleConnect.cpp b/Legacy/Aria/examples/simpleConnect.cpp new file mode 100644 index 0000000..4249777 --- /dev/null +++ b/Legacy/Aria/examples/simpleConnect.cpp @@ -0,0 +1,99 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example simpleConnect.cpp example showing how to connect to the robot with ArRobotConnector + * + * One of the simplest ARIA programs possible: + * Connects with ArRobotConnector, waits 3 seconds doing + * nothing, then exits. + * + * This program will work either with the MobileSim simulator or on a real + * robot's onboard computer. (Or use -remoteHost to connect to a wireless + * ethernet-serial bridge.) + */ + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + // Connect to the robot, get some initial data from it such as type and name, + // and then load parameter files for this robot. + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "simpleConnect: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + ArLog::log(ArLog::Normal, "simpleConnect: Connected."); + + robot.comInt(ArCommands::JOYINFO, 0); + + // Start the robot processing cycle running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + // Print out some data from the SIP. We must "lock" the ArRobot object + // before calling its methods, and "unlock" when done, to prevent conflicts + // with the background thread started by the call to robot.runAsync() above. + // See the section on threading in the manual for more about this. + robot.lock(); + ArLog::log(ArLog::Normal, "simpleConnect: Pose=(%.2f,%.2f,%.2f), Trans. Vel=%.2f, Battery=%.2fV", + robot.getX(), robot.getY(), robot.getTh(), robot.getVel(), robot.getBatteryVoltage()); + robot.unlock(); + + // Sleep for 3 seconds. + ArLog::log(ArLog::Normal, "simpleConnect: Sleeping for 3 seconds..."); + ArUtil::sleep(3000); + + + ArLog::log(ArLog::Normal, "simpleConnect: Ending robot thread..."); + robot.stopRunning(); + + // wait for the thread to stop + robot.waitForRunExit(); + + // exit + ArLog::log(ArLog::Normal, "simpleConnect: Exiting."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/simpleMotionCommands.cpp b/Legacy/Aria/examples/simpleMotionCommands.cpp new file mode 100644 index 0000000..74db62e --- /dev/null +++ b/Legacy/Aria/examples/simpleMotionCommands.cpp @@ -0,0 +1,168 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example simpleMotionCommands.cpp example showing how to connect and send + * basic motion commands to the robot + * + * ARIA provides two levels of robot motion control, direct motion commands, and + * actions. This example shows direct motion commands. See actionExample.cpp, + * actionGroupExample.cpp, and others for examples on how to use actions. + * Actions provide a more modular way of performing more complex motion + * behaviors than the simple imperitive style used here. + * + * See the ArRobot class documentation, as well as the overview of robot motion, + * for more information. + * + * WARNING: this program does no sensing or avoiding of obstacles, the robot WILL + * collide with any objects in the way! Make sure the robot has about 2-3 + * meters of free space around it before starting the program. + * + * This program will work either with the MobileSim simulator or on a real + * robot's onboard computer. (Or use -remoteHost to connect to a wireless + * ethernet-serial bridge.) + */ + +int main(int argc, char **argv) +{ + + Aria::init(); + ArRobot robot; + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + + ArLog::log(ArLog::Terse, "WARNING: this program does no sensing or avoiding of obstacles, the robot WILL collide with any objects in the way! Make sure the robot has approximately 3 meters of free space on all sides."); + + // ArRobotConnector connects to the robot, get some initial data from it such as type and name, + // and then loads parameter files for this robot. + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "simpleMotionCommands: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + } + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Connected."); + + // Start the robot processing cycle running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + // Print out some data from the SIP. + + // We must "lock" the ArRobot object + // before calling its methods, and "unlock" when done, to prevent conflicts + // with the background thread started by the call to robot.runAsync() above. + // See the section on threading in the manual for more about this. + // Make sure you unlock before any sleep() call or any other code that will + // take some time; if the robot remains locked during that time, then + // ArRobot's background thread will be blocked and unable to communicate with + // the robot, call tasks, etc. + + robot.lock(); + ArLog::log(ArLog::Normal, "simpleMotionCommands: Pose=(%.2f,%.2f,%.2f), Trans. Vel=%.2f, Rot. Vel=%.2f, Battery=%.2fV", + robot.getX(), robot.getY(), robot.getTh(), robot.getVel(), robot.getRotVel(), robot.getBatteryVoltage()); + robot.unlock(); + + // Sleep for 3 seconds. + ArLog::log(ArLog::Normal, "simpleMotionCommands: Will start driving in 3 seconds..."); + ArUtil::sleep(3000); + + // Set forward velocity to 50 mm/s + ArLog::log(ArLog::Normal, "simpleMotionCommands: Driving forward at 250 mm/s for 5 sec..."); + robot.lock(); + robot.enableMotors(); + robot.setVel(250); + robot.unlock(); + ArUtil::sleep(5000); + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Stopping."); + robot.lock(); + robot.stop(); + robot.unlock(); + ArUtil::sleep(1000); + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Rotating at 10 deg/s for 5 sec..."); + robot.lock(); + robot.setRotVel(10); + robot.unlock(); + ArUtil::sleep(5000); + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Rotating at -10 deg/s for 10 sec..."); + robot.lock(); + robot.setRotVel(-10); + robot.unlock(); + ArUtil::sleep(10000); + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Driving forward at 150 mm/s for 5 sec..."); + robot.lock(); + robot.setRotVel(0); + robot.setVel(150); + robot.unlock(); + ArUtil::sleep(5000); + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Stopping."); + robot.lock(); + robot.stop(); + robot.unlock(); + ArUtil::sleep(1000); + + + // Other motion command functions include move(), setHeading(), + // setDeltaHeading(). You can also adjust acceleration and deceleration + // values used by the robot with setAccel(), setDecel(), setRotAccel(), + // setRotDecel(). See the ArRobot class documentation for more. + + + robot.lock(); + ArLog::log(ArLog::Normal, "simpleMotionCommands: Pose=(%.2f,%.2f,%.2f), Trans. Vel=%.2f, Rot. Vel=%.2f, Battery=%.2fV", + robot.getX(), robot.getY(), robot.getTh(), robot.getVel(), robot.getRotVel(), robot.getBatteryVoltage()); + robot.unlock(); + + + ArLog::log(ArLog::Normal, "simpleMotionCommands: Ending robot thread..."); + robot.stopRunning(); + + // wait for the thread to stop + robot.waitForRunExit(); + + // exit + ArLog::log(ArLog::Normal, "simpleMotionCommands: Exiting."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/socketClientExample-vc2003.vcproj b/Legacy/Aria/examples/socketClientExample-vc2003.vcproj new file mode 100644 index 0000000..bb0a9bb --- /dev/null +++ b/Legacy/Aria/examples/socketClientExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/socketClientExample-vc2008.vcproj b/Legacy/Aria/examples/socketClientExample-vc2008.vcproj new file mode 100644 index 0000000..2618fce --- /dev/null +++ b/Legacy/Aria/examples/socketClientExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/socketClientExample-vc2010.vcxproj b/Legacy/Aria/examples/socketClientExample-vc2010.vcxproj new file mode 100644 index 0000000..865719f --- /dev/null +++ b/Legacy/Aria/examples/socketClientExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + socketClientExample + {5571A55D-018E-485E-802E-D3F200D587DC} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/clientHelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 0.7 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/clientHelloWorld.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/socketClientExample.cpp b/Legacy/Aria/examples/socketClientExample.cpp new file mode 100644 index 0000000..f0cc157 --- /dev/null +++ b/Legacy/Aria/examples/socketClientExample.cpp @@ -0,0 +1,117 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example socketClientExample.cpp ArSocket example client program + * + * + This is an example to show how to use ArSocket to create a client and + a server. This is the client program. The server is + socketServerExample.cpp. + + This connects to a server on the host 'localhost' on port 7777. It waits for the server + to say hello, then it says hello in reponse. It then closes the socket and + exits. + + First run the server program socketServerExample. Then run + this client program on the same computer, perhaps in a different + terminal window. You should see the server accept the connection, + send its greeting to this client program, and see this client + respond with its greeting text to the server. + + @see ArSocket + @see socketServerExample.cpp + + Also see the ArNetworking library for a more complete + networking framework. +*/ + + +int main() +{ + // The string to send to the server. + const char *strToSend="Hello Server"; + // The buffer in which to recieve the hello from the server + char buff[100]; + // The size of the string the server sent + size_t strSize; + + // The socket object + ArSocket sock; + + // Initialize Aria. It is especially important to do + // this on Windows, because it will initialize Window's + // sockets system. + Aria::init(); + + // Connect to the server + ArLog::log(ArLog::Normal, "socketClientExample: Connecting to localhost TCP port 7777..."); + if (sock.connect("localhost", 7777, ArSocket::TCP)) + ArLog::log(ArLog::Normal, "socketClientExample: Connected to server at localhost TCP port 7777."); + else + { + ArLog::log(ArLog::Terse, "socketClientExample: Error connecting to server at localhost TCP port 7777: %s", sock.getErrorStr().c_str()); + return(-1); + } + + // Read data from the socket. read() will block until + // data is received. + strSize=sock.read(buff, sizeof(buff)); + + // If the amount read is 0 or less, its an error condition. + if (strSize > 0) + { + buff[strSize]='\0'; // Terminate the string with a NULL character: + ArLog::log(ArLog::Normal, "socketClientExample: Server said: \"%s\"", buff); + } + else + { + ArLog::log(ArLog::Terse, "socketClientExample: Error in waiting/reading from the server."); + Aria::exit(-1); + return(-1); + } + + // Send the string 'Hello Server' to the server. write() should + // return the same number of bytes that we told it to write. Otherwise, + // its an error condition. + if (sock.write(strToSend, strlen(strToSend)) == strlen(strToSend)) + ArLog::log(ArLog::Normal, "socketClientExample: Said hello to the server."); + else + { + ArLog::log(ArLog::Terse, "socketClientExample: Error sending hello string to the server."); + Aria::exit(-1); + return(-1); + } + + // Now close the connection to the server + sock.close(); + ArLog::log(ArLog::Normal, "socketClientExample: Socket to server closed."); + + // Uninitialize Aria and exit + Aria::exit(0); + return(0); +} diff --git a/Legacy/Aria/examples/socketServerExample-vc2003.vcproj b/Legacy/Aria/examples/socketServerExample-vc2003.vcproj new file mode 100644 index 0000000..a5d0168 --- /dev/null +++ b/Legacy/Aria/examples/socketServerExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/socketServerExample-vc2008.vcproj b/Legacy/Aria/examples/socketServerExample-vc2008.vcproj new file mode 100644 index 0000000..0b0d75c --- /dev/null +++ b/Legacy/Aria/examples/socketServerExample-vc2008.vcproj @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/socketServerExample-vc2010.vcxproj b/Legacy/Aria/examples/socketServerExample-vc2010.vcxproj new file mode 100644 index 0000000..4c88480 --- /dev/null +++ b/Legacy/Aria/examples/socketServerExample-vc2010.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + socketServerExample + {CD42EA8C-AEEC-4B0A-AAE5-C8096EB9ACDF} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(Configuration)-VC9\ + false + .\../bin\ + ../obj/$(Configuration)-VC9\ + false + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + .\../bin/serverHelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;winmm.lib;AriaVC9.lib;%(AdditionalDependencies) + 0.7 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)BuildLog.htm + + + .\../bin/serverHelloWorld.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;winmm.lib;AriaDebugVC9.lib;%(AdditionalDependencies) + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/socketServerExample.cpp b/Legacy/Aria/examples/socketServerExample.cpp new file mode 100644 index 0000000..0f85400 --- /dev/null +++ b/Legacy/Aria/examples/socketServerExample.cpp @@ -0,0 +1,146 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example socketServerExample.cpp ArSocket example server program + * + This is an example to show how to use ArSocket. + a server. This is the server program. The client is socketClientExample.cpp + + This program opens a server on port 7777. It waits for the + client to connect and says hello to the client. It then waits for the + client to say hello and then exits. + + First run this server program. Then run the client program, + socketClientExample, perhaps in a different terminal window. + You should see the server accept the connection, send its + greeting to the client, recieve a response from the client, + and then the connection closes. + + This server only accepts one client connection, and then + it exits. In practice, most servers would loop, accepting + many clients, and simultaneously handling curently open + client connections. You can use threads to do that (see + ArASyncTask), but ArSocket is not inherently thread-safe, + you would also need to use an ArMutex object to protect + ArSocket calls. + + @see ArSocket + @see socketClientExample.cpp + + Also see the ArNetServer to help manage a server, or the + ArNetworking library for a more complete networking framework. +*/ + + +int main() +{ + // The string to send to the client. + char *strToSend="Hello Client"; + // The buffer in which to recieve the hello from the client + char buff[100]; + // The size of the string the client sent + size_t strSize; + + // Initialize Aria. This is especially essential on Windows, + // because it will initialize Windows's sockets sytem. + Aria::init(); + + // The socket objects: one for accepting new client connections, + // and another for communicating with a client after it connects. + ArSocket serverSock, clientSock; + + + // Open the server socket + if (serverSock.open(7777, ArSocket::TCP)) + ArLog::log(ArLog::Normal, "socketServerExample: Opened the server port."); + else + { + ArLog::log(ArLog::Normal, "socketServerExample: Failed to open the server port: %s.", + serverSock.getErrorStr().c_str()); + Aria::exit(-1); + return(-1); + } + + for(int clientNo = 0; Aria::getRunning(); ++clientNo) + { + + // Wait for a client to connect to us. + ArLog::log(ArLog::Normal, "socketServerExample: Waiting for a client to connect. Press CTRL-C to exit."); + + if (serverSock.accept(&clientSock)) + ArLog::log(ArLog::Normal, "socketServerExample: Client %d has connected.", clientNo); + else + ArLog::log(ArLog::Terse, "socketServerExample: Error in accepting a connection from the client: %s.", + serverSock.getErrorStr().c_str()); + + // Send the string 'Hello Client' to the client. write() should + // return the same number of bytes that we told it to write. Otherwise, + // its an error condition. + if (clientSock.write(strToSend, strlen(strToSend)) == strlen(strToSend)) + ArLog::log(ArLog::Normal, "socketServerExample: Said hello to the client."); + else + { + ArLog::log(ArLog::Normal, "socketServerExample: Error in sending hello string to the client."); + Aria::exit(-1); + return(-1); + } + + // Read data from the client. read() will block until data is + // received. + strSize=clientSock.read(buff, sizeof(buff)); + + // If the amount read is 0 or less, its an error condition. + if (strSize > 0) + { + // Terminate the string with a NULL character. + buff[strSize]='\0'; + ArLog::log(ArLog::Normal, "socketServerExample: Client said: %s.", buff); + } + else + { + ArLog::log(ArLog::Normal, "socketServerExample: Error in waiting/reading the hello from the client."); + Aria::exit(-1); + return(-1); + } + + // Now lets close the connection to the client + clientSock.close(); + ArLog::log(ArLog::Normal, "socketServerExample: Socket to client closed."); + + } + + // And lets close the server port + serverSock.close(); + ArLog::log(ArLog::Normal, "socketServerExample: Server socket closed."); + + + // Uninitialize Aria and exit the program + Aria::exit(0); + + return(0); +} diff --git a/Legacy/Aria/examples/sound-computers.wav b/Legacy/Aria/examples/sound-computers.wav new file mode 100644 index 0000000..f4cc6d5 Binary files /dev/null and b/Legacy/Aria/examples/sound-computers.wav differ diff --git a/Legacy/Aria/examples/sound-impressed.wav b/Legacy/Aria/examples/sound-impressed.wav new file mode 100644 index 0000000..b24630b Binary files /dev/null and b/Legacy/Aria/examples/sound-impressed.wav differ diff --git a/Legacy/Aria/examples/sound-ping.wav b/Legacy/Aria/examples/sound-ping.wav new file mode 100644 index 0000000..c01b043 Binary files /dev/null and b/Legacy/Aria/examples/sound-ping.wav differ diff --git a/Legacy/Aria/examples/sound-r2a.wav b/Legacy/Aria/examples/sound-r2a.wav new file mode 100644 index 0000000..80e9c39 Binary files /dev/null and b/Legacy/Aria/examples/sound-r2a.wav differ diff --git a/Legacy/Aria/examples/sound-r2b.wav b/Legacy/Aria/examples/sound-r2b.wav new file mode 100644 index 0000000..02467dc Binary files /dev/null and b/Legacy/Aria/examples/sound-r2b.wav differ diff --git a/Legacy/Aria/examples/soundsQueueExample-vc2003.vcproj b/Legacy/Aria/examples/soundsQueueExample-vc2003.vcproj new file mode 100644 index 0000000..5b68a40 --- /dev/null +++ b/Legacy/Aria/examples/soundsQueueExample-vc2003.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/soundsQueueExample-vc2008.vcproj b/Legacy/Aria/examples/soundsQueueExample-vc2008.vcproj new file mode 100644 index 0000000..6184d58 --- /dev/null +++ b/Legacy/Aria/examples/soundsQueueExample-vc2008.vcproj @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/soundsQueueExample-vc2010.vcxproj b/Legacy/Aria/examples/soundsQueueExample-vc2010.vcxproj new file mode 100644 index 0000000..a04ad83 --- /dev/null +++ b/Legacy/Aria/examples/soundsQueueExample-vc2010.vcxproj @@ -0,0 +1,116 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + soundsQueueExample + {2F512A11-402E-496D-B20C-806414BDFE9F} + soundqueueexample + ManagedCProj + + + + Application + MultiByte + false + + + Application + MultiByte + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + false + ..\bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + /I "C:\reed\Aria\include" %(AdditionalOptions) + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + false + Default + MultiThreadedDebugDLL + true + true + true + Level3 + + + Default + + + AriaDebugVC10.lib + $(OutDir)$(ProjectName).exe + true + ..\lib;%(AdditionalLibraryDirectories) + true + true + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + MultiThreaded + Level3 + ProgramDatabase + + + $(OutDir)$(ProjectName).exe + true + false + + + AriaVC10.lib + ..\lib;%(AdditionalLibraryDirectories) + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/soundsQueueExample.cpp b/Legacy/Aria/examples/soundsQueueExample.cpp new file mode 100644 index 0000000..59b1056 --- /dev/null +++ b/Legacy/Aria/examples/soundsQueueExample.cpp @@ -0,0 +1,165 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example soundsQueueExample.cpp This program demonstrates the sound output queue ArSoundsQueue + * + * Shows how to operate the sounds queue and add WAV files to play. + * + * You may specify up to 10 file names on the command line. + * This example only demonstrates using the sounds queue for + * WAV file playback. For demonstration of using the sounds + * queue for speech synthesis, see the examples provided with + * either the ArSpeechSynth_Cepstral or ArSpeechSynth_Festival + * libraries. + * + * Usage: + * soundQueue <wav file names> + */ + +#include "Aria.h" +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArSoundsQueue.h" +#include "ArSoundPlayer.h" +#include +#include + +using namespace std; + +void queueNowEmpty() { + printf("The sound queue is now empty.\n"); +} + +void queueNowNonempty() { + printf("The sound queue is now non-empty.\n"); +} + +bool no() { + // just a false tautology + return false; +} + +int main(int argc, char** argv) { + Aria::init(); + //ArLog::init(ArLog::StdErr, ArLog::Verbose); + + // Create the sound queue. + ArSoundsQueue soundQueue; + + // Set WAV file callbacks + soundQueue.setPlayWavFileCallback(ArSoundPlayer::getPlayWavFileCallback()); + soundQueue.setInterruptWavFileCallback(ArSoundPlayer::getStopPlayingCallback()); + + // Notifications when the queue goes empty or non-empty. + soundQueue.addQueueEmptyCallback(new ArGlobalFunctor(&queueNowEmpty)); + soundQueue.addQueueNonemptyCallback(new ArGlobalFunctor(&queueNowNonempty)); + + // Run the sound queue in a new thread + soundQueue.runAsync(); + + // Get WAV file names from command line + if(argc < 2) + { + cerr << "Usage: " << argv[0] << " \n"; + Aria::exit(-1); + } + std::vector filenames; + for(int i = 1; i < min(argc, 11); i++) + { + filenames.push_back(argv[i]); + } + + // This functor can be used to cancel all sound playback until removed + ArGlobalRetFunctor dontPlayItem(&no); + + while(Aria::getRunning()) + { + cout << "Queue is " << + string(soundQueue.isPaused()?"paused":(soundQueue.isPlaying()?"playing":"ready")) + << ", with " << soundQueue.getCurrentQueueSize() << " pending sounds." << endl + << "Enter a command followed by the enter key:\n" + << "\tp\trequest pause state (cumulative)\n" + << "\tr\trequest resume state (cumulative)\n" + << "\ti\tinterrupt current sound\n" + << "\tc\tclear the queue\n" + << "\tC\tclear priority < 4 from the queue.\n" + << "\tn\tAdd " << filenames[0] << " to the queue, but with a condition callback to prevent it playing.\n" + << "\tv\tAdjust volume -50%\n" + << "\tV\tAdjust volume +50%\n" + << "\to\tAdjust volume -100%\n" + << "\tO\tAdjust volume +100%\n" + << "\tl\tAdjust volume -200%\n" + << "\tL\tAdjust volume +200%\n" + << "\t-\tSet volume adjustment to normal level\n" + ; + for(size_t i = 0; i < filenames.size(); i++) + cout << "\t" << i << "\tadd " << filenames[i] << " to the queue\n"; + cout << "\tq\tquit\n\n"; + + int c = getchar(); + if(c == '\n') + continue; + switch(c) + { + case 'p': soundQueue.pause(); break; + case 'r': soundQueue.resume(); break; + case 'i': soundQueue.interrupt(); break; + case 'q': soundQueue.stop(); ArUtil::sleep(100); Aria::exit(0); + case 'c': soundQueue.clearQueue(); break; + case 'C': soundQueue.removePendingItems(4); break; + case 'n': + { + cout << "Adding \"" << filenames[0] << "\" but with a condition callback that will prevent it from playing...\n"; + ArSoundsQueue::Item item = soundQueue.createDefaultFileItem(filenames[0]); + item.playbackConditionCallbacks.push_back(&dontPlayItem); + soundQueue.addItem(item); + break; + } + case 'v': ArSoundPlayer::setVolumePercent(-50.0); break; + case 'V': ArSoundPlayer::setVolumePercent(50.0); break; + case 'o': ArSoundPlayer::setVolumePercent(-100.0); break; + case 'O': ArSoundPlayer::setVolumePercent(100.0); break; + case 'l': ArSoundPlayer::setVolumePercent(-200.0); break; + case 'L': ArSoundPlayer::setVolumePercent(200.0); break; + case '-': ArSoundPlayer::setVolumePercent(0.0); break; + default: + if(filenames.size() > 0 && c >= '0' && c <= '9') + { + size_t i = c - '0'; + if(i < filenames.size()) + { + cout << "Adding \"" << filenames[i] << "\" to the queue...\n"; + soundQueue.play(filenames[i]); + } + } + } + } + cout << "ended.\n"; + Aria::exit(0); + return 0; +} + + diff --git a/Legacy/Aria/examples/teleopActionsExample-vc2003.vcproj b/Legacy/Aria/examples/teleopActionsExample-vc2003.vcproj new file mode 100644 index 0000000..97a139f --- /dev/null +++ b/Legacy/Aria/examples/teleopActionsExample-vc2003.vcproj @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/teleopActionsExample-vc2008.vcproj b/Legacy/Aria/examples/teleopActionsExample-vc2008.vcproj new file mode 100644 index 0000000..0d1bfee --- /dev/null +++ b/Legacy/Aria/examples/teleopActionsExample-vc2008.vcproj @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/teleopActionsExample-vc2010.vcxproj b/Legacy/Aria/examples/teleopActionsExample-vc2010.vcxproj new file mode 100644 index 0000000..ae6bc4a --- /dev/null +++ b/Legacy/Aria/examples/teleopActionsExample-vc2010.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + teleopActionsExample + {9E2494B2-5359-47C8-9122-549EDD467615} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/teleop.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/teleop.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/teleopActionsExample.cpp b/Legacy/Aria/examples/teleopActionsExample.cpp new file mode 100644 index 0000000..8eab7e5 --- /dev/null +++ b/Legacy/Aria/examples/teleopActionsExample.cpp @@ -0,0 +1,119 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** @example teleopActionsExample.cpp Example using actions for safe + * teleoperation with keyboard or joystick. + + This example program creates several "limiting" actions (stop the robot + from hitting detected obstacles), as well as Joydrive and Keydrive + actions which request movement based on keys pressed or a joystick + attached to the computer. The limiting actions are added at a higher + priority than the teleoperation actions, so they prevent those actions + from driving the robot if nearby obstacles are detected; otherwise, + you can drive the robot using they joystick or keyboard. +*/ + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "teleopActionsExample: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + } + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "teleopActionsExample: Connected."); + + + // limiter for close obstacles + ArActionLimiterForwards limiter("speed limiter near", 300, 600, 250); + // limiter for far away obstacles + ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 400); + // limiter that checks IR sensors (like Peoplebot has) + ArActionLimiterTableSensor tableLimiter; + // limiter so we don't bump things backwards + ArActionLimiterBackwards backwardsLimiter; + // the joydrive action + ArActionJoydrive joydriveAct; + // the keydrive action + ArActionKeydrive keydriveAct; + + // sonar device, used by the limiter actions. + ArSonarDevice sonar; + + + + printf("This program will allow you to use a joystick or keyboard to control the robot.\nYou can use the arrow keys to drive, and the spacebar to stop.\nFor joystick control press the trigger button and then drive.\nPress escape to exit.\n"); + + // if we don't have a joystick, let 'em know + if (!joydriveAct.joystickInited()) + printf("Do not have a joystick, only the arrow keys on the keyboard will work.\n"); + + // add the sonar to the robot + robot.addRangeDevice(&sonar); + + + // set the robots maximum velocity (sonar don't work at all well if you're + // going faster) + robot.setAbsoluteMaxTransVel(400); + + // enable the motor + robot.enableMotors(); + + // Add the actions, with the limiters as highest priority, then the teleop. + // actions. This will keep the teleop. actions from being able to drive too + // fast and hit something + robot.addAction(&tableLimiter, 100); + robot.addAction(&limiter, 95); + robot.addAction(&limiterFar, 90); + robot.addAction(&backwardsLimiter, 85); + robot.addAction(&joydriveAct, 50); + robot.addAction(&keydriveAct, 45); + + // Configure the joydrive action so it will let the lower priority actions + // (i.e. keydriveAct) request motion if the joystick button is + // not pressed. + joydriveAct.setStopIfNoButtonPressed(false); + + + // run the robot, true means that the run will exit if connection lost + robot.run(true); + + Aria::exit(0); +} diff --git a/Legacy/Aria/examples/threadExample-vc2003.vcproj b/Legacy/Aria/examples/threadExample-vc2003.vcproj new file mode 100644 index 0000000..d82dd3c --- /dev/null +++ b/Legacy/Aria/examples/threadExample-vc2003.vcproj @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/threadExample-vc2008.vcproj b/Legacy/Aria/examples/threadExample-vc2008.vcproj new file mode 100644 index 0000000..bcb4577 --- /dev/null +++ b/Legacy/Aria/examples/threadExample-vc2008.vcproj @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/threadExample-vc2010.vcxproj b/Legacy/Aria/examples/threadExample-vc2010.vcxproj new file mode 100644 index 0000000..c51f8e8 --- /dev/null +++ b/Legacy/Aria/examples/threadExample-vc2010.vcxproj @@ -0,0 +1,157 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + threadExample + {4BB4D8FF-F83B-406A-85AF-C7DF75ABCF59} + + + + Application + false + MultiByte + false + + + Application + false + MultiByte + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + ../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + .\../bin/threadExample.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + + + .\../bin/threadExample.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + false + true + + + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + true + true + Console + false + + + MachineX86 + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/threadExample.cpp b/Legacy/Aria/examples/threadExample.cpp new file mode 100644 index 0000000..efe3bed --- /dev/null +++ b/Legacy/Aria/examples/threadExample.cpp @@ -0,0 +1,184 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example threadExample.cpp Example showing ARIA's cross-platform threading tools. + * + * ARIA provides some tools for writing multithreaded programs. These are + * abstractions of the threading library provided by the native operating + * system. + * + * The three main tools are: + *

    + *
  • ArASyncTask a class which can run a method in a new thread
  • + *
  • ArMutex, an object that can be shared by multiple threads to provide + * mutual exclusion from other shared data.
  • + *
  • ArCondition, an object that can cause a thread to block + * execution until signaled by another thread to continue.
  • + *
+ * + * This example program shows the use of all three, with two threads + * interacting: the program's main thread of execution, and a new thread + * created using ArASyncTask. An ArMutex object is used to keep use of + * some shared data safe, and then the use of ArCondition is shown. + * + * Threading can be error-prone, since any (perhaps subconcious) assumptions + * you have about the linear execution of code may not apply to simultaneous threads. + * Furthermore, different computers will execute multithreaded code in + * different ways (especially if they have different numbers of CPUs). + * ARIA's threading tools can help make multiple threads work, and help make + * multithreaded code portable, but you must always think carefully about + * how code might execute (including error conditions!) to avoid deadlocks and + * race conditions. + */ + +#include "Aria.h" + + +/* A subclass of ArASyncTask, to contain a method that runs in a new thread */ +class ExampleThread : public ArASyncTask +{ + ArCondition myCondition; + ArMutex myMutex; + int myCounter; +public: + + /* Construtor. Initialize counter. */ + ExampleThread() : myCounter(0) + { + myCondition.setLogName("ExampleThreadCondition"); + } + + + /* This method is called in the new thread when launched. The void* parameter + * and return value are platform implementation-specific and can be ignored. + * This method will run in a loop, incrementing the counter each second, but + * locking the mutex to prevent conflicting access by other threads. + * If it reaches a value divisible by ten, signal our condition variable. + */ + void* runThread(void*) + { + // Run until the thread is requested to end by another thread. + while(this->getRunningWithLock()) + { + myMutex.lock(); + + // Increment the counter. + myCounter++; + ArLog::log(ArLog::Normal, "Example thread: incremented counter to %d.", myCounter); + + // If it's now divisible by 10, signal the condition variable. + if(myCounter % 10 == 0) + { + ArLog::log(ArLog::Normal, "Example thread: Signalling condition."); + myCondition.signal(); + } + + // Unlock, then sleep. We unlock before the sleep, so that while + // we are sleeping, other threads that try to lock the mutex won't + // be blocked until this thread is done sleeping. + myMutex.unlock(); + ArUtil::sleep(1000); + } + + ArLog::log(ArLog::Normal, "Example thread: requested stop running, ending thread."); + return NULL; + } + + /* Other threads can call this to wait for a condition eventually + * signalled by this thread. (So note that in this example program, this + * function is not executed within "Example thread", but is executed in the main thread.) + */ + void waitOnCondition() + { + myCondition.wait(); + ArLog::log(ArLog::Normal, " %s ArCondition object was signalled, done waiting for it.", myCondition.getLogName()); + } + + /* Get the counter. Not threadsafe, you must lock the mutex during access. */ + int getCounter() { return myCounter; } + + /* Set the countner. Not threadsafe, you must lock the mutex during access. */ + void setCounter(int ctr) { myCounter = ctr; } + + /* Lock the mutex object. */ + void lockMutex() { myMutex.lock(); } + + /* Unlock the mutex object. */ + void unlockMutex() { myMutex.unlock(); } + +}; + +int main() +{ + Aria::init(); + + ExampleThread exampleThread; + + /* Launch the new thread in the background. This thread (i.e. the main program thread, + * executing main()) continues immediately after the new thread is created. */ + ArLog::log(ArLog::Normal, "Main thread: Running new example thread ..."); + exampleThread.runAsync(); + + /* Loop, reading the value contained in the ExampleThread object. + * We will also use ArUtil::sleep() to make this thread sleep each iteration, + * instead of running as fast as possible and potentially preventing other + * threads from access to the mutex and the shared counter. + * When the counter reaches 10, break out of the loop and then wait on the + * condition variable. + */ + while(true) + { + exampleThread.lockMutex(); + int c = exampleThread.getCounter(); + exampleThread.unlockMutex(); // we can unlock the mutex now, since we made a copy of the counter. + + printf("Main thread: Counter=%d.\n", c); + + if(c >= 10) + break; + + ArUtil::sleep(600); + } + + + /* This shows how to block on an ArCondition object. + * wait() will *only* return when the condition object is + * signaled by the other thread. + */ + ArLog::log(ArLog::Normal, "Main thread: Waiting on condition object..."); + exampleThread.waitOnCondition(); + + ArLog::log(ArLog::Normal, "Main thread: Condition was signaled, and execution continued. Telling the other thread to stop running."); + exampleThread.stopRunning(); + + ArLog::log(ArLog::Normal, "Main thread: Waiting for the other thread to exit, then exiting the program."); + do { + ArUtil::sleep(250); + } while(exampleThread.getRunningWithLock()); + + ArLog::log(ArLog::Normal, "Main thread: Exiting program."); + return 0; +} diff --git a/Legacy/Aria/examples/triangleDriveToActionExample.cpp b/Legacy/Aria/examples/triangleDriveToActionExample.cpp new file mode 100644 index 0000000..5f8ca0e --- /dev/null +++ b/Legacy/Aria/examples/triangleDriveToActionExample.cpp @@ -0,0 +1,130 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example triangleDriveToActionExample.cpp Example/demonstration of + * ArActionTriangleDriveTo, which drives the robot towards a specially shaped + * triangular target + * + Press g or G to use ArActionTriangleDriveTo to detect and drive towards + a triangular target shape. Press s or S to stop. + See ArActionTriangleDriveTo for more information about the triangular target and what the action does and its parameters. + **/ + +#include "Aria.h" + + +int main(int argc, char **argv) +{ + Aria::init(); + + // parse our args and make sure they were all accounted for + ArSimpleConnector connector(&argc, argv); + + ArRobot robot; + + // the laser. ArActionTriangleDriveTo will use this laser object since it is + // named "laser" when added to the ArRobot. + ArSick sick; + + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + Aria::exit(1); + return 1; + } + + // a key handler so we can do our key handling + ArKeyHandler keyHandler; + // let the global aria stuff know about it + Aria::setKeyHandler(&keyHandler); + // toss it on the robot + robot.attachKeyHandler(&keyHandler); + + // add the laser to the robot + robot.addRangeDevice(&sick); + + ArSonarDevice sonar; + robot.addRangeDevice(&sonar); + + ArActionTriangleDriveTo triangleDriveTo; + ArFunctorC lineGoCB(&triangleDriveTo, + &ArActionTriangleDriveTo::activate); + keyHandler.addKeyHandler('g', &lineGoCB); + keyHandler.addKeyHandler('G', &lineGoCB); + ArFunctorC lineStopCB(&triangleDriveTo, + &ArActionTriangleDriveTo::deactivate); + keyHandler.addKeyHandler('s', &lineStopCB); + keyHandler.addKeyHandler('S', &lineStopCB); + + ArActionLimiterForwards limiter("limiter", 150, 0, 0, 1.3); + robot.addAction(&limiter, 70); + ArActionLimiterBackwards limiterBackwards; + robot.addAction(&limiterBackwards, 69); + + robot.addAction(&triangleDriveTo, 60); + + ArActionKeydrive keydrive; + robot.addAction(&keydrive, 55); + + + ArActionStop stopAction; + robot.addAction(&stopAction, 50); + + // try to connect, if we fail exit + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + return 1; + } + + robot.comInt(ArCommands::SONAR, 1); + robot.comInt(ArCommands::ENABLE, 1); + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + // now set up the laser + connector.setupLaser(&sick); + + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::exit(1); + return 1; + } + + printf("If you press the 'g' key it'll go find a triangle, if you press 's' it'll stop.\n"); + + robot.waitForRunExit(); + Aria::exit(0); + return 0; +} + + + diff --git a/Legacy/Aria/examples/twoRobotWander-vc2003.vcproj b/Legacy/Aria/examples/twoRobotWander-vc2003.vcproj new file mode 100644 index 0000000..93626ff --- /dev/null +++ b/Legacy/Aria/examples/twoRobotWander-vc2003.vcproj @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/twoRobotWander-vc2008.vcproj b/Legacy/Aria/examples/twoRobotWander-vc2008.vcproj new file mode 100644 index 0000000..2c5f6d8 --- /dev/null +++ b/Legacy/Aria/examples/twoRobotWander-vc2008.vcproj @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/twoRobotWander-vc2010.vcxproj b/Legacy/Aria/examples/twoRobotWander-vc2010.vcxproj new file mode 100644 index 0000000..33eeb12 --- /dev/null +++ b/Legacy/Aria/examples/twoRobotWander-vc2010.vcxproj @@ -0,0 +1,139 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + twoRobotWander + + + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + .\../obj/release\ + false + .\../bin\ + .\../obj/debug\ + false + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + ws2_32.lib;winmm.lib;AriaVC9.lib;%(AdditionalDependencies) + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + MachineX86 + + + .\../bin/twoRobotWander.tlb + + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + ws2_32.lib;winmm.lib;AriaDebugVC9.lib;%(AdditionalDependencies) + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + MachineX86 + + + .\../bin/twoRobotWander.tlb + + + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/twoRobotWander.cpp b/Legacy/Aria/examples/twoRobotWander.cpp new file mode 100644 index 0000000..74d199d --- /dev/null +++ b/Legacy/Aria/examples/twoRobotWander.cpp @@ -0,0 +1,231 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* Example showing how two ArRobot objects can be used in one program. + + Normally, a program will only connect to one robot, and will only have + one ArRobot object. However, it is possible to connect to more than + one robot from the same program -- for example, this may be useful for doing + multirobot experiments in a simulator, or to control remote robots with + wireless-serial bridge devices from an offboard computer. This program + demonstrates this by connecting to two robots over TCP connections. + (Old systems with dedicated serial-radio links for each robot would require + modifying this program to use serial connections instead.) + + Specify the hostnames of each robot with -rh1 and -rh2 command line arguments + (defaults are "localhost" for each). Specify port numbers for each with + -rp1 and -rp2 command line arguments (defaults are 8101 for each if + the hostnames are different, or 8101 and 8102 if the hostnames are the same). + + This program will just have two robots wander around, avoiding obstacles + detected by the sonar, or otherwise moving forward at constant velocity. + First it has one robot wander for a period of time, then it has the + second robot wander around. +*/ + +int main(int argc, char** argv) +{ + int ret; + std::string str; + int curRobot; + + // get hostnames and port numbers for connecting to the robots. + ArArgumentParser argParser(&argc, argv); + char* host1 = argParser.checkParameterArgument("-rh1"); + if(!host1) host1 = "localhost"; + char* host2 = argParser.checkParameterArgument("-rh2"); + if(!host2) host2 = "localhost"; + + int port1 = 8101; + int port2 = 8101; + if(strcmp(host1, host2) == 0 ) + { + // same host, it must be using two ports (but can still override below with -rp2) + port2++; + } + + bool argSet = false; + argParser.checkParameterArgumentInteger("-rp1", &port1, &argSet); + if(!argSet) argParser.checkParameterArgumentInteger("-rrtp1", &port1); + argSet = false; + argParser.checkParameterArgumentInteger("-rp2", &port2, &argSet); + if(!argSet) argParser.checkParameterArgumentInteger("-rrtp2", &port2); + + if(!argParser.checkHelpAndWarnUnparsed()) + { + ArLog::log(ArLog::Terse, "Usage: twoRobotWander [-rh1 ] [-rh2 ] [-rp1 ] [-rp2 ]\n"\ + "\t Is the network host name of the first robot."\ + " Default is localhost (for the simulator).\n"\ + "\t Is the network host name of the second robot."\ + " Default is localhost (for the simulator).\n"\ + "\t Is the TCP port number of the first robot. Default is 8101.\n"\ + "\t Is the TCP port number of the second robot. Default is 8102 if"\ + " both robots have the same hostname, or 8101 if they differ.\n\n"); + return 1; + } + + + + // + // The first robot's objects + // + // the first robot connection + ArTcpConnection con1; + // the first robot + ArRobot robot1; + // sonar, must be added to the first robot + ArSonarDevice sonar1; + // the actions we'll use to wander for the first robot + ArActionStallRecover recover1; + ArActionBumpers bumpers1; + ArActionAvoidFront avoidFront1; + ArActionConstantVelocity constantVelocity1("Constant Velocity", 400); + + // + // The second robot's objects + // + // the second robot connection + ArTcpConnection con2; + // the second robot + ArRobot robot2; + // sonar, must be added to the second robot + ArSonarDevice sonar2; + // the actions we'll use to wander for the second robot + ArActionStallRecover recover2; + ArActionBumpers bumpers2; + ArActionAvoidFront avoidFront2; + ArActionConstantVelocity constantVelocity2("Constant Velocity", 400); + + // mandatory init + Aria::init(); + + // + // Lets get robot 1 going + // + + // open the connection, if this fails exit + ArLog::log(ArLog::Normal, "Connecting to first robot at %s:%d...", host1, port1); + if ((ret = con1.open(host1, port1)) != 0) + { + str = con1.getOpenMessage(ret); + printf("Open failed to robot 1: %s\n", str.c_str()); + Aria::exit(1); + return 1; + } + + // add the sonar to the robot + robot1.addRangeDevice(&sonar1); + + // set the device connection on the robot + robot1.setDeviceConnection(&con1); + + // try to connect, if we fail exit + if (!robot1.blockingConnect()) + { + printf("Could not connect to robot 1... exiting\n"); + Aria::exit(1); + return 1; + } + + // turn on the motors, turn off amigobot sounds + robot1.comInt(ArCommands::ENABLE, 1); + robot1.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions + robot1.addAction(&recover1, 100); + robot1.addAction(&bumpers1, 75); + robot1.addAction(&avoidFront1, 50); + robot1.addAction(&constantVelocity1, 25); + + + // + // Lets get robot 2 going + // + + // open the connection, if this fails exit + ArLog::log(ArLog::Normal, "Connecting to second robot at %s:%d...", host2, port2); + if ((ret = con2.open(host2, port2)) != 0) + { + str = con2.getOpenMessage(ret); + printf("Open failed to robot 2: %s\n", str.c_str()); + Aria::exit(1); + return 1; + } + + // add the sonar to the robot + robot2.addRangeDevice(&sonar2); + + // set the device connection on the robot + robot2.setDeviceConnection(&con2); + + // try to connect, if we fail exit + if (!robot2.blockingConnect()) + { + printf("Could not connect to robot 2... exiting\n"); + Aria::exit(1); + return 1; + } + + // turn on the motors, turn off amigobot sounds + robot2.comInt(ArCommands::ENABLE, 1); + robot2.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions + robot2.addAction(&recover2, 100); + robot2.addAction(&bumpers2, 75); + robot2.addAction(&avoidFront2, 50); + robot2.addAction(&constantVelocity2, 25); + + // start the robots running. true so that if we lose connection to either + // robot, the run stops. + robot1.runAsync(true); + robot2.runAsync(true); + + // As long as both robot loops are running, lets alternate between the + // two wandering around. + curRobot=1; + while (robot1.isRunning() && robot2.isRunning()) + { + ArUtil::sleep(10000); + if (curRobot == 1) + { + robot1.stop(); + robot2.clearDirectMotion(); + curRobot=2; + } + else + { + robot2.stop(); + robot1.clearDirectMotion(); + curRobot=1; + } + } + + // now exit + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/wander-vc2003.vcproj b/Legacy/Aria/examples/wander-vc2003.vcproj new file mode 100644 index 0000000..2ad412b --- /dev/null +++ b/Legacy/Aria/examples/wander-vc2003.vcproj @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/wander-vc2008.vcproj b/Legacy/Aria/examples/wander-vc2008.vcproj new file mode 100644 index 0000000..5374801 --- /dev/null +++ b/Legacy/Aria/examples/wander-vc2008.vcproj @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/wander-vc2010.vcxproj b/Legacy/Aria/examples/wander-vc2010.vcxproj new file mode 100644 index 0000000..1d4a82c --- /dev/null +++ b/Legacy/Aria/examples/wander-vc2010.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + wander + {5239B513-8B95-4EDB-9FBA-63CB8D7CDEA3} + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + .\../bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/wander.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + true + true + + + Level3 + true + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + .\../bin/wander.tlb + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + true + true + + + true + Level3 + true + + + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + AriaDebugVC10.lib + 1.0 + true + ..\lib;%(AdditionalLibraryDirectories) + false + Console + false + + + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/wander.cpp b/Legacy/Aria/examples/wander.cpp new file mode 100644 index 0000000..e817459 --- /dev/null +++ b/Legacy/Aria/examples/wander.cpp @@ -0,0 +1,118 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example wander.cpp + * Example using actions and range devices to implement a random wander avoiding obstacles. + * + * This program will just have the robot wander around. It uses some avoidance + * actions if obstacles are detected with the sonar or laser (if robot has a + * laser), otherwise it just has a constant forward velocity. + * + * Press Control-C or Escape keys to exit. + * + * This program will work either with the MobileSim simulator or on a real + * robot's onboard computer. (Or use -remoteHost to connect to a wireless + * ethernet-serial bridge.) +*/ + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser argParser(&argc, argv); + argParser.loadDefaultArguments(); + ArRobot robot; + ArRobotConnector robotConnector(&argParser, &robot); + ArLaserConnector laserConnector(&argParser, &robot, &robotConnector); + + // Always try to connect to the first laser: + argParser.addDefaultArgument("-connectLaser"); + + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "Could not connect to the robot."); + if(argParser.checkHelpAndWarnUnparsed()) + { + // -help not given, just exit. + Aria::logOptions(); + Aria::exit(1); + return 1; + } + } + + + // Trigger argument parsing + if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + + ArKeyHandler keyHandler; + Aria::setKeyHandler(&keyHandler); + robot.attachKeyHandler(&keyHandler); + + puts("This program will make the robot wander around. It uses some avoidance\n" + "actions if obstacles are detected, otherwise it just has a\n" + "constant forward velocity.\n\nPress CTRL-C or Escape to exit."); + + ArSonarDevice sonar; + robot.addRangeDevice(&sonar); + + robot.runAsync(true); + + + // try to connect to laser. if fail, warn but continue, using sonar only + if(!laserConnector.connectLasers()) + { + ArLog::log(ArLog::Normal, "Warning: unable to connect to requested lasers, will wander using robot sonar only."); + } + + + // turn on the motors, turn off amigobot sounds + robot.enableMotors(); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add a set of actions that combine together to effect the wander behavior + ArActionStallRecover recover; + ArActionBumpers bumpers; + ArActionAvoidFront avoidFrontNear("Avoid Front Near", 225, 0); + ArActionAvoidFront avoidFrontFar; + ArActionConstantVelocity constantVelocity("Constant Velocity", 400); + robot.addAction(&recover, 100); + robot.addAction(&bumpers, 75); + robot.addAction(&avoidFrontNear, 50); + robot.addAction(&avoidFrontFar, 49); + robot.addAction(&constantVelocity, 25); + + // wait for robot task loop to end before exiting the program + robot.waitForRunExit(); + + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/examples/wanderAndLogData-vc2003.vcproj b/Legacy/Aria/examples/wanderAndLogData-vc2003.vcproj new file mode 100644 index 0000000..6463573 --- /dev/null +++ b/Legacy/Aria/examples/wanderAndLogData-vc2003.vcproj @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/wanderAndLogData-vc2008.vcproj b/Legacy/Aria/examples/wanderAndLogData-vc2008.vcproj new file mode 100644 index 0000000..2600d45 --- /dev/null +++ b/Legacy/Aria/examples/wanderAndLogData-vc2008.vcproj @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/examples/wanderAndLogData-vc2010.vcxproj b/Legacy/Aria/examples/wanderAndLogData-vc2010.vcxproj new file mode 100644 index 0000000..4f73f91 --- /dev/null +++ b/Legacy/Aria/examples/wanderAndLogData-vc2010.vcxproj @@ -0,0 +1,114 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + wanderAndLogData + {06616FA8-EBC6-4B23-B70C-E332A19160F1} + wanderAndLogData + ManagedCProj + + + + Application + MultiByte + false + + + Application + MultiByte + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + true + ..\bin\ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + $(ProjectName).DebugVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + true + + + Level3 + ProgramDatabase + + + AriaDebugVC10.lib + $(OutDir)$(ProjectName).exe + true + ..\lib;%(AdditionalLibraryDirectories) + true + + + false + + + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + AriaVC10.lib + $(OutDir)$(ProjectName).exe + true + ..\lib;%(AdditionalLibraryDirectories) + false + false + + + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/examples/wanderAndLogData.cpp b/Legacy/Aria/examples/wanderAndLogData.cpp new file mode 100644 index 0000000..adbce6b --- /dev/null +++ b/Legacy/Aria/examples/wanderAndLogData.cpp @@ -0,0 +1,352 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +/* + * This is useful as a diagnostic tool, plus it shows all the many accessor + * methods of ArRobot for robot state. It makes the robot wander, using sonar + * to avoid obstacles, and prints out various pieces of robot state information + * each second. Refer to the ARIA ArRobot documentation and to your robot manual + * (section on standard ARCOS SIP packet contents) for details on the data. + * + * If -connectLaser command line argument is given, or is set in robot parameter + * file, it will use th elaser as well as the sonar to wander. + * + * ARIA also contains a class called ArDataLogger which is configurable through + * ArConfig. You can use ArDataLogger in your applications to incorporate + * a similar data logging feature. + */ + + + +/* function to display a byte as a string of 8 '1' and '0' characters. */ +std::string byte_as_bitstring(char byte) +{ + char tmp[9]; + int bit; + int ch; + for(bit = 7, ch = 0; bit >= 0; bit--,ch++) + tmp[ch] = ((byte>>bit)&1) ? '1' : '0'; + tmp[8] = 0; + return std::string(tmp); +} + +/* function to display a 2-byte int as a string of 16 '1' and '0' characters. */ +std::string int_as_bitstring(ArTypes::Byte2 n) +{ + char tmp[17]; + int bit; + int ch; + for(bit = 15, ch = 0; bit >= 0; bit--, ch++) + tmp[ch] = ((n>>bit)&1) ? '1' : '0'; + tmp[16] = 0; + return std::string(tmp); +} + +std::string charge_state_string(int state) +{ + switch(state) + { + case ArRobot::CHARGING_UNKNOWN: + return "unknown"; + case ArRobot::CHARGING_NOT: + return "not"; + case ArRobot::CHARGING_BULK: + return "bulk"; + case ArRobot::CHARGING_FLOAT: + return "float"; + case ArRobot::CHARGING_OVERCHARGE: + return "over"; + default: + return "UNREC VAL"; + } +} + +/* Some events might only be detectable in one robot cycle, not over the + * 1-second period that the main thread sleeps. This cycle callback will detect + * those and save them in some global variables. */ +bool wasLeftMotorStalled = false; +bool wasRightMotorStalled = false; +ArTypes::UByte2 cumulativeStallVal = 0; +ArTypes::UByte2 cumulativeRobotFlags = 0; +bool wasLeftIRTriggered = false; +bool wasRightIRTriggered = false; +bool wasEStopTriggered = false; + +bool cycleCallback(ArRobot* robot) +{ + cumulativeStallVal |= robot->getStallValue(); + wasLeftMotorStalled = wasLeftMotorStalled || robot->isLeftMotorStalled(); + wasRightMotorStalled = wasRightMotorStalled || robot->isRightMotorStalled(); + wasEStopTriggered = wasEStopTriggered || robot->getEstop(); + wasLeftIRTriggered = wasLeftIRTriggered || (robot->hasTableSensingIR() && robot->isLeftTableSensingIRTriggered()); + wasRightIRTriggered = wasRightIRTriggered || (robot->hasTableSensingIR() && robot->isRightTableSensingIRTriggered()); + return true; +} + + +unsigned int encoderPacketCountPrevSec; +unsigned int encoderPacketCount; +ArTime encoderPacketTimer; + +bool packetCallback(ArRobotPacket *packet) +{ + if(packet->getID() == 0x90) + { + // encoder packet + ++encoderPacketCount; + if(encoderPacketTimer.secSince() >= 1) + { + encoderPacketCountPrevSec = encoderPacketCount; + encoderPacketCount = 0; + encoderPacketTimer.setToNow(); + } + //printf("got an encoder packet. Count=%d, CountPrevSec=%d\n", encoderPacketCount, encoderPacketCountPrevSec); + } + return false; // let other packet handlers (e.g. in ArRobot) be called +} + + +ArActionGroup *ToggleActionGroup = NULL; +bool ToggleActionGroupActive = false; +void toggleaction(int signal) +{ + ArLog::log(ArLog::Normal, "%s action group.", ToggleActionGroupActive?"Deactivating":"Activating"); + if(ToggleActionGroupActive) + { + ToggleActionGroup->deactivate(); + ToggleActionGroupActive = false; + } + else + { + ToggleActionGroup->activate(); + ToggleActionGroupActive = true; + } +} + + +/* main function */ +int main(int argc, char **argv) +{ + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + + // robot and devices + ArRobot robot; + ArSonarDevice sonar; + ArBumpers bumpers; + ArIRs ir; + + // the actions we'll use to wander and avoid obstacles + ArActionStallRecover recoverAct; + ArActionBumpers bumpAct; + ArActionAvoidFront avoidFrontNearAct("Avoid Front Near", 225, 0); + ArActionAvoidFront avoidFrontFarAct; + ArActionConstantVelocity constantVelocityAct("Constant Velocity", 400); + + printf("This program will make the robot wander around, avoiding obstacles, and print some data and events.\nPress Ctrl-C to exit. Send SIGUSR1 signal to toggle wandering.\n"); + + + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobotConnector robotConnector(&parser, &robot); + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + ArLog::log(ArLog::Terse, "wanderAndLogData: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + return 1; + } + } + + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "wanderAndLogData: Could not connect to the robot."); + Aria::exit(2); + return 2; + } + + ArLog::log(ArLog::Normal, "wanderAndLogData: Connected."); + + ArLaserConnector laserConnector(&parser, &robot, &robotConnector); + if(!laserConnector.connectLasers()) + ArLog::log(ArLog::Normal, "Warning: unable to connect to requested lasers, will wander using robot sonar only."); + + + // add the range devices to the robot + robot.addRangeDevice(&sonar); + robot.addRangeDevice(&bumpers); + robot.addRangeDevice(&ir); + + // turn on the motors, turn off amigobot sound effects (for old h8-model amigobots) + robot.enableMotors(); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions created above + ArActionGroup wanderGroup(&robot); + wanderGroup.addAction(&recoverAct, 100); + wanderGroup.addAction(&bumpAct, 75); + wanderGroup.addAction(&avoidFrontNearAct, 50); + wanderGroup.addAction(&avoidFrontFarAct, 49); + wanderGroup.addAction(&constantVelocityAct, 25); + ToggleActionGroup = &wanderGroup; + + // can use SIGUSR1 to disable wandering (use Linux kill command) + signal(SIGUSR1, toggleaction); + + + // Cycle callback to check for events + robot.addUserTask("checkevents", 1, new ArGlobalRetFunctor1(&cycleCallback, &robot)); + + // Packet callback to count packets recieved of different types + encoderPacketCount = 0; + encoderPacketCountPrevSec = 0; + encoderPacketTimer.setToNow(); + robot.addPacketHandler(new ArGlobalRetFunctor1(&packetCallback), ArListPos::FIRST); + + // Activate the wander action + if(!parser.checkArgument("nowander")) + { + ArLog::log(ArLog::Normal, "Beginning wandering actions. Send SIGUSR1 to deactivate wander."); + wanderGroup.activate(); + ToggleActionGroupActive = true; + } + else + { + ArLog::log(ArLog::Normal, "Not activating wandering actions since -nowander option was given. Send SIGUSR1 to activate wander."); + wanderGroup.deactivate(); + ToggleActionGroupActive = false; + } + + // start the robot running, true means that if we lose robot connection the + // ArRobot runloop stops + robot.runAsync(true); + + // Print data header +#define HEADFORMAT "%-24s %-5s %-16s %-5s %-6s %-6s %-16s %-8s %-8s %-8s %-8s %-8s %-8s %-10s %-10s %-5s %-5s %-5s %8s %s" +#define DATAFORMAT "%-24s %03.02f %-16s %-5s %-6s %-6s %-16s %-8d %-8d %-8g %-8g %-8s %-8s %-10lu %-10lu %-5s %-5s %-5d %6s " // doesn't include bumps details on end + printf("\n" HEADFORMAT "\n\n", + "Time", + "Volts", + "Flags", + "EStop", + "StallL", + "StallR", + "StallVal", + "#SIP/s", + "#Son/s", + "Vel L", + "Vel R", + "DigIns", + "DigOuts", + "Enc L", + "Enc R", + "IR L", + "IR R", + "#Enc/s", + "Chargestate", + "Cur Bumps, (Last Bump Pose)" + ); + + // Request that we will want encoder data + robot.requestEncoderPackets(); + + // Print data every second + char timestamp[24]; + while(robot.isRunning()) { + robot.lock(); + time_t t = time(NULL); + strftime(timestamp, 24, "%Y-%m-%d %H:%M:%S", localtime(&t)); + printf( DATAFORMAT, + timestamp, + robot.getRealBatteryVoltage(), + int_as_bitstring(cumulativeRobotFlags).c_str(), + (wasEStopTriggered ? "YES" : " "), + (wasLeftMotorStalled?"YES":" "), + (wasRightMotorStalled?"YES":" "), + int_as_bitstring(cumulativeStallVal).c_str(), + robot.getMotorPacCount(), + robot.getSonarPacCount(), + robot.getLeftVel(), + robot.getRightVel(), + byte_as_bitstring(robot.getDigIn()).c_str(), + byte_as_bitstring(robot.getDigOut()).c_str(), + robot.getLeftEncoder(), + robot.getRightEncoder(), + wasLeftIRTriggered?"YES": " ", + wasRightIRTriggered?"YES":" ", + encoderPacketCountPrevSec, + charge_state_string(robot.getChargeState()).c_str() + ); + + // list indices of bumpers flaged in stallval + // skip the last bit which is a motor stall flag + ArTypes::UByte2 bumpmask = ArUtil::BIT15; + int bump = 0; + for(int bit = 16; bit > 0; bit--) + { + if(bit == 9) // this is also a motor stall bit + { + bumpmask = bumpmask >> 1; + bit--; + continue; + } + //printf("\n\tComparing stallval=%s to bumpmask=%s... ", int_as_bitstring(stallval).c_str(), int_as_bitstring(bumpmask).c_str()); + if(cumulativeStallVal & bumpmask) + printf("%d ", bump); + bumpmask = bumpmask >> 1; + bump++; + } + + // print pose of last bump sensor reading + const std::list* bumpsensed = bumpers.getCurrentBuffer(); + if(bumpsensed) + { + //printf("%d readings. ", bumpsensed->size()); + if(bumpsensed->size() > 0 && bumpsensed->front()) { + printf("(%.0f,%.0f)", bumpsensed->front()->getX(), bumpsensed->front()->getY()); + } + } + + + puts(""); // newline + + // clear events to accumulate for the next second + cumulativeRobotFlags = cumulativeStallVal = 0; + wasLeftMotorStalled = wasRightMotorStalled = wasLeftIRTriggered = wasRightIRTriggered = wasEStopTriggered = false; + + robot.unlock(); + ArUtil::sleep(1000); + } + + // robot cycle stopped, probably because of lost robot connection + Aria::exit(0); // exit program + return 0; +} diff --git a/Legacy/Aria/icon.png b/Legacy/Aria/icon.png new file mode 100644 index 0000000..dc7b97e Binary files /dev/null and b/Legacy/Aria/icon.png differ diff --git a/Legacy/Aria/include/ArACTS.h b/Legacy/Aria/include/ArACTS.h new file mode 100644 index 0000000..485ba94 --- /dev/null +++ b/Legacy/Aria/include/ArACTS.h @@ -0,0 +1,155 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTS_H +#define ARACTS_H + +#include "ariaTypedefs.h" +#include "ArTcpConnection.h" +#include "ariaUtil.h" +#include "ArRobot.h" + + +/// A class for the acts blob +class ArACTSBlob +{ +public: + /// Constructor + ArACTSBlob() {} + /// Destructor + virtual ~ArACTSBlob() {} + /// Gets the number of pixels (area) covered by the blob + int getArea(void) { return myArea; } + /// Gets the X Center of Gravity of the blob + int getXCG(void) { return myXCG; } + /// Gets the Y Center of Gravity of the blob + int getYCG(void) { return myYCG; } + /// Gets the left border of the blob + int getLeft(void) { return myLeft; } + /// Gets the right border of the blob + int getRight(void) { return myRight; } + /// Gets the top border of the blob + int getTop(void) { return myTop; } + /// Gets the bottom border of the blob + int getBottom(void) { return myBottom; } + /// Sets the number of pixels (area) covered by the blob + void setArea(int area) { myArea = area; } + /// Sets the X Center of Gravity of the blob + void setXCG(int xcg) { myXCG = xcg; } + /// Sets the Y Center of Gravity of the blob + void setYCG(int ycg) { myYCG = ycg; } + /// Sets the left border of the blob + void setLeft(int left) { myLeft = left; } + /// Sets the right border fo the blob + void setRight(int right) { myRight = right; } + /// Sets the top border of the blob + void setTop(int top) { myTop = top; } + /// Sets the bottom border of the blob + void setBottom(int bottom) { myBottom = bottom; } + /// Prints the stats of the blob + void log(void) + { + ArLog::log(ArLog::Terse, "Area: %3d X: %3d Y: %3d l: %3d r: %3d t: %3d: b: %3d", + myArea, myXCG, myYCG, myLeft, myRight, myTop, myBottom); + } +protected: + int myArea; + int myXCG; + int myYCG; + int myLeft; + int myRight; + int myTop; + int myBottom; +}; + +/// Communicate with ACTS +/// @ingroup OptionalClasses +class ArACTS_1_2 +{ +public: + /// Constructor + AREXPORT ArACTS_1_2(); + /// Destructor + AREXPORT virtual ~ArACTS_1_2(); + + /// Opens the connection to ACTS + AREXPORT bool openPort(ArRobot *robot, const char *host = "localhost", int port = 5001); + /// Closes the connection + AREXPORT bool closePort(void); + + /// Finds out whether there is connection + AREXPORT bool isConnected(void); + + /// Gets the robot this class is connected to + AREXPORT ArRobot *getRobot(void); + /// Sets the robot this class is connected to + AREXPORT void setRobot(ArRobot *robot); + + /// Requests another packet + AREXPORT bool requestPacket(void); + /// Requests that ACTS quits + AREXPORT bool requestQuit(void); + /// Gets the blob information from the connection to acts + AREXPORT bool receiveBlobInfo(void); + + /// Gets the number of blobs for the given chanel + AREXPORT int getNumBlobs(int channel); + + /// Gets the given blob from the given channel + AREXPORT bool getBlob(int channel, int blobNumber, ArACTSBlob *blob); + + /// A function that reads information from acts and requests packets + AREXPORT void actsHandler(void); + + enum ActsConstants + { + NUM_CHANNELS = 32, ///< Number of channels there are + MAX_BLOBS = 10, ///< Number of blobs per channel + ACTS_BLOB_DATA_SIZE = 16, ///< Size of the blob data + DATA_HEADER = NUM_CHANNELS * 4, ///< Size of the data header + MAX_DATA = 5300 ///< Maximum amount of data + }; + /// This will make the image stats inverted (for use with an inverted camera) + AREXPORT void invert(int width = 160, int height = 120); +protected: + int invertX(int before); + int invertY(int before); + /// an iternal function to strip out the information from some bytes + int getData(char *rawData); + ArFunctorC mySensorTaskCB; + ArRobot *myRobot; + ArTcpConnection myConn; + int myBlobNum[NUM_CHANNELS]; + int myBlobIndex[NUM_CHANNELS]; + char myData[MAX_DATA]; + bool myBlobsBad; + bool myRequested; + // these are for flipping the image + bool myInverted; + int myHeight; + int myWidth; +}; + +#endif diff --git a/Legacy/Aria/include/ArAMPTU.h b/Legacy/Aria/include/ArAMPTU.h new file mode 100644 index 0000000..5b32a36 --- /dev/null +++ b/Legacy/Aria/include/ArAMPTU.h @@ -0,0 +1,152 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARAMPTU_H +#define ARAMPTU_H + +#include "ariaTypedefs.h" +#include "ArBasePacket.h" +#include "ArPTZ.h" + +/// A class with the commands for the AMPTU +class ArAMPTUCommands +{ +public: + enum { + ABSTILT = 0x35, ///< Absolute tilt + RELTILTU = 0x36, ///< Relative tilt, up + RELTILTD = 0x37, ///< Relative tilt, down + ABSPAN = 0x31, ///< Absolute pan + RELPANCW = 0x32, ///< Relative pan, clockwise + RELPANCCW = 0x33, ///< Relative pan, counter clockwise + PANTILT = 0x28, ///< Pan and tilt absolute + PANTILTUCW = 0x29, ///< Relative tilt up, pan clockwise + PANTILTDCW = 0x2A, ///< Relative tilt down, pan clockwise + PANTILTUCCW = 0x2B, ///< Relative tilt up, pan counter-clockwise + PANTILTDCCW = 0x2C, ///< Relative tilt down, pan counter-clockwise + ZOOM = 0x3F, ///< Zoom + PAUSE = 0x39, ///< Pause the current movement + CONT = 0x3A, ///< Continue paused movement + PURGE = 0x3B, ///< Stops movement and purges commands + STATUS = 0x3C, ///< Requests a status packet + INIT = 0x3D, ///< Initializes the camera + RESP = 0x3E, ///< Response + PANSLEW = 0x34, ///< Sets the pan slew rate + TILTSLEW = 0x38 ///< Sets the tilt slew rate + }; + +}; + +/// A class for for making commands to send to the AMPTU +/** + There are only a few functioning ways to put things into this packet, you + MUST use thse, if you use anything else your commands won't work. You + must use byteToBuf and byte2ToBuf. + @see getUnitNumber + @see setUnitNumber +*/ +class ArAMPTUPacket: public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArAMPTUPacket(ArTypes::UByte2 bufferSize = 30); + /// Destructor + AREXPORT virtual ~ArAMPTUPacket(); + + /// Gets the unit number this packet is for + AREXPORT unsigned char getUnitNumber(void); + /// Sets the unit number htis packet is for + AREXPORT bool setUnitNumber(unsigned char unitNumber); + + AREXPORT virtual void byteToBuf(ArTypes::Byte val); + AREXPORT virtual void byte2ToBuf(ArTypes::Byte2 val); + + AREXPORT virtual void finalizePacket(void); + +protected: + unsigned char myUnitNumber; +}; + +/// Driver for the AMPTU +/// @ingroup ObscureClasses +class ArAMPTU : public ArPTZ +{ +public: + /// Constructor + AREXPORT ArAMPTU(ArRobot *robot, int unitNumber = 0); + /// Destructor + AREXPORT virtual ~ArAMPTU(); + AREXPORT virtual bool init(void); + AREXPORT virtual const char *getTypeName() { return "amptu"; } +protected: + AREXPORT virtual bool pan_i(double deg); + AREXPORT virtual bool panRel_i(double deg); + AREXPORT virtual bool tilt_i(double deg); + AREXPORT virtual bool tiltRel_i(double deg); + AREXPORT virtual bool panTilt_i(double panDeg, double tiltDeg); + AREXPORT virtual bool panTiltRel_i(double panDeg, double tiltDeg); +public: + /// Sets the rate that the camera pans at + AREXPORT bool panSlew(double deg); + /// Sets the rate the camera tilts at + AREXPORT bool tiltSlew(double deg); + virtual bool canZoom(void) const { return false; } + virtual bool canPanTiltSlew() { return true; } + + + + /// Stops current pan/tilt, can be resumed later + AREXPORT bool pause(void); + /// Resumes a previously paused pan/tilt + AREXPORT bool resume(void); + /// Stops motion and purges last command + AREXPORT bool purge(void); + /// Retrieves the camera status + AREXPORT bool requestStatus(void); + /// Gets the angle the camera is panned to + AREXPORT virtual double getPan_i(void) const { return myPan; } + /// Gets the angle the camera is tilted to + AREXPORT virtual double getTilt_i(void) const { return myTilt; } + enum { + MIN_SLEW = 15, + MAX_TILT_SLEW = 200, + MAX_PAN_SLEW = 120 + }; +protected: + ArRobot *myRobot; + ArAMPTUPacket myPacket; + int myUnitNumber; + double myPan; + double myTilt; + double myPanSlew; + double myTiltSlew; + /*double myCurPan; + double myCurTilt; + double myCurPanSlew; + double myCurTiltSlew;*/ +}; + +#endif // ARAMPTU_H + diff --git a/Legacy/Aria/include/ArASyncTask.h b/Legacy/Aria/include/ArASyncTask.h new file mode 100644 index 0000000..8528e89 --- /dev/null +++ b/Legacy/Aria/include/ArASyncTask.h @@ -0,0 +1,109 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARASYNCTASK_H +#define ARASYNCTASK_H + + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ArThread.h" + + +/// Asynchronous task (runs in its own thread) +/** + The ArAsynTask is a task that runs in its own thread. This is a + rather simple class. The user simply needs to derive their own + class from ArAsyncTask and define the runThread() function. They + then need to create an instance of their task and call run or + runAsync. The standard way to stop a task is to call stopRunning() + which sets ArThread::myRunning to false. In their run loop, they + should pay attention to the getRunning() or the ArThread::myRunning + variable. If this value goes to false, the task should clean up + after itself and exit its runThread() function. + + @ingroup UtilityClasses +**/ +class ArASyncTask : public ArThread +{ +public: + + /// Constructor + AREXPORT ArASyncTask(); + /// Destructor + AREXPORT virtual ~ArASyncTask(); + + /// The main run loop + /** + Override this function and put your taskes run loop here. Check the + value of getRunning() periodicly in your loop. If the value + is false, the loop should exit and runThread() should return. + The argument and return value are specific to the platform thread implementation, and + can be ignored. + @swignote In the wrapper libraries, this method takes no arguments and has no return value. + */ + AREXPORT virtual void * runThread(void *arg) = 0; + + /// Run without creating a new thread +/** + This will run the the ArASyncTask without creating a new + thread to run it in. It performs the needed setup then calls runThread() + directly instead of letting the system threading system do it in a new thread. +*/ + virtual void run(void) { runInThisThread(); } + + /// Run in its own thread + virtual void runAsync(void) { create(); } + + // reimplemented here just so its easier to see in the docs + /// Stop the thread + virtual void stopRunning(void) {myRunning=false;} + + /// Create the task and start it going + AREXPORT virtual int create(bool joinable=true, bool lowerPriority=true); + + /** Internal function used with system threading system to run the new thread. + In general, use run() or runAsync() instead. + @internal + */ + AREXPORT virtual void * runInThisThread(void *arg=0); + + /// Gets a string that describes what the thread is doing, or NULL if it + /// doesn't know. Override this in your subclass to return a status + /// string. This can be used for debugging or UI display. + virtual const char *getThreadActivity(void) { return NULL; } +private: + + // Hide regular Thread::Create + virtual int create(ArFunctor * /*func*/, bool /*joinable=true*/, + bool /*lowerPriority=true*/) {return(false);} + + + ArRetFunctor1C myFunc; +}; + + +#endif // ARASYNCTASK_H diff --git a/Legacy/Aria/include/ArAction.h b/Legacy/Aria/include/ArAction.h new file mode 100644 index 0000000..8974f68 --- /dev/null +++ b/Legacy/Aria/include/ArAction.h @@ -0,0 +1,142 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTION_H +#define ARACTION_H + +#include "ariaTypedefs.h" +#include "ArArg.h" +#include "ArActionDesired.h" +#include +#include + +class ArRobot; + +/** @brief Base class for actions + + @ref actions Actions are objects queried for desired behavior by + ArActionResolver to determine robot movement commands. + + To implement an action object, define a subclass of ArAction, + and implement the fire() method. You may also override + setRobot() to obtain information from ArRobot, but you + must also call ArAction::setRobot() so that the ArRobot pointer + is stored by ArAction. + + Several predefined action objects are also included in ARIA, + they are listed here as ArActions's subclasses. + + If an action is not active (it has been deactivated), then + it will be ignored by the action resolver. + Actions may be grouped using ArActionGroup, and activated/deactivated as a group. For example, ArMode, and ArServerMode (from ArNetworking), activate/deactivate action groups when switching modes. + + @see @ref actions description in the ARIA overview. + @see ArActionGroup + @see ArResolver + @see ArRobot + + @ingroup ActionClasses + @ingroup OptionalClasses +*/ +class ArAction +{ +public: + /// Constructor + AREXPORT ArAction(const char * name, const char * description = ""); + /// Desructor + AREXPORT virtual ~ArAction(); + /// Returns whether the action is active or not + AREXPORT virtual bool isActive(void) const; + /// Activate the action + AREXPORT virtual void activate(void); + /// Deactivate the action + AREXPORT virtual void deactivate(void); + /// Fires the action, returning what the action wants to do + /** + @param currentDesired this is the tentative result, based + on the resolver's processing of previous, higher-priority actions. + This is only for the purpose of giving information to the + action, changing it has no effect. + @return pointer to what this action wants to do, NULL if it wants to do + nothing. Common practice is to keep an ArActionDesired + object in your action subclass, and return a pointer to + that object. This avoids the need to create + new objects during each invocation (which could never + be deleted). + Clear your stored ArActionDesired + before modifying it with ArActionDesired::reset(). + */ + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired) = 0; + /// Sets the robot this action is driving + AREXPORT virtual void setRobot(ArRobot *robot); + /// Find the number of arguments this action takes + AREXPORT virtual int getNumArgs(void) const; +#ifndef SWIG + /** Gets the numbered argument + * @swignote Not available + */ + AREXPORT virtual const ArArg *getArg(int number) const; +#endif // SWIG + /// Gets the numbered argument + AREXPORT virtual ArArg *getArg(int number); + /// Gets the name of the action + AREXPORT virtual const char *getName(void) const; + /// Gets the long description of the action + AREXPORT virtual const char *getDescription(void) const; + /// Gets what this action wants to do (for display purposes) + AREXPORT virtual ArActionDesired *getDesired(void) { return NULL; } + /// Gets what this action wants to do (for display purposes) + AREXPORT virtual const ArActionDesired *getDesired(void) const { return NULL; } + /// Log information about this action using ArLog. + AREXPORT virtual void log(bool verbose = true) const; + + /// Get the robot we are controlling, which was set by setRobot() + AREXPORT ArRobot* getRobot() const { return myRobot; } + + /// Sets the default activation state for all ArActions + static void setDefaultActivationState(bool defaultActivationState) + { ourDefaultActivationState = defaultActivationState; } + /// Gets the default activation state for all ArActions + static bool getDefaultActivationState(void) + { return ourDefaultActivationState; } +protected: + /// Sets the argument type for the next argument (must only be used in a constructor!) + AREXPORT void setNextArgument(ArArg const &arg); + + /// The robot we are controlling, set by the action resolver using setRobot() + ArRobot *myRobot; + + // These are mostly for internal use by ArAction, not subclasses: + bool myIsActive; + int myNumArgs; + std::map myArgumentMap; + std::string myName; + std::string myDescription; + + AREXPORT static bool ourDefaultActivationState; +}; + + +#endif //ARACTION_H diff --git a/Legacy/Aria/include/ArActionAvoidFront.h b/Legacy/Aria/include/ArActionAvoidFront.h new file mode 100644 index 0000000..864f1a4 --- /dev/null +++ b/Legacy/Aria/include/ArActionAvoidFront.h @@ -0,0 +1,78 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONAVOIDFRONT_H +#define ARACTIONAVOIDFRONT_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" +#include "ArAction.h" + +/// This action does obstacle avoidance, controlling both trans and rot +/** + This action uses whatever available range device have been added to + the robot to avoid obstacles. See the ArActionAvoidFront + constructor documentation to see the parameters it takes. + + Also note that this action does something most others don't, which + is to check for a specific piece of hardware. This is the + tableSensingIR. If this is set up in the parameters for the robot, + it will use DigIn0 and DigIn1, where the tableSensingIRs are + connected. Note that if you make useTableIRIfAvail false in the + constructor it'll ignore these. Whether the action thinks the robot + has them or not depends on the value of tableSensingIR in the + parameter file for that robot. + + @ingroup ActionClasses +*/ +class ArActionAvoidFront : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionAvoidFront(const char *name = "avoid front obstacles", + double obstacleDistance = 450, double avoidVelocity = 200, + double turnAmount = 15, bool useTableIRIfAvail = true); + /// Destructor + AREXPORT virtual ~ArActionAvoidFront(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + double myTurnAmount; + double myObsDist; + double myAvoidVel; + double myTurnAmountParam; + bool myUseTableIRIfAvail; + int myTurning; // 1 for turning left, 0 for not turning, -1 for turning right + ArActionDesired myDesired; + ArSectors myQuadrants; + ArFunctorC myConnectCB; +}; + +#endif // ARACTIONAVOIDFRONT_H diff --git a/Legacy/Aria/include/ArActionAvoidSide.h b/Legacy/Aria/include/ArActionAvoidSide.h new file mode 100644 index 0000000..0280c41 --- /dev/null +++ b/Legacy/Aria/include/ArActionAvoidSide.h @@ -0,0 +1,62 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONAVOIDSIDE_H +#define ARACTIONAVOIDSIDE_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to avoid impacts by firening into walls at a shallow angle +/** + This action watches the sensors to see if it is close to firening into a wall + at a shallow enough angle that other avoidance may not avoid. + + @ingroup ActionClasses +*/ +class ArActionAvoidSide : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionAvoidSide(const char *name = "Avoid side", + double obstacleDistance = 300, + double turnAmount = 5); + /// Destructor + AREXPORT virtual ~ArActionAvoidSide(); + AREXPORT virtual ArActionDesired * fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + double myObsDist; + double myTurnAmount; + bool myTurning; + ArActionDesired myDesired; + +}; + +#endif // ARACTIONAVOIDSIDE_H diff --git a/Legacy/Aria/include/ArActionBumpers.h b/Legacy/Aria/include/ArActionBumpers.h new file mode 100644 index 0000000..18764aa --- /dev/null +++ b/Legacy/Aria/include/ArActionBumpers.h @@ -0,0 +1,77 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARACTIONBUMPERS_H +#define ARACTIONBUMPERS_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to deal with if the bumpers trigger +/** + This class basically responds to the bumpers the robot has, what + the activity things the robot has is decided by the param file. If + the robot is going forwards and bumps into something with the front + bumpers, it will back up and turn. If the robot is going backwards + and bumps into something with the rear bumpers then the robot will + move forward and turn. + + @ingroup ActionClasses +*/ + +class ArActionBumpers : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionBumpers(const char *name = "bumpers", + double backOffSpeed = 100, int backOffTime = 3000, + int turnTime = 3000, bool setMaximums = false); + /// Destructor + AREXPORT virtual ~ArActionBumpers(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + AREXPORT double findDegreesToTurn(int bumpValue, int whichBumper); + AREXPORT virtual void activate(void); +protected: + ArActionDesired myDesired; + bool mySetMaximums; + double myBackOffSpeed; + int myBackOffTime; + int myTurnTime; + //int myStopTime; + bool myFiring; + double mySpeed; + double myHeading; + int myBumpMask; + ArTime myStartBack; + //ArTime myStoppedSince; +}; + +#endif // ARACTIONBUMPERS diff --git a/Legacy/Aria/include/ArActionColorFollow.h b/Legacy/Aria/include/ArActionColorFollow.h new file mode 100644 index 0000000..975b257 --- /dev/null +++ b/Legacy/Aria/include/ArActionColorFollow.h @@ -0,0 +1,131 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONCOLORFOLLOW_H +#define ARACTIONCOLORFOLLOW_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" +#include "ArAction.h" +#include "ArACTS.h" +#include "ArPTZ.h" + +/// ArActionColorFollow is an action that moves the robot toward the +/// largest ACTS blob that appears in it's current field of view. +/// @ingroup ActionClasses +class ArActionColorFollow : public ArAction +{ + +public: + // Constructor + AREXPORT ArActionColorFollow(const char *name, + ArACTS_1_2 *acts, + ArPTZ *camera, + double speed = 200, + int width = 160, + int height = 120); + + // Destructor + AREXPORT virtual ~ArActionColorFollow(void); + + // The action + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + + // Set the ACTS channel that we want to get blob info out of + AREXPORT bool setChannel(int channel); + + // Set the camera that we will be controlling + AREXPORT void setCamera(ArPTZ *camera); + + // Toggle whether we should try to acquire a blob + // if one cannot be seen + AREXPORT void setAcquire(bool acquire); + + // Stop moving alltogether + AREXPORT void stopMovement(void); + + // Start moving + AREXPORT void startMovement(void); + + // Return the channel that we are looking for blobs on + AREXPORT int getChannel(); + + // Return whether or not we are trying to acquire a blob + // if we cannot see one + AREXPORT bool getAcquire(); + + // Return whether or not we are moving + AREXPORT bool getMovement(); + + // Return whether or not we can see a target + AREXPORT bool getBlob(); + + // The state of the action + enum TargetState + { + NO_TARGET, // There is no target in view + TARGET // There is a target in view + }; + + // The state of movement + enum MoveState + { + FOLLOWING, // Following a blob + ACQUIRING, // Searching for a blob + STOPPED // Sitting still + }; + + // The last seen location of the blob + enum LocationState + { + LEFT, // The blob is on the left side of the screen + RIGHT, // The blob is on the right side of the screen + CENTER // The blob is relatively close to the center + }; + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + ArActionDesired myDesired; + ArACTS_1_2 *myActs; + ArPTZ *myCamera; + ArTime myLastSeen; + TargetState myState; + MoveState myMove; + LocationState myLocation; + bool myAcquire; + bool killMovement; + int myChannel; + int myMaxTime; + int myHeight; + int myWidth; + double mySpeed; +}; + + +#endif // ARACTIONCOLORFOLLOW_H diff --git a/Legacy/Aria/include/ArActionConstantVelocity.h b/Legacy/Aria/include/ArActionConstantVelocity.h new file mode 100644 index 0000000..b65992c --- /dev/null +++ b/Legacy/Aria/include/ArActionConstantVelocity.h @@ -0,0 +1,56 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONCONSTANTVELOCITY_H +#define ARACTIONCONSTANTVELOCITY_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action for going straight at a constant velocity +/** + This action simply goes straight at a constant velocity. + @ingroup ActionClasses +*/ +class ArActionConstantVelocity : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionConstantVelocity(const char *name = "Constant Velocity", + double velocity = 400); + /// Destructor + AREXPORT virtual ~ArActionConstantVelocity(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + double myVelocity; + ArActionDesired myDesired; +}; + +#endif // ARACTIONCONSTANTVELOCITY_H diff --git a/Legacy/Aria/include/ArActionDeceleratingLimiter.h b/Legacy/Aria/include/ArActionDeceleratingLimiter.h new file mode 100644 index 0000000..281b0d6 --- /dev/null +++ b/Legacy/Aria/include/ArActionDeceleratingLimiter.h @@ -0,0 +1,114 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONDECELERATINGLIMITER_H +#define ARACTIONDECELERATINGLIMITER_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to limit the forwards motion of the robot based on range sensor readings +/** + This action uses the robot's range sensors (e.g. sonar, laser) to find a + maximum speed at which to travel + and will increase the deceleration so that the robot doesn't hit + anything. If it has to, it will trigger an estop to avoid a + collision. + + Note that this cranks up the deceleration with a strong strength, + but it checks to see if there is already something decelerating + more strongly... so you can put these actions lower in the priority list so + things will play together nicely. + @ingroup ActionClasses +**/ +class ArActionDeceleratingLimiter : public ArAction +{ +public: + enum LimiterType { + FORWARDS, ///< Limit forwards + BACKWARDS, ///< Limit backwards + LATERAL_LEFT, ///< Limit lateral left + LATERAL_RIGHT ///< Limit lateral right + + }; + /// Constructor + AREXPORT ArActionDeceleratingLimiter(const char *name = "limitAndDecel", + LimiterType type = FORWARDS); + /// Destructor + AREXPORT virtual ~ArActionDeceleratingLimiter(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + /// Sets the parameters (don't use this if you're using the addToConfig) + AREXPORT void setParameters(double clearance = 100, + double sideClearanceAtSlowSpeed = 50, + double paddingAtSlowSpeed = 50, + double slowSpeed = 200, + double sideClearanceAtFastSpeed = 400, + double paddingAtFastSpeed = 300, + double fastSpeed = 1000, + double preferredDecel = 600, + bool useEStop = false, + double maxEmergencyDecel = 0); + /// Gets if this will control us when going forwards + LimiterType getType(void) { return myType; } + /// Sets if this will control us when going forwards + void setType(LimiterType type) { myType = type; } + /// Adds to the ArConfig given, in section, with prefix + AREXPORT void addToConfig(ArConfig *config, const char *section, + const char *prefix = NULL); + /// Sets if we're using locationDependent range devices or not + bool getUseLocationDependentDevices(void) + { return myUseLocationDependentDevices; } + /// Sets if we're using locationDependent range devices or not + void setUseLocationDependentDevices(bool useLocationDependentDevices) + { myUseLocationDependentDevices = useLocationDependentDevices; } + // sets if we should stop rotation too if this action has stopped the robot + void setStopRotationToo(bool stopRotationToo) + { myStopRotationToo = stopRotationToo; } +protected: + bool myLastStopped; + LimiterType myType; + double myClearance; + double mySideClearanceAtSlowSpeed; + double myPaddingAtSlowSpeed; + double mySlowSpeed; + double mySideClearanceAtFastSpeed; + double myPaddingAtFastSpeed; + double myFastSpeed; + double myPreferredDecel; + double myMaxEmergencyDecel; + bool myUseEStop; + bool myUseLocationDependentDevices; + bool myStopRotationToo; + +//unused? double myDecelerateDistance; + ArActionDesired myDesired; +}; + +#endif // ARACTIONSPEEDLIMITER_H diff --git a/Legacy/Aria/include/ArActionDesired.h b/Legacy/Aria/include/ArActionDesired.h new file mode 100644 index 0000000..fc0ee67 --- /dev/null +++ b/Legacy/Aria/include/ArActionDesired.h @@ -0,0 +1,878 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONDESIRED_H +#define ARACTIONDESIRED_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +/// Class used by ArActionDesired for each channel, internal +class ArActionDesiredChannel +{ +public: + AREXPORT static const double NO_STRENGTH; + AREXPORT static const double MIN_STRENGTH; + AREXPORT static const double MAX_STRENGTH; + + ArActionDesiredChannel() { reset(); myOverrideDoesLessThan = true; } + ~ArActionDesiredChannel() {} + void setOverrideDoesLessThan(bool overrideDoesLessThan) + { myOverrideDoesLessThan = overrideDoesLessThan; } + void setDesired(double desired, double desiredStrength, + bool allowOverride = false) + { + myDesired = desired; + myStrength = desiredStrength; + myAllowOverride = allowOverride; + if (myStrength > MAX_STRENGTH) + myStrength = MAX_STRENGTH; + if (myStrength < MIN_STRENGTH) + myStrength = NO_STRENGTH; + } + double getDesired(void) const { return myDesired; } + double getStrength(void) const { return myStrength; } + double getAllowOverride(void) const { return myAllowOverride; } + void reset(void) + { myDesired = 0; myStrength = NO_STRENGTH; myAllowOverride = true; } + void merge(ArActionDesiredChannel *desiredChannel) + { + double otherStrength = desiredChannel->getStrength(); + double oldStrength = myStrength; + if (myStrength + otherStrength > MAX_STRENGTH) + otherStrength = MAX_STRENGTH - myStrength; + myStrength = myStrength + otherStrength; + myAllowOverride = myAllowOverride && desiredChannel->getAllowOverride(); + // if we're allowing override just set myDesired to the least + // (or greatest) value + if (myAllowOverride && myStrength >= MIN_STRENGTH) + { + // if both have strength get the min/max + if (oldStrength >= MIN_STRENGTH && + desiredChannel->getStrength() >= MIN_STRENGTH) + { + if (myOverrideDoesLessThan) + myDesired = ArUtil::findMin(myDesired, + desiredChannel->getDesired()); + else if (!myOverrideDoesLessThan) + myDesired = ArUtil::findMax(myDesired, + desiredChannel->getDesired()); + } + // if only it has strength use it + else if (desiredChannel->getStrength() >= MIN_STRENGTH) + { + myDesired = desiredChannel->getDesired(); + } + // if only this has strength then we don't need to do anything + } + else if (myStrength >= MIN_STRENGTH) + myDesired = (((oldStrength * myDesired) + + (desiredChannel->getDesired() * otherStrength)) + / (myStrength)); + } + void startAverage(void) + { + myDesiredTotal = myDesired * myStrength; + myStrengthTotal = myStrength; + } + void addAverage(ArActionDesiredChannel *desiredChannel) + { + myAllowOverride = myAllowOverride && desiredChannel->getAllowOverride(); + // if we're allowing override then myDesired is just the least + // of the values thats going to come through... still compute + // the old way in case something doesn't want to override it + if (myAllowOverride) + { + // if both have strength get the min/max + if (myStrength >= MIN_STRENGTH && + desiredChannel->getStrength() >= MIN_STRENGTH) + { + if (myOverrideDoesLessThan) + myDesired = ArUtil::findMin(myDesired, + desiredChannel->getDesired()); + else if (!myOverrideDoesLessThan) + myDesired = ArUtil::findMax(myDesired, + desiredChannel->getDesired()); + } + // if only it has strength use it + else if (desiredChannel->getStrength() >= MIN_STRENGTH) + { + myDesired = desiredChannel->getDesired(); + } + // if only this has strength then we don't need to do anything + } + myDesiredTotal += (desiredChannel->getDesired() * + desiredChannel->getStrength()); + myStrengthTotal += desiredChannel->getStrength(); + } + void endAverage(void) + { + if (myStrengthTotal < MIN_STRENGTH) + { + myStrength = NO_STRENGTH; + return; + } + // if we're overriding we just use what myDesired already is + if (!myAllowOverride) + myDesired = (myDesiredTotal / myStrengthTotal); + myStrength = myStrengthTotal; + if (myStrength > MAX_STRENGTH) + myStrength = MAX_STRENGTH; + } + /// do some bounds checking + void checkLowerBound(const char *actionName, const char *typeName, + int lowerBound) + { + // if it has no strength, just return + if (myStrength < MIN_STRENGTH) + return; + + if (ArMath::roundInt(myDesired) < lowerBound) + { + ArLog::log(ArLog::Terse, + "ActionSanityChecking: '%s' tried to set %s to %g (which wound wind up less than %d and will be set to %d)", + actionName, typeName, myDesired, lowerBound, lowerBound); + myDesired = lowerBound; + return; + } + } + /// do some bounds checking + void checkUpperBound(const char *actionName, const char *typeName, + int upperBound) + { + // if it has no strength, just return + if (myStrength < MIN_STRENGTH) + return; + + if (ArMath::roundInt(myDesired) > upperBound) + { + ArLog::log(ArLog::Terse, + "ActionSanityChecking: '%s' tried to set %s to %g (which would wind up greater than %d and will be set to %d)", + actionName, typeName, myDesired, upperBound, upperBound); + myDesired = upperBound; + return; + } + } + + +protected: + double myDesired; + double myStrength; + bool myAllowOverride; + double myDesiredTotal; + double myStrengthTotal; + bool myOverrideDoesLessThan; +}; + +/// Contains values returned by ArAction objects expressing desired motion commands to resolver +/** + This class is use by actions to report what want movement commands they want. + The action resolver combines the ArActionDesired objects returned by different actions. + + A brief summary follows. For a fuller explanation of actions, see @ref actions. + + Different values are organized into different "channels". + Translational (front/back) and rotational (right/left) movements are separate + channels. Translational movement uses velocity, while rotational movement uses + change in heading from current heading. + Each channel has a strength value. + Both translational and rotational movement have maximum velocities as well, + that also have their own strengths. + + The strength value reflects how strongly an action wants to do the chosen + movement command, the resolver (ArResolver) will combine these strengths + and figure out what to do based on them. + + For all strength values there is a total of 1.0 combined strength avaliable. + The range for strength is from 0 to 1. This is simply a convention that + ARIA uses by default, if you don't like it, you could override this + class the ArResolver class. + + Note that for the different maximum/accel/decel values they take an + additional argument of whether just to use the slowest speed, + slowest accel, or fastest decel. By default these will just use + safer values (slowest speed, slowest accel, fastest decel)... you + can specify false on these for the old behavior. Note that if + you're safest values then the strength is largely ignored though it + is still tracked and must still be greater than MIN_STRENGTH to + work and it is still capped at MAX_STRENGTH). + + @sa @ref actions + +*/ +class ArActionDesired +{ +public: + AREXPORT static const double NO_STRENGTH; + AREXPORT static const double MIN_STRENGTH; + AREXPORT static const double MAX_STRENGTH; + /// Constructor + ArActionDesired() + { + myHeadingSet = false; + myTransDecelDes.setOverrideDoesLessThan(false); + myRotDecelDes.setOverrideDoesLessThan(false); + myMaxNegVelDes.setOverrideDoesLessThan(false); + } + /// Destructor + virtual ~ArActionDesired() {} + + /// Sets the velocity (mm/sec) and strength + /** + @param vel desired vel (mm/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + */ + virtual void setVel(double vel, double strength = MAX_STRENGTH) + { myVelDes.setDesired(vel, strength); } + /// Sets the delta heading (deg) and strength + /** + If there's already a rotVel set this WILL NOT work. + @param deltaHeading desired change in heading (deg) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + */ + virtual void setDeltaHeading(double deltaHeading, + double strength = MAX_STRENGTH) + { myDeltaHeadingDes.setDesired(deltaHeading, strength); } + /// Sets the absolute heading (deg) + /** + If there's already a rotVel set this WILL NOT work. + This is a way to set the heading instead of using a delta, there is no + get for this, because accountForRobotHeading MUST be called (this should + be called by all resolvers, but if you want to call it you can, + thats fine). + @param heading desired heading (deg) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + */ + virtual void setHeading(double heading, double strength = MAX_STRENGTH) + { myHeading = heading; myHeadingStrength = strength; myHeadingSet = true; } + + /// Sets the rotational velocity + /** + If there's already a delta heading or heading this WILL NOT work. + @param rotVel desired rotational velocity (deg/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + **/ + virtual void setRotVel(double rotVel, double strength = MAX_STRENGTH) + { myRotVelDes.setDesired(rotVel, strength); } + + /// Sets the maximum velocity (+mm/sec) and strength + /** + This sets the maximum positive velocity for this cycle. Check + the ArRobot class notes for more details. + + @param maxVel desired maximum velocity (+mm/sec) + @param strength strength given to this, defaults to MAX_STRENGTH + (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest maximum vel is what will be selected + **/ + virtual void setMaxVel(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxVelDes.setDesired(maxVel, strength, useSlowest); } + /// Sets the maximum velocity for going backwards (-mm/sec) and strength + /** + This sets the maximum negative velocity for this cycle. Check + the ArRobot class notes for more details. + + @param maxVel desired maximum velocity for going backwards (-mm/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest max neg vel is what will be selected + **/ + virtual void setMaxNegVel(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxNegVelDes.setDesired(maxVel, strength, useSlowest); } + + /// Sets the translation acceleration (deg/sec/sec) and strength + /** + This sets the translation acceleration for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param transAccel desired translation acceleration (deg/sec/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere then + the slowest accel is what will be selected + **/ + virtual void setTransAccel(double transAccel, + double strength = MAX_STRENGTH, + bool useSlowest = true) + { myTransAccelDes.setDesired(transAccel, strength, useSlowest); } + + /// Sets the translation deceleration (deg/sec/sec) and strength + /** + This sets the translation deceleration for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param transDecel desired translation deceleration (deg/sec/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useFastestDecel if this is true (the default) everywhere + then the fastest decel is what will be selected + **/ + virtual void setTransDecel(double transDecel, double strength = MAX_STRENGTH, + bool useFastestDecel = true) + { myTransDecelDes.setDesired(transDecel, strength, useFastestDecel); } + + /// Sets the maximum rotational velocity (deg/sec) and strength + /** + This sets the maximum rotational velocity for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param maxVel desired maximum rotational velocity (deg/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest rot vel is what will be selected + **/ + virtual void setMaxRotVel(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxRotVelDes.setDesired(maxVel, strength, useSlowest); } + + /// Sets the maximum rotational velocity (deg/sec) in the positive direction and strength + /** + This sets the maximum rotational velocity for this cycle (this is + sent down to the robot) in the positive direction. If the + setMaxRotVel is set to less than this that will be used instead. + Check the ArRobot class notes for more details. + + @param maxVel desired maximum rotational velocity in the positive + direction (deg/sec) + + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + + @param useSlowest if this is true (the default) everywhere + then the slowest rot vel is what will be selected + **/ + virtual void setMaxRotVelPos(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxRotVelPosDes.setDesired(maxVel, strength, useSlowest); } + + /// Sets the maximum rotational velocity (deg/sec) in the negative direction and strength + /** + This sets the maximum rotational velocity for this cycle (this is + sent down to the robot) in the negative direction. If the + setMaxRotVel is set to less than this that will be used instead. + Check the ArRobot class notes for more details. + + @param maxVel desired maximum rotational velocity in the negative + direction (deg/sec) + + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + + @param useSlowest if this is true (the default) everywhere + then the slowest rot vel is what will be selected + **/ + virtual void setMaxRotVelNeg(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxRotVelNegDes.setDesired(maxVel, strength, useSlowest); } + + /// Sets the rotational acceleration (deg/sec/sec) and strength + /** + This sets the rotational acceleration for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param rotAccel desired rotational acceleration (deg/sec/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest rot accel is what will be selected + **/ + virtual void setRotAccel(double rotAccel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myRotAccelDes.setDesired(rotAccel, strength, useSlowest); } + + /// Sets the rotational deceleration (deg/sec/sec) and strength + /** + This sets the rotational deceleration for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param rotDecel desired rotational deceleration (deg/sec/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useFastest if this is true (the default) everywhere + then the fastest rot decel is what will be selected + **/ + virtual void setRotDecel(double rotDecel, double strength = MAX_STRENGTH, + bool useFastest = true) + { myRotDecelDes.setDesired(rotDecel, strength, useFastest); } + + /// Sets the left lateral velocity (mm/sec) and strength + /** + Note that there is only one actual velocity for lat vel, but + instead of making people remember which way is left and right + there are two functions, setLeftLatVel and setRightLatVel... all + setRightLatVel does is flip the direction on the vel. You can + set a negative left lat vel and thats the same as setting a + positive right vel. You can do the same with setting a negative + right vel to get a positive left vel. + + @param latVel desired vel (mm/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + */ + virtual void setLeftLatVel(double latVel, double strength = MAX_STRENGTH) + { myLatVelDes.setDesired(latVel, strength); } + /// Sets the right lateral velocity (mm/sec) and strength + /** + Note that there is only one actual velocity for lat vel, but + instead of making people remember which way is left and right + there are two functions, setLeftLatVel and setRightLatVel... all + setRightLatVel does is flip the direction on the vel. You can + set a negative left lat vel and thats the same as setting a + positive right vel. You can do the same with setting a negative + right vel to get a positive left vel. + + @param latVel desired vel (mm/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + */ + virtual void setRightLatVel(double latVel, double strength = MAX_STRENGTH) + { myLatVelDes.setDesired(-latVel, strength); } + /// Sets the maximum lateral velocity (deg/sec) and strength + /** + This sets the maximum lateral velocity for this cycle. Check + the ArRobot class notes for more details. + + @param maxVel desired maximum lateral velocity (deg/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest lat vel is what will be selected + **/ + virtual void setMaxLeftLatVel(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxLeftLatVelDes.setDesired(maxVel, strength, useSlowest); } + /// Sets the maximum lateral velocity (deg/sec) and strength + /** + This sets the maximum lateral velocity for this cycle. Check + the ArRobot class notes for more details. + + @param maxVel desired maximum lateral velocity (deg/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest lat vel is what will be selected + **/ + virtual void setMaxRightLatVel(double maxVel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myMaxRightLatVelDes.setDesired(maxVel, strength, useSlowest); } + + /// Sets the lateral acceleration (deg/sec/sec) and strength + /** + This sets the lateral acceleration for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param latAccel desired lateral acceleration (deg/sec/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useSlowest if this is true (the default) everywhere + then the slowest lat accel is what will be selected + **/ + virtual void setLatAccel(double latAccel, double strength = MAX_STRENGTH, + bool useSlowest = true) + { myLatAccelDes.setDesired(latAccel, strength, useSlowest); } + + /// Sets the lateral deceleration (deg/sec/sec) and strength + /** + This sets the lateral deceleration for this cycle (this is + sent down to the robot). Check the ArRobot class notes for more + details. + + @param latDecel desired lateral deceleration (deg/sec/sec) + @param strength strength given to this, defaults to MAX_STRENGTH (1.0) + @param useFastest if this is true (the default) everywhere + then the fastest lat decel is what will be selected + **/ + virtual void setLatDecel(double latDecel, double strength = MAX_STRENGTH, + bool useFastest = true) + { myLatDecelDes.setDesired(latDecel, strength, useFastest); } + + /// Resets the strengths to 0 + virtual void reset(void) + { + myVelDes.reset(); + myMaxVelDes.reset(); myMaxNegVelDes.reset(); + myTransAccelDes.reset(); myTransDecelDes.reset(); + + myRotVelDes.reset(); myDeltaHeadingDes.reset(); + myMaxRotVelDes.reset(); + myMaxRotVelPosDes.reset(); myMaxRotVelNegDes.reset(); + myRotAccelDes.reset(); myRotDecelDes.reset(); + myHeadingStrength = 0; + myHeadingSet = false; + + myLatVelDes.reset(); + myMaxLeftLatVelDes.reset(); myMaxRightLatVelDes.reset(); + myLatAccelDes.reset(); myLatDecelDes.reset(); + } + + /// Gets the translational velocity desired (mm/sec) + virtual double getVel(void) const + { return myVelDes.getDesired(); } + /// Gets the strength of the translational velocity desired + virtual double getVelStrength(void) const + { return myVelDes.getStrength(); } + /// Gets the heading desired (deg) + virtual double getHeading(void) const + { return myHeading; } + /// Gets the strength of the heading desired + virtual double getHeadingStrength(void) const + { return myHeadingStrength; } + /// Gets the delta heading desired (deg) + virtual double getDeltaHeading(void) const + { return myDeltaHeadingDes.getDesired(); } + /// Gets the strength of the delta heading desired + virtual double getDeltaHeadingStrength(void) const + { return myDeltaHeadingDes.getStrength(); } + /// Gets the rot vel that was set + virtual double getRotVel(void) const { return myRotVelDes.getDesired(); } + /// Gets the rot vel des (deg/sec) + virtual double getRotVelStrength(void) const + { return myRotVelDes.getStrength(); } + + /// Gets the desired maximum velocity (mm/sec) + virtual double getMaxVel(void) const + { return myMaxVelDes.getDesired(); } + /// Gets the maximum velocity strength + virtual double getMaxVelStrength(void) const + { return myMaxVelDes.getStrength(); } + /// Gets whether the slowest is being used or not + virtual double getMaxVelSlowestUsed(void) const + { return myMaxVelDes.getAllowOverride(); } + /// Gets the desired maximum negative velocity (-mm/sec) + virtual double getMaxNegVel(void) const + { return myMaxNegVelDes.getDesired(); } + /// Gets the desired maximum negative velocity strength + virtual double getMaxNegVelStrength(void) const + { return myMaxNegVelDes.getStrength(); } + /// Gets whether the slowest is being used or not + virtual double getMaxNegVelSlowestUsed(void) const + { return myMaxNegVelDes.getAllowOverride(); } + /// Gets the desired trans acceleration (mm/sec) + virtual double getTransAccel(void) const + { return myTransAccelDes.getDesired(); } + /// Gets the desired trans acceleration strength + virtual double getTransAccelStrength(void) const + { return myTransAccelDes.getStrength(); } + /// Gets whether the slowest accel is being used or not + virtual double getTransAccelSlowestUsed(void) const + { return myTransAccelDes.getAllowOverride(); } + /// Gets the desired trans deceleration (-mm/sec/sec) + virtual double getTransDecel(void) const + { return myTransDecelDes.getDesired(); } + /// Gets the desired trans deceleration strength + virtual double getTransDecelStrength(void) const + { return myTransDecelDes.getStrength(); } + /// Gets whether the fastest decel is being used or not + virtual double getTransDecelFastestUsed(void) const + { return myTransDecelDes.getAllowOverride(); } + + /// Gets the maximum rotational velocity + virtual double getMaxRotVel(void) const + { return myMaxRotVelDes.getDesired(); } + /// Gets the maximum rotational velocity strength + virtual double getMaxRotVelStrength(void) const + { return myMaxRotVelDes.getStrength(); } + /// Gets whether the slowest rot vel is being used or not + virtual double getMaxRotVelSlowestUsed(void) const + { return myMaxRotVelDes.getAllowOverride(); } + + /// Gets the maximum rotational velocity in the positive direction + virtual double getMaxRotVelPos(void) const + { return myMaxRotVelPosDes.getDesired(); } + /// Gets the maximum rotational velocity in the positive direction strength + virtual double getMaxRotVelPosStrength(void) const + { return myMaxRotVelPosDes.getStrength(); } + /// Gets whether the slowest rot vel in the positive direction is being used or not + virtual double getMaxRotVelPosSlowestUsed(void) const + { return myMaxRotVelPosDes.getAllowOverride(); } + + /// Gets the maximum rotational velocity in the negative direction + virtual double getMaxRotVelNeg(void) const + { return myMaxRotVelNegDes.getDesired(); } + /// Gets the maximum rotational velocity in the negative direction strength + virtual double getMaxRotVelNegStrength(void) const + { return myMaxRotVelNegDes.getStrength(); } + /// Gets whether the slowest rot vel in the negative direction is being used or not + virtual double getMaxRotVelNegSlowestUsed(void) const + { return myMaxRotVelNegDes.getAllowOverride(); } + + /// Gets the desired rotational acceleration (mm/sec) + virtual double getRotAccel(void) const + { return myRotAccelDes.getDesired(); } + /// Gets the desired rotational acceleration strength + virtual double getRotAccelStrength(void) const + { return myRotAccelDes.getStrength(); } + /// Gets whether the slowest rot accel is being used or not + virtual double getRotAccelSlowestUsed(void) const + { return myRotAccelDes.getAllowOverride(); } + /// Gets the desired rotational deceleration (-mm/sec/sec) + virtual double getRotDecel(void) const + { return myRotDecelDes.getDesired(); } + /// Gets the desired rotational deceleration strength + virtual double getRotDecelStrength(void) const + { return myRotDecelDes.getStrength(); } + /// Gets whether the fastest rot decel is being used or not + virtual double getRotDecelFastestUsed(void) const + { return myRotDecelDes.getAllowOverride(); } + + /// Gets the lat vel that was set + virtual double getLatVel(void) const { return myLatVelDes.getDesired(); } + /// Gets the lat vel des (deg/sec) + virtual double getLatVelStrength(void) const + { return myLatVelDes.getStrength(); } + /// Gets the maximum lateral velocity + virtual double getMaxLeftLatVel(void) const + { return myMaxLeftLatVelDes.getDesired(); } + /// Gets the maximum lateral velocity strength + virtual double getMaxLeftLatVelStrength(void) const + { return myMaxLeftLatVelDes.getStrength(); } + /// Gets whether the slowest lat vel is being used or not + virtual double getMaxLeftLatVelSlowestUsed(void) const + { return myMaxLeftLatVelDes.getAllowOverride(); } + /// Gets the maximum lateral velocity + virtual double getMaxRightLatVel(void) const + { return myMaxRightLatVelDes.getDesired(); } + /// Gets the maximum lateral velocity strength + virtual double getMaxRightLatVelStrength(void) const + { return myMaxRightLatVelDes.getStrength(); } + /// Gets whether the slowest lat vel is being used or not + virtual double getMaxRightLatVelSlowestUsed(void) const + { return myMaxRightLatVelDes.getAllowOverride(); } + /// Gets the desired lateral acceleration (mm/sec) + virtual double getLatAccel(void) const + { return myLatAccelDes.getDesired(); } + /// Gets the desired lateral acceleration strength + virtual double getLatAccelStrength(void) const + { return myLatAccelDes.getStrength(); } + /// Gets whether the slowest lat accel is being used or not + virtual double getLatAccelSlowestUsed(void) const + { return myLatAccelDes.getAllowOverride(); } + /// Gets the desired lateral deceleration (-mm/sec/sec) + virtual double getLatDecel(void) const + { return myLatDecelDes.getDesired(); } + /// Gets the desired lateral deceleration strength + virtual double getLatDecelStrength(void) const + { return myLatDecelDes.getStrength(); } + /// Gets whether the fastest lat decel is being used or not + virtual double getLatDecelFastestUsed(void) const + { return myLatDecelDes.getAllowOverride(); } + + + /// Merges the given ArActionDesired into this one (this one has precedence), + /// internal + /** + This merges in the two different action values, accountForRobotHeading + MUST be done before this is called (on both actions), since this merges + their delta headings, and the deltas can't be known unless the account + for angle is done. + @param actDesired the actionDesired to merge with this one + */ + virtual void merge(ArActionDesired *actDesired) + { + if (actDesired == NULL) + return; + myVelDes.merge(&actDesired->myVelDes); + // if we're already using rot or delt use that, otherwise use what it wants + if (myDeltaHeadingDes.getStrength() > NO_STRENGTH) + { + myDeltaHeadingDes.merge(&actDesired->myDeltaHeadingDes); + } + else if (myRotVelDes.getStrength() > NO_STRENGTH) + { + myRotVelDes.merge(&actDesired->myRotVelDes); + } + else + { + myDeltaHeadingDes.merge(&actDesired->myDeltaHeadingDes); + myRotVelDes.merge(&actDesired->myRotVelDes); + } + myMaxVelDes.merge(&actDesired->myMaxVelDes); + myMaxNegVelDes.merge(&actDesired->myMaxNegVelDes); + myMaxRotVelDes.merge(&actDesired->myMaxRotVelDes); + myMaxRotVelPosDes.merge(&actDesired->myMaxRotVelPosDes); + myMaxRotVelNegDes.merge(&actDesired->myMaxRotVelNegDes); + myTransAccelDes.merge(&actDesired->myTransAccelDes); + myTransDecelDes.merge(&actDesired->myTransDecelDes); + myRotAccelDes.merge(&actDesired->myRotAccelDes); + myRotDecelDes.merge(&actDesired->myRotDecelDes); + + myLatVelDes.merge(&actDesired->myLatVelDes); + myMaxLeftLatVelDes.merge(&actDesired->myMaxLeftLatVelDes); + myMaxRightLatVelDes.merge(&actDesired->myMaxRightLatVelDes); + myLatAccelDes.merge(&actDesired->myLatAccelDes); + myLatDecelDes.merge(&actDesired->myLatDecelDes); + } + /// Starts the process of avereraging together different desireds + /** + There is a three step process for averaging actionDesireds together, + first startAverage must be done to set up the process, then addAverage + must be done with each average that is desired, then finally endAverage + should be used, after that is done then the normal process of getting + the results out should be done. + */ + virtual void startAverage(void) + { + myVelDes.startAverage(); + myMaxVelDes.startAverage(); + myMaxNegVelDes.startAverage(); + myTransAccelDes.startAverage(); + myTransDecelDes.startAverage(); + + + myRotVelDes.startAverage(); + myDeltaHeadingDes.startAverage(); + myMaxRotVelDes.startAverage(); + myMaxRotVelPosDes.startAverage(); + myMaxRotVelNegDes.startAverage(); + myRotAccelDes.startAverage(); + myRotDecelDes.startAverage(); + + myLatVelDes.startAverage(); + myMaxLeftLatVelDes.startAverage(); + myMaxRightLatVelDes.startAverage(); + myLatAccelDes.startAverage(); + myLatDecelDes.startAverage(); + } + /// Adds another actionDesired into the mix to average + /** + For a description of how to use this, see startAverage. + @param actDesired the actionDesired to add into the average + */ + virtual void addAverage(ArActionDesired *actDesired) + { + if (actDesired == NULL) + return; + myVelDes.addAverage(&actDesired->myVelDes); + + myMaxVelDes.addAverage(&actDesired->myMaxVelDes); + myMaxNegVelDes.addAverage(&actDesired->myMaxNegVelDes); + myTransAccelDes.addAverage(&actDesired->myTransAccelDes); + myTransDecelDes.addAverage(&actDesired->myTransDecelDes); + + // if we're using one of rot or delta heading use that, + // otherwise use whatever they're using + if (myRotVelDes.getStrength() > NO_STRENGTH) + { + myRotVelDes.addAverage( + &actDesired->myRotVelDes); + } + else if (myDeltaHeadingDes.getStrength() > NO_STRENGTH) + { + myDeltaHeadingDes.addAverage( + &actDesired->myDeltaHeadingDes); + } + else + { + myRotVelDes.addAverage( + &actDesired->myRotVelDes); + myDeltaHeadingDes.addAverage( + &actDesired->myDeltaHeadingDes); + } + myMaxRotVelDes.addAverage(&actDesired->myMaxRotVelDes); + myMaxRotVelPosDes.addAverage(&actDesired->myMaxRotVelPosDes); + myMaxRotVelNegDes.addAverage(&actDesired->myMaxRotVelNegDes); + myRotAccelDes.addAverage(&actDesired->myRotAccelDes); + myRotDecelDes.addAverage(&actDesired->myRotDecelDes); + + myLatVelDes.addAverage(&actDesired->myLatVelDes); + myMaxLeftLatVelDes.addAverage(&actDesired->myMaxLeftLatVelDes); + myMaxRightLatVelDes.addAverage(&actDesired->myMaxRightLatVelDes); + myLatAccelDes.addAverage(&actDesired->myLatAccelDes); + myLatDecelDes.addAverage(&actDesired->myLatDecelDes); + } + /// Ends the process of avereraging together different desireds + /** + For a description of how to use this, see startAverage. + */ + virtual void endAverage(void) + { + myVelDes.endAverage(); + myMaxVelDes.endAverage(); + myMaxNegVelDes.endAverage(); + myTransAccelDes.endAverage(); + myTransDecelDes.endAverage(); + + myRotVelDes.endAverage(); + myDeltaHeadingDes.endAverage(); + myMaxRotVelDes.endAverage(); + myMaxRotVelPosDes.endAverage(); + myMaxRotVelNegDes.endAverage(); + myRotAccelDes.endAverage(); + myRotDecelDes.endAverage(); + + myLatVelDes.endAverage(); + myMaxLeftLatVelDes.endAverage(); + myMaxRightLatVelDes.endAverage(); + myLatAccelDes.endAverage(); + myLatDecelDes.endAverage(); + } + /// Accounts for robot heading, mostly internal + /** + This accounts for the robots heading, and transforms the set heading + on this actionDesired into a delta heading so it can be merged and + averaged and the like + @param robotHeading the heading the real actual robot is at now + */ + virtual void accountForRobotHeading(double robotHeading) + { + if (myHeadingSet) + setDeltaHeading(ArMath::subAngle(myHeading, robotHeading), + myHeadingStrength); + myHeadingSet = false; + } + /// Logs what is desired + AREXPORT virtual void log(void) const; + /// Gets whether anything is desired (should only really be used in relation to logging) + AREXPORT virtual bool isAnythingDesired(void) const; + /// Do a sanity check on the action (this is set up this way so the + /// action name can be passed in) + AREXPORT virtual void sanityCheck(const char *actionName); + +protected: + double myHeading; + double myHeadingStrength; + bool myHeadingSet; + + ArActionDesiredChannel myVelDes; + ArActionDesiredChannel myMaxVelDes; + ArActionDesiredChannel myMaxNegVelDes; + ArActionDesiredChannel myTransAccelDes; + ArActionDesiredChannel myTransDecelDes; + + ArActionDesiredChannel myRotVelDes; + ArActionDesiredChannel myDeltaHeadingDes; + ArActionDesiredChannel myMaxRotVelDes; + ArActionDesiredChannel myMaxRotVelPosDes; + ArActionDesiredChannel myMaxRotVelNegDes; + ArActionDesiredChannel myRotAccelDes; + ArActionDesiredChannel myRotDecelDes; + + ArActionDesiredChannel myLatVelDes; + ArActionDesiredChannel myMaxLeftLatVelDes; + ArActionDesiredChannel myMaxRightLatVelDes; + ArActionDesiredChannel myLatAccelDes; + ArActionDesiredChannel myLatDecelDes; +}; + + +#endif diff --git a/Legacy/Aria/include/ArActionDriveDistance.h b/Legacy/Aria/include/ArActionDriveDistance.h new file mode 100644 index 0000000..d1f6951 --- /dev/null +++ b/Legacy/Aria/include/ArActionDriveDistance.h @@ -0,0 +1,108 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONDRIVEDISTANCE_H +#define ARACTIONDRIVEDISTANCE_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArAction.h" + +/// This action goes to a given ArPose very naively + +/** + This action naively drives a fixed distance. The action stops the + robot when it has travelled the appropriate distance. It + travels at 'speed' mm/sec. + + You can give it a distance with setDistance(), cancel its movement + with cancelDistance(), and see if it got there with + haveAchievedDistance(). + + You can tell it to go backwards by calling setDistance with a + negative value. + + This doesn't avoid obstacles or anything, you could add have an + limiting ArAction at a higher priority to try to do this (so you + don't smash things). (For truly intelligent navigation, see + the ARNL or SONARNL software libraries.) + @ingroup ActionClasses +**/ + + +class ArActionDriveDistance : public ArAction +{ +public: + AREXPORT ArActionDriveDistance(const char *name = "driveDistance", + double speed = 400, double deceleration = 200); + AREXPORT virtual ~ArActionDriveDistance(); + + /// Sees if the goal has been achieved + AREXPORT bool haveAchievedDistance(void); + /// Cancels the goal the robot has + AREXPORT void cancelDistance(void); + /// Sets a new goal and sets the action to go there + AREXPORT void setDistance(double distance, bool useEncoders = true); + /// Gets whether we're using the encoder position or the normal position + bool usingEncoders(void) { return myUseEncoders; } + /// Sets the speed the action will travel at (mm/sec) + void setSpeed(double speed = 400) { mySpeed = speed; } + /// Gets the speed the action will travel at (mm/sec) + double getSpeed(void) { return mySpeed; } + /// Sets the deceleration the action will use (mm/sec/sec) + void setDeceleration(double deceleration = 200) + { myDeceleration = deceleration; } + /// Gets the deceleration the action will use (mm/sec/sec) + double getDeceleration(void) { return myDeceleration; } + /// Sets if we're printing or not + void setPrinting(bool printing) { myPrinting = printing; } + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + double myDistance; + bool myUseEncoders; + double mySpeed; + double myDeceleration; + ArActionDesired myDesired; + bool myPrinting; + double myLastVel; + + double myDistTravelled; + ArPose myLastPose; + + enum State + { + STATE_NO_DISTANCE, + STATE_ACHIEVED_DISTANCE, + STATE_GOING_DISTANCE + }; + State myState; +}; + +#endif // ARACTIONDRIVE diff --git a/Legacy/Aria/include/ArActionGoto.h b/Legacy/Aria/include/ArActionGoto.h new file mode 100644 index 0000000..f70bc31 --- /dev/null +++ b/Legacy/Aria/include/ArActionGoto.h @@ -0,0 +1,122 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONGOTO_H +#define ARACTIONGOTO_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArAction.h" + +/// This action goes to a given ArPose very naively + +/** + This action naively drives straight towards a given ArPose. the + action stops when it gets to be a certain distance (closeDist) + from the goal pose. It travels at the given speed (mm/sec). + + You can give it a new goal with setGoal(), clear the current goal + with cancelGoal(), and see if it got there with haveAchievedGoal(). + Once the goal is reached, this action stops requesting any action. + + This doesn't avoid obstacles or anything, you could have an avoid + routine at a higher priority to avoid on the way there... but for + real and intelligent looking navigation you should use something + like ARNL, or build on these actions. + @ingroup ActionClasses +**/ + + +class ArActionGoto : public ArAction +{ +public: + AREXPORT ArActionGoto(const char *name = "goto", + ArPose goal = ArPose(0.0, 0.0, 0.0), + double closeDist = 100, double speed = 400, + double speedToTurnAt = 150, double turnAmount = 7); + AREXPORT virtual ~ArActionGoto(); + + /** Sees if the goal has been achieved. The goal is achieved when + * the robot's repordet position is within a certain distance + * (given in the constructor or in setCloseDist) from the goal pose. */ + AREXPORT bool haveAchievedGoal(void); + + /** Cancels the goal; this action will stop requesting movement. However, + * any currently requested motion (either previously requested by this + * action or by another action) will continue to be used. Use an ArActionStop + * action (activate it, or set it at a lower priority) to stop the robot. + */ + AREXPORT void cancelGoal(void); + + /// Sets a new goal and sets the action to go there + AREXPORT void setGoal(ArPose goal); + + /// Gets the goal the action has + AREXPORT ArPose getGoal(void) { return myGoal; } + + /// Set the distance which is close enough to the goal (mm); + AREXPORT void setCloseDist(double closeDist) { myCloseDist = closeDist; } + /// Gets the distance which is close enough to the goal (mm) + AREXPORT double getCloseDist(void) { return myCloseDist; } + /// Sets the speed the action will travel to the goal at (mm/sec) + AREXPORT void setSpeed(double speed) { mySpeed = speed; } + /// Gets the speed the action will travel to the goal at (mm/sec) + AREXPORT double getSpeed(void) { return mySpeed; } + + /** Called by the action resover; request movement towards goal if we + * have one. + * @param currentDesired Current desired action from the resolver + */ + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + + /** Used by the action resolvel; return current desired action. */ + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + ArPose myGoal; + double myCloseDist; + double mySpeed; + double mySpeedToTurnAt; + double myDirectionToTurn; + double myCurTurnDir; + double myTurnAmount; + ArActionDesired myDesired; + bool myTurnedBack; + bool myPrinting; + ArPose myOldGoal; + + enum State + { + STATE_NO_GOAL, + STATE_ACHIEVED_GOAL, + STATE_GOING_TO_GOAL + }; + State myState; +}; + +#endif // ARACTIONGOTO diff --git a/Legacy/Aria/include/ArActionGotoStraight.h b/Legacy/Aria/include/ArActionGotoStraight.h new file mode 100644 index 0000000..adfbe4c --- /dev/null +++ b/Legacy/Aria/include/ArActionGotoStraight.h @@ -0,0 +1,127 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONGOTOSTRAIGHT_H +#define ARACTIONGOTOSTRAIGHT_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArAction.h" + +/// This action goes to a given ArPose very naively + +/** + This action naively drives straight towards a given ArPose. The + action stops the robot when it has travelled the distance that that + pose is away. It travels at 'speed' mm/sec. + + You can give it a new goal pose with setGoal(), cancel its movement + with cancelGoal(), and see if it got there with haveAchievedGoal(). + + For arguments to the goals and encoder goals you can tell it to go + backwards by calling them with the backwards parameter true. If + you set the justDistance to true it will only really care about + having driven the distance, if false it'll try to get to the spot + you wanted within close distance. + + This doesn't avoid obstacles or anything, you could add have an obstacle + avoidance ArAction at a higher priority to try to do this. (For + truly intelligent navigation, see the ARNL and SONARNL software libraries.) + @ingroup ActionClasses +**/ + + +class ArActionGotoStraight : public ArAction +{ +public: + AREXPORT ArActionGotoStraight(const char *name = "goto", + double speed = 400); + AREXPORT virtual ~ArActionGotoStraight(); + + /// Sees if the goal has been achieved + AREXPORT bool haveAchievedGoal(void); + /// Cancels the goal the robot has + AREXPORT void cancelGoal(void); + /// Sets a new goal and sets the action to go there + AREXPORT void setGoal(ArPose goal, bool backwards = false, + bool justDistance = true); + /// Sets the goal in a relative way + AREXPORT void setGoalRel(double dist, double deltaHeading, + bool backwards = false, bool justDistance = true); + /// Gets the goal the action has + ArPose getGoal(void) { return myGoal; } + /// Gets whether we're using the encoder goal or the normal goal + bool usingEncoderGoal(void) { return myUseEncoderGoal; } + /// Sets a new goal and sets the action to go there + AREXPORT void setEncoderGoal(ArPose encoderGoal, bool backwards = false, + bool justDistance = true); + /// Sets the goal in a relative way + AREXPORT void setEncoderGoalRel(double dist, double deltaHeading, + bool backwards = false, + bool justDistance = true); + /// Gets the goal the action has + ArPose getEncoderGoal(void) { return myEncoderGoal; } + /// Sets the speed the action will travel to the goal at (mm/sec) + void setSpeed(double speed) { mySpeed = speed; } + /// Gets the speed the action will travel to the goal at (mm/sec) + double getSpeed(void) { return mySpeed; } + /// Sets how close we have to get if we're not in just distance mode + void setCloseDist(double closeDist = 100) { myCloseDist = closeDist; } + /// Gets how close we have to get if we're not in just distance mode + double getCloseDist(void) { return myCloseDist; } + /// Sets whether we're backing up there or not (set in the setGoals) + bool getBacking(void) { return myBacking; } + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + ArPose myGoal; + bool myUseEncoderGoal; + ArPose myEncoderGoal; + double mySpeed; + bool myBacking; + ArActionDesired myDesired; + bool myPrinting; + double myDist; + double myCloseDist; + + bool myJustDist; + + double myDistTravelled; + ArPose myLastPose; + + enum State + { + STATE_NO_GOAL, + STATE_ACHIEVED_GOAL, + STATE_GOING_TO_GOAL + }; + State myState; +}; + +#endif // ARACTIONGOTO diff --git a/Legacy/Aria/include/ArActionGroup.h b/Legacy/Aria/include/ArActionGroup.h new file mode 100644 index 0000000..0cd95dd --- /dev/null +++ b/Legacy/Aria/include/ArActionGroup.h @@ -0,0 +1,77 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONGROUP_H +#define ARACTIONGROUP_H + +#include "ariaTypedefs.h" + +#include + +class ArRobot; +class ArAction; + +/// Group a set of ArAction objects together +/** + This class is used to collect a group of related ArActions together, + and easily turn them on and off in aggregate. The group list may also + be retrieved for performing any other operation you wish (e.g. to delete + or get information about them.) + + @see @ref actions overview + @see ArAction + @see @ref actionGroupExample.cpp + @ingroup OptionalClasses + @ingroup ActionClasses +**/ +class ArActionGroup +{ +public: + /// Constructor + AREXPORT ArActionGroup(ArRobot * robot); + /// Destructor, it also deletes the actions in its group + AREXPORT virtual ~ArActionGroup(); + /// Adds an action to this group's robot, and associates the action with this group. + AREXPORT virtual void addAction(ArAction *action, int priority); + /// Removes the action from this group's robot and dissasociates it from this group. + AREXPORT virtual void remAction(ArAction *action); + /// Activates all the actions in this group + AREXPORT virtual void activate(void); + /// Activates all the actions in this group and deactivates all others + AREXPORT virtual void activateExclusive(void); + /// Deactivates all the actions in this group + AREXPORT virtual void deactivate(void); + /// Removes all the actions in this group from the robot + AREXPORT virtual void removeActions(void); + /// Delets all the actions in this group (doesn't delete them right now) + AREXPORT virtual void deleteActions(void); + /// Gets the action list (use this to delete actions after doing removeActions) + AREXPORT virtual std::list *getActionList(void); +protected: + std::list myActions; + ArRobot *myRobot; +}; + +#endif // ARACTIONGROUP_H diff --git a/Legacy/Aria/include/ArActionGroups.h b/Legacy/Aria/include/ArActionGroups.h new file mode 100644 index 0000000..6a72393 --- /dev/null +++ b/Legacy/Aria/include/ArActionGroups.h @@ -0,0 +1,209 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONGROUPS_H +#define ARACTIONGROUPS_H + +#include "ariaTypedefs.h" +#include "ArActionGroup.h" +#include "ArActionColorFollow.h" +#include "ArACTS.h" +#include "ArPTZ.h" + +class ArActionStop; +class ArActionInput; +class ArActionJoydrive; +class ArActionDeceleratingLimiter; +class ArActionRatioInput; +class ArRatioInputKeydrive; +class ArRatioInputJoydrive; +class ArRatioInputRobotJoydrive; + +/// Action group to use to drive the robot with input actions (keyboard, joystick, etc.) +/** + This class is just useful for teleoping the robot under your own + joystick and keyboard control... Note that you the predefined + ArActionGroups in ARIA are made only to be used exclusively... only + one can be active at once. + + This class is largely now obsolete (it is used by ArServerModeDrive + but that is now obsolete and was replaced by a class that just + makes its own action group) + + ArActionGroupRatioDrive is better. +**/ +class ArActionGroupInput : public ArActionGroup +{ +public: + AREXPORT ArActionGroupInput(ArRobot *robot); + AREXPORT virtual ~ArActionGroupInput(); + AREXPORT void setVel(double vel); + AREXPORT void setRotVel(double rotVel); + AREXPORT void setHeading(double heading); + AREXPORT void deltaHeadingFromCurrent(double delta); + AREXPORT void clear(void); + AREXPORT ArActionInput *getActionInput(void); +protected: + ArActionInput *myInput; +}; + +/// Action group to stop the robot +/** + This class is just useful for having the robot stopped... Note that + you the predefined ArActionGroups in ARIA are made only to be used + exclusively... they won't combine. +**/ +class ArActionGroupStop : public ArActionGroup +{ +public: + AREXPORT ArActionGroupStop(ArRobot *robot); + AREXPORT virtual ~ArActionGroupStop(); + AREXPORT ArActionStop *getActionStop(void); +public: + ArActionStop *myActionStop; +}; + +/// Action group to teleopoperate the robot using ArActionJoydrive, and the Limiter actions to avoid collisions. +/** + This class is just useful for teleoping the robot and having these + actions read the joystick and keyboard... Note that you the + predefined ArActionGroups in ARIA are made only to be used + exclusively... only one can be active at once. +**/ +class ArActionGroupTeleop : public ArActionGroup +{ +public: + AREXPORT ArActionGroupTeleop(ArRobot *robot); + AREXPORT virtual ~ArActionGroupTeleop(); + AREXPORT void setThrottleParams(int lowSpeed, int highSpeed); +protected: + ArActionJoydrive *myJoydrive; +}; + +/// Action group to teleoperate the robot using ArActionJoydrive, but without any Limiter actions to avoid collisions. +/** + This class is just useful for teleoping the robot in an unguarded + and unsafe manner and having these actions read the joystick and + keyboard... Note that you the predefined ArActionGroups in ARIA are + made only to be used exclusively... only one can be active at once. +**/ +class ArActionGroupUnguardedTeleop : public ArActionGroup +{ +public: + AREXPORT ArActionGroupUnguardedTeleop(ArRobot *robot); + AREXPORT virtual ~ArActionGroupUnguardedTeleop(); + AREXPORT void setThrottleParams(int lowSpeed, int highSpeed); +protected: + ArActionJoydrive *myJoydrive; +}; + +/// Action group to make the robot wander, avoiding obstacles. +/** + This class is useful for having the robot wander... Note that + you the predefined ArActionGroups in ARIA are made only to be used + exclusively... only one can be active at once. +**/ +class ArActionGroupWander : public ArActionGroup +{ +public: + AREXPORT ArActionGroupWander(ArRobot *robot, int forwardVel = 400, int avoidFrontDist = 450, int avoidVel = 200, int avoidTurnAmt = 15); + AREXPORT virtual ~ArActionGroupWander(); +}; + +/// Follows a blob of color +/** + This class has the robot follow a blob of color... Note that you the + predefined ArActionGroups in ARIA are made only to be used + exclusively... only one can be active at once. +**/ + +class ArActionGroupColorFollow : public ArActionGroup +{ +public: + AREXPORT ArActionGroupColorFollow(ArRobot *robot, ArACTS_1_2 *acts, ArPTZ *camera); + AREXPORT virtual ~ArActionGroupColorFollow(); + AREXPORT void setCamera(ArPTZ *camera); + AREXPORT void setChannel(int channel); + AREXPORT void startMovement(); + AREXPORT void stopMovement(); + AREXPORT void setAcquire(bool acquire); + AREXPORT int getChannel(); + AREXPORT bool getAcquire(); + AREXPORT bool getMovement(); + AREXPORT bool getBlob(); +protected: + ArActionColorFollow *myColorFollow; +}; + +/// Use keyboard and joystick input to to drive the robot, with Limiter actions to avoid obstacles. +/** + This class is just useful for teleoping the robot under your own + joystick and keyboard control... Note that you the predefined + ArActionGroups in ARIA are made only to be used exclusively (one at + a time)... only one can be active at once. +**/ +class ArActionGroupRatioDrive : public ArActionGroup +{ +public: + AREXPORT ArActionGroupRatioDrive(ArRobot *robot); + AREXPORT virtual ~ArActionGroupRatioDrive(); + AREXPORT ArActionRatioInput *getActionRatioInput(void); + AREXPORT void addToConfig(ArConfig *config, const char *section); +protected: + ArActionDeceleratingLimiter *myDeceleratingLimiterForward; + ArActionDeceleratingLimiter *myDeceleratingLimiterBackward; + ArActionDeceleratingLimiter *myDeceleratingLimiterLateralLeft; + ArActionDeceleratingLimiter *myDeceleratingLimiterLateralRight; + ArActionRatioInput *myInput; + ArRatioInputKeydrive *myKeydrive; + ArRatioInputJoydrive *myJoydrive; + ArRatioInputRobotJoydrive *myRobotJoydrive; + +}; + + +/// Use keyboard and joystick input to to drive the robot, but without Limiter actions to avoid obstacles. +/** + This class is just useful for teleoping the robot under your own + joystick and keyboard control... Note that you the predefined + ArActionGroups in ARIA are made only to be used exclusively (one at + a time)... only one can be active at once. +**/ +class ArActionGroupRatioDriveUnsafe : public ArActionGroup +{ +public: + AREXPORT ArActionGroupRatioDriveUnsafe(ArRobot *robot); + AREXPORT virtual ~ArActionGroupRatioDriveUnsafe(); + AREXPORT ArActionRatioInput *getActionRatioInput(void); + AREXPORT void addToConfig(ArConfig *config, const char *section); +protected: + ArActionRatioInput *myInput; + ArRatioInputKeydrive *myKeydrive; + ArRatioInputJoydrive *myJoydrive; + ArRatioInputRobotJoydrive *myRobotJoydrive; + +}; + +#endif // ARACTIONGROUPS_H diff --git a/Legacy/Aria/include/ArActionIRs.h b/Legacy/Aria/include/ArActionIRs.h new file mode 100644 index 0000000..d5d6f1f --- /dev/null +++ b/Legacy/Aria/include/ArActionIRs.h @@ -0,0 +1,77 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONIRS_H +#define ARACTIONIRS_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArRobotParams.h" +#include + +/// Action to back up if short-range IR sensors trigger +/** + * If the robot has front-mounted binary (triggered/not triggered) IR sensors, + * this action will respond to a sensor trigger by backing up and perhaps + * turning, similar to bumpers. This action assumes that if an IR triggers, the + * robot caused it by moving forward into or under an obstacle, and backing up + * is a good reaction. + +* @ingroup ActionClasses + */ + +class ArActionIRs : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionIRs(const char *name = "IRs", + double backOffSpeed = 100, int backOffTime = 5000, + int turnTime = 3000, bool setMaximums = false); + /// Destructor + AREXPORT virtual ~ArActionIRs(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + ArActionDesired myDesired; + bool mySetMaximums; + double myBackOffSpeed; + int myBackOffTime; + int myTurnTime; + int myStopTime; + bool myFiring; + double mySpeed; + double myHeading; + ArTime myStartBack; + ArTime stoppedSince; + ArRobotParams myParams; + std::vector cycleCounters; +}; + +#endif // ARACTIONIRS diff --git a/Legacy/Aria/include/ArActionInput.h b/Legacy/Aria/include/ArActionInput.h new file mode 100644 index 0000000..1f23034 --- /dev/null +++ b/Legacy/Aria/include/ArActionInput.h @@ -0,0 +1,69 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONINPUT_H +#define ARACTIONINPUT_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action for taking input from outside to control the robot +/** + This action sets up how we want to drive + @ingroup ActionClasses +*/ +class ArActionInput : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionInput(const char *name = "Input"); + /// Destructor + AREXPORT virtual ~ArActionInput(); + /// Set velocity (cancels deltaVel) + AREXPORT void setVel(double vel); + /// Increment/decrement the heading from current + AREXPORT void deltaHeadingFromCurrent(double delta); + /// Sets a rotational velocity + AREXPORT void setRotVel(double rotVel); + /// Sets a heading + AREXPORT void setHeading(double heading); + /// Clears it so its not using vel or heading + AREXPORT void clear(void); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + enum RotRegime { NONE, ROTVEL, DELTAHEADING, SETHEADING }; + RotRegime myRotRegime; + double myRotVal; + bool myUsingVel; + double myVelSet; + ArActionDesired myDesired; +}; + +#endif // ARACTIONSTOP_H diff --git a/Legacy/Aria/include/ArActionJoydrive.h b/Legacy/Aria/include/ArActionJoydrive.h new file mode 100644 index 0000000..dffb234 --- /dev/null +++ b/Legacy/Aria/include/ArActionJoydrive.h @@ -0,0 +1,102 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONJOYDRIVE_H +#define ARACTIONJOYDRIVE_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArJoyHandler.h" + +/// This action will use the joystick for input to drive the robot +/** + This class creates its own ArJoyHandler to get input from the + joystick. Then it will scale the speed between 0 and the given max + for velocity and turning, up and down on the joystick go + forwards/backwards while right and left go right and left. You + must press in one of the two joystick buttons for the class to pay + attention to the joystick. + + @note The joystick does not save calibration information, so you + must calibrate the joystick before each time you use it. To do + this, press the button for at least a half a second while the + joystick is in the middle. Then let go of the button and hold the + joystick in the upper left for at least a half second and then in + the lower right corner for at least a half second. + + @ingroup ActionClasses +**/ +class ArActionJoydrive : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionJoydrive(const char * name = "joydrive", + double transVelMax = 400, + double turnAmountMax = 15, + bool stopIfNoButtonPressed = true, + bool useOSCalForJoystick = true); + /// Destructor + AREXPORT virtual ~ArActionJoydrive(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + /// Whether the joystick is initalized or not + AREXPORT bool joystickInited(void); + /// Set Speeds + AREXPORT void setSpeeds(double transVelMax, double turnAmountMax); + /// Set if we'll stop if no button is pressed, otherwise just do nothing + AREXPORT void setStopIfNoButtonPressed(bool stopIfNoButtonPressed); + /// Get if we'll stop if no button is pressed, otherwise just do nothing + AREXPORT bool getStopIfNoButtonPressed(void); + /// Sets the params on the throttle (throttle unused unless you call this) + AREXPORT void setThrottleParams(double lowSpeed, double highSpeed); + /// Sets whether to use OSCalibration the joystick or not + AREXPORT void setUseOSCal(bool useOSCal); + /// Gets whether OSCalibration is being used for the joystick or not + AREXPORT bool getUseOSCal(void); + /// Gets the joyHandler + AREXPORT ArJoyHandler *getJoyHandler(void) { return myJoyHandler; } + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const { return &myDesired; } +#endif +protected: + bool myUseThrottle; + double myLowThrottle; + double myHighThrottle; + // action desired + ArActionDesired myDesired; + // joystick handler + ArJoyHandler *myJoyHandler; + // full spped + double myTransVelMax; + // full amount to turn + double myTurnAmountMax; + // if we want to stop when no button is presesd + bool myStopIfNoButtonPressed; + // if we're using os cal for the joystick + bool myUseOSCal; + bool myPreviousUseOSCal; +}; + +#endif //ARACTIONJOYDRIVE_H diff --git a/Legacy/Aria/include/ArActionKeydrive.h b/Legacy/Aria/include/ArActionKeydrive.h new file mode 100644 index 0000000..dbc9900 --- /dev/null +++ b/Legacy/Aria/include/ArActionKeydrive.h @@ -0,0 +1,103 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONKEYDRIVE_H +#define ARACTIONKEYDRIVE_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArFunctor.h" + +class ArRobot; + +/// This action will use the keyboard arrow keys for input to drive the robot +/// @ingroup ActionClasses +class ArActionKeydrive : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionKeydrive(const char *name = "keydrive", + double transVelMax = 400, + double turnAmountMax = 24, + double velIncrement = 25, + double turnIncrement = 8); + /// Destructor + AREXPORT virtual ~ArActionKeydrive(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + /// For setting the maximum speeds + AREXPORT void setSpeeds(double transVelMax, double turnAmountMax); + /// For setting the increment amounts + AREXPORT void setIncrements(double velIncrement, double turnIncrement); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + /// Takes the keys this action wants to use to drive + AREXPORT void takeKeys(void); + /// Gives up the keys this action wants to use to drive + AREXPORT void giveUpKeys(void); + /// Internal, callback for up arrow + AREXPORT void up(void); + /// Internal, callback for down arrow + AREXPORT void down(void); + /// Internal, callback for left arrow + AREXPORT void left(void); + /// Internal, callback for right arrow + AREXPORT void right(void); + /// Internal, callback for space key + AREXPORT void space(void); + +protected: + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + ArFunctorC mySpaceCB; + // action desired + ArActionDesired myDesired; + // full speed + double myTransVelMax; + // full amount to turn + double myTurnAmountMax; + // amount to increment vel by on an up arrow or decrement on a down arrow + double myVelIncrement; + // amount to increment turn by on a left arrow or right arrow + double myTurnIncrement; + // amount we want to speed up + double myDeltaVel; + // amount we want to turn + double myTurnAmount; + // what speed we want to go + double myDesiredSpeed; + // if our speeds been reset + bool mySpeedReset; +}; + + +#endif // ARACTIONKEYDRIVE_H diff --git a/Legacy/Aria/include/ArActionLimiterBackwards.h b/Legacy/Aria/include/ArActionLimiterBackwards.h new file mode 100644 index 0000000..c4daf74 --- /dev/null +++ b/Legacy/Aria/include/ArActionLimiterBackwards.h @@ -0,0 +1,68 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONBACKWARDSSPEEDLIMITER_H +#define ARACTIONBACKWARDSSPEEDLIMITER_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to limit the backwards motion of the robot based on range sensor readings +/** + This class limits the backwards motion of the robot according to range sensor + readings (e.g. sonar, laser), and the parameters given. When the range + sensor (e.g. sonar or laser) detects rearward obstacles closer than the given parameters, + this action requests that the robot decelerate or stop any current backwards movement. + @ingroup ActionClasses +*/ +class ArActionLimiterBackwards : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionLimiterBackwards(const char *name = "speed limiter", + double stopDistance = -250, + double slowDistance = -600, + double maxBackwardsSpeed = -250, + double widthRatio = 1.5, + bool avoidLocationDependentObstacles = true); + /// Destructor + AREXPORT virtual ~ArActionLimiterBackwards(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + double myStopDist; + double mySlowDist; + double myMaxBackwardsSpeed; + double myWidthRatio; + bool myAvoidLocationDependentObstacles; + ArActionDesired myDesired; +}; + +#endif // ARACTIONBACKWARDSSPEEDLIMITER_H + diff --git a/Legacy/Aria/include/ArActionLimiterForwards.h b/Legacy/Aria/include/ArActionLimiterForwards.h new file mode 100644 index 0000000..0e98e39 --- /dev/null +++ b/Legacy/Aria/include/ArActionLimiterForwards.h @@ -0,0 +1,69 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONSPEEDLIMITER_H +#define ARACTIONSPEEDLIMITER_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to limit the forwards motion of the robot based on range sensor readings. +/** + This action uses the sensors to find a maximum forwared speed to travel at; when the range + sensor (e.g. sonar or laser) detects obstacles closer than the given parameters, + this action requests that the robot decelerate or stop. + @ingroup ActionClasses +*/ +class ArActionLimiterForwards : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionLimiterForwards(const char *name = "speed limiter", + double stopDistance = 250, + double slowDistance = 1000, + double slowSpeed = 200, + double widthRatio = 1); + /// Destructor + AREXPORT virtual ~ArActionLimiterForwards(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + AREXPORT void setParameters(double stopDistance = 250, + double slowDistance = 1000, + double slowSpeed = 200, + double widthRatio = 1); +protected: + bool myLastStopped; + double myStopDist; + double mySlowDist; + double mySlowSpeed; + double myWidthRatio; + ArActionDesired myDesired; +}; + +#endif // ARACTIONSPEEDLIMITER_H diff --git a/Legacy/Aria/include/ArActionLimiterRot.h b/Legacy/Aria/include/ArActionLimiterRot.h new file mode 100644 index 0000000..9c37b6c --- /dev/null +++ b/Legacy/Aria/include/ArActionLimiterRot.h @@ -0,0 +1,79 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONLIMITERROT_H +#define ARACTIONLIMITERROT_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to limit the forwards motion of the robot based on range sensor readings +/** + This action uses the robot's range sensors (e.g. sonar, laser) to find a + maximum speed at which to travel + and will increase the deceleration so that the robot doesn't hit + anything. If it has to, it will trigger an estop to avoid a + collision. + + Note that this cranks up the deceleration with a strong strength, + but it checks to see if there is already something decelerating + more strongly... so you can put these actions lower in the priority list so + things will play together nicely. + + @ingroup ActionClasses +**/ +class ArActionLimiterRot : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionLimiterRot(const char *name = "limitRot"); + /// Destructor + AREXPORT virtual ~ArActionLimiterRot(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + /// Sets the parameters (don't use this if you're using the addToConfig) + AREXPORT void setParameters(bool checkRadius = false, + double inRadiusSpeed = 0); + /// Adds to the ArConfig given, in section, with prefix + AREXPORT void addToConfig(ArConfig *config, const char *section, + const char *prefix = NULL); + /// Sets if we're using locationDependent range devices or not + bool getUseLocationDependentDevices(void) + { return myUseLocationDependentDevices; } + /// Sets if we're using locationDependent range devices or not + void setUseLocationDependentDevices(bool useLocationDependentDevices) + { myUseLocationDependentDevices = useLocationDependentDevices; } +protected: + bool myCheckRadius; + double myInRadiusSpeed; + bool myUseLocationDependentDevices; + ArActionDesired myDesired; +}; + +#endif // ARACTIONSPEEDLIMITER_H diff --git a/Legacy/Aria/include/ArActionLimiterTableSensor.h b/Legacy/Aria/include/ArActionLimiterTableSensor.h new file mode 100644 index 0000000..5963b3b --- /dev/null +++ b/Legacy/Aria/include/ArActionLimiterTableSensor.h @@ -0,0 +1,59 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONLIMITERTABLESNSOR_H +#define ARACTIONLIMITERTABLESNSOR_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to limit speed (and stop) based on whether the "table"-sensors see anything +/** + This action limits speed to 0 if the table-sensors see anything in front + of the robot. The action will only work if the robot has table sensors, + meaning that the robots parameter file has them listed as true. + + @ingroup ActionClasses +*/ +class ArActionLimiterTableSensor : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionLimiterTableSensor(const char *name = "TableSensorLimiter"); + /// Destructor + AREXPORT virtual ~ArActionLimiterTableSensor(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + ArActionDesired myDesired; +}; + + + +#endif // ARACTIONLIMITERTABLESNSOR_H diff --git a/Legacy/Aria/include/ArActionMovementParameters.h b/Legacy/Aria/include/ArActionMovementParameters.h new file mode 100644 index 0000000..ecc9275 --- /dev/null +++ b/Legacy/Aria/include/ArActionMovementParameters.h @@ -0,0 +1,92 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONMOVEMENTPARAMTERS_H +#define ARACTIONMOVEMENTPARAMTERS_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArMapObject.h" + +/// This is a class for setting max velocities and accels and decels via ArConfig parameters (see addToConfig()) or manually (using setParameters()) +/** + @ingroup ActionClasses + **/ +class ArActionMovementParameters : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionMovementParameters(const char *name = "MovementParameters", + bool overrideFaster = true, + bool addLatVelIfAvailable = true); + /// Destructor + AREXPORT virtual ~ArActionMovementParameters(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + /// Sees if this action is enabled (separate from activating it) + AREXPORT bool isEnabled(void) { return myEnabled; } + /// Enables this action (separate from activating it) + AREXPORT void enable(void) { myEnabled = true; } + /// Enables this action in a way that'll work from the sector callbacks + AREXPORT void enableOnceFromSector(ArMapObject *mapObject) + { myEnableOnce = true; } + /// Disables this action (separate from deactivating it) + AREXPORT void disable(void) { myEnabled = false; } + /// Sets the parameters (don't use this if you're using the addToConfig) + AREXPORT void setParameters(double maxVel = 0, double maxNegVel = 0, + double transAccel = 0, double transDecel = 0, + double rotVelMax = 0, double rotAccel = 0, + double rotDecel = 0, double latVelMax = 0, + double latAccel = 0, double latDecel = 0); + /// Adds to the ArConfig given, in section, with prefix + AREXPORT void addToConfig(ArConfig *config, const char *section, + const char *prefix = NULL); +protected: + bool myEnabled; + bool myEnableOnce; + bool myOverrideFaster; + bool myAddLatVelIfAvailable; + + double myMaxVel; + double myMaxNegVel; + double myTransAccel; + double myTransDecel; + double myMaxRotVel; + double myRotAccel; + double myRotDecel; + double myMaxLatVel; + double myLatAccel; + double myLatDecel; + + ArActionDesired myDesired; + + +}; + +#endif // ARACTIONMOVEMENTPARAMTERS_H diff --git a/Legacy/Aria/include/ArActionMovementParametersDebugging.h b/Legacy/Aria/include/ArActionMovementParametersDebugging.h new file mode 100644 index 0000000..67977be --- /dev/null +++ b/Legacy/Aria/include/ArActionMovementParametersDebugging.h @@ -0,0 +1,94 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONMOVEMENTPARAMTERSDEBUGGING_H +#define ARACTIONMOVEMENTPARAMTERSDEBUGGING_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArMapObject.h" + +/// This is a class for setting max velocities and accels and decels via ArConfig parameters (see addToConfig()); +/** + @ingroup ActionClasses + **/ +class ArActionMovementParametersDebugging : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionMovementParametersDebugging(const char *name = "MovementParametersDebugging"); + /// Destructor + AREXPORT virtual ~ArActionMovementParametersDebugging(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + /// Sees if this action is enabled (separate from activating it) + AREXPORT bool isEnabled(void) { return myEnabled; } + /// Enables this action (separate from activating it) + AREXPORT void enable(void) { myEnabled = true; } + /// Enables this action in a way that'll work from the sector callbacks + AREXPORT void enableOnceFromSector(ArMapObject *mapObject) + { myEnableOnce = true; } + /// Disables this action (separate from deactivating it) + AREXPORT void disable(void) { myEnabled = false; } + /// Adds to the ArConfig given, in section, with prefix + AREXPORT void addToConfig(ArConfig *config, const char *section, + const char *prefix = NULL); +protected: + bool myEnabled; + bool myEnableOnce; + + bool mySetMaxVel; + double myMaxVel; + bool mySetMaxNegVel; + double myMaxNegVel; + bool mySetTransAccel; + double myTransAccel; + bool mySetTransDecel; + double myTransDecel; + bool mySetMaxRotVel; + double myMaxRotVel; + bool mySetRotAccel; + double myRotAccel; + bool mySetRotDecel; + double myRotDecel; + bool mySetMaxLeftLatVel; + double myMaxLeftLatVel; + bool mySetMaxRightLatVel; + double myMaxRightLatVel; + bool mySetLatAccel; + double myLatAccel; + bool mySetLatDecel; + double myLatDecel; + + ArActionDesired myDesired; + + +}; + +#endif // ARACTIONMOVEMENTPARAMTERS_H diff --git a/Legacy/Aria/include/ArActionRatioInput.h b/Legacy/Aria/include/ArActionRatioInput.h new file mode 100644 index 0000000..d18e40e --- /dev/null +++ b/Legacy/Aria/include/ArActionRatioInput.h @@ -0,0 +1,142 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONRATIOINPUT_H +#define ARACTIONRATIOINPUT_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action that requests motion based on abstract ratios provided by diferent input sources +/** + This action interprets input drive commands as three abstract ratios, + translation, rotation, and throttle. (In this way it mimics many joysticks.) + The translation speed input ranges from -100 to 100, where -100 requests maximum + backwards speed, and 100 requests maximum forward speed, 0 requests no + translational speed, and values in between request a linear percentage of the maximum. + Similarly, rotation speed input ranges from -100 to 100, + where -100 indicates maximum rightwards or clockwise rotation, 100 indicates + maximum leftwards or counter-clockwise rotation, 0 requests no rotation, and + values in between request a linear percentage of the maximum. The throttle + input scales the other speed, and ranges from 0 (no motion) to 100 (maximum motion). + + Seperate objects (e.g. ArRatioInputKeydrive, ArRatioInputJoydrive, ArRAtionInputRobotJoydrive) + are used to provide input. + + When this action is activated it resets all its input ratios to 0 + (including throttle). + + Configuration parameters are used to map the maximum ratios to actual robot speeds. + These are set be default to the robot's maximum configured velocities at startup but you can + override them with ArConfig parameters (and call addToConfig()) or setParameters(). + + @ingroup ActionClasses + + @see ArRatioInputKeydrive + @see ArRatioInputJoydrive + @see ArRatioInputRobotJoydrive + **/ +class ArActionRatioInput : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionRatioInput(const char *name = "RatioInput"); + /// Destructor + AREXPORT virtual ~ArActionRatioInput(); + /// Set ratios + AREXPORT void setRatios(double transRatio, double rotRatio, + double throttleRatio, double latRatio = 0); + /// Sets the trans ratio (from -100 (full backwards) to 100 (full forwards) + AREXPORT void setTransRatio(double transRatio); + /// Sets the rot ratio (from -100 (full right) to 100 (full left) + AREXPORT void setRotRatio(double rotRatio); + /// Sets the lat ratio (from -100 (one way) to 100 (the other)) + AREXPORT void setLatRatio(double latRatio); + /// Sets the throttle ratio (from 0 (stopped) to 100 (full throttle) + AREXPORT void setThrottleRatio(double throttleRatio); + /// Gets the trans ratio (from -100 (full backwards) to 100 (full forwards) + double getTransRatio(void) { return myTransRatio; } + /// Gets the rot ratio (from -100 (full right) to 100 (full left) + double getRotRatio(void) { return myRotRatio; } + /// Gets the throttle ratio (from 0 (stopped) to 100 (full throttle) + double getThrottleRatio(void) { return myThrottleRatio; } + /// Adds a callback that is called from this actions fire call + AREXPORT void addFireCallback(int priority, ArFunctor *functor); + /// Removes a callback that was called from this actions fire callback + AREXPORT void remFireCallback(ArFunctor *functor); + /// Adds a callback that is called when this action is activated + AREXPORT void addActivateCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback that was called when this action is activated + AREXPORT void remActivateCallback(ArFunctor *functor); + /// Adds a callback that is called when this action is deactivated + AREXPORT void addDeactivateCallback(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback that was called when this action is deactivated + AREXPORT void remDeactivateCallback(ArFunctor *functor); + /// Sets the parameters + AREXPORT void setParameters(double fullThrottleForwards, + double fullThrottleBackwards, + double rotAtFullForwards, + double rotAtFullBackwards, + double rotAtStopped, + double latAtFullForwards = 0, + double latAtFullBackwards = 0, + double latAtStopped = 0); + /// Adds to a section in a config + AREXPORT void addToConfig(ArConfig *config, const char *section); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); +protected: + std::multimap myFireCallbacks; + std::list myActivateCallbacks; + std::list myDeactivateCallbacks; + // if we're printing extra information or not + bool myPrinting; + double myTransDeadZone; + double myRotDeadZone; + double myLatDeadZone; + double myFullThrottleForwards; + double myFullThrottleBackwards; + double myRotAtFullForwards; + double myRotAtFullBackwards; + double myRotAtStopped; + double myLatAtFullForwards; + double myLatAtFullBackwards; + double myLatAtStopped; + double myTransRatio; + double myRotRatio; + double myThrottleRatio; + double myLatRatio; + ArActionDesired myDesired; +}; + +#endif // ARACTIONSTOP_H diff --git a/Legacy/Aria/include/ArActionRobotJoydrive.h b/Legacy/Aria/include/ArActionRobotJoydrive.h new file mode 100644 index 0000000..663ac81 --- /dev/null +++ b/Legacy/Aria/include/ArActionRobotJoydrive.h @@ -0,0 +1,87 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONROBOTJOYDRIVE_H +#define ARACTIONROBOTJOYDRIVE_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +class ArRobotPacket; + +/// This action will use the joystick for input to drive the robot +/** + This class creates its own ArJoyHandler to get input from the + joystick. Then it will scale the speed between 0 and the given max + for velocity and turning, up and down on the joystick go + forwards/backwards while right and left go right and left. You + must press in one of the two joystick buttons for the class to pay + attention to the joystick. + + NOTE: The joystick does not save calibration information, so you + must calibrate the joystick before each time you use it. To do + this, press the button for at least a half a second while the + joystick is in the middle. Then let go of the button and hold the + joystick in the upper left for at least a half second and then in + the lower right corner for at least a half second. + + @ingroup ActionClasses +**/ +class ArActionRobotJoydrive : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionRobotJoydrive(const char * name = "robotJoyDrive", + bool requireDeadmanPushed = true); + /// Destructor + AREXPORT virtual ~ArActionRobotJoydrive(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + AREXPORT virtual void setRobot(ArRobot *robot); +protected: + AREXPORT bool handleJoystickPacket(ArRobotPacket *packet); + AREXPORT void connectCallback(void); + // whether we require the deadman to be pushed to drive + bool myRequireDeadmanPushed; + + bool myDeadZoneLast; + int myButton1; + int myButton2; + int myJoyX; + int myJoyY; + int myThrottle; + ArTime myPacketReceivedTime; + // action desired + ArActionDesired myDesired; + ArRetFunctor1C myHandleJoystickPacketCB; + ArFunctorC myConnectCB; +}; + +#endif //ARACTIONROBOTJOYDRIVE_H diff --git a/Legacy/Aria/include/ArActionStallRecover.h b/Legacy/Aria/include/ArActionStallRecover.h new file mode 100644 index 0000000..8ddb2db --- /dev/null +++ b/Legacy/Aria/include/ArActionStallRecover.h @@ -0,0 +1,101 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONSTALLRECOVER_H +#define ARACTIONSTALLRECOVER_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +class ArResolver; + +/// Action to recover from a stall +/** + This action tries to recover if one of the wheels has stalled, it has a + series of actions it tries in order to get out of the stall. + @ingroup ActionClasses +*/ +class ArActionStallRecover : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionStallRecover(const char * name = "stall recover", + double obstacleDistance = 225, int cyclesToMove = 50, + double speed = 150, double degreesToTurn = 45, + bool enabled = true); + /// Destructor + AREXPORT virtual ~ArActionStallRecover(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) + { return &myActionDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myActionDesired; } +#endif + AREXPORT void addToConfig(ArConfig* config, const char* sectionName, ArPriority::Priority priority = ArPriority::NORMAL); + AREXPORT virtual void activate(void); +protected: + // these are internal things, don't touch unless you know what you are doing + void doit(void); // does whatever should be done + void addSequence(int sequence); + int myDoing; // what we're doing, uses the stuff from the enum What + int myState; // holds the state + int myCount; // count down variable, -1 if first time in this state + int mySideStalled; // 1 for left, 2 for right, 3 for both + + enum State + { + STATE_NOTHING = 0, // waiting + STATE_GOING // do something + }; + + enum What + { + BACK=0x1, // back up + FORWARD=0x2, // go forward + TURN=0x4, // turn away from obstacles + TURN_LEFT=0x8, // turn left + TURN_RIGHT=0x10, // turn right + MOVEMASK = BACK | FORWARD, + TURNMASK = TURN | TURN_LEFT | TURN_RIGHT + }; + + std::map mySequence; // list of things to do as stall continues + int mySequenceNum; + int mySequencePos; + time_t myLastFired; + double myObstacleDistance; + int myCyclesToMove; + bool myEnabled; + double mySpeed; + int myCyclesToTurn; + double myDegreesToTurn; + double myDesiredHeading; + ArActionDesired myActionDesired; + + ArResolver *myResolver; +}; + +#endif //ARACTIONSTALLRECOVER_H diff --git a/Legacy/Aria/include/ArActionStop.h b/Legacy/Aria/include/ArActionStop.h new file mode 100644 index 0000000..45223e2 --- /dev/null +++ b/Legacy/Aria/include/ArActionStop.h @@ -0,0 +1,54 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONSTOP_H +#define ARACTIONSTOP_H + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action for stopping the robot +/** + This action simply sets the robot to a 0 velocity and a deltaHeading of 0. + @ingroup ActionClasses +*/ +class ArActionStop : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionStop(const char *name = "stop"); + /// Destructor + AREXPORT virtual ~ArActionStop(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + ArActionDesired myDesired; +}; + +#endif // ARACTIONSTOP_H diff --git a/Legacy/Aria/include/ArActionTriangleDriveTo.h b/Legacy/Aria/include/ArActionTriangleDriveTo.h new file mode 100644 index 0000000..ff7217f --- /dev/null +++ b/Legacy/Aria/include/ArActionTriangleDriveTo.h @@ -0,0 +1,283 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONTRIANGLEDRIVETO +#define ARACTIONTRIANGLEDRIVETO + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArLineFinder.h" + +/// Action to drive up to a triangle target (e.g. docking station) found from an ArLineFinder +/** + * This action uses ArLineFinder to find continuous "lines" in + * laser range finder data that meet at an angle, forming the point of a + * triangular shape, towards which the robot is driven and aligned. + * If an ArLineFinder object is not given in the constructor, then it will + * search for an ArRangeDevice on the ArRobot with a name "laser" and create its + * own ArLineFinder object using that range device. + + The parameters describing the shape of the triangle target may be set with setTriangleParams(). The default values are for a trianrgle target consisting of two lines of at least 254 mm. meeting + at a 135 degree angle. This is the shape of the triangular + target on docking stations. Targets also may easily be constructed out of any material well-sensed by the SICK Laser, such as wood, cardboard, or metal. + + If setTwoStageApproach() is called with true + (default) it will first drive to a half meter away from the desired + spot (distFromVertex from the point of the vertex along the + bisection of the angle between segments) and then after it reachs + that point it will turn in towards the vertex and drive to the + final spot. If setTwoStageApproach() is called with false it'll just drive to + the final spot. It will stop at closeDist away unless a large turn + is required where it'll stop 2 * closeDist away. It drives in at + the speed given in the constructor. If the robot is closer to the vertex + than it should be for the approach it'll skip the approach, if the + robot is closer to the vertex than to the final spot it will back + up (if its facing away from the vertex it won't see the vertex). + + If you want the action to drive straight to the vertex instead of + to a point in front of it call setGotoVertex() with a true + argument... It will no longer do this if finalDistFromVertex is + 0... you would do this if you want to drive until a bumper is hit + for instance. + + If you want the action to position using the front of the robot + then use setPositionFront(). + + @ingroup ActionClasses + **/ + +class ArActionTriangleDriveTo : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionTriangleDriveTo(const char *name = "triangleDriveTo", + double finalDistFromVertex = 400, + double approachDistFromVertex = 1000, + double speed = 200, + double closeDist = 100, + double acquireTurnSpeed = 30); + /// Destructor + AREXPORT virtual ~ArActionTriangleDriveTo(); + /// Sets if we will turn to see if we can acquire the triangle + void setAcquire(bool acquire = false) { myAcquire = acquire; } + /// Gets if we will turn to see if we can acquire the triangle + bool getAcquire(void) { return myAcquire; } + /// Sets the final distance from vertex + void setFinalDistFromVertex(double dist) { myFinalDistFromVertex = dist; } + /// Sets the final distance from vertex + double getFinalDistFromVertex(void) { return myFinalDistFromVertex; } + /// Sets the parameter of the triangle we're looking for + void setTriangleParams(double line1Length = 254, + double angleBetween = 135, + double line2Length = 254) + { myLine1Length = line1Length; myAngleBetween = angleBetween; myLine2Length = line2Length; } + AREXPORT void setParameters(double finalDistFromVertex = 400, + double approachDistFromVertex = 1000, + double speed = 200, + double closeDist = 100, + double acquireTurnSpeed = 30); + + /// Gets whether we adjust the vertex or not + bool getAdjustVertex(void) { return myAdjustVertex; } + /// Sets whether we adjust the vertex or not + void setAdjustVertex(bool adjustVertex) { myAdjustVertex = adjustVertex; } + /// Sets the vertex offset + void setVertexOffset(int localXOffset, int localYOffset, double thOffset) + { myLocalXOffset = localXOffset; myLocalYOffset = localYOffset; + myThOffset = thOffset; } + /// Sets if we should use the legacy vertex mode or not + void setUseLegacyVertexOffset(bool useLegacyVertexOffset) + { myUseLegacyVertexOffset = useLegacyVertexOffset; } + /// Gets if we are use the legacy vertex mode or not + bool getUseLegacyVertexOffset(void) { return myUseLegacyVertexOffset; } + /// Gets whether it always goto the vertex and not the point in front + bool getGotoVertex(void) { return myGotoVertex; } + /// Sets whether it always goto the vertex and not the point in front + void setGotoVertex(bool gotoVertex) + { myGotoVertex = gotoVertex; } + /// Sets the distance to the triangle at which we start ignoring it + void setIgnoreTriangleDist(double dist = 250, + bool useIgnoreInGotoVertexMode = false) + { myIgnoreTriangleDist = dist; + myUseIgnoreInGoto = useIgnoreInGotoVertexMode; } + /// Gets the distance to the triangle at which we start ignoring it + double getIgnoreTriangleDist(void) { return myIgnoreTriangleDist; } + /// Gets if we're ignoring the triangle in goto vertex mode + bool getUseIgnoreInGotoVertexMode(void) { return myUseIgnoreInGoto; } + /// How long to keep going without having seen the vertex (0 is no timeout) + void setVertexUnseenStopMSecs(int vertexUnseenStopMSecs = 4000) + { myVertexUnseenStopMSecs = vertexUnseenStopMSecs; } + /// How long to keep going without having seen the vertex (0 is no timeout) + int getVertexUnseenStopMSecs(void) { return myVertexUnseenStopMSecs; } + /// Sets the maximum distance between points in a line + void setMaxDistBetweenLinePoints(int maxDistBetweenLinePoints = 0) + { myMaxDistBetweenLinePoints = maxDistBetweenLinePoints; } + /// Sets the maximum lateral distance from the robot to the triangle line + void setMaxLateralDist(int maxLateralDist = 0) + { myMaxLateralDist = maxLateralDist; } + /// Sets the maximum angle misalignment from the robot to the triangle line + void setMaxAngleMisalignment(int maxAngleMisalignment = 0) + { myMaxAngleMisalignment = maxAngleMisalignment; } + enum State { + STATE_INACTIVE, ///< we aren't trying + STATE_ACQUIRE, ///< finding the target + STATE_SEARCHING, ///< Turning trying to find the target + STATE_GOTO_APPROACH, ///< driving to the approach point + STATE_ALIGN_APPROACH, ///< aligning to the target the first time + STATE_GOTO_VERTEX, ///< driving to the vertex + STATE_GOTO_FINAL, ///< driving to the final point + STATE_ALIGN_FINAL, ///< aligning to the target the final time + STATE_SUCCEEDED, ///< pointing at the target + STATE_FAILED ///< if we're not acquiring and we lost the vertex we fail + }; + /// Gets the state + State getState(void) { return myState; } + /// Gets if we've seen the vertex ever for this attempted drive (it gets reset in searching, but that's the only time, so will only be set once an activation by default (unless setAcquire is called) + bool getVertexSeen(void) { return myVertexSeen; } + /// Sets the line finder to use + AREXPORT void setLineFinder(ArLineFinder *lineFinder); + /// Sets the line finder used + AREXPORT ArLineFinder *getLineFinder(void) { return myLineFinder; } + + /// Sets whether we're logging the driving or not + void setLogging(bool logging) { myPrinting = logging; } + /// Gets whether we're logging the driving or not + bool setLogging(void) { return myPrinting; } + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif + +#ifndef SWIG + /** + This is for some internal debugging, don't try to use it, it won't + work in windows (memory allocation issues). If there's desire for + a feature like this I can add it later. + @internal + **/ + class Data + { + public: + Data() + { myFinalSet = false; myApproachSet = false; myLinesAndVertexSet = false; + myVertexSeenThisCycle = false; myVertexSeen = false; } + ~Data() {} + void setLinesAndVertex(std::map *lines, + ArPose vertex) + { + myLines.clear(); + std::map::iterator it; + for (it = lines->begin(); it != lines->end(); it++) + { + myLines.push_front(*(*it).second); + } + myVertex = vertex; + myLinesAndVertexSet = true; + } + void setFinal(ArPose final) { myFinalSet = true; myFinal = final; } + void setApproach(ArPose approach) + { myApproachSet = true; myApproach = approach; } + void setVertexSeenThisCycle(bool vertexSeenThisCycle) + { myVertexSeenThisCycle = vertexSeenThisCycle; } + void setVertexSeen(bool vertexSeen) + { myVertexSeen = vertexSeen; } + + + bool myLinesAndVertexSet; + std::list myLines; + ArPose myVertex; + bool myFinalSet; + ArPose myFinal; + bool myApproachSet; + ArPose myApproach; + bool myVertexSeenThisCycle; + bool myVertexSeen; + }; + /** Internal use only, sets if we're saving data or not + * @internal + */ + void setSaveData(bool saveData) { mySaveData = saveData; } + /** Internal use only, gets if we're saving data or not + * @internal + */ + bool getSaveData(void) { return mySaveData; } + /** Interal use only, gets the data we've saved + * @internal + */ + Data *getData(void); +#endif // ifndef SWIG +protected: + // Find our triangle, Internal function + AREXPORT void findTriangle(bool initial, bool goStraight = false); + // Finds a pose this dist from the vertex along the line from the vertex + AREXPORT ArPose findPoseFromVertex(double distFromVertex); + // where the vertex was in encoder coords + ArPose myVertex; + + ArRangeDevice *myLaser; + //ArLaser *myLaser; + ArMutex myDataMutex; + bool mySaveData; + Data *myData; + std::map *myLines; + unsigned int myGotLinesCounter; + bool myVertexSeen; + bool myPrinting; + ArTime myVertexSeenLast; + State myState; + double myOriginalAngle; + bool myAcquire; + double myFinalDistFromVertex; + double myApproachDistFromVertex; + double mySpeed; + double myCloseDist; + double myAcquireTurnSpeed; + bool myTwoStageApproach; + double myLine1Length; + double myAngleBetween; + double myLine2Length; + int myVertexUnseenStopMSecs; + ArActionDesired myDesired; + ArLineFinder *myLineFinder; + bool myOwnLineFinder; + bool myAdjustVertex; + bool myGotoVertex; + int myLocalXOffset; + int myLocalYOffset; + double myThOffset; + bool myUseLegacyVertexOffset; + double myIgnoreTriangleDist; + bool myUseIgnoreInGoto; + int myMaxDistBetweenLinePoints; + int myMaxLateralDist; + int myMaxAngleMisalignment; +}; + +#endif // ARACTIONTRIANGLEDRIVETO diff --git a/Legacy/Aria/include/ArActionTurn.h b/Legacy/Aria/include/ArActionTurn.h new file mode 100644 index 0000000..cf17fd2 --- /dev/null +++ b/Legacy/Aria/include/ArActionTurn.h @@ -0,0 +1,68 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARACTIONTURN +#define ARACTIONTURN + +#include "ariaTypedefs.h" +#include "ArAction.h" + +/// Action to turn when the behaviors with more priority have limited the speed +/** + This action is basically made so that you can just have a ton of + limiters of different kinds and types to keep speed under control, + then throw this into the mix to have the robot wander. Note that + the turn amount ramps up to turnAmount starting at 0 at + speedStartTurn and hitting the full amount at speedFullTurn. + + @ingroup ActionClasses +**/ +class ArActionTurn : public ArAction +{ +public: + /// Constructor + AREXPORT ArActionTurn(const char *name = "turn", + double speedStartTurn = 200, + double speedFullTurn = 100, + double turnAmount = 15); + /// Destructor + AREXPORT virtual ~ArActionTurn(); + AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); + AREXPORT virtual ArActionDesired *getDesired(void) { return &myDesired; } +#ifndef SWIG + AREXPORT virtual const ArActionDesired *getDesired(void) const + { return &myDesired; } +#endif +protected: + double mySpeedStart; + double mySpeedFull; + double myTurnAmount; + double myTurning; + + ArActionDesired myDesired; + +}; + +#endif // ARACTIONTURN diff --git a/Legacy/Aria/include/ArAnalogGyro.h b/Legacy/Aria/include/ArAnalogGyro.h new file mode 100644 index 0000000..5976312 --- /dev/null +++ b/Legacy/Aria/include/ArAnalogGyro.h @@ -0,0 +1,222 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARANALOGGYRO_H +#define ARANALOGGYRO_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" + +class ArRobot; +class ArRobotPacket; + +/// Use onboard gyro to improve the heading in an ArRobot object's pose value +/** + The gyro is an accessory connected to the robot's microcontroller. + The gyro's purpose is to improve large errors due to wheel + slippage, wheels coming off the ground, and other factors like this + (or for the skid steer of an AT). The gyro also happens to provide + temperature readings as well. + + When an ArAnalogGyro object is created, it registers callbacks with the + robot, and automatic heading correction will begin when new data arrives + from the robot. + If you delete the object, it will remove itself from the robot. + + The readings come back from the gyro over the robot microcontroller's analog ports. + The microcontroller then sends the readings to us just before + sending us the standard packet. ArAnalogGyro uses these readings to + calculate a better heading of the robot (integrating the velocities to + give position). Then when the standard packet comes in, ArRobot calls + an encoder correction callback in ArAnalogGyro which does a simple + Kalman filter and fuses the encoder information's heading with the gyro's heading + to compute the most probable heading which it then returns to the + ArRobot object to use as its heading. + + The robot's normal dead reconing angle is fairly good if you have properly + inflated tires (if you have pneumatic tires) and if you have + the revcount parameter sent correctly. See the robot operation manual for + how to change the revcount parameter. + + Gyro readings are affected by temperature (a temperature value + is reported along with the gyro data in the packets from the + microcontroller). The gyro will auto calibrate itself to the + center of the range (which may have drifted due to temperature) + whenever the robot is stationary for more than one second (that is, if its + translational and rotational velocities are less than 1 + and if the gyro readings are also within .5% of the average). The + scaling factor (between change of voltage and amount of turn) + doesn't seem to change due to temperature, though it can vary among + different gyro devices. (This scaling factor can be accessed with + getScalingFactor() and setScalingFactor().) + The default value used here was within 3% of correct most of the time. + The default resides in the parameter file for the robot that is loaded or used when a + connection is made. If you want to tune this more you can, by + finding a different scale factor. (There is just one so there + doesn't have to be alot of calibration in flash that is lost if + parameters are loaded from a file.) + + General notes on gyros and inertial correction: The purpose of the gyro is to + correct for wheel slippage and large errors. It is not to totally correct + for all errors, but to bring the errors into smaller zones that + software can correct for more easily (such as by localization). + We have found that if gyros or inertial measurement devices are used to attempt to + correct for all error, the result can be not very robust, and include + many problematic assumptions. For this reason, we have found that + it is best to integrate this one simple gyro to simply improve robot odometry, + rather than a complicated and expensive IMU. + + @ingroup OptionalClasses + +*/ +class ArAnalogGyro +{ +public: + /// Constructor + AREXPORT ArAnalogGyro(ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArAnalogGyro(); + /// Gets if we really have a gyro or not + AREXPORT bool isActive(void) { return myIsActive; } + /// Lets the gyro correct readings + AREXPORT void activate(void); + /// Stops the gyro from correcting readings (still accumulates) + AREXPORT void deactivate(void); + /// If we have a gyro only mode + bool hasGyroOnlyMode(void) { return myHasGyroOnlyMode; } + /// If we're using gyro only mode + bool isGyroOnlyActive(void) { return myIsGyroOnlyActive; } + /// Activates it and puts it in gyro only mode + AREXPORT void activateGyroOnly(void); + /// If this class actually has data or not (if it has no data, the + /// robot is all there is) + bool hasNoInternalData(void) { return myHasNoData; } + /// Returns true if any amount of gyro data has yet been received, false if no readings have yet been received from the robot. + AREXPORT bool haveGottenData(void) { return myHaveGottenData; } + /// Gets a heading calculated from past gyro readings + AREXPORT double getHeading(void) const { return myHeading; } + /// Gets the temperature the gyro has + AREXPORT int getTemperature(void) const { return myTemperature; } + /// Set the parameters of the Kalman filter model + /** + @param gyroSigma the amount its off statically + + @param inertialVar the proportional amount it is off + + @param rotVar the amount the rotation is off proportionally + + @param transVar the amount the translation throws off the heading + proportionally + **/ + AREXPORT void setFilterModel(double gyroSigma, double inertialVar, + double rotVar, double transVar) + { myGyroSigma = gyroSigma; myInertialVarianceModel = inertialVar; + myRotVarianceModel = rotVar; myTransVarianceModel = transVar; }; + + /// Returns the number of readings taken in the last second + AREXPORT int getPacCount(void) { return myPacCount; } + + /// Gets the most recently calculated average rotational velocity (over one + //second) + AREXPORT double getAverage(void) const { return myLastAverage; } + /// Gets the time the last average was taken + AREXPORT ArTime getAverageTaken(void) const { return myLastAverageTaken; } + /// Gets the scaling factor used for multiplying the reading values received (default 1.626) + AREXPORT double getScalingFactor(void) const { return myScalingFactor; } + /// Sets the scaling factor used for multiplying the readings + AREXPORT void setScalingFactor(double factor) { myScalingFactor = factor; } + + /// Internal packet handler for the gyro packets + AREXPORT bool handleGyroPacket(ArRobotPacket *packet); + /// internal function for correcting the encoder readings with the gyro data + AREXPORT double encoderCorrect(ArPoseWithTime deltaPose); + /// Internal connection callback; delays for a short amount of time to give the gyro enough time to stabilize before we try to use it + AREXPORT void stabilizingCallback(void); + /// Internal user task callback + AREXPORT void userTaskCallback(void); + /// Sets whether we log anomalies or not (temporary function for debugging) + void setLogAnomalies(bool logAnomalies) { myLogAnomalies = logAnomalies; } +protected: + // whether we're correcting readings or not + bool myIsActive; + // whether we're really getting readings or not + bool myHaveGottenData; + // our double for our scaling factor + double myScalingFactor; + // if we've gotten a reading this cycle + bool myReadingThisCycle; + // whether we're logging anomalies or not + bool myLogAnomalies; + // counting data + int myPacCount; + int myPacCurrentCount; + time_t myTimeLastPacket; + + // data for averaging + ArTime myAverageStarted; + double myLastAverage; + ArTime myLastAverageTaken; + double myAverageTotal; + int myAverageCount; + + + // constants for kalman filtering + double myGyroSigma; + double myInertialVarianceModel; + double myRotVarianceModel; // deg2/deg + double myTransVarianceModel; // deg2/meter + + // for if our gyro packets aren't aligned with our sips how much + // we've changed since we last got to correct one + double myAccumulatedDelta; + + double myHeading; + int myTemperature; + double myLastHeading; + ArRobot *myRobot; + ArRetFunctor1C myHandleGyroPacketCB; + ArRetFunctor1C myEncoderCorrectCB; + ArFunctorC myStabilizingCB; + ArFunctorC myUserTaskCB; + + /// Gyro type + enum GyroType + { + GYRO_NONE, ///< No gyro + GYRO_ANALOG_COMPUTER, ///< Analog gyro used by computer + GYRO_ANALOG_CONTROLLER ///< Analog gyro used by microcontroller + }; + GyroType myGyroType; + bool myHasNoData; + bool myHasGyroOnlyMode; + bool myIsGyroOnlyActive; + + bool myGyroWorking; +}; + +#endif // ARANALOGGYRO_H + + diff --git a/Legacy/Aria/include/ArArg.h b/Legacy/Aria/include/ArArg.h new file mode 100644 index 0000000..ff4e3c2 --- /dev/null +++ b/Legacy/Aria/include/ArArg.h @@ -0,0 +1,172 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARARG_H +#define ARARG_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" + +class ArArgumentBuilder; + +/// Argument class, mostly for actions, could be used for other things +/** + This is designed to be easy to add another type to the arguments... + All you have to do to do so, is add an enum to the Type enum, add a + newType getNewType(void), add a void setNewType(newType nt), and add + a case statement for the newType to ArArg::print. You should probably also + add an @see newType to the documentation for ArArg::getType. + +*/ +class ArArg +{ +public: + typedef enum + { + INVALID, ///< An invalid argument, the argument wasn't created correctly + INT, ///< Integer argument + DOUBLE, ///< Double argument + STRING, ///< String argument + BOOL, ///< Boolean argument + POSE, ///< ArPose argument + FUNCTOR, ///< Argument that handles things with functors + DESCRIPTION_HOLDER, ///< Argument that just holds a description + + LAST_TYPE = DESCRIPTION_HOLDER ///< Last value in the enumeration + } Type; + + + enum { + TYPE_COUNT = LAST_TYPE + 1 ///< Number of argument types + }; + + /// Default empty contructor + AREXPORT ArArg(); + /// Constructor for making an integer argument + AREXPORT ArArg(const char * name, int *pointer, + const char * description = "", + int minInt = INT_MIN, + int maxInt = INT_MAX); + /// Constructor for making a double argument + AREXPORT ArArg(const char * name, double *pointer, + const char * description = "", + double minDouble = -HUGE_VAL, + double maxDouble = HUGE_VAL); + /// Constructor for making a boolean argument + AREXPORT ArArg(const char * name, bool *pointer, + const char * description = ""); + /// Constructor for making a position argument + AREXPORT ArArg(const char * name, ArPose *pointer, + const char * description = ""); + /// Constructor for making an argument of a string + AREXPORT ArArg(const char *name, char *pointer, + const char *description, + size_t maxStrLen); + /// Constructor for making an argument that has functors to handle things + AREXPORT ArArg(const char *name, + ArRetFunctor1 *setFunctor, + ArRetFunctor *> *getFunctor, + const char *description); + /// Constructor for just holding a description (for ArConfig) + AREXPORT ArArg(const char *description); + /// Copy constructor + AREXPORT ArArg(const ArArg & arg); + /// Assignment operator + AREXPORT ArArg &operator=(const ArArg &arg); + /// Destructor + AREXPORT virtual ~ArArg(); + + /// Gets the type of the argument + AREXPORT Type getType(void) const; + /// Gets the name of the argument + AREXPORT const char *getName(void) const; + /// Gets the long description of the argument + AREXPORT const char *getDescription(void) const; + /// Sets the argument value, for int arguments + AREXPORT bool setInt(int val); + /// Sets the argument value, for double arguments + AREXPORT bool setDouble(double val); + /// Sets the argument value, for bool arguments + AREXPORT bool setBool(bool val); + /// Sets the argument value, for ArPose arguments + AREXPORT bool setPose(ArPose pose); + /// Sets the argument value for ArArgumentBuilder arguments + AREXPORT bool setString(const char *str); + /// Sets the argument by calling the setFunctor callback + AREXPORT bool setArgWithFunctor(ArArgumentBuilder *argument); + /// Gets the argument value, for int arguments + AREXPORT int getInt(void) const; + /// Gets the argument value, for double arguments + AREXPORT double getDouble(void) const; + /// Gets the argument value, for bool arguments + AREXPORT bool getBool(void) const; + /// Gets the argument value, for pose arguments + AREXPORT ArPose getPose(void) const; + /// Gets the argument value, for string arguments + AREXPORT const char *getString(void) const; + /// Gets the argument value, which is a list of argumentbuilders here + AREXPORT const std::list *getArgsWithFunctor(void) const; + /// Logs the type, name, and value of this argument + AREXPORT void log(void) const; + /// Gets the minimum int value + AREXPORT int getMinInt(void) const; + /// Gets the maximum int value + AREXPORT int getMaxInt(void) const; + /// Gets the minimum double value + AREXPORT double getMinDouble(void) const; + /// Gets the maximum double value + AREXPORT double getMaxDouble(void) const; + /// Gets if the config priority is set + AREXPORT bool getConfigPrioritySet(void) const; + /// Gets the priority (only used by ArConfig) + AREXPORT ArPriority::Priority getConfigPriority(void) const; + /// Sets the priority (only used by ArConfig) + AREXPORT void setConfigPriority(ArPriority::Priority priority); + +private: + /// Internal helper function + AREXPORT void clear(void); + +protected: + + ArArg::Type myType; + std::string myName; + std::string myDescription; + int *myIntPointer; + int myMinInt, myMaxInt; + double *myDoublePointer; + double myMinDouble, myMaxDouble; + bool *myBoolPointer; + ArPose *myPosePointer; + char *myStringPointer; + size_t myMaxStrLen; + bool myConfigPrioritySet; + ArPriority::Priority myConfigPriority; + ArRetFunctor1 *mySetFunctor; + ArRetFunctor *> *myGetFunctor; +}; + +#endif // ARARGUMENT_H diff --git a/Legacy/Aria/include/ArArgumentBuilder.h b/Legacy/Aria/include/ArArgumentBuilder.h new file mode 100644 index 0000000..2acd01b --- /dev/null +++ b/Legacy/Aria/include/ArArgumentBuilder.h @@ -0,0 +1,266 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARARGUMENTBUILDER_H +#define ARARGUMENTBUILDER_H + +#include "ariaTypedefs.h" + +/// This class is to build arguments for things that require argc and argv +/// @ingroup ImportantClasses +class ArArgumentBuilder +{ +public: + /// Constructor + AREXPORT ArArgumentBuilder(size_t argvLen = 512, + char extraSpaceChar = '\0', + bool ignoreNormalSpaces = false, + bool isPreCompressQuotes = false); + /// Copy Constructor + AREXPORT ArArgumentBuilder(const ArArgumentBuilder &builder); + + AREXPORT ArArgumentBuilder &operator=(const ArArgumentBuilder &builder); + + /// Destructor + AREXPORT virtual ~ArArgumentBuilder(); +#ifndef SWIG + /** @brief Adds the given string, with varargs, separates if there are spaces + * @swignote Not available + */ + AREXPORT void add(const char *str, ...); +#endif + /// Adds the given string, without varargs (wrapper for java) + AREXPORT void addPlain(const char *str, int position = -1); + /// Adds the given string, without varargs and without touching the str + AREXPORT void addPlainAsIs(const char *str, int position = -1); + /// Adds the given string thats divided + AREXPORT void addStrings(char **argv, int argc, int position = -1); + /// Adds the given string thats divided + AREXPORT void addStrings(int argc, char **argv, int position = -1); + /// Adds the given string thats divided (but doesn't touch the strings) + AREXPORT void addStringsAsIs(int argc, char **argv, int position = -1); + /// Gets the original string of the input + AREXPORT const char *getFullString(void) const; + /// Sets the full string (this is so you can have a more raw full string) + AREXPORT void setFullString(const char *str); + /// Gets the extra string of the input, used differently by different things + AREXPORT const char *getExtraString(void) const; + /// Sets the extra string of the input, used differently by different things + AREXPORT void setExtraString(const char *str); + /// Prints out the arguments + AREXPORT void log(void) const; + /// Gets the argc + AREXPORT size_t getArgc(void) const; + /// Gets the argv + AREXPORT char** getArgv(void) const; + /// Gets a specific argument as a string + AREXPORT const char* getArg(size_t whichArg) const; + + /// Sees if an argument is a bool + AREXPORT bool isArgBool(size_t whichArg) const; + + /// Gets the value of an argument as a boolean + /** + * Valid boolean values are "true" and "false", and "1" and "0". + * There are two ways to to verify that the specified argument is a bool. + * Either call isArgBool() before calling this method, or specify a non-NULL + * ok parameter value. The latter is somewhat more efficient since the + * argument string is checked only once. + * + * @param whichArg the size_t index of the arg to retrieve; must be >= 0 + * and less than getArgc() + * @param ok an optional pointer to a bool that will be set to true if the + * arg was successfully retrieved or to false if an error occurred + * @return bool the retrieved argument value; valid only if ok or isArgBool + * is true + **/ + AREXPORT bool getArgBool(size_t whichArg, + bool *ok = NULL) const; + + /// Sees if an argument is an int + /** + * @param whichArg the size_t index of the arg to retrieve; must be >= 0 + * and less than getArgc() + * @param forceHex if true this makes it find the int in base 16 instead of 10 + */ + AREXPORT bool isArgInt(size_t whichArg, bool forceHex = false) const; + + /// Gets the value of an argument as an integer + /** + * There are two ways to to verify that the specified argument is an integer. + * Either call isArgInt() before calling this method, or specify a non-NULL + * ok parameter value. The latter is somewhat more efficient because the + * digit status of each character is checked only once. + * + * @param whichArg the size_t index of the arg to retrieve; must be >= 0 + * and less than getArgc() + * @param ok an optional pointer to a bool that will be set to true if the + * arg was successfully retrieved or to false if an error occurred + * @param forceHex if true this makes it find the int in base 16 instead of 10 + * @return int the retrieved argument value; valid only if ok or isArgInt + * is true + **/ + AREXPORT int getArgInt(size_t whichArg, + bool *ok = NULL, bool forceHex = false) const; + + /// Sees if an argument is a long long int + AREXPORT bool isArgLongLongInt(size_t whichArg) const; + + /// Gets the value of an argument as a long long integer + /** + * There are two ways to to verify that the specified argument is an integer. + * Either call isArgInt() before calling this method, or specify a non-NULL + * ok parameter value. The latter is somewhat more efficient because the + * digit status of each character is checked only once. + * + * @param whichArg the size_t index of the arg to retrieve; must be >= 0 + * and less than getArgc() + * @param ok an optional pointer to a bool that will be set to true if the + * arg was successfully retrieved or to false if an error occurred + * @return int the retrieved argument value; valid only if ok or isArgInt + * is true + **/ + AREXPORT int getArgLongLongInt(size_t whichArg, + bool *ok = NULL) const; + + /// Sees if an argument is a double + AREXPORT bool isArgDouble(size_t whichArg) const; + + /// Gets the value of an argument as a double + /** + * There are two ways to to verify that the specified argument is a double. + * Either call isArgDouble() before calling this method, or specify a non-NULL + * ok parameter value. The latter is somewhat more efficient because the + * digit status of each character is checked only once. + * + * @param whichArg the size_t index of the arg to retrieve; must be >= 0 + * and less than getArgc() + * @param ok an optional pointer to a bool that will be set to true if the + * arg was successfully retrieved or to false if an error occurred + * @return double the retrieved argument value; valid only if ok or + * isArgDouble is true + **/ + AREXPORT double getArgDouble(size_t whichArg, + bool *ok = NULL) const; + + /// Delete a particular arg, you MUST finish adding before you can remove + AREXPORT void removeArg(size_t which, + bool isRebuildFullString = false); + /// Combines quoted arguments into one + AREXPORT void compressQuoted(bool stripQuotationMarks = false); + + /// Turn on this flag to reduce the number of verbose log messages. + AREXPORT void setQuiet(bool isQuiet); + +protected: + AREXPORT void internalAdd(const char *str, int position = -1); + AREXPORT void internalAddAsIs(const char *str, int position = -1); + AREXPORT void rebuildFullString(); + + /// Characters that may be used to separate arguments; bitwise flags so QUOTE can be combined with spaces + enum ArgSeparatorType { + SPACE = 1, // Normal space character + SPECIAL = SPACE << 1, // The special "extra" space character, if any + ANY_SPACE = SPACE | SPECIAL, // Either normal space or special extra space + QUOTE = SPECIAL << 1, // Double-quote, must be used in combination with spaces + }; + + /// Determines whether the current buffer position marks the start of an argument + /** + * This method should only be called when an argument is not currently being + * parsed (i.e. the previous character was a space). + * @param buf the char * buffer that is being parsed; must be non-NULL + * @param len the maximum number of characters in the buffer + * @param index the int buffer position of the character to be tested + * @param endArgFlagsOut a pointer to an output int that will indicate which separators + * will mark the end of the argument. If quotes are being pre-processed, and the + * current argument starts with space-quote, then the argument must end with a quote-space. + **/ + bool isStartArg(const char *buf, + int len, + int index, + int *endArgFlagsOut); + + /// Determines whether the current buffer position marks the end of an argument + /** + * This method should only be called when an argument is currently being + * parsed (i.e. isStartArg returned true). + * @param buf the char * buffer that is being parsed; must be non-NULL + * @param len the maximum number of characters in the buffer + * @param indexInOut the input/output int buffer position of the character to be tested; + * if the argument ends with a quote-space, then the index will be incremented to mark + * the space; otherwise, it will remain unchanged + * @param endArgFlags an int that indicates which separators mark the end of the + * argument. If quotes are being pre-processed, and the current argument started + * with space-quote, then the argument must end with a quote-space. + **/ + bool isEndArg(const char *buf, + int len, + int &indexInOut, + int endArgFlags); + + /// Determines whether the specified character is an acceptable space (either normal or extra) + bool isSpace(char c); + + size_t getArgvLen(void) const { return myArgvLen; } + // how many arguments we had originally (so we can delete 'em) + size_t myOrigArgc; + // how many arguments we have + size_t myArgc; + // argument list + char **myArgv; + // argv length + size_t myArgvLen; + // the extra string (utility thing) + std::string myExtraString; + // the full string + std::string myFullString; + // whether this is our first add or not + bool myFirstAdd; + // a character to alternately treat as a space + char myExtraSpace; + // if we should ignore normal spaces + bool myIgnoreNormalSpaces; + /// Whether to treat double-quotes as arg delimiters (preserving spaces within) + bool myIsPreCompressQuotes; + + bool myIsQuiet; +}; + +// ---------------------------------------------------------------------------- + +/// Comparator that returns true if arg1's full string is less than arg2's. +struct ArArgumentBuilderCompareOp +{ +public: + + /// Compares arg1's full string to arg2's. + bool operator() (ArArgumentBuilder* arg1, ArArgumentBuilder* arg2) const; + +}; // end struct ArArgumentBuilderCompareOp + + + +#endif // ARARGUMENTBUILDER_H diff --git a/Legacy/Aria/include/ArArgumentParser.h b/Legacy/Aria/include/ArArgumentParser.h new file mode 100644 index 0000000..eb96956 --- /dev/null +++ b/Legacy/Aria/include/ArArgumentParser.h @@ -0,0 +1,184 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARARGUMENTPARSER_H +#define ARARGUMENTPARSER_H + +#include "ariaTypedefs.h" +#include "ArArgumentBuilder.h" + +/// Parse and store program command-line arguments for use by other ARIA classes. +/** + This class is made for parsing arguments from the argv and argc variables + passed into a program's main() function by the operating system, from + an ArArgumentBuilder object, or just from a string (e.g. provided by WinMain() + in a Windows MFC program.) + + It will also load default argument values if you call + loadDefaultArguments(). Aria::init() adds the file /etc/Aria.args and the + environment variable ARIAARGS as locations for argument defaults, so + loadDefaultArguments() will always search those. You can + use this mechanism to avoid needing to always supply command line parameters + to all programs. For example, if you use different serial ports than the defaults + for the robot and laser, you can put a -robotPort or -laserPort argument in + /etc/Aria.args for all programs that call loadDefaultArguments() to use. + You can add other files or environment variables + to the list of default argument locations with + addDefaultArgumentFile() and addDefaultArgumentEnv(). + + Note that the wasReallySet behavior has changed. It used to set + the variable to false or to true, now it will only set it to false + if 'setWasReallySetOnlyTrue' is set to false. By default that is + set to false, but you can just set it to true after you make the + parser with no ill effects since all of the built in Aria parsers + will play nicely with this value, setting it to true or false while + they parse but then setting it to whatever it was when they + started. This change in behavior is so that checking for two + things (like -robotPort and -rp) can work without a lot of extra + work. + + @ingroup ImportantClasses +**/ +class ArArgumentParser +{ +public: + /// Constructor, takes the argc argv + AREXPORT ArArgumentParser(int *argc, char **argv); + /// Constructor, takes an argument builder + AREXPORT ArArgumentParser(ArArgumentBuilder *builder); + /// Destructor + AREXPORT ~ArArgumentParser(); + /// If we should only set wasReallySet to true + AREXPORT void setWasReallySetOnlyTrue(bool wasReallySetOnlyTrue); + /// If we only set wasReallySet to true + AREXPORT bool getWasReallySetOnlyTrue(void); + /// Returns true if the argument was found + AREXPORT bool checkArgument(const char *argument); + /// Returns the word/argument after given argument + AREXPORT char *checkParameterArgument(const char *argument, + bool returnFirst = false); + /// Returns the word/argument after given argument + AREXPORT bool checkParameterArgumentString(const char *argument, + const char **dest, + bool *wasReallySet = NULL, + bool returnFirst = false); + /// Returns the integer after given argument + AREXPORT bool checkParameterArgumentInteger(const char *argument, int *dest, + bool *wasReallySet = NULL, + bool returnFirst = false); + /// Returns the word/argument after given argument + AREXPORT bool checkParameterArgumentBool(const char *argument, bool *dest, + bool *wasReallySet = NULL, + bool returnFirst = false); + /// Returns the floating point number after given argument + AREXPORT bool checkParameterArgumentFloat(const char *argument, float *dest, + bool *wasReallySet = NULL, bool returnFirst = false); + /// Returns the floating point number after given argument + AREXPORT bool checkParameterArgumentDouble(const char *argument, double *dest, + bool *wasReallySet = NULL, bool returnFirst = false); + /// Adds a string as a default argument + AREXPORT void addDefaultArgument(const char *argument, int position = -1); + /// Adds a string as a default argument as is (without touching + /// spaces or what not) + AREXPORT void addDefaultArgumentAsIs(const char *argument, + int position = -1); + /// Adds args from default files and environmental variables + AREXPORT void loadDefaultArguments(int positon = 1); + /// Checks for the help strings and warns about unparsed arguments + AREXPORT bool checkHelpAndWarnUnparsed(unsigned int numArgsOkay = 0); + /// Gets how many arguments are left in this parser + AREXPORT size_t getArgc(void) const; + /// Gets the argv + AREXPORT char** getArgv(void) const; + /// Gets the argument builder, if one is being used (may be NULL) + AREXPORT const ArArgumentBuilder *getArgumentBuilder(void) const + { return myBuilder; } + /// Gets a specific argument + AREXPORT const char* getArg(size_t whichArg) const; + /// Prints out the arguments left in this parser + AREXPORT void log(void) const; + /// Gets the arguments this parser started with (if possible, NULL otherwise) + AREXPORT const char *getStartingArguments(void) const; + /// Internal function to remove an argument that was parsed + AREXPORT void removeArg(size_t which); + /// Adds another file or environmental variable to the list of defaults + AREXPORT static void addDefaultArgumentFile(const char *file); + /// Adds another file or environmental variable to the list of defaults + AREXPORT static void addDefaultArgumentEnv(const char *env); + /// Logs the default argument locations + AREXPORT static void logDefaultArgumentLocations(void); +#ifndef SWIG + /** @brief Returns true if the argument was found + * @swigomit + */ + AREXPORT bool checkArgumentVar(const char *argument, ...); + /** @brief Returns the word/argument after given argument + * @swigomit + */ + AREXPORT char *checkParameterArgumentVar(const char *argument, ...); + /** @brief Returns the word/argument after given argument + * @swigomit + */ + AREXPORT bool checkParameterArgumentStringVar(bool *wasReallySet, + const char **dest, + const char *argument, ...); + /** @brief Returns the word/argument after given argument + * @swigomit + */ + AREXPORT bool checkParameterArgumentBoolVar(bool *wasReallySet, bool *dest, + const char *argument, ...); + /** @brief Returns the integer after given argument + * @swigomit + */ + AREXPORT bool checkParameterArgumentIntegerVar(bool *wasReallySet, int *dest, + const char *argument, ...); + /** @brief Returns the float after given argument + * @swigomit + */ + AREXPORT bool checkParameterArgumentFloatVar(bool *wasReallySet, + float *dest, + const char *argument, ...); + /** @brief Returns the double after given argument + * @swigomit + */ + AREXPORT bool checkParameterArgumentDoubleVar(bool *wasReallySet, + double *dest, + const char *argument, ...); +#endif +protected: + static std::list ourDefaultArgumentLocs; + static std::list ourDefaultArgumentLocIsFile; + bool myOwnBuilder; + ArArgumentBuilder *myBuilder; + bool myUsingBuilder; + char **myArgv; + int *myArgc; + bool myHelp; + char myEmptyArg[1]; + bool myReallySetOnlyTrue; +}; + + +#endif // ARARGUMENTPARSER_H diff --git a/Legacy/Aria/include/ArBasePacket.h b/Legacy/Aria/include/ArBasePacket.h new file mode 100644 index 0000000..b1c2025 --- /dev/null +++ b/Legacy/Aria/include/ArBasePacket.h @@ -0,0 +1,226 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARBASEPACKET_H +#define ARBASEPACKET_H + + +#include +#include "ariaTypedefs.h" + +/// Base packet class +/** This class is a base class for specific packet types implemented by base + classes. In most cases, you would not instantiate this class directly, but instead + use a subclass. However, ArBasePacket contains many of the functions used to + access the packet's data. + + A packet is a sequence of values stored in a buffer. The contents + of a packet's data buffer is read from a device or other program or written to the + device (for example, a serial port or TCP port + using an ArDeviceConnection or using ArNetworking), optionally preceded + by a header with some identifying data and a length, and optionally followed by a + footer with a checksum of the data. (If the + header length of a particular packet type is 0, no header is written or expected on read, and likewise + with footer.) + + Values are added to the buffer or removed from the buffer in sequence. + The "bufTo" methods are used to remove values from the buffer, and the + "ToBuf" methods are used to add values to the buffer. There are different + methods for different sized values. + + ArBasePacket keeps a current position index in the buffer, which is the position + at which new values are added or values are removed. + + A buffer may be statically allocated externally and supplied to the + constructor + (also give a buffer size to determine the maximum amount of data that can be + placed in that bufer), + or automatically and dynamically allocated by ArBasePacket as needed + (the default behavior). + + When it is time to write out a packet, call finalizePacket() to set + up the footer if neccesary. + To reuse a packet, use empty() to reset the buffer; new data will + then be added to the beginning of the buffer again. +*/ +class ArBasePacket +{ +public: + + /// Constructor + AREXPORT ArBasePacket(ArTypes::UByte2 bufferSize = 0, + ArTypes::UByte2 headerLength = 0, + char * buf = NULL, + ArTypes::UByte2 footerLength = 0); + + /// Copy constructor + AREXPORT ArBasePacket(const ArBasePacket &other); + + /// Assignment operator + AREXPORT ArBasePacket &operator=(const ArBasePacket &other); + + /// Destructor + AREXPORT virtual ~ArBasePacket(); + + /// resets the length for more data to be added + AREXPORT virtual void empty(void); + + /// MakeFinals the packet in preparation for sending, must be done + AREXPORT virtual void finalizePacket(void) {} + + /// ArLogs the hex and decimal values of each byte of the packet, and possibly extra metadata as well + AREXPORT virtual void log(void); + /// ArLogs the hex value of each byte in the packet + AREXPORT virtual void printHex(void); + + /// Returns whether the packet is valid, i.e. no error has occurred when reading/writing. + AREXPORT virtual bool isValid(void); + + /// Resets the valid state of the packet. + AREXPORT virtual void resetValid(); + + // Utility functions to write different data types to a buffer. They will + // increment the length. + + /// Puts ArTypes::Byte into packets buffer + AREXPORT virtual void byteToBuf(ArTypes::Byte val); + /// Puts ArTypes::Byte2 into packets buffer + AREXPORT virtual void byte2ToBuf(ArTypes::Byte2 val); + /// Puts ArTypes::Byte4 into packets buffer + AREXPORT virtual void byte4ToBuf(ArTypes::Byte4 val); + + /// Puts ArTypes::UByte into packets buffer + AREXPORT virtual void uByteToBuf(ArTypes::UByte val); + /// Puts ArTypes::UByte2 into packet buffer + AREXPORT virtual void uByte2ToBuf(ArTypes::UByte2 val); + /// Puts ArTypes::UByte 4 into packet buffer + AREXPORT virtual void uByte4ToBuf(ArTypes::UByte4 val); + + /// Puts a NULL-terminated string into packet buffer + AREXPORT virtual void strToBuf(const char *str); + + /** + * @brief Copies the given number of bytes from str into packet buffer + * @deprecated use strToBufPadded(), strToBuf(), or dataToBuf() instead + **/ + AREXPORT virtual void strNToBuf(const char *str, int length); + /// Copies length bytes from str, if str ends before length, pads data with 0s + AREXPORT virtual void strToBufPadded(const char *str, int length); + /// Copies length bytes from data into packet buffer + AREXPORT virtual void dataToBuf(const char *data, int length); + /// Copies length bytes from data into packet buffer + AREXPORT virtual void dataToBuf(const unsigned char *data, int length); + + // Utility functions to read differet data types from a bufer. Each read + // will increment the myReadLength. + /// Gets a ArTypes::Byte from the buffer + AREXPORT virtual ArTypes::Byte bufToByte(void); + /// Gets a ArTypes::Byte2 from the buffer + AREXPORT virtual ArTypes::Byte2 bufToByte2(void); + /// Gets a ArTypes::Byte4 from the buffer + AREXPORT virtual ArTypes::Byte4 bufToByte4(void); + + /// Gets a ArTypes::UByte from the buffer + AREXPORT virtual ArTypes::UByte bufToUByte(void); + /// Gets a ArTypes::UByte2 from the buffer + AREXPORT virtual ArTypes::UByte2 bufToUByte2(void); + /// Gets a ArTypes::UByte4 from the buffer + AREXPORT virtual ArTypes::UByte4 bufToUByte4(void); + + /// Gets a string from the buffer + AREXPORT virtual void bufToStr(char *buf, int len); + /// Gets length bytes from buffer and puts them into data + AREXPORT virtual void bufToData(char * data, int length); + /// Gets length bytes from buffer and puts them into data + AREXPORT virtual void bufToData(unsigned char * data, int length); + + /// Restart the reading process + AREXPORT virtual void resetRead(void); + + // Accessors + + /// Gets the total length of the packet + virtual ArTypes::UByte2 getLength(void) const { return myLength; } + /// Gets the length of the data in the packet + virtual ArTypes::UByte2 getDataLength(void) const { return myLength - myHeaderLength - myFooterLength; } + + /// Gets how far into the packet that has been read + virtual ArTypes::UByte2 getReadLength(void) const { return myReadLength; } + /// Gets how far into the data of the packet that has been read + virtual ArTypes::UByte2 getDataReadLength(void) const { return myReadLength - myHeaderLength; } + /// Gets the length of the header + virtual ArTypes::UByte2 getHeaderLength(void) const + { return myHeaderLength; } + /// Gets the length of the header + virtual ArTypes::UByte2 getFooterLength(void) const + { return myFooterLength; } + + /// Gets the maximum length packet + virtual ArTypes::UByte2 getMaxLength(void) const { return myMaxLength; } + + /// Gets a const pointer to the buffer the packet uses + AREXPORT virtual const char * getBuf(void) const; + + /// Gets a pointer to the buffer the packet uses + AREXPORT virtual char * getBuf(void); + + /// Sets the buffer the packet is using + AREXPORT virtual void setBuf(char *buf, ArTypes::UByte2 bufferSize); + /// Sets the maximum buffer size (if new size is <= current does nothing) + AREXPORT virtual void setMaxLength(ArTypes::UByte2 bufferSize); + /// Sets the length of the packet + AREXPORT virtual bool setLength(ArTypes::UByte2 length); + /// Sets the read length + AREXPORT virtual void setReadLength(ArTypes::UByte2 readLength); + /// Sets the length of the header + AREXPORT virtual bool setHeaderLength(ArTypes::UByte2 length); + /// Makes this packet a duplicate of another packet + AREXPORT virtual void duplicatePacket(ArBasePacket *packet); +protected: + // internal function to make sure we have enough length left to read in the packet + AREXPORT bool isNextGood(int bytes); + + /// Returns true if there is enough room in the packet to add the specified number of bytes + AREXPORT bool hasWriteCapacity(int bytes); + + // internal data + ArTypes::UByte2 myHeaderLength; + ArTypes::UByte2 myFooterLength; + ArTypes::UByte2 myMaxLength; + + ArTypes::UByte2 myReadLength; + bool myOwnMyBuf; + + // Actual packet data + char *myBuf; + ArTypes::UByte2 myLength; + + // Whether no error has occurred in reading/writing the packet. + bool myIsValid; + +}; + + +#endif // ARPACKET_H diff --git a/Legacy/Aria/include/ArBatteryConnector.h b/Legacy/Aria/include/ArBatteryConnector.h new file mode 100644 index 0000000..85ea0be --- /dev/null +++ b/Legacy/Aria/include/ArBatteryConnector.h @@ -0,0 +1,193 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARBATTERYCONNECTOR_H +#define ARBATTERYCONNECTOR_H + +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ariaUtil.h" +#include "ArRobotConnector.h" + +class ArBatteryMTX; +class ArRobot; + + + +/// Connect to robot and battery based on run-time availablitily and command-line arguments +/** + + ArBatteryConnector makes a battery connection either through a serial port + connection, or through a TCP + port (for the simulator or for robots with Ethernet-serial bridge + devices instead of onboard computers). + Normally, it first attempts a TCP connection on + @a localhost port 8101, to use a simulator if running. If the simulator + is not running, then it normally then connects using the serial port + Various connection + parameters are configurable through command-line arguments or in the robot + parameter file. (Though the internal interface used by ARIA to do this is also + available if you need to use it: See addBattery(); otherwise don't use + addBattery(), setupBattery(), etc.). + + When you create your ArBatteryConnector, pass it command line parameters via + either the argc and argv variables from main(), or pass it an + ArArgumentBuilder or ArArgumentParser object. (ArArgumentBuilder + is able to obtain command line parameters from a Windows program + that uses WinMain() instead of main()). + ArBatteryConnector registers a callback with the global Aria class. Use + Aria::parseArgs() to parse all command line parameters to the program, and + Aria::logOptions() to print out information about all registered command-line parameters. + + The following command-line arguments are checked: + @verbinclude ArBatteryConnector_options + + To connect to any batteries that were set up in the robot parameter file or + via command line arguments, call connectBatteries(). If successful, + connectBatteries() will return true and add an entry for each battery connected + in the ArRobot object's list of batteries. These ArBatteryMTX objects can be + accessed from your ArRobot object via ArRobot::findBattery() or ArRobot::getBatteryMap(). + + + @since 2.8.0 + + **/ +class ArBatteryConnector +{ +public: + /// Constructor that takes argument parser + AREXPORT ArBatteryConnector(ArArgumentParser *parser, + ArRobot *robot, ArRobotConnector *robotConnector, + bool autoParseArgs = true, + ArLog::LogLevel infoLogLevel = ArLog::Verbose); + /// Destructor + AREXPORT ~ArBatteryConnector(void); + /// Connects all the batteries the robot has that should be auto connected + AREXPORT bool connectBatteries(bool continueOnFailedConnect = false, + bool addConnectedBatteriesToRobot = true, + bool addAllBatteriesToRobot = false, + bool turnOnBatteries = true, + bool powerCycleBatteryOnFailedConnect = true); + /// Sets up a battery to be connected + AREXPORT bool setupBattery(ArBatteryMTX *battery, + int batteryNumber = 1); + /// Connects the battery synchronously (will take up to a minute) + AREXPORT bool connectBattery(ArBatteryMTX *battery, + int batteryNumber = 1, + bool forceConnection = true); + /// Adds a battery so parsing will get it + AREXPORT bool addBattery(ArBatteryMTX *battery, + int batteryNumber = 1); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Internal function to get the battery (only useful between parseArgs and connectBatteries) + AREXPORT ArBatteryMTX *getBattery(int batteryNumber); + + /// Internal function to replace the battery (only useful between parseArgs and connectBatteries) but not the battery data + AREXPORT bool replaceBattery(ArBatteryMTX *battery, int batteryNumber); + +protected: +/// Class that holds information about the battery data +class BatteryData +{ + public: + BatteryData (int number, ArBatteryMTX *battery) { + myNumber = number; + myBattery = battery; + myConn = NULL; + myConnect = false; myConnectReallySet = false; + myPort = NULL; + myPortType = NULL; + myType = NULL; + myRemoteTcpPort = 0; myRemoteTcpPortReallySet = false; + myBaud = NULL; + myAutoConn = NULL; + } + virtual ~BatteryData() {} + /// The number of this battery + int myNumber; + /// The actual pointer to this battery + ArBatteryMTX *myBattery; + // our connection + ArDeviceConnection *myConn; + // if we want to connect the battery + bool myConnect; + // if myConnect was really set + bool myConnectReallySet; + // the port we want to connect the battery on + const char *myPort; + // the type of port we want to connect to the battery on + const char *myPortType; + // battery Type + const char *myType; + // wheather to auto conn + const char *myAutoConn; + // battery tcp port if we're doing a remote host + int myRemoteTcpPort; + // if our remote battery tcp port was really set + bool myRemoteTcpPortReallySet; + /// the baud we want to use + const char *myBaud; +}; + std::map myBatteries; + + /// Parses the battery arguments + AREXPORT bool parseBatteryArgs(ArArgumentParser *parser, + BatteryData *batteryData); + /// Logs the battery command line option help text. + AREXPORT void logBatteryOptions(BatteryData *batterydata, bool header = true, bool metaOpts = true) const; + // Sets the battery parameters + bool internalConfigureBattery(BatteryData *batteryData); + + std::string myBatteryTypes; + + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + // if we should autoparse args or toss errors + bool myAutoParseArgs; + bool myParsedArgs; + + ArRobot *myRobot; + ArRobotConnector *myRobotConnector; + + // variables to hold if we're logging or not + bool myBatteryLogPacketsReceived; + bool myBatteryLogPacketsSent; + + ArLog::LogLevel myInfoLogLevel; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; +}; + +#endif // ARLASERCONNECTOR_H diff --git a/Legacy/Aria/include/ArBatteryMTX.h b/Legacy/Aria/include/ArBatteryMTX.h new file mode 100644 index 0000000..232f73c --- /dev/null +++ b/Legacy/Aria/include/ArBatteryMTX.h @@ -0,0 +1,560 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARBATTERYMTX_H +#define ARBATTERYMTX_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctor.h" +#include "ArRobot.h" +#include "ArRobotPacket.h" +#include "ArRobotConnector.h" + + + +// Packets are in the format of +// 2 bytes header (0xfa 0xba) +// 1 byte length +// 1 byte command +// xx bytes command specific / args +// 2 bytes checksum +// + + +/** + @since 2.8.0 +*/ +class ArBatteryMTX : public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArBatteryMTX( + int batteryBoardNum = 0, + const char * name = "MTXBattery", + ArDeviceConnection *conn = NULL, + ArRobot *robot = NULL); + /// Destructor + AREXPORT virtual ~ArBatteryMTX(); + // Grabs the new readings from the robot and adds them to the buffers + // (Primarily for internal use.) + //AREXPORT void processReadings(void); + + int getBoardNum(void) + { return myBoardNum; } + + /// Sets the robot pointer, also attaches its process function to the + /// robot as a Sensor Interpretation task. + AREXPORT virtual void setRobot(ArRobot *robot); + + /// Very Internal call that gets the packet sender, shouldn't be used + ArRobotPacketSender *getPacketSender(void) + { return mySender; } + /// Very Internal call that gets the packet sender, shouldn't be used + ArRobotPacketReceiver *getPacketReceiver(void) + { return myReceiver; } + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + AREXPORT int getAsyncConnectState(void); + + ArRobotPacket getCellPacket() + { return myCellPacket; } + + AREXPORT virtual bool blockingConnect(bool sendTracking, bool recvTracking); + AREXPORT virtual bool disconnect(void); + virtual bool isConnected(void) { return myIsConnected; } + virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + + /// Lock this device + virtual int lockDevice() { return(myDeviceMutex.lock());} + /// Try to lock this device + virtual int tryLockDevice() {return(myDeviceMutex.tryLock());} + /// Unlock this device + virtual int unlockDevice() {return(myDeviceMutex.unlock());} + + AREXPORT void logBatteryInfo(ArLog::LogLevel level = ArLog::Normal); + AREXPORT void logCellInfo(ArLog::LogLevel level = ArLog::Normal); + void log(ArLog::LogLevel level = ArLog::Normal) + { + logBatteryInfo(level); + logCellInfo(level); + } + + AREXPORT bool sendPowerOff(); + AREXPORT bool sendPowerOffCancel(); + AREXPORT bool sendStopCharging(); + AREXPORT bool sendStartCharging(); + AREXPORT bool sendSetPowerOffDelay(unsigned int msDelay); + AREXPORT bool sendSetRealTimeClock(unsigned int secSinceEpoch); + AREXPORT bool sendResetCellData(); + AREXPORT bool sendSetReserveValue(unsigned short hundredthOfPercent); + AREXPORT bool sendSetBalanceValue(unsigned short hundredthOfPercent); + AREXPORT bool sendEmergencyPowerOff(); + AREXPORT bool sendSystemInfo(unsigned char dataValue); + AREXPORT bool sendCellInfo(unsigned char dataValue); + AREXPORT bool sendBasicInfo(unsigned char dataValue); + + AREXPORT void updateSystemInfo(unsigned char *buf); + AREXPORT void updateCellInfo(unsigned char *buf); + AREXPORT void updateBasicInfo(unsigned char *buf); + + // need to figure out how to pass back the system and cell info + //AREXPORT bool fetchSystemInfo(); + //AREXPORT bool fetchCellInfo(); + + // basic info + /// Charge estimate (in percentage, 0-100) + double getChargeEstimate(void) const + { return myChargeEstimate; } + /// Current draw (amps, negative is charging) + double getCurrentDraw(void) const + { return myCurrentDraw; } + /// volts + double getPackVoltage(void) const + { return myPackVoltage; } + int getStatusFlags(void) const + { return myStatusFlags; } + int getErrorFlags(void) const + { return myErrorFlags; } + + bool onCharger(void) const + { return myOnCharger; } + ArRobot::ChargeState getChargeState(void) const + { return myChargeState; } + int getChargeStateAsInt(void) const + { return myChargeState; } + + // system info + int getId(void) const + { return myId; } + int getFirmwareVersion(void) const + { return myFirmwareVersion; } + int getSerialNumber(void) const + { return mySerialNumber; } + //int getCurrentTime(void) const + // { return myCurrentTime; } + long long getCurrentTime(void) const + { return myCurrentTime; } + long long getLastChargeTime(void) const + { return myLastChargeTime; } + int getChargeRemainingEstimate(void) const + { return myChargeRemainingEstimate; } + int getCapacityEstimate(void) const + { return myCapacityEstimate; } + double getDelay(void) const + { return myDelay; } + int getCycleCount(void) const + { return myCycleCount; } + double getTemperature(void) const + { return myTemperature; } + double getPaddleVolts(void) const + { return myPaddleVolts; } + double getVoltage(void) const + { return myVoltage; } + double getFuseVoltage(void) const + { return myFuseVoltage; } + double getChargeCurrent(void) const + { return myChargeCurrent; } + double getDisChargeCurrent(void) const + { return myDisChargeCurrent; } + double getCellImbalance(void) const + { return myCellImbalance; } + double getImbalanceQuality(void) const + { return myImbalanceQuality; } + double getReserveChargeValue(void) const + { return myReserveChargeValue; } + + // cell info + int getNumCells(void) const + { return myNumCells; } + + + int getCellFlag(int cellNum) const + { + std::map::const_iterator iter = + myCellNumToInfoMap.find(cellNum); + if (iter == myCellNumToInfoMap.end()) + return -1; + else { + CellInfo *info = iter->second; + return(info->myCellFlags); + } } + + int getCellCapacity(int cellNum) const + { + std::map::const_iterator iter = + myCellNumToInfoMap.find(cellNum); + if (iter == myCellNumToInfoMap.end()) + return -1; + else { + CellInfo *info = iter->second; + return(info->myCellCapacity); + } } + + int getCellCharge(int cellNum) const + { + std::map::const_iterator iter = + myCellNumToInfoMap.find(cellNum); + if (iter == myCellNumToInfoMap.end()) + return -1; + else { + CellInfo *info = iter->second; + return(info->myCellCharge); + } } + + double getCellVoltage(int cellNum) const + { + std::map::const_iterator iter = + myCellNumToInfoMap.find(cellNum); + if (iter == myCellNumToInfoMap.end()) + return -1; + else { + CellInfo *info = iter->second; + return(info->myCellVoltage); + } } + + /// Request a continous stream of packets + AREXPORT void requestContinuousSysInfoPackets(void); + /// Stop the stream of packets + AREXPORT void stopSysInfoPackets(void); + /// See if we've requested packets + AREXPORT bool haveRequestedSysInfoPackets(void); + + /// Request a continous stream of packets + AREXPORT void requestContinuousCellInfoPackets(void); + /// Stop the stream of packets + AREXPORT void stopCellInfoPackets(void); + /// See if we've requested packets + AREXPORT bool haveRequestedCellInfoPackets(void); + + AREXPORT virtual const char *getName(void) const; + + void setInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + + /// Gets the default port type for the battery + const char *getDefaultPortType(void) { return myDefaultPortType.c_str(); } + + /// Gets the default port type for the battery + const char *getDefaultTcpPort(void) { return myDefaultTcpPort.c_str(); } + + /// Sets the numter of seconds without a response until connection assumed lost + virtual void setConnectionTimeoutSeconds(double seconds) + { ArLog::log(ArLog::Normal, + "%s::setConnectionTimeoutSeconds: Setting timeout to %g secs", + getName(), seconds); + myTimeoutSeconds = seconds; } + /// Gets the number of seconds without a response until connection assumed lost + virtual double getConnectionTimeoutSeconds(void) + {return myTimeoutSeconds; } + /// check for lost connections + AREXPORT bool checkLostConnection(void); + /// disconnect + AREXPORT void disconnectOnError(void); + /// Gets the time data was last receieved + ArTime getLastReadingTime(void) { return myLastReading; } + /// Gets the number of battery readings received in the last second + AREXPORT int getReadingCount(void); + // Function called in sensorInterp to indicate that a + // reading was received + AREXPORT virtual void internalGotReading(void); + + /// Adds a callback for when disconnection happens because of an error + void addDisconnectOnErrorCB(ArFunctor *functor, + int position = 51) + { myDisconnectOnErrorCBList.addCallback(functor, position); } + + /// Removes a callback for when disconnection happens because of an error + void remDisconnectOnErrorCB(ArFunctor *functor) + { myDisconnectOnErrorCBList.remCallback(functor); } + + + /// Adds a callback for when the battery is powering off + void addBatteryPoweringOffCB(ArFunctor *functor, + int position = 51) + { myBatteryPoweringOffCBList.addCallback(functor, position); } + + /// Removes a callback for when the battery is powering off + void remBatteryPoweringOffCB(ArFunctor *functor) + { myBatteryPoweringOffCBList.remCallback(functor); } + + /// Adds a callback for when the battery is powering off + void addBatteryPoweringOffCancelledCB(ArFunctor *functor, + int position = 51) + { myBatteryPoweringOffCancelledCBList.addCallback(functor, position); } + + /// Removes a callback for when the battery is powering off + void remBatteryPoweringOffCancelledCB(ArFunctor *functor) + { myBatteryPoweringOffCancelledCBList.remCallback(functor); } + + // myStatusFlags + enum StatusFlags { + STATUS_ON_CHARGER=0x0001, + STATUS_CHARGING=0x0002, + STATUS_BALANCING_ENGAGED=0x0004, + STATUS_CHARGER_ON=0x0008, + STATUS_BATTERY_POWERING_OFF=0x0010, + STATUS_MASTER_SWITCH_ON=0x0020, + STATUS_CHARGE_SWITCH_ON=0x0040, + STATUS_COMMANDED_SHUTDOWN=0x0080, + STATUS_OFF_BUTTON_PRESSED=0x0100, + STATUS_ON_BUTTON_PRESSED=0x0200, + STATUS_USER_BUTTON_PRESSED=0x0400 + }; + + // myErrorFlags (if this is updated also change the code in interpBasicInfo + enum ErrorFlags { + ERROR_BATTERY_OVERVOLTAGE=0x0001, + ERROR_BATTERY_UNDERVOLTAGE=0x0002, + ERROR_OVERCURRENT=0x0004, + ERROR_BLOWNFUSE=0x0008, + ERROR_RTC_ERROR=0x0010, + ERROR_OVER_TEMPERATURE=0x0020, + ERROR_MASTER_SWITCH_FAULT=0x0040, + ERROR_SRAM_ERROR=0x0080, + ERROR_CHARGER_OUT_OF_VOLTAGE_RANGE=0x0100, + ERROR_CHARGER_CIRCUIT_FAULT=0x0200 + }; + +enum Headers { + HEADER1=0xfa, + HEADER2=0xba + }; + + +protected: + ArDeviceConnection *myConn; + int myAsyncConnectState; + std::string myName; + std::string myDefaultPortType; + std::string myDefaultTcpPort; + + double myTimeoutSeconds; + bool myRobotRunningAndConnected; + + ArTime myLastReading; + + // packet count + time_t myTimeLastReading; + int myReadingCurrentCount; + int myReadingCount; + + ArCallbackList myDisconnectOnErrorCBList; + ArCallbackList myBatteryPoweringOffCBList; + ArCallbackList myBatteryPoweringOffCancelledCBList; + + ArRobot *myRobot; + ArFunctorC myProcessCB; + + AREXPORT virtual void batterySetName(const char *name); + AREXPORT virtual void * runThread(void *arg); + + + AREXPORT bool getSystemInfo(); + AREXPORT bool getCellInfo(); + AREXPORT bool getBasicInfo(); + + void interpBasicInfo(void); + void interpErrors(void); + void checkAndSetCurrentErrors(ErrorFlags errorFlag, const char *errorString); + + // PS - need this because of debug log - battery won't send continuous cell + ArRobotPacket myCellPacket; + + void sensorInterp(void); + void failedToConnect(void); + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + bool myOnCharger; + ArRobot::ChargeState myChargeState; + + int myBoardNum; + unsigned char myVersion; + + ArLog::LogLevel myLogLevel; + + //ArBatteryMTXPacketReceiver myReceiver; + + + ArRobotPacketReceiver *myReceiver; + ArRobotPacketSender *mySender; + + ArMutex myPacketsMutex; + ArMutex myDataMutex; + ArMutex myDeviceMutex; + + ArLog::LogLevel myInfoLogLevel; + + //std::list myPackets; + std::list myPackets; + + ArTime myPrevBatteryIntTime; + + bool myRequestedSysInfoBatteryPackets; + bool myRequestedCellInfoBatteryPackets; + + bool mySendTracking; + bool myRecvTracking; + +// Protocol Commands + + +enum Commands { + BASIC_INFO=0x00, + SYSTEM_INFO=0x01, + CELL_INFO=0x02, + POWER_OFF_REQUEST=0x10, + POWER_OFF_CANCEL=0x11, + STOP_CHARGING=0x12, + START_CHARGING=0x13, + SET_POWER_OFF_DELAY=0x20, + SET_REAL_TIME_CLOCK=0x21, + RESET_CELL_DATA=0x22, + SET_RESERVE_VALUE=0x23, + SET_BALANCE_VALUE=0x24, + EMERGENCY_OFF=0xff + }; + +// SYSTEM_INFO and CELL_INFO Data +enum Data { + STOP_SENDING=0x00, + SEND_ONCE=0x01, + SEND_CONTINUOUS=0x02 + }; + +// Length fields - +enum Sizes { + BASIC_INFO_SIZE=16, + SYSTEM_INFO_SIZE=60, + CELL_INFO_SIZE=95 // this is for 8 cells + }; + + // System Info + unsigned char myId; + unsigned char myFirmwareVersion; + unsigned int mySerialNumber; + long long myCurrentTime; + //unsigned int myCurrentTime; + //unsigned int myLastChargeTime; + long long myLastChargeTime; + unsigned int myChargeRemainingEstimate; + unsigned int myCapacityEstimate; + unsigned int myRawDelay; + double myDelay; + unsigned int myCycleCount; + unsigned short myRawTemperature; + double myTemperature; + unsigned short myRawPaddleVolts; + double myPaddleVolts; + unsigned short myRawVoltage; + double myVoltage; + unsigned short myRawFuseVoltage; + double myFuseVoltage; + unsigned short myRawChargeCurrent; + double myChargeCurrent; + unsigned short myRawDisChargeCurrent; + double myDisChargeCurrent; + unsigned short myRawCellImbalance; + double myCellImbalance; + unsigned short myRawImbalanceQuality; + double myImbalanceQuality; + unsigned short myRawReserveChargeValue; + double myReserveChargeValue; + + // end system info + + // Cell Info + + // myCellFlags defines + + enum CellFlags { + BALANCER_IS_ON=0x01, + OVER_VOLTAGE=0x02, + UNDER_VOLTAGE=0x04 + }; + + + struct CellInfo { + unsigned char myCellFlags; + unsigned short myRawCellVoltage; + double myCellVoltage; + unsigned short myCellCharge; + unsigned short myCellCapacity; + }; + + unsigned char myNumCells; + std::map myCellNumToInfoMap; + + // end cell info + + // Basic Info + + unsigned short myRawChargeEstimate; + double myChargeEstimate; + unsigned short myRawCurrentDraw; + double myCurrentDraw; + unsigned short myRawPackVoltage; + double myPackVoltage; + unsigned short myStatusFlags; + unsigned short myErrorFlags; + + bool myHaveSetRTC; + + int myLastStatusFlags; + + bool myFirstErrorFlagsCheck; + unsigned short myLastErrorFlags; + std::string myErrorString; + int myErrorCount; + std::string myLastErrorString; + int myLastErrorCount; + + + + // end basic info + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; + +}; + + + +#endif // ARBATTERYMTX_H diff --git a/Legacy/Aria/include/ArBumpers.h b/Legacy/Aria/include/ArBumpers.h new file mode 100644 index 0000000..1948c28 --- /dev/null +++ b/Legacy/Aria/include/ArBumpers.h @@ -0,0 +1,64 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARBUMPERS_H +#define ARBUMPERS_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" + + +/// A class that treats the robot's bumpers as a range device. +/** + The class treats bumpers like a range device. When a bumper + is bumped, it reports the approximate position of the bump + in a buffer. The positions are kept current for a specified + length of time. + + @ingroup DeviceClasses +*/ +class ArBumpers : public ArRangeDevice +{ +public: + AREXPORT ArBumpers(size_t currentBufferSize = 30, + size_t cumulativeBufferSize = 30, + const char *name = "bumpers", + int maxSecondsToKeepCurrent = 15, + double angleRange = 135); + AREXPORT virtual ~ArBumpers(void); + + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT void processReadings(void); + AREXPORT void addBumpToBuffer(int bumpValue, int whichBumper); + +protected: + ArFunctorC myProcessCB; + ArRobot *myRobot; + int myBumpMask; + double myAngleRange; +}; + + +#endif // ARBUMPERS_H diff --git a/Legacy/Aria/include/ArCameraCollection.h b/Legacy/Aria/include/ArCameraCollection.h new file mode 100644 index 0000000..41c609d --- /dev/null +++ b/Legacy/Aria/include/ArCameraCollection.h @@ -0,0 +1,506 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCAMERACOLLECTION_H +#define ARCAMERACOLLECTION_H + +#include +#include +#include + +#include "ArConfigArg.h" +#include "ArFunctor.h" +#include "ArMutex.h" + +class ArCameraCollectionItem; +class ArCameraParameterSource; + +/// Maintains information about all of the robot's cameras. +/** + * ArCameraCollection is a repository for information about each of the + * cameras that are installed on the robot. It enables clients to adjust + * to robots with varying camera configurations. + *

+ * Three main types of information are maintained for each camera: + *

    + *
  • Overview Information: This includes the name and type of the camera, + * along with text strings suitable for display. Note that each camera + * must be assigned a unique name. Furthermore, the overview information + * must be added to the collection before any of the other types of + * information are added.
  • + * + *
  • Command Information: Each camera may respond to any number + * of generic commands (such as pan/tilt/zoom, or get camera picture). + * The command information defines which commands are supported for + * each camera, and also defines a unique "camera command name" for + * each generic command. (The "camera command name", for example, + * may be used as a network packet name. It must be unique across + * all of the robot's cameras.) Commands which are commonly + * supported are defined in ArCameraCommands, but additional ones may + * be added.
  • + * + *
  • Parameter Information: Parameters, or settings, may be defined + * for each camera. A framework has been built into the collection to + * allow clients to view/edit the parameters. Changes are relayed to + * the originator (source) of the parameter, which is responsible for + * actually adjusting the camera hardware.
  • + *
+ *

+ * Callbacks may be installed on the collection to be notified whenever + * the collection is modified. This notification only occurs when + * cameras, commands, or parameters are added or removed. (The editing + * of parameters is merely passed to the parameter source.) + *

+ * ArCameraCollection is thread-safe. + + @ingroup OptionalClasses +**/ +class ArCameraCollection +{ +public: + + /// Constructor + AREXPORT ArCameraCollection(); + + /// Destructor + AREXPORT virtual ~ArCameraCollection(); + + // --------------------------------------------------------------------------- + + /// Adds a new camera to the collection. + /** + * @param cameraName the char * name of the camera; must be unique + * and non-NULL + * @param cameraType the char * type of the camera (e.g. VCC4 or Omni) + * @param displayName the char * string to be displayed for the + * camera name; if NULL, then the cameraName is used instead + * @param displayType the char * string to be displayed for the + * camera type; if NULL, then the cameraType is used instead + * @return bool true if the camera was successfully added; false, + * otherwise. + **/ + AREXPORT virtual bool addCamera(const char *cameraName, + const char *cameraType, + const char *displayName, + const char *displayType); + + /// Removes the specified camera from the collection. + /** + * @param cameraName the char * name of the camera to be removed + * @return bool true if the camera was successfully removed; false, + * otherwise. + **/ + AREXPORT virtual bool removeCamera(const char *cameraName); + + /// Adds the specified command to the camera. + /** + * @param cameraName the char * name of the camera to which the + * command is to be added. The camera must have already been + * installed in the collection via the addCamera() method. + * @param command the char * identifier of the command that is being + * added. Common commands (currently recognized by MobileEyes) + * are defined in ArCameraCommands. + * @param cameraCommandName the corresponding char * command + * (i.e. network packet) name that is actually handled by the + * camera. The cameraCommandName must be non-NULL and unique + * across all robot cameras. + * @param requestInterval the int number of milliseconds between + * client requests for repeating commands; if -1, then the + * command is not repeating. + * @return bool true if the command was successfully added; + * false if an error occurred. + **/ + AREXPORT virtual bool addCameraCommand(const char *cameraName, + const char *command, + const char *cameraCommandName, + int requestInterval = -1); + + + /// Removes the specified command from the camera. + /** + * @param cameraName the char * name of the camera from which the + * command is to be removed. + * @param command the char * identifier of the command that is being + * removed. + * @return bool true if the command was successfully removed; + * false if an error occurred. + **/ + AREXPORT virtual bool removeCameraCommand(const char *cameraName, + const char *command); + + + /// Adds the specified parameter to the camera. + /** + * @param cameraName the char * name of the camera to which the + * parameter is to be added. The camera must have already been + * installed in the collection via the addCamera() method. + * @param source the ArCameraParameterSource * that is to be notified + * when the parameter value is changed; if NULL, then no notification + * @param param the ArConfigArg parameter to be added; the parameter + * name must be unique for this camera. (Parameter names may be + * reused across different cameras though.) + * @return bool true if the parameter was successfully added to the + * camera; false if an error occurred + **/ + AREXPORT virtual bool addParameter(const char *cameraName, + ArCameraParameterSource *source, + const ArConfigArg ¶m); + + + /// Removes the specified parameter from the camera. + /** + * @param cameraName the char * name of the camera from which the + * parameter is to be removed. + * @param paramName the char * name of the parameter to be removed + * @return bool true if the parameter was successfully removed from the + * camera; false if an error occurred + **/ + AREXPORT virtual bool removeParameter(const char *cameraName, + const char *paramName); + + // --------------------------------------------------------------------------- + + /// Returns the names of the cameras that are in the collection. + /** + * @param outList the std::list into which the names are output; + * any previous contents of the outList are cleared. + **/ + AREXPORT virtual void getCameraNames(std::list &outList); + + + /// Returns the type of the specified camera. + /** + * @param cameraName the unique char * name of the camera + * @return char * the type of the specified camera; NULL if the camera was + * not found in the collection + **/ + AREXPORT virtual const char *getCameraType(const char *cameraName); + + /// Returns the display name of the specified camera. + /** + * @param cameraName the unique char * name of the camera + * @return char * the string to be displayed as the name of the specified camera; + * NULL if the camera was not found in the collection + **/ + AREXPORT virtual const char *getDisplayName(const char *cameraName); + + /// Returns the display type of the specified camera. + /** + * @param cameraName the unique char * name of the camera + * @return char * the string to be displayed as the type of the specified camera; + * NULL if the camera was not found in the collection + **/ + AREXPORT virtual const char *getDisplayType(const char *cameraName); + + // --------------------------------------------------------------------------- + + /// Returns the generic commands that are supported by the specified camera. + /** + * @param cameraName the unique char * name of the camera + * @param outList the std::list into which the commands are output; + * any previous contents of the outList are cleared. + **/ + AREXPORT virtual void getCameraCommands(const char *cameraName, + std::list &outList); + + /// Returns the specific camera command (/ network packet) name for the generic command. + /** + * @param cameraName the unique char * name of the camera + * @param command the char * name of the generic command to be retrieved + * @return char * the unique command (or network packet) name for the generic + * command on the specified camera; NULL, if the camera does not support the + * generic command + **/ + AREXPORT virtual const char *getCommandName(const char *cameraName, + const char *command); + + /// Returns the default request interval for the specified camera command. + /** + * @param cameraName the unique char * name of the camera + * @param command the char * name of the generic command + * @return int the default number of milliseconds between command requests; + * if -1, then the command is not for refreshing data + **/ + AREXPORT virtual int getRequestInterval(const char *cameraName, + const char *command); + + // --------------------------------------------------------------------------- + + /// Returns the names of the parameters for the specified camera. + /** + * @param cameraName the unique char * name of the camera + * @param outList the std::list into which the parameter names are + * output; any previous contents of the outList are cleared. + **/ + AREXPORT virtual void getParameterNames(const char *cameraName, + std::list &outList); + + /// Returns the specified camera parameter. + /** + * @param cameraName the unique char * name of the camera + * @param parameterName the unique char * name of the parameter to be retrieved + * @param paramOut the ArConfigArg into which the parameter is copied + * @return bool true if the parameter was successfully found; false, otherwise. + **/ + AREXPORT virtual bool getParameter(const char *cameraName, + const char *parameterName, + ArConfigArg ¶mOut); + + /// Updates the specified camera parameter. + /** + * @param cameraName the unique char * name of the camera + * @param param the ArConfigArg to be set; the parameter must have been + * previously added to the camera with the addParameter() method + * @return bool true if the parameter was found and set; false, otherwise. + **/ + AREXPORT virtual bool setParameter(const char *cameraName, + const ArConfigArg ¶m); + + // --------------------------------------------------------------------------- + + /// Returns whether the specified camera is contained in the collection. + AREXPORT virtual bool exists(const char *cameraName); + + /// Returns whether the specified command is defined for a particular camera. + AREXPORT virtual bool exists(const char *cameraName, + const char *command); + + /// Returns whether the specified parameter has been defined for a particular camera. + AREXPORT virtual bool parameterExists(const char *cameraName, + const char *paramName); + + // --------------------------------------------------------------------------- + + /// Adds a callback to be invoked when the camera collection has been modified. + /** + * @param functor the ArFunctor * to be invoked when the collection has been + * modified; must be non-NULL + * @param position the ArListPos::Pos at which to put the callback + * (beginning or end) + * @return bool true if the callback was succesfully added; false, otherwise. + **/ + AREXPORT virtual bool addModifiedCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + + /// Removes a callback from the modified notification list. + /** + * @param functor the ArFunctor * to be removed from the notification list + * @return bool true if the callback was succesfully removed; false, otherwise. + **/ + AREXPORT virtual bool removeModifiedCB(ArFunctor *functor); + + + /// Starts an update to the collection. + /** + * This method may be used when multiple changes are being made to the collection. + * While an update is in progress, the modified callbacks will not be invoked. + * The endUpdate() method should be called after all of the changes are complete + * (and then the modified callbacks will be invoked). + **/ + AREXPORT virtual void startUpdate(); + + /// Ends an update to the collection. + /** + * A call to startUpdate() must eventually be followed by a call to endUpdate(). + **/ + AREXPORT virtual void endUpdate(); + + + // --------------------------------------------------------------------------- + + /// Lock the collection + int lock() { + return (myMutex.lock()); + } + + /// Try to lock the collection without blocking + int tryLock() { + return(myMutex.tryLock()); + } + + /// Unlock the collection + int unlock() { + return(myMutex.unlock()); + } + + +// ----------------------------------------------------------------------------- +protected: + + /// Information regarding a particular camera command. + struct CommandInfo { + + /// Generic name of the command. + std::string myCommand; + /// Unique name of the corresponding command (or packet) for this camera. + std::string myCameraCommandName; + /// Default number of milliseconds between command requests. + int myRequestInterval; + + /// Constructor + CommandInfo(); + /// Destructor + ~CommandInfo(); + + }; // end struct CommandInfo + + + /// Information regarding a particular camera parameter. + struct ParamInfo { + + /// Source of the parameter (to be notified when the parameter changes) + ArCameraParameterSource *mySource; + /// The parameter + ArConfigArg myParam; + + /// Constructor + ParamInfo(); + /// Destructor + ~ParamInfo(); + + }; // end struct ParamInfo + + + /// Information regarding a single camera. + struct CameraInfo { + + /// Unique name of the camera + std::string myCameraName; + /// Type of the camera + std::string myCameraType; + /// String displayed for the name of the camera + std::string myDisplayName; + /// String displayed for the type of the camera + std::string myDisplayType; + /// Map of generic command names to the specific camera command info + std::map myCommandToInfoMap; + /// Map of parameter names to the related info (including the actual parameter value) + std::map myParamToInfoMap; + + /// Constructor + CameraInfo(); + /// Destructor + ~CameraInfo(); + + }; // end struct CameraInfo + + + /// Returns a pointer to the CameraInfo for the specified camera. + CameraInfo *findCameraInfo(const char *cameraName); + + /// Returns a pointer to the CommandInfo for the specified generic command. + CommandInfo *findCommandInfo(const char *cameraName, + const char *commandName); + + /// Returns a pointer to the ParamInfo for the specified parameter. + ParamInfo *findParamInfo(const char *cameraName, + const char *paramName); + + /// Sets an indication that the collection has been modified. + void setModified(); + + /// Invokes each of the callbacks when the collection has been modified. + void notifyModifiedListeners(); + +private: + /// Disabled copy ctor + ArCameraCollection(const ArCameraCollection &); + /// Disabled assignment operator + ArCameraCollection &operator=(const ArCameraCollection &); + +protected: + + /// Mutex for multi-threaded access + ArMutex myMutex; + /// Map of camera names to the associated camera information + std::map myCameraToInfoMap; + /// Whether updates are currently enabled + bool myIsUpdatesEnabled; + /// Whether the collection has been modified (since the last notification) + bool myIsModified; + /// List of callbacks to be notified when the collection is modified + std::list myModifiedCBList; + +}; // end class ArCameraCollection + +// ----------------------------------------------------------------------------- + +/// Interface for items that add information to the camera collection. +/** + * ArCameraCollectionItem is a simple interface whose primary purpose is to + * identify classes that support some aspect of a camera's functionality. + * It defines two methods: one to identify the associated camera, and one + * that adds the information about the supported functionality to the collection. + * (Note that the addToCameraCollection() method is not automatically invoked. + * Its only purpose in life is to suggest consistency between different items.) +**/ +class ArCameraCollectionItem +{ +public: + + /// Constructor + ArCameraCollectionItem() {}; + /// Destructor + virtual ~ArCameraCollectionItem() {}; + + /// Returns the name of the camera handled by this item. + virtual const char *getCameraName() = 0; + + /// Adds this item to the given camera collection. + virtual void addToCameraCollection(ArCameraCollection &collection) = 0; + +}; // end class ArCameraCollectionItem + +// ----------------------------------------------------------------------------- + +/// Interface for collection items that also access the camera's parameters. +/** + * ArCameraParameterSource is a special collection item that provides the ability + * to read and modify some of the camera's parameters. In general, the + * addToCameraCollection() method should add the parameters to the collection. + * The collection will then invoke the getParameter() and setParameter() methods as + * callers make changes to the parameters; the ArCameraParameterSource is reponsible + * for propagating the changes to the camera hardware. +**/ +class ArCameraParameterSource : public ArCameraCollectionItem +{ +public: + + /// Constructor + ArCameraParameterSource() {}; + /// Destructor + ~ArCameraParameterSource() {}; + + /// Gets the specified camera parameter. + virtual bool getParameter(const char *paramName, + ArConfigArg ¶mOut) = 0; + + /// Sets the given camera parameter. + virtual bool setParameter(const ArConfigArg ¶m) = 0; + +}; // end class ArCameraParameterSource + + +#endif // ARCAMERACOLLECTION_H diff --git a/Legacy/Aria/include/ArCameraCommands.h b/Legacy/Aria/include/ArCameraCommands.h new file mode 100644 index 0000000..faf01f4 --- /dev/null +++ b/Legacy/Aria/include/ArCameraCommands.h @@ -0,0 +1,167 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCAMERACOMMANDS_H +#define ARCAMERACOMMANDS_H + +#include "ariaUtil.h" + +/// Commands that are supported by the camera (ArPTZ) and video classes. +/** + * ArCameraCommands defines the commands that are commonly supported by + * the Aria camera and video classes. The commands that are actually + * supported for a particular camera are specified in the ArCameraCollection. + *

+ * There are basically two classes of commands: + *

    + *
  1. Double Format Commands: These commands use the new double interface + * to the Aria camera classes. They are generally preferred for future + * development since they provide finer control over the camera movements. + * In addition, only these commands will work correctly in a multi-camera + * configuration.
  2. + * + *
  3. Integer Format Commands: These commands are maintained for backwards + * compatibility. They will not work correctly in a multi-camera + * configuration. (Only the first camera will be used.)
  4. + *
+ * +**/ +class ArCameraCommands +{ +public: + + // --------------------------------------------------------------------------- + // Double Format Commands + // --------------------------------------------------------------------------- + + /// Returns the current pan/tilt/zoom of the camera (in double format). + AREXPORT static const char *GET_CAMERA_DATA; + + /// Returns general information about the camera (in double format). + /** + * General information about the camera includes the pan/tilt/zoom ranges + * and whether zooming is available. In general, clients need only + * to request this data once at startup. + **/ + AREXPORT static const char *GET_CAMERA_INFO; + + /// Returns the last image obtained from the camera. + AREXPORT static const char *GET_PICTURE; + + /// Returns the last image obtained from the camera. + AREXPORT static const char *GET_PICTURE_OPTIM; + + /// Returns a high resolution image from the camera, suitable for saving. + /** + * This command is not yet fully supported. + **/ + AREXPORT static const char *GET_SNAPSHOT; + + /// Returns whether the camera/image should be displayed by the client. + /** + * This command is not yet fully supported. + **/ + AREXPORT static const char *GET_DISPLAY; + + + /// Sends a command to the camera to set its pan/tilt/zoom, in absolute terms (in double format). + AREXPORT static const char *SET_CAMERA_ABS; + + /// Sends a command to the camera to set its pan/tilt, as specified by a percent offset of its current frame. + AREXPORT static const char *SET_CAMERA_PCT; + + /// Sends a command to the camera to set its pan/tilt/zoom, relative to its current position (in double format). + AREXPORT static const char *SET_CAMERA_REL; + + /// Sends a packet back with the list of modes + AREXPORT static const char *GET_CAMERA_MODE_LIST; + + /// A packet that gets sent out when the mode is changed + /** + Note that each mode might have arguments after it for just that + mode, so only the mode name at the start is generic. + **/ + AREXPORT static const char *CAMERA_MODE_UPDATED; + + /// A command that sets the mode of the camera + /** + Note that each mode can have its own arguments so only the mode + name at the start is generic. + **/ + AREXPORT static const char *SET_CAMERA_MODE; + + /// A command that resets the camera + AREXPORT static const char *RESET_CAMERA; + + // --------------------------------------------------------------------------- + // Integer Format Commands + // The following commands are maintained solely for backwards-compatibility. + // --------------------------------------------------------------------------- + + + /// Returns the current pan/tilt/zoom of the camera (as byte2 integers). + /** + * @deprecated GET_CAMERA_DATA is preferred instead + **/ + AREXPORT static const char *GET_CAMERA_DATA_INT; + + /// Returns general information about the camera (as byte2 integers). + /** + * @deprecated GET_CAMERA_INFO is preferred instead + **/ + AREXPORT static const char *GET_CAMERA_INFO_INT; + + /// Sends a command to the camera to set its pan/tilt/zoom, in absolute terms (as byte integers). + /** + * @deprecated SET_CAMERA_ABS is preferred instead + **/ + AREXPORT static const char *SET_CAMERA_ABS_INT; + + /// Sends a command to the camera to set its pan/tilt/zoom, relative to its current position (as byte integers). + /** + * @deprecated SET_CAMERA_REL is preferred instead + **/ + AREXPORT static const char *SET_CAMERA_REL_INT; + + /// Sends a command to the camera to set its pan/tilt, as specified by a percent offset (as byte integers). + /** + * @deprecated SET_CAMERA_PCT is preferred instead + **/ + AREXPORT static const char *SET_CAMERA_PCT_INT; + + /** + * @deprecated GET_PICTURE is preferred instead + **/ + AREXPORT static const char *GET_VIDEO; + + /** + * @deprecated GET_SNAPSHOT is preferred instead + **/ + AREXPORT static const char *GET_SNAPSHOT_PLAIN; + +}; // end class ArCameraCommands + +#endif // ARCAMERACOMMANDS_H + diff --git a/Legacy/Aria/include/ArCommands.h b/Legacy/Aria/include/ArCommands.h new file mode 100644 index 0000000..5734aac --- /dev/null +++ b/Legacy/Aria/include/ArCommands.h @@ -0,0 +1,172 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCOMMANDS_H +#define ARCOMMANDS_H + +/// A class containing names for most robot microcontroller system commands +/** + A class with an enum of the commands that can be sent to the robot, see the + robot operations manual for more detailed descriptions. + @ingroup OptionalClasses +*/ +class ArCommands +{ +public: + enum Commands { + PULSE = 0, ///< none, keep alive command, so watchdog doesn't trigger + OPEN = 1, ///< none, sent after connection to initiate connection + CLOSE = 2, ///< none, sent to close the connection to the robot + POLLING = 3, ///< string, string that sets sonar polling sequence + ENABLE = 4, ///< int, enable (1) or disable (0) motors + SETA = 5, ///< int, sets translational accel (+) or decel (-) (mm/sec/sec) + SETV = 6, ///< int, sets maximum velocity (mm/sec) + SETO = 7, ///< int, resets robots origin back to 0, 0, 0 + MOVE = 8, ///< int, translational move (mm) + ROTATE = 9, ///< int, set rotational velocity, duplicate of RVEL (deg/sec) + SETRV = 10, ///< int, sets the maximum rotational velocity (deg/sec) + VEL = 11, ///< int, set the translational velocity (mm/sec) + HEAD = 12, ///< int, turn to absolute heading 0-359 (degrees) + DHEAD = 13, ///< int, turn relative to current heading (degrees) + //DROTATE = 14, does not really exist + SAY = 15, /**< string, makes the robot beep. + up to 20 pairs of duration (20 ms incrs) and tones (halfcycle) */ + JOYINFO = 17, // int, requests joystick packet, 0 to stop, 1 for 1, 2 for continuous + CONFIG = 18, ///< int, request configuration packet + ENCODER = 19, ///< int, > 0 to request continous stream of packets, 0 to stop + SETRVDIR = 20, ///< int, Sets the rot vel max in each direction + RVEL = 21, ///< int, set rotational velocity (deg/sec) + DCHEAD = 22, ///< int, colbert relative heading setpoint (degrees) + SETRA = 23, ///< int, sets rotational accel(+) or decel(-) (deg/sec) + SONAR = 28, ///< int, enable (1) or disable (0) sonar + STOP = 29, ///< int, stops the robot + DIGOUT = 30, ///< int, sets the digout lines + //TIMER = 31, ... no clue about this one + VEL2 = 32, /**< int, independent wheel velocities, + first 8 bits = right, second 8 bits = left, multiplied by Vel2 divisor. See manual. */ + GRIPPER = 33, ///< int, gripper server command, see gripper manual for detail + //KICK = 34, um... + ADSEL = 35, ///< int, select the port given as argument + GRIPPERVAL = 36, ///< p2 gripper server value, see gripper manual for details + GRIPPERPACREQUEST = 37, ///< p2 gripper packet request + IOREQUEST = 40, ///< request iopackets from p2os + PTUPOS = 41, ///< most-sig byte is port number, least-sig byte is pulse width + TTY2 = 42, ///< string, send string argument to serial dev connected to aux1 + GETAUX = 43, ///< int, requests 1-200 bytes from aux1 serial channel, 0 flush + BUMPSTALL = 44, /**< int, stop and register a stall if front (1), rear (2), + or both (3) bump rings are triggered, Off (default) is 0 */ + TCM2 = 45, ///< TCM2 module commands, see tcm2 manual for details + JOYDRIVE = 47, /**< Command to tell p2os to drive with the joystick + plugged into the robot */ + MOVINGBLINK = 49, ///< int, 1 to blink lamp quickly before moving, 0 not to (for patrolbot) + HOSTBAUD = 50, ///< int, set baud rate for host port - 0=9600, 1=19200, 2=38400, 3=57600, 4=115200 + AUX1BAUD = 51, ///< int, set baud rate for Aux1 - 0=9600, 1=19200, 2=38400, 3=57600, 4=115200 + AUX2BAUD = 52, ///< int, set baud rate for Aux2 - 0=9600, 1=19200, 2=38400, 3=57600, 4=115200 + ESTOP = 55, ///< none, emergency stop, overrides decel + ESTALL = 56, // ? + GYRO = 58, ///< int, set to 1 to enable gyro packets, 0 to disable + TTY4 = 60, + GETAUX3 = 61, + BATTERYINFO = 62, ///< int, requests battery info packets, 0 to stop, 1 for 1, 2 for continuous + TTY3 = 66, + GETAUX2 = 67, + BATTEST = 250, + + // SRISIM specific: + LOADPARAM = 61, ///< @deprecated only supported by SRISim. Conflicts with GETAUX3 + OLDSIM_LOADPARAM = 61, ///< @deprecated only supported by SRISim. Conflicts with GETAUX3 + ENDSIM = 62, ///< @deprecated use SIM_EXIT + OLDSIM_EXIT = 62, ///< @deprecated use SIM_EXIT + LOADWORLD = 63, ///< @deprecated only supported by SRISim + OLDSIM_LOADWORLD = 63, ///< @deprecated only supported by SRISim + STEP = 64, ///< @deprecated only supported by SRISim + OLDSIM_STEP = 64, ///< @deprecated only supported by SRISim + + // for calibrating the compass: + CALCOMP = 65, ///< int, commands for calibrating compass, see compass manual + + // SRISIM specific: + // SETORIGINX and SETORIGINY overlap with TTY3 and GETAUX2 so they are disabled: + //SETSIMORIGINX = 66, + //SETSIMORIGINY = 67, + //OLDSIM_SETORIGINX = 66, + //OLDSIM_SETORIGINY = 67, + SETSIMORIGINTH = 68, ///< @deprecated use SIM_SET_POSE + OLDSIM_SETORIGINTH = 68, ///< @deprecated use SIM_SET_POSE + RESETSIMTOORIGIN = 69, ///< @deprecated use SIM_RESET + OLDSIM_RESETTOORIGIN = 69, ///< @deprecated use SIM_RESET + + // AmigoBot-H8 specific: + SOUND = 90, ///< int, AmigoBot (old H8 model) specific, plays sound with given number + PLAYLIST = 91, /**< int, AmigoBot (old H8 model) specific, requests name of sound, + 0 for all, otherwise for specific sound */ + SOUNDTOG = 92, ///< int, AmigoBot (old H8 model) specific, enable(1) or diable(0) sound + + // Power commands + POWER_PC = 95, ///< int, Powers on or off the PC (if the firwmare is set up to do this in its power settings) + POWER_LRF = 96, ///< int, Powers on or off the laser (if the firwmare is set up to do this in its power settings) + POWER_5V = 97, ///< int, Powers on or off the 5v accessories (if the firwmare is set up to do this in its power settings) + POWER_12V = 98, ///< int, Powers on or off the 12v accessories (if the firwmare is set up to do this in its power settings) + POWER_24V = 98, ///< int, Powers on or off the 24v accessories (if the firwmare is set up to do this in its power settings) + POWER_AUX_PC = 125, ///< int, Powers on or off the auxilliary PC (if the firwmare is set up to do this in its power settings) + POWER_TOUCHSCREEN = 126, ///< int, Powers on or off the touchscreen (if the firwmare is set up to do this in its power settings) + POWER_PTZ = 127, ///< int, Powers on or off the PTZ (if the firwmare is set up to do this in its power settings) + POWER_AUDIO = 128, ///< int, Powers on or off the audio (if the firwmare is set up to do this in its power settings) + POWER_LRF2 = 129, ///< int, Powers on or off the second laser (if the firwmare is set up to do this in its power settings) + + // For SEEKUR or later lateral-capable robots + LATVEL = 110, ///< int, sets the lateral velocity (mm) + LATACCEL = 113, ///< int, sets the lateral acceleration (+, mm/sec2) or lateral deceleration (-, mm/sec2) + SETLATV = 0, /// set max. lat. vel. (not available yet) + + // MTX commands + SRECORD = 210, /// < int, (for downloading MTX firmware) byte with 0 for wait, 1 for OK, -1 for ERROR (waiting might take 3-5 seconds + MARCDEBUG = 211, ///< for debug messages from MARC, possibly responses, possibly pushed... they are ascii strings that should be logged + WHEEL_LIGHT = 212, ///< For the wheel lights + ABSOLUTE_MAXES = 213, ///< To set the absolute maxes + + SAFETY_STATE_INFO = 214, ///< int, request safety state info packets (0 == stop, 1 == send once, 2 == send continuous), + SAFETY_SET_STATE = 215, ///< 2 bytes, first byte which system, second byte for value + SAFETY_DISABLE_POWER_OFF_TIMER = 216, ///< int, 0 set off, 1 set on + + + // MobileSim specific: + SIM_SET_POSE = 224, ///< int4,int4,int4 Move robot to global pose in simulator (does not change odometry). Each value is a 4-byte integer. + SIM_RESET= 225, ///< none, Reset robot's state to original in simulator and reset odometry to 0,0,0. + SIM_LRF_ENABLE = 230, ///< int, 1 to begin sending packets of data from a simulated laser rangefinder (on the same socket connection), 2 to send extended-information laser packets (with reading flags), 0 to disable LRF + SIM_LRF_SET_FOV_START = 231, ///< int Set angle (degrees from center) at which the simulater laser takes its first reading (normally -90). + SIM_LRF_SET_FOV_END = 232, ///< int Set angle (degrees from center) at which the simulated laser takes its last reading (normally 90). + SIM_LRF_SET_RES = 233, ///< int Set the number of degrees between laser readings (in combination with FOV, determines the number of readings per sweep) (normally 1) + SIM_CTRL = 236, ///< int,..., Send a simulator meta-command (an operation on the simulator itself). The initial 2-byte integer argument selects the operation. See simulator documentation. + SIM_STAT = 237, ///< none, Request that the simulator reply with a SIMSTAT (0x62) packet. You must have a packet handler registered with ArRobot to receive its output. See simulator documentation. + SIM_MESSAGE = 238, ///< string, Display a log message in the simulator. Argument is a length-prefixed ASCII byte string. + SIM_EXIT = 239 ///< int, Exit the simulator. Argument is the exit code (use 0 for a "normal" exit). + }; + +}; + +#endif // ARCOMMANDS_H + + diff --git a/Legacy/Aria/include/ArCondition.h b/Legacy/Aria/include/ArCondition.h new file mode 100644 index 0000000..b62c518 --- /dev/null +++ b/Legacy/Aria/include/ArCondition.h @@ -0,0 +1,100 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCONDITION_H +#define ARCONDITION_H + + +#if !defined(WIN32) || defined(MINGW) +#include +#include "ArMutex.h" +#endif +#include "ariaTypedefs.h" + + +/** Threading condition wrapper class + @ingroup UtilityClasses +*/ +class ArCondition +{ +public: + + enum { + STATUS_FAILED=1, ///< General failure + STATUS_FAILED_DESTROY, ///< Another thread is waiting on this condition so it can not be destroyed + STATUS_FAILED_INIT, ///< Failed to initialize thread. Requested action is imposesible + STATUS_WAIT_TIMEDOUT, ///< The timedwait timed out before signaling + STATUS_WAIT_INTR, ///< The wait was interupted by a signal + STATUS_MUTEX_FAILED_INIT, ///< The underlying mutex failed to init + STATUS_MUTEX_FAILED ///< The underlying mutex failed in some fashion + }; + + /** @internal */ +#if defined(WIN32) && !defined(MINGW) + typedef HANDLE CondType; +#else + typedef pthread_cond_t CondType; +#endif + + /// Constructor + AREXPORT ArCondition(); + /// Desctructor + AREXPORT virtual ~ArCondition(); + + /// Signal the thread waiting + AREXPORT int signal(); + /// Broadcast a signal to all threads waiting + AREXPORT int broadcast(); + /** @brief Wait for a signal */ + AREXPORT int wait(); + /// Wait for a signal for a period of time in milliseconds + AREXPORT int timedWait(unsigned int msecs); + /// Translate error into string + AREXPORT const char *getError(int messageNumber) const; + + // Set a name to be included in log messages + void setLogName(const char *logName) {myLogName = logName;} + const char *getLogName() + { + return (myLogName=="")?"unnamed":myLogName.c_str(); + } + + +protected: + + static ArStrMap ourStrMap; + + bool myFailedInit; + CondType myCond; +#if defined(WIN32) && !defined(MINGW) + int myCount; +#else + ArMutex myMutex; +#endif + std::string myLogName; +}; + + +#endif // ARCONDITION_H diff --git a/Legacy/Aria/include/ArConfig.h b/Legacy/Aria/include/ArConfig.h new file mode 100644 index 0000000..f6a2013 --- /dev/null +++ b/Legacy/Aria/include/ArConfig.h @@ -0,0 +1,613 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCONFIG_H +#define ARCONFIG_H + +#include "ArConfigArg.h" +#include "ArFileParser.h" +#include "ArHasFileName.h" +#include + +class ArArgumentBuilder; +class ArConfigSection; + + +/// Stores configuration information which may be read to and from files or other sources +/** + * The configuration is a set of parameters (or config arguments), organized into + * sections. Parameters contain a key or name (a short string), a value + * (which may be one of several types), a priority (important, normal, or trivial + * to most users), a longer description, and a display hint which suggests + * what kind of UI control might be most appropriate for the parameter. + * After adding a parameter to the configuration, its value may be changed + * when the configuration is loaded or reloaded from a file. + * Various program modules may register callbacks to be notified + * when a shared global configuration (such as the static ArConfig object kept + * by the Aria class) is loaded or otherwise changed. + * + * Classes dealing with more specialized kinds of config files + * inherit from this one. + * + * Important methods in this class are: addParam(), addProcessFileCB(), + * remProcessFileCB(), parseFile(), writeFile(). + * + * Usually, configuration data are read from and written to a file using + * parseFile() and writeFile(), or are set + * by a remote client via ArNetworking. It is also possible to import + * configuration settings from an ArArgumentParser (which, for example, may + * contain a program's command line arguments) using useArgumentParser(). + * + * @warning ArConfig does not escape any special characters when writing or + * loading to/from a file. Therefore in general parameter names, values, section + * names, and comments must not contain characters which have special meaning + * in a config file, such as '#', ';', tab or newline. (see also ArFileParser) Parameter names may + * have spaces, though by convention they generally do not. + + @ingroup OptionalClasses +*/ +class ArConfig : public ArHasFileName +{ +private: + + /// Current version of the output config file. + static const char *CURRENT_CONFIG_VERSION; + /// Parser tag that introduces the config file version. + static const char *CONFIG_VERSION_TAG; + + /// Current version of the output config resource file. + static const char *CURRENT_RESOURCE_VERSION; + /// Parser tag that introduces the config resource file version. + static const char *RESOURCE_VERSION_TAG; + +public: + + /// Sections related to I/O, ARCL, display, network communication, etc. + static const char *CATEGORY_ROBOT_INTERFACE; + /// Sections related to robot behavior, docking, driving, navigation, etc. + static const char *CATEGORY_ROBOT_OPERATION; + /// Sections related to the robot hardware and its sensors/accessories. + static const char *CATEGORY_ROBOT_PHYSICAL; + /// Sections related to the fleet, enterprise manager, etc. + static const char *CATEGORY_FLEET; + /// Sections related to security. + static const char *CATEGORY_SECURITY; + /// Sections related to debug, including logging, replay, etc. + static const char *CATEGORY_DEBUG; + +public: + /// Constructor + AREXPORT ArConfig(const char *baseDirectory = NULL, + bool noBlanksBetweenParams = false, + bool ignoreBounds = false, + bool failOnBadSection = false, + bool saveUnknown = true); + /// Destructor + AREXPORT virtual ~ArConfig(); + + /// Copy constructor + AREXPORT ArConfig(const ArConfig &config); + + /// Assignment operator + AREXPORT ArConfig &operator=(const ArConfig &config); + + /// Copies the given config to this one, detaching any pointers so they are not shared + AREXPORT virtual void copyAndDetach(const ArConfig &config); + + /// Stores an optional config and robot name to be used in log messages. + AREXPORT virtual void setConfigName(const char *configName, + const char *robotName = NULL); + + /// Turn on this flag to reduce the number of verbose log messages. + AREXPORT virtual void setQuiet(bool isQuiet); + + + /// Sets an associate config that provides translations for each parameter (as read from a resource file). + AREXPORT virtual void setTranslator(ArConfig *xlatorConfig); + + /// Returns the associated translator config, or NULL if none. + AREXPORT virtual ArConfig *getTranslator() const; + + + /// Parse a config file + AREXPORT bool parseFile(const char *fileName, + bool continueOnError = false, + bool noFileNotFoundMessage = false, + char *errorBuffer = NULL, + size_t errorBufferLen = 0, + std::list *sectionsToParse = NULL, + ArPriority::Priority highestPriority = ArPriority::FIRST_PRIORITY, + ArPriority::Priority lowestPriority = ArPriority::LAST_PRIORITY, + ArConfigArg::RestartLevel *restartLevelNeeded = NULL); + + /// Write out a config file + AREXPORT bool writeFile(const char *fileName, + bool append = false, + std::set *alreadyWritten = NULL, + bool writeExtras = false, + std::list *sectionsToWrite = NULL, + ArPriority::Priority highestPriority = ArPriority::FIRST_PRIORITY, + ArPriority::Priority lowestPriority = ArPriority::LAST_PRIORITY); + + + + /// Parse a config resource file, for translation. + AREXPORT bool parseResourceFile(const char *fileName, + bool continueOnError = true, + char *errorBuffer = NULL, + size_t errorBufferLen = 0, + std::list *sectionsToParse = NULL); + + /// Parse a config resource file with parameters suitable for custom commands. + AREXPORT void parseResourceFile(ArArgumentBuilder *builder); + + /// Write a config resource file, for translation. + AREXPORT bool writeResourceFile(const char *fileName, + bool append = false, + std::set *alreadyWritten = NULL, + std::list *sectionsToWrite = NULL); + + /// Write a config resource file with parameters suitable for custom commands. + AREXPORT void writeResourceFile(ArArgumentBuilder *builder); + + /// Command to add a section and its description to the specified category. + /** + * The category is expected to be one of the CATEGORY_ constants defined above. + **/ + AREXPORT bool addSection(const char *categoryName, + const char *sectionName, + const char *sectionDescription); + + + /// Command to add a parameter to the given section with given priority + AREXPORT bool addParam(const ArConfigArg &arg, + const char *sectionName = "", + ArPriority::Priority priority = ArPriority::NORMAL, + const char *displayHint = NULL, + ArConfigArg::RestartLevel restart = ArConfigArg::NO_RESTART); + + /// Command to add a new comment to the given section with given priority + AREXPORT bool addComment(const char *comment, const char *sectionName = "", + ArPriority::Priority priority = ArPriority::NORMAL); + + /// Adds a parameter that has all the other information on it + /// already set + AREXPORT bool addParamAsIs(const ArConfigArg &arg, + const char *sectionName = ""); + + /// Sets the comment for a section + AREXPORT void setSectionComment(const char *sectionName, + const char *comment); + + + /// Uses this argument parser after it parses a file before it processes + AREXPORT void useArgumentParser(ArArgumentParser *parser); + + /// for inheritors this is called after the file is processed + /** + For classes that inherit from ArConfig this function is called + after parseFile and all of the processFileCBs are called... If + you want to call something before the processFileCBs then just + add a processFileCB... this is only called if there were no + errors parsing the file or continueOnError was set to false when + parseFile was called + + @return true if the config parsed was good (parseFile will return + true) false if the config parsed wasn't (parseFile will return false) + **/ + AREXPORT virtual bool processFile(void) { return true; } + /// Adds a callback to be invoked when the configuration is loaded or + /// reloaded. + AREXPORT void addProcessFileCB(ArRetFunctor *functor, + int priority = 0); + /// Adds a callback to be invoked when the configuration is loaded + /// or reloaded.... if you really want errors you should use + /// addProcessFileWithErrorCB, this is just to catch mistakes + AREXPORT void addProcessFileCB(ArRetFunctor2 *functor, + int priority = 0); + /// Adds a callback to be invoked when the configuration is loaded or + /// reloaded, which may also receive error messages + AREXPORT void addProcessFileWithErrorCB( + ArRetFunctor2 *functor, + int priority = 0); + /// Removes a processedFile callback + AREXPORT void remProcessFileCB(ArRetFunctor *functor); + /// Removes a processedFile callback + AREXPORT void remProcessFileCB( + ArRetFunctor2 *functor); + /// Call the processFileCBs + AREXPORT bool callProcessFileCallBacks(bool continueOnError, + char *errorBuffer = NULL, + size_t errorBufferLen = 0); + /// This parses the argument given (for parser or other use) + AREXPORT bool parseArgument(ArArgumentBuilder *arg, + char *errorBuffer = NULL, + size_t errorBufferLen = 0); + + /// Parses the config file version information. + AREXPORT bool parseVersion(ArArgumentBuilder *arg, + char *errorBuffer = NULL, + size_t errorBufferLen = 0); + + /// This parses the section change (for parser or other use) + AREXPORT bool parseSection(ArArgumentBuilder *arg, + char *errorBuffer = NULL, + size_t errorBufferLen = 0); + + AREXPORT bool parseListBegin(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen); + + AREXPORT bool parseListEnd(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen); + + /// This parses an unknown argument (so we can save it) + AREXPORT bool parseUnknown(ArArgumentBuilder *arg, + char *errorBuffer = NULL, + size_t errorBufferLen = 0); + + /// Gets the restart level needed + AREXPORT ArConfigArg::RestartLevel getRestartLevelNeeded(void) const; + + /// Gets the restart level needed + AREXPORT void resetRestartLevelNeeded(void); + + /// Get the base directory + AREXPORT const char *getBaseDirectory(void) const; + /// Set the base directory + AREXPORT void setBaseDirectory(const char *baseDirectory); + /// Get the file name we loaded + AREXPORT const char *getFileName(void) const; + + /// Set whether we have blanks between the params or not + AREXPORT void setNoBlanksBetweenParams(bool noBlanksBetweenParams); + + /// Get whether we have blanks between the params or not + AREXPORT bool getNoBlanksBetweenParams(void); + + /// Use an argument parser to change the config + AREXPORT bool parseArgumentParser(ArArgumentParser *parser, + bool continueOnError = false, + char *errorBuffer = NULL, + size_t errorBufferLen = 0); + + + /// Returns the list of categories contained in this config. + AREXPORT std::list getCategoryNames() const; + + /// Returns the names of the sections that have been added to the specified category. + AREXPORT std::list getSectionNamesInCategory(const char *categoryName) const; + + /// Returns the names of all sections in the config. + AREXPORT std::list getSectionNames() const; + + /// Get the sections themselves (use only if you know what to do) + AREXPORT std::list *getSections(void); + + + + /// Find the section with the given name. + /// @return section object, or NULL if not found. + AREXPORT ArConfigSection *findSection(const char *sectionName) const; + + /// Set the log level used when loading or reloading the configuration + AREXPORT void setProcessFileCallbacksLogLevel(ArLog::LogLevel level) + { myProcessFileCallbacksLogLevel = level; } + /// Get the log level used when loading or reloading the configuration + AREXPORT ArLog::LogLevel getProcessFileCallbacksLogLevel(void) + { return myProcessFileCallbacksLogLevel; } + + /// Sets whether we save unknown items (if we don't save 'em we ignore 'em) + AREXPORT void setSaveUnknown(bool saveUnknown) + { mySaveUnknown = saveUnknown; } + /// Gets whether we save unknowns (if we don't save 'em we ignore 'em) + AREXPORT bool getSaveUnknown(void) { return mySaveUnknown; } + + /// Clears out all the section information + AREXPORT void clearSections(void); + /// Clears out all the section information and the processFileCBs + AREXPORT void clearAll(void); + + /// adds a flag to a section + AREXPORT bool addSectionFlags(const char *sectionName, + const char *flags); + /// Removes a flag from a section + AREXPORT bool remSectionFlag(const char *sectionName, + const char *flag); + + /// calls clearValueSet on the whole config (internal for default configs) + AREXPORT void clearAllValueSet(void); + /// Removes all unset values from the config (internal for default configs) + AREXPORT void removeAllUnsetValues(void); + /// Removes all values from sections in which no value has been set (internal) + AREXPORT void removeAllUnsetSections(void); + + /// Logs the config + AREXPORT void log(bool isSummary = true, + std::list *sectionNameList = NULL, + const char *logPrefix = ""); + + /// Sets permissions on some things + AREXPORT void setPermissions(bool allowFactory = true, + bool rememberUnknowns = true); + + /// Adds a section for this config to always skip + void addSectionNotToParse(const char *section); + /// Removes a section for this config to always skip + void remSectionNotToParse(const char *section); + +protected: + + /// Write out a section + AREXPORT void writeSection(ArConfigSection *section, + FILE *file, + std::set *alreadyWritten, + bool writeExtras, + ArPriority::Priority highestPriority, + ArPriority::Priority lowestPriority); + + /// Write out a section in CSV format for translation + AREXPORT void writeSectionResource(ArConfigSection *section, + FILE *file, + std::set *alreadyWritten); + + AREXPORT void translateSection(ArConfigSection *section); + + void copySectionsToParse(std::list *from); + + /// Removes unset values from the config. + /** + * @param isRemovingUnsetSectionsOnly a bool set to true if unset parameters should + * not be removed from sections that have any set parameters; false if all unset + * values should be removed + **/ + AREXPORT void removeAllUnsetValues(bool isRemovingUnsetSectionsOnly); + + + /** + This class's job is to make the two functor types largely look + like the same one from the code's perspective, this is so we can + store them both in the same map for order of operations purposes. + + The funkiness with the constructor is because the retfunctor2 + looks like the retfunctor and winds up always falling into that + constructor. + **/ + class ProcessFileCBType + { + public: + ProcessFileCBType( + ArRetFunctor2 *functor) + { + myCallbackWithError = functor; + myCallback = NULL; + } + ProcessFileCBType(ArRetFunctor *functor) + { + myCallbackWithError = NULL; + myCallback = functor; + } + ~ProcessFileCBType() {} + bool call(char *errorBuffer, size_t errorBufferLen) + { + if (myCallbackWithError != NULL) + return myCallbackWithError->invokeR(errorBuffer, errorBufferLen); + else if (myCallback != NULL) + return myCallback->invokeR(); + // if we get here there's a problem + ArLog::log(ArLog::Terse, "ArConfig: Horrible problem with process callbacks"); + return false; + } + bool haveFunctor(ArRetFunctor2 *functor) + { + if (myCallbackWithError == functor) + return true; + else + return false; + } + bool haveFunctor(ArRetFunctor *functor) + { + if (myCallback == functor) + return true; + else + return false; + } + const char *getName(void) + { + if (myCallbackWithError != NULL) + return myCallbackWithError->getName(); + else if (myCallback != NULL) + return myCallback->getName(); + // if we get here there's a problem + ArLog::log(ArLog::Terse, "ArConfig: Horrible problem with process callback names"); + return NULL; + } + protected: + ArRetFunctor2 *myCallbackWithError; + ArRetFunctor *myCallback; + }; + + void addParserHandlers(void); + void remParserHandlers(void); + void addListNamesToParser(const ArConfigArg &parent); + + /// Optional name of the robot with which the config is associated. + std::string myRobotName; + /// Optional name of the config instance. + std::string myConfigName; + /// Prefix to be inserted in log messages (contains the robot and config names). + std::string myLogPrefix; + + ArArgumentParser *myArgumentParser; + std::multimap myProcessFileCBList; + bool myNoBlanksBetweenParams; + + /// Version information read from config file + std::string myConfigVersion; + + ArConfig *myTranslator; + char myCsvSeparatorChar; + + std::string mySection; + std::list *mySectionsToParse; + std::set mySectionsNotToParse; + ArPriority::Priority myHighestPriorityToParse; + ArPriority::Priority myLowestPriorityToParse; + + ArConfigArg::RestartLevel myRestartLevelNeeded; + bool myCheckingForRestartLevel; + + bool mySectionBroken; + bool mySectionIgnored; + bool myUsingSections; + + std::list myParsingListNames; + bool myIsParsingListBroken; + + std::string myFileName; + std::string myBaseDirectory; + ArFileParser myParser; + + bool myIgnoreBounds; + bool myFailOnBadSection; + bool myDuplicateParams; + bool mySaveUnknown; + bool myIsQuiet; + + bool myPermissionAllowFactory; + bool myPermissionSaveUnknown; + + ArLog::LogLevel myProcessFileCallbacksLogLevel; + + /// Map that defines the section names contained in each category. + std::map > myCategoryToSectionsMap; + + // our list of sections which has in it the argument list for each + std::list mySections; + + // callback for the file parser + ArRetFunctor3C myParserCB; + // callback for the config version in the file parser + ArRetFunctor3C myVersionCB; + // callback for the section in the file parser + ArRetFunctor3C mySectionCB; + + // callback for the _listBegin in the file parser + ArRetFunctor3C myListBeginCB; + // callback for the _listEnd in the file parser + ArRetFunctor3C myListEndCB; + + // callback for the unknown param (or whatever) file parser + ArRetFunctor3C myUnknownCB; + + +}; + + +/** Represents a section in the configuration. Sections are used to + * group items used by separate parts of Aria. + */ +class ArConfigSection +{ +public: + AREXPORT ArConfigSection(const char *name = NULL, + const char *comment = NULL, + bool isQuiet = false, + const char *categoryName = NULL); + + AREXPORT virtual ~ArConfigSection(); + AREXPORT ArConfigSection(const ArConfigSection §ion); + AREXPORT ArConfigSection &operator=(const ArConfigSection §ion); + + /// Copies the given section to this one, detaching any pointers so they are not shared + AREXPORT virtual void copyAndDetach(const ArConfigSection §ion); + + /** @return The name of this section */ + const char *getName(void) const { return myName.c_str(); } + + /** @return A comment describing this section */ + const char *getComment(void) const { return myComment.c_str(); } + + /// Returns the name of the category that contains this section. + AREXPORT const char *getCategoryName() const; + + const char *getFlags(void) const { return myFlags->getFullString(); } + AREXPORT bool hasFlag(const char *flag) const; + + std::list *getParams(void) { return &myParams; } + + void setName(const char *name); + + void setComment(const char *comment); + + AREXPORT bool addFlags(const char *flags, bool isQuiet = false); + AREXPORT bool remFlag(const char *dataFlag); + + /// Finds a parameter item in this section with the given name. Returns NULL if not found. + AREXPORT ArConfigArg *findParam(const char *paramName, + bool isAllowStringHolders = false); + + /// Finds a list member parameter with the specified name path. Returns NULL if not found. + AREXPORT ArConfigArg *findParam(const std::list ¶mNamePath, + bool isAllowHolders = false); + + /// Finds a list member parameter with the specified name path. Returns NULL if not found. + AREXPORT ArConfigArg *findParam(const char **paramNamePath, + int pathLength, + bool isAllowHolders = false); + + /// Determines whether the current section contains parameters in the specified priority ran + AREXPORT bool containsParamsOfPriority(ArPriority::Priority highestPriority, + ArPriority::Priority lowestPriority); + + /// Removes a string holder for this param, returns true if it found one + AREXPORT bool remStringHolder(const char *paramName); + + /// Turn on this flag to reduce the number of verbose log messages. + AREXPORT void setQuiet(bool isQuiet); + +protected: + + /// Give the config access to the protected category name setter. + friend class ArConfig; + + /// Sets the name of the category to which this section belongs. + void setCategoryName(const char *categoryName); + +protected: + + std::string myName; + std::string myComment; + std::string myCategoryName; + std::string myDisplayName; // Not yet supported + ArArgumentBuilder *myFlags; + std::list myParams; + bool myIsQuiet; + +}; // end class ArConfigSection + +#endif // ARCONFIG + diff --git a/Legacy/Aria/include/ArConfigArg.h b/Legacy/Aria/include/ArConfigArg.h new file mode 100644 index 0000000..228a874 --- /dev/null +++ b/Legacy/Aria/include/ArConfigArg.h @@ -0,0 +1,786 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCONFIGARG_H +#define ARCONFIGARG_H + +#include + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" + +class ArArgumentBuilder; +class ArFileParser; + +/// Argument class for ArConfig +/** + ArConfigArg stores information about a parameter (name, description, type), + and a pointer to the variable that will actually store the value. This + variable is normally stored and used by whatever class or module has added the + parameter to ArConfig. (In addition, there are some special types of + ArConfigArg that behave differently such as the "holder" types and separator, + these are used internally or in special cases.) + + Which constructor you use determines the value type of the ArConfigArg object. + + A typical idiom for creating ArConfigArg objects and adding them to ArConfig + is to create a temporary ArConfigArg in the call to ArConfig::addParam(): + + @code + config->addParam(ArConfigArg("MyParameter", &myTarget, "Example Parameter"), "Example Section"); + @endcode + + Where config is a pointer to an ArConfig object or subclass, and + myTarget is a variable (e.g. int) that is a class member whose instance will not + be destroyed before the end of the program, or which will remove the parameter + from ArConfig before being destroyed (the pointer to myTarget that is stored + in ArConfig must not become invalid.) The ArConfigArg object passed to + addParam() will be copied and stored in ArConfig. + + + + @swignote Swig cannot determine the correct constructor to use + based on most target langugages types, so you must use subclasses + defined for various types. Or, use the constructor that accepts + functors for dealing with arguments. Also, Swig cannot use pointers + to change variables, so you must create ArConfigArg objects, passing + in default values, and retain references to those objects, + in addition to passing them to ArConfig, and read new values from those + objects if ArConfig changes; or pass functors to ArConfigArg instead + of the initial value. +*/ +class ArConfigArg +{ +public: + + typedef enum + { + INVALID, ///< An invalid argument, the argument wasn't created correctly + INT, ///< Integer argument + DOUBLE, ///< Double argument + STRING, ///< String argument + BOOL, ///< Boolean argument + FUNCTOR, ///< Argument that handles things with functors + DESCRIPTION_HOLDER, ///< Argument that just holds a description + STRING_HOLDER, ///< this one is for holding strings and reading them in and writing them out but not really letting them get sent anywhere (its for unknown config parameters (so they don't get lost if a feature is turned off) + SEPARATOR, ///< Empty argument that merely acts as a separator within a (large) section. + CPPSTRING, ///< Pointer to std::string, use like STRING. + LIST, ///< Composite argument that contains an ordered list of other args + LIST_HOLDER, ///< Placeholder for composite argument that are not currently active + LAST_TYPE = LIST_HOLDER ///< Last value in the enumeration + } Type; + + + /// Indicates the components that must be restarted if the parameter is changed + enum RestartLevel { + NO_RESTART, //< No restart necessary (default value) + RESTART_CLIENT, //< Client software must be restarted (TODO Can this be eliminated?) + RESTART_IO, //< IO has changed and needs to be restarted + RESTART_SOFTWARE, //< Server software must be restarted + RESTART_HARDWARE, //< Physical robot must be rebooted + LAST_RESTART_LEVEL = RESTART_HARDWARE + }; + + enum { + DEFAULT_DOUBLE_PRECISION = 5, ///< Default double precision, originates from previous saving behavior + TYPE_COUNT = LAST_TYPE + 1, ///< Number of argument types + RESTART_LEVEL_COUNT = LAST_RESTART_LEVEL + 1, ///< Number of restart levels + }; + + + + /// Keyword that indicates the start of an ArConfigArg LIST object, for ArFileParser. + static const char *LIST_BEGIN_TAG; + /// Keyword that indicates the end of an ArConfigArg LIST object, for ArFileParser. + static const char *LIST_END_TAG; + + /// Resource file keyword that indicates an empty string (cannot write empty for csv). + static const char *NULL_TAG; + /// Resource file keyword that indicates a new entry. + static const char *NEW_RESOURCE_TAG; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Static Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns a text representation of the given type, suitable for logging. + static const char *toString(Type t); + + /// Returns a text representation of the given RestartLevel, suitable for logging. + static const char *toString(RestartLevel r); + + + /// Given a text representation, returns the appropriate Type. + static Type typeFromString(const char *text); + + /// Given a text representation, returns the appropriate RestartLevel. + static RestartLevel restartLevelFromString(const char *text); + + + + /// Returns the section name contained in the given resource arg. + AREXPORT static std::string parseResourceSectionName(ArArgumentBuilder *arg, + const char *logPrefix = ""); + + /// Returns the param name contained in the given resource arg. + AREXPORT static std::string parseResourceArgName(ArArgumentBuilder *arg, + const char *logPrefix = ""); + + /// Returns the arg type contained in the given resource arg. + AREXPORT static Type parseResourceType(ArArgumentBuilder *arg, + const char *logPrefix = ""); + + /// Returns true if the given resource arg is "top-level", i.e. not a list member. + AREXPORT static bool isResourceTopLevel(ArArgumentBuilder *arg, + const char *logPrefix = ""); + + /// Returns the parent path contained in the resource arg for list members. + AREXPORT static std::list parseResourceParentPath(ArArgumentBuilder *arg, + char separator = '|', + const char *logPrefix = ""); + + /// Returns the description contained in the given resource arg. + AREXPORT static std::string parseResourceDescription(ArArgumentBuilder *arg, + const char *logPrefix = ""); + /// Returns the extra explanation contained in the given resource arg. + AREXPORT static std::string parseResourceExtra(ArArgumentBuilder *arg, + const char *logPrefix = ""); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Instance Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Default empty contructor + AREXPORT ArConfigArg(); + /// Constructor for making an integer argument by pointer (4 bytes) + AREXPORT ArConfigArg(const char * name, int *pointer, + const char * description = "", + int minInt = INT_MIN, + int maxInt = INT_MAX); + /// Constructor for making an int argument thats a short (2 bytes) + AREXPORT ArConfigArg(const char * name, short *pointer, + const char * description = "", + int minInt = SHRT_MIN, + int maxInt = SHRT_MAX); + /// Constructor for making an int argument thats a ushort (2 bytes) + AREXPORT ArConfigArg(const char * name, unsigned short *pointer, + const char * description = "", + int minInt = 0, + int maxInt = USHRT_MAX); + /// Constructor for making an char (1 byte) argument by pointer (treated as int) + AREXPORT ArConfigArg(const char * name, unsigned char *pointer, + const char * description = "", + int minInt = 0, + int maxInt = 255); + /// Constructor for making a double argument by pointer + AREXPORT ArConfigArg(const char * name, + double *pointer, + const char * description = "", + double minDouble = -HUGE_VAL, + double maxDouble = HUGE_VAL, + int precision = DEFAULT_DOUBLE_PRECISION); + /// Constructor for making a boolean argument by pointer + AREXPORT ArConfigArg(const char * name, bool *pointer, + const char * description = ""); + /// Constructor for making an argument of a string by pointer (see details) + AREXPORT ArConfigArg(const char *name, char *str, + const char *description, + size_t maxStrLen); + /// Constructor for making an argument of a string by pointer (see details) + AREXPORT ArConfigArg(const char *name, const char *str, + const char *description); + + /// Constructor for making an argument of a C++ std::string + AREXPORT ArConfigArg(const char *name, std::string *str, const char *description); + + /// Constructor for making an integer argument + AREXPORT ArConfigArg(const char * name, int val, + const char * description = "", + int minInt = INT_MIN, + int maxInt = INT_MAX); + /// Constructor for making a double argument + AREXPORT ArConfigArg(const char * name, + double val, + const char * description = "", + double minDouble = -HUGE_VAL, + double maxDouble = HUGE_VAL, + int precision = DEFAULT_DOUBLE_PRECISION); + /// Constructor for making a boolean argument + AREXPORT ArConfigArg(const char * name, bool val, + const char * description = ""); + /// Constructor for making an argument that has functors to handle things + AREXPORT ArConfigArg(const char *name, + ArRetFunctor1 *setFunctor, + ArRetFunctor *> *getFunctor, + const char *description); + + /// Constructor for just holding a description (for ArConfig) + AREXPORT ArConfigArg(const char *str, Type type = DESCRIPTION_HOLDER); + /// Constructor for holding an unknown argument (STRING_HOLDER) + AREXPORT ArConfigArg(const char *name, const char *str); + + /// Constructs a new named argument of the specified type. + AREXPORT ArConfigArg(Type type, + const char *name, + const char *description); + + /// Constructs a new argument of the specified type. + AREXPORT ArConfigArg(Type type); + + /// Destructor + AREXPORT virtual ~ArConfigArg(); + + /// Copy constructor that allows a new name to be assigned + AREXPORT ArConfigArg(const char *argName, + const ArConfigArg & arg); + + /// Copy constructor + AREXPORT ArConfigArg(const ArConfigArg & arg); + /// Assignment operator + AREXPORT ArConfigArg &operator=(const ArConfigArg &arg); + + /// Copies the given arg to this one, detaching any pointers so they are not shared + AREXPORT void copyAndDetach(const ArConfigArg &arg); + + + /// Copies the translation data from given arg to this one. + AREXPORT bool copyTranslation(const ArConfigArg &arg); + + + /// Gets the type of the argument + AREXPORT ArConfigArg::Type getType(void) const; + /// Gets the name of the argument + AREXPORT const char *getName(void) const; + /// Gets the brief description of the argument + AREXPORT const char *getDescription(void) const; + + /// Sets the description (normally given in the constructor) + AREXPORT void setDescription(const char *description); + + /// For arguments that require more than a brief description, set the extra explanation. + AREXPORT void setExtraExplanation(const char *extraExplanation); + + /// Returns the extra explanation, if any, for this argument + AREXPORT const char *getExtraExplanation() const; + + + /// Sets the argument value, for int arguments + AREXPORT bool setInt(int val, + char *errorBuffer = NULL, size_t errorBufferLen = 0, + bool doNotSet = false); + + /// Sets the argument value, for double arguments + AREXPORT bool setDouble(double val, + char *errorBuffer = NULL, size_t errorBufferLen = 0, + bool doNotSet = false); + + /// Sets the argument value, for bool arguments + AREXPORT bool setBool(bool val, + char *errorBuffer = NULL, size_t errorBufferLen = 0, + bool doNotSet = false); + + /// Sets the argument value for string arguments + AREXPORT bool setString(const char *str, + char *errorBuffer = NULL, size_t errorBufferLen = 0, + bool doNotSet = false); + + /// Sets the argument value for string arguments. The value of @a str is copied to the target string. + AREXPORT bool setString(const std::string &str, + char *errorBuffer = NULL, size_t errorBufferLen = 0, + bool doNotSet = false); + + AREXPORT bool setCppString(const std::string &str, + char *errorBuffer = NULL, size_t errorBufferLen = 0, + bool doNotSet = false); + + /// Sets the argument by calling the setFunctor callback + AREXPORT bool setArgWithFunctor(ArArgumentBuilder *argument, + char *errorBuffer = NULL, + size_t errorBufferLen = 0, + bool doNotSet = false); + + + + /// Gets the argument value, for int arguments + AREXPORT int getInt(bool *ok = NULL) const; + + /// Gets the minimum int value + AREXPORT int getMinInt(bool *ok = NULL) const; + /// Gets the maximum int value + AREXPORT int getMaxInt(bool *ok = NULL) const; + + + /// Gets the argument value, for double arguments + AREXPORT double getDouble(bool *ok = NULL) const; + /// Gets the minimum double value + AREXPORT double getMinDouble(bool *ok = NULL) const; + /// Gets the maximum double value + AREXPORT double getMaxDouble(bool *ok = NULL) const; + /// Gets the decimal precision of the double + AREXPORT int getDoublePrecision(bool *ok = NULL) const; + + /// Gets the argument value, for bool arguments + AREXPORT bool getBool(bool *ok = NULL) const; + + /// Gets the argument value, for string (and string holder) arguments + AREXPORT const char *getString(bool *ok = NULL) const; + + /// Gets the argument value, which is a list of argumentbuilders here + AREXPORT const std::list *getArgsWithFunctor(bool *ok = NULL) const; + + AREXPORT std::string getCppString(bool *ok = NULL) const; + + AREXPORT const std::string* getCppStringPtr(bool *ok = NULL) const; + + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Methods for LIST Type + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Adds a child arg to this arg. Valid only for LIST type; otherwise returns false. + AREXPORT bool addArg(const ArConfigArg &arg); + + /// Returns whether the list contains child args. Valid only for LIST type; otherwise returns false. + AREXPORT bool hasArgs() const; + + /// Returns the number of child args. Valid only for LIST type; otherwise returns 0. + AREXPORT size_t getArgCount() const; + + // KMC 7/9/12 Right now, the returned args will not have the parent set to this arg. + // I suspect that this may present an implementation issue later but am not sure. + // Perhaps the addition of an iterator would suffice. + // + /// Returns a list of all child args in this arg. Valid only for LIST type; otherwise returns an empty list. + AREXPORT std::list getArgs(bool *ok = NULL) const; + + /// Returns the child arg at the specified index (between 0 and getArgCount()). + AREXPORT const ArConfigArg *getArg(size_t index) const; + + /// Returns the child arg at the specified index (between 0 and getArgCount()). + AREXPORT ArConfigArg *getArg(size_t index); + + /// Finds the specified child arg. Valid only for LIST type; otherwise returns NULL. + AREXPORT const ArConfigArg *findArg(const char *childParamName) const; + + /// Finds the specified child arg. Valid only for LIST type; otherwise returns NULL. + AREXPORT ArConfigArg *findArg(const char *childParamName); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Miscellaneous Attributes + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + /// Gets the priority (only used by ArConfig) + AREXPORT ArPriority::Priority getConfigPriority(void) const; + /// Sets the priority (only used by ArConfig) + AREXPORT void setConfigPriority(ArPriority::Priority priority); + + /// Returns the display hint for this arg, or NULL if none is defined. + AREXPORT const char *getDisplayHint() const; + /// Sets the display hint for this arg. + AREXPORT void setDisplayHint(const char *hintText); + + /// Gets the restart level of this parameter (only used by ArConfig) + AREXPORT RestartLevel getRestartLevel() const; + /// Sets the restart level of this parameter (only used by ArConfig) + AREXPORT void setRestartLevel(RestartLevel level); + + /// Gets if notifications of changes are supressed (for the central + /// server config) + AREXPORT bool getSupressChanges(void) const; + /// Sets if notifications of changes are supressed (for the central + /// server config) + AREXPORT void setSupressChanges(bool supressChanges); + + + /// Returns a pointer to the immediate parent arg. If this is not a child ArConfigArg, then returns NULL. + AREXPORT ArConfigArg *getParentArg() const; + + /// If getParentArg() is not null, then returns the path to the top level, as a single string + AREXPORT std::string getParentPathName(char separator = '|') const; + + /// Given a parent path, as a single string, splits it in a format useable by ArConfigSection findParam + AREXPORT static std::list splitParentPathName(const char *parentPathName, + char separator = '|'); + + + /// Replaces spaces in the name with underscores + AREXPORT void replaceSpacesInName(void); + + /// Returns whether the arg has a minimum value, currently applicable to INTs and DOUBLEs + AREXPORT bool hasMinBound() const; + + /// Returns whether the arg has a maximum value, currently applicable to INTs and DOUBLEs + AREXPORT bool hasMaxBound() const; + + /// Sets whether to ignore bounds or not (default is to not to) + AREXPORT void setIgnoreBounds(bool ignoreBounds = false); + + /// Returns true if this arg points to a member of another object, false if arg is self-contained. + AREXPORT bool hasExternalDataReference() const; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Generic (Type-Independent) Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Adds given parserCB handler for the appropriate keyword(s) to the given file parser. + AREXPORT bool addToFileParser(ArFileParser *parser, + ArRetFunctor3C *parserCB, + const char *logPrefix = "", + bool isQuiet = false) const; + + + + /// Sets the value of this arg to the data described in the given ArArgumentBuilder + AREXPORT bool parseArgument(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen, + const char *logPrefix = "", + bool isQuiet = false, + bool *changed = NULL); + + /// Writes this arg to the given file, in a format suitable for reading by parseArgument. + AREXPORT bool writeArguments(FILE *file, + char *lineBuf, + int lineBufSize, + int startCommentColumn, + bool isWriteExtra = false, + const char *logPrefix = "", + int indentLevel = 0) const; + + /// Writes the name of this arg to the given buffer, indenting as specified. + AREXPORT bool writeName(char *lineBuf, + int lineBufSize, + int indentLevel) const; + + /// Writes the min/max values of this arg to the given buffer, as applicable. + AREXPORT bool writeBounds(char *line, + size_t lineLen, + const char *logPrefix = "") const; + + /// Logs the type, name, and value of this argument + AREXPORT void log(bool verbose = false, + int indentCount = 1, + const char *logPrefix = "") const; + + /// Checks only the name, type, and value attributes and returns whether they are equal. + AREXPORT bool isValueEqual(const ArConfigArg &other) const; + + /// If the given source is of the same type, copies its value to this arg + /** + * Note that this method currently only works for the primitive arg + * types (i.e. int, bool, etc.). It doesn't copy functors or description + * holders. + * + * @param source the ArConfigArg whose value is to be copied to this arg + * @param isVerifyArgNames a bool set to true if the argument value should + * be set only if the given source has the same name as this argument; + * the default value is false + * @return bool true if the value was copied; false if the source was of a + * different (or non-copyable) type + **/ + AREXPORT bool setValue(const ArConfigArg &source, + bool isVerifyArgNames = false); + + /// Gets whether this value has been set since it was last cleared or not + bool isValueSet(void) { return myValueSet; } + + /// Tells the configArg that the value hasn't been set + void clearValueSet(void) { myValueSet = false; } + + /// For special arg types (such as LIST), sets the flag to indicate the value was set. + void setValueSet(void) { myValueSet = true; } + + + /// Returns whether the arg has been translated by a resource file. + bool isTranslated() const; + + /// Sets whether the arg has been translated by a resource file. + void setTranslated(bool b); + + + enum ResourceIndices { + RESOURCE_INDEX_OF_SECTION_NAME = 0, + RESOURCE_INDEX_OF_ARG_NAME = 1, + RESOURCE_INDEX_OF_TYPE = 2, + RESOURCE_INDEX_OF_PRIORITY = 3, + RESOURCE_INDEX_OF_RESTART_LEVEL = 4, + RESOURCE_INDEX_OF_PARENT_PATH = 5, + RESOURCE_INDEX_OF_DESCRIPTION = 6, + RESOURCE_INDEX_OF_EXTRA = 7, + RESOURCE_INDEX_OF_DISPLAY = 8, // not yet supported + RESOURCE_INDEX_OF_NEW = 9 + }; + + enum { + MAX_RESOURCE_ARG_TEXT_LENGTH = 1024 + }; + + /// Sets the value of this arg to the resource data described in the given ArArgumentBuilder + AREXPORT bool parseResource(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen, + const char *logPrefix = "", + bool isQuiet = false); + + + + /// Parses the text obtained from the resource arg, strips surrounding quotes, blanks, and funny chars. + AREXPORT static bool parseResourceArgText(const char *argText, + char *bufOut, + size_t bufLen); + + /// Writes this arg to the given file, in a format suitable for reading by parseResource. + AREXPORT bool writeResource(FILE *file, + char *lineBuf, + int lineBufSize, + char separatorChar, + const char *sectionName, + const char *logPrefix = "") const; + + + /// Writes column labels and edit info to the given resource file, returns number of lines written + AREXPORT static int writeResourceHeader(FILE *file, + char *lineBuf, + int lineBufSize, + char separatorChar, + const char *sectionTitle, + const char *logPrefix = ""); + + /// Writes the section description to the resource file. + AREXPORT static int writeResourceSectionHeader(FILE *file, + char *lineBuf, + int lineBufSize, + char separatorChar, + const char *sectionName, + const char *sectionDesc, + const char *sectionExtra, + const char *sectionDisplayName, + bool isTranslated, + const char *logPrefix = ""); + +protected: + + // Giving ArConfig access to the write method + friend class ArConfig; + + /// Writes the given comment to the specified file, spanning multiple lines as necessary. + AREXPORT static bool writeMultiLineComment(const char *comment, + FILE *file, + char *lineBuf, + int lineBufSize, + const char *startComment); + + +private: + + enum IntType { + INT_NOT, ///< Not an int + INT_INT, ///< An int (4 bytes) + INT_SHORT, ///< A short (2 bytes) + INT_UNSIGNED_SHORT, ///< An unsigned short (2 bytes) + INT_UNSIGNED_CHAR ///< An unsigned char (1 byte) + }; + + /// Internal helper function + void clear(bool initial, + Type type = INVALID, + IntType intType = INT_NOT, + bool isDelete = true); + + /// Copies the given arg to this one, optionally detaching any internal pointer + void copy(const ArConfigArg &arg, bool isDetach = false); + + void set(ArConfigArg::Type type, + const char *name, + const char *description, + IntType intType = INT_NOT); + + /// Sets the parent pointer of this arg. + void setParent(ArConfigArg *parentArg); + + /// Whether the arg type is LIST or LIST_HOLDER + bool isListType() const; + +// KMC 7/11/12 Changed from protected to private so future changes are less +// of a concern +// protected: +private: + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to INT args + struct ArConfigIntData { + + // int data + ArConfigArg::IntType myIntType; + + // If unions need to be avoided for some reason, then this can simply + // be turned into a struct. + // + // begin union (based on myIntType) + union { + int *myIntPointer; + short *myIntShortPointer; + unsigned short *myIntUnsignedShortPointer; + unsigned char *myIntUnsignedCharPointer; + }; + // end union (based on myIntType) + + int myMinInt; + int myMaxInt; + + }; // end struct ArConfigIntData + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to DOUBLE args + struct ArConfigDoubleData { + + double *myDoublePointer; + double myMinDouble; + double myMaxDouble; + int myPrecision; + + }; // end struct ArConfigDoubleData + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to BOOL args + struct ArConfigBoolData { + + bool *myBoolPointer; + + }; // end struct ArConfigBoolData + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to STRING and STRING_HOLDER args + struct ArConfigStringData { + + // string data + char *myStringPointer; + size_t myMaxStrLen; + // KMC own string change + // Not seeing the functional difference between this and myOwnPointedTo + // (which was previously applied to all but strings) + // bool myUsingOwnedString; + std::string *myString; ///< Used if myOwnedString is true. (Union member cannot have a copy constructor so using a pointer) + + }; // end struct ArConfigStringData + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to CPPSTRING + struct ArConfigCppStringData { + std::string *myCppStringPtr; + }; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to LIST args + struct ArConfigListData { + + std::list *myChildArgList; + + }; // end struct ArConfigListData + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// Data applicable to FUNCTOR args + struct ArConfigFunctorData { + + ArRetFunctor1 *mySetFunctor; + ArRetFunctor *> *myGetFunctor; + + }; // end struct ArConfigFunctorData + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // + // If unions need to be avoided for some reason, then this can simply + // be turned into a struct. + // + /// Data that varies according to type of arg + union ArConfigArgData { // begin union (based on myType) + ArConfigIntData myIntData; + ArConfigDoubleData myDoubleData; + ArConfigBoolData myBoolData; + ArConfigStringData myStringData; + ArConfigListData myListData; + ArConfigFunctorData myFunctorData; + ArConfigCppStringData myCppStringData; + }; // end union (based on myType) + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Number of spaces to indent each level of list contents + static int ourIndentSpaceCount; + + static std::map *ourTextToTypeMap; + static std::map *ourTextToRestartLevelMap; + + /// Type of this arg + ArConfigArg::Type myType; + /// Name of this arg (may be empty for SEPARATOR args) + std::string myName; + /// Brief description of this arg + std::string myDescription; + /// An optional extra explanation for args that need clarification + std::string myExtraExplanation; + + /// Name to be displayed in client applications. (Not yet supported.) + std::string myDisplayName; + + ArConfigArgData myData; + + /// Priority of this arg + ArPriority::Priority myConfigPriority; + /// Optional display hint used by clients + std::string myDisplayHint; + /// Indicates whether modifying the arg will result in a system restart + RestartLevel myRestartLevel; + /// Supressses change notification (for central server config params that should cause a restart on a robot, but not on the central server) + bool mySupressChanges; + + /// Pointer to the parent arg, or NULL if this arg is not a member of a LIST + ArConfigArg *myParentArg; + + /// Whether this arg "owns" its data, i.e. does not point to a member of another object + bool myOwnPointedTo : 1; + /// Whether this arg has been set to its initial value + bool myValueSet : 1; + /// Whether any min/max bounds requirements on this arg should be ignored + bool myIgnoreBounds : 1; + /// Whether this arg has been translated by a resource file + bool myIsTranslated : 1; + +}; // end class ArConfigArg + +#endif // ARCONFIGARG_H diff --git a/Legacy/Aria/include/ArConfigGroup.h b/Legacy/Aria/include/ArConfigGroup.h new file mode 100644 index 0000000..1afaa5c --- /dev/null +++ b/Legacy/Aria/include/ArConfigGroup.h @@ -0,0 +1,59 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARCONFIGGROUP_H +#define ARCONFIGGROUP_H + +#include "ArConfig.h" + +/// Container for holding a group of ArConfigs +class ArConfigGroup +{ +public: + /// Constructor + AREXPORT ArConfigGroup(const char *baseDirectory = NULL); + /// Destructor + AREXPORT ~ArConfigGroup(void); + /// Adds a config to the group + AREXPORT void addConfig(ArConfig *config); + /// Removes a config from the group + AREXPORT void remConfig(ArConfig *config); + /// Parses the given file (starting from the base directory) + AREXPORT bool parseFile(const char *fileName, bool continueOnError = false); + /// Reloads the last file parsed + AREXPORT bool reloadFile(bool continueOnError = true); + /// Writes a file out (overwrites any existing file) + AREXPORT bool writeFile(const char *fileName); + /// Sets the base directory on all configs this contains + AREXPORT void setBaseDirectory(const char *baseDirectory); + /// Gets the baes directory of this group (not the configs it contains) + AREXPORT const char *getBaseDirectory(void) const; +protected: + std::string myBaseDirectory; + std::string myLastFile; + std::list myConfigs; +}; + +#endif // ARCONFIGGROUP diff --git a/Legacy/Aria/include/ArDPPTU.h b/Legacy/Aria/include/ArDPPTU.h new file mode 100644 index 0000000..519a32f --- /dev/null +++ b/Legacy/Aria/include/ArDPPTU.h @@ -0,0 +1,457 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARDPPTU_H +#define ARDPPTU_H + +#include "ariaTypedefs.h" +#include "ArRobot.h" +#include "ArPTZ.h" +#include + +class ArBasePacket; + +/** Interface to Directed Perception pan/tilt unit, imprementing the ArPTZ + * interface. + +Functions such as pan(), tilt(), etc. +send requests to the PTU. By default, a new motion command will interrupt the +previous command, but the awaitExec() function sends a command instructing the +PTU to wait for the previous motion to finish. + +Incoming data sent from the PTU is read every ArRobot task cycle (10hz). If this +data contains a message giving the current measured position of the pan and +tilt axes, then this is stored as the current pan and tilt positions, and a request for +the next positions is sent. (This means that the pan and tilt positions are +received as fast as the PTU can send them, but no faster than the robot task +cycle.) If no pan and tilt positions have been received, then ArDPPTU defaults +to providing as pan and tilt position whatever the last *requested* positions +are (from the last use of pan(), tilt() or panTilt()). (This is the standard +behavior specified by the ArPTZ interface, and lets you deal with different +kinds of PTUs, some of which cannot measure their own position.) You can also +always check the last pan or tilt request with getLastPanRequest() and +getLastTiltRequest(). + +To use ArDPPTU you must set the appropriate device connection (usually an +ArSerialConnection), open this connection, then call the init() method on the +ArDPPTU object. Then, you can use resetCalib() to have the unit perform a self +calibration routine, configure power modes, set speeds, etc. + +The ArDPPTU constructor will switch on power to the PTU when on a Seekur or +Seekur Jr. robot. The shutdown() method (and destructor) will switch off power. + +If a specific DPPTU type was given in the constructor, then some internal +conversion factors are set according to that type. If left as the +PANTILT_DEFAULT type, then the conversion factors are automatically determined +by querying the DPPTU device. PANTILT_DEFAULT is recommended. + +The DPPTU performs a startup self-calibration routine when first powered on. You +can recalibrate by calling resetCalib(). + +By default the DPPTU is configured to use low power when in motion, and no power +on the motors when holding a position. This is OK for most cameras. However, +the DPPTU has a very high payload (especially PTU47 for outdoor use) and you +may want to enable higher power modes if the PTU slips when carrying heavy +payloads using setMovePower() and setHoldPower(). + +The DPPTU can be connected to a computer serial port (typically COM4) or through +a Pioneer microcontroller auxilliary serial port. +If the DPPTU is connected to the microcontroller, make sure that the baud rate of the microcontroller-DPPTU connection is at least as fast, if not faster than the connection of the computer to the microcontroller. If it's slower then the commands sent to the DPPTU may get backed up in the AUX port buffer and cause the DPPTU to behave erratically. So, if the computer-microcontroller connection is autobauding up to 38400bps, then make sure that the microcontroller aux port is set to 38400bps, as well, and consult the DPPTU manual for directions on changing its baud rate. + +@sa the DPPTU manuals and documentation available at http://robots.mobilerobots.com + + + @ingroup OptionalClasses +*/ + +/// A class with the commands for the DPPTU +class ArDPPTUCommands +{ +public: + + enum { + DELIM = 0x20, /// myQueryCB; + char *myDataBuf; + + + ArFunctorC myShutdownCB; + int myDeviceIndex; + void shutdown(); + + ArTime myLastPositionMessageHandled; + bool myWarnedOldPositionData; + ArTime myLastQuerySent; + + std::vector myPowerPorts; + + bool myGotPanRes; + bool myGotTiltRes; + + ///@since 2.7.6 + static ArPTZ* create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot); + ///@since 2.7.6 + static ArPTZConnector::GlobalPTZCreateFunc ourCreateFunc; +}; + +#endif // ARDPPTU_H + diff --git a/Legacy/Aria/include/ArDataLogger.h b/Legacy/Aria/include/ArDataLogger.h new file mode 100644 index 0000000..898b8e8 --- /dev/null +++ b/Legacy/Aria/include/ArDataLogger.h @@ -0,0 +1,126 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARDATALOGGER_H +#define ARDATALOGGER_H + +#include "ariaUtil.h" +#include "ArMutex.h" +#include "ArFunctor.h" +#include + +class ArRobot; +class ArConfig; + + +/// This class will log data, but you have to use it through an ArConfig right now +/** + This class doesn't log anything by default, but can be set up to + log all sorts of data. Note that if you do an addString after you + do an addToConfig it'll automatically be enabled (since right now + we don't want to change config after loading since the values would + wind up wierd). + + @ingroup OptionalClasses + **/ +class ArDataLogger +{ +public: + /// Constructor + AREXPORT ArDataLogger(ArRobot *robot, const char *fileName = NULL); + /// Destructor + AREXPORT ~ArDataLogger(); + /// Adds the data logger information to the config + AREXPORT void addToConfig(ArConfig *config); + /// Adds a string to the list of options in the raw format + AREXPORT void addString(const char *name, ArTypes::UByte2 maxLen, + ArFunctor2 *functor); + + /// Gets the functor for adding a string (for ArStringInfoGroup) + ArFunctor3 *> * + getAddStringFunctor(void) { return &myAddStringFunctor; } + +protected: + AREXPORT void connectCallback(void); + AREXPORT bool processFile(char *errorBuffer, size_t errorBufferLen); + AREXPORT void userTask(void); + ArRobot *myRobot; + ArTime myLastLogged; + ArConfig *myConfig; + bool myAddToConfigAtConnect; + bool myAddedToConfig; + + FILE *myFile; + bool myConfigLogging; + int myConfigLogInterval; + char myOpenedFileName[512]; + char myConfigFileName[512]; + std::string myPermanentFileName; + + // for what we're logging + bool myLogVoltage; + bool myLogStateOfCharge; + bool myLogLeftVel; + bool myLogRightVel; + bool myLogTransVel; + bool myLogRotVel; + bool myLogLatVel; + bool myLogLeftStalled; + bool myLogRightStalled; + bool myLogStallBits; + bool myLogFlags; + bool myLogFaultFlags; + int myAnalogCount; + bool *myAnalogEnabled; + int myAnalogVoltageCount; + bool *myAnalogVoltageEnabled; + int myDigInCount; + bool *myDigInEnabled; + int myDigOutCount; + bool *myDigOutEnabled; + bool myLogPose; + bool myLogEncoderPose; + bool myLogCorrectedEncoderPose; + bool myLogEncoders; + bool myLogChargeState; + bool myLogBatteryInfo; + int myStringsCount; + std::vector myStringsEnabled; + + ArMutex myMutex; + + std::vector myStrings; + ArTypes::UByte2 myMaxMaxLength; + ArFunctor3C *> myAddStringFunctor; + + + ArFunctorC myConnectCB; + ArRetFunctor2C myProcessFileCB; + ArFunctorC myUserTaskCB; +}; + +#endif // ARDATALOGGER_H diff --git a/Legacy/Aria/include/ArDeviceConnection.h b/Legacy/Aria/include/ArDeviceConnection.h new file mode 100644 index 0000000..b2895ef --- /dev/null +++ b/Legacy/Aria/include/ArDeviceConnection.h @@ -0,0 +1,186 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARDEVICECONNECTION_H +#define ARDEVICECONNECTION_H + +#include +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArBasePacket.h" + +/// Base class for device connections +/** + Base class for device connections, this is mostly for connections to the + robot or simulator but could also be used for a connection to a laser + or other device + + Note that this is mostly a base class, so if you'll want to use one of the + classes which inherit from this one... also note that in those classes + is where you'll find setPort which sets the place the device connection + will try to connect to... the inherited classes also have an open which + returns more detailed information about the open attempt, and which takes + the parameters for where to connect +*/ +class ArDeviceConnection +{ + public: + /// constructor + AREXPORT ArDeviceConnection(); + /// destructor also forces a close on the connection + AREXPORT virtual ~ArDeviceConnection(); + /// Reads data from connection + /** + Reads data from connection + @param data pointer to a character array to read the data into + @param size maximum number of bytes to read + @param msWait read blocks for this many milliseconds (not at all for == 0) + @return number of bytes read, or -1 for failure + @see write, writePacket + */ + AREXPORT virtual int read(const char *data, unsigned int size, + unsigned int msWait = 0) = 0; + /// Writes data to connection + /** + Writes data to connection from a packet + @param packet pointer to a packet to write the data from + @return number of bytes written, or -1 for failure + @see read, write + */ + AREXPORT virtual int writePacket(ArBasePacket *packet) + { if (packet == NULL || packet->getLength() == 0) return 0; + return write(packet->getBuf(), packet->getLength()); } + /// Writes data to connection + /** + Writes data to connection + @param data pointer to a character array to write the data from + @param size number of bytes to write + @return number of bytes read, or -1 for failure + @see read, writePacket + */ + AREXPORT virtual int write(const char *data, unsigned int size) = 0; + /// Gets the status of the connection, which is one of the enum status + /** + Gets the status of the connection, which is one of the enum status. + If you want to get a string to go along with the number, use + getStatusMessage + @return the status of the connection + @see getStatusMessage + */ + AREXPORT virtual int getStatus(void) = 0; + /// Gets the description string associated with the status + /** + @param messageNumber the int from getStatus you want the string for + @return the description associated with the status + @see getStatus + */ + AREXPORT const char *getStatusMessage(int messageNumber) const; + + /// Opens the connection again, using the values from setLocation or + // a previous open + virtual bool openSimple(void) = 0; + + /// Closes the connection + /** + @return whether the close succeeded or not + */ + virtual bool close(void) { return false; } + /// Gets the string of the message associated with opening the device + /** + Each class inherited from this one has an open method which returns 0 + for success or an integer which can be passed into this function to + obtain a string describing the reason for failure + @param messageNumber the number returned from the open + @return the error description associated with the messageNumber + */ + AREXPORT virtual const char * getOpenMessage(int messageNumber) = 0; + enum Status { + STATUS_NEVER_OPENED = 1, ///< Never opened + STATUS_OPEN, ///< Currently open + STATUS_OPEN_FAILED, ///< Tried to open, but failed + STATUS_CLOSED_NORMALLY, ///< Closed by a close call + STATUS_CLOSED_ERROR ///< Closed because of error + }; + /// Gets the time data was read in + /** + @param index looks like this is the index back in the number of bytes + last read in + @return the time the last read data was read in + */ + AREXPORT virtual ArTime getTimeRead(int index) = 0; + /// sees if timestamping is really going on or not + /** @return true if real timestamping is happening, false otherwise */ + AREXPORT virtual bool isTimeStamping(void) = 0; + + /// Gets the port name + AREXPORT const char *getPortName(void) const; + /// Gets the port type + AREXPORT const char *getPortType(void) const; + + /// Sets the device type (what this is connecting to) + AREXPORT void setDeviceName(const char *deviceName); + /// Gets the device type (what this is connecting to) + AREXPORT const char *getDeviceName(void) const; + + /// Notifies the device connection that the start of a packet is + /// trying to be read + AREXPORT void debugStartPacket(void); + /// Notifies the device connection that some bytes were read (should + /// call with 0 if it read but got no bytes) + AREXPORT void debugBytesRead(int bytesRead); + /// Notifies the device connection that the end of a packet was + /// read, which will cause log messages if set to do so + AREXPORT void debugEndPacket(bool goodPacket, int type = 0); + /// Makes all device connections so that they'll dump data + AREXPORT static bool debugShouldLog(bool shouldLog); + protected: + /// Sets the port name + AREXPORT void setPortName(const char *portName); + /// Sets the port type + AREXPORT void setPortType(const char *portType); + + void buildStrMap(void); + static bool ourStrMapInited; + static ArStrMap ourStrMap; + + std::string myDCPortName; + std::string myDCPortType; + std::string myDCDeviceName; + + static bool ourDCDebugShouldLog; + static ArTime ourDCDebugFirstTime; + bool myDCDebugPacketStarted; + ArTime myDCDebugStartTime; + ArTime myDCDebugFirstByteTime; + ArTime myDCDebugLastByteTime; + int myDCDebugBytesRead; + int myDCDebugTimesRead; + long long myDCDebugNumGoodPackets; + long long myDCDebugNumBadPackets; +}; + +#endif + + diff --git a/Legacy/Aria/include/ArDrawingData.h b/Legacy/Aria/include/ArDrawingData.h new file mode 100644 index 0000000..1815dcd --- /dev/null +++ b/Legacy/Aria/include/ArDrawingData.h @@ -0,0 +1,217 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARDRAWINGDATA_H +#define ARDRAWINGDATA_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +/// A class for holding color information for ArDrawingData +class ArColor +{ +public: + /// Constructor (colors use full range of 0-255) + ArColor(unsigned char red, unsigned char green, unsigned char blue) + { myRed = red; myGreen = green; myBlue = blue; } + /// Constructor + ArColor() { myRed = 255, myGreen = 255, myBlue = 255; } + + /// Constructs a color from the given RGB value + ArColor(ArTypes::Byte4 rgbValue) + { + myRed = (rgbValue & 0xFF0000) >> 16; + myGreen = (rgbValue & 0x00FF00) >> 8; + myBlue = (rgbValue & 0x0000FF); + } + + /// Destructor + virtual ~ArColor() {} + /// Gets the red value (uses full range of 0-255) + unsigned char getRed(void) { return myRed; } + /// Gets the green value (uses full range of 0-255) + unsigned char getGreen(void) { return myGreen; } + /// Gets the blue value (uses full range of 0-255) + unsigned char getBlue(void) { return myBlue; } + /// Gets the color in a byte 4 for putting into a buffer + ArTypes::Byte4 colorToByte4(void) + { return ((myRed << 16) | (myGreen << 8) | myBlue); } +protected: + unsigned char myRed; + unsigned char myGreen; + unsigned char myBlue; + +}; + + +/** Describes general properties of a figure to be drawn on screen. + * (The actual location/geometry data of the figure is stored elsewhere and may + * change frequently) + * + * The following shapes are currently recognized: + *
    + *
  • "polyDots" - a set of small filled circles centered on each point. Each + * ellipse is "size" mm in diameter. (Example: laser)
  • + *
  • "polyArrows" - a set of small arrows that terminate on each point and + * point towards the robot. + * Each arrow is "size" mm in length. (Example: sonar)
  • + *
  • "polyLine" - a line through each of the points. The line is "size" + * pixels wide. (Example: path)
  • + *
  • "polyPoints" - a set of one pixel points. (Example: localization)
  • + *
  • "polySegments" - a set of line segments. For an array of n points, + * n/2 segments are drawn. Each segment is drawn from + * array[i] to array[i+1] (with i starting at 0). The + * segments are "size" pixels wide.
  • + *
+ * + * The primary color determines what color the shape is. No shapes currently use + * the secondary color (but future shapes may, or these shapes may be extended + * in the future to use it). + * + * The layer is an arbitrary int identifier that must be greater than 30 and + * less than 100. (Layers below 30 are considered part of the map data, i.e. + * not associated with a particular robot.) The robot is drawn on layer 50. + * Any items that are to be drawn on top of the robot should have a layer + * number greater than 50. By default, range devices begin on layer 70. + * + * The visibility attribute specifies + * whether the data is to be displayed by default, and whether the user is allowed + * to change the display. The following visibilities are currently supported: + *
    + *
  • "AlwaysOn" - item is always displayed
  • + *
  • "DefaultOn" - item is visible by default, but the user may hide it
  • + *
  • "DefaultOff" - item is hidden by default but the user may show it
  • + *
  • "AlwaysOff" - item is always hidden
  • + *
+ * The default visibility is "DefaultOn". + * +**/ +class ArDrawingData +{ +public: + + enum { + DEFAULT_REFRESH_TIME = 200 ///< Default number of ms between data refresh requests + }; + + + /// Constructor + /** + @param shape the name of the shape to draw (see above / MobileEyes docs for meaning) + @param primaryColor the main color (meaning depends on shape) + @param size the size (meaning varies depends on shape) + @param layer the layer to draw on (see above / MobileEyes docs for meaning) + @param defaultRefreshTime how often we want to draw it in ms + @param visibility a string that indicates whether the data is visible + whether the user is allowed to change the visibility (see above / MobileEyes + docs for valid values). + **/ + ArDrawingData(const char *shape, + ArColor primaryColor, + int size, + int layer, + unsigned int defaultRefreshTime = DEFAULT_REFRESH_TIME, + const char *visibility = "DefaultOn") : + myShape(shape), + myPrimaryColor(primaryColor), + mySize(size), + myLayer(layer), + myDefaultRefreshTime(defaultRefreshTime), + mySecondaryColor(ArColor(0,0,0)), + myVisibility(visibility) + { + } + + /// Constructor + /** + @param shape the name of the shape to draw (see above / MobileEyes docs for meaning) + @param primaryColor the main color (meaning depends on shape) + @param size the size (meaning varies depends on shape) + @param layer the layer to draw on (see above / MobileEyes docs for meaning) + @param defaultRefreshTime how often we want to draw it in ms + @param secondaryColor the secondary color (meaning depends on shape) + @param visibility a string that indicates whether the data is visible + whether the user is allowed to change the visibility (see above / MobileEyes + docs for valid values). + **/ + ArDrawingData(const char *shape, + ArColor primaryColor, + int size, + int layer, + unsigned int defaultRefreshTime, + ArColor secondaryColor, + const char *visibility = "DefaultOn") + { + myShape = shape; + myPrimaryColor = primaryColor; + mySize = size; + myLayer = layer; + myDefaultRefreshTime = defaultRefreshTime; + mySecondaryColor = secondaryColor; + myVisibility = visibility; + } + /// Destructor + virtual ~ArDrawingData() {} + /// Returns the shape of data to draw + const char * getShape(void) { return myShape.c_str(); } + /// Gets the primary color (meaning depending on shape) + ArColor getPrimaryColor(void) { return myPrimaryColor; } + /// Gets the size (meaning depends on shape, but its in mm) + int getSize(void) { return mySize; } + /// Gets the layer to draw at (see MobileEyes docs for what layer means) + int getLayer(void) { return myLayer; } + /// Gets how often this data should be drawn (0 == only when explicitly sent) + unsigned int getDefaultRefreshTime(void) { return myDefaultRefreshTime; } + /// Gets the secondary color (meaning depends on shape) + ArColor getSecondaryColor(void) { return mySecondaryColor; } + /// Gets the visibility of the drawing data + const char *getVisibility(void) { return myVisibility.c_str(); } + + /// Sets the shape of data to draw + void setShape(const char *shape) { myShape = shape; } + /// Sets the primary color (meaning depends on shape) + void setPrimaryColor(ArColor color) { myPrimaryColor = color; } + /// Sets the size (meaning depends on shape, but its in mm) + void setSize(int size) { mySize = size; } + /// Sets the layer (see MobileEyes for docs on what layer means) + void setLayer(int layer) { myLayer = layer; } + /// Gets how often this data should be drawn (0 == only when explicitly sent) + void setDefaultRefreshTime(unsigned int refreshTime) + { myDefaultRefreshTime = refreshTime; } + /// Sets the secondary color (meaning depends on shape) + void setSecondaryColor(ArColor color) { mySecondaryColor = color; } + /// Sets the visibility of the drawing data + void setVisibility(const char *visibility) { myVisibility = visibility; } +protected: + std::string myShape; + ArColor myPrimaryColor; + int mySize; + int myLayer; + unsigned int myDefaultRefreshTime; + ArColor mySecondaryColor; + std::string myVisibility; +}; + +#endif diff --git a/Legacy/Aria/include/ArExitErrorSource.h b/Legacy/Aria/include/ArExitErrorSource.h new file mode 100644 index 0000000..85ed2d3 --- /dev/null +++ b/Legacy/Aria/include/ArExitErrorSource.h @@ -0,0 +1,69 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef AREXITERRORSOURCE_H +#define AREXITERRORSOURCE_H + +/// Small interface for obtaining exit-on-error information +/** + * ArExitErrorSource may be implemented by classes that wish to + * provide information if and when they cause an erroneous + * application exit. The use of this interface is entirely at + * the discretion of the application. Aria does not invoke its + * methods. +**/ +class ArExitErrorSource +{ +public: + + /// Constructor + ArExitErrorSource() {} + + /// Destructor + virtual ~ArExitErrorSource() {} + + /// Returns a textual description of the error source. + /** + * @param buf a char array in which the method puts the output + * error description + * @param bufLen the int number of char's in the array + * @return bool true if the description was successfully written; + * false if an error occurred + **/ + virtual bool getExitErrorDesc(char *buf, int bufLen) = 0; + + /// Returns the error code used for the exit call + /** + * Ideally, the returned error code should be unique across all + * error sources. (Past implementations have the method spec and + * body on a single line so that it's easily searchable... Current + * implementations have that OR this string on a line so that it'll + * show up searchable easily still). + **/ + virtual int getExitErrorCode() const = 0; + +}; // end class ArExitErrorSource + +#endif // AREXITERRORSOURCE_H diff --git a/Legacy/Aria/include/ArExport.h b/Legacy/Aria/include/ArExport.h new file mode 100644 index 0000000..38beb9f --- /dev/null +++ b/Legacy/Aria/include/ArExport.h @@ -0,0 +1,51 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef AREXPORT_H +#define AREXPORT_H + +// Including this header file forces AREXPORT to be defined as the dllexport declaration in Windows DLL builds. +// It should only be included in source files in ARIA and other libraries. Header files should include ariaTypedefs instead. + +#if (defined(_WIN32) || defined(WIN32)) && !defined(MINGW) + +#ifndef SWIG +#ifndef ARIA_STATIC +#undef AREXPORT +#define AREXPORT _declspec(dllexport) +#else // ARIA_STATIC +#define AREXPORT +#endif // ARIA_STATIC +#endif // SWIG + +#else // WIN32 + +#define AREXPORT + +#endif // WIN32 + +#endif // AREXPORT_H + + diff --git a/Legacy/Aria/include/ArFileParser.h b/Legacy/Aria/include/ArFileParser.h new file mode 100644 index 0000000..0c68b76 --- /dev/null +++ b/Legacy/Aria/include/ArFileParser.h @@ -0,0 +1,224 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARFILEPARSER_H +#define ARFILEPARSER_H + +#include "ariaTypedefs.h" +#include "ArArgumentParser.h" +#include "ArFunctor.h" +#include "ariaUtil.h" + +/// Class for parsing files more easily +/** + This class helps parse text files based on keywords followed by various + values. + To use it, add functors of different types + of arguments with addHandler(), then call parseFile() to parse the file + and invoke the various functors as items are read from the file. + parseFile() returns true if there were no errors parsing and false if + there were errors. + + One side feature is that you can have ONE handler for the keyword + NULL, and if there is a line read that isn't entirely comments or + whitespace that handler will be given the line. There isn't an + explicit set for them since then there'd be another set of 5 adds. + + There should be some whitespace after keywords in the file, and any + semicolon (;) or hash mark (#) will act as a comment with the rest of the line + ignored. (Alternative comment delimeters may be set using + setCommentDelimeters()). If no handler exists for the first word the line is + passed to the handler above for NULL. You can't have any lines + longer than 10000 characters or keywords longer than 512 characters + (though I don't know why you'd have either). If you have more than + 2048 words on a line you'll have problems as well. + + @ingroup OptionalClasses + + * @note ArFileParser does not escape any special characters when writing or + * loading to/from a file. Therefore in general keywords, values, + * and comments must not contain characters which have special meaning + * in a config file, such as '#', ';', tab or newline. + **/ +class ArFileParser +{ +public: + + /// Constructor + AREXPORT ArFileParser(const char *baseDirectory = "./", + bool isPreCompressQuotes = false); + + + + /// Destructor + AREXPORT ~ArFileParser(void); + + /// Adds a functor to handle a keyword that wants an easily parsable string + AREXPORT bool addHandler(const char *keyword, + ArRetFunctor1 *functor); + /// Adds a functor to handle a keyword that wants an easily parsable string and returns error messages + AREXPORT bool addHandlerWithError(const char *keyword, + ArRetFunctor3 *functor); + /// Removes a handler for a keyword + AREXPORT bool remHandler(const char *keyword, bool logIfCannotFind = true); + /// Removes any handlers with this functor + AREXPORT bool remHandler(ArRetFunctor1 *functor); + /// Removes any handlers with this functor + AREXPORT bool remHandler( + ArRetFunctor3 *functor); + /* this shouldn't be needed and would be inelegant with the new scheme, + if someone needs it let us know and I'll update it somehow + /// Gets handler data for some keyword + AREXPORT ArRetFunctor1 *getHandler(const char *keyword); + */ + + AREXPORT void setPreParseFunctor(ArFunctor1 *functor); + + + /// Opens, parses, and then closes the specified file. + AREXPORT bool parseFile(const char *fileName, bool continueOnErrors = true, + bool noFileNotFoundMessage = false, + char *errorBuffer = NULL, size_t errorBufferLen = 0); + + /// Parses an open file; the file is not closed by this method. + /** + * @param file the open FILE* to be parsed; must not be NULL + * @param buffer a non-NULL char array in which to read the file + * @param bufferLength the number of chars in the buffer; must be greater than 0 + * @param continueOnErrors a bool set to true if parsing should continue + * even after an error is detected + **/ + AREXPORT bool parseFile(FILE *file, char *buffer, int bufferLength, + bool continueOnErrors = true, + char *errorBuffer = NULL, size_t errorBufferLen = 0); + + + /// If parseFile is currently in progress, then terminates it as soon as possible. + AREXPORT void cancelParsing(); + + + /// Gets the base directory + AREXPORT const char *getBaseDirectory(void) const; + /// Sets the base directory + AREXPORT void setBaseDirectory(const char *baseDirectory); + + /// Sets the strings used to mark comments in the file to be parsed. + AREXPORT void setCommentDelimiters(const std::list &delimiters); + + /// Clears the strings used to mark comments in the file to be parsed. + AREXPORT void clearCommentDelimiters(); + + + /// Function to parse a single line + AREXPORT bool parseLine(char *line, char *errorBuffer = NULL, + size_t errorBufferLen = 0); + /// Function to reset counters + AREXPORT void resetCounters(void); + /// Sets the maximum number of arguments in a line we can expect + AREXPORT void setMaxNumArguments(size_t maxNumArguments = 512) + { myMaxNumArguments = maxNumArguments; } + /// Turn on this flag to reduce the number of verbose log messages. + AREXPORT void setQuiet(bool isQuiet); + +protected: + + /// Returns true if cancelParsing() has been called during parseFile() + bool isInterrupted(); + + class HandlerCBType + { + public: + HandlerCBType( + ArRetFunctor3 *functor) + { + myCallbackWithError = functor; + myCallback = NULL; + } + HandlerCBType(ArRetFunctor1 *functor) + { + myCallbackWithError = NULL; + myCallback = functor; + } + ~HandlerCBType() {} + bool call(ArArgumentBuilder *arg, char *errorBuffer, + size_t errorBufferLen) + { + if (myCallbackWithError != NULL) + return myCallbackWithError->invokeR(arg, errorBuffer, errorBufferLen); + else if (myCallback != NULL) + return myCallback->invokeR(arg); + // if we get here there's a problem + ArLog::log(ArLog::Terse, "ArFileParser: Horrible problem with process callbacks"); + return false; + } + bool haveFunctor( + ArRetFunctor3 *functor) + { + if (myCallbackWithError == functor) + return true; + else + return false; + } + bool haveFunctor(ArRetFunctor1 *functor) + { + if (myCallback == functor) + return true; + else + return false; + } + const char *getName(void) + { + if (myCallbackWithError != NULL) + return myCallbackWithError->getName(); + else if (myCallback != NULL) + return myCallback->getName(); + // if we get here there's a problem + ArLog::log(ArLog::Terse, "ArFileParser: Horrible problem with process callback names"); + return NULL; + } + protected: + ArRetFunctor3 *myCallbackWithError; + ArRetFunctor1 *myCallback; + }; + size_t myMaxNumArguments; + int myLineNumber; + std::string myBaseDir; + std::list myCommentDelimiterList; + + ArFunctor1 *myPreParseFunctor; + + std::map myMap; + // handles that NULL case + HandlerCBType *myRemainderHandler; + bool myIsQuiet; + bool myIsPreCompressQuotes; + bool myIsInterrupted; + ArMutex myInterruptMutex; +}; + +#endif // ARFILEPARSER_H + + diff --git a/Legacy/Aria/include/ArForbiddenRangeDevice.h b/Legacy/Aria/include/ArForbiddenRangeDevice.h new file mode 100644 index 0000000..357b6e0 --- /dev/null +++ b/Legacy/Aria/include/ArForbiddenRangeDevice.h @@ -0,0 +1,74 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARFORBIDDENRANGEDEVICE_H +#define ARFORBIDDENRANGEDEVICE_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArMapInterface.h" + +/// Class that takes forbidden lines and turns them into range readings +/// @ingroup OptionalClasses +class ArForbiddenRangeDevice : public ArRangeDevice +{ +public: + /// Constructor + AREXPORT ArForbiddenRangeDevice(ArMapInterface *armap, + double distanceIncrement = 100, + unsigned int maxRange = 4000, + const char *name = "forbidden"); + /// Destructor + AREXPORT virtual ~ArForbiddenRangeDevice(); + /// Saves the forbidden lines from the map + AREXPORT void processMap(void); + /// Remakes the readings + AREXPORT void processReadings(void); + /// Sets the robot pointer and attachs its process function + AREXPORT virtual void setRobot(ArRobot *robot); + + /// Enable readings + AREXPORT void enable(void); + /// Disables readings until reenabled + AREXPORT void disable(void); + /// Sees if this device is active or not + AREXPORT bool isEnabled(void) const { return myIsEnabled;; } + /// Gets a callback to enable the device + AREXPORT ArFunctor *getEnableCB(void) { return &myEnableCB; } + /// Gets a callback to disable the device + AREXPORT ArFunctor *getDisableCB(void) { return &myDisableCB; } +protected: + ArMutex myDataMutex; + ArMapInterface *myMap; + double myDistanceIncrement; + std::list mySegments; + ArFunctorC myProcessCB; + ArFunctorC myMapChangedCB; + bool myIsEnabled; + ArFunctorC myEnableCB; + ArFunctorC myDisableCB; +}; + +#endif // ARFORBIDDENRANGEDEVICE_H diff --git a/Legacy/Aria/include/ArFunctor.h b/Legacy/Aria/include/ArFunctor.h new file mode 100644 index 0000000..71a38a6 --- /dev/null +++ b/Legacy/Aria/include/ArFunctor.h @@ -0,0 +1,5415 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARFUNCTOR_H +#define ARFUNCTOR_H + +#include "ariaTypedefs.h" +#include "ariaOSDef.h" +#include +#include + +/// An object which allows storing a generalized reference to a method with an object instance to call later (used for callback functions) +/** + Functors are meant to encapsulate the idea of a pointer to a function + which is a member of a class. To use a pointer to a member function, + you must have a C style function pointer, 'void(Class::*)()', and a + pointer to an instance of the class in which the function is a member + of. This is because all non-static member functions must have a 'this' + pointer. If they dont and if the member function uses any member data + or even other member functions it will not work right and most likely + crash. This is because the 'this' pointer is not the correct value + and is most likely a random uninitialized value. The virtue of static + member functions is that they do not require a 'this' pointer to be run. + But the compiler will never let you access any member data or functions + from within a static member function. + + Because of the design of C++ never allowed for encapsulating these two + pointers together into one language supported construct, this has to be + done by hand. For conviences sake, there are functors (ArGlobalFunctor, + ArGlobalRetFunctor) which take a pure C style function pointer + (a non-member function). This is in case you want to use a functor that + refers to a global C style function. + + Aria makes use of functors by using them as callback functions. Since + Aria is programmed using the object oriented programming paradigm, all + the callback functions need to be tied to an object and a particular + instance. Thus the need for functors. Most of the use of callbacks simply + take an ArFunctor, which is the base class for all the functors. This + class only has the ability to invoke a functor. All the derivitave + functors have the ability to invoke the correct function on the correct + object. + + Because functions have different signatures because they take different + types of parameters and have different number of parameters, templates + were used to create the functors. These are the base classes for the + functors. These classes encapsulate everything except for the class + type that the member function is a member of. This allows someone to + accept a functor of type ArFunctor1 which has one parameter of type + 'int'. But they never have to know that the function is a member function + of class 'SomeUnknownType'. These classes are: + + ArFunctor, ArFunctor1, ArFunctor2, ArFunctor3 + ArRetFunctor, ArRetFunctor1, ArRetFunctor2, ArRetFunctor3 + + These 8 functors are the only thing a piece of code that wants a functor + will ever need. But these classes are abstract classes and can not be + instantiated. On the other side, the piece of code that wants to be + called back will need the functor classes that know about the class type. + These functors are: + + ArFunctorC, ArFunctor1C, ArFunctor2C, ArFunctor3C + ArRetFunctorC, ArRetFunctor1C, ArRetFunctor2C, ArRetFunctor3C + + These functors are meant to be instantiated and passed of to a piece of + code that wants to use them. That piece of code should only know the + functor as one of the functor classes without the 'C' in it. + + Note that you can create these FunctorC instances with default + arguments that are then used when the invoke is called without those + arguments... These are quite useful since if you have a class that + expects an ArFunctor you can make an ArFunctor1C with default + arguments and pass it as an ArFunctor... and it will get called with + that default argument, this is useful for having multiple functors + use the same function with different arguments and results (just + takes one functor each). + + Functors now have a getName() method, this is useful as an aid to debugging, + allowing you to display the name of some functor being used. + + @javanote You can subclass ArFunctor and override invoke(). + + @see @ref functorExample.cpp + + @ingroup ImportantClasses +**/ +class ArFunctor +{ +public: + + /// Destructor + virtual ~ArFunctor() {} + + /// Invokes the functor + virtual void invoke(void) = 0; + + /// Gets the name of the functor + virtual const char *getName(void) { return myName.c_str(); } + + /// Sets the name of the functor + virtual void setName(const char *name) { myName = name; } + +#ifndef SWIG + /// Sets the name of the functor with formatting + /** @swigomit use setName() */ + virtual void setNameVar(const char *name, ...) + { + char arg[2048]; + va_list ptr; + va_start(ptr, name); + vsnprintf(arg, sizeof(arg), name, ptr); + arg[sizeof(arg) - 1] = '\0'; + va_end(ptr); + return setName(arg); + } +#endif + +protected: + std::string myName; +}; + +/// Base class for functors with 1 parameter +/** + This is the base class for functors with 1 parameter. Code that has a + reference to a functor that takes 1 parameter should use this class + name. This allows the code to know how to invoke the functor without + knowing which class the member function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor1 : public ArFunctor +{ +public: + + /// Destructor + virtual ~ArFunctor1() {} + + /// Invokes the functor + virtual void invoke(void) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) = 0; +}; + +/// Base class for functors with 2 parameters +/** + This is the base class for functors with 2 parameters. Code that has a + reference to a functor that takes 2 parameters should use this class + name. This allows the code to know how to invoke the functor without + knowing which class the member function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor2 : public ArFunctor1 +{ +public: + + /// Destructor + virtual ~ArFunctor2() {} + + /// Invokes the functor + virtual void invoke(void) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) = 0; +}; + +/// Base class for functors with 3 parameters +/** + This is the base class for functors with 3 parameters. Code that has a + reference to a functor that takes 3 parameters should use this class + name. This allows the code to know how to invoke the functor without + knowing which class the member function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor3 : public ArFunctor2 +{ +public: + + /// Destructor + virtual ~ArFunctor3() {} + + /// Invokes the functor + virtual void invoke(void) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) = 0; +}; + + + +/// Base class for functors with 4 parameters +/** + This is the base class for functors with 4 parameters. Code that has a + reference to a functor that takes 4 parameters should use this class + name. This allows the code to know how to invoke the functor without + knowing which class the member function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor4 : public ArFunctor3 +{ +public: + + /// Destructor + virtual ~ArFunctor4() {} + + /// Invokes the functor + virtual void invoke(void) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) = 0; + +}; + + +/// Base class for functors with 5 parameters +/** + This is the base class for functors with 5 parameters. Code that has a + reference to a functor that takes 5 parameters should use this class + name. This allows the code to know how to invoke the functor without + knowing which class the member function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor5 : public ArFunctor4 +{ +public: + + /// Destructor + virtual ~ArFunctor5() {} + + /// Invokes the functor + virtual void invoke(void) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) = 0; + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p4 fifth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) = 0; + +}; + + + + +/// Base class for functors with a return value +/** + This is the base class for functors with a return value. Code that has a + reference to a functor that returns a value should use this class + name. This allows the code to know how to invoke the functor without + knowing which class the member function is in. + + For an overall description of functors, see ArFunctor. + + @javanote To create the equivalent of ArRetFunctor, you can + subclass ArRetFunctor_Bool and override invoke(bool) + +*/ +template +class ArRetFunctor : public ArFunctor +{ +public: + + /// Destructor + virtual ~ArRetFunctor() {} + + /// Invokes the functor + virtual void invoke(void) {invokeR();} + + /// Invokes the functor with return value + virtual Ret invokeR(void) = 0; +}; + +/// Base class for functors with a return value with 1 parameter +/** + This is the base class for functors with a return value and take 1 + parameter. Code that has a reference to a functor that returns a value + and takes 1 parameter should use this class name. This allows the code + to know how to invoke the functor without knowing which class the member + function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor1 : public ArRetFunctor +{ +public: + + /// Destructor + virtual ~ArRetFunctor1() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) = 0; +}; + +/// Base class for functors with a return value with 2 parameters +/** + This is the base class for functors with a return value and take 2 + parameters. Code that has a reference to a functor that returns a value + and takes 2 parameters should use this class name. This allows the code + to know how to invoke the functor without knowing which class the member + function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor2 : public ArRetFunctor1 +{ +public: + + /// Destructor + virtual ~ArRetFunctor2() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) = 0; +}; + +/// Base class for functors with a return value with 3 parameters +/** + This is the base class for functors with a return value and take 3 + parameters. Code that has a reference to a functor that returns a value + and takes 3 parameters should use this class name. This allows the code + to know how to invoke the functor without knowing which class the member + function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor3 : public ArRetFunctor2 +{ +public: + + /// Destructor + virtual ~ArRetFunctor3() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) = 0; +}; + + + + +/// Base class for functors with a return value with 4 parameters +/** + This is the base class for functors with a return value and take 4 + parameters. Code that has a reference to a functor that returns a value + and takes 4 parameters should use this class name. This allows the code + to know how to invoke the functor without knowing which class the member + function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor4 : public ArRetFunctor3 +{ +public: + + /// Destructor + virtual ~ArRetFunctor4() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) = 0; +}; + +/// Base class for functors with a return value with 5 parameters +/** + This is the base class for functors with a return value and take 5 + parameters. Code that has a reference to a functor that returns a value + and takes 5 parameters should use this class name. This allows the code + to know how to invoke the functor without knowing which class the member + function is in. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor5 : public ArRetFunctor4 +{ +public: + + /// Destructor + virtual ~ArRetFunctor5() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) = 0; + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p4 fifth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) = 0; +}; + + + + + +////// +////// +////// +////// +////// +////// +////// ArFunctors for global functions. C style function pointers. +////// +////// +////// +////// +////// +////// + + +#ifndef SWIG +/// Functor for a global function with no parameters +/** + This is a class for global functions. This ties a C style function + pointer into the functor class hierarchy as a convience. Code that + has a reference to this class and treat it as an ArFunctor can use + it like any other functor. + + For an overall description of functors, see ArFunctor. + + @swigomit +*/ +class ArGlobalFunctor : public ArFunctor +{ +public: + + /// Constructor + ArGlobalFunctor() {} + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalFunctor(void (*func)(void)) : myFunc(func) {} + /// Destructor + virtual ~ArGlobalFunctor() {} + + /// Invokes the functor + virtual void invoke(void) {(*myFunc)();} +protected: + + void (*myFunc)(void); +}; + +/// Functor for a global function with 1 parameter +/** + This is a class for global functions which take 1 parameter. This ties + a C style function pointer into the functor class hierarchy as a + convience. Code that has a reference to this class and treat it as + an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalFunctor1 : public ArFunctor1 +{ +public: + + /// Constructor + ArGlobalFunctor1() {} + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalFunctor1(void (*func)(P1)) : + myFunc(func), myP1() {} + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalFunctor1(void (*func)(P1), P1 p1) : + myFunc(func), myP1(p1) {} + + /// Destructor + virtual ~ArGlobalFunctor1() {} + + /// Invokes the functor + virtual void invoke(void) {(*myFunc)(myP1);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(*myFunc)(p1);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + +protected: + + void (*myFunc)(P1); + P1 myP1; +}; + + +/// Functor for a global function with 2 parameters +/** + This is a class for global functions which take 2 parameters. This ties + a C style function pointer into the functor class hierarchy as a + convience. Code that has a reference to this class and treat it as + an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalFunctor2 : public ArFunctor2 +{ +public: + + /// Constructor + ArGlobalFunctor2() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalFunctor2(void (*func)(P1, P2)) : + myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalFunctor2(void (*func)(P1, P2), P1 p1) : + myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalFunctor2(void (*func)(P1, P2), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2) {} + + /// Destructor + virtual ~ArGlobalFunctor2() {} + + /// Invokes the functor + virtual void invoke(void) {(*myFunc)(myP1, myP2);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(*myFunc)(p1, myP2);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(*myFunc)(p1, p2);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + +protected: + + void (*myFunc)(P1, P2); + P1 myP1; + P2 myP2; +}; + +/// Functor for a global function with 3 parameters +/** + This is a class for global functions which take 3 parameters. This ties + a C style function pointer into the functor class hierarchy as a + convience. Code that has a reference to this class and treat it as + an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalFunctor3 : public ArFunctor3 +{ +public: + + /// Constructor + ArGlobalFunctor3() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalFunctor3(void (*func)(P1, P2, P3)) : + myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalFunctor3(void (*func)(P1, P2, P3), P1 p1) : + myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalFunctor3(void (*func)(P1, P2, P3), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArGlobalFunctor3(void (*func)(P1, P2, P3), P1 p1, P2 p2, P3 p3) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Destructor + virtual ~ArGlobalFunctor3() {} + + /// Invokes the functor + virtual void invoke(void) {(*myFunc)(myP1, myP2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(*myFunc)(p1, myP2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(*myFunc)(p1, p2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(*myFunc)(p1, p2, p3);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + +protected: + + void (*myFunc)(P1, P2, P3); + P1 myP1; + P2 myP2; + P3 myP3; +}; + + + + + +/// Functor for a global function with 4 parameters +/** + This is a class for global functions which take 4 parameters. This ties + a C style function pointer into the functor class hierarchy as a + convience. Code that has a reference to this class and treat it as + an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalFunctor4 : public ArFunctor4 +{ +public: + + /// Constructor + ArGlobalFunctor4() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalFunctor4(void (*func)(P1, P2, P3, P4)) : + myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalFunctor4(void (*func)(P1, P2, P3, P4), P1 p1) : + myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalFunctor4(void (*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArGlobalFunctor4(void (*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArGlobalFunctor4(void (*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + /// Destructor + virtual ~ArGlobalFunctor4() {} + + /// Invokes the functor + virtual void invoke(void) {(*myFunc)(myP1, myP2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(*myFunc)(p1, myP2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(*myFunc)(p1, p2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(*myFunc)(p1, p2, p3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) {(*myFunc)(p1, p2, p3, p4);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + +protected: + + void (*myFunc)(P1, P2, P3, P4); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; +}; + + +/// Functor for a global function with 5 parameters +/** + This is a class for global functions which take 5 parameters. This ties + a C style function pointer into the functor class hierarchy as a + convience. Code that has a reference to this class and treat it as + an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalFunctor5 : public ArFunctor5 +{ +public: + + /// Constructor + ArGlobalFunctor5() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalFunctor5(void (*func)(P1, P2, P3, P4, P5)) : + myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalFunctor5(void (*func)(P1, P2, P3, P4, P5), P1 p1) : + myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalFunctor5(void (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArGlobalFunctor5(void (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArGlobalFunctor5(void (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArGlobalFunctor5(void (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + /// Destructor + virtual ~ArGlobalFunctor5() {} + + /// Invokes the functor + virtual void invoke(void) {(*myFunc)(myP1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(*myFunc)(p1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(*myFunc)(p1, p2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(*myFunc)(p1, p2, p3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) {(*myFunc)(p1, p2, p3, p4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p5 fifth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {(*myFunc)(p1, p2, p3, p4, p5);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + /// Set the default fifth parameter + /** + @param p4 default fifth parameter + */ + virtual void setP5(P5 p5) {myP5=p5;} + +protected: + + void (*myFunc)(P1, P2, P3, P4, P5); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; + P5 myP5; +}; + +#endif // Omitting ArGlobalFunctor from Swig + + + + +////// +////// +////// +////// +////// +////// +////// ArFunctors for global functions, C style function pointers with return +////// return values. +////// +////// +////// +////// +////// +////// + +#ifndef SWIG + +/// Functor for a global function with return value +/** + This is a class for global functions which return a value. This ties + a C style function pointer into the functor class hierarchy as a + convience. Code that has a reference to this class and treat it as + an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalRetFunctor : public ArRetFunctor +{ +public: + + /// Constructor + ArGlobalRetFunctor() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalRetFunctor(Ret (*func)(void)) : myFunc(func) {} + + /// Destructor + virtual ~ArGlobalRetFunctor() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (*myFunc)();} + +protected: + + Ret (*myFunc)(void); +}; + + +/// Functor for a global function with 1 parameter and return value +/** + This is a class for global functions which take 1 parameter and return + a value. This ties a C style function pointer into the functor class + hierarchy as a convience. Code that has a reference to this class + and treat it as an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalRetFunctor1 : public ArRetFunctor1 +{ +public: + + /// Constructor + ArGlobalRetFunctor1() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalRetFunctor1(Ret (*func)(P1)) : + myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalRetFunctor1(Ret (*func)(P1), P1 p1) : + myFunc(func), myP1(p1) {} + + /// Destructor + virtual ~ArGlobalRetFunctor1() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (*myFunc)(myP1);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (*myFunc)(p1);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + +protected: + + Ret (*myFunc)(P1); + P1 myP1; +}; + +/// Functor for a global function with 2 parameters and return value +/** + This is a class for global functions which take 2 parameters and return + a value. This ties a C style function pointer into the functor class + hierarchy as a convience. Code that has a reference to this class + and treat it as an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalRetFunctor2 : public ArRetFunctor2 +{ +public: + + /// Constructor + ArGlobalRetFunctor2() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalRetFunctor2(Ret (*func)(P1, P2)) : + myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalRetFunctor2(Ret (*func)(P1, P2), P1 p1) : + myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalRetFunctor2(Ret (*func)(P1, P2), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2) {} + + /// Destructor + virtual ~ArGlobalRetFunctor2() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (*myFunc)(myP1, myP2);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (*myFunc)(p1, myP2);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (*myFunc)(p1, p2);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + +protected: + + Ret (*myFunc)(P1, P2); + P1 myP1; + P2 myP2; +}; + +/// Functor for a global function with 2 parameters and return value +/** + This is a class for global functions which take 2 parameters and return + a value. This ties a C style function pointer into the functor class + hierarchy as a convience. Code that has a reference to this class + and treat it as an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalRetFunctor3 : public ArRetFunctor3 +{ +public: + + /// Constructor + ArGlobalRetFunctor3() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalRetFunctor3(Ret (*func)(P1, P2, P3)) : + myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalRetFunctor3(Ret (*func)(P1, P2, P3), P1 p1) : + myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalRetFunctor3(Ret (*func)(P1, P2, P3), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArGlobalRetFunctor3(Ret (*func)(P1, P2, P3), P1 p1, P2 p2, P3 p3) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Destructor + virtual ~ArGlobalRetFunctor3() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (*myFunc)(myP1, myP2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (*myFunc)(p1, myP2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (*myFunc)(p1, p2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) {return (*myFunc)(p1, p2, p3);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + + +protected: + + Ret (*myFunc)(P1, P2, P3); + P1 myP1; + P2 myP2; + P3 myP3; +}; + + + +/// Functor for a global function with 4 parameters and return value +/** + This is a class for global functions which take 4 parameters and return + a value. This ties a C style function pointer into the functor class + hierarchy as a convience. Code that has a reference to this class + and treat it as an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalRetFunctor4 : public ArRetFunctor4 +{ +public: + + /// Constructor + ArGlobalRetFunctor4() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalRetFunctor4(Ret (*func)(P1, P2, P3, P4)) : + myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalRetFunctor4(Ret (*func)(P1, P2, P3, P4), P1 p1) : + myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalRetFunctor4(Ret (*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArGlobalRetFunctor4(Ret (*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArGlobalRetFunctor4(Ret (*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + /// Destructor + virtual ~ArGlobalRetFunctor4() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (*myFunc)(myP1, myP2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (*myFunc)(p1, myP2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (*myFunc)(p1, p2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) {return (*myFunc)(p1, p2, p3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) {return (*myFunc)(p1, p2, p3, p4);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + +protected: + + Ret (*myFunc)(P1, P2, P3, P4); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; +}; + + +/// Functor for a global function with 5 parameters and return value +/** + This is a class for global functions which take 5 parameters and return + a value. This ties a C style function pointer into the functor class + hierarchy as a convience. Code that has a reference to this class + and treat it as an ArFunctor can use it like any other functor. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArGlobalRetFunctor5 : public ArRetFunctor5 +{ +public: + + /// Constructor + ArGlobalRetFunctor5() {} + + /// Constructor - supply function pointer + /** + @param func global function pointer + */ + ArGlobalRetFunctor5(Ret (*func)(P1, P2, P3, P4, P5)) : + myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + */ + ArGlobalRetFunctor5(Ret (*func)(P1, P2, P3, P4, P5), P1 p1) : + myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArGlobalRetFunctor5(Ret (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArGlobalRetFunctor5(Ret (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArGlobalRetFunctor5(Ret (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + /** + @param func global function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArGlobalRetFunctor5(Ret (*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + /// Destructor + virtual ~ArGlobalRetFunctor5() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (*myFunc)(myP1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (*myFunc)(p1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (*myFunc)(p1, p2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) {return (*myFunc)(p1, p2, p3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) {return (*myFunc)(p1, p2, p3, p4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p5 fifth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {return (*myFunc)(p1, p2, p3, p4, p5);} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + /// Set the default fifth parameter + /** + @param p4 default fifth parameter + */ + virtual void setP5(P5 p5) {myP5=p5;} + +protected: + + Ret (*myFunc)(P1, P2, P3, P4, P5); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; + P5 myP5; +}; + +#endif // omitting ArGlobalRetFunctor from SWIG + + + + +////// +////// +////// +////// +////// +////// +////// ArFunctors for member functions +////// +////// +////// +////// +////// +////// + + +/// Functor for a member function +/** + This is a class for member functions. This class contains the knowledge + on how to call a member function on a particular instance of a class. + This class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctorC : public ArFunctor +{ +public: + + /// Constructor + ArFunctorC() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctorC(T &obj, void (T::*func)(void)) : myObj(&obj), myFunc(func) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctorC(T *obj, void (T::*func)(void)) : myObj(obj), myFunc(func) {} + + /// Destructor + virtual ~ArFunctorC() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)();} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + +protected: + + T *myObj; + void (T::*myFunc)(void); +}; + + +/// Functor for a member function with 1 parameter +/** + This is a class for member functions which take 1 parameter. This class + contains the knowledge on how to call a member function on a particular + instance of a class. This class should be instantiated by code that + wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor1C : public ArFunctor1 +{ +public: + + /// Constructor + ArFunctor1C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor1C(T &obj, void (T::*func)(P1)) : + myObj(&obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor1C(T &obj, void (T::*func)(P1), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor1C(T *obj, void (T::*func)(P1)) : + myObj(obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor1C(T *obj, void (T::*func)(P1), P1 p1) : + myObj(obj), myFunc(func), myP1(p1) {} + + /// Destructor + virtual ~ArFunctor1C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + +protected: + + T *myObj; + void (T::*myFunc)(P1); + P1 myP1; +}; + + +/// Functor for a member function with 2 parameters +/** + This is a class for member functions which take 2 parameters. This class + contains the knowledge on how to call a member function on a particular + instance of a class. This class should be instantiated by code that + wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor2C : public ArFunctor2 +{ +public: + + /// Constructor + ArFunctor2C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor2C(T &obj, void (T::*func)(P1, P2)) : + myObj(&obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor2C(T &obj, void (T::*func)(P1, P2), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor2C(T &obj, void (T::*func)(P1, P2), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor2C(T *obj, void (T::*func)(P1, P2)) : + myObj(obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor2C(T *obj, void (T::*func)(P1, P2), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor2C(T *obj, void (T::*func)(P1, P2), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Destructor + virtual ~ArFunctor2C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2); + P1 myP1; + P2 myP2; +}; + +/// Functor for a member function with 3 parameters +/** + This is a class for member functions which take 3 parameters. This class + contains the knowledge on how to call a member function on a particular + instance of a class. This class should be instantiated by code that + wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor3C : public ArFunctor3 +{ +public: + + /// Constructor + ArFunctor3C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor3C(T &obj, void (T::*func)(P1, P2, P3)) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor3C(T &obj, void (T::*func)(P1, P2, P3), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor3C(T &obj, void (T::*func)(P1, P2, P3), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArFunctor3C(T &obj, void (T::*func)(P1, P2, P3), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor3C(T *obj, void (T::*func)(P1, P2, P3)) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor3C(T *obj, void (T::*func)(P1, P2, P3), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor3C(T *obj, void (T::*func)(P1, P2, P3), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArFunctor3C(T *obj, void (T::*func)(P1, P2, P3), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Destructor + virtual ~ArFunctor3C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(myObj->*myFunc)(p1, p2, p3);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2, P3); + P1 myP1; + P2 myP2; + P3 myP3; +}; + + + +/// Functor for a member function with 4 parameters +/** + This is a class for member functions which take 4 parameters. This class + contains the knowledge on how to call a member function on a particular + instance of a class. This class should be instantiated by code that + wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor4C : public ArFunctor4 +{ +public: + + /// Constructor + ArFunctor4C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4)) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4)) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + + /// Destructor + virtual ~ArFunctor4C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(myObj->*myFunc)(p1, p2, p3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) {(myObj->*myFunc)(p1, p2, p3, p4);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2, P3, P4); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; +}; + + +/// Functor for a member function with 5 parameters +/** + This is a class for member functions which take 5 parameters. This class + contains the knowledge on how to call a member function on a particular + instance of a class. This class should be instantiated by code that + wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArFunctor5C : public ArFunctor5 +{ +public: + + /// Constructor + ArFunctor5C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5)) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ +ArFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5)) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + + /// Destructor + virtual ~ArFunctor5C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(myObj->*myFunc)(p1, p2, p3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) {(myObj->*myFunc)(p1, p2, p3, p4, myP5);} + + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p5 fifth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {(myObj->*myFunc)(p1, p2, p3, p4, p5);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + /// Set the default fifth parameter + /** + @param p4 default fifth parameter + */ + virtual void setP5(P5 p5) {myP5=p5;} + + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2, P3, P4, P5); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; + P5 myP5; +}; + + + + + + +////// +////// +////// +////// +////// +////// +////// ArFunctors for member functions with return values +////// +////// +////// +////// +////// +////// + + +/// Functor for a member function with return value +/** + This is a class for member functions which return a value. This class + contains the knowledge on how to call a member function on a particular + instance of a class. This class should be instantiated by code that + wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctorC : public ArRetFunctor +{ +public: + + /// Constructor + ArRetFunctorC() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctorC(T &obj, Ret (T::*func)(void)) : myObj(&obj), myFunc(func) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctorC(T *obj, Ret (T::*func)(void)) : myObj(obj), myFunc(func) {} + + /// Destructor - supply function pointer + virtual ~ArRetFunctorC() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)();} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + +protected: + + T *myObj; + Ret (T::*myFunc)(void); +}; + +/// Functor for a member function with return value and 1 parameter +/** + This is a class for member functions which take 1 parameter and return + a value. This class contains the knowledge on how to call a member + function on a particular instance of a class. This class should be + instantiated by code that wishes to pass off a functor to another + piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor1C : public ArRetFunctor1 +{ +public: + + /// Constructor + ArRetFunctor1C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor1C(T &obj, Ret (T::*func)(P1)) : + myObj(&obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor1C(T &obj, Ret (T::*func)(P1), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor1C(T *obj, Ret (T::*func)(P1)) : + myObj(obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor1C(T *obj, Ret (T::*func)(P1), P1 p1) : + myObj(obj), myFunc(func), myP1(p1) {} + + /// Destructor + virtual ~ArRetFunctor1C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1); + P1 myP1; +}; + +/// Functor for a member function with return value and 2 parameters +/** + This is a class for member functions which take 2 parameters and return + a value. This class contains the knowledge on how to call a member + function on a particular instance of a class. This class should be + instantiated by code that wishes to pass off a functor to another + piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor2C : public ArRetFunctor2 +{ +public: + + /// Constructor + ArRetFunctor2C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor2C(T &obj, Ret (T::*func)(P1, P2)) : + myObj(&obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor2C(T &obj, Ret (T::*func)(P1, P2), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor2C(T &obj, Ret (T::*func)(P1, P2), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor2C(T *obj, Ret (T::*func)(P1, P2)) : + myObj(obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor2C(T *obj, Ret (T::*func)(P1, P2), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor2C(T *obj, Ret (T::*func)(P1, P2), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Destructor + virtual ~ArRetFunctor2C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2); + P1 myP1; + P2 myP2; +}; + +/// Functor for a member function with return value and 3 parameters +/** + This is a class for member functions which take 3 parameters and return + a value. This class contains the knowledge on how to call a member + function on a particular instance of a class. This class should be + instantiated by code that wishes to pass off a functor to another + piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor3C : public ArRetFunctor3 +{ +public: + + /// Constructor + ArRetFunctor3C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3)) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3)) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Destructor + virtual ~ArRetFunctor3C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) + {return (myObj->*myFunc)(p1, p2, p3);} + + /// Set the 'this' pointer + /** + @param obj object to call function on + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj object to call function on + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2, P3); + P1 myP1; + P2 myP2; + P3 myP3; +}; + + + + +// Start 4 + + +/// Functor for a member function with return value and 4 parameters +/** + This is a class for member functions which take 4 parameters and return + a value. This class contains the knowledge on how to call a member + function on a particular instance of a class. This class should be + instantiated by code that wishes to pass off a functor to another + piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor4C : public ArRetFunctor4 +{ +public: + + /// Constructor + ArRetFunctor4C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4)) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4)) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + /// Destructor + virtual ~ArRetFunctor4C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) + {return (myObj->*myFunc)(p1, p2, p3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) + {return (myObj->*myFunc)(p1, p2, p3, p4);} + + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2, P3, P4); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; +}; + + + +/// Functor for a member function with return value and 5 parameters +/** + This is a class for member functions which take 5 parameters and return + a value. This class contains the knowledge on how to call a member + function on a particular instance of a class. This class should be + instantiated by code that wishes to pass off a functor to another + piece of code. + + For an overall description of functors, see ArFunctor. +*/ +template +class ArRetFunctor5C : public ArRetFunctor5 +{ +public: + + /// Constructor + ArRetFunctor5C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5)) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func member function pointer + */ + ArRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5)) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + */ + ArRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + /// Destructor + virtual ~ArRetFunctor5C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) + {return (myObj->*myFunc)(p1, p2, p3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) + {return (myObj->*myFunc)(p1, p2, p3, p4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p5 fifth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) + {return (myObj->*myFunc)(p1, p2, p3, p4, p5);} + + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + /// Set the default fifth parameter + /** + @param p4 default fifth parameter + */ + virtual void setP5(P5 p5) {myP5=p5;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2, P3, P4, P5); + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; + P4 myP5; +}; + + +/// Swig doesn't like the const functors +#ifndef SWIG + +////// +////// +////// +////// +////// +////// +////// ArFunctors for const member functions +////// +////// +////// +////// +////// +////// + + +/// Functor for a const member function +/** + This is a class for const member functions. This class contains the + knowledge on how to call a const member function on a particular + instance of a class. This class should be instantiated by code + that wishes to pass off a functor to another piece of code. + + For an overall description of functors, see ArFunctor. + + @swigomit +*/ +template +class ArConstFunctorC : public ArFunctor +{ +public: + + /// Constructor + ArConstFunctorC() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctorC(T &obj, void (T::*func)(void) const) : myObj(&obj), myFunc(func) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctorC(T *obj, void (T::*func)(void) const) : myObj(obj), myFunc(func) {} + + /// Destructor + virtual ~ArConstFunctorC() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)();} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + +protected: + + T *myObj; + void (T::*myFunc)(void) const; +}; + + +/// Functor for a const member function with 1 parameter +/** + This is a class for const member functions which take 1 + parameter. This class contains the knowledge on how to call a const + member function on a particular instance of a class. This class + should be instantiated by code that wishes to pass off a functor to + another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstFunctor1C : public ArFunctor1 +{ +public: + + /// Constructor + ArConstFunctor1C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor1C(T &obj, void (T::*func)(P1) const) : + myObj(&obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor1C(T &obj, void (T::*func)(P1) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor1C(T *obj, void (T::*func)(P1) const) : + myObj(obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor1C(T *obj, void (T::*func)(P1) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1) {} + + /// Destructor + virtual ~ArConstFunctor1C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + +protected: + + T *myObj; + void (T::*myFunc)(P1) const; + P1 myP1; +}; + + +/// Functor for a const member function with 2 parameters +/** + This is a class for const member functions which take 2 + parameters. This class contains the knowledge on how to call a + const member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstFunctor2C : public ArFunctor2 +{ +public: + + /// Constructor + ArConstFunctor2C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor2C(T &obj, void (T::*func)(P1, P2) const) : + myObj(&obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor2C(T &obj, void (T::*func)(P1, P2) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor2C(T &obj, void (T::*func)(P1, P2) const, P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor2C(T *obj, void (T::*func)(P1, P2) const) : + myObj(obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor2C(T *obj, void (T::*func)(P1, P2) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor2C(T *obj, void (T::*func)(P1, P2) const, P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Destructor + virtual ~ArConstFunctor2C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2) const; + P1 myP1; + P2 myP2; +}; + +/// Functor for a const member function with 3 parameters +/** + This is a class for const member functions which take 3 + parameters. This class contains the knowledge on how to call a + const member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstFunctor3C : public ArFunctor3 +{ +public: + + /// Constructor + ArConstFunctor3C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor3C(T &obj, void (T::*func)(P1, P2, P3) const) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor3C(T &obj, void (T::*func)(P1, P2, P3) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor3C(T &obj, void (T::*func)(P1, P2, P3) const, P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstFunctor3C(T &obj, void (T::*func)(P1, P2, P3) const, P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor3C(T *obj, void (T::*func)(P1, P2, P3) const) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor3C(T *obj, void (T::*func)(P1, P2, P3) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor3C(T *obj, void (T::*func)(P1, P2, P3) const, P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstFunctor3C(T *obj, void (T::*func)(P1, P2, P3) const, P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Destructor + virtual ~ArConstFunctor3C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2, myP3);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(myObj->*myFunc)(p1, p2, p3);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2, P3) const; + P1 myP1; + P2 myP2; + P3 myP3; +}; + + + +/// Functor for a const member function with 4 parameters +/** + This is a class for const member functions which take 4 + parameters. This class contains the knowledge on how to call a + const member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstFunctor4C : public ArFunctor4 +{ +public: + + /// Constructor + ArConstFunctor4C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4) const) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstFunctor4C(T &obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4) const) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstFunctor4C(T *obj, void (T::*func)(P1, P2, P3, P4), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + + /// Destructor + virtual ~ArConstFunctor4C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2, myP3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(myObj->*myFunc)(p1, p2, p3, myP4);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) {(myObj->*myFunc)(p1, p2, p3, p4);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2, P3, P4) const; + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; +}; + +/// Functor for a const member function with 5 parameters +/** + This is a class for const member functions which take 5 + parameters. This class contains the knowledge on how to call a + const member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstFunctor5C : public ArFunctor5 +{ +public: + + /// Constructor + ArConstFunctor5C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5) const) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArConstFunctor5C(T &obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5) const) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArConstFunctor5C(T *obj, void (T::*func)(P1, P2, P3, P4, P5), P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + + /// Destructor + virtual ~ArConstFunctor5C() {} + + /// Invokes the functor + virtual void invoke(void) {(myObj->*myFunc)(myP1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + */ + virtual void invoke(P1 p1) {(myObj->*myFunc)(p1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual void invoke(P1 p1, P2 p2) {(myObj->*myFunc)(p1, p2, myP3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3) {(myObj->*myFunc)(p1, p2, p3, myP4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4) {(myObj->*myFunc)(p1, p2, p3, p4, myP5);} + + /// Invokes the functor + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p5 fifth parameter + */ + virtual void invoke(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {(myObj->*myFunc)(p1, p2, p3, p4, p5);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + /// Set the default fifth parameter + /** + @param p5 default fifth parameter + */ + virtual void setP5(P5 p5) {myP5=p5;} + + +protected: + + T *myObj; + void (T::*myFunc)(P1, P2, P3, P4, P5) const; + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; + P4 myP5; +}; + + + + + + +////// +////// +////// +////// +////// +////// +////// ArFunctors for const member functions with return values +////// +////// +////// +////// +////// +////// + + +/// Functor for a const member function with return value +/** + This is a class for const member functions which return a + value. This class contains the knowledge on how to call a const + member function on a particular instance of a class. This class + should be instantiated by code that wishes to pass off a functor to + another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstRetFunctorC : public ArRetFunctor +{ +public: + + /// Constructor + ArConstRetFunctorC() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctorC(T &obj, Ret (T::*func)(void) const) : myObj(&obj), myFunc(func) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctorC(T *obj, Ret (T::*func)(void) const) : myObj(obj), myFunc(func) {} + + /// Destructor - supply function pointer + virtual ~ArConstRetFunctorC() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)();} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + +protected: + + T *myObj; + Ret (T::*myFunc)(void) const; +}; + +/// Functor for a const member function with return value and 1 parameter +/** + This is a class for const member functions which take 1 parameter + and return a value. This class contains the knowledge on how to + call a member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstRetFunctor1C : public ArRetFunctor1 +{ +public: + + /// Constructor + ArConstRetFunctor1C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor1C(T &obj, Ret (T::*func)(P1) const) : + myObj(&obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor1C(T &obj, Ret (T::*func)(P1) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor1C(T *obj, Ret (T::*func)(P1) const) : + myObj(obj), myFunc(func), myP1() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor1C(T *obj, Ret (T::*func)(P1) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1) {} + + /// Destructor + virtual ~ArConstRetFunctor1C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1) const; + P1 myP1; +}; + +/// Functor for a const member function with return value and 2 parameters +/** + This is a class for const member functions which take 2 parameters + and return a value. This class contains the knowledge on how to + call a member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstRetFunctor2C : public ArRetFunctor2 +{ +public: + + /// Constructor + ArConstRetFunctor2C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor2C(T &obj, Ret (T::*func)(P1, P2) const) : + myObj(&obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor2C(T &obj, Ret (T::*func)(P1, P2) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor2C(T &obj, Ret (T::*func)(P1, P2) const, P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor2C(T *obj, Ret (T::*func)(P1, P2) const) : + myObj(obj), myFunc(func), myP1(), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor2C(T *obj, Ret (T::*func)(P1, P2) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor2C(T *obj, Ret (T::*func)(P1, P2) const, P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2) {} + + /// Destructor + virtual ~ArConstRetFunctor2C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2) const; + P1 myP1; + P2 myP2; +}; + +/// Functor for a const member function with return value and 3 parameters +/** + This is a class for const member functions which take 3 parameters + and return a value. This class contains the knowledge on how to + call a member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstRetFunctor3C : public ArRetFunctor3 +{ +public: + + /// Constructor + ArConstRetFunctor3C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3) const) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3) const, P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstRetFunctor3C(T &obj, Ret (T::*func)(P1, P2, P3) const, P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3) const) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3) const, P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstRetFunctor3C(T *obj, Ret (T::*func)(P1, P2, P3) const, P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3) {} + + /// Destructor + virtual ~ArConstRetFunctor3C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2, myP3);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) + {return (myObj->*myFunc)(p1, p2, p3);} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2, P3) const; + P1 myP1; + P2 myP2; + P3 myP3; +}; + + + + +// Start 4 + + +/// Functor for a const member function with return value and 4 parameters +/** + This is a class for const member functions which take 4 parameters + and return a value. This class contains the knowledge on how to + call a member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstRetFunctor4C : public ArRetFunctor4 +{ +public: + + /// Constructor + ArConstRetFunctor4C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4) const) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstRetFunctor4C(T &obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4) const) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstRetFunctor4C(T *obj, Ret (T::*func)(P1, P2, P3, P4) const, P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4) {} + + /// Destructor + virtual ~ArConstRetFunctor4C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2, myP3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) + {return (myObj->*myFunc)(p1, p2, p3, myP4);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) + {return (myObj->*myFunc)(p1, p2, p3, p4);} + + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2, P3, P4) const; + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; +}; + + + + +/// Functor for a const member function with return value and 5 parameters +/** + This is a class for const member functions which take 5 parameters + and return a value. This class contains the knowledge on how to + call a member function on a particular instance of a class. This + class should be instantiated by code that wishes to pass off a + functor to another piece of code. + + For an overall description of functors, see ArFunctor. */ +template +class ArConstRetFunctor5C : public ArRetFunctor5 +{ +public: + + /// Constructor + ArConstRetFunctor5C() {} + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5) const) : + myObj(&obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1) : + myObj(&obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2, P3 p3) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArConstRetFunctor5C(T &obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(&obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + + + /// Constructor - supply function pointer + /** + @param obj object to call function on + @param func const member function pointer + */ + ArConstRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5) const) : + myObj(obj), myFunc(func), myP1(), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + */ + ArConstRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1) : + myObj(obj), myFunc(func), myP1(p1), myP2(), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + */ + ArConstRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + */ + ArConstRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2, P3 p3) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(), myP5() {} + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + */ + ArConstRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2, P3 p3, P4 p4) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5() {} + + + /// Constructor - supply function pointer, default parameters + /** + @param obj object to call function on + @param func const member function pointer + @param p1 default first parameter + @param p2 default second parameter + @param p3 default third parameter + @param p4 default fourth parameter + @param p5 default fifth parameter + */ + ArConstRetFunctor5C(T *obj, Ret (T::*func)(P1, P2, P3, P4, P5) const, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) : + myObj(obj), myFunc(func), myP1(p1), myP2(p2), myP3(p3), myP4(p4), myP5(p5) {} + + /// Destructor + virtual ~ArConstRetFunctor5C() {} + + /// Invokes the functor with return value + virtual Ret invokeR(void) {return (myObj->*myFunc)(myP1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + */ + virtual Ret invokeR(P1 p1) {return (myObj->*myFunc)(p1, myP2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2) {return (myObj->*myFunc)(p1, p2, myP3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 second parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3) + {return (myObj->*myFunc)(p1, p2, p3, myP4, myP5);} + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4) + {return (myObj->*myFunc)(p1, p2, p3, p4, myP5);} + + + /// Invokes the functor with return value + /** + @param p1 first parameter + @param p2 second parameter + @param p3 third parameter + @param p4 fourth parameter + @param p5 fifth parameter + */ + virtual Ret invokeR(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) + {return (myObj->*myFunc)(p1, p2, p3, p4, p5);} + + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T *obj) {myObj=obj;} + + /// Set the 'this' pointer + /** + @param obj the 'this' pointer + */ + virtual void setThis(T &obj) {myObj=&obj;} + + /// Set the default parameter + /** + @param p1 default first parameter + */ + virtual void setP1(P1 p1) {myP1=p1;} + + /// Set the default 2nd parameter + /** + @param p2 default second parameter + */ + virtual void setP2(P2 p2) {myP2=p2;} + + /// Set the default third parameter + /** + @param p3 default third parameter + */ + virtual void setP3(P3 p3) {myP3=p3;} + + /// Set the default fourth parameter + /** + @param p4 default fourth parameter + */ + virtual void setP4(P4 p4) {myP4=p4;} + + /// Set the default fifth parameter + /** + @param p5 default fifth parameter + */ + virtual void setP5(P5 p5) {myP5=p5;} + +protected: + + T *myObj; + Ret (T::*myFunc)(P1, P2, P3, P4, P5) const; + P1 myP1; + P2 myP2; + P3 myP3; + P4 myP4; + P5 myP5; +}; + + +#endif // omitting Const functors from SWIG + + + +#endif // ARFUNCTOR_H + + diff --git a/Legacy/Aria/include/ArFunctorASyncTask.h b/Legacy/Aria/include/ArFunctorASyncTask.h new file mode 100644 index 0000000..9371006 --- /dev/null +++ b/Legacy/Aria/include/ArFunctorASyncTask.h @@ -0,0 +1,47 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARFUNCTORASYNCTASK_H +#define ARFUNCTORASYNCTASK_H + +#include "ariaTypedefs.h" +#include "ArASyncTask.h" +#include "ArFunctor.h" + +/// This is like ArASyncTask, but instead of runThread it uses a functor to run +class ArFunctorASyncTask : public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArFunctorASyncTask(ArRetFunctor1 *functor); + /// Destructor + AREXPORT virtual ~ArFunctorASyncTask(); + /// Our reimplementation of runThread + AREXPORT virtual void *runThread(void *arg); +protected: + ArRetFunctor1 *myFunc; +}; + +#endif diff --git a/Legacy/Aria/include/ArGPS.h b/Legacy/Aria/include/ArGPS.h new file mode 100644 index 0000000..bf41e87 --- /dev/null +++ b/Legacy/Aria/include/ArGPS.h @@ -0,0 +1,623 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARGPS_H +#define ARGPS_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ariaUtil.h" +#include "ArMutex.h" +#include "ArNMEAParser.h" +#include +#include +#include + +class ArDeviceConnection; // for pointer in ArGPS + +/** @brief GPS Device Interface + * + * Connects to GPS device over a serial port or other device connection and reads data. + * Supports GPS devices sending standard NMEA format data + * (specifically the GPRMC, GPGGA, GPGSA, GPGRME, and optionally GPGSV, PGRMZ, PGRME, + * HCHDG/T/M and GPHDG/T/M messages). + * If your GPS device supports several data formats or modes, select + * NMEA output in its configuration. + * + * The preferred method of creating and setting up a new ArGPS object is to use + * ArGPSConnector, which creates an instance of ArGPS or a subclass, and + * creates and opens its device connection, based on command-line parameters. + * (To manually create an ArGPS object, create an ArDeviceConnection instance + * and call setDeviceConnection(), then open that device connection and call + * connect(). + * + * For either method, to get new data from the GPS, must call read() or readWithLock() periodically, + * ideally at a rate equal to or faster than your GPS sends data (usually one second). + * You can do this from a Sensor Intetrpretation Task in ArRobot, or a seperate thread. + * If you are calling read() from a loop in a new thread, + * + * Here is an example of calling readWithLock() from a sensor interpretation + * task. The integer argument given to the functor constructor is a milisecond timeout that + * is passed to readWithLock() and prevents it from blocking too long if it doesn't read any data. + * It is important to do this in a robot task, or the robot task cycle will be + * blocked and cause problems. + * @code + * ArRetFunctor1C gpsReadFunc(myGPS, &ArGPS::readWithLock, 10); + * myRobot->addSensorInterpretationTask("GPS read", 100, &gpsReadFunc); + * @endcode + * + * If you use your own loop or thread, then it ought to include a call to ArUtil::sleep() for at least several hundred + * miliseconds to avoid starving other threads, since read() will return + * immediately if there is no data to read rather than blocking. + * + * For each piece of data provided by this class, there is a flag indicating + * whether it was received from the GPS and set. Not all GPS models return all + * kinds of information, or it may be disabled in some way in a GPS's internal + * configuration, or the GPS may not yet have started sending the data (e.g. + * still acquiring satellites). Also, not all data will be received by one call to read(), + * and especially immediately after connecting and starting to read data, it + * may take a few seconds for data to be obtained. Furthermore, it may take + * some time for the GPS to calculate data with full accuracy. + * + * @sa @ref gpsExample.cpp + * @sa @ref gpsRobotTaskExample.cpp + * + * This class is not inherently thread safe. Stored data is updated by read(), so + * if accessing from multiple threads, call lock() before calling any data + * accessor methods (methods starting with "get"), or read(), and call unlock() + * when done. You can also call readWithLock() to do a locked read in one + * function call. + * + * @note ArGPS only provides access to the data reported by a GPS. The position + * reported by a GPS is in degrees on the surface of the earth (WGS84 datum), not in the + * cartesian coordinate system used by the robot odometry or ArMap. You can use + * the subclasses of Ar3DPoint (ArLLACoords, etc) to convert between different + * geographical coordinate systems, which may help you match GPS coordinates to + * the robot pose coordinate system. + + @ingroup OptionalClasses + @ingroup DeviceClasses + */ +class ArGPS { + +public: + AREXPORT ArGPS(); + + virtual ~ArGPS() { } + + /** @brief Set device connection to use */ + void setDeviceConnection(ArDeviceConnection* deviceConn) { myDevice = deviceConn; } + + /** @brief Return device connection in use (or NULL if none) */ + ArDeviceConnection* getDeviceConnection() const { return myDevice; } + + + /** @brief Check that the device connection (e.g. serial port) is open, and + * that data is being received from GPS. + * + * Subclasses may override this method so that device-specific + * initialization commands may be sent. + * + * @return false if there is no device connection or the device connection + * is not open, or if there is an error sending device initialization + * commands, or if no data is received after calling read() every 100 ms + * for @a connectTimeout ms. Otherwise, return true. + * + * @sa blockingConnect() + */ + AREXPORT virtual bool connect(unsigned long connectTimeout = 20000); + + /** Same as connect(). See connect(). */ + bool blockingConnect(unsigned long connectTimeout = 20000) { return connect(connectTimeout); } + +protected: + /** Block until data is read from GPS. + Waits by calling read() every 100 ms for @a timeout ms. + */ + AREXPORT bool waitForData(unsigned long timeout); + + /** Subclasses may override to send device initialization/configuration + * commands and set up device-specific message handlers. (Default behavior + * is to do nothing and return true.) + */ + virtual bool initDevice() { return true; } + +public: + + + /** @brief Flags to indicates what the read() method did. + * i.e. If nothing was done, then the + * result will be 0. To check a read() return result @a result to see if data was updated, use + * (result & ReadUpdated). To check if there was an error, use (result & + * ReadError). + * + * These happen to match the flags in ArNMEAParser. + */ + enum { + ReadFinished = ArNMEAParser::ParseFinished, + ReadError = ArNMEAParser::ParseError, + ReadData = ArNMEAParser::ParseData, + ReadUpdated = ArNMEAParser::ParseUpdated + } ReadFlags; + + /** @brief Read some data from the device connection, and update stored data as complete messages are received. + * @param maxTime If nonzero, return when this time limit is reached, even if there is still data available to read. If zero, then don't return until all available data has been exhausted or an error occurs. + * Be careful setting this parameter to 0: read() could block for + * an arbitrary amount of time, even forever if for some reason data is recieved from + * the device faster than read() can read and parse it. + * @return A mask of ReadFlags codes, combined with bitwise or (|), or 0 if no attempt to read from the device occured (for example because the @a maxTime timeout was reached before the first attempt to read occured). The flags will include + * ReadError if there was as error reading from the device connection, + * ReadData if some data was read, + * ReadUpdated if data was read and a full message was successfully read and + * stored data was updated in ArGPS, + * ReadFinished if all available data was read. + */ + AREXPORT virtual int read(unsigned long maxTime = 0); + + /** Calls lock(), calls read(maxTime), then calls unlock(). Note, this could + * end up keeping ArGPS locked until @a maxTime is reached, or for any amount + * of time if @a maxTime is 0, so watch out for that. */ + int readWithLock(unsigned int maxTime) { lock(); int r = read(maxTime); unlock(); return r; } + + /** Locks a mutex object contained by this class. + * No other method (except readWithLock()) in ArGPS locks or unlocks this + * mutex, it is provided for you to use when accessing ArGPS from multiple + * threads. + */ + void lock() { myMutex.lock(); } + + /** Unlocks a mutex object contained by this class. + * No other method (except readWithLock()) in ArGPS locks or unlocks this + * mutex, it is provided for you to use when accessing ArGPS from multiple + * threads. + */ + void unlock() { myMutex.unlock(); } + + + /** @brief Set whether checksum sent with NMEA messages is ignored */ + void setIgnoreChecksum(bool ignore) { myNMEAParser.setIgnoreChecksum(ignore); } + + /** @brief Log last received data using ArLog. */ + AREXPORT void logData() const; + + /** Print basic navigation data on one line to standard output, with no newline at end. */ + AREXPORT void printData(bool labels = true) const; + + AREXPORT void printDataLabelsHeader() const; + + /** Data accessors + * @brief Access the last received data from the GPS */ + // @{ + + typedef enum { + NoFix, BadFix, GPSFix, DGPSFix, PPSFix, + RTKinFix, FloatRTKinFix, DeadReckFix, + ManualFix, SimulatedFix, UnknownFixType, + OmnistarConverging = FloatRTKinFix, + OmnistarConverged = RTKinFix + } FixType; + + class Data { + public: + AREXPORT Data(); + double latitude; ///< (from NMEA GPRMC) + double longitude; ///< (from NMEA GPRMC) + bool havePosition; ///< (from NMEA GPRMC) + ArTime timeGotPosition; ///< Local computer time when ArGPS class received the position message from the GPS. (From NMEA GPRMC) + double speed; ///< (From NMEA GPRMC, if provided) + bool haveSpeed; ///< (From NMEA GPRMC) + ArTime GPSPositionTimestamp; ///< Timestamp provided by GPS device along with latitude and longitude. (from NMEA GPRMC) + ArGPS::FixType fixType; ///< (from NMEA GPGGA) + unsigned short numSatellitesTracked; + double altitude; ///< receiver provides this based on GPS data. meters above sea level. (from NMEA GPGGA) + bool haveAltitude; //< (from NMEA GPGGA) + double altimeter; ///< from seperate altimeter (if receiver provides PGRMZ message). meters above sea level. + bool haveAltimeter; + unsigned short DGPSStationID; ///< (from NMEA GPGGA) + bool haveDGPSStation; ///< (from NMEA GPGGA) + double garminPositionError; ///< Error in meters, only some GPS devices provide this + bool haveGarminPositionError; ///< Error in meters, only some GPS devices provide this (PGRME) + double garminVerticalPositionError; ///< Error in meters, only some GPS devices provide this (PGRME) + bool haveGarminVerticalPositionError; ///< Error in meters, only some GPS devices provide this (PGRME) + double compassHeadingMag; ///< (from HCDHM message, if device provides it) + double compassHeadingTrue; ///< (from HCHDT, if device provides it) + bool haveCompassHeadingMag; ///< (from HCDHM message, if device provides it) + bool haveCompassHeadingTrue; ///< (from HCHDT message, if device provides it) + unsigned long compassMagCounter; ///< Incremented whenever @a compassHeadingMag is updated with new data + unsigned long compassTrueCounter; ///< Incremented whenever @a compassHeadingMag is updated with new data + bool haveHDOP; ///< Horizontal dilution of precision (from NMEA GPGGA) + double HDOP; ///< Horizontal dilution of precision (from NMEA GPGGA) + bool haveVDOP; ///< Vertical dilution of precision (from NMEA GPGGA) + double VDOP; ///< Vertical dilution of precision (from NMEA GPGGA) + bool havePDOP; ///< Combined dilution of precision (from NMEA GPGGA) + double PDOP; ///< Combined dilution of precision (from NMEA GPGGA) + bool qualityFlag; ///< Some GPS devices set this to false if data quality is below some thresholds. + double meanSNR; ///< Mean of satellite signal-noise ratios (dB) + bool haveSNR; ///< (from NMEA GPGSV) + double beaconSignalStrength; ///< dB (from NMEA GPMSS) + double beaconSNR; ///< dB (from NMEA GPMSS) + double beaconFreq; ///< kHz (from NMEA GPMSS) + unsigned short beaconBPS; ///< Bits/sec (from NMEA GPMSS) + unsigned short beaconChannel; ///< (from NMEA GPMSS) + bool haveBeaconInfo; ///< (from NMEA GPMSS) + double inputsRMS; ///< (from NMEA GPGST) + bool haveInputsRMS; ///< (from NMEA GPGST) + ArPose errorEllipse; ///< Ellipse shows standard deviation, in meters. Orientation is degrees from true north. (from NMEA GPGST) + bool haveErrorEllipse; ///< (from NMEA GPGST) + ArPose latLonError; ///< Std.deviation, meters. Theta is unused. May only be provided by the GPS in certain fix modes. Note, values could be inf or nan (GPS sends these in some situations). Use isinf() and isnan() to check. + bool haveLatLonError; + double altitudeError; ///< Std. deviation, meters. Note, value could be inf or nan (GPS sends these in some situations). use isinf() and isnan() to check. + bool haveAltitudeError; + }; + + /** Access all of the internally stored data directly. @see ArGPS::Data */ + const ArGPS::Data& getCurrentDataRef() const { return myData; } + + /** (from NMEA GPGGA) */ + FixType getFixType() const { return myData.fixType; } + /** (from NMEA GPGGA) */ + AREXPORT const char* getFixTypeName() const; + static AREXPORT const char* getFixTypeName(FixType type); + + /** (from NMEA GPRMC) */ + AREXPORT bool havePosition() const { return myData.havePosition; } + /** (from NMEA GPRMC) */ + AREXPORT bool haveLatitude() const { return myData.havePosition; } + /** (from NMEA GPRMC) */ + AREXPORT bool haveLongitude() const { return myData.havePosition; } + + /** @return latitude in decimal degrees. + (from NMEA GPRMC) */ + double getLatitude() const { return myData.latitude; } + + /** @return longitude in decimal degrees. + (from NMEA GPRMC) */ + double getLongitude() const { return myData.longitude; } + + /** @return copy of an ArTime object set to the time that ArGPS read and received latitude and longitude data from the GPS. + (from NMEA GPRMC) */ + ArTime getTimeReceivedPosition() const { return myData.timeGotPosition; } + + /** (from NMEA GPRMC) */ + bool haveSpeed() const { return myData.haveSpeed; } + + /** @return GPS' measured speed converted to meters per second, if provided + (from NMEA GPRMC, if provided) + */ + double getSpeed() const { return myData.speed; } + + /** Timestamp provided by GPS device along with position. (from NMEA GPRMC) */ + ArTime getGPSPositionTimestamp() const { return myData.GPSPositionTimestamp; } + + int getNumSatellitesTracked() const { return (int) myData.numSatellitesTracked; } + /** (from NMEA GPGGA) */ + bool haveDGPSStation() const { return myData.haveDGPSStation; } + /** (from NMEA GPGGA) */ + unsigned short getDGPSStationID() const { return myData.DGPSStationID; } + + /** @return whether GPS provided a distance error estimation (from a + * Garmin-specific message PGRME, most GPS receivers will not provide this) */ + bool haveGarminPositionError() const { return myData.haveGarminPositionError; } + /** GPS device's error estimation in meters (from a Garmin-specific message PGRME, + * most GPS receivers will not provide this)*/ + double getGarminPositionError() const { return myData.garminPositionError; } + /** @return whether GPS provided an altitude error estimation (from a + * Garmin-specific message PGRME, most GPS receivers will not provide this) */ + bool haveGarminVerticalPositionError() const { return myData.haveGarminVerticalPositionError; } + /** @return An altitude error estimation (from a Garmin-specific message PGRME, + * most GPS receivers will not provide this) */ + double getGarminVerticalPositionError() const { return myData.garminVerticalPositionError; } + + /** Have a compass heading value relative to magnetic north. + @note The GPS or compass device must be configured to send HCHDM messages + to receive compass data. Only some GPS receivers support this. + */ + bool haveCompassHeadingMag() const { return myData.haveCompassHeadingMag; } + /** Have a compass heading value relative to true north (using GPS/compass + device's configured declination). + @note The GPS or compass device must be configured to send HCHDT messages + to receive compass data. Only some GPS receivers support this. + */ + bool haveCompassHeadingTrue() const { return myData.haveCompassHeadingTrue; } + /** Heading from magnetic north + @note The GPS or compass device must be configured to send HCHDM messages + to receive compass data. Only some GPS receivers support this. + */ + double getCompassHeadingMag() const { return myData.compassHeadingMag; } + /** Heading from true north + @note The GPS or compass device must be configured to send HCHDT messages + to receive compass data. Only some GPS receivers support this. + */ + double getCompassHeadingTrue() const { return myData.compassHeadingTrue; } + + + /** Manually set compass value. */ + void setCompassHeadingMag(double val) { + myData.haveCompassHeadingMag = true; + myData.compassHeadingMag = val; + myData.compassMagCounter++; + } + + /** Manually set compass value. */ + void setCompassHeadingTrue(double val) { + myData.haveCompassHeadingTrue = true; + myData.compassHeadingTrue = val; + myData.compassMagCounter++; + } + + /** Manually set compass value. */ + void setCompassHeadingMagWithLock(double val) { lock(); setCompassHeadingMag(val); unlock(); } + /** Manually set compass value. */ + void setCompassHeadingTrueWithLock(double val) { lock(); setCompassHeadingTrue(val); unlock(); } + + /// Altitude above sea level calculated from satellite positions (see also haveAltimiter()) (from NMEA GPGGA, if provided) + bool haveAltitude() const { return myData.haveAltitude; } + /// Altitude above sea level (meters), calculated from satellite positions (see also getAltimiter()) (from NMEA GPGGA, if provided) + double getAltitude() const { return myData.altitude; } + + /// Some receivers may have an additional altitude from an altimiter (meters above sea level) (from PGRMZ, if receiver provides it) + bool haveAltimeter() const { return myData.haveAltimeter; } + /// Some receivers may have an additional altitude from an altimiter (meters above sea level) (from PGRMZ, if receiver provides it) + double getAltimeter() const { return myData.altimeter; } + + /** (from NMEA GPGGA) */ + bool haveHDOP() const { return myData.haveHDOP; } + /** (from NMEA GPGGA) */ + double getHDOP() const { return myData.HDOP; } + /** (from NMEA GPGGA) */ + bool haveVDOP() const { return myData.haveVDOP; } + /** (from NMEA GPGGA) */ + double getVDOP() const { return myData.VDOP; } + /** (from NMEA GPGGA) */ + bool havePDOP() const { return myData.havePDOP; } + /** (from NMEA GPGGA) */ + double getPDOP() const { return myData.PDOP; } + + /** (from NMEA GPGSV) */ + bool haveSNR() const { return myData.haveSNR; } + /// dB (from NMEA GPGSV) + double getMeanSNR() const { return myData.meanSNR; } + + /** Whether we have any DGPS stationary beacon info (from NMEA GPMSS) */ + bool haveBeaconInfo() const { return myData.haveBeaconInfo; } + /** DGPS stationary beacon signal strength (dB) (from NMEA GPMSS) */ + double getBeaconSignalStrength() const { return myData.beaconSignalStrength; } + /** DGPS stationary beacon signal to noise (dB) (from NMEA GPMSS) */ + double getBeaconSNR() const { return myData.beaconSNR; } + /** DGPS stationary beacon frequency (kHz) (from NMEA GPMSS) */ + double getBeaconFreq() const { return myData.beaconFreq; } + /** DGPS stationary beacon bitrate (bits per second) (from NMEA GPMSS) */ + unsigned short getBecaonBPS() const { return myData.beaconBPS; } + /** DGPS stationary beacon channel (from NMEA GPMSS) */ + unsigned short getBeaconChannel() const { return myData.beaconChannel; } + + /** Whether we have a position error estimate (as standard deviations in latitude and longitude) (from NMEA GPGST) */ + bool haveErrorEllipse() const { return myData.haveErrorEllipse; } + /** Standard deviation of position error (latitude and longitude), meters. Theta in ArPose is orientation of ellipse from true north, Y is the length of the major axis on that orientation, X the minor. + (from NMEA GPGST) + @note Values may be inf or NaN (if GPS supplies "Inf" or "NAN") + */ + ArPose getErrorEllipse() const {return myData.errorEllipse; } + + /** Whether we have latitude or longitude error estimates (from NMEA GPGST) */ + bool haveLatLonError() const { return myData.haveLatLonError; } + /** Standard deviation of latitude and longitude error, meters. + Theta value in ArPose is unused. + @note May only be provided by GPS in certain fix modes + (e.g. Trimble AgGPS provides it in Omnistar and RTK modes, but not in GPS + or DGPS modes). + @note Values may be inf or NaN (if GPS supplies "Inf" or "NAN") + (from NMEA GPGST) + */ + ArPose getLatLonError() const { return myData.latLonError; } + /** @copydoc getLatLonError() */ + double getLatitudeError() const { return myData.latLonError.getX(); } + /** @copydoc getLatLonError() */ + double getLongitudeError() const { return myData.latLonError.getY(); } + + bool haveAltitudeError() const { return myData.haveAltitudeError; } + /// Standard deviation of altitude error, meters. (from NMEA GPGST, if provided) + double getAltitudeError() const { return myData.altitudeError; } + + /// (from NMEA GPGST) + bool haveInputsRMS() const { return myData.haveInputsRMS; } + /// (from NMEA GPGST) + double getInputsRMS() const { return myData.inputsRMS; } + + + + /** Set a handler for an NMEA message. Mostly for internal use or to be used + * by related classes, but you could use for ususual or custom messages + * emitted by a device that you wish to be handled outside of the ArGPS + * class. + */ + void addNMEAHandler(const char *message, ArNMEAParser::Handler *handler) { myNMEAParser.addHandler(message, handler); } + void removeNMEAHandler(const char *message) { myNMEAParser.removeHandler(message); } + void replaceNMEAHandler(const char *message, ArNMEAParser::Handler *handler) { + myNMEAParser.removeHandler(message); + myNMEAParser.addHandler(message, handler); + } + +protected: + + + /* Most recent data values received, to return to user */ + Data myData; + + /* Utility to read a double floating point number out of a std::string, if possible. + * @return true if the string was nonempty and @a target was modified. + */ + bool readFloatFromString(const std::string& str, double* target, double(*convf)(double) = NULL) const; + + /* Utility to read an unsigned short integer out of a std::string, if possible. + * @return true if the string was nonempty and @a target was modified. + */ + bool readUShortFromString(const std::string& str, unsigned short* target, unsigned short (*convf)(unsigned short) = NULL) const; + + + /* Utility to read a double from a member of a vector of strings, if it exists. */ + bool readFloatFromStringVec(const std::vector* vec, size_t i, double* target, double (*convf)(double) = NULL) const; + + /* Utility to read a double from a member of a vector of strings, if it exists. */ + bool readUShortFromStringVec(const std::vector* vec, size_t i, unsigned short* target, unsigned short (*convf)(unsigned short) = NULL) const; + + /* Utility to convert DDDMM.MMMM to decimal degrees */ + static double gpsDegminToDegrees(double degmin); + + /* Utility to convert US nautical knots to meters/sec */ + static double knotsToMPS(double knots); + + /** Convert meters per second to miles per hour */ + static double mpsToMph(const double mps) { return mps * 2.23693629; } + + /* Utility to convert meters to US feet */ + static double metersToFeet(double m) { return m * 3.2808399; } + + /* Utility to convert US feet to meters */ + static double feetToMeters(double f) { return f / 3.2808399; } + + + + /* Mutex */ + ArMutex myMutex; + + + /* Connection info */ + ArDeviceConnection *myDevice; + bool myCreatedOwnDeviceCon; + ArRetFunctorC myParseArgsCallback; + ArArgumentParser* myArgParser; + + /* NMEA Parser */ + ArNMEAParser myNMEAParser; + + /* GPS message handlers */ + + void handleGPRMC(ArNMEAParser::Message msg); + ArFunctor1C myGPRMCHandler; + + void handleGPGGA(ArNMEAParser::Message msg); + ArFunctor1C myGPGGAHandler; + + void handlePGRME(ArNMEAParser::Message msg); + ArFunctor1C myPGRMEHandler; + + void handlePGRMZ(ArNMEAParser::Message msg); + ArFunctor1C myPGRMZHandler; + + void handleHCHDx(ArNMEAParser::Message msg); + ArFunctor1C myHCHDxHandler; + + void handleGPGSA(ArNMEAParser::Message msg); + ArFunctor1C myGPGSAHandler; + + void handleGPGSV(ArNMEAParser::Message msg); + ArFunctor1C myGPGSVHandler; + + /* For calculating SNR averages based on multiple GPGSV messages. */ + unsigned int mySNRSum; + unsigned short mySNRNum; + + void handleGPMSS(ArNMEAParser::Message msg); + ArFunctor1C myGPMSSHandler; + + void handleGPGST(ArNMEAParser::Message msg); + ArFunctor1C myGPGSTHandler; + + /* Set an ArTime object using a time read from a string as decimal seconds (SSS.SS) */ + bool readTimeFromString(const std::string& s, ArTime* time) const; + + /** Parse a GPRMC message (in @a msg) and place results in provided + * variables. (Can be used by subclasses to store results of GPRMC differently + * than normal.) + * @since Aria 2.7.2 + */ + void parseGPRMC(const ArNMEAParser::Message &msg, double &latitudeResult, double &longitudeResult, bool &qualityFlagResult, bool &gotPosition, ArTime &timeGotPositionResult, ArTime &gpsTimestampResult, bool &gotSpeedResult, double &speedResult); + +}; + + +class ArRobotPacket; +class ArRobot; + +/// @since Aria 2.7.4 +class ArSimulatedGPS : public virtual ArGPS +{ + bool myHaveDummyPosition; + ArRetFunctor1C mySimStatHandlerCB; + ArRobot *myRobot; +public: + AREXPORT ArSimulatedGPS(ArRobot *robot = NULL); + AREXPORT virtual ~ArSimulatedGPS(); + void setDummyPosition(double latitude, double longitude) { + myData.latitude = latitude; + myData.havePosition = true; + myData.longitude = longitude; + if(!myData.haveHDOP) myData.HDOP = 1.0; + myData.haveHDOP = true; + if(!myData.haveVDOP) myData.VDOP = 1.0; + myData.haveVDOP = true; + if(!myData.havePDOP) myData.PDOP = 1.0; + myData.havePDOP = true; + myData.fixType = SimulatedFix; + myHaveDummyPosition = true; + } + void clearDummyPosition() { + clearPosition(); + myHaveDummyPosition = false; + } + void clearPosition() { + myData.havePosition = false; + myData.latitude = 0; + myData.longitude = 0; + myData.altitude = 0; + myData.HDOP = 0; + myData.VDOP = 0; + myData.PDOP = 0; + myData.fixType = NoFix; + } + void setDummyPosition(double latitude, double longitude, double altitude) { + myData.altitude = altitude; + setDummyPosition(latitude, longitude); + } + AREXPORT void setDummyPosition(ArArgumentBuilder *args); + void setDummyPositionFromArgs(ArArgumentBuilder *args) { setDummyPosition(args); } // non-overloaded function can be used in functors + AREXPORT virtual bool connect(unsigned long connectTimeout = 10000); + virtual bool initDevice() { return true; } + virtual int read(unsigned long maxTime = 0) { + if(myHaveDummyPosition) + { + myData.timeGotPosition.setToNow(); + } + return ReadUpdated | ReadFinished; + } +private: +#ifndef SWIG + bool handleSimStatPacket(ArRobotPacket *pkt); +#endif +}; + +#endif // ifdef ARGPS_H diff --git a/Legacy/Aria/include/ArGPSConnector.h b/Legacy/Aria/include/ArGPSConnector.h new file mode 100644 index 0000000..0e7a0a6 --- /dev/null +++ b/Legacy/Aria/include/ArGPSConnector.h @@ -0,0 +1,142 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARGPSCONNECTOR_H +#define ARGPSCONNECTOR_H + +#include +#include + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" +#include "ArGPS.h" + +class ArDeviceConnection; +class ArRobot; + +/** + * @brief Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot parameter file and command-line arguments. + * + * First, create an ArGPSConnector object before + * calling Aria::parseArgs(). After connecting to the robot, call + * Aria::parseArgs(). Then, call createGPS() to create the GPS object. + * + * ArGPSConnector can connect to a Novatel GPS ("novatel" type), Trimble AgGPS + * ("trimble" type), or any GPS + * supporting the NMEA standard protocol ("standard" type), if that GPS does not need any special + * commands to initialize. + * + * @note The device connection object created by + * ArGPSConnector is destroyed when ArGPSConnector is + * destroyed. Therefore, you must not destroy an ArGPSConnector + * while its associated ArGPS is in use. + * + * The following command-line arguments are checked: + * @verbinclude ArGPSConnector_options + * + * Only one GPS device may be configured and connected to by this object. + * + @ingroup OptionalClasses + @ingroup DeviceClasses +*/ + +class ArGPSConnector { +public: + AREXPORT ArGPSConnector(ArArgumentParser* argParser); + AREXPORT ~ArGPSConnector(); + + /** Gets command line arguments */ + AREXPORT bool parseArgs(); + + + /** Create a new GPS object (may be an ArGPS subclass based on device type) + * and a device connection for that GPS. Use ArGPS::blockingConnect() to open the connection. + * + * @param robot If not NULL, obtain default values for GPS type, port and baud + * from this robot's parameters (given in parameter file), for any of these + * not set from command-line arguments in parseArgs(). + * + * @return NULL if there was an error creating a GPS object or an error + * creating and opening its device connection. Otherwise, return the new GPS + * object. + */ + AREXPORT ArGPS* createGPS(ArRobot *robot = NULL); + /** @copydoc createGPS() */ + AREXPORT ArGPS* create(ArRobot *robot = NULL) { return createGPS(robot); } + +#if 0 + +//doesn't really do anything : + /** Try to establish a device connection between @a gps (created by calling + * createGPS() and the GPS receiver. + */ + AREXPORT bool connectGPS(ArGPS *gps); + /** @copydoc connectGPS() */ + AREXPORT bool connect(ArGPS *gps) { return connectGPS(gps) ; } +#endif + + /** @brief Device type identifiers */ + typedef enum { + /// For a standard NMEA GPS device (no extra initialization or interpretation needed) accessible using ArGPS + Standard, + /// For a Novatel device accessible using ArNovatelGPS + Novatel, + /// For a Trimble device accessible using ArTrimbleGPS + Trimble, + /// Not set or invalid + Invalid, + /// Novatel SPAN + /// @since Aria 2.7.2 + NovatelSPAN, + /// Simulated (program must set dummy positions) + /// @since Aria 2.7.6 + Simulator + } GPSType; + + AREXPORT GPSType getGPSType() const { return myDeviceType; } + +protected: + ArDeviceConnection *myDeviceCon; + ArArgumentParser *myArgParser; + ArRetFunctorC myParseArgsCallback; + ArFunctorC myLogArgsCallback; + int myBaud; + const char *myPort; + const char *myTCPHost; + int myTCPPort; + GPSType myDeviceType; + + + /** Log argument option information */ + AREXPORT void logOptions(); + AREXPORT GPSType deviceTypeFromString(const char *str); +}; + + +#endif // ifdef ARGPSCONNECTOR_H + + diff --git a/Legacy/Aria/include/ArGPSCoords.h b/Legacy/Aria/include/ArGPSCoords.h new file mode 100644 index 0000000..c7327d6 --- /dev/null +++ b/Legacy/Aria/include/ArGPSCoords.h @@ -0,0 +1,234 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARGPSCOORDS_H +#define ARGPSCOORDS_H + +#include "ariaTypedefs.h" + + + +class Ar3DPoint; +class ArLLACoords; +class ArECEFCoords; +class ArENUCoords; +class ArWGS84; + +/** Base class for points in 3 dimensional cartesian space. + @ingroup UtilityClasses +*/ +class Ar3DPoint +{ + public: + + Ar3DPoint(void) : myX(0), myY(0), myZ(0) {} + Ar3DPoint(double x, double y, double z) : myX(x), myY(y), myZ(z) {} + /// Destructor. + ~Ar3DPoint() {} + /// Add + Ar3DPoint operator+(Ar3DPoint c) + { + Ar3DPoint sum(myX + c.myX, + myY + c.myY, + myZ + c.myZ); + + return sum; + } + /// Diff + Ar3DPoint operator-(Ar3DPoint c) + { + Ar3DPoint dif(myX - c.myX, + myY - c.myY, + myZ - c.myZ); + return dif; + } + /// Diff + Ar3DPoint operator*(double c) + { + Ar3DPoint pro(myX*c, myY*c, myZ*c); + return pro; + } + /// Dot product + double dot(Ar3DPoint c) + { + double dotP(myX * c.myX + myY * c.myY + myZ * c.myZ); + return dotP; + } + /// Cross product + Ar3DPoint cross(Ar3DPoint c) + { + Ar3DPoint crossP(myY * c.myZ - myZ * c.myY, + myZ * c.myX - myX * c.myZ, + myX * c.myY - myY * c.myX); + return crossP; + } + /// Print. + /** @swignote Use 'printPoint' instead */ + AREXPORT void print(const char* head=NULL); + + double getX() const {return myX;} + double getY() const {return myY;} + double getZ() const {return myZ;} + void setX(double x) { myX = x; } + void setY(double y) { myY = y; } + void setZ(double z) { myZ = z; } + +protected: + + double myX; + double myY; + double myZ; + +}; + +#ifdef WIN32 +// Need to export some variables on Windows because they are used in inline methods (which is good), but they can't be exported if const. +#define ARGPSCOORDS_CONSTANT +#else +#define ARGPSCOORDS_CONSTANT const +#endif + + +/** + * All the constants defined by the World Geodetic System 1984. + * @ingroup UtilityClasses + */ +class ArWGS84 +{ + public: + ArWGS84(void) {} + + static double getE() {return mye;} + static double getA() {return mya;} + static double getB() {return myb;} + static double getEP() {return myep;} + static double get1byf() {return my1byf;} + static double getOmega() {return myOmega;} + static double getGM() {return myGM;} + + +private: + AREXPORT static ARGPSCOORDS_CONSTANT double mya; // meters + AREXPORT static ARGPSCOORDS_CONSTANT double myb; // meters + AREXPORT static ARGPSCOORDS_CONSTANT double myep; + AREXPORT static ARGPSCOORDS_CONSTANT double myc; // m/sec + AREXPORT static ARGPSCOORDS_CONSTANT double mye; + AREXPORT static ARGPSCOORDS_CONSTANT double my1byf; + AREXPORT static ARGPSCOORDS_CONSTANT double myOmega; // rad/sec + AREXPORT static ARGPSCOORDS_CONSTANT double myGM; // m^3/sec^2 + AREXPORT static ARGPSCOORDS_CONSTANT double myg; // m/sec^2. Ave g. + AREXPORT static ARGPSCOORDS_CONSTANT double myM; // kg. Mass of earth. +}; + + +/** + * Earth Centered Earth Fixed Coordinates. + @ingroup UtilityClasses + */ +class ArECEFCoords : public Ar3DPoint +{ + public: + ArECEFCoords(double x, double y, double z) : Ar3DPoint(x, y, z) {} + AREXPORT ArLLACoords ECEF2LLA(void); + AREXPORT ArENUCoords ECEF2ENU(ArECEFCoords ref); +}; + +/** + * Latitude, Longitude and Altitude Coordinates. + * @ingroup UtilityClasses + */ +class ArLLACoords : public Ar3DPoint +{ + public: + ArLLACoords(void) : Ar3DPoint(0, 0, 0) {} + ArLLACoords(double x, double y, double z) : Ar3DPoint(x, y, z) {} + AREXPORT ArECEFCoords LLA2ECEF(void); + double getLatitude(void) const {return getX();} + double getLongitude(void) const {return getY();} + double getAltitude(void) const {return getZ();} + void setLatitude(double l) { setX(l); } + void setLongitude(double l) { setY(l); } + void setAltitude(double a) { setZ(a); } +}; + +/** + * East North Up coordinates. + @ingroup UtilityClasses + */ +class ArENUCoords : public Ar3DPoint +{ + public: + ArENUCoords(double x, double y, double z) : Ar3DPoint(x, y, z) {} + AREXPORT ArECEFCoords ENU2ECEF(ArLLACoords ref); + double getEast(void) const {return getX();} + double getNorth(void) const {return getY();} + double getUp(void) const {return getZ();} + void setEast(double e) { setX(e); } + void setNorth(double n) { setY(n); } + void setUp(double u) { setZ(u); } +}; + +/** + * Coordinates based on a map with origin in LLA coords with conversion + * methods from LLA to ENU and from ENU to LLA coordinates. + * @ingroup UtilityClasses + */ +class ArMapGPSCoords : public ArENUCoords +{ + public: + ArMapGPSCoords(ArLLACoords org) : ArENUCoords(0.0, 0.0, 0.0), myOriginECEF(0), myOriginLLA(0), myOriginSet(false) + { + setOrigin(org); + } + ArMapGPSCoords() : ArENUCoords(0, 0, 0), myOriginECEF(0), myOriginLLA(0), myOriginSet(false) + { + } + AREXPORT bool convertMap2LLACoords(const double ea, const double no, const double up, + double& lat, double& lon, double& alt) const; + AREXPORT bool convertLLA2MapCoords(const double lat, const double lon, const double alt, + double& ea, double& no, double& up) const; + bool convertLLA2MapCoords(const ArLLACoords& lla, double& ea, double& no, double& up) +{ + return convertLLA2MapCoords(lla.getLatitude(), lla.getLongitude(), lla.getAltitude(), ea, no, up); + } + void setOrigin(ArLLACoords org) { + if(myOriginLLA) + delete myOriginLLA; + if(myOriginECEF) + delete myOriginECEF; + myOriginSet = true; + myOriginLLA = new ArLLACoords(org); + myOriginECEF = new ArECEFCoords(myOriginLLA->LLA2ECEF()); + } + + ArECEFCoords* myOriginECEF; + ArLLACoords* myOriginLLA; + bool myOriginSet; +}; + + + + +#endif // ARGPSCOORDS_H diff --git a/Legacy/Aria/include/ArGripper.h b/Legacy/Aria/include/ArGripper.h new file mode 100644 index 0000000..abc7a96 --- /dev/null +++ b/Legacy/Aria/include/ArGripper.h @@ -0,0 +1,151 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARGRIPPER_H +#define ARGRIPPER_H + +#include "ariaTypedefs.h" +#include "ArRobot.h" + +/// Contains gripper command numbers +/** + A class with an enum of the commands for the gripper, see the Pioneer operations + manual and the gripper guide available at http://robots.mobilerobots.com for more detailed descriptions. The enum + values which start with GRIP are for the gripper paddles, the ones which + start with LIFT are the for the lift, and the ones which start with GRIPPER + are for the entire unit. +*/ +class ArGripperCommands +{ +public: + enum Commands { + GRIP_OPEN = 1, ///< open the gripper paddles fully + GRIP_CLOSE = 2, ///< close the gripper paddles all the way + GRIP_STOP = 3, ///< stop the gripper paddles where they are + LIFT_UP = 4, ///< raises the lift to the top of its range + LIFT_DOWN = 5, ///< lowers the lift to the bottom of its range + LIFT_STOP = 6, ///< stops the lift where it is + GRIPPER_STORE = 7, /**< + closes the paddles and raises the lift simultaneously, + this is for storage not for grasping/carrying an object + */ + GRIPPER_DEPLOY = 8, /**< + opens the paddles and lowers the lieft simultaneously, + this is for getting ready to grasp an object, not for + object drops + */ + GRIPPER_HALT = 15, ///< stops the gripper paddles and lift from moving + GRIP_PRESSURE = 16, /**< + sets the time delay in 20 msec increments after the + gripper paddles first grasp an object before they stop + moving, regulates grasp pressure + */ + LIFT_CARRY = 17 /**< + raises or lowers the lieft, the argument is the number + of 20 msec increments to raise or lower the lift, + poseitive arguments for raise, negative for lower + */ + }; +}; + +/// Provides an interface to the Pioneer gripper device +/// @ingroup OptionalClasses +/// @ingroup DeviceClasses +class ArGripper +{ +public: + /// Constructor + AREXPORT ArGripper(ArRobot *robot, int gripperType = QUERYTYPE); + /// Destructor + AREXPORT virtual ~ArGripper(); + /// Opens the gripper paddles + AREXPORT bool gripOpen(void); + /// Closes the gripper paddles + AREXPORT bool gripClose(void); + /// Stops the gripper paddles + AREXPORT bool gripStop(void); + /// Raises the lift to the top + AREXPORT bool liftUp(void); + /// Lowers the lift to the bottom + AREXPORT bool liftDown(void); + /// Stops the lift + AREXPORT bool liftStop(void); + /// Puts the gripper in a storage position + AREXPORT bool gripperStore(void); + /// Puts the gripper in a deployed position, ready for use + AREXPORT bool gripperDeploy(void); + /// Halts the lift and the gripper paddles + AREXPORT bool gripperHalt(void); + /// Sets the amount of pressure the gripper applies + AREXPORT bool gripPressure(int mSecIntervals); + /// Raises the lift by a given amount of time + AREXPORT bool liftCarry(int mSecIntervals); + /// Returns true if the gripper paddles are moving + AREXPORT bool isGripMoving(void) const; + /// Returns true if the lift is moving + AREXPORT bool isLiftMoving(void) const; + /// Returns the state of the gripper paddles + AREXPORT int getGripState(void) const; + /// Returns the state of each gripper paddle + AREXPORT int getPaddleState(void) const; + /// Returns the state of the gripper's breakbeams + AREXPORT int getBreakBeamState(void) const; + /// Returns the state of the lift + AREXPORT bool isLiftMaxed(void) const; + /// Gets the type of the gripper + AREXPORT int getType(void) const; + /// Sets the type of the gripper + AREXPORT void setType(int type); + /// Gets the number of mSec since the last gripper packet + AREXPORT long getMSecSinceLastPacket(void) const; + /// Gets the grasp time + AREXPORT int getGraspTime(void) const; + /// logs the gripper state + AREXPORT void logState(void) const; + /// Parses the gripper packet + AREXPORT bool packetHandler(ArRobotPacket *packet); + /// The handler for when the robot connects + AREXPORT void connectHandler(void); + /// These are the types for the gripper + enum Type { + QUERYTYPE, ///< Finds out what type from the robot, default + GENIO, ///< Uses general IO + USERIO, ///< Uses the user IO + GRIPPAC, ///< Uses a packet requested from the robot + NOGRIPPER ///< There isn't a gripper + }; +protected: + ArRobot *myRobot; + int myType; + unsigned char myState; + unsigned char mySwitches; + unsigned char myGraspTime; + ArTime myLastDataTime; + ArFunctorC myConnectCB; + ArRetFunctor1C myPacketHandlerCB; +}; + + +#endif // ARGRIPPER_H diff --git a/Legacy/Aria/include/ArHasFileName.h b/Legacy/Aria/include/ArHasFileName.h new file mode 100644 index 0000000..c9603d3 --- /dev/null +++ b/Legacy/Aria/include/ArHasFileName.h @@ -0,0 +1,69 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARHASFILENAME_H +#define ARHASFILENAME_H + +#include "ariaTypedefs.h" + +/// Interface to access an object's associated file name. +/** + * ArHasFileName provides a single abstract method which should be overridden + * to return the complete file path name of the associated file. It is + * implemented by classes that have external persistent storage, such as + * ArConfig and ArMap. + * + * Copyright (c) Adept Technology, Inc. All rights reserved. +**/ +class ArHasFileName +{ +public: + + /// Constructor + AREXPORT ArHasFileName() + {} + + /// Copy constructor + ArHasFileName(ArHasFileName const &) + {} + + /// Assignment operator. + ArHasFileName &operator=(ArHasFileName const & ) + { + return *this; + } + + /// Destructor + AREXPORT virtual ~ArHasFileName() + {} + + /// Returns the complete file path name of the associated file + AREXPORT virtual const char *getFileName() const = 0; + +}; // end class + + +#endif // ARHASFILENAME_H + diff --git a/Legacy/Aria/include/ArIRs.h b/Legacy/Aria/include/ArIRs.h new file mode 100644 index 0000000..f4bbc53 --- /dev/null +++ b/Legacy/Aria/include/ArIRs.h @@ -0,0 +1,59 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARIRS_H +#define ARIRS_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" + + +/// A class that treats a robot's infrared sensors as a range device. +/** + (Only Peoplebot and some Powerbots have IR sensors.) + + @ingroup OptionalClasses + @ingroup DeviceClasses +*/ +class ArIRs : public ArRangeDevice +{ +public: + AREXPORT ArIRs(size_t currentBufferSize = 10, + size_t cumulativeBufferSize = 10, + const char *name = "irs", + int maxSecondsToKeepCurrent = 15); + AREXPORT virtual ~ArIRs(void); + + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT void processReadings(void); + +protected: + ArFunctorC myProcessCB; + ArRobotParams myParams; + std::vector cycleCounters; +}; + + +#endif // ARIRS_H diff --git a/Legacy/Aria/include/ArInterpolation.h b/Legacy/Aria/include/ArInterpolation.h new file mode 100644 index 0000000..7a89ba5 --- /dev/null +++ b/Legacy/Aria/include/ArInterpolation.h @@ -0,0 +1,96 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARINTERPOLATION_H +#define ARINTERPOLATION_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +/** + This class takes care of storing in readings of position vs time, and then + interpolating between them to find where the robot was at a particular + point in time. It has two lists, one containing the times, and one + containing the positions at those same times (per position), they must be + walked through jointly to maintain cohesion. The new entries are at the + front of the list, while the old ones are at the back. + numberOfReadings and the setNumberOfReadings control the number of entries + in the list. If a size is set that is smaller than the current size, then + the old ones are chopped off. + + This class now has a couple of variables for when it allows + prediction, they're set with setAllowedMSForPrediction and + setAllowedPercentageForPrediction. If either is below 0 than they + are ignored (if both are below 0 it means any prediction is + allowed, which would be bad). Previous there was no MS limit, and + the percentage limit was 50 (and so that is what the default is + now). +**/ +class ArInterpolation +{ +public: + /// Constructor + AREXPORT ArInterpolation(size_t numberOfReadings = 100); + /// Destructor + AREXPORT virtual ~ArInterpolation(); + /// Adds a new reading + AREXPORT bool addReading(ArTime timeOfReading, ArPose position); + /// Finds a position + AREXPORT int getPose(ArTime timeStamp, ArPose *position, + ArPoseWithTime *lastData = NULL); + /// Sets the name + AREXPORT void setName(const char *name); + /// Gets the name + AREXPORT const char *getName(void); + /// Sets the allowed milliseconds for prediction + AREXPORT void setAllowedMSForPrediction(int ms = -1); + /// Sets the allowed milliseconds for prediction + AREXPORT int getAllowedMSForPrediction(void); + /// Sets the allowed percentage for prediction + AREXPORT void setAllowedPercentageForPrediction(int percentage = 5000); + /// Sets the allowed milliseconds for prediction + AREXPORT int getAllowedPercentageForPrediction(void); + /// Sets if we should log events for this interpolation + AREXPORT void setLogPrediction(bool logPrediction = false); + /// Gets if we should log events for this interpolation + AREXPORT bool getLogPrediction(void); + /// Sets the number of readings this instance holds back in time + AREXPORT void setNumberOfReadings(size_t numberOfReadings); + /// Gets the number of readings this instance holds back in time + AREXPORT size_t getNumberOfReadings(void) const; + /// Empties the interpolated positions + AREXPORT void reset(void); +protected: + ArMutex myDataMutex; + std::string myName; + std::list myTimes; + std::list myPoses; + size_t mySize; + bool myLogPrediction; + int myAllowedMSForPrediction; + int myAllowedPercentageForPrediction; +}; + +#endif diff --git a/Legacy/Aria/include/ArIrrfDevice.h b/Legacy/Aria/include/ArIrrfDevice.h new file mode 100644 index 0000000..f98224d --- /dev/null +++ b/Legacy/Aria/include/ArIrrfDevice.h @@ -0,0 +1,74 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARIRRFDEVICE_H +#define ARIRRFDEVICE_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctor.h" + +#include "ArRobot.h" + +/// A class for connecting to a PB-9 and managing the resulting data +/** + This class is for use with a PB9 IR rangefinder. It has the packethandler + necessary to process the packets, and will put the data into ArRangeBuffers + for use with obstacle avoidance, etc. + + The PB9 is still under development, and only works on an H8 controller + running AROS. +*/ + +class ArIrrfDevice : public ArRangeDevice +{ +public: + /// Constructor + AREXPORT ArIrrfDevice(size_t currentBufferSize = 91, + size_t cumulativeBufferSize = 273, + const char * name = "irrf"); + /// Destructor + AREXPORT virtual ~ArIrrfDevice(); + + /// The packet handler for use when connecting to an H8 micro-controller + AREXPORT bool packetHandler(ArRobotPacket *packet); + + /// Maximum range for a reading to be added to the cumulative buffer (mm) + AREXPORT void setCumulativeMaxRange(double r) { myCumulativeMaxRange = r; } + AREXPORT virtual void setRobot(ArRobot *); + +protected: + ArRetFunctor1C myPacketHandler; + ArTime myLastReading; + AREXPORT void processReadings(void); + double myCumulativeMaxRange; + double myFilterNearDist; + double myFilterFarDist; + std::map myIrrfReadings; +}; + + +#endif // ARIRRFDEVICE_H diff --git a/Legacy/Aria/include/ArJoyHandler.h b/Legacy/Aria/include/ArJoyHandler.h new file mode 100644 index 0000000..7e1ecf0 --- /dev/null +++ b/Legacy/Aria/include/ArJoyHandler.h @@ -0,0 +1,166 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARJOYHANDLER_H +#define ARJOYHANDLER_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +#ifdef WIN32 +#include // for JOYINFO +#else // if not win32 +#include +#include +#include +#include +#include +#endif +#ifdef linux +#include // for JS_DATA_TYPE +#endif + + + +/// Interfaces to a computer joystick +/** + This class is used to read data from a joystick device attached to the computer + (usually via USB). + The joystick handler keeps track of the minimum and maximums for both + axes, updating them to constantly be better calibrated. The speeds set + with setSpeed() influence what is returned by getAdjusted() or getDoubles(). + + The joystick device is not opened until init() is called. If there was + an error connecting to the joystick device, it will return false, and + haveJoystick() will return false. After calling + init(), use getAdjusted() or getDoubles() + to get values, and getButton() to check whether a button is pressed. setSpeed() may be + called at any time to configure or reconfigure the range of the values returned by + getAdjusted() and getDoubles(). + + To get the raw data instead, use getUnfiltered() or getAxis(). + + For example, if you want the X axis output to range from -1000 to 1000, and the Y axis + output to range from -100 to 100, call setSpeed(1000, 100);. + + The X joystick axis is usually the left-right axis, and Y is forward-back. + If a joystick has a Z axis, it is usually a "throttle" slider or dial on the + joystick. The usual way to + drive a robot with a joystick is to use the X joystick axis for rotational velocity, + and Y for translational velocity (note the robot coordinate system, this is its local + X axis), and use the Z axis to adjust the robot's maximum driving speed. + + @ingroup OptionalClasses +*/ +class ArJoyHandler +{ + public: + /// Constructor + AREXPORT ArJoyHandler(bool useOSCal = true, bool useOldJoystick = false); + /// Destructor + AREXPORT ~ArJoyHandler(); + /// Intializes the joystick, returns true if successful + AREXPORT bool init(void); + /// Returns if the joystick was successfully initialized or not + bool haveJoystick(void) { return myInitialized; } + /// Gets the adjusted reading, as floats, between -1.0 and 1.0 + AREXPORT void getDoubles(double *x, double *y, double *z = NULL); + /// Gets the button + AREXPORT bool getButton(unsigned int button); + /// Returns true if we definitely have a Z axis (we don't know in windows unless it moves) + bool haveZAxis(void) { return myHaveZ; } + + /// Sets the maximums for the x, y and optionally, z axes. + void setSpeeds(int x, int y, int z = 0) + { myTopX = x; myTopY = y; myTopZ = z; } + /// Gets the adjusted reading, as integers, based on the setSpeed + AREXPORT void getAdjusted(int *x, int *y, int *z = NULL); + + /// Gets the number of axes the joystick has + AREXPORT unsigned int getNumAxes(void); + /// Gets the floating (-1 to 1) location of the given joystick axis + AREXPORT double getAxis(unsigned int axis); + /// Gets the number of buttons the joystick has + AREXPORT unsigned int getNumButtons(void); + + /// Sets whether to just use OS calibration or not + AREXPORT void setUseOSCal(bool useOSCal); + /// Gets whether to just use OS calibration or not + AREXPORT bool getUseOSCal(void); + /// Starts the calibration process + AREXPORT void startCal(void); + /// Ends the calibration process + AREXPORT void endCal(void); + /// Gets the unfilitered reading, mostly for internal use, maybe + /// useful for Calibration + AREXPORT void getUnfiltered(int *x, int *y, int *z = NULL); + /// Gets the stats for the joystick, useful after calibrating to save values + AREXPORT void getStats(int *maxX, int *minX, int *maxY, int *minY, + int *cenX, int *cenY); + /// Sets the stats for the joystick, useful for restoring calibrated settings + AREXPORT void setStats(int maxX, int minX, int maxY, int minY, + int cenX, int cenY); + /// Gets the maximums for each axis. + AREXPORT void getSpeeds(int *x, int *y, int *z); + + protected: + // function to get the data for OS dependent part + void getData(void); + int myMaxX, myMinX, myMaxY, myMinY, myCenX, myCenY, myTopX, myTopY, myTopZ; + bool myHaveZ; + + std::map myAxes; + std::map myButtons; + + int myPhysMax; + bool myInitialized; + bool myUseOSCal; + bool myUseOld; + bool myFirstData; + ArTime myLastDataGathered; +#ifdef WIN32 + unsigned int myJoyID; + int myLastZ; + JOYINFO myJoyInfo; + JOYCAPS myJoyCaps; +#else // if not win32 + int myJoyNumber; + char myJoyNameTemp[512]; + ArTime myLastOpenTry; + void getOldData(void); + void getNewData(void); + #ifdef linux + struct JS_DATA_TYPE myJoyData; // structure for the buttons and x,y coords + #else + int myJoyData; + #endif + FILE * myOldJoyDesc; + int myJoyDesc; +#endif // linux +}; + + +#endif // ARJOYHANDLER_H + diff --git a/Legacy/Aria/include/ArKeyHandler.h b/Legacy/Aria/include/ArKeyHandler.h new file mode 100644 index 0000000..722b30a --- /dev/null +++ b/Legacy/Aria/include/ArKeyHandler.h @@ -0,0 +1,154 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARKEYHANDLER_H +#define ARKEYHANDLER_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include +#include + +#ifndef WIN32 +#include +#include +#endif + + +/// Perform actions when keyboard keys are pressed +/** + This class is used for handling input from the keyboard. + Use addKeyHandler() to associate a functor with a keyboard key. + ArKeyHandler will call that functor when the key is pressed. + + You should also register the keyhandler with Aria::setKeyHandler(), + and before you create a key handler you should see if one is + already there with Aria::getKeyHandler(). Only one key handler + can be created in a program, and this lets independent parts + of a program use the same key handler. + + You can attach a key handler to a robot with + ArRobot::attachKeyHandler() which will put a task into the robots + list of tasks to check for new keyboard input in each cycle, and which + will also add a handler to end the robot's task cycle when Escape is pressed + (you can override this by replacing it with your own handler). + If you have mulitple ArRobot objects, only create one key handler and attach + it to one robot. + + Alternatively, you can call checkKeys() periodically to check for new key input. + + @ingroup OptionalClasses +**/ + +class ArKeyHandler +{ +public: + /// This object will take over key capture when constructed, and release + /// key capture when destroyed. + AREXPORT ArKeyHandler(bool blocking = false, bool addAriaExitCB = true, + FILE *stream = NULL, + bool takeKeysInConstructor = true); + + /// Destructor. Reseases control of the keyboard and restores state before + /// this key handler was created. + AREXPORT ~ArKeyHandler(); + + /// These are symbols for the non-ascii keys + enum KEY { + UP = 256, ///< Up arrow (keypad or 4 key dirs) + DOWN, ///< Down arrow (keypad or 4 key dirs) + LEFT, ///< Left arrow (keypad or 4 key dirs) + RIGHT, ///< Right arrow (keypad or 4 key dirs) + ESCAPE, ///< Escape key + SPACE, ///< Space key + TAB, ///< Tab key + ENTER, ///< Enter key + BACKSPACE, ///< Backspace key + _StartFKeys, ///< F key offset (internal; don't use). + F1, ///< F1 + F2, ///< F2 + F3, ///< F3 + F4, ///< F4 + F5, ///< F5 (not supported on Windows yet) + F6, ///< F6 (not supported on Windows yet) + F7, ///< F7 (not supported on Windows yet) + F8, ///< F8 (not supported on Windows yet) + F9, ///< F9 (not supported on Windows yet) + F10, ///< F10 (not supported on Windows yet) + F11, ///< F11 (not supported on Windows yet) + F12, ///< F12 (not supported on Windows yet) + _EndFKeys, ///< F key range (internal; don't use) + PAGEUP, ///< Page Up (not supported on Windows yet) + PAGEDOWN, ///< Page Down (not supported on Windows yet) + HOME, ///< Home key (not supported on Windows yet) + END, ///< End key (not supported on Windows yet) + INSERT, ///< Insert key (not supported on Windows yet) + DEL ///< Special delete key (often forward-delete) (not supported on Windows yet) + }; + + /// This adds a keyhandler, when the keyToHandle is hit, functor will fire + AREXPORT bool addKeyHandler(int keyToHandle, ArFunctor *functor); + + /// This removes a key handler, by key + AREXPORT bool remKeyHandler(int keyToHandler); + /// This removes a key handler, by key + AREXPORT bool remKeyHandler(ArFunctor *functor); + + /// Takes the key control over. For internal or special use, since it's + /// called in the constructor. + AREXPORT void takeKeys(bool blocking = false); + + /// Sets stdin back to its original settings, if its been restored + /// it won't read anymore. For internal or special use, since it's + /// called in the destructor. + AREXPORT void restore(void); + + /// intnernal, use addKeyHandler, Checks for keys and handles them + AREXPORT void checkKeys(void); + + /// internal, use addKeyHandler instead... Gets a key from the stdin if ones + /// available, -1 if there aren't any available + AREXPORT int getKey(void); + +protected: +#ifndef WIN32 + int getChar(void); +#endif + + std::map myMap; + bool myBlocking; + + bool myRestored; + ArFunctorC myAriaExitCB; +#ifndef WIN32 + struct termios myOriginalTermios; +#endif + + FILE *myStream; + bool myTookKeys; +}; + + +#endif // ARKEYHANDLER_H diff --git a/Legacy/Aria/include/ArLCDConnector.h b/Legacy/Aria/include/ArLCDConnector.h new file mode 100644 index 0000000..c6408f5 --- /dev/null +++ b/Legacy/Aria/include/ArLCDConnector.h @@ -0,0 +1,226 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLCDCONNECTOR_H +#define ARLCDCONNECTOR_H + +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ariaUtil.h" +#include "ArRobotConnector.h" + +class ArLCDMTX; +class ArRobot; + + + +/// Connect to robot and lcd based on run-time availablitily and command-line arguments +/** + + ArLCDConnector makes a lcd connection either through a serial port + connection, or through a TCP + port (for the simulator or for robots with Ethernet-serial bridge + devices instead of onboard computers). + Normally, it first attempts a TCP connection on + @a localhost port 8101, to use a simulator if running. If the simulator + is not running, then it normally then connects using the serial port + Various connection + parameters are configurable through command-line arguments or in the robot + parameter file. (Though the internal interface used by ARIA to do this is also + available if you need to use it: See addLCD(); otherwise don't use + addLCD(), setupLCD(), etc.). + + When you create your ArLCDConnector, pass it command line parameters via + either the argc and argv variables from main(), or pass it an + ArArgumentBuilder or ArArgumentParser object. (ArArgumentBuilder + is able to obtain command line parameters from a Windows program + that uses WinMain() instead of main()). + ArLCDConnector registers a callback with the global Aria class. Use + Aria::parseArgs() to parse all command line parameters to the program, and + Aria::logOptions() to print out information about all registered command-line parameters. + + The following command-line arguments are checked: + @verbinclude ArLCDConnector_options + + To connect to any lcds that were set up in the robot parameter file or + via command line arguments, call connectLCDs(). If successful, + connectLCDs() will return true and add an entry for each lcd connected + in the ArRobot object's list of lcds. These ArLCDMTX objects can be + accessed from your ArRobot object via ArRobot::findLCD() or ArRobot::getLCDMap(). + + + @since 2.8.0 + + **/ +class ArLCDConnector +{ +public: + /// Constructor that takes argument parser + AREXPORT ArLCDConnector( + ArArgumentParser *parser, + ArRobot *robot, ArRobotConnector *robotConnector, + bool autoParseArgs = true, + ArLog::LogLevel infoLogLevel = ArLog::Verbose, + ArRetFunctor1 *turnOnPowerOutputCB = NULL, + ArRetFunctor1 *turnOffPowerOutputCB = NULL); + /// Destructor + AREXPORT ~ArLCDConnector(void); + /// Connects all the lcds the robot has that should be auto connected + AREXPORT bool connectLCDs(bool continueOnFailedConnect = false, + bool addConnectedLCDsToRobot = true, + bool addAllLCDsToRobot = false, + bool turnOnLCDs = true, + bool powerCycleLCDOnFailedConnect = true); + /// Sets up a lcd to be connected + AREXPORT bool setupLCD(ArLCDMTX *lcd, + int lcdNumber = 1); + /// Connects the lcd synchronously (will take up to a minute) + AREXPORT bool connectLCD(ArLCDMTX *lcd, + int lcdNumber = 1, + bool forceConnection = true); + /// Adds a lcd so parsing will get it + AREXPORT bool addLCD(ArLCDMTX *lcd, + int lcdNumber = 1); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Internal function to get the lcd (only useful between parseArgs and connectLCDs) + AREXPORT ArLCDMTX *getLCD(int lcdNumber); + + /// Internal function to replace the lcd (only useful between parseArgs and connectLCDs) but not the lcd data + AREXPORT bool replaceLCD(ArLCDMTX *lcd, int lcdNumber); + + AREXPORT void turnOnPowerCB (int); + AREXPORT void turnOffPowerCB (int); + + AREXPORT void setIdentifier(const char *identifier); + +protected: +/// Class that holds information about the lcd data +class LCDData +{ + public: + LCDData (int number, ArLCDMTX *lcd) { + myNumber = number; + myLCD = lcd; + myConn = NULL; + myConnect = false; myConnectReallySet = false; + myPort = NULL; + myPortType = NULL; + myType = NULL; + myRemoteTcpPort = 0; myRemoteTcpPortReallySet = false; + myBaud = NULL; + myAutoConn = NULL; + myConnFailOption = NULL; + } + virtual ~LCDData() {} + /// The number of this lcd + int myNumber; + /// The actual pointer to this lcd + ArLCDMTX *myLCD; + // our connection + ArDeviceConnection *myConn; + // if we want to connect the lcd + bool myConnect; + // if myConnect was really set + bool myConnectReallySet; + // the port we want to connect the lcd on + const char *myPort; + // the type of port we want to connect to the lcd on + const char *myPortType; + // lcd Type + const char *myType; + // wheather to auto conn + const char *myAutoConn; + // wheather to disconnect on conn faiure + const char *myConnFailOption; + // lcd tcp port if we're doing a remote host + int myRemoteTcpPort; + // if our remote lcd tcp port was really set + bool myRemoteTcpPortReallySet; + /// the baud we want to use + const char *myBaud; +}; + + std::map myLCDs; + + /// Turns on the power for the specific board in the firmware + AREXPORT bool turnOnPower(LCDData *LCDData); + + /// Turns off the power for the specific board in the firmware + AREXPORT bool turnOffPower(LCDData *LCDData); + + /// Verifies the firmware version on the LCD and loads new firmware + /// if there is no match + AREXPORT bool verifyFirmware(LCDData *LCDData); + + AREXPORT std::string searchForFile( + const char *dirToLookIn, const char *prefix, const char *suffix); + + + /// Parses the lcd arguments + AREXPORT bool parseLCDArgs(ArArgumentParser *parser, + LCDData *lcdData); + /// Logs the lcd command line option help text. + AREXPORT void logLCDOptions(LCDData *lcddata, bool header = true, bool metaOpts = true) const; + // Sets the lcd parameters + bool internalConfigureLCD(LCDData *lcdData); + + std::string myLCDTypes; + + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + // if we should autoparse args or toss errors + bool myAutoParseArgs; + bool myParsedArgs; + + ArRobot *myRobot; + ArRobotConnector *myRobotConnector; + + // variables to hold if we're logging or not + bool myLCDLogPacketsReceived; + bool myLCDLogPacketsSent; + + ArLog::LogLevel myInfoLogLevel; + + ArRetFunctor1 *myTurnOnPowerOutputCB; + ArRetFunctor1 *myTurnOffPowerOutputCB; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; + + ArFunctor1C myTurnOnPowerCB; + ArFunctor1C myTurnOffPowerCB; + +}; + +#endif // ARLASERCONNECTOR_H diff --git a/Legacy/Aria/include/ArLCDMTX.h b/Legacy/Aria/include/ArLCDMTX.h new file mode 100644 index 0000000..9824beb --- /dev/null +++ b/Legacy/Aria/include/ArLCDMTX.h @@ -0,0 +1,373 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLCDMTX_H +#define ARLCDMTX_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctor.h" +#include "ArRobot.h" +#include "ArRobotPacket.h" +#include "ArRobotConnector.h" + + + +// Packets are in the format of +// 2 bytes header (0xfa 0xba) +// 1 byte length +// 1 byte command +// xx bytes command specific / args +// 2 bytes checksum +// + +/** Interface to LCD interface panel on an MTX-type robot. + + This interface can be used to display text strings on the MTX LCD panel. + One or more ArLCDMTX objects are automatically created by + ArRobotConnector (or ArLCDConnector if used separately from + ArRobotConnector) if connecting to an MTX robot, and a successful + connection to the LCD panel was also made. A pointer + to the first ArLCDMTX object can be obtained via ArRobot::findLCD(), + passing an index of 1. + + @since 2.8.0 + @ingroup MTX +*/ +class ArLCDMTX : public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArLCDMTX( + int lcdBoardNum = 0, + const char * name = "MTXLCD", + ArDeviceConnection *conn = NULL, + ArRobot *robot = NULL); + /// Destructor + AREXPORT virtual ~ArLCDMTX(); + + // Grabs the new readings from the robot and adds them to the buffers + // (Primarily for internal use.) + //AREXPORT void processReadings(void); + + AREXPORT int getBoardNum(void) + { return myBoardNum; } + + /// Sets the robot pointer, also attaches its process function to the + /// robot as a Sensor Interpretation task. + AREXPORT virtual void setRobot(ArRobot *robot); + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + AREXPORT virtual bool blockingConnect(bool sendTracking, bool recvTracking, + int lcdNumber, ArFunctor1 *onCallback, + ArFunctor1 *offCallback); + AREXPORT virtual bool disconnect(void); + AREXPORT virtual bool isConnected(void) { return myIsConnected; } + AREXPORT virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + + + /// Lock this device + AREXPORT virtual int lockDevice() { return(myDeviceMutex.lock());} + /// Try to lock this device + AREXPORT virtual int tryLockDevice() {return(myDeviceMutex.tryLock());} + /// Unlock this device + AREXPORT virtual int unlockDevice() {return(myDeviceMutex.unlock());} + + AREXPORT virtual const char *getName(void) const; + + AREXPORT void setInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + + /// Gets the default port type for the lcd + const char *getDefaultPortType(void) { return myDefaultPortType.c_str(); } + + /// Gets the default port type for the lcd + const char *getDefaultTcpPort(void) { return myDefaultTcpPort.c_str(); } + + AREXPORT bool verifyFwVersion(); + + + /// Sets the numter of seconds without a response until connection assumed lost + AREXPORT virtual void setConnectionTimeoutSeconds(double seconds) + { ArLog::log(ArLog::Normal, + "%s::setConnectionTimeoutSeconds: Setting timeout to %g secs", + getName(), seconds); + myTimeoutSeconds = seconds; } + /// Gets the number of seconds without a response until connection assumed lost + AREXPORT virtual double getConnectionTimeoutSeconds(void) + {return myTimeoutSeconds; } + /// check for lost connections + AREXPORT bool checkLostConnection(void); + /// disconnect + AREXPORT void disconnectOnError(void); + /// Gets the time data was last receieved + ArTime getLastReadingTime(void) { return myLastReading; } + /// Gets the number of lcd readings received in the last second + AREXPORT int getReadingCount(void); + // Function called in sensorInterp to indicate that a + // reading was received + + /// Adds a callback for when disconnection happens because of an error + void addDisconnectOnErrorCB(ArFunctor *functor, + int position = 51) + { myDisconnectOnErrorCBList.addCallback(functor, position); } + + /// Removes a callback for when disconnection happens because of an error + void remDisconnectOnErrorCB(ArFunctor *functor) + { myDisconnectOnErrorCBList.remCallback(functor); } + + const char *getFirmwareVersion(void) const + { return myFirmwareVersion.c_str(); } + + + /// exposed routines to set the various screen status(s) text + /// size is limited to 247 characters... supports new lines (it + /// can show up to 6 lines, with roughly 22-26 chars per line) + + AREXPORT bool setMTXLCDMainScreenText(const char *status); + // we just have one text on the status now + //AREXPORT bool setMTXLCDMainScreenMode(const char *status); + AREXPORT bool setMTXLCDBootScreenText(const char *status); + + // get routines + enum Screens { + BOOT_SCREEN=0x00, + STATUS_SCREEN=0x01 + }; + + // only 2 valid screen numbers + AREXPORT bool setMTXLCDScreenNumber(unsigned char screenNumber); + + // sets backlight on/off + AREXPORT bool setMTXLCDBackLight(bool backLight); + + void setIdentifier(const char *identifier); + + /// internal call (don't use it) that updates from the calling thread instead of the correct thread + AREXPORT bool internalMTXLCDOverrideMainScreenText(const char *status); + /// internal call (don't use it) that updates from the calling thread instead of the correct thread + AREXPORT bool internalMTXLCDOverrideBootScreenText(const char *status); + /// internal call (don't use it) that updates from the calling thread instead of the correct thread + AREXPORT bool internalMTXLCDOverrideBacklight(bool backlight); +protected: + + /// Logs the information about the sensor + AREXPORT void log(void); + + AREXPORT void writeToLCD(); + + AREXPORT bool setMainStatus(const char *status); + AREXPORT bool setTextStatus(const char *status); + AREXPORT bool setRobotIdStatus(const char *status); + AREXPORT bool setRobotIPStatus(const char *status); + AREXPORT bool setBootStatus(const char *status); + AREXPORT bool getMainStatus(const char *status); + AREXPORT bool getTextStatus(const char *status); + AREXPORT bool getBootStatus(const char *status); + + + AREXPORT bool sendKeepAlive(); + AREXPORT bool sendVersion(); + AREXPORT bool sendSystemInfo(unsigned char command); + AREXPORT bool sendReboot(); + + AREXPORT bool getScreenNumber(unsigned char *currentScreenNumber); + + AREXPORT bool getTextField(unsigned char textNumber, char *text); + AREXPORT bool getBacklight(unsigned char *backlight); + AREXPORT bool getSystemMeters(unsigned char *battery, unsigned char *wifi); + + + // set routines + AREXPORT bool setTextField(unsigned char textNumber, const char *text); + AREXPORT bool setBacklight(bool backlight); + AREXPORT bool setSystemMeters(unsigned char battery, unsigned char wifi); + AREXPORT bool setScreenNumber(unsigned char screenNumber); + + AREXPORT unsigned char getBatteryPercentage(); + AREXPORT unsigned char getWifiPercentage(); + + AREXPORT void getIpAddress(); + + + AREXPORT virtual void internalGotReading(void); + + ArDeviceConnection *myConn; + std::string myName; + std::string myDefaultPortType; + std::string myDefaultTcpPort; + + double myTimeoutSeconds; + bool myRobotRunningAndConnected; + bool myConnFailOption; + + ArTime myLastReading; + + // packet count + time_t myTimeLastReading; + int myReadingCurrentCount; + int myReadingCount; + + ArCallbackList myDisconnectOnErrorCBList; + + ArRobot *myRobot; + ArFunctorC myProcessCB; + + AREXPORT virtual void lcdSetName(const char *name); + AREXPORT virtual void * runThread(void *arg); + + AREXPORT bool downloadFirmware(); + AREXPORT std::string searchForFile( + const char *dirToLookIn, const char *prefix, const char *suffix); + + + void sensorInterp(void); + void failedToConnect(void); + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + std::string myRobotIdentifier; + bool myRobotIdentifierChanged; + + bool myOnCharger; + ArRobot::ChargeState myChargeState; + + int myBoardNum; + unsigned char myVersion; + + ArLog::LogLevel myLogLevel; + +enum Headers { + HEADER1=0xfa, + HEADER2=0xcd + +// old value HEADER2=0x5c + }; + + ArRobotPacketReceiver *myReceiver; + ArRobotPacketSender *mySender; + + ArMutex myPacketsMutex; + ArMutex myDataMutex; + ArMutex myDeviceMutex; + + ArLog::LogLevel myInfoLogLevel; + + std::list myPackets; + + ArTime myPrevLCDIntTime; + + bool myRequestedSysInfoLCDPackets; + bool myRequestedCellInfoLCDPackets; + + bool mySendTracking; + bool myRecvTracking; + +// Protocol Commands + + +enum Commands { + KEEP_ALIVE=0x00, + VERSION=0x01, + SYSTEM_INFO=0x02, + REBOOT=0x03, + GET_CURRENT_SCREEN_NUM=0x10, + GET_TEXT_FIELD=0x11, + GET_BACKLIGHT=0x12, + GET_SYSTEM_METERS=0x13, + SET_SCREEN_NUM=0x20, + SET_TEXT_FIELD=0x21, + SET_BACKLIGHT=0x22, + SET_BATTERY_WIFI=0x23 + }; + + + +enum TextNumbers { + BOOT_STATUS_TEXT=0x00, + MAIN_STATUS_TEXT=0x01, + MODE_TEXT=0x02, + ROBOT_ID_TEXT=0x03, + ROBOT_IP_TEXT=0x04 + }; + + +enum SYS_INFO { + SYS_INFO_STOP=0x00, + SYS_INFO_ONCE=0x01, + SYS_INFO_CONTINUOUS=0x02 + }; + + // System Info + unsigned char myId; + std::string myFirmwareVersion; + unsigned int mySerialNumber; + long long myCurrentTime; + unsigned char myCurrentScreen; + unsigned char myStatusFlags; + + // end system info + + std::string myNewFwFile; + + bool myScreenNumberChanged; + unsigned char myChangedScreenNumber; + + bool myBootTextChanged; + char myChangedBootText[248]; + + bool myMainScreenStatusChanged; + char myChangedStatusText[248]; + + bool myMainScreenModeChanged; + char myChangedModeText[248]; + + bool myBackLightChanged; + bool myChangedBackLight; + + std::string myIpAddress; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; + +}; + + + +#endif // ARLCDMTX_H diff --git a/Legacy/Aria/include/ArLMS1XX.h b/Legacy/Aria/include/ArLMS1XX.h new file mode 100644 index 0000000..379fec3 --- /dev/null +++ b/Legacy/Aria/include/ArLMS1XX.h @@ -0,0 +1,256 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLMS1XX_H +#define ARLMS1XX_H + +#include "ariaTypedefs.h" +#include "ArRobotPacket.h" +#include "ArLaser.h" +#include "ArFunctor.h" + +/** @internal */ +class ArLMS1XXPacket : public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArLMS1XXPacket(); + /// Destructor + AREXPORT virtual ~ArLMS1XXPacket(); + + /// Gets the command type + AREXPORT const char *getCommandType(void); + /// Gets the command name + AREXPORT const char *getCommandName(void); + + // only call finalizePacket before a send + AREXPORT virtual void finalizePacket(void); + AREXPORT virtual void resetRead(void); + + /// Gets the time the packet was received at + AREXPORT ArTime getTimeReceived(void); + /// Sets the time the packet was received at + AREXPORT void setTimeReceived(ArTime timeReceived); + + AREXPORT virtual void duplicatePacket(ArLMS1XXPacket *packet); + AREXPORT virtual void empty(void); + + AREXPORT virtual void byteToBuf(ArTypes::Byte val); + AREXPORT virtual void byte2ToBuf(ArTypes::Byte2 val); + AREXPORT virtual void byte4ToBuf(ArTypes::Byte4 val); + AREXPORT virtual void uByteToBuf(ArTypes::UByte val); + AREXPORT virtual void uByte2ToBuf(ArTypes::UByte2 val); + AREXPORT virtual void uByte4ToBuf(ArTypes::UByte4 val); + AREXPORT virtual void strToBuf(const char *str); + + AREXPORT virtual ArTypes::Byte bufToByte(void); + AREXPORT virtual ArTypes::Byte2 bufToByte2(void); + AREXPORT virtual ArTypes::Byte4 bufToByte4(void); + AREXPORT virtual ArTypes::UByte bufToUByte(void); + AREXPORT virtual ArTypes::UByte2 bufToUByte2(void); + AREXPORT virtual ArTypes::UByte4 bufToUByte4(void); + AREXPORT virtual void bufToStr(char *buf, int len); + + // adds a raw char to the buf + AREXPORT virtual void rawCharToBuf(unsigned char c); +protected: + int deascii(char c); + + ArTime myTimeReceived; + bool myFirstAdd; + + char myCommandType[1024]; + char myCommandName[1024]; +}; + + +/// Given a device connection it receives packets from the sick through it +/// @internal +class ArLMS1XXPacketReceiver +{ +public: + /// Constructor with assignment of a device connection + AREXPORT ArLMS1XXPacketReceiver(); + /// Destructor + AREXPORT virtual ~ArLMS1XXPacketReceiver(); + + /// Receives a packet from the robot if there is one available + AREXPORT ArLMS1XXPacket *receivePacket(unsigned int msWait = 0, + bool shortcut = false, + bool ignoreRemainders = false); + + AREXPORT ArLMS1XXPacket *receiveTiMPacket(unsigned int msWait = 0, + bool shortcut = false, + bool ignoreRemainders = false); + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + // PS - added to pass info to this class + AREXPORT void setmyInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + AREXPORT void setLaserModel(int laserModel) + { myLaserModel = laserModel; } + AREXPORT void setmyName(const char *name ) + { strcpy(myName, name); } + AREXPORT void setReadTimeout(int timeout ) + { myReadTimeout = timeout; } + + +protected: + ArDeviceConnection *myConn; + ArLMS1XXPacket myPacket; + + enum State + { + STARTING, ///< Looking for beginning + DATA, ///< Read the data in a big whack + REMAINDER ///< Have extra data from reading in data + }; + State myState; + char myName[1024]; + unsigned int myNameLength; + char myReadBuf[100000]; + int myReadCount; + int myReadTimeout; + + int myLaserModel; + + ArLog::LogLevel myInfoLogLevel; +}; + +/** + @since Aria 2.7.2 + @see ArLaserConnector + Use ArLaserConnector to connect to a laser, determining type based on robot and program configuration parameters. + + This is the ArLaser implementation for SICK LMS1xx, LMS5xx, and TiM3xx lasers. To use these lasers with ArLaserConnector, specify + the appropriate type in program configuration (lms1xx, lms6xx, or tim3xx). +*/ +class ArLMS1XX : public ArLaser +{ +public: + + enum LaserModel + { + LMS1XX, + LMS5XX, + TiM3XX + }; + + /// Constructor + AREXPORT ArLMS1XX(int laserNumber, + const char *name, + LaserModel laserModel); + + /// Destructor + AREXPORT ~ArLMS1XX(); + AREXPORT virtual bool blockingConnect(void); + + // specific init routine per laser + AREXPORT virtual bool lms5xxConnect(void); + AREXPORT virtual bool lms1xxConnect(void); + AREXPORT virtual bool tim3xxConnect(void); + + AREXPORT virtual bool asyncConnect(void); + AREXPORT virtual bool disconnect(void); + AREXPORT virtual bool isConnected(void) { return myIsConnected; } + AREXPORT virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + + /// Logs the information about the sensor + AREXPORT void log(void); + + +protected: + AREXPORT virtual void laserSetName(const char *name); + AREXPORT virtual void * runThread(void *arg); + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT ArLMS1XXPacket *sendAndRecv( + ArTime timeout, ArLMS1XXPacket *sendPacket, const char *recvName); + void sensorInterp(void); + void failedToConnect(void); + void clear(void); + bool validateCheckSum(ArLMS1XXPacket *packet); + + LaserModel myLaserModel; + //bool myIsLMS5XX; + + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + int myScanFreq; + + int myVersionNumber; + int myDeviceNumber; + int mySerialNumber; + int myDeviceStatus1; + int myDeviceStatus2; + int myMessageCounter; + int myScanCounter; + int myPowerUpDuration; + int myTransmissionDuration; + int myInputStatus1; + int myInputStatus2; + int myOutputStatus1; + int myOutputStatus2; + int myReserved; + int myScanningFreq; + int myMeasurementFreq; + int myNumberEncoders; + int myNumChans16Bit; + int myNumChans8Bit; + int myFirstReadings; + int myYear; + int myMonth; + int myMonthDay; + int myHour; + int myMinute; + int mySecond; + int myUSec; + + ArLog::LogLevel myLogLevel; + + ArLMS1XXPacketReceiver myReceiver; + + ArMutex myPacketsMutex; + ArMutex myDataMutex; + + std::list myPackets; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; +}; + +#endif diff --git a/Legacy/Aria/include/ArLMS2xx.h b/Legacy/Aria/include/ArLMS2xx.h new file mode 100644 index 0000000..dd62711 --- /dev/null +++ b/Legacy/Aria/include/ArLMS2xx.h @@ -0,0 +1,231 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLMS2XX_H +#define ARLMS2XX_H + + +#include "ariaTypedefs.h" +#include "ArLMS2xxPacket.h" +#include "ArLMS2xxPacketReceiver.h" +#include "ArRobotPacket.h" +#include "ArLaser.h" +#include "ArFunctor.h" +#include "ArCondition.h" + +/// Interface to a SICK LMS-200 laser range device +/** + * This class processes incoming data from a SICK LMS-200 + * laser rangefinding device in a background thread, and provides + * it through the standard ArRangeDevice API, to be used via ArRobot + * (see ArRobot::addRangeDevice()), used by an ArAction, or used directly. + * + * An ArSick instance must be connected to the laser through a serial port + * (or simulator): the typical procedure is to allow your ArSimpleConnector + * to configure the laser based on the robot connection type and command + * line parameters; then initiate the ArSick background thread; and finally + * connect ArSick to the laser device. + * For example: + * @code + * ArRobot robot; + * ArSick laser; + * ArSimpleConnector connector(...); + * ... + * Setup the simple connector and connect to the robot -- + * see the example programs. + * ... + * connector.setupLaser(&laser); + * laser.runAsync(); + * if(!laser.blockingConnect()) + * { + * // Error... + * ... + * } + * ... + * @endcode + * + * The most important methods in this class are the constructor, runAsync(), + * blockingConnect(), getSensorPosition(), isConnected(), addConnectCB(), + * asyncConnect(), configure(), in addition to the ArRangeDevice interface. + * + * @note The "extra int" on the raw readings returned by + * ArRangeDevice::getRawReadings() is like other laser + * devices and is the reflectance value, if enabled, ranging between 0 and 255. + * + * ArLMS2xx uses the following buffer parameters by default (see ArRangeDevice + * documentation): + *
+ *
MinDistBetweenCurrent
50 mm + *
MaxDistToKeepCumulative
6000 mm + *
MinDistBetweenCumulative
200 mm + *
MaxSecondsToKeepCumulative
30 sec + *
MaxINsertDistCumulative
3000 mm + *
+ * The current buffer is replaced for each new set of readings. + * + * @since 2.7.0 +**/ +class ArLMS2xx : public ArLaser +{ +public: + /// Constructor + AREXPORT ArLMS2xx(int laserNumber, + const char *name = "lms2xx", + bool appendLaserNumberToName = true); + + /// Destructor + AREXPORT virtual ~ArLMS2xx(); + + /// Connect to the laser while blocking + AREXPORT virtual bool blockingConnect(void); + /// Connect to the laser asyncronously + AREXPORT bool asyncConnect(void); + /// Disconnect from the laser + AREXPORT virtual bool disconnect(void); + /// Sees if this is connected to the laser + AREXPORT virtual bool isConnected(void) + { if (myState == STATE_CONNECTED) return true; else return false; } + AREXPORT virtual bool isTryingToConnect(void) + { + if (myState != STATE_CONNECTED && myState != STATE_NONE) + return true; + else if (myStartConnect) + return true; + else + return false; + } + + /// Sets the device connection + AREXPORT virtual void setDeviceConnection(ArDeviceConnection *conn); + + /** The internal function used by the ArRangeDeviceThreaded + * @internal + */ + AREXPORT virtual void * runThread(void *arg); + AREXPORT virtual void setRobot(ArRobot *robot); +protected: + // The packet handler for when connected to the simulator + AREXPORT bool simPacketHandler(ArRobotPacket * packet); + // The function called if the laser isn't running in its own thread and isn't simulated + AREXPORT void sensorInterpCallback(void); + // An internal function for connecting to the sim + AREXPORT bool internalConnectSim(void); + /// An internal function, single loop event to connect to laser + AREXPORT int internalConnectHandler(void); + // The internal function which processes the sickPackets + AREXPORT void processPacket(ArLMS2xxPacket *packet, ArPose pose, + ArPose encoderPose, unsigned int counter, + bool deinterlace, ArPose deinterlaceDelta); + // The internal function that gets does the work + AREXPORT void runOnce(bool lockRobot); + // Internal function, shouldn't be used, drops the conn because of error + AREXPORT void dropConnection(void); + // Internal function, shouldn't be used, denotes the conn failed + AREXPORT void failedConnect(void); + // Internal function, shouldn't be used, does the after conn stuff + AREXPORT void madeConnection(void); + + /// Internal function that gets whether the laser is simulated or not (just for the old ArSick) + AREXPORT bool sickGetIsUsingSim(void); + + /// Internal function that sets whether the laser is simulated or not (just for the old ArSick) + AREXPORT void sickSetIsUsingSim(bool usingSim); + + /// internal function to runOnRobot so that ArSick can do that while this class won't + AREXPORT bool internalRunOnRobot(void); + + /// Finishes getting the unset parameters from the robot then + /// setting some internal variables that need it + bool finishParams(void); + + AREXPORT virtual bool laserCheckParams(void); + + AREXPORT virtual void laserSetName(const char *name); + + enum State { + STATE_NONE, ///< Nothing, haven't tried to connect or anything + STATE_INIT, ///< Initializing the laser + STATE_WAIT_FOR_POWER_ON, ///< Waiting for power on + STATE_CHANGE_BAUD, ///< Change the baud, no confirm here + STATE_CONFIGURE, ///< Send the width and increment to the laser + STATE_WAIT_FOR_CONFIGURE_ACK, ///< Wait for the configuration Ack + STATE_INSTALL_MODE, ///< Switch to install mode + STATE_WAIT_FOR_INSTALL_MODE_ACK, ///< Wait until its switched to install mode + STATE_SET_MODE, ///< Set the mode (mm/cm) and extra field bits + STATE_WAIT_FOR_SET_MODE_ACK, ///< Waiting for set-mode ack + STATE_START_READINGS, ///< Switch to monitoring mode + STATE_WAIT_FOR_START_ACK, ///< Waiting for the switch-mode ack + STATE_CONNECTED ///< We're connected and getting readings + }; + /// Internal function for switching states + AREXPORT void switchState(State state); + State myState; + ArTime myStateStart; + ArFunctorC myRobotConnectCB; + ArRetFunctor1C mySimPacketHandler; + ArFunctorC mySensorInterpCB; + std::list::iterator myIter; + bool myStartConnect; + bool myRunningOnRobot; + + // range buffers to hold current range set and assembling range set + std::list *myAssembleReadings; + std::list *myCurrentReadings; + + bool myProcessImmediately; + bool myInterpolation; + // list of packets, so we can process them from the sensor callback + std::list myPackets; + + // these two are just for the sim packets + unsigned int myWhichReading; + unsigned int myTotalNumReadings; + + // some variables so we don't have to do a tedios if every time + double myOffsetAmount; + double myIncrementAmount; + + // packet stuff + ArLMS2xxPacket myPacket; + bool myUseSim; + + int myNumReflectorBits; + bool myInterlaced; + + // stuff for the sim packet + ArPose mySimPacketStart; + ArTransform mySimPacketTrans; + ArTransform mySimPacketEncoderTrans; + unsigned int mySimPacketCounter; + + // connection + ArLMS2xxPacketReceiver myLMS2xxPacketReceiver; + + ArMutex myStateMutex; + ArRetFunctorC myAriaExitCB; +}; + + +#endif diff --git a/Legacy/Aria/include/ArLMS2xxPacket.h b/Legacy/Aria/include/ArLMS2xxPacket.h new file mode 100644 index 0000000..18d89b9 --- /dev/null +++ b/Legacy/Aria/include/ArLMS2xxPacket.h @@ -0,0 +1,87 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLMS2XXPACKET_H +#define ARLMS2XXPACKET_H + +#include "ariaTypedefs.h" +#include "ArBasePacket.h" +#include "ariaUtil.h" + +/// Represents the packets sent to the LMS2xx as well as those received from it +/** + This class reimplements some of the buf operations since the robot is + little endian. + + You can just look at the documentation for the ArBasePacket except + for these functions here, setAddress, getAddress, verifyCheckSum, + print, getID, and calcCheckSum. +*/ + +class ArLMS2xxPacket: public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArLMS2xxPacket(unsigned char sendingAddress = 0); + /// Destructor + AREXPORT virtual ~ArLMS2xxPacket(); + + /// Sets the address to send this packet to (only use for sending) + AREXPORT void setSendingAddress(unsigned char address); + + /// Sets the address to send this packet to (only use for sending) + AREXPORT unsigned char getSendingAddress(void); + + /// Gets the address this packet was sent from (only use for receiving) + AREXPORT unsigned char getReceivedAddress(void); + + /// returns true if the crc matches what it should be + AREXPORT bool verifyCRC(void); + + /// returns the ID of the packet (first byte of data) + AREXPORT ArTypes::UByte getID(void); + + /// returns the crc, probably used only internally + AREXPORT ArTypes::Byte2 calcCRC(void); + + // only call finalizePacket before a send + AREXPORT virtual void finalizePacket(void); + AREXPORT virtual void resetRead(void); + + /// Gets the time the packet was received at + AREXPORT ArTime getTimeReceived(void); + /// Sets the time the packet was received at + AREXPORT void setTimeReceived(ArTime timeReceived); + + /// Duplicates the packet + AREXPORT virtual void duplicatePacket(ArLMS2xxPacket *packet); +protected: + ArTime myTimeReceived; + unsigned char mySendingAddress; +}; + +typedef ArLMS2xxPacket ArSickPacket; + +#endif // ARSICKPACKET_H diff --git a/Legacy/Aria/include/ArLMS2xxPacketReceiver.h b/Legacy/Aria/include/ArLMS2xxPacketReceiver.h new file mode 100644 index 0000000..0611b2d --- /dev/null +++ b/Legacy/Aria/include/ArLMS2xxPacketReceiver.h @@ -0,0 +1,71 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLMS2XXPACKETRECEIVER_H +#define ARLMS2XXPACKETRECEIVER_H + +#include "ariaTypedefs.h" +#include "ArDeviceConnection.h" +#include "ArLMS2xxPacket.h" + +/// Given a device connection it receives packets from the sick through it +class ArLMS2xxPacketReceiver +{ +public: + /// Constructor without an already assigned device connection + AREXPORT ArLMS2xxPacketReceiver(unsigned char receivingAddress = 0, + bool allocatePackets = false, + bool useBase0Address = false); + /// Constructor with assignment of a device connection + AREXPORT ArLMS2xxPacketReceiver(ArDeviceConnection *deviceConnection, + unsigned char receivingAddress = 0, + bool allocatePackets = false, + bool useBase0Address = false); + /// Destructor + AREXPORT virtual ~ArLMS2xxPacketReceiver(); + + /// Receives a packet from the robot if there is one available + AREXPORT ArLMS2xxPacket *receivePacket(unsigned int msWait = 0); + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *deviceConnection); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + /// Gets whether or not the receiver is allocating packets + AREXPORT bool isAllocatingPackets(void) { return myAllocatePackets; } + +protected: + ArDeviceConnection *myDeviceConn; + bool myAllocatePackets; + ArLMS2xxPacket myPacket; + unsigned char myReceivingAddress; + bool myUseBase0Address; + enum { STATE_START, STATE_ADDR, STATE_START_COUNT, STATE_ACQUIRE_DATA }; +}; + +typedef ArLMS2xxPacketReceiver ArSickPacketReceiver; + +#endif // ARSICKPACKETRECEIVER_H diff --git a/Legacy/Aria/include/ArLaser.h b/Legacy/Aria/include/ArLaser.h new file mode 100644 index 0000000..a5838fe --- /dev/null +++ b/Legacy/Aria/include/ArLaser.h @@ -0,0 +1,761 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRANGEDEVICELASER_H +#define ARRANGEDEVICELASER_H + +#include "ariaTypedefs.h" +#include "ArRangeDeviceThreaded.h" + +class ArDeviceConnection; + + + +/** Range device interface specialized for laser rangefinder sensors. + + This class is a subclass of ArRangeDeviceThreaded meant for any + planar scanning lasers, like the SICK lasers, Hokoyo URG series + lasers, etc. Unlike other base classes this contains the superset + of everything that may need to be configured on any of the sensors, + even though some subclasses may only provide some of those parameters + and features. (This allows the configuration interfaces and parameter + files to work for any laser type.) + + Normally, a program does not define or create any ArLaser objects + directly. Instead, + objects (device-specific subclasses of ArLaser) are created by ArLaserConnector::connectLasers() + based on the robot parameter file and command line arguments, and + the resulting ArLaser objects are stored in the ArRobot object + Use ArRobot::getLaserMap() or ArRobot::findLaser() to access the ArLaser + objects after calling ArLaserConnector::connectLasers(). + + The + canSetDegrees(), canChooseRange(), canSetIncrement(), + canChooseIncrement(), canChooseUnits(), canChooseReflectorBits(), + canSetPowerControlled(), canChooseStartBaud(), and canChooseAutoBaud() and +other similar functions are used by ArLaserConnector to test if a parameter + is relevant to a specific laser type. + + + @par Creating New ArLaser Subclasses + If you want to create your own new class to implement a sensor + not in ARIA, create a subclass of this class. ArUrg + is the best current example of this. + Call the laserAllow* + functions in its constructor depending on what features + that laser sensor has (use the laserAllowSet* functions if it is possible + to set any value in a range, or use the laserAllow*Choices functions if it + is only possible to set specific values). + You may also want to use the override the laserSetName + call so that your own mutexes will get named appropriately. You + can use laserSetDefaultTcpPort to set the default TCP port (which + you should do if the laser normally is connected to over TCP). You + can use laserSetDefaultPortType to the type of port normally used + (so that if a port is passed in we can make a reasonable guess as + to what type, so that people don't always have to pass in a type). + Before you connect you should call laserPullUnsetParams to fill in + the parameters that weren't set explicitly with the default ones in + the .p files. If the maximum range of the laser changes depending + on settings (like on the LMS2xx) you should call + laserSetAbsoluteMaxRange (after you call + laserPullUnsetParamsFromRobot). Implement the blockingConnect, + asyncConnect, disconnect, isConnected, and isTryingToConnect + calls... while calling laserConnect, laserFailedConnect, + laserDisconnectNormally, and laserDisconnectOnError calls to let + the laser base class call the appropriate callbacks. You should + use the laserCheckLostConnection in your runThread to see if the + laser has lost connection (see its documentation for details). + Then after you get your readings call laserProcessReadings to fill + them from the raw buffer into the current and cumulative buffer + (and call the reading callbacks). The internal* calls are all + internal to the base class and shouldn't have to be used by + inheriting classes. After you have created a new laser type you + can add it to Aria by using the Aria::laserAddCreator call and then + it will work like any of the built in laser types (see the + documentation for that function for what the creator needs to do, + and an example is ArLaserCreatorHelper in the ariaUtil.h/cpp + files). Similiarly if you need a new connection type (ie not + serial or tcp) you implement them and then use + Aria::deviceConnectionAddCreator call to add new types so they too + will then be treated the same as the built in Aria ones + (ArDeviceConnectionCreatorHelper in ariaUtil.h/cpp file is the + example for that one). + + @since 2.7.0 + @ingroup ImportantClasses + @ingroup DeviceClasses +**/ + +class ArLaser : public ArRangeDeviceThreaded +{ +public: + /// Constructor + AREXPORT ArLaser(int laserNumber, + const char *name, + unsigned int absoluteMaxRange, + bool locationDependent = false, + bool appendLaserNumberToName = true); + /// Destructor + AREXPORT virtual ~ArLaser(); + + /// Connect to the laser and block for the result + AREXPORT virtual bool blockingConnect(void) = 0; + /// Connect to the laser without blocking + AREXPORT virtual bool asyncConnect(void) = 0; + /// Disconnect from the laser + AREXPORT virtual bool disconnect(void) = 0; + /// See if the laser is connected + AREXPORT virtual bool isConnected(void) = 0; + /// See if the laser is trying to connect + AREXPORT virtual bool isTryingToConnect(void) = 0; + + /// Sets the numter of seconds without a response until connection assumed lost + AREXPORT virtual void setConnectionTimeoutSeconds(double seconds); + /// Gets the number of seconds without a response until connection assumed lost + AREXPORT virtual double getConnectionTimeoutSeconds(void); + + /// Gets the time data was last receieved + ArTime getLastReadingTime(void) { return myLastReading; } + + /// Gets the number of laser readings received in the last second + AREXPORT int getReadingCount(void); + + /// Sets the device connection + AREXPORT virtual void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device connection + AREXPORT virtual ArDeviceConnection *getDeviceConnection(void); + + /// Sets the position of the sensor on the robot + AREXPORT void setSensorPosition(double x, double y, double th, double z = 0); + /// Sets the position of the sensor on the robot + AREXPORT void setSensorPosition(ArPose pose, double z = 0); + /// Gets if the sensor pose has been set + bool hasSensorPosition(void) { return myHaveSensorPose; } + /// Gets the position of the sensor on the robot + ArPose getSensorPosition(void) { return mySensorPose; } + /// Gets the X position of the sensor on the robot + double getSensorPositionX(void) { return mySensorPose.getX(); } + /// Gets the Y position of the sensor on the robot + double getSensorPositionY(void) { return mySensorPose.getY(); } + /// Gets the Z position of the sensor on the robot (0 is unknown) + double getSensorPositionZ(void) { return mySensorZ; } + /// Gets the heading of the sensor on the robot + double getSensorPositionTh(void) { return mySensorPose.getTh(); } + + /// Gets the number of the laser this is + int getLaserNumber(void) { return myLaserNumber; } + + /// Sets the log level that informational things are logged at + void setInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + /// Gets the log level that informational things are logged at + ArLog::LogLevel getInfoLogLevel(void) + { return myInfoLogLevel; } + + /// Cumulative readings that are this close to current beams are discarded + void setCumulativeCleanDist(double dist) + { + myCumulativeCleanDist = dist; + myCumulativeCleanDistSquared = dist * dist; + } + /// Cumulative readings that are this close to current beams are discarded + double getCumulativeCleanDist(void) + { + return myCumulativeCleanDist; + } + /// Cumulative readings are cleaned every this number of milliseconds + void setCumulativeCleanInterval(int milliSeconds) + { + myCumulativeCleanInterval = milliSeconds; + } + /// Cumulative readings are cleaned every this number of milliseconds + int getCumulativeCleanInterval(void) + { + return myCumulativeCleanInterval; + } + /// Offset for cumulative cleaning + void setCumulativeCleanOffset(int milliSeconds) + { + myCumulativeCleanOffset = milliSeconds; + } + /// Gets the offset for cumulative cleaning + int getCumulativeCleanOffset(void) + { + return myCumulativeCleanOffset; + } + /// Resets when the cumulative cleaning happened (so offset can help) + void resetLastCumulativeCleanTime(void) + { + myCumulativeLastClean.setToNow(); + myCumulativeLastClean.addMSec(myCumulativeCleanOffset); + } + + /// Adds a series of degree at which to ignore readings (within 1 degree of nearest integer) + AREXPORT bool addIgnoreReadings(const char *ignoreReadings); + /// Adds a degree at which to ignore readings (within 1 degree of nearest integer) + void addIgnoreReading(double ignoreReading) + { myIgnoreReadings.insert(ArMath::roundInt(ignoreReading)); } + /// Clears the degrees we ignore readings at + void clearIgnoreReadings(void) + { myIgnoreReadings.clear(); } + /// Gets the list of readings that we ignore + const std::set *getIgnoreReadings(void) const + { return &myIgnoreReadings; } + + /// Gets if the laser is flipped or not + bool getFlipped(void) { return myFlipped; } + /// Sets if the laser is flipped or not + bool setFlipped(bool flipped) { myFlipped = flipped; return true; } + + /// Gets the default TCP port for the laser + int getDefaultTcpPort(void) { return myDefaultTcpPort; } + + /// Gets the default port type for the laser + const char *getDefaultPortType(void) { return myDefaultPortType.c_str(); } + + /// Sees if this class can set the degrees with doubles or not + /** + Gets if this class can set the start and end degrees with doubles. + + If so, you can use getStartDegreesMin and getStartDegreesMax to see + the valid values that you can use with setStartDegrees (and see + what was set with getStartDegrees), and getEndDegreesMin and + getEndDegreesMax to see the valid values that you can use with + setEndDegrees (and see what was set with getEndDegrees). + + **/ + bool canSetDegrees(void) { return myCanSetDegrees; } + + /// Gets the minimum value for the start angle + /** @see canSetDegrees **/ + double getStartDegreesMin(void) { return myStartDegreesMin; } + /// Gets the maximum value for the start angle + /** @see canSetDegrees **/ + double getStartDegreesMax(void) { return myStartDegreesMax; } + /// Gets the start angle + /** @see canSetDegrees **/ + double getStartDegrees(void) { return myStartDegrees; } + /// Sets the start angle, it must be between getStartDegreesMin and getStartDegreesMax + /** @see canSetDegrees **/ + AREXPORT bool setStartDegrees(double startDegrees); + /// Gets the minimum value for the end angle + /** @see canSetDegrees **/ + double getEndDegreesMin(void) { return myEndDegreesMin; } + /// Gets the maximum value for the end angle + /** @see canSetDegrees **/ + double getEndDegreesMax(void) { return myEndDegreesMax; } + /// Gets the end angle + /** @see canSetDegrees **/ + double getEndDegrees(void) { return myEndDegrees; } + /// Sets the end angle, it must be between getEndDegreesMin and getEndDegreesMax + /** @see canSetDegrees **/ + AREXPORT bool setEndDegrees(double endDegrees); + + + /** + Gets if you can choose the number of degrees + + If so, you can call chooseDegrees with one of the strings from + getDegreesChoices, and get the degrees chosen as a string with + getDegreesChoice or get the degrees chosen as a double with + getDegreesChoiceDouble. + **/ + bool canChooseDegrees(void) { return myCanChooseDegrees; } + /// Gets the list of range choices + /** @see canChooseDegrees **/ + std::list getDegreesChoices(void) + { return myDegreesChoicesList; } + /// Gets a string with the list of degrees choices seperated by |s + /** @see canChooseDegrees **/ + const char *getDegreesChoicesString(void) + { return myDegreesChoicesString.c_str(); } + /// Sets the range to one of the choices from getDegreesChoices + /** @see canChooseDegrees **/ + AREXPORT bool chooseDegrees(const char *range); + /// Gets the range that was chosen + /** @see canChooseDegrees **/ + const char *getDegreesChoice(void) + { return myDegreesChoice.c_str(); } + /// Gets the range that was chosen as a double + /** @see canChooseDegrees **/ + double getDegreesChoiceDouble(void) { return myDegreesChoiceDouble; } + /// Gets the map of degrees choices to what they mean + /** + This is mostly for the simulated laser + @see canChooseDegrees + @internal + **/ + std::map getDegreesChoicesMap(void) + { return myDegreesChoices; } + + + /** + Gets if you can set an increment + + **/ + bool canSetIncrement(void) { return myCanSetIncrement; } + /// Gets the increment minimum + /** @see canSetIncrement **/ + double getIncrementMin(void) { return myIncrementMin; } + /// Gets the increment maximum + /** @see canSetIncrement **/ + double getIncrementMax(void) { return myIncrementMax; } + /// Gets the increment + /** @see canSetIncrement **/ + double getIncrement(void) { return myIncrement; } + /// Sets the increment + /** @see canSetIncrement **/ + AREXPORT bool setIncrement(double increment); + + /** + Gets if you can choose an increment. + + If so, call chooseIncrement with one of the choices in + getIncrementChoices, and get the choice as a string with + getIncrementChoice or the choice as a string with + getIncrementChoiceDouble. + **/ + bool canChooseIncrement(void) { return myCanChooseIncrement; } + /// Gets the list of increment choices + /** @see canChooseIncrement **/ + std::list getIncrementChoices(void) + { return myIncrementChoicesList; } + /// Gets a string with the list of increment choices seperated by |s + /** @see canChooseIncrement **/ + const char *getIncrementChoicesString(void) + { return myIncrementChoicesString.c_str(); } + /// Sets the increment to one of the choices from getIncrementChoices + /** @see canChooseIncrement **/ + AREXPORT bool chooseIncrement(const char *increment); + /// Gets the increment that was chosen + /** @see canChooseIncrement **/ + const char *getIncrementChoice(void) { return myIncrementChoice.c_str(); } + /// Gets the increment that was chosen as a double + /** @see canChooseIncrement **/ + double getIncrementChoiceDouble(void) { return myIncrementChoiceDouble; } + /// Gets the map of increment choices to what they mean + /** + This is mostly for the simulated laser + @see canChooseIncrement + @internal + **/ + std::map getIncrementChoicesMap(void) + { return myIncrementChoices; } + + /** + Gets if you can choose units for the laser. + + If so, call chooseUnits with one of the choices in + getUnitsChoices, and see what the choice was with + getUnitsChoice. + **/ + bool canChooseUnits(void) { return myCanChooseUnits; } + /// Gets the list of units choices + /** @see canChooseUnits **/ + std::list getUnitsChoices(void) + { return myUnitsChoices; } + /// Gets a string with the list of units choices seperated by |s + /** @see canChooseUnits **/ + const char *getUnitsChoicesString(void) + { return myUnitsChoicesString.c_str(); } + /// Sets the units to one of the choices from getUnitsChoices + /** @see canChooseUnits **/ + AREXPORT bool chooseUnits(const char *units); + /// Gets the units that was chosen + /** @see canChooseUnits **/ + const char *getUnitsChoice(void) { return myUnitsChoice.c_str(); } + + /** + Gets if you can choose reflectorBits for the laser. + + If so, call chooseReflectorBits with one of the choices in + getReflectorBitsChoices, and see what the choice was with + getReflectorBitsChoice. + **/ + bool canChooseReflectorBits(void) { return myCanChooseReflectorBits; } + /// Gets the list of reflectorBits choices + /** @see canChooseReflectorBits **/ + std::list getReflectorBitsChoices(void) + { return myReflectorBitsChoices; } + /// Gets a string with the list of reflectorBits choices seperated by |s + /** @see canChooseReflectorBits **/ + const char *getReflectorBitsChoicesString(void) + { return myReflectorBitsChoicesString.c_str(); } + /// Sets the reflectorBits to one of the choices from getReflectorBitsChoices + /** @see canChooseReflectorBits **/ + AREXPORT bool chooseReflectorBits(const char *reflectorBits); + /// Gets the reflectorBits that was chosen + /** @see canChooseReflectorBits **/ + const char *getReflectorBitsChoice(void) { return myReflectorBitsChoice.c_str(); } + + /** + Gets if you can set powerControlled for the laser. + + If so, call setPowerControlled to set if the power is being controlled + or not, and see what the setting is with getPowerControlled. + **/ + bool canSetPowerControlled(void) { return myCanSetPowerControlled; } + /// Sets if the power is controlled + /** @see canChoosePowerControlled **/ + AREXPORT bool setPowerControlled(bool powerControlled); + /// Gets if the power is controlled + /** @see canChoosePowerControlled **/ + bool getPowerControlled(void) { return myPowerControlled; } + + /** + Gets if you can choose startingBaud for the laser. + + If so, call chooseStartingBaud with one of the choices in + getStartingBaudChoices, and see what the choice was with + getStartingBaudChoice. + **/ + bool canChooseStartingBaud(void) { return myCanChooseStartingBaud; } + /// Gets the list of reflectorBits choices + /** @see canChooseStartingBaud **/ + std::list getStartingBaudChoices(void) + { return myStartingBaudChoices; } + /// Gets a string with the list of reflectorBits choices seperated by |s + /** @see canChooseStartingBaud **/ + const char *getStartingBaudChoicesString(void) + { return myStartingBaudChoicesString.c_str(); } + /// Sets the reflectorBits to one of the choices from getStartingBaudChoices + /** @see canChooseStartingBaud **/ + AREXPORT bool chooseStartingBaud(const char *reflectorBits); + /// Gets the reflectorBits that was chosen + /** @see canChooseStartingBaud **/ + const char *getStartingBaudChoice(void) { return myStartingBaudChoice.c_str(); } + + + /** + Gets if you can choose autoBaud for the laser. + + If so, call chooseAutoBaud with one of the choices in + getAutoBaudChoices, and see what the choice was with + getAutoBaudChoice. + **/ + bool canChooseAutoBaud(void) { return myCanChooseAutoBaud; } + /// Gets the list of reflectorBits choices + /** @see canChooseAutoBaud **/ + std::list getAutoBaudChoices(void) + { return myAutoBaudChoices; } + /// Gets a string with the list of reflectorBits choices seperated by |s + /** @see canChooseAutoBaud **/ + const char *getAutoBaudChoicesString(void) + { return myAutoBaudChoicesString.c_str(); } + /// Sets the reflectorBits to one of the choices from getAutoBaudChoices + /** @see canChooseAutoBaud **/ + AREXPORT bool chooseAutoBaud(const char *reflectorBits); + /// Gets the reflectorBits that was chosen + /** @see canChooseAutoBaud **/ + const char *getAutoBaudChoice(void) { return myAutoBaudChoice.c_str(); } + + + /// Adds a connect callback + void addConnectCB(ArFunctor *functor, + int position = 50) + { myConnectCBList.addCallback(functor, position); } + /// Adds a disconnect callback + void remConnectCB(ArFunctor *functor) + { myConnectCBList.remCallback(functor); } + + /// Adds a callback for when a connection to the robot is failed + void addFailedConnectCB(ArFunctor *functor, + int position = 50) + { myFailedConnectCBList.addCallback(functor, position); } + /// Removes a callback for when a connection to the robot is failed + void remFailedConnectCB(ArFunctor *functor) + { myFailedConnectCBList.remCallback(functor); } + + /// Adds a callback for when disconnect is called while connected + void addDisconnectNormallyCB(ArFunctor *functor, + int position = 50) + { myDisconnectNormallyCBList.addCallback(functor, position); } + + /// Removes a callback for when disconnect is called while connected + void remDisconnectNormallyCB(ArFunctor *functor) + { myDisconnectNormallyCBList.remCallback(functor); } + + /// Adds a callback for when disconnection happens because of an error + void addDisconnectOnErrorCB(ArFunctor *functor, + int position = 50) + { myDisconnectOnErrorCBList.addCallback(functor, position); } + + /// Removes a callback for when disconnection happens because of an error + void remDisconnectOnErrorCB(ArFunctor *functor) + { myDisconnectOnErrorCBList.remCallback(functor); } + + /// Adds a callback that is called whenever a laser reading is processed + void addReadingCB(ArFunctor *functor, + int position = 50) + { myDataCBList.addCallback(functor, position); } + + /// Removes a callback that is called whenever a laser reading is processed + void remReadingCB(ArFunctor *functor) + { myDataCBList.remCallback(functor); } + + /// Gets the absolute maximum range on the sensor + unsigned int getAbsoluteMaxRange(void) { return myAbsoluteMaxRange; } + + /// Copies the reading count stuff from another laser (for the laser filter) + AREXPORT void copyReadingCount(const ArLaser* laser); + + /// override the default to bound the maxrange by the absolute max range + AREXPORT virtual void setMaxRange(unsigned int maxRange); + + /// override the default to keep track of its been set or not + AREXPORT virtual void setCumulativeBufferSize(size_t size); + + /// Call the laser can implement to make sure the parameters + /// are all okay or set the maximum range (based on the params) + /** + The base laser should make sure all the parameters make sense + according to what was set up as allowed. + + This is here for two purposes. The first is to check for + parameters that aren't valid because of something the base class + can't check for. The second is to recalculate whatever the + maximum range of the sensor is based on those settings, and call + setAbsoluteMaxRange if the maximum range has changed based on the + settings. + + This is strictly an internal call, mostly for the simulated laser + so that it can more closely match the real laser on complicated + things like the LMS2xx where the settings for the units and bits + affect what the maximum range is. + + @internal + **/ + AREXPORT virtual bool laserCheckParams(void) { return true; } + + /// Applies a transform to the buffers + AREXPORT virtual void applyTransform(ArTransform trans, + bool doCumulative = true); + + /// Makes it so we'll apply simple naming to all the lasers + AREXPORT static void useSimpleNamingForAllLasers(void); +protected: + + /// Converts the raw readings into the buffers (needs to be called + /// by subclasses) + AREXPORT void laserProcessReadings(void); + + /// Returns if the laser has lost connection so that the subclass + /// can do something appropriate + AREXPORT bool laserCheckLostConnection(void); + + /// Pulls the unset params from the robot parameter file + AREXPORT bool laserPullUnsetParamsFromRobot(void); + + /// Allows setting the degrees the laser uses to anything in a range + AREXPORT void laserAllowSetDegrees(double defaultStartDegrees, double startDegreesMin, double startDegreesMax, double defaultEndDegrees, double endDegreesMin, double endDegreesMax); + + /// Allows setting the degrees the laser uses to one of a number of choices + AREXPORT void laserAllowDegreesChoices(const char *defaultDegreesChoice, + std::map degreesChoices); + + /// Allows setting the increment the laser uses to anything in a range + AREXPORT void laserAllowSetIncrement( + double defaultIncrement, double incrementMin, double incrementMax); + + /// Allows setting the increment to one of a number of choices + AREXPORT void laserAllowIncrementChoices(const char *defaultIncrementChoice, + std::map incrementChoices); + + /// Allows setting the units the laser will use to one of a number of choices + AREXPORT void laserAllowUnitsChoices(const char *defaultUnitsChoice, + std::list unitsChoices); + + /// Allows setting the reflector bits the laser will use to one of a + /// number of choices + AREXPORT void laserAllowReflectorBitsChoices( + const char *defaultReflectorBitsChoice, + std::list reflectorBitsChoices); + + /// Allows setting if the power is controlled or not + AREXPORT void laserAllowSetPowerControlled(bool defaultPowerControlled); + + /// Allows setting the starting baud to one of a number of choices + AREXPORT void laserAllowStartingBaudChoices( + const char *defaultStartingBaudChoice, + std::list startingBaudChoices); + + /// Allows setting the auto baud speed to one of a number of choices + AREXPORT void laserAllowAutoBaudChoices( + const char *defaultAutoBaudChoice, + std::list autoBaudChoices); + + /// Called when the lasers name is set + AREXPORT virtual void laserSetName(const char *name); + + /// Sets the laser's default TCP port + AREXPORT void laserSetDefaultTcpPort(int defaultLaserTcpPort); + + /// Sets the laser's default connection port type + AREXPORT void laserSetDefaultPortType(const char *defaultPortType); + + /// Sets the absolute maximum range on the sensor + AREXPORT void laserSetAbsoluteMaxRange(unsigned int absoluteMaxRange); + + /// Function for a laser to call when it connects + AREXPORT virtual void laserConnect(void); + /// Function for a laser to call when it fails to connects + AREXPORT virtual void laserFailedConnect(void); + /// Function for a laser to call when it disconnects normally + AREXPORT virtual void laserDisconnectNormally(void); + /// Function for a laser to call when it loses connection + AREXPORT virtual void laserDisconnectOnError(void); + + // processes the individual reading, helper for base class + AREXPORT void internalProcessReading(double x, double y, unsigned int range, + bool clean, bool onlyClean); + + // internal helper function for seeing if the choice matches + AREXPORT bool internalCheckChoice(const char *check, const char *choice, + std::list *choices, const char *choicesStr); + // internal helper function for seeing if the choice matches + AREXPORT bool internalCheckChoice(const char *check, const char *choice, + std::map *choices, + const char *choicesStr, double *choiceDouble); + // internal helper function for building a string for a list of chocies + void internalBuildChoicesString(std::list *choices, std::string *str); + // internal helper function for building a string for a list of chocies + void internalBuildChoices(std::map *choices, + std::string *str, std::list *choicesList); + + // Function called in laserProcessReadings to indicate that a + // reading was received + AREXPORT virtual void internalGotReading(void); + + int myLaserNumber; + + + ArDeviceConnection *myConn; + ArMutex myConnMutex; + + double myTimeoutSeconds; + + + ArPose mySensorPose; + double mySensorZ; + bool myHaveSensorPose; + + double myCumulativeCleanDist; + double myCumulativeCleanDistSquared; + int myCumulativeCleanInterval; + int myCumulativeCleanOffset; + ArTime myCumulativeLastClean; + std::set myIgnoreReadings; + + unsigned int myAbsoluteMaxRange; + bool myMaxRangeSet; + + bool myCumulativeBufferSizeSet; + + bool myFlippedSet; + bool myFlipped; + + bool myCanSetDegrees; + double myStartDegreesMin; + double myStartDegreesMax; + bool myStartDegreesSet; + double myStartDegrees; + double myEndDegreesMin; + double myEndDegreesMax; + bool myEndDegreesSet; + double myEndDegrees; + + bool myCanChooseDegrees; + std::map myDegreesChoices; + std::list myDegreesChoicesList; + bool myDegreesChoiceSet; + std::string myDegreesChoicesString; + std::string myDegreesChoice; + double myDegreesChoiceDouble; + + + bool myCanSetIncrement; + double myIncrementMin; + double myIncrementMax; + bool myIncrementSet; + double myIncrement; + + bool myCanChooseIncrement; + std::map myIncrementChoices; + std::list myIncrementChoicesList; + std::string myIncrementChoicesString; + bool myIncrementChoiceSet; + std::string myIncrementChoice; + double myIncrementChoiceDouble; + + bool myCanChooseUnits; + std::list myUnitsChoices; + std::string myUnitsChoicesString; + bool myUnitsChoiceSet; + std::string myUnitsChoice; + + bool myCanChooseReflectorBits; + std::list myReflectorBitsChoices; + std::string myReflectorBitsChoicesString; + bool myReflectorBitsChoiceSet; + std::string myReflectorBitsChoice; + + bool myCanSetPowerControlled; + bool myPowerControlledSet; + bool myPowerControlled; + + bool myCanChooseStartingBaud; + std::list myStartingBaudChoices; + std::string myStartingBaudChoicesString; + bool myStartingBaudChoiceSet; + std::string myStartingBaudChoice; + + bool myCanChooseAutoBaud; + std::list myAutoBaudChoices; + std::string myAutoBaudChoicesString; + bool myAutoBaudChoiceSet; + std::string myAutoBaudChoice; + + int myDefaultTcpPort; + std::string myDefaultPortType; + + ArCallbackList myConnectCBList; + ArCallbackList myFailedConnectCBList; + ArCallbackList myDisconnectOnErrorCBList; + ArCallbackList myDisconnectNormallyCBList; + ArCallbackList myDataCBList; + + ArLog::LogLevel myInfoLogLevel; + + ArTime myLastReading; + // packet count + time_t myTimeLastReading; + int myReadingCurrentCount; + int myReadingCount; + bool myRobotRunningAndConnected; + + static bool ourUseSimpleNaming; +}; + +#endif // ARRANGEDEVICELASER_H diff --git a/Legacy/Aria/include/ArLaserConnector.h b/Legacy/Aria/include/ArLaserConnector.h new file mode 100644 index 0000000..290de9f --- /dev/null +++ b/Legacy/Aria/include/ArLaserConnector.h @@ -0,0 +1,250 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLASERCONNECTOR_H +#define ARLASERCONNECTOR_H + +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ariaUtil.h" +#include "ArRobotConnector.h" + +class ArLaser; +class ArRobot; + + + +/// Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based on parameters from robot parameter file and command-line arguments +/** + + ArLaserConnector makes a laser connection (e.g. through serial port, + TCP network connection, or to simulator connection as a special case if + the robot connection is to a simulator.) + Parameters are configurable through command-line arguments or in the robot + parameter file. + + + When you create your ArLaserConnector, pass it command line parameters via + either the argc and argv variables from main(), or pass it an + ArArgumentBuilder or ArArgumentParser object. (ArArgumentBuilder + is able to obtain command line parameters from a Windows program + that uses WinMain() instead of main()). + ArLaserConnector registers a callback with the global Aria class. Use + Aria::parseArgs() to parse all command line parameters to the program, and + Aria::logOptions() to print out information about all registered command-line parameters. + ArLaserConnector will be included in these. + + Then, to connect to any lasers that were set up in the robot parameter file or + via command line arguments, call connectLasers(). If successful, + connectLasers() will return true and add an entry for each laser connected + in the ArRobot object's list of lasers. These ArLaser objects can be + accessed from your ArRobot object via ArRobot::findLaser() or ArRobot::getLaserMap(). + + (The internal interface used by ARIA to connect to configured lasers and add + them to ArRobot is also + available if you need to use it: See addLaser(); but this is normally not +neccesary for almost all cases.) + + The following command-line arguments are checked: + @verbinclude ArLaserConnector_options + + @since 2.7.0 + @ingroup ImportantClasses + @ingroup DeviceClasses + **/ +class ArLaserConnector +{ +public: + /// Constructor that takes argument parser + AREXPORT ArLaserConnector( + ArArgumentParser *parser, + ArRobot *robot, ArRobotConnector *robotConnector, + bool autoParseArgs = true, + ArLog::LogLevel infoLogLevel = ArLog::Verbose, + ArRetFunctor1 *turnOnPowerOutputCB = NULL, + ArRetFunctor1 *turnOffPowerOutputCB = NULL); + /// Destructor + AREXPORT ~ArLaserConnector(void); + /// Connects all the lasers the robot has that should be auto connected + AREXPORT bool connectLasers(bool continueOnFailedConnect = false, + bool addConnectedLasersToRobot = true, + bool addAllLasersToRobot = false, + bool turnOnLasers = true, + bool powerCycleLaserOnFailedConnect = true, + int *failedOnLaser = NULL); + /// Sets up a laser to be connected + AREXPORT bool setupLaser(ArLaser *laser, + int laserNumber = 1); + /// Connects the laser synchronously (will take up to a minute) + AREXPORT bool connectLaser(ArLaser *laser, + int laserNumber = 1, + bool forceConnection = true); + /// Adds a laser so parsing will get it + AREXPORT bool addLaser(ArLaser *laser, + int laserNumber = 1); + /// Adds a laser for parsing but where connectLaser will be called later + AREXPORT bool addPlaceholderLaser(ArLaser *placeholderLaser, + int laserNumber = 1, + bool takeOwnershipOfPlaceholder = false); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Internal function to get the laser (only useful between parseArgs and connectLasers) + AREXPORT ArLaser *getLaser(int laserNumber); + + /// Internal function to replace the laser (only useful between parseArgs and connectLasers) but not the laser data + AREXPORT bool replaceLaser(ArLaser *laser, int laserNumber); + +protected: + /// Class that holds information about the laser data + class LaserData + { + public: + LaserData(int number, ArLaser *laser, + bool laserIsPlaceholder = false, bool ownPlaceholder = false) + { + myNumber = number; + myLaser = laser; + myConn = NULL; + myLaserIsPlaceholder = laserIsPlaceholder; + myOwnPlaceholder = ownPlaceholder; + myConnect = false; myConnectReallySet = false; + myPort = NULL; + myPortType = NULL; + myRemoteTcpPort = 0; myRemoteTcpPortReallySet = false; + myFlipped = false; myFlippedReallySet = false; + myDegreesStart = HUGE_VAL; myDegreesStartReallySet = false; + myDegreesEnd = -HUGE_VAL; myDegreesEndReallySet = false; + myDegrees = NULL; + myIncrementByDegrees = -HUGE_VAL; myIncrementByDegreesReallySet = false; + myIncrement = NULL; + myUnits = NULL; + myReflectorBits = NULL; + myPowerControlled = true; myPowerControlledReallySet = false; + myStartingBaud = NULL; + myAutoBaud = NULL; + myMaxRange = INT_MAX; myMaxRangeReallySet = false; + myAdditionalIgnoreReadings = NULL; + } + virtual ~LaserData() {} + /// The number of this laser + int myNumber; + /// The actual pointer to this laser + ArLaser *myLaser; + // our connection + ArDeviceConnection *myConn; + /// If the laser is a placeholder for parsing + bool myLaserIsPlaceholder; + /// If we own the placeholder laser + bool myOwnPlaceholder; + // if we want to connect the laser + bool myConnect; + // if myConnect was really set + bool myConnectReallySet; + // the port we want to connect the laser on + const char *myPort; + // the type of port we want to connect to the laser on + const char *myPortType; + // laser tcp port if we're doing a remote host + int myRemoteTcpPort; + // if our remote laser tcp port was really set + bool myRemoteTcpPortReallySet; + // if we have the laser flipped + bool myFlipped; + // if our flipped was really set + bool myFlippedReallySet; + // what degrees to start at + double myDegreesStart; + // if our start degrees was really set + bool myDegreesStartReallySet; + // what degrees to end at + double myDegreesEnd; + // if our end degrees was really set + bool myDegreesEndReallySet; + // the degrees we want wto use + const char *myDegrees; + // what increment to use + double myIncrementByDegrees; + // if our end degrees was really set + bool myIncrementByDegreesReallySet; + // the increment we want to use + const char *myIncrement; + /// the units we want to use + const char *myUnits; + /// the reflector bits we want to use + const char *myReflectorBits; + // if we are controlling the laser power + bool myPowerControlled; + // if our flipped was really set + bool myPowerControlledReallySet; + /// the starting baud we want to use + const char *myStartingBaud; + /// the auto baud we want to use + const char *myAutoBaud; + // if we set a new max range from the command line + int myMaxRange; + // if our new max range was really set + bool myMaxRangeReallySet; + /// the additional laser ignore readings + const char *myAdditionalIgnoreReadings; + }; + std::map myLasers; + + /// Parses the laser arguments + AREXPORT bool parseLaserArgs(ArArgumentParser *parser, + LaserData *laserData); + /// Logs the laser command line option help text. + AREXPORT void logLaserOptions(LaserData *laserdata, bool header = true, bool metaOpts = true) const; + // Sets the laser parameters + bool internalConfigureLaser(LaserData *laserData); + + std::string myLaserTypes; + + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + // if we should autoparse args or toss errors + bool myAutoParseArgs; + bool myParsedArgs; + + ArRobot *myRobot; + ArRobotConnector *myRobotConnector; + + ArLog::LogLevel myInfoLogLevel; + + ArRetFunctor1 *myTurnOnPowerOutputCB; + ArRetFunctor1 *myTurnOffPowerOutputCB; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; +}; + +#endif // ARLASERCONNECTOR_H diff --git a/Legacy/Aria/include/ArLaserFilter.h b/Legacy/Aria/include/ArLaserFilter.h new file mode 100644 index 0000000..fad2c5c --- /dev/null +++ b/Legacy/Aria/include/ArLaserFilter.h @@ -0,0 +1,108 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLASERFILTER_H +#define ARLASERFILTER_H + +#include "ArLaser.h" +#include "ArFunctor.h" + +class ArRobot; +class ArConfig; + +/// Range device with data obtained from another range device and filtered +/** + This is a class for generically filtering laser readings, either to + separate out ones that are too far or too close compared to their + neighbors. The filtering parameters can be adjusted on line + through ArConfig options. + + This implements ArLaser and so can be used like any other laser, + though you have to set all its options before you create this and + probably should connect it too. Then you should replace the + original laser on ArRobot with this one, and replace the original + laser as a range device too. +**/ +class ArLaserFilter : public ArLaser +{ +public: + /// Constructor + AREXPORT ArLaserFilter(ArLaser *laser, const char *name = NULL); + /// Destructor + AREXPORT ~ArLaserFilter(); + /// Set robot + AREXPORT virtual void setRobot(ArRobot *robot); + /// Add to the config + AREXPORT void addToConfig(ArConfig *config, const char *sectionName, + const char *prefix = ""); + + AREXPORT virtual bool blockingConnect(void) + { return myLaser->blockingConnect(); } + AREXPORT virtual bool asyncConnect(void) + { return myLaser->asyncConnect(); } + AREXPORT virtual bool disconnect(void) + { return myLaser->disconnect(); } + AREXPORT virtual bool isConnected(void) + { return myLaser->isConnected(); } + AREXPORT virtual bool isTryingToConnect(void) + { return myLaser->isTryingToConnect(); } + + AREXPORT virtual void *runThread(void *arg) { return NULL; } + AREXPORT virtual bool laserCheckParams(void) + { + if (!myLaser->laserCheckParams()) + return false; + + laserSetAbsoluteMaxRange(myLaser->getAbsoluteMaxRange()); + return true; + } + + /// Gets the base laser this is filtering + ArLaser *getBaseLaser(void) { return myLaser; } +protected: + AREXPORT int selfLockDevice(void); + AREXPORT int selfTryLockDevice(void); + AREXPORT int selfUnlockDevice(void); + + ArLaser *myLaser; + + // Parameters + double myAngleToCheck; + double myAllFactor; + double myAnyFactor; + double myAnyMinRange; + double myAnyMinRangeLessThanAngle; + double myAnyMinRangeGreaterThanAngle; + + /// Does the check against all neighbor factor + bool checkRanges(int thisReading, int otherReading, double factor); + + // Callback to do the actual filtering + void processReadings(void); + + ArFunctorC myProcessCB; +}; + +#endif // ARLASERFILTER diff --git a/Legacy/Aria/include/ArLaserLogger.h b/Legacy/Aria/include/ArLaserLogger.h new file mode 100644 index 0000000..ce81842 --- /dev/null +++ b/Legacy/Aria/include/ArLaserLogger.h @@ -0,0 +1,197 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLASERLOGGER_H +#define ARLASERLOGGER_H + +#include + +#include "ariaUtil.h" +#include "ArFunctor.h" + +class ArLaser; +class ArRobot; +class ArJoyHandler; +class ArRobotJoyHandler; +class ArRobotPacket; + +/// This class can be used to create log files for the laser mapper +/** + This class has a pointer to a robot and a laser... every time the + robot has EITHER moved the distDiff, or turned the degDiff, it will + take the current readings from the laser and log them into the log + file given as the fileName to the constructor. Readings can also + be taken by calling takeReading which explicitly tells the logger + to take a reading. + + The class can also add goals, see the constructor arg addGoals for + information about that... you can also explicitly have it add a + goal by calling addGoal. + + @see @ref LaserLogFileFormat for details on the laser scan log output file format. +**/ +class ArLaserLogger +{ +public: + /// Constructor + AREXPORT ArLaserLogger( + ArRobot *robot, ArLaser *laser, double distDiff, + double degDiff, const char *fileName, + bool addGoals = false, + ArJoyHandler *joyHandler = NULL, + const char *baseDirectory = NULL, + bool useReflectorValues = false, + ArRobotJoyHandler *robotJoyHandler = NULL, + const std::map *, + ArStrCaseCmpOp> *extraLocationData = NULL, + std::list *extraLasers = NULL); + /// Destructor + AREXPORT virtual ~ArLaserLogger(); + +#ifndef SWIG + /** @brief Adds a string to the log file with a tag at the given moment + * @swigomit + */ + AREXPORT void addTagToLog(const char *str, ...); +#endif + + /// Same ass addToLog, but no varargs, wrapper for java + AREXPORT void addTagToLogPlain(const char *str); + +#ifndef SWIG + /** @brief Adds a string to the log file without a tag for where or when we are + * @swigomit + */ + AREXPORT void addInfoToLog(const char *str, ...); +#endif + + /// Same as addToInfo, but does it without marking robot position + AREXPORT void addInfoToLogPlain(const char *str); + /// Sets the distance at which the robot will take a new reading + void setDistDiff(double distDiff) { myDistDiff = ArMath::fabs(distDiff); } + /// Gets the distance at which the robot will take a new reading + double getDistDiff(void) { return myDistDiff; } + /// Sets the degrees to turn at which the robot will take a new reading + void setDegDiff(double degDiff) { myDistDiff = ArMath::fabs(degDiff); } + /// Gets the degrees to turn at which the robot will take a new reading + double getDegDiff(void) { return myDegDiff; } + /// Explicitly tells the robot to take a reading + void takeReading(void) { myTakeReadingExplicit = true; } + /// Adds a goal where the robot is at the moment + void addGoal(void) { myAddGoalExplicit = true; } + /// Sees if the file was opened successfully + bool wasFileOpenedSuccessfully(void) + { if (myFile != NULL) return true; else return false; } + /// Gets if we're taking old (sick1:) readings + bool takingOldReadings(void) { return myOldReadings; } + /// Sets if we're taking old (sick1:) readings + void takeOldReadings(bool takeOld) { myOldReadings = takeOld; } + /// Gets if we're taking new (scan1:) readings + bool takingNewReadings(void) { return myNewReadings; } + /// Sets if we're taking old (scan1:) readings + void takeNewReadings(bool takeNew) { myNewReadings = takeNew; } +protected: + /// The task which gets attached to the robot + AREXPORT void robotTask(void); + // internal function that adds goals if needed (and specified) + void internalAddGoal(void); + // internal function that writes tags + void internalWriteTags(void); + // internal function that takes a reading + void internalTakeReading(void); + // internal function that takes a reading from one laser + void internalTakeLaserReading(ArLaser *laser, int laserNumber); + // internal function that prints the position + void internalPrintPos(ArPose encoderPoseTaken, ArPose goalPoseTaken, + ArTime timeTaken); + // internal function that logs the pose and conf + void internalPrintLaserPoseAndConf(ArLaser *laser, int laserNumber); + // internal packet for handling the loop packets + AREXPORT bool loopPacketHandler(ArRobotPacket *packet); + + + // what type of readings we are taking + bool myOldReadings; + // what type of readings we are taking + bool myNewReadings; + // if we're taking reflector values too + bool myUseReflectorValues; + std::list myTags; + std::list myInfos; + bool myWrote; + ArRobot *myRobot; + // note that this is now in the list of lasers, but this pointer is + // kept to denote the primary laser (so that it can always be called + // number 1) + ArLaser *myLaser; + bool myAddGoals; + ArJoyHandler *myJoyHandler; + ArRobotJoyHandler *myRobotJoyHandler; + std::string myFileName; + std::string myBaseDirectory; + FILE *myFile; + bool myFirstTaken; + + ArPose myLast; + double myLastVel; + double myDistDiff; + double myDegDiff; + ArSectors mySectors; + ArFunctorC myTaskCB; + int myScanNumber; + ArTime myStartTime; + bool myTakeReadingExplicit; + bool myAddGoalExplicit; + bool myAddGoalKeyboard; + bool myLastAddGoalKeyboard; + bool myLastJoyButton; + bool myLastRobotJoyButton; + bool myFirstGoalTaken; + int myNumGoal; + ArPose myLastGoalTakenPose; + ArTime myLastGoalTakenTime; + + void goalKeyCallback(void); + unsigned char myLastLoops; + + // the lasers all have this, so shouldn't need it anymore... + //bool myFlipped; + + bool myIncludeRawEncoderPose; + std::map *, + ArStrCaseCmpOp> myExtraLocationData; + + // holders for the extra lasers + std::list myLasers; + + ArFunctorC myGoalKeyCB; + ArRetFunctor1C myLoopPacketHandlerCB; +}; + +/// @deprecated +typedef ArLaserLogger ArSickLogger; + +#endif // ARLASERLOGGER_H diff --git a/Legacy/Aria/include/ArLaserReflectorDevice.h b/Legacy/Aria/include/ArLaserReflectorDevice.h new file mode 100644 index 0000000..08ccaf5 --- /dev/null +++ b/Legacy/Aria/include/ArLaserReflectorDevice.h @@ -0,0 +1,64 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLASERREFLECTORDEVICE_H +#define ARLASERREFLECTORDEVICE_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctor.h" + +class ArSick; +class ArRobot; + +/// A class for keeping track of laser reflectors that we see right now +/** + This class is for showing the laser reflectors in MobileEyes. + This requires that the range device you pass in uses the + 'extraInt' in the rawReadings ArSensorReading to note reflector + value and that anything greater than 0 is a reflector. +*/ +class ArLaserReflectorDevice : public ArRangeDevice +{ +public: + /// Constructor + AREXPORT ArLaserReflectorDevice(ArRangeDevice *laser, ArRobot *robot, + const char * name = "reflector"); + /// Destructor + AREXPORT virtual ~ArLaserReflectorDevice(); + /// Grabs the new readings from the robot and adds them to the buffers + AREXPORT void processReadings(void); + /// Specifically does nothing since it was done in the constructor + AREXPORT virtual void setRobot(ArRobot *robot); + /// Adds a reflector threshold to the task + AREXPORT void addToConfig(ArConfig *config, const char *section); +protected: + ArRangeDevice *myLaser; + int myReflectanceThreshold; + ArFunctorC myProcessCB; +}; + + +#endif // ARLASERREFLECTORDEVICE_H diff --git a/Legacy/Aria/include/ArLineFinder.h b/Legacy/Aria/include/ArLineFinder.h new file mode 100644 index 0000000..3b81fe7 --- /dev/null +++ b/Legacy/Aria/include/ArLineFinder.h @@ -0,0 +1,165 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSICKLINEFINDER_H +#define ARSICKLINEFINDER_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ariaUtil.h" +#include + +class ArLineFinderSegment; +class ArConfig; + +/** This class finds lines out of any range device with raw readings (lasers for instance) + @ingroup OptionalClasses + @ingroup UtilityClasses +*/ +class ArLineFinder +{ +public: + /// Constructor + AREXPORT ArLineFinder(ArRangeDevice *dev); + /// Destructor + AREXPORT virtual ~ArLineFinder(); + +#ifndef SWIG + /// Finds the lines and returns a pointer to ArLineFinder's map of them + /** @swigomit */ + AREXPORT std::map *getLines(void); + /// Finds the lines, but then returns a pointer to ArLineFinder's map of the points that AREN'T in lines + /** @swigomit */ + AREXPORT std::map *getNonLinePoints(void); +#endif + /// Finds the lines, then copies @b pointers to them them into a new set + AREXPORT std::set getLinesAsSet(); + /// Finds the lines, and then copies the points that AREN'T in the lines into a new set + AREXPORT std::set getNonLinePointsAsSet(); + + /// Gets the position the last lines were gotten at + ArPose getLinesTakenPose(void) { return myPoseTaken; } + /// Logs all the points and lines from the last getLines + AREXPORT void saveLast(void); + /// Gets the lines, then prints them + AREXPORT void getLinesAndSaveThem(void); + /// Whether to print verbose information about line decisions + void setVerbose(bool verbose) { myPrinting = verbose; } + /// Whether to print verbose information about line decisions + bool getVerbose(void) { return myPrinting; } + /// Sets some parameters for line creation + void setLineCreationParams(int minLineLen = 40, int minLinePoints = 2) + { myMakingMinLen = minLineLen; myMakingMinPoints = minLinePoints; } + /// Sets some parameters for line combining + void setLineCombiningParams(int angleTol = 30, int linesCloseEnough = 75) + { myCombiningAngleTol = angleTol; + myCombiningLinesCloseEnough = linesCloseEnough; } + /// Filter out lines smaller than this + void setLineFilteringParams(int minPointsInLine = 3, int minLineLength = 75) + { myFilteringMinPointsInLine = minPointsInLine; + myFilteringMinLineLength = minLineLength; } + /// Don't let lines happen that have points not close to it + void setLineValidParams(int maxDistFromLine = 30, + int maxAveDistFromLine = 20) + { myValidMaxDistFromLine = maxDistFromLine; + myValidMaxAveFromLine = maxAveDistFromLine; } + /// Sets the maximum distance between points that'll still be included in the same line + void setMaxDistBetweenPoints(int maxDistBetweenPoints = 0) + { myMaxDistBetweenPoints = maxDistBetweenPoints; } + AREXPORT void addToConfig(ArConfig *config, + const char *section); +protected: + // where the readings were taken + ArPose myPoseTaken; + // our points + std::map *myPoints; + std::map *myLines; + std::map *myNonLinePoints; + // fills up the myPoints variable from sick laser + AREXPORT void fillPointsFromLaser(void); + // fills up the myLines variable from the myPoints + AREXPORT void findLines(void); + // cleans the lines and puts them into myLines + AREXPORT bool combineLines(); + // takes two segments and sees if it can average them + AREXPORT ArLineFinderSegment *averageSegments(ArLineFinderSegment *line1, + ArLineFinderSegment *line2); + // removes lines that don't have enough points added in + AREXPORT void filterLines(); + + bool myFlippedFound; + bool myFlipped; + int myValidMaxDistFromLine; + int myValidMaxAveFromLine; + int myMakingMinLen; + int myMakingMinPoints; + int myCombiningAngleTol; + int myCombiningLinesCloseEnough; + int myFilteringMinPointsInLine; + int myFilteringMinLineLength; + int myMaxDistBetweenPoints; + double mySinMultiplier; + bool myPrinting; + ArRangeDevice *myRangeDevice; +}; + +/// Class for ArLineFinder to hold more info than an ArLineSegment +class ArLineFinderSegment : public ArLineSegment +{ +public: + ArLineFinderSegment() {} + ArLineFinderSegment(double x1, double y1, double x2, double y2, + int numPoints = 0, int startPoint = 0, int endPoint = 0) + { newEndPoints(x1, y1, x2, y2, numPoints, startPoint, endPoint); } + virtual ~ArLineFinderSegment() {} + void newEndPoints(double x1, double y1, double x2, double y2, + int numPoints = 0, int startPoint = 0, int endPoint = 0) + { + ArLineSegment::newEndPoints(x1, y1, x2, y2); + myLineAngle = ArMath::atan2(y2 - y1, x2 - x1); + myLength = ArMath::distanceBetween(x1, y1, x2, y2); + myNumPoints = numPoints; + myStartPoint = startPoint; + myEndPoint = endPoint; + myAveDistFromLine = 0; + } + double getLineAngle(void) { return myLineAngle; } + double getLength(void) { return myLength; } + int getNumPoints(void) { return myNumPoints; } + int getStartPoint(void) { return myStartPoint; } + int getEndPoint(void) { return myEndPoint; } + void setAveDistFromLine(double aveDistFromLine) + { myAveDistFromLine = aveDistFromLine; } + double getAveDistFromLine(void) { return myAveDistFromLine; } +protected: + double myLineAngle; + double myLength; + int myNumPoints; + int myStartPoint; + int myEndPoint; + double myAveDistFromLine; +}; + +#endif // ARSICKLINEFINDER_H diff --git a/Legacy/Aria/include/ArLog.h b/Legacy/Aria/include/ArLog.h new file mode 100644 index 0000000..953b689 --- /dev/null +++ b/Legacy/Aria/include/ArLog.h @@ -0,0 +1,166 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLOG_H +#define ARLOG_H + +#ifndef WIN32 +#include +#endif +#include +#include "ariaTypedefs.h" +#include "ArMutex.h" +#include "ArFunctor.h" + +class ArConfig; + +/// Logging utility class +/** + ArLog is a utility class to log all messages from Aria to a choosen + destintation. Messages can be logged to stdout, stderr, a file, and + turned off completely. Logging by default is set to stdout. The level + of logging can be changed as well. Allowed levels are Terse, Normal, + and Verbose. By default the level is set to Normal. + + @ingroup ImportantClasses +*/ +class ArLog +{ +public: + + typedef enum { + StdOut, ///< Use stdout for logging + StdErr, ///< Use stderr for logging + File, ///< Use a file for logging + Colbert, ///< Use a Colbert stream for logging + None ///< Disable logging + } LogType; + typedef enum { + Terse, ///< Use terse logging + Normal, ///< Use normal logging + Verbose ///< Use verbose logging + } LogLevel; + +#ifndef SWIG + /** @brief Log a message, with formatting and variable number of arguments + * @swignote In Java and Python, this function only takes one + * string argument. Use Java or Python's native facities + * for constructing a formatted string, e.g. the % and + string + * operators in Python, and the methods of the Java String class. + */ + AREXPORT static void log(LogLevel level, const char *str, ...); +#endif + /// Log a message containing just a plain string + AREXPORT static void logPlain(LogLevel level, const char *str); + /// Initialize the logging utility with options + AREXPORT static bool init(LogType type, LogLevel level, + const char *fileName="", + bool logTime = false, bool alsoPrint = false, + bool printThisCall = true); + /// Close the logging utility + AREXPORT static void close(); + + /// Logs an error, adding the error and string the error mean at the + /// end of this message + AREXPORT static void logErrorFromOS(LogLevel level, const char *str, ...); + /// Logs an error, adding the error and string the error mean at the + /// end of this message + AREXPORT static void logErrorFromOSPlain(LogLevel level, const char *str); +#ifndef SWIG // these is internal we don't need to wrap it + /// Logs an error, adding the error and string the error mean at the + /// end of this message... internal version, don't use it + AREXPORT static void logErrorFromOSNoLock(LogLevel level, const char *str, ...); + /// Logs an error, adding the error and string the error mean at the + /// end of this message... internal version, dont' use it + AREXPORT static void logErrorFromOSPlainNoLock(LogLevel level, const char *str); + // Do not use this unless you know what you are doing... + /** @internal + * @swigomit */ + AREXPORT static void logNoLock(LogLevel level, const char *str, ...); +#endif + /// If possible (only in Linux right now) log the backtrace + AREXPORT static void logBacktrace(LogLevel level); + // We use this to print to a Colbert stream, if available + AREXPORT static void (* colbertPrint)(int i, const char *str); + + /// Use an ArConfig object to control ArLog's options + AREXPORT static void addToConfig(ArConfig *config); + +#ifndef ARINTERFACE + /// Init for aram behavior + AREXPORT static void aramInit(const char *prefix, + ArLog::LogLevel defaultLevel = ArLog::Normal, + double defaultSize = 10, + bool daemonized = false); +#endif + + /// Internal functor to be called when a log message is made (this shouldn't really be used) + AREXPORT static void setFunctor(ArFunctor1 *functor); + /// Internal function to force a lockup, only for debugging + AREXPORT static void internalForceLockup(void); +protected: + AREXPORT static bool processFile(void); +#ifndef ARINTERFACE + AREXPORT static bool aramProcessFile(void); + AREXPORT static void filledAramLog(void); +#endif + AREXPORT static void invokeFunctor(const char *message); + AREXPORT static void checkFileSize(void); + + static ArLog *ourLog; + static ArMutex ourMutex; + static LogType ourType; + static LogLevel ourLevel; + static bool ourLoggingTime; + static FILE *ourFP; + static int ourColbertStream; + static std::string ourFileName; + static bool ourAlsoPrint; + static int ourCharsLogged; + + static LogType ourConfigLogType; + static LogLevel ourConfigLogLevel; + static char ourConfigFileName[1024]; + static bool ourConfigLogTime; + static bool ourConfigAlsoPrint; + static ArGlobalRetFunctor ourConfigProcessFileCB; + +#ifndef ARINTERFACE + static char ourAramConfigLogLevel[1024]; + static double ourAramConfigLogSize; + static ArGlobalRetFunctor ourAramConfigProcessFileCB; + static bool ourUseAramBehavior; + static double ourAramLogSize; + static std::string ourAramPrefix; +#endif + + static bool ourAramDaemonized; + + static ArFunctor1 *ourFunctor; + +}; + + +#endif diff --git a/Legacy/Aria/include/ArLogFileConnection.h b/Legacy/Aria/include/ArLogFileConnection.h new file mode 100644 index 0000000..7f29e9e --- /dev/null +++ b/Legacy/Aria/include/ArLogFileConnection.h @@ -0,0 +1,93 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARLOGFILECONNECTION_H +#define ARLOGFILECONNECTION_H + +#include "ArDeviceConnection.h" +#include +#include + +#include "ariaTypedefs.h" + +/// For connecting through a log file +class ArLogFileConnection: public ArDeviceConnection +{ + public: + /// Constructor + AREXPORT ArLogFileConnection(); + /// Destructor also closes connection + AREXPORT virtual ~ArLogFileConnection(); + + /// Opens a connection to the given host and port + AREXPORT int open(const char * fname = NULL); + + AREXPORT void setLogFile(const char *fname = NULL); + AREXPORT virtual bool openSimple(void); + AREXPORT virtual int getStatus(void); + AREXPORT virtual bool close(void); + AREXPORT virtual int read(const char *data, unsigned int size, + unsigned int msWait = 0); + AREXPORT virtual int write(const char *data, unsigned int size); + AREXPORT virtual const char * getOpenMessage(int messageNumber); + AREXPORT virtual ArTime getTimeRead(int index); + AREXPORT virtual bool isTimeStamping(void); + + /// Gets the name of the host connected to + AREXPORT const char *getLogFile(void); + + /* This doens't exist in the C++ file so I'm commenting it out + /// Gets the initial pose of the robot + AREXPORT ArPose getLogPose(void); + */ + + /// Internal function used by open and openSimple + AREXPORT int internalOpen(void); + + enum Open { + OPEN_FILE_NOT_FOUND = 1, ///< Can't find the file + OPEN_NOT_A_LOG_FILE ///< Doesn't look like a log file + }; + + // robot parameters + ArPose myPose; + bool havePose; + char myName[100]; + char myType[20]; + char mySubtype[20]; + +protected: + void buildStrMap(void); + ArStrMap myStrMap; + + int myStatus; + int stopAfter; // temp here for returning one packet at a time + + const char *myLogFile; + FILE *myFD; // file descriptor + +}; + +#endif //ARLOGFILECONNECTION_H diff --git a/Legacy/Aria/include/ArMD5Calculator.h b/Legacy/Aria/include/ArMD5Calculator.h new file mode 100644 index 0000000..cfaed4a --- /dev/null +++ b/Legacy/Aria/include/ArMD5Calculator.h @@ -0,0 +1,150 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/*! \file ArMD5Calculator.h + * \brief Contains the ArMD5Calculator class. + * \date 06/27/08 + * \author K. Cunningham +**/ +#ifndef ARMD5CALCULATOR_H +#define ARMD5CALCULATOR_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +#include "md5.h" + +/// Calculates the MD5 checksum when reading or writing a text file using ArFunctors. +/** + * ArMD5Calculator is a small helper class used to calculate MD5 checksums + * on text files. It contains a static method that will calculate the + * checksum of a given file, independently performing all I/O. + * + * The calculator also contains a functor that can be used to calculate + * a checksum interactively. For example, it can accumulate the checksum + * while a file is being written using a writeToFunctor method. If the + * optional second functor is specified, then it will be invoked after the + * checksum functor. + * + * @ingroup UtilityClasses +**/ +class ArMD5Calculator { + +public: + + enum { + DIGEST_LENGTH = 16, ///< Number of bytes in the checksum buffer + DISPLAY_LENGTH = (DIGEST_LENGTH * 2) + 1 ///< Number of characters needed to display the checksum + }; + + // --------------------------------------------------------------------------- + // Static Methods + // --------------------------------------------------------------------------- + + /// Converts the given checksum buffer to a displayable text string + /** + * @param digestBuf a pointer to the byte array that contains the checksum + * @param digestLength the length of the disgestBuf; should be DIGEST_LENGTH + * @param displayBuf a pointer to the output text buffer that will contain the + * displayable text string + * @param displayLength the length of the displayBuf; should be at least + * DISPLAY_LENGTH + **/ + AREXPORT static void toDisplay(const unsigned char *digestBuf, + size_t digestLength, + char *displayBuf, + size_t displayLength); + + /// Calculates the checksum for the specified file. + /** + * @param fileName the name of the file of which to calculate the checksum + * @param md5DigestBuffer a pointer to the output buffer in which to store + * the calculated checksum + * @param md5DigestBufferLen the length of the md5DigestBuffer; should be + * DIGEST_LENGTH + * @return bool true if the file was successfully opened and the checksum + * calculated; false, otherwise + **/ + AREXPORT static bool calculateChecksum(const char *fileName, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen); + + // --------------------------------------------------------------------------- + // Instance Methods + // --------------------------------------------------------------------------- + + /// Creates a new calculator, with an optional functor. + /** + * @param secondFunctor the optional functor to be invoked on the current + * text string after its checksum has been calculated + **/ + AREXPORT ArMD5Calculator(ArFunctor1 *secondFunctor = NULL); + + /// Destructor + AREXPORT ~ArMD5Calculator(); + + + /// Resets the calculator so that a new checksum can be calculated + AREXPORT void reset(); + + /// Calculates the checksum for the given text line, and accumulates the results. + AREXPORT void append(const char *str); + + /// Returns a pointer to the internal buffer that accumulates the checksum results. + AREXPORT unsigned char *getDigest(); + + + /// Returns the internal functor used to calculate the checksum + /** + * If the calculator is being used interactively with writeToFunctor, then + * this is the functor to use. It calls append on each text line which + * accumulates the checksum and calls the second functor if necessary. + **/ + AREXPORT ArFunctor1 *getFunctor(); + + /// Returns the optional secondary functor to be called on each text line. + AREXPORT ArFunctor1 *getSecondFunctor(); + + /// Sets the optional secondary functor to be called on each text line. + AREXPORT void setSecondFunctor(ArFunctor1 *secondFunctor); + +private: + + /// Functor that accumulates the checksum + ArFunctor1C myFunctor; + /// Optional secondary functor to be invoked on each text line + ArFunctor1 *mySecondFunctor; + /// State of the md5 library + md5_state_t myState; + /// Buffer in which to store the md5 results + md5_byte_t myDigest[DIGEST_LENGTH]; + + /// Whether the calculator is finished, i.e. the md5_finish method has been called. + bool myIsFinished; + +}; // end class ArMD5Calculator + +#endif // ARMD5CALCULATOR_H + diff --git a/Legacy/Aria/include/ArMTXIO.h b/Legacy/Aria/include/ArMTXIO.h new file mode 100644 index 0000000..1b9e1bc --- /dev/null +++ b/Legacy/Aria/include/ArMTXIO.h @@ -0,0 +1,313 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARMTXIO_H +#define ARMTXIO_H + + +#include "ariaTypedefs.h" +#include "ArRobot.h" + +/** @brief Interface to digital and analog I/O and switched power outputs on MTX + * core (used in Pioneer LX and other MTX-based robots). + + On Linux this class uses the mtx driver to interface with the + MTX digital and analog IO, and control switched power outputs. + + The mtx driver module must be loaded for this interface to work. + + The mtx interface (/dev/mtx) is opened automatically + in the ArMTXIO constructor. If successful, isEnabled() will then return true. + + The MTX IO is organized as two sets of 8-bit "banks" of inputs, and two 8-bit + "banks" of outputs. + + To read the state input, use getDigitalIOInputMon1() and + getDigitalIOInputMon2(), or getDigitalBankInputs() with bank index 0 or 1. + + To set state of output, use setDigitalOutputControl1() and + setDigitalOutputControl2(), or setDigitalBankOutputs() with bank index 2 or + 3. + + Multile ArMTXIO objects may be instatiated; a shared may be + locked and unlocked by calling lock() and unlock(). + + @ingroup OptionalClasses + @ingroup DeviceClasses + @ingroup MTX + + @linuxonly + +*/ + +class ArMTXIO +{ +public: + + enum Direction + { + DIGITAL_INPUT, + DIGITAL_OUTPUT, + INVALID + }; + + /// Constructor + AREXPORT ArMTXIO(const char * dev = "/dev/mtx"); + /// Destructor + AREXPORT virtual ~ArMTXIO(void); + + /// tries to close the device. Returns false if operation failed + AREXPORT bool closeIO(void); + + /// returns true if the device is opened and operational + bool isEnabled(void) { return myEnabled; } + + /// returns true if analog values are supported + AREXPORT bool isAnalogSupported(void) { return myAnalogEnabled; } + + /// @note not yet implemented. + bool getAnalogValue(int port, double *val) { return true; } + /// @note not yet implemented + bool getAnalogValueRaw(int port, int *val) { return true; } + + /// Get/set value of digital IO banks (see class description above) + /// Banks are 0-indexed. + /// @{ + AREXPORT Direction getDigitalBankDirection(int bank); + AREXPORT bool setDigitalBankOutputs(int bank, unsigned char val); + AREXPORT bool getDigitalBankInputs(int bank, unsigned char *val); + AREXPORT bool getDigitalBankOutputs(int bank, unsigned char *val); + /// @} + + /// Set one bit of an output bank. @a bank and @a bit are 0-indexed. + bool setDigitalOutputBit(int bank, int bit) { + unsigned char val; + if(!getDigitalBankOutputs(bank, &val)) + return false; + return setDigitalBankOutputs( bank, val | (1 << bit) ); + } + + /// Get one bit of an input bank. @a bank and @a bit are 0-indexed. + bool getDigitalInputBit(int bank, int bit) { + unsigned char val = 0; + getDigitalBankInputs(bank, &val); + return val & (1 << bit); + } + + /// get/set value of power output controls (see robot manual for information + /// on what components and user outputs are controlled). Banks are 0-indexed. + /// @{ + AREXPORT bool setPeripheralPowerBankOutputs(int bank, unsigned char val); + AREXPORT bool getPeripheralPowerBankOutputs(int bank, unsigned char *val); + /// @} + + /// Set one power output. @a bank and @a bit are 0-indexed. + bool setPowerOutput(int bank, int bit, bool on) { + unsigned char val = 0; + if(!getPeripheralPowerBankOutputs(bank, &val)) + return false; + if (on) + return setPeripheralPowerBankOutputs(bank, val & (1 << bit)); + else + return setPeripheralPowerBankOutputs(bank, val ^ (1 << bit)); + } + + /// Lock global (shared) mutex for all ArMTXIO instances. + /// This allows multiple access to MTX IO (through multiple ArMTXIO objects). + AREXPORT int lock(void){ return(ourMutex.lock()); } + /// Unlock global (shared) mutex for all ArMTXIO instances. + /// This allows multiple access to MTX IO (through multiple ArMTXIO objects). + AREXPORT int unlock(void){ return(ourMutex.unlock()); } + + /// Try to lock without blocking (see ArMutex::tryLock()) + AREXPORT int tryLock() {return(ourMutex.tryLock());} + + /// gets the Firmware Revision + AREXPORT unsigned char getFirmwareRevision() + { return myFirmwareRevision; } + + /// gets the Firmware Version + AREXPORT unsigned char getFirmwareVersion() + { return myFirmwareVersion; } + + /// gets the Compatibility Code + AREXPORT unsigned char getCompatibilityCode() + { return myCompatibilityCode; } + + /// gets the MTX FPGA Type + AREXPORT unsigned char getFPGAType() + { return myFPGAType; } + + /// gets the values of digital input/output monitoring registers 1 & 2 + /// @{ + AREXPORT bool getDigitalIOInputMon1(unsigned char *val); + AREXPORT bool getDigitalIOInputMon2(unsigned char *val); + AREXPORT bool getDigitalIOOutputMon1(unsigned char *val); + AREXPORT bool getDigitalIOOutputMon2(unsigned char *val); + /// @} + + /// get the Light Pole IO Output Control Register + AREXPORT bool getLightPole(unsigned char *val); + /// sets the Light Pole IO Output Control Register + AREXPORT bool setLightPole(unsigned char *val); + + /// @internal + AREXPORT bool getLPCTimeUSec(ArTypes::UByte4 *timeUSec); + + /// @internal + AREXPORT ArRetFunctor1 *getLPCTimeUSecCB(void) + { return &myLPCTimeUSecCB; } + + /// gets/sets the Semaphore Registers + /// @internal + //@{ + AREXPORT bool setSemaphore1(unsigned char *val); + AREXPORT bool getSemaphore1(unsigned char *val); + AREXPORT bool setSemaphore2(unsigned char *val); + AREXPORT bool getSemaphore2(unsigned char *val); + AREXPORT bool setSemaphore3(unsigned char *val); + AREXPORT bool getSemaphore3(unsigned char *val); + AREXPORT bool setSemaphore4(unsigned char *val); + AREXPORT bool getSemaphore4(unsigned char *val); + //@} + + /// gets the bumper Input Monitoring Reg + /// @internal + AREXPORT bool getBumperInput(unsigned char *val); + + /// gets the Power Status Register + /// @internal + AREXPORT bool getPowerStatus1(unsigned char *val); + /// gets the Power Status Register 2 + /// @internal + AREXPORT bool getPowerStatus2(unsigned char *val); + + /// gets the LIDAR Safety Status Register + AREXPORT bool getLIDARSafety(unsigned char *val); + + /// gets the ESTOP status Registers + /// @internal + //@{ + AREXPORT bool getESTOPStatus1(unsigned char *val); + AREXPORT bool getESTOPStatus2(unsigned char *val); + AREXPORT bool getESTOPStatus3(unsigned char *val); + AREXPORT bool getESTOPStatus4(unsigned char *val); + /// Compares the high nibble of this byte against the passed in val, returns true if it matches + AREXPORT bool compareESTOPStatus4HighNibbleAgainst(int val); + //@} + + /// gets/sets Digital IO Output Control Registers 1 & 2 + //@{ + AREXPORT bool getDigitalOutputControl1(unsigned char *val); + AREXPORT bool setDigitalOutputControl1(unsigned char *val); + AREXPORT bool getDigitalOutputControl2(unsigned char *val); + AREXPORT bool setDigitalOutputControl2(unsigned char *val); + //@} + + /// gets/sets the Peripheral Power Control Regs 1 & 2 + /// These control power to core and robot components, and to user/auxilliary + /// power outputs. Refer to robot manual for information on which components + /// and outputs are controlled by which bits in the peripheral power bitmasks. + //@{ + AREXPORT bool getPeripheralPower1(unsigned char *val); + AREXPORT bool setPeripheralPower1(unsigned char *val); + AREXPORT bool getPeripheralPower2(unsigned char *val); + AREXPORT bool setPeripheralPower2(unsigned char *val); + AREXPORT bool getPeripheralPower3(unsigned char *val); + AREXPORT bool setPeripheralPower3(unsigned char *val); + //@} + + /// gets the motion power status + AREXPORT bool getMotionPowerStatus(unsigned char *val); + + /// gets/sets the LIDAR Control Reg + /// @internal + //@{ + AREXPORT bool getLIDARControl(unsigned char *val); + AREXPORT bool setLIDARControl(unsigned char *val); + //@} + + + /// gets analog Block 1 & 2 + //@{ + AREXPORT bool getAnalogIOBlock1(int analog, unsigned short *val); + AREXPORT bool getAnalogIOBlock2(int analog, unsigned short *val); + + AREXPORT bool setAnalogIOBlock2(int analog, unsigned short *val); + //@} + + /// This returns a conversion of the bits to a decimal value, + /// currently assumed to be in the 0-5V range + /// @internal + AREXPORT bool getAnalogValue(double *val); + + /// @internal + AREXPORT bool getAnalogValueRaw(int *val); + +protected: + + bool getLPCTimer0(unsigned char *val); + bool getLPCTimer1(unsigned char *val); + bool getLPCTimer2(unsigned char *val); + bool getLPCTimer3(unsigned char *val); + + + static ArMutex ourMutex; + int myFD; + + bool myEnabled; + bool myAnalogEnabled; + + unsigned char myFirmwareRevision; + unsigned char myFirmwareVersion; + unsigned char myCompatibilityCode; + unsigned char myFPGAType; + + struct MTX_IOREQ{ + unsigned short myReg; + unsigned short mySize; + union { + unsigned int myVal; + unsigned int myVal32; + unsigned short myVal16; + unsigned char myVal8; + //unsigned char myVal128[16]; + } myData; + }; + + int myNumBanks; + + unsigned char myDigitalBank1; + unsigned char myDigitalBank2; + unsigned char myDigitalBank3; + unsigned char myDigitalBank4; + + ArRetFunctorC myDisconnectCB; + ArRetFunctor1C myLPCTimeUSecCB; +}; + +//#endif // SWIG + +#endif // ARMTXIO_H diff --git a/Legacy/Aria/include/ArMap.h b/Legacy/Aria/include/ArMap.h new file mode 100644 index 0000000..db83900 --- /dev/null +++ b/Legacy/Aria/include/ArMap.h @@ -0,0 +1,655 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* + * + * + * + * Aria maps are implemented by a collection of classes and interfaces. The + * most important is the ArMapInterface, which is defined in ArMapInterface.h + * and specifies the methods that all Aria maps must provide. + * + * This file contains the top-level concrete implementation of the + * ArMapInterface. ArMap is basically the map that is used by the robot + * to navigate its environment. In addition to implementing the methods of + * ArMapInterface, ArMap also provides a means of hooking into the Aria config. + * When the map file name is specified in the Aria config and is changed during + * runtime, ArMap loads the new file and notifies all listeners that the map + * has been changed. + * + * In order to accomplish this, ArMap has been implemented using the Proxy + * design pattern (refer to "Design Patterns", Gamma et al, 1995). The + * participants are as follows: + * + * - Subject: ArMapInterface. The common interface for both the RealSubject + * and the Proxy. It is defined in ArMapInterface.h and is actually + * the combination of several smaller interfaces: ArMapScanInterface, + * ArMapObjectsInterface, ArMapInfoInterface, and ArMapSupplementInterface. + * + * - RealSubject: ArMapSimple. The real object that the Proxy represents. + * It is defined in ArMapComponents.h, and is implemented by a set of + * helper classes that are also defined in that header file. + * + * - Proxy: ArMap. Creates and controls access to the RealSubject. ArMap + * actually contains references to two ArMapSimple objects. One is + * permanent and is the map object that is used by the robot. The other + * is transient and is the map object that is currently being read from + * a file following an Aria configuration update. If the file is + * successfully read, then the loading ArMapSimple object is copied to + * the main permanent one and mapChanged notifications are sent to + * registered listeners. + * + * The following "diagram" illustrates the basic hierarchy: + * + *
  
+ *        ArMapInterface                          , Defined in ArMapInterface.h
+ *        ^ (extends)  ^ 
+ *        |            |
+ *        |            |
+ *     ArMap +-------> ArMapSimple * +-------> ArMapScan *
+ *                 (contains)        |
+ *                                   +-------> ArMapObjects *
+ *                                   |
+ *                                   +-------> ArMapInfo *
+ *                                   |
+ *                                   +-------> ArMapSupplement *
+ *
+ *                                              * : Defined in ArMapComponents.h
+ * 
+ * + * + * This header file originally also contained the definition of ArMapObject. + * That class has been moved into its own header file (ArMapObject.h). + * + * + * Maintenance Note #1: In this case, the use of the Proxy design pattern implies + * that modifying the ArMap external interface requires multiple changes: + * First, the ArMapInterface (or sub-interface) must be updated. Then the ArMap + * and ArMapSimple classes must be modified. Depending on the change, one of the + * helper map components may also need to be modified. It is expected that + * such changes to the interface will be infrequent. + * + * @see ArMapInfo + * @see ArMapObject + * @see ArMapObjects + * @see ArMapScan + * @see ArMapSupplement +**/ +#ifndef ARMAP_H +#define ARMAP_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +#include "ArMapComponents.h" +#include "ArMapInterface.h" +#include "ArMapUtils.h" + +#include "ArFunctor.h" +#include "ArArgumentBuilder.h" +#include "ArMutex.h" + +#include + +class ArFileParser; + +/// A map of a two-dimensional space the robot can navigate within, and which can be updated via the Aria config +/** +* ArMap contains data that represents the operating space of the robot, and can +* be used for space searching, localizing, navigating etc. MobileRobots' ARNL +* and SONARNL localization and navigation libraries use ArMap objects. +* ArMap also provides methods to read and write the map from and to a file, +* along with a mechanism for setting the map file via the global Aria config. +* +* Types of data stored in a map include sensable obstacles (e.g. walls and +* furniture in a room) that are represented either as a collection of data +* points or lines. The data points are similar to a raster or bit map and +* are useful for high resolution sensors like lasers. The lines create a +* vector map that is useful for low resolution sensors like sonar. For +* advanced applications, the sensable obstacle data can be categorized according +* to the type of scan or sensor; see ArMapScanInterface for more information. +* +* In addition to the obstacle data, the Aria map may contain goals, forbidden +* areas, and other points and regions of interest (a.k.a. "map objects"). +* Advanced applications can extend the set of predefined map object types. +* See @ref MapObjects for more information. +* +* If the application needs to be aware of any changes that are made to the +* Aria map at runtime, then it should install "mapChanged" callbacks on the map. +* If the map file is re-read while the robot is running, then the callbacks +* are automatically invoked. If the application makes other changes to the +* map by calling any of the set methods, then it should call mapChanged() when +* it is finished. +* +* See @ref MapFileFormat for the exact format of the actual .map file. +* +* @section MapThreading Thread issuses, and changing the map +* +* Different threads will need to access the same map data (for example ARNL, +* ArForbiddenRangeDevice, networking). However, the ArMap class is not +* inherently thread-safe. You must call lock() and unlock() methods, before +* and after any access to the map data (e.g. calls to getMapObjects(), +* getPoints(), setMapObjects(), setPoints()). +* +* If you are going to use setMapObjects(), setPoints(), setLines(), or +* setMapInfo(), then you should lock() the map beforehand, call the methods, +* then call mapChanged() to invoke the callbacks, and then finally +* unlock() the map when done. Note that mapChanged() will only invoke +* the callbacks if the data has actually changed. +* +* However, there is an exception: the readFile() and writeFile() +* methods @b do automatically lock the map while they read and write. +* +* @section MapObjects Map Objects +* +* In addition to lines and points, maps may contain "map objects", points +* or regions in space that have special meaning. +* +* Certain types of objects are predefined for all maps. These include +* Goal, GoalWithHeading, Dock, ForbiddenLine, ForbiddenArea, and RobotHome. +* +* - Goal and GoalWithHeading are basically named ArPoses, the difference being +* that the "th" (heading) value is only valid for GoalWithHeading. +* - Dock is an ArPose that must always have a heading. +* - ForbiddenLine is a boundary line, and ForbiddenArea is a rectangular +* "sector". The extents of these objects are given as a pair of +* poses, a "from" point and a "to" point. +* - RobotHome may be either an ArPose or a rectangular sector. +* +* Rectangular objects may also have an associated angle of rotation, which is +* stored in the object pose theta value (ArMapObject::getPose().getTh()). +* The actual global coordinates of the rectangle must be calculated +* using this angle and its "from-to" values. You can get a list of the 4 +* ArLineSegment objects that comprise the rectangle's edges using +* ArMapObject::getFromToSegments(). If you want to do your own calculations, +* see ArMapObject::ArMapObject(). +* +* You can get a pointer to the current list of map objects with getMapObjects(), +* and directly modify the list. You can also replace the current list of +* map objects with a new one by calling setMapObjects(); this will destroy +* the old list of map objects. Call mapChanged() to notify other components +* that the map has changed. +* +* In addition to the standard map object types, is also possible to define +* custom types of map objects using the "MapInfo" metadata section of the +* map file. For example, if you wished to program some special behavior that +* would only occur upon reaching certain goals, you could define a new +* "SpecialGoal" type in the map file, and check for it in your program. +* See @ref MapFileFormat for the syntax for defining new object types in the +* map file. Custom types will appear in Mapper3 and MobilePlanner in +* drop-down menus, and instances of the custom types will be displayed in +* MobileEyes. +* +* Important Note: if a map defines special GoalType or DockType items, +* then it must define all possible goal or dock types, including the +* default "Goal", "GoalWithHeading", and "Dock" types if you want those +* types to remain available. +* + * @ingroup OptionalClasses +*/ +class ArMap : public ArMapInterface +{ + +public: + + /// Constructor + /** + * @param baseDirectory the name of the directory in which to search for map + * files that are not fully qualified + * @param addToGlobalConfig a bool set to true if the map file name parameter + * should be added to the global config, Aria::getConfig(); false, otherwise + * @param configSection the char * name of the config section to which to + * add the map file name parameter name; applicable only if addToGlobalConfig + * is true + * @param configParam the char * name of the parameter to be added to the + * specified configSection; applicable only if addToGlobalConfig is true + * @param configDesc the char * description of the configParam; applicable + * only if addToGlobalConfig is true + * @param ignoreEmptyFileName a bool set to true if an empty file name is a + * valid config parameter value; set to false if a failure should be reported + * when the file name is empty; applicable only if addToGlobalConfig is true + * @param priority the ArPriority::Priority of the config parameter; + * applicable only if addToGlobalConfig is true + * @param tempDirectory the name of the directory in which to write temporary + * files when saving a map; if NULL, then the map file is written directly. + * Note that using a temp file reduces the risk that the map will be corrupted + * if the application crashes. + * @param configProcessFilePriority priority at which ArMap's configuration + * parameters should be processed by ArConfig. + **/ + AREXPORT ArMap(const char *baseDirectory = "./", + bool addToGlobalConfig = true, + const char *configSection = "Files", + const char *configParam = "Map", + const char *configDesc = + "Map of the environment that the robot uses for navigation", + bool ignoreEmptyFileName = true, + ArPriority::Priority priority = ArPriority::IMPORTANT, + const char *tempDirectory = NULL, + int configProcessFilePriority = 100); + + /// Copy constructor + AREXPORT ArMap(const ArMap &other); + + /// Assignment operator + AREXPORT ArMap &operator=(const ArMap &other); + + /// Destructor + AREXPORT virtual ~ArMap(void); + + + // =========================================================================== + // ArMapInterface Methods + // =========================================================================== + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Scan Types Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual std::list getScanTypes() const; + + AREXPORT virtual bool setScanTypes(const std::list &scanTypeList); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Locking / Mutex Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual int lock(); + + AREXPORT virtual int tryLock(); + + AREXPORT virtual int unlock(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ArMapScanInterface + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual const char *getDisplayString + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual std::vector *getPoints + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getMinPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual ArPose getMaxPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual int getNumPoints(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual bool isSortedPoints(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const; + + AREXPORT virtual void setPoints(const std::vector *points, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedPoints = false, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual std::vector *getLines + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getLineMinPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual ArPose getLineMaxPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual int getNumLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual bool isSortedLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const; + + AREXPORT virtual void setLines(const std::vector *lines, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedLines = false, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual int getResolution(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual void setResolution(int resolution, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual void writeScanToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual void writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL); + + AREXPORT virtual void writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL); + + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser); + + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser); + + + AREXPORT virtual bool readDataPoint( char *line); + + AREXPORT virtual bool readLineSegment( char *line); + + /** Public for ArQClientMapProducer **/ + + AREXPORT virtual void loadDataPoint(double x, double y); + AREXPORT virtual void loadLineSegment(double x1, double y1, double x2, double y2); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ArMapObjectsInterface + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual ArMapObject *findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading = false); + + AREXPORT virtual ArMapObject *findMapObject(const char *name, + const char *type = NULL, + bool isIncludeWithHeading = false); + + AREXPORT virtual std::list findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading = false); + + AREXPORT virtual std::list *getMapObjects(void); + + AREXPORT virtual void setMapObjects(const std::list *mapObjects, + bool isSortedObjects = false, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual void writeObjectListToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ArMapInfoInterface + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual std::list *getInfo(const char *infoName); + + AREXPORT virtual std::list *getInfo(int infoType); + + AREXPORT virtual std::list *getMapInfo(void); + + AREXPORT virtual int getInfoCount() const; + + AREXPORT virtual std::list getInfoNames() const; + + AREXPORT virtual bool setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual bool setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual bool setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual const char *getInfoName(int infoType); + + AREXPORT virtual void writeInfoToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ArMapSupplementInterface + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual bool hasOriginLatLongAlt(); + AREXPORT virtual ArPose getOriginLatLong(); + AREXPORT virtual double getOriginAltitude(); + + AREXPORT virtual void setOriginLatLongAlt + (bool hasOriginLatLong, + const ArPose &originLatLong, + double altitude, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual void writeSupplementToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Remaining ArMapInterface Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual void clear(); + + AREXPORT virtual bool set(ArMapInterface *other); + + AREXPORT virtual ArMapInterface *clone(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Map Changed / Callback Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual void mapChanged(void); + + AREXPORT virtual void addMapChangedCB(ArFunctor *functor, int position = 50); + + AREXPORT virtual void remMapChangedCB(ArFunctor *functor); + + AREXPORT virtual void addPreMapChangedCB(ArFunctor *functor, + int position = 50); + + AREXPORT virtual void remPreMapChangedCB(ArFunctor *functor); + + AREXPORT virtual void setMapChangedLogLevel(ArLog::LogLevel level); + + AREXPORT virtual ArLog::LogLevel getMapChangedLogLevel(void); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Persistence + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual void writeToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + AREXPORT virtual void writeObjectsToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + bool isOverrideAsSingleScan = false, + const char *maxCategory = NULL); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // File I/O Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual void addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + AREXPORT virtual void remPreWriteFileCB(ArFunctor *functor); + + AREXPORT virtual void addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + AREXPORT virtual void remPostWriteFileCB(ArFunctor *functor); + + /// Forces the map to reload if the config is changed/reloaded + AREXPORT void forceMapLoadOnConfigProcessFile(void) + { myForceMapLoad = true; } + +#ifndef SWIG + /** @swigomit (can't write to arguments yet) */ + AREXPORT virtual bool readFile(const char *fileName, + char *errorBuffer, + size_t errorBufferLen, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen); + AREXPORT bool readFile(const char *fileName, char *errorBuffer, size_t errorBufferLen); +#endif + AREXPORT bool readFile(const char *fileName); + +#ifndef SWIG + /** @swigomit (can't write to arguments yet) */ + AREXPORT virtual bool writeFile(const char *fileName, + bool internalCall, + unsigned char *md5DigestBuffer = NULL, + size_t md5DigestBufferLen = 0, + time_t fileTimestamp = -1); +#endif + + virtual bool writeFile(const char *fileName) + { + return writeFile(fileName, false, NULL, 0, -1); + } + +#ifndef SWIG + /// @swigomit + AREXPORT virtual struct stat getReadFileStat() const; +#endif + + AREXPORT virtual bool getMapId(ArMapId *mapIdOut, + bool isInternalCall = false); + + AREXPORT virtual bool calculateChecksum(unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen); + + + AREXPORT virtual const char *getBaseDirectory(void) const; + + AREXPORT virtual void setBaseDirectory(const char *baseDirectory); + + AREXPORT virtual const char *getTempDirectory(void) const; + + AREXPORT virtual void setTempDirectory(const char *tempDirectory); + + + AREXPORT virtual std::string createRealFileName(const char *fileName); + + AREXPORT virtual const char *getFileName(void) const; + + AREXPORT virtual void setSourceFileName(const char *sourceName, + const char *fileName, + bool isInternalCall = false); + + AREXPORT virtual bool refresh(); + + AREXPORT virtual void setIgnoreEmptyFileName(bool ignore); + + AREXPORT virtual bool getIgnoreEmptyFileName(void); + + AREXPORT virtual void setIgnoreCase(bool ignoreCase = false); + + AREXPORT virtual bool getIgnoreCase(void); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Inactive Section + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual ArMapInfoInterface *getInactiveInfo(); + + AREXPORT virtual ArMapObjectsInterface *getInactiveObjects(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Child Objects Section + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual ArMapObjectsInterface *getChildObjects(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Miscellaneous + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + AREXPORT virtual ArArgumentBuilder *findMapObjectParams + (const char *mapObjectName); + + AREXPORT virtual bool setMapObjectParams(const char *mapObjectName, + ArArgumentBuilder *params, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual std::list *getRemainder(); + + AREXPORT virtual void setQuiet(bool isQuiet); + + AREXPORT virtual bool parseLine(char *line); + + AREXPORT virtual void parsingComplete(void); + + AREXPORT virtual bool isLoadingDataStarted(); + + AREXPORT virtual bool isLoadingLinesAndDataStarted(); + + // =========================================================================== + // End of ArMapInterface + // =========================================================================== + + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // ArMap Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Reads a map and changes the config map name to that file + AREXPORT bool readFileAndChangeConfig(const char *fileName); + /// Changes the config map name + AREXPORT void changeConfigMapName(const char *fileName); + + + + protected: + + /// Processes changes to the Aria configuration; loads a new map file if necessary + bool processFile(char *errorBuffer, size_t errorBufferLen); + + protected: + + // Lock to protect data during file I/O operations + ArMutex myMutex; + + /// File path in which to find the map file name + std::string myBaseDirectory; + /// Name of the map file + std::string myFileName; + /// File statistics for the map file + struct stat myReadFileStat; + + /// Name of the Aria config parameter that specifies the map file name + std::string myConfigParam; + /// Whether to ignore (not process) an empty Aria config parameter + bool myIgnoreEmptyFileName; + /// Whether to ignore case when comparing map file names + bool myIgnoreCase; + + /// Whether the Aria config has already been processed at least once + bool myConfigProcessedBefore; + /// The name of the map file specified in the Aria config parameter + char myConfigMapName[MAX_MAP_NAME_LENGTH]; + /// Whether we want to force loading the map for some reasing + bool myForceMapLoad; + + /// The current map used by the robot + ArMapSimple * const myCurrentMap; + /// The map that is being loaded, i.e. read from a file; will be copied to the current map if successful + ArMapSimple * myLoadingMap; + + /// Whether to run in "quiet mode", i.e. logging less information + bool myIsQuiet; + + /// Callback that processes changes to the Aria config. + ArRetFunctor2C myProcessFileCB; + +}; // end class ArMap + + +#endif // ARMAP_H + + diff --git a/Legacy/Aria/include/ArMapComponents.h b/Legacy/Aria/include/ArMapComponents.h new file mode 100644 index 0000000..6908e69 --- /dev/null +++ b/Legacy/Aria/include/ArMapComponents.h @@ -0,0 +1,1376 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/*! \file ArMapComponents.h + * \brief Contains the set of component classes used to implement Aria maps. + * \date 06/27/08 + * \author K. Cunningham + * + * The ArMap class (defined in ArMap.h) is composed of several smaller + * classes that are defined in this header file. These include: + * + * - ArMapScan: An implementation of the ArMapScanInterface. This + * contains all of the data related to the sensed obstacles (i.e. + * data points and lines). An instance of this class is created + * for each scan type that is defined in the map. + * + * - ArMapObjects: An implementation of the ArMapObjectsInterface. + * This stores all of the map objects for the Aria map. + * + * - ArMapInfo: An implementation of the ArMapInfoInterface. This + * contains all of the info (ArArgumentBuilder) tags defined for + * the map, including MapInfo, TaskInfo, and RouteInfo. + * + * - ArMapSupplement: An implementation of the ArMapSupplementInterface. + * This is a repository for all of the extra data that does not fit + * into any of the above categories. + * + * - ArMapSimple: The RealSubject of the ArMap Proxy. This implements + * the ArMapInterface and is an aggregate of all of the above map + * components. + * + * The following "diagram" illustrates the basic hierarchy: + * + *
  
+ *
+ *          ________ArMapSupplementInterface________
+ *         ^                                        ^
+ *         |   ________ArMapInfoInterface________   |
+ *         |   ^                                ^   |
+ *         |   |   __ArMapObjectsInterface___   |   |
+ *         |   |   ^                        ^   |   |
+ *         |   |   |   ArMapScanInterface   |   |   |
+ *         |   |   |   ^                ^   |   |   |
+ *         |   |   |   |                |   |   |   |
+ *        ArMapInterface                |   |   |   |  
+ *        ^ (extends)                   |   |   |   | (extends)
+ *        |                             |   |   |   |
+ *        |                             |   |   |   |
+ *     ArMapSimple +----------> ArMapScan   |   |   |
+ *                 | (contains)             |   |   |
+ *                 +-----------> ArMapObjects   |   |
+ *                 |                            |   |
+ *                 +------------------> ArMapInfo   |
+ *                 |                                |
+ *                 +----------------> ArMapSupplement
+ *
+ * 
+ + * @see ArMapInterface + * @see ArMap +**/ +#ifndef ARMAPCOMPONENTS_H +#define ARMAPCOMPONENTS_H + +#include "ArMapInterface.h" + +class ArMapChangeDetails; +class ArMapFileLineSet; +class ArFileParser; +class ArMD5Calculator; + + +// ============================================================================ +// ArMapScan +// ============================================================================ + +/// The map data related to the sensable obstacles in the environment. +/** + * ArMapScan encapsulates the data for a particular sensor that is generated + * during the scanning process (i.e. during the creation of a .2d file). + * The class's primary attributes are the points and line segments that + * were detected during the scan. It contains methods to get and set these + * coordinates, and to read and write the data from and to a file. + *

+ * The scanType parameters identify the sensor used for scanning. + * The parameter is used in the constructor, but it is generally disregarded + * in the other methods. (The method signatures are defined in + * ArMapScanInterface, which is also implemented by ArMap. The map provides + * access to the scan data for all of the sensors -- and therefore uses the + * scanType parameters. This interface was chosen in order + * to maintain backwards compatibility with the original map.) + *

+ * If the scanType is specified, then it is used as a prefix to the DATA and + * LINES tags that are contained in the map file. +**/ +class ArMapScan : public ArMapScanInterface +{ +public: + + /// Constructor + /** + * Creates a new map scan object for the specified scan type. + * @param scanType the const char * identifier of the scan; must be + * non-NULL and must not contain whitespaces + **/ + AREXPORT ArMapScan(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + /// Copy constructor + AREXPORT ArMapScan(const ArMapScan &other); + + /// Assignment operator + AREXPORT ArMapScan &operator=(const ArMapScan &other); + + /// Destructor + AREXPORT virtual ~ArMapScan(); + + + // -------------------------------------------------------------------------- + // ArMapScanInterface Methods + // -------------------------------------------------------------------------- + + AREXPORT virtual const char *getDisplayString + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual std::vector *getPoints + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual std::vector *getLines + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getMinPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getMaxPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual int getNumPoints(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual bool isSortedPoints(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const; + + AREXPORT virtual void setPoints(const std::vector *points, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedPoints = false, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual ArPose getLineMinPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getLineMaxPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual int getNumLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual bool isSortedLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const; + + AREXPORT virtual void setLines(const std::vector *lines, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedLines = false, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual int getResolution(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual void setResolution(int resolution, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual void writeScanToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual void writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL); + + AREXPORT virtual void writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL); + + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser); + + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser); + + AREXPORT virtual bool readDataPoint( char *line); + + AREXPORT virtual bool readLineSegment( char *line); + + AREXPORT virtual void loadDataPoint(double x, double y); + + AREXPORT virtual void loadLineSegment(double x1, double y1, double x2, double y2); + + // -------------------------------------------------------------------------- + // Other Methods + // -------------------------------------------------------------------------- + + /// Resets the scan data, clearing all points and line segments + AREXPORT virtual void clear(); + + /// Combines the given other scan with this one. + /** + * @param other the ArMapScan * to be united with this one + * @param isIncludeDataPointsAndLines a bool set to true if the other scan's + * data points and lines should be copied to this scan; if false, then only + * the summary (bounding box, counts, etc) information is copied. + **/ + AREXPORT virtual bool unite(ArMapScan *other, + bool isIncludeDataPointsAndLines = false); + + /// Returns the time at which the scan data was last changed. + AREXPORT virtual ArTime getTimeChanged() const; + + // TODO: Which of these need to be in the ArMapScanInterface? + + /// Returns the unique string identifier of the associated scan type. + AREXPORT virtual const char *getScanType() const; + + /// Returns the keyword that designates the scan's data points in the map file. + AREXPORT virtual const char *getPointsKeyword() const; + /// Returns the keyword that designates the scan's data lines in the map file. + AREXPORT virtual const char *getLinesKeyword() const; + + /// Writes the scan's data points (and introductory keyword) to the given functor. + AREXPORT virtual void writePointsToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + /// Writes the scan's data lines (and introductory keyword) to the given functor. + AREXPORT virtual void writeLinesToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + + /// Adds the handlers for the data points and lines keywords to the given file parser. + /** + * These handlers are "extra" because they are added after all of the summary + * keyword have been parsed. + **/ + AREXPORT virtual bool addExtraToFileParser(ArFileParser *fileParser, + bool isAddLineHandler); + + /// Removes the handlers for the data points and lines keywords from the given file parser. + AREXPORT virtual bool remExtraFromFileParser(ArFileParser *fileParser); + + +protected: + + /// Writes the list of data lines to the given functor. + /** + * @param functor the ArFunctor1 * to which to write the + * data lines + * @param lines the vector of ArLineSegments to be written to the functor + * @param endOfLineChars an optional string to be appended to the end of + * each text line written to the functor + * @param scanType the unique string identifier of the scan type associated + * with the data lines + **/ + AREXPORT virtual void writeLinesToFunctor + (ArFunctor1 *functor, + const std::vector &lines, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + + // Function to read the minimum pos + bool handleMinPos(ArArgumentBuilder *arg); + // Function to read the maximum pos + bool handleMaxPos(ArArgumentBuilder *arg); + // Function to read the number of points + bool handleNumPoints(ArArgumentBuilder *arg); + // Function to read whether the points are sorted + bool handleIsSortedPoints(ArArgumentBuilder *arg); + + // Function to read the line minimum pos + bool handleLineMinPos(ArArgumentBuilder *arg); + // Function to read the line maximum pos + bool handleLineMaxPos(ArArgumentBuilder *arg); + // Function to read the number of lines + bool handleNumLines(ArArgumentBuilder *arg); + // Function to read whether the lines are sorted + bool handleIsSortedLines(ArArgumentBuilder *arg); + + // Function to handle the resolution + bool handleResolution(ArArgumentBuilder *arg); + /// Callback to handle the Display string. + bool handleDisplayString(ArArgumentBuilder *arg); + + // Function to snag the map points (mainly for the getMap over the network) + bool handlePoint(ArArgumentBuilder *arg); + // Function to snag the line segments (mainly for the getMap over the network) + bool handleLine(ArArgumentBuilder *arg); + + /// Adds the specified argument handler to the given file parser. + bool addHandlerToFileParser(ArFileParser *fileParser, + const char *keyword, + ArRetFunctor1 *handler); + + /// Returns the keyword prefix for this scan type. + const char *getKeywordPrefix() const; + + /// Parses a pose from the given arguments. + bool parsePose(ArArgumentBuilder *arg, + const char *keyword, + ArPose *poseOut); + + /// Parses an integer from the given text line. + bool parseNumber(char *line, + size_t lineLen, + size_t *charCountOut, + int *numOut) const; + + /// Parses whitespace from the given text line. + bool parseWhitespace(char *line, + size_t lineLen, + size_t *charCountOut) const; + + +private: + + /// Constant appended to the end of each scan data text line. + static const char *EOL_CHARS; + +protected: + + /// The unique string identifier of this scan type. + std::string myScanType; + /// Whether this is a special summary of the other scans. + bool myIsSummaryScan; + + /// The prefix prepended to the output log file messages. + std::string myLogPrefix; + /// The prefix prepended to the map file keywords (e.g. DATA and LINES) + std::string myKeywordPrefix; + /// The keyword that designates this scan's data points in the map file. + std::string myPointsKeyword; + /// The keyword that designates this scan's data lines in the map file. + std::string myLinesKeyword; + + /// Time that this scan data was last modified. + ArTime myTimeChanged; + + /// Displayable text for this scan type. + std::string myDisplayString; + + /// Number of data points in the scan. + int myNumPoints; + /// Number of data lines in the scan. + int myNumLines; + /// Resolution of the data points (in mm). + int myResolution; + /// Maximum x/y values of all of the data points in the scan. + ArPose myMax; + /// Minimum x/y values of all of the data points in the scan. + ArPose myMin; + /// Maximum x/y values of all of the data lines in the scan. + ArPose myLineMax; + /// Minimum x/y values of all of the data lines in the scan. + ArPose myLineMin; + + /// Whether the data points in myPoints have been sorted in ascending order. + bool myIsSortedPoints; + /// Whether the data lines in myLines have been sorted in ascending order. + bool myIsSortedLines; + + /// List of data points contained in this scan data. + std::vector myPoints; + /// List of data lines contained in this scan data. + std::vector myLines; + + /// Callback to parse the minimum poise from the map file. + ArRetFunctor1C myMinPosCB; + /// Callback to parse the maximum pose from the map file. + ArRetFunctor1C myMaxPosCB; + /// Callback to parse whether the points in the map file have been sorted. + ArRetFunctor1C myIsSortedPointsCB; + /// Callback to parse the number of data points in the map file. + ArRetFunctor1C myNumPointsCB; + + /// Callback to parse the minimum line pose from the map file. + ArRetFunctor1C myLineMinPosCB; + /// Callback to parse the maximum line pose from the map file. + ArRetFunctor1C myLineMaxPosCB; + /// Callback to parse whether the lines in the map file have been sorted. + ArRetFunctor1C myIsSortedLinesCB; + /// Callback to parse the number of data lines in the map file. + ArRetFunctor1C myNumLinesCB; + + /// Callback to parse the resolution in the map file. + ArRetFunctor1C myResolutionCB; + /// Callback to parse the displayable text for this scan type. + ArRetFunctor1C myDisplayStringCB; + + /// Callback to parse a data point. + ArRetFunctor1C myPointCB; + /// Callback to parse a data line. + ArRetFunctor1C myLineCB; + +}; // end class ArMapScan + +// ============================================================================ +// ArMapObjects +// ============================================================================ + +/// The collection of map objects that are contained in an Aria map. +/** + * ArMapObjects contains a list of objects defined in an Aria map. There are + * two basic classes of objects: user-defined objects such as goals and + * forbidden areas; and, special data objects that are usually automatically + * generated during the scanning process. +**/ +class ArMapObjects : public ArMapObjectsInterface +{ + +public : + + /// Default keyword that prefixes each map object line in the map file + static const char *DEFAULT_KEYWORD; + + /// Constructor + /** + * @param keyword the char * keyword that prefixes each map object line in + * the map file + **/ + AREXPORT ArMapObjects(const char *keyword = "Cairn:"); + + /// Copy constructor + AREXPORT ArMapObjects(const ArMapObjects &other); + + /// Assignment operator + AREXPORT ArMapObjects &operator=(const ArMapObjects &other); + + /// Destructor + AREXPORT virtual ~ArMapObjects(); + + + // --------------------------------------------------------------------------- + // ArMapObjectsInterface Methods + // --------------------------------------------------------------------------- + + AREXPORT virtual ArMapObject *findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading = false); + + AREXPORT virtual ArMapObject *findMapObject(const char *name, + const char *type = NULL, + bool isIncludeWithHeading = false); + + AREXPORT virtual std::list findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading = false); + + AREXPORT virtual std::list *getMapObjects(void); + + AREXPORT virtual void setMapObjects(const std::list *mapObjects, + bool isSortedObjects = false, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT void writeObjectListToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + + // --------------------------------------------------------------------------- + // Other Methods + // --------------------------------------------------------------------------- + + /// Clears the map objects and deletes them. + AREXPORT virtual void clear(); + + /// Adds the keyword and handler for the map objects to the given file parser. + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser); + + /// Removes the keyword and handler for the map objects from the given file parser. + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser); + + /// Returns the time at which the map objects were last changed. + AREXPORT virtual ArTime getTimeChanged() const; + +protected: + + // Function to handle the cairns + bool handleMapObject(ArArgumentBuilder *arg); + + /// Sorts the given list of map objects in order of increasing object pose. + void sortMapObjects(std::list *mapObjects); + + /// Writes the map objects to the given ArMapFileLineSet. + void createMultiSet(ArMapFileLineSet *multiSet); + + /// Writes the given ArMapFileLineSet to the output log with the specified prefix. + void logMultiSet(const char *prefix, + ArMapFileLineSet *multiSet); + +protected: + + /// Time at which the map objects were last changed. + ArTime myTimeChanged; + /// Whether the myMapObjects list has been sorted in increasing (pose) order. + bool myIsSortedObjects; + + /// Keyword that prefixes each map object in the map file. + std::string myKeyword; + + /// List of map objects contained in the Aria map. + std::list myMapObjects; + + /// Callback to parse the map object from the map file. + ArRetFunctor1C myMapObjectCB; + +}; // end class ArMapObjects + + +// ============================================================================ +// ArMapInfo +// ============================================================================ + + +/// A container for the various "info" tags in an Aria map. +/** + * ArMapInfo is an implementation of ArMapInfoInterface that provides access + * to a collection of "info" arguments (such as MapInfo and RouteInfo). An Aria + * map may have one or more categories of info, each implemented by an ordered + * list of ArArgumentBuilder's. + * + * Info types are currently identified by a unique integer. The default types + * are defined in ArMapInfoInterface::InfoType, but applications may define + * additional types. (See ArMapInfo::ArMapInfo(int*, char**, size_t)) +**/ +class ArMapInfo : public ArMapInfoInterface +{ +public: + + /// Contructor + /** + * @param infoNameList an array of the char * keywords for each of the + * standard ArMapInfo::InfoType's; if NULL, then the default keywords are + * used + * @param infoNameCount the size_t length of the infoNameList array + * @param keywordPrefix optional prefix to add to keywords. + **/ + AREXPORT ArMapInfo(const char **infoNameList = NULL, + size_t infoNameCount = 0, + const char *keywordPrefix = NULL); + + /// Copy contructor + AREXPORT ArMapInfo(const ArMapInfo &other); + /// Assignment operator + AREXPORT ArMapInfo &operator=(const ArMapInfo &other); + /// Destructor + AREXPORT virtual ~ArMapInfo(); + + // --------------------------------------------------------------------------- + // ArMapInfoInterface Methods + // --------------------------------------------------------------------------- + + AREXPORT virtual std::list *getInfo(const char *infoName); + + AREXPORT virtual std::list *getInfo(int infoType); + AREXPORT virtual std::list *getMapInfo(void); + + AREXPORT virtual int getInfoCount() const; + + AREXPORT virtual std::list getInfoNames() const; + + AREXPORT virtual bool setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails); + + + AREXPORT virtual bool setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL); + AREXPORT virtual bool setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual const char *getInfoName(int infoType); + + AREXPORT virtual void writeInfoToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + // --------------------------------------------------------------------------- + // Other Methods + // --------------------------------------------------------------------------- + + /// Clears all info arguments and deletes them. + AREXPORT virtual void clear(); + + /// Adds handlers for all of the info types to the given file parser. + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser); + /// Removes handlers for all of the info types from the given file parser. + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser); + + /// Returns the time at which the info were last changed. + AREXPORT virtual ArTime getTimeChanged() const; + +protected: + + /// Processes the given argument for the specified info. + bool handleInfo(ArArgumentBuilder *arg); + + /// Give ArMapSimple access to the createMultiSet() and setChanged() methods + friend class ArMapSimple; + + /// Writes the specified info arguments to the given ArMapFileLineSet. + /** + * @param infoName unique identifier for the info to be written + * @param multiSet the ArMapFileLineSet * to which to write the info; + * must be non-NULL + * @param changeDetails the ArMapChangeDetails * that specifies the + * parent/child relationship amongst info lines + * @see ArMapChangeDetails::isChildArg + **/ + void createMultiSet(const char *infoName, + ArMapFileLineSet *multiSet, + ArMapChangeDetails *changeDetails); + + /// Basically updates the timeChanged to now. + void setChanged(); + + /// Populates this object with the default info names / keywords + void setDefaultInfoNames(); + + + +protected: + + struct ArMapInfoData { + + ArMapInfo *myParent; + int myType; + std::string myKeyword; + std::list myInfo; + ArRetFunctor1C *myInfoCB; + + ArMapInfoData(ArMapInfo *parent, + const char *name = NULL, + int type = -1); + ~ArMapInfoData(); + ArMapInfoData(ArMapInfo *parent, + const ArMapInfoData &other); + ArMapInfoData &operator=(const ArMapInfoData &other); + + }; // end struct ArMapInfoData + + typedef std::map ArInfoNameToDataMap; + + + AREXPORT ArMapInfoData *findData(const char *infoName); + + AREXPORT ArMapInfoData *findDataByKeyword(const char *keyword); + + + /// Time at which the info was last changed + ArTime myTimeChanged; + + // Sigh... In retrospect, this should have been structured differently + // and we probably should've used a string for the info identifier... + + /// Number of info types contained in this collection + int myNumInfos; + std::string myPrefix; + + std::map myInfoTypeToNameMap; + ArInfoNameToDataMap myInfoNameToDataMap; + std::map myKeywordToInfoNameMap; + +}; // end class ArMapInfo + + +// ============================================================================ +// ArMapSupplement +// ============================================================================ + +/// Supplemental data associated with an Aria map. +/** + * ArMapSupplement is a repository for extra, miscellaneous data that is + * associated with an Aria map but which does not fit neatly into any of the + * other components. +**/ +class ArMapSupplement : public ArMapSupplementInterface +{ +public: + + /// Constructor + AREXPORT ArMapSupplement(); + + /// Copy constructor + AREXPORT ArMapSupplement(const ArMapSupplement &other); + + /// Assignment operator + AREXPORT ArMapSupplement &operator=(const ArMapSupplement &other); + + /// Destructor + AREXPORT virtual ~ArMapSupplement(); + + + // -------------------------------------------------------------------------- + // ArMapSupplementInterface Methods + // -------------------------------------------------------------------------- + + AREXPORT virtual bool hasOriginLatLongAlt(); + + AREXPORT virtual ArPose getOriginLatLong(); + + AREXPORT virtual double getOriginAltitude(); + + AREXPORT virtual void setOriginLatLongAlt(bool hasOriginLatLong, + const ArPose &originLatLong, + double altitude, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual void writeSupplementToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars); + + // -------------------------------------------------------------------------- + // Other Methods + // -------------------------------------------------------------------------- + + /// Resets the map supplement to its default values. + AREXPORT virtual void clear(); + + /// Adds handlers for all of the supplement keywords to the given file parser. + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser); + /// Removes handlers for all of the supplement keywords from the given file parser. + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser); + + /// Returns the time at which the supplement data were last changed. + AREXPORT virtual ArTime getTimeChanged() const; + +protected: + + // Function to get the origin lat long altitude + bool handleOriginLatLongAlt(ArArgumentBuilder *arg); + +private: + + /// Constant appended to the end of each supplement text line. + static const char *EOL_CHARS; + +protected: + + /// Time at which the supplement was last changed + ArTime myTimeChanged; + + /// Whether the supplement data contains latitude/longitude information for the origin + bool myHasOriginLatLongAlt; + /// The latitude/longitude of the origin; only if myHasOriginLatLongAlt is true + ArPose myOriginLatLong; + /// The altitude (in m) of the origin; only if myHasOriginLatLongAlt is true + double myOriginAltitude; + + /// Callback that parses the origin latitude/longitude/altitude information + ArRetFunctor1C myOriginLatLongAltCB; + +}; // end class ArMapSupplement + + +// ============================================================================= +// ArMapSimple +// ============================================================================= + +/// Comparator used to sort scan data types in a case-insensitive manner. +struct ArDataTagCaseCmpOp +{ +public: + bool operator() (const std::string &s1, const std::string &s2) const + { + size_t s1Len = s1.length(); + size_t s2Len = s2.length(); + + if (s1Len < s2Len) { + return strncasecmp(s1.c_str(), s2.c_str(), s1Len) < 0; + } + else { + return strncasecmp(s1.c_str(), s2.c_str(), s2Len) < 0; + } + } +}; // end struct ArDataTagCaseCmpOp + +/// Type definition for a map of scan types to scan data. +typedef std::map ArTypeToScanMap; + +/// Type definition for a map of data tags to scan types +typedef std::map ArDataTagToScanTypeMap; + + +/// Simple map that can be read from and written to a file +/** + * ArMapSimple is the real subject of the ArMap proxy. Functionally, it is identical + * to the ArMap, @b except that it is not well-suited for for loading from a file at + * runtime and therefore doesn't provide any hooks into the Aria config. In general, + * ArMap should be used instead. The exception to this rule may be in off-line + * authoring tools where error checking can be performed at a higher level. +**/ +class ArMapSimple : public ArMapInterface +{ +public: + + /// Constructor + /** + * @param baseDirectory the name of the directory in which to search for map + * files that are not fully qualified + * @param tempDirectory the name of the directory in which to write temporary + * files when saving a map; if NULL, then the map file is written directly. + * Note that using a temp file reduces the risk that the map will be corrupted + * if the application crashes. + * @param overrideMutexName an optional name to be used for the map object's + * mutex; useful for debugging when multiple maps are active + **/ + AREXPORT ArMapSimple(const char *baseDirectory = "./", + const char *tempDirectory = NULL, + const char *overrideMutexName = NULL); + + /// Copy constructor + AREXPORT ArMapSimple(const ArMapSimple &other); + /// Assignment operator + AREXPORT ArMapSimple &operator=(const ArMapSimple &other); + /// Destructor + AREXPORT virtual ~ArMapSimple(void); + + + AREXPORT virtual void clear(); + + AREXPORT virtual bool set(ArMapInterface *other); + + AREXPORT virtual ArMapInterface *clone(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Scan Types Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual std::list getScanTypes() const; + + AREXPORT virtual bool setScanTypes(const std::list &scanTypeList); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Locking / Semaphore Method + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual int lock(); + + AREXPORT virtual int tryLock(); + + AREXPORT virtual int unlock(); + + + // --------------------------------------------------------------------------- + // ArMapInfoInterface + // --------------------------------------------------------------------------- + + AREXPORT virtual std::list *getInfo(const char *infoName); + AREXPORT virtual std::list *getInfo(int infoType); + AREXPORT virtual std::list *getMapInfo(void); + + AREXPORT virtual int getInfoCount() const; + + AREXPORT virtual std::list getInfoNames() const; + + AREXPORT virtual bool setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual bool setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual bool setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT virtual void writeInfoToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars); + + AREXPORT virtual const char *getInfoName(int infoType); + + // --------------------------------------------------------------------------- + // ArMapObjectsInterface + // --------------------------------------------------------------------------- + + AREXPORT virtual ArMapObject *findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading = false); + + AREXPORT virtual ArMapObject *findMapObject(const char *name, + const char *type = NULL, + bool isIncludeWithHeading = false); + + AREXPORT virtual std::list findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading = false); + + AREXPORT virtual std::list *getMapObjects(void); + + AREXPORT virtual void setMapObjects(const std::list *mapObjects, + bool isSortedObjects = false, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual void writeObjectListToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + // --------------------------------------------------------------------------- + // ArMapSupplementInterface + // --------------------------------------------------------------------------- + + AREXPORT virtual bool hasOriginLatLongAlt(); + + AREXPORT virtual ArPose getOriginLatLong(); + + AREXPORT virtual double getOriginAltitude(); + + AREXPORT virtual void setOriginLatLongAlt + (bool hasOriginLatLong, + const ArPose &originLatLong, + double altitude, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual void writeSupplementToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + // --------------------------------------------------------------------------- + // ArMapScanInterface + // --------------------------------------------------------------------------- + + AREXPORT virtual const char *getDisplayString + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual std::vector *getPoints + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getMinPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual ArPose getMaxPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual int getNumPoints(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual bool isSortedPoints(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const; + + AREXPORT virtual void setPoints(const std::vector *points, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedPoints = false, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual std::vector *getLines + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual ArPose getLineMinPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual ArPose getLineMaxPose(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual int getNumLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + AREXPORT virtual bool isSortedLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const; + + AREXPORT virtual void setLines(const std::vector *lines, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedLines = false, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual int getResolution(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual void setResolution(int resolution, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArMapChangeDetails *changeDetails = NULL); + + + AREXPORT virtual void writeScanToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE); + + AREXPORT virtual void writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL); + + AREXPORT virtual void writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL); + + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser); + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser); + + + AREXPORT virtual bool readDataPoint( char *line); + AREXPORT virtual bool readLineSegment( char *line); + + + /** Public for ArQClientMapProducer **/ + + AREXPORT virtual void loadDataPoint(double x, double y); + AREXPORT virtual void loadLineSegment(double x1, double y1, double x2, double y2); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Map Changed / Callback Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual void mapChanged(void); + + AREXPORT virtual void addMapChangedCB(ArFunctor *functor, + int position = 50); + + AREXPORT virtual void remMapChangedCB(ArFunctor *functor); + + AREXPORT virtual void addPreMapChangedCB(ArFunctor *functor, + int position = 50); + + AREXPORT virtual void remPreMapChangedCB(ArFunctor *functor); + + AREXPORT virtual void setMapChangedLogLevel(ArLog::LogLevel level); + + AREXPORT virtual ArLog::LogLevel getMapChangedLogLevel(void); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Persistence + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + AREXPORT virtual void writeToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + AREXPORT virtual void writeObjectsToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + bool isOverrideAsSingleScan = false, + const char *maxCategory = NULL); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // File I/O Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual void addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + AREXPORT virtual void remPreWriteFileCB(ArFunctor *functor); + + AREXPORT virtual void addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + AREXPORT virtual void remPostWriteFileCB(ArFunctor *functor); + + AREXPORT virtual bool readFile(const char *fileName, + char *errorBuffer = NULL, + size_t errorBufferLen = 0, + unsigned char *md5DigestBuffer = NULL, + size_t md5DigestBufferLen = 0); + + AREXPORT virtual bool writeFile(const char *fileName, + bool internalCall = false, + unsigned char *md5DigestBuffer = NULL, + size_t md5DigestBufferLen = 0, + time_t fileTimestamp = -1); + +#ifndef SWIG + /// @swigomit + AREXPORT virtual struct stat getReadFileStat() const; +#endif + + AREXPORT virtual bool getMapId(ArMapId *mapIdOut, + bool isInternalCall = false); + + AREXPORT virtual bool calculateChecksum(unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen); + + AREXPORT virtual const char *getBaseDirectory(void) const; + + AREXPORT virtual void setBaseDirectory(const char *baseDirectory); + + AREXPORT virtual const char *getTempDirectory(void) const; + + AREXPORT virtual void setTempDirectory(const char *tempDirectory); + + AREXPORT virtual std::string createRealFileName(const char *fileName); + + AREXPORT virtual const char *getFileName(void) const; + + AREXPORT virtual void setSourceFileName(const char *sourceName, + const char *fileName, + bool isInternalCall = false); + + AREXPORT virtual bool refresh(); + + + virtual void setIgnoreEmptyFileName(bool ignore); + virtual bool getIgnoreEmptyFileName(void); + virtual void setIgnoreCase(bool ignoreCase = false); + virtual bool getIgnoreCase(void); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Inactive Section + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual ArMapInfoInterface *getInactiveInfo(); + + AREXPORT virtual ArMapObjectsInterface *getInactiveObjects(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Child Objects Section + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + AREXPORT virtual ArMapObjectsInterface *getChildObjects(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Miscellaneous + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + AREXPORT virtual ArArgumentBuilder *findMapObjectParams(const char *mapObjectName); + + AREXPORT virtual bool setMapObjectParams(const char *mapObjectName, + ArArgumentBuilder *params, + ArMapChangeDetails *changeDetails = NULL); + + + + AREXPORT virtual std::list *getRemainder(); + + AREXPORT virtual void setQuiet(bool isQuiet); + + AREXPORT bool parseLine(char *line); + AREXPORT void parsingComplete(void); + + AREXPORT bool isLoadingDataStarted(); + AREXPORT bool isLoadingLinesAndDataStarted(); + + + // --------------------------------------------------------------------- + + /// Searches the given CairnInfo list for an entry that matches the given mapObject. + /** + * The CairnInfo list stores the parameter information (if any) for map + * objects. If a map object is removed (or activated), then the CairnInfo + * must also be updated. + * @param mapObjectName the ArMapObject for which to find the parameters + * @param cairnInfoList the list of ArArgumentBuilder *'s that contain the + * map object parameters (also may be set to the inactive section) + * @return iterator that points to the parameter information for the map + * object, or cairnInfoList.end() if not found + **/ + AREXPORT static std::list::iterator findMapObjectParamInfo + (const char *mapObjectName, + std::list &cairnInfoList); + +protected: + + AREXPORT bool setInactiveInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT void setInactiveObjects(const std::list *mapObjects, + bool isSortedObjects = false, + ArMapChangeDetails *changeDetails = NULL); + + AREXPORT void setChildObjects(const std::list *mapObjects, + bool isSortedObjects = false, + ArMapChangeDetails *changeDetails = NULL); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Callback that handles the different types of map categories (e.g. 2D-Map, 2D-Map-Ex) + /** + * This method replaces the old handle2DMap method. It determines which category + * was detected and sets the myMapCategory attribute accordingly. + * @param arg a pointer to the parsed ArArgumentBuilder; no arguments are expected + **/ + bool handleMapCategory(ArArgumentBuilder *arg); + + /// Callback that handles the Sources keyword + /** + * @param arg a pointer to the parsed ArArgumentBuilder; a list of string scan type + * arguments are expected + **/ + bool handleSources(ArArgumentBuilder *arg); + + + /// Callback that handles the different types of data introductions (e.g. DATA, LINES) + /** + * This method replaces the old handleData and handleLines methods. It determines + * which keyword was detected and updates the myLoadingDataTag and myLoadingScan + * attributes accordingly. + * @param arg a pointer to the parsed ArArgumentBuilder; no arguments are expected + **/ + bool handleDataIntro(ArArgumentBuilder *arg); + + + bool handleRemainder(ArArgumentBuilder *arg); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns the ArMapScan for the specified scan type. + AREXPORT virtual ArMapScan *getScan(const char *scanType) const; + + /// Sets up the map to contain teh specified scan types. + /** + * Any scans which are currently in the map are cleared and removed. + * This method is not virtual because it is called by the constructor. + * @param scanTypeList a list of the scan type string identifiers to be + * created; the list must be non-empty and must not contain duplicates; + * if the list contains more than one entry, then they all must be + * non-empty + * @return bool true if the scans were successfully created; false otherwise + **/ + bool createScans(const std::list &scanTypeList); + + /// Adds all of the map's scan types to the current file parser. + /** + * This method calls addToFileParser() on each of the map's scans. It also + * adds handlers for each of the scans' data point and line introduction + * keywords. + * @return bool true if the scans were successfully added to the current + * file parser + **/ + bool addScansToParser(); + + /// Removes all of the map's scan types from the current file parser. + bool remScansFromParser(bool isRemovePointsAndLinesKeywords = true); + + AREXPORT void writeScanTypesToFunctor(ArFunctor1 *functor, + const char *endOfLineChars); + + AREXPORT ArTime findMaxMapScanTimeChanged(); + + AREXPORT ArMapScan *findScanWithDataKeyword(const char *myLoadingDataTag, + bool *isLineDataTagOut); + + AREXPORT void updateSummaryScan(); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + AREXPORT virtual const char *getMapCategory(); + + + AREXPORT virtual void updateMapCategory(const char *updatedInfoName = NULL); + + AREXPORT virtual bool mapInfoContains(const char *arg0Text); + + AREXPORT bool isDataTag(const char *line); + + AREXPORT void reset(); + + AREXPORT void updateMapFileInfo(const char *realFileName); + + + + AREXPORT static int getNextFileNumber(); + + AREXPORT void invokeCallbackList(std::list *cbList); + + AREXPORT void addToCallbackList(ArFunctor *functor, + ArListPos::Pos position, + std::list *cbList); + + AREXPORT void remFromCallbackList(ArFunctor *functor, + std::list *cbList); + +protected: + + // static const char *ourDefaultInactiveInfoNames[INFO_COUNT]; + + + static int ourTempFileNumber; + static ArMutex ourTempFileNumberMutex; + + // lock for our data + ArMutex myMutex; + + std::list myMapCategoryList; + std::string myMapCategory; + + + ArMD5Calculator *myChecksumCalculator; + + std::string myBaseDirectory; + std::string myFileName; + struct stat myReadFileStat; + + std::list myPreWriteCBList; + std::list myPostWriteCBList; + + bool myIsWriteToTempFile; + std::string myTempDirectory; + + ArMapId myMapId; + + ArFileParser *myLoadingParser; + + // std::string myConfigParam; + bool myIgnoreEmptyFileName; + bool myIgnoreCase; + + ArMapChangedHelper *myMapChangedHelper; + + /*** + // things for our config + bool myConfigProcessedBefore; + char myConfigMapName[MAX_MAP_NAME_LENGTH]; + ***/ + + bool myLoadingGotMapCategory; + // TODO: Need to change for multi scans + bool myLoadingDataStarted; + bool myLoadingLinesAndDataStarted; + + ArMapInfo * const myMapInfo; + ArMapObjects * const myMapObjects; + ArMapSupplement * const myMapSupplement; + + std::list myScanTypeList; + ArTypeToScanMap myTypeToScanMap; + ArMapScan * mySummaryScan; + + ArDataTagToScanTypeMap myDataTagToScanTypeMap; + + std::string myLoadingDataTag; + ArMapScan * myLoadingScan; + + ArMapInfo * const myInactiveInfo; + ArMapObjects * const myInactiveObjects; + + ArMapObjects * const myChildObjects; + + std::map myMapObjectNameToParamsMap; + + /// List of map file lines that were not recognized + std::list myRemainderList; + + ArTime myTimeMapInfoChanged; + ArTime myTimeMapObjectsChanged; + ArTime myTimeMapScanChanged; + ArTime myTimeMapSupplementChanged; + + // callbacks + ArRetFunctor1C myMapCategoryCB; + ArRetFunctor1C mySourcesCB; + ArRetFunctor1C myDataIntroCB; + + // Handler for unrecognized lines + ArRetFunctor1C myRemCB; + + bool myIsQuiet; + bool myIsReadInProgress; + bool myIsCancelRead; + +}; // end class ArMapSimple + +/// --------------------------------------------------------------------------- + +#endif // ARMAPCOMPONENTS_H + diff --git a/Legacy/Aria/include/ArMapInterface.h b/Legacy/Aria/include/ArMapInterface.h new file mode 100644 index 0000000..eee37f4 --- /dev/null +++ b/Legacy/Aria/include/ArMapInterface.h @@ -0,0 +1,1494 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/*! \file ArMapInterface.h + * \brief Contains the set of interfaces that define the Aria maps. + * \date 06/27/08 + * \author K. Cunningham + * + * The methods that define the Aria maps are grouped into a set of smaller + * interfaces which are contained in this file. These include: + * + * - ArMapScanInterface : Methods related to scan data (e.g. points and + * lines) generally obtained from a specific sensor (such as the SICK laser + * or Hokuyo URG). + * + * - ArMapObjectsInterface : Methods related to the objects in a map. + * These include user-defined objects such as goals, docks, and forbidden + * lines. They also include special "data" types of objects that may be + * automatically created during the scanning process. + * + * - ArMapInfoInterface : Methods related to the various info arguments + * stored in a map. Examples of info include the map object type + * definitions and the routes and macros. + * + * - ArMapSupplementInterface : Methods used to access supplemental data + * associated with the map. This currently consists only of the latitude / + * longitude of the origin, but may be extended in the future. + * + * The primary interface implemented by all Aria maps is also contained in + * this file: + * + * - ArMapInterface : All of the methods that are available for an Aria map. + * This interface extends all of the above interfaces and contains a + * few additional file-related methods. + * + * In general, when passing an Aria map (pointer) as a parameter to a method, + * it is preferable to pass ArMapInterface *. This will allow for extension + * and different implementations of the interface. + * + *

  
+ *      ArMapScanInterface
+ *      ^
+ *      |    ArMapObjectsInterface
+ *      |    ^
+ *      |    |    ArMapInfoInterface
+ *      |    |    ^
+ *      |    |    |    ArMapSupplementInterface
+ *      |    |    |    ^  
+ *      |    |    |    | (extends)
+ *      |    |    |    |
+ *       ArMapInterface
+ *
+ * 
+**/ +#ifndef ARMAPINTERFACE_H +#define ARMAPINTERFACE_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +#include "ArMapObject.h" +#include "ArMapUtils.h" + +#include "ArArgumentBuilder.h" +#include "ArFunctor.h" +#include "ArHasFileName.h" +#include "ArMutex.h" + +#include +#include + +class ArFileParser; +class ArMapChangeDetails; +class ArMapObject; + + +// ============================================================================= +// ArMapScanInterface +// ============================================================================= + +/// The default scan type indicator, when an Aria map only has obstacle data of one type +#define ARMAP_DEFAULT_SCAN_TYPE "" +/// The scan type indicator used to obtain collective data from most or all obstacle data (see individual methods for how it is used for specific kinds of map data) +#define ARMAP_SUMMARY_SCAN_TYPE NULL + +/// Methods related to setting and retrieving the scan-related data in an Aria map. +/** + * ArMapScanInterface is an abstract class that defines the methods used + * to manipulate obstacle data in an Aria map. These generally include the + * points and lines detected by a particular sensor (a.k.a. scan type). +**/ +class ArMapScanInterface +{ +public: + + /// Determines whether the given scan type is the default (i.e. no prefix on the map tags) + AREXPORT static bool isDefaultScanType(const char *scanType); + /// Determines whether the given scan type represents the summary of all other scan types + AREXPORT static bool isSummaryScanType(const char *scanType); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Default constructor + AREXPORT ArMapScanInterface() {} + /// Destructor + AREXPORT virtual ~ArMapScanInterface() {} + + AREXPORT virtual const char *getDisplayString + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Point Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns a pointer to the map points for the specified scan. + /** + * Note that this returns a pointer to the object's internal vector. + * The map must be locked before this method is called, and must be + * unlocked after the caller has finished using the vector. + * @param scanType the const char * identifier of the scan type for + * which to return the points; must be non-NULL + * @return a pointer to the std::vector that contains the + * specified scan's points; NULL if the scanType is undefined for + * the map + **/ + AREXPORT virtual std::vector *getPoints + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns the lower left point (minimum x and y) of the scan's points. + /** + * @param scanType the const char * identifier of the scan type for + * which to return the minimum pose; if ARMAP_SUMMARY_SCAN_TYPE, then the + * minimum pose for all scans is returned + **/ + AREXPORT virtual ArPose getMinPose + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns the upper right point (maximum x and y) of the scan's points. + /** + * @param scanType the const char * identifier of the scan type for + * which to return the maximum pose; if ARMAP_SUMMARY_SCAN_TYPE, then the + * maximum pose for all scans is returned + **/ + AREXPORT virtual ArPose getMaxPose + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns the number of points in the specified scan. + /** + * @param scanType the const char * identifier of the scan type for + * which to return the point count; if ARMAP_SUMMARY_SCAN_TYPE, then the + * point count for all scans is returned + **/ + AREXPORT virtual int getNumPoints + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + + /// Returns whether the point vector for the specified scan is sorted + /** + * Note that this method returns the state of the point vector when it + * was read from the file, or after setPoints has been called. If the + * application calls getPoints and directly manipulates the point vector's + * contents, then isSortedPoints will not necessarily be correct. + * + * @param scanType the const char * identifier of the scan type for + * which to return the sorted state; if ARMAP_SUMMARY_SCAN_TYPE, then this method + * returns true if and only if all scans have sorted points + **/ + AREXPORT virtual bool isSortedPoints + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const = 0; + + /// Sets the points (copies those passed in) + /** + * This method will sort the given points in ascending order (according + * to the ArPose less-than operator. If the points vector is already sorted, + * then set the isSortedPoints parameter to true in order to improve performance. + * @param points a pointer to the ArPose vector to be copied to the scan data + * @param scanType the const char * identifier of the scan type for which + * to set the points; must not be ARMAP_SUMMARY_SCAN_TYPE or NULL + * @param isSortedPoints a bool set to true if the points vector has already + * been sorted in ascending order + * @param changeDetails a pointer to the optional ArMapChangeDetails in which + * to store a description of the changes to the scan data; if NULL then the + * changes are not tracked. + * @see ArMapChangeDetails + **/ + AREXPORT virtual void setPoints(const std::vector *points, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedPoints = false, + ArMapChangeDetails *changeDetails = NULL) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Line Segment Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns a pointer to the line segments for the specified scan. + /** + * Note that this returns a pointer to the object's internal vector. + * The map must be locked before this method is called, and must be + * unlocked after the caller has finished using the vector. + * @param scanType the const char * identifier of the scan type for + * which to return the line segments; must be non-NULL + * @return a pointer to the std::vector that contains the + * specified scan's points; NULL if the scanType is undefined for + * the map + **/ + AREXPORT virtual std::vector *getLines + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns the lower left point (minimum x and y) of the scan's line segments. + /** + * @param scanType the const char * identifier of the scan type for + * which to return the minimum line segment pose; if ARMAP_SUMMARY_SCAN_TYPE, + * then the minimum line segment pose for all scans is returned + **/ + AREXPORT virtual ArPose getLineMinPose + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns the upper right point (maximum x and y) of the scan's line segments. + /** + * @param scanType the const char * identifier of the scan type for + * which to return the maximum line segment pose; if ARMAP_SUMMARY_SCAN_TYPE, + * then the maximum line segment pose for all scans is returned + **/ + AREXPORT virtual ArPose getLineMaxPose + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns the number of line segments in the specified scan. + /** + * @param scanType the const char * identifier of the scan type for + * which to return the line segment count; if ARMAP_SUMMARY_SCAN_TYPE, then the + * line segment count for all scans is returned + **/ + AREXPORT virtual int getNumLines + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Returns whether the line segment vector for the specified scan is sorted + /** + * Note that this method returns the state of the line segment vector when it + * was read from the file, or after setLines has been called. If the + * application calls getLines and directly manipulates the line segment vector's + * contents, then isSortedLines will not necessarily be correct. + * + * @param scanType the const char * identifier of the scan type for + * which to return the sorted state; if ARMAP_SUMMARY_SCAN_TYPE, then this method + * returns true if and only if all scans have sorted line segments + **/ + AREXPORT virtual bool isSortedLines(const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) const = 0; + + + /// Sets the lines (copies those passed in) + /** + * This method will sort the given line segments in ascending order (according + * to the ArLineSegment less-than operator. If the vector is already sorted, + * then set the isSortedLiens parameter to true in order to improve performance. + * @param lines a pointer to the ArLineSegment vector to be copied to the scan data + * @param scanType the const char * identifier of the scan type for which + * to set the points; must not be ARMAP_SUMMARY_SCAN_TYPE or NULL + * @param isSortedLines a bool set to true if the line segment vector has already + * been sorted in ascending order + * @param changeDetails a pointer to the optional ArMapChangeDetails in which + * to store a description of the changes to the scan data; if NULL then the + * changes are not tracked. + * @see ArMapChangeDetails + **/ + AREXPORT virtual void setLines(const std::vector *lines, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + bool isSortedLines = false, + ArMapChangeDetails *changeDetails = NULL) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Other Attributes + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Gets the resolution (-1 if none specified) + /** + * @param scanType the const char * identifier of the scan for which to return + * the resolution; if ARMAP_SUMMARY_SCAN_TYPE then the lowest resolution (highest + * numerical value) of all scans is returned + **/ + AREXPORT virtual int getResolution + (const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Sets the resolution (-1 if none specified) + /** + * @param resolution the int number of mm between the scan data point readings + * @param scanType the const char * identifier of the scan for which to return + * the resolution; must not be ARMAP_SUMMARY_SCAN_TYPE or NULL + * @param changeDetails a pointer to the optional ArMapChangeDetails in which + * to store a description of the changes to the scan data; if NULL then the + * changes are not tracked. + * @see ArMapChangeDetails + **/ + AREXPORT virtual void setResolution(int resolution, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArMapChangeDetails *changeDetails = NULL) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Persistence + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + // Writes the scan header information to the given functor; does not write the points or lines. + /** + * This method writes a text line for each of the scan header attributes + * (such as MinPose, MaxPose, NumPoints). Depending on the scan type, a + * prefix may be prepended to the keyword (e.g. HokuyoURGMinPose). + * + * @param functor the ArFunctor1 to which to write the scan header information + * (as text lines) + * @param endOfLineChars the const char * string to be appended to the end + * of each text line + * @param scanType the const char * identifier of the scan data to be written to + * the functor; must not be ARMAP_SUMMARY_SCAN_TYPE or NULL + * + **/ + AREXPORT virtual void writeScanToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE) = 0; + + /// Writes the scan data points to a functor. + /** + * A pointer to the entire data point vector is passed directly to the + * functor in order to improve performance. The functor must not + * modify the vector's contents. + * @param functor a pointer to the ArFunctor2 that takes the number of points + * and the vector of ArPoses, and writes the information + * @param scanType the const char * identifier of the scan points to be written; + * must not be ARMAP_SUMMARY_SCAN_TYPE or NULL + * @param keywordFunctor a pointer to an optional ArFunctor1 that writes a + * text line to introduce the associated ArPoses; if NULL, then the header is not + * written + **/ + AREXPORT virtual void writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL) = 0; + + /// Writes the map line segments to a functor. + /** + * A pointer to the entire data line segment vector is passed directly to the + * functor in order to improve performance. The functor must not + * modify the vector's contents. + * @param functor a pointer to the ArFunctor2 that takes the number of line + * segments and the vector of ArLineSegments, and writes the information + * @param scanType the const char * identifier of the scan points to be written; + * must not be ARMAP_SUMMARY_SCAN_TYPE or NULL + * @param keywordFunctor a pointer to an optional ArFunctor1 that writes a + * text line to introduce the associated ArLineSegments; if NULL, then the + * header is not written + **/ + AREXPORT virtual void writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType = ARMAP_DEFAULT_SCAN_TYPE, + ArFunctor1 *keywordFunctor = NULL) = 0; + + + /// Adds handlers for this scan data's header information to the given file parser + /** + * @param fileParser a pointer to the ArFileParser to which to add the handlers + * @return bool true if the handlers were successfully added; false if an error + * occurred + **/ + AREXPORT virtual bool addToFileParser(ArFileParser *fileParser) = 0; + + /// Removes the handlers for this scan data's header information from the given file parser + /** + * @param fileParser a pointer to the ArFileParser from which to remove the handlers + * @return bool true if the handlers were successfully removed; false if an error + * occurred + **/ + AREXPORT virtual bool remFromFileParser(ArFileParser *fileParser) = 0; + + + /// Reads a data point from the given line and adds it to this scan data. + /** + * The data point is expected to be two integers (x y), separated by whitespace. + * @param line the char * text line to be parsed + * @return bool true if the point was successfully read and added to this scan + * data; false if an error occurred + **/ + AREXPORT virtual bool readDataPoint( char *line) = 0; + + /// Reads a line segment from the given line and adds it to this scan data. + /** + * The line segment is expected to be four integers (x1 y1 x2 y2), separated + * by whitespace + * @param line the char * text line to be parsed + * @return bool true if the line segment was successfully read and added to + * this scan data; false if an error occurred + **/ + AREXPORT virtual bool readLineSegment( char *line) = 0; + + /*** Public for ArQClientMapProducer ***/ + /// Adds the specified data point to the scan data. + AREXPORT virtual void loadDataPoint(double x, double y) = 0; + /// Adds the specified line segment to the scan data. + AREXPORT virtual void loadLineSegment(double x1, double y1, + double x2, double y2) = 0; + +}; // end class ArMapScanInterface + + +// ============================================================================= +// ArMapObjectsInterface +// ============================================================================= + +/// Methods related to setting and retrieving the objects in an Aria map. +/** + * ArMapObjectsInterface is an abstract class that defines the methods used + * to manipulate the ArMapObjects that are contained in an Aria map. +**/ +class ArMapObjectsInterface +{ + +public : + + /// Constructor + AREXPORT ArMapObjectsInterface() {} + + /// Destructor + AREXPORT virtual ~ArMapObjectsInterface() {} + + + /// Returns the first map object of given name and type, or NULL if none is found + /** + * A pointer to the actual map object is returned. It is not safe to + * store this pointer because it will be deleted when the map is changed. + * If the caller needs the map object, then it should create its own copy. + * This method is not thread-safe. + * + * @param name the const char * name of the object to be found; if NULL then + * any object of the specified type is a match + * @param type the const char * type of the object to be found; if NULL then + * search all object types + * @param isIncludeWithHeading a bool set to true if the given type represents a + * pose and both "heading-less" and "with-heading" objects should be searched; + * if false, then only objects of the exact type are searched + * @return ArMapObject * the matching map object, or NULL if none found + **/ + AREXPORT virtual ArMapObject *findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading = false) = 0; + + /// Returns the map object of given name and type, or NULL if none is found + /** + * A pointer to the actual map object is returned. It is not safe to + * store this pointer because it will be deleted when the map is changed. + * If the caller needs the map object, then it should create its own copy. + * This method is not thread-safe. + * + * @param name the const char * name of the object to be found + * @param type the const char * type of the object to be found; if NULL then + * search all object types + * @param isIncludeWithHeading a bool set to true if the given type represents a + * pose and both "heading-less" and "with-heading" objects should be searched; + * if false, then only objects of the exact type are searched + * @return ArMapObject * the matching map object, or NULL if none found + **/ + AREXPORT virtual ArMapObject *findMapObject(const char *name, + const char *type = NULL, + bool isIncludeWithHeading = false) = 0; + + + /// Returns a list of all map objects of the specified type. + /** + * A list of pointers to the actual map objects is returned. It is not + * safe to store these pointers because they will be deleted when the map + * is changed. If the caller needs the map objects at a later time, then + * it should create its own copy of each object in the list. + * This method is not thread-safe. + * + * @param type the const char * type of the objects to be found; if NULL then + * all objects are returned + * @param isIncludeWithHeading a bool set to true if the given type represents a + * pose and both "heading-less" and "with-heading" objects should be searched; + * if false, then only objects of the exact type are searched + * @return a list of pointers to all of the ArMapObject's that match the given + * type + **/ + AREXPORT virtual std::list findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading = false) = 0; + + /// Returns a pointer to the internal list of map objects. + /** + * Ideally, callers of this method should not use the pointer to modify + * the map objects directly. It is preferable to modify a copy and then + * call setMapObjects. + * + * It is not safe to store the returned pointer list because the pointers will + * be deleted when the map is changed. If the caller needs the map objects at + * a later time, then it should create its own copy of each object in the list. + * This method is not thread-safe. + * @return a list of pointers to all of the ArMapObject's in the map + **/ + AREXPORT virtual std::list *getMapObjects(void) = 0; + + /// Sets the map objects (copies those passed in) + /** + * This method sets its internal list to contain a copy of all of the given + * map objects. Any map objects which were originally in the list but are + * no longer referenced are deleted. The list of map objects will be sorted + * by increasing pose (i.e. objects in the upper left will be placed before + * objects in the lower right). + * This method is not thread-safe. + * + * @param mapObjects a pointer to the list of ArMapObject *'s to be copied + * @param isSortedObjects a bool set to true if the objects in the given + * list have already been sorted by increasing pose; this can improve + * the performance of this method + * @param changeDetails an optional pointer to the ArMapChangeDetails in + * which to accumulate a description of the changes to the map objects; + * if NULL, then changes are not tracked + * @see ArMapChangeDetails + **/ + AREXPORT virtual void setMapObjects + (const std::list *mapObjects, + bool isSortedObjects = false, + ArMapChangeDetails *changeDetails = NULL) = 0; + + + // TODO Seems like it would be awfully nice to have an addMapObject and a + // removeMapObject method + + + /// Writes the list of map objects to a text-based functor. + /** + * This method writes a Cairn text line for each of the ArMapObject's. + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor1 that writes the text lines + * @param endOfLineChars the const char * string that indicates the end of + * each text line + **/ + AREXPORT virtual void writeObjectListToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) = 0; + + }; // end class ArMapObjectsInterface + + +// ============================================================================= +// ArMapInfoInterface +// ============================================================================= + +/// Methods related to setting and retrieving the various "info" tags in an Aria map. +/** + * ArMapInfoInterface is an abstract class that defines the methods used to + * get and set an Aria map's "info" arguments. An Aria map may have one or more + * categories of info, each implemented by an ordered list of ArArgumentBuilder's. + * The ArMapInfoInterface defines access to a collection of these info categories. +**/ +class ArMapInfoInterface +{ +public : + + + AREXPORT static const char *MAP_INFO_NAME; + AREXPORT static const char *META_INFO_NAME; + AREXPORT static const char *TASK_INFO_NAME; + AREXPORT static const char *ROUTE_INFO_NAME; + AREXPORT static const char *SCHED_TASK_INFO_NAME; + AREXPORT static const char *SCHED_INFO_NAME; + AREXPORT static const char *CAIRN_INFO_NAME; + AREXPORT static const char *CUSTOM_INFO_NAME; + + + + /// Constructor + AREXPORT ArMapInfoInterface() {} + + /// Destructor + AREXPORT virtual ~ArMapInfoInterface() {} + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Getters + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns the number of info categories that are contained in this collection. + AREXPORT virtual int getInfoCount() const = 0; + + /// Returns a list of the info category names that are contained in this collection. + /** + * @return the list of string names of the info categories (for example, + * MAP_INFO_NAME, META_INFO_NAME, ...) + * This method is not thread-safe. + **/ + AREXPORT virtual std::list getInfoNames() const = 0; + + + /// Returns the arguments for the specified info category; or NULL if none found + /** + * This method returns a pointer to the actual ArArgumentBuilder list that is + * contained in the map. It is not safe to store these pointers because they + * will be deleted when the map is changed. If the caller needs the info + * arguments at a later time, then it should create its own copy of each + * argument in the list. + * This method is not thread-safe. + * + * @param infoName the unique char * identifier of the info category to be + * returned; must be non-NULL and a member of + * @return std::list * a pointer to the specified Info + * list; NULL if infoType was invalid + **/ + AREXPORT virtual std::list *getInfo(const char *infoName) = 0; + + + /// Gets the strings for the specified Info category. + /** + * @deprecated use getInfo(const char *) instead + * + * This method returns a pointer to the actual ArArgumentBuilder list that is + * contained in the map. It is not safe to store these pointers because they + * will be deleted when the map is changed. If the caller needs the info + * arguments at a later time, then it should create its own copy of each + * argument in the list. + * This method is not thread-safe. + * + * @param infoType the int ID of the Info category; must be >= 0 and less than + * numInfos + * @return std::list * a pointer to the specified Info + * list; NULL if infoType was invalid + **/ + AREXPORT virtual std::list *getInfo(int infoType) = 0; + + /// Gets the map info strings + /** + * This method is equivalent to getInfo(MAP_INFO_NAME). + * @see getInfo + **/ + AREXPORT virtual std::list *getMapInfo(void) = 0; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Setters + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Sets the contents of the specified Info category (copies those passed in) + /** + * This method is not thread-safe. + * @param infoName the unique const char * identifier of the + * @param infoList the std::list * that defines the + * Info category's contents; NULL to clear the Info + * @param changeDetails a pointer to the ArMapChangeDetails in which to + * accumulate changes to the map's info lines; if NULL, then changes are + * not tracked + * @return bool set to true if the contents were successfully set; false, + * if an error occurred + * @see ArMapChangeDetails + * @see setInfoNames + **/ + AREXPORT virtual bool setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL) = 0; + + + /// Sets the contents of the specified Info category (copies those passed in) + /** + * @deprecated use setInfo(const char *,const std::list *,ArMapChangeDetails*) + * + * This method is not thread-safe. + * @param infoType the int ID of the Info category to be set + * @param infoList the std::list * that defines the + * Info category's contents; NULL to clear the Info + * @param changeDetails a pointer to the ArMapChangeDetails in which to + * accumulate changes to the map's info lines; if NULL, then changes are + * not tracked + * @return bool set to true if the contents were successfully set; false, + * if infoType was invalid + * @see ArMapChangeDetails + **/ + AREXPORT virtual bool setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails = NULL) = 0; + + + /// Sets the map info (copies those passed in) + /** + * This method is equivalent to setInfo(MAP_INFO, mapInfo, changeDetails); + **/ + AREXPORT virtual bool setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails = NULL) = 0; + + + //AREXPORT virtual bool setInfoNames(const std::list &infoNameList) = 0; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Miscellaneous + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Writes the info collection to a text-based functor. + /** + * This method writes a text line for each of the info's ArArgumentBuilders. + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor1 that writes the text lines + * @param endOfLineChars the const char * string that indicates the end of + * each text line + **/ + AREXPORT virtual void writeInfoToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Deprecated + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// List of the standard Info categories defined for Aria maps + /** + * @deprecated + **/ + enum InfoType { + MAP_INFO, ///< MapInfo lines that define the valid map object types + FIRST_INFO = MAP_INFO, ///< First value in the enumeration + META_INFO, ///< MetaInfo lines that provide overview info about the map + TASK_INFO, ///< TaskInfo lines that define the available robot tasks + ROUTE_INFO, ///< RouteInfo lines that are the goal assocs, macros, and routes + SCHED_TASK_INFO, ///< SchedTaskInfo that define special tasks that may be scheduled + SCHED_INFO, ///< SchedInfo lines that are the schedules of route patrols + CAIRN_INFO, ///< CairnInfo lines that contain optional arguments for map objects + CUSTOM_INFO, ///< CustomInfo lines contain application specific data + LAST_INFO = CUSTOM_INFO ///< Last value in the enumeration + }; + + /** + * @deprecated + **/ + enum { + INFO_COUNT = LAST_INFO + 1 ///< Number of standard Info categories + }; + + + /// Returns the name of the specified Info type + /** + * @deprecated + * The info name is the "xInfo:" tag that appears at the beginning of each text + * line. If subclasses define additional Info categories, then they must override + * this method. + * @param infoType the int ID of the Info category + * @return const char * the name of the specified Info category; or NULL if not + * found + **/ + AREXPORT virtual const char *getInfoName(int infoType) = 0; + + +}; // end class ArMapInfoInterface + + +// ============================================================================= +// ArMapSupplementInterface +// ============================================================================= + +/// Methods related to miscellaneous extra data in an Aria map. +/** + * ArMapSupplementInterface is basically a repository for any pieces of data + * that do not fit in the other categories (i.e. scan data, map objects, or + * info). It currently stores the optional latitude/longitude information. +**/ +class ArMapSupplementInterface +{ +public: + + /// Default constructor + AREXPORT ArMapSupplementInterface() {} + + /// Destructor + AREXPORT virtual ~ArMapSupplementInterface() {} + + /// Returns whether this map has an origin specified in latitude/longitude (and altitude) + AREXPORT virtual bool hasOriginLatLongAlt() = 0; + + /// Returns the latitude/longitude origin; valid only if hasOriginLatLongAlt returns true + AREXPORT virtual ArPose getOriginLatLong() = 0; + + /// Gets the altitude of the origin; valid only if hasOriginLatLongAlt returns true + /** + * @return double the altitude (in meters) of the origin + **/ + AREXPORT virtual double getOriginAltitude() = 0; + + /// Sets the latitude/longitude and altitude of the origin. + /** + * @param hasOriginLatLong a bool set to true if the map has latitude/longitude + * information for the origin + * @param originLatLong the ArPose that specifies the latitude/longitude of the + * origin + * @param altitude the double altitude (in meters) of the origin + * @param changeDetails a pointer to the optional ArMapChangeDetails in which + * to store a description of the changes to the scan data; if NULL then the + * changes are not tracked. + **/ + AREXPORT virtual void setOriginLatLongAlt + (bool hasOriginLatLong, + const ArPose &originLatLong, + double altitude, + ArMapChangeDetails *changeDetails = NULL) = 0; + + /// Writes the supplemental data to the given functor + /** + * @param functor the ArFunctor1 to which to write the supplemental data + * (as text lines) + * @param endOfLineChars the const char * string to be appended to the end + * of each text line + **/ + AREXPORT virtual void writeSupplementToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) = 0; + +}; // end class ArMapSupplementInterface + + +// ============================================================================= +// ArMapInterface +// ============================================================================= + +/** + * ArMapInterface defines the methods that are available on all Aria maps. + * These maps represent the operating space of a robot, and can be used for + * space searching, localizing, navigating etc. The types of data stored + * in a map include sensable obstacles (e.g. walls and furniture in a room) + * represented either as a collection of data points (similar to a raster + * or bit map, useful for high resolution sensors like a laser), or lines + * (a vector map, useful for low resolution sensors like the sonar), + * goals, and other points or regions of interest ("map objects"). + * + * The methods in ArMapInterface can be broadly categorized as follows: + * - Scan Methods: These provide access the sensable obstacles that are + * represented as a collection of data points or lines. These are + * typically generated during the scanning process (i.e. the creation of + * the .2d file). If more than one sensor is used, then the data is + * organized on a per-sensor basis. The scan methods are grouped into + * the ArMapScanInterface. + * - Object Methods: These provide access to the "high-level" objects + * in the environment. Such objects include goals, docks, forbidden + * areas, and other user-defined points of interest. They may also + * include special data objects that are actually part of the operating + * environment and are generally added automatically and are not editable + * by the user. The object methods are grouped into the + * ArMapObjectsInterface. + * - Info Methods: A wide variety of supporting information is included + * in various "info" categories. This includes definitions for the + * types of map objects that can be stored in the map. It also includes + * various optional features such as macros and schedules. The info + * methods are grouped into the ArMapInfoInterface. + * - Extra Data Methods: These are essentially the "leftovers" -- i.e. + * methods that are related directly to map data but which do not + * fit into any of the above categories. They are defined in the + * ArMapSupplementInterface. + * - Callback Methods: Users of the Aria map may install callbacks onto + * the map in order to be notified when the map contents has changed. + * These methods are defined below. + * - File and I/O Methods: Methods to read and write map files are also + * included below. In addition, the MD5 checksum of the map contents + * may be calculated. + * + * TODO: + * - Possibly make the calculation of checksums optional? +**/ +class ArMapInterface : public ArHasFileName, + public ArMapInfoInterface, + public ArMapObjectsInterface, + public ArMapScanInterface, + public ArMapSupplementInterface +{ +public: + + enum { + MAX_MAP_NAME_LENGTH = 512 ///< Maximum length of the map file's name + }; + + AREXPORT static const char *MAP_CATEGORY_2D; + AREXPORT static const char *MAP_CATEGORY_2D_MULTI_SOURCES; + /// Superset of multi-sources; includes advanced Info types, CairnInfo and CustomInfo + AREXPORT static const char *MAP_CATEGORY_2D_EXTENDED; + /// Superset of extended; includes group objects and parent maps + AREXPORT static const char *MAP_CATEGORY_2D_COMPOSITE; + + + /// Helper method creates a full file path name from the given components. + AREXPORT static std::string createRealFileName(const char *baseDirectory, + const char *fileName, + bool isIgnoreCase); + + /// Constructor + AREXPORT ArMapInterface() {} + + /// Destructor + AREXPORT virtual ~ArMapInterface(void) {} + + + /// Clears the map, removing all info, objects and data points and lines. + AREXPORT virtual void clear() = 0; + + /// Sets this map to be "equivalent" to the given other map. + /** + * Modifies this map so that is effectively a copy of the given map. All info, + * objects, and data points and lines in the other map are copied and stored in + * this map. + * @param other a pointer to the ArMapInterface to be copied; must not be NULL + * @return bool true if the map was successfully copied to this one; false if + * an error occurred + **/ + AREXPORT virtual bool set(ArMapInterface *other) = 0; + + /// Creates a new map that is "equivalent" to this map. + /** + * Creates a new map that is effectively a copy of this map. Note, however, + * that the returned map may not be of exactly the same class (so the term + * "clone" is being used somewhat loosely). In particular, if the active ArMap + * that is associated with the robot configuration is cloned, then the resulting + * map will be simpler and not associated with the robot configuration. + * @return ArMapInterface * a new copy of this map + * @javanote Use cloneMap() instead + **/ + AREXPORT virtual ArMapInterface *clone() = 0; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Scan Types Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns a list of the scan types that are defined for this map + /** + * This method is not thread-safe. + * + * @return std::list a list of the scan types that are defined + * for this map + **/ + AREXPORT virtual std::list getScanTypes() const = 0; + + /// Sets the scan types that are defined for this map + /** + * This method clears all of the exisiting scans (i.e. point and line data). + * This method is not thread-safe. + * + * @param scanTypeList the list of scan type string identifiers to be set; + * the list must not contain any duplicate entries + * @return bool true if the scan types were successfully set; false otherwise + **/ + AREXPORT virtual bool setScanTypes(const std::list &scanTypeList) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Locking / Semaphore Method + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Lock the map instance + AREXPORT virtual int lock() = 0; + /// Try to lock the map instance without blocking + AREXPORT virtual int tryLock() = 0; + /// Unlock the map instance + AREXPORT virtual int unlock() = 0; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Map Changed / Callback Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Function that will call the map changed CBs if needed + /** + * Users of Aria maps should invoke this method after making any changes to the + * map. It causes the installed map changed handlers to be invoked. + * + * This method is not thread-safe. It should be surrounded by calls to lock() + * and unlock(). For example: + * + * + * std::list newMapObjects; + * // Add some objects... + * myMap->lock(); + * myMap->setMapObjects(&newMapObjects); + * myMap->mapChanged(); + * myMap->unlock(); + * + * + * Note that this method is automatically invoked under some circumstances + * (such as when the map file is re-read following a change to the robot + * configuration). Also note that this method will not invoke any callbacks + * if the map has not been modified via an explicit call to a set method. + * + * @see addMapChangedCB + * @see addPreMapChangedCB + **/ + AREXPORT virtual void mapChanged(void) = 0; + + + /// Adds a callback that is invoked when the map has been changed. + /** + * The given functor should assume that the map has been lock()-ed when + * it is invoked. It should also not attempt to make changes to the + * mapChanged() callback list during the invoke method. + * This method is not thread-safe. + * + * This method is just a wrapper for compatibility, the one that + * takes position as an integer is the main one that should be used + * now. + * + * @param functor a pointer to the ArFunctor to be invoked; must be non-NULL + * @param position the ArListPos::Pos indication at which to add the functor + * (i.e. at the beginning or at the end of the callback list) + **/ + AREXPORT virtual void addMapChangedCB(ArFunctor *functor, + ArListPos::Pos position); + + + /// Adds a callback that is invoked when the map has been changed. + /** + * The given functor should assume that the map has been lock()-ed when + * it is invoked. It should also not attempt to make changes to the + * mapChanged() callback list during the invoke method. + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor to be invoked; must be non-NULL + * + * @param position this indicates the order in which the functors + * will be called, the nominal range is 0 to 100, highest is called first + **/ + AREXPORT virtual void addMapChangedCB + (ArFunctor *functor, + int position = 50) = 0; + + /// Removes a callback called when the map has been changed + /** + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor to be removed; must be non-NULL + **/ + AREXPORT virtual void remMapChangedCB(ArFunctor *functor) = 0; + + /// Adds a callback called before the map changed callbacks are called + /** + * The "pre-map-changed callbacks" are invoked *after* the map has been + * changed, but before the other "map-changed callbacks" are invoked. + * This method is not thread-safe. + * + * This method is just a wrapper for compatibility, the one that + * takes position as an integer is the main one that should be used + * now. + * + * @param functor a pointer to the ArFunctor to be invoked; must be non-NULL + * @param position the ArListPos::Pos indication at which to add the functor + * (i.e. at the beginning or at the end of the callback list) + * + * @swignote call as addPreMapChangedCBPos() if passing an ArListPos.Pos + * object for @a position rather than an int + **/ + AREXPORT virtual void addPreMapChangedCB(ArFunctor *functor, ArListPos::Pos position); + + /// Adds a callback called before the map changed callbacks are called + /** + * The "pre-map-changed callbacks" are invoked *after* the map has been + * changed, but before the other "map-changed callbacks" are invoked. + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor to be invoked; must be non-NULL + * + * @param position this indicates the order in which the functors + * will be called, the nominal range is 0 to 100, highest is called + * first + **/ + AREXPORT virtual void addPreMapChangedCB + (ArFunctor *functor, + int position = 50) = 0; + + + /// Removes the specified "pre-map-changed callback". + /** + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor to be removed; must be non-NULL + **/ + AREXPORT virtual void remPreMapChangedCB(ArFunctor *functor) = 0; + + + /// Sets the level at which to log information about the map changed callbacks + AREXPORT virtual void setMapChangedLogLevel(ArLog::LogLevel level) = 0; + + /// Returns the level at which information about the map changed callbacks is logged + AREXPORT virtual ArLog::LogLevel getMapChangedLogLevel(void) = 0; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Persistence + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + /// Writes all of the map to the given text-based functor + /** + * This method is not thread-safe + * @param functor a pointer to the ArFunctor1 to which to write the map + * header as text lines + * @param endOfLineChars the const char * string to use as an end-of-line + * indicator + **/ + AREXPORT virtual void writeToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) = 0; + + /// Writes the map header information and objects to a text-based functor. + /** + * This method writes all of the map scan headers, the info arguments, and + * the Cairn map objects to the given functor. It does not write the actual + * scan point or line segment data (nor the header lines that introduce the + * data). + * This method is not thread-safe. + * + * @param functor a pointer to the ArFunctor1 to which to write the map + * header as text lines + * @param endOfLineChars the const char * string to use as an end-of-line + * indicator + * @param isOverrideAsSingleScan a bool set to true if only a single scan + * header should be written; this is generally the "summary scan" and is + * used to maintain backwards compatibility with client applications that + * do not expect multiple scan types in a single map. + * @param maxCategory if given, limit map category + **/ + AREXPORT virtual void writeObjectsToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + bool isOverrideAsSingleScan = false, + const char *maxCategory = NULL) = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // File I/O Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Adds a callback to be invoked before the map file is written. + /** + * @param functor the ArFunctor * callback to be added + * @param position the ArListPos::Pos that specifies whether the callback + * should be added at the front or the back of the list + **/ + AREXPORT virtual void addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) = 0; + + /// Removes the given callback from the list of pre-write callbacks. + /** + * @param functor the ArFunctor * callback to be removed + **/ + AREXPORT virtual void remPreWriteFileCB(ArFunctor *functor) = 0; + + /// Adds a callback to be invoked after the map file is written. + /** + * @param functor the ArFunctor * callback to be added + * @param position the ArListPos::Pos that specifies whether the callback + * should be added at the front or the back of the list + **/ + AREXPORT virtual void addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) = 0; + + /// Removes the given callback from the list of post-write callbacks. + /** + * @param functor the ArFunctor * callback to be removed + **/ + AREXPORT virtual void remPostWriteFileCB(ArFunctor *functor) = 0; + +#ifndef SWIG + /// Reads the map from the specified file + /** + * If the file is successfully read into the map, then this method calls + * mapChanged() afterwards to invoke the installed callbacks. + * + * This method automatically calls lock() and unlock() during operation. Do + * not call this method if the map is already locked. + * + * @param fileName the name of the file to read; Unless an absolute path + * to a file is given (starting with "/" or "\" or, on Windows, a drive letter + * root such as "C:\", "D:\", etc.), it is combined + * with this map's base directory (see getBaseDirectory()) to form the complete file path name; must be + * non-NULL + * @param errorBuffer a pointer to a char buffer in which specific read errors + * can be recorded; if NULL, then the return value is the only success indication + * @param errorBufferLen the size_t of the error buffer + * @param md5DigestBuffer an optional pointer to a buffer in which to store the + * calculated checksum of the map; if NULL, then the checksum is not output + * @param md5DigestBufferLen the size_t of the checksum buffer + * @return bool true if the file was successfully read and the map was populated; + * false if an error occurred + * @see ArMD5Calculator + **/ + AREXPORT virtual bool readFile(const char *fileName, + char *errorBuffer = NULL, + size_t errorBufferLen = 0, + unsigned char *md5DigestBuffer = NULL, + size_t md5DigestBufferLen = 0) = 0; + + /// Writes the map to the specified file + /** + * By default, this method automatically calls lock() and unlock() during its + * operation. If the map is already locked when the file needs to be written, + * then set the internalCall parameter to true to override the default locking + * behavior + * + * @param fileName the const char * name of the file to written; it is combined + * with the getBaseDirectory() to form the complete file path name; must be + * non-NULL + * @param internalCall a bool set to true if writeFile is being called while + * the map is already locked; set to false to indicate that the map should + * lock itself during the method + * @param md5DigestBuffer an optional pointer to a buffer in which to store the + * calculated checksum of the map; if NULL, then the checksum is not output + * @param md5DigestBufferLen the size_t of the checksum buffer + * @param fileTimestamp the time_t to which to set the file write time; in + * general, this should be left as -1 to indicate that the actual write time is + * desired; a real time value can be used to synchronize the map across many + * robots + * @return bool true if the file was successfully written; false if an error + * occurred + * @see ArMD5Calculator + **/ + AREXPORT virtual bool writeFile(const char *fileName, + bool internalCall = false, + unsigned char *md5DigestBuffer = NULL, + size_t md5DigestBufferLen = 0, + time_t fileTimestamp = -1) = 0; +#endif + +#ifndef SWIG + /// Returns information about the map file that was read. + /** @swigomit */ + AREXPORT virtual struct stat getReadFileStat() const = 0; +#endif + + /// Retrieves the map ID. + /** + * The map ID is a unique identifier based on the map file name and the + * checksum data. (Perhaps more accurately, it is highly likely to be + * unique during normal usage.) + * @param mapIdOut a pointer to the ArMapId to be set + * @param isInternalCall a bool set to true only when getMapId is called + * within the context of a method that has already locked the map; if + * false, then the map is locked by this method + * @return bool true if the map ID was successfully set; false, otherwise + **/ + AREXPORT virtual bool getMapId(ArMapId *mapIdOut, + bool isInternalCall = false) = 0; + + /// Calculates the checksum of the map. + /** + * @param md5DigestBuffer the unsigned char buffer in which to store + * the calculated checksum + * @param md5DigestBufferLen the length of the md5DigestBuffer; should + * be ArMD5Calculator::DIGEST_LENGTH + * @return bool true if the checksum was successfully calculated; + * false if an error occurrred + * @see ArMD5Calculator + **/ + AREXPORT virtual bool calculateChecksum(unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen) = 0; + + + /// Gets the base directory + AREXPORT virtual const char *getBaseDirectory(void) const = 0; + /// Sets the base directory + AREXPORT virtual void setBaseDirectory(const char *baseDirectory) = 0; + + /// Gets the temp directory + AREXPORT virtual const char *getTempDirectory(void) const = 0; + /// Sets the temp directory + AREXPORT virtual void setTempDirectory(const char *tempDirectory) = 0; + + + /// Prepends the appropriate directory information on the given filename. + AREXPORT virtual std::string createRealFileName(const char *fileName) = 0; + + /// Gets the fileName that was loaded + AREXPORT virtual const char *getFileName(void) const = 0; + + /// Sets the name of the source and the file from which the map was loaded. + /** + * This method is primarily used to track when a map has been received + * from the central server or another robot. The source and file name + * can be retrieved from the map ID. + * @param sourceName the const char * name of the central server or robot + * from which the map was obtained + * @param fileName the const char * name of the map file on the source + * @param isInternalCall a bool set to true if this method is being called + * while the map is locked; if false, then this method will lock the map + **/ + AREXPORT virtual void setSourceFileName(const char *sourceName, + const char *fileName, + bool isInternalCall = false) = 0; + + + + /// Determines whether the map file needs to be re-read. + /** + * This method is primarily applicable to the active Aria map that is + * associated with the robot configuration. It checks to see if the map + * file has been modified since it was read, and re-reads it if necessary. + * The method may do nothing for "simpler" maps. + **/ + AREXPORT virtual bool refresh() = 0; + + /// Sets whether we ignore empty file names or fail if we encounter one + /** + * This method is primarily applicable to the active Aria map that is + * associated with the robot configuration. + **/ + virtual void setIgnoreEmptyFileName(bool ignore) = 0; + /// Gets whether we ignore empty file names or fail if we encounter one + /** + * This method is primarily applicable to the active Aria map that is + * associated with the robot configuration. + **/ + virtual bool getIgnoreEmptyFileName(void) = 0; + /// Sets whether we ignore case or not + /** + * This method is primarily applicable to the active Aria map that is + * associated with the robot configuration. + **/ + virtual void setIgnoreCase(bool ignoreCase = false) = 0; + /// Gets whether we ignore case or not + /** + * This method is primarily applicable to the active Aria map that is + * associated with the robot configuration. + **/ + virtual bool getIgnoreCase(void) = 0; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Inactive Section + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Provides direct access to the inactive map info. + /** + * The "inactive" info is a section of the Aria map that applications may + * use to store "_XInfo:" lines that are not currently active or applicable. + * The inactive info will be written to the map file, but it will not be + * included in any of the inherited ArMapInfoInterface calls (e.g. getInfo(type)). + * This is primarily intended for advanced specialized use where something + * needs to be removed from the map file, but it may be necessary to restore + * it later. + * This method is not thread-safe. + * @return ArMapInfoInterface * a pointer to the inactive map info section + **/ + AREXPORT virtual ArMapInfoInterface *getInactiveInfo() = 0; + + /// Provides direct access to the inactive map objects. + /** + * The "inactive" objects is a section of the Aria map that applications may + * use to store "_Cairn" lines that are not currently active or applicable. + * The inactive objects will be written to the map file, but they will not be + * included in any of the inherited ArMapObjectsInterface calls + * (e.g. getMapObjects()). This is primarily intended for advanced specialized + * use where an object needs to be removed from the map file, but it may be + * necessary to restore it later. + * This method is not thread-safe. + * @return ArMapObjectsInterface * a pointer to the inactive map objects section + **/ + AREXPORT virtual ArMapObjectsInterface *getInactiveObjects() = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Child Objects Section + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Provides direct access to the child map objects which are used to define group templates. + AREXPORT virtual ArMapObjectsInterface *getChildObjects() = 0; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Miscellaneous + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Returns the optional parameters associated with a map object, or NULL if none. + /** + * The Aria map provides an advanced feature that allows a parameter list + * to be defined for custom map object types. (Refer to the ArMap MapFileFormat + * for more information.) + * + * This convenience method provides access to the parameter values for a + * specified map object. It is basically a shortcut for searching and + * parsing the CairnInfo argument list. Unlike the CairnInfo arguments + * (which also include an introduction and map object name), the + * argument builder returned by this method only contains the parameter + * values. Also note that if the argument builder contains string + * parameters, then they may be surrounded by quotes. + * + * The returned pointer should not be stored, modified, or deleted. + * + * See setMapObjectParams for important information about changing the + * parameter values or the associated map object. + * + * This method is not thread-safe. (The call and use of the returned + * ArArgumentBuilder should be surrounded by calls to lock()/unlock().) + * + * @param mapObjectName the unique char * name of the map object whose + * parameters are to be retrieved + * @return ArArgumentBuilder * a pointer to the map object's parameter + * values; + **/ + AREXPORT virtual ArArgumentBuilder *findMapObjectParams + (const char *mapObjectName) = 0; + + + /// Sets the optional parameters associated with a map object. + /** + * This method sets the parameter values for the specified map object. + * It should be used only for custom map object types that have a + * parameter list defined in the MapInfo. (Refer to the ArMap MapFileFormat + * for more information.) + * + * Like findMapObjectParams(), this is basically a convenience method + * that simplifies access to the data stored in the CairnInfo argument + * list. + * + * If the given params is non-NULL, then it is copied and stored in + * the map. (Note that this deletes the pointer previously returned by + * findMapObjectParams(mapObjectName). Do not store that pointer.) + * It is entirely the caller's responsibility to ensure that the + * params arg count and types are correct. + * + * If the given params is NULL, then the parameter information for the + * map object is cleared. If a mapObjectWithParams is to be deleted, + * then setMapObjectParams(mapObjectWithParams->getName(), NULL) must + * be called first. + * + * @param mapObjectName the unique char * name of the map object whose + * parameters are to be updated + * @param params the ArArgumentBuiler * containing the new parameter + * values; if NULL, then the parameter information for the map object + * is deleted + * @param changeDetails an optional pointer to the ArMapChangeDetails in + * which to accumulate a description of the changes to the map; if NULL, + * then changes are not tracked + * @see ArMapChangeDetails + */ + AREXPORT virtual bool setMapObjectParams(const char *mapObjectName, + ArArgumentBuilder *params, + ArMapChangeDetails *changeDetails = NULL) = 0; + + + /// Returns a list of the map file lines that were not recognized. + /** + * Ideally, the returned list should be empty. The remainder list is + * primarily used to determine whether the editor is up-to-date for the + * current map version and to try to minimize lost data. + * + * Note that this method returns a pointer to the actual list that is stored + * in the map object. It is not safe to store this pointer. + * + * This method is not thread-safe. + **/ + AREXPORT virtual std::list *getRemainder() = 0; + + /// Turn on this flag to reduce the number of verbose log messages. + AREXPORT virtual void setQuiet(bool isQuiet) = 0; + + + /** Public for ArQMapProducer **/ + + /// Parses a map line + AREXPORT virtual bool parseLine(char *line) = 0; + /// Says that the parsing by lines is done and to use the parsed data + AREXPORT virtual void parsingComplete(void) = 0; + + // When loading a map, returns whether all header, objects, and lines have completed loading. + /** + * This value returns true once the first DATA tag has been reached. + * The rest of the map contains data points. + **/ + AREXPORT virtual bool isLoadingDataStarted() = 0; + + // When loading a map, returns whether all header and objects have completed loading. + /** + * This value returns true once the first LINES tag has been reached. + * The rest of the map contains data lines and points. + **/ + AREXPORT virtual bool isLoadingLinesAndDataStarted() = 0; + +}; // end class ArMapInterface + +#endif // ARMAPINTERFACE_H + diff --git a/Legacy/Aria/include/ArMapObject.h b/Legacy/Aria/include/ArMapObject.h new file mode 100644 index 0000000..4a72bc0 --- /dev/null +++ b/Legacy/Aria/include/ArMapObject.h @@ -0,0 +1,370 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* \file ArMapObject.h + * \brief Contains the definition of the ArMapObject class. + * \date 06/27/08 + * \author K. Cunningham +*/ +#ifndef ARMAPOBJECT_H +#define ARMAPOBJECT_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +/// A point or region of interest in an Aria map. +/** + * ArMapObject contains the data related to an Aria map object, i.e a point or + * region of interest in an Aria map that is not part of the sensed obstacle + * data. Examples of map objects include goals, docks, forbidden lines, and + * forbidden areas. Applications may define their own custom ArMapObject types + * using the ArMap MapInfo mechanism. See @ref ArMap for more information. + * + * The basic attributes of an ArMapObject include the type of the map object, + * an optional name of the object, and its position information. As mentioned + * above, there are two basic categories of ArMapObjects: + * + * - Points: A single ArPose in the map. By convention, if a map object + * can have an optional heading, then "WithHeading" appears at the end of + * the object type when the heading is specified. For example, "Goal" + * designates an (x,y) location in the map (any heading or theta value should + * be ignored) and "GoalWithHeading" designates + * an (x,y,th) location. + * + * - Regions: A set of two ArPoses ("from" and "to") which define a rectangle + * or a line. Rectangles may have an associated rotation value. It is the + * rotation to be applied to the "from" and "to" poses around + * the global origin . To retrieve the list of line segments that + * comprise the rotated rectangle's perimeter, use the getFromToSegments() + * method. + * + * Note that the ArMapObject is generally immutable. If an object needs to be + * changed, then the original version should simply be replaced with a new one. + * See ArMap::getMapObjects(), ArMap::setMapObjects(), and ArMap::mapChanged(). + * +**/ +class ArMapObject +{ +public: + + /// Creates a new ArMapObject whose attributes are as specified in the given arguments + /** + * @param arg the ArArgumentBuilder * from which to create the ArMapObject; this + * should correspond to a parsed line in the ArMap file + * @return ArMapObject * the newly created map object, or NULL if an error + * occurred + **/ + AREXPORT static ArMapObject *createMapObject(ArArgumentBuilder *arg); + + + /// ArArgumentBuilder indices for the various map object attributes + enum ArgIndex { + TYPE_ARG_INDEX = 0, + POSE_X_ARG_INDEX = 1, + POSE_Y_ARG_INDEX = 2, + TH_ARG_INDEX = 3, + DESC_ARG_INDEX = 4, + ICON_ARG_INDEX = 5, + NAME_ARG_INDEX = 6, + LAST_POSE_ARG_INDEX = NAME_ARG_INDEX, + FROM_X_ARG_INDEX = 7, + FROM_Y_ARG_INDEX = 8, + TO_X_ARG_INDEX = 9, + TO_Y_ARG_INDEX = 10, + LAST_ARG_INDEX = TO_Y_ARG_INDEX + }; + + enum { + ARG_INDEX_COUNT = LAST_ARG_INDEX + 1 + }; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Instance Methods + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + /// Constructor + /** + * @param type the char * type of the map object (e.g. "Goal", "ForbiddenLine"); + * must be non-empty + * @param pose the primary ArPose of the map object; for points, this is its + * location; for rectangles, this specifies the rotation of the rectangle (in + * pose.getTh()) + * @param description an optional char * description of the object. + * @param iconName char * currently unused: use "ICON" or NULL as a dummy value. Must + * be a non-empty, non-whitespace string. + * @param name the char * name of the map object; depending on the object type, + * this may be optional or required + * @param hasFromTo a bool set to true if the object is a region (i.e. line or + * rectangle); false if the object is a point + * @param fromPose the ArPose that defines the start point of the region object; + * applicable only when hasFromTo is true + * @param toPose the ArPose that defines the end point of the region object; + * applicable only when hasFromTo is true + **/ + AREXPORT ArMapObject(const char *type, + ArPose pose, + const char *description, + const char *iconName, + const char *name, + bool hasFromTo, + ArPose fromPose, + ArPose toPose); + + /// Copy constructor + AREXPORT ArMapObject(const ArMapObject &mapObject); + + /// Assignment operator + AREXPORT ArMapObject &operator=(const ArMapObject &mapObject); + + /// Destructor + AREXPORT virtual ~ArMapObject(); + + // -------------------------------------------------------------------------- + // Text Attributes: + // -------------------------------------------------------------------------- + + /// Returns the type of the map object + AREXPORT const char *getType(void) const; + + /// Returns the "base" (or root) type of the map object + /** + * If the map object type ends with "WithHeading", then the base is the + * corresponding heading-less type. For example, "GoalWithHeading" has a + * base type of "Goal". + * + * If the map object type does not end with "WithHeading", then the base + * is the same as the type. + **/ + AREXPORT const char *getBaseType(void) const; + + /// Returns the name of the map object (if any) + AREXPORT const char *getName(void) const; + + /// Returns the optional description of the map object + AREXPORT const char *getDescription() const ; + + /// Returns the icon string of the object + /** + * The use of the ICON field is application-dependent. It currently contains + * either the string "ICON" or "ID=". The ID is used only when auto-numbering + * has been turned on in the MapInfo. + **/ + AREXPORT const char *getIconName(void) const; + + /// Returns the numerical identifier of the object, when auto-numbering is on. + /** + * This method returns 0 when auto-numbering is off. + **/ + AREXPORT int getId() const; + + /// Sets the description of the map object + /** + * This method really should only be called immediately after the object + * is created, and before it is added to the map. (Since the map object + * isn't intended to be mutable.) It exists for backwards compatibility. + **/ + AREXPORT void setDescription(const char *description); + + + // -------------------------------------------------------------------------- + // Position Attributes: + // -------------------------------------------------------------------------- + + /// Returns the primary pose of the object + /** + * For points, this is the map object's location; for rectangles, this + * specifies the rotation of the rectangle (in getPose().getTh()) + **/ + AREXPORT ArPose getPose(void) const; + + /// Returns true if the map object has valid "from/to" poses (i.e. is a line or rectangle) + AREXPORT bool hasFromTo(void) const; + + /// Returns the "from" pose for lines and rectangles; valid only if hasFromTo() + AREXPORT ArPose getFromPose(void) const; + /// Returns the "to" pose for lines and rectangles; valid only if hasFromTo() + AREXPORT ArPose getToPose(void) const; + + /// Returns the optional rotation of a rectangle; or 0 if none + /** + * Note that this function doesn't know whether it actually makes sense + * for this map object to have the rotation. (For example, it makes sense + * on a ForbiddenArea but not a ForbiddenLine.) + * + **/ + AREXPORT double getFromToRotation(void) const; + + /// Gets a list of fromTo line segments that have been rotated + /** + * Note that this function doesn't know whether it actually makes sense + * for this map object to have the rotation. (For example, it makes sense + * on a ForbiddenArea but not a ForbiddenLine.) This is just here so + * that everyone doesn't have to do the same calculation. Note that + * this might be a little more CPU/Memory intensive transfering + * these around, so you may want to keep a copy of them if you're + * using them a lot (but make sure you clear the copy if the map + * changes). It may not make much difference on a modern processor + * though (its set up this way for safety). + **/ + AREXPORT std::list getFromToSegments(void); + + /// Gets a line segment that goes from the from to the to + /** + * Note that this function doesn't know whether this is supposed to + * be a rectangle or a line. (For example, it makes sense on a + * ForbiddenLine but not a ForbiddenAra.) This is just here to + * store it. Note that this might be a little more CPU/Memory + * intensive transfering these around, so you may want to keep a + * copy of them if you're using them a lot (but make sure you clear + * the copy if the map changes). It may not make much difference on + * a modern processor though (its set up this way for safety). + **/ + AREXPORT ArLineSegment getFromToSegment(void); + + /// Computes the center pose of the map object. + /** + * This method determines the center of map objects that have a "from" and a + * "to" pose (i.e. lines and rectangles). For map objects that are poses, + * this method simply returns the pose. + **/ + AREXPORT ArPose findCenter(void) const; + + // -------------------------------------------------------------------------- + // I/O Methods + // -------------------------------------------------------------------------- + + /// Returns the text representation of the map object + /** + * The returned string is suitable for writing to the ArMap file. Note that + * the string does NOT include the map object's optional parameters. + **/ + AREXPORT const char *toString() const; + + /// Returns the text representation of the map object + /** + * This method is equivalent to toString(); + **/ + const char *getStringRepresentation() const { + return toString(); + } + + /// Writes the map object to the ArLog. + /** + * @param intro an optional string that should appear before the object + **/ + AREXPORT void log(const char *intro = NULL) const; + + + // -------------------------------------------------------------------------- + // Miscellaneous Methods + // -------------------------------------------------------------------------- + + /// Less than operator (for sets), orders by position + AREXPORT bool operator<(const ArMapObject& other) const; + + + /// Gets the fileName of the object (probably never used for maps) + /** + * This method is maintained solely for backwards compatibility. + * It now returns the same value as getDescription (i.e. any file names + * that may have been associated with an object can now be found in the + * description attribute). + * @deprecated + **/ + AREXPORT const char *getFileName(void) const; + +private: + + /// Parses the given arguments and sets the description of the given ArMapObject + static bool setObjectDescription(ArMapObject *object, + ArArgumentBuilder *arg); + +protected: + + /// The type of the map object + std::string myType; + /// If non-empty, then myType ends with "WithHeading" and this is the "root" + std::string myBaseType; + + /// The name of the map object, if any + std::string myName; + /// The description of the map object + std::string myDescription; + + /// For pose objects, THE pose; For rectangle objects, contains the optional rotation + ArPose myPose; + + /// Reserved for future use + std::string myIconName; + + /// Whether the map object is a region (line or rect) with "from/to" poses + bool myHasFromTo; + /// The "from" pose of a region map object; valid only if myHasFromTo is true + ArPose myFromPose; + /// The "to" pose of a region map object; valid only if myHasFromTo is true + ArPose myToPose; + + /// For rectangle objects, the line segments that comprise the perimeter (even if rotated) + std::list myFromToSegments; + /// For line objects, the line + ArLineSegment myFromToSegment; + + /// Text representation written to the map file + mutable std::string myStringRepresentation; + +}; // end class ArMapObject + + +// ============================================================================= + +#ifndef SWIG +/// Comparator for two pointers to map objects +/** @swigomit */ +struct ArMapObjectCompare : + public std::binary_function + { + /// Returns true if obj1 is less than obj2; NULL pointers are greater than non-NULL + bool operator()(const ArMapObject *obj1, + const ArMapObject *obj2) + { + if ((obj1 != NULL) && (obj2 != NULL)) { + return *obj1 < *obj2; + } + else if ((obj1 == NULL) && (obj2 == NULL)) { + return false; + } + else { + return (obj1 == NULL); + } + } // end operator() + + }; // end struct ArMapObjectCompare + +#endif //ifndef SWIG + +#endif // ARMAPOBJECT_H + diff --git a/Legacy/Aria/include/ArMapUtils.h b/Legacy/Aria/include/ArMapUtils.h new file mode 100644 index 0000000..11c71a0 --- /dev/null +++ b/Legacy/Aria/include/ArMapUtils.h @@ -0,0 +1,960 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* + * Contains utility classes for the ArMap class. + * + * \author K. Cunningham + * + * This file contains miscellaneous helper classes for the ArMap class. + * These are primarily related to tracking changes to the map and include + * the following: + * + * - ArMapId : The unique identifier for an Aria map. + * + * - ArMapFileLine : The data regarding a text line in a map file; this + * includes the line number and text. + * + * - ArMapFileLineGroup : A semantic parent / child relationship between + * text lines in a map file. + * + * - ArMapFileLineSet : A list of map file line groups to be compared. + * Contains helper methods to determines lines that have been added or + * deleted. + * + * - ArMapChangeDetails : A collection of ArMapFileLineSets that describes + * all of the changes that were made to an Aria map. + * + * - ArMapFileLineSetWriter : An output functor that is used to populate an + * ArMapFileLineSet. + * + * - ArMapChangedHelper : A collection of callbacks and methods to invoke + * them after the Aria map has been changed. + */ + +#ifndef ARMAPUTILS_H +#define ARMAPUTILS_H + +#include +#include +#include +#include +#include +#include + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + + +class ArArgumentBuilder; +class ArBasePacket; + +// ============================================================================ +// ArMapId +// ============================================================================ + +/// Enapsulates the data used to uniquely identify an Aria map +/** + * ArMapId is a small helper class that contains all of the information + * needed to uniquely identify an Aria map. In addition to the standard + * file attributes (such as filename, size, and timestamps), it + * contains the name of the originating source robot or server. It + * also contains the checksum of the file contents. This checksum is + * currently calculated by the ArMD5Calculator class. All of the + * data should allow one to determine whether two map files are the same + * with a reasonable degree of certainty. + *

+ * The ArMapId class is not thread-safe. + * + * @see ArMD5Calculator +**/ +class ArMapId { + +public: + // -------------------------------------------------------------------------- + // Static Methods + // -------------------------------------------------------------------------- + + /// Given a local file name, creates the map ID + /** + * This method calculates the checksum of the specified file + * @param fileName the const char * name of the file for which to create the + * map ID + * @param mapIdOut a pointer to the map ID to be filled in with the results + * @return bool true if the file was found and the map ID created; false, + * otherwise. + **/ + AREXPORT static bool create(const char *fileName, + ArMapId *mapIdOut); + + /// Inserts the given map ID into a network packet + /** + * The format of the map ID in the network packet is as follows: + *

+   *   string:  source robot or server name
+   *   string:  map file name
+   *   uByte4:  number of bytes in the checksum
+   *   data  :  checksum, included only if the number of bytes in the checksum 
+   *            is greater than 0
+   *   uByte4:  file size
+   *   byte4 :  file last modified time
+   * 
+ * @param mapId the ArMapId to be inserted into the packet + * @param packetOut the ArBasePacket * to be modified + **/ + AREXPORT static bool toPacket(const ArMapId &mapId, + ArBasePacket *packetOut); + + /// Extracts a map ID from the given network packet + /** + * @param packetIn the ArBasePacket from which to read the map ID + * @param mapIdOut a pointer to the ArMapId to be filled in with the results + * @return bool true if the map ID was successfully read from the given + * packet, false otherwise. + * @see toPacket for a description of the packet format + **/ + AREXPORT static bool fromPacket(ArBasePacket *packetIn, + ArMapId *mapIdOut); + + // -------------------------------------------------------------------------- + // Instance Methods + // -------------------------------------------------------------------------- + + /// Default contructor creates a null map ID. + AREXPORT ArMapId(); + + /// Creates a map ID with the given attributes. + /** + * @param sourceName the const char * name of the robot or server + * from which the map originated + * @param fileName the const char * name of the map file + * @param checksum the unsigned char * buffer that contains the + * file checksum + * @param checksumLength the size_t length of the checksum buffer + * @param size the long int number of bytes in the map file + * @param timestamp the time_t last modified time of the map file + * @see ArMD5Calculator + **/ + AREXPORT ArMapId(const char *sourceName, + const char *fileName, + const unsigned char *checksum, + size_t checksumLength, + long int size, + const time_t timestamp); + + /// Copy constructor + AREXPORT ArMapId(const ArMapId &other); + + /// Assignment operator + AREXPORT ArMapId &operator=(const ArMapId &other); + + /// Destructor + AREXPORT ~ArMapId(); + + + // -------------------------------------------------------------------------- + // Getters + // -------------------------------------------------------------------------- + + /// Returns whether this map ID is null + AREXPORT bool isNull() const; + + /// Returns the string name of the originating robot or server + AREXPORT const char *getSourceName() const; + + /// Returns the string name of the file + /** + * TODO: Does this include path name?? + **/ + AREXPORT const char *getFileName() const; + + /// Returns a pointer to the buffer that contains the checksum + AREXPORT const unsigned char *getChecksum() const; + /// Returns the length of the checksum + AREXPORT size_t getChecksumLength() const; + + /// Returns the checksum in a human readable string format + AREXPORT const char *getDisplayChecksum() const; + + /// Returns the number of bytes in the map file + AREXPORT long int getSize() const; + /// Returns the last modified time of the file + AREXPORT time_t getTimestamp() const; + + + // -------------------------------------------------------------------------- + // Setters + // -------------------------------------------------------------------------- + + /// Clears this map ID, i.e. sets it to null + AREXPORT void clear(); + + /// Sets the name of the source robot or server that originated the map file + AREXPORT void setSourceName(const char *sourceName); + /// Sets the map file name + AREXPORT void setFileName(const char *fileName); + /// Sets the checksum of the map file + AREXPORT void setChecksum(const unsigned char *checksum, + size_t checksumLen); + /// Sets the number of bytes in the map file + AREXPORT void setSize(long int size); + /// Sets the last modified time of the map file + AREXPORT void setTimestamp(const time_t ×tamp); + + // -------------------------------------------------------------------------- + // Other Methods + // -------------------------------------------------------------------------- + + /// TODO Think that this is the same as operator== + AREXPORT bool isSameFile(const ArMapId &other) const; + + /// Returns whether the source and file names are identical + AREXPORT bool isVersionOfSameFile(const ArMapId &other) const; + + /// Returns true if the timestamp is valid; false if it's a special 'not-set' indicator + AREXPORT bool isValidTimestamp() const; + + /// Returns whether the two map IDs are equivalent + /** + * Note that if either map ID specifies a NULL timestamp, then the timestamp + * will not be used for comparison purposes. + **/ + AREXPORT friend bool operator==(const ArMapId & id1, const ArMapId & id2); + + /// Returns whether the two map IDs are not equal + /** + * Note that if either map ID specifies a NULL timestamp, then the timestamp + * will not be used for comparison purposes. + **/ + AREXPORT friend bool operator!=(const ArMapId & id1, const ArMapId & id2); + + /// Writes the map ID to the output log file, with the specified prefix /header. + AREXPORT void log(const char *prefix) const; + +protected: + + /// Name of the source robot or server from which the map file originated + std::string mySourceName; + /// Name of the map file + std::string myFileName; + /// Buffer that contains the checksum of the map file + unsigned char *myChecksum; + /// Length of the buffer that contains the checksum of the map file + size_t myChecksumLength; + + /// Buffer that contains the checksum in human readable format + mutable char *myDisplayChecksum; + /// Length of the displayable checksum buffer + mutable size_t myDisplayChecksumLength; + + /// Number of bytes in the map file + long int mySize; + /// Last modified time of the map file + time_t myTimestamp; + +}; // end class ArMapId + + +#ifndef SWIG + + +// ============================================================================ +// ArMapFileLine, etc +// ============================================================================ + +/// Encapsulates the data regarding a text line in a map file. +/** + * ArMapFileLine is the building block for map change comparisons. It is + * simply the line number and associated text. + * @internal + * @swigomit +**/ +class ArMapFileLine { + +public: + + /// Default constructor + ArMapFileLine() : + myLineNum(0), + myLineText() + {} + + /// Constructor which sets the line number and text + ArMapFileLine(int lineNum, + const char *lineText) : + myLineNum(lineNum), + myLineText((lineText != NULL) ? lineText : "") + {} + + /// Copy constructor + ArMapFileLine(const ArMapFileLine &other) : + myLineNum(other.myLineNum), + myLineText(other.myLineText) + {} + + /// Assignment operator + ArMapFileLine &operator=(const ArMapFileLine &other) + { + if (this != &other) { + myLineNum = other.myLineNum; + myLineText = other.myLineText; + } + return *this; + } + + /// Destructor + ~ArMapFileLine() + {} + + /// Returns the line number of the map file line + int getLineNum() const { + return myLineNum; + } + /// Returns the text of the map file line + const char *getLineText() const { + return myLineText.c_str(); + } + + friend inline bool operator< ( const ArMapFileLine & line1, const ArMapFileLine & line2 ); + friend struct ArMapFileLineCompare; + +protected: + + int myLineNum; ///< Line number + std::string myLineText; ///< Line text + +}; // end class ArMapFileLine + + +/// Determines whether the first ArMapFileLine is less than the second +/** + * Line1 is less than Line2 if its line number is less than that of Line2. + * If the two line nubmers are equal, then Line1 is less than Line2 if its + * text is less. + * @internal + * @swigomit +**/ +inline bool operator<(const ArMapFileLine & line1, const ArMapFileLine & line2 ) +{ + bool b = (line1.myLineNum < line2.myLineNum); + if (!b) { + if (line1.myLineNum == line2.myLineNum) { + b = (line1.myLineText < line2.myLineText); + } + } + return b; +} + +/// Comparator used to sort ArMapFileLine objects. +/** + * @internal + * @swigomit + */ +struct ArMapFileLineCompare : public std::binary_function +{ + /// Returns true if line1 is less than line2; false, otherwise. + bool operator()(const ArMapFileLine &line1, + const ArMapFileLine &line2) + { + bool b = (line1.myLineNum < line2.myLineNum); + if (!b) { + if (line1.myLineNum == line2.myLineNum) { + b = (line1.myLineText < line2.myLineText); + } + } + return b; + } +}; // end struct MapFileLineCompare + +// ============================================================================ +// ArMapFileLineGroup +// ============================================================================ + +/// A group of map file lines which have a logical parent / child relationship. +/** + * Some of the text lines in a map file may have a parent / child relationship. + * For example, the text line that starts a route is the parent of the following + * lines that describe the contents of the route. This class is used to + * express this relationship. Note that there is currently no concept of + * a grandparent relationship in the map file lines. + * @internal + * @swigomit +**/ +class ArMapFileLineGroup { + +public: + + /// Contructs a new group with the specified parent. + ArMapFileLineGroup(const ArMapFileLine &parentLine) : + myParentLine(parentLine), + myChildLines() + {} + + /// Destructor + ~ArMapFileLineGroup() {} + + /// Returns a pointer to the parent map file line. + ArMapFileLine *getParentLine() { + return &myParentLine; + } + /// Returns a pointer to the list of child map file lines. + std::vector *getChildLines() { + return &myChildLines; + } + + friend inline bool operator<(const ArMapFileLineGroup & line1, + const ArMapFileLineGroup & line2); + friend struct ArMapFileLineGroupCompare; + + /// Writes the group to the Aria log. + void log(); + +public: // users may access class members directly + + ArMapFileLine myParentLine; ///< The map file line that is the parent of the group + std::vector myChildLines; ///< A list of child map file lines + +}; // end class ArFileLineGroup + +/// Determines whether group1's parent text is less than group2's parent text. +/** @internal + * @swigomit + */ +inline bool operator<(const ArMapFileLineGroup & group1, + const ArMapFileLineGroup & group2) +{ + bool b = (strcmp(group1.myParentLine.getLineText(), + group2.myParentLine.getLineText()) < 0); + return b; +} + + +/// Comparator used to sort groups in order of ascending parent text. +/** @internal + * @swigomit + */ +struct ArMapFileLineGroupCompare : public std::binary_function { + bool operator()(const ArMapFileLineGroup &group1, + const ArMapFileLineGroup &group2) + { + bool b = (strcmp(group1.myParentLine.getLineText(), + group2.myParentLine.getLineText()) < 0); + return b; + } +}; // end struct ArMapFileLineGroupCompare + + +/// Comparator used to sort groups in order of ascending parent line number. +/** @internal + * @swigomit + */ +struct ArMapFileLineGroupLineNumCompare : + public std::binary_function { + bool operator()(const ArMapFileLineGroup &group1, + const ArMapFileLineGroup &group2) + { + bool b = (group1.myParentLine.getLineNum() < + group2.myParentLine.getLineNum()); + return b; + } +}; // end struct ArMapFileLineGroupLineNumCompare + + +// ============================================================================ +// ArMapFileLineSet +// ============================================================================ + +/// A set of map file line groups. +/** + * ArMapFileLineSet is a container of ArMapFileLineGroup objects -- i.e. a + * set of parent/child text lines in an Aria map. The class has been + * defined to enable comparisons of map file versions. Each section of + * an Aria map is written to an ArMapFileLineSet and then the standard + * algorithm set_difference can be used to determine changes within a + * section. The static method ArMapFileLineSet::calculateChanges() + * performs this comparison. + * @swigomit + * @internal +**/ +class ArMapFileLineSet : public std::vector +{ +public: + + // --------------------------------------------------------------------------- + /// Determines the changes that have been made to a set of ArMapFileLines + /** + * @param origLines the ArMapFileLineSet that contains the original map file + * lines + * @param newLines the ArMapFileLineSet that contains the new map file lines + * @param deletedLinesOut a pointer to the ArMapFileLineSet that is populated + * with lines that have been deleted, i.e. that are contained in origLines + * but not in newLines + * @param addedLinesOut a pointer to the ArMapFileLineSet that is populated + * with lines that have been added, i.e. that are contained in newLines but + * not in origLines + * @param isCheckChildren a bool set to true if child lines should also be + * checked; if false, then only the parent lines are checked + * @return bool true if the changes were successfully determined; false if + * an error occurred + **/ + static bool calculateChanges(ArMapFileLineSet &origLines, + ArMapFileLineSet &newLines, + ArMapFileLineSet *deletedLinesOut, + ArMapFileLineSet *addedLinesOut, + bool isCheckChildren = true); + + // --------------------------------------------------------------------------- + + /// Constructor + ArMapFileLineSet() {} + + /// Copy constructor + ArMapFileLineSet(const ArMapFileLineSet &other) : + std::vector(other) + {} + + /// Assignment operator + ArMapFileLineSet &operator=(const ArMapFileLineSet &other) + { + if (this != &other) { + std::vector::operator =(other); + } + return *this; + } + + /// Destructor + ~ArMapFileLineSet() {} + + /// Searches the set for the given parent line. + iterator find(const ArMapFileLine &groupParent); + + /// Writes the set to the Aria output log. + void log(const char *prefix); + +}; // end class ArMapFileLineSet + + +// ============================================================================ +// ArMapChangeDetails +// ============================================================================ + +/// Helper class used to track changes to an Aria map. +/** + * ArMapChangeDetails is a simple helper class that is used to track changes + * to an Aria map. These changes are determined based on set comparisons + * (and thus everything in the map must be ordered in a repeatable manner). + * + * The class itself provides very little functionality. It is basically + * a repository of change information that may be accessed directly by the + * application. The methods return pointers to the internal data members + * which may be directly manipulated. There is no error checking, + * thread-safety, etc. The class's use and scope is expected to be very + * limited (to the Aria map and related classes). + * @swigomit + * @internal +**/ +class ArMapChangeDetails +{ +public: + + enum MapLineChangeType { + DELETIONS, ///< Lines that have been deleted from the Aria map + ADDITIONS, ///< Lines that have been added to the Aria map + LAST_CHANGE_TYPE = ADDITIONS ///< Last value in the enumeration + }; + + enum { + CHANGE_TYPE_COUNT = LAST_CHANGE_TYPE + 1 ///< Number of map change types + }; + + /// Constructor + AREXPORT ArMapChangeDetails(); + + /// Copy constructor + AREXPORT ArMapChangeDetails(const ArMapChangeDetails &other); + + /// Assignment operator + AREXPORT ArMapChangeDetails &operator=(const ArMapChangeDetails &other); + + /// Destructor + AREXPORT ~ArMapChangeDetails(); + + // --------------------------------------------------------------------------- + // Map ID Methods + // --------------------------------------------------------------------------- + + /// Returns the original pre-change map ID + /** + * @param mapIdOut a pointer to the ArMapId to be returned + * @return bool true if the map ID was successfully retrieved; false if an + * error occurred + **/ + AREXPORT bool getOrigMapId(ArMapId *mapIdOut); + + /// Sets the original pre-change map ID + /** + * @param mapId the ArMapId of the map before it was changed + **/ + AREXPORT void setOrigMapId(const ArMapId &mapId); + + /// Returns the new post-change map ID + /** + * @param mapIdOut a pointer to the ArMapId to be returned + * @return bool true if the map ID was successfully retrieved; false if an + * error occurred + **/ + AREXPORT bool getNewMapId(ArMapId *mapIdOut); + + /// Sets the new post-change map ID + /** + * @param mapId the ArMapId of the map after it was changed + **/ + AREXPORT void setNewMapId(const ArMapId &mapId); + + // --------------------------------------------------------------------------- + // Change Info + // --------------------------------------------------------------------------- + + /// Returns a pointer to the list of scan types that have been modified + /** + * This list includes the scan types in the map before and after it was changed. + * Scan types usually won't be added or removed, but it may occur when one + * map is inserted into another. + * A pointer to the actual internal attribute is returned. + * @return a pointer to the list of scan type identifier strings + **/ + AREXPORT std::list *getScanTypes(); + + /// Returns a pointer to the data points that have been changed for the specified scan type + /** + * @param change the MapLineChangeType that indicates whether added or removed + * points are to be returned + * @param scanType the const char * identifier of the scan for which the points + * are to be returned; must be non-NULL + * @return a non-NULL pointer to the vector of ArPose's that have been changed + **/ + AREXPORT std::vector *getChangedPoints(MapLineChangeType change, + const char *scanType); + + /// Returns a pointer to the data line segments that have been changed for the specified scan type + /** + * @param change the MapLineChangeType that indicates whether added or removed + * line segments are to be returned + * @param scanType the const char * identifier of the scan for which the line + * segments are to be returned; must be non-NULL + * @return a non-NULL pointer to the vector of ArLineSegment's that have been changed + **/ + AREXPORT std::vector *getChangedLineSegments + (MapLineChangeType change, + const char *scanType); + + /// Returns a pointer to the header lines that have been changed for the specified scan type + /** + * @param change the MapLineChangeType that indicates whether added or removed + * scan header lines are to be returned + * @param scanType the const char * identifier of the scan for which the changes + * are to be returned; must be non-NULL + * @return a non-NULL pointer to the ArMapFileLineSet that describes the changes + **/ + AREXPORT ArMapFileLineSet *getChangedSummaryLines(MapLineChangeType change, + const char *scanType); + + /// Returns a pointer to the map supplement lines that have been changed + /** + * @param change the MapLineChangeType that indicates whether added or removed + * supplement lines are to be returned + * @return a non-NULL pointer to the ArMapFileLineSet that describes the changes + **/ + AREXPORT ArMapFileLineSet *getChangedSupplementLines(MapLineChangeType change); + + /// Returns a pointer to the map object (i.e. Cairn) lines that have been changed + /** + * @param change the MapLineChangeType that indicates whether added or removed + * map object lines are to be returned + * @return a non-NULL pointer to the ArMapFileLineSet that describes the changes + **/ + AREXPORT ArMapFileLineSet *getChangedObjectLines(MapLineChangeType change); + + /// Returns a pointer to the specified info lines that have been changed + /** + * @param infoName the int identifier of the info type to be returned + * @param change the MapLineChangeType that indicates whether added or removed + * map info lines are to be returned + * @return a non-NULL pointer to the ArMapFileLineSet that describes the changes + **/ + AREXPORT ArMapFileLineSet *getChangedInfoLines(const char *infoName, + MapLineChangeType change); + + + // --------------------------------------------------------------------------- + // Other Methods + // --------------------------------------------------------------------------- + + /// Returns a list of the info types that have been changed + /** + * This method searches the internal changed info lines and returns the info + * types that have non-empty change information. + * @return list of the string info names that have non-empty changes + **/ + AREXPORT std::list findChangedInfoNames() const; + + /// Determines whether the given argument for the specified info type is a "child". + /** + * "Child" arguments have a non-NULL parent. For example, an argument that + * represents a robot task may be a child of one that defines a macro. When + * a child argument is changed, then the parent and all of its children + * must be included in the change details. Note that currently only one + * level of parent-ness is supported (i.e. there are no grandparents). + **/ + AREXPORT bool isChildArg(const char *infoName, + ArArgumentBuilder *arg) const; + + /// Determines whether the given arg 0 for the info type is a "child". + AREXPORT bool isChildArg(const char *infoName, + const char *arg0Text) const; + + /// Creates a map of args that are considered to be a "child" of another arg. + AREXPORT void createChildArgMap(); + + /// Writes the change details to the Aria log. + AREXPORT void log(); + + /// Locks the change details for multithreaded access. + AREXPORT void lock(); + //// Unlocks the change details for multithreaded access. + AREXPORT void unlock(); + +protected: + + /// Summary of changes for a specific map scan type. + struct ArMapScanChangeDetails { + + std::vector myChangedPoints[CHANGE_TYPE_COUNT]; + std::vector myChangedLineSegments[CHANGE_TYPE_COUNT]; + + ArMapFileLineSet myChangedSummaryLines[CHANGE_TYPE_COUNT]; + + ArMapScanChangeDetails(); + ~ArMapScanChangeDetails(); + + }; // end struct ArMapScanChangeDetails + + ArMapScanChangeDetails *getScanChangeDetails(const char *scanType); + +protected: + + /// Mutex to protect multithreaded access. + ArMutex myMutex; + + /// Identifier of the map before the changes were made. + ArMapId myOrigMapId; + /// Identifier of the map after the changes were made. + ArMapId myNewMapId; + + /// Map of info type identifiers to argument types, and whether each argument type is a child. + std::map > myInfoNameToMapOfChildArgsMap; + + /// List of scan types included in the change details. + std::list myScanTypeList; + /// Map of scan types to the changes for the scan. + std::map myScanTypeToChangesMap; + /// Value returned when no scan data was changed. + ArMapScanChangeDetails myNullScanTypeChanges; + + /// Change details for the map's supplemental data. + ArMapFileLineSet myChangedSupplementLines[CHANGE_TYPE_COUNT]; + /// Change details for the map's object list. + ArMapFileLineSet myChangedObjectLines[CHANGE_TYPE_COUNT]; + /// Change details for the map's info data. + std::map myInfoToChangeMaps[CHANGE_TYPE_COUNT]; + +}; // end class ArMapChangeDetails + +// ============================================================================ +// ArMapFileLineSetWriter +// ============================================================================ + +/// Functor that populates a specified ArMapFileLineSet. +/** + * ArMapFileLineSetWriter is used to create an ArMapFileLineSet, using the + * normal Aria map writeToFunctor mechanism. + * @swigomit + * @internal +**/ +class ArMapFileLineSetWriter : public ArFunctor1 +{ +public: + + /// Constructs a new writer for the given map file line set. + ArMapFileLineSetWriter(ArMapFileLineSet *multiSet) : + myLineNum(0), + myChildLineNum(0), + myMultiSet(multiSet), + myIsAddingChildren(false) + {} + + /// Destructor + ~ArMapFileLineSetWriter() + {} + + /// Returns whether children are currently being added to the map file line set. + bool isAddingChildren() const + { + return myIsAddingChildren; + } + + /// Sets whether children are currently being added to the map file line set. + /** + * When a child line is detected by the map file parser, setAddingChildren(true) + * must be called. The new children will be added to the most recently + * created ArMapFileLineSet. Likewise, when the child list is complete, + * setAddingChildren(false) must be called. + **/ + void setAddingChildren(bool isAddingChildren) { + if (myIsAddingChildren == isAddingChildren) { + return; + } + myIsAddingChildren = isAddingChildren; + if (myIsAddingChildren) { + myChildLineNum = 0; + } + } // end method setAddingChildren + + + /// Invokes the functor; this method shouldn't be called. + virtual void invoke(void) {}; + + /// Invokes the functor + /** + @param p1 the char * map file line to be written + */ + virtual void invoke(const char *p1) + { + myLineNum++; + + if ((myMultiSet != NULL) && (p1 != NULL)) { + if (!myIsAddingChildren) { + // Being verbose on the parameters here in order to make it more clear. + // Create a new map file line for the parent, create a new group for + // that parent, and add it to the set. + myMultiSet->push_back(ArMapFileLineGroup(ArMapFileLine(myLineNum, p1))); + } + else if (!myMultiSet->empty()) { + myChildLineNum++; + ArMapFileLineGroup &curParent = myMultiSet->back(); + curParent.getChildLines()->push_back(ArMapFileLine(myChildLineNum, p1)); + } + } + } // end method invoke + +private: + + /// Disabled copy constructor + ArMapFileLineSetWriter(const ArMapFileLineSetWriter &other); + /// Disabled assignment operator + ArMapFileLineSetWriter &operator=(const ArMapFileLineSetWriter &other); + +protected: + + /// Line number currently being written + int myLineNum; + /// "Local" line number of the current child in relation to its parent + int myChildLineNum; + + /// Map file line set that is being populated + ArMapFileLineSet *myMultiSet; + /// Whether a child is currently being added + bool myIsAddingChildren; + +}; // end class ArMapFileLineSetWriter + + +// ============================================================================ +// ArMapChangedHelper +// ============================================================================ + +/// Helper class that stores and invokes the map changed callbacks. +/** @swigomit + * @internal + */ +class ArMapChangedHelper + { + public: + + /// Constructor + AREXPORT ArMapChangedHelper(); + /// Destructor + AREXPORT virtual ~ArMapChangedHelper(); + + /// Function that invokes the map changed callbacks + AREXPORT virtual void invokeMapChangedCallbacks(void); + + + /// Adds a callback to be invoked when the map is changed + AREXPORT virtual void addMapChangedCB(ArFunctor *functor, + int position = 50); + /// Removes a callback invoked when the map is changed + AREXPORT virtual void remMapChangedCB(ArFunctor *functor); + + + /// Adds a callback called before the map changed callbacks are called + /** + * Note that these callbacks are simply invoked before the "normal" map changed + * callbacks. They are not + **/ + AREXPORT virtual void addPreMapChangedCB(ArFunctor *functor, + int position = 50); + /// Removes a callback called before the map changed callbacks are called + AREXPORT virtual void remPreMapChangedCB(ArFunctor *functor); + + /// Sets the level we log our map changed callback at + AREXPORT virtual void setMapChangedLogLevel(ArLog::LogLevel level); + /// Gets the level we log our map changed callback at + AREXPORT virtual ArLog::LogLevel getMapChangedLogLevel(void); + + private: + + /// Disabled copy constructor + AREXPORT ArMapChangedHelper(const ArMapChangedHelper &other); + /// Disabled assignment operaotr + AREXPORT ArMapChangedHelper &operator=(const ArMapChangedHelper &other); + + protected: + + ArLog::LogLevel myMapChangedLogLevel; + + ArCallbackList myMapChangedCBList; + ArCallbackList myPreMapChangedCBList; + + }; // end class ArMapChangedHelper + +#endif // ifndef SWIG + +#endif // ARMAPUTILS_H + diff --git a/Legacy/Aria/include/ArMode.h b/Legacy/Aria/include/ArMode.h new file mode 100644 index 0000000..38031d1 --- /dev/null +++ b/Legacy/Aria/include/ArMode.h @@ -0,0 +1,102 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARMODE_H +#define ARMODE_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include +#include + +class ArRobot; + + +/// A class for different modes, mostly as related to keyboard input +/** + Each mode is going to need to add its keys to the keyHandler... + each mode should only use the keys 1-0, the arrow keys (movement), + the space bar (stop), z (zoom in), x (zoom out), and e (exercise)... + then when its activate is called by that key handler it needs to + first deactivate the ourActiveMode (if its not itself, in which case + its done) then add its key handling stuff... activate and deactivate + will need to add and remove their user tasks (or call the base class + activate/deactivate to do it) as well as the key handling things for + their other part of modes. This mode will ALWAYS bind help to /, ?, h, + and H when the first instance of an ArMode is made. + + @ingroup OptionalClasses +**/ +class ArMode +{ +public: + /// Constructor + AREXPORT ArMode(ArRobot *robot, const char *name, char key, char key2); + /// Destructor + AREXPORT virtual ~ArMode(); + /// Gets the name of the mode + AREXPORT const char *getName(void); + /// The function called when the mode is activated, subclass must provide + AREXPORT virtual void activate(void) = 0; + /// The function called when the mode is deactivated, subclass must provide + AREXPORT virtual void deactivate(void) = 0; + /// The ArMode's user task, don't need one, subclass must provide if needed + AREXPORT virtual void userTask(void) {} + /// The mode's help print out... subclass must provide if needed + /** + This is called as soon as a mode is activated, and should give + directions on to what keys do what and what this mode will do + **/ + AREXPORT virtual void help(void) {} + /// The base activation, it MUST be called by inheriting classes, + /// and inheriting classes MUST return if this returns false + AREXPORT bool baseActivate(void); + /// The base deactivation, it MUST be called by inheriting classes, + /// and inheriting classes MUST return if this returns false + AREXPORT bool baseDeactivate(void); + /// This is the base help function, its internal, bound to ? and h and H + AREXPORT static void baseHelp(void); + /// An internal function to get the first key this is bound to + AREXPORT char getKey(void); + /// An internal function to get the second key this is bound to + AREXPORT char getKey2(void); +protected: + AREXPORT void addKeyHandler(int keyToHandle, ArFunctor *functor); + AREXPORT void remKeyHandler(ArFunctor *functor); + // Our activeArMode + AREXPORT static ArMode *ourActiveMode; + std::string myName; + ArRobot *myRobot; + ArFunctorC myActivateCB; + ArFunctorC myDeactivateCB; + ArFunctorC myUserTaskCB; + char myKey; + char myKey2; + // our help callback, its NULL until its initialized + static ArGlobalFunctor *ourHelpCB; + static std::list ourModes; +}; + +#endif // ARMODE_H diff --git a/Legacy/Aria/include/ArModes.h b/Legacy/Aria/include/ArModes.h new file mode 100644 index 0000000..798f26c --- /dev/null +++ b/Legacy/Aria/include/ArModes.h @@ -0,0 +1,510 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARMODES_H +#define ARMODES_H + +#include "ariaTypedefs.h" +#include "ArMode.h" +#include "ArActionGroups.h" +#include "ArGripper.h" +#include "ArTcpConnection.h" +#include "ArSerialConnection.h" +#include "ArPTZ.h" +#include "ArTCMCompassRobot.h" +#include "ArRobotConfigPacketReader.h" + +class ArTCMCompassRobot; +class ArACTS_1_2; +class ArRobotPacket; +class ArSick; +class ArAnalogGyro; + +/// Mode for teleoping the robot with joystick + keyboard +class ArModeTeleop : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeTeleop(ArRobot *robot, const char *name, char key, char key2); + /// Destructor + AREXPORT virtual ~ArModeTeleop(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); + AREXPORT virtual void userTask(void); +protected: + //ArActionGroupTeleop myGroup; + // use our new ratio drive instead + ArActionGroupRatioDrive myGroup; + ArFunctorC myEnableMotorsCB; +}; + +/// Mode for teleoping the robot with joystick + keyboard +class ArModeUnguardedTeleop : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeUnguardedTeleop(ArRobot *robot, const char *name, char key, char key2); + /// Destructor + AREXPORT virtual ~ArModeUnguardedTeleop(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); + AREXPORT virtual void userTask(void); +protected: + //ArActionGroupUnguardedTeleop myGroup; + // use our new ratio drive instead + ArActionGroupRatioDriveUnsafe myGroup; + ArFunctorC myEnableMotorsCB; +}; + +/// Mode for wandering around +class ArModeWander : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeWander(ArRobot *robot, const char *name, char key, char key2); + /// Destructor + AREXPORT virtual ~ArModeWander(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); + AREXPORT virtual void userTask(void); +protected: + ArActionGroupWander myGroup; +}; + +/// Mode for controlling the gripper +class ArModeGripper : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeGripper(ArRobot *robot, const char *name, char key, + char key2); + /// Destructor + AREXPORT virtual ~ArModeGripper(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); + AREXPORT void open(void); + AREXPORT void close(void); + AREXPORT void up(void); + AREXPORT void down(void); + AREXPORT void stop(void); + AREXPORT void exercise(void); +protected: + enum ExerState { + UP_OPEN, + UP_CLOSE, + DOWN_CLOSE, + DOWN_OPEN + }; + ArGripper myGripper; + bool myExercising; + ExerState myExerState; + ArTime myLastExer; + ArFunctorC myOpenCB; + ArFunctorC myCloseCB; + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myStopCB; + ArFunctorC myExerciseCB; + +}; + +/// Mode for controlling the camera +class ArModeCamera : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeCamera(ArRobot *robot, const char *name, char key, + char key2); + /// Destructor + AREXPORT virtual ~ArModeCamera(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); + AREXPORT void up(void); + AREXPORT void down(void); + AREXPORT void left(void); + AREXPORT void right(void); + AREXPORT void center(void); + AREXPORT void zoomIn(void); + AREXPORT void zoomOut(void); + AREXPORT void exercise(void); + AREXPORT void sony(void); + AREXPORT void canon(void); + AREXPORT void dpptu(void); + AREXPORT void amptu(void); + AREXPORT void canonInverted(void); + AREXPORT void sonySerial(void); + AREXPORT void canonSerial(void); + AREXPORT void dpptuSerial(void); + AREXPORT void amptuSerial(void); + AREXPORT void canonInvertedSerial(void); + AREXPORT void rvisionSerial(void); + AREXPORT void com1(void); + AREXPORT void com2(void); + AREXPORT void com3(void); + AREXPORT void com4(void); + AREXPORT void aux1(void); + AREXPORT void aux2(void); +protected: + void takeCameraKeys(void); + void giveUpCameraKeys(void); + void helpCameraKeys(void); + void takePortKeys(void); + void giveUpPortKeys(void); + void helpPortKeys(void); + void takeAuxKeys(void); + void giveUpAuxKeys(void); + void helpAuxKeys(void); + void takeMovementKeys(void); + void giveUpMovementKeys(void); + void helpMovementKeys(void); + enum State { + STATE_CAMERA, + STATE_PORT, + STATE_MOVEMENT + }; + void cameraToMovement(void); + void cameraToPort(void); + void cameraToAux(void); + void portToMovement(void); + void auxToMovement(void); + enum ExerState { + CENTER, + UP_LEFT, + UP_RIGHT, + DOWN_RIGHT, + DOWN_LEFT + }; + + bool myExercising; + State myState; + ExerState myExerState; + ArTime myLastExer; + bool myExerZoomedIn; + ArTime myLastExerZoomed; + ArSerialConnection myConn; + ArPTZ *myCam; + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + ArFunctorC myCenterCB; + ArFunctorC myZoomInCB; + ArFunctorC myZoomOutCB; + ArFunctorC myExerciseCB; + ArFunctorC mySonyCB; + ArFunctorC myCanonCB; + ArFunctorC myDpptuCB; + ArFunctorC myAmptuCB; + ArFunctorC myCanonInvertedCB; + ArFunctorC mySonySerialCB; + ArFunctorC myCanonSerialCB; + ArFunctorC myDpptuSerialCB; + ArFunctorC myAmptuSerialCB; + ArFunctorC myCanonInvertedSerialCB; + ArFunctorC myRVisionSerialCB; + ArFunctorC myCom1CB; + ArFunctorC myCom2CB; + ArFunctorC myCom3CB; + ArFunctorC myCom4CB; + ArFunctorC myAux1CB; + ArFunctorC myAux2CB; + const int myPanAmount; + const int myTiltAmount; +}; + +/// Mode for displaying the sonar +class ArModeSonar : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeSonar(ArRobot *robot, const char *name, char key, char key2); + /// Destructor + AREXPORT virtual ~ArModeSonar(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); + AREXPORT void allSonar(void); + AREXPORT void firstSonar(void); + AREXPORT void secondSonar(void); + AREXPORT void thirdSonar(void); + AREXPORT void fourthSonar(void); +protected: + enum State + { + STATE_ALL, + STATE_FIRST, + STATE_SECOND, + STATE_THIRD, + STATE_FOURTH + }; + State myState; + ArFunctorC myAllSonarCB; + ArFunctorC myFirstSonarCB; + ArFunctorC mySecondSonarCB; + ArFunctorC myThirdSonarCB; + ArFunctorC myFourthSonarCB; +}; + +class ArModeBumps : public ArMode +{ +public: + AREXPORT ArModeBumps(ArRobot *robot, const char *name, char key, char key2); + AREXPORT ~ArModeBumps(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); +}; + +class ArModePosition : public ArMode +{ +public: + AREXPORT ArModePosition(ArRobot *robot, const char *name, char key, + char key2, ArAnalogGyro *gyro = NULL); + AREXPORT ~ArModePosition(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); + AREXPORT void up(void); + AREXPORT void down(void); + AREXPORT void left(void); + AREXPORT void right(void); + AREXPORT void stop(void); + AREXPORT void reset(void); + AREXPORT void mode(void); + AREXPORT void gyro(void); + AREXPORT void incDistance(void); + AREXPORT void decDistance(void); +protected: + enum Mode { MODE_BOTH, MODE_EITHER }; + ArAnalogGyro *myGyro; + double myGyroZero; + double myRobotZero; + Mode myMode; + std::string myModeString; + bool myInHeadingMode; + double myHeading; + double myDistance; + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + ArFunctorC myStopCB; + ArFunctorC myResetCB; + ArFunctorC myModeCB; + ArFunctorC myGyroCB; + ArFunctorC myIncDistCB; + ArFunctorC myDecDistCB; +}; + +class ArModeIO : public ArMode +{ +public: + AREXPORT ArModeIO(ArRobot *robot, const char *name, char key, + char key2); + AREXPORT ~ArModeIO(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); +protected: + bool myExplanationReady; + bool myExplained; + ArTime myLastPacketTime; + char myExplanation[1024]; + char myOutput[1024]; + ArFunctorC myProcessIOCB; +}; + +class ArModeLaser : public ArMode +{ +public: + AREXPORT ArModeLaser(ArRobot *robot, const char *name, char key, + char key2, ArSick *obsolete = NULL); + AREXPORT ~ArModeLaser(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void help(void); + AREXPORT virtual void switchToLaser(int laserNumber); + +protected: + void togMiddle(void); + void togConnect(void); + + enum State { + STATE_UNINITED, + STATE_CONNECTING, + STATE_CONNECTED + }; + + State myState; + ArLaser *myLaser; + int myLaserNumber; + + bool myPrintMiddle; + + ArFunctorC myTogMiddleCB; + + std::map myLasers; + std::map *> myLaserCallbacks; +}; + +/// Mode for following a color blob using ACTS +class ArModeActs : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeActs(ArRobot *robot, const char *name, char key, char key2, + ArACTS_1_2 *acts = NULL); + /// Destructor + AREXPORT virtual ~ArModeActs(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); + AREXPORT virtual void userTask(void); + AREXPORT virtual void channel1(void); + AREXPORT virtual void channel2(void); + AREXPORT virtual void channel3(void); + AREXPORT virtual void channel4(void); + AREXPORT virtual void channel5(void); + AREXPORT virtual void channel6(void); + AREXPORT virtual void channel7(void); + AREXPORT virtual void channel8(void); + AREXPORT virtual void stop(void); + AREXPORT virtual void start(void); + AREXPORT virtual void toggleAcquire(void); + +protected: + ArActionGroupColorFollow *myGroup; + ArPTZ *camera; + ArACTS_1_2 *myActs; + ArRobot *myRobot; + + ArFunctorC myChannel1CB; + ArFunctorC myChannel2CB; + ArFunctorC myChannel3CB; + ArFunctorC myChannel4CB; + ArFunctorC myChannel5CB; + ArFunctorC myChannel6CB; + ArFunctorC myChannel7CB; + ArFunctorC myChannel8CB; + ArFunctorC myStopCB; + ArFunctorC myStartCB; + ArFunctorC myToggleAcquireCB; +}; + +class ArModeCommand : public ArMode +{ +public: + AREXPORT ArModeCommand(ArRobot *robot, const char *name, char key, + char key2); + AREXPORT ~ArModeCommand(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); +protected: + void takeKeys(void); + void giveUpKeys(void); + void addChar(int ch); + void finishParsing(void); + void reset(bool print = true); + char myCommandString[70]; + ArFunctor1C my0CB; + ArFunctor1C my1CB; + ArFunctor1C my2CB; + ArFunctor1C my3CB; + ArFunctor1C my4CB; + ArFunctor1C my5CB; + ArFunctor1C my6CB; + ArFunctor1C my7CB; + ArFunctor1C my8CB; + ArFunctor1C my9CB; + ArFunctor1C myMinusCB; + ArFunctor1C myBackspaceCB; + ArFunctor1C mySpaceCB; + ArFunctorC myEnterCB; + +}; + +/// Mode for following a color blob using ACTS +class ArModeTCM2 : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeTCM2(ArRobot *robot, const char *name, char key, char key2, ArTCM2 *tcm2 = NULL); + /// Destructor + AREXPORT virtual ~ArModeTCM2(); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); + AREXPORT virtual void userTask(void); + +protected: + void init(); + ArTCM2 *myTCM2; + ArCompassConnector *connector; + ArRobot *myRobot; + ArFunctorC *myOffCB; + ArFunctorC *myCompassCB; + ArFunctorC *myOnePacketCB; + ArFunctorC *myContinuousPacketsCB; + ArFunctorC *myUserCalibrationCB; + ArFunctorC *myAutoCalibrationCB; + ArFunctorC *myStopCalibrationCB; + ArFunctorC *myResetCB; + +}; + + +/// Mode for requesting config packet +class ArModeConfig : public ArMode +{ +public: + /// Constructor + AREXPORT ArModeConfig(ArRobot *robot, const char *name, char key, char key2); + AREXPORT virtual void activate(void); + AREXPORT virtual void deactivate(void); + AREXPORT virtual void help(void); + +protected: + ArRobot *myRobot; + ArRobotConfigPacketReader myConfigPacketReader; + ArFunctorC myGotConfigPacketCB; + + void gotConfigPacket(); +}; + + +#endif // ARMODES_H diff --git a/Legacy/Aria/include/ArModule.h b/Legacy/Aria/include/ArModule.h new file mode 100644 index 0000000..aed6dd7 --- /dev/null +++ b/Legacy/Aria/include/ArModule.h @@ -0,0 +1,171 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARMODULE_H +#define ARMODULE_H + + +#include "ariaTypedefs.h" +#include "ArRobot.h" + + +/// Dynamicly loaded module base class, read warning in more +/** + Right now only one module's init will be called, that is the first + one, its a bug that I just don't have time to fix at the moment. + I'll get to it when I have time or if someone needs it... someone + else wrote this code so it'll take me a little longer to fix it. + + This class defines a dyanicmly loaded module of code. This is usefull + for an application to load piece of code that it does not know about. + The ArModule defines and interface in which to invoke that piece of code + that the program does not know about. For instance, a module could + contain an ArAction and the modules init() could instantiate the ArAction + and add it to the supplied ArRobot. The init() takes a reference to an + ArRobot. The module should use that robot for its purposes. If the module + wants to use more robots, assuming there are multiple robots, it can use + Aria::getRobotList() to find all the ArRobot instantiated. The module + should do all its clean up in exit(). + + The user should derive their own class from ArModule and implement the + init() and exit() functions. The users code should always clean up + when exit() is called. exit() is called right before the module (dynamic + library .dll/.so) is closed and removed from the program. + + The macro ARDEF_MODULE() must be called within the .cpp file of the users + module. A global instance of the users module must be defined and a + reference to that instance must be passed to ARDEF_MODULE(). This allows + the ArModuleLoader to find the users module class and invoke it. + + One thing to note about the use of code wrapped in ArModules and staticly + linking in that code. To be able to staticly link .cpp files which contain + an ArModule, the ARIA_STATIC preprocessor symbol should be defined. This will cause + the ARDEF_MODULE() to do nothing. If it defined its normal functions and + variables, the linker would fail to staticly link in multiple modules + since they all have symbols with the same name. + + Refer to ArModuleLoader to see how to load an ArModule into a program. + + For examples, see the programs advanced/simpleMod.cpp and advanced/simpleModule.cpp. +*/ +class ArModule +{ +public: + + /// Constructor + AREXPORT ArModule(); + /// Destructor + AREXPORT virtual ~ArModule(); + + /// Initialize the module. The module should use the supplied ArRobot pointer + /** + @param robot Robot this module should attach to or operate on. Note, may be NULL. + + @param argument an optional argument passed to the module. Default + is NULL. The module can interpret this in any way, it is recommended + that you make sure this is documented if used. + */ + AREXPORT virtual bool init(ArRobot *robot, + void *argument = NULL) = 0; + + /// Close down the module and have it exit + AREXPORT virtual bool exit() = 0; + + /// Get the ArRobot pointer the module should be using + AREXPORT ArRobot * getRobot() {return(myRobot);} + + /// Set the ArRobot pointer + AREXPORT void setRobot(ArRobot *robot) {myRobot=robot;} + +protected: + + /// Stored ArRobot pointer that the module should use + ArRobot *myRobot; +}; + + +/* + Beware ye all who pass beyond this point. Ugly macros abound and you might + get eaten by a gru if your light fails. */ + + +#ifdef ARIA_STATIC + +#define ARDEF_MODULE(mod) + +#else + +#ifdef WIN32 + +#define ARDEF_MODULE(mod) \ +extern "C" {\ +static ArModule *__AriaModule_##mod = &mod; \ +_declspec(dllexport) bool \ +ariaInitModule(ArRobot *robot, void *argument = NULL) \ +{ \ + if (__AriaModule_##mod) \ + { \ + __AriaModule__->setRobot(robot); \ + return(__AriaModule_##mod->init(robot, argument)); \ + } \ + else \ + return(false); \ +} \ +_declspec(dllexport) bool ariaExitModule() \ +{ \ + if (__AriaModule_##mod) \ + return(__AriaModule_##mod->exit()); \ + return(false); \ +} \ +} +#else // WIN32 + +#define ARDEF_MODULE(mod) \ +static ArModule *__AriaModule_##mod = &mod; \ +extern "C" {\ +bool ariaInitModule(ArRobot *robot, void *argument = NULL) \ +{ \ + if (__AriaModule_##mod) \ + { \ + __AriaModule_##mod->setRobot(robot); \ + return(__AriaModule_##mod->init(robot, argument)); \ + } \ + else \ + return(false); \ +} \ +bool ariaExitModule() \ +{ \ + if (__AriaModule_##mod) \ + return(__AriaModule_##mod->exit()); \ + return(false); \ +} \ +} + +#endif // WIN32 + +#endif // ARIA_STATIC + + +#endif // ARMODULE_H diff --git a/Legacy/Aria/include/ArModuleLoader.h b/Legacy/Aria/include/ArModuleLoader.h new file mode 100644 index 0000000..044ce7b --- /dev/null +++ b/Legacy/Aria/include/ArModuleLoader.h @@ -0,0 +1,82 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARMODULELOADER_H +#define ARMODULELOADER_H + + +#include +#include +#include "ariaTypedefs.h" +#include "ArRobot.h" + + +/// Dynamic ArModule loader +/** + The ArModuleLoader is used to load ArModules into a program and invoke + them. + + See also ArModule to see how to define an ArModule. + + See also the example programs advanced/simpleMod.cpp and advanced/simpleModule.cpp. +*/ +class ArModuleLoader +{ +public: + +#ifdef WIN32 + typedef HINSTANCE DllRef; +#else + typedef void * DllRef; +#endif + + typedef enum { + STATUS_SUCCESS=0, ///< Load succeded + STATUS_ALREADY_LOADED, ///< Module already loaded + STATUS_FAILED_OPEN, ///< Could not find or open the module + STATUS_INVALID, ///< Invalid module file format + STATUS_INIT_FAILED, ///< The module failed its init stage + STATUS_EXIT_FAILED, ///< The module failed its exit stage + STATUS_NOT_FOUND ///< The module was not found + } Status; + + /// Load an ArModule + AREXPORT static Status load(const char *modName, ArRobot *robot, + void *modArgument = NULL, bool quiet = false); + /// Close and then reload an ArModule + AREXPORT static Status reload(const char *modName, ArRobot *robot, + void * modArgument = NULL, bool quiet = false); + /// Close an ArModule + AREXPORT static Status close(const char *modName, bool quiet = false); + /// Close all open ArModule + AREXPORT static void closeAll(); + +protected: + + static std::map ourModMap; +}; + + +#endif // ARMODULELOADER_H diff --git a/Legacy/Aria/include/ArMutex.h b/Legacy/Aria/include/ArMutex.h new file mode 100644 index 0000000..e6247f9 --- /dev/null +++ b/Legacy/Aria/include/ArMutex.h @@ -0,0 +1,210 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARMUTEX_H +#define ARMUTEX_H + +#if !defined(WIN32) || defined(MINGW) +#include +#endif +#include +#include "ariaTypedefs.h" + +class ArTime; +class ArFunctor; + +/// Cross-platform mutex wrapper class +/** + This class wraps the operating system's mutex functions. It allows mutualy + exclusive access to a critical section. This is extremely useful for + multiple threads which want to use the same variable. On Linux, ArMutex simply + uses the POSIX pthread interface in an object oriented manner. It also + applies the same concept to Windows using Windows' own abilities to restrict + access to critical sections. ArMutex also adds additional + diagnostic/debugging tools such as logging and timing. + + + @note ArMutex is by default a recursive mutex. This means that a + thread is allowed to acquire an additional lock (whether via lock() or tryLock()) + on a locked mutex if that same thread already has the lock. This allows a thread + to lock a mutex, but not become deadlocked if any functions called while it + is locked also attempt to lock the mutex, while still preventing other threads + from interrupting it. + If you want a non-recursive mutex, so that multiple attempts by the same thread + to lock a mutex to block, supply an argument of 'false' to the constructor. + + @ingroup UtilityClasses +*/ +class ArMutex +{ +public: + +#if defined(WIN32) && !defined(MINGW) + typedef HANDLE MutexType; +#else + typedef pthread_mutex_t MutexType; +#endif + + typedef enum { + STATUS_FAILED_INIT=1, ///< Failed to initialize + STATUS_FAILED, ///< General failure + STATUS_ALREADY_LOCKED ///< Mutex already locked + } Status; + + /// Constructor + AREXPORT ArMutex(bool recursive = true); + /// Destructor + AREXPORT virtual ~ArMutex(); + /// Copy constructor + AREXPORT ArMutex(const ArMutex &mutex); + + /** Lock the mutex + * + * If this is a recursive mutex (the default type), and a different + * thread has locked this mutex, then block until it is unlocked; if + * this thread has locked this mutex, then continue immediately and do + * not block. + * + * If this is not a recursive mutex, then block if any thread + * (including this thread) has locked this mutex. + * + * Call setLog(true) to enable extra logging. + * + * @return 0 if the mutex was successfully locked (after blocking if it was + * already locked by another thread, or by any thread if this is not a + * recursive mutex). + * @return ArMutex::STATUS_ALREADY_LOCKED immediately if this is a recursive mutex + * (default) and the current thread has already locked this mutex. + * @return ArMutex::STATUS_FAILED on an error from the platform mutex + * implementation. + * @return ArMutex::STATUS_FAILED_INIT if the platform threading is not + * enabled, initialized, etc. + */ + AREXPORT virtual int lock(); + + /** Try to lock the mutex, but do not block + * + * If this is a recursive mutex (the default type), and a different + * thread has locked this mutex, then return ArMutex::STATUS_ALREADY_LOCKED; if + * this thread has locked this mutex, then return 0. + * + * If this is not a recursive mutex, then return 0 if any thread + * (including this thread) has locked this mutex. + * + * Returns ArMutex::STATUS_FAILED or ArMutex::STATUS_FAILED_INIT on an error (such as threading + * not initialized or supported). + * + * Call setLog(true) to enable extra logging. + * + * @return 0 If tryLock() acquires the lock, or mutex is a recursive mutex + * (default) and is already locked by this thread + * @return ArMutex::STATUS_ALREADY_LOCKED if this mutex is currently locked + * by another thread, or if mutex is not recursive, by any thread + * including the current thread. + * @return ArMutex::STATUS_FAILED on an error from the platform mutex + * implementation. + * @return ArMutex::STATUS_FAILED_INIT if the platform threading is not + * enabled, initialized, etc. + */ + AREXPORT virtual int tryLock(); + + /// Unlock the mutex, allowing another thread to obtain the lock + AREXPORT virtual int unlock(); + + /// Get a human readable error message from an error code + AREXPORT virtual const char * getError(int messageNumber) const; + /** Sets a flag that will log out when we lock and unlock. Use setLogName() to + set a descriptive name for this mutex, and ArThread::setThreadName() to set a + descriptive name for a thread. + */ + void setLog(bool log) { myLog = log; } + /// Sets a name we'll use to log with + void setLogName(const char *logName) { myLogName = logName; } +#ifndef SWIG + /// Sets a name we'll use to log with formatting + /** @swigomit use setLogName() */ + AREXPORT void setLogNameVar(const char *logName, ...); +#endif + /// Get a reference to the underlying OS-specific mutex variable + AREXPORT virtual MutexType & getMutex() {return(myMutex);} + /** Sets the lock warning time (sec). If it takes more than @a lockWarningSeconds to perform the mutex lock in lock(), log a warning. + @linuxonly + */ + static void setLockWarningTime(double lockWarningSeconds) + { ourLockWarningMS = (unsigned int)(lockWarningSeconds*1000.0); } + /** Gets the lock warning time (sec) + @linuxonly + */ + static double getLockWarningTime(void) + { return ourLockWarningMS/1000.0; } + /** Sets the unlock warning time (sec). If it takes more than @a unlockWarningSeconds between the mutex being locked with lock() then unlocked with unlock(), log a warning. + @linuxonly + */ + static void setUnlockWarningTime(double unlockWarningSeconds) + { ourUnlockWarningMS = (unsigned int)(unlockWarningSeconds*1000.0); } + /** Gets the lock warning time (sec) + @linuxonly + */ + static double getUnlockWarningTime(void) + { return ourUnlockWarningMS/1000.0; } +protected: + + bool myFailedInit; + MutexType myMutex; +// Eliminating this from Windows in an attempt to debug a memory issue +#if !defined(WIN32) || defined(MINGW) + ArStrMap myStrMap; +#endif + + bool myLog; + std::string myLogName; + + bool myNonRecursive; + bool myWasAlreadyLocked; + + bool myFirstLock; + ArTime *myLockTime; + AREXPORT static unsigned int ourLockWarningMS; + AREXPORT static unsigned int ourUnlockWarningMS; + ArTime *myLockStarted; + // Intialize lock timing state. Call in ArMutex constructor. + void initLockTiming(); + // Destroy lock timing state. Call in destructor. + void uninitLockTiming(); + // Start timing how long it takes to perform the mutex lock. + void startLockTimer(); + // Check time it took to lock the mutex against ourLockWarningMS and log about it + void checkLockTime(); + // Start timing how long it takes between this mutex lock and its next unlock. + void startUnlockTimer(); + // Check time it took between lock and unlock against ourUnlockWarningMS and log about it + void checkUnlockTime(); + + + static ArFunctor *ourNonRecursiveDeadlockFunctor; +}; + + +#endif // ARMUTEX_H diff --git a/Legacy/Aria/include/ArNMEAParser.h b/Legacy/Aria/include/ArNMEAParser.h new file mode 100644 index 0000000..7f4d0e8 --- /dev/null +++ b/Legacy/Aria/include/ArNMEAParser.h @@ -0,0 +1,169 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARNMEAPARSER_H +#define ARNMEAPARSER_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ariaUtil.h" +#include "ArDeviceConnection.h" +#include +#include + + +/** @brief NMEA Parser + * + * Parses NMEA input data and calls callbacks for certain messages with message + * parts. NMEA is a standard output data protocol used by GPS devices and + * others (e.g. compass, altimiter, etc.) This class is used internally by ArNMEAParser and + * subclasses, and by ArTCMCompassDirect. + */ +class ArNMEAParser { + +public: + /** @param name Used in log messages */ + AREXPORT ArNMEAParser(const char *name = "NMEA Parser"); + + /** @brief Flags to indicates what the parse() method did. + * i.e. If nothing was done, then the + * result will be 0. To check a parse() return result @a result to see if data was updated, use + * (result & ParseUpdated). To check if there was an error, use (result & + * ParseError). + */ + enum { + ParseFinished = 1, ///< There was no data to parse + ParseError = 2, ///< There was an error + ParseData = 4, ///< Input was recieved and stored, but no complete messages were parsed + ParseUpdated = 8 ///< At least one complete message was parsed + } ParseFlags; + + /** @brief Set whether checksum is ignored (default behavior is not to ignore it, and + * skip messages with incorrect checksums, and log a warning mesage) */ + AREXPORT void setIgnoreChecksum(bool ignore) { ignoreChecksum = ignore; } + + /** NMEA message, divided into parts. */ + typedef std::vector MessageVector; + + /** Message data passed to handlers */ + typedef struct { + /** The parts of the message, including initial message ID (but excluding + * checksum) */ + ArNMEAParser::MessageVector* message; + /** Timestamp when the beginning of this message was recieved and parsing + * began. */ + ArTime timeParseStarted; + } Message; + + + /** NMEA message handler type. */ + typedef ArFunctor1 Handler; + + + /** Set a handler for an NMEA message. Mostly for internal use or to be used + * by related classes, but you could use for ususual or custom messages + * emitted by a device that you wish to be handled outside of the ArNMEAParser + * class. + */ + AREXPORT void addHandler(const char *message, ArNMEAParser::Handler *handler); + AREXPORT void removeHandler(const char *message); + + /* Read a chunk of input text from the given device connection and + * parse with parse(char*, int). The maximum amount of text read from the device + * connection is determined by the internal buffer size in this class + * (probably a few hundred bytes limit). + * @return a result code from ParseFlags + * @note You should only use one stream of data with ArNMEAParser, and in a + * continuous fashion, since it will store partially recieved messages for + * the next call to one of the parse() methods. + */ + AREXPORT int parse(ArDeviceConnection *dev); + + /* Parse a chunk of input text. Call message handlers as complete NMEA + * messages are parsed. Parsing state is stored in this ArNMEAParser object. + * @return a result code from ParseFlags + */ + AREXPORT int parse(const char *buf, int n); + + + + + +public: + /* Map of message identifiers to handler functors */ + typedef std::map HandlerMap; + +private: + /* NMEA message handlers used by ArNMEAParser */ + HandlerMap myHandlers; + +public: + const ArNMEAParser::HandlerMap& getHandlersRef() const { return myHandlers; } + +private: + + const char *myName; + + /* NMEA scanner state. + * There are possabilities for opmitization here, such + * as just storing the read data in a buffer and handling + * each field as it is found in the buffer, or building + * a list of char* for each field pointing into the buffer + * instead of copying each field into a std::string in the + * currentMessage vector, etc. etc. + */ + const unsigned short MaxNumFields; + const unsigned short MaxFieldSize; // bytes + bool ignoreChecksum; + + MessageVector currentMessage; + ArTime currentMessageStarted; + std::string currentField; + char checksumBuf[3]; + short checksumBufOffset; + bool inChecksum; + bool inMessage; + char currentChecksum; + bool gotCR; + + // Tools to update state + void beginMessage(); + void endMessage(); + void nextField(); + void beginChecksum(); + + /* Data buffer used by handleInput(ArDeviceConnection*). + * This should be enough to hold several NMEA messages. + * Most NMEA messages should be less than 50 bytes or so; + * 256 then allows a minumum of 5 messages parsed per + * call to parse(arDeviceConnection*).) + */ + char myReadBuffer[256]; //[512]; + +}; + +#endif // ifdef ARNMEAPARSER_H + diff --git a/Legacy/Aria/include/ArNetServer.h b/Legacy/Aria/include/ArNetServer.h new file mode 100644 index 0000000..662ad6b --- /dev/null +++ b/Legacy/Aria/include/ArNetServer.h @@ -0,0 +1,223 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARNETSERVER_H +#define ARNETSERVER_H + +#include "ariaTypedefs.h" +#include "ArSocket.h" +#include "ArFunctor.h" +#include "ariaUtil.h" + +#include + + +class ArRobot; + +class ArArgumentBuilder; + +/// Class for running a simple net server to send/recv commands via text +/** + This class is for running a simple server which will have a + list of commands to use and a fairly simple set of interactions... + Start the server with the open() function, add commands with the + addCommand() function and remove commands with remCommand(), and close + the server with the close() function. + + A client can connect via TCP on the port provided to open() and send + a line of text where the first word is the command and the following + words are extra arguments or data (space separated). The line should + end with a newline ("\n") or carriage return character. The first + line sent should be a password and must match the password given to + open() in order to continue. + + You can use the "telnet" program as a general client to any ArNetServer server. + + It has a built in mutex, if you only use sendToAllClients() through + the normal commands or during the robot loop you don't need to + worry about locking anything and the server is locked before any of + the callbacks for the commands are called so you really only need + to lock the server if you're dealing with from another thread.... + From another thread you can use sendToAllClientsNextCycle which + takes care of all the locking itself in a threadsafe way (it puts + the message in a list, then sends it in the next cycle of the + loop). The only real reason to use the + lock/sendToAllClients/unlock method is if you're highly concerned + about synchronizing the different types of output. + + @ingroup OptionalClasses +**/ +class ArNetServer +{ +public: + /// Constructor + AREXPORT ArNetServer(bool addAriaExitCB = true, + bool doNotAddShutdownServer = false); + /// Destructor + AREXPORT ~ArNetServer(); + + /// Initializes the server + AREXPORT bool open(ArRobot *robot, unsigned int port, + const char *password, bool multipleClients = true, + const char *openOnIP = NULL); + + /// Closes the server + AREXPORT void close(void); + + /// Adds a new command + AREXPORT bool addCommand(const char *command, + ArFunctor3 *functor, + const char *help); + + /// Removes a command + AREXPORT bool remCommand(const char *command); + +#ifndef SWIG + /** @brief Sends the given string to all the clients. See also the + * notes on locking in the class description. + * @swigomit @sa + * sendToAllClientsPlain() + */ + AREXPORT void sendToAllClients(const char *str, ...); +#endif + + /// Sends the given string to all the clients, no varargs, wrapper for java + AREXPORT void sendToAllClientsPlain(const char *str); + +#ifndef SWIG + /** @brief Sends the given string to all the clients next cycle + * @swigomit + * @sa sendToAllClientsNextCyclePlain() + */ + AREXPORT void sendToAllClientsNextCycle(const char *str, ...); +#endif + + /// Sends the given string to all the clients next cycle, no varargs, wrapper for java + AREXPORT void sendToAllClientsNextCyclePlain(const char *str); + +#ifndef SWIG + /** @brief Sends the given string to the (hopefully) the client given (this method may go away) + * @swigomit + * @sa sendToClientPlain() + */ + AREXPORT void sendToClient(ArSocket *socket, const char *ipString, + const char *str, ...); +#endif + + /// Sends the given plain string to the (hopefully) the client given (this method may go away) + AREXPORT void sendToClientPlain(ArSocket *socket, const char *ipString, + const char *str); + + /// Sees if the server is running and open + AREXPORT bool isOpen(void); + + /// Sets whether we are logging all data sent or not + AREXPORT void setLoggingDataSent(bool loggingData); + + /// Gets whether we are logging all data sent or not + AREXPORT bool getLoggingDataSent(void); + + /// Sets whether we are logging all data received or not + AREXPORT void setLoggingDataReceived(bool loggingData); + + /// Gets whether we are logging all data received or not + AREXPORT bool getLoggingDataReceived(void); + + /// Sets whether we're using the wrong (legacy) end chars or not + AREXPORT void setUseWrongEndChars(bool useWrongEndChars); + + /// Gets whether we're using the wrong (legacy) end chars or not + AREXPORT bool getUseWrongEndChars(void); + + /// the internal sync task we use for our loop + AREXPORT void runOnce(void); + + /// the internal function that gives the greeting message + AREXPORT void internalGreeting(ArSocket *socket); + + /// The internal function that does the help + AREXPORT void internalHelp(ArSocket *socket); + /// The internal function for the help cb + AREXPORT void internalHelp(char **argv, int argc, ArSocket *socket); + /// The internal function for echo + AREXPORT void internalEcho(char **argv, int argc, ArSocket *socket); + /// The internal function for closing this connection + AREXPORT void internalQuit(char **argv, int argc, ArSocket *socket); + /// The internal function for shutting down + AREXPORT void internalShutdownServer(char **argv, int argc, + ArSocket *socket); + /// The internal function for parsing a command on a socket + AREXPORT void parseCommandOnSocket(ArArgumentBuilder *args, + ArSocket *socket, bool allowLog = true); + /// The internal function that adds a client to our list + AREXPORT void internalAddSocketToList(ArSocket *socket); + /// The internal function that adds a client to our delete list + AREXPORT void internalAddSocketToDeleteList(ArSocket *socket); + /// This squelchs all the normal commands and help + AREXPORT void squelchNormal(void); + /// Sets an extra string that the server holds for passing around + AREXPORT void setExtraString(const char *str) { myExtraString = str; } + /// Gets an extra string that the server holds for passing around + AREXPORT const char *getExtraString(void) { return myExtraString.c_str(); } + /// Lock the server + AREXPORT int lock() {return(myMutex.lock());} + /// Try to lock the server without blocking + AREXPORT int tryLock() {return(myMutex.tryLock());} + /// Unlock the server + AREXPORT int unlock() {return(myMutex.unlock());} + +protected: + ArMutex myMutex; + ArSocket myAcceptingSocket; + std::map *, ArStrCaseCmpOp> myFunctorMap; + std::map myHelpMap; + bool myLoggingDataSent; + bool myLoggingDataReceived; + bool myUseWrongEndChars; + bool myOpened; + bool myWantToClose; + bool mySquelchNormal; + ArSocket myServerSocket; + ArRobot *myRobot; + std::string myPassword; + bool myMultipleClients; + unsigned int myPort; + std::string myExtraString; + std::list myConns; + std::list myConnectingConns; + std::list myDeleteList; + + ArMutex myNextCycleSendsMutex; + std::list myNextCycleSends; + + ArFunctorC myTaskCB; + ArFunctor3C myHelpCB; + ArFunctor3C myEchoCB; + ArFunctor3C myQuitCB; + ArFunctor3C myShutdownServerCB; + ArFunctorC myAriaExitCB; +}; + +#endif // ARNETSERVER_H diff --git a/Legacy/Aria/include/ArNovatelGPS.h b/Legacy/Aria/include/ArNovatelGPS.h new file mode 100644 index 0000000..760481b --- /dev/null +++ b/Legacy/Aria/include/ArNovatelGPS.h @@ -0,0 +1,98 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARNOVATELGPS_H +#define ARNOVATELGPS_H + + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ariaUtil.h" +#include "ArGPS.h" + +/** @brief GPS subclass to support the NovAtel ProPak G2 and other NovAtel + * "OEM4" devices. + * + * This subclass overrides initDevice() to send initialization commands specific + * to NovAtel GPS devices. + * On connect, it initiazes SBAS (satellite-based augmentation) to + * "auto", which uses WAAS, EGNOS, or MSAS if available, + * and then requests NMEA messages to be interpreted by ArGPS. + * + * It does not initialize corrections sent by your own DGPS fixed + * base station over radio, or the wide-area L-Band services such as OmniStar or + * the Canada-wide DGPS (supported by the NovaTel ProPak LBplus). + * To configure DGPS, you must connect to the GPS with a terminal + * program (e.g. "minicom" in Linux), configure the device for + * your specific service, region and radio settings, and save + * with the "saveconfig" command. See the GPS setup notes + * at http://robots.mobilerobots.com/tech_notes/GPS_Setup_Notes.txt + * and the NovAtel GPS Reference Manual Volume 1, Sections 4.3 and 4.5 for + * ("Transmitting and Receiving Corrections" and "Enabling L-Band Positioning") + * for more information on doing this. + * + */ +class ArNovatelGPS : public virtual ArGPS { +protected: + void handleNovatelGPGGA(ArNMEAParser::Message msg); + ArFunctor1C myNovatelGPGGAHandler; +public: + AREXPORT ArNovatelGPS(); + AREXPORT virtual ~ArNovatelGPS(); +protected: + AREXPORT virtual bool initDevice(); +}; + +/** @brief GPS subclass to support the NovAtel SPAN GPS with integrated IMU. + + This subclass requests the INGLL NMEA message for combined IMU and GPS + position, and updates the GPS position in ArGPS using this data. + It replaces the normal GPRMC handler from ArGPS, and instead saves the uncorrected + GPS data separately. (use dynamic_cast to cast an ArGPS object to an + ArNovatelSPAN object to access this data). + + @since ARIA 2.7.2 +*/ +class ArNovatelSPAN : public virtual ArNovatelGPS { +protected: + /** overrides ArNovatelGPS::handleGPRMC(), and keeps results of parsing the + * message in this class rather than ArGPS. */ + void handleGPRMC(ArNMEAParser::Message msg); + void handleINGLL(ArNMEAParser::Message msg); + AREXPORT virtual bool initDevice(); + ArFunctor1C myGPRMCHandler; + ArFunctor1C myINGLLHandler; +public: + double GPSLatitude, GPSLongitude; + bool haveGPSPosition, GPSValidFlag; + ArTime timeGotGPSPosition, GPSTimestamp; + AREXPORT ArNovatelSPAN(); + AREXPORT virtual ~ArNovatelSPAN(); +}; + +#endif + + diff --git a/Legacy/Aria/include/ArP2Arm.h b/Legacy/Aria/include/ArP2Arm.h new file mode 100644 index 0000000..d058d48 --- /dev/null +++ b/Legacy/Aria/include/ArP2Arm.h @@ -0,0 +1,299 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARP2ARM_H +#define ARP2ARM_H + +#include "ArRobot.h" +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ariaOSDef.h" + +// P2 Arm classes: ArP2Arm for control and ArP2ArmJoints for P2 Arm joint data + +/// P2 Arm joint info +class P2ArmJoint +{ +public: + + AREXPORT P2ArmJoint(); + AREXPORT virtual ~P2ArmJoint(); + + ArTypes::UByte myPos; + ArTypes::UByte myVel; + ArTypes::UByte myHome; + ArTypes::UByte myMin; + ArTypes::UByte myCenter; + ArTypes::UByte myMax; + ArTypes::UByte myTicksPer90; +}; + +/** + ArP2Arm is the interface to the AROS/P2OS-based Pioneer 2 Arm servers, + by means of which the robot microcontroller firmware can control the + original 5-DOF Pioneer 2 Arm manipulator. + The P2 Arm is attached to the robot's microcontroller via an auxiliary + serial port. + + To use ArmP2, you must first set up an ArRobot and have it connect + with the robot. The ArRobot needs to be run so that it reads and writes + packets to and from server. The easiest way is ArRobot::runAsync() + which runs the ArRobot in its own thread. + + Then call ArP2Arm::setRobot() with ArRobot, and finally initialized + with ArmP2::init(). Once initialized, use the various ArP2Arm + methods to power the P2 Arm servos, move joints, and so on. + + For simple examples on how to use ArP2Arm, look in the Aria/examples + directory for P2ArmSimple.cpp and P2ArmJoydrive.cpp. + + For additional information about the original 5-DOF Pioneer 2 Arm, + see the robot operations manual and the arm manual, available at + http://robots.mobilerobots.com. + + @ingroup DeviceClasses + @ingroup OptionalClasses +**/ +/// Arm Control class +class ArP2Arm +{ +public: + + /// General error conditions possible from most of the arm related functions + typedef enum { + SUCCESS, ///< Succeded + ALREADY_INITED, ///< The class is already initialized + NOT_INITED, ///< The class is not initialized + ROBOT_NOT_SETUP, ///< The ArRobot class is not setup properly + NO_ARM_FOUND, ///< The arm can not be found + COMM_FAILED, ///< Communications has failed + COULD_NOT_OPEN_PORT, ///< Could not open the communications port + COULD_NOT_SET_UP_PORT, ///< Could not setup the communications port + ALREADY_CONNECTED, ///< Already connected to the arm + NOT_CONNECTED, ///< Not connected with the arm, connect first + INVALID_JOINT, ///< Invalid joint specified + INVALID_POSITION ///< Invalid position specified + } State; + + /// Type of arm packet identifiers. Used in ArP2Arm::setPacketCB(). + typedef enum { + StatusPacket, ///< The status packet type + InfoPacket ///< The info packet type + } PacketType; + + /// Type of status packets to request for. Used in ArP2Arm::requestStatus() + typedef enum + { + StatusOff=0, ///< Stop sending status packets + StatusSingle=1, ///< Send a single status packets + StatusContinuous=2 ///< Send continous packets. Once every 100ms. + } StatusType; + + /// Bit for joint 1 in arm status byte + AREXPORT static const int ArmJoint1; + /// Bit for joint 2 in arm status byte + AREXPORT static const int ArmJoint2; + /// Bit for joint 3 in arm status byte + AREXPORT static const int ArmJoint3; + /// Bit for joint 4 in arm status byte + AREXPORT static const int ArmJoint4; + /// Bit for joint 5 in arm status byte + AREXPORT static const int ArmJoint5; + /// Bit for joint 6 in arm status byte + AREXPORT static const int ArmJoint6; + /// Bit for arm good state in arm status byte + AREXPORT static const int ArmGood; + /// Bit for arm initialized in arm status byte + AREXPORT static const int ArmInited; + /// Bit for arm powered on in arm status byte + AREXPORT static const int ArmPower; + /// Bit for arm homing in arm status byte + AREXPORT static const int ArmHoming; + /// Number of joints that the arm has + AREXPORT static int NumJoints; + + /// Constructor + AREXPORT ArP2Arm(); + + /// Destructor + AREXPORT virtual ~ArP2Arm(); + + /// Set the robot to use to talk to the arm + AREXPORT void setRobot(ArRobot *robot) {myRobot=robot;} + + /// Init the arm class + AREXPORT virtual State init(); + + /// Uninit the arm class + AREXPORT virtual State uninit(); + + /// Power on the arm + AREXPORT virtual State powerOn(bool doWait=true); + + /// Power off the arm + AREXPORT virtual State powerOff(); + + /// Request the arm info packet + AREXPORT virtual State requestInfo(); + + /// Request the arm status packet + AREXPORT virtual State requestStatus(StatusType status); + + /// Request arm initialization + AREXPORT virtual State requestInit(); + + /// Check to see if the arm is still connected + AREXPORT virtual State checkArm(bool waitForResponse=true); + + /// Home the arm + AREXPORT virtual State home(int joint=-1); + + /// Home the arm and power if off + AREXPORT virtual State park(); + + /// Move a joint to a position in degrees + AREXPORT virtual State moveTo(int joint, float pos, unsigned char vel=0); + + /// Move a joint to a position in low level arm controller ticks + AREXPORT virtual State moveToTicks(int joint, unsigned char pos); + + /// Move a joint step degrees + AREXPORT virtual State moveStep(int joint, float pos, unsigned char vel=0); + + /// Move a joint step ticks + AREXPORT virtual State moveStepTicks(int joint, signed char pos); + + /// Set the joint to move at the given velocity + AREXPORT virtual State moveVel(int joint, int vel); + + /// Stop the arm + AREXPORT virtual State stop(); + + /// Set the auto park timer value + AREXPORT virtual State setAutoParkTimer(int waitSecs); + + /// Set the gripper park timer value + AREXPORT virtual State setGripperParkTimer(int waitSecs); + + /// Set the arm stopped callback + AREXPORT virtual void setStoppedCB(ArFunctor *func) {myStoppedCB=func;} + + /// set the arm packet callback + AREXPORT virtual void setPacketCB(ArFunctor1 *func) + {myPacketCB=func;} + + /// Get the arm version + AREXPORT virtual std::string getArmVersion() {return(myVersion);} + + /// Get the joints position in degrees + AREXPORT virtual float getJointPos(int joint); + + /// Get the joints position in ticks + AREXPORT virtual unsigned char getJointPosTicks(int joint); + + /// Check to see if the arm is moving + AREXPORT virtual bool getMoving(int joint=-1); + + /// Check to see if the arm is powered + AREXPORT virtual bool isPowered(); + + /// Check to see if the arm is communicating + AREXPORT virtual bool isGood(); + + /// Get the two byts of status info from P2OS + AREXPORT virtual int getStatus() {return(myStatus);} + + /// Get when the last arm status packet came in + AREXPORT virtual ArTime getLastStatusTime() {return(myLastStatusTime);} + + /// Get the robot that the arm is on + AREXPORT virtual ArRobot * getRobot() {return(myRobot);} + + /// Get the joints data structure + AREXPORT virtual P2ArmJoint * getJoint(int joint); + + /// Converts degrees to low level arm controller ticks + AREXPORT virtual bool convertDegToTicks(int joint, float pos, + unsigned char *ticks); + + /// Converts low level arm controller ticks to degrees + AREXPORT virtual bool convertTicksToDeg(int joint, unsigned char pos, + float *degrees); + + +protected: + + // AROS/P2OS parameters + static const unsigned int ARMpac; + static const unsigned int ARMINFOpac; + static const unsigned char ComArmInfo; + static const unsigned char ComArmStats; + static const unsigned char ComArmInit; + static const unsigned char ComArmCheckArm; + static const unsigned char ComArmPower; + static const unsigned char ComArmHome; + static const unsigned char ComArmPark; + static const unsigned char ComArmPos; + static const unsigned char ComArmSpeed; + static const unsigned char ComArmStop; + static const unsigned char ComArmAutoPark; + static const unsigned char ComArmGripperPark; + + bool comArmInfo(); + bool comArmStats(StatusType stats=StatusSingle); + bool comArmInit(); + bool comArmCheckArm(); + bool comArmPower(bool on); + bool comArmHome(unsigned char joint=0xff); + bool comArmPark(); + bool comArmPos(unsigned char joint, unsigned char pos); + bool comArmSpeed(unsigned char joint, unsigned char speed); + bool comArmStop(unsigned char joint=0xff); + bool comArmAutoPark(int waitSecs); + bool comArmGripperPark(int waitSecs); + + bool armPacketHandler(ArRobotPacket *packet); + + bool myInited; + ArRobot *myRobot; + // ArmP2Model myModel; + ArTime myLastStatusTime; + ArTime myLastInfoTime; + std::string myVersion; + StatusType myStatusRequest; + ArTypes::UByte2 myLastStatus; + ArTypes::UByte2 myStatus; + ArSerialConnection myCon; + ArRetFunctorC myAriaUninitCB; + ArRetFunctor1C myArmPacketHandler; + ArFunctor1 *myPacketCB; + ArFunctor *myStoppedCB; + + // We have 6 joints. Including the gripper. It's here so that we can + // store its position even though its not really a joint. + P2ArmJoint myJoints[6]; +}; + +#endif // _ARP2ARM_H diff --git a/Legacy/Aria/include/ArPTZ.h b/Legacy/Aria/include/ArPTZ.h new file mode 100644 index 0000000..e6ebbf1 --- /dev/null +++ b/Legacy/Aria/include/ArPTZ.h @@ -0,0 +1,357 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARPTZ_H +#define ARPTZ_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ArCommands.h" +#include "ArPTZConnector.h" + +class ArRobot; +class ArBasePacket; +class ArRobotPacket; +class ArDeviceConnection; + + +/// Base class which handles the PTZ cameras +/** + This class is mainly concerned with making all the cameras look + the same for outgoing data, it is also set up to facilitate the + acquisition of incoming data but that is described in the + following paragraphs. There are two ways this can be used. The + first is the simplest and default behavior and should be used by + those whose cameras are attached to their robot's microcontroller, + a ArRobot pointer is passed in to the contructor, this is where + the commands will be sent to the robot via the robot's connection + which will then send it along over the second serial port. The + second way is to pass an ArDeviceConnection to + setDeviceConnection, if this is done commands will be sent along + the given serial port, this should ONLY be done if the camera is + attached straight to a serial port on the computer this program is + running on. + + The next two paragraphs describe how to get data back from the + cameras, but this base class is set up so that by default it won't + try to get data back and assumes you're not trying to do that. If + you are trying to get data back the important functions are + packetHandler, robotPacketHandler and readPacket and you should + read the docs on those. + + If the camera is attached to the robot (and you are thus using the + first method described in the first paragraph) then the only way + to get data back is to send an ArCommands::GETAUX, then set up a + robotPacketHandler for the AUX id and have it call the + packetHandler you set up in in the class. + + If the camera is attached to the serial port on the computer (and + thus the second method described in the first paragraph was used) + then its more complicated... the default way is to just pass in an + ArDeviceConnection to setDeviceConnection and implement the + readPacket method (which MUST not block), and every time through + the robot loop readPacket (with the sensorInterpHandler) will be + called and any packets will be given to the packetHandler (which + you need to implement in your class) to be processed. The other + way to do this method is to pass both an ArDefaultConnection and + false to setDeviceConnection, this means the camera will not be + read at all by default, and you're on your own for reading the + data in (ie like your own thread). + + @ingroup OptionalClasses + @ingroup DeviceClasses + + @todo add functions (optional to implement): power on/off, isReady/isInitialized, slew +**/ +class ArPTZ +{ +public: + AREXPORT ArPTZ(ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArPTZ(); + + /// Initializes the camera + AREXPORT virtual bool init(void) = 0; + + /// Return name of this PTZ type + AREXPORT virtual const char *getTypeName() = 0; + + /// Resets the camera + /** + This function will reset the camera to 0 0 pan tilt, and 0 zoom, + on some cameras that can get out of sync it may need to do more, + such as call init on it again. + **/ + AREXPORT virtual void reset(void) + { panTilt(0, 0); if (canZoom()) zoom(getMinZoom()); } + + /// Pans to the given degrees. 0 is straight ahead, - is to the left, + to the right + virtual bool pan(double degrees) + { + if(myInverted) { + return pan_i(-degrees); + } else { + return pan_i(degrees); + } + } + /// Pans relative to current position by given degrees + virtual bool panRel(double degrees) { if(myInverted) return panRel_i(-degrees); else return panRel_i(degrees); } + + /// Tilts to the given degrees. 0 is middle, - is downward, + is upwards. + virtual bool tilt(double degrees) { if(myInverted) return tilt_i(-degrees); else return tilt_i(degrees); } + /// Tilts relative to the current position by given degrees + virtual bool tiltRel(double degrees) { if(myInverted) return tiltRel_i(-degrees); else return tiltRel_i(degrees); } + + /// Pans and tilts to the given degrees + virtual bool panTilt(double degreesPan, double degreesTilt) { if(myInverted) return panTilt_i(-degreesPan, -degreesTilt); else return panTilt_i(degreesPan, degreesTilt); } + /// Pans and tilts relatives to the current position by the given degrees + virtual bool panTiltRel(double degreesPan, double degreesTilt) { if(myInverted) return panTiltRel_i(-degreesPan, -degreesTilt); else return panTiltRel_i(degreesPan, degreesTilt); } + + /// Returns true if camera can zoom and this class can control the zoom amount + AREXPORT virtual bool canZoom(void) const = 0; + + /// Zooms to the given value + AREXPORT virtual bool zoom(int zoomValue) { return false; } + /// Zooms relative to the current value, by the given value + AREXPORT virtual bool zoomRel(int zoomValue) { return false; } + + /** The angle the camera is panned to (or last commanded value sent, if unable to obtain real pan position) + @sa canGetRealPanTilt() + */ + virtual double getPan(void) const { if(myInverted) return -getPan_i(); else return getPan_i(); } + + /** The angle the camera is tilted to (or last commanded value sent, if unable to obtain real pan position) + @sa canGetRealPanTilt() + */ + virtual double getTilt(void) const { if(myInverted) return -getTilt_i(); else return getTilt_i(); } + + /** The amount the camera is zoomed to (or last commanded value sent, + if unable to obtain real pan position) + @sa canZoom(); + @sa canGetZoom() + */ + AREXPORT virtual int getZoom(void) const { return 0; } + + /// Whether getPan() hand getTilt() return the device's real position, or last commanded position. + AREXPORT virtual bool canGetRealPanTilt(void) const { return false; } + + /// Whether getZoom() returns the device's real zoom amount, or last commanded zoom position. + AREXPORT virtual bool canGetRealZoom(void) const { return false; } + + + /// Gets the highest positive degree the camera can pan to (inverted if camera is inverted) + virtual double getMaxPosPan(void) const { if (myInverted) return -myMaxPosPan; else return myMaxPosPan; } + + + /// @copydoc getMaxPosPan() + double getMaxPan() const { return getMaxPosPan(); } + + /// Gets the lowest negative degree the camera can pan to (inverted if camera is inverted) + virtual double getMaxNegPan(void) const { if (myInverted) return -myMaxNegPan; else return myMaxNegPan; } + + /// @copydoc getMaxNegPan() + double getMinPan() const { return getMaxNegPan(); } + + + /// Gets the highest positive degree the camera can tilt to (inverted if camera is inverted) + virtual double getMaxPosTilt(void) const { if (myInverted) return -myMaxPosTilt; else return myMaxPosTilt; } + + /// @copydoc getMaxPosTilt() + double getMaxTilt() const { return getMaxPosTilt(); } + + /// Gets the lowest negative degree the camera can tilt to (inverted if camera is inverted) + virtual double getMaxNegTilt(void) const { if (myInverted) return -myMaxNegTilt; else return myMaxNegTilt; } + + ///@copydoc getMaxNegTilt() + double getMinTilt() const { return getMaxNegTilt(); } + + /// Halt any pan/tilt movement, if device supports it + virtual bool haltPanTilt() { return false; }; + + /// Halt any zoom movement, if device supports that + virtual bool haltZoom() { return false; } + + /// Can pan and tilt speed (slew rates) be set to move device? + virtual bool canPanTiltSlew() { return false; } + + /// Set pan slew rate (speed) (degrees/sec) if device supports it (see canPanTiltSlew()) + virtual bool panSlew(double s) { return false; } + + /// Set tilt slew rate (speed) (degrees/sec) if device supports it (see canPanTiltSlew()) + virtual bool tiltSlew(double s) { return false; } + +protected: + /// Versions of the pan and tilt limit accessors where inversion is not applied, for use by subclasses to check when given pan/tilt commands. + /// @todo limits checking should be done in ArPTZ pan(), tilt() and panTilt() public interface methods instead of in each implementation + //@{ + virtual double getMaxPosPan_i(void) const { return myMaxPosPan; } + double getMaxPan_i() const { return getMaxPosPan_i(); } + virtual double getMaxPosTilt_i(void) const { return myMaxPosTilt; } + double getMinPan_i() const { return getMaxNegPan_i(); } + virtual double getMaxNegPan_i(void) const { return myMaxNegPan; } + double getMaxTilt_i() const { return getMaxPosTilt_i(); } + virtual double getMaxNegTilt_i(void) const { return myMaxNegTilt; } + double getMinTilt_i() const { return getMaxNegTilt_i(); } + //@} + +public: + + /// Gets the maximum value for the zoom on this camera + virtual int getMaxZoom(void) const { if (myInverted) return -myMaxZoom; else return myMaxZoom; } + /// Gets the lowest value for the zoom on this camera + virtual int getMinZoom(void) const { if (myInverted) return -myMinZoom; else return myMinZoom; } + /// Whether we can get the FOV (field of view) or not + virtual bool canGetFOV(void) { return false; } + /// Gets the field of view at maximum zoom + AREXPORT virtual double getFOVAtMaxZoom(void) { return 0; } + /// Gets the field of view at minimum zoom + AREXPORT virtual double getFOVAtMinZoom(void) { return 0; } + + /// Set gain on camera, range of 1-100. Returns false if out of range + /// or if you can't set the gain on the camera + AREXPORT virtual bool setGain(double gain) const { return false; } + /// Get the gain the camera is set to. 0 if not supported + AREXPORT virtual double getGain(double gain) const { return 0; } + /// If the driver can set gain on the camera, or not + AREXPORT virtual bool canSetGain(void) const { return false; } + + /// Set focus on camera, range of 1-100. Returns false if out of range + /// or if you can't set the focus on the camera + AREXPORT virtual bool setFocus(double focus) const { return false; } + /// Get the focus the camera is set to. 0 if not supported + AREXPORT virtual double getFocus(double focus) const { return 0; } + /// If the driver can set the focus on the camera, or not + AREXPORT virtual bool canSetFocus(void) const { return false; } + + /// Set whether the camera is inverted (upside down). If true, pan and tilt axes will be reversed. + void setInverted(bool inv) { myInverted = inv; } + + /// Get whether the camera is inverted (upside down). If true, pan and tilt axes will be reversed. + bool getInverted() { return myInverted; } + + /// Sets the device connection to be used by this PTZ camera, if set + /// this camera will send commands via this connection, otherwise + /// its via robot aux. serial port (see setAuxPortt()) + AREXPORT virtual bool setDeviceConnection(ArDeviceConnection *connection, + bool driveFromRobotLoop = true); + /// Gets the device connection used by this PTZ camera + AREXPORT virtual ArDeviceConnection *getDeviceConnection(void); + /// Sets the aux port on the robot to be used to communicate with this device + AREXPORT virtual bool setAuxPort(int auxPort); + /// Gets the port the device is set to communicate on + AREXPORT virtual int getAuxPort(void) { return myAuxPort; } + /// Reads a packet from the device connection, MUST NOT BLOCK + /** + This should read in a packet from the myConn connection and + return a pointer to a packet if there was on to read in, or NULL + if there wasn't one... this MUST not block if it is used with + the default mode of being driven from the sensorInterpHandler, + since that is on the robot loop. + @return packet read in, or NULL if there was no packet read + **/ + AREXPORT virtual ArBasePacket *readPacket(void) { return NULL; } + + /// Sends a given packet to the camera (via robot or serial port, depending) + AREXPORT virtual bool sendPacket(ArBasePacket *packet); + /// Handles a packet that was read from the device + /** + This should work for the robot packet handler or for packets read + in from readPacket (the joys of OO), but it can't deal with the + need to check the id on robot packets, so you should check the id + from robotPacketHandler and then call this one so that your stuff + can be used by both robot and serial port connections. + @param packet the packet to handle + @return true if this packet was handled (ie this knows what it + is), false otherwise + **/ + AREXPORT virtual bool packetHandler(ArBasePacket *packet) { return false; } + + /// Handles a packet that was read by the robot + /** + This handles packets read in from the robot, this function should + just check the ID of the robot packet and then return what + packetHandler thinks of the packet. + @param packet the packet to handle + @return true if the packet was handled (ie this konws what it is), + false otherwise + **/ + AREXPORT virtual bool robotPacketHandler(ArRobotPacket *packet); + + /// Internal, attached to robot, inits the camera when robot connects + AREXPORT virtual void connectHandler(void); + /// Internal, for attaching to the robots sensor interp to read serial port + AREXPORT virtual void sensorInterpHandler(void); + + /// Return ArRobot object this PTZ is associated with. May be NULL + ArRobot *getRobot() { return myRobot; } +protected: + ArRobot *myRobot; + ArDeviceConnection *myConn; + ArFunctorC myConnectCB; + ArFunctorC mySensorInterpCB; + int myAuxPort; + ArCommands::Commands myAuxTxCmd; + ArCommands::Commands myAuxRxCmd; + ArRetFunctor1C myRobotPacketHandlerCB; + bool myInverted; + double myMaxPosPan; + double myMaxNegPan; + double myMaxPosTilt; + double myMaxNegTilt; + int myMaxZoom; + int myMinZoom; + + /// Subclasses call this to set extents (limits) returned by getMaxPosPan(), getMaxNegPan(), getMaxPosTilt(), getMaxNegTilt(), getMaxZoom(), and getMinZoom(). + /// @since 2.7.6 + void setLimits(double maxPosPan, double maxNegPan, double maxPosTilt, double maxNegTilt, int maxZoom = 0, int minZoom = 0) + { + myMaxPosPan = maxPosPan; + myMaxNegPan = maxNegPan; + myMaxPosTilt = maxPosTilt; + myMaxNegTilt = maxNegTilt; + myMaxZoom = maxZoom; + myMinZoom = minZoom; + } + + /// Internal implementations by subclasses. Inverted is not applied in these functions, it is done in the public interface above. + /// Note, once execution enters one of these _i methods, then inversion has been + /// applied and no call should be made to any pan/tilt or max/min limit accessor + /// method that does not end in _i, or inversion will be applied again, + /// reversing it. + /// @since 2.7.6 + //@{ + AREXPORT virtual bool pan_i (double degrees) = 0; + AREXPORT virtual bool panRel_i(double degrees) = 0; + AREXPORT virtual bool tilt_i(double degrees) = 0; + AREXPORT virtual bool tiltRel_i (double degrees) = 0; + AREXPORT virtual bool panTilt_i(double degreesPan, double degreesTilt) = 0; + AREXPORT virtual bool panTiltRel_i(double degreesPan, double degreesTilt) = 0; + AREXPORT virtual double getPan_i(void) const = 0; + AREXPORT virtual double getTilt_i(void) const = 0; + //@} + +}; + +#endif // ARPTZ_H diff --git a/Legacy/Aria/include/ArPTZConnector.h b/Legacy/Aria/include/ArPTZConnector.h new file mode 100644 index 0000000..18832cd --- /dev/null +++ b/Legacy/Aria/include/ArPTZConnector.h @@ -0,0 +1,170 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARPTZCONNECTOR_H +#define ARPTZCONNECTOR_H + +#include +#include + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" +#include "ArRobotParams.h" +#include "ariaInternal.h" + +class ArArgumentParser; +class ArPTZ; +class ArRobot; + +/** + * @brief Factory for creating and configuring interfaces for pan/tilt units or camera + * pan/tilt/zoom control based on robot parameter file and command-line arguments. + * + * First, create an ArPTZConnector object before + * calling Aria::parseArgs(). After connecting to the robot, call + * Aria::parseArgs() to check arguments and parameters from the parameter + * file(s). Then, call connect() to connect to all configured and enabled PTZs. To get + * access to a PTZ objects, use getPTZ(int i) and getNumPTZs(), or getPTZs(). + * ArPTZ provides an interface to functions that most PTZ implementations + * (ArPTZ subclasses) implement. Some PTZ implementations have additional + * features. Use those subclasse directly to use these additional features + * (use dynamic_cast to cast an ArPTZ pointer to a subclass pointer, if + * possible.) + * + * ArPTZConnector has built in support for all the PTZ types with support + * included in the ARIA library, and other libraries or programs may register + * new types as well. (For example, the ArVideo library contains support for + * additional camera PTZ types.) + * + * The following command-line arguments are checked: + * @verbinclude ArPTZConnector_options + * + * PTZs are 0-indexed internally in this class, however, argument names, + * parameter names and log messages displayed to users are 1-indexed. + + @ingroup OptionalClasses + @ingroup DeviceClasses + @since 2.7.6 +*/ + +class ArPTZConnector { +public: + /* @arg robot In some cases the robot connection is used to communicate with + * devices via auxilliary serial connections, so this robot interface is used. + * May be NULL. */ + AREXPORT ArPTZConnector(ArArgumentParser* argParser, ArRobot *robot = NULL); + AREXPORT ~ArPTZConnector(); + + /** For each PTZ specified in program arguments, and in robot parameters with + * PTZAutoConnect set to true, create the + * appropriate PTZ object (based on type name) and connect to it. + @return false on first error, true if all PTZ connections were successful. + */ + AREXPORT bool connect(); + + /** @copydoc connect() */ + bool connectPTZs() { return connect(); } + + /** @return number of PTZ objects that were created and connected to. */ + size_t getNumPTZs() const { return myConnectedPTZs.size(); } + + /** @return a specific PTZ object that was connected by connect() or + * connectPTZs(), or NULL if none exists. These are 0-indexed. */ + ArPTZ* getPTZ(size_t i = 0) const + { + if(i >= myConnectedPTZs.size()) return NULL; + return myConnectedPTZs[i]; + } + + /** @copydoc getPTZ(size_t) */ + ArPTZ* findPTZ(size_t i) const { return getPTZ(i); } + + /** @return list of connected PTZs. + 0-indexed. Pointers in the vector may be NULL if no parameters or command + line arguments were given for them or that PTZ was disabled. These should be + skipped when iterating on this list and not accessed. + */ + std::vector getPTZs() const { + return myConnectedPTZs; + } + + + + /** Arguments passed to function are PTZ index, parameters, parser (may be + * null) and robot object (may be null) */ + typedef ArRetFunctor4 PTZCreateFunc; + typedef ArGlobalRetFunctor4 GlobalPTZCreateFunc; + + /** Register a new PTZ type. Aria::init() registers PTZ types built in to + * ARIA. ArVideo::init() registers new PTZ types implemented in the ArVideo + * library. You may also add any new PTZ types you create. + */ + AREXPORT static void registerPTZType(const std::string& typeName, ArPTZConnector::PTZCreateFunc* func); + + /** Change limit on number of PTZ devices. + * You must call this + * before creating an ArPTZConnector, parsing command line arguments, connecting + * to a robot or loading a parameter file, or using ArPTZconnecor to connect to + * PTZ devices. + */ + void setMaxNumPTZs(size_t n) + { + Aria::setMaxNumPTZs(n); + } + + size_t getMaxNumPTZs() + { + return Aria::getMaxNumPTZs(); + } + + /** Return robot that PTZs are or will be attached to (may be NULL) */ + ArRobot *getRobot() { return myRobot; } + +protected: + bool parseArgs(); + bool parseArgs(ArArgumentParser *parser); + bool parseArgsFor(ArArgumentParser *parser, int which); + AREXPORT void logOptions() const; + void populateRobotParams(ArRobotParams *params); + + ArArgumentParser *myArgParser; + ArRobot *myRobot; + ArRetFunctorC myParseArgsCallback; + ArConstFunctorC myLogOptionsCallback; + static std::map< std::string, PTZCreateFunc* > ourPTZCreateFuncs; + ArFunctor1C myPopulateRobotParamsCB; + std::vector myParams; ///< copied from ArRobotParams (via myRobot), then in connect() parameters given from command line arguments (myArguments) are merged in. + std::vector myArguments; ///< from program command-line options (via the parseArgs() callback called by Aria::parseArgs()) + //std::vector myConfiguredPTZs; ///< if connecting to a PTZ, its parameters are copied here from myParams and myArguments + //static size_t ourMaxNumPTZs; + std::vector myConnectedPTZs; ///< ArPTZ objects created and initialized in connect(). +}; + + +#endif // ifdef ARPTZCONNECTOR_H + + diff --git a/Legacy/Aria/include/ArPixelDevice.h b/Legacy/Aria/include/ArPixelDevice.h new file mode 100644 index 0000000..d65792a --- /dev/null +++ b/Legacy/Aria/include/ArPixelDevice.h @@ -0,0 +1,235 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARPIXELDEVICE_H +#define ARPIXELDEVICE_H + +#include +#include "Aria.h" +/*! + @class ArPixelDevice. + @brief Holds data from a sensor that provides data arranged in a 2d array. + + Subclasses are used for specific sensor implementations, such + as the ArFocusPixelDevice for the Focus Robotics nDepth + stereocamera. + + The data are arranged in an x,y grid, with the origin being + in the upper left corner, from the perspective of the robot. + It's in a row-major format. + + The Field of View (FOV) is assumed to be centered with zero + being the center of the area, such that the permitted x angles + are between ((-x_fov/2) to (+x_fov/2)) and + ((-y_fov/2) to (+y_fov/2)). Negative angles are to the lower + left of the grid from the perspective of the robot. + + @param x_size dimension of data grid in x direction + + @param y_size dimension of data grid in y direction + + @param x_fov Field of View of sensor in X direction (angle in degrees) + + @param y_fov Field of View of sensor in Y direction (angle in degrees) + + @param name the name of this device +*/ +template +class ArPixelDevice +{ + public: + /// Base Constructor + AREXPORT ArPixelDevice(int x_size, int y_size, double x_fov, double y_fov, + const char *name) + { + myDeviceMutex.setLogName("ArPixelDevice::myDeviceMutex"); + myXSize = x_size; + myYSize = y_size; + myXFOV = x_fov; + myYFOV = y_fov; + myName = name; + + mySensorData = NULL; + + if (!allocateSensorDataMemory()) + { + ArLog::log(ArLog::Terse, "Failed to allocate memory for ArPixelDevice %s", getName()); + } + else + { + ArLog::log(ArLog::Verbose, "Allocated memory for ArPixelDevice %s", getName()); + } + + if (!allocateSensorXYZMemory()) + { + ArLog::log(ArLog::Terse, "Failed to allocate XYZ memory for ArPixelDevice %s", getName()); + } + else + { + ArLog::log(ArLog::Verbose, "Allocated XYZ memory for ArPixelDevice %s", getName()); + } + } + /// Base destructor + AREXPORT virtual ~ArPixelDevice() + { + if (mySensorData != NULL) + { + for (int i=0; i < myXSize; i++) + { + for (int j=0; j < myYSize; j++) + { + delete mySensorData[i][j]; + } + delete [] (mySensorData[i]); + } + delete [] (mySensorData); + } + if (mySensorXYZ != NULL) + { + for (int i=0; i < myXSize; i++) + { + for (int j=0; j < myYSize; j++) + { + delete [] mySensorXYZ[i][j]; + } + delete [] (mySensorXYZ[i]); + } + delete [] (mySensorXYZ); + } + + } + /// Get the value of the sensor at the (x,y) coords + DataObject *getSensorData(int x, int y) + { + if ((x >= 0) && (x < myXSize) && (y >= 0) && (y < myYSize)) + { + return mySensorData[x][y]; + } + else + { + return NULL; + } + } + /// Get the xyz array of the sensor at the (x,y) pizels. + DataObject* getSensorXYZ(int x, int y) + { + if ((x >= 0) && (x < myXSize) && (y >= 0) && (y < myYSize)) + { + return mySensorXYZ[x][y]; + } + else + { + return NULL; + } + } + /// Get the dimension of the grid in the x direction + int getXDimension(void) { return myXSize; } + /// Get the dimension of the grid in the y direction + int getYDimension(void) { return myYSize; } + /// Get the X direction Field of View, in degrees + double getXFOV(void) { return myXFOV; } + /// Get the Y direction Field of View, in degrees + double getYFOV(void) { return myYFOV; } + /// Get the name of the device + const char *getName(void) { return myName.c_str(); } + /// Gets the raw sensor data + DataObject ***getRawSensorData(void) { return mySensorData; } + /// Gets the raw XYZ data + DataObject ***getRawSensorXYZ(void) { return mySensorXYZ; } + /// Lock this device + AREXPORT virtual int lockDevice() { return(myDeviceMutex.lock()); } + /// Try to lock this device + AREXPORT virtual int tryLockDevice() { return(myDeviceMutex.tryLock()); } + /// Unlock this device + AREXPORT virtual int unlockDevice() { return(myDeviceMutex.unlock()); } +protected: + std::string myName; + int myXSize; + int myYSize; + double myXFOV; + double myYFOV; + DataObject ***mySensorData; + DataObject ***mySensorXYZ; + ArMutex myDeviceMutex; + + bool allocateSensorDataMemory() + { + if ((myXSize < 1) || (myYSize < 1)) + { + ArLog::log(ArLog::Normal, "Bad array size for ArPixelDevice %s", getName()); + return false; + } + mySensorData = new DataObject**[myXSize]; + if (mySensorData == NULL) + { + ArLog::log(ArLog::Normal, "Cannot allocate memory for ArPixelDevice %s", getName()); + return false; + } + for (int i = 0; i < myXSize; i++) + { + if ((mySensorData[i] = new DataObject*[myYSize]) == NULL) + { + ArLog::log(ArLog::Normal, "Cannot allocate memory for ArPixelDevice %s", getName()); + return false; + } + for (int j = 0; j < myYSize; j++) + { + mySensorData[i][j] = new DataObject; + } + } + return true; + } + + bool allocateSensorXYZMemory() + { + if ((myXSize < 1) || (myYSize < 1)) + { + ArLog::log(ArLog::Normal, "Bad array size for ArPixelDevice %s", getName()); + return false; + } + mySensorXYZ = new DataObject**[myXSize]; + if (mySensorXYZ == NULL) + { + ArLog::log(ArLog::Normal, "Cannot allocate memory for ArPixelDevice %s", getName()); + return false; + } + for (int i = 0; i < myXSize; i++) + { + if ((mySensorXYZ[i] = new DataObject*[myYSize]) == NULL) + { + ArLog::log(ArLog::Normal, "Cannot allocate memory for ArPixelDevice %s", getName()); + return false; + } + for (int j = 0; j < myYSize; j++) + { + mySensorXYZ[i][j] = new DataObject[3]; + } + } + return true; + } + +}; + +#endif // ARPIXELDEVICE_H diff --git a/Legacy/Aria/include/ArPriorityResolver.h b/Legacy/Aria/include/ArPriorityResolver.h new file mode 100644 index 0000000..29f8990 --- /dev/null +++ b/Legacy/Aria/include/ArPriorityResolver.h @@ -0,0 +1,50 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARPRIORITYRESOLVER_H +#define ARPRIORITYRESOLVER_H + +#include "ArResolver.h" + +/// (Default resolver), takes the action list and uses the priority to resolve +/** + This is the default resolver for ArRobot, meaning if you don't do a + non-normal init on the robot, or a setResolver, you'll have one these. +*/ +class ArPriorityResolver : public ArResolver +{ +public: + /// Constructor + AREXPORT ArPriorityResolver(); + /// Destructor + AREXPORT virtual ~ArPriorityResolver(); + AREXPORT virtual ArActionDesired *resolve(ArResolver::ActionMap *actions, + ArRobot *robot, + bool logActions = false); +protected: + ArActionDesired myActionDesired; +}; + +#endif // ARPRIORITYRESOLVER_H diff --git a/Legacy/Aria/include/ArRVisionPTZ.h b/Legacy/Aria/include/ArRVisionPTZ.h new file mode 100644 index 0000000..51c4e65 --- /dev/null +++ b/Legacy/Aria/include/ArRVisionPTZ.h @@ -0,0 +1,152 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRVISIONPTZ_H +#define ARRVISIONPTZ_H + +#include "ariaTypedefs.h" +#include "ArBasePacket.h" +#include "ArPTZ.h" +#include "ArSerialConnection.h" +/// A class for for making commands to send to the RVision camera +/** There are only two functioning ways to put things into this packet, + * uByteToBuf() and byte2ToBuf; You + * MUST use thse, if you use anything else your commands won't work. + * @since 2.7.0 +*/ +class ArRVisionPacket: public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArRVisionPacket(ArTypes::UByte2 bufferSize = 15); + AREXPORT virtual ~ArRVisionPacket(); + + AREXPORT virtual void uByteToBuf(ArTypes::UByte val); + AREXPORT virtual void byte2ToBuf(ArTypes::Byte2 val); + /// This is a new function, read the details before you try to use it + AREXPORT void byte2ToBufAtPos(ArTypes::Byte2 val, ArTypes::UByte2 pose); +}; + +//class ArRobot; + +/** Control the RVision camera pan tilt zoom unit. + In addition to creating an ArRvisionPTZ instance, you will also need + to create an ArSerialConnection object and open the serial port connection + (the RVision is normally on COM3 on Seekur and Seekur Jr. robots) and + use the setDeviceConnection() method to associate the serial connection + with the ArRVisionPTZ object. + @since 2.7.0 +*/ + +class ArRVisionPTZ : public ArPTZ +{ +public: + AREXPORT ArRVisionPTZ(ArRobot *robot); + AREXPORT virtual ~ArRVisionPTZ(); + + AREXPORT virtual bool init(void); + AREXPORT virtual const char *getTypeName() { return "rvision"; } + /// Set serial port + /// @since 2.7.6 + void setPort(const char *port) + { + mySerialPort = port; + } +protected: + AREXPORT virtual bool pan_i(double degrees); + AREXPORT virtual bool panRel_i(double degrees); + AREXPORT virtual bool tilt_i(double degrees); + AREXPORT virtual bool tiltRel_i(double degrees); + AREXPORT virtual bool panTilt_i(double degreesPan, double degreesTilt); + AREXPORT virtual bool panTiltRel_i(double degreesPan, double degreesTilt); +public: + AREXPORT virtual bool canZoom(void) const { return true; } + AREXPORT virtual bool zoom(int zoomValue); + AREXPORT virtual bool zoomRel(int zoomValue); +protected: + AREXPORT virtual double getPan_i(void) const { return myPan; } + AREXPORT virtual double getTilt_i(void) const { return myTilt; } +public: + AREXPORT virtual int getZoom(void) const { return myZoom; } + //AREXPORT void getRealPanTilt(void); + //AREXPORT void getRealZoomPos(void); + /* + AREXPORT virtual double getMaxPosPan(void) const { return MAX_PAN; } + AREXPORT virtual double getMaxNegPan(void) const { return MIN_PAN; } + AREXPORT virtual double getMaxPosTilt(void) const { return MAX_TILT; } + AREXPORT virtual double getMaxNegTilt(void) const { return MIN_TILT; } + AREXPORT virtual int getMaxZoom(void) const { return MAX_ZOOM; } + AREXPORT virtual int getMinZoom(void) const { return MIN_ZOOM; } + */ + + AREXPORT virtual bool canGetRealPanTilt(void) const { return false; } + AREXPORT virtual bool canGetRealZoom(void) const { return false; } + AREXPORT virtual bool canGetFOV(void) { return true; } + /// Gets the field of view at maximum zoom + AREXPORT virtual double getFOVAtMaxZoom(void) { return 4.4; } + /// Gets the field of view at minimum zoom + AREXPORT virtual double getFOVAtMinZoom(void) { return 48.8; } + + virtual ArBasePacket* readPacket(void); + enum { + MAX_PAN = 180, ///< maximum degrees the unit can pan (clockwise from top) + MIN_PAN = -180, ///< minimum degrees the unit can pan (counterclockwise from top) + MIN_TILT = -30, ///< minimum degrees the unit can tilt + MAX_TILT = 60, ///< maximum degrees the unit can tilt + MIN_ZOOM = 0, ///< minimum value for zoom + MAX_ZOOM = 32767, ///< maximum value for zoom + TILT_OFFSET_IN_DEGREES = 38, ///< offset value to convert internal camera coords to world + PAN_OFFSET_IN_DEGREES = 190 ///< offset value to convert internal camera coords to world + }; + + /// called automatically by Aria::init() + ///@since 2.7.6 + ///@internal +#ifndef SWIG + static void registerPTZType(); +#endif +protected: + void initializePackets(void); + double myPan; + double myTilt; + int myZoom; + double myDegToTilt; + double myDegToPan; + double myPanOffsetInDegrees; + double myTiltOffsetInDegrees; + ArRVisionPacket myPacket; + ArRVisionPacket myZoomPacket; + ArRVisionPacket myPanTiltPacket; + ArRVisionPacket myInquiryPacket; + const char *mySerialPort; + + ///@since 2.7.6 + static ArPTZ* create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot); + ///@since 2.7.6 + static ArPTZConnector::GlobalPTZCreateFunc ourCreateFunc; + +}; + +#endif // ARRVISIONPTZ_H diff --git a/Legacy/Aria/include/ArRangeBuffer.h b/Legacy/Aria/include/ArRangeBuffer.h new file mode 100644 index 0000000..2d241d4 --- /dev/null +++ b/Legacy/Aria/include/ArRangeBuffer.h @@ -0,0 +1,133 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRANGEBUFFER_H +#define ARRANGEBUFFER_H + +#include "ariaUtil.h" +#include "ariaTypedefs.h" +#include "ArTransform.h" +#include +#include + +/// This class is a buffer that holds ranging information +class ArRangeBuffer +{ +public: + /// Constructor + AREXPORT ArRangeBuffer(int size); + /// Destructor + AREXPORT virtual ~ArRangeBuffer(); + /// Gets the size of the buffer + AREXPORT size_t getSize(void) const; + /// Sets the size of the buffer + AREXPORT void setSize(size_t size); + /// Gets the pose of the robot when readings were taken + AREXPORT ArPose getPoseTaken() const; + /// Sets the pose of the robot when readings were taken + AREXPORT void setPoseTaken(ArPose p); + /// Gets the encoder pose of the robot when readings were taken + AREXPORT ArPose getEncoderPoseTaken() const; + /// Sets the pose of the robot when readings were taken + AREXPORT void setEncoderPoseTaken(ArPose p); + /// Adds a new reading to the buffer + AREXPORT void addReading(double x, double y); + /// Adds a new reading to the buffer if some conditions are met + AREXPORT void addReadingConditional(double x, double y, + double closeDistSquared, + bool *wasAdded = NULL); + /// Begins a walk through the getBuffer list of readings + AREXPORT void beginInvalidationSweep(void); + /// While doing an invalidation sweep a reading to the list to be invalidated + AREXPORT void invalidateReading(std::list::iterator readingIt); + /// Ends the invalidation sweep + AREXPORT void endInvalidationSweep(void); +#ifndef SWIG + /** @brief Gets a pointer to a list of readings + * @swigomit + */ + AREXPORT const std::list *getBuffer(void) const; +#endif + /// Gets a pointer to a list of readings + AREXPORT std::list *getBuffer(void); + + /// Gets the closest reading, on a polar system + AREXPORT double getClosestPolar(double startAngle, double endAngle, + ArPose position, unsigned int maxRange, + double *angle = NULL) const; + /// Gets the closest reading, from a rectangular box, in robot LOCAL coords + AREXPORT double getClosestBox(double x1, double y1, double x2, double y2, + ArPose position, unsigned int maxRange, + ArPose *readingPos = NULL, + ArPose targetPose = ArPose(0, 0, 0)) const; + /// Applies a transform to the buffer + AREXPORT void applyTransform(ArTransform trans); + /// Clears all the readings in the range buffer + AREXPORT void clear(void); + /// Resets the readings older than this many seconds + AREXPORT void clearOlderThan(int milliSeconds); + /// Resets the readings older than this many seconds + AREXPORT void clearOlderThanSeconds(int seconds); + /// same as clear, but old name + AREXPORT void reset(void); + /// This begins a redoing of the buffer + AREXPORT void beginRedoBuffer(void); + /// Add a reading to the redoing of the buffer + AREXPORT void redoReading(double x, double y); + /// End redoing the buffer + AREXPORT void endRedoBuffer(void); + /// Gets the buffer as an array instead of as a std::list + AREXPORT std::vector *getBufferAsVector(void); + /// Gets the closest reading, from an arbitrary buffer + AREXPORT static double getClosestPolarInList( + double startAngle, double endAngle, ArPose position, + unsigned int maxRange, double *angle, + const std::list *buffer); + /// Gets the closest reading, from an arbitrary buffer + AREXPORT static double getClosestBoxInList( + double x1, double y1, double x2, double y2, ArPose position, + unsigned int maxRange, ArPose *readingPos, + ArPose targetPose, const std::list *buffer); +protected: + std::vector myVector; + ArPose myBufferPose; // where the robot was when readings were acquired + ArPose myEncoderBufferPose; // where the robot was when readings were acquired + + std::list myBuffer; + std::list myInvalidBuffer; + std::list::iterator > myInvalidSweepList; + std::list::iterator >::iterator myInvalidIt; + std::list::iterator myRedoIt; + int myNumRedone; + bool myHitEnd; + + size_t mySize; + std::list::reverse_iterator myRevIterator; + std::list::iterator myIterator; + + ArPoseWithTime * myReading; +}; + +#endif // ARRANGEBUFFER_H diff --git a/Legacy/Aria/include/ArRangeDevice.h b/Legacy/Aria/include/ArRangeDevice.h new file mode 100644 index 0000000..d1e09ae --- /dev/null +++ b/Legacy/Aria/include/ArRangeDevice.h @@ -0,0 +1,442 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRANGEDEVICE_H +#define ARRANGEDEVICE_H + +#include "ariaTypedefs.h" +#include "ArRangeBuffer.h" +#include "ArSensorReading.h" +#include "ArDrawingData.h" +#include "ArMutex.h" +#include + +class ArRobot; + +/** + @brief The base class for all sensing devices which return range + information from the device (mounted on a robot) to an object in + the environment. + + This class maintains two ArRangeBuffer objects: a current buffer + (getCurrentBuffer()) + for storing very recent readings, and a cumulative buffer + (getCumulativeBuffer()) for a + longer history of readings. The maximum sizes of each buffer can + be set in the constructor or resized later. Range device readings + are most often represented as a point in space (X,Y) where the + sensor detected an object. (Therefore an ArPose object may only + have X and Y components set). + + Some devices provide an original set of "raw" ArSensorReading + objects (getRawReadings()) (that it used to add data to the current buffer) + which may also include extra device specific information as well. + Not all devices provide raw readings. + + Subclasses are used for specific sensor implementations like + ArSick for SICK lasers and ArSonarDevice for the Pioneer sonar + array. It can also be useful to treat "virtual" objects like + forbidden areas specified by the user in a map like range devices. + Some of these subsclasses may use a separate thread to update the + range reading buffers, and so this base class provides "lock" and + "unlock" methods which you should use when accessing device data. + + A range device may have an ArRobot object associated with it. A + range device may also be associated with an ArRobot by calling + ArRobot::addRangeDevice(). ArRobot provides functions which + operate on all such associated ArRangeDevice objects. This is a + convenient (and thread-safe) way to access all range device data + without depending on a specific set of individual range + devices. For example, you can find the closest reading in a box or + a polar section, no matter if that reading originated from the + sonar, a laser, or other device. + + @ingroup ImportantClasses +**/ + +class ArRangeDevice +{ +public: + /// Constructor + AREXPORT ArRangeDevice(size_t currentBufferSize, + size_t cumulativeBufferSize, + const char *name, unsigned int maxRange, + int maxSecondsToKeepCurrent = 0, + int maxSecondsToKeepCumulative = 0, + double maxDistToKeepCumulative = 0, + bool locationDependent = false); + /// Destructor + AREXPORT virtual ~ArRangeDevice(); + /// Gets the name of the device + AREXPORT virtual const char *getName(void) const; + /// Sets the robot this device is attached to + AREXPORT virtual void setRobot(ArRobot *robot); + /// Gets the robot this device is attached to + AREXPORT virtual ArRobot *getRobot(void); + /// Sets the maximum size of the buffer for current readings + AREXPORT virtual void setCurrentBufferSize(size_t size); + /// Gets the maximum size of the buffer for current readings + AREXPORT virtual size_t getCurrentBufferSize(void) const; + /// Sets the maximum size of the buffer for cumulative readings + AREXPORT virtual void setCumulativeBufferSize(size_t size); + /// Sets the maximum size of the buffer for cumulative readings + AREXPORT virtual size_t getCumulativeBufferSize(void) const; + /// Adds a reading to the buffer + AREXPORT virtual void addReading(double x, double y, bool *wasAdded = NULL); + /// Gets if this device is location dependent or not + bool isLocationDependent(void) { return myIsLocationDependent; } + /// Gets the closest current reading in the given polar region + AREXPORT virtual double currentReadingPolar(double startAngle, + double endAngle, + double *angle = NULL) const; + /// Gets the closest cumulative reading in the given polar region + AREXPORT virtual double cumulativeReadingPolar(double startAngle, + double endAngle, + double *angle = NULL) const; + /// Gets the closest current reading from the given box region + AREXPORT virtual double currentReadingBox(double x1, double y1, double x2, + double y2, + ArPose *readingPos = NULL) const; + /// Gets the closest current reading from the given box region + AREXPORT virtual double cumulativeReadingBox(double x1, double y1, double x2, + double y2, + ArPose *readingPos = NULL) const; +#ifndef SWIG + /** @brief Gets the current range buffer + * @swigomit See getCurrentBufferAsVector() + */ + virtual const ArRangeBuffer *getCurrentRangeBuffer(void) const + { return &myCurrentBuffer; } + /** @brief Gets the cumulative range buffer + * @swigomit See getCumulativeBufferAsVector() + */ + virtual const ArRangeBuffer *getCumulativeRangeBuffer(void) const + { return &myCumulativeBuffer; } + /** @brief Gets the current buffer of readings + * @swigomit See getCurrentBufferAsVector() + */ + virtual const std::list *getCurrentBuffer(void) const + { return myCurrentBuffer.getBuffer(); } + /** @brief Gets the current buffer of readings + * @swigomit See getCumulativeBufferAsVector() + */ + virtual const std::list *getCumulativeBuffer(void) const + { return myCumulativeBuffer.getBuffer(); } +#endif // SWIG + + /// Gets the current range buffer + virtual ArRangeBuffer *getCurrentRangeBuffer(void) + { return &myCurrentBuffer; } + /// Gets the cumulative range buffer + virtual ArRangeBuffer *getCumulativeRangeBuffer(void) + { return &myCumulativeBuffer; } + /// Gets the current buffer of readings + virtual std::list *getCurrentBuffer(void) + { return myCurrentBuffer.getBuffer(); } + /** @brief Gets the current buffer of readings as a vector + * @swignote The return type will be named + * ArPoseWithTimeVector instead of the std::vector template. + */ + virtual std::vector *getCurrentBufferAsVector(void) + { return myCurrentBuffer.getBufferAsVector(); } + /// Gets the current buffer of readings + virtual std::list *getCumulativeBuffer(void) + { return myCumulativeBuffer.getBuffer(); } + /** @brief Gets the cumulative buffer of readings as a vector + * @swignote The return type will be named ArPoseWithTimeVector + * instead of the std::vector template. + */ + virtual std::vector *getCumulativeBufferAsVector(void) + { return myCumulativeBuffer.getBufferAsVector(); } + + /// Gets the raw unfiltered readings from the device + /** The raw readings are the full set of unfiltered readings from the device. + They are the latest readings. You should not manipulate the list you get from + this function, the only manipulation of this list should be done by + the range device itself. (Its only pointers for speed.) + + @note Only ArSick provides this data currently. Sonar, bumpers, + etc. do not provide raw readings. + This method was added to this base class for future lasers or other + similar devices. + Other kinds of range devices are sufficiently different from lasers that + any "raw" information provided would usually require very different interpretation. + **/ + virtual const std::list *getRawReadings(void) const + { return myRawReadings; } + + /// Gets the raw unfiltered readings from the device into a vector + AREXPORT virtual std::vector *getRawReadingsAsVector(void); + + /// Gets the raw unfiltered readings from the device (but pose takens are corrected) + /** The raw readings are the full set of unfiltered readings from + the device. They are the latest readings. You should not + manipulate the list you get from this function, the only + manipulation of this list should be done by the range device + itself. (Its only pointers for speed.) + + This is like the raw readings but they were corrected for the + robot odometry offset (just the pose taken, and encoder psoe + taken). + + @note Only ArSick provides this data currently. Sonar, bumpers, + etc. do not provide raw readings. + This method was added to this base class for future lasers or other + similar devices. + Other kinds of range devices are sufficiently different from lasers that + any "raw" information provided would usually require very different interpretation. + **/ + virtual const std::list *getAdjustedRawReadings(void) const + { return myAdjustedRawReadings; } + + /// Gets the raw adjusted readings from the device into a vector + AREXPORT virtual std::vector *getAdjustedRawReadingsAsVector(void); + + + /// Sets the maximum seconds to keep current readings around + /** + @param maxSecondsToKeepCurrent this is the number of seconds to + keep current readings around, if less than 0 then they are not + automatically removed because of this + **/ + void setMaxSecondsToKeepCurrent(int maxSecondsToKeepCurrent) + { myMaxSecondsToKeepCurrent = maxSecondsToKeepCurrent; } + + /// gets the maximum seconds to keep current readings around + /** + @return this is the number of seconds current readings are kept + around for, if less than 0 then they are not automatically removed + because of this + **/ + int getMaxSecondsToKeepCurrent(void) { return myMaxSecondsToKeepCurrent; } + + /// Sets the minimum distance between current readings + /** + @param minDistBetweenCurrent The minimum distance between current + readings, this is applied in the addReading call so range devices + need to call that for this to take effect. + **/ + void setMinDistBetweenCurrent(double minDistBetweenCurrent) + { + myMinDistBetweenCurrent = minDistBetweenCurrent; + myMinDistBetweenCurrentSquared = (minDistBetweenCurrent * + minDistBetweenCurrent); + } + + /// Gets the minimum distance between current readings + /** + @return The minimum distance between current readings, this is + applied in the addReading call so range devices need to call that + for this to take effect. + **/ + double getMinDistBetweenCurrent(void) + { + return myMinDistBetweenCurrent; + } + + + /// gets the maximum seconds to keep cumulative readings around + /** + @param maxSecondsToKeepCumulative this is the number of seconds to keep + cumulative readings around, if less than 0 then they are not automatically + removed because of this + **/ + void setMaxSecondsToKeepCumulative(int maxSecondsToKeepCumulative) + { myMaxSecondsToKeepCumulative = maxSecondsToKeepCumulative; } + /// gets the maximum seconds to keep current readings around + /** + @return this is the number of seconds cumulative readings are kept + around for, if less than 0 then they are not automatically removed + because of this + **/ + int getMaxSecondsToKeepCumulative(void) + { return myMaxSecondsToKeepCumulative; } + + /// sets the maximum distance cumulative readings can be from current pose + /** + @param maxDistToKeepCumulative if cumulative readings are further than + this from where the current pose they are removed, if this is less + than 0 they are not removed because of this + **/ + void setMaxDistToKeepCumulative(double maxDistToKeepCumulative) + { + myMaxDistToKeepCumulative = maxDistToKeepCumulative; + myMaxDistToKeepCumulativeSquared = (maxDistToKeepCumulative * + maxDistToKeepCumulative); + } + + /// sets the maximum distance cumulative readings can be from current pose + /** + @return if cumulative readings are further than this from where the + current pose they are removed, if this is less than 0 they are not + removed because of this + **/ + double getMaxDistToKeepCumulative(void) { return myMaxDistToKeepCumulative; } + + /// Sets the minimum distance between cumulative readings + /** + @param minDistBetweenCumulative The minimum distance between cumulative + readings, this is applied in the addReading call so range devices + need to call that for this to take effect. + **/ + void setMinDistBetweenCumulative(double minDistBetweenCumulative) + { + myMinDistBetweenCumulative = minDistBetweenCumulative; + myMinDistBetweenCumulativeSquared = (minDistBetweenCumulative * + minDistBetweenCumulative); + } + + /// Gets the minimum distance between cumulative readings + /** + @return The minimum distance between cumulative readings, this is + applied in the addReading call so range devices need to call that + for this to take effect. + **/ + double getMinDistBetweenCumulative(void) + { + return myMinDistBetweenCumulative; + } + + /// Sets the maximum distance a cumulative reading can be from the robot and still be inserted + /** + @param maxInsertDistCumulative The maximum distance a cumulative + reading can have from the robot's current position and still be + inserted into the cumulative readings, this is applied in the + addReading call so range devices need to call that for this to + take effect. + **/ + void setMaxInsertDistCumulative(double maxInsertDistCumulative) + { + myMaxInsertDistCumulative = maxInsertDistCumulative; + myMaxInsertDistCumulativeSquared = (maxInsertDistCumulative * + maxInsertDistCumulative); + } + + /// Gets the maximum distance a cumulative reading can be from the robot and still be inserted + /** + @return The maximum distance a cumulative reading can have from + the robot's current position and still be inserted into the + cumulative readings, this is applied in the addReading call so + range devices need to call that for this to take effect. + **/ + double getMaxInsertDistCumulative(void) + { + return myMaxInsertDistCumulative; + } + + /// Clears all the current readings + virtual void clearCurrentReadings(void) { myCurrentBuffer.clear(); } + /// Clears all the cumulative readings + virtual void clearCumulativeReadings(void) { myCumulativeBuffer.clear(); } + /// Clears all the cumulative readings older than this number of milliseconds + virtual void clearCumulativeOlderThan(int milliSeconds) + { myCumulativeBuffer.clearOlderThan(milliSeconds); } + + /// Clears all the cumulative readings older than this number of seconds + virtual void clearCumulativeOlderThanSeconds(int seconds) + { myCumulativeBuffer.clearOlderThanSeconds(seconds); } + + /// Gets the maximum range for this device + virtual unsigned int getMaxRange(void) const { return myMaxRange; } + /// Sets the maximum range for this device + virtual void setMaxRange(unsigned int maxRange) + { myMaxRange = maxRange; } + + + /// Applies a transform to the buffers + AREXPORT virtual void applyTransform(ArTransform trans, + bool doCumulative = true); + + /// Gets data used for visualizing the current buffer (see ArNetworking) + virtual ArDrawingData *getCurrentDrawingData(void) + { return myCurrentDrawingData; } + /// Gets data used for visualizing the cumulative buffer (see ArNetworking) + virtual ArDrawingData *getCumulativeDrawingData(void) + { return myCumulativeDrawingData; } + /// Sets data for visualizing the current buffer (and if we own it) + AREXPORT virtual void setCurrentDrawingData(ArDrawingData *data, + bool takeOwnershipOfData); + /// Sets data for visualizing the cumulative buffer (and if we own it) + AREXPORT virtual void setCumulativeDrawingData(ArDrawingData *data, + bool takeOwnershipOfData); + + + + /// Lock this device + AREXPORT virtual int lockDevice() { return(myDeviceMutex.lock());} + /// Try to lock this device + AREXPORT virtual int tryLockDevice() {return(myDeviceMutex.tryLock());} + /// Unlock this device + AREXPORT virtual int unlockDevice() {return(myDeviceMutex.unlock());} + + /// Internal function to filter the readings based on age and distance + /// @internal + AREXPORT void filterCallback(void); + +protected: + /** + This call should be called by the range device every robot cycle + before the range device makes new readings (and even if it isn't + adding any that cycle)... it will adjust the raw readings by the + robot odometry offset. The robot should be locked when this + happens (which should be the case if you're doing it in the robot + callback). The code currently assumes that all readings were taken + at the same point, so if that isn't true with your device then you + can't use this mechanism. + **/ + AREXPORT void adjustRawReadings(bool interlaced); + std::vector myRawReadingsVector; + std::vector myAdjustedRawReadingsVector; + std::string myName; + ArRobot *myRobot; + unsigned int myMaxRange; + ArRangeBuffer myCurrentBuffer; + ArRangeBuffer myCumulativeBuffer; + + int myMaxSecondsToKeepCurrent; + double myMinDistBetweenCurrent; + double myMinDistBetweenCurrentSquared; + + int myMaxSecondsToKeepCumulative; + double myMaxDistToKeepCumulative; + double myMaxDistToKeepCumulativeSquared; + double myMinDistBetweenCumulative; + double myMinDistBetweenCumulativeSquared; + double myMaxInsertDistCumulative; + double myMaxInsertDistCumulativeSquared; + ArPose myMaxInsertDistCumulativePose; + + ArFunctorC myFilterCB; + std::list *myRawReadings; + std::list *myAdjustedRawReadings; + ArDrawingData *myCurrentDrawingData; + bool myOwnCurrentDrawingData; + ArDrawingData *myCumulativeDrawingData; + bool myOwnCumulativeDrawingData; + ArMutex myDeviceMutex; + bool myIsLocationDependent; +}; + +#endif // ARRANGEDEVICE_H diff --git a/Legacy/Aria/include/ArRangeDeviceThreaded.h b/Legacy/Aria/include/ArRangeDeviceThreaded.h new file mode 100644 index 0000000..481f725 --- /dev/null +++ b/Legacy/Aria/include/ArRangeDeviceThreaded.h @@ -0,0 +1,76 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRANGEDEVICETHREADED_H +#define ARRANGEDEVICETHREADED_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctorASyncTask.h" + +/// A range device which can run in its own thread +/** + This is a range device thats threaded, it doesn't do + multipleInheritance from both ArASyncTask and ArRangeDevice any + more since JAVA doesn't support this and the wrapper software + can't deal with it. Its still functionally the same however. + **/ +class ArRangeDeviceThreaded : public ArRangeDevice +{ +public: + /// Constructor + AREXPORT ArRangeDeviceThreaded(size_t currentBufferSize, + size_t cumulativeBufferSize, + const char *name, unsigned int maxRange, + int maxSecondsTokeepCurrent = 0, + int maxSecondsToKeepCumulative = 0, + double maxDistToKeepCumulative = 0, + bool locationDependent = false); + /// Destructor + AREXPORT virtual ~ArRangeDeviceThreaded(); + /// The functor you need to implement that will be the one executed by the thread + AREXPORT virtual void * runThread(void *arg) = 0; + /// Run in this thread + AREXPORT virtual void run(void) { myTask.run(); } + /// Run in its own thread + AREXPORT virtual void runAsync(void) { myTask.runAsync(); } + /// Stop the thread + AREXPORT virtual void stopRunning(void) { myTask.stopRunning(); } + /// Get the running status of the thread + AREXPORT virtual bool getRunning(void) { return myTask.getRunning();} + /// Get the running status of the thread, locking around the variable + AREXPORT virtual bool getRunningWithLock(void) + { return myTask.getRunningWithLock(); } + + AREXPORT virtual int lockDevice(void) { return myTask.lock(); } + AREXPORT virtual int tryLockDevice(void) { return myTask.tryLock(); } + AREXPORT virtual int unlockDevice(void) { return myTask.unlock(); } +protected: + ArRetFunctor1C myRunThreadCB; + ArFunctorASyncTask myTask; + +}; + +#endif // ARRANGEDEVICETHREADED_H diff --git a/Legacy/Aria/include/ArRatioInputJoydrive.h b/Legacy/Aria/include/ArRatioInputJoydrive.h new file mode 100644 index 0000000..2c59661 --- /dev/null +++ b/Legacy/Aria/include/ArRatioInputJoydrive.h @@ -0,0 +1,114 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRATIOINPUTJOYDRIVE_H +#define ARRATIOINPUTJOYDRIVE_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArActionRatioInput.h" +#include "ArJoyHandler.h" + +class ArRobot; + +/// Use computer joystick to control an ArActionRatioInput and drive the robot. + +/** + This class obtains data from + a joystick attached to the computer + and provides it to an ArActionRatioInput which drives the robot. + (See ArRatioInputRobotJoydrive for a similar class that uses the robot's built in + joystick interface.) + A callback is attached to the ArActionRatioInput object which reads joystick + information and sets requested drive rations on the ArActionRatioInput + + If the joystick button is pressed, then input values are set in the + ArActionRatioDrive action object to request motion. + If the button is not pressed, then either the robot will be stopped via the + action (if @a stopIfNoButtonPressed is true), or no action will be requested + and lower priority actions can take over (if @a stopIfNoButtonPressed is + false) + + You may need to calibrate the joystick for + it to work right, for details about this see ArJoyHandler. + + This class creates its own ArJoyHandler object to get input from the + joystick, or uses the global ArJoyHandler object in the global Aria class if present. Then it will scale the speed between 0 and the given max + for velocity and turning, up and down on the joystick go + forwards/backwards while right and left go right and left. + + NOTE: The joystick does not save calibration information, so you + may need to calibrate the joystick before each time you use it. To do + this, press the button for at least a half a second while the + joystick is in the middle. Then let go of the button and hold the + joystick in the upper left for at least a half second and then in + the lower right corner for at least a half second. See also ArJoyHandler. + + @sa ArRatioInputRobotJoydrive + @sa ArActionRatioInput + @sa ArJoyHandler + + @ingroup OptionalClasses +**/ +class ArRatioInputJoydrive +{ +public: + /// Constructor + AREXPORT ArRatioInputJoydrive(ArRobot *robot, ArActionRatioInput *input, + int priority = 50, + bool stopIfNoButtonPressed = false, + bool useOSCalForJoystick = true); + /// Destructor + AREXPORT virtual ~ArRatioInputJoydrive(); + /// Whether the joystick is initalized or not + AREXPORT bool joystickInited(void); + /// Set if we'll stop if no button is pressed, otherwise just do nothing + AREXPORT void setStopIfNoButtonPressed(bool stopIfNoButtonPressed); + /// Get if we'll stop if no button is pressed, otherwise just do nothing + AREXPORT bool getStopIfNoButtonPressed(void); + /// Sets whether to use OSCalibration the joystick or not + AREXPORT void setUseOSCal(bool useOSCal); + /// Gets whether OSCalibration is being used for the joystick or not + AREXPORT bool getUseOSCal(void); + /// Gets the joyHandler + AREXPORT ArJoyHandler *getJoyHandler(void) { return myJoyHandler; } +protected: + void fireCallback(void); + ArRobot *myRobot; + ArActionRatioInput *myInput; + // if we're printing extra information for tracing and such + bool myPrinting; + // joystick handler + ArJoyHandler *myJoyHandler; + bool myFiredLast; + // if we want to stop when no button is presesd + bool myStopIfNoButtonPressed; + // if we're using os cal for the joystick + bool myUseOSCal; + bool myPreviousUseOSCal; + ArFunctorC myFireCB; +}; + +#endif //ARRATIOINPUTJOYDRIVE_H diff --git a/Legacy/Aria/include/ArRatioInputKeydrive.h b/Legacy/Aria/include/ArRatioInputKeydrive.h new file mode 100644 index 0000000..558424a --- /dev/null +++ b/Legacy/Aria/include/ArRatioInputKeydrive.h @@ -0,0 +1,99 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRATIOINPUTKEYDRIVE_H +#define ARRATIOINPUTKEYDRIVE_H + +#include "ariaTypedefs.h" +#include "ArAction.h" +#include "ArFunctor.h" +#include "ArActionRatioInput.h" + + +/// This will use the keyboard arrow keys and the ArActionRatioInput to drive the robot +/** + You have to make an ArActionRatioInput and add it to the robot like + a normal action for this to work. + + @ingroup OptionalClasses +**/ +class ArRatioInputKeydrive +{ +public: + /// Constructor + AREXPORT ArRatioInputKeydrive(ArRobot *robot, ArActionRatioInput *input, + int priority = 25, double velIncrement = 5); + /// Destructor + AREXPORT virtual ~ArRatioInputKeydrive(); + /// Takes the keys this action wants to use to drive + AREXPORT void takeKeys(void); + /// Gives up the keys this action wants to use to drive + AREXPORT void giveUpKeys(void); + /// Internal, callback for up arrow + AREXPORT void up(void); + /// Internal, callback for down arrow + AREXPORT void down(void); + /// Internal, callback for z + AREXPORT void z(void); + /// Internal, callback for x + AREXPORT void x(void); + /// Internal, callback for left arrow + AREXPORT void left(void); + /// Internal, callback for right arrow + AREXPORT void right(void); + /// Internal, callback for space key + AREXPORT void space(void); + /// Internal, gets our firecb + AREXPORT ArFunctor *getFireCB(void) { return &myFireCB; } +protected: + AREXPORT void activate(void); + AREXPORT void deactivate(void); + AREXPORT void fireCallback(void); + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + ArFunctorC myZCB; + ArFunctorC myXCB; + ArFunctorC mySpaceCB; + + double myPrinting; + double myTransRatio; + double myRotRatio; + double myThrottle; + double myLatRatio; + + ArRobot *myRobot; + bool myHaveKeys; + double myVelIncrement; + double myLatVelIncrement; + ArActionRatioInput *myInput; + ArFunctorC myFireCB; + ArFunctorC myActivateCB; + ArFunctorC myDeactivateCB; +}; + + +#endif // ARRATIOINPUTKEYDRIVE_H diff --git a/Legacy/Aria/include/ArRatioInputRobotJoydrive.h b/Legacy/Aria/include/ArRatioInputRobotJoydrive.h new file mode 100644 index 0000000..d2cdbbd --- /dev/null +++ b/Legacy/Aria/include/ArRatioInputRobotJoydrive.h @@ -0,0 +1,76 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRATIOINPUTROBOTJOYDRIVE_H +#define ARRATIOINPUTROBOTJOYDRIVE_H + +#include "ariaTypedefs.h" +#include "ArActionRatioInput.h" + +class ArRobotPacket; +class ArRobot; +class ArRobotJoyHandler; + +/// Use robot's joystick to control an ArActionRatioInput action and drive the robot. +/** + This class connects the joystick data obtained from the robot's built + in joystick port (if it has one, not all robots have a joystick port) + to an ArActionRatioInput which drives the robot. (See ArRatioInputJoydrive + for a similar class that uses a joystick plugged in to the computer.) + + A callback is attached to the ArActionRatioInput object which reads joystick + information using an ArRobotJoyHandler object, and sets requested drive rations on the ArActionRatioInput + object. + + + @sa ArRatioInputJoydrive + @sa ArActionRatioInput + + + @ingroup OptionalClasses +**/ +class ArRatioInputRobotJoydrive +{ +public: + /// Constructor + AREXPORT ArRatioInputRobotJoydrive(ArRobot *robot, + ArActionRatioInput *input, + int priority = 75, + bool requireDeadmanPushed = true); + /// Destructor + AREXPORT virtual ~ArRatioInputRobotJoydrive(); +protected: + AREXPORT void fireCallback(void); + + ArRobot *myRobot; + ArActionRatioInput *myInput; + bool myRequireDeadmanPushed; + bool myDeadZoneLast; + + ArRobotJoyHandler *myRobotJoyHandler; + ArFunctorC myFireCB; +}; + +#endif //ARRATIOINPUTROBOTJOYDRIVE_H diff --git a/Legacy/Aria/include/ArRecurrentTask.h b/Legacy/Aria/include/ArRecurrentTask.h new file mode 100644 index 0000000..43760ea --- /dev/null +++ b/Legacy/Aria/include/ArRecurrentTask.h @@ -0,0 +1,87 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +// ArRecurrentTask.h -- Recurrent async task interface class +#ifndef ARRECURASYNCTASK_H +#define ARRECURASYNCTASK_H + + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ArThread.h" +#include "ArASyncTask.h" + +/// Recurrent task (runs in its own thread) +/** + The ArRecurrentTask is a task that runs in its own thread. Recurrent + tasks are asynchronous tasks that complete in a finite amount of time, + and need to be reinvoked recurrently. A typical example is Saphira's + localization task: it runs for a few hundred milliseconds, localizes the + robot, and returns. Then the cycle starts over. + The user simply needs to derive their own class + from ArRecurrentTask and define the task() function. This is the user + code that will be called to execute the task body. + Then, create an object of the class, and call the go() function to + start the task. The status of the task can be checked with the + done() function, which returns 0 if running, 1 if completed, and 2 if + killed. + go() can be called whenever the task is done to restart it. To stop the + task in midstream, call reset(). + kill() kills off the thread, shouldn't be used unless exiting the + async task permanently +*/ +class ArRecurrentTask : public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArRecurrentTask(); + /// Descructor + AREXPORT ~ArRecurrentTask(); + /// The main run loop + /** + Override this function and put your task here. + */ + virtual void task() = 0; + /// Starts up on cycle of the recurrent task + AREXPORT void go(); + /// Check if the task is running or not + /** + 0 = running, 1 = finished normally, 2 = canceled + */ + AREXPORT int done(); + /// Cancel the task and reset for the next cycle + AREXPORT void reset(); // stops the current thread and restarts it + AREXPORT void kill(); // kills the current thread + + AREXPORT void *runThread(void *ptr); // main task loop + +private: + bool running; // true if currently running + bool go_req; // run request + bool killed; // did we get killed by request? +}; + + +#endif // ARRECURASYNCTASK_H diff --git a/Legacy/Aria/include/ArResolver.h b/Legacy/Aria/include/ArResolver.h new file mode 100644 index 0000000..fd8c6c0 --- /dev/null +++ b/Legacy/Aria/include/ArResolver.h @@ -0,0 +1,65 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARRESOLVER_H +#define ARRESOLVER_H + +#include "ariaTypedefs.h" +#include "ArActionDesired.h" +#include + +class ArAction; +class ArRobot; + +/// Resolves a list of actions and returns what to do +/** + ArResolver::resolve() is the function that ArRobot + calls with the action list in order + to produce a combined ArActionDesired object from them, according to + the subclass's particular algorithm or policy. +*/ +class ArResolver +{ +public: + /// Constructor + typedef std::multimap ActionMap; + ArResolver(const char *name, const char * description = "") + { myName = name; myDescription = description; } + /// Desturctor + virtual ~ArResolver() {}; + /// Figure out a single ArActionDesired from a list of ArAction s + virtual ArActionDesired *resolve(ActionMap *actions, ArRobot *robot, + bool logActions = false) = 0; + /// Gets the name of the resolver + virtual const char *getName(void) const { return myName.c_str(); } + /// Gets the long description fo the resolver + virtual const char *getDescription(void) const { return myDescription.c_str(); } + +protected: + std::string myName; + std::string myDescription; +}; + +#endif diff --git a/Legacy/Aria/include/ArRingQueue.h b/Legacy/Aria/include/ArRingQueue.h new file mode 100644 index 0000000..144bf56 --- /dev/null +++ b/Legacy/Aria/include/ArRingQueue.h @@ -0,0 +1,229 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#ifndef _AR_RING_QUEUE_H_ +#define _AR_RING_QUEUE_H_ + +#include +#include +#include + +/** @brief An expanding ring queue. + * + * It is used to keep a queue with a minimum of allocation and freeing of + * heap memory. + * The ring queue is implemented using std::list. The queue starts with an + * initial capacity, but those initial items are considered 'unused'. Items + * are "pushed" into the queue at the "back", and "popped" from the queue at + * the "front". pop() and advance_front() will move the front of the queue to + * the next item, creating a new 'unused slot' for future use; advance_back() + * changes the next item in the back to a 'used' slot. push() either uses the + * next 'unused' slot, or inserts a new item into the std::list. + * When the capacity of the queue is filled, all operations will fail + * except push(). Use push() to insert new items in the queue and increase + * its capacity. + * + * @todo Ideally, this class would be fully threadsafe (with occasional or no mutex + * locking), but it is not currently. + * @todo Optionally allocate several future 'slots' instead of just one. + * + * @ingroup UtilityClasses + */ +template +class ArRingQueue { +public: + /** @param capacity Initial capacity of the ring queue. + * @param init_value Initial value for new, unused items in the queue. + * */ + ArRingQueue(int capacity, T init_value) + : ring(capacity, init_value), curSize(0), initval(init_value) + { + back_it = ring.begin(); + front_it = ring.end();// signals empty state + } + + + /** Get an iterator for the front item of the ring queue (the item that would + * be returned by pop()). If the queue is currently empty, nil() will be + * returned. + * + * To remove an item from the queue without + * making a copy with pop(), first check if the queue is empty(). Then use this + * function to get the data. Then call advance_front(). + */ + typename std::list::iterator front() { + if(empty()) + return nil(); + return front_it; + } + + /** Get an iterator for the back of the queue (the item that would be + * replaced by push()). This is not the last item in the queue, rather it is the + * next, unused, "slot". If the queue is full, an iterator equivalent to that + * returned by nil() is returned. + * + * To add an item to the queue without pushing + * a copy with push(), first check if the queue is full (in which case you + * must push() your item). Then use this function to write the data into the + * next unused 'slot'. Then call advance_back() to advance the back of the queue + * to your new item. + */ + typename std::list::iterator back() { + if(front_it == back_it) + { + //std::cerr << "ArRingQueue: back(): 0-capacity or full, returning nil.\n"; + return nil(); + } + return back_it; + } + + /** Advance (pop) the front of the queue. 'Used' size will be decremented. */ + void advance_front() { + if(front_it == ring.end()) // initial or empty state. + front_it = ring.begin(); + else if(++front_it == ring.end()) + front_it = ring.begin(); + if(front_it == back_it) { // it's now empty (not full) + front_it = ring.end(); + back_it = ring.begin(); + } + curSize--; + } + + /** Same as advance_front() */ + void pop_front() { advance_front(); }; + + /** Advance the back (an 'empty' push), if the queue is not full. 'Used' size will be incremented. */ + void advance_back() { + if(front_it == back_it) // full or 0-capacity + { + // debugging: + /* + if(empty()) { + std::cerr << "ArRingQueue: advance_back(): queue is *empty*, can't advance back.\n"; + return; + } + std::cerr << "ArRingQueue: advance_back(): queue is full, can't advance back.\n"; + */ + return; + } + if(++back_it == ring.end()) + back_it = ring.begin(); + if(front_it == ring.end()) + front_it = ring.begin(); // no longer empty. + curSize++; + } + + /** Add an item to the back of the ring queue. If the queue is full, the + * capacity of the queue will be expanded and the item + * will be inserted. */ + void push(const T& item) { + if(full()) { + // expand + back_it = ring.insert(back_it, item); + } else { + // back is unused, use it + *back_it = item; + } + advance_back(); + } + + /** Same as push() */ + void push_back(const T& item) { push(item); } + + /** Push a new item, but preserve capacity: instead of expanding the queue if + * full, then the oldest item is replaced and the front is advanced. + */ + void push_without_expanding(const T& item) { + if(full()) + advance_front(); + push(item); + } + + /** Print the current contents of the queue. + * @pynote use printQueue() instead of print() (which is a reserved word in Python) + */ + void print() { + for(typename std::list::const_iterator i = ring.begin(); i != ring.end(); i++) { + if(i == back_it) + std::cerr << "]"; + if(i == front_it || (i == ring.begin() && front_it == ring.end()) ) + std::cerr << "["; + std::cerr << (*i) << "," ; + } + std::cerr << std::endl; + } + + /** Get the number of items currently 'used' in the queue. */ + size_t size() { + return curSize; + } + + /** Get the current capacity of the queue. */ + size_t capacity() { + return ring.size(); + } + + /** Return true if the queue is empty (has no 'used' items), false otherwise. */ + bool empty() { + return (front_it == ring.end()); + } + + /** Logically clear the queue, resetting to initial empty state, but preserving current + * capacity, and leaving all contents as they are; the contents are not + * destroyed, but will be when replaced by new data later. */ + void reset() { + front_it = ring.end(); + back_it = ring.begin(); + curSize = 0; + } + + /** Return true if the queue is full, false otherwise. */ + bool full() { + return (back_it == front_it); + } + + /** Return an iterator representing an invalid item. Compare to the return + * values of front(), back(), pop(), etc. */ + typename std::list::iterator nil() { + return ring.end(); + } + +protected: + std::list ring; + typename std::list::iterator front_it, back_it; + // push to back, pop from front; front will point to first item, + // back to one past last. + + size_t curSize; + T initval; + +}; + + + +#endif diff --git a/Legacy/Aria/include/ArRobot.h b/Legacy/Aria/include/ArRobot.h new file mode 100644 index 0000000..d6fff19 --- /dev/null +++ b/Legacy/Aria/include/ArRobot.h @@ -0,0 +1,1848 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOT_H +#define ARROBOT_H + +#include "ariaTypedefs.h" +#include "ArRobotPacketSender.h" +#include "ArRobotPacketReceiver.h" +#include "ArFunctor.h" +#include "ArFunctor.h" +#include "ArSyncTask.h" +#include "ArSensorReading.h" +#include "ArMutex.h" +#include "ArCondition.h" +#include "ArSyncLoop.h" +#include "ArRobotPacketReaderThread.h" +#include "ArRobotParams.h" +#include "ArActionDesired.h" +#include "ArResolver.h" +#include "ArTransform.h" +#include "ArInterpolation.h" +#include "ArKeyHandler.h" +#include + +class ArAction; +class ArRobotConfigPacketReader; +class ArRobotBatteryPacketReader; +class ArDeviceConnection; +class ArRangeDevice; +class ArRobotPacket; +class ArPTZ; +class ArLaser; +class ArBatteryMTX; +class ArSonarMTX; +class ArLCDMTX; + +/// Central class for communicating with and operating the robot +/** + This is the most important class. It is used to communicate with + the robot by sending commands and retrieving data (including + wheel odometry, digital and analog inputs, sonar data, and more). + It is also used + to provide access to objects for controlling attached accessories, + ArRangeDevice objects, ArAction objects, and others. For details + on usage, and how the task cycle and obot state synchronization works, + see the @ref robot "ArRobot section" and the + @ref ClientCommands "Commands and Actions section" of the ARIA overview. + + @note In Windows you cannot make an ArRobot object a global variable, + it will crash because the compiler initializes the constructors in + the wrong order. You can, however, make a pointer to an ArRobot and then + allocate it with 'new' at program start. + + @see ArRobotConnector + + @ingroup ImportantClasses + @ingroup DeviceClasses +**/ +class ArRobot +{ +public: + + typedef enum { + WAIT_CONNECTED, ///< The robot has connected + WAIT_FAILED_CONN, ///< The robot failed to connect + WAIT_RUN_EXIT, ///< The run loop has exited + WAIT_TIMEDOUT, ///< The wait reached the timeout specified + WAIT_INTR, ///< The wait was interupted by a signal + WAIT_FAIL ///< The wait failed due to an error + } WaitState; + + enum ChargeState { + CHARGING_UNKNOWN = -1, + CHARGING_NOT = 0, + CHARGING_BULK = 1, + CHARGING_OVERCHARGE = 2, + CHARGING_FLOAT = 3, + CHARGING_BALANCE = 4 + }; + /// Constructor + AREXPORT ArRobot(const char * name = NULL, bool ignored = true, + bool doSigHandle=true, + bool normalInit = true, bool addAriaExitCallback = true); + + /// Destructor + AREXPORT ~ArRobot(); + + /// Starts the instance to do processing in this thread + AREXPORT void run(bool stopRunIfNotConnected, + bool runNonThreaded = false); + /// Starts the instance to do processing in its own new thread + AREXPORT void runAsync(bool stopRunIfNotConnected, + bool runNonThreadedPacketReader = false); + + /// Returns whether the robot is currently running or not + AREXPORT bool isRunning(void) const; + + /// Stops the robot from doing any more processing + AREXPORT void stopRunning(bool doDisconnect=true); + + /// Sets the connection this instance uses + AREXPORT void setDeviceConnection(ArDeviceConnection *connection); + /// Gets the connection this instance uses + AREXPORT ArDeviceConnection *getDeviceConnection(void) const; + + /// Questions whether the robot is connected or not + /** + @return true if connected to a robot, false if not + */ + AREXPORT bool isConnected(void) const { return myIsConnected; } + /// Connects to a robot, not returning until connection made or failed + AREXPORT bool blockingConnect(void); + /// Connects to a robot, from the robots own thread + AREXPORT bool asyncConnect(void); + /// Disconnects from a robot + AREXPORT bool disconnect(void); + + /// Clears what direct motion commands have been given, so actions work + AREXPORT void clearDirectMotion(void); + /// Returns true if direct motion commands are blocking actions + AREXPORT bool isDirectMotion(void) const; + + /// Sets the state reflection to be inactive (until motion or clearDirectMotion) + /// @see clearDirectMotion + AREXPORT void stopStateReflection(void); + + + /// Enables the motors on the robot + AREXPORT void enableMotors(); + /// Disables the motors on the robot + AREXPORT void disableMotors(); + + /// Enables the sonar on the robot + AREXPORT void enableSonar(); + /// Enables some of the sonar on the robot (the ones for autonomous driving) + AREXPORT void enableAutonomousDrivingSonar(); + /// Disables the sonar on the robot + AREXPORT void disableSonar(); + + /// Stops the robot + /// @see clearDirectMotion + AREXPORT void stop(void); + /// Sets the velocity + /// @see clearDirectMotion + AREXPORT void setVel(double velocity); + /// Sets the velocity of the wheels independently + AREXPORT void setVel2(double leftVelocity, double rightVelocity); + /// Move the given distance forward/backwards + AREXPORT void move(double distance); + /// Sees if the robot is done moving the previously given move + AREXPORT bool isMoveDone(double delta = 0.0); + /// Sets the difference required for being done with a move + AREXPORT void setMoveDoneDist(double dist) { myMoveDoneDist = dist; } + /// Gets the difference required for being done with a move + AREXPORT double getMoveDoneDist(void) { return myMoveDoneDist; } + /// Sets the heading + AREXPORT void setHeading(double heading); + /// Sets the rotational velocity + AREXPORT void setRotVel(double velocity); + /// Sets the delta heading + AREXPORT void setDeltaHeading(double deltaHeading); + /// Sees if the robot is done changing to the previously given setHeading + AREXPORT bool isHeadingDone(double delta = 0.0) const; + /// sets the difference required for being done with a heading change (e.g. used in isHeadingDone()) + AREXPORT void setHeadingDoneDiff(double degrees) + { myHeadingDoneDiff = degrees; } + /// Gets the difference required for being done with a heading change (e.g. used in isHeadingDone()) + AREXPORT double getHeadingDoneDiff(void) const { return myHeadingDoneDiff; } + /// Sets the lateral velocity + /// @see clearDirectMotion + AREXPORT void setLatVel(double latVelocity); + + /// Sets the length of time a direct motion command will take precedence + /// over actions, in milliseconds + AREXPORT void setDirectMotionPrecedenceTime(int mSec); + + /// Gets the length of time a direct motion command will take precedence + /// over actions, in milliseconds + AREXPORT unsigned int getDirectMotionPrecedenceTime(void) const; + + /// Sends a command to the robot with no arguments + AREXPORT bool com(unsigned char command); + /// Sends a command to the robot with an int for argument + AREXPORT bool comInt(unsigned char command, short int argument); + /// Sends a command to the robot with two bytes for argument + AREXPORT bool com2Bytes(unsigned char command, char high, char low); + /// Sends a command to the robot with a length-prefixed string for argument + AREXPORT bool comStr(unsigned char command, const char *argument); + /// Sends a command to the robot with a length-prefixed string for argument + AREXPORT bool comStrN(unsigned char command, const char *str, int size); + /// Sends a command containing exactly the data in the given buffer as argument + AREXPORT bool comDataN(unsigned char command, const char *data, int size); + + /// Returns the robot's name that is set in its onboard firmware configuration + const char * getRobotName(void) const { return myRobotName.c_str();} + /// Returns the type of the robot we are currently connected to + const char * getRobotType(void) const { return myRobotType.c_str();} + /// Returns the subtype of the robot we are currently connected to + const char * getRobotSubType(void) const + { return myRobotSubType.c_str(); } + + /// Gets the robot's absolute maximum translational velocity + double getAbsoluteMaxTransVel(void) const + { return myAbsoluteMaxTransVel; } + /// Sets the robot's absolute maximum translational velocity + AREXPORT bool setAbsoluteMaxTransVel(double maxVel); + + /// Gets the robot's absolute maximum translational velocity + double getAbsoluteMaxTransNegVel(void) const + { return myAbsoluteMaxTransNegVel; } + /// Sets the robot's absolute maximum translational velocity + AREXPORT bool setAbsoluteMaxTransNegVel(double maxVel); + + /// Gets the robot's absolute maximum translational acceleration + AREXPORT double getAbsoluteMaxTransAccel(void) const + { return myAbsoluteMaxTransAccel; } + /// Sets the robot's absolute maximum translational acceleration + AREXPORT bool setAbsoluteMaxTransAccel(double maxAccel); + + /// Gets the robot's absolute maximum translational deceleration + double getAbsoluteMaxTransDecel(void) const + { return myAbsoluteMaxTransDecel; } + /// Sets the robot's absolute maximum translational deceleration + AREXPORT bool setAbsoluteMaxTransDecel(double maxDecel); + + /// Gets the robot's absolute maximum rotational velocity + double getAbsoluteMaxRotVel(void) const + { return myAbsoluteMaxRotVel; } + /// Sets the robot's absolute maximum rotational velocity + AREXPORT bool setAbsoluteMaxRotVel(double maxVel); + + /// Gets the robot's absolute maximum rotational acceleration + double getAbsoluteMaxRotAccel(void) const + { return myAbsoluteMaxRotAccel; } + /// Sets the robot's absolute maximum rotational acceleration + AREXPORT bool setAbsoluteMaxRotAccel(double maxAccel); + + /// Gets the robot's absolute maximum rotational deceleration + double getAbsoluteMaxRotDecel(void) const + { return myAbsoluteMaxRotDecel; } + /// Sets the robot's absolute maximum rotational deceleration + AREXPORT bool setAbsoluteMaxRotDecel(double maxDecel); + + /// Gets the robot's absolute maximum lateral velocity + double getAbsoluteMaxLatVel(void) const + { return myAbsoluteMaxLatVel; } + /// Sets the robot's absolute maximum lateral velocity + AREXPORT bool setAbsoluteMaxLatVel(double maxVel); + + /// Gets the robot's absolute maximum lateral acceleration + double getAbsoluteMaxLatAccel(void) const + { return myAbsoluteMaxLatAccel; } + /// Sets the robot's absolute maximum lateral acceleration + AREXPORT bool setAbsoluteMaxLatAccel(double maxAccel); + + /// Gets the robot's absolute maximum lateral deceleration + double getAbsoluteMaxLatDecel(void) const + { return myAbsoluteMaxLatDecel; } + /// Sets the robot's absolute maximum lateral deceleration + AREXPORT bool setAbsoluteMaxLatDecel(double maxDecel); + + + // Accessors + + /** @brief Get the current stored global position of the robot. + * + * This position is updated by data reported by the robot as it + * moves, and may also be changed by other program components, + * such as a localization process (see moveTo()). + * + * This position is also referred to as the robot's + * "odometry" or "odometric" pose, since the robot + * uses its odometry data to determine this pose; but it + * may also incorporate additional data sources such as + * an onboard gyro. The term "odometric pose" also + * distinguishes this position by the fact that its + * coordinate system may be arbitrary, and seperate + * from any external coordinate system. + * + * @sa getEncoderPose() + * @sa moveTo() + * + */ + ArPose getPose(void) const { return myGlobalPose; } + /// Gets the global X position of the robot + /** @sa getPose() */ + double getX(void) const { return myGlobalPose.getX(); } + /// Gets the global Y position of the robot + /** @sa getPose() */ + double getY(void) const { return myGlobalPose.getY(); } + /// Gets the global angular position ("theta") of the robot + /** @sa getPose() */ + double getTh(void) const { return myGlobalPose.getTh(); } + /// Gets the distance to a point from the robot's current position + double findDistanceTo(const ArPose pose) + { return myGlobalPose.findDistanceTo(pose); } + /// Gets the angle to a point from the robot's current position and orientation + double findAngleTo(const ArPose pose) + { return myGlobalPose.findAngleTo(pose); } + /// Gets the difference between the angle to a point from the robot's current heading + double findDeltaHeadingTo(const ArPose pose) + { return ArMath::subAngle(myGlobalPose.findAngleTo(pose), + myGlobalPose.getTh()); } + + + /// Gets the current translational velocity of the robot + double getVel(void) const { return myVel; } + /// Gets the current rotational velocity of the robot + /** + Note that with new firmware versions (ARCOS as of April 2006 or so) + this is the velocity reported by the robot. With older firmware + this number is calculated using the difference between the robot's reported wheel + velocities multiplied by diffConvFactor from the .p (robot parameter) files. + **/ + double getRotVel(void) const { return myRotVel; } + /// Gets the current lateral velocity of the robot + /** + Note that this will only be valid if hasLatVel() returns true + @since 2.6.0 + **/ + double getLatVel(void) const { return myLatVel; } + /** Sees if the robot supports lateral velocities (e.g. Seekur(TM)) + @since 2.6.0 + */ + bool hasLatVel(void) const { return myParams->hasLatVel(); } + /// Gets the robot radius (in mm) + double getRobotRadius(void) const { return myParams->getRobotRadius(); } + /// Gets the robot width (in mm) + double getRobotWidth(void) const { return myParams->getRobotWidth(); } + /// Gets the robot length (in mm) + double getRobotLength(void) const { return myParams->getRobotLength(); } + /// Gets the robot length to the front (in mm) + double getRobotLengthFront(void) const { return myRobotLengthFront; } + /// Gets the robot length to the front (in mm) + double getRobotLengthRear(void) const { return myRobotLengthRear; } + /// Gets distance from center of robot to first vertex of octagon approximating the shape of robot. (mm) + double getRobotDiagonal(void) const { return myParams->getRobotDiagonal(); } + /// Gets the battery voltage of the robot (normalized to 12 volt system) + /** + This value is averaged over a number of readings, use getBatteryVoltageNow() to + get the value most recently received. (Access the number of readings + used in the running average with getBatteryVoltageAverageOfNum() and + setBatteryVoltageAverageOfNum().) + + This is a value normalized to 12 volts, if you want what the + actual voltage of the robot is use getRealBatteryVoltage(). + + @sa getRealBatteryVoltage() + @sa getBatteryVoltageNow() + **/ + double getBatteryVoltage(void) const {return myBatteryAverager.getAverage();} + /// Gets the instaneous battery voltage + /** + This is a value normalized to 12 volts, if you want what the + actual voltage of the robot is use getRealBatteryVoltage(). + + @sa getBatteryVoltage() + @sa getRealBatteryVoltage() + **/ + double getBatteryVoltageNow(void) const { return myBatteryVoltage; } + /// Gets the real battery voltage of the robot + /** + This value is averaged over a number of readings, use getRealBatteryVoltageNow() to + get the value most recently received. (Access the number of readings + used in the running average with getRealBatteryVoltageAverageOfNum() and + setRealBatteryVoltageAverageOfNum().) + + This is whatever the actual voltage of the robot is, if you want + a value normalized to common 12 volts for all robot types use getBatteryVoltage(). + + If the robot doesn't support a "real" battery voltage, then + this method will just return the normal battery voltage (normalized to 12 + volt scale). (Most older robots that don't support a real battery voltage + have 12 volts batteries anyway.) + **/ + double getRealBatteryVoltage(void) const + { return myRealBatteryAverager.getAverage(); } + /// Gets the instaneous battery voltage + /** + This is whatever the actual voltage of the robot is, if you want + a value normalized to a common 12 volts for all robot types use getBatteryVoltage(). If the + robot doesn't support this number the voltage will be less than 0 + and you should use getBatteryVoltageNow(). + **/ + double getRealBatteryVoltageNow(void) const { return myRealBatteryVoltage; } + /// Gets if the state of charge value is in use + bool haveStateOfCharge(void) const { return myHaveStateOfCharge; } + /// @copydoc haveStateOfCharge() + bool hasStateOfCHarge() const { return haveStateOfCharge(); } + /// Gets the state of charge (percent of charge, as number between 0 and 100) + double getStateOfCharge(void) const + { if (!myHaveStateOfCharge) return 0; else return myStateOfCharge; } + /// Gets the last time the state of charge was set + ArTime getStateOfChargeSetTime(void) const { return myStateOfChargeSetTime; } + /// Gets the state of charge that is considered low + double getStateOfChargeLow(void) const + { return myStateOfChargeLow; } + /// Gets the state of charge (percent of charge, as number between 0 and 100) + double getStateOfChargeShutdown(void) const + { return myStateOfChargeShutdown; } + /// Gets the velocity of the left wheel + double getLeftVel(void) const { return myLeftVel; } + /// Gets the velocity of the right wheel + double getRightVel(void) const { return myRightVel; } + /// Gets the 2 bytes of stall and bumper flags from the robot + /** See robot operations manual SIP packet documentation for details. + * @sa isLeftMotorStalled() + * @sa isRightMotorStalled() + */ + int getStallValue(void) const { return myStallValue; } + /// Returns true if the left motor is stalled + bool isLeftMotorStalled(void) const + { return (myStallValue & 0xff) & ArUtil::BIT0; } + /// Returns true if the left motor is stalled + bool isRightMotorStalled(void) const + { return ((myStallValue & 0xff00) >> 8) & ArUtil::BIT0; } + /// Gets the legacy control heading + /** + Gets the control heading as an offset from the current heading... + Note that this doesn't work in any modern firmware (uARCS, ARCOS, + seekur, AmigoSH) + @see getTh + */ + double getControl(void) const { return myControl; } + /// Sets whether to keep the control value raw or not + void setKeepControlRaw(bool keepControlRaw) + { myKeepControlRaw = keepControlRaw; } + /// Gets whether the control value is kept raw + bool getKeepControlRaw(void) + { return myKeepControlRaw; } + /// Gets the flags values + int getFlags(void) const { return myFlags; } + /// Gets the fault flags values + int getFaultFlags(void) const { return myFaultFlags; } + /// Gets whether or not we're getting the fault flags values + bool hasFaultFlags(void) const { return myHasFaultFlags; } + /// returns true if the motors are enabled + bool areMotorsEnabled(void) const { return (myFlags & ArUtil::BIT0); } + /// returns true if the sonars are enabled + /** This used to just check the low level firmware values, but + * that's now done by areSonarsEnabledLegacy. + */ + bool areSonarsEnabled(void) const + { return mySonarEnabled; } + /// returns true if the sonars are enabled for autonomous driving + bool areAutonomousDrivingSonarsEnabled(void) const + { return myAutonomousDrivingSonarEnabled; } + /// returns true if the sonars are enabled on legacy platforms (by checking the low level stuff) + bool areSonarsEnabledLegacy(void) const { + return (myFlags & + (ArUtil::BIT1 | ArUtil::BIT2 | ArUtil::BIT3 | ArUtil::BIT4)); } + /// returns true if the estop is pressed (or unrelieved) + bool isEStopPressed(void) const { return (myFlags & ArUtil::BIT5); } + + /// Returns true if the E-Stop button is pressed + bool getEstop(void) { return isEStopPressed(); } + + /// Gets the compass heading from the robot + double getCompass(void) const { return myCompass; } + /// Gets which analog port is selected + int getAnalogPortSelected(void) const { return myAnalogPortSelected; } + /// Gets the analog value + unsigned char getAnalog(void) const { return myAnalog; } + /// Gets the byte representing digital input status + unsigned char getDigIn(void) const { return myDigIn; } + /// Gets the byte representing digital output status + unsigned char getDigOut(void) const { return myDigOut; } + /// Gets the charge state of the robot (see long docs) + AREXPORT ChargeState getChargeState(void) const; + /// Gets if the robot is on a charger + AREXPORT bool isChargerPowerGood(void) const; + + /// Gets the number of bytes in the analog IO buffer + int getIOAnalogSize(void) const { return myIOAnalogSize; } + /// Gets the number of bytes in the digital input IO buffer + int getIODigInSize(void) const { return myIODigInSize; } + /// Gets the number of bytes in the digital output IO buffer + int getIODigOutSize(void) const { return myIODigOutSize; } + + /// Gets the n'th byte from the analog input data from the IO packet + AREXPORT int getIOAnalog(int num) const; + /// Gets the n'th byte from the analog input data from the IO packet + AREXPORT double getIOAnalogVoltage(int num) const; + /// Gets the n'th byte from the digital input data from the IO packet + AREXPORT unsigned char getIODigIn(int num) const; + /// Gets the n'th byte from the digital output data from the IO packet + AREXPORT unsigned char getIODigOut(int num) const; + + /// Gets whether the robot has table sensing IR or not (see params in docs) + bool hasTableSensingIR(void) const { return myParams->haveTableSensingIR(); } + /// Returns true if the left table sensing IR is triggered + AREXPORT bool isLeftTableSensingIRTriggered(void) const; + /// Returns true if the right table sensing IR is triggered + AREXPORT bool isRightTableSensingIRTriggered(void) const; + /// Returns true if the left break beam IR is triggered + AREXPORT bool isLeftBreakBeamTriggered(void) const; + /// Returns true if the right break beam IR is triggered + AREXPORT bool isRightBreakBeamTriggered(void) const; + /// Returns the time received of the last IO packet + ArTime getIOPacketTime(void) const { return myLastIOPacketReceivedTime; } + + /// Gets whether the robot has front bumpers (see ARCOS parameters in the robot manual) + bool hasFrontBumpers(void) const { return myParams->haveFrontBumpers(); } + /// Get the number of the front bumper switches + unsigned int getNumFrontBumpers(void) const + { return myParams->numFrontBumpers(); } + /// Gets whether the robot has rear bumpers (see ARCOS parameters in the robot manual) + bool hasRearBumpers(void) const { return myParams->haveRearBumpers(); } + /// Gets the number of rear bumper switches + unsigned int getNumRearBumpers(void) const + { return myParams->numRearBumpers(); } + + /** @brief Get the position of the robot according to the last robot SIP, + * possibly with gyro correction if installed and enabled, but without any + * transformations applied. + * @sa getPose() + * @sa getRawEncoderPose() + */ + ArPose getEncoderPose(void) const { return myEncoderPose; } + /// Gets the encoder X position of the robot + /** @sa getEncoderPose() */ + double getEncoderX(void) const { return myEncoderPose.getX(); } + /// Gets the encoder Y position of the robot + /** @sa getEncoderPose() */ + double getEncoderY(void) const { return myEncoderPose.getY(); } + /// Gets the encoder angular position ("theta") of the robot + /** @sa getEncoderPose() */ + double getEncoderTh(void) const { return myEncoderPose.getTh(); } + + /// Gets if the robot is trying to move or not + /** + "Trying" to move means that some action or other command has + requested motion, but another action or factor has cancelled + that request. + + This is so that if the robot is trying to move, but is prevented + (mainly by an action) there'll still be some indication that the + robot is trying to move (e.g. we can prevent the sonar from automatically being + turned off). Note that this flag + doesn't have anything to do with if the robot is really moving or + not, to check that, check the current velocities. + @sa forceTryingToMove() to force this state on + **/ + bool isTryingToMove(void) { return myTryingToMove; } + + /// Manually sets the flag that says the robot is trying to move for one cycle + /** + This is so that things that might move the robot at any time + can can make the robot look + like it is otherwise in the TryingToMove state, even if no motion + is currently being requested. For example, ArNetworking's teleoperation + mode forces TryingToMove at all times while active, not just when + requesting motion. This method must be called in each task cycle, + it is reset at the end of the task cycle (in state reflection stage) + to its natural (non-forced) value. + + @sa isTryingToMove() + **/ + void forceTryingToMove(void) { myTryingToMove = true; } + + + /// Gets the number of motor packets received in the last second + AREXPORT int getMotorPacCount(void) const; + /// Gets the number of sonar returns received in the last second + AREXPORT int getSonarPacCount(void) const; + + /// Gets the range of the last sonar reading for the given sonar + AREXPORT int getSonarRange(int num) const; + /// Find out if the given sonar reading was newly refreshed by the last incoming SIP received. + AREXPORT bool isSonarNew(int num) const; + /// Find the number of sonar sensors (that the robot has yet returned values for) + int getNumSonar(void) const { return myNumSonar; } + /// Returns the sonar reading for the given sonar + AREXPORT ArSensorReading *getSonarReading(int num) const; + /// Returns the closest of the current sonar reading in the given range + AREXPORT int getClosestSonarRange(double startAngle, double endAngle) const; + /// Returns the number of the sonar that has the closest current reading in the given range + AREXPORT int getClosestSonarNumber(double startAngle, double endAngle) const; + + /// Gets the robots name in ARIAs list + AREXPORT const char *getName(void) const; + /// Sets the robots name in ARIAs list + AREXPORT void setName(const char *name); + + /// Change stored pose (i.e. the value returned by getPose()) + AREXPORT void moveTo(ArPose pose, bool doCumulative = true); + /// Change stored pose (i.e. the value returned by getPose()) + AREXPORT void moveTo(ArPose to, ArPose from, bool doCumulative = true); + /// Manually sets the current percentage that the robot is charged (argument is percentage, as a number between 0 and 100) + AREXPORT void setStateOfCharge(double stateOfCharge); + /// Sets the state of charge (percentage) that is considered to be low + void setStateOfChargeLow(double stateOfChargeLow) + { myStateOfChargeLow = stateOfChargeLow; } + /// Sets the state of charge that will cause a shutdown + void setStateOfChargeShutdown(double stateOfChargeShutdown) + { myStateOfChargeShutdown = stateOfChargeShutdown; } + /// Sets the charge state (for use with setting the state of charge) + AREXPORT void setChargeState(ArRobot::ChargeState chargeState); + /// Sets if we're on the charger (for use with setting the state of charge) + AREXPORT void setIsChargerPowerGood(bool onCharger); + + /// Sets things so that the battery info from the microcontroller + /// will be ignored + AREXPORT void setIgnoreMicroControllerBatteryInfo( + bool ignoreMicroControllerBatteryInfo); + /// Sets the battery info + AREXPORT void setBatteryInfo(double realBatteryVoltage, + double normalizedBatteryVoltage, + bool haveStateOfCharge, + double stateOfCharge); + + /// Gets the number of readings the battery voltage is the average of + size_t getBatteryVoltageAverageOfNum(void) + { return myBatteryAverager.getNumToAverage(); } + + /// Sets the number of readings the battery voltage is the average of (default 20) + void setBatteryVoltageAverageOfNum(size_t numToAverage) + { myBatteryAverager.setNumToAverage(numToAverage); } + + /// Gets the number of readings the battery voltage is the average of + size_t getRealBatteryVoltageAverageOfNum(void) + { return myRealBatteryAverager.getNumToAverage(); } + + /// Sets the number of readings the real battery voltage is the average of (default 20) + void setRealBatteryVoltageAverageOfNum(size_t numToAverage) + { myRealBatteryAverager.setNumToAverage(numToAverage); } + + /// Returns true if we have a temperature, false otherwise + bool hasTemperature(void) + { if (myTemperature != -128) return true; else return false; } + + /// Gets the temperature of the robot, -128 if not available, -127 to 127 otherwise + int getTemperature(void) const { return myTemperature; } + + /// Starts a continuous stream of encoder packets + AREXPORT void requestEncoderPackets(void); + + /// Starts a continuous stream of IO packets + AREXPORT void requestIOPackets(void); + + /// Stops a continuous stream of encoder packets + AREXPORT void stopEncoderPackets(void); + + /// Stops a continuous stream of IO packets + AREXPORT void stopIOPackets(void); + + /// Sees if we've explicitly requested encoder packets + AREXPORT bool haveRequestedEncoderPackets(void); + + /// Sees if we've explicitly requested IO packets + AREXPORT bool haveRequestedIOPackets(void); + + /// Gets packet data from the left encoder + AREXPORT long int getLeftEncoder(void); + + /// Gets packet data from the right encoder + AREXPORT long int getRightEncoder(void); + + /// Changes the transform + AREXPORT void setEncoderTransform(ArPose deadReconPos, + ArPose globalPos); + + /// Changes the transform directly + AREXPORT void setEncoderTransform(ArPose transformPos); + + /// Changes the transform directly + AREXPORT void setEncoderTransform(ArTransform transform); + + /// Sets the encoder pose, for internal use + AREXPORT void setEncoderPose(ArPose encoderPose) + { myEncoderPose = encoderPose; } + + /// Sets the raw encoder pose, for internal use + AREXPORT void setRawEncoderPose(ArPose rawEncoderPose) + { myRawEncoderPose = rawEncoderPose; } + + /// Adds a callback for when the encoder transform is changed + AREXPORT void addSetEncoderTransformCB(ArFunctor *functor, int position = 50) + { mySetEncoderTransformCBList.addCallback(functor, position); } + + /// Removes a callback for when the encoder transform is changed + AREXPORT void remSetEncoderTransformCB(ArFunctor *functor) + { mySetEncoderTransformCBList.remCallback(functor); } + + /// Adds a callback that'll be used to see the time on the computer side (for an MTX) + AREXPORT void setMTXTimeUSecCB(ArRetFunctor1 *functor) + { myMTXTimeUSecCB = functor; } + + /// Gets the encoder transform + AREXPORT ArTransform getEncoderTransform(void) const; + + /// This gets the transform from local coords to global coords + AREXPORT ArTransform getToGlobalTransform(void) const; + + /// This gets the transform for going from global coords to local coords + AREXPORT ArTransform getToLocalTransform(void) const; + + /// This applies a transform to all the robot range devices and to the sonar + AREXPORT void applyTransform(ArTransform trans, bool doCumulative = true); + + /// Sets the dead recon position of the robot + AREXPORT void setDeadReconPose(ArPose pose); + + /// This gets the distance the robot has travelled since the last time resetTripOdometer() was called (mm) + /// This is a virtual odometer that measures the total linear distance the + /// robot has travelled since first connected, or resetTripOdometer() was + /// called, approximated by adding linear + /// distance between current pose and previous pose in each ArRobot cycle. + /// @note This value is not related to the + /// robot's actual odometry sensor or wheel encoders. For position based on that + /// plus possible additional correction, see getPose(). For raw encoder count + /// data, see requestEncoderPackets() instead. + AREXPORT double getTripOdometerDistance(void) + { return myTripOdometerDistance; } + + /// This gets the number of degrees the robot has turned since the last time resetTripOdometer() was called (deg) + /// This is a virtual odometer (by analogy with a car odometer) that measures the total linear distance the + /// robot has travelled since first connected, or resetTripOdometer() was last + /// called, approximated by adding linear + /// distance between current pose and previous pose in each ArRobot cycle. + /// @note This value is not related to the + /// robot's actual odometry sensor or wheel encoders. For position based on that + /// plus possible additional correction, see getPose(). For raw encoder count + /// data, see requestEncoderPackets() instead. + /// @see getTripOdometerDistance() + AREXPORT double getTripOdometerDegrees(void) + { return myTripOdometerDegrees; } + + /// This gets the time since the "Trip Odometer" was reset (sec) + /// @see getTripOdometerDistance() + AREXPORT double getTripOdometerTime(void) + { return myTripOdometerStart.secSince(); } + + /// Resets the "Trip Odometer" + /// @see getTripOdometerDistance() + AREXPORT void resetTripOdometer(void); + + /// This gets the total cumulative distance the robot has travelled (mm) + /// This is a virtual odometer (by analogy with a car odometer) that measures the total linear distance the + /// robot has travelled since ARIA connected, approximated by adding linear + /// distance between current pose and previous pose in each ArRobot cycle. + /// @note This value is not related to the + /// robot's actual odometry sensor or wheel encoders. For position based on that + /// plus possible additional correction, see getPose(). For raw encoder count + /// data, see requestEncoderPackets() instead. + AREXPORT double getOdometerDistance(void) + { return myOdometerDistance; } + + /// This gets the total cumulative number of degrees the robot has turned (deg) + /// This is a virtual odometer (by analogy with a car odometer) that measures the total linear distance the + /// robot has travelled since ARIA connected, approximated by adding linear + /// distance between current pose and previous pose in each ArRobot cycle. + /// @note This value is not related to the + /// robot's actual odometry sensor or wheel encoders. For position based on that + /// plus possible additional correction, see getPose(). For raw encoder count + /// data, see requestEncoderPackets() instead. + AREXPORT double getOdometerDegrees(void) + { return myOdometerDegrees; } + + /// This gets the time since the robot started (sec) + AREXPORT double getOdometerTime(void) + { return myOdometerStart.secSince(); } + + + /// Adds a rangeDevice to the robot's list of them, and set the ArRangeDevice + /// object's robot pointer to this ArRobot object. + AREXPORT void addRangeDevice(ArRangeDevice *device); + /// Remove a range device from the robot's list, by name + AREXPORT void remRangeDevice(const char *name); + /// Remove a range device from the robot's list, by instance + AREXPORT void remRangeDevice(ArRangeDevice *device); + + /// Finds a rangeDevice in the robot's list + AREXPORT const ArRangeDevice *findRangeDevice(const char *name, + bool ignoreCase = false) const; + + /// Finds a rangeDevice in the robot's list + AREXPORT ArRangeDevice *findRangeDevice(const char *name, + bool ignoreCase = false); + + /// Gets the range device list + AREXPORT std::list *getRangeDeviceList(void); + + /// Finds whether a particular range device is attached to this robot or not + AREXPORT bool hasRangeDevice(ArRangeDevice *device) const; + + /// Goes through all the range devices and checks them + AREXPORT double checkRangeDevicesCurrentPolar( + double startAngle, double endAngle, double *angle = NULL, + const ArRangeDevice **rangeDevice = NULL, + bool useLocationDependentDevices = true) const; + + /// Goes through all the range devices and checks them + AREXPORT double checkRangeDevicesCumulativePolar( + double startAngle, double endAngle, double *angle = NULL, + const ArRangeDevice **rangeDevice = NULL, + bool useLocationDependentDevices = true) const; + + + // Goes through all the range devices and checks them + AREXPORT double checkRangeDevicesCurrentBox( + double x1, double y1, double x2, double y2, + ArPose *readingPos = NULL, + const ArRangeDevice **rangeDevice = NULL, + bool useLocationDependentDevices = true) const; + + // Goes through all the range devices and checks them + AREXPORT double checkRangeDevicesCumulativeBox( + double x1, double y1, double x2, double y2, + ArPose *readingPos = NULL, + const ArRangeDevice **rangeDevice = NULL, + bool useLocationDependentDevices = true) const; + + /// Adds a laser to the robot's map of them + AREXPORT bool addLaser(ArLaser *laser, int laserNumber, + bool addAsRangeDevice = true); + /// Remove a range device from the robot's list, by instance + AREXPORT bool remLaser(ArLaser *laser, bool removeAsRangeDevice = true); + /// Remove a range device from the robot's list, by number + AREXPORT bool remLaser(int laserNumber, bool removeAsRangeDevice = true); + + /// Finds a laser in the robot's list (@a laserNumber indices start at 1) + AREXPORT const ArLaser *findLaser(int laserNumber) const; + + /// Finds a laser in the robot's list (@a laserNumber indices start at 1) + AREXPORT ArLaser *findLaser(int laserNumber); + + /// Gets the range device list + AREXPORT const std::map *getLaserMap(void) const; + + /// Gets the range device list + AREXPORT std::map *getLaserMap(void); + + /// Finds whether a particular range device is attached to this robot or not + AREXPORT bool hasLaser(ArLaser *device) const; + + + /// Adds a battery to the robot's map of them + /// @internal + /// (ArBatteryConnector/ArRobotConnector will automatically add ArBatteryMTX + /// object(s) if connected.) + AREXPORT bool addBattery(ArBatteryMTX *battery, int batteryNumber); + /// Remove a battery from the robot's list, by instance + /// (MTX robots only) + /// Primarily for ARIA internal use only. + AREXPORT bool remBattery(ArBatteryMTX *battery); + /// Remove a battery from the robot's list, by number + /// (MTX robots only) + /// Primarily for ARIA internal use only. + AREXPORT bool remBattery(int batteryNumber); + + /// Finds a battery in the robot's list (@a batteryNumber indices start at 1) + /// (MTX robots only) + AREXPORT const ArBatteryMTX *findBattery(int batteryNumber) const; + + /// Finds a battery in the robot's list (@a batteryNumber indices start at 1) + /// (MTX robots only) + AREXPORT ArBatteryMTX *findBattery(int batteryNumber); + + /// Gets the battery list + AREXPORT const std::map *getBatteryMap(void) const; + + /// Gets the battery list + AREXPORT std::map *getBatteryMap(void); + + /// Finds whether a particular battery is attached to this robot or not + AREXPORT bool hasBattery(ArBatteryMTX *device) const; + + + /// Adds a lcd to the robot's map of them + /// @internal + /// (ArLCDConnector/ArRobotConnector will automatically add LCD interfaces if + /// connected.) + AREXPORT bool addLCD(ArLCDMTX *lcd, int lcdNumber); + /// Remove a lcd from the robot's list, by instance + /// @internal + /// (ArLCDConnector/ArRobotConnector will automatically add LCD interfaces if + /// connected.) + AREXPORT bool remLCD(ArLCDMTX *lcd); + /// Remove a lcd from the robot's list, by number + /// @internal + /// (ArLCDConnector/ArRobotConnector will automatically add LCD interfaces if + /// connected.) + AREXPORT bool remLCD(int lcdNumber); + + /// Finds a lcd in the robot's list (@a lcdNumber indices start at 1) + /// (MTX robots only) + AREXPORT const ArLCDMTX *findLCD(int lcdNumber = 1) const; + + /// Finds a lcd in the robot's list (@a lcdNumber indices start at 1) + /// (MTX robots only) + AREXPORT ArLCDMTX *findLCD(int lcdNumber = 1); + + /// Gets the lcd list + /// (MTX robots only) + AREXPORT const std::map *getLCDMap(void) const; + + /// Gets the lcd list + /// (MTX robots only) + AREXPORT std::map *getLCDMap(void); + + /// Finds whether a particular lcd is attached to this robot or not + /// (MTX robots only) + AREXPORT bool hasLCD(ArLCDMTX *device) const; + + + + /// Adds a sonar to the robot's map of them + /// @internal (ArSonarConnector/ArRobotConnector will automatically and MTX + /// sonar interfaces upon connection) + AREXPORT bool addSonar(ArSonarMTX *sonar, int sonarNumber); + /// Remove a sonar from the robot's list, by instance + /// @internal + AREXPORT bool remSonar(ArSonarMTX *sonar); + /// Remove a sonar from the robot's list, by number + /// @internal + AREXPORT bool remSonar(int sonarNumber); + + /// Finds a sonar in the robot's list (@a sonarNumber indices start at 1) + /// (MTX robots only) + AREXPORT const ArSonarMTX *findSonar(int sonarNumber) const; + + /// Finds a sonar in the robot's list (@a sonarNumber indices start at 1) + /// (MTX robots only) + AREXPORT ArSonarMTX *findSonar(int sonarNumber); + + /// Gets the sonar list + /// (MTX robots only) + AREXPORT const std::map *getSonarMap(void) const; + + /// Gets the sonar list + /// (MTX robots only) + AREXPORT std::map *getSonarMap(void); + + /// Finds whether a particular sonar is attached to this robot or not + /// (MTX robots only) + AREXPORT bool hasSonar(ArSonarMTX *device) const; + + /// Associates an ArPTZ object with this robot (see getPTZ()) + void setPTZ(ArPTZ *ptz) { myPtz = ptz; } + /// Get PTZ interface associated with this robot. + ArPTZ *getPTZ(void) { return myPtz; } + + /// Sets the number of milliseconds between state reflection refreshes + /// if the state has not changed + AREXPORT void setStateReflectionRefreshTime(int msec); + + /// Gets the number of milliseconds between state reflection refreshes + /// if the state has not changed + AREXPORT int getStateReflectionRefreshTime(void) const; + + /// Adds a packet handler to the list of packet handlers + AREXPORT void addPacketHandler( + ArRetFunctor1 *functor, + ArListPos::Pos position = ArListPos::LAST); + + /// Removes a packet handler from the list of packet handlers + AREXPORT void remPacketHandler( + ArRetFunctor1 *functor); + + /// Adds a connect callback + AREXPORT void addConnectCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a connect callback + AREXPORT void remConnectCB(ArFunctor *functor); + + /// Adds a callback for when a connection to the robot is failed + AREXPORT void addFailedConnectCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when a connection to the robot is failed + AREXPORT void remFailedConnectCB(ArFunctor *functor); + + /// Adds a callback for when disconnect is called while connected + AREXPORT void addDisconnectNormallyCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when disconnect is called while connected + AREXPORT void remDisconnectNormallyCB(ArFunctor *functor); + + /// Adds a callback for when disconnection happens because of an error + AREXPORT void addDisconnectOnErrorCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when disconnection happens because of an error + AREXPORT void remDisconnectOnErrorCB(ArFunctor *functor); + + /// Adds a callback for when the run loop exits for what ever reason + AREXPORT void addRunExitCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes a callback for when the run loop exits for what ever reason + AREXPORT void remRunExitCB(ArFunctor *functor); + + /// Suspend calling thread until the ArRobot is connected + AREXPORT WaitState waitForConnect(unsigned int msecs=0); + /// Suspend calling thread until the ArRobot is connected or fails to connect + AREXPORT WaitState waitForConnectOrConnFail(unsigned int msecs=0); + /// Suspend calling thread until the ArRobot run loop has exited + AREXPORT WaitState waitForRunExit(unsigned int msecs=0); + + /// Wake up all threads waiting on this robot + AREXPORT void wakeAllWaitingThreads(); + /// Wake up all threads waiting for connection + AREXPORT void wakeAllConnWaitingThreads(); + /// Wake up all threads waiting for connection or connection failure + AREXPORT void wakeAllConnOrFailWaitingThreads(); + /// Wake up all threads waiting for the run loop to exit + AREXPORT void wakeAllRunExitWaitingThreads(); + + /// Adds a user task to the list of synchronous taskes + AREXPORT bool addUserTask(const char *name, int position, + ArFunctor *functor, + ArTaskState::State *state = NULL); + /// Removes a user task from the list of synchronous taskes by name + AREXPORT void remUserTask(const char *name); + /// Removes a user task from the list of synchronous taskes by functor + AREXPORT void remUserTask(ArFunctor *functor); + + /// Finds a user task by name + AREXPORT ArSyncTask *findUserTask(const char *name); + /// Finds a user task by functor + AREXPORT ArSyncTask *findUserTask(ArFunctor *functor); + + /// Logs the list of user tasks, strictly for your viewing pleasure + AREXPORT void logUserTasks(void) const; + /// Logs the list of all tasks, strictly for your viewing pleasure + AREXPORT void logAllTasks(void) const; + + /// Adds a task under the sensor interp part of the syncronous tasks + AREXPORT bool addSensorInterpTask(const char *name, int position, + ArFunctor *functor, + ArTaskState::State *state = NULL); + /// Removes a sensor interp tasks by name + AREXPORT void remSensorInterpTask(const char *name); + /// Removes a sensor interp tasks by functor + AREXPORT void remSensorInterpTask(ArFunctor *functor); + + /// Finds a task by name + AREXPORT ArSyncTask *findTask(const char *name); + /// Finds a task by functor + AREXPORT ArSyncTask *findTask(ArFunctor *functor); + + /// Adds an action to the list with the given priority + AREXPORT bool addAction(ArAction *action, int priority); + /// Removes an action from the list, by pointer + AREXPORT bool remAction(ArAction *action); + /// Removes an action from the list, by name + AREXPORT bool remAction(const char *actionName); + /// Returns the first (highest priority) action with the given name (or NULL) + AREXPORT ArAction *findAction(const char *actionName); + /// Returns the map of actions... don't do this unless you really + /// know what you're doing + AREXPORT ArResolver::ActionMap *getActionMap(void); + /// Deactivates all the actions + AREXPORT void deactivateActions(void); + + /// Logs out the actions and their priorities + AREXPORT void logActions(bool logDeactivated = false) const; + + /// Gets the resolver the robot is using + AREXPORT ArResolver *getResolver(void); + + /// Sets the resolver the robot is using + AREXPORT void setResolver(ArResolver *resolver); + + /// Sets the encoderCorrectionCallback + AREXPORT void setEncoderCorrectionCallback( + ArRetFunctor1 *functor); + /// Gets the encoderCorrectionCallback + AREXPORT ArRetFunctor1 * + getEncoderCorrectionCallback(void) const; + + /// Gets the time the connection to the robot was made + AREXPORT ArTime getConnectionOpenedTime(void) const + { return myConnectionOpenedTime; } + + // set up some of the internals of how the ArRobot class works + /// Sets the number of ms between cycles + AREXPORT void setCycleTime(unsigned int ms); + /// Gets the number of ms between cycles + AREXPORT unsigned int getCycleTime(void) const; + /// Sets the number of ms between cycles to warn over + AREXPORT void setCycleWarningTime(unsigned int ms); + /// Gets the number of ms between cycles to warn over + AREXPORT unsigned int getCycleWarningTime(void) const; + /// Gets the number of ms between cycles to warn over + AREXPORT unsigned int getCycleWarningTime(void); + /// Sets the multiplier for how many cycles ArRobot waits when connecting + AREXPORT void setConnectionCycleMultiplier(unsigned int multiplier); + /// Gets the multiplier for how many cycles ArRobot waits when connecting + AREXPORT unsigned int getConnectionCycleMultiplier(void) const; + + /// Sets whether to chain the robot cycle to when we get in SIP packets + void setCycleChained(bool cycleChained) { myCycleChained = cycleChained; } + /// Gets whether we chain the robot cycle to when we get in SIP packets + bool isCycleChained(void) const { return myCycleChained; } + /// Sets the time without a response until connection assumed lost + AREXPORT void setConnectionTimeoutTime(int mSecs); + /// Gets the time without a response until connection assumed lost + AREXPORT int getConnectionTimeoutTime(void) const; + /// Gets the time the last packet was received + AREXPORT ArTime getLastPacketTime(void) const; + /// Gets the time the last odometry was received + AREXPORT ArTime getLastOdometryTime(void) const; + + /// Sets the number of packets back in time the ArInterpolation goes + AREXPORT void setPoseInterpNumReadings(size_t numReadings) + { myInterpolation.setNumberOfReadings(numReadings); } + + /// Sets the number of packets back in time the position interpol goes + AREXPORT size_t getPoseInterpNumReadings(void) const + { return myInterpolation.getNumberOfReadings(); } + + + /// Gets the position the robot was at at the given timestamp + /** @see ArInterpolation::getPose + */ + AREXPORT int getPoseInterpPosition(ArTime timeStamp, ArPose *position, + ArPoseWithTime *mostRecent = NULL) + { return myInterpolation.getPose(timeStamp, position, mostRecent); } + + /// Gets the pose interpolation object, this should only really used internally + AREXPORT ArInterpolation *getPoseInterpolation(void) + { return &myInterpolation; } + + /// Gets the callback that will call getPoseInterpPosition + AREXPORT ArRetFunctor3 * + getPoseInterpPositionCallback(void) + { + return &myPoseInterpPositionCB; + } + + /// Sets the number of packets back in time the ArInterpolation goes for encoder readings + AREXPORT void setEncoderPoseInterpNumReadings(size_t numReadings) + { myEncoderInterpolation.setNumberOfReadings(numReadings); } + + /// Sets the number of packets back in time the encoder position interpolation goes + AREXPORT size_t getEncoderPoseInterpNumReadings(void) const + { return myEncoderInterpolation.getNumberOfReadings(); } + + /// Gets the encoder position the robot was at at the given timestamp + /** @see ArInterpolation::getPose + */ + AREXPORT int getEncoderPoseInterpPosition(ArTime timeStamp, ArPose *position, + ArPoseWithTime *mostRecent = NULL) + { return myEncoderInterpolation.getPose(timeStamp, position, mostRecent); } + + AREXPORT ArInterpolation *getEncoderPoseInterpolation(void) + { return &myEncoderInterpolation; } + + /// Gets the callback that will call getPoseInterpPosition + AREXPORT ArRetFunctor3 * + getEncoderPoseInterpPositionCallback(void) + { + return &myEncoderPoseInterpPositionCB; + } + + /// Applies the encoder motion from the passed in ArPoseWithTime to the passed in ArTime + AREXPORT int applyEncoderOffset(ArPoseWithTime from, ArTime to, + ArPose *result); + + /// Gets the Counter for the time through the loop + unsigned int getCounter(void) const { return myCounter; } + + /// Gets the parameters the robot is using + AREXPORT const ArRobotParams *getRobotParams(void) const; + + /// Sets if a config packet is requried or not... + /** By default it is not required, since some ancient robots have no + config packets... some of the modern software may die hideously + if there is no config packet, so you should set this to true if + you're using modern robots (basically anything other than a + pioneer 1) + **/ + void setRequireConfigPacket(bool requireConfigPacket) + { myRequireConfigPacket = requireConfigPacket; } + + /// Gets the original robot config packet information + AREXPORT const ArRobotConfigPacketReader *getOrigRobotConfig(void) const; + + /// Gets the battery packet reader + AREXPORT ArRobotBatteryPacketReader *getBatteryPacketReader(void) + { return myBatteryPacketReader; } + + /// Sets the maximum translational velocity + AREXPORT void setTransVelMax(double vel); + /// Sets the maximum translational velocity + AREXPORT void setTransNegVelMax(double negVel); + /// Sets the translational acceleration + AREXPORT void setTransAccel(double acc); + /// Sets the translational acceleration + AREXPORT void setTransDecel(double decel); + /// Sets the maximum rotational velocity + AREXPORT void setRotVelMax(double vel); + /// Sets the rotational acceleration + AREXPORT void setRotAccel(double acc); + /// Sets the rotational acceleration + AREXPORT void setRotDecel(double decel); + /// Sets the maximum lateral velocity + AREXPORT void setLatVelMax(double vel); + /// Sets the lateral acceleration + AREXPORT void setLatAccel(double acc); + /// Sets the lateral acceleration + AREXPORT void setLatDecel(double decel); + + /// If the robot has settable maximum velocities + bool hasSettableVelMaxes(void) const + { return myParams->hasSettableVelMaxes(); } + /// Gets the maximum translational velocity + AREXPORT double getTransVelMax(void) const; + /// Gets the maximum translational velocity + AREXPORT double getTransNegVelMax(void) const; + /// Gets the maximum rotational velocity + AREXPORT double getRotVelMax(void) const; + /// If the robot has settable accels and decels + bool hasSettableAccsDecs(void) + const { return myParams->hasSettableAccsDecs(); } + /// Gets the translational acceleration + AREXPORT double getTransAccel(void) const; + /// Gets the translational acceleration + AREXPORT double getTransDecel(void) const; + /// Gets the rotational acceleration + AREXPORT double getRotAccel(void) const; + /// Gets the rotational acceleration + AREXPORT double getRotDecel(void) const; + + /// Gets the maximum lateral velocity + AREXPORT double getLatVelMax(void) const; + /// Gets the lateral acceleration + AREXPORT double getLatAccel(void) const; + /// Gets the lateral acceleration + AREXPORT double getLatDecel(void) const; + + /// Loads a parameter file (replacing all other params) + AREXPORT bool loadParamFile(const char *file); + /// Sets the robot to use a passed in set of params (passes ownership) + AREXPORT void setRobotParams(ArRobotParams *params); + + /// Attachs a key handler + AREXPORT void attachKeyHandler(ArKeyHandler *keyHandler, + bool exitOnEscape = true, + bool useExitNotShutdown = true); + /// Gets the key handler attached to this robot + AREXPORT ArKeyHandler *getKeyHandler(void) const; + + /// Lock the robot instance + int lock() {return(myMutex.lock());} + /// Try to lock the robot instance without blocking + int tryLock() {return(myMutex.tryLock());} + /// Unlock the robot instance + int unlock() {return(myMutex.unlock());} + /// Turn on verbose locking of robot mutex + void setMutexLogging(bool v) { myMutex.setLog(v); } + /// Set robot lock warning time (see ArMutex::setLockWarningTime()) + void setMutexLockWarningTime(double sec) { myMutex.setLockWarningTime(sec); } + /// Set robot lock-unlock warning time (see ArMutex::setUnlockWarningTime()) + void setMutexUnlockWarningTime(double sec) { myMutex.setUnlockWarningTime(sec); } + + /// This tells us if we're in the preconnection state + AREXPORT bool isStabilizing(void) { return myIsStabilizing; } + + /// How long we should stabilize for in ms (0 disables stabilizing) + AREXPORT void setStabilizingTime(int mSecs); + + /// How long we stabilize for in ms (0 means no stabilizng) + AREXPORT int getStabilizingTime(void) const; + + + /// Adds a callback called when the robot starts stabilizing before declaring connection + AREXPORT void addStabilizingCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST); + /// Removes stabilizing callback + AREXPORT void remStabilizingCB(ArFunctor *functor); + + /// This gets the root of the syncronous task tree, only serious + /// developers should use it + AREXPORT ArSyncTask *getSyncTaskRoot(void); + + /// This function loops once... only serious developers should use it + AREXPORT void loopOnce(void); + + /// Sets the delay in the odometry readings + /** + Note that this doesn't cause a delay, its informational so that + the delay can be adjusted for and causes nothing to happen in + this class. + **/ + AREXPORT void setOdometryDelay(int msec) { myOdometryDelay = msec; } + + /// Gets the delay in odometry readings + /** + This gets the odometry delay, not that this is just information + about what the delay is it doesn't cause anything to happen in + this class. + **/ + AREXPORT int getOdometryDelay(void) { return myOdometryDelay; } + + /// Gets if we're logging all the movement commands sent down + AREXPORT bool getLogMovementSent(void) { return myLogMovementSent; } + /// Sets if we're logging all the movement commands sent down + AREXPORT void setLogMovementSent(bool logMovementSent) + { myLogMovementSent = logMovementSent; } + + /// Gets if we're logging all the positions received from the robot + AREXPORT bool getLogMovementReceived(void) { return myLogMovementReceived; } + /// Sets if we're logging all the positions received from the robot + AREXPORT void setLogMovementReceived(bool logMovementReceived) + { myLogMovementReceived = logMovementReceived; } + + /// Gets if we're logging all the velocities (and heading) received + AREXPORT bool getLogVelocitiesReceived(void) + { return myLogVelocitiesReceived; } + /// Sets if we're logging all the velocities (and heading) received + AREXPORT void setLogVelocitiesReceived(bool logVelocitiesReceived) + { myLogVelocitiesReceived = logVelocitiesReceived; } + + /// Gets if we're logging all the packets received (just times and types) + AREXPORT bool getPacketsReceivedTracking(void) + { return myPacketsReceivedTracking; } + /// Sets if we're logging all the packets received (just times and types) + AREXPORT void setPacketsReceivedTracking(bool packetsReceivedTracking); + + /// Gets if we're logging the contents of the standard SIP (motors packet) + bool getLogSIPContents() { return myLogSIPContents; } + /// Set if we're logging the contents of the standard SIP (motor packets) + void setLogSIPContents(bool logSIP) { myLogSIPContents = logSIP; } + + /// Gets if we're logging all the packets sent and their payload + AREXPORT bool getPacketsSentTracking(void) + { return myPacketsSentTracking; } + /// Sets if we're logging all the packets sent and their payloads + AREXPORT void setPacketsSentTracking(bool packetsSentTracking) + { + if (packetsSentTracking) + ArLog::log(ArLog::Normal, "ArRobot: tracking packets sent"); + else + ArLog::log(ArLog::Normal, "ArRobot: not tracking packets sent"); + myPacketsSentTracking = packetsSentTracking; + } + + /// Gets if we're logging all the actions as they happen + AREXPORT bool getLogActions(void) { return myLogActions; } + /// Sets if we're logging all the actions as they happen + AREXPORT void setLogActions(bool logActions) + { myLogActions = logActions; } + + /// Sets the flag that controls if the robot will switch baud rates + AREXPORT void setDoNotSwitchBaud(bool doNotSwitchBaud) + { myDoNotSwitchBaud = true; } + + /// Gets the flag that controls if the robot won't switch baud rates + AREXPORT bool getDoNotSwitchBaud(void) { return myDoNotSwitchBaud; } + + /// This is only for use by syncLoop + /// @internal + AREXPORT void incCounter(void) { myCounter++; } + + /// Packet Handler, internal (calls old or new as appropriate) + /// @internal + AREXPORT void packetHandler(void); + /// Action Handler, internal + /// @internal + AREXPORT void actionHandler(void); + /// State Reflector, internal + /// @internal + AREXPORT void stateReflector(void); + /// Robot locker, internal + /// @internal + AREXPORT void robotLocker(void); + /// Robot unlocker, internal + /// @internal + AREXPORT void robotUnlocker(void); + + /// Packet handler, internal, for use in the syncloop when there's no threading + /// @internal + AREXPORT void packetHandlerNonThreaded(void); + /// Packet handler, internal, for use in the syncloop to handle the + /// actual packets + /// @internal + AREXPORT void packetHandlerThreadedProcessor(void); + /// Packet handler, internal, for using from a thread to actually + /// read all the packets + /// @internal + AREXPORT void packetHandlerThreadedReader(void); + + /// For the key handler, escape calls this to exit, internal + AREXPORT void keyHandlerExit(void); + + /// Processes a motor packet, internal + /// @internal + AREXPORT bool processMotorPacket(ArRobotPacket *packet); + /// Processes a new sonar reading, internal + /// @internal + AREXPORT void processNewSonar(char number, int range, ArTime timeReceived); + /// Processes a new encoder packet, internal + /// @internal + AREXPORT bool processEncoderPacket(ArRobotPacket *packet); + /// Processes a new IO packet, internal + /// @internal + AREXPORT bool processIOPacket(ArRobotPacket *packet); + + /// Internal function, shouldn't be used + /// @internal + AREXPORT void init(void); + + /// Internal function, shouldn't be used, sets up the default sync list + /// @internal + AREXPORT void setUpSyncList(void); + /// Internal function, shouldn't be used, sets up the default packet handlers + /// @internal + AREXPORT void setUpPacketHandlers(void); + + ArRetFunctor1C myMotorPacketCB; + ArRetFunctor1C myEncoderPacketCB; + ArRetFunctor1C myIOPacketCB; + ArFunctorC myPacketHandlerCB; + ArFunctorC myActionHandlerCB; + ArFunctorC myStateReflectorCB; + ArFunctorC myRobotLockerCB; + ArFunctorC myRobotUnlockerCB; + ArFunctorC myKeyHandlerExitCB; + ArFunctorC *myKeyHandlerCB; + + // These four are internal... only people monkeying deeply should mess + // with them, so they aren't documented... these process the cblists + // and such + // Internal function, shouldn't be used, does a single run of connecting + AREXPORT int asyncConnectHandler(bool tryHarderToConnect); + + /// Internal function, shouldn't be used, drops the conn because of error + /// @internal + AREXPORT void dropConnection(const char *reason = "Lost connection to the robot because of undefined error."); + /// Internal function that gets the reason the connection dropped + /// @internal + AREXPORT const char *getDropConnectionReason(void) { return myDropConnectionReason.c_str(); } + /// Internal function, shouldn't be used, denotes the conn failed + /// @internal + AREXPORT void failedConnect(void); + /// Internal function, shouldn't be used, does the initial conn stuff + /// @internal + AREXPORT bool madeConnection(bool resetConnectionTime = true); + /// Internal function, shouldn't be used, calls the preconnected stuff + /// @internal + AREXPORT void startStabilization(void); + /// Internal function, shouldn't be used, does the after conn stuff + /// @internal + AREXPORT void finishedConnection(void); + /// Internal function, shouldn't be used, cancels the connection quietly + /// @internal + AREXPORT void cancelConnection(void); + + /// Internal function, takes a packet and passes it to the packet handlers, + /// returns true if handled, false otherwise + /// @internal + AREXPORT bool handlePacket(ArRobotPacket *packet); + + AREXPORT std::list * getRunExitListCopy(); + // Internal function, processes a parameter file + AREXPORT void processParamFile(void); + + /** @brief Get the position of the robot according to the last robot SIP only, + * with no correction by the gyro, other devices or software proceses. + * + * @note For the most accurate pose, use getPose() or getEncoderPose(); + * only use this method if you must have raw encoder pose with no correction. + * @sa getPose() + * @sa getEncoderPose() + */ + AREXPORT ArPose getRawEncoderPose(void) const { return myRawEncoderPose; } + + /// Internal function for sync loop and sync task to see if we should warn this cycle or not + AREXPORT bool getNoTimeWarningThisCycle(void) + { return myNoTimeWarningThisCycle; } + /// Internal function for sync loop and sync task to say if we should warn this cycle or not + AREXPORT void setNoTimeWarningThisCycle(bool noTimeWarningThisCycle) + { myNoTimeWarningThisCycle = noTimeWarningThisCycle; } + // callbacks for warning time and if we should warn now to pass to sync tasks + ArRetFunctorC myGetCycleWarningTimeCB; + ArRetFunctorC myGetNoTimeWarningThisCycleCB; + /// internal function called when Aria::exit is called + /// @internal + AREXPORT void ariaExitCallback(void); + // internal call that will let the robot connect even if it can't find params + void setConnectWithNoParams(bool connectWithNoParams) + { myConnectWithNoParams = connectWithNoParams; } + // Internal call that will get the thread the robot is running in + ArThread::ThreadType getOSThread(void) { return mySyncLoop.getOSThread(); } + // Internal call that will get the async connect state + int getAsyncConnectState(void) { return myAsyncConnectState; } + /// Very Internal call that gets the packet sender, shouldn't be used + /// @internal + ArRobotPacketSender *getPacketSender(void) + { return &mySender; } + /// Very Internal call that gets the packet sender, shouldn't be used + /// @internal + ArRobotPacketReceiver *getPacketReceiver(void) + { return &myReceiver; } + + // Gets a pointer to the robot parameters in an internal way so they can be modified (only for internal use) + AREXPORT ArRobotParams *getRobotParamsInternal(void); + + // Sets if we've received the first encoder pose for very internal usage + AREXPORT void internalSetFakeFirstEncoderPose(bool fakeFirstEncoderPose) + { myFakeFirstEncoderPose = fakeFirstEncoderPose; } + // Sets a flag to ignore the next packet handled, for very internal usage + AREXPORT void internalIgnoreNextPacket(void); +protected: + enum RotDesired { + ROT_NONE, + ROT_IGNORE, + ROT_HEADING, + ROT_VEL + }; + enum TransDesired { + TRANS_NONE, + TRANS_IGNORE, + TRANS_VEL, + TRANS_VEL2, + TRANS_DIST, + TRANS_DIST_NEW + }; + enum LatDesired { + LAT_NONE, + LAT_IGNORE, + LAT_VEL + }; + void reset(void); + + + // the config the robot had at connection + ArRobotConfigPacketReader *myOrigRobotConfig; + // the reader for the battery packet + ArRobotBatteryPacketReader *myBatteryPacketReader; + // the values we'll maintain for the different motion parameters + double myRotVelMax; + double myRotAccel; + double myRotDecel; + double myTransVelMax; + double myTransNegVelMax; + double myTransAccel; + double myTransDecel; + double myLatVelMax; + double myLatAccel; + double myLatDecel; + + ArPTZ *myPtz; + bool myNoTimeWarningThisCycle; + + long int myLeftEncoder; + long int myRightEncoder; + bool myFirstEncoderPose; + bool myFakeFirstEncoderPose; + ArPoseWithTime myRawEncoderPose; + + ArTransform myEncoderTransform; + ArCallbackList mySetEncoderTransformCBList; + + ArRetFunctor1 *myMTXTimeUSecCB; + + bool myIgnoreNextPacket; + + bool myLogMovementSent; + bool myLogMovementReceived; + bool myPacketsReceivedTracking; + bool myLogActions; + bool myLogVelocitiesReceived; + bool myLogSIPContents; + + double myLastVel; + double myLastRotVel; + double myLastHeading; + double myLastCalculatedRotVel; + double myLastLatVel; + + bool myTryingToMove; + + long myPacketsReceivedTrackingCount; + ArTime myPacketsReceivedTrackingStarted; + bool myPacketsSentTracking; + ArMutex myMutex; + ArSyncTask *mySyncTaskRoot; + std::list *> myPacketHandlerList; + + ArSyncLoop mySyncLoop; + ArRobotPacketReaderThread myPacketReader; + + // the data items for reading packets in one thread and processing them in another + ArMutex myPacketMutex; + std::list myPacketList; + ArCondition myPacketReceivedCondition; + bool myRunningNonThreaded; + + + std::list myStabilizingCBList; + std::list myConnectCBList; + std::list myFailedConnectCBList; + std::list myDisconnectNormallyCBList; + std::list myDisconnectOnErrorCBList; + std::list myRunExitCBList; + + ArRetFunctor1 *myEncoderCorrectionCB; + std::list myRangeDeviceList; + std::map myLaserMap; + + std::map myBatteryMap; + + std::map myLCDMap; + + std::map mySonarMap; + + ArCondition myConnectCond; + ArCondition myConnOrFailCond; + ArCondition myRunExitCond; + + ArResolver::ActionMap myActions; + bool myOwnTheResolver; + ArResolver *myResolver; + + std::map mySonars; + int myNumSonar; + + unsigned int myCounter; + bool myIsConnected; + bool myIsStabilizing; + bool myRequireConfigPacket; + + bool mySonarEnabled; + bool myAutonomousDrivingSonarEnabled; + + bool myBlockingConnectRun; + bool myAsyncConnectFlag; + int myAsyncConnectState; + int myAsyncConnectNoPacketCount; + int myAsyncConnectTimesTried; + ArTime myAsyncStartedConnection; + int myAsyncConnectStartBaud; + ArTime myAsyncConnectStartedChangeBaud; + bool myAsyncConnectSentChangeBaud; + ArTime myStartedStabilizing; + + ArTime myConnectionOpenedTime; + + int myStabilizingTime; + + bool mySentPulse; + + double myTransVal; + double myTransVal2; + int myLastTransVal; + int myLastTransVal2; + TransDesired myTransType; + TransDesired myLastTransType; + ArTime myTransSetTime; + ArTime myLastTransSent; + int myLastActionTransVal; + bool myActionTransSet; + ArPose myTransDistStart; + double myMoveDoneDist; + + double myRotVal; + int myLastRotVal; + RotDesired myRotType; + RotDesired myLastRotType; + ArTime myRotSetTime; + ArTime myLastRotSent; + int myLastActionRotVal; + bool myLastActionRotHeading; + bool myLastActionRotStopped; + bool myActionRotSet; + double myHeadingDoneDiff; + + double myLatVal; + int myLastLatVal; + LatDesired myLatType; + LatDesired myLastLatType; + ArTime myLatSetTime; + ArTime myLastLatSent; + int myLastActionLatVal; + bool myActionLatSet; + + double myLastSentTransVelMax; + double myLastSentTransAccel; + double myLastSentTransDecel; + double myLastSentRotVelMax; + double myLastSentRotVelPosMax; + double myLastSentRotVelNegMax; + double myLastSentRotAccel; + double myLastSentRotDecel; + double myLastSentLatVelMax; + double myLastSentLatAccel; + double myLastSentLatDecel; + + ArTime myLastPulseSent; + + int myDirectPrecedenceTime; + + int myStateReflectionRefreshTime; + + ArActionDesired myActionDesired; + + std::string myName; + std::string myRobotName; + std::string myRobotType; + std::string myRobotSubType; + + double myAbsoluteMaxTransVel; + double myAbsoluteMaxTransNegVel; + double myAbsoluteMaxTransAccel; + double myAbsoluteMaxTransDecel; + double myAbsoluteMaxRotVel; + double myAbsoluteMaxRotAccel; + double myAbsoluteMaxRotDecel; + double myAbsoluteMaxLatVel; + double myAbsoluteMaxLatAccel; + double myAbsoluteMaxLatDecel; + + ArDeviceConnection *myConn; + + ArRobotPacketSender mySender; + ArRobotPacketReceiver myReceiver; + + std::string myDropConnectionReason; + + ArRobotParams *myParams; + double myRobotLengthFront; + double myRobotLengthRear; + + ArInterpolation myInterpolation; + ArInterpolation myEncoderInterpolation; + + ArKeyHandler *myKeyHandler; + bool myKeyHandlerUseExitNotShutdown; + + bool myConnectWithNoParams; + bool myWarnedAboutExtraSonar; + + // variables for tracking the data stream + time_t myTimeLastMotorPacket; + int myMotorPacCurrentCount; + int myMotorPacCount; + time_t myTimeLastSonarPacket; + int mySonarPacCurrentCount; + int mySonarPacCount; + unsigned int myCycleTime; + unsigned int myCycleWarningTime; + unsigned int myConnectionCycleMultiplier; + bool myCycleChained; + ArTime myLastPacketReceivedTime; + ArTime myLastOdometryReceivedTime; + int myTimeoutTime; + + bool myRequestedIOPackets; + bool myRequestedEncoderPackets; + + // all the state reflecing variables + ArPoseWithTime myEncoderPose; + ArTime myEncoderPoseTaken; + ArPose myGlobalPose; + // um, this myEncoderGlobalTrans doesn't do anything + ArTransform myEncoderGlobalTrans; + double myLeftVel; + double myRightVel; + bool myIgnoreMicroControllerBatteryInfo; + double myBatteryVoltage; + ArRunningAverage myBatteryAverager; + double myRealBatteryVoltage; + ArRunningAverage myRealBatteryAverager; + bool myHaveStateOfCharge; + double myStateOfCharge; + ArTime myStateOfChargeSetTime; + double myStateOfChargeLow; + double myStateOfChargeShutdown; + + int myStallValue; + double myControl; + bool myKeepControlRaw; + int myFlags; + int myFaultFlags; + bool myHasFaultFlags; + double myCompass; + int myAnalogPortSelected; + unsigned char myAnalog; + unsigned char myDigIn; + unsigned char myDigOut; + int myIOAnalog[128]; + unsigned char myIODigIn[255]; + unsigned char myIODigOut[255]; + int myIOAnalogSize; + int myIODigInSize; + int myIODigOutSize; + ArTime myLastIOPacketReceivedTime; + double myVel; + double myRotVel; + double myLatVel; + int myLastX; + int myLastY; + int myLastTh; + ChargeState myChargeState; + bool myOverriddenChargeState; + bool myIsChargerPowerGood; + bool myOverriddenIsChargerPowerGood; + + char myTemperature; + + double myTripOdometerDistance; + double myTripOdometerDegrees; + ArTime myTripOdometerStart; + + double myOdometerDistance; + double myOdometerDegrees; + ArTime myOdometerStart; + + int myOdometryDelay; + + bool myDoNotSwitchBaud; + + bool myAddedAriaExitCB; + ArFunctorC myAriaExitCB; + + ArRetFunctor3C myPoseInterpPositionCB; + ArRetFunctor3C myEncoderPoseInterpPositionCB; +}; + + +#endif // ARROBOT_H diff --git a/Legacy/Aria/include/ArRobotBatteryPacketReader.h b/Legacy/Aria/include/ArRobotBatteryPacketReader.h new file mode 100644 index 0000000..e3a7dcf --- /dev/null +++ b/Legacy/Aria/include/ArRobotBatteryPacketReader.h @@ -0,0 +1,100 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTBATTERYPACKETREADER_H +#define ARROBOTBATTERYPACKETREADER_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" + +class ArRobot; +class ArRobotPacket; + +/// This class will read a config packet from the robot +class ArRobotBatteryPacketReader +{ +public: + /// Constructor + AREXPORT ArRobotBatteryPacketReader(ArRobot *robot); + /// Destructor + AREXPORT ~ArRobotBatteryPacketReader(); + /// Request a single packet.. + AREXPORT void requestSinglePacket(void); + /// Request a continous stream of packets + AREXPORT void requestContinuousPackets(void); + /// Stop the stream of packets + AREXPORT void stopPackets(void); + /// See if we've requested packets + AREXPORT bool haveRequestedPackets(void); + /// See if we've gotten the data + bool hasPacketArrived(void) const { return myPacketArrived; } + /// Gets the number of batteries + int getNumBatteries(void) const { return myNumBatteries; } + /// Gets the number of bytes per battery + int getNumBytesPerBattery(void) const { return myNumBytesPerBattery; } + /// Gets the flags1 for a particular battery + int getFlags1(int battery) { return myFlags1[battery]; } + /// Gets the flags2 for a particular battery + int getFlags2(int battery) { return myFlags2[battery]; } + /// Gets the flags3 for a particular battery + int getFlags3(int battery) { return myFlags3[battery]; } + /// Gets the relative state of charge for a particular battery + int getRelSOC(int battery) { return myRelSOC[battery]; } + /// Gets the absolute state of charge for a particular battery + int getAbsSOC(int battery) { return myAbsSOC[battery]; } + + +protected: + /// internal, packet handler + AREXPORT bool packetHandler(ArRobotPacket *packet); + /// internal, packet handler + AREXPORT void connectCallback(void); + + // the robot + ArRobot *myRobot; + + int myNumBatteries; + int myNumBytesPerBattery; + std::map myFlags1; + std::map myFlags2; + std::map myFlags3; + std::map myRelSOC; + std::map myAbsSOC; + + + // whether our data has been received or not + bool myPacketArrived; + // last time we requested a packet (we'll only ask every 200 ms) + ArTime myLastPacketRequest; + + bool myRequestedBatteryPackets; + + // the callback + ArRetFunctor1C myPacketHandlerCB; + ArFunctorC myConnectCB; +}; + +#endif // ARROBOTBATTERYPACKETREADER_H diff --git a/Legacy/Aria/include/ArRobotConfig.h b/Legacy/Aria/include/ArRobotConfig.h new file mode 100644 index 0000000..379c4a0 --- /dev/null +++ b/Legacy/Aria/include/ArRobotConfig.h @@ -0,0 +1,75 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTCONFIG_H +#define ARROBOTCONFIG_H + +#include "ArFunctor.h" + +class ArRobot; +class ArAnalogGyro; + +/// Class for controlling robot movement parameters from config +class ArRobotConfig +{ +public: + /// Constructor + AREXPORT ArRobotConfig(ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArRobotConfig(); + /// Adds a gyro to turn on and off + AREXPORT void addAnalogGyro(ArAnalogGyro *gyro); + /// Called when we process the config + AREXPORT bool processFile(void); + /// Called when we connect to the robot + AREXPORT void connectCallback(void); +protected: + ArRobot *myRobot; + ArAnalogGyro *myAnalogGyro; + + bool mySavedOriginalMovementParameters; + int myOriginalTransVelMax; + int myOriginalTransAccel; + int myOriginalTransDecel; + int myOriginalRotVelMax; + int myOriginalRotAccel; + int myOriginalRotDecel; + + bool myAddedMovementParams; + int myTransVelMax; + int myTransAccel; + int myTransDecel; + int myRotVelMax; + int myRotAccel; + int myRotDecel; + + bool myAddedGyro; + bool myUseGyro; + + ArFunctorC myConnectCB; + ArRetFunctorC myProcessFileCB; +}; + +#endif diff --git a/Legacy/Aria/include/ArRobotConfigPacketReader.h b/Legacy/Aria/include/ArRobotConfigPacketReader.h new file mode 100644 index 0000000..4f8e544 --- /dev/null +++ b/Legacy/Aria/include/ArRobotConfigPacketReader.h @@ -0,0 +1,293 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTCONFIGPACKETREADER_H +#define ARROBOTCONFIGPACKETREADER_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" +#include "ArRobotPacket.h" + +class ArRobot; + + +/// This class will read a config packet from the robot +class ArRobotConfigPacketReader +{ +public: + /// Constructor + AREXPORT ArRobotConfigPacketReader(ArRobot *robot, + bool onlyOneRequest = false, + ArFunctor *packetedArrivedCB = NULL); + /// Destructor + AREXPORT ~ArRobotConfigPacketReader(); + /// Request a packet.. true if we could, false if onlyOneRequest already done + AREXPORT bool requestPacket(void); + /// See if we've requested a packet yet + bool hasPacketBeenRequested(void) const { return myPacketRequested; } + /// See if we've gotten the data + bool hasPacketArrived(void) const { return myPacketArrived; } + /// Gets a pointer to the packet that we built the config packet from + const ArRobotPacket *getRobotPacket(void) const { return &myPacket; } + /// Log the config + AREXPORT void log(void) const; + /// Log the movement part of the config config + AREXPORT void logMovement(void) const; + /// Builds a string of the info + AREXPORT std::string buildString(void) const; + /// Builds a string of the movement info + AREXPORT std::string buildStringMovement(void) const; + /// Gets the type of robot + const char *getType(void) const { return myType.c_str(); } + /// Gets the subtype of robot + const char *getSubType(void) const { return mySubType.c_str(); } + /// Gets the serial number of the robot + const char *getSerialNumber(void) const { return mySerialNumber.c_str(); } + /// Gets the absolute maximum rotational velocity in deg/sec (cannot be set above this in firmware or through software) + int getRotVelTop(void) const { return myRotVelTop; } + /// Gets the absolute maximum translational velocity in mm/sec (cannot be set above this in firmware or through software) + int getTransVelTop(void) const { return myTransVelTop; } + /// Gets the absolute maximum rotational acceleration in deg/sec/sec (cannot be set above this in firmware or through software) + int getRotAccelTop(void) const { return myRotAccelTop; } + /// Gets the absolute maximum translational acceleration in mm/sec/sec (cannot be set above this in firmware or through software) + int getTransAccelTop(void) const { return myTransAccelTop; } + /// Gets the maximum PWM the robot will have (stallval cannot be above this) + int getPwmMax(void) const { return myPwmMax; } + /// Gets the name of the robot + const char *getName(void) const { return myName.c_str(); } + /// Gets the cycle time in ms of the motor packets + int getSipCycleTime(void) const { return mySipCycleTime; } + /// Gets the host baud number, look at the manual for what these mean + int getHostBaud(void) const { return myHostBaud; } + /// Gets the host baud number, look at the manual for what these mean + int getAux1Baud(void) const { return myAux1Baud; } + /// Gets the gripper value (whether or not the robot has a gripper) + bool getHasGripper(void) const { return myHasGripper; } + /// Gets whether or not the robot has front sonar + bool getFrontSonar(void) const { return myFrontSonar; } + /// Gets whether or not the robot has rear sonar + bool getRearSonar(void) const { return myRearSonar; } + /// Gets the low battery beeping indicating voltage times 10 + int getLowBattery(void) const { return myLowBattery; } + /// Gets the revcount + int getRevCount(void) const { return myRevCount; } + /// Gets the watchdog (how many ms after command robot stops) + int getWatchdog(void) const { return myWatchdog; } + /// Returns if the robot is using normal packets or new style packets + bool getNormalMPacs(void) const { return myNormalMPacs; } + /// Returns the stallval (pwms at which robot stalls) + int getStallVal(void) const { return myStallVal; } + /// Returns the stallcount (how many 10ms increments robot stops after stall) + int getStallCount(void) const { return myStallCount; } + /// Returns the joystick translational velocity + int getJoyVel(void) const { return myJoyVel; } + /// Returns the joystick rotational velocity + int getJoyRotVel(void) const { return myJoyRotVel; } + /// Returns the current maximum rotational velocity (deg/sec) (can be set) + int getRotVelMax(void) const { return myRotVelMax; } + /// Returns the current maximum translational velocity (mm/sec) (can be set) + int getTransVelMax(void) const { return myTransVelMax; } + /// Returns the rotational acceleration + int getRotAccel(void) const { return myRotAccel; } + /// Returns the rotational deceleration + int getRotDecel(void) const { return myRotDecel; } + /// Returns the rotational KP value (look at the manual) + int getRotKP(void) const { return myRotKP; } + /// Returns the rotational KV value (look at the manual) + int getRotKV(void) const { return myRotKV; } + /// Returns the rotational KI value (look at the manual) + int getRotKI(void) const { return myRotKI; } + /// Returns the translational acceleration + int getTransAccel(void) const { return myTransAccel; } + /// Returns the translational deceleration + int getTransDecel(void) const { return myTransDecel; } + /// Returns the translational KP value (look at the manual) + int getTransKP(void) const { return myTransKP; } + /// Returns the translational KV value (look at the manual) + int getTransKV(void) const { return myTransKV; } + /// Returns the translational KI value (look at the manual) + int getTransKI(void) const { return myTransKI; } + /// Returns the number of front bumpers + int getFrontBumps(void) const { return myFrontBumps; } + /// Returns the number of rear bumpers + int getRearBumps(void) const { return myRearBumps; } + /// Returns whether the robot has a charger + int getHasCharger(void) const { return myHasCharger; } + /// Returns the number of ms the sonar cycle is (default is 40) + int getSonarCycle(void) const { return mySonarCycle; } + /// Returns the baud rate + bool getResetBaud(void) const { return myResetBaud; } + /// Returns if the robot has a gyro or not + bool getHasGyro(void) const { return myHasGyro; } + /// Returns if the robot has a gyro or not + int getGyroType(void) const { return myGyroType; } + /// Returns the DriftFactor value (see the manual) + int getDriftFactor(void) const { return myDriftFactor; } + /// Returns the Aux2 baud number, look at the manual for what these mean + int getAux2Baud(void) const { return myAux2Baud; } + /// Returns the Aux3 baud number, look at the manual for what these mean + int getAux3Baud(void) const { return myAux3Baud; } + /// Returns the Ticks/MM for the robot + int getTicksMM(void) const { return myTicksMM; } + /// Returns the voltage (x10) that the robot will shut down the computer at + int getShutdownVoltage(void) const { return myShutdownVoltage; } + /// Gets the firmware version + const char *getFirmwareVersion(void) const + { return myFirmwareVersion.c_str(); } + /// Gets the gyro CW value + int getGyroCW(void) const { return myGyroCW; } + /// Gets the gyro CCW value + int getGyroCCW(void) const { return myGyroCCW; } + /// Gets the kinematics delay + int getKinematicsDelay(void) const { return myKinematicsDelay; } + /// Gets the absolute maximum lateral velocity in mm/sec (cannot be set above this in firmware or through software) + int getLatVelTop(void) const { return myLatVelTop; } + /// Gets the absolute maximum lateral acceleration in mm/sec/sec (cannot be set above this in firmware or through software) + int getLatAccelTop(void) const { return myLatAccelTop; } + /// Returns the current maximum lateral velocity (mm/sec) (can be set) + int getLatVelMax(void) const { return myLatVelMax; } + /// Returns the lateral acceleration + int getLatAccel(void) const { return myLatAccel; } + /// Returns the lateral deceleration + int getLatDecel(void) const { return myLatDecel; } + /// Gets the powerbot charge threshold + int getPowerbotChargeThreshold(void) const + { return myPowerbotChargeThreshold; } + /// Gets the port the PDB is on + unsigned char getPDBPort(void) const + { return myPDBPort; } + /// Gets the port the PDB is on + int getGyroRateLimit(void) const + { return myGyroRateLimit; } + /// Gets the high temperature threshold + char getHighTemperatureShutdown(void) const + { return myHighTemperatureShutdown; } + /// Gets the power bits + int getPowerBits(void) const + { return myPowerBits; } + /// Gets the battery type + unsigned char getBatteryType(void) const + { return myBatteryType; } + /// Gets the warning state of charge + int getStateOfChargeLow(void) const + { return myStateOfChargeLow; } + /// Gets the shutdown state of charge + int getStateOfChargeShutdown(void) const + { return myStateOfChargeShutdown; } + /// internal, packet handler + AREXPORT bool packetHandler(ArRobotPacket *packet); + /// internal, connection callback + AREXPORT void connected(void); +protected: + // the different parameters from the robot + std::string myType; + std::string mySubType; + std::string mySerialNumber; + int myRotVelTop; + int myTransVelTop; + int myRotAccelTop; + int myTransAccelTop; + int myPwmMax; + std::string myName; + int mySipCycleTime; + int myHostBaud; + int myAux1Baud; + bool myHasGripper; + bool myFrontSonar; + bool myRearSonar; + int myLowBattery; + int myRevCount; + int myWatchdog; + bool myNormalMPacs; + int myStallVal; + int myStallCount; + int myJoyVel; + int myJoyRotVel; + int myRotVelMax; + int myTransVelMax; + int myRotAccel; + int myRotDecel; + int myRotKP; + int myRotKV; + int myRotKI; + int myTransAccel; + int myTransDecel; + int myTransKP; + int myTransKV; + int myTransKI; + int myFrontBumps; + int myRearBumps; + int myHasCharger; + int mySonarCycle; + bool myResetBaud; + bool myHasGyro; + int myGyroType; + int myDriftFactor; + int myAux2Baud; + int myAux3Baud; + int myTicksMM; + int myShutdownVoltage; + std::string myFirmwareVersion; + int myGyroCW; + int myGyroCCW; + int myKinematicsDelay; + int myLatVelTop; + int myLatAccelTop; + int myLatVelMax; + int myLatAccel; + int myLatDecel; + int myPowerbotChargeThreshold; + unsigned char myPDBPort; + int myGyroRateLimit; + char myHighTemperatureShutdown; + int myPowerBits; + unsigned char myBatteryType; + int myStateOfChargeLow; + int myStateOfChargeShutdown; + + // the robot + ArRobot *myRobot; + // whether only one request can be done or not + bool myOnlyOneRequest; + // whether a request has been made or not + bool myPacketRequested; + // whether our data has been received or not + bool myPacketArrived; + // last time we requested a packet (we'll only ask every 200 ms) + ArTime myLastPacketRequest; + // a copy of the packet + ArRobotPacket myPacket; + + // the callback + ArRetFunctor1C myPacketHandlerCB; + // callback for connectiosn in case we need to request a config packet + ArFunctorC myConnectedCB; + // callback for when we get a packet + ArFunctor *myPacketArrivedCB; + +}; + +#endif // ARROBOTCONFIGPACKETREADER_H diff --git a/Legacy/Aria/include/ArRobotConnector.h b/Legacy/Aria/include/ArRobotConnector.h new file mode 100644 index 0000000..be94706 --- /dev/null +++ b/Legacy/Aria/include/ArRobotConnector.h @@ -0,0 +1,165 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTCONNECTOR_H +#define ARROBOTCONNECTOR_H + +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ariaUtil.h" + +class ArRobot; +class ArSonarConnector; +class ArBatteryConnector; +//class ArLCDConnector; + +/** Connect to robot or simulator based on program command line parameters. + + ArRobotConnector makes a robot connection either through a TCP + port (for the simulator or for robots with Ethernet-serial bridge + devices instead of onboard computers), or through a direct serial + port connection. Normally, it first attempts a TCP connection on + @a localhost port 8101, to use a simulator if running. If the simulator + is not running, then it normally then connects using the serial port + (the first serial port, COM1, by default). Various other connection + parameters are configurable through command-line arguments. + + When you create your ArRobotConnector, pass it command line parameters via + either the argc and argv variables from main(), or pass it an + ArArgumentBuilder or ArArgumentParser object. (ArArgumentBuilder + is able to obtain command line parameters from a Windows program + that uses WinMain() instead of main()). + ArRobotConnector registers a callback with the global Aria class. Use + Aria::parseArgs() to parse all command line parameters to the program, and + Aria::logOptions() to print out information about all registered command-line parameters. + + The following command-line arguments are checked: + @verbinclude ArRobotConnector_options + + You can then prepare an ArRobot object for connection (with various connection + options configured via the command line parameters) and initiate the connection + attempt by that object by calling connectRobot(). + + After it's connected, you must then begin the robot processing cycle by calling + ArRobot::runAsync() or ArRobot::run(). + + @sa ArLaserConnector + @sa ArRobot + + @since 2.7.0 + + @ingroup ImportantClasses + @ingroup DeviceClasses + +**/ +class ArRobotConnector +{ +public: + /// Constructor that takes argument parser + AREXPORT ArRobotConnector(ArArgumentParser *parser, ArRobot *robot, + bool autoParseArgs = true, bool connectAllComponents = true); + /// Destructor + AREXPORT ~ArRobotConnector(void); + /// Sets up the given robot to be connected + AREXPORT bool setupRobot(void); + /// Sets up an arbitrary robot to be connected + AREXPORT bool setupRobot(ArRobot *robot); + /// Sets up the robot then connects it + AREXPORT bool connectRobot(void); + /// Sets up the robot then connects it + AREXPORT bool connectRobot(ArRobot *robot); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Gets the remote host, if one was used, or NULL if it wasn't + AREXPORT const char *getRemoteHost(void) const; + /// Gets if the remote connection is a sim + AREXPORT bool getRemoteIsSim(void) const; + /// Call for forcing the remote to be a sim (mostly for internal use) + AREXPORT void setRemoteIsSim(bool remoteIsSim); + /// Gets the robot this connector is using (mostly for backwards compatibility stuff) + AREXPORT ArRobot *getRobot(void); +protected: + // the robot we've set up (so we can find its params) + ArRobot *myRobot; + // if we're using the sim or not + bool myUsingSim; + // if we're connecting via tcp (not to the sim), what remote host + const char *myRemoteHost; + // robot port, if there isn't one this'll be NULL, which will just + // be the default of ArUtil::COM1 + const char *myRobotPort; + // baud for the serial + int myRobotBaud; + // robot tcp port if we're doing a remote host (defaults to 8101) + int myRemoteRobotTcpPort; + + // whether we're connecting to a remote sim or not (so we don't try + // to open a port for the laser) + bool myRemoteIsSim; + // force a sim to not look like a sim (for laser debugging mostly) + bool myRemoteIsNotSim; + // variables to hold if we're logging or not + bool myRobotLogPacketsReceived; + bool myRobotLogPacketsSent; + bool myRobotLogMovementReceived; + bool myRobotLogMovementSent; + bool myRobotLogVelocitiesReceived; + bool myRobotLogActions; + + // if we're auto parsing the arguments when setupRobot or + // connectRobot are called + bool myAutoParseArgs; + // If we've parsed the args already or not + bool myHaveParsedArgs; + + // If true, create additional connectors such as sonar, battery, lcd. + bool myConnectAllComponents; + + + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + + // a few device connections to use to connect to the robot + ArTcpConnection myRobotTcpConn; + ArSerialConnection myRobotSerConn; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; + +// ArLCDConnector *myLCDConnector; + ArBatteryConnector *myBatteryConnector; + ArSonarConnector *mySonarConnector; +}; + + +#endif diff --git a/Legacy/Aria/include/ArRobotJoyHandler.h b/Legacy/Aria/include/ArRobotJoyHandler.h new file mode 100644 index 0000000..15779a7 --- /dev/null +++ b/Legacy/Aria/include/ArRobotJoyHandler.h @@ -0,0 +1,101 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTJOYHANDLER_H +#define ARROBOTJOYHANDLER_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +class ArRobot; +class ArRobotPacket; + +/// Interfaces to a joystick on the robot's microcontroller +/** + This is largely meant to be about the same as the normal joy + handler but gets the data back from the robot about the joystick, + but this sameness is why it reports things as it does. + + Also note that x is usually rotational velocity (since it right/left), + whereas Y is translational (since it is up/down). + + @ingroup OptionalClasses +**/ +class ArRobotJoyHandler +{ + public: + /// Constructor + AREXPORT ArRobotJoyHandler(ArRobot *robot); + /// Destructor + AREXPORT ~ArRobotJoyHandler(); + /// Gets the adjusted reading, as floats + AREXPORT void getDoubles(double *x, double *y, double *z); + /// Gets the first button + bool getButton1(void) { return myButton1; } + /// Gets the second button + bool getButton2(void) { return myButton2; } + /// Gets the time we last got information back + AREXPORT ArTime getDataReceivedTime(void) { return myDataReceived; } + /// If we've ever gotten a packet back + AREXPORT bool gotData(void) { return myGotData; } + /// Adds to a section in a config + AREXPORT void addToConfig(ArConfig *config, const char *section); + /// Gets the X value (only use for information, or with the robot locked, getDoubles is preferred) + int getRawX(void) { return myRawX; } + /// Gets the Y value (only use for information, or with the robot locked, getDoubles is preferred) + int getRawY(void) { return myRawY; } + /// Gets the throttle value (only use for information, or with the robot locked, getDoubles is preferred) + int getRawThrottle(void) { return myRawThrottle; } + + protected: + AREXPORT bool handleJoystickPacket(ArRobotPacket *packet); + AREXPORT void connectCallback(void); + + ArRobot *myRobot; + ArTime myDataReceived; + bool myButton1; + bool myButton2; + double myJoyX; + double myJoyY; + double myThrottle; + bool myGotData; + + int myJoyXCenter; + int myJoyYCenter; + + int myRawX; + int myRawY; + int myRawThrottle; + + ArTime myStarted; + ArRetFunctor1C myHandleJoystickPacketCB; + ArFunctorC myConnectCB; + +}; + + +#endif // ARJOYHANDLER_H + diff --git a/Legacy/Aria/include/ArRobotPacket.h b/Legacy/Aria/include/ArRobotPacket.h new file mode 100644 index 0000000..c737182 --- /dev/null +++ b/Legacy/Aria/include/ArRobotPacket.h @@ -0,0 +1,81 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTPACKET_H +#define ARROBOTPACKET_H + +#include "ariaTypedefs.h" +#include "ArBasePacket.h" +#include "ariaUtil.h" + +/// Represents the packets sent to the robot as well as those received from it +/** + This class reimplements some of the buf operations since the robot is + opposeite endian from intel. Also has the getID for convenience. + + You can just look at the documentation for the ArBasePacket except for + the 4 new functions here, verifyCheckSum, getID, print, and calcCheckSum. + */ +class ArRobotPacket: public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArRobotPacket(unsigned char sync1 = 0xfa, + unsigned char sync2 = 0xfb); + /// Destructor + AREXPORT virtual ~ArRobotPacket(); + + /// Assignment operator + AREXPORT ArRobotPacket &operator=(const ArRobotPacket &other); + + /// returns true if the checksum matches what it should be + AREXPORT bool verifyCheckSum(void); + + /// returns the ID of the packet + AREXPORT ArTypes::UByte getID(void); + + /// Sets the ID of the packet + AREXPORT void setID(ArTypes::UByte id); + + /// returns the checksum, probably used only internally + AREXPORT ArTypes::Byte2 calcCheckSum(void); + + // only call finalizePacket before a send + AREXPORT virtual void finalizePacket(void); + + /// Gets the time the packet was received at + AREXPORT ArTime getTimeReceived(void); + /// Sets the time the packet was received at + AREXPORT void setTimeReceived(ArTime timeReceived); + + AREXPORT virtual void log(); + +protected: + unsigned char mySync1; + unsigned char mySync2; + ArTime myTimeReceived; +}; + +#endif // ARROBOTPACKET_H diff --git a/Legacy/Aria/include/ArRobotPacketReaderThread.h b/Legacy/Aria/include/ArRobotPacketReaderThread.h new file mode 100644 index 0000000..eb288a0 --- /dev/null +++ b/Legacy/Aria/include/ArRobotPacketReaderThread.h @@ -0,0 +1,59 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTPACKETREADER_H +#define ARROBOTPACKETREADER_H + + +#include "ariaTypedefs.h" +#include "ArASyncTask.h" + + +class ArRobot; + + +class ArRobotPacketReaderThread : public ArASyncTask +{ +public: + + AREXPORT ArRobotPacketReaderThread(); + AREXPORT virtual ~ArRobotPacketReaderThread(); + + AREXPORT void setRobot(ArRobot *robot); + + AREXPORT void stopRunIfNotConnected(bool stopRun); + AREXPORT virtual void * runThread(void *arg); + + AREXPORT virtual const char *getThreadActivity(void); + + +protected: + bool myStopRunIfNotConnected; + ArRobot *myRobot; + bool myInRun; +}; + + +#endif // ARSYNCLOOP_H diff --git a/Legacy/Aria/include/ArRobotPacketReceiver.h b/Legacy/Aria/include/ArRobotPacketReceiver.h new file mode 100644 index 0000000..13ac6ea --- /dev/null +++ b/Legacy/Aria/include/ArRobotPacketReceiver.h @@ -0,0 +1,101 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTPACKETRECEIVER_H +#define ARROBOTPACKETRECEIVER_H + +#include "ariaTypedefs.h" +#include "ArRobotPacket.h" + + +class ArDeviceConnection; + +/// Given a device connection it receives packets from the robot through it +class ArRobotPacketReceiver +{ +public: + /// Constructor without an already assigned device connection + AREXPORT ArRobotPacketReceiver(bool allocatePackets = false, + unsigned char sync1 = 0xfa, + unsigned char sync2 = 0xfb); + /// Constructor with assignment of a device connection + AREXPORT ArRobotPacketReceiver(ArDeviceConnection *deviceConnection, + bool allocatePackets = false, + unsigned char sync1 = 0xfa, + unsigned char sync2 = 0xfb); + /// Constructor with assignment of a device connection and tracking + AREXPORT ArRobotPacketReceiver(ArDeviceConnection *deviceConnection, + bool allocatePackets, + unsigned char sync1, + unsigned char sync2, + bool tracking, + const char *trackingLogName); + /// Destructor + AREXPORT virtual ~ArRobotPacketReceiver(); + + /// Receives a packet from the robot if there is one available + AREXPORT ArRobotPacket *receivePacket(unsigned int msWait = 0); + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *deviceConnection); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + /// Gets whether or not the receiver is allocating packets + AREXPORT bool isAllocatingPackets(void) { return myAllocatePackets; } + /// Sets whether or not the receiver is allocating packets + AREXPORT void setAllocatingPackets(bool allocatePackets) + { myAllocatePackets = allocatePackets; } + +#ifdef DEBUG_SPARCS_TESTING + AREXPORT void setSync1(unsigned char s1) { mySync1 = s1; } + AREXPORT void setSync2(unsigned char s2) { mySync2 = s2; } +#endif + + AREXPORT void setTracking(bool tracking) + { myTracking = tracking; } + + AREXPORT void setTrackingLogName(const char *trackingLogName) + { myTrackingLogName = trackingLogName; } + + /// Sets the callback that gets called with the finalized version of + /// every packet set... this is ONLY for very internal very + /// specialized use + AREXPORT void setPacketReceivedCallback(ArFunctor1 *functor); +protected: + ArDeviceConnection *myDeviceConn; + bool myTracking; + std::string myTrackingLogName; + + bool myAllocatePackets; + ArRobotPacket myPacket; + enum { STATE_SYNC1, STATE_SYNC2, STATE_ACQUIRE_DATA }; + unsigned char mySync1; + unsigned char mySync2; + + ArFunctor1 *myPacketReceivedCallback; +}; + +#endif // ARROBOTPACKETRECEIVER_H diff --git a/Legacy/Aria/include/ArRobotPacketSender.h b/Legacy/Aria/include/ArRobotPacketSender.h new file mode 100644 index 0000000..7691187 --- /dev/null +++ b/Legacy/Aria/include/ArRobotPacketSender.h @@ -0,0 +1,95 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTPACKETSENDER_H +#define ARROBOTPACKETSENDER_H + +#include "ariaTypedefs.h" +#include "ArRobotPacket.h" + +class ArDeviceConnection; + +/// Given a device connection this sends commands through it to the robot + +class ArRobotPacketSender +{ +public: + /// Constructor without an already assigned device connection + AREXPORT ArRobotPacketSender(unsigned char sync1 = 0xfa, + unsigned char sync2 = 0xfb); + /// Constructor with assignment of a device connection + AREXPORT ArRobotPacketSender(ArDeviceConnection *deviceConnection, + unsigned char sync1 = 0xfa, + unsigned char sync2 = 0xfb); + /// Constructor with assignment of a device connection and tracking + AREXPORT ArRobotPacketSender(ArDeviceConnection *deviceConnection, + unsigned char sync1, + unsigned char sync2, + bool tracking, + const char *trackingLogName); + /// Destructor + AREXPORT virtual ~ArRobotPacketSender(); + + /// Sends a command to the robot with no arguments + AREXPORT bool com(unsigned char command); + /// Sends a command to the robot with an int for argument + AREXPORT bool comInt(unsigned char command, short int argument); + /// Sends a command to the robot with two bytes for argument + AREXPORT bool com2Bytes(unsigned char command, char high, char low); + /// Sends a command to the robot with a length-prefixed string for argument + AREXPORT bool comStr(unsigned char command, const char *argument); + /// Sends a command to the robot with a length-prefixed string for argument + AREXPORT bool comStrN(unsigned char command, const char *str, int size); + /// Sends a command containing exactly the data in the given buffer as argument + AREXPORT bool comDataN(unsigned char command, const char *data, int size); + /// Sends a ArRobotPacket + AREXPORT bool sendPacket(ArRobotPacket *packet); + + /// Sets the device this instance sends commands to + AREXPORT void setDeviceConnection(ArDeviceConnection *deviceConnection); + /// Gets the device this instance sends commands to + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + /// Sets the callback that gets called with the finalized version of + /// every packet set... this is ONLY for very internal very + /// specialized use + AREXPORT void setPacketSentCallback(ArFunctor1 *functor); +protected: + bool connValid(void); + ArDeviceConnection * myDeviceConn; + ArRobotPacket myPacket; + + bool myTracking; + std::string myTrackingLogName; + + ArMutex mySendingMutex; + + ArFunctor1 *myPacketSentCallback; + + enum { INTARG = 0x3B, NINTARG = 0x1B, STRARG = 0x2B }; +}; + + +#endif //ARROBOTPACKETSENDER_H diff --git a/Legacy/Aria/include/ArRobotParams.h b/Legacy/Aria/include/ArRobotParams.h new file mode 100644 index 0000000..f3112b6 --- /dev/null +++ b/Legacy/Aria/include/ArRobotParams.h @@ -0,0 +1,1296 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTPARAMS_H +#define ARROBOTPARAMS_H + +#include "ariaTypedefs.h" +#include "ArConfig.h" +#include + +#ifndef SWIG + +/// Stores a set of video device parameters read from one of the video sections of a robot parameter file. +/// @internal +/// @swigomit +class ArVideoParams +{ +public: + std::string type; + bool connect; bool connectSet; + int imageWidth; + int imageHeight; + int deviceIndex; + std::string deviceName; + int channel; + std::string analogSignalFormat; + std::string address; + int tcpPort; bool tcpPortSet; + bool inverted; bool invertedSet; + ArVideoParams() : + type("unknown"), + connect(false), + connectSet(false), + imageWidth(-1), + imageHeight(-1), + deviceIndex(-1), + deviceName("none"), + channel(1), + analogSignalFormat(""), + address("192.168.0.90"), + tcpPort(80), + tcpPortSet(false), + inverted(false), + invertedSet(false) + {} + /// Copy values of any parameters in @a other into @a this, if given in @a other + AREXPORT void merge(const ArVideoParams& other); + void setType(const std::string& t) { type = t; } + void setConnect(bool c) { connect = c; connectSet = true; } + void setImageSize(int w, int h) { imageWidth = w; imageHeight = h; } + void setInverted(bool i) { inverted = i; invertedSet = true; } + void setDevice(const std::string& name, int idx, int chan) + { + deviceName = name; + deviceIndex = idx; + channel = chan; + } + void setAddress(const std::string& a) { address = a; } + void setTCPPort(int p) { tcpPort = p; tcpPortSet = true; } +}; + +/// Stores a set of PTZ/PTU device parameters read from one of the PTZ sections of a robot parameter file. +/// @internal +/// @swigomit +class ArPTZParams +{ +public: + std::string type; + bool connect; bool connectSet; + std::string serialPort; + int robotAuxPort; + std::string address; + int tcpPort; bool tcpPortSet; + bool inverted; bool invertedSet; + ArPTZParams() : + type("unknown"), + connect(false), + connectSet(false), + serialPort("none"), + robotAuxPort(-1), + address("192.168.0.90"), + tcpPort(80), + tcpPortSet(false), + inverted(false), + invertedSet(false) + {} + /// Copy values of any parameters in @a other into @a this, if given in @a other + void merge(const ArPTZParams& other); + void setType(const std::string& t) { type = t; } + void setConnect(bool c) { connect = c; connectSet = true; } + void setSerialPort(const std::string& sp) { serialPort = sp; } + void setTcpPort(int p) { tcpPort = p; tcpPortSet = true; } + void setRobotAuxPort(int p) { robotAuxPort = p; } + void setInverted(bool i) { inverted = i; invertedSet = true; } + void setAddress(const std::string& a) { address = a; } +}; + +#endif // ifndef SWIG + +///Stores parameters read from the robot's parameter files +/** + Use ArRobot::getRobotParams() after a successful robot + connection to obtain a pointer to an ArRobotParams instance containing the + values read from the files. + + See @ref ParamFiles for a description of the robot parameter files. + + ArRobotParams is a subclass of ArConfig which contains some useful methods + and features. +*/ +class ArRobotParams : public ArConfig +{ +public: + /// Constructor + AREXPORT ArRobotParams(); + /// Destructor + AREXPORT virtual ~ArRobotParams(); + /// Returns the class from the parameter file + const char *getClassName(void) const { return myClass; } + /// Returns the subclass from the parameter file + const char *getSubClassName(void) const { return mySubClass; } + /// Returns the robot's radius + double getRobotRadius(void) const { return myRobotRadius; } + /// Returns the robot diagonal (half-height to diagonal of octagon) + double getRobotDiagonal(void) const { return myRobotDiagonal; } + /// Returns the robot's width + double getRobotWidth(void) const { return myRobotWidth; } + /// Returns the robot's length + double getRobotLength(void) const { return myRobotLength; } + /// Returns the robot's length to the front of the robot + double getRobotLengthFront(void) const { return myRobotLengthFront; } + /// Returns the robot's length to the rear of the robot + double getRobotLengthRear(void) const { return myRobotLengthRear; } + /// Returns whether the robot is holonomic or not + bool isHolonomic(void) const { return myHolonomic; } + /// Returns if the robot has a built in move command + bool hasMoveCommand(void) const { return myHaveMoveCommand; } + /// Returns the max velocity of the robot + int getAbsoluteMaxVelocity(void) const { return myAbsoluteMaxVelocity; } + /// Returns the max rotational velocity of the robot + int getAbsoluteMaxRotVelocity(void) const { return myAbsoluteMaxRVelocity; } + /// Returns the max lateral velocity of the robot + int getAbsoluteMaxLatVelocity(void) const + { return myAbsoluteMaxLatVelocity; } + /// Returns true if IO packets are automatically requested upon connection to the robot. + bool getRequestIOPackets(void) const { return myRequestIOPackets; } + /// Returns true if encoder packets are automatically requested upon connection to the robot. + bool getRequestEncoderPackets(void) const { return myRequestEncoderPackets; } + /// Returns the baud rate set in the param to talk to the robot at + int getSwitchToBaudRate(void) const { return mySwitchToBaudRate; } + /// Returns the angle conversion factor + double getAngleConvFactor(void) const { return myAngleConvFactor; } + /// Returns the distance conversion factor + double getDistConvFactor(void) const { return myDistConvFactor; } + /// Returns the velocity conversion factor + double getVelConvFactor(void) const { return myVelConvFactor; } + /// Returns the sonar range conversion factor + double getRangeConvFactor(void) const { return myRangeConvFactor; } + /// Returns the wheel velocity difference to angular velocity conv factor + double getDiffConvFactor(void) const { return myDiffConvFactor; } + /// Returns the multiplier for VEL2 commands + double getVel2Divisor(void) const { return myVel2Divisor; } + /// Returns the multiplier for the Analog Gyro + double getGyroScaler(void) const { return myGyroScaler; } + /// Returns true if the robot has table sensing IR + bool haveTableSensingIR(void) const { return myTableSensingIR; } + /// Returns true if the robot's table sensing IR bits are sent in the 4th-byte of the IO packet + bool haveNewTableSensingIR(void) const { return myNewTableSensingIR; } + /// Returns true if the robot has front bumpers + bool haveFrontBumpers(void) const { return myFrontBumpers; } + /// Returns the number of front bumpers + int numFrontBumpers(void) const { return myNumFrontBumpers; } + /// Returns true if the robot has rear bumpers + bool haveRearBumpers(void) const { return myRearBumpers; } + /// Returns the number of rear bumpers + int numRearBumpers(void) const { return myNumRearBumpers; } + /// Returns the number of IRs + int getNumIR(void) const { return myNumIR; } + /// Returns if the IR of the given number is valid + bool haveIR(int number) const + { + if (myIRMap.find(number) != myIRMap.end()) + return true; + else + return false; + } + /// Returns the X location of the given numbered IR + int getIRX(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = myIRMap.find(number)) == myIRMap.end()) + return 0; + if ((it2 = (*it).second.find(IR_X)) == (*it).second.end()) + + return 0; + return (*it2).second; + } + /// Returns the Y location of the given numbered IR + int getIRY(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = myIRMap.find(number)) == myIRMap.end()) + return 0; + if ((it2 = (*it).second.find(IR_Y)) == (*it).second.end()) + return 0; + return (*it2).second; + } + int getIRType(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = myIRMap.find(number)) == myIRMap.end()) + return 0; + if ((it2 = (*it).second.find(IR_TYPE)) == (*it).second.end()) + return 0; + return (*it2).second; + } + int getIRCycles(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = myIRMap.find(number)) == myIRMap.end()) + return 0; + if ((it2 = (*it).second.find(IR_CYCLES)) == (*it).second.end()) + return 0; + return (*it2).second; + } + + /// Returns the number of sonar + int getNumSonar(void) const { return myNumSonar; } + + + /// Returns if the robot has a laser (according to param file) + /** + @deprecated + **/ + bool getLaserPossessed(void) const + { + ArLog::log(ArLog::Normal, "Something called ArRobotParams::getLaserPossessed, but this is obsolete and doesn't mean anything."); + return false; + } + + /// What type of laser this is + const char *getLaserType(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserType; + else + return NULL; + } + /// What type of port the laser is on + const char *getLaserPortType(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserPortType; + else + return NULL; + } + /// What port the laser is on + const char *getLaserPort(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserPort; + else + return NULL; + } + /// If the laser should be auto connected + bool getConnectLaser(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserAutoConnect; + else + return false; + } + /// If the laser is flipped on the robot + bool getLaserFlipped(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserFlipped; + else + return false; + } + /// If the laser power is controlled by the serial port lines + bool getLaserPowerControlled(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserPowerControlled; + else + return false; + } + /// The max range to use the laser + int getLaserMaxRange(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserMaxRange; + else + return 0; + } + /// The cumulative buffer size to use for the laser + int getLaserCumulativeBufferSize(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserCumulativeBufferSize; + else + return 0; + } + /// The X location of the laser + int getLaserX(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserX; + else + return 0; + } + /// The Y location of the laser + int getLaserY(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserY; + else + return 0; + } + /// The rotation of the laser on the robot + double getLaserTh(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserTh; + else + return 0; + } + /// The height of the laser off of the ground (0 means unknown) + int getLaserZ(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserZ; + else + return 0; + } + /// Gets the string that is the readings the laser should ignore + const char *getLaserIgnore(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserIgnore; + else + return NULL; + } + /// Gets the string that is the degrees the laser should start on + const char *getLaserStartDegrees(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserStartDegrees; + else + return NULL; + } + /// Gets the string that is the degrees the laser should end on + const char *getLaserEndDegrees(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserEndDegrees; + else + return NULL; + } + /// Gets the string that is choice for the number of degrees the laser should use + const char *getLaserDegreesChoice(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserDegreesChoice; + else + return NULL; + } + /// Gets the string that is choice for the increment the laser should use + const char *getLaserIncrement(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserIncrement; + else + return NULL; + } + /// Gets the string that is choice for increment the laser should use + const char *getLaserIncrementChoice(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserIncrementChoice; + else + return NULL; + } + /// Gets the string that is choice for units the laser should use + const char *getLaserUnitsChoice(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserUnitsChoice; + else + return NULL; + } + /// Gets the string that is choice for reflectorBits the laser should use + const char *getLaserReflectorBitsChoice(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserReflectorBitsChoice; + else + return NULL; + } + /// Gets the string that is choice for starting baud the laser should use + const char *getLaserStartingBaudChoice(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserStartingBaudChoice; + else + return NULL; + } + /// Gets the string that is choice for auto baud the laser should use + const char *getLaserAutoBaudChoice(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserAutoBaudChoice; + else + return NULL; + } + + /// Gets the name of the section the laser information is in (this + /// mostly doesn't mean anything except for commercial) + const char *getLaserSection(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->mySection; + else + return NULL; + } + + /// Gets which power output that turns the laser on/off + const char *getLaserPowerOutput(int laserNumber = 1) const + { + if (getLaserData(laserNumber) != NULL) + return getLaserData(laserNumber)->myLaserPowerOutput; + else + return NULL; + } + + /// PS 8/21/12 - new code to support BatteryMTX + /// What type of battery this is + const char *getBatteryMTXBoardType (int batteryNumber = 1) const + { + if (getBatteryMTXBoardData (batteryNumber) != NULL) + return getBatteryMTXBoardData (batteryNumber)->myBatteryMTXBoardType; + else + return NULL; + } + /// What type of port the battery is on + const char *getBatteryMTXBoardPortType (int batteryNumber = 1) const + { + if (getBatteryMTXBoardData (batteryNumber) != NULL) + return getBatteryMTXBoardData (batteryNumber)->myBatteryMTXBoardPortType; + else + return NULL; + } + /// What port the battery is on + const char *getBatteryMTXBoardPort (int batteryNumber = 1) const + { + if (getBatteryMTXBoardData (batteryNumber) != NULL) + return getBatteryMTXBoardData (batteryNumber)->myBatteryMTXBoardPort; + else + return NULL; + } + /// Gets the int that is the baud for the battery + int getBatteryMTXBoardBaud (int batteryNumber = 1) const + { + if (getBatteryMTXBoardData (batteryNumber) != NULL) + return getBatteryMTXBoardData (batteryNumber)->myBatteryMTXBoardBaud; + else + return 0; + } + /// Gets a bool that specifies weather to auto connect or not + bool getBatteryMTXBoardAutoConn (int batteryNumber = 1) const + { + if (getBatteryMTXBoardData (batteryNumber) != NULL) + return getBatteryMTXBoardData (batteryNumber)->myBatteryMTXBoardAutoConn; + else + return false; + } + + + /// PS 9/4/12 - new code to support LCDMTX + /// What type of LCD this is + const char *getLCDMTXBoardType (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardType; + else + return NULL; + } + /// What type of port the lcd is on + const char *getLCDMTXBoardPortType (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardPortType; + else + return NULL; + } + /// What port the lcd is on + const char *getLCDMTXBoardPort (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardPort; + else + return NULL; + } + /// Gets the int that is the baud for the lcd + int getLCDMTXBoardBaud (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardBaud; + else + return 0; + } + /// Gets a bool that specifies weather to auto connect or not + bool getLCDMTXBoardAutoConn (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardAutoConn; + else + return false; + } + /// Gets a bool that specifies weather to disconnect on conn failure or not + bool getLCDMTXBoardConnFailOption (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardConnFailOption; + else + return false; + } + + /// Gets which power controls this LCD + const char * getLCDMTXBoardPowerOutput (int lcdNumber = 1) const + { + if (getLCDMTXBoardData (lcdNumber) != NULL) + return getLCDMTXBoardData (lcdNumber)->myLCDMTXBoardPowerOutput; + else + return NULL; + } + + + + /// PS 8/21/12 - new code to support SonarMTX + /// What type of sonar this is + const char *getSonarMTXBoardType (int sonarNumber = 1) const + { + if (getSonarMTXBoardData (sonarNumber) != NULL) + return getSonarMTXBoardData (sonarNumber)->mySonarMTXBoardType; + else + return NULL; + } + /// What type of port the sonar is on + const char *getSonarMTXBoardPortType (int sonarNumber = 1) const + { + if (getSonarMTXBoardData (sonarNumber) != NULL) + return getSonarMTXBoardData (sonarNumber)->mySonarMTXBoardPortType; + else + return NULL; + } + /// What port the sonar is on + const char *getSonarMTXBoardPort (int sonarNumber = 1) const + { + if (getSonarMTXBoardData (sonarNumber) != NULL) + return getSonarMTXBoardData (sonarNumber)->mySonarMTXBoardPort; + else + return NULL; + } + /// Gets the int that is the baud for the sonar + int getSonarMTXBoardBaud (int sonarNumber = 1) const + { + if (getSonarMTXBoardData (sonarNumber) != NULL) + return getSonarMTXBoardData (sonarNumber)->mySonarMTXBoardBaud; + else + return 0; + } + /// Gets a bool that specifies weather to auto connect or not + bool getSonarMTXBoardAutoConn (int sonarNumber = 1) const + { + if (getSonarMTXBoardData (sonarNumber) != NULL) + return getSonarMTXBoardData (sonarNumber)->mySonarMTXBoardAutoConn; + else + return false; + } + + /// What delay the sonar board has + int getSonarMTXBoardDelay(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarDelay; + else + return 0; + } + + /// What default gain the sonar board has + int getSonarMTXBoardGain(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarGain; + else + return 0; + } + + /* + /// What delay the sonar has + int getSonarMTXBoardNoiseDelta(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarGain; + else + return 0; + } + */ + + /// What delay the sonar has + int getSonarMTXBoardDetectionThreshold(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarDetectionThreshold; + else + return 0; + } + + /// What max range the sonar has + int getSonarMTXBoardMaxRange(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarMaxRange; + else + return 0; + } + + /// What autonomous driving flage the sonar has + int getSonarMTXBoardUseForAutonomousDriving(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarUseForAutonomousDriving; + else + return 0; + } + + /// Gets which power output turns the sonar board on or off + const char *getSonarMTXBoardPowerOutput(int sonarBoardNum = 1) const + { + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->mySonarMTXBoardPowerOutput; + else + return NULL; + } + + /// get number of units (ie transducers) configured on a specific board + int getNumSonarOnMTXBoard(int sonarBoardNum = 1) const + { + + if (getSonarMTXBoardData(sonarBoardNum) != NULL) + return getSonarMTXBoardData(sonarBoardNum)->myNumSonarTransducers; + else + return 0; + } + + /// get number of units (ie transducers) configued + int getNumSonarUnits() const + { + return myNumSonarUnits; + } + + /// MPL TODO discuss boardNum here? + /// Returns if the sonar of the given number is valid + bool haveSonar(int boardNum) const + { + if (mySonarMap.find(boardNum) != mySonarMap.end()) + return true; + else + return false; + } + /// Returns the X location of the given numbered sonar disc + int getSonarX(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_X)) == (*it).second.end()) + return 0; + return (*it2).second; + } + /// Returns the Y location of the given numbered sonar disc + int getSonarY(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_Y)) == (*it).second.end()) + return 0; + return (*it2).second; + } + /// Returns the heading of the given numbered sonar disc + int getSonarTh(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_TH)) == (*it).second.end()) + return 0; + return (*it2).second; + } + /// Returns the gain of the given numbered sonar disc (only + /// valid for MTX sonar) + int getSonarGain(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_GAIN)) == (*it).second.end()) + return 0; + return (*it2).second; + } + /// Returns the noise delta of the given numbered sonar disk (only + /// valid for MTX sonar) + /* + int getSonarNoiseDelta(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_NOISE_DELTA)) == (*it).second.end()) + return 0; + return (*it2).second; + } + */ + /// Returns the detection threshold of the given numbered sonar disc (only + /// valid for MTX sonar) + int getSonarDetectionThreshold(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_DETECTION_THRESHOLD)) == + (*it).second.end()) + return 0; + return (*it2).second; + } + /// Returns the thres med of the given numbered sonar disc (only + /// valid for MTX sonar) + int getSonarMaxRange(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_MAX_RANGE)) == + (*it).second.end()) + return 0; + return (*it2).second; + } + + /// Returns the useforautonomousdriving of the given numbered sonar disc (only + /// valid for MTX sonar) + int getSonarUseForAutonomousDriving(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_USE_FOR_AUTONOMOUS_DRIVING)) == + (*it).second.end()) + return 0; + return (*it2).second; + } + + /// Returns the board a sonar is on + int getSonarMTXBoard(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_BOARD)) == (*it).second.end()) + return 0; + return (*it2).second; + } + + /// Returns the unit on the board a sonar transducer is on + int getSonarMTXBoardUnitPosition(int number) const + { + std::map >::const_iterator it; + std::map::const_iterator it2; + if ((it = mySonarMap.find(number)) == mySonarMap.end()) + return 0; + if ((it2 = (*it).second.find(SONAR_BOARDUNITPOSITION)) == (*it).second.end()) + return 0; + return (*it2).second; + } + + + + /// Gets whether the VelMax values are settable or not + bool hasSettableVelMaxes(void) const { return mySettableVelMaxes; } + /// Gets the max trans vel from param file (0 uses microcontroller param) + int getTransVelMax(void) const { return myTransVelMax; } + /// Gets the max rot vel from param file (0 uses microcontroller param) + int getRotVelMax(void) const { return myRotVelMax; } + /// Whether the accelerations and decelerations are settable or not + bool hasSettableAccsDecs(void) const { return mySettableAccsDecs; } + /// Gets the trans accel from param file (0 uses microcontroller param) + int getTransAccel(void) const { return myTransAccel; } + /// Gets the trans decel from param file (0 uses microcontroller param) + int getTransDecel(void) const { return myTransDecel; } + /// Gets the rot accel from param file (0 uses microcontroller param) + int getRotAccel(void) const { return myRotAccel; } + /// Gets the rot decel from param file (0 uses microcontroller param) + int getRotDecel(void) const { return myRotDecel; } + /// Whether we have lateral control or not + bool hasLatVel(void) const { return myHasLatVel; } + /// Gets the max lat vel from param file (0 uses microcontroller param) + int getLatVelMax(void) const { return myTransVelMax; } + /// Gets the lat accel from param file (0 uses microcontroller param) + int getLatAccel(void) const { return myTransAccel; } + /// Gets the lat decel from param file (0 uses microcontroller param) + int getLatDecel(void) const { return myTransDecel; } + /// Saves it to the subtype.p in Aria::getDirectory/params + AREXPORT bool save(void); + + /// The X (forward-back) location of the GPS (antenna) on the robot + int getGPSX() const { return myGPSX; } + /// The Y (left-right) location of the GPS (antenna) on the robot + int getGPSY() const { return myGPSY; } + /// The Baud rate to use when connecting to the GPS + int getGPSBaud() const { return myGPSBaud; } + /// The serial port the GPS is on + const char *getGPSPort() const { return myGPSPort; } + const char *getGPSType() const { return myGPSType; } + + // The Baud rate to use when connecting to the Sonar + //int getSonarBaud() const { return mySonarBaud; } + /// The serial port the Sonar is on + //const char *getSonarPort() const { return mySonarPort; } + //const char *getSonarType() const { return mySonarType; } + + /// What kind of compass the robot has + const char *getCompassType() const { return myCompassType; } + /// Gets what port the compass is on + const char *getCompassPort() const { return myCompassPort; } + + /// For internal use only, gets a pointer to the dist conv factor value + double *internalGetDistConvFactorPointer(void) { return &myDistConvFactor; } + + /// Internal function to set if we use the default behavior + /// (shouldn't be used outside of core developers) + static void internalSetUseDefaultBehavior(bool useDefaultBehavior, + const char *owerOutputDisplayHint); + + /// Internal function to get if we use the default behavior + /// (shouldn't be used outside of core developers) + static bool internalGetUseDefaultBehavior(void); + + /// Adds things to the config for the commercial software + void internalAddToConfigCommercial(ArConfig *config); + + /// Internal call that adds to this config the same way it's always + /// been done (this is only exposed for some internal testing) + void internalAddToConfigDefault(void); + + /// return a const reference to the video device parameters + const std::vector& getVideoParams() const { return myVideoParams; } + + /// return a const reference to the PTU/PTZ parameters + const std::vector& getPTZParams() const { return myPTZParams; } + +protected: + static bool ourUseDefaultBehavior; + static std::string ourPowerOutputChoices; + + // Adds a laser to the config + AREXPORT void addLaserToConfig(int laserNumber, ArConfig *config, + bool useDefaultBehavior, + const char *section); + + // Adds a battery to the config + AREXPORT void addBatteryToConfig(int batteryNumber, ArConfig *config, + bool useDefaultBehavior); + + // Adds an LCD to the config + AREXPORT void addLCDToConfig(int lcdNumber, ArConfig *config, + bool useDefaultBehavior); + + // Adds the sonar to the config (it's added automatically for + // non-commercial) + AREXPORT void addSonarToConfigCommercial(ArConfig *config, bool isMTXSonar); + + // Processes the + AREXPORT void processSonarCommercial(ArConfig *config); + + // Adds a sonarBoard to the config + AREXPORT void addSonarBoardToConfig(int sonarBoardNumber, + ArConfig *config, + bool useDefaultBehavior); + + AREXPORT void addPTZToConfig(int i, ArConfig *config); + AREXPORT void addVideoToConfig(int i, ArConfig *config); + + // Processes the config for commercial + AREXPORT bool commercialProcessFile(void); + + char myClass[1024]; + char mySubClass[1024]; + double myRobotRadius; + double myRobotDiagonal; + double myRobotWidth; + double myRobotLength; + double myRobotLengthFront; + double myRobotLengthRear; + bool myHolonomic; + int myAbsoluteMaxRVelocity; + int myAbsoluteMaxVelocity; + bool myHaveMoveCommand; + bool myRequestIOPackets; + bool myRequestEncoderPackets; + int mySwitchToBaudRate; + double myAngleConvFactor; + double myDistConvFactor; + double myVelConvFactor; + double myRangeConvFactor; + double myDiffConvFactor; + double myVel2Divisor; + double myGyroScaler; + bool myTableSensingIR; + bool myNewTableSensingIR; + bool myFrontBumpers; + int myNumFrontBumpers; + bool myRearBumpers; + int myNumRearBumpers; + + class LaserData + { + public: + LaserData() + { + myLaserType[0] = '\0'; + myLaserPortType[0] = '\0'; + myLaserPort[0] = '\0'; + myLaserAutoConnect = false; + myLaserFlipped = false; + myLaserPowerControlled = true; + myLaserMaxRange = 0; + myLaserCumulativeBufferSize = 0; + myLaserX = 0; + myLaserY = 0; + myLaserTh = 0.0; + myLaserZ = 0; + myLaserIgnore[0] = '\0'; + myLaserStartDegrees[0] = '\0'; + myLaserEndDegrees[0] = '\0'; + myLaserDegreesChoice[0] = '\0'; + myLaserIncrement[0] = '\0'; + myLaserIncrementChoice[0] = '\0'; + myLaserUnitsChoice[0] = '\0'; + myLaserReflectorBitsChoice[0] = '\0'; + myLaserStartingBaudChoice[0] = '\0'; + myLaserAutoBaudChoice[0] = '\0'; + mySection[0] = '\0'; + myLaserPowerOutput[0] = '\0'; + } + virtual ~LaserData() {} + + char myLaserType[256]; + char myLaserPortType[256]; + char myLaserPort[256]; + bool myLaserAutoConnect; + bool myLaserFlipped; + bool myLaserPowerControlled; + unsigned int myLaserMaxRange; + unsigned int myLaserCumulativeBufferSize; + int myLaserX; + int myLaserY; + double myLaserTh; + int myLaserZ; + char myLaserIgnore[256]; + char myLaserStartDegrees[256]; + char myLaserEndDegrees[256]; + char myLaserDegreesChoice[256]; + char myLaserIncrement[256]; + char myLaserIncrementChoice[256]; + char myLaserUnitsChoice[256]; + char myLaserReflectorBitsChoice[256]; + char myLaserStartingBaudChoice[256]; + char myLaserAutoBaudChoice[256]; + char mySection[256]; + char myLaserPowerOutput[256]; + }; + std::map myLasers; + + const LaserData *getLaserData(int laserNumber) const + { + std::map::const_iterator it; + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + return (*it).second; + else + return NULL; + } + + LaserData *getLaserData(int laserNumber) + { + std::map::const_iterator it; + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + return (*it).second; + else + return NULL; + } + + class BatteryMTXBoardData + { + public: + BatteryMTXBoardData() + { + myBatteryMTXBoardType[0] = '\0'; + myBatteryMTXBoardPortType[0] = '\0'; + //sprintf((char *)myBatteryMTXBoardPortType, "serial"); + myBatteryMTXBoardPort[0] = '\0'; + myBatteryMTXBoardBaud = 0; + myBatteryMTXBoardAutoConn = false; + } + virtual ~BatteryMTXBoardData() {} + + char myBatteryMTXBoardType[256]; + char myBatteryMTXBoardPortType[256]; + char myBatteryMTXBoardPort[256]; + int myBatteryMTXBoardBaud; + bool myBatteryMTXBoardAutoConn; + }; + std::map myBatteryMTXBoards; + + const BatteryMTXBoardData *getBatteryMTXBoardData(int batteryBoardNum) const + { + std::map::const_iterator it; + if ((it = myBatteryMTXBoards.find(batteryBoardNum)) != myBatteryMTXBoards.end()) + return (*it).second; + else + return NULL; + } + + BatteryMTXBoardData *getBatteryMTXBoardData(int batteryBoardNum) + { + std::map::const_iterator it; + if ((it = myBatteryMTXBoards.find(batteryBoardNum)) != myBatteryMTXBoards.end()) + return (*it).second; + else + return NULL; + } + + + class LCDMTXBoardData + { + public: + LCDMTXBoardData() + { + myLCDMTXBoardType[0] = '\0'; + myLCDMTXBoardPortType[0] = '\0'; + //sprintf((char *)myLCDMTXBoardPortType, "serial"); + myLCDMTXBoardPort[0] = '\0'; + myLCDMTXBoardBaud = 0; + myLCDMTXBoardAutoConn = false; + myLCDMTXBoardConnFailOption = false; + myLCDMTXBoardPowerOutput[0] = '\0'; + } + virtual ~LCDMTXBoardData() {} + + char myLCDMTXBoardType[256]; + char myLCDMTXBoardPortType[256]; + char myLCDMTXBoardPort[256]; + int myLCDMTXBoardBaud; + bool myLCDMTXBoardAutoConn; + bool myLCDMTXBoardConnFailOption; + char myLCDMTXBoardPowerOutput[256]; + }; + std::map myLCDMTXBoards; + + const LCDMTXBoardData *getLCDMTXBoardData(int lcdBoardNum) const + { + std::map::const_iterator it; + if ((it = myLCDMTXBoards.find(lcdBoardNum)) != myLCDMTXBoards.end()) + return (*it).second; + else + return NULL; + } + + LCDMTXBoardData *getLCDMTXBoardData(int lcdBoardNum) + { + std::map::const_iterator it; + if ((it = myLCDMTXBoards.find(lcdBoardNum)) != myLCDMTXBoards.end()) + return (*it).second; + else + return NULL; + } + + + class SonarMTXBoardData + { + public: + SonarMTXBoardData() + { + mySonarMTXBoardType[0] = '\0'; + mySonarMTXBoardPortType[0] = '\0'; + mySonarMTXBoardPort[0] = '\0'; + mySonarMTXBoardBaud = 0; + mySonarMTXBoardAutoConn = false; + myNumSonarTransducers = 0; + mySonarDelay = 2; + mySonarGain = 10; + /* + mySonarNoiseDelta = 1250; + */ + mySonarDetectionThreshold = 25; + mySonarMaxRange = 255 * 17; + mySonarUseForAutonomousDriving = false; + mySonarMTXBoardPowerOutput[0] = '\0'; + } + virtual ~SonarMTXBoardData() {} + + char mySonarMTXBoardType[256]; + char mySonarMTXBoardPortType[256]; + char mySonarMTXBoardPort[256]; + int mySonarMTXBoardBaud; + bool mySonarMTXBoardAutoConn; + int myNumSonarTransducers; + int mySonarBaud; + int mySonarDelay; + int mySonarGain; + /* + int mySonarNoiseDelta; + */ + int mySonarDetectionThreshold; + int mySonarMaxRange; + bool mySonarUseForAutonomousDriving; + char mySonarMTXBoardPowerOutput[256]; + }; + std::map mySonarMTXBoards; + + const SonarMTXBoardData *getSonarMTXBoardData(int sonarBoardNum) const + { + std::map::const_iterator it; + if ((it = mySonarMTXBoards.find(sonarBoardNum)) != mySonarMTXBoards.end()) + return (*it).second; + else + return NULL; + } + + SonarMTXBoardData *getSonarMTXBoardData(int sonarBoardNum) + { + std::map::const_iterator it; + if ((it = mySonarMTXBoards.find(sonarBoardNum)) != mySonarMTXBoards.end()) + return (*it).second; + else + return NULL; + } + + bool mySettableVelMaxes; + int myTransVelMax; + int myRotVelMax; + bool mySettableAccsDecs; + int myTransAccel; + int myTransDecel; + int myRotAccel; + int myRotDecel; + + bool myHasLatVel; + int myLatVelMax; + int myLatAccel; + int myLatDecel; + int myAbsoluteMaxLatVelocity; + + + // Sonar + int mySonarBoardCount; + int myNumSonarUnits; + int myNumSonar; + std::map > mySonarMap; + enum SonarInfo + { + SONAR_X, + SONAR_Y, + SONAR_TH, + SONAR_BOARD, + SONAR_BOARDUNITPOSITION, + SONAR_GAIN, + /* + SONAR_NOISE_DELTA, + */ + SONAR_DETECTION_THRESHOLD, + SONAR_MAX_RANGE, + SONAR_USE_FOR_AUTONOMOUS_DRIVING + }; + AREXPORT void internalSetSonar(int num, int x, int y, int th); + AREXPORT bool parseSonarUnit(ArArgumentBuilder *builder); + AREXPORT bool parseMTXSonarUnit(ArArgumentBuilder *builder); + AREXPORT const std::list *getSonarUnits(void); + //AREXPORT const std::list *getMTXSonarUnits(void); + std::list myGetSonarUnitList; + ArRetFunctorC *, ArRobotParams> mySonarUnitGetFunctor; + ArRetFunctor1C mySonarUnitSetFunctor; + + + // Battery + int myBatteryMTXBoardCount; + + // LCD + int myLCDMTXBoardCount; + + // Sonar + int mySonarMTXBoardCount; + + // IRs + int myNumIR; + std::map > myIRMap; + enum IRInfo + { + IR_X, + IR_Y, + IR_TYPE, + IR_CYCLES + }; + AREXPORT void internalSetIR(int num, int type, int cycles, int x, int y); + AREXPORT bool parseIRUnit(ArArgumentBuilder *builder); + AREXPORT const std::list *getIRUnits(void); + std::list myGetIRUnitList; + ArRetFunctorC *, ArRobotParams> myIRUnitGetFunctor; + ArRetFunctor1C myIRUnitSetFunctor; + + // GPS + bool myGPSPossessed; + int myGPSX; + int myGPSY; + char myGPSPort[256]; + char myGPSType[256]; + int myGPSBaud; + + // Sonar + //char mySonarPort[256]; + //char mySonarType[256]; + //int mySonarBaud; + + // Compass + char myCompassType[256]; + char myCompassPort[256]; + + + // PTZ/PTU parameters + std::vector myPTZParams; + + // Video device parameters + std::vector myVideoParams; + + ArConfig *myCommercialConfig; + bool myCommercialAddedConnectables; + bool myCommercialProcessedSonar; + int myCommercialNumSonar; + int myCommercialMaxNumberOfLasers; + int myCommercialMaxNumberOfBatteries; + int myCommercialMaxNumberOfLCDs; + int myCommercialMaxNumberOfSonarBoards; + /// This lets us just have a straight mapping from the child + /// argument number to the sonar map above + std::map myCommercialSonarFieldMap; + + ArRetFunctorC myCommercialProcessFileCB; +}; + +#endif // ARROBOTPARAMS_H diff --git a/Legacy/Aria/include/ArRobotTypes.h b/Legacy/Aria/include/ArRobotTypes.h new file mode 100644 index 0000000..9faf14a --- /dev/null +++ b/Legacy/Aria/include/ArRobotTypes.h @@ -0,0 +1,381 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARROBOTTYPES_H +#define ARROBOTTYPES_H + + +#include "ariaUtil.h" +#include "ArRobotParams.h" + +/** @cond INCLUDE_INTERNAL_ROBOT_PARAM_CLASSES */ + +class ArRobotGeneric : public ArRobotParams +{ +public: + AREXPORT ArRobotGeneric(const char *dir=""); + AREXPORT virtual ~ArRobotGeneric() {} +}; + +class ArRobotAmigo : public ArRobotParams +{ +public: + + AREXPORT ArRobotAmigo(const char *dir=""); + AREXPORT virtual ~ArRobotAmigo() {} +}; + +class ArRobotAmigoSh : public ArRobotParams +{ +public: + + AREXPORT ArRobotAmigoSh(const char *dir=""); + AREXPORT virtual ~ArRobotAmigoSh() {} +}; + +class ArRobotP2AT : public ArRobotParams +{ +public: + AREXPORT ArRobotP2AT(const char *dir=""); + AREXPORT virtual ~ArRobotP2AT() {} +}; + +class ArRobotP2AT8 : public ArRobotParams +{ +public: + AREXPORT ArRobotP2AT8(const char *dir=""); + AREXPORT virtual ~ArRobotP2AT8() {} +}; + +class ArRobotP2AT8Plus : public ArRobotParams +{ +public: + AREXPORT ArRobotP2AT8Plus(const char *dir=""); + AREXPORT virtual ~ArRobotP2AT8Plus() {} +}; + +class ArRobotP2IT : public ArRobotParams +{ +public: + AREXPORT ArRobotP2IT(const char *dir=""); + AREXPORT virtual ~ArRobotP2IT() {} +}; + +class ArRobotP2DX : public ArRobotParams +{ +public: + AREXPORT ArRobotP2DX(const char *dir=""); + AREXPORT virtual ~ArRobotP2DX() {} +}; + +class ArRobotP2DXe : public ArRobotParams +{ +public: + AREXPORT ArRobotP2DXe(const char *dir=""); + AREXPORT virtual ~ArRobotP2DXe() {} +}; + +class ArRobotP2DF : public ArRobotParams +{ +public: + AREXPORT ArRobotP2DF(const char *dir=""); + AREXPORT virtual ~ArRobotP2DF() {} +}; + +class ArRobotP2D8 : public ArRobotParams +{ +public: + AREXPORT ArRobotP2D8(const char *dir=""); + AREXPORT virtual ~ArRobotP2D8() {} +}; + +class ArRobotP2D8Plus : public ArRobotParams +{ +public: + AREXPORT ArRobotP2D8Plus(const char *dir=""); + AREXPORT virtual ~ArRobotP2D8Plus() {} +}; + +class ArRobotP2CE : public ArRobotParams +{ +public: + AREXPORT ArRobotP2CE(const char *dir=""); + AREXPORT virtual ~ArRobotP2CE() {} +}; + +class ArRobotP2PP : public ArRobotParams +{ +public: + AREXPORT ArRobotP2PP(const char *dir=""); + AREXPORT virtual ~ArRobotP2PP() {} +}; + +class ArRobotP2PB : public ArRobotParams +{ +public: + AREXPORT ArRobotP2PB(const char *dir=""); + AREXPORT virtual ~ArRobotP2PB() {} +}; + + +class ArRobotP3AT : public ArRobotParams +{ +public: + AREXPORT ArRobotP3AT(const char *dir=""); + AREXPORT virtual ~ArRobotP3AT() {} +}; + + +class ArRobotP3DX : public ArRobotParams +{ +public: + AREXPORT ArRobotP3DX(const char *dir=""); + AREXPORT virtual ~ArRobotP3DX() {} +}; + +class ArRobotPerfPB : public ArRobotParams +{ +public: + AREXPORT ArRobotPerfPB(const char *dir=""); + AREXPORT virtual ~ArRobotPerfPB() {} +}; + +class ArRobotPerfPBPlus : public ArRobotParams +{ +public: + AREXPORT ArRobotPerfPBPlus(const char *dir=""); + AREXPORT virtual ~ArRobotPerfPBPlus() {} +}; + +class ArRobotPion1M : public ArRobotParams +{ +public: + AREXPORT ArRobotPion1M(const char *dir=""); + AREXPORT virtual ~ArRobotPion1M() {} +}; + +class ArRobotPion1X : public ArRobotParams +{ +public: + AREXPORT ArRobotPion1X(const char *dir=""); + AREXPORT virtual ~ArRobotPion1X() {} +}; + +class ArRobotPsos1M : public ArRobotParams +{ +public: + AREXPORT ArRobotPsos1M(const char *dir=""); + AREXPORT virtual ~ArRobotPsos1M() {} +}; + +class ArRobotPsos43M : public ArRobotParams +{ +public: + AREXPORT ArRobotPsos43M(const char *dir=""); + AREXPORT virtual ~ArRobotPsos43M() {} +}; + +class ArRobotPsos1X : public ArRobotParams +{ +public: + AREXPORT ArRobotPsos1X(const char *dir=""); + AREXPORT virtual ~ArRobotPsos1X() {} +}; + +class ArRobotPionAT : public ArRobotParams +{ +public: + AREXPORT ArRobotPionAT(const char *dir=""); + AREXPORT virtual ~ArRobotPionAT() {} +}; + +class ArRobotMapper : public ArRobotParams +{ +public: + AREXPORT ArRobotMapper(const char *dir=""); + AREXPORT virtual ~ArRobotMapper() {} +}; + +class ArRobotPowerBot : public ArRobotParams +{ +public: + AREXPORT ArRobotPowerBot(const char *dir=""); + AREXPORT virtual ~ArRobotPowerBot() {} +}; + +class ArRobotP3DXSH : public ArRobotParams +{ + public: + AREXPORT ArRobotP3DXSH(const char *dir=""); + AREXPORT virtual ~ArRobotP3DXSH() {} +}; + +class ArRobotP3ATSH : public ArRobotParams +{ + public: + AREXPORT ArRobotP3ATSH(const char *dir=""); + AREXPORT virtual ~ArRobotP3ATSH() {} +}; + +class ArRobotP3ATIWSH : public ArRobotParams +{ + public: + AREXPORT ArRobotP3ATIWSH(const char *dir=""); + AREXPORT virtual ~ArRobotP3ATIWSH() {} +}; + +class ArRobotPatrolBotSH : public ArRobotParams +{ + public: + AREXPORT ArRobotPatrolBotSH(const char *dir=""); + AREXPORT virtual ~ArRobotPatrolBotSH() {} +}; + +class ArRobotPeopleBotSH : public ArRobotParams +{ + public: + AREXPORT ArRobotPeopleBotSH(const char *dir=""); + AREXPORT virtual ~ArRobotPeopleBotSH() {} +}; + +class ArRobotPowerBotSH : public ArRobotParams +{ + public: + AREXPORT ArRobotPowerBotSH(const char *dir=""); + AREXPORT virtual ~ArRobotPowerBotSH() {} +}; + +class ArRobotWheelchairSH : public ArRobotParams +{ + public: + AREXPORT ArRobotWheelchairSH(const char *dir=""); + AREXPORT virtual ~ArRobotWheelchairSH() {} +}; + +class ArRobotPowerBotSHuARCS : public ArRobotParams +{ + public: + AREXPORT ArRobotPowerBotSHuARCS(const char *dir=""); + AREXPORT virtual ~ArRobotPowerBotSHuARCS() {} +}; + +class ArRobotSeekur : public ArRobotParams +{ + public: + AREXPORT ArRobotSeekur(const char *dir=""); + AREXPORT virtual ~ArRobotSeekur() {} +}; + +/// @since Aria 2.7.2 +class ArRobotMT400 : public ArRobotParams +{ + public: + AREXPORT ArRobotMT400(const char *dir=""); + AREXPORT virtual ~ArRobotMT400() {} +}; + +/// @since Aria 2.7.2 +class ArRobotResearchPB : public ArRobotParams +{ + public: + AREXPORT ArRobotResearchPB(const char *dir=""); + AREXPORT virtual ~ArRobotResearchPB() {} +}; + +/// @since Aria 2.7.2 +class ArRobotSeekurJr : public ArRobotParams +{ + public: + AREXPORT ArRobotSeekurJr(const char *dir=""); + AREXPORT virtual ~ArRobotSeekurJr() {} +}; + +/// @since Aria 2.7.4 +class ArRobotP3DXSH_lms1xx : public ArRobotP3DXSH +{ +public: + AREXPORT ArRobotP3DXSH_lms1xx(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotP3ATSH_lms1xx : public ArRobotP3ATSH +{ +public: + AREXPORT ArRobotP3ATSH_lms1xx(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotPeopleBotSH_lms1xx : public ArRobotPeopleBotSH +{ +public: + AREXPORT ArRobotPeopleBotSH_lms1xx(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotP3DXSH_lms500 : public ArRobotP3DXSH +{ +public: + AREXPORT ArRobotP3DXSH_lms500(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotP3ATSH_lms500 : public ArRobotP3ATSH +{ +public: + AREXPORT ArRobotP3ATSH_lms500(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotPeopleBotSH_lms500 : public ArRobotPeopleBotSH +{ +public: + AREXPORT ArRobotPeopleBotSH_lms500(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotPowerBotSH_lms500 : public ArRobotPowerBotSH +{ +public: + AREXPORT ArRobotPowerBotSH_lms500(const char *dir=""); +}; + +/// @since Aria 2.7.4 +class ArRobotResearchPB_lms500 : public ArRobotResearchPB +{ +public: + AREXPORT ArRobotResearchPB_lms500(const char *dir=""); +}; + +/// @since Aria 2.8 +class ArRobotPioneerLX : public ArRobotParams +{ +public: + AREXPORT ArRobotPioneerLX(const char *dir=""); + AREXPORT virtual ~ArRobotPioneerLX() {} +}; + +/** @endcond INCLUDE_INTERNAL_ROBOT_PARAM_CLASSES */ + +#endif // ARROBOTTYPES_H diff --git a/Legacy/Aria/include/ArS3Series.h b/Legacy/Aria/include/ArS3Series.h new file mode 100644 index 0000000..24e8ac2 --- /dev/null +++ b/Legacy/Aria/include/ArS3Series.h @@ -0,0 +1,250 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARS3SERIES_H +#define ARS3SERIES_H + +#include "ariaTypedefs.h" +#include "ariaOSDef.h" +#include "ArRobotPacket.h" +#include "ArLaser.h" +#include "ArFunctor.h" + +/** @internal */ +class ArS3SeriesPacket : public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArS3SeriesPacket(); + /// Destructor + AREXPORT virtual ~ArS3SeriesPacket(); + + /// Gets the time the packet was received at + AREXPORT ArTime getTimeReceived(void); + /// Sets the time the packet was received at + AREXPORT void setTimeReceived(ArTime timeReceived); + + AREXPORT virtual void duplicatePacket(ArS3SeriesPacket *packet); + AREXPORT virtual void empty(void); + + + void setDataLength(int x) + { myDataLength = x; } + int getDataLength() + { return myDataLength; } + void setNumReadings(int x) + { myNumReadings = x; } + int getNumReadings() + { return myNumReadings; } + void setStatusByte(unsigned char c) + { myStatusByte = c; } + unsigned char getStatusByte() + { return myStatusByte; } + void setTimeStampByte1(unsigned char c) + { myTimeStampByte1 = c; } + unsigned char getTimeStampByte1() + { return myTimeStampByte1; } + void setTimeStampByte2(unsigned char c) + { myTimeStampByte2 = c; } + unsigned char getTimeStampByte2() + { return myTimeStampByte2; } + void setTimeStampByte3(unsigned char c) + { myTimeStampByte3 = c; } + unsigned char getTimeStampByte3() + { return myTimeStampByte3; } + void setTimeStampByte4(unsigned char c) + { myTimeStampByte4 = c; } + unsigned char getTimeStampByte4() + { return myTimeStampByte4; } + unsigned char getTelegramNumByte1() + { return myTelegramNumByte1; } + unsigned char getTelegramNumByte2() + { return myTelegramNumByte2; } + void setTelegramNumByte2(unsigned char c) + { myTelegramNumByte2 = c; } + void setTelegramNumByte1(unsigned char c) + { myTelegramNumByte1 = c; } + unsigned char getCrcByte1() + { return myCrcByte1; } + void setCrcByte1(unsigned char c) + { myCrcByte1 = c; } + unsigned char getCrcByte2() + { return myCrcByte2; } + void setCrcByte2(unsigned char c) + { myCrcByte2 = c; } + unsigned char getMonitoringDataByte1() + { return myMonitoringDataByte1; } + void setMonitoringDataByte1(unsigned char c) + { myMonitoringDataByte1 = c; } + unsigned char getMonitoringDataByte2() + { return myMonitoringDataByte2; } + void setMonitoringDataByte2(unsigned char c) + { myMonitoringDataByte2 = c; } + bool getMonitoringDataAvailable() + { return myMonitoringDataAvailable; } + void setMonitoringDataAvailable(bool c) + { myMonitoringDataAvailable = c; } + unsigned char getProtocolVersionByte1() + { return myProtocolVersionByte1; } + void setProtocolVersionByte1(unsigned char c) + { myProtocolVersionByte1 = c; } + unsigned char getProtocolVersionByte2() + { return myProtocolVersionByte2; } + void setProtocolVersionByte2(unsigned char c) + { myProtocolVersionByte2 = c; } + +protected: + + ArTime myTimeReceived; + + // S3S specific + int myDataLength; + int myNumReadings; + unsigned char myStatusByte; + unsigned char myTimeStampByte1; + unsigned char myTimeStampByte2; + unsigned char myTimeStampByte3; + unsigned char myTimeStampByte4; + unsigned char myTelegramNumByte1; + unsigned char myTelegramNumByte2; + unsigned char myCrcByte1; + unsigned char myCrcByte2; + bool myMonitoringDataAvailable; + unsigned char myMonitoringDataByte1; + unsigned char myMonitoringDataByte2; + unsigned char myProtocolVersionByte1; + unsigned char myProtocolVersionByte2; + +}; + + +/// Given a device connection it receives packets from the sick through it +/// @internal +class ArS3SeriesPacketReceiver +{ +public: + /// Constructor with assignment of a device connection + AREXPORT ArS3SeriesPacketReceiver(); + /// Destructor + AREXPORT virtual ~ArS3SeriesPacketReceiver(); + + /// Receives a packet from the robot if there is one available + AREXPORT ArS3SeriesPacket *receivePacket(unsigned int msWait = 0, + bool shortcut = false); + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + unsigned short CRC16(unsigned char *, int); + + // PS - added to pass info to this class + AREXPORT void setInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + AREXPORT void setIsS300(bool isS300) + { myIsS300 = isS300; } + AREXPORT void setName(const char *name ) + { strcpy(myName, name); } + +protected: + ArDeviceConnection *myConn; + ArS3SeriesPacket myPacket; + + char myName[1024]; + unsigned int myNameLength; + unsigned char myReadBuf[100000]; + int myReadCount; + bool myIsS300; + ArLog::LogLevel myInfoLogLevel; + + + +}; + +/** + @since Aria 2.7.4 + @see ArLaserConnector + Use ArLaserConnector to connect to a laser, determining type based on robot and program configuration parameters. +*/ +class ArS3Series : public ArLaser +{ +public: + /// Constructor + AREXPORT ArS3Series(int laserNumber, + const char *name = "S3Series"); + /// Destructor + AREXPORT ~ArS3Series(); + AREXPORT virtual bool blockingConnect(void); + AREXPORT virtual bool asyncConnect(void); + AREXPORT virtual bool disconnect(void); + virtual bool isConnected(void) { return myIsConnected; } + virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + AREXPORT bool isMonitoringDataAvailable(void) + { return myIsMonitoringDataAvailable; } + AREXPORT int getMonitoringData(void) + { return myMonitoringData; } + AREXPORT bool compareMonitoringDataAgainst(int val) + { return myMonitoringData == val; } + + /// Logs the information about the sensor + AREXPORT void log(void); +protected: + AREXPORT virtual void laserSetName(const char *name); + AREXPORT virtual void * runThread(void *arg); + AREXPORT virtual void setRobot(ArRobot *robot); + void sensorInterp(void); + void failedToConnect(void); + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + int myNumChans; + + bool myIsMonitoringDataAvailable; + int myMonitoringData; + + ArLog::LogLevel myLogLevel; + + ArS3SeriesPacketReceiver myReceiver; + + ArMutex myPacketsMutex; + ArMutex myDataMutex; + + std::list myPackets; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; +}; + +#endif diff --git a/Legacy/Aria/include/ArSZSeries.h b/Legacy/Aria/include/ArSZSeries.h new file mode 100644 index 0000000..f5ee3cf --- /dev/null +++ b/Legacy/Aria/include/ArSZSeries.h @@ -0,0 +1,204 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSZSERIES_H +#define ARSZSERIES_H + +#include "ariaTypedefs.h" +#include "ariaOSDef.h" +#include "ArRobotPacket.h" +#include "ArLaser.h" +#include "ArFunctor.h" + +/** @internal */ +class ArSZSeriesPacket : public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArSZSeriesPacket(); + /// Destructor + AREXPORT virtual ~ArSZSeriesPacket(); + + /// Gets the time the packet was received at + AREXPORT ArTime getTimeReceived(void); + /// Sets the time the packet was received at + AREXPORT void setTimeReceived(ArTime timeReceived); + + AREXPORT virtual void duplicatePacket(ArSZSeriesPacket *packet); + AREXPORT virtual void empty(void); + + AREXPORT virtual void byteToBuf(ArTypes::Byte val); + + AREXPORT virtual ArTypes::Byte bufToByte(void); + + void setDataLength(int x) + { myDataLength = x; } + int getDataLength() + { return myDataLength; } + void setNumReadings(int x) + { myNumReadings = x; } + int getNumReadings() + { return myNumReadings; } + void setScanFrequency(int x) + { myScanFrequency = x; } + int getScanFrequency() + { return myScanFrequency; } + + void setPrevScanFrequency(int x) + { myPrevScanFrequency = x; } + int getPrevScanFrequency() + { return myPrevScanFrequency; } + + + unsigned char getCrcByte1() + { return myCrcByte1; } + void setCrcByte1(unsigned char c) + { myCrcByte1 = c; } + unsigned char getCrcByte2() + { return myCrcByte2; } + void setCrcByte2(unsigned char c) + { myCrcByte2 = c; } + +protected: + int deascii(char c); + + ArTime myTimeReceived; + + // SZS specific + int myDataLength; + int myNumReadings; + int myScanFrequency; + unsigned char myCrcByte1; + unsigned char myCrcByte2; + + int myPrevScanFrequency; + + +}; + + +/// Given a device connection it receives packets from the sick through it +/// @internal +class ArSZSeriesPacketReceiver +{ +public: + /// Constructor with assignment of a device connection + AREXPORT ArSZSeriesPacketReceiver(); + /// Destructor + AREXPORT virtual ~ArSZSeriesPacketReceiver(); + + /// Receives a packet from the robot if there is one available + AREXPORT ArSZSeriesPacket *receivePacket(unsigned int msWait = 0, + bool shortcut = false); + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + unsigned short CRC16(unsigned char *, int); + + // PS - added to pass info to this class + AREXPORT void setmyInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + AREXPORT void setmyIsSZ00(bool isSZ00) + { myIsSZ00 = isSZ00; } + AREXPORT void setmyName(const char *name ) + { strcpy(myName, name); } + +protected: + ArDeviceConnection *myConn; + ArSZSeriesPacket myPacket; + + char myName[1024]; + unsigned int myNameLength; + unsigned char myReadBuf[100000]; + int myReadCount; + bool myIsSZ00; + ArLog::LogLevel myInfoLogLevel; + + unsigned short myPrevCrc; + + +}; + +/** + @since Aria 2.7.4 + @see ArLaserConnector + Use ArLaserConnector to connect to a laser, determining type based on robot and program configuration parameters. +*/ +class ArSZSeries : public ArLaser +{ +public: + /// Constructor + AREXPORT ArSZSeries(int laserNumber, + const char *name = "SZSeries"); + /// Destructor + AREXPORT ~ArSZSeries(); + AREXPORT virtual bool blockingConnect(void); + AREXPORT virtual bool asyncConnect(void); + AREXPORT virtual bool disconnect(void); + virtual bool isConnected(void) { return myIsConnected; } + virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + + /// Logs the information about the sensor + AREXPORT void log(void); +protected: + AREXPORT virtual void laserSetName(const char *name); + AREXPORT virtual void * runThread(void *arg); + AREXPORT virtual void setRobot(ArRobot *robot); + void sensorInterp(void); + void failedToConnect(void); + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + int myNumChans; + + + ArLog::LogLevel myLogLevel; + + ArSZSeriesPacketReceiver myReceiver; + + ArMutex myPacketsMutex; + ArMutex myDataMutex; + + std::list myPackets; + + ArTime myPrevSensorIntTime; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; +}; + +#endif diff --git a/Legacy/Aria/include/ArSensorReading.h b/Legacy/Aria/include/ArSensorReading.h new file mode 100644 index 0000000..011d719 --- /dev/null +++ b/Legacy/Aria/include/ArSensorReading.h @@ -0,0 +1,213 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSENSORREADING_H +#define ARSENSORREADING_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArTransform.h" + +/// A class to hold a sensor reading, should be one instance per sensor +/** This class holds sensor data and a sensor reading... it can happen + that it contains the data for a sonar, but not the reading, in + which case the range (from getRange) will be -1, and the counter + it was taken (from getCounterTaken) will be 0, also it will never + be new (from isNew). If ignoreThisReading returns true then + ignore this reading (its still here since this is used for raw + data). +*/ +class ArSensorReading +{ +public: + /// Constructor, the three args are the physical location of the sensor + AREXPORT ArSensorReading(double xPos = 0.0, double yPos = 0.0, double thPos = 0.0); + /// Copy constructor + AREXPORT ArSensorReading(const ArSensorReading & reading); + /// Assignment operator + AREXPORT ArSensorReading &operator=(const ArSensorReading &reading); + /// Destructor + AREXPORT virtual ~ArSensorReading(); + + /// Gets the range from sensor of the reading + /** + @return the distance to the reading from the sensor itself + */ + unsigned int getRange(void) const { return myRange; } + + /// Given the counter from the robot, it returns whether the reading is new + /** + @param counter the counter from the robot at the current time + @return true if the reading was taken on the current loop + @see getCounter + */ + bool isNew(unsigned int counter) const { return counter == myCounterTaken; } + /// Gets the X location of the sensor reading + double getX(void) const { return myReading.getX(); } + /// Gets the Y location of the sensor reading + double getY(void) const { return myReading.getY(); } + /// Gets the position of the reading + /// @return the position of the reading (ie where the sonar pinged back) + ArPose getPose(void) const { return myReading; } + + /// Gets the X location of the sensor reading in local coords + double getLocalX(void) const { return myLocalReading.getX(); } + /// Gets the Y location of the sensor reading + double getLocalY(void) const { return myLocalReading.getY(); } + /// Gets the position of the reading + /// @return the position of the reading (ie the obstacle where the sonar pinged back) + ArPose getLocalPose(void) const { return myLocalReading; } + + /** Gets the pose of the robot at which the reading was taken + @sa getEncoderPoseTaken() + @sa getTimeTaken() + @sa ArRobot::getPose() + */ + ArPose getPoseTaken(void) const { return myReadingTaken; } + + /** Gets the robot's encoder pose the reading was taken at + @sa getPoseTaken() + @sa ArRobot::getEncoderPose() + */ + ArPose getEncoderPoseTaken(void) const { return myEncoderPoseTaken; } + + /** Gets the X location of the sonar on the robot + @sa getSensorPosition() + */ + double getSensorX(void) const { return mySensorPos.getX(); } + /** Gets the Y location of the sensor on the robot + @sa getsensorPosition() + */ + double getSensorY(void) const { return mySensorPos.getY(); } + /** Gets the heading of the sensor on the robot + @sa getsensorPosition() + */ + double getSensorTh(void) const { return mySensorPos.getTh(); } + + /// Gets whether this reading should be ignore or not. e.g. the sensor + /// encountered an error or did not actually detect anything. + bool getIgnoreThisReading(void) const { return myIgnoreThisReading; } + + /// Gets the extra int with this reading + /** + Some range devices provide extra device-dependent information + with each reading. What that means depends on the range device, + if a range device doesn't give the meaning in its constructor + description then it has no meaning at all. + + Note that for all laser like devices this should be a value + between 0 - 255 which is the measure of reflectance. It should + be 0 if that device doesn't measure reflectance (the default). + **/ + int getExtraInt(void) const { return myExtraInt; } + + + /// Gets the sensor's position on the robot + /** + @return the position of the sensor on the robot + */ + ArPose getSensorPosition(void) const { return mySensorPos; } + + /// Gets the cosine component of the heading of the sensor reading + double getSensorDX(void) const { return mySensorCos; } + /// Gets the sine component of the heading of the sensor reading + double getSensorDY(void) const { return mySensorSin; } + + /** Gets the X locaiton of the robot when the reading was received + @sa getPoseTaken() + */ + double getXTaken(void) const { return myReadingTaken.getX(); } + /** Gets the Y location of the robot when the reading was received + @sa getPoseTaken() + */ + double getYTaken(void) const { return myReadingTaken.getY(); } + /** Gets the th (heading) of the robot when the reading was received + @sa getPoseTaken() + */ + double getThTaken(void) const { return myReadingTaken.getTh(); } + + /// Gets the counter from when the reading arrived + /** + @return the counter from the robot when the sonar reading was taken + @see isNew + */ + unsigned int getCounterTaken(void) const { return myCounterTaken; } + + ArTime getTimeTaken(void) const { return myTimeTaken; } + + /// Takes the data and makes the reading reflect it + AREXPORT void newData(int range, ArPose robotPose, ArPose encoderPose, + ArTransform trans, unsigned int counter, + ArTime timeTaken, bool ignoreThisReading = false, + int extraInt = 0); + + /// Takes the data and makes the reading reflect it + AREXPORT void newData(int sx, int sy, ArPose robotPose, + ArPose encoderPose, + ArTransform trans, + unsigned int counter, + ArTime timeTaken, + bool ignoreThisReading = false, + int extraInt = 0); + + /// Resets the sensors idea of its physical location on the robot + AREXPORT void resetSensorPosition(double xPos, double yPos, double thPos, + bool forceComputation = false); + + /// Sets that we should ignore this reading + AREXPORT void setIgnoreThisReading(bool ignoreThisReading) + { myIgnoreThisReading = ignoreThisReading; } + + /// Sets the extra int + AREXPORT void setExtraInt(int extraInt) + { myExtraInt = extraInt; } + + + /// Applies a transform to the reading position, and where it was taken + AREXPORT void applyTransform(ArTransform trans); + /// Applies a transform to the encoder pose taken + AREXPORT void applyEncoderTransform(ArTransform trans); + /// Applies a transform to the reading position, and where it was taken + AREXPORT bool getAdjusted(void) { return myAdjusted; } + /// Applies a transform to the reading position, and where it was taken + AREXPORT void setAdjusted(bool adjusted) { myAdjusted = adjusted; } +protected: + unsigned int myCounterTaken; + ArPose myReading; + ArPose myLocalReading; + ArPose myReadingTaken; + ArPose myEncoderPoseTaken; + ArPose mySensorPos; + double mySensorCos, mySensorSin; + double myDistToCenter; + double myAngleToCenter; + int myRange; + ArTime myTimeTaken; + bool myIgnoreThisReading; + int myExtraInt; + bool myAdjusted; +}; + +#endif diff --git a/Legacy/Aria/include/ArSerialConnection.h b/Legacy/Aria/include/ArSerialConnection.h new file mode 100644 index 0000000..cbe0bec --- /dev/null +++ b/Legacy/Aria/include/ArSerialConnection.h @@ -0,0 +1,141 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSERIALCONNECTION_H +#define ARSERIALCONNECTION_H + +#include +#include "ariaTypedefs.h" +#include "ArDeviceConnection.h" + +/// Utility for connecting to and communicating with devices through a serial port +/** @ingroup UtilityClasses + @ingroup DeviceClasses +*/ +class ArSerialConnection: public ArDeviceConnection +{ + public: + /// Constructor + AREXPORT ArSerialConnection(bool is422 = false); + /// Destructor also closes the connection + AREXPORT virtual ~ArSerialConnection(); + + /** Opens the serial port + * @return 0 on success. Return one of the error codes in the + * ArSerialConnection::Open enumeration on error. + * @sa ArUtil::COM1, ArUtil::COM2, ArUtil::COM3, ArUtil::COM4 + */ + AREXPORT int open(const char * port = NULL); + + /** Sets the port this connection will use + * @sa ArUtil::COM1, ArUtil::COM2, ArUtil::COM3, ArUtil::COM4 + */ + AREXPORT void setPort(const char *port = NULL); + + /** Gets the port this is using + * @sa ArUtil::COM1, ArUtil::COM2, ArUtil::COM3, ArUtil::COM4 + */ + AREXPORT const char * getPort(void); + + AREXPORT virtual bool openSimple(void); + AREXPORT virtual int getStatus(void); + AREXPORT virtual bool close(void); + AREXPORT virtual int read(const char *data, unsigned int size, + unsigned int msWait = 0); + AREXPORT virtual int write(const char *data, unsigned int size); + AREXPORT virtual const char * getOpenMessage(int messageNumber); + + /** + Sets the BAUD rate to use when connection is opened, or change the baud rate if already opened + @param baud the baud rate to set the connection to + @return true if rate was sucessfully set, false otherwise (unsupported rate, system error changing rate on port, etc.) + @sa getBaud() + */ + AREXPORT bool setBaud(int baud); + /// Gets what the current baud rate is set to + AREXPORT int getBaud(void); + + /// Sets whether to enable or disable the hardware control lines + AREXPORT bool setHardwareControl(bool hardwareControl); + /// Gets whether the hardware control lines are enabled or disabled + AREXPORT bool getHardwareControl(void); + + /// Sees how the CTS line is set (true = high) + AREXPORT bool getCTS(void); + + /// Sees how the DSR line is set (true = high) + AREXPORT bool getDSR(void); + + /// Sees how the DCD line is set (true = high) + AREXPORT bool getDCD(void); + + /// Sees how the Ring line is set (true = high) + AREXPORT bool getRing(void); + + // Internal open, for use by open and openSimple + AREXPORT int internalOpen(void); + + enum Open { + OPEN_COULD_NOT_OPEN_PORT = 1, ///< Could not open the port + OPEN_COULD_NOT_SET_UP_PORT, ///< Could not set up the port + OPEN_INVALID_BAUD_RATE, ///< Baud rate is not valid + OPEN_COULD_NOT_SET_BAUD, ///< Baud rate valid, but could not set it + OPEN_ALREADY_OPEN ///< Connection was already open + }; + AREXPORT virtual ArTime getTimeRead(int index); + AREXPORT virtual bool isTimeStamping(void); + + protected: + void buildStrMap(void); + +#ifndef WIN32 + // these both return -1 for errors + int rateToBaud(int rate); + int baudToRate(int baud); + // this just tries + void startTimeStamping(void); + bool myTakingTimeStamps; +#endif + + ArStrMap myStrMap; + std::string myPortName; + int myBaudRate; + int myStatus; + bool myHardwareControl; + +#ifndef WIN32 + int myPort; +#endif // ifdef linux + + bool myIs422; + +#ifdef WIN32 + HANDLE myPort; +#endif // ifdef WIN32 + + +}; + +#endif diff --git a/Legacy/Aria/include/ArSick.h b/Legacy/Aria/include/ArSick.h new file mode 100644 index 0000000..3cbbfba --- /dev/null +++ b/Legacy/Aria/include/ArSick.h @@ -0,0 +1,340 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSICK_H +#define ARSICK_H + +#include "ariaTypedefs.h" +#include "ArRobotPacket.h" +#include "ArLaser.h" +#include "ArFunctor.h" +#include "ArCondition.h" +#include "ArLMS2xx.h" + + +/** +Compatability class used to access SICK LMS-200 laser rangefinder device in +versions of ARIA prior to 2.7.0; used alone or with ArSimpleConnector (also +deprecated). In 2.7.0 and later, ArSick implements the same +API as in previous versions, but serves only as an interface to ArLMS2xx; the +preferred way to access laser rangefinders is to first connect to a robot using +ArRobotConnector to load robot parameter files specifying laser types +and options, then use ArLaserConnector to connect to all lasers the robot has. +ArRobot stores a list of ArLaser objects for these lasers. +@deprecated +*/ +class ArSick : public ArLMS2xx +{ +public: + /// Constructor + AREXPORT ArSick(size_t currentBufferSize = 361, + size_t cumulativeBufferSize = 0, + const char *name = "laser", + bool addAriaExitCB = true, + bool isSecondLaser = false); + /// Destructor + AREXPORT virtual ~ArSick(); + + enum BaudRate { + BAUD9600, ///< 9600 Baud + BAUD19200, ///< 19200 Baud + BAUD38400, ///< 38400 Baud + BAUD_INVALID ///< Invalid baud + }; + enum Degrees { + DEGREES180, ///< 180 Degrees + DEGREES100, ///< 100 Degrees + DEGREES_INVALID ///< Invalid degrees + }; + enum Increment { + INCREMENT_ONE, ///< One degree increments + INCREMENT_HALF, ///< Half a degree increments + INCREMENT_INVALID ///< Increment invalid + }; + enum Units { + UNITS_1MM, ///< Uses 1 mm resolution (8/16/32 meter max range) + UNITS_1CM, ///< Uses 1 cm resolution (80/160/320 meter max range) + UNITS_10CM, ///< Uses 10 cm resolution (150 meter max range) + UNITS_INVALID ///< Invalid units + }; + enum Bits { + BITS_1REFLECTOR, ///< Uses 1 reflector bits (means 32/320/150 meter range) + BITS_2REFLECTOR, ///< Uses 2 reflector bits (means 16/160/150 meter range) + BITS_3REFLECTOR, ///< Uses 3 reflector bits (means 8/80/150 meter range) + BITS_INVALID ///< Invalid bits + }; + + /// Sees if this is trying to connect to the laser at the moment (note no other range devices work like this so you probably shouldn't use this) + bool tryingToConnect(void) + { return isTryingToConnect(); } + + /// Runs the laser off of the robot + bool runOnRobot(void) { return internalRunOnRobot(); } + + + /// Use this to manually configure the laser before connecting to it + AREXPORT void configure(bool useSim = false, bool powerControl = true, + bool laserFlipped = false, + BaudRate baud = BAUD38400, + Degrees deg = DEGREES180, + Increment incr = INCREMENT_ONE); + /// Shorter configure for the laser (settings are overridden by the .p file) + AREXPORT void configureShort(bool useSim = false, + BaudRate baud = BAUD38400, + Degrees deg = DEGREES180, + Increment incr = INCREMENT_ONE); + /// Sets the ranging/reflector information + AREXPORT void setRangeInformation(Bits bits = BITS_1REFLECTOR, + Units units = UNITS_1MM); + + + // Gets whether the laser is simulated or not + AREXPORT bool isUsingSim(void); + /// Gets whether the computer is controling laser power or not + AREXPORT bool isControllingPower(void); + /// Gets whether the laser is flipped over or not + AREXPORT bool isLaserFlipped(void); + /// Gets the degrees the laser is scanning + AREXPORT Degrees getDegrees(void); +#ifndef SWIG + // this ends up causing problems in the Java wrapper, since it has the + // wrong return type vs. ArLaser::getIncrement(). But we need to keep + // this function for backwards compatability. + /// Gets the amount each scan increments + AREXPORT Increment getIncrement(void); +#endif + /// Gets the Bits the laser is using + AREXPORT Bits getBits(void); + /// Gets the Units the laser is using + AREXPORT Units getUnits(void); + + // Sets whether the laser is simulated or not + AREXPORT void setIsUsingSim(bool usingSim); + /// Sets whether the computer is controling laser power or not + AREXPORT void setIsControllingPower(bool controlPower); + /// Sets whether the laser is flipped over or not + AREXPORT void setIsLaserFlipped(bool laserFlipped); + + + + /** You should use setCumulativeCleanDist for this now + @deprecated + */ + void setFilterCumulativeCleanDist(double dist) + { + setCumulativeCleanDist(dist); + } + /** You should use getCumulativeCleanDist for this now + @deprecated + */ + double getFilterCumulativeCleanDist(void) + { + return getCumulativeCleanDist(); + } + /** You should use setCumulativeCleanInterval for this now + @deprecated + */ + void setFilterCleanCumulativeInterval(int milliSeconds) + { + setCumulativeCleanInterval(milliSeconds); + } + /** You should use getPlanarCumulativeCleanInterval for this now + @deprecated + */ + int getFilterCleanCumulativeInterval(void) + { + return getCumulativeCleanInterval(); + } + + /** You should use setMinDistBetweenCumulative for this now + @deprecated + */ + void setFilterCumulativeNearDist(double dist) + { + setMinDistBetweenCumulative(dist); + } + /** You should use getMinDistBetweenCumulative for this now + @deprecated + */ + double getFilterCumulativeNearDist(void) + { return getMinDistBetweenCumulative(); } + + /** You should use setMinDistBetweenCurrent for this now + @deprecated + */ + void setFilterNearDist(double dist) + { setMinDistBetweenCurrent(dist); } + /** You should use getMinDistBetweenCurrent for this now + @deprecated + */ + double getFilterNearDist(void) + { return getMinDistBetweenCurrent(); } + + /** + You should use setMaxInsertDistCumulative for this now + @deprecated + */ + void setFilterCumulativeInsertMaxDist(double dist) + { setMaxInsertDistCumulative(dist); } + /** + You should use getMaxInsertDistCumulative for this now + @deprecated + */ + double getFilterCumulativeInsertMaxDist(void) + { return getMaxInsertDistCumulative(); } + + /** Used to set the min range, this is no longer used because it + doesn't actually solve anything (because beams that see near + things and far things average) + @deprecated + **/ + unsigned int getMinRange(void) { return 0; } + /** Used to get the min range, this is no longer used because it + doesn't actually solve anything (because beams that see near + things and far things average) + @deprecated + **/ + void setMinRange(unsigned int minRange) { } + + /** You should see setMaxDistToKeepCumulative (it replaces this) + @deprecated + */ + void setFilterCumulativeMaxDist(double dist) + { setMaxDistToKeepCumulative(dist); } + /** You should see getMaxDistToKeepCumulative (it replaces this) + @deprecated + */ + double getFilterCumulativeMaxDist(void) + { return getMaxDistToKeepCumulative(); } + /** you should use setMaxSecondsToKeepCumulative instead, (replaces this) + * @deprecated + */ + void setFilterCumulativeMaxAge(int seconds) + { setMaxSecondsToKeepCumulative(seconds); } + /** you should use getMaxSecondsToKeepCumulative instead, (replaces this) + * @deprecated + */ + int getFilterCumulativeMaxAge(void) + { return getMaxSecondsToKeepCumulative(); } + + /// Gets the number of laser packets received in the last second + int getSickPacCount(void) + { return getReadingCount(); } + + /// Adds a connect callback + void addConnectCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) + { + if (position == ArListPos::FIRST) + ArLMS2xx::addConnectCB(functor, 75); + else if (position == ArListPos::LAST) + ArLMS2xx::addConnectCB(functor, 25); + else + ArLMS2xx::addConnectCB(functor, 25); + } + /// Adds a disconnect callback + void remConnectCB(ArFunctor *functor) + { + ArLMS2xx::remConnectCB(functor); + } + + /// Adds a callback for when a connection to the robot is failed + void addFailedConnectCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) + { + if (position == ArListPos::FIRST) + ArLMS2xx::addFailedConnectCB(functor, 75); + else if (position == ArListPos::LAST) + ArLMS2xx::addFailedConnectCB(functor, 25); + else + ArLMS2xx::addFailedConnectCB(functor, 25); + } + /// Removes a callback for when a connection to the robot is failed + void remFailedConnectCB(ArFunctor *functor) + { + ArLMS2xx::remFailedConnectCB(functor); + } + + /// Adds a callback for when disconnect is called while connected + void addDisconnectNormallyCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) + { + if (position == ArListPos::FIRST) + ArLMS2xx::addDisconnectNormallyCB(functor, 75); + else if (position == ArListPos::LAST) + ArLMS2xx::addDisconnectNormallyCB(functor, 25); + else + ArLMS2xx::addDisconnectNormallyCB(functor, 25); + } + /// Removes a callback for when disconnect is called while connected + void remDisconnectNormallyCB(ArFunctor *functor) + { + ArLMS2xx::remDisconnectNormallyCB(functor); + } + + /// Adds a callback for when disconnection happens because of an error + void addDisconnectOnErrorCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) + { + if (position == ArListPos::FIRST) + ArLMS2xx::addDisconnectOnErrorCB(functor, 75); + else if (position == ArListPos::LAST) + ArLMS2xx::addDisconnectOnErrorCB(functor, 25); + else + ArLMS2xx::addDisconnectOnErrorCB(functor, 25); + } + /// Removes a callback for when disconnection happens because of an error + void remDisconnectOnErrorCB(ArFunctor *functor) + { + ArLMS2xx::remDisconnectOnErrorCB(functor); + } + /// Adds a callback that is called whenever a laser packet is processed + void addDataCB(ArFunctor *functor, + ArListPos::Pos position = ArListPos::LAST) + { + if (position == ArListPos::FIRST) + ArLMS2xx::addReadingCB(functor, 75); + else if (position == ArListPos::LAST) + ArLMS2xx::addReadingCB(functor, 25); + else + ArLMS2xx::addReadingCB(functor, 25); + } + /// Removes a callback that is called whenever a laser packet is processed + void remDataCB(ArFunctor *functor) + { + ArLMS2xx::remReadingCB(functor); + } + + /// Sets the time without a response until connection assumed lost + void setConnectionTimeoutTime(int secs) + { setConnectionTimeoutSeconds(secs); } + /// Gets the time without a response until connection assumed lost + int getConnectionTimeoutTime(void) + { return ArMath::roundInt(getConnectionTimeoutSeconds()); } + +}; + + +#endif //ARSICK_H diff --git a/Legacy/Aria/include/ArSignalHandler.h b/Legacy/Aria/include/ArSignalHandler.h new file mode 100644 index 0000000..48670f9 --- /dev/null +++ b/Legacy/Aria/include/ArSignalHandler.h @@ -0,0 +1,163 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSIGNALHANDLER_H +#define ARSIGNALHANDLER_H + + +#include +#ifdef WIN32 +#else +#include +#endif +#include "ariaTypedefs.h" +#include "ArASyncTask.h" +#include "ArFunctor.h" + + +/// Signal handling class +/** + This is a signal handling class. It has both a threaded and non-threaded + mode of operation. The non-threaded mode will work in a threaded application + but it is best to use the threaded mode. The benefit of the threaded mode + is that if the signal incures some processing, but does not shutdown the + program (ie. SIGUSR1 or SIGUSR2), the threaded mode will handle the signal + in its own thread and hopefully that will not hurt the performance of the + tight loop robot control. Exaclty how much performance you get out of this + depends on your machines physical hardware and exactly what the processing + the signal handler does. For instance, a multi-processor machine has a much + greater chance of the signal handler not interfering with the robot control + loop. + + See the Aria main class for how to initialize a default setup of the + signal handling. + + There are functions to block, unblock, handle and unhandle signals. These + functions all must be called before creating the signalhandler. In either + single or multi-threaded mode. The functions to block and handle signals + creates a set of blocking and handling which is then used by the create + functions to tell the Linux kernel what to do. + + In the threaded mode, there is a signal handler thread that is created. + That thread is created in a detached state, which means it can not be + joined on. When the program exits, the signal handler thread will be + ignored and that thread will never exit its run loop. This is perfectly + fine behavior. There is no state that can be messed up in this fashion. + It is just easier to exit the program than to try to wake up that thread + and get it to exit itself. + + This class is for Linux only. Windows has virtualy no support for signals + and the little support that it does have is not realy usefull. There is + an empty implementation of this class for Windows so that code can compile + in both Linux and Windows. Just do not expect the code that uses this + signal handling to do anything in Windows. This should not be a problem + since signals are not used in Windows. +*/ +class ArSignalHandler : public ArASyncTask +{ +public: + + typedef enum + { + SigHUP=1, SigINT, SigQUIT, SigILL, SigTRAP, SigABRT, SigBUS, SigFPE, + SigKILL, SigUSR1, SigSEGV, SigUSR2, SigPIPE, SigALRM, SigTERM, SigSTKFLT, + SigCHLD, SigCONT, SigSTOP, SigTSTP, SigTTIN, SigTTOU, SigURG, + SigXCPU, SigXFSZ, SigVTALRM, SigPROF, SigWINCH, SigIO, SigPWR + } Signal; + + /// Setup the signal handling for a non-threaded program + AREXPORT static void createHandlerNonThreaded(); + + /// Setup the signal handling for a multi-threaded program + AREXPORT static void createHandlerThreaded(); + + /// Block all the common signals the kill a program + AREXPORT static void blockCommon(); + + /// Unblock all the signals + AREXPORT static void unblockAll(); + + /// Block the given signal + AREXPORT static void block(Signal sig); + + /// Unblock the given signal + AREXPORT static void unblock(Signal sig); + + /// Handle the given signal + AREXPORT static void handle(Signal sig); + + /// Dont handle the given signal + AREXPORT static void unhandle(Signal sig); + + /// Add a handler callback + AREXPORT static void addHandlerCB(ArFunctor1 *func, + ArListPos::Pos position); + + /// Remove a handler callback + AREXPORT static void delHandlerCB(ArFunctor1 *func); + + /// Removes all the handlers + AREXPORT static void delAllHandlerCBs(void); + + /// Get a pointer to the single ArSignalHandler instance + AREXPORT static ArSignalHandler * getHandler(); + + /// Get the name of the given signal + AREXPORT static const char * nameSignal(int sig); + + /// Block all the common signals for the calling thread only + AREXPORT static void blockCommonThisThread(); + + /// Block all the signals for the calling thread only + AREXPORT static void blockAllThisThread(); + + /// Destructor + virtual ~ArSignalHandler(); + + AREXPORT virtual void * runThread(void *arg); + + AREXPORT static void signalCB(int sig); + + AREXPORT static void logThread(void); +protected: + + ArSignalHandler(); + + static void initSigMap(); + + bool ourIgnoreQUIT; + + static ArSignalHandler *ourSignalHandler; + static ArStrMap ourSigMap; +#ifdef WIN32 +#else + static sigset_t ourBlockSigSet; + static sigset_t ourHandleSigSet; +#endif + static std::list*> ourHandlerList; +}; + + +#endif // ARSIGNALHANDLER_H diff --git a/Legacy/Aria/include/ArSimpleConnector.h b/Legacy/Aria/include/ArSimpleConnector.h new file mode 100644 index 0000000..15db94a --- /dev/null +++ b/Legacy/Aria/include/ArSimpleConnector.h @@ -0,0 +1,97 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSIMPLECONNECTOR_H +#define ARSIMPLECONNECTOR_H + +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ariaUtil.h" +#include "ArRobotConnector.h" +#include "ArLaserConnector.h" + +class ArSick; +class ArRobot; + + + +/// Legacy connector for robot and laser +/** + This is deprecated but is left in for compatibility with old code, + Instead use ArRobotConnector to set up ArRobot's connection to the robot, and + ArLaserConnector to set up connections with laser rangefinder devices. + + @deprecated Use ArRobotConnector and ArLaserConnector instead + **/ +class ArSimpleConnector +{ +public: + /// Constructor that takes args from the main + AREXPORT ArSimpleConnector(int *argc, char **argv); + /// Constructor that takes argument builder + AREXPORT ArSimpleConnector(ArArgumentBuilder *arguments); + /// Constructor that takes argument parser + AREXPORT ArSimpleConnector(ArArgumentParser *parser); + /// Destructor + AREXPORT ~ArSimpleConnector(void); + /// Sets up the robot to be connected + AREXPORT bool setupRobot(ArRobot *robot); + /// Sets up the robot then connects it + AREXPORT bool connectRobot(ArRobot *robot); + /// Sets up the laser to be connected + AREXPORT bool setupLaser(ArSick *laser); + /// Sets up a second laser to be connected + AREXPORT bool setupSecondLaser(ArSick *laser); + /// Sets up a laser t obe connected (make sure you setMaxNumLasers) + AREXPORT bool setupLaserArbitrary(ArSick *laser, + int laserNumber); + /// Connects the laser synchronously (will take up to a minute) + AREXPORT bool connectLaser(ArSick *laser); + /// Connects the laser synchronously (will take up to a minute) + AREXPORT bool connectSecondLaser(ArSick *laser); + /// Connects the laser synchronously (make sure you setMaxNumLasers) + AREXPORT bool connectLaserArbitrary(ArSick *laser, int laserNumber); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Sets the number of possible lasers + AREXPORT void setMaxNumLasers(int maxNumLasers = 1); +protected: + /// Finishes the stuff the constructor needs to do + void finishConstructor(void); + + ArArgumentParser *myParser; + bool myOwnParser; + ArRobotConnector *myRobotConnector; + ArLaserConnector *myLaserConnector; +}; + +#endif // ARSIMPLECONNECTOR_H diff --git a/Legacy/Aria/include/ArSimulatedLaser.h b/Legacy/Aria/include/ArSimulatedLaser.h new file mode 100644 index 0000000..3fc12cf --- /dev/null +++ b/Legacy/Aria/include/ArSimulatedLaser.h @@ -0,0 +1,110 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSIMULATEDLASER_H +#define ARSIMULATEDLASER_H + +#include "ariaTypedefs.h" +#include "ArLaser.h" + +class ArRobot; +class ArRobotPacket; + +/** + This class is a subclass of ArRangeDeviceThreaded meant for any + planar scanning lasers, like the SICK lasers, Hokoyo URG series + lasers, etc. Unlike most base classes this contains the superset + of everything that may need to be configured on any of the sensors, + this is so that the configuration and parameter files don't have to + deal with anything sensor specific. + + To see the different things you can set on a laser, call the + functions canSetDegrees, canChooseRange, canSetIncrement, + canChooseIncrement, canChooseUnits, canChooseReflectorBits, + canSetPowerControlled, canChooseStartBaud, and canChooseAutoBaud to + see what is available (the help for each of those tells you what + functions they are associated with, and for each function + associated with one of those it tells you to see the associated + function). + + @since 2.7.0 +**/ + +class ArSimulatedLaser : public ArLaser +{ +public: + /// Constructor + AREXPORT ArSimulatedLaser(ArLaser *laser); + /// Destructor + AREXPORT virtual ~ArSimulatedLaser(); + + AREXPORT virtual bool blockingConnect(void); + AREXPORT virtual bool asyncConnect(void); + AREXPORT virtual bool disconnect(void); + AREXPORT virtual bool isConnected(void) + { return myIsConnected; } + AREXPORT virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + +protected: + AREXPORT virtual void * runThread(void *arg); + AREXPORT virtual bool laserCheckParams(void); + AREXPORT bool finishParams(void); + AREXPORT bool simPacketHandler(ArRobotPacket *packet); + ArLaser *myLaser; + + double mySimBegin; + double mySimEnd; + double mySimIncrement; + + // stuff for the sim packet + ArPose mySimPacketStart; + ArTransform mySimPacketTrans; + ArTransform mySimPacketEncoderTrans; + unsigned int mySimPacketCounter; + unsigned int myWhichReading; + unsigned int myTotalNumReadings; + + bool myStartConnect; + bool myIsConnected; + bool myTryingToConnect; + bool myReceivedData; + + std::list::iterator myIter; + // range buffers to hold current range set and assembling range set + std::list *myAssembleReadings; + std::list *myCurrentReadings; + + ArRetFunctor1C mySimPacketHandler; +}; + +#endif // ARSIMULATEDLASER_H diff --git a/Legacy/Aria/include/ArSocket.h b/Legacy/Aria/include/ArSocket.h new file mode 100644 index 0000000..b16fee2 --- /dev/null +++ b/Legacy/Aria/include/ArSocket.h @@ -0,0 +1,400 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSOCKET_H +#define ARSOCKET_H + + +#ifndef WIN32 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + + +#include +#include "ariaTypedefs.h" +#include "ArMutex.h" +#include "ariaUtil.h" + +class ArFunctor; + + +/// socket communication wrapper +/** + ArSocket is a layer which allows you to use the sockets networking + interface in an operating system independent manner. All of the standard + commonly used socket functions are implemented such as open(), close(), + connect(), accept(), read(), write(), hostToNetOrder(), netToHostOrder(). ArSocket extends some of these functions to set useful options (see method documentation for details). It also provides additional useful functions like + writeString(), readString, setCloseCallback(), and more. + + In Windows, the sockets subsystem needs to be initialized and shutdown + by the program. So when a program starts it must call Aria::init() and + call Aria::shutdown() when it exits. (Or, to only initialize the socket + system, and not do any other global Aria initialization, use ArSocket::init() + and ArSocket::shutdown().) + + Some calls set an error code on failure in addition to returning false. This value is available from getError(). + If getError() returns something other than NoErr, a text description of the error may be available from getErrorStr(). + + @sa @ref socketServerExample.cpp + @sa @ref socketClientExample.cpp + + @ingroup UtilityClasses +*/ +class ArSocket +{ +public: + + enum Type {UDP, TCP, Unknown}; + enum Error {NoErr, NetFail, ConBadHost, ConNoRoute, ConRefused, NameLookup}; + + /// Constructor. You must then use either connect() or open(). + AREXPORT ArSocket(); + + /// Constructor which immediately connects to a server as a client + /// @a host Hostname or IP address of remote server + /// @a port Port number on server + /// @a Which IP protocol to use, type ArSocket::TCP or ArSocket::UDP + AREXPORT ArSocket(const char *host, int port, Type type); + + /// Constructor which immediately opens a port as a server + /// @a port Port number to open. Use a value greater than 1024. + /// @a doClose Automatically close the port when ArSocket is destroyed (recommend using true) + /// @a type Which IP protocol to use, ArSocket::TCP or ArSocket::UDP + AREXPORT ArSocket(int port, bool doClose, Type type); + + /// Destructor + AREXPORT ~ArSocket(); + + /// Initialize the OS sockets system, if neccesary + AREXPORT static bool init(); + + /// Shutdown the OS sockets system, if neccesary + AREXPORT static void shutdown(); + + /// Converts the given socket type to a displayable text string (for debugging). + AREXPORT static const char *toString(Type t); + + /** @internal */ + AREXPORT static bool ourInitialized; + + /// Copy internal socket structures + /// @internal + AREXPORT bool copy(int fd, bool doclose); + + /// Copy socket + /// @internal + AREXPORT void copy(ArSocket *s) + {myFD=s->myFD; myDoClose=false; mySin=s->mySin;} + + /// Transfer ownership of a socket + /** transfer() will transfer ownership to this socket. The input socket + will no longer close the file descriptor when it is destructed. + */ + AREXPORT void transfer(ArSocket *s) + {myFD=s->myFD; myDoClose=true; s->myDoClose=false; mySin=s->mySin; + myType=s->myType; strcpy(myRawIPString, s->myRawIPString); + setIPString(s->getIPString()); } + + /// Connect as a client to a server + AREXPORT bool connect(const char *host, int port, Type type = TCP, + const char *openOnIP = NULL); + + /** Open a server port + + Opens a server port, that is, a port that is bound to a local port (and optionally, address) + and listens for new incoming connections. Use accept() to wait for a + new incoming connection from a client. + + In additon, internally this method calls setLinger(0), setReuseAddress(), + and setNonBlock() to turn on these options (having these on is + particularly useful for servers). + + @param port Port number + @param type ArSocket::TCP or ArSocket::UDP. + @param openOnIP If given, only bind to the interface + accociated with this address (Linux only) (by default, all interfaces are used) + */ + AREXPORT bool open(int port, Type type, const char *openOnIP = NULL); + + /// Simply create a port. + AREXPORT bool create(Type type); + + /** Find the first valid unused port after @a startPort, and bind the socket to it. + @param startPort first port to try + @param openOnIP If given, only check ports open on the interface accociated with this address (Linux only) + */ + AREXPORT bool findValidPort(int startPort, const char *openOnIP = NULL); + + /// Connect the socket to the given address + AREXPORT bool connectTo(const char *host, int port); + + /// Connect the socket to the given address + AREXPORT bool connectTo(struct sockaddr_in *sin); + + /// Accept a new connection + AREXPORT bool accept(ArSocket *sock); + + /// Close the socket + AREXPORT bool close(); + + /// Write data to the socket + AREXPORT int write(const void *buff, size_t len); + + /// Read data from the socket + AREXPORT int read(void *buff, size_t len, unsigned int msWait = 0); + + /// Send a message (short string) on the socket + AREXPORT int sendTo(const void *msg, int len); + + /// Send a message (short string) on the socket + AREXPORT int sendTo(const void *msg, int len, struct sockaddr_in *sin); + + /// Receive a message (short string) from the socket + AREXPORT int recvFrom(void *msg, int len, sockaddr_in *sin); + + /// Convert a hostname string to an address structure + AREXPORT static bool hostAddr(const char *host, struct in_addr &addr); + + /// Convert an address structure to a hostname string + AREXPORT static bool addrHost(struct in_addr &addr, char *host); + + /// Get the localhost address + AREXPORT static std::string getHostName(); + + /// Get socket information (socket "name"). Aspects of this "name" are accessible with sockAddrIn(), inAddr(), inPort() + AREXPORT bool getSockName(); + + /// Accessor for the sockaddr + struct sockaddr_in * sockAddrIn() {return(&mySin);} + + /// Accessor for the in_addr part of sockaddr + struct in_addr * inAddr() {return(&mySin.sin_addr);} + + /// Accessor for the port of the sockaddr + unsigned short int inPort() {return(mySin.sin_port);} + + /// Convert @a addr into string numerical address + AREXPORT static void inToA(struct in_addr *addr, char *buff); + + /// Size of the sockaddr + static size_t sockAddrLen() {return(sizeof(struct sockaddr_in));} + +#ifdef WIN32 + /// Max host name length + static size_t maxHostNameLen() {return(MAXGETHOSTSTRUCT);} +#else + /// Max host name length + static size_t maxHostNameLen() {return(MAXHOSTNAMELEN);} +#endif + + /// Convert an int from host byte order to network byte order + AREXPORT static unsigned int hostToNetOrder(int i); + + /// Convert an int from network byte order to host byte order + AREXPORT static unsigned int netToHostOrder(int i); + + /// Set the linger value + AREXPORT bool setLinger(int time); + + /// Set broadcast value + AREXPORT bool setBroadcast(); + + /// Set the reuse address value + AREXPORT bool setReuseAddress(); + + /// Set socket to nonblocking. Most importantly, calls to read() will return immediately, even if no data is available. + AREXPORT bool setNonBlock(); + + /// Change the doClose value + AREXPORT void setDoClose(bool yesno) {myDoClose=yesno;} + + /// Get the file descriptor + AREXPORT int getFD() const {return(myFD);} + + /// Get the protocol type + AREXPORT Type getType() const {return(myType);} + + /// Get a string containing a description of the last error. Only valid if getError() does not return NoErr. + AREXPORT const std::string & getErrorStr() const {return(myErrorStr);} + + /// Get a code representing the last error + AREXPORT Error getError() const {return(myError);} + + /// Sets whether we're error tracking or not + AREXPORT void setErrorTracking(bool errorTracking) + { myErrorTracking = errorTracking; } + + /// Gets whether we're doing error tracking or not + AREXPORT bool getErrorTracking(void) { return myErrorTracking; } + + /// Gets if we've had a bad write (you have to use error tracking for this) + AREXPORT bool getBadWrite(void) const { return myBadWrite; } + + /// Gets if we've had a bad read (you have to use error tracking for this) + AREXPORT bool getBadRead(void) const { return myBadRead; } + + +#ifndef SWIG + /** @brief Writes a string to the socket (adding end of line characters) + * @swigomit + * @sa writeStringPlain() + */ + AREXPORT int writeString(const char *str, ...); +#endif + + /// Same as writeString(), but no varargs + AREXPORT int writeStringPlain(const char *str) { return writeString(str); } + + /// Reads a string from the socket + AREXPORT char *readString(unsigned int msWait = 0); + /// Whether to ignore carriage return characters in readString or not + AREXPORT void setReadStringIgnoreReturn(bool ignore) + { myStringIgnoreReturn = ignore; } + /// Clears the partial string read + AREXPORT void clearPartialReadString(void); + /// Compares a string against what was partially read + AREXPORT int comparePartialReadString(const char *partialString); + /// Gets the time we last successfully read a string from the socket + AREXPORT ArTime getLastStringReadTime(void) { return myLastStringReadTime; } + /// Sets echoing on the readString calls this socket does + AREXPORT void setEcho(bool echo) + { myStringAutoEcho = false; myStringEcho = echo; } + /// Gets if we are echoing on the readString calls this socket does + AREXPORT bool getEcho(void) { return myStringEcho; } + /// Sets whether we log the writeStrings or not + AREXPORT void setLogWriteStrings(bool logWriteStrings) + { myLogWriteStrings = logWriteStrings; } + /// Gets whether we log the writeStrings or not + AREXPORT bool getLogWriteStrings(void) { return myLogWriteStrings; } + /// Sets whether we use the wrong (legacy) end chars or not + AREXPORT void setStringUseWrongEndChars(bool useWrongEndChars) + { myStringWrongEndChars = useWrongEndChars; } + /// Gets whether we log the writeStrings or not + AREXPORT bool getStringUseWrongEndChars(void) + { return myStringWrongEndChars; } + /// Gets the raw ip number as a string + AREXPORT const char *getRawIPString(void) const { return myRawIPString; } + /// Gets the ip number as a string (this can be modified though) + AREXPORT const char *getIPString(void) const { return myIPString.c_str(); } + /// Sets the ip string + AREXPORT void setIPString(const char *ipString) + { if (ipString != NULL) myIPString = ipString; else myIPString = ""; } + /// Sets the callback for when the socket is closed (nicely or harshly) + AREXPORT void setCloseCallback(ArFunctor *functor) + { myCloseFunctor = functor; } + /// Sets the callback for when the socket is closed (nicely or harshly) + AREXPORT ArFunctor *getCloseCallback(void) { return myCloseFunctor; } + /// Gets the number of writes we've done + long getSends(void) { return mySends; } + /// Gets the number of bytes we've written + long getBytesSent(void) { return myBytesSent; } + /// Gets the number of reads we've done + long getRecvs(void) { return myRecvs; } + /// Gets the number of bytes we've read + long getBytesRecvd(void) { return myBytesRecvd; } + /// Resets the tracking information on the socket + void resetTracking(void) + { mySends = 0; myBytesSent = 0; myRecvs = 0; myBytesRecvd = 0; } + + /// Sets NODELAY option on TCP socket, which can reduce latency for small packet sizes. + AREXPORT bool setNoDelay(bool flag); + bool isOpen() { return myFD > 0; } +protected: + /// Sets the ip string + /// internal function that sets the ip string from the inAddr + void setRawIPString(void); + /// internal function that echos strings from read string + void doStringEcho(void); + // internal crossplatform init (mostly for string reading stuff) + void internalInit(void); + + // separates out a host string (possibly host:port) into a host and + // the port that should be used. + void separateHost(const char *rawHost, int rawPort, char *useHost, + size_t useHostSize, int *port); + + Type myType; + Error myError; + std::string myErrorStr; + bool myDoClose; + +#ifdef WIN32 + SOCKET myFD; + // Using the SOCKET data type mostly because this is what the Win32 methods + // return. + std::string myHost; + int myPort; +#else // Windows + int myFD; +#endif + + bool myNonBlocking; + struct sockaddr_in mySin; + + bool myLogWriteStrings; + ArMutex myReadStringMutex; + ArMutex myWriteStringMutex; + bool myStringAutoEcho; + bool myStringEcho; + bool myStringIgnoreReturn; + bool myStringWrongEndChars; + char myStringBuf[5000]; + size_t myStringPos; + char myStringBufEmpty[1]; + size_t myStringPosLast; + std::string myIPString; + char myRawIPString[128]; + ArTime myLastStringReadTime; + bool myStringGotEscapeChars; + bool myStringGotComplete; + bool myStringHaveEchoed; + + long mySends; + long myBytesSent; + long myRecvs; + long myBytesRecvd; + + bool myBadWrite; + bool myBadRead; + bool myErrorTracking; + + // A functor to call when the socket closes + ArFunctor *myCloseFunctor; +}; + + +#endif // ARSOCKET_H + diff --git a/Legacy/Aria/include/ArSonarAutoDisabler.h b/Legacy/Aria/include/ArSonarAutoDisabler.h new file mode 100644 index 0000000..b174148 --- /dev/null +++ b/Legacy/Aria/include/ArSonarAutoDisabler.h @@ -0,0 +1,91 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSONARAUTODISABLER_H +#define ARSONARAUTODISABLER_H + +/// Class for automatically disabling sonar when the robot is stopped +/** + If you create one of this class it will disable the sonar when the + robot stops moving and then enable the sonar when the robot moves. + Later this may get more parameters and the ability to be turned on + and off and things like that (email on aria-users if you want + them). + + Note that this class assumes it is the only class turning the sonar + on or off and that the sonar start on. + + @ingroup OptionalClasses + **/ + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArFunctor.h" + +class ArRobot; + +class ArSonarAutoDisabler +{ +public: + /// Constructor + AREXPORT ArSonarAutoDisabler(ArRobot *robot); + /// Destructor + AREXPORT virtual ~ArSonarAutoDisabler(); + /// Supresses this disabler (which turns off the sonar) + void supress(void) { mySupressed = true; } + /// Gets the callback to supress the autodisabler + ArFunctor *getSupressCallback(void) { return &mySupressCB; } + /// Unsupresses this disabler (goes back to auto enabling/disabling) + void unsupress(void) { mySupressed = false; } + /// Gets the callback to supress the autodisabler + ArFunctor *getUnsupressCallback(void) { return &myUnsupressCB; } + + /// Sets that we're autonomous drivign so we only enable some sonar + void setAutonomousDriving(void) { myAutonomousDriving = true; } + /// Gets the callback to set that we're driving autonomously + ArFunctor *getSetAutonomousDrivingCallback(void) + { return &mySetAutonomousDrivingCB; } + /// Sets that we're driving non-autonomously so we enable all sonar + void clearAutonomousDriving(void) { myAutonomousDriving = false; } + /// Gets the callback to set that we're not driving autonomously + ArFunctor *getClearAutonomousDrivingCallback(void) + { return &myClearAutonomousDrivingCB; } +protected: + /// our user task + AREXPORT void userTask(void); + ArRobot *myRobot; + ArTime myLastMoved; + ArTime myLastSupressed; + bool mySupressed; + bool myAutonomousDriving; + + ArFunctorC myUserTaskCB; + ArFunctorC mySupressCB; + ArFunctorC myUnsupressCB; + ArFunctorC mySetAutonomousDrivingCB; + ArFunctorC myClearAutonomousDrivingCB; +}; + +#endif // ARSONARAUTODISABLER diff --git a/Legacy/Aria/include/ArSonarConnector.h b/Legacy/Aria/include/ArSonarConnector.h new file mode 100644 index 0000000..c5630ba --- /dev/null +++ b/Legacy/Aria/include/ArSonarConnector.h @@ -0,0 +1,200 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSONARCONNECTOR_H +#define ARSONARCONNECTOR_H + +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ariaUtil.h" +#include "ArRobotConnector.h" + +class ArSonarMTX; +class ArRobot; + + + +/// Connect to sonar based on robot parameters and command-line arguments +/** + + ArSonarConnector makes a sonar connection either through a serial port + connection. + When you create your ArSonarConnector, pass it command line parameters via + either the argc and argv variables from main(), or pass it an + ArArgumentBuilder or ArArgumentParser object. (ArArgumentBuilder + is able to obtain command line parameters from a Windows program + that uses WinMain() instead of main()). + ArSonarConnector registers a callback with the global Aria class. Use + Aria::parseArgs() to parse all command line parameters to the program, and + Aria::logOptions() to print out information about all registered command-line parameters. + + The following command-line arguments are checked: + @verbinclude ArSonarConnector_options + + To connect to any sonars that were set up in the robot parameter file or + via command line arguments, call connectSonars(). If successful, + connectSonars() will return true and add an entry for each sonar connected + in the ArRobot object's list of sonars. These ArSonarMTX objects can be + accessed from your ArRobot object via ArRobot::findSonar() or ArRobot::getSonarMap(). + + + @since 2.8.0 + + **/ +class ArSonarConnector +{ +public: + /// Constructor that takes argument parser + AREXPORT ArSonarConnector( + ArArgumentParser *parser, + ArRobot *robot, ArRobotConnector *robotConnector, + bool autoParseArgs = true, + ArLog::LogLevel infoLogLevel = ArLog::Verbose, + ArRetFunctor1 *turnOnPowerOutputCB = NULL, + ArRetFunctor1 *turnOffPowerOutputCB = NULL); + /// Destructor + AREXPORT ~ArSonarConnector(void); + /// Connects all the sonars the robot has that should be auto connected + AREXPORT bool connectSonars( + bool continueOnFailedConnect = false, + bool addConnectedSonarsToRobot = true, + bool addAllSonarsToRobot = false, + bool turnOnSonars = true, + bool powerCycleSonarOnFailedConnect = true); + // Connects all the sonars in replay mode + AREXPORT bool connectReplaySonars( + bool continueOnFailedConnect = false, + bool addConnectedSonarsToRobot = true, + bool addAllSonarsToRobot = false, + bool turnOnSonars = true, + bool powerCycleSonarOnFailedConnect = true); + /// Sets up a sonar to be connected + AREXPORT bool setupSonar(ArSonarMTX *sonar, + int sonarNumber = 1); + /// Connects the sonar synchronously (will take up to a minute) + AREXPORT bool connectSonar(ArSonarMTX *sonar, + int sonarNumber = 1, + bool forceConnection = true); + /// Adds a sonar so parsing will get it + AREXPORT bool addSonar(ArSonarMTX *sonar, + int sonarNumber = 1); + /// Function to parse the arguments given in the constructor + AREXPORT bool parseArgs(void); + /// Function to parse the arguments given in an arbitrary parser + AREXPORT bool parseArgs(ArArgumentParser *parser); + /// Log the options the simple connector has + AREXPORT void logOptions(void) const; + /// Internal function to get the sonar (only useful between parseArgs and connectSonars) + AREXPORT ArSonarMTX *getSonar(int sonarNumber); + + /// Internal function to replace the sonar (only useful between parseArgs and connectSonars) but not the sonar data + AREXPORT bool replaceSonar(ArSonarMTX *sonar, int sonarNumber); + +protected: +/// Class that holds information about the sonar data +class SonarData +{ + public: + SonarData (int number, ArSonarMTX *sonar) { + myNumber = number; + mySonar = sonar; + myConn = NULL; + myConnect = false; myConnectReallySet = false; + myPort = NULL; + myPortType = NULL; + myType = NULL; + myRemoteTcpPort = 0; myRemoteTcpPortReallySet = false; + myBaud = NULL; + myAutoConn = NULL; + } + virtual ~SonarData() {} + /// The number of this sonar + int myNumber; + /// The actual pointer to this sonar + ArSonarMTX *mySonar; + // our connection + ArDeviceConnection *myConn; + // if we want to connect the sonar + bool myConnect; + // if myConnect was really set + bool myConnectReallySet; + // the port we want to connect the sonar on + const char *myPort; + // the type of port we want to connect to the sonar on + const char *myPortType; + // sonar Type + const char *myType; + // wheather to auto conn + const char *myAutoConn; + // sonar tcp port if we're doing a remote host + int myRemoteTcpPort; + // if our remote sonar tcp port was really set + bool myRemoteTcpPortReallySet; + /// the baud we want to use + const char *myBaud; +}; + + /// Turns on the power for the specific board in the firmware + AREXPORT bool turnOnPower(SonarData *sonarData); + + std::map mySonars; + + /// Parses the sonar arguments + AREXPORT bool parseSonarArgs(ArArgumentParser *parser, + SonarData *sonarData); + /// Logs the sonar command line option help text. + AREXPORT void logSonarOptions(SonarData *sonardata, bool header = true, bool metaOpts = true) const; + // Sets the sonar parameters + bool internalConfigureSonar(SonarData *sonarData); + + std::string mySonarTypes; + + // our parser + ArArgumentParser *myParser; + bool myOwnParser; + // if we should autoparse args or toss errors + bool myAutoParseArgs; + bool myParsedArgs; + + ArRobot *myRobot; + ArRobotConnector *myRobotConnector; + + // variables to hold if we're logging or not + bool mySonarLogPacketsReceived; + bool mySonarLogPacketsSent; + + ArLog::LogLevel myInfoLogLevel; + + ArRetFunctor1 *myTurnOnPowerOutputCB; + ArRetFunctor1 *myTurnOffPowerOutputCB; + + ArRetFunctorC myParseArgsCB; + ArConstFunctorC myLogOptionsCB; +}; + +#endif // ARLASERCONNECTOR_H diff --git a/Legacy/Aria/include/ArSonarDevice.h b/Legacy/Aria/include/ArSonarDevice.h new file mode 100644 index 0000000..1acba06 --- /dev/null +++ b/Legacy/Aria/include/ArSonarDevice.h @@ -0,0 +1,94 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSONARDEVICE_H +#define ARSONARDEVICE_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctor.h" + +#include "ArRobot.h" + +/// Keep track of recent sonar readings from a robot as an ArRangeDevice +/** + This class is for keeping a sonar history, which you may use for obstacle + avoidance, display, etc. + Simply use ArRobot::addRangeDevice() (or ArSonarDevice::setRobot()) + to attach an ArSonarDevice object to an ArRobot + robot object; ArSonarDevice will add a Sensor Interpretation task to the + ArRobot which will read new sonar readings each robot cycle and add + them to its sonar history. + + (Note that sonar range readings are from the surface of the sonar transducer disc, + not from the center of the robot.) + + @ingroup ImportantClasses + @ingroup DeviceClasses +*/ +class ArSonarDevice : public ArRangeDevice +{ +public: + /// Constructor + AREXPORT ArSonarDevice(size_t currentBufferSize = 24, + size_t cumulativeBufferSize = 64, + const char * name = "sonar"); + /// Destructor + AREXPORT virtual ~ArSonarDevice(); + /// Grabs the new readings from the robot and adds them to the buffers + /// (Primarily for internal use.) + AREXPORT void processReadings(void); + + /// Sets the robot pointer, also attaches its process function to the + /// robot as a Sensor Interpretation task. + AREXPORT virtual void setRobot(ArRobot *robot); + + /// Adds sonar readings to the current and cumulative buffers + /// Overrides the ArRangeDevice default action. + /// (This method is primarily for internal use.) + AREXPORT virtual void addReading(double x, double y); + + /// Sets a callback which if it returns true will ignore the reading + AREXPORT void setIgnoreReadingCB(ArRetFunctor1 *ignoreReadingCB); + + /// Gets the callback which if it returns true will ignore the reading + AREXPORT ArRetFunctor1 *getIgnoreReadingCB(void) + { return myIgnoreReadingCB; } + + /** @deprecated + * @sa ArRangeDevice::setMaxDistToKeepCumulative() + */ + AREXPORT void setCumulativeMaxRange(double range) + { setMaxDistToKeepCumulative(range); } +protected: + ArFunctorC myProcessCB; + double myFilterNearDist; // we throw out cumulative readings this close to current one + double myFilterFarDist; // throw out cumulative readings beyond this far from robot + + ArRetFunctor1 *myIgnoreReadingCB; +}; + + +#endif // ARSONARDEVICE_H diff --git a/Legacy/Aria/include/ArSonarMTX.h b/Legacy/Aria/include/ArSonarMTX.h new file mode 100644 index 0000000..5e64fcd --- /dev/null +++ b/Legacy/Aria/include/ArSonarMTX.h @@ -0,0 +1,565 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSONARMTX_H +#define ARSONARMTX_H + +#include "ariaTypedefs.h" +#include "ArRangeDevice.h" +#include "ArFunctor.h" +#include "ArRobot.h" +#include "ArRobotPacket.h" + + + +// Packets are in the format of +// 2 bytes header (0xfa 0xfb) +// 1 byte length +// 1 byte command +// xx bytes command specific / args +// 2 bytes checksum +// +// Alive packet +// request - 0xfa 0xfb 0x03 0x00 0x00 0x00 +// response - 0xfa 0xfb 0x03 0x00 0x00 0x00 +// +// Start Scan packet +// request - 0xfa 0xfb 0x03 0x01 0x00 0x01 +// reading - 0xfa 0xfb 0x07 0x01 0x0b 0x00 0xff 0xff 0x02 0xf5 +// +// Stop Scan packet +// request - 0xfa 0xfb 0x03 0x02 0x00 0x02 +// +// Reset packet +// request - 0xfa 0xfb 0x03 0x03 0x00 0x03 +// +// Get Number of Transducers (12 here) +// request - 0xfa 0xfb 0x03 0x11 0x00 0x11 +// response - 0xfa 0xfb 0x04 0x11 0x0c 0x11 0x0c +// +// Get Echo Sample Size packet (also called max range) +// request - 0xfa 0xfb 0x04 0x14 0x00 0x14 0x00 +// response - 0xfa 0xfb 0x06 0x14 0x01 0x00 0x01 0x14 0x01 +// note: byte 5 (0x01) is transducer # (starts at 0) +// note: bytes 6 & 7 are value +// +// Get Gain packet +// request - 0xfa 0xfb 0x04 0x17 0x00 0x17 0x00 +// response - 0xfa 0xfb 0x05 0x17 0x00 0x05 0x17 0x04 +// note: byte 5 (0x01) is transducer # (starts at 0) +// note: bytes 6 is gain +// +// Get Mask +// request - 0xfa 0xfb 0x03 0x12 0x00 0x12 +// response - 0xfa 0xfb 0x05 0x12 0xff 0x0f 0x12 0xf0 +// +// Get Number of Thresholds +// request - 0xfa 0xfb 0x03 0x18 0x00 0x18 +// response - 0xfa 0xfb 0x04 0x18 0x03 0x18 0x03 +// +// Get Sonar Delay +// request - 0xfa 0xfb 0x03 0x13 0x00 0x13 +// response - 0xfa 0xfb 0x04 0x13 0x01 0x13 0x01 +// +// Get Thresholds +// request - 0xfa 0xfb 0x04 0x19 0x00 0x19 0x00 +// response - 0xfa 0xfb 0x0a 0x19 0x00 0xb8 0x0b 0xdc 0x05 0xd0 0x07 0x7d 0x17 +// note: byte 5 (0x00) is transducer # +// +// Get Version +// request - 0xfa 0xfb 0x03 0x10 0x00 0x10 +// response - 0xfa 0xfb 0x04 0x10 0x01 0x10 0x01 +// +// Set Echo Sample Size (also set max range) +// request - 0xfa 0xfb 0x06 0x24 0x00 0x02 0x00 0x26 0x00 +// note: byte 5 (0x00) is transducer # +// note: there is no response - use get echo sample size to test +// +// Set Gain +// request - 0xfa 0xfb 0x05 0x27 0x00 0x05 0x27 0x05 +// note: byte 5 (0x00) is transducer #, gain is byte 6 +// note: there is no response - use get gain to test +// +// Set Mask +// request - 0xfa 0xfb 0x05 0x22 0xc0 0x81 0x22 0x41 +// note: byte 5 & 6 are the masks +// note: there is no response - use get mask test +// +// Set Sonar Delay +// request - 0xfa 0xfb 0x04 0x23 0xd9 0x23 0xd9 +// note: there is no response - use get sonar delay to test +// +// Set Thresholds +// request - 0xfa 0xfb 0x0a 0x29 0x00 0x38 0xae 0x06 0xaf 0xc9 0x63 0x31 0xc0 +// note: byte 5 is transducer number +// note: there is no response - use get thresholds to test +// + + +/// Receives sonar data from an MTX robot +/// Use ArSonarConnector to establish the connection and create and initiate the ArSonarMTX thread. +/// @since 2.8.0 +class ArSonarMTX : public ArASyncTask +{ +public: + /// Constructor + AREXPORT ArSonarMTX( + int sonarBoardNum = 0, + const char * name = "MTXSonar", ArDeviceConnection *conn = NULL, + ArRobot *robot = NULL); + /// Destructor + AREXPORT virtual ~ArSonarMTX(); + + /// Sets the robot pointer, also attaches its process function to the + /// robot as a Sensor Interpretation task. + AREXPORT virtual void setRobot(ArRobot *robot); + + AREXPORT int getBoardNum(void) + { return myBoardNum; } + + /// Sets the device this instance receives packets from + AREXPORT void setDeviceConnection(ArDeviceConnection *conn); + /// Gets the device this instance receives packets from + AREXPORT ArDeviceConnection *getDeviceConnection(void); + + /// Very Internal call that gets the packet sender, shouldn't be used + ArRobotPacketSender *getPacketSender(void) + { return mySender; } + /// Very Internal call that gets the packet sender, shouldn't be used + ArRobotPacketReceiver *getPacketReceiver(void) + { return myReceiver; } + + AREXPORT virtual bool blockingConnect(bool sendTracking, bool recvTracking); + /// Connect used for debug replay + AREXPORT virtual bool fakeConnect(); + AREXPORT virtual bool disconnect(void); + AREXPORT virtual bool isConnected(void) { return myIsConnected; } + AREXPORT virtual bool isTryingToConnect (void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + /// Logs the information about the sensor + AREXPORT void log(void); + + /// Lock this device + AREXPORT virtual int lockDevice() { return(myDeviceMutex.lock());} + /// Try to lock this device + AREXPORT virtual int tryLockDevice() {return(myDeviceMutex.tryLock());} + /// Unlock this device + AREXPORT virtual int unlockDevice() {return(myDeviceMutex.unlock());} + + AREXPORT virtual const char *getName(void) const; + + AREXPORT virtual const char *getNameWithBoard(void) const; + + AREXPORT void setInfoLogLevel(ArLog::LogLevel infoLogLevel) + { myInfoLogLevel = infoLogLevel; } + + /// Gets the default port type for the sonar + const char *getDefaultPortType(void) { return myDefaultPortType.c_str(); } + + /// Gets the default port type for the sonar + const char *getDefaultTcpPort(void) { return myDefaultTcpPort.c_str(); } + + /// Sets the numter of seconds without a response until connection assumed lost + AREXPORT virtual void setConnectionTimeoutSeconds(double seconds) + { ArLog::log(ArLog::Normal, + "%s::setConnectionTimeoutSeconds: Setting timeout to %g secs", + getName(), seconds); + myLastReading.setToNow(); myTimeoutSeconds = seconds; } + /// Gets the number of seconds without a response until connection assumed lost + AREXPORT virtual double getConnectionTimeoutSeconds(void) + {return myTimeoutSeconds; } + /// check for lost connections + AREXPORT bool checkLostConnection(void); + /// disconnect + AREXPORT void disconnectOnError(void); + /// Gets the time data was last receieved + ArTime getLastReadingTime(void) { return myLastReading; } + /// Gets the number of sonar readings received in the last second + AREXPORT int getReadingCount(void); + // Function called in sensorInterp to indicate that a + // reading was received + AREXPORT virtual void internalGotReading(void); + + AREXPORT bool sendAlive(); + AREXPORT bool sendReset(); + AREXPORT bool sendStart(); + AREXPORT bool sendStop(); + AREXPORT bool sendGetTransducerCount(); + AREXPORT bool sendGetGain(unsigned char transducerNumber); + AREXPORT bool sendSetGain(unsigned char transducerNumber, unsigned char gain); + AREXPORT bool sendGetMaxRange(unsigned char transducerNumber); + AREXPORT bool sendSetMaxRange(unsigned char transducerNumber, int echoSampleSize); + AREXPORT bool sendGetThresholds(unsigned char transducerNumber); + AREXPORT bool sendSetThresholds(unsigned char transducerNumber, int thres); + AREXPORT bool sendGetNumThresholdRanges(); + /* + AREXPORT bool sendGetNoiseDelta(unsigned char transducerNumber); + AREXPORT bool sendSetNoiseDelta(unsigned char transducerNumber, int noiseDelta); + */ + AREXPORT bool sendGetDelay(); + AREXPORT bool sendSetDelay(unsigned char delay); + AREXPORT bool sendSetMask(unsigned char maskLsb, unsigned char maskMsb); + AREXPORT bool sendGetMask(); + AREXPORT bool validateTransducers(); + AREXPORT bool validateGain(); + AREXPORT bool validateDelay(); + AREXPORT bool validateThresholds(); + AREXPORT bool validateMaxRange(); + /* + AREXPORT bool validateNoiseDelta(); + */ + AREXPORT bool validateNumThresholdRanges(); + AREXPORT bool requestFirmwareVersion(); + AREXPORT bool queryFirmwareVersion(); + + /// Adds a callback for when disconnection happens because of an error + void addDisconnectOnErrorCB(ArFunctor *functor, + int position = 51) + { myDisconnectOnErrorCBList.addCallback(functor, position); } + + /// Removes a callback for when disconnection happens because of an error + void remDisconnectOnErrorCB(ArFunctor *functor) + { myDisconnectOnErrorCBList.remCallback(functor); } + + /// Number of Transducers from board query + int getNumTransducers(void) const + { return myNumTransducers; } + /// Number of Configured Transducers + int getNumConfiguredTransducers(void) const + { return myNumConfiguredTransducers; } + /// Board Delay + int getBoardDelay(void) const + { return myBoardDelay; } + /// + int getBoardGain(void) const + { return myBoardGain; } + /// + /* + int getBoardNoiseDelta(void) const + { return myBoardNoiseDelta; } + */ + /// + int getBoardDetectionThreshold(void) const + { return myBoardDetectionThreshold; } + /// + int getBoardMaxRange(void) const + { return myBoardMaxRange; } + + bool getBoardUseForAutonomousDriving(void) const + { return myBoardUseForAutonomousDriving; } + + /// + int getUnitMapping(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_MAPPING]; + } } + + /// + int getUnitX(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_X]; + } } + + /// + int getUnitY(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_Y]; + } } + + /// + int getUnitTh(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_TH]; + } } + + /// + int getUnitGain(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_GAIN]; + } } + + /// + int getUnitDetectionThres(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_DETECTION_THRES]; + } } + + /// + /* + int getUnitNoiseDelta(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_NOISE_DELTA]; + } } + */ +#if 0 + /// + int getUnitThresClose(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_THRES_CLOSE]; + } } + + /// + int getUnitThresMed(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_THRES_MED]; + } } + + /// + int getUnitThresFar(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_THRES_FAR]; + } } +#endif + /// + int getUnitLastReading(int unit) const + { + std::map >::const_iterator iter = + mySonarMap.find(unit); + if (iter == mySonarMap.end()) + return -1; + else { + std::mapunitMap = iter->second; + return unitMap[SONAR_LAST_READING]; + } } + + int getFirmwareVersion(void) const + { return myFirmwareVersion; } + + bool turnOnTransducers(); + + bool turnOffTransducers(); + + bool disableForAutonomousDriving(); + +enum Headers { + HEADER1=0xfa, + //HEADER2=0xfb + HEADER2=0xf5 + }; + + + +protected: + ArDeviceConnection *myConn; + + std::string myName; + char myNameWithBoard[100]; + std::string myDefaultPortType; + std::string myDefaultTcpPort; + + double myTimeoutSeconds; + bool myRobotRunningAndConnected; + + bool myTransducersAreOn; + + ArTime myLastReading; + + // packet count + time_t myTimeLastReading; + int myReadingCurrentCount; + int myReadingCount; + + ArCallbackList myDisconnectOnErrorCBList; + + ArRobot *myRobot; + ArFunctorC myProcessCB; + + AREXPORT virtual void sonarSetName(const char *name); + AREXPORT virtual void * runThread(void *arg); + + void sensorInterp(void); + void failedToConnect(void); + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + int myBoardNum; + int myNumTransducers; + int myNumConfiguredTransducers; + unsigned char myVersion; + //unsigned char mySonarDelay; + bool myWarnedAboutExtraSonar; + + unsigned int myBoardDelay; + unsigned int myBoardGain; + /* + unsigned int myBoardNoiseDelta; + */ + unsigned int myBoardDetectionThreshold; + unsigned int myBoardMaxRange; + + bool myBoardUseForAutonomousDriving; + + unsigned char myTransducerMaskLSB; + unsigned char myTransducerMaskMSB; + + unsigned char myAutonomousDrivingTransducerMaskLSB; + unsigned char myAutonomousDrivingTransducerMaskMSB; + + // first index is transducer reletive to this board + // second index is defined below + std::map > mySonarMap; + enum SonarInfo + { + SONAR_IS_CONFIGURED, + SONAR_MAPPING, + SONAR_X, + SONAR_Y, + SONAR_TH, + SONAR_GAIN, + /* + SONAR_NOISE_DELTA, + */ + SONAR_DETECTION_THRES, + SONAR_MAX_RANGE, + SONAR_USE_FOR_AUTONOMOUS_DRIVING, + SONAR_LAST_READING + }; + +enum Sizes { + maxTransducers=16 + }; + +enum Commands { + ALIVE=0x00, + START_SCAN=0x01, + STOP_SCAN=0x02, + RESET=0x03, + TAKE_SELF_ECHO=0x04, + GET_VERSION=0x10, + GET_NUM_TRANDUCERS=0x11, + GET_TRANSDUCER_MASK=0x12, + SET_TRANSDUCER_MASK=0x22, + GET_SONAR_DELAY=0x13, + SET_SONAR_DELAY=0x23, + GET_ECHO_SAMPLE_SIZE=0x14, + SET_ECHO_SAMPLE_SIZE=0x24, + GET_GAIN=0x17, + SET_GAIN=0x27, + NUM_THRESHOLD_RANGES=0x18, + GET_THRESHOLDS=0x19, + SET_THRESHOLDS=0x29, + GET_NOISE_DELTA=0x1A, + SET_NOISE_DELTA=0x2A + }; + + bool mySendTracking; + bool myRecvTracking; + + ArLog::LogLevel myLogLevel; + + //ArSonarMTXPacketReceiver myReceiver; + ArRobotPacketReceiver *myReceiver; + ArRobotPacketSender *mySender; + + ArMutex myPacketsMutex; + ArMutex myDataMutex; + ArMutex myDeviceMutex; + + ArLog::LogLevel myInfoLogLevel; + + //std::list myPackets; + std::list myPackets; + + int myFirmwareVersion; + + ArTime myPrevSensorIntTime; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; + +}; + + + +#endif // ARSONARDEVICE_H diff --git a/Legacy/Aria/include/ArSonyPTZ.h b/Legacy/Aria/include/ArSonyPTZ.h new file mode 100644 index 0000000..2ec62d2 --- /dev/null +++ b/Legacy/Aria/include/ArSonyPTZ.h @@ -0,0 +1,124 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSONYPTZ_H +#define ARSONYPTZ_H + +#include "ariaTypedefs.h" +#include "ArBasePacket.h" +#include "ArPTZ.h" + +/// A class for for making commands to send to the sony +/** There are only two functioning ways to put things into this packet, you + MUST use thse, if you use anything else your commands won't work. You + must use uByteToBuf and byte2ToBuf. +*/ +class ArSonyPacket: public ArBasePacket +{ +public: + /// Constructor + AREXPORT ArSonyPacket(ArTypes::UByte2 bufferSize = 15); + AREXPORT virtual ~ArSonyPacket(); + + AREXPORT virtual void uByteToBuf(ArTypes::UByte val); + AREXPORT virtual void byte2ToBuf(ArTypes::Byte2 val); + /// This is a new function, read the details before you try to use it + AREXPORT void byte2ToBufAtPos(ArTypes::Byte2 val, ArTypes::UByte2 pose); +}; + +class ArRobot; + +/// A class to use the sony pan tilt zoom unit + +class ArSonyPTZ : public ArPTZ +{ +public: + AREXPORT ArSonyPTZ(ArRobot *robot); + AREXPORT virtual ~ArSonyPTZ(); + + AREXPORT virtual bool init(void); + AREXPORT virtual const char *getTypeName() { return "sony"; } +protected: + AREXPORT virtual bool pan_i(double degrees); + AREXPORT virtual bool panRel_i(double degrees); + AREXPORT virtual bool tilt_i(double degrees); + AREXPORT virtual bool tiltRel_i(double degrees); + AREXPORT virtual bool panTilt_i(double degreesPan, double degreesTilt); + AREXPORT virtual bool panTiltRel_i(double degreesPan, double degreesTilt); +public: + AREXPORT virtual bool canZoom(void) const { return true; } + AREXPORT virtual bool zoom(int zoomValue); + AREXPORT virtual bool zoomRel(int zoomValue); +protected: + AREXPORT virtual double getPan_i(void) const { return myPan; } + AREXPORT virtual double getTilt_i(void) const { return myTilt; } +public: + AREXPORT virtual int getZoom(void) const { return myZoom; } + + + AREXPORT virtual bool canGetFOV(void) { return true; } + /// Gets the field of view at maximum zoom + AREXPORT virtual double getFOVAtMaxZoom(void) { return 4.4; } + /// Gets the field of view at minimum zoom + AREXPORT virtual double getFOVAtMinZoom(void) { return 48.8; } + + AREXPORT bool backLightingOn(void); + AREXPORT bool backLightingOff(void); + //AREXPORT bool packetHandler(ArRobotPacket *packet); + /* unused? + enum { + MAX_PAN = 95, ///< maximum degrees the unit can pan (either direction) + MAX_TILT = 25, ///< maximum degrees the unit can tilt (either direction) + MIN_ZOOM = 0, ///< minimum value for zoom + MAX_ZOOM = 1023 ///< maximum value for zoom + }; + */ + + /// called automatically by Aria::init() + ///@since 2.7.6 + ///@internal +#ifndef SWIG + static void registerPTZType(); +#endif + +protected: + void initializePackets(void); + ArRobot *myRobot; + double myPan; + double myTilt; + int myZoom; + double myDegToTilt; + double myDegToPan; + ArSonyPacket myPacket; + ArSonyPacket myZoomPacket; + ArSonyPacket myPanTiltPacket; + + ///@since 2.7.6 + static ArPTZ* create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot); + ///@since 2.7.6 + static ArPTZConnector::GlobalPTZCreateFunc ourCreateFunc; +}; + +#endif // ARSONYPTZ_H diff --git a/Legacy/Aria/include/ArSoundPlayer.h b/Legacy/Aria/include/ArSoundPlayer.h new file mode 100644 index 0000000..ebea788 --- /dev/null +++ b/Legacy/Aria/include/ArSoundPlayer.h @@ -0,0 +1,123 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef _ARSOUNDPLAYER_H_ +#define _ARSOUNDPLAYER_H_ + + +#include "ArFunctor.h" + + + +/** + * @brief This class provides a cross-platform interface for playing short sound samples. + * (Currently implemented for Windows and Linux). + * @sa For I/O and network transfer of encoded audio, see the ArNetAudio library. + * @sa ArSoundsQueue + * + * @note Uses an external program to play WAV files on Linux. If an environment + * variable named PLAY_WAV is set, that program is used, otherwise, 'play' from + * the 'sox' toolset is used. PLAY_WAV must contain one word (the command; no arguments) + * A call to playWavFile() will return immediately after + * 'play' has finished, even though Linux may still be playing back the sound data. In general, + * this kind of thing is a problem, especially with speech recognition immediately after playing + * a sound. Ideally, we should be able to truly block until the sound has finished playback. + * Alas, it is not an ideal world. Another potential pitfall due to the use of + * an external program invocation: the program you call must not attempt to + * issue any output. 'play' from the 'sox' toolset automatically supresses + * normal output if it isn't called from an interactive terminal, but it may + * still issue some error messages, which will cause it to hang indefinately. + * + * The volume (level) of audio output from a robot is determined by two things: + * the computer sound device mixer, and also the amplifier which drives the + * speakers. The computer's mixer can be adjusted through the operating system: + * on Linux, you can use the 'aumix' program to adjust the Master and PCM + * levels. On Windows, use the Windows mixer program. If on Linux, ArSoundPlayer also + * prodives the setVolume() method, which adjusts the volume of the sound before + * it is played. + * + @ingroup UtilityClasses + */ +class ArSoundPlayer +{ + public: + /** Play a WAV (Windows RIFF) file + * @note Uses an external program to play WAV files on Linux. If an environment + * variable named PLAY_WAV is set, that program is used, otherwise, 'play' from + * the 'sox' toolset is used. See detailed note in the overview for this + * cass. + * @param filename Name of the file to play + * @param params ignored + */ + AREXPORT static bool playWavFile(const char* filename, const char* params); + + AREXPORT static bool playWavFile(const char* filename) { return playWavFile(filename, NULL); } + + /** Play a file in some native file format for the compilation platform. */ + AREXPORT static bool playNativeFile(const char* filename, const char* params); + + /** Cancel (interrupt) any current sound or file playback. */ + AREXPORT static void stopPlaying(); + + /** Return the static functor for playWavFile */ + AREXPORT static ArRetFunctor2 *getPlayWavFileCallback(); + + /** Return the static functor for stopPlaying(). */ + AREXPORT static ArFunctor* getStopPlayingCallback(); + + /** Play raw uncompressed PCM16 sound data. The format of this data is + * numSamples samples of two bytes each. Each byte pair is a signed little endian + * integer. + * The sound will be played back at 16kHz, monaurally. + * @return false on error, true on success. + */ + AREXPORT static bool playSoundPCM16(char* data, int numSamples); + + /** Set a volume adjustment applied to all sounds right before playing. + (So this adjusts the volume in addition to, not instead of, the + computer audio mixer). + Any value less than or equal to 0 is no volume i.e. muted or no output. + @linuxonly + */ + AREXPORT static void setVolume(double v); + + /** + Set volume as a "percent" of normal, where 100% is normal or natural + volume, 50% is increased by 50%, -50% is decreased by 50%, etc. (-100.0% is + no volume, or mute.) + @linuxonly + */ + AREXPORT static void setVolumePercent(double pct); + +protected: + static int ourPlayChildPID; ///< Only used on Linux. + static ArGlobalRetFunctor2 ourPlayWavFileCB; + static ArGlobalFunctor ourStopPlayingCB; + static double ourVolume; +}; + + +#endif // _ARSOUNDPLAYER_H_ diff --git a/Legacy/Aria/include/ArSoundsQueue.h b/Legacy/Aria/include/ArSoundsQueue.h new file mode 100644 index 0000000..17a65e0 --- /dev/null +++ b/Legacy/Aria/include/ArSoundsQueue.h @@ -0,0 +1,557 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARSOUNDSQUEUE_H +#define ARSOUNDSQUEUE_H + + +#include "ariaTypedefs.h" +#include "ArASyncTask.h" +#include "ArCondition.h" +#include "ArFunctor.h" +#include "ArSpeech.h" +#include +#include +#include + +/** + * @brief This class manages a queue of items to play as WAV files or as text to + * speak using a speech synthesizer. + * + * The actual playback of sound and speech is done through callbacks + * (which you can supply in the constructor or afterwards). + * Some callbacks you can use are provided by classes like ArSoundPlayer (for sound file + * playback) and ArFestival (from the ArSpeechSynth_Festival library) and ArCepstral + * (from the ArSpeechSynth_Cepstral librrary) for speech synthesis. + * + * Add sound files to the queue with play(), and text to speak with + * speak(). Use runAsync() to run + * the processing thread in the background, or run() to run synchronously in the + * current thread. + * + * + * @sa ArSoundPlayer + * @sa @ref soundsQueueExample.cpp + * + @ingroup UtilityClasses + */ + +class ArSoundsQueue: public ArASyncTask +{ +public: + + /** Opaque identifier for the type of an item in the sound queue. Not used + * during processing, but may be used to search for items in the queue. */ + enum ItemType { SPEECH, SOUND_FILE, SOUND_DATA, OTHER }; + + /** Callback for playing a queue item. First argument is the "data", second is + * item type-specific "parameters". Return true to continue processing more + * callbacks in a list, false to cancel processing. + */ + typedef ArRetFunctor2 PlayItemFunctor; + typedef ArFunctor InterruptItemFunctor; + + /** Callback types for determining whether to commence playing an item, + * or skipping it. + */ + typedef ArRetFunctor PlaybackConditionFunctor; + + /** A sound item in the queue, with callbacks for dealing with the + * item and the data to pass to those callbacks. + */ + class Item { + public: + std::string data; + ItemType type; + std::string params; + int priority; + std::list interruptCallbacks; + std::list playCallbacks; + std::list doneCallbacks; + std::list playbackConditionCallbacks; + + AREXPORT Item(); + AREXPORT Item(std::string _data, ItemType _type, std::string _params = "", int priority = 0); + AREXPORT Item(std::string _data, ItemType _type, std::string _params, int priority, std::list callbacks); + + AREXPORT Item(const ArSoundsQueue::Item& toCopy); + + /** Note: does not compare priority! */ + bool operator==(const Item& other) const + { + return (other.type == type && other.params == params && other.data == data); + } + + /** Called by sound queue to play this item by calling play callbacks. */ + void play(); + + /** Called by sound queue to interrupt this item by calling interrupt + * callbacks. */ + void interrupt(); + + /** Called by sound queue thread after playing this item by calling done + * callbacks. */ + void done(); + }; + + + AREXPORT ArSoundsQueue(); + + /** @deprecated + * @see addInitCallback() + * @see setSpeakCallback() + * @see setInterruptSpeechCallback() + * @see setPlayFileCallback + * @see setInterruptFileCallback + */ + AREXPORT ArSoundsQueue(ArRetFunctor *speakInitCB, + PlayItemFunctor *speakCB = 0, + InterruptItemFunctor *interruptSpeechCB = 0, + ArRetFunctor *playInitCB = 0, + PlayItemFunctor *playFileCB = 0, + InterruptItemFunctor *interruptFileCB = 0); + + /** Set default speech and WAV file callbacks for use + * by the convenience methods speak() and play(). + * Omit the last three arguments to use + * callbacks into ArSoundPlayer. + */ + AREXPORT ArSoundsQueue(ArSpeechSynth* speechSynthesizer, + ArRetFunctor *playInitCB = 0, + PlayItemFunctor *playFileCB = 0, + InterruptItemFunctor *interruptFileCB = 0); + + AREXPORT virtual ~ArSoundsQueue(); + + /** Add a callback to be called when the sound queue begins to run in its + * thread. (For example, the speech synthesizers must be initialized in + * the same thread as they are used.) + */ + AREXPORT void addInitCallback(ArRetFunctor *cb) { + myInitCallbacks.push_back(cb); + } + + /** @deprecated */ + AREXPORT void setSpeakInitCallback(ArRetFunctor *cb) { + addInitCallback(cb); + } + + /** Add (a copy of) the given item to the queue. */ + AREXPORT void addItem(ArSoundsQueue::Item item); + + /** Create a new queue item with the given data and add to the queue. */ + AREXPORT void addItem(ItemType type, const char* data, std::list callbacks, int priority = 0, const char* params = 0); + + /** Return true if all initialization callbacks have completed, false + * otherwise. + */ + AREXPORT bool isInitialized() + { + return myInitialized; + } + + /** @deprecated + * @see isPlaying() + */ + AREXPORT bool isSpeakingOrPlaying(void) { return (myPlayingSomething); } + + /// Returns true if an item is currently being played. + AREXPORT bool isPlaying() { return myPlayingSomething; } + + + /** @deprecated + * @return true if any queue item is being played. + * @see isPlaying() + */ + AREXPORT bool isSpeaking() { return myPlayingSomething; } + + + /// Begin processing the sounds queue synchronously (in this thread; does not return) + AREXPORT void run(void) { runInThisThread(); } + + /// Begin processing the sounds queue in a background thread + AREXPORT void runAsync(void) { create(false); } + + /** Temporarily stop processing the sounds queue. (Any currently playing sound + or speech utterance will finish. The sound device may remain open.) + */ + AREXPORT void pause(); + + /// Resume processing the sounds queue + AREXPORT void resume() ; + + /** @return true if the queue is paused */ + AREXPORT bool isPaused(); + + /// If sound is currently being played or speech is being spoken, interrupt it. (but continue processing the queue). SoundFinished callbacks will not be called. + AREXPORT void interrupt(); + + /** Empty the queue. If a sound is currently playing, it will not be interrupted. + QueueEmpty callbacks will be called. SoundFinished callbacks will not be + called. + */ + AREXPORT void clearQueue(); + + /** End the processing thread. + * This function is deprecated. Use stopRunning() instead. + * @deprecated + This shuts down the sound queue completely. To + temporarily stop the queue processing, use pause(). To interrupt the + currently playing sound, use interrupt(). + */ + AREXPORT void stop() ; + + /// Create and return a new a functor for pause(), which other modules can use to pause this sounds + /// queue. + AREXPORT ArFunctor* getPauseCallback() + { + return new ArFunctorC(this, &ArSoundsQueue::pause); + } + + /// Create and return a new functor for resume(), which other modules can use to resume this + /// sounds queue. + AREXPORT ArFunctor* getResumeCallback() + { + return new ArFunctorC(this, &ArSoundsQueue::resume); + } + + + /// Get the current size of the speech/sound playback queue. + AREXPORT size_t getCurrentQueueSize() + { + size_t size; + lock(); + size = myQueue.size(); + unlock(); + return size; + } + + /** Add a callback functor to be invoked when playback of one sound or speech utterance starts. */ + AREXPORT void addSoundStartedCallback(ArFunctor* f) + { + myStartPlaybackCBList.push_back(f); + } + + /** Remove a callback functor to be invoked when playback one sound or speech utterance starts. */ + AREXPORT void remSoundStartedCallback(ArFunctor* f) + { + myStartPlaybackCBList.remove(f); + } + + /** Add a callback functor to be invoked when plackback of one sound or speech + * utterance finishes */ + AREXPORT void addSoundFinishedCallback(ArFunctor* f) + { + myEndPlaybackCBList.push_back(f); + } + + /** Remove a callback functor to be invoked when plackback of one sound or + * speech utterance finishes. */ + AREXPORT void remSoundFinishedCallback(ArFunctor* f) + { + myEndPlaybackCBList.remove(f); + } + + /** Add a callback functor to be invoked when playback of one sound or speech utterance starts. */ + AREXPORT void addSoundItemStartedCallback( + ArFunctor1 *f) + { + myStartItemPlaybackCBList.push_back(f); + } + + /** Remove a callback functor to be invoked when playback one sound or speech utterance starts. */ + AREXPORT void remSoundItemStartedCallback( + ArFunctor1 *f) + { + myStartItemPlaybackCBList.remove(f); + } + + /** Add a callback functor to be invoked when plackback of one sound or speech + * utterance finishes */ + AREXPORT void addSoundItemFinishedCallback( + ArFunctor1 *f) + { + myEndItemPlaybackCBList.push_back(f); + } + + /** Remove a callback functor to be invoked when plackback of one sound or + * speech utterance finishes. */ + AREXPORT void remSoundItemFinishedCallback( + ArFunctor1 *f) + { + myEndItemPlaybackCBList.remove(f); + } + + /** Add a callback functor to be invoked when a the sound queue becomes + * non-empty, that is, when a block of sounds/speech utterances begins. + */ + AREXPORT void addQueueNonemptyCallback(ArFunctor* f) + { + myQueueNonemptyCallbacks.push_back(f); + } + + /** Remove a functor added by addQueueNonemptyCallback(). */ + AREXPORT void remQueueNonemptyCallback(ArFunctor* f) + { + myQueueNonemptyCallbacks.remove(f); + } + + /** Add a callback functor to be invoked when the sound queue becomes empty + * and the last sound has finished playing, + * that is, when a block of sounds/speech utterances ends. This will not + * be called when the sound queue first begins running. + */ + AREXPORT void addQueueEmptyCallback(ArFunctor* f) + { + myQueueEmptyCallbacks.push_back(f); + } + + /** Remove a functor added by addQueueEmptyCallback() */ + AREXPORT void remQueueEmptyCallback(ArFunctor* f) + { + myQueueEmptyCallbacks.remove(f); + } + + + + /** Find items waiting in the queue. This is mainly useful in finding + * speech text. + * @param item Item to search for. + * @return A set of positions in the queue. 1 indicates the next sound that will + * play, followed by 2, etc. + * @note You have a potential race condition if an item is removed from the queue + * after this method returns, but before you on the information returned. + * For best results, pause the sound queue while using this information. + */ + AREXPORT std::set findPendingItems(const char* item); + + /** Remove pending items with the given data and type. */ + AREXPORT void removePendingItems(const char* item, ItemType type); + + /** Remove pending items with the given data. */ + AREXPORT void removePendingItems(const char* data); + + /** Remove pending items with a priority less than that given. */ + AREXPORT void removePendingItems(int priority); + + /** Remove pending items with priority less the given priority and with the given type. */ + AREXPORT void removePendingItems(int priority, ItemType type); + + /** Remove pending items with the given type. */ + AREXPORT void removePendingItems(ItemType type); + + /** Remove pending and current items with a priority less than that given. */ + AREXPORT void removeItems(int priority); + + /** Removes pending and current items with the same data and type as the given item **/ + AREXPORT void removeItems(Item item); + + AREXPORT std::string nextItem(ItemType type); + AREXPORT std::string nextItem(int priority); + AREXPORT std::string nextItem(ItemType type, int priority); + + /// Convenience methods for special speech synthesis and WAV file queue items: + //@{ + + /** + * As a convenience, you may set a "default" speech synthesis callback, + * and then simply use the speak() method to add a speech item to the queue + * with those callbacks. + * @sa Item + */ + AREXPORT void setSpeakCallback(PlayItemFunctor *cb) { + myDefaultSpeakCB = cb; + } + + /** Set the "default" callback to interrupt a current speech utterance, used + * by speak() + * @sa Item + */ + AREXPORT void setInterruptSpeechCallback(InterruptItemFunctor *cb) { + myDefaultInterruptSpeechCB = cb; + } + + /** As a convenience, you may set a "default" WAV file playback callback, + * and then simply use the play() method to add the file to the queue with + * this callback. + * @sa Item + */ + AREXPORT void setPlayFileCallback(PlayItemFunctor *cb) { + myDefaultPlayFileCB = cb; + } + + /** @deprecated use setPlayFileCallback() */ + AREXPORT void setPlayWavFileCallback(PlayItemFunctor* cb) { + setPlayFileCallback(cb); + } + + /** Set the "default" callback to interrupt current wav file playback, for use + * by the play() convenience method. + * @sa Item + */ + AREXPORT void setInterruptFileCallback(InterruptItemFunctor *cb) { + myDefaultInterruptFileCB = cb; + } + + /** @deprecated use setInterruptFileCallback() */ + AREXPORT void setInterruptWavFileCallback(InterruptItemFunctor* cb) { + setInterruptFileCallback(cb); + } + + + /** Add text string item to the queue for speech synthesis. The text will be + * sent to the "speak" callback, if set, otherwise the SynthesiseToSound and + * PlaySynthesizedSound callbacks are used, if set. + */ + AREXPORT void speak(const char *str); + + /** Add a sound file to the queue for default sound file playback. */ + AREXPORT void play(const char *filename); + +#if !(defined(WIN32) && defined(_MANAGED)) && !defined(SWIG) + + /** Add a formatted text string (like printf) to the queue configured for default speech + * synthesis. When reached in the queue while running, the text will be + * sent to the "speak" callback, if set, otherwise, the "SythesizeToSound" and + * "PlaySynthesizedSound" callbacks will be used (if they are set.) + * + * @param fmt Format string. + * @param ... Arguments to format into the format string. + */ + AREXPORT void speakf(const char *fmt, ...); + + + /** Speak with alternate voice. */ + AREXPORT void speakWithVoice(const char* voice, const char* fmt, ...); + + /** Speak with alternate priority. */ + AREXPORT void speakWithPriority(int priority, const char* fmt, ...); + + /** Add a sound file to the queue for default sound file playback. + * + * @param filename_fmt Format string for determining the filename of the WAV + * file, same as printf(). + * @param ... If given, arguments to format into the format string. + */ + AREXPORT void playf(const char *filename_fmt, ...); + +#endif // MS Managed C++ or SWIG + + /** Return an item set up for speech with previously set default speech + * callbacks. + * @param speech Text to speak (optional) + * @see setSpeechCallback() + * @see addItem() + */ + AREXPORT ArSoundsQueue::Item createDefaultSpeechItem(const char* speech = 0); + + /** Return an item set up for sound file playback with previously set default + * play callbacks. + * @param filename Filename to set (optional) + * @see setPlayFileCallback() + * @see addItem() + */ + AREXPORT ArSoundsQueue::Item createDefaultFileItem(const char* filename = 0); + + //@} + + /** Set a playback condition functor used for default speech and sound file + * items. Set to NULL to clear. */ + AREXPORT void setDefaultPlayConditionCB(PlaybackConditionFunctor* f) { + myDefaultPlayConditionCB = f; + } + + /// main function for thread + /** @internal */ + AREXPORT virtual void *runThread(void *arg); + +protected: + bool myInitialized; + std::list myQueue; + ArMutex myQueueMutex; + void lock() { + myQueueMutex.lock(); + } + void unlock() { + myQueueMutex.unlock(); + } + bool tryLock() { + return myQueueMutex.tryLock(); + } + + /// Functors to invoke when we start running in our thread + std::list< ArRetFunctor* > myInitCallbacks; + + bool myPlayingSomething; + Item myLastItem; ///< The current or most recent item played. + + /// Used by speak() and play() convenience methods: + //@{ + PlayItemFunctor *myDefaultSpeakCB; + InterruptItemFunctor *myDefaultInterruptSpeechCB; + PlayItemFunctor *myDefaultPlayFileCB; + InterruptItemFunctor *myDefaultInterruptFileCB; + //@} + + int myPauseRequestCount; ///< Semaphore for doing pausing and resuming of the queue + ArCondition myPausedCondition; ///< Condition variable used by the thread to pause + + /// Functors to invoke during queue processing + //@{ + std::list myStartPlaybackCBList; + std::list myEndPlaybackCBList; + std::list *> myStartItemPlaybackCBList; + std::list *> myEndItemPlaybackCBList; + std::list myQueueNonemptyCallbacks; + std::list myQueueEmptyCallbacks; + //@} + + PlaybackConditionFunctor* myDefaultPlayConditionCB; ///< Used when creating default configured speech and sound file items + + /// Invoke each functor in a list + void invokeCallbacks(const std::list& lst); + + /// Invoke each functor in a list, but stop if any of them return false. + void invokeCallbacks(const std::list*>& lst); + + /** push item onto queue + * @sa addItem() + */ + //@{ + void pushQueueItem(Item item); + void pushQueueItem_NoLock(Item item); + //@} + + /** Pop item from queue and return it */ + //@{ + Item popQueueItem(); + Item popQueueItem_NoLock(); + //@} + +}; + +#endif + diff --git a/Legacy/Aria/include/ArSpeech.h b/Legacy/Aria/include/ArSpeech.h new file mode 100644 index 0000000..f299e5f --- /dev/null +++ b/Legacy/Aria/include/ArSpeech.h @@ -0,0 +1,166 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* $Id: ArSpeech.h,v 1.15 2007-08-27 21:48:33 reed Exp $ */ + +#ifndef ARSPEECH_H +#define ARSPEECH_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ArConfig.h" +#include +#include + + +/** @brief Abstract interface to speech synthesis. + * + * This class defines the abstract interface for speech synthesizers + * used with Aria. + * Implementations are provided in the separate ArSpeechSynth_Cepstral and + * ArSpeechSynth_Festival libraries. + * This class provides a common-denominator + * interface. Implementations (especially ArCepstral) may support more + * features, or behave differently; refer to their documentation for more + * information. + * + * This class registers one parameter with the global ArConfig object in the + * "Speech Synthesis" section: The parameter is named "voice" and sets the voice + * used for speech synthesis, if multiple voices is supported and the + * new voice can be loaded. + */ + +class ArSpeechSynth +{ +public: + + /** Don't forget to call this from derived classes. */ + AREXPORT ArSpeechSynth(); + + AREXPORT virtual ~ArSpeechSynth(); + + + /** Perform synthesizer initialization, if necessary. You must call + * this method. + * + * (Subclass implementations should call this method *after* initializing their + * speech engine.) + */ + AREXPORT virtual bool init(); + + /** Use the given ArConfig object to read parameters such as voice, speaking + * rate, volume. + */ + AREXPORT virtual void addToConfig(ArConfig *config); + + /** Speaks the given text. + * @param str The text to speak. + * @param voiceParams Voice selection criteria expression + * (implementation-specific) + * @param audioOutputCB If not NULL, send synthesized audio data to this + * callback (may be called several times). Otherwise, play using default + * AudioCallback, or directly out the speakers + * @param sampleRate if given, temporarily use this sample rate for this + * speech, then restore. If 0, use current sample rate. + */ + AREXPORT virtual bool speak(const char *str, const char* voiceParams, ArRetFunctor2* audioOutputCB, unsigned short sampleRate = 0) = 0; + + /** Speaks the given text. + * @param str The text to speak. + * @param voiceParams Voice selection criteria expression + * (implementation-specific) + */ + AREXPORT virtual bool speak(const char *str, const char* voiceParams = NULL); + + /** Speaks the given string, using current voice and output settings, + * taking varargs and a format string (like printf) + */ + AREXPORT virtual bool speakf(const char* fmt, ...) = 0; + + /** If any speech is currently ongoing, interrupt it. + */ + AREXPORT virtual void interrupt() = 0; + + /** @return a functor for init() to use with ArSoundsQueue */ + AREXPORT ArRetFunctorC* getInitCallback(); + + /** @return a functor for speak() to use with ArSoundsQueue */ + AREXPORT ArRetFunctor2C* getSpeakCallback(void) ; + + + /** @return a functor for interrupt() */ + AREXPORT ArFunctorC* getInterruptCallback(); + + + /** Instead of playing synthesized audio using the synthesizer's internal + * audio playback, call the given callback when a chunk of audio has + * been synthesized. Audio is passed to the callback in the first parameter + * as signed 16-bit samples (PCM16). The sample rate is 16kHz but may be + * changed with setAudioSampleRate(). The second parameter is the number + * of samples. The return value from the callback is ignored. + */ + AREXPORT void setAudioCallback(ArRetFunctor2* cb); + + + /** Change audio sample rate (Hz). Normal rate is 16000 Hz. + * Suggested values are 8000, 16000, or 44400 + */ + AREXPORT virtual void setAudioSampleRate(int rate) = 0; + + AREXPORT virtual int getAudioSampleRate() = 0; + + /** Lock, if neccesary */ + AREXPORT virtual void lock() { } + /** Unlock, if neccesary */ + AREXPORT virtual void unlock() { } + + /** Set the current voice by name. + * Replaces fully any previous required voice criteria. + * @sa getVoiceNames + */ + AREXPORT virtual bool setVoice(const char* name) = 0; + + /** Get name of current voice, if set with setVoice (else returns NULL) */ + AREXPORT virtual const char* getCurrentVoiceName() = 0; + + /** Return a list of available voice names, if possible. */ + AREXPORT virtual std::list getVoiceNames() = 0; + +protected: + ArRetFunctor2C mySpeakCB; + ArRetFunctorC myInitCB; + ArFunctorC myInterruptCB; + ArRetFunctor2 *myAudioPlaybackCB; ///< If set, send audio to this callback instead of playing it directly +private: + ArRetFunctorC myProcessConfigCB; + char myConfigVoice[32]; + bool processConfig(); + void addVoiceConfigParam(ArConfig *config); + +}; + + + +#endif diff --git a/Legacy/Aria/include/ArStringInfoGroup.h b/Legacy/Aria/include/ArStringInfoGroup.h new file mode 100644 index 0000000..1ffb0bf --- /dev/null +++ b/Legacy/Aria/include/ArStringInfoGroup.h @@ -0,0 +1,99 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSTRINGINFOGROUP_H +#define ARSTRINGINFOGROUP_H + +#include "ariaUtil.h" +#include "ArMutex.h" +#include +#include +#include + +/** + This class takes callbacks from different classes that want this + string information and then lets you just add the information here + instead of to each individual class. + + @ingroup OptionalClasses + **/ +class ArStringInfoGroup +{ +public: + /// Constructor + AREXPORT ArStringInfoGroup(); + /// Destructor + AREXPORT virtual ~ArStringInfoGroup(); + /// Adds a string to the list in the raw format + AREXPORT bool addString(const char *name, ArTypes::UByte2 maxLen, + ArFunctor2 *functor); + + /// Adds an int to the list in the helped way + AREXPORT bool addStringInt(const char *name, ArTypes::UByte2 maxLen, + ArRetFunctor *functor, + const char *format = "%d"); + + /// Adds a double to the list in the helped way + AREXPORT bool addStringDouble(const char *name, ArTypes::UByte2 maxLen, + ArRetFunctor *functor, + const char *format = "%g"); + + /// Adds a bool to the list in the helped way + AREXPORT bool addStringBool(const char *name, ArTypes::UByte2 maxLen, + ArRetFunctor *functor, + const char *format = "%s"); + + /// Adds a string to the list in the helped way + AREXPORT bool addStringString(const char *name, ArTypes::UByte2 maxLen, + ArRetFunctor *functor, + const char *format = "%s"); + + /// Adds an int to the list in the helped way + AREXPORT bool addStringUnsignedLong(const char *name, + ArTypes::UByte2 maxLen, + ArRetFunctor *functor, + const char *format = "%lu"); + + /// Adds an int to the list in the helped way + AREXPORT bool addStringLong(const char *name, + ArTypes::UByte2 maxLen, + ArRetFunctor *functor, + const char *format = "%ld"); + + /// This is the function to add a callback to be called by addString + AREXPORT void addAddStringCallback( + ArFunctor3 *> *functor, + ArListPos::Pos position = ArListPos::LAST); + +protected: + ArMutex myDataMutex; + std::set myAddedStrings; + std::list *> *> myAddStringCBList; +}; + + +#endif // ARSTRINGINFOHELPER_H diff --git a/Legacy/Aria/include/ArSyncLoop.h b/Legacy/Aria/include/ArSyncLoop.h new file mode 100644 index 0000000..71fb0f2 --- /dev/null +++ b/Legacy/Aria/include/ArSyncLoop.h @@ -0,0 +1,61 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSYNCLOOP_H +#define ARSYNCLOOP_H + + +#include "ariaTypedefs.h" +#include "ArASyncTask.h" +#include "ArSyncTask.h" + + +class ArRobot; + + +class ArSyncLoop : public ArASyncTask +{ +public: + + AREXPORT ArSyncLoop(); + AREXPORT virtual ~ArSyncLoop(); + + AREXPORT void setRobot(ArRobot *robot); + + AREXPORT void stopRunIfNotConnected(bool stopRun); + AREXPORT virtual void * runThread(void *arg); + + AREXPORT virtual const char *getThreadActivity(void); + + +protected: + bool myStopRunIfNotConnected; + ArRobot *myRobot; + bool myInRun; + +}; + + +#endif // ARSYNCLOOP_H diff --git a/Legacy/Aria/include/ArSyncTask.h b/Legacy/Aria/include/ArSyncTask.h new file mode 100644 index 0000000..59d32da --- /dev/null +++ b/Legacy/Aria/include/ArSyncTask.h @@ -0,0 +1,164 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARSYNCTASK_H +#define ARSYNCTASK_H + +#include +#include +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ArTaskState.h" + +/// Class used internally to manage the tasks that are called every cycle +/** + This is used internally, no user should normally have to create one, but + serious developers may want to use the members. Most users will be able to + add user tasks via the ArRobot class. + + The way it works is that each instance is a node in a tree. The only node + that should ever be created with a new is the top one. The run and print + functions both call the run/print on themselves, then on all of their + children, going from lowest numbered position to highest numbered, lower + going first. There are no hard limits to the position, it can be any + integer. ARIA uses the convention of 0 to 100, when you add things of + your own you should leave room to add in between. Also you can add things + with the same position, the only effect this has is that the first addition + will show up first in the run or print. + + After the top one is created, every other task should be created with + either addNewBranch() or addNewLeaf(). Each node can either be a branch node + or a list node. The list (a multimap) of branches/nodes is ordered + by the position passed in to the add function. addNewBranch() adds a new + branch node to the instance it is called on, with the given name and + position. addNewLeaf() adds a new leaf node to the instance it is called on, + with the given name and position, and also with the ArFunctor given, this + functor will be called when the leaf is run. Either add creates the new + instance and puts it in the list of branches/nodes in the approriate spot. + + The tree takes care of all of its own memory management and list management, + the "add" functions put into the list and creates the memory, conversely + if you delete an ArSyncTask (which is the correct way to get rid of one) + it will remove itself from its parents list. + + If you want to add something to the tree the proper way to do it is to get + the pointer to the root of the tree (ie with ArRobot::getSyncProcRoot) and + then to use find on the root to find the branch you want to travel down, + then continue this until you find the node you want to add to. Once there + just call addNewBranch or addNewLeaf and you're done. + + The state of a task can be stored in the target of a given ArTaskState::State pointer, + or if NULL than ArSyncTask will use its own member variable. + + @internal +*/ + +class ArSyncTask +{ +public: + /// Constructor, shouldn't ever do a new on anything besides the root node + AREXPORT ArSyncTask(const char *name, ArFunctor * functor = NULL, + ArTaskState::State *state = NULL, + ArSyncTask * parent = NULL); + /// Destructor + AREXPORT virtual ~ArSyncTask(); + + /// Runs the node, which runs all children of this node as well + AREXPORT void run(void); + /// Prints the node, which prints all the children of this node as well + AREXPORT void log(int depth = 0); + + /// Gets the state of the task + AREXPORT ArTaskState::State getState(void); + /// Sets the state of the task + AREXPORT void setState(ArTaskState::State state); + + /// Finds the task in the instances list of children, by name + AREXPORT ArSyncTask *findNonRecursive(const char *name); + /// Finds the task in the instances list of children, by functor + AREXPORT ArSyncTask *findNonRecursive(ArFunctor *functor); + + /// Finds the task recursively down the tree by name + AREXPORT ArSyncTask *find(const char *name); + /// Finds the task recursively down the tree by functor + AREXPORT ArSyncTask *find(ArFunctor *functor); + + /// Returns what this is running, if anything (recurses) + AREXPORT ArSyncTask *getRunning(void); + + /// Adds a new branch to this instance + AREXPORT void addNewBranch(const char *nameOfNew, int position, + ArTaskState::State *state = NULL); + /// Adds a new leaf to this instance + AREXPORT void addNewLeaf(const char *nameOfNew, int position, + ArFunctor *functor, + ArTaskState::State *state = NULL); + + /// Gets the name of this task + AREXPORT std::string getName(void); + + /// Gets the functor this instance runs, if there is one + AREXPORT ArFunctor *getFunctor(void); + + /// Sets the functor called to get the cycle warning time (should only be used from the robot) + AREXPORT void setWarningTimeCB( + ArRetFunctor *functor); + /// Gets the functor called to get the cycle warning time (should only be used from the robot) + AREXPORT ArRetFunctor *getWarningTimeCB(void); + + /// Sets the functor called to check if there should be a time warning this cycle (should only be used from the robot) + AREXPORT void setNoTimeWarningCB( + ArRetFunctor *functor); + /// Gets the functor called to check if there should be a time warning this cycle (should only be used from the robot) + AREXPORT ArRetFunctor *getNoTimeWarningCB(void); + + // removes this task from the map + AREXPORT void remove(ArSyncTask * proc); + + // returns whether this node is deleting or not + AREXPORT bool isDeleting(void); +protected: + std::multimap myMultiMap; + ArTaskState::State *myStatePointer; + ArTaskState::State myState; + ArFunctor *myFunctor; + std::string myName; + ArSyncTask *myParent; + bool myIsDeleting; + ArRetFunctor *myWarningTimeCB; + ArRetFunctor *myNoTimeWarningCB; + // variables for introspection + bool myRunning; + // this is just a pointer to what we're invoking so we can know later + ArSyncTask *myInvokingOtherFunctor; +}; + + + +#endif + + + + diff --git a/Legacy/Aria/include/ArSystemStatus.h b/Legacy/Aria/include/ArSystemStatus.h new file mode 100644 index 0000000..395ce0b --- /dev/null +++ b/Legacy/Aria/include/ArSystemStatus.h @@ -0,0 +1,186 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARSYSTEMSTATUS_H +#define ARSYSTEMSTATUS_H + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ariaUtil.h" +#include "ArMutex.h" +#include + +class ArSystemStatusRefreshThread; + +/** @brief Utility to get statistics about the host operating system + * (CPU usage, wireless link data, etc). + * + * Normally, calling any accessor to read a value will query the operating + * system to get the most recent value. However, if you will be accessing + * data very frequently and want those calls to be faster, you can start + * a thread by calling startPeriodicUpdate() which will periodically query + * new values from the operating system and cache them for accessors to + * return. + * + * This class is only implemented for Linux; on Windows you will get invalid + * information. + * @todo Add a function and functor that formats uptime like "X years, + * X months, X days, X hours, X min, X sec." (omitting 0 values). + + @ingroup UtilityClasses + */ +class ArSystemStatus { +public: + + /** Create a new thread which periodically invalidates cached data, + * causing it to be recalculated when next accessed. Starting + * this thread is optional; start it if you + * will be accessing the data frequently, so that is doesn't need to + * be re-read and re-calculated on each access. If you will only be + * accessing the data occasionally, you do not need to start the update + * thread, it will be updated each time you read a value. + */ + AREXPORT static void startPeriodicUpdate(int refreshFrequency = 5000, ArLog::LogLevel logLevel = ArLog::Verbose); + + /** Stop periodic update thread. Henceforth any access of data will + * cause it to be re-read and recalculated. */ + AREXPORT static void stopPeriodicUpdate(); + + /** @deprecated use startPeriodicUpdate() which has a better name. */ + AREXPORT static void runRefreshThread(int refreshFrequency = 5000) { + startPeriodicUpdate(refreshFrequency); + } + + /** Get CPU work to idle ratio since last refresh. + * This is a value ranging from (0 .. 1) X (Num. CPUs). (Therefore + * if you have two CPUs, the maximum value will be 2.0, or 200%.) + * This value is calculated as the percentage + * of time the CPU spent doing work (not in "idle" state) since the + * previous calculation. + * @return CPU usage value, or -1 if unable to determine + */ + AREXPORT static double getCPU(); + + /** Get CPU usage as percentage since last refresh. This is a value ranging from + * (0..100) X (Num. CPUs). (Therefore if you have two CPUs, the maximum value + * will be 200%). + * @sa getCPU() + * @return CPU usage as percentage, or -1 if not able to determine + */ + AREXPORT static double getCPUPercent(); + + /// Get CPU percentage in a string + AREXPORT static std::string getCPUPercentAsString(); + + /// Get total system uptime (seconds) + AREXPORT static unsigned long getUptime(); + + /// Get program's uptime (seconds) + AREXPORT static unsigned long getProgramUptime(); + + /// Get total system uptime (hours) + AREXPORT static double getUptimeHours(); + + /// Get total system uptime in a string (hours) + AREXPORT static std::string getUptimeHoursAsString(); + + /** @return Pointer to a functor which can be used to retrieve the current CPU percentage */ + AREXPORT static ArRetFunctor* getCPUPercentFunctor(); + + /** @return Pointer to a functor which can be used to retrieve the current uptime (hours) */ + AREXPORT static ArRetFunctor* getUptimeHoursFunctor(); + + /** @return Pointer to a functor which can be used to retrieve the current uptime (hours) */ + AREXPORT static ArRetFunctor* getUptimeFunctor(); + + /** @return Pointer to a functor which can be used to retrieve the current uptime (hours) */ + AREXPORT static ArRetFunctor* getProgramUptimeFunctor(); + + + + /** Get wireless network general link quality heuristic (for first configured + * wireless device). */ + AREXPORT static int getWirelessLinkQuality(); + + /** Get wireless netork signal level (for first configured + * wireless device). */ + AREXPORT static int getWirelessLinkSignal(); + + /** Get wireless network noise level (for first configured + * wireless device). */ + AREXPORT static int getWirelessLinkNoise(); + + /** Get wireless network total discarded packets (for first configured + * wireless device). */ + AREXPORT static int getWirelessDiscardedPackets(); + + /** Get wireless network packets discarded because of a conflict with another + * network (for first configured + * wireless device). */ + AREXPORT static int getWirelessDiscardedPacketsBecauseNetConflict(); + + + AREXPORT static ArRetFunctor* getWirelessLinkQualityFunctor(); + AREXPORT static ArRetFunctor* getWirelessLinkNoiseFunctor(); + AREXPORT static ArRetFunctor* getWirelessLinkSignalFunctor(); + + /** @internal */ + AREXPORT static void invalidate(); + + /** @deprecated Calling this function is no longer neccesary. */ + AREXPORT static void refresh() { } +private: + + + static ArMutex ourCPUMutex; + static double ourCPU; + static unsigned long ourUptime; + static unsigned long ourFirstUptime; + static unsigned long ourLastCPUTime; + static ArTime ourLastCPURefreshTime; + static ArGlobalRetFunctor ourGetCPUPercentCallback; + static ArGlobalRetFunctor ourGetUptimeHoursCallback; + static ArGlobalRetFunctor ourGetUptimeCallback; + static ArGlobalRetFunctor ourGetProgramUptimeCallback; + + static ArMutex ourWirelessMutex; + static int ourLinkQuality, ourLinkSignal, ourLinkNoise, + ourDiscardedTotal, ourDiscardedDecrypt, ourDiscardedConflict; + static ArGlobalRetFunctor ourGetWirelessLinkQualityCallback; + static ArGlobalRetFunctor ourGetWirelessLinkNoiseCallback; + static ArGlobalRetFunctor ourGetWirelessLinkSignalCallback; + + static void refreshCPU(); ///< Refresh CPU, if neccesary + static void refreshWireless(); ///< Refresh Wireless stats, if neccesary + + + static ArSystemStatusRefreshThread* ourPeriodicUpdateThread; + static bool ourShouldRefreshWireless; + static bool ourShouldRefreshCPU; + +}; + +#endif diff --git a/Legacy/Aria/include/ArTCM2.h b/Legacy/Aria/include/ArTCM2.h new file mode 100644 index 0000000..d144c61 --- /dev/null +++ b/Legacy/Aria/include/ArTCM2.h @@ -0,0 +1,252 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTCM2_H +#define ARTCM2_H + +#include "ariaUtil.h" +#include "ArFunctor.h" +#include "ArRobot.h" + + +#ifdef WIN32 +#define ARTCM2_DEFAULT_SERIAL_PORT "COM4" +#else +#define ARTCM2_DEFAULT_SERIAL_PORT "/dev/ttyS3" +#endif + + +/** Interface to the PNI TCM 2, TCM 2.5, and TCM 2.6 3-axis compass (magnetometer) that can sense absolute heading, as well as pitch, roll, and includes a temperature sensor. + * + * See subclasses and ArCompassConnector for more information, as well as + * your robot manuals. PNI's TCM manual is also available for download at the + * MobileRobots support website, documentation section. + * + * This is an abstract interface. To create a compass interface object, + * instantiate a subclass or use ArCompassConnector. + + @ingroup OptionalClasses + @ingroup DeviceClasses + * + * @note The compass returns a heading relative to magnetic north, which varies + * depending on your location in the Earth's magnetic field (declination also + * varies slowly over time as the Earth's magnetic field changes). To find true + * north, you must apply an offset, or declination. For example, on + * June 1, 2007, the magnetic declination of MobileRobots' location + * of Amherst, NH, USA was 15 1/6 degrees West, so a value of approx. + * -15.166666 would have to be applied. You can look up declination values for + * various locations on Earth at + * http://www.ngdc.noaa.gov/seg/geomag/jsp/Declination.jsp + */ +class ArTCM2 +{ +public: + + AREXPORT ArTCM2(); + virtual ~ArTCM2() {} + + /** If a connection/initialization procedure is required, perform it, and + return true on success, false on failure. Otherwise, just return true. + */ + AREXPORT virtual bool connect(); + + /** If a connection/initialization procedure is required, perform it, wait + * until data is recieved from the compass, and + return true on success, false on failure. Otherwise, just return true. + */ + AREXPORT virtual bool blockingConnect(unsigned long connectTimeout = 5000); + + + /// Get the compass heading (-180, 180] degrees + double getHeading(void) const { return myHeading; } + bool haveHeading() const { return myHaveHeading; } + + /** Get the compass heading (-180, 180] degrees + * @deprecated Use getHeading() + */ + double getCompass(void) const { return getHeading(); } + + /// Get the pitch (-180,180] degrees. + double getPitch(void) const { return myPitch; } + bool havePitch() const { return myHavePitch; } + + /// Get the roll (-180,180] degrees. + double getRoll(void) const { return myRoll; } + bool haveRoll() const { return myHaveRoll; } + + /// Get the magnetic field X component (See TCM2 Manual) + double getXMagnetic(void) const { return myXMag; } + bool haveXMagnetic() const { return myHaveXMag; } + + /// Get the magnetic field Y component (See TCM2 Manual) + double getYMagnetic(void) const { return myYMag; } + bool haveYMagnetic() const { return myHaveYMag; } + + /// Get the magnetic field Z component (See TCM2 Manual) + double getZMagnetic(void) const { return myZMag; } + bool haveZMagnetic() const { return myHaveZMag; } + + /// Get the temperature (degrees C) + double getTemperature(void) const { return myTemperature; } + bool haveTemperature() const { return myHaveTemperature; } + + // Get last error code (see TCM manual) recieved. 0 means no error recieved. + int getError(void) const { return myError; } + + /// Get the calibration H score (See TCM Manual) + double getCalibrationH(void) const { return myCalibrationH; } + bool haveCalibrationH() const { return myHaveCalibrationH; } + + /// Get the calibration V score (See TCM Manual) + double getCalibrationV(void) const { return myCalibrationV; } + bool haveCalibrationV() const { return myHaveCalibrationV; } + + /// Get the calibration M score (See TCM Manual) + double getCalibrationM(void) const { return myCalibrationM; } + bool haveCalibrationM() const { return myHaveCalibrationM; } + + /// Turn sending of data off (Compass remains powered on, this is not its not low power standby mode) + virtual void commandOff(void) = 0; + + /// Get one reading from the compass + virtual void commandOnePacket(void) = 0; + + /// Start the compass sending a continuous stream of readings at its fastest rate + virtual void commandContinuousPackets(void) = 0; + + /// Start user calibration + virtual void commandUserCalibration(void) = 0; + + /// Start auto calibration + virtual void commandAutoCalibration(void) = 0; + + /// Stop calibration + virtual void commandStopCalibration(void) = 0; + + /// Command to do a soft reset of the compass + virtual void commandSoftReset(void) = 0; + + /// Command to just send compass heading data + virtual void commandJustCompass(void) = 0; + + /// Gets the number of readings recieved in the last second + int getPacCount(void) { + if(myTimeLastPacket == time(NULL)) return myPacCount; + if(myTimeLastPacket == time(NULL) - 1) return myPacCurrentCount; + return 0; + } + + // Add a callback to be invoked when a new heading is recieved + void addHeadingDataCallback(ArFunctor1 *f) { + myHeadingDataCallbacks.push_back(f); + } + + +protected: + double myHeading; + double myPitch; + double myRoll; + double myXMag; + double myYMag; + double myZMag; + double myTemperature; + int myError; + double myCalibrationH; + double myCalibrationV; + double myCalibrationM; + + bool myHaveHeading; + bool myHavePitch; + bool myHaveRoll; + bool myHaveXMag; + bool myHaveYMag; + bool myHaveZMag; + bool myHaveTemperature; + bool myHaveCalibrationH; + bool myHaveCalibrationV; + bool myHaveCalibrationM; + + std::list< ArFunctor1* > myHeadingDataCallbacks; + + // packet count + time_t myTimeLastPacket; + int myPacCurrentCount; + int myPacCount; + + void incrementPacketCount() { + if (myTimeLastPacket != time(NULL)) + { + myTimeLastPacket = time(NULL); + myPacCount = myPacCurrentCount; + myPacCurrentCount = 0; + } + myPacCurrentCount++; + } + + + // call the heading data callbacks + void invokeHeadingDataCallbacks(double heading) { + for(std::list*>::iterator i = myHeadingDataCallbacks.begin(); i != myHeadingDataCallbacks.end(); ++i) + if(*i) (*i)->invoke(heading); + } + +}; + + +/** Use this class to create an instance of a TCM2 subclass + * and connect to the device based on program command line options. + * This allows the user of a program to select a different kind + * of compass configuration (for example, if the compass is connected + * to a computer serial port, use ArTCMCompassDirect instead of + * the normal ArTCMCompassRobot.) + * + * The following command-line arguments are checked: + * @verbinclude ArCompassConnector_options + */ +class ArCompassConnector +{ +protected: + ArArgumentParser *myArgParser; + ArRetFunctorC myParseArgsCallback; + ArFunctorC myLogArgsCallback; + typedef enum { + Robot, + SerialTCM, + None + } DeviceType; + DeviceType myDeviceType; + const char *mySerialPort; + AREXPORT bool parseArgs(); + ArFunctor *mySerialTCMReadFunctor; + ArRobot *myRobot; + AREXPORT void logOptions(); +public: + AREXPORT ArCompassConnector(ArArgumentParser *argParser); + AREXPORT ~ArCompassConnector(); + AREXPORT ArTCM2 *create(ArRobot *robot); + AREXPORT bool connect(ArTCM2*) const; +}; + +#endif // ARTCM2_H diff --git a/Legacy/Aria/include/ArTCMCompassDirect.h b/Legacy/Aria/include/ArTCMCompassDirect.h new file mode 100644 index 0000000..2f5297c --- /dev/null +++ b/Legacy/Aria/include/ArTCMCompassDirect.h @@ -0,0 +1,119 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARTCMCOMPASSDIRECT_H +#define ARTCMCOMPASSDIRECT_H + + +#include "ariaTypedefs.h" +#include "ariaUtil.h" +#include "ArDeviceConnection.h" +#include "ArTCM2.h" +#include "ArNMEAParser.h" + + +/** @brief Talk to a compass directly over a computer serial port + * + * This class configures and recieves compass heading data from a TCM2 or TCM2.5 compass + * directly over a computer serial port, rather than via tha robot. + * This class cannot recieve pitch, roll or temperature data from the compass. + * On all Pioneer robots, the TCM compass (as originally installed by + * MobileRobots) is connected to the robot microcontroller, so if you + * have a Pioneer with this configuration, you should instead use the + * ArTCMCompassRobot class. Only use this class if you + * have connected the compass to the computer serial port. + * + * You can create an instance of this class directly, or using an + * ArCompassConnector object and giving the "-compassType serialtcm" program + * argument. + * + * If you create your own ArTCMCompassDirect object, you must call the read() + * method periodically (ideally at the same rate the compass sends data, + * approx. 8 hz by default) to read and parse incoming data. You can use an + * ArRobot callback to do this, for example: + * @code + * ArRetFunctor1C compassReadFunc(myCompass, &ArTCMCompassDirect::read, 10); + * myRobot->addSensorInterpTask("ArTCMCompassDirect read", 200, &compassReadFunc); + * @endcode + * + * If you use ArCompassConnector, however, it will automatically do this. + * + */ +class ArTCMCompassDirect : public virtual ArTCM2 +{ +private: + ArDeviceConnection *myDeviceConnection; + bool myCreatedOwnDeviceConnection; + const char *mySerialPortName; + ArNMEAParser myNMEAParser; + bool sendTCMCommand(const char *str, ...); + ArFunctor1C myHCHDMHandler; + void handleHCHDM(ArNMEAParser::Message); +public: + AREXPORT ArTCMCompassDirect(ArDeviceConnection *devCon); + AREXPORT ArTCMCompassDirect(const char *serialPortName = ARTCM2_DEFAULT_SERIAL_PORT); + AREXPORT ~ArTCMCompassDirect(); + + /** Open device connection if not yet open and send commands to configure compass. */ + AREXPORT virtual bool connect(); + AREXPORT virtual bool blockingConnect(unsigned long connectTimeout = 5000); + + + /** Send commands to begin calibrating */ + AREXPORT virtual void commandAutoCalibration(); + AREXPORT virtual void commandUserCalibration(); + AREXPORT virtual void commandStopCalibration(); + + /** Send commands to start/stop sending data. */ + //@{ + AREXPORT virtual void commandContinuousPackets(); + AREXPORT virtual void commandOnePacket(); + AREXPORT virtual void commandOff(); + //@} + + /** Not implemented yet. @todo */ + AREXPORT virtual void commandSoftReset() { /* TODO */ } + + /** Same as commandContinuousPackets() in this implementation. */ + AREXPORT virtual void commandJustCompass() { commandContinuousPackets(); } + + /** Read all available data, store, and call callbacks if any were added. + * unsigned int msWait If 0, wait indefinately for new data. Otherwise, wait + * a maximum of this many milliseconds for data to arrive. + * @return A value > 0 if messages were recieved from the compass, 0 if no + * data was recieved, and a value < 0 on error reading from the compass. + * */ + AREXPORT int read(unsigned int msWait = 1); + + AREXPORT void setDeviceConnection(ArDeviceConnection *devCon) { myDeviceConnection = devCon; } + AREXPORT ArDeviceConnection *getDeviceConnetion() { return myDeviceConnection; } + + +}; + +#endif + + diff --git a/Legacy/Aria/include/ArTCMCompassRobot.h b/Legacy/Aria/include/ArTCMCompassRobot.h new file mode 100644 index 0000000..fc58616 --- /dev/null +++ b/Legacy/Aria/include/ArTCMCompassRobot.h @@ -0,0 +1,67 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTCMCOMPASSROBOT_H +#define ARTCMCOMPASSROBOT_H + +#include "ariaUtil.h" +#include "ArCommands.h" +#include "ArFunctor.h" +#include "ArRobot.h" +#include "ArTCM2.h" + +/** Interface to a TCM 2/2.5/2.6 3-axis compass through the robot microcontroller. + * When a Pioneer robot is equipped with a TCM compass, it is typically connected + * to the robot microcontroller, which returns compass information in + * compass data packets upon request (set compass mode/type to 2 or 3 in + * firmware configuration; mode 1 (data in SIP) is not supported by ARIA). This class communicates + * with the robot microcontroller to configure the compass and recieve data + * from it. + * +*/ +class ArTCMCompassRobot : public virtual ArTCM2 +{ +public: + + AREXPORT ArTCMCompassRobot(ArRobot *robot); + AREXPORT virtual ~ArTCMCompassRobot(); + + virtual void commandOff(void) { myRobot->comInt(ArCommands::TCM2, 0); } + virtual void commandJustCompass(void) { myRobot->comInt(ArCommands::TCM2, 1); } + virtual void commandOnePacket(void) { myRobot->comInt(ArCommands::TCM2, 2); } + virtual void commandContinuousPackets(void) { myRobot->comInt(ArCommands::TCM2, 3); } + virtual void commandUserCalibration(void) { myRobot->comInt(ArCommands::TCM2, 4); } + virtual void commandAutoCalibration(void) { myRobot->comInt(ArCommands::TCM2, 5); } + virtual void commandStopCalibration(void) { myRobot->comInt(ArCommands::TCM2, 6); } + virtual void commandSoftReset(void) { myRobot->comInt(ArCommands::TCM2, 7); } + +private: + ArRobot *myRobot; + ArRetFunctor1C myPacketHandlerCB; + bool packetHandler(ArRobotPacket *packet); +}; + + +#endif diff --git a/Legacy/Aria/include/ArTaskState.h b/Legacy/Aria/include/ArTaskState.h new file mode 100644 index 0000000..54b943c --- /dev/null +++ b/Legacy/Aria/include/ArTaskState.h @@ -0,0 +1,54 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTASKSTATE_H +#define ARTASKSTATE_H + +/// Class with the different states a task can be in +/** + These are the defined states, if the state is anything other than is + defined here that is annotated (not running) the process will be run. + No one should have any of their own states less than the USER_START + state. People's own states should start at USER_START or at + USER_START plus a constant (so they can have different sets of states). +*/ +class ArTaskState +{ +public: + enum State + { + INIT = 0, ///< Initialized (running) + RESUME, ///< Resumed after being suspended (running) + ACTIVE, ///< Active (running) + SUSPEND, ///< Suspended (not running) + SUCCESS, ///< Succeeded and done (not running) + FAILURE, ///< Failed and done (not running) + USER_START = 20 ///< This is where the user states should start (they will all be run) + }; + +}; + + +#endif diff --git a/Legacy/Aria/include/ArTcpConnection.h b/Legacy/Aria/include/ArTcpConnection.h new file mode 100644 index 0000000..682ea16 --- /dev/null +++ b/Legacy/Aria/include/ArTcpConnection.h @@ -0,0 +1,96 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTCPCONNECTION_H +#define ARTCPCONNECTION_H + +#include "ArDeviceConnection.h" +#include + +#include "ariaTypedefs.h" +#include "ArSocket.h" + +/// For connecting to a device through a TCP network socket +/// @ingroup UtilityClasses +class ArTcpConnection: public ArDeviceConnection +{ + public: + /// Constructor + AREXPORT ArTcpConnection(); + /// Destructor also closes connection + AREXPORT virtual ~ArTcpConnection(); + + /// Opens a connection to the given host and port + AREXPORT int open(const char * host = NULL, int port = 8101); + + AREXPORT void setPort(const char *host = NULL, int port = 8101); + AREXPORT virtual bool openSimple(void); + AREXPORT virtual int getStatus(void); + AREXPORT virtual bool close(void); + AREXPORT virtual int read(const char *data, unsigned int size, + unsigned int msWait = 0); + AREXPORT virtual int write(const char *data, unsigned int size); + AREXPORT virtual const char * getOpenMessage(int messageNumber); + AREXPORT virtual ArTime getTimeRead(int index); + AREXPORT virtual bool isTimeStamping(void); + + /// Gets the name of the host connected to + AREXPORT std::string getHost(void); + /// Gets the number of the port connected to + AREXPORT int getPort(void); + + /// Internal function used by open and openSimple + AREXPORT int internalOpen(void); + + /// Sets the tcp connection to use this socket instead of its own + AREXPORT void setSocket(ArSocket *socket); + /// Gets the socket this tcp connection is using + AREXPORT ArSocket *getSocket(void); + /// Sets the status of the device, ONLY use this if you're playing + /// with setSocket and know what you're doing + AREXPORT void setStatus(int status); + + enum Open { + OPEN_NET_FAIL = 1, ///< Some critical part of the network isn't working + OPEN_BAD_HOST, ///< Could not find the host + OPEN_NO_ROUTE, ///< Know where the host is, but can't get to it + OPEN_CON_REFUSED ///< Got to the host but it didn't allow a connection + }; + + + +protected: + void buildStrMap(void); + + ArStrMap myStrMap; + bool myOwnSocket; + ArSocket *mySocket; + int myStatus; + + std::string myHostName; + int myPortNum; +}; + +#endif //ARTCPCONNECTION_H diff --git a/Legacy/Aria/include/ArThread.h b/Legacy/Aria/include/ArThread.h new file mode 100644 index 0000000..b02a52e --- /dev/null +++ b/Legacy/Aria/include/ArThread.h @@ -0,0 +1,270 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTHREAD_H +#define ARTHREAD_H + + +#include +#if !defined(WIN32) || defined(MINGW) +#include +#endif +#include "ariaTypedefs.h" +#include "ArMutex.h" +#include "ArFunctor.h" +#include "ArLog.h" + +#ifdef MINGW +#include +#else +#include +#endif + +/// POSIX/WIN32 thread wrapper class. +/** + create() will create the thread. That thread will run the given Functor. + + A thread can either be in a detached state or a joinable state. If the + thread is in a detached state, that thread can not be join()'ed upon. The + thread will simply run until the program exits, or its function exits. + A joinable thread means that another thread and call join() upon it. If + this function is called, the caller will block until the thread exits + its function. This gives a way to synchronize upon the lifespan of threads. + + Calling cancel() will cancel the thread. + + The static function self() will return a thread + + @sa ArASyncTask which provides a different approach with a simpler interface. + +*/ +class ArThread +{ +public: + +#if defined(WIN32) && !defined(MINGW) + typedef DWORD ThreadType; +#else + typedef pthread_t ThreadType; +#endif + +// pthread_t on Linux happens to be an integer or pointer that can be used in a map. On other platforms, pthread_t may be a struct or similar, and this is true on MINGW, so store them differently. Use the access methods that follow to access the map. +#ifdef MINGW + typedef std::vector< std::pair > MapType; +#else + typedef std::map MapType; +#endif + +protected: + static ArThread* findThreadInMap(ThreadType t); + static void removeThreadFromMap(ThreadType t); + static void addThreadToMap(ThreadType pt, ArThread *at); + +public: + typedef enum { + STATUS_FAILED=1, ///< Failed to create the thread + STATUS_NORESOURCE, ///< Not enough system resources to create the thread + STATUS_NO_SUCH_THREAD, ///< The thread can no longer be found + STATUS_INVALID, ///< Thread is detached or another thread is joining on it + STATUS_JOIN_SELF, ///< Thread is your own thread. Can't join on self. + STATUS_ALREADY_DETATCHED ///< Thread is already detatched + } Status; + + /// Constructor + AREXPORT ArThread(bool blockAllSignals=true); + /// Constructor - starts the thread + AREXPORT ArThread(ThreadType thread, bool joinable, + bool blockAllSignals=true); + /// Constructor - starts the thread + AREXPORT ArThread(ArFunctor *func, bool joinable=true, + bool blockAllSignals=true); + /// Destructor + AREXPORT virtual ~ArThread(); + + /// Initialize the internal book keeping structures + AREXPORT static void init(void); + /// Returns the instance of your own thread (the current one) + AREXPORT static ArThread * self(void); + /// Returns the os self of the current thread + AREXPORT static ThreadType osSelf(void); + /// Stop all threads + AREXPORT static void stopAll(); + /// Cancel all threads + AREXPORT static void cancelAll(void); + /// Join on all threads + AREXPORT static void joinAll(void); + + /// Shuts down and deletes the last remaining thread; call after joinAll + AREXPORT static void shutdown(); + + /// Yield the processor to another thread + AREXPORT static void yieldProcessor(void); + /// Gets the logging level for thread information + static ArLog::LogLevel getLogLevel(void) { return ourLogLevel; } + /// Sets the logging level for thread information + static void setLogLevel(ArLog::LogLevel level) { ourLogLevel = level; } + + /// Create and start the thread + AREXPORT virtual int create(ArFunctor *func, bool joinable=true, + bool lowerPriority=true); + /// Stop the thread + virtual void stopRunning(void) {myRunning=false;} + /// Join on the thread + AREXPORT virtual int join(void **ret=NULL); + /// Detatch the thread so it cant be joined + AREXPORT virtual int detach(void); + /// Cancel the thread + AREXPORT virtual void cancel(void); + + /// Get the running status of the thread + virtual bool getRunning(void) const {return(myRunning);} + /// Get the running status of the thread, locking around the variable + virtual bool getRunningWithLock(void) + { bool running; lock(); running = myRunning; unlock(); return running; } + /// Get the joinable status of the thread + virtual bool getJoinable(void) const {return(myJoinable);} + /// Get the underlying thread type + virtual const ThreadType * getThread(void) const {return(&myThread);} + /// Get the underlying os thread type + virtual ThreadType getOSThread(void) const {return(myThread);} + /// Get the functor that the thread runs + virtual ArFunctor * getFunc(void) const {return(myFunc);} + + /// Set the running value on the thread + virtual void setRunning(bool running) {myRunning=running;} + +#ifndef SWIG + /** Lock the thread instance + @swigomit + */ + int lock(void) {return(myMutex.lock());} + /** Try to lock the thread instance without blocking + @swigomit + */ + int tryLock(void) {return(myMutex.tryLock());} + /** Unlock the thread instance + @swigomit + */ + int unlock(void) {return(myMutex.unlock());} +#endif + + /// Do we block all process signals at startup? + bool getBlockAllSignals(void) {return(myBlockAllSignals);} + + /// Gets the name of the thread + virtual const char *getThreadName(void) { return myName.c_str(); } + + /// Sets the name of the thread + AREXPORT virtual void setThreadName(const char *name); + + /// Gets a string that describes what the thread is doing NULL if it + /// doesn't know + virtual const char *getThreadActivity(void) { return NULL; } + + /// Marks the thread as started and logs useful debugging information. + /** + If you call this function in your functor (ie runThread) it'll + then call some things for logging (to make debugging easier) + This method should be called before the main thread loop begins. + **/ + AREXPORT virtual void threadStarted(void); + + /// Marks the thread as finished and logs useful debugging information. + /** + This method should be called after the main thread loop ends. It + enables the creator of the thread to determine that the thread has + actually been completed and can be deleted. + **/ + AREXPORT virtual void threadFinished(void); + + /// Returns whether the thread has been started. + /** + * This is dependent on the thread implementation calling the + * threadStarted() method. + **/ + AREXPORT virtual bool isThreadStarted() const; + + /// Returns whether the thread has been completed and can be deleted. + /** + * This is dependent on the thread implementation calling the + * threadFinished() method. + **/ + AREXPORT virtual bool isThreadFinished() const; + + + /// Logs the information about this thread + AREXPORT virtual void logThreadInfo(void); + +#ifndef WIN32 + pid_t getPID(void) { return myPID; } + pid_t getTID(void) { return myTID; } +#endif + + /// Gets the name of the this thread + AREXPORT static const char *getThisThreadName(void); + /// Get the underlying thread type of this thread + AREXPORT static const ThreadType * getThisThread(void); + /// Get the underlying os thread type of this thread + AREXPORT static ThreadType getThisOSThread(void); + +protected: + static ArMutex ourThreadsMutex; + static MapType ourThreads; +#if defined(WIN32) && !defined(MINGW) + static std::map ourThreadHandles; +#endif + AREXPORT static ArLog::LogLevel ourLogLevel; + + AREXPORT virtual int doJoin(void **ret=NULL); + + std::string myName; + + ArMutex myMutex; + /// State variable to denote when the thread should continue or exit + bool myRunning; + bool myJoinable; + bool myBlockAllSignals; + + bool myStarted; + bool myFinished; + + ArStrMap myStrMap; + ArFunctor *myFunc; + ThreadType myThread; +#if defined(WIN32) && !defined(MINGW) + HANDLE myThreadHandle; +#endif + + +#if !defined(WIN32) || defined(MINGW) + pid_t myPID; + pid_t myTID; +#endif + + static std::string ourUnknownThreadName; +}; + + +#endif // ARTHREAD_H diff --git a/Legacy/Aria/include/ArTransform.h b/Legacy/Aria/include/ArTransform.h new file mode 100644 index 0000000..cc9034f --- /dev/null +++ b/Legacy/Aria/include/ArTransform.h @@ -0,0 +1,156 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTRANSFORM_H +#define ARTRANSFORM_H + +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +/// Perform transforms between different coordinates +/** @ingroup UtilityClasses +*/ +class ArTransform +{ +public: + /// Constructor + ArTransform() + { + myX = 0; + myY = 0; + myTh = 0; + myCos = ArMath::cos(myTh); + mySin = ArMath::sin(myTh); + } + /// Constructor, Sets the transform so points in this coord system + /// transform to abs world coords + + ArTransform(ArPose pose) + { + setTransform(pose); + } + /// Constructor, sets the transform so that pose1 will be + /// transformed to pose2 + ArTransform(ArPose pose1, ArPose pose2) + { + setTransform(pose1, pose2); + } + /// Destructor + virtual ~ArTransform() {} + + /// Take the source pose and run the transform on it to put it into abs + /// coordinates + /** + @param source the parameter to transform + @return the source transformed into absolute coordinates + */ + ArPose doTransform(ArPose source) + { + ArPose ret; + ret.setX(myX + myCos * source.getX() + mySin * source.getY()); + ret.setY(myY + myCos * source.getY() - mySin * source.getX()); + ret.setTh(ArMath::addAngle(source.getTh(),myTh)); + return ret; + } + /// Take the source pose and run the transform on it to put it into abs + /// coordinates + /** + @param source the parameter to transform + @return the source transformed into absolute coordinates + */ + ArPoseWithTime doTransform(ArPoseWithTime source) + { + ArPoseWithTime ret; + ret.setX(myX + myCos * source.getX() + mySin * source.getY()); + ret.setY(myY + myCos * source.getY() - mySin * source.getX()); + ret.setTh(ArMath::addAngle(source.getTh(),myTh)); + ret.setTime(source.getTime()); + return ret; + } + + /// Take the source pose and run the inverse transform on it, taking it from + /// abs coords to local + /** + The source and result can be the same + @param source the parameter to transform + @return the source transformed from absolute into local coords + */ + ArPose doInvTransform(ArPose source) + { + ArPose ret; + double tx = source.getX() - myX; + double ty = source.getY() - myY; + ret.setX(myCos * tx - mySin * ty); + ret.setY(myCos * ty + mySin * tx); + ret.setTh(ArMath::subAngle(source.getTh(),myTh)); + return ret; + } + + /// Take the source pose and run the inverse transform on it, taking it from + /// abs coords to local + /** + The source and result can be the same + @param source the parameter to transform + @return the source transformed from absolute into local coords + */ + ArPoseWithTime doInvTransform(ArPoseWithTime source) + { + ArPoseWithTime ret; + double tx = source.getX() - myX; + double ty = source.getY() - myY; + ret.setX(myCos * tx - mySin * ty); + ret.setY(myCos * ty + mySin * tx); + ret.setTh(ArMath::subAngle(source.getTh(),myTh)); + ret.setTime(source.getTime()); + return ret; + } + + + /// Take a std::list of sensor readings and do the transform on it + AREXPORT void doTransform(std::list *poseList); + /// Take a std::list of sensor readings and do the transform on it + AREXPORT void doTransform(std::list *poseList); + /// Sets the transform so points in this coord system transform to abs world coords + AREXPORT void setTransform(ArPose pose); + /// Sets the transform so that pose1 will be transformed to pose2 + AREXPORT void setTransform(ArPose pose1, ArPose pose2); + /// Gets the transform x value (mm) + double getX() { return myX; } + /// Gets the transform y value (mm) + double getY() { return myY; } + /// Gets the transform angle value (degrees) + double getTh() { return myTh; } + /// Internal function for setting the transform from low level data not poses + AREXPORT void setTransformLowLevel(double x, double y, double th); +protected: + double myX; + double myY; + double myTh; + double myCos; + double mySin; +}; + + +#endif // ARTRANSFORM_H diff --git a/Legacy/Aria/include/ArTrimbleGPS.h b/Legacy/Aria/include/ArTrimbleGPS.h new file mode 100644 index 0000000..ecf49b2 --- /dev/null +++ b/Legacy/Aria/include/ArTrimbleGPS.h @@ -0,0 +1,88 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARTRIMBLEGPS_H +#define ARTRIMBLEGPS_H + + +#include "ariaTypedefs.h" +#include "ArFunctor.h" +#include "ariaUtil.h" +#include "ArGPS.h" +#include "ArDeviceConnection.h" +#include "ArMutex.h" + +#include + +class ArTrimbleAuxDeviceConnection; + +/** @brief GPS subclass to support the Trimble AgGPS and other Trimble GPS devices. + * + * This subclass extends ArGPS to send initialization commands specific + * to Trimble GPS devices, and to handle the PTNLAG001 message which + * is specific to the Trimble GPS (this message contains data received + * from an auxilliary device connected to the GPS; ArTrimbleGPS + * simply parses its contents as a new NMEA message; i.e. data received + * by the Trimble is assumed to be NMEA messages that it forwards + * via the PTNLAG001 message.) + * + * @note You must also configure the ports using + * the Trimble AgRemote program + * (http://www.trimble.com/support_trl.asp?pt=AgRemote&Nav=Collection-1545). + * Enable the following messages on whichever + * GPS port the computer is connected to: GPRMC, GPGGA, GPGSA, GPGSV, GPGST, + * GPMSS, and set input (I) protocol to TSIP 38k baud, and output + * protocol (O) to NMEA 38k baud. + * This configuration is done by MobileRobots when shipping a Trimble AgGPS + * but you may need to do this if the GPS loses its configuration or after + * changing any other settings (Note that AgRemote resets the port settings each time + * it connects, so you must reset them each time before exiting AgRemote!) + * + * @since 2.6.0 + */ +class ArTrimbleGPS : public virtual ArGPS { +private: + ArFunctor1C myAuxDataHandler; + void handlePTNLAG001(ArNMEAParser::Message message); +public: + AREXPORT ArTrimbleGPS(); + AREXPORT virtual ~ArTrimbleGPS(); + + /** Send a TSIP command to the Trimble GPS. + * See the TSIP Reference guide for details. + * Note, the data must be 66 characters or less. + */ + AREXPORT bool sendTSIPCommand(char command, const char *data, size_t dataLen); + +protected: + AREXPORT virtual bool initDevice(); + +}; + + +#endif + + diff --git a/Legacy/Aria/include/ArUrg.h b/Legacy/Aria/include/ArUrg.h new file mode 100644 index 0000000..f6caf29 --- /dev/null +++ b/Legacy/Aria/include/ArUrg.h @@ -0,0 +1,127 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARURG_H +#define ARURG_H + +#include "ariaTypedefs.h" +#include "ArLaser.h" +#include "ArDeviceConnection.h" + +/** Hokuyo Urg laser range device. + * Connects using the Urg's serial port connector (not USB). + * Supports URG-04LX using SCIP 1.1 protocol only. See ArLaserConnector for instructions on + * using lasers in a program. + @sa ArUrg_2_0 + @sa ArLaserConnector + @sa ArLaser + * @since 2.7.0 + */ +class ArUrg : public ArLaser +{ +public: + /// Constructor + AREXPORT ArUrg(int laserNumber, + const char *name = "urg"); + /// Destructor + AREXPORT ~ArUrg(); + AREXPORT virtual bool blockingConnect(void); + AREXPORT virtual bool asyncConnect(void); + AREXPORT virtual bool disconnect(void); + AREXPORT virtual bool isConnected(void) { return myIsConnected; } + AREXPORT virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + + /// Logs the information about the sensor + AREXPORT void log(void); +protected: + /// Sets the parameters that control what data you get from the urg + AREXPORT bool setParams( + double startingDegrees = -135, double endingDegrees = 135, + double incrementDegrees = 1, bool flipped = false); + /// Sets the parameters that control what data you get from the urg + AREXPORT bool setParamsBySteps( + int startingStep = 0, int endingStep = 768, int clusterCount = 3, + bool flipped = false); + AREXPORT virtual void * runThread(void *arg); + /// internal call to write a string to the urg + bool writeLine(const char *str); + /// internal call to read a string from the urg + bool readLine(char *buf, unsigned int size, unsigned int msWait); + + /// internal call to write a command and get the response back into the buf + bool sendCommandAndRecvStatus( + const char *command, const char *commandDesc, + char *status, unsigned int size, unsigned int msWait); + + void sensorInterp(void); + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT virtual bool laserCheckParams(void); + AREXPORT virtual void laserSetName(const char *name); + + void failedToConnect(void); + ArMutex myReadingMutex; + ArMutex myDataMutex; + + ArTime myReadingRequested; + std::string myReading; + + int myStartingStep; + int myEndingStep; + int myClusterCount; + bool myFlipped; + char myRequestString[1024]; + double myClusterMiddleAngle; + + bool internalConnect(void); + + bool internalGetReading(void); + + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + std::string myVendor; + std::string myProduct; + std::string myFirmwareVersion; + std::string myProtocolVersion; + std::string mySerialNumber; + std::string myStat; + + bool myLogMore; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; +}; + +#endif // ARURG_H diff --git a/Legacy/Aria/include/ArUrg_2_0.h b/Legacy/Aria/include/ArUrg_2_0.h new file mode 100644 index 0000000..17e26bf --- /dev/null +++ b/Legacy/Aria/include/ArUrg_2_0.h @@ -0,0 +1,152 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARURG_2_0_H +#define ARURG_2_0_H + +#include "ariaTypedefs.h" +#include "ArLaser.h" +#include "ArDeviceConnection.h" + +/** + Hokuyo URG laser range device (SCIP 2.0). + + Connects using the Urg's serial port connector or USB. Note that + if the max range is 4095 or less it'll use 2 bytes per range + reading, and if the max range is more than that it'll use 3 bytes + per range reading. + + Supports (probably) any URG using SCIP 2.0 protocol (use ArUrg aka + 'urg' for SCIP 1.1 instead). + + See ArLaserConnector for instructions on configuring and using lasers. + + See http://robots.mobilerobots.com/wiki/Hokuyo_URG for more information and links to downloads from Hokuyo including the USB Windows driver. + + @sa ArUrg + @sa ArLaserConnector + @sa ArLaser + */ +class ArUrg_2_0 : public ArLaser +{ +public: + /// Constructor + AREXPORT ArUrg_2_0(int laserNumber, + const char *name = "urg2.0"); + /// Destructor + AREXPORT ~ArUrg_2_0(); + AREXPORT virtual bool blockingConnect(void); + AREXPORT virtual bool asyncConnect(void); + AREXPORT virtual bool disconnect(void); + AREXPORT virtual bool isConnected(void) { return myIsConnected; } + AREXPORT virtual bool isTryingToConnect(void) + { + if (myStartConnect) + return true; + else if (myTryingToConnect) + return true; + else + return false; + } + + /// Logs the information about the sensor + AREXPORT void log(void); +protected: + /// Sets the parameters that control what data you get from the urg + AREXPORT bool setParams( + double startingDegrees = -135, double endingDegrees = 135, + double incrementDegrees = 1, bool flipped = false); + /// Sets the parameters that control what data you get from the urg + AREXPORT bool setParamsBySteps( + int startingStep = 0, int endingStep = 768, int clusterCount = 3, + bool flipped = false); + AREXPORT virtual void * runThread(void *arg); + /// internal call to write a string to the urg + bool writeLine(const char *str); + /// internal call to read a string from the urg + bool readLine(char *buf, unsigned int size, unsigned int msWait, + bool noChecksum, bool stripLastSemicolon, + ArTime *firstByte = NULL); + + /// internal call to write a command and get the response back into the buf + bool sendCommandAndRecvStatus( + const char *command, const char *commandDesc, + char *status, unsigned int size, unsigned int msWait); + + void sensorInterp(void); + AREXPORT virtual void setRobot(ArRobot *robot); + AREXPORT virtual bool laserCheckParams(void); + AREXPORT virtual void laserSetName(const char *name); + + void failedToConnect(void); + ArMutex myReadingMutex; + ArMutex myDataMutex; + + ArTime myReadingRequested; + std::string myReading; + + int myStartingStep; + int myEndingStep; + int myClusterCount; + bool myFlipped; + char myRequestString[1024]; + double myClusterMiddleAngle; + + bool internalConnect(void); + + bool internalGetReading(void); + + void clear(void); + bool myIsConnected; + bool myTryingToConnect; + bool myStartConnect; + + std::string myVendor; + std::string myProduct; + std::string myFirmwareVersion; + std::string myProtocolVersion; + std::string mySerialNumber; + std::string myStat; + + std::string myModel; + int myDMin; + int myDMax; + int myARes; + int myAMin; + int myAMax; + int myAFront; + int myScan; + + double myStepSize; + double myStepFirst; + bool myUseThreeDataBytes; + + bool myLogMore; + + ArFunctorC mySensorInterpTask; + ArRetFunctorC myAriaExitCB; +}; + +#endif // ARURG_2_0_H diff --git a/Legacy/Aria/include/ArVCC4.h b/Legacy/Aria/include/ArVCC4.h new file mode 100644 index 0000000..4a46cda --- /dev/null +++ b/Legacy/Aria/include/ArVCC4.h @@ -0,0 +1,599 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARVCC4_H +#define ARVCC4_H + +#include "ariaTypedefs.h" +#include "ArBasePacket.h" +#include "ArPTZ.h" +#include "ariaUtil.h" +#include "ArCommands.h" +#include "ArSerialConnection.h" + +// maximum number of bytes expected for a response from the camera +#define MAX_RESPONSE_BYTES 14 + +// the state timeout when using bidirectional communication +// This is big because it may have to wait for a power on or +// power off command to complete, which take ~4 seconds. +#define BIDIRECTIONAL_TIMEOUT 5000 + +// The number of ms to wait for a timeout for unidirectional communication. +// This is how long the usertask will wait before assuming that the camera +// has processed the last command. +#define UNIDIRECTIONAL_TIMEOUT 300 + +// how often to request position information from the camera if using +// bidirectional communication (in ms) +#define AUTO_UPDATE_TIME 2000 + +// accuracy of camera movements. This sets how different the current +// position and the desired position must be in order for a command to be +// sent to the camera. +#define TOLERANCE .1 + +/** @class ArVCC4 + * Control the pan, tilt, and zoom mechanisms of the Canon VC-C4 and VC-C50i cameras. + * + * An ArVCC4 object can be used to control the pan, tilt, zoom and some + * other aspects of the Canon VC-C4 camera. Since the camera is + * typically connected to the robot microcontroller's auxilliary serial + * port, and also uses ArRobot task cycle callbacks, a connected and + * running ArRobot object is required. + * + * Communication with the camera can operate in two modes or directions. + * In unidirectional mode(COMM_UNIDIRECTIONAL), + * ArVCC4 simply sends commands to the camera, and waits for + * some time to allow the camera to process it. However, it will have + * no way of verifying that a command was successfully received by the + * cameral. In bidirectional mode (COMM_BIDIRECTIONAL), ArVCC4 waits for a + * response from the camera. Bidirectinal mode requires that the CTS + * line (pin 2 on the VISCA port) be connected. + * When you create an ArVCC4 object, you can request a specific mode, + * or you can specify COMM_UNKNOWN, and ArVCC4 will switch into + * bidirectional mode if it receives any responses from the camera. + * + * Programmer's manuals for the VC-C45 and VC-C50i, detailing the + * communications protocol (including commands not implemented by ArVCC4), + * as well as user manuals containing specifications and hardware information, + * are available at http://robots.mobilerobots.com. + * ArVCC4 sends commands to the camera using the ArVCC4Packet class to construct the command, and + * using either the ArRobot pointer or an internal ArDeviceConnection, + * depending on whether the camera is connected to the robot + * microcontroller's auxilliary serial port (the usual connection method for + * most robots) or a computer serial port. + * + +\section VCC4CommandDetails Command-Response details: + +This camera has a reponse mechanism, whereby each packet sent to the camera generates an answer within 300ms. For the most part, the answer consists of a 6-byte packet which has an error-status within it. Some commands generate longer packets. Receiving the error status is helpful in that you know that the camera will or will not execute the command. However, it doesn't tell you when the command is completed. + +In order for the the reponses to work, the CTS line on the camera must be high. This is pin 2 on the visca port. If your camera is not wired in such a fashion, then no answers will be sent to the computer, and the computer will not know whether or not the last packet was processed correctly. Because of this, systems operating without the answer feature will need to run with delays between sending packets. Otherwise, packets will be ignored, but you will have no way of knowing that. To achieve this, there are two types of communication modes that this class will operate under - COMM_UNIDIRECTIONAL or COMM_BIDIRECTIONAL. The default is COMM_UNKNOWN, in which it will use bidirectional commuication if a response is received. + +To handle the states and packet processing, this class runs as a user-task, different than the other pan/tilt devices. Because of this, it must have a valid robot connection and a valid serial connection if using a computer serial port. Note that the computer port must be set independently of this class. The aux port can be selected via setAuxPort from the ArPTZ class. + +\section VCC4UnitConversions Unit Conversions: + +The camera's pan and tilt commands work on a number of units equal to (degrees / 0.1125). The panTilt function always rounds the conversion closer to zero, so that a magnitude greater than the allowable range of movement is not sent to the camera. + + +\section VCC4C50iFeatures C50i features: + +NEW - There is now limited support for the night-mode version of the C50i. To enable night-mode support, pass the camera type in with the constructor. Night-mode consists of two parts - a phsyical IR-cutoff filter, and IR LEDs. The cutoff filter must be enabled first, then turn on the IR LEDs. + +This camera has a digital zoom as well as the optical one. There is an additional function for handling the digital. There is also limited support for the auto-focus mechanism, which may need to be elaborated on for better night-vision. In addition to the focus, there are also gain and backlight adjustments that can be made, but are not yet implemented in this class. +*/ + +/// Used by the ArVCC4 class +class ArVCC4Commands +{ +public: + enum Command { + DELIM = 0x00, /// myTaskCB; + + // the actual task to be added as a usertask + void camTask(void); + + // true when a response has been received from the camera, but has + // not yet been acted on by the state machine + bool myResponseReceived; + + bool myWaitingOnStop; + bool myWaitingOnPacket; + + // the state of the state machine + State myState; + State myPreviousState; + State myNextState; + + // used to switch between states in the state machine + void switchState(State state, int delayTime = 0); + + // the max time before a state times out, and the time for a packet response + // to timeout. The difference being that a packet reponse can be received + // immediately, but it could say that the camera is busy, meaning the state + // has not yet completed + int myStateTimeout; + int myPacketTimeout; + + // request a packet from the microcontroller of size num bytes. + // most camera responses are 6 bytes, so just use the default + void requestBytes(int num = 6); + + // the buffer to store the incoming packet data in + unsigned char myPacketBuf[50]; + int myPacketBufLen; + + // how many bytes we're still expecting to receive from the controller + int myBytesLeft; + + // these all send commands to the camera. + bool sendPanTilt(void); + bool sendZoom(void); + bool sendPanSlew(void); + bool sendTiltSlew(void); + bool sendPower(void); + bool sendHaltPanTilt(void); + bool sendHaltZoom(void); + bool sendRealPanTiltRequest(void); + bool sendRealZoomRequest(void); + bool sendDigitalZoom(void); + bool sendFocus(void); + + // this is currently not used because it doesn't work right + bool sendProductNameRequest(void); + + // the camera type is used to specify VC-C4 vs. C50i + CameraType myCameraType; + bool myRequestProductName; + + bool sendLEDControlMode(void); + bool sendCameraNameRequest(void); + int myDesiredLEDControlMode; + + bool sendIRFilterControl(void); + bool sendIRLEDControl(void); + bool myIRLEDsEnabled; + bool myDesiredIRLEDsMode; + bool myIRFilterModeEnabled; + bool myDesiredIRFilterMode; + + // These should only be used by the state machine to initialize the + // camera for the first time + bool setDefaultRange(void); + bool setControlMode(void); + bool sendInit(void); + + // process the packet data for a camera response that has accurate + // pan/tilt positional information in it, and the product name + void processGetPanTiltResponse(void); + void processGetZoomResponse(void); + void processGetProductNameResponse(void); + + // true if autoupdating of camera's position should be used + bool myAutoUpdate; + + // cycle for stepping through various autoupdate resquests from the camera + int myAutoUpdateCycle; + + // returns true if there is no reponse to a packet within the timeout + // or also if the state times out. The argument will overrid the default + // timeout periods + bool timeout(int mSec = 0); + + // internal reperesenstation of pan, tilt, and zoom positions + double myPan; + double myTilt; + int myZoom; + int myDigitalZoom; + int myFocusMode; + + // used to store the returned positional values when requesting the true + // position from the camera + double myPanResponse; + double myTiltResponse; + int myZoomResponse; + + // the returned product name + char myProductNameResponse[4]; + + // the positions that were last sent to the camera. These are needed + // because the desired positions can change between time a command is + // sent and before it succeeds. + double myPanSent; + double myTiltSent; + int myZoomSent; + double myPanSlewSent; + double myTiltSlewSent; + + // internal representation of pan and tilt slew + double myPanSlew; + double myTiltSlew; + + // where the user has requested the camera move to + double myPanDesired; + double myTiltDesired; + int myZoomDesired; + int myDigitalZoomDesired; + int myFocusModeDesired; + + // the pan an tilt slew that the user requested + double myPanSlewDesired; + double myTiltSlewDesired; + + // internal mirror of camera power state, and whether it's be initted + bool myPowerState; + bool myCameraIsInitted; + + // whether the user wants the camera on or off, or initialized + bool myPowerStateDesired; + bool myInitRequested; + + // whether the user has requested to halt movement + bool myHaltZoomRequested; + bool myHaltPanTiltRequested; + + // whether the camera has been initialized since instance inception + bool myCameraHasBeenInitted; + + // true if the user has requested to update the camera's postion + // from the data returned from the camera + bool myRealPanTiltRequested; + bool myRealZoomRequested; + + // the error state from the last packet received + unsigned int myError; + + // our FOV numbers (these should change if we use the digital zoom) + double myFOVAtMaxZoom; + double myFOVAtMinZoom; + + // run through the list or error callbacks + void throwError(); + + // the list of error callbacks to step through when a error occurs + std::list myErrorCBList; + + /// Used by ArPTZConnector to create an ArVCC4 object based on robot parameters and program options. + /// @since 2.7.6 + /// @internal + static ArPTZ* create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot); + /// Used by ArPTZConnector to create an ArVCC4 object based on robot parameters and program options. + /// @since 2.7.6 + /// @internal + static ArPTZConnector::GlobalPTZCreateFunc ourCreateFunc; +public: +#ifndef SWIG + static void registerPTZType(); ///<@internal Called by Aria::init() toregister this class with ArPTZConnector for vcc4 and vcc50i PTZ types. @since 2.7.6 +#endif +}; + +#endif // ARVCC4_H + diff --git a/Legacy/Aria/include/ArVersalogicIO.h b/Legacy/Aria/include/ArVersalogicIO.h new file mode 100644 index 0000000..fe1421b --- /dev/null +++ b/Legacy/Aria/include/ArVersalogicIO.h @@ -0,0 +1,150 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARVERSALOGICIO_H +#define ARVERSALOGICIO_H + +//#ifndef SWIG + +#include "ariaTypedefs.h" +#include "ArRobot.h" + +/** @brief Interface to integrated digital and analog I/O interfaces on Versalogic VSBC8 and EBX-12 Cobra computers (digital IO on 2nd * gen. PatrolBot) + + This class is a basic set of calls to use the Linux device driver, amrio, + which reads and writes data to VersaLogic's Opto22 and analog interfaces. + The amrio driver must be built into the Linux kernel or its + module loaded. Contact MobileRobots for information about obtaining this + driver. + It currently supports the Versalogic VSBC-8d, VSBC-8k, and EBX12 (Cobra) motherboards. + + The digital portion of the Opto22 consists of two banks of 8 pins on the VSBC8 + and four banks of 8 pins on the EBX12. Each bank can be set as either inputs + or outputs. The banks are zero-indexed, so bank0 is the first one. + + The analog inputs require a separate chip. There are 8 inputs, only + one of which can be read at a time. It currently returns a value between + 0 and 4096 or a decimal value in the range of 0-5V. The constructor will attempt + an analog conversion, and if it fails will assume that the chip is not present + and will disable the analog function. + + See the motherboard manual for information about physical connections and specifications of the analog input and Opto22 digital IO. + Computer motherboard manuals are available at http://robots.mobilerobots.com/docs . + + The SPECIAL_CONTROL_REGISTER contains a few bits of information, the one of + importance at the moment is the CPU_OVERTEMPERATURE bit, which will be set + high if the CPU temp is over the warning temp as set in the BIOS. Bitwise + AND the special_control_register output with 0x20 to find the temperature + bit. + + The destructor closes the device, so just delete the ArVersalogicIO instance + to close the device. + + @ingroup OptionalClasses + @ingroup DeviceClasses + + @notwindows +*/ + +class ArVersalogicIO +{ +public: + + enum Direction + { + DIGITAL_INPUT, + DIGITAL_OUTPUT + }; + + /// Constructor + AREXPORT ArVersalogicIO(const char * dev = "/dev/amrio"); + /// Destructor + AREXPORT virtual ~ArVersalogicIO(void); + + /// tries to close the device. Returns false if operation failed + AREXPORT bool closeIO(void); + + /// returns true if the device is opened and operational + AREXPORT bool isEnabled(void) { return myEnabled; } + + /// returns true if analog values are supported + AREXPORT bool isAnalogSupported(void) { return myAnalogEnabled; } + + /// Take an analog reading from a port number from 0-7. + /// This returns a conversion of the bits to a decimal value, + /// currently assumed to be in the 0-5V range + AREXPORT bool getAnalogValue(int port, double *val); + + /// Take an analog reading from a port number from 0-7. + /// This returns the actual reading from the chip, which is 12-bits + AREXPORT bool getAnalogValueRaw(int port, int *val); + + /// returns the direction (input or output) for the given bank + AREXPORT Direction getDigitalBankDirection(int bank); + + /// set direction for a particular digital I/O bank + AREXPORT bool setDigitalBankDirection(int bank, Direction dir); + + /// get the current value of the digital inputs on a certain bank + AREXPORT bool getDigitalBankInputs(int bank, unsigned char *val); + + /// get the current value of the digital outputs bits on a certain bank + AREXPORT bool getDigitalBankOutputs(int bank, unsigned char *val); + + /// set the value of the digital outputs bits + AREXPORT bool setDigitalBankOutputs(int bank, unsigned char val); + + /// gets the special register of the motherboard. + AREXPORT bool getSpecialControlRegister(unsigned char *val); + + /// lock the amrio device instance + AREXPORT int lock(void){ return(myMutex.lock()); } + /// unlock the amrio device instance + AREXPORT int unlock(void){ return(myMutex.unlock()); } + + /// Try to lock the device instance without blocking + AREXPORT int tryLock() {return(myMutex.tryLock());} + +protected: + + static ArMutex myMutex; + int myFD; + + bool myEnabled; + bool myAnalogEnabled; + + int myNumBanks; + + unsigned char myDigitalBank0; + unsigned char myDigitalBank1; + unsigned char myDigitalBank2; + unsigned char myDigitalBank3; + + ArRetFunctorC myDisconnectCB; +}; + +//#endif // SWIG + +#endif // ARVERSALOGICIO_H diff --git a/Legacy/Aria/include/ArZippable.h b/Legacy/Aria/include/ArZippable.h new file mode 100644 index 0000000..6d4a805 --- /dev/null +++ b/Legacy/Aria/include/ArZippable.h @@ -0,0 +1,205 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARZIPPABLE_H +#define ARZIPPABLE_H + +#include "ariaTypedefs.h" + + +/// Interface to access and modify a specified zip file. +/** + * ArZippable is an abstract base class that defines the methods to add + * and extract files from a zip file. + * + * An ArZippable is expected to be used in a rather "atomic" manner. It can + * be opened in one of two modes (ZIP_MODE or UNZIP_MODE), and the available + * operations are subsequently restricted based on the mode: + *
    + *
  • ZIP_MODE: addAll() and addFile()
  • + *
  • UNZIP_MODE: getMemberInfoList(), extractAll(), and extractFile()
  • + *
+ * After the files are added to or extracted from the zip file, it should be + * close()'ed. + * +**/ +class ArZippable +{ +public: + + // TODO Mutex for multithreaded access? + + // TODO Add more values and allow this to be configured? + enum { + CASE_INSENSITIVE = 2 + }; + + /// Constructor + AREXPORT ArZippable() + {} + + /// Destructor + AREXPORT virtual ~ArZippable() + {} + + /// Returns the complete file path name of the zip file + AREXPORT virtual const char *getFilePathName() const = 0; + + /// Modes in which the zip file may be opened + enum ModeType { + ZIP_MODE, //< Mode for zipping, i.e. adding files to the zip file + UNZIP_MODE //< Mode for unzipping, i.e. extracting files from the zip file + }; + + + /// Opens the zip file in the specified mode + /** + * @param mode the ModeType in which the file should be opened + * @return bool true if the zip file was successfully opened in the specified + * mode; false, otherwise. + **/ + AREXPORT virtual bool open(ModeType mode) = 0; + + /// Closes the zip file + AREXPORT virtual void close() = 0; + + /// Determines whether the zip file exists (according to the file path name) + /** + * @return bool true if the file exists and can be read; false, otherwise + **/ + AREXPORT virtual bool exists() const = 0; + + + /// Determines whether the zip file contains the specified member name + /** + * @param memberName the char * name of the member to be found + * @return bool true if the zip file contains the specified member; false + * otherwise + **/ + AREXPORT virtual bool contains(const char *memberName) = 0; + + + // TODO: Perhaps add a callback to be invoked when isOverwrite is false and + // an overwrite condition is detected + + /// Extracts all of the files from the zip file. + /** + * The zip file must have been opened in UNZIP_MODE. + * + * @param destDir the char * name of the directory into which the extracted + * files are to be placed + * @param isOverwrite a bool set to true if an extracted file should overwrite + * an existing file of the same name in the destination directory; false if + * it should be skipped + * @param password an optional char * password to be applied to the extraction + * @return bool set to true if all files were successfully extracted (or + * correctly skipped); false if an error occurred + **/ + AREXPORT virtual bool extractAll(const char *destDir, + bool isOverwrite, + const char *password = NULL) = 0; + + /// Extracts the specified file from the zip file. + /** + * The zip file must have been opened in UNZIP_MODE. + * + * @param memberName the char * name of the file that should be extracted + * @param destDir the char * name of the directory into which the extracted + * files are to be placed + * @param isOverwrite a bool set to true if an extracted file should overwrite + * an existing file of the same name in the destination directory; false if + * it should be skipped + * @param destFileName an optional char * name of the destination file to be + * written; if NULL, then memberName is used + * @param password an optional char * password to be applied to the extraction + * @return bool set to true if the file was successfully extracted (or + * correctly skipped); false if an error occurred + **/ + AREXPORT virtual bool extractFile(const char *memberName, + const char *destDir, + bool isOverwrite, + const char *destFileName = NULL, + const char *password = NULL) = 0; + + + /// Adds all of the files in the specified directory to the zip file. + /** + * The zip file must have been opened in ZIP_MODE. + * + * @param sourceDir the char * name of the directory from which the files + * are to be added + * @param isIncludeSubDirs a bool set to true if all files in all subdirectories + * should also be added to the zip file; false otherwise + * @param isOverwrite a bool set to true if a file to be added should overwrite + * an existing zip file member of the same name; false if it should be skipped + * @param password an optional char * password to be applied to the addition + * @param flush an optional int indication of how the zip file should be flushed + * when writing (for error recovery); implementation dependent + * @return bool set to true if all files were successfully added (or + * correctly skipped); false if an error occurred + **/ + AREXPORT virtual bool addAll(const char *sourceDir, + bool isIncludeSubDirs, + bool isOverwrite, + const char *password = NULL, + int flush = 0) = 0; + + /// Adds the specified file to the zip file. + /** + * The zip file must have been opened in ZIP_MODE. + * + * @param memberName the char * name of the member to be added in the zip file + * @param isOverwrite a bool set to true if a file to be added should overwrite + * an existing zip file member of the same name; false if it should be skipped + * @param sourceFileName the char * name of the file to be added + * @param password an optional char * password to be applied to the addition + * @param flush an optional int indication of how the zip file should be flushed + * when writing (for error recovery); implementation dependent + * @return bool set to true if all files were successfully added (or + * correctly skipped); false if an error occurred + **/ + AREXPORT virtual bool addFile(const char *memberName, + bool isOverwrite, + const char *sourceFileName, + const char *password, + int flush = 0) = 0; + + +private: + + /// Disabled copy constructor + ArZippable( const ArZippable & ); + /// Disabled assignment operator. + ArZippable &operator=( const ArZippable & ); + +protected: + + +}; // end class ArZippable + + +#endif // ARZIPPABLE_H + diff --git a/Legacy/Aria/include/Aria.h b/Legacy/Aria/include/Aria.h new file mode 100644 index 0000000..7ebeab7 --- /dev/null +++ b/Legacy/Aria/include/Aria.h @@ -0,0 +1,159 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARIA_H +#define ARIA_H + +#include "ariaOSDef.h" +#include "ariaTypedefs.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArSimpleConnector.h" +#include "ArLogFileConnection.h" +#include "ArLog.h" +#include "ArRobotPacket.h" +#include "ArRobotPacketSender.h" +#include "ArRobotPacketReceiver.h" +#include "ArRobotConfigPacketReader.h" +#include "ArRobotTypes.h" +#include "ariaUtil.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ArFileParser.h" +#include "ArConfig.h" +#include "ArConfigArg.h" +#include "ArConfigGroup.h" +#include "ArRobot.h" +#include "ArCommands.h" +#include "ArJoyHandler.h" +#include "ArSyncTask.h" +#include "ArTaskState.h" +#include "ariaInternal.h" +#include "ArSonarDevice.h" +#include "ArPriorityResolver.h" +#include "ArAction.h" +#include "ArActionGroup.h" +#include "ArActionGroups.h" +#include "ArActionDeceleratingLimiter.h" +#include "ArActionLimiterForwards.h" +#include "ArActionLimiterBackwards.h" +#include "ArActionLimiterTableSensor.h" +#include "ArActionBumpers.h" +#include "ArActionIRs.h" +#include "ArActionStallRecover.h" +#include "ArActionAvoidFront.h" +#include "ArActionAvoidSide.h" +#include "ArActionConstantVelocity.h" +#include "ArActionInput.h" +#include "ArActionRobotJoydrive.h" +#include "ArActionJoydrive.h" +#include "ArActionKeydrive.h" +#include "ArActionTriangleDriveTo.h" +#include "ArActionTurn.h" +#include "ArActionRatioInput.h" +#include "ArActionStop.h" +#include "ArActionGoto.h" +#include "ArModule.h" +#include "ArModuleLoader.h" +#include "ArRecurrentTask.h" +#include "ArInterpolation.h" +#include "ArGripper.h" +#include "ArSonyPTZ.h" +#include "ArRVisionPTZ.h" +#include "ArAMPTU.h" +#include "ArP2Arm.h" +#include "ArACTS.h" +#include "ArSick.h" +#include "ArLaserLogger.h" +#include "ArIrrfDevice.h" +#include "ArKeyHandler.h" +#include "ArDPPTU.h" +#include "ArVCC4.h" +#include "ArMode.h" +#include "ArModes.h" +#include "ArNetServer.h" +#include "ArSignalHandler.h" +#include "ArAnalogGyro.h" +#include "ArMapInterface.h" +#include "ArMapObject.h" +#include "ArMap.h" +#include "ArLineFinder.h" +#include "ArBumpers.h" +#include "ArIRs.h" +#include "ArDrawingData.h" +#include "ArForbiddenRangeDevice.h" +#include "ArTCM2.h" +#if !defined(WIN32) && !defined(SWIGWIN) +#include "ArVersalogicIO.h" +#include "ArMTXIO.h" +#endif +#include "ArActionGotoStraight.h" +#include "ArDataLogger.h" +#include "ArRobotJoyHandler.h" +#include "ArRatioInputKeydrive.h" +#include "ArRatioInputJoydrive.h" +#include "ArRatioInputRobotJoydrive.h" +#include "ArActionMovementParameters.h" +#include "ArSoundPlayer.h" +#include "ArSoundsQueue.h" +#include "ArCameraCollection.h" +#include "ArCameraCommands.h" +#include "ArStringInfoGroup.h" +#include "ArSonarAutoDisabler.h" +#include "ArActionDriveDistance.h" +#include "ArLaserReflectorDevice.h" +#include "ArRobotConfig.h" +#include "ArTCMCompassRobot.h" +#include "ArTCMCompassDirect.h" +#include "ArLaserFilter.h" +#include "ArUrg.h" +#include "ArSpeech.h" +#include "ArGPS.h" +#include "ArTrimbleGPS.h" +#include "ArNovatelGPS.h" +#include "ArGPSCoords.h" +#include "ArLaser.h" +#include "ArRobotConnector.h" +#include "ArLaserConnector.h" +#include "ArSonarConnector.h" +#include "ArBatteryConnector.h" +#include "ArLCDConnector.h" +#include "ArSonarMTX.h" +#include "ArBatteryMTX.h" +#include "ArLCDMTX.h" +#include "ArSimulatedLaser.h" +#include "ArExitErrorSource.h" +#include "ArActionLimiterRot.h" +#include "ArRobotBatteryPacketReader.h" +#include "ArLMS1XX.h" +#include "ArUrg_2_0.h" +#include "ArActionMovementParametersDebugging.h" +#include "ArZippable.h" +#include "ArS3Series.h" +#include "ArSZSeries.h" +#include "ArRobotPacketReaderThread.h" +#include "ArHasFileName.h" + +#endif // ARIA_H diff --git a/Legacy/Aria/include/ariaInternal.h b/Legacy/Aria/include/ariaInternal.h new file mode 100644 index 0000000..b45fabc --- /dev/null +++ b/Legacy/Aria/include/ariaInternal.h @@ -0,0 +1,333 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARIAINTERNAL_H +#define ARIAINTERNAL_H + + +#include "ArMutex.h" +#include "ArFunctor.h" +#include "ArConfig.h" + +#ifndef ARINTERFACE +#include "ArStringInfoGroup.h" +class ArRobot; +class ArRobotJoyHandler; +class ArSonarMTX; +class ArBatteryMTX; +class ArLCDMTX; +#endif // ARINTERFACE + +class ArKeyHandler; +class ArJoyHandler; + + +/** Contains global initialization, deinitialization and other global functions + @ingroup ImportantClasses +*/ +class Aria +{ +public: + + typedef enum { + SIGHANDLE_SINGLE, ///< Setup signal handlers in a global, non-thread way + SIGHANDLE_THREAD, ///< Setup a dedicated signal handling thread + SIGHANDLE_NONE ///< Do no signal handling + } SigHandleMethod; + + /// Initialize Aria global data struture and perform OS-specific initialization, including adding OS signal handlers on Linux, initializing sockets library on Windows, etc. + AREXPORT static void init(SigHandleMethod method = SIGHANDLE_THREAD, + bool initSockets = true, + bool sigHandleExitNotShutdown = true); + + /// Performs OS-specific deinitialization, used by shutdown() and exit(). + AREXPORT static void uninit(); + + /// Adds a callback to call when Aria is initialized using init() + AREXPORT static void addInitCallBack(ArFunctor *cb, ArListPos::Pos position); + + /// Adds a callback to call when Aria is uninititialized using uninit() + AREXPORT static void addUninitCallBack(ArFunctor *cb, + ArListPos::Pos position); + + /// Shutdown all Aria processes/threads + AREXPORT static void shutdown(); + + /// Shutdown all Aria processes/threads, call exit callbacks, and exit the program + AREXPORT static void exit(int exitCode = 0); + + /// Sees if Aria is still running (mostly for the thread in main) + AREXPORT static bool getRunning(void); + + /// Sets the directory that ARIA resides in, to override default + AREXPORT static void setDirectory(const char * directory); + + /// Gets the directory that ARIA resides in + AREXPORT static const char *getDirectory(void); + + /// Parses the arguments for the program (calls all the callbacks added with addParseArgsCB()) + AREXPORT static bool parseArgs(void); + + /// Logs all the options for the program (Calls all the callbacks added with addLogOptionsCB()) + AREXPORT static void logOptions(void); + + /// Sets the key handler, so that other classes can find it using getKeyHandler() + AREXPORT static void setKeyHandler(ArKeyHandler *keyHandler); + + /// Gets a pointer to the global key handler, if one has been set with setKeyHandler() + AREXPORT static ArKeyHandler *getKeyHandler(void); + + /// Sets the joystick handler, so that other classes can find it using getJoyHandler() + AREXPORT static void setJoyHandler(ArJoyHandler *joyHandler); + + /// Get a pointer to the joystick handler if one has been set with setJoyHandler() + AREXPORT static ArJoyHandler *getJoyHandler(void); + + /// Adds a functor to by called before program exit by Aria::exit() + AREXPORT static void addExitCallback(ArFunctor *functor, int position = 50); + + /// Removes a functor to by called before program exit by Aria::exit() + AREXPORT static void remExitCallback(ArFunctor *functor); + + /// Sets the log level for the exit callbacks + AREXPORT static void setExitCallbacksLogLevel(ArLog::LogLevel level); + + /// Force an exit of all Aria processes/threads (the old way) + AREXPORT static void exitOld(int exitCode = 0); + + /// Internal, the callback for the signal handling + AREXPORT static void signalHandlerCB(int sig); + + /// Internal, calls the exit callbacks + AREXPORT static void callExitCallbacks(void); + + /// Adds a callback for when we parse arguments + AREXPORT static void addParseArgsCB(ArRetFunctor *functor, + int position = 50); + + /// Sets the log level for the parsing function + AREXPORT static void setParseArgLogLevel(ArLog::LogLevel level); + + /// Adds a callback for when we log options + AREXPORT static void addLogOptionsCB(ArFunctor *functor, int position = 50); + + /// Adds a type of deviceConnection for Aria to be able to create + AREXPORT static bool deviceConnectionAddCreator( + const char *deviceConnectionType, + ArRetFunctor3 *creator); + + + /// Gets a list of the possible deviceConnection types + AREXPORT static const char *deviceConnectionGetTypes(void); + + /// Gets a list of the possible deviceConnection types (for use in the config) + AREXPORT static const char *deviceConnectionGetChoices(void); + + /// Creates a deviceConnection of the given type + AREXPORT static ArDeviceConnection *deviceConnectionCreate( + const char *deviceConnectionType, const char *port, + const char *defaultInfo, + const char *prefix = "Aria::deviceConnectionCreate"); + +#ifndef ARINTERFACE + /// Sets the robot joystick handler, so that other classes can find it + AREXPORT static void setRobotJoyHandler(ArRobotJoyHandler *robotJoyHandler); + + /// Gets the robot joystick handler if one has been set + AREXPORT static ArRobotJoyHandler *getRobotJoyHandler(void); + + /// Gets the ArConfig for this program + AREXPORT static ArConfig *getConfig(void); + + /// Gets the ArStringInfoGroup for this program + AREXPORT static ArStringInfoGroup *getInfoGroup(void); + + /// Add a robot to the global list of robots + AREXPORT static void addRobot(ArRobot *robot); + + /// Remove a robot from the global list of robots + AREXPORT static void delRobot(ArRobot *robot); + + /// Finds a robot in the global list of robots, by name + AREXPORT static ArRobot *findRobot(char *name); + + /// Get a copy of the global robot list + AREXPORT static std::list * getRobotList(); + + /// Gets the maximum number of lasers to use + AREXPORT static int getMaxNumLasers(void); + + /// Sets the maximum number of lasers to use + AREXPORT static void setMaxNumLasers(int maxNumLasers); + + /// Gets the maximum number of sonars to use + AREXPORT static int getMaxNumSonarBoards(void); + + /// Sets the maximum number of sonars to use + AREXPORT static void setMaxNumSonarBoards(int maxNumSonarBoards); + + /// Gets the maximum number of batteris to use + AREXPORT static int getMaxNumBatteries(void); + + /// Sets the maximum number of batteries to use + AREXPORT static void setMaxNumBatteries(int maxNumBatteries); + + /// Gets the maximum number of lcds to use + AREXPORT static int getMaxNumLCDs(void); + + /// Sets the maximum number of batteries to use + AREXPORT static void setMaxNumLCDs(int maxNumLCDs); + + /// Creates a laser of the given type + AREXPORT static ArLaser *laserCreate( + const char *laserType, int laserNumber, + const char *prefix = "Aria::laserCreate"); + + /// Adds a type of laser for Aria to be able to create + AREXPORT static bool laserAddCreator( + const char *laserType, + ArRetFunctor2 *creator); + + /// Gets a list of the possible laser types + AREXPORT static const char *laserGetTypes(void); + + /// Gets a list of the possible laser types (for use in the config) + AREXPORT static const char *laserGetChoices(void); + + /// Creates a battery of the given type + AREXPORT static ArBatteryMTX *batteryCreate( + const char *batteryType, int batteryNumber, + const char *prefix = "Aria::batteryCreate"); + + /// Adds a type of battery for Aria to be able to create + AREXPORT static bool batteryAddCreator( + const char *batteryType, + ArRetFunctor2 *creator); + + /// Gets a list of the possible battery types + AREXPORT static const char *batteryGetTypes(void); + /// Gets a list of the possible battery types (for use in the config) + AREXPORT static const char *batteryGetChoices(void); + + /// Creates a lcd of the given type + AREXPORT static ArLCDMTX *lcdCreate( + const char *lcdType, int lcdNumber, + const char *prefix = "Aria::lcdCreate"); + + /// Adds a type of lcd for Aria to be able to create + AREXPORT static bool lcdAddCreator( + const char *lcdType, + ArRetFunctor2 *creator); + + /// Gets a list of the possible lcd types + AREXPORT static const char *lcdGetTypes(void); + /// Gets a list of the possible lcd types (for use in the config) + AREXPORT static const char *lcdGetChoices(void); + + /// Creates a sonar of the given type + AREXPORT static ArSonarMTX *sonarCreate( + const char *sonarType, int sonarNumber, + const char *prefix = "Aria::sonarCreate"); + + /// Adds a type of sonar for Aria to be able to create + AREXPORT static bool sonarAddCreator( + const char *sonarType, + ArRetFunctor2 *creator); + + /// Gets a list of the possible sonar types + AREXPORT static const char *sonarGetTypes(void); + /// Gets a list of the possible sonar types (for use in the config) + AREXPORT static const char *sonarGetChoices(void); + + /// Set maximum limit on video devices (used by ArVideo library) + AREXPORT static void setMaxNumVideoDevices(size_t n); + /// Get maximum limit on video devices (used by ArVideo library) + AREXPORT static size_t getMaxNumVideoDevices(); + + /// Set maximum limit on PTZ or PTU devices, used by ArPTZConnector. Call before connecting to PTZ devices with ArPTZConnector. + AREXPORT static void setMaxNumPTZs(size_t n); + /// Set maximum limit on PTZ or PTU devices, used by ArPTZConnector. + AREXPORT static size_t getMaxNumPTZs(); +#endif // ARINTERFACE + + /// Gets the identifier (for humans) used for this instance of Aria + AREXPORT static const char *getIdentifier(void); + /// Sets the identifier (for humans) used for this instance of Aria + AREXPORT static void setIdentifier(const char *identifier); + + +protected: + static bool ourInited; + static ArGlobalFunctor1 ourSignalHandlerCB; + static bool ourRunning; + static ArMutex ourShuttingDownMutex; + static bool ourShuttingDown; + static bool ourExiting; + static std::string ourDirectory; + static std::list ourInitCBs; + static std::list ourUninitCBs; + static ArKeyHandler *ourKeyHandler; + static ArJoyHandler *ourJoyHandler; +#ifndef ARINTERFACE + static std::list ourRobots; + static ArRobotJoyHandler *ourRobotJoyHandler; + static ArConfig ourConfig; + static ArStringInfoGroup ourInfoGroup; + static int ourMaxNumLasers; + static int ourMaxNumSonarBoards; + static int ourMaxNumBatteries; + static int ourMaxNumLCDs; + static std::map *, ArStrCaseCmpOp> ourLaserCreatorMap; + static std::string ourLaserTypes; + static std::string ourLaserChoices; + static std::map *, ArStrCaseCmpOp> ourBatteryCreatorMap; + static std::string ourBatteryTypes; + static std::string ourBatteryChoices; + static std::map *, ArStrCaseCmpOp> ourLCDCreatorMap; + static std::string ourLCDTypes; + static std::string ourLCDChoices; + static std::map *, ArStrCaseCmpOp> ourSonarCreatorMap; + static std::string ourSonarTypes; + static std::string ourSonarChoices; +#endif // ARINTERFACE + static ArMutex ourExitCallbacksMutex; + static std::multimap ourExitCallbacks; + static bool ourSigHandleExitNotShutdown; + static std::multimap *> ourParseArgCBs; + static ArLog::LogLevel ourParseArgsLogLevel; + static std::multimap ourLogOptionsCBs; + static ArLog::LogLevel ourExitCallbacksLogLevel; + static std::map *, ArStrCaseCmpOp> ourDeviceConnectionCreatorMap; + static std::string ourDeviceConnectionTypes; + static std::string ourDeviceConnectionChoices; + static std::string ourIdentifier; +#ifndef ARINTERFACE + static size_t ourMaxNumVideoDevices; + static size_t ourMaxNumPTZs; +#endif +}; + + +#endif // ARIAINTERNAL_H diff --git a/Legacy/Aria/include/ariaOSDef.h b/Legacy/Aria/include/ariaOSDef.h new file mode 100644 index 0000000..3feadc9 --- /dev/null +++ b/Legacy/Aria/include/ariaOSDef.h @@ -0,0 +1,78 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARIAOSDEF_H +#define ARIAOSDEF_H + +#if defined(_WIN32) && !defined(WIN32) +#define WIN32 _WIN32 +#endif + +#if defined(WIN32) && !defined(MINGW) + +//// +//// Windows - Massage the windows compiler into working +//// + +// Turn off warning of usage of 'this' in +// constructor chaining +#pragma warning(disable:4355) + +// Turn off warning about truncated identifiers which happens +// in debug builds of code using STL templatized stuff. +#pragma warning(disable:4786) + +// Turn off warning about 'benign macro redef'. +#pragma warning(disable:4142) + +// Turn off warning about loosing from the conversion to double. +#pragma warning(disable:4244) + +// Turn off warning about forcing value to bool 'true' or 'false'. +#pragma warning(disable:4800) + +// Turn off warning about using some standard C libraries that have been deprecated +// by MSVC. (e.g. they want you to use snprintf_s instead of snprintf, etc.) +#pragma warning(disable:4996) + +// Warning about "new behavior" in VC2008 that array elements are not automatically initialized +// (which is normal C++ behavior anyway and ARIA doesn't assume it) +#pragma warning(disable:4351) + + +#include "ariaTypedefs.h" + +// Compatibility functions to help windows out. +inline int strcasecmp(const char *s1, const char *s2) + {return _stricmp(s1, s2);} +inline int strncasecmp(const char *s1, const char *s2, size_t n) + {return _strnicmp(s1, s2, n);} + +#define snprintf _snprintf +#define vsnprintf _vsnprintf +#endif + + +#endif // ARIAOSDEF_H diff --git a/Legacy/Aria/include/ariaTypedefs.h b/Legacy/Aria/include/ariaTypedefs.h new file mode 100644 index 0000000..a174669 --- /dev/null +++ b/Legacy/Aria/include/ariaTypedefs.h @@ -0,0 +1,95 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#ifndef ARTYPEDEFS_H +#define ARTYPEDEFS_H + +#include +#include +#include +#include + +#ifdef WIN32 + + +#ifndef SWIG +#if !defined(ARIA_STATIC) && !defined(AREXPORT) && !defined(MINGW) +#define AREXPORT _declspec(dllimport) +#elif !defined(AREXPORT) // ARIA_STATIC +#define AREXPORT +#endif // ARIA_STATIC +#else +#define AREXPORT +#endif + +#include +#include + +#endif //WIN32L + + +#ifndef WIN32 + +#define AREXPORT +//// +//// Linux +//// + +#endif // linux + + +typedef std::map ArStrMap; + +/// has enum for position in list +class ArListPos +{ +public: + typedef enum { + FIRST = 1, ///< place item first in the list + LAST = 2 ///< place item last in the list + } Pos; +}; + +/// Contains platform independent sized variable types +class ArTypes +{ +public: + /// A single signed byte + typedef char Byte; + /// Two signed bytes + typedef short Byte2; + /// Four signed bytes + typedef int Byte4; + + /// A single unsigned byte + typedef unsigned char UByte; + /// Two unsigned bytes + typedef unsigned short UByte2; + /// Four unsigned bytes + typedef unsigned int UByte4; +}; + + +#endif diff --git a/Legacy/Aria/include/ariaUtil.h b/Legacy/Aria/include/ariaUtil.h new file mode 100644 index 0000000..91aeeba --- /dev/null +++ b/Legacy/Aria/include/ariaUtil.h @@ -0,0 +1,2357 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARIAUTIL_H +#define ARIAUTIL_H + +#define _GNU_SOURCE 1 +#include +// #define _XOPEN_SOURCE 500 +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) || defined(WIN32) +#include +#include +#else +#include +#include +#include +#include +#include +#endif // ifndef win32 + +#include +#include "ariaTypedefs.h" +#include "ArLog.h" +#include "ArFunctor.h" +#include "ArArgumentParser.h" +//#include "ariaInternal.h" +#include "ariaOSDef.h" + +class ArLaser; +class ArBatteryMTX; +class ArLCDMTX; +class ArSonarMTX; +class ArDeviceConnection; + +#ifndef M_PI +#define M_PI 3.1415927 +#endif // of M_PI, windows has a function call instead of a define + +/// Contains various utility functions, including cross-platform wrappers around common system functions. +/** @ingroup UtilityClasses + @ingroup ImportantClasses +*/ +class ArUtil +{ +public: + /// Values for the bits from 0 to 16 + enum BITS { + BIT0 = 0x1, ///< value of BIT0 + BIT1 = 0x2, ///< value of BIT1 + BIT2 = 0x4, ///< value of BIT2 + BIT3 = 0x8, ///< value of BIT3 + BIT4 = 0x10, ///< value of BIT4 + BIT5 = 0x20, ///< value of BIT5 + BIT6 = 0x40, ///< value of BIT6 + BIT7 = 0x80, ///< value of BIT7 + BIT8 = 0x100, ///< value of BIT8 + BIT9 = 0x200, ///< value of BIT9 + BIT10 = 0x400, ///< value of BIT10 + BIT11 = 0x800, ///< value of BIT11 + BIT12 = 0x1000, ///< value of BIT12 + BIT13 = 0x2000, ///< value of BIT13 + BIT14 = 0x4000, ///< value of BIT14 + BIT15 = 0x8000, ///< value of BIT15 + }; + +#ifdef WIN32 + typedef int mode_t; +#endif + + /// Sleep for the given number of milliseconds + AREXPORT static void sleep(unsigned int ms); + + /// Get the time in milliseconds + AREXPORT static unsigned int getTime(void); + + /// Delete all members of a set. Does NOT empty the set. + /** + Assumes that T is an iterator that supports the operator*, operator!= + and operator++. The return is assumed to be a pointer to a class that + needs to be deleted. + */ + template static void deleteSet(T begin, T end) + { + for (; begin != end; ++begin) + { + delete (*begin); + } + } + + /// Delete all members of a set. Does NOT empty the set. + /** + Assumes that T is an iterator that supports the operator**, operator!= + and operator++. The return is assumed to be a pair. The second value of + the pair is assumed to be a pointer to a class that needs to be deleted. + */ + template static void deleteSetPairs(T begin, T end) + { + for (; begin != end; ++begin) + { + delete (*begin).second; + } + } + + /// Returns the minimum of the two values + static int findMin(int first, int second) + { if (first < second) return first; else return second; } + /// Returns the maximum of the two values + static int findMax(int first, int second) + { if (first > second) return first; else return second; } + + /// Returns the minimum of the two values + static double findMin(double first, double second) + { if (first < second) return first; else return second; } + /// Returns the maximum of the two values + static double findMax(double first, double second) + { if (first > second) return first; else return second; } + + /// OS-independent way of finding the size of a file. + AREXPORT static long sizeFile(const char *fileName); + + /// OS-independent way of finding the size of a file. + AREXPORT static long sizeFile(std::string fileName); + + /// OS-independent way of checking to see if a file exists and is readable. + AREXPORT static bool findFile(const char *fileName); + + // OS-independent way of stripping the directory from the fileName. + // commented out with std::string changes since this didn't seem worth fixing right now + //AREXPORT static bool stripDir(std::string fileIn, std::string &fileOut); + + // OS-independent way of stripping the fileName from the directory. + // commented out with std::string changes since this didn't seem worth fixing right now + //AREXPORT static bool stripFile(std::string fileIn, std::string &fileOut); + + /// Appends a slash to a path if there is not one there already + AREXPORT static void appendSlash(char *path, size_t pathLength); + + /// Appends a slash to the given string path if necessary. + AREXPORT static void appendSlash(std::string &path); + + /// Fix the slash orientation in file path string for windows or linux + AREXPORT static void fixSlashes(char *path, size_t pathLength); + + /// Fixes the slash orientation in the given file path string for the current platform + AREXPORT static void fixSlashes(std::string &path); + + /// Fix the slash orientation in file path string to be all forward + AREXPORT static void fixSlashesForward(char *path, size_t pathLength); + + /// Fix the slash orientation in file path string to be all backward + AREXPORT static void fixSlashesBackward(char *path, size_t pathLength); + + /// Returns the slash (i.e. separator) character for the current platform + AREXPORT static char getSlash(); + + /// Adds two directories, taking care of all slash issues + AREXPORT static void addDirectories(char *dest, size_t destLength, + const char *baseDir, + const char *insideDir); + + + + + /// Finds out if two strings are equal + AREXPORT static int strcmp(std::string str, std::string str2); + + /// Finds out if two strings are equal + AREXPORT static int strcmp(std::string str, const char *str2); + + /// Finds out if two strings are equal + AREXPORT static int strcmp(const char *str, std::string str2); + + /// Finds out if two strings are equal + AREXPORT static int strcmp(const char *str, const char *str2); + + /// Finds out if two strings are equal (ignoring case) + AREXPORT static int strcasecmp(std::string str, std::string str2); + + /// Finds out if two strings are equal (ignoring case) + AREXPORT static int strcasecmp(std::string str, const char *str2); + + /// Finds out if two strings are equal (ignoring case) + AREXPORT static int strcasecmp(const char *str, std::string str2); + + /// Finds out if two strings are equal (ignoring case) + AREXPORT static int strcasecmp(const char *str, const char *str2); + + /// Finds out if a string has a suffix + AREXPORT static bool strSuffixCmp(const char *str, const char *suffix); + + /// Finds out if a string has a suffix + AREXPORT static bool strSuffixCaseCmp(const char *str, const char *suffix); + + + /// Compares two strings (ignoring case and surrounding quotes) + /** + * This helper method is primarily used to ignore surrounding quotes + * when comparing ArArgumentBuilder args. + * @return int set to 0 if the two strings are equivalent, a negative + * number if str1 is "less than" str2, and a postive number if it is + * "greater than". + **/ + AREXPORT static int strcasequotecmp(const std::string &str1, + const std::string &str2); + + + /// Puts a \ before spaces in src, puts it into dest + AREXPORT static void escapeSpaces(char *dest, const char *src, + size_t maxLen); + + /// Strips out the quotes in the src buffer into the dest buffer + AREXPORT static bool stripQuotes(char *dest, const char *src,size_t destLen); + + /// Strips the quotes from the given string. + AREXPORT static bool stripQuotes(std::string *strToStrip); + + /// Lowers a string from src into dest, make sure there's enough space + AREXPORT static void lower(char *dest, const char *src, + size_t maxLen); + /// Returns true if this string is only alphanumeric (i.e. it contains only leters and numbers), false if it contains any non alphanumeric characters (punctuation, whitespace, control characters, etc.) + AREXPORT static bool isOnlyAlphaNumeric(const char *str); + + /// Returns true if this string is only numeric (i.e. it contains only numeric + //digits), or it's null, or false if it contains any non nonnumeric characters (alphabetic, punctuation, whitespace, control characters, etc.) + AREXPORT static bool isOnlyNumeric(const char *str); + + /// Returns true if the given string is null or of zero length, false otherwise + AREXPORT static bool isStrEmpty(const char *str); + + /// Determines whether the given text is contained in the given list of strings. + AREXPORT static bool isStrInList(const char *str, + const std::list &list, + bool isIgnoreCase = false); + + /// Returns the floating point number from the string representation of that number in @a nptr, or HUGE_VAL for "inf" or -HUGE_VAL for "-inf". + AREXPORT static double atof(const char *nptr); + + /// Converts an integer value into a string for true or false + AREXPORT static const char *convertBool(int val); + +#ifndef SWIG + /// Function for doing a printf style call to a functor + /** @swigomit */ + AREXPORT static void functorPrintf(ArFunctor1 *functor, + char *str, ...); +#endif + + /// Function for doing a fprintf to a file (here to make a functor for) + AREXPORT static void writeToFile(const char *str, FILE *file); + + /// Gets a string contained in an arbitrary file + AREXPORT static bool getStringFromFile(const char *fileName, + char *str, size_t strLen); + /** + These are for passing into getStringFromRegistry + **/ + enum REGKEY { + REGKEY_CLASSES_ROOT, ///< use HKEY_CLASSES_ROOT + REGKEY_CURRENT_CONFIG, ///< use HKEY_CURRENT_CONFIG + REGKEY_CURRENT_USER, ///< use HKEY_CURRENT_USER + REGKEY_LOCAL_MACHINE, ///< use HKEY_LOCAL_MACHINE + REGKEY_USERS ///< use HKEY_USERS + }; + + /// Returns a string from the Windows registry + AREXPORT static bool getStringFromRegistry(REGKEY root, + const char *key, + const char *value, + char *str, + int len); + + /// Returns a string from the Windows registry, searching each of the following registry root paths in order: REGKEY_CURRENT_USER, REGKEY_LOCAL_MACHINE + AREXPORT static bool findFirstStringInRegistry(const char* key, const char* value, char* str, int len) { + if(!getStringFromRegistry(REGKEY_CURRENT_USER, key, value, str, len)) + return getStringFromRegistry(REGKEY_LOCAL_MACHINE, key, value, str, len); + return true; + } + + AREXPORT static const char *COM1; ///< First serial port device name (value depends on compilation platform) + AREXPORT static const char *COM2; ///< Second serial port device name (value depends on compilation platform) + AREXPORT static const char *COM3; ///< Third serial port device name (value depends on compilation platform) + AREXPORT static const char *COM4; ///< Fourth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM5; ///< Fifth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM6; ///< Sixth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM7; ///< Seventh serial port device name (value depends on compilation platform) + AREXPORT static const char *COM8; ///< Eighth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM9; ///< Ninth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM10; ///< Tenth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM11; ///< Eleventh serial port device name (value depends on compilation platform) + AREXPORT static const char *COM12; ///< Twelth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM13; ///< Thirteenth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM14; ///< Fourteenth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM15; ///< Fifteenth serial port device name (value depends on compilation platform) + AREXPORT static const char *COM16; ///< Sixteenth serial port device name (value depends on compilation platform) + + AREXPORT static const char *TRUESTRING; ///< "true" + AREXPORT static const char *FALSESTRING; ///< "false" + + /** Put the current year (GMT) in s (e.g. "2005"). + * @param s String buffer (allocated) to write year into + * @param len Size of @a s + */ + AREXPORT static void putCurrentYearInString(char* s, size_t len); + /** Put the current month (GMT) in s (e.g. "09" if September). + * @param s String buffer (allocated) to write month into + * @param len Size of @a s + */ + AREXPORT static void putCurrentMonthInString(char* s, size_t len); + /** Put the current day (GMT) of the month in s (e.g. "20"). + * @param s String buffer (allocated) to write day into + * @param len Size of @a s + */ + AREXPORT static void putCurrentDayInString(char* s, size_t len); + /** Put the current hour (GMT) in s (e.g. "13" for 1 o'clock PM). + * @param s String buffer (allocated) to write hour into + * @param len Size of @a s + */ + AREXPORT static void putCurrentHourInString(char* s, size_t len); + /** Put the current minute (GMT) in s (e.g. "05"). + * @param s String buffer (allocated) to write minutes into + * @param len Size of @a s + */ + AREXPORT static void putCurrentMinuteInString(char* s, size_t len); + /** Put the current second (GMT) in s (e.g. "59"). + * @param s String buffer (allocated) to write seconds into + * @param len Size of @a s + */ + AREXPORT static void putCurrentSecondInString(char* s, size_t len); + + + /// Parses the given time string (h:mm) and returns the corresponding time. + /** + * @param str the char * string to be parsed; in the 24-hour format h:mm + * @param ok an output bool * set to true if the time is successfully parsed; + * false, otherwise + * @param toToday true to find the time on the current day, false to find the time on 1/1/70 + * @return time_t if toToday is true then its the parsed time on the current day, if toToday is false then its the parsed time on 1/1/70 + * 1/1/70 + **/ + AREXPORT static time_t parseTime(const char *str, bool *ok = NULL, bool toToday = true); + + + /** Interface to native platform localtime() function. + * On Linux, this is equivalent to a call to localtime_r(@a timep, @a result) (which is threadsafe, including the returned pointer, since it uses a different time struct for each thread) + * On Windows, this is equivalent to a call to localtime(@a timep, @a result). In addition, a static mutex is used to make it threadsafe. + * + * @param timep Pointer to current time (Unix time_t; seconds since epoch) + * @param result The result of calling platform localtime function is copied into this struct, so it must have been allocated. + * @return false on error (e.g. invalid input), otherwise true. + * + * Example: + * @code + * struct tm t; + * ArUtil::localtime(time(NULL), &t); + * ArLog::log("Current month is %d.\n", t.tm_mon); + * @endcode + */ + AREXPORT static bool localtime(const time_t *timep, struct tm *result); + + + /** Call ArUtil::localtime(const time_t*, struct tm *) with the current time obtained by calling + * time(NULL). + * @return false on error (e.g. invalid input), otherwise true. + */ + AREXPORT static bool localtime(struct tm *result); + + // these aren't needed in windows since it ignores case anyhow +#ifndef WIN32 + /// this matches the case out of what file we want + AREXPORT static bool matchCase(const char *baseDir, const char *fileName, + char * result, size_t resultLen); +#endif + /// Pulls the directory out of a file name + AREXPORT static bool getDirectory(const char *fileName, + char * result, size_t resultLen); + /// Pulls the filename out of the file name + AREXPORT static bool getFileName(const char *fileName, + char * result, size_t resultLen); + + /// Sets the timestamp on the specified file + AREXPORT static bool changeFileTimestamp(const char *fileName, + time_t timestamp); + + /// Opens a file, defaulting it so that the file will close on exec + AREXPORT static FILE *fopen(const char *path, const char *mode, + bool closeOnExec = true); + /// Opens a file, defaulting it so that the file will close on exec + AREXPORT static int open(const char *pathname, int flags, + bool closeOnExec = true); + /// Opens a file, defaulting it so that the file will close on exec + AREXPORT static int open(const char *pathname, int flags, mode_t mode, + bool closeOnExec = true); + /// Opens a file, defaulting it so that the file will close on exec + AREXPORT static int creat(const char *pathname, mode_t mode, + bool closeOnExec = true); + /// Opens a pipe, defaulting it so that the file will close on exec + AREXPORT static FILE *popen(const char *command, const char *type, + bool closeOnExec = true); + + + /// Sets if the file descriptor will be closed on exec or not + AREXPORT static void setFileCloseOnExec(int fd, bool closeOnExec = true); + /// Sets if the file descriptor will be closed on exec or not + AREXPORT static void setFileCloseOnExec(FILE *file, bool closeOnExec = true); + + /** Return true if the value of @a f is not NaN and is not infinite (+/- INF) */ + AREXPORT static bool floatIsNormal(double f); + + /** Convert seconds to milliseconds */ + static double secToMSec(const double sec) { return sec * 1000.0; } + + /** Convert milliseconds to seconds */ + static double mSecToSec(const double msec) { return msec / 1000.0; } + + /** Convert meters to US feet */ + static double metersToFeet(const double m) { return m * 3.2808399; } + + /** Convert US feet to meters */ + static double feetToMeters(const double f) { return f / 3.2808399; } + + +protected: +//#ifndef WIN32 + /// this splits up a file name (it isn't exported since it'd crash with dlls) + static std::list splitFileName(const char *fileName); +//#endif + +private: + + /// The character used as a file separator on the current platform (i.e. Linux or Windows) + static const char SEPARATOR_CHAR; + /// The character used as a file separator on the current platform, in a string format + static const char *SEPARATOR_STRING; + /// The character used as a file separator on the other platforms (i.e. slash in opposite direction) + static const char OTHER_SEPARATOR_CHAR; + +#ifdef WIN32 + // Used on Windows to make ArUtil::localtime() function threadsafe + static ArMutex ourLocaltimeMutex; +#endif +}; + +/** Common math operations + @ingroup UtilityClasses +*/ +class ArMath +{ +private: + /* see ArMath::epsilon() */ + static const double ourEpsilon; + + // see getRandMax()) + static const long ourRandMax; + +public: + + /** @return a very small number which can be used for comparisons of floating + * point values, etc. */ + AREXPORT static double epsilon(); + + + /// This adds two angles together and fixes the result to [-180, 180] + /** + @param ang1 first angle + @param ang2 second angle, added to first + @return sum of the angles, in range [-180,180] + @see subAngle + @see fixAngle */ + static double addAngle(double ang1, double ang2) + { return fixAngle(ang1 + ang2); } + + /// This subtracts one angle from another and fixes the result to [-180,180] + /** + @param ang1 first angle + @param ang2 second angle, subtracted from first angle + @return resulting angle, in range [-180,180] + @see addAngle + @see fixAngle + */ + static double subAngle(double ang1, double ang2) + { return fixAngle(ang1 - ang2); } + + /// Takes an angle and returns the angle in range (-180,180] + /** + @param angle the angle to fix + @return the angle in range (-180,180] + @see addAngle + @see subAngle + */ + static double fixAngle(double angle) + { + if (angle >= 360) + angle = angle - 360.0 * (double)((int)angle / 360); + if (angle < -360) + angle = angle + 360.0 * (double)((int)angle / -360); + if (angle <= -180) + angle = + 180.0 + (angle + 180.0); + if (angle > 180) + angle = - 180.0 + (angle - 180.0); + return angle; + } + + /// Converts an angle in degrees to an angle in radians + /** + @param deg the angle in degrees + @return the angle in radians + @see radToDeg + */ + static double degToRad(double deg) { return deg * M_PI / 180.0; } + + /// Converts an angle in radians to an angle in degrees + /** + @param rad the angle in radians + @return the angle in degrees + @see degToRad + */ + static double radToDeg(double rad) { return rad * 180.0 / M_PI; } + + /// Finds the cos, from angles in degrees + /** + @param angle angle to find the cos of, in degrees + @return the cos of the angle + @see sin + */ + static double cos(double angle) { return ::cos(ArMath::degToRad(angle)); } + + /// Finds the sin, from angles in degrees + /** + @param angle angle to find the sin of, in degrees + @return the sin of the angle + @see cos + */ + static double sin(double angle) { return ::sin(ArMath::degToRad(angle)); } + + /// Finds the tan, from angles in degrees + /** + @param angle angle to find the tan of, in degrees + @return the tan of the angle + */ + static double tan(double angle) { return ::tan(ArMath::degToRad(angle)); } + + /// Finds the arctan of the given y/x pair + /** + @param y the y distance + @param x the x distance + @return the angle y and x form + */ + static double atan2(double y, double x) + { return ArMath::radToDeg(::atan2(y, x)); } + + /// Finds if one angle is between two other angles + static bool angleBetween(double angle, double startAngle, double endAngle) + { + angle = fixAngle(angle); + startAngle = fixAngle(startAngle); + endAngle = fixAngle(endAngle); + if ((startAngle < endAngle && angle > startAngle && angle < endAngle) || + (startAngle > endAngle && (angle > startAngle || angle < endAngle))) + return true; + else + return false; + } + + /// Finds the absolute value of a double + /** + @param val the number to find the absolute value of + @return the absolute value of the number + */ + static double fabs(double val) + { + if (val < 0.0) + return -val; + else + return val; + } + + /// Finds the closest integer to double given + /** + @param val the double to find the nearest integer to + @return the integer the value is nearest to (also caps it within + int bounds) + */ + static int roundInt(double val) + { + val += .49; + if (val > INT_MAX) + return (int) INT_MAX; + else if (val < INT_MIN) + return (int) INT_MIN; + else + return((int) floor(val)); + } + + /// Finds the closest short to double given + /** + @param val the double to find the nearest short to + @return the integer the value is nearest to (also caps it within + short bounds) + */ + static short roundShort(double val) + { + val += .49; + if (val > 32767) + return (short) 32767; + else if (val < -32768) + return (short) -32768; + else + return((short) floor(val)); + } + + + /// Rotates a point around 0 by degrees given + static void pointRotate(double *x, double *y, double th) + { + double cs, sn, xt, yt; + cs = cos(th); + sn = sin(th); + xt = *x; + yt = *y; + *x = cs*xt + sn*yt; + *y = cs*yt - sn*xt; + } + + /** Returns a random number between 0 and RAND_MAX on Windows, 2^31 on Linux + * (see ArUtil::getRandMax()). On Windows, rand() is used, on Linux, lrand48(). */ + static long random(void) + { +#ifdef WIN32 + return(rand()); +#else + return(lrand48()); +#endif + } + + /// Maximum of value returned by random() + AREXPORT static long getRandMax(); + + /** Returns a random number between @a m and @a n. On Windows, rand() is used, + * on Linux lrand48(). */ + AREXPORT static long randomInRange(long m, long n); + + /// Finds the distance between two coordinates + /** + @param x1 the first coords x position + @param y1 the first coords y position + @param x2 the second coords x position + @param y2 the second coords y position + @return the distance between (x1, y1) and (x2, y2) + **/ + static double distanceBetween(double x1, double y1, double x2, double y2) + { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); } + + /// Finds the squared distance between two coordinates + /** + use this only where speed really matters + @param x1 the first coords x position + @param y1 the first coords y position + @param x2 the second coords x position + @param y2 the second coords y position + @return the distance between (x1, y1) and (x2, y2) + **/ + static double squaredDistanceBetween(double x1, double y1, double x2, double y2) + { return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); } + + /** Base-2 logarithm */ + static double log2(double x) + { + return log10(x) / 0.3010303; // 0.301... is log10(2.0). + } + + /// Platform-independent call to determine whether the given double is not-a-number. + static bool isNan(double d) { +#ifdef WIN32 + return _isnan(d); +#else + return isnan(d); +#endif + } + + static bool isNan(float f) { +#ifdef WIN32 + return _isnan(f); +#else + return isnan(f); +#endif + } + + static bool isFinite(float f) { +#ifdef WIN32 + return _finite(f); +#else + return isfinite(f); +#endif + } + + static bool isFinite(double d) { +#ifdef WIN32 + return _finite(d); +#else + return isfinite(d); +#endif + } + + static bool compareFloats(double f1, double f2, double epsilon) + { + return (fabs(f2-f1) <= epsilon); + } + + static bool compareFloats(double f1, double f2) + { + return compareFloats(f1, f2, epsilon()); + } + + +}; // end class ArMath + +/// Represents an x, y position with an orientation +/** + This class represents a robot position with heading. The heading is + automatically adjusted to be in the range -180 to 180. It also defaults + to 0, and so does not need to be used. (This avoids having 2 types of + positions.) Everything in the class is inline so it should be fast. + + @ingroup UtilityClasses +*/ +class ArPose +{ +public: + + + /// Constructor, with optional initial values + /** + Sets the pose to the given values. The constructor can be called with no + parameters, with just x and y, or with x, y, and th. The given heading (th) + is automatically adjusted to be in the range -180 to 180. + + @param x the double to set the x position to, default of 0 + @param y the double to set the y position to, default of 0 + @param th the double value for the pose's heading (or th), default of 0 + */ + ArPose(double x = 0, double y = 0, double th = 0) : + myX(x), + myY(y), + myTh(ArMath::fixAngle(th)) + {} + + /// Copy Constructor + ArPose(const ArPose &pose) : + myX(pose.myX), myY(pose.myY), myTh(pose.myTh) {} + + /// Destructor + virtual ~ArPose() {} + /// Sets the position to the given values + /** + Sets the position with the given three values, but the theta does not + need to be given as it defaults to 0. + @param x the position to set the x position to + @param y the position to set the y position to + @param th the position to set the th position to, default of 0 + */ + virtual void setPose(double x, double y, double th = 0) + { setX(x); setY(y); setTh(th); } + /// Sets the position equal to the given position + /** @param position the position value this instance should be set to */ + virtual void setPose(ArPose position) + { + setX(position.getX()); + setY(position.getY()); + setTh(position.getTh()); + } + /// Sets the x position + void setX(double x) { myX = x; } + /// Sets the y position + void setY(double y) { myY = y; } + /// Sets the heading + void setTh(double th) { myTh = ArMath::fixAngle(th); } + /// Sets the heading, using radians + void setThRad(double th) { myTh = ArMath::fixAngle(ArMath::radToDeg(th)); } + /// Gets the x position + double getX(void) const { return myX; } + /// Gets the y position + double getY(void) const { return myY; } + /// Gets the heading + double getTh(void) const { return myTh; } + /// Gets the heading, in radians + double getThRad(void) const { return ArMath::degToRad(myTh); } + /// Gets the whole position in one function call + /** + Gets the whole position at once, by giving it 2 or 3 pointers to + doubles. If you give the function a null pointer for a value it won't + try to use the null pointer, so you can pass in a NULL if you don't + care about that value. Also note that th defaults to NULL so you can + use this with just x and y. + @param x a pointer to a double to set the x position to + @param y a pointer to a double to set the y position to + @param th a pointer to a double to set the heading to, defaults to NULL + */ + void getPose(double *x, double *y, double *th = NULL) const + { + if (x != NULL) + *x = myX; + if (y != NULL) + *y = myY; + if (th != NULL) + *th = myTh; + } + /// Finds the distance from this position to the given position + /** + @param position the position to find the distance to + @return the distance to the position from this instance + */ + virtual double findDistanceTo(ArPose position) const + { + return ArMath::distanceBetween(getX(), getY(), + position.getX(), + position.getY()); + } + + /// Finds the square distance from this position to the given position + /** + This is only here for speed, if you aren't doing this thousands + of times a second don't use this one use findDistanceTo + + @param position the position to find the distance to + @return the distance to the position from this instance + **/ + virtual double squaredFindDistanceTo(ArPose position) const + { + return ArMath::squaredDistanceBetween(getX(), getY(), + position.getX(), + position.getY()); + } + /// Finds the angle between this position and the given position + /** + @param position the position to find the angle to + @return the angle to the given position from this instance, in degrees + */ + virtual double findAngleTo(ArPose position) const + { + return ArMath::radToDeg(atan2(position.getY() - getY(), + position.getX() - getX())); + } + /// Logs the coordinates using ArLog + virtual void log(void) const + { ArLog::log(ArLog::Terse, "%.0f %.0f %.1f", myX, myY, myTh); } + + /// Add the other pose's X, Y and theta to this pose's X, Y, and theta (sum in theta will be normalized to (-180,180)), and return the result + virtual ArPose operator+(const ArPose& other) const + { + return ArPose( myX + other.getX(), + myY + other.getY(), + ArMath::fixAngle(myTh + other.getTh()) ); + } + + /// Substract the other pose's X, Y, and theta from this pose's X, Y, and theta (difference in theta will be normalized to (-180,180)), and return the result + + virtual ArPose operator-(const ArPose& other) const + { + return ArPose( myX - other.getX(), + myY - other.getY(), + ArMath::fixAngle(myTh - other.getTh()) ); + } + + /** Adds the given pose to this one. + * @swigomit + */ + ArPose & operator+= ( const ArPose & other) + { + myX += other.myX; + myY += other.myY; + myTh = ArMath::fixAngle(myTh + other.myTh); + return *this; + } + + /** Subtracts the given pose from this one. + * @swigomit + */ + ArPose & operator-= ( const ArPose & other) + { + myX -= other.myX; + myY -= other.myY; + myTh = ArMath::fixAngle(myTh - other.myTh); + return *this; + } + + /// Equality operator (for sets) + virtual bool operator==(const ArPose& other) const + { + return ((fabs(myX - other.myX) < ArMath::epsilon()) && + (fabs(myY - other.myY) < ArMath::epsilon()) && + (fabs(myTh - other.myTh) < ArMath::epsilon())); + } + + virtual bool operator!=(const ArPose& other) const + { + return ((fabs(myX - other.myX) > ArMath::epsilon()) || + (fabs(myY - other.myY) > ArMath::epsilon()) || + (fabs(myTh - other.myTh) > ArMath::epsilon())); + } + + /// Less than operator (for sets) + virtual bool operator<(const ArPose& other) const + { + + if (fabs(myX - other.myX) > ArMath::epsilon()) { + return myX < other.myX; + } + else if (fabs(myY - other.myY) > ArMath::epsilon()) { + return myY < other.myY; + } + else if (fabs(myTh - other.myTh) > ArMath::epsilon()) { + return myTh < other.myTh; + } + // Otherwise... x, y, and th are equal + return false; + + } // end operator < + + /// Finds the distance between two poses (static function, uses no + /// data from any instance and shouldn't be able to be called on an + /// instance) + /** + @param pose1 the first coords + @param pose2 the second coords + @return the distance between the poses + **/ + static double distanceBetween(ArPose pose1, ArPose pose2) + { return ArMath::distanceBetween(pose1.getX(), pose1.getY(), + pose2.getX(), pose2.getY()); } + + +protected: + + double myX; + double myY; + double myTh; +}; + + +/// A class for time readings and measuring durations +/** + This class is for timing durations or time between events. + The time values it stores are relative to an abritrary starting time; it + does not correspond to "real world" or "wall clock" time in any way, + so DON'T use this for keeping track of what time it is, + just for timestamps and relative timing (e.g. "this loop needs to sleep another 100 ms"). + + The recommended methods to use are setToNow() to reset the time, + mSecSince() to obtain the number of milliseconds elapsed since it was + last reset (or secSince() if you don't need millisecond precision), and + mSecSince(ArTime) or secSince(ArTime) to find the difference between + two ArTime objects. + + On systems where it is supported this will use a monotonic clock, + this is an ever increasing system that is not dependent on what + the time of day is set to. Normally for linux gettimeofday is + used, but if the time is changed forwards or backwards then bad + things can happen. Windows uses a time since bootup, which + functions the same as the monotonic clock anyways. You can use + ArTime::usingMonotonicClock() to see if this is being used. Note + that an ArTime will have had to have been set to for this to be a + good value... Aria::init does this however, so that should not be + an issue. It looks like the monotonic clocks won't work on linux + kernels before 2.6. + + @ingroup UtilityClasses +*/ + +class ArTime +{ +public: + /// Constructor. Time is initialized to the current time. + ArTime() { setToNow(); } + + /// Copy constructor + // + ArTime(const ArTime &other) : + mySec(other.mySec), + myMSec(other.myMSec) + {} + + /// Assignment operator + ArTime &operator=(const ArTime &other) + { + if (this != &other) { + mySec = other.mySec; + myMSec = other.myMSec; + } + return *this; + } + + // + /// Destructor + ~ArTime() {} + + /// Gets the number of milliseconds since the given timestamp to this one + long mSecSince(ArTime since) const + { + long long ret = mSecSinceLL(since); + if (ret > INT_MAX) + return INT_MAX; + if (ret < -INT_MAX) + return -INT_MAX; + return ret; + /* The old way that had problems with wrapping + long long timeSince, timeThis; + + timeSince = since.getSec() * 1000 + since.getMSec(); + timeThis = mySec * 1000 + myMSec; + return timeSince - timeThis; + */ + } + /// Gets the number of milliseconds since the given timestamp to this one + long long mSecSinceLL(ArTime since) const + { + long long timeSince, timeThis; + + timeSince = since.getSecLL() * 1000 + since.getMSecLL(); + timeThis = mySec * 1000 + myMSec; + return timeSince - timeThis; + } + /// Gets the number of seconds since the given timestamp to this one + long secSince(ArTime since) const + { + return mSecSince(since)/1000; + } + /// Gets the number of seconds since the given timestamp to this one + long long secSinceLL(ArTime since) const + { + return mSecSinceLL(since)/1000; + } + /// Finds the number of millisecs from when this timestamp is set to to now (the inverse of mSecSince()) + long mSecTo(void) const + { + ArTime now; + now.setToNow(); + return -mSecSince(now); + } + /// Finds the number of millisecs from when this timestamp is set to to now (the inverse of mSecSince()) + long long mSecToLL(void) const + { + ArTime now; + now.setToNow(); + return -mSecSinceLL(now); + } + /// Finds the number of seconds from when this timestamp is set to to now (the inverse of secSince()) + long secTo(void) const + { + return mSecTo()/1000; + } + /// Finds the number of seconds from when this timestamp is set to to now (the inverse of secSince()) + long long secToLL(void) const + { + return mSecToLL()/1000; + } + /// Finds the number of milliseconds from this timestamp to now + long mSecSince(void) const + { + ArTime now; + now.setToNow(); + return mSecSince(now); + } + /// Finds the number of milliseconds from this timestamp to now + long long mSecSinceLL(void) const + { + ArTime now; + now.setToNow(); + return mSecSinceLL(now); + } + /// Finds the number of seconds from when this timestamp was set to now + long secSince(void) const + { + return mSecSince()/1000; + } + /// Finds the number of seconds from when this timestamp was set to now + long long secSinceLL(void) const + { + return mSecSinceLL()/1000; + } + /// returns whether the given time is before this one or not + bool isBefore(ArTime testTime) const + { + if (mSecSince(testTime) < 0) + return true; + else + return false; + } + /// returns whether the given time is equal to this time or not + bool isAt(ArTime testTime) const + { + if (mSecSince(testTime) == 0) + return true; + else + return false; + } + /// returns whether the given time is after this one or not + bool isAfter(ArTime testTime) const + { + if (mSecSince(testTime) > 0) + return true; + else + return false; + } + /// Resets the time + AREXPORT void setToNow(void); + /// Add some milliseconds (can be negative) to this time + bool addMSec(long ms) + { + //unsigned long timeThis; + long long timeThis; + timeThis = mySec * 1000 + myMSec; + //if (ms < 0 && (unsigned)abs(ms) > timeThis) + if (ms < 0 && -ms > timeThis) + { + ArLog::log(ArLog::Terse, "ArTime::addMSec: tried to subtract too many milliseconds, would result in a negative time."); + mySec = 0; + myMSec = 0; + return false; + } + else + { + timeThis += ms; + mySec = timeThis / 1000; + myMSec = timeThis % 1000; + } + return true; + } // end method addMSec + + /// Add some milliseconds (can be negative) to this time + bool addMSecLL(long long ms) + { + //unsigned long timeThis; + long long timeThis; + timeThis = mySec * 1000 + myMSec; + //if (ms < 0 && (unsigned)abs(ms) > timeThis) + if (ms < 0 && -ms > timeThis) + { + ArLog::log(ArLog::Terse, "ArTime::addMSec: tried to subtract too many milliseconds, would result in a negative time."); + mySec = 0; + myMSec = 0; + return false; + } + else + { + timeThis += ms; + mySec = timeThis / 1000; + myMSec = timeThis % 1000; + } + return true; + } // end method addMSec + + + /// Sets the seconds value (since the arbitrary starting time) + void setSec(unsigned long sec) { mySec = sec; } + /// Sets the milliseconds value (occuring after the seconds value) + void setMSec(unsigned long msec) { myMSec = msec; } + /// Gets the seconds value (since the arbitrary starting time) + unsigned long getSec(void) const { return mySec; } + /// Gets the milliseconds value (occuring after the seconds value) + unsigned long getMSec(void) const { return myMSec; } + + /// Sets the seconds value (since the arbitrary starting time) + void setSecLL(unsigned long long sec) { mySec = sec; } + /// Sets the milliseconds value (occuring after the seconds value) + void setMSecLL(unsigned long long msec) { myMSec = msec; } + /// Gets the seconds value (since the arbitrary starting time) + unsigned long long getSecLL(void) const { return mySec; } + /// Gets the milliseconds value (occuring after the seconds value) + unsigned long long getMSecLL(void) const { return myMSec; } + /// Logs the time + void log(const char *prefix = NULL) const + { ArLog::log(ArLog::Terse, + "%sTime: %lld.%lld", + ((prefix != NULL) ? prefix : ""), + mySec, + myMSec); } + /// Gets if we're using a monotonic (ever increasing) clock + static bool usingMonotonicClock() + { +#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) + return ourMonotonicClock; +#endif +#ifdef WIN32 + return true; +#endif + return false; + } + + /// Equality operator (for sets) + bool operator==(const ArTime& other) const + { + return isAt(other); + } + + bool operator!=(const ArTime& other) const + { + return (!isAt(other)); + } + + // Less than operator for sets + bool operator<(const ArTime& other) const + { + return isBefore(other); + } // end operator < + +protected: + unsigned long long mySec; + unsigned long long myMSec; +#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) + static bool ourMonotonicClock; +#endif + +}; // end class ArTime + + + + +/// A subclass of ArPose that also stores a timestamp (ArTime) +/** + @ingroup UtilityClasses + */ +class ArPoseWithTime : public ArPose +{ +public: + ArPoseWithTime(double x = 0, double y = 0, double th = 0, + ArTime thisTime = ArTime()) : ArPose(x, y, th) + { myTime = thisTime; } + /// Copy Constructor + ArPoseWithTime(const ArPose &pose) : ArPose(pose) {} + virtual ~ArPoseWithTime() {} + void setTime(ArTime newTime) { myTime = newTime; } + void setTimeToNow(void) { myTime.setToNow(); } + ArTime getTime(void) const { return myTime; } +protected: + ArTime myTime; +}; + +/// A class for keeping track of if a complete revolution has been attained +/** + This class can be used to keep track of if a complete revolution has been + done, it is used by doing doing a clearQuadrants when you want to stat + the revolution. Then at each point doing an updateQuadrant with the current + heading of the robot. When didAllQuadrants returns true, then all the + quadrants have been done. + @ingroup UtilityClasses +*/ +class ArSectors +{ +public: + /// Constructor + ArSectors(int numSectors = 8) + { + mySectorSize = 360/numSectors; + mySectors = new int[numSectors]; + myNumSectors = numSectors; + clear(); + } + /// Destructor + virtual ~ArSectors() { delete mySectors; } + /// Clears all quadrants + void clear(void) + { + int i; + for (i = 0; i < myNumSectors; i++) + mySectors[i] = false; + } + /// Updates the appropriate quadrant for the given angle + void update(double angle) + { + int angleInt; + angleInt = ArMath::roundInt(ArMath::fixAngle(angle) + 180); + mySectors[angleInt / mySectorSize] = true; + } + /// Returns true if the all of the quadrants have been gone through + bool didAll(void) const + { + int i; + for (i = 0; i < myNumSectors; i++) + if (mySectors[i] == false) + return false; + return true; + } +protected: + int *mySectors; + int myNumSectors; + int mySectorSize; +}; + + + + +/// Represents geometry of a line in two-dimensional space. +/** + Note this the theoretical line, i.e. it goes infinitely. + For a line segment with endpoints, use ArLineSegment. + @sa ArLineSegment + @ingroup UtilityClasses +**/ +class ArLine +{ +public: + ///// Empty constructor + ArLine() {} + /// Constructor with parameters + ArLine(double a, double b, double c) { newParameters(a, b, c); } + /// Constructor with endpoints + ArLine(double x1, double y1, double x2, double y2) + { newParametersFromEndpoints(x1, y1, x2, y2); } + /// Destructor + virtual ~ArLine() {} + /// Sets the line parameters (make it not a segment) + void newParameters(double a, double b, double c) + { myA = a; myB = b; myC = c; } + /// Sets the line parameters from endpoints, but makes it not a segment + void newParametersFromEndpoints(double x1, double y1, double x2, double y2) + { myA = y1 - y2; myB = x2 - x1; myC = (y2 *x1) - (x2 * y1); } + /// Gets the A line parameter + double getA(void) const { return myA; } + /// Gets the B line parameter + double getB(void) const { return myB; } + /// Gets the C line parameter + double getC(void) const { return myC; } + /// finds the intersection of this line with another line + /** + @param line the line to check if it intersects with this line + @param pose if the lines intersect, the pose is set to the location + @return true if they intersect, false if they do not + **/ + bool intersects(const ArLine *line, ArPose *pose) const + { + double x, y; + double n; + n = (line->getB() * getA()) - (line->getA() * getB()); + // if this is 0 the lines are parallel + if (fabs(n) < .0000000000001) + { + return false; + } + // they weren't parallel so see where the intersection is + x = ((line->getC() * getB()) - (line->getB() * getC())) / n; + y = ((getC() * line->getA()) - (getA() * line->getC())) / n; + pose->setPose(x, y); + return true; + } + /// Makes the given line perpendicular to this one through the given pose + void makeLinePerp(const ArPose *pose, ArLine *line) const + { + line->newParameters(getB(), -getA(), + (getA() * pose->getY()) - (getB() * pose->getX())); + } + /// Calculate the distance from the given point to (its projection on) this line segment + /** + @param pose the the pose to find the perp point of + + @return if the pose does not intersect line it will return < 0 + if the pose intersects the segment it will return the distance to + the intersection + **/ + virtual double getPerpDist(const ArPose &pose) const + { + ArPose perpPose; + ArLine perpLine; + makeLinePerp(&pose, &perpLine); + if (!intersects(&perpLine, &perpPose)) + return -1; + return (perpPose.findDistanceTo(pose)); + } + /// Calculate the squared distance from the given point to (its projection on) this line segment + /** + @param pose the the pose to find the perp point of + + @return if the pose does not intersect line it will return < 0 + if the pose intersects the segment it will return the distance to + the intersection + **/ + virtual double getPerpSquaredDist(const ArPose &pose) const + { + ArPose perpPose; + ArLine perpLine; + makeLinePerp(&pose, &perpLine); + if (!intersects(&perpLine, &perpPose)) + return -1; + return (perpPose.squaredFindDistanceTo(pose)); + } + /// Determine the intersection point between this line segment, and a perpendicular line passing through the given pose (i.e. projects the given pose onto this line segment.) + /** + * If there is no intersection, false is returned. + @param pose The X and Y components of this pose object indicate the point to project onto this line segment. + @param perpPoint The X and Y components of this pose object are set to indicate the intersection point + @return true if an intersection was found and perpPoint was modified, false otherwise. + @swigomit + **/ + bool getPerpPoint(const ArPose &pose, ArPose *perpPoint) const + { + ArLine perpLine; + makeLinePerp(&pose, &perpLine); + return intersects(&perpLine, perpPoint); + } + + /// Equality operator + virtual bool operator==(const ArLine &other) const + { + + return ((fabs(myA - other.myA) <= ArMath::epsilon()) && + (fabs(myB - other.myB) <= ArMath::epsilon()) && + (fabs(myC - other.myC) <= ArMath::epsilon())); + } + /// Inequality operator + virtual bool operator!=(const ArLine &other) const + { + return ((fabs(myA - other.myA) > ArMath::epsilon()) || + (fabs(myB - other.myB) > ArMath::epsilon()) || + (fabs(myC - other.myC) > ArMath::epsilon())); + + } + +protected: + double myA, myB, myC; +}; + +/// Represents a line segment in two-dimensional space. +/** The segment is defined by the coordinates of each endpoint. + @ingroup UtilityClasses +*/ +class ArLineSegment +{ +public: +#ifndef SWIG + /** @swigomit */ + ArLineSegment() {} + /** @brief Constructor with endpoints + * @swigomit + */ + ArLineSegment(double x1, double y1, double x2, double y2) + { newEndPoints(x1, y1, x2, y2); } +#endif // SWIG + /// Constructor with endpoints as ArPose objects. Only X and Y components of the poses will be used. + ArLineSegment(ArPose pose1, ArPose pose2) + { newEndPoints(pose1.getX(), pose1.getY(), pose2.getX(), pose2.getY()); } + virtual ~ArLineSegment() {} + /// Set new end points for this line segment + void newEndPoints(double x1, double y1, double x2, double y2) + { + myX1 = x1; myY1 = y1; myX2 = x2; myY2 = y2; + myLine.newParametersFromEndpoints(myX1, myY1, myX2, myY2); + } + /// Set new end points for this line segment + void newEndPoints(const ArPose& pt1, const ArPose& pt2) + { + newEndPoints(pt1.getX(), pt1.getY(), pt2.getX(), pt2.getY()); + } + /// Get the first endpoint (X1, Y1) + ArPose getEndPoint1(void) const { return ArPose(myX1, myY1); } + /// Get the second endpoint of (X2, Y2) + ArPose getEndPoint2(void) const { return ArPose(myX2, myY2); } + /// Determine where a line intersects this line segment + /** + @param line Line to check for intersection against this line segment. + @param pose if the lines intersect, the X and Y components of this pose are set to the point of intersection. + @return true if they intersect, false if they do not + **/ + bool intersects(const ArLine *line, ArPose *pose) const + { + ArPose intersection; + // see if it intersects, then make sure its in the coords of this line + if (myLine.intersects(line, &intersection) && + linePointIsInSegment(&intersection)) + { + pose->setPose(intersection); + return true; + } + else + return false; + } + + /** @copydoc intersects(const ArLine *line, ArPose *pose) const */ + bool intersects(ArLineSegment *line, ArPose *pose) const + { + ArPose intersection; + // see if it intersects, then make sure its in the coords of this line + if (myLine.intersects(line->getLine(), &intersection) && + linePointIsInSegment(&intersection) && + line->linePointIsInSegment(&intersection)) + { + pose->setPose(intersection); + return true; + } + else + return false; + } +#ifndef SWIG + /// Determine the intersection point between this line segment, and a perpendicular line passing through the given pose (i.e. projects the given pose onto this line segment.) + /** + * If there is no intersection, false is returned. + @param pose The X and Y components of this pose object indicate the point to project onto this line segment. + @param perpPoint The X and Y components of this pose object are set to indicate the intersection point + @return true if an intersection was found and perpPoint was modified, false otherwise. + @swigomit + **/ + bool getPerpPoint(const ArPose &pose, ArPose *perpPoint) const + { + ArLine perpLine; + myLine.makeLinePerp(&pose, &perpLine); + return intersects(&perpLine, perpPoint); + } +#endif + /** @copydoc getPerpPoint(const ArPose&, ArPose*) + * (This version simply allows you to pass the first pose as a pointer, in + * time-critical situations where a full copy of the object would impact + * performance.) + */ + bool getPerpPoint(const ArPose *pose, ArPose *perpPoint) const + { + ArLine perpLine; + myLine.makeLinePerp(pose, &perpLine); + return intersects(&perpLine, perpPoint); + } + /// Calculate the distance from the given point to (its projection on) this line segment + /** + @param pose the the pose to find the perp point of + + @return if the pose does not intersect segment it will return < 0 + if the pose intersects the segment it will return the distance to + the intersection + **/ + virtual double getPerpDist(const ArPose &pose) const + { + ArPose perpPose; + ArLine perpLine; + myLine.makeLinePerp(&pose, &perpLine); + if (!intersects(&perpLine, &perpPose)) + return -1; + return (perpPose.findDistanceTo(pose)); + } + /// Calculate the squared distance from the given point to (its projection on) this line segment + /** + @param pose the the pose to find the perp point of + + @return if the pose does not intersect segment it will return < 0 + if the pose intersects the segment it will return the distance to + the intersection + **/ + virtual double getPerpSquaredDist(const ArPose &pose) const + { + ArPose perpPose; + ArLine perpLine; + myLine.makeLinePerp(&pose, &perpLine); + if (!intersects(&perpLine, &perpPose)) + return -1; + return (perpPose.squaredFindDistanceTo(pose)); + } + + /// Gets the distance from this line segment to a point. + /** + * If the point can be projected onto this line segment (i.e. a + * perpendicular line can be drawn through the point), then + * return that distance. Otherwise, return the distance to the closest + * endpoint. + @param pose the pointer of the pose to find the distance to + **/ + double getDistToLine(const ArPose &pose) const + { + ArPose perpPose; + ArLine perpLine; + myLine.makeLinePerp(&pose, &perpLine); + if (!intersects(&perpLine, &perpPose)) + { + return ArUtil::findMin( + ArMath::roundInt(getEndPoint1().findDistanceTo(pose)), + ArMath::roundInt(getEndPoint2().findDistanceTo(pose))); + } + return (perpPose.findDistanceTo(pose)); + } + + /// Determines the length of the line segment + double getLengthOf() const + { + return ArMath::distanceBetween(myX1, myY1, myX2, myY2); + } + + /// Determines the mid point of the line segment + ArPose getMidPoint() const + { + return ArPose(((myX1 + myX2) / 2.0), + ((myY1 + myY2) / 2.0)); + } + + + /// Gets the x coordinate of the first endpoint + double getX1(void) const { return myX1; } + /// Gets the y coordinate of the first endpoint + double getY1(void) const { return myY1; } + /// Gets the x coordinate of the second endpoint + double getX2(void) const { return myX2; } + /// Gets the y coordinate of the second endpoint + double getY2(void) const { return myY2; } + /// Gets the A line parameter (see ArLine) + double getA(void) const { return myLine.getA(); } + /// Gets the B line parameter (see ArLine) + double getB(void) const { return myLine.getB(); } + /// Gets the C line parameter (see ArLine) + double getC(void) const { return myLine.getC(); } + + /// Internal function for seeing if a point on our line is within our segment + bool linePointIsInSegment(ArPose *pose) const + { + bool isVertical = (ArMath::fabs(myX1 - myX2) < ArMath::epsilon()); + bool isHorizontal = (ArMath::fabs(myY1 - myY2) < ArMath::epsilon()); + + if (!isVertical || !isHorizontal) { + + return (((isVertical) || + (pose->getX() >= myX1 && pose->getX() <= myX2) || + (pose->getX() <= myX1 && pose->getX() >= myX2)) && + ((isHorizontal) || + (pose->getY() >= myY1 && pose->getY() <= myY2) || + (pose->getY() <= myY1 && pose->getY() >= myY2))); + } + else { // single point segment + + return ((ArMath::fabs(myX1 - pose->getX()) < ArMath::epsilon()) && + (ArMath::fabs(myY1 - pose->getY()) < ArMath::epsilon())); + + } // end else single point segment + } + + const ArLine *getLine(void) const { return &myLine; } + + /// Equality operator (for sets) + virtual bool operator==(const ArLineSegment& other) const + { + + return ((fabs(myX1 - other.myX1) < ArMath::epsilon()) && + (fabs(myY1 - other.myY1) < ArMath::epsilon()) && + (fabs(myX2 - other.myX2) < ArMath::epsilon()) && + (fabs(myY2 - other.myY2) < ArMath::epsilon())); + } + + virtual bool operator!=(const ArLineSegment& other) const + { + return ((fabs(myX1 - other.myX1) > ArMath::epsilon()) || + (fabs(myY1 - other.myY1) > ArMath::epsilon()) || + (fabs(myX2 - other.myX2) > ArMath::epsilon()) || + (fabs(myY2 - other.myY2) > ArMath::epsilon())); + + } + + /// Less than operator (for sets) + virtual bool operator<(const ArLineSegment& other) const + { + + if (fabs(myX1 - other.myX1) > ArMath::epsilon()) { + return myX1 < other.myX1; + } + else if (fabs(myY1 - other.myY1) > ArMath::epsilon()) { + return myY1 < other.myY1; + } + if (fabs(myX2 - other.myX2) > ArMath::epsilon()) { + return myX2 < other.myX2; + } + else if (fabs(myY2 - other.myY2) > ArMath::epsilon()) { + return myY2 < other.myY2; + } + // Otherwise... all coords are equal + return false; + } + +protected: + double myX1, myY1, myX2, myY2; + ArLine myLine; +}; + +/** + @brief Use for computing a running average of a number of elements + @ingroup UtilityClasses +*/ +class ArRunningAverage +{ +public: + /// Constructor, give it the number of elements to store to compute the average + AREXPORT ArRunningAverage(size_t numToAverage); + /// Destructor + AREXPORT ~ArRunningAverage(); + /// Gets the average + AREXPORT double getAverage(void) const; + /// Adds a value to the average. An old value is discarded if the number of elements to average has been reached. + AREXPORT void add(double val); + /// Clears the average + AREXPORT void clear(void); + /// Gets the number of elements + AREXPORT size_t getNumToAverage(void) const; + /// Sets the number of elements + AREXPORT void setNumToAverage(size_t numToAverage); + /// Sets if this is using a the root mean square average or just the normal average + AREXPORT void setUseRootMeanSquare(bool useRootMeanSquare); + /// Gets if this is using a the root mean square average or just the normal average + AREXPORT bool getUseRootMeanSquare(void); + /// Gets the number of values currently averaged so far + AREXPORT size_t getCurrentNumAveraged(void); +protected: + size_t myNumToAverage; + double myTotal; + size_t myNum; + bool myUseRootMeanSquare; + std::list myVals; +}; + +/// This is a class for computing a root mean square average of a number of elements +/// @ingroup UtilityClasses +class ArRootMeanSquareCalculator +{ +public: + /// Constructor + AREXPORT ArRootMeanSquareCalculator(); + /// Destructor + AREXPORT ~ArRootMeanSquareCalculator(); + /// Gets the average + AREXPORT double getRootMeanSquare (void) const; + /// Adds a number + AREXPORT void add(int val); + /// Clears the average + AREXPORT void clear(void); + /// Sets the name + AREXPORT void setName(const char *name); + /// Gets the name + AREXPORT const char *getName(void); + /// Gets the num averaged + AREXPORT size_t getCurrentNumAveraged(void); +protected: + long long myTotal; + size_t myNum; + std::string myName; +}; + + +//class ArStrCaseCmpOp : public std::binary_function +/// strcasecmp for sets +/// @ingroup UtilityClasses +struct ArStrCaseCmpOp +{ +public: + bool operator() (const std::string &s1, const std::string &s2) const + { + return strcasecmp(s1.c_str(), s2.c_str()) < 0; + } +}; + +/// ArPose less than comparison for sets +/// @ingroup UtilityClasses +struct ArPoseCmpOp +{ +public: + bool operator() (const ArPose &pose1, const ArPose &pose2) const + { + return (pose1 < pose2); + + //return (pose1.getX() < pose2.getX() || pose1.getY() < pose2.getY() || + // pose1.getTh() < pose2.getTh()); + } +}; + +/// ArLineSegment less than comparison for sets +/// @ingroup UtilityClasses +struct ArLineSegmentCmpOp +{ +public: + bool operator() (const ArLineSegment &line1, + const ArLineSegment &line2) const + { + return (line1 < line2); + + //return (line1.getX1() < line2.getX1() || line1.getY1() < line2.getY1() || + // line1.getX2() < line2.getX2() || line1.getY2() < line2.getY2()); + } +}; + + +#if !defined(WIN32) && !defined(SWIG) +/** @brief Switch to running the program as a background daemon (i.e. fork) (Only available in Linux) + @swigomit + @notwindows + @ingroup UtilityClasses + @ingroup OptionalClasses + */ +class ArDaemonizer +{ +public: + /// Constructor that sets up for daemonizing if arg checking + AREXPORT ArDaemonizer(int *argc, char **argv, bool closeStdErrAndStdOut); + /// Destructor + AREXPORT ~ArDaemonizer(); + /// Daemonizes if asked too by arguments + AREXPORT bool daemonize(void); + /// Daemonizes always + AREXPORT bool forceDaemonize(void); + /// Logs the options + AREXPORT void logOptions(void) const; + /// Returns if we're daemonized or not + bool isDaemonized(void) { return myIsDaemonized; } +protected: + ArArgumentParser myParser; + bool myIsDaemonized; + bool myCloseStdErrAndStdOut; + ArConstFunctorC myLogOptionsCB; +}; +#endif // !win32 && !swig + + + +/// Contains enumeration of four user-oriented priority levels (used primarily by ArConfig) +class ArPriority +{ +public: + enum Priority + { + IMPORTANT, ///< Basic things that should be modified to suit + BASIC = IMPORTANT, ///< Basic things that should be modified to suit + FIRST_PRIORITY = IMPORTANT, + + NORMAL, ///< Intermediate things that users may want to modify + INTERMEDIATE = NORMAL, ///< Intermediate things that users may want to modify + + DETAILED, ///< Advanced items that probably shouldn't be modified + TRIVIAL = DETAILED, ///< Advanced items (alias for historic reasons) + ADVANCED = DETAILED, ///< Advanced items that probably shouldn't be modified + + EXPERT, ///< Items that should be modified only by expert users or developers + FACTORY, ///< Items that should be modified at the factory, often apply to a robot model + + CALIBRATION, ///< Items that apply to a particular hardware instance + + LAST_PRIORITY = CALIBRATION ///< Last value in the enumeration + }; + + enum { + PRIORITY_COUNT = LAST_PRIORITY + 1 ///< Number of priority values + }; + + /// Returns the displayable text string for the given priority + AREXPORT static const char * getPriorityName(Priority priority); + + /// Returns the priority value that corresponds to the given displayable text string + AREXPORT static Priority getPriorityFromName(const char *text); + +protected: + + /// Whether the map of priorities to display text has been initialized + static bool ourStringsInited; + /// Map of priorities to displayable text + static std::map ourPriorityNames; + /// Map of displayable text to priorities + static std::map ourNameToPriorityMap; + + /// Display text used when a priority's displayable text has not been defined + static std::string ourUnknownPriorityName; +}; + +/// holds information about ArStringInfo component strings (it's a helper class for other things) +/** + This class holds information for about different strings that are available + **/ +class ArStringInfoHolder +{ +public: + /// Constructor + ArStringInfoHolder(const char *name, ArTypes::UByte2 maxLength, + ArFunctor2 *functor) + { myName = name; myMaxLength = maxLength; myFunctor = functor; } + /// Destructor + virtual ~ArStringInfoHolder() {} + /// Gets the name of this piece of info + const char *getName(void) { return myName.c_str(); } + /// Gets the maximum length of this piece of info + ArTypes::UByte2 getMaxLength(void) { return myMaxLength; } + /// Gets the function that will fill in this piece of info + ArFunctor2 *getFunctor(void) { return myFunctor; } +protected: + std::string myName; + ArTypes::UByte2 myMaxLength; + ArFunctor2 *myFunctor; +}; + +/// This class just holds some helper functions for the ArStringInfoHolder +class ArStringInfoHolderFunctions +{ +public: + static void intWrapper(char * buffer, ArTypes::UByte2 bufferLen, + ArRetFunctor *functor, const char *format) + { snprintf(buffer, bufferLen - 1, format, functor->invokeR()); + buffer[bufferLen-1] = '\0'; } + static void doubleWrapper(char * buffer, ArTypes::UByte2 bufferLen, + ArRetFunctor *functor, const char *format) + { snprintf(buffer, bufferLen - 1, format, functor->invokeR()); + buffer[bufferLen-1] = '\0'; } + static void boolWrapper(char * buffer, ArTypes::UByte2 bufferLen, + ArRetFunctor *functor, const char *format) + { snprintf(buffer, bufferLen - 1, format, + ArUtil::convertBool(functor->invokeR())); + buffer[bufferLen-1] = '\0'; } + static void stringWrapper(char * buffer, ArTypes::UByte2 bufferLen, + ArRetFunctor *functor, + const char *format) + { snprintf(buffer, bufferLen - 1, format, functor->invokeR()); + buffer[bufferLen-1] = '\0'; } + static void unsignedLongWrapper(char * buffer, ArTypes::UByte2 bufferLen, + ArRetFunctor *functor, const char *format) + { snprintf(buffer, bufferLen - 1, format, functor->invokeR()); + buffer[bufferLen-1] = '\0'; } + static void longWrapper(char * buffer, ArTypes::UByte2 bufferLen, + ArRetFunctor *functor, const char *format) + { snprintf(buffer, bufferLen - 1, format, functor->invokeR()); + buffer[bufferLen-1] = '\0'; } +}; + +/** A class to hold a list of callbacks to call + GenericFunctor must be a pointer to an ArFunctor or subclass. + e.g. declare like this: + @code + ArGenericCallbackList< ArFunctorC * > callbackList; + @endcode + then invoke it like this: + @code + callbackList.invoke(); + @endcode + To pass an argument to the callbacks, use ArCallbackList1 instead. + @ingroup UtilityClasses +**/ + +template +class ArGenericCallbackList +{ +public: + /// Constructor + ArGenericCallbackList(const char *name = "", + ArLog::LogLevel logLevel = ArLog::Verbose, + bool singleShot = false) + { + myName = name; + mySingleShot = singleShot; + setLogLevel(logLevel); + std::string mutexName; + mutexName = "ArGenericCallbackList::"; + mutexName += name; + mutexName += "::myDataMutex"; + myDataMutex.setLogName(mutexName.c_str()); + myLogging = true; + } + /// Destructor + virtual ~ArGenericCallbackList() + { + } + /// Adds a callback + void addCallback(GenericFunctor functor, int position = 50) + { + myDataMutex.lock(); + myList.insert( + std::pair(-position, + functor)); + myDataMutex.unlock(); + } + /// Removes a callback + void remCallback(GenericFunctor functor) + { + myDataMutex.lock(); + typename std::multimap::iterator it; + + for (it = myList.begin(); it != myList.end(); it++) + { + if ((*it).second == functor) + { + myList.erase(it); + myDataMutex.unlock(); + remCallback(functor); + return; + } + } + myDataMutex.unlock(); + } + /// Sets the name + void setName(const char *name) + { + myDataMutex.lock(); + myName = name; + myDataMutex.unlock(); + } +#ifndef SWIG + /// Sets the name with formatting + /** @swigomit use setName() */ + void setNameVar(const char *name, ...) + { + char arg[2048]; + va_list ptr; + va_start(ptr, name); + vsnprintf(arg, sizeof(arg), name, ptr); + arg[sizeof(arg) - 1] = '\0'; + va_end(ptr); + return setName(arg); + } +#endif + /// Sets the log level + void setLogLevel(ArLog::LogLevel logLevel) + { + myDataMutex.lock(); + myLogLevel = logLevel; + myDataMutex.unlock(); + } + /// Sets if its single shot + void setSingleShot(bool singleShot) + { + myDataMutex.lock(); + mySingleShot = singleShot; + myDataMutex.unlock(); + } + /// Enable or disable logging when invoking the list. Logging is enabled by default at the log level given in the constructor. + void setLogging(bool on) { + myLogging = on; + } +protected: + ArMutex myDataMutex; + ArLog::LogLevel myLogLevel; + std::string myName; + std::multimap myList; + bool mySingleShot; + bool myLogging; +}; + +/** A class to hold a list of callbacks to call sequentially. + @ingroup UtilityClasses +*/ +class ArCallbackList : public ArGenericCallbackList +{ +public: + /// Constructor + ArCallbackList(const char *name = "", + ArLog::LogLevel logLevel = ArLog::Verbose, + bool singleShot = false) : + ArGenericCallbackList(name, logLevel, singleShot) + { + } + /// Destructor + virtual ~ArCallbackList() + { + } + /// Calls the callback list + void invoke(void) + { + myDataMutex.lock(); + + std::multimap::iterator it; + ArFunctor *functor; + + if(myLogging) + ArLog::log(myLogLevel, "%s: Starting calls", myName.c_str()); + + for (it = myList.begin(); + it != myList.end(); + it++) + { + functor = (*it).second; + if (functor == NULL) + continue; + + if(myLogging) + { + if (functor->getName() != NULL && functor->getName()[0] != '\0') + ArLog::log(myLogLevel, "%s: Calling functor '%s' at %d", + myName.c_str(), functor->getName(), -(*it).first); + else + ArLog::log(myLogLevel, "%s: Calling unnamed functor at %d", + myName.c_str(), -(*it).first); + } + functor->invoke(); + } + + if(myLogging) + ArLog::log(myLogLevel, "%s: Ended calls", myName.c_str()); + + if (mySingleShot) + { + if(myLogging) + ArLog::log(myLogLevel, "%s: Clearing callbacks", myName.c_str()); + myList.clear(); + } + myDataMutex.unlock(); + } +protected: +}; + +/** A class to hold a list of callbacks to call with an argument of type P1 + The functors added to the list must be pointers to a subclass of ArFunctor1. + Declare like this: + @code + ArCallbackList1 callbackList; + @endcode + then add a functor like this: + @code + ArFunctor1C func; + ... + callbackList.addCallback(&func); + @endcode + then invoke it like this: + @code + callbackList.invoke(23); + @endcode + @ingroup UtilityClasses +**/ +template +class ArCallbackList1 : public ArGenericCallbackList *> +{ +public: + /// Constructor + ArCallbackList1(const char *name = "", + ArLog::LogLevel logLevel = ArLog::Verbose, + bool singleShot = false) : + ArGenericCallbackList *>(name, logLevel, singleShot) + { + } + /// Destructor + virtual ~ArCallbackList1() + { + } + /// Calls the callback list + void invoke(P1 p1) + { + ArGenericCallbackList *>::myDataMutex.lock(); + + typename std::multimap *>::iterator it; + ArFunctor1 *functor; + + if(ArGenericCallbackList *>::myLogging) + ArLog::log( + ArGenericCallbackList *>::myLogLevel, + "%s: Starting calls1", + ArGenericCallbackList *>::myName.c_str()); + + for (it = ArGenericCallbackList *>::myList.begin(); + it != ArGenericCallbackList *>::myList.end(); + it++) + { + functor = (*it).second; + if (functor == NULL) + continue; + + if(ArGenericCallbackList *>::myLogging) + { + if (functor->getName() != NULL && functor->getName()[0] != '\0') + ArLog::log(ArGenericCallbackList *>::myLogLevel, + "%s: Calling functor '%s' at %d", + ArGenericCallbackList *>::myName.c_str(), + functor->getName(), -(*it).first); + else + ArLog::log(ArGenericCallbackList *>::myLogLevel, + "%s: Calling unnamed functor at %d", + ArGenericCallbackList *>::myName.c_str(), + -(*it).first); + } + functor->invoke(p1); + } + + if(ArGenericCallbackList *>::myLogging) + ArLog::log(ArGenericCallbackList *>::myLogLevel, "%s: Ended calls", ArGenericCallbackList *>::myName.c_str()); + + if (ArGenericCallbackList *>::mySingleShot) + { + if(ArGenericCallbackList *>::myLogging) + ArLog::log(ArGenericCallbackList *>::myLogLevel, + "%s: Clearing callbacks", + ArGenericCallbackList *>::myName.c_str()); + ArGenericCallbackList *>::myList.clear(); + } + ArGenericCallbackList *>::myDataMutex.unlock(); + } +protected: +}; + +#ifndef ARINTERFACE +#ifndef SWIG +/// @internal +class ArLaserCreatorHelper +{ +public: + /// Creates an ArLMS2xx + static ArLaser *createLMS2xx(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArLMS2xx + static ArRetFunctor2 *getCreateLMS2xxCB(void); + /// Creates an ArUrg + static ArLaser *createUrg(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArUrg + static ArRetFunctor2 *getCreateUrgCB(void); + /// Creates an ArLMS1XX + static ArLaser *createLMS1XX(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArLMS1XX + static ArRetFunctor2 *getCreateLMS1XXCB(void); + /// Creates an ArUrg using SCIP 2.0 + static ArLaser *createUrg_2_0(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArUrg + static ArRetFunctor2 *getCreateUrg_2_0CB(void); + /// Creates an ArS3Series + static ArLaser *createS3Series(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArS3Series + static ArRetFunctor2 *getCreateS3SeriesCB(void); + /// Creates an ArLMS5XX + static ArLaser *createLMS5XX(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArLMS5XX + static ArRetFunctor2 *getCreateLMS5XXCB(void); + /// Creates an ArTiM3XX + static ArLaser *createTiM3XX(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArTiM3XX + static ArRetFunctor2 *getCreateTiM3XXCB(void); + /// Creates an ArSZSeries + static ArLaser *createSZSeries(int laserNumber, const char *logPrefix); + /// Gets functor for creating an ArSZSeries + static ArRetFunctor2 *getCreateSZSeriesCB(void); + +protected: + static ArGlobalRetFunctor2 ourLMS2xxCB; + static ArGlobalRetFunctor2 ourUrgCB; + static ArGlobalRetFunctor2 ourLMS1XXCB; + static ArGlobalRetFunctor2 ourUrg_2_0CB; + static ArGlobalRetFunctor2 ourS3SeriesCB; + static ArGlobalRetFunctor2 ourLMS5XXCB; + static ArGlobalRetFunctor2 ourTiM3XXCB; + static ArGlobalRetFunctor2 ourSZSeriesCB; +}; + +/// @internal +class ArBatteryMTXCreatorHelper +{ +public: + /// Creates an ArBatteryMTX + static ArBatteryMTX *createBatteryMTX(int batteryNumber, const char *logPrefix); + /// Gets functor for creating an ArBatteryMTX + static ArRetFunctor2 *getCreateBatteryMTXCB(void); + +protected: + static ArGlobalRetFunctor2 ourBatteryMTXCB; +}; + +/// @internal +class ArLCDMTXCreatorHelper +{ +public: + /// Creates an ArLCDMTX + static ArLCDMTX *createLCDMTX(int lcdNumber, const char *logPrefix); + /// Gets functor for creating an ArLCDMTX + static ArRetFunctor2 *getCreateLCDMTXCB(void); + +protected: + static ArGlobalRetFunctor2 ourLCDMTXCB; +}; + +/// @internal +class ArSonarMTXCreatorHelper +{ +public: + /// Creates an ArSonarMTX + static ArSonarMTX *createSonarMTX(int sonarNumber, const char *logPrefix); + /// Gets functor for creating an ArSonarMTX + static ArRetFunctor2 *getCreateSonarMTXCB(void); + +protected: + static ArGlobalRetFunctor2 ourSonarMTXCB; +}; + +#endif // SWIG +#endif // ARINTERFACE + +#ifndef SWIG +/// @internal +class ArDeviceConnectionCreatorHelper +{ +public: + /// Creates an ArSerialConnection + static ArDeviceConnection *createSerialConnection( + const char *port, const char *defaultInfo, const char *logPrefix); + /// Gets functor for creating an ArSerialConnection + static ArRetFunctor3 *getCreateSerialCB(void); + + /// Creates an ArTcpConnection + static ArDeviceConnection *createTcpConnection( + const char *port, const char *defaultInfo, const char *logPrefix); + /// Gets functor for creating an ArTcpConnection + static ArRetFunctor3 *getCreateTcpCB(void); + + /// Creates an ArSerialConnection for RS422 + static ArDeviceConnection *createSerial422Connection( + const char *port, const char *defaultInfo, const char *logPrefix); + /// Gets functor for creating an ArSerialConnection + static ArRetFunctor3 *getCreateSerial422CB(void); + + /// Sets the success log level + static void setSuccessLogLevel(ArLog::LogLevel successLogLevel); + /// Sets the success log level + static ArLog::LogLevel setSuccessLogLevel(void); +protected: + /// Internal Create ArSerialConnection + static ArDeviceConnection *internalCreateSerialConnection( + const char *port, const char *defaultInfo, const char *logPrefix, bool is422); + static ArGlobalRetFunctor3 ourSerialCB; + static ArGlobalRetFunctor3 ourTcpCB; + static ArGlobalRetFunctor3 ourSerial422CB; + static ArLog::LogLevel ourSuccessLogLevel; +}; +#endif // SWIG + +/// Class for finding robot bounds from the basic measurements +class ArPoseUtil +{ +public: + static std::list findCornersFromRobotBounds( + double radius, double widthLeft, double widthRight, + double lengthFront, double lengthRear, bool fastButUnsafe); + static std::list breakUpDistanceEvenly(ArPose start, ArPose end, + int resolution); +}; + +#endif // ARIAUTIL_H + + diff --git a/Legacy/Aria/include/md5.h b/Legacy/Aria/include/md5.h new file mode 100644 index 0000000..3ee2a8c --- /dev/null +++ b/Legacy/Aria/include/md5.h @@ -0,0 +1,129 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* + This is the software we use for doing the md5 checksums, its from + http://sourceforge.net/project/showfiles.php?group_id=42360 +*/ + +/* + Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.h is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Removed support for non-ANSI compilers; removed + references to Ghostscript; clarified derivation from RFC 1321; + now handles byte order either statically or dynamically. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); + added conditionalization for C++ compilation from Martin + Purschke . + 1999-05-03 lpd Original version. + */ + +#ifndef md5_INCLUDED +# define md5_INCLUDED + +/* + * This package supports both compile-time and run-time determination of CPU + * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be + * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is + * defined as non-zero, the code will be compiled to run only on big-endian + * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to + * run on either big- or little-endian CPUs, but will run slightly less + * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. + */ + +typedef unsigned char md5_byte_t; /* 8-bit byte */ +typedef unsigned int md5_word_t; /* 32-bit word */ + +/* Define the state of the MD5 Algorithm. */ +typedef struct md5_state_s { + md5_word_t count[2]; /* message length in bits, lsw first */ + md5_word_t abcd[4]; /* digest buffer */ + md5_byte_t buf[64]; /* accumulate block */ +} md5_state_t; + +// MPL (ActivMedia) taking out the extern since its only being used in c++ +/* +#ifdef __cplusplus +extern "C" +{ +#endif +*/ + +// RH (ActivMedia/MobileRobots) Added "AREXPORT" symbol to all public functions. On Windows, this must be defined +// to either import or export the symbols to/from DLLs. On other platforms, it should be defined to be nothing. + +/* Initialize the algorithm. */ +AREXPORT void md5_init(md5_state_t *pms); + +/* Append a string to the message. */ +AREXPORT void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); + +/* Finish the message and return the digest. */ +AREXPORT void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); + +/// MPL (ActivMedia) taking out the extern since its only being used in c++ +/* +#ifdef __cplusplus +} // end extern "C" +#endif +*/ + +#endif /* md5_INCLUDED */ diff --git a/Legacy/Aria/include/wrapper.i b/Legacy/Aria/include/wrapper.i new file mode 100644 index 0000000..757d0a9 --- /dev/null +++ b/Legacy/Aria/include/wrapper.i @@ -0,0 +1,742 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + /* SWIG 1.3 Wrapper Interface Definition for Aria */ + +#ifdef SWIGPYTHON +/*#warning Defining ARIA wrapper interface for Python*/ + +/* We need the module declared as "AriaPy" here so that other modules + (like ArNetworking or ARNL) that use this wrapper will know what + the resulting Python module and wrapper library are called. +*/ +%module(directors="1", docstring="Python wrapper library for Aria") AriaPy + +#else +# ifdef SWIGJAVA +/*# warning Defining ARIA wrapper interface for Java*/ + +%module(directors="1", docstring="Java wrapper library for Aria") AriaJava + +# else +# warning Defining ARIA wrapper interface for something other that Java or Python. This might be an error. + +%module(directors="1", docstring="Wrapper library for Aria") Aria + +# endif +#endif + +#ifdef SWIGIMPORTED +#warning Imported ARIA wrapper +#endif + +%feature("autodoc", "1"); + + + +%{ +#include "Aria.h" +#include "ArGPSConnector.h" +#include "ArSystemStatus.h" +#include "ArMD5Calculator.h" +/*#include "SwigTestClass.h"*/ +#include "wrapper_ExtraClasses.h" +#include "wrapper_Functors.h" + +#include +%} + +/* Filter out warnings about setting const char* members in these classes-- + they are all static so the warning about leaking memory doesn't really apply. */ +%warnfilter(451) ArUtil; +%warnfilter(451) ArCameraCommands; +%warnfilter(451) ArMapInfoInterface; +%warnfilter(451) ArMapInterface; + + + + +/* Enable director classes (subclasses) for ArAction. + Other classes in Aria that can be subclasses, but very rarely are, + include ArResolver, ArBasePacket, ArDeviceConnection, ArRangeDevice, + ArActionGroup, ArMode; maybe others. + In Java it needs to be enabled for various ArFunctor subclasses too, + see later. + You could add %feature("director") directives for those classes + and regenerate the wrapper libraries if you want to use them. + (They are omitted since making a class a director adds lots + of code to the wrapper library.) + ArASyncTask is also often subclassed, but threading in Python is + kind of hard to get working right, at least as of Python 2.3, + especially going through Swig to do it, so providing ArASyncTask is + postponed. +*/ +%feature("director") ArAction; + +/* Supply an alternate setRobot() to avoid infinite recursion + between the Python/Java subclass and Swig's director method. +*/ +%extend ArAction { + void setActionRobot(ArRobot* robot) + { + self->ArAction::setRobot(robot); + } +} + + +/* ArMap needs directors, and to be explicitly not abstract, for constructors to be made correctly */ + +#ifdef SWIGJAVA +%feature("director") ArMap; +#endif + +%feature("notabstract") ArMap; +%feature("notabstract") ArMapInfo; + + + +/** Functors: **/ + +%{ +#include "wrapper_Functors.h" +%} + + +/* In python, use typemaps to convert function objects to ArFunctor subclasses */ + +#ifdef SWIGPYTHON + +%typemap(in) ArFunctor* { + $1 = new ArPyFunctor($input); /* XXX Memory leak. How to free? */ +} + +%typecheck(SWIG_TYPECHECK_POINTER) ArFunctor* { + $1 = PyCallable_Check($input); +} + + +%typemap(in) ArRetFunctor* { + $1 = new ArPyRetFunctor_Bool($input); /* XXX Memory leak. How to free it? */ +} + + +%typecheck(SWIG_TYPECHECK_POINTER) ArRetFunctor* { + $1 = PyCallable_Check($input); +} + +#endif /* ifdef SWIGPYTHON */ + + + + +/* In Java, enable directors so you can subclass ArFunctors. */ + +#ifdef SWIGJAVA + + +%feature("director") ArFunctor; +%feature("director") ArRetFunctor; +%feature("director") ArRetFunctor; +%feature("director") ArRetFunctor1; +%feature("director") ArFunctor1; +%feature("director") ArRetFunctor1; + +#endif + + + + +/* Rename or ignore things that can cause problems for SWIG: */ + +%rename (removePendingItemsWithType) ArSoundsQueue::removePendingItems(const %char*, ItemType); +%rename (removePendingItemsByPriority) ArSoundsQueue::removePendingItems(int); +%rename (removePendingItemsByPriorityWithType) ArSoundsQueue::removePendingItems(int, ItemType); +%rename (removePendingItemsByType) ArSoundsQueue::removePendingItems(ItemType); +%rename (nextItemByType) ArSoundsQueue::nextItem(ItemType); +%rename (nextItemByPriority) ArSoundsQueue::nextItem(int); +%rename (nextItemByTypeAndPriority) ArSoundsQueue::nextItem(ItemType, int); +%ignore ArActionTriangleDriveTo::getData; +%rename (addPreMapChangedCBPos) ArMapInterface::addPreMapChangedCB(ArFunctor*, ArListPos::Pos); +%rename (addPreMapChangedCBPos) ArMap::addPreMapChangedCB(ArFunctor*, ArListPos::Pos); +%rename (addMapChangedCBPos) ArMapInterface::addMapChangedCB(ArFunctor*, ArListPos::Pos); +%rename (addMapChangedCBPos) ArMap::addMapChangedCB(ArFunctor*, ArListPos::Pos); + +/* arconfig cannot target pointers in the wrapped languages: */ +%ignore ArConfigArg::ArConfigArg(const char*, int*, const char*, int, int); +%ignore ArConfigArg::ArConfigArg(const char*, short*, const char*, int, int); +%ignore ArConfigArg::ArConfigArg(const char*, unsigned short*, const char*, int, int); +%ignore ArConfigArg::ArConfigArg(const char*, unsigned char*, const char*, int, int); +%ignore ArConfigArg::ArConfigArg(const char*, double*, const char*, double, double); +%ignore ArConfigArg::ArConfigArg(const char*, bool*, const char*); + + +/* Rename reserved words in Python: */ +#ifdef SWIGPYTHON +%rename(NoLog) ArLog::None; +%rename(printQueue) ArRingQueue::print; +%rename(printPoint) Ar3DPoint::print; +#endif + +/* In Java and Python, you can easily concatenate strings and primitive types, + so we can just refer to logPlain() as log(), and ignore the varargs log(). */ +%ignore ArLog::log; +%rename (log) ArLog::logPlain; + +/* Rename names of some built in methods in java.lang.Object */ +#ifdef SWIGJAVA +%rename(waitFor) ArCondition::wait; +%rename(cloneMap) ArMapInterface::clone; +#endif + +/* cant wrap operators (should provide replacement methods though, TODO) */ +%ignore operator=; +%ignore operator==; +%ignore operator<; +%ignore operator>; +%ignore operator(); +%ignore operator+; +%ignore operator-; +%ignore operator*; +%ignore operator!=; +%ignore operator+=; +%ignore operator-=; + +/* Typemaps to make ARIA classes more accessible and work better in various + * target languages: + */ + +%include "typemaps.i" + +%apply int *OUTPUT {int *x, int *y, int *z}; +%apply double *OUTPUT {double *x, double *y, double *th}; +%apply double *OUTPUT {double *x, double *y, double *z}; + + +/* In python, use a standard list of strings for argc and argv: */ + +#ifdef SWIGPYTHON + +// TODO: ArArgumentParser can modify the argv list, these changes +// need to be reflected in the Python or Java list after the C++ function +// returns (if possible). Not sure how to do that yet. + +%typemap(in) (int *argc, char **argv) { + # (begin %typemap(in) for (int *argc, char **argv) + int i; + if (!PyList_Check($input)) { + PyErr_SetString(PyExc_ValueError, "Expecting a list"); + return NULL; + } + int tmpArgc = PyList_Size($input); + tmpArgc = PyList_Size($input); + $2 = (char **) malloc((tmpArgc+1)*sizeof(char *)); + for (i = 0; i < tmpArgc; i++) { + PyObject *s = PyList_GetItem($input,i); + if (!PyString_Check(s)) { + free($2); + PyErr_SetString(PyExc_ValueError, "Arguments must be strings"); + return NULL; + } + $2[i] = PyString_AsString(s); + } + $2[i] = 0; + /* Allocate a new int to hold the size, since some classes retain the pointer + and try to use it after this wrapped function returns. + Note this is not deallocated, in general classes using this typemap are + defacto singletons that live for the life of the program, so it's not a problem, + but if this typemap ever gets used for other kinds of classes is may come up. */ + int *newArgc = (int*) malloc(sizeof(int)); + *newArgc = tmpArgc; + $1 = newArgc; + # (end %typemap(in) for (int *argc, char **argv) +} + +%typecheck(SWIG_TYPECHECK_POINTER) (int *argc, char **argv) { + $1 = PyList_Check($input); +} + +#endif /*SIWGPYTHON*/ + + + +/* Modify Java wrapper to make it easier to access functions with pointer and + array arguments: + +*/ + +#ifdef SWIGJAVA + + +/* Use a String[] for argc and argv (e.g. the argv[] parameter in main()) */ + +%typemap(in) (int *argc, char **argv) (jint size){ + /* (begin %typemap(in) for (int *argc, char **argv) */ + size = jenv->GetArrayLength((jarray)$input); + int tmpArgc = size; + int i; + $2 = (char**)malloc( (size+1) * sizeof(char*) ); + for(i = 0; i < size; i++) { + jstring js = (jstring) jenv->GetObjectArrayElement((jobjectArray)$input, i); + const char *cs = jenv->GetStringUTFChars(js, 0); + $2[i] = (char*)malloc(strlen(cs)+1 * sizeof(const char)); + strcpy($2[i], cs); + jenv->ReleaseStringUTFChars(js, cs); + jenv->DeleteLocalRef(js); + } + $2[i] = 0; + int *newArgc = (int*) malloc(sizeof(int)); + *newArgc = tmpArgc; + $1 = newArgc; + /* (end %typemap(in) for (int *argc, char **argv) */ +} + + +/* XXX TODO? or will the jni and jtype typemaps below deal with it? : +%typecheck(java,SWIG_TYPECHECK_POINTER) (int *, char **) { + // TODO +} +*/ + + +%typemap(jni) (int *argc, char **argv) "jobjectArray" +%typemap(jtype) (int *argc, char **argv) "java.lang.String[]" +%typemap(jstype) (int *argc, char **argv) "java.lang.String[]" +%typemap(javain) (int *argc, char **argv) "$javainput" +%typemap(javaout) (int *argc, char **argv) { return $jnicall; } + + +/* In Java, we alsoneed to override how SWIG defines some methods in the wrappers, + * to be public not protected (the defaut javabody typemap is defined in + * java.swg) so that other packages such as ArNetworking and ARNL can access them: + */ +%typemap(javabody) SWIGTYPE %{ + /* (begin code from javabody typemap) */ + + private long swigCPtr; + protected boolean swigCMemOwn; + + /* for internal use by swig only */ + public $javaclassname(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + /* for internal use by swig only */ + public static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + /* (end code from javabody typemap) */ +%} + +%typemap(javabody_derived) SWIGTYPE %{ + /* (begin code from javabody_derived typemap) */ + + private long swigCPtr; + + /* for internal use by swig only */ + public $javaclassname(long cPtr, boolean cMemoryOwn) { + super($imclassname.SWIG$javaclassnameUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + /* for internal use by swig only */ + public static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + /* (end code from javabody_derived typemap) */ +%} + + +%typemap(javabody) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) %{ + /* (begin code from javabody typemap for pointers, references, and arrays) */ + + private long swigCPtr; + + /* for internal use by swig only */ + public $javaclassname(long cPtr, boolean bFutureUse) { + swigCPtr = cPtr; + } + + protected $javaclassname() { + swigCPtr = 0; + } + + /* for internal use by swig only */ + public static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + /* (end code from javabody typemap for pointers, references, and arrays) */ +%} + + + +#endif /* SWIGJAVA */ + + + +#ifndef SWIGPYTHON +/* These are special additional structs used by methods added to + * ArJoyHandler via %extend below */ +%{ +struct ArJoyVec3f { double x, y, z; }; +struct ArJoyVec3i { int x, y, z; }; +%} +#endif + + +/* Give names to some standard library container template types. + * In Java, you must use the special template instance names defined + * here to subclass from, e.g. "class MyPacketHandler extends ArRetFunctor1_Bool_ArRobotPacketP" + */ + + +%include "std_vector.i" +%template(ArPoseWithTimeVector) std::vector; +%template(ArSensorReadingVector) std::vector; +%template(DoubleVector) std::vector; + +#include +/*#ifndef SWIGJAVA*/ /* doesn't have std_list.i */ +#ifdef SWIGJAVA +%include "wrapper_std_list_java.i" +#else +%include "std_list.i" +#endif + +%template(ArMapObjectPtrList) std::list; +%template(ArFunctorPtrList) std::list; +%template(ArPoseList) std::list; +%template(ArPosePtrList) std::list; +%template(ArPoseWithTimeList) std::list; +%template(ArPoseWithTimePtrList) std::list; +%template(ArRangeDevicePtrList) std::list; +%template(ArArgumentBuilderPtrList) std::list; +%template(ArLineSegmentList) std::list; +%template(ArLineSegmentPtrList) std::list; +/*#endif*/ + +#ifndef SWIGJAVA /* doesn't have set */ +%include "std_set.i" +%template(IntSet) std::set; +#endif + +%include "std_map.i" +%template(IntArPoseMap) std::map; + + +%include "std_string.i" + + /* Bring in header files with classes to wrap. */ + +/* note dont include ArVersalogicIO.h or ArRobotTypes.h */ + +/* Base classes first. */ +%include "ariaTypedefs.h" +%include "ariaUtil.h" +%include "md5.h" +%include "ArBasePacket.h" +%include "ArPTZ.h" +%include "ArRangeDevice.h" +%include "ArRangeDeviceThreaded.h" +%include "ArLaser.h" +%include "ArResolver.h" +%include "ArThread.h" +%include "ArFunctor.h" + +/* Give names to some instantiations of ArFunctor template classes (for use as + * .h files that use these instantiations are loaded). */ +%template(ArRetFunctor_VoidP) ArRetFunctor; +%template(ArRetFunctor_Bool) ArRetFunctor; +%template(ArFunctor1_CString) ArFunctor1; +%template(ArFunctor1_Int) ArFunctor1; +%template(ArFunctor1_ArRobotPacketP) ArFunctor1; +%template(ArRetFunctor_Int) ArRetFunctor; +%template(ArRetFunctor_Double) ArRetFunctor; +%template(ArRetFunctor_UnsignedInt) ArRetFunctor; +%template(ArRetFunctor1_Double_ArPoseWithTime) ArRetFunctor1; +%template(ArRetFunctor1_Bool_ArRobotPacketP) ArRetFunctor1; +%template(ArRetFunctor1_Bool_ArgumentBuilder) ArRetFunctor1; +%template(ArRetFunctor1_Bool_ArgumentBuilderP) ArRetFunctor1; +%template(ArRetFunctor1_VoidP_VoidP) ArRetFunctor1; + +%include "ArACTS.h" +%include "ArAMPTU.h" +%include "ArASyncTask.h" +%include "ArAction.h" +%include "ArActionAvoidFront.h" +%include "ArActionAvoidSide.h" +%include "ArActionBumpers.h" +%include "ArActionColorFollow.h" +%include "ArActionConstantVelocity.h" +%include "ArActionDeceleratingLimiter.h" +%include "ArActionDesired.h" +%include "ArActionDriveDistance.h" +%include "ArActionGoto.h" +%include "ArActionGotoStraight.h" +%include "ArActionGroup.h" +%include "ArActionGroups.h" +%include "ArActionIRs.h" +%include "ArActionInput.h" +%include "ArActionJoydrive.h" +%include "ArActionKeydrive.h" +%include "ArActionLimiterBackwards.h" +%include "ArActionLimiterForwards.h" +%include "ArActionLimiterTableSensor.h" +%include "ArActionMovementParameters.h" +%include "ArActionRatioInput.h" +%include "ArActionRobotJoydrive.h" +%include "ArActionStallRecover.h" +%include "ArActionStop.h" +%include "ArActionTriangleDriveTo.h" +%include "ArActionTurn.h" +%include "ArAnalogGyro.h" +%include "ArArg.h" +%include "ArArgumentBuilder.h" +%include "ArArgumentParser.h" +%include "ArBumpers.h" +%include "ArCameraCollection.h" +%include "ArCameraCommands.h" +%include "ArCommands.h" +%include "ArCondition.h" +%include "ArConfig.h" +%include "ArConfigArg.h" +%include "ArConfigGroup.h" +%include "ArDataLogger.h" +%include "ArDPPTU.h" +%include "ArDeviceConnection.h" +%include "ArDrawingData.h" +%include "ArFileParser.h" +%include "ArForbiddenRangeDevice.h" +%include "ArFunctor.h" +%include "ArFunctorASyncTask.h" +%include "ArGPS.h" +%include "ArGPSConnector.h" +%include "ArGPSCoords.h" +%include "ArGripper.h" +%include "ArIRs.h" +%include "ArInterpolation.h" +%include "ArIrrfDevice.h" +%include "ArJoyHandler.h" +%include "ArKeyHandler.h" +%include "ArLaserConnector.h" +%include "ArLaserFilter.h" +%include "ArLaserLogger.h" +%include "ArLaserReflectorDevice.h" +%include "ArLineFinder.h" +%include "ArLog.h" +%include "ArLogFileConnection.h" +%include "ArMD5Calculator.h" +%include "ArMapInterface.h" +%include "ArMap.h" +%include "ArMapComponents.h" +%include "ArMapObject.h" +%include "ArMapUtils.h" +%include "ArMode.h" +%include "ArModes.h" +%include "ArModule.h" +%include "ArModuleLoader.h" +%include "ArMutex.h" +%include "ArNMEAParser.h" +%include "ArNetServer.h" +%include "ArNovatelGPS.h" +%include "ArP2Arm.h" +%include "ArPriorityResolver.h" +%include "ArRangeBuffer.h" +%include "ArRatioInputJoydrive.h" +%include "ArRatioInputKeydrive.h" +%include "ArRatioInputRobotJoydrive.h" +%include "ArRecurrentTask.h" +%include "ArRingQueue.h" +%include "ArRobot.h" +%include "ArRobotConfig.h" +%include "ArRobotConfigPacketReader.h" +%include "ArRobotConnector.h" +%include "ArRobotJoyHandler.h" +%include "ArRobotPacket.h" +%include "ArRobotPacketReceiver.h" +%include "ArRobotPacketSender.h" +%include "ArRobotParams.h" +%include "ArRVisionPTZ.h" +%include "ArSensorReading.h" +%include "ArSerialConnection.h" +%include "ArSignalHandler.h" +%include "ArSimpleConnector.h" +%include "ArSimulatedLaser.h" +%include "ArSocket.h" +%include "ArSonarAutoDisabler.h" +%include "ArSonarDevice.h" +%include "ArSonyPTZ.h" +%include "ArSoundPlayer.h" +%include "ArSoundsQueue.h" +%include "ArSpeech.h" +%include "ArStringInfoGroup.h" +%include "ArSyncLoop.h" +%include "ArSyncTask.h" +%include "ArSystemStatus.h" +%include "ArTCM2.h" +%include "ArTCMCompassDirect.h" +%include "ArTCMCompassRobot.h" +%include "ArTaskState.h" +%include "ArTcpConnection.h" +%include "ArTransform.h" +%include "ArTrimbleGPS.h" +%include "ArUrg.h" +%include "ArVCC4.h" +#if !defined(SWIGWIN) && !defined(WIN32) +%include "ArVersalogicIO.h" +%include "ArMTXIO.h" +#endif +%include "ariaInternal.h" + +%include "wrapper_Functors.h" +%include "wrapper_ExtraClasses.h" + + + + +/* Extensions to make ARIA classes more convenient in various target languages: */ + +/* Extension to print an ArPose nicely in Python: */ +#ifdef SWIGPYTHON +%extend ArPose { + char* __str__() { + static char tmp[256]; + snprintf(tmp, 256, "(X:%.4f, Y:%.4f, T:%.4f)", self->getX(), self->getY(), self->getTh()); + return &tmp[0]; + } +} +#endif + +/* Extension that allows you to access pose components as member attributes + rather than using accessor methods. We do this by providing "dummy" member + variables, then overloading Swigs internal accessors: + */ +#ifdef SWIGPYTHON +%extend ArPose { + double x, y, th; +} +%{ + const double ArPose_x_get(ArPose* p) { + return (const double) p->getX(); + } + void ArPose_x_set(ArPose* p, double x) { + p->setX(x); + } + const double ArPose_y_get(ArPose* p) { + return (const double) p->getY(); + } + void ArPose_y_set(ArPose* p, double y) { + p->setY(y); + } + const double ArPose_th_get(ArPose* p) { + return (const double) p->getTh(); + } + void ArPose_th_set(ArPose* p, double th) { + p->setTh(th); + } +%} +#endif + + +%extend ArSocket { + std::string read(size_t len, unsigned int msWait) { + char *buf = (char*)malloc(len); + int n = self->read(buf, len, msWait); + if(n <= 0) { + free(buf); + return ""; + } + std::string s(buf, n); + free(buf); + return s; + } + + bool write(std::string s) { + return self->write( (void*)(s.c_str()), (size_t)(s.length())); + } +} + + +/* Extend the ArJoyHandler class to return structs with vector values, which is + * easier to use than return via pointer arguments. */ +#ifndef SWIGPYTHON // In Python the original functions return a nicer python tuple + +struct ArJoyVec3f { double x, y, z; }; +struct ArJoyVec3i { int x, y, z; }; + +%extend ArJoyHandler { + /** @copydoc getDoubles(double *x, double *y, double *z) + @added 2.7.3 + */ + ArJoyVec3f getDoubles() { + ArJoyVec3f r; + self->getDoubles(&r.x, &r.y, &r.z); + return r; + } + /** @copydoc getAdjusted(int *x, int *y, int *z) + @added 2.7.3 + */ + ArJoyVec3i getAdjusted() { + ArJoyVec3i r; + self->getAdjusted(&r.x, &r.y, &r.z); + return r; + } + /** @copydoc getUnfiltered(int *x, int *y, int *z) + @added 2.7.3 + */ + ArJoyVec3i getUnfiltered() { + ArJoyVec3i r; + self->getUnfiltered(&r.x, &r.y, &r.z); + return r; + } + /** @copydoc getSpeeds(int *x, int *y, int *z) + @added 2.7.3 + */ + ArJoyVec3i getSpeeds() { + ArJoyVec3i r; + self->getSpeeds(&r.x, &r.y, &r.z); + return r; + } +} + +#endif + +/* TODO: + * Make ArConfig and ArConfigSection have dictionary access operators in Python +*/ + + + + +/* TODO: typemap to check if a pointer returned by a method is NULL, and + throw an exception. (Many methods in ARIA return NULL if an object + is not found.) Maybe only do this for Java since Python has the "None" + object value? (Also falso boolean returns for status?) +*/ + diff --git a/Legacy/Aria/include/wrapper_ExtraClasses.h b/Legacy/Aria/include/wrapper_ExtraClasses.h new file mode 100644 index 0000000..f347313 --- /dev/null +++ b/Legacy/Aria/include/wrapper_ExtraClasses.h @@ -0,0 +1,74 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARIA_wrapper_ExtraClasses_h +#define ARIA_wrapper_ExtraClasses_h + +/** @cond INCLUDE_SWIG_ONLY_CLASSES */ + +/* ArConfigArg subclasses for specific types, since for some target languages + * (Python) Swig can't differentiate booleans, integers, short integers, + * unsigned integers, etc. Furthermore, ArConfig can't change program variables + * via pointers in most languages, so you need to only use the constructors that take + * an initial value for an internally held variable instead of pointers anyway. + */ + +class ArConfigArg_Bool : public ArConfigArg +{ +public: + ArConfigArg_Bool(const char *name, bool b, const char *desc = "") : + ArConfigArg(name, b, desc) + { } +}; + +class ArConfigArg_Int : public ArConfigArg +{ +public: + ArConfigArg_Int(const char *name, int i, const char *desc = "", int min = INT_MIN, int max = INT_MAX) : + ArConfigArg(name, i, desc, min, max) + { } +}; + +class ArConfigArg_Double : public ArConfigArg +{ +public: + ArConfigArg_Double(const char *name, double d, const char *desc = "", double min = -HUGE_VAL, double max = HUGE_VAL) : + ArConfigArg(name, d, desc, min, max) + { } +}; + +class ArConfigArg_String : public ArConfigArg +{ +public: + ArConfigArg_String(const char *name, char *str, const char *desc) : + ArConfigArg(name, str, desc, 0) + { + } +}; + +/** @endcond INCLUDE_SWIG_ONLY_CLASSES */ + +#endif // wrapperExtraClasses.h diff --git a/Legacy/Aria/include/wrapper_Functors.h b/Legacy/Aria/include/wrapper_Functors.h new file mode 100644 index 0000000..73efb12 --- /dev/null +++ b/Legacy/Aria/include/wrapper_Functors.h @@ -0,0 +1,100 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#ifndef ARIA_wrapper_Functors_h +#define ARIA_wrapper_Functors_h + +/* For Python, define ArFunctor subclasses to hold Python C library + * callable function objects. These are used internally by the + * wrapper library, and typemaps convert target-language function + * objects to these ArFunctor subclasses-- you only need to pass + * the function to Aria when in the C++ API you would pass a Functor. + * + * For Java, define subclasses of ArFunctor for various argument types, + * since you can't access template classes in Java. Then you can + * further subclass within Java and pass that object to Aria. + */ + +#include "ArFunctor.h" + +/* Functiors for Python: */ + +#ifdef SWIGPYTHON +class ArPyFunctor : public ArFunctor +{ +protected: + PyObject* pyFunction; +public: + ArPyFunctor(PyObject* _m) : pyFunction(_m) { + Py_INCREF(pyFunction); + } + + virtual void invoke() { + PyObject* r = PyObject_CallObject(pyFunction, NULL); + if(!r) { + fputs("** ArPyFunctor: Error calling Python function: ", stderr); + PyErr_Print(); + } + } + + virtual ~ArPyFunctor() { + Py_DECREF(pyFunction); + } + + virtual const char* getName() { + return (const char*) PyString_AsString(PyObject_Str(pyFunction)); + } +}; + + +class ArPyRetFunctor_Bool : + public ArRetFunctor, + public ArPyFunctor +{ +public: + ArPyRetFunctor_Bool(PyObject* _m) : ArRetFunctor(), ArPyFunctor(_m) { + } + + virtual bool invokeR() { + PyObject* r = PyObject_CallObject(pyFunction, NULL); + if(!r) { + fputs("** ArPyRetFunctor_Bool: Error calling Python function: ", stderr); + PyErr_Print(); + } + return(r == Py_True); + } + + virtual const char* getName() { + return (const char*) PyString_AsString(PyObject_Str(pyFunction)); + } +}; + +#endif // PYTHON + + + + +#endif // wrapperFunctors.h diff --git a/Legacy/Aria/include/wrapper_std_list_java.i b/Legacy/Aria/include/wrapper_std_list_java.i new file mode 100644 index 0000000..f555ddb --- /dev/null +++ b/Legacy/Aria/include/wrapper_std_list_java.i @@ -0,0 +1,74 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * std_list.i + * ----------------------------------------------------------------------------- */ + +%include + +%{ +#include +#include +%} + +namespace std { + + template class list { + public: + typedef size_t size_type; + typedef T value_type; + typedef const value_type& const_reference; + list(); + size_type size() const; + %rename(isEmpty) empty; + bool empty() const; + void clear(); + %rename(add) push_back; + void push_back(const value_type& x); + %extend { + const_reference get(int i) throw (std::out_of_range) { + int size = int(self->size()); + int j; + if (i>=0 && i::const_iterator p; + p=self->begin(); + for (j=0; j + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/java/ArNetworkingSwigJava.vcproj b/Legacy/Aria/java/ArNetworkingSwigJava.vcproj new file mode 100644 index 0000000..f56f467 --- /dev/null +++ b/Legacy/Aria/java/ArNetworkingSwigJava.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/java/AriaJava-vc2010.sln b/Legacy/Aria/java/AriaJava-vc2010.sln new file mode 100644 index 0000000..312431b --- /dev/null +++ b/Legacy/Aria/java/AriaJava-vc2010.sln @@ -0,0 +1,79 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaJava", "AriaJava.vcxproj", "{3270E630-D0D3-434D-AB7E-703362AEA947}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2010.vcxproj", "{606257AE-E882-4C66-84C0-72331642D09F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingJava", "ArNetworkingJava.vcxproj", "{01933B6F-657F-49FA-8AD8-BDC061910E92}" + ProjectSection(ProjectDependencies) = postProject + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} = {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingSwigJava", "ArNetworkingSwigJava.vcxproj", "{AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaSwigJava", "AriaSwigJava.vcxproj", "{E333276C-952E-4A46-BED2-BC918AF7D957}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingDLL", "..\ArNetworking\src\ArNetworkingDLL-vc2010.vcxproj", "{783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3270E630-D0D3-434D-AB7E-703362AEA947}.Debug|Win32.ActiveCfg = Debug|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Debug|Win32.Build.0 = Debug|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Debug|x64.ActiveCfg = Debug|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Debug|x64.Build.0 = Debug|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Release|Win32.ActiveCfg = Release|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Release|Win32.Build.0 = Release|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Release|x64.ActiveCfg = Release|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Release|x64.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|x64.ActiveCfg = Debug|x64 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|x64.Build.0 = Debug|x64 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|x64.ActiveCfg = Release|x64 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|x64.Build.0 = Release|x64 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Debug|Win32.ActiveCfg = Debug|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Debug|Win32.Build.0 = Debug|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Debug|x64.ActiveCfg = Debug|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Debug|x64.Build.0 = Debug|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Release|Win32.ActiveCfg = Release|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Release|Win32.Build.0 = Release|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Release|x64.ActiveCfg = Release|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Release|x64.Build.0 = Release|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Debug|Win32.ActiveCfg = Debug|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Debug|Win32.Build.0 = Debug|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Debug|x64.ActiveCfg = Debug|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Debug|x64.Build.0 = Debug|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Release|Win32.ActiveCfg = Release|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Release|Win32.Build.0 = Release|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Release|x64.ActiveCfg = Release|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Release|x64.Build.0 = Release|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Debug|Win32.ActiveCfg = Debug|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Debug|Win32.Build.0 = Debug|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Debug|x64.ActiveCfg = Debug|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Debug|x64.Build.0 = Debug|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Release|Win32.ActiveCfg = Release|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Release|Win32.Build.0 = Release|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Release|x64.ActiveCfg = Release|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Release|x64.Build.0 = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|Win32.ActiveCfg = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|Win32.Build.0 = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|x64.ActiveCfg = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|Win32.ActiveCfg = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|Win32.Build.0 = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/java/AriaJava.sln b/Legacy/Aria/java/AriaJava.sln new file mode 100644 index 0000000..ccbd5a1 --- /dev/null +++ b/Legacy/Aria/java/AriaJava.sln @@ -0,0 +1,61 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaJava", "AriaJava.vcproj", "{3270E630-D0D3-434D-AB7E-703362AEA947}" + ProjectSection(ProjectDependencies) = postProject + {E333276C-952E-4A46-BED2-BC918AF7D957} = {E333276C-952E-4A46-BED2-BC918AF7D957} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2003.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingJava", "ArNetworkingJava.vcproj", "{01933B6F-657F-49FA-8AD8-BDC061910E92}" + ProjectSection(ProjectDependencies) = postProject + {3270E630-D0D3-434D-AB7E-703362AEA947} = {3270E630-D0D3-434D-AB7E-703362AEA947} + {E333276C-952E-4A46-BED2-BC918AF7D957} = {E333276C-952E-4A46-BED2-BC918AF7D957} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingSwigJava", "ArNetworkingSwigJava.vcproj", "{AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}" + ProjectSection(ProjectDependencies) = postProject + {3270E630-D0D3-434D-AB7E-703362AEA947} = {3270E630-D0D3-434D-AB7E-703362AEA947} + {01933B6F-657F-49FA-8AD8-BDC061910E92} = {01933B6F-657F-49FA-8AD8-BDC061910E92} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaSwigJava", "AriaSwigJava.vcproj", "{E333276C-952E-4A46-BED2-BC918AF7D957}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {3270E630-D0D3-434D-AB7E-703362AEA947}.Debug.ActiveCfg = Debug|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Debug.Build.0 = Debug|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Release.ActiveCfg = Release|Win32 + {3270E630-D0D3-434D-AB7E-703362AEA947}.Release.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.Build.0 = Release|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Debug.ActiveCfg = Debug|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Debug.Build.0 = Debug|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Release.ActiveCfg = Release|Win32 + {01933B6F-657F-49FA-8AD8-BDC061910E92}.Release.Build.0 = Release|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Debug.ActiveCfg = Debug|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Debug.Build.0 = Debug|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Release.ActiveCfg = Release|Win32 + {AC5CCD7A-1657-4A3D-9E09-C1434B49AEFB}.Release.Build.0 = Release|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Debug.ActiveCfg = Debug|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Debug.Build.0 = Debug|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Release.ActiveCfg = Release|Win32 + {E333276C-952E-4A46-BED2-BC918AF7D957}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/java/AriaJava.vcproj b/Legacy/Aria/java/AriaJava.vcproj new file mode 100644 index 0000000..8cef722 --- /dev/null +++ b/Legacy/Aria/java/AriaJava.vcproj @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/java/AriaSwigJava.vcproj b/Legacy/Aria/java/AriaSwigJava.vcproj new file mode 100644 index 0000000..b730cac --- /dev/null +++ b/Legacy/Aria/java/AriaSwigJava.vcproj @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/javaExamples/Makefile b/Legacy/Aria/javaExamples/Makefile new file mode 100644 index 0000000..f7a0cf4 --- /dev/null +++ b/Legacy/Aria/javaExamples/Makefile @@ -0,0 +1,48 @@ + +ifdef JAVA_BIN +JAVAC=$(JAVA_BIN)/javac +JAVA=$(JAVA_BIN)/java +else +JAVAC=javac +JAVA=java +endif + +#### Different options for Windows or Linux: +host:=$(shell uname | cut -d _ -f 1) +ifeq ($(host),MINGW32) # host is MINGW32 on Windows: +CLASSPATH_SEP=; +RUNTIME_PATH_VAR=PATH +RUNTIME_LIB_DIR=../bin +LIB_EXT=dll +LIB_PREFIX= +else +CLASSPATH_SEP=: +RUNTIME_PATH_VAR=LD_LIBRARY_PATH +RUNTIME_LIB_DIR=../lib +LIB_EXT=so +LIB_PREFIX=lib +endif + + + +all: $(patsubst %.java,%.class,$(wildcard *.java)) + +%.class: %.java ../java/Aria.jar $(RUNTIME_LIB_DIR)/$(LIB_PREFIX)Aria.$(LIB_EXT) + @echo $^ + "$(JAVAC)" -classpath ../java/Aria.jar $< + +run%: %.class + $(RUNTIME_PATH_VAR)=$$$(RUNTIME_PATH_VAR):$(RUNTIME_LIB_DIR) "$(JAVA)" -cp ../java/Aria.jar:. $* $(ARGS) + +gdb%: %.class + $(RUNTIME_PATH_VAR)=$$$(RUNTIME_PATH_VAR):$(RUNTIME_LIB_DIR) gdb --args "$(JAVA)" -cp ../java/Aria.jar:. $* $(ARGS) + +info: + @echo host=$(host) + @echo "JAVA_BIN=$(JAVA_BIN)" + @echo "JAVAC=$(JAVAC)" + @echo "JAVA=$(JAVA)" + @echo "CLASSPATH_SEP=$(CLASSPATH_SEP)" + @echo "RUNTIME_PATH_VAR=$(RUNTIME_PATH_VAR)" + @echo "RUNTIME_LIB_DIR=$(RUNTIME_LIB_DIR)" + @echo "LIB_EXT=$(LIB_EXT)" diff --git a/Legacy/Aria/javaExamples/README.txt b/Legacy/Aria/javaExamples/README.txt new file mode 100644 index 0000000..32ee0b9 --- /dev/null +++ b/Legacy/Aria/javaExamples/README.txt @@ -0,0 +1,95 @@ + +USING THE JAVA WRAPPER FOR ARIA +------------------------------- + +A "wrapper" library for Java has been provided in the "java" directory. +This wrapper layer provides a Java API which simply makes calls using JNI +into the regular Aria or ArNetworking "native" library. + +To use the Aria Java wrapper you need to download a Java SDK. + +On Debian 3, Debian 5, and Windows, the Sun J2SE JDK +1.6 (Java SE6) was used to build the wrapper. You can download it from: + + http://java.sun.com/javase/downloads + +Find the Java SE Development Kit 6 and click "Download". (Only the JDK +is needed, ARIA does not need Java EE or any other extra Java technologies.) + +The JDK also includes the runtime environment (JRE) that allows you to run +Java programs. If you only need the JRE, it can also +be obtained from . + +On Ubuntu, Ubuntu's "default-jdk" package was installed and used to build +the wrapper (which uses openjdk 6 on Ubuntu 12.04). + +In Windows you must then put Aria's 'bin' directory into your PATH environment +variable so that Java can find the dlls needed to run the wrapper. (Environment +variables are set in the System control panel. If you used the default +installation location, add "C:\Program Files\MobileRobots\Aria\bin" to PATH.) +(The java wrapper tries to load AriaJava.dll, which also requires AriaVC10.dll.) + +For an example you can start the simulator, then enter the javaExamples +directory and compile the simple Java example by using this command: + + javac -classpath ../java/Aria.jar simple.java + +Then run it with this command in Windows: + java -cp ../java/Aria.jar;. simple + +or this one in Linux: + java -cp ../java/Aria.jar:. simple + +(The difference is the seperator in the class path: ';' vs ':'.) + +The Java wrapper is not as well tested as Aria itself. If you encounter +problems using it, please notify the aria-users mailing list. + +You can use the C++ API documentation in 'docs', or you can use javadoc +to generate a Java API reference based on the java source files in the 'java' +directory. + + + +USING ARFUNCTOR IN JAVA +----------------------- + +Since you can't have a "pointer" to a method in Java, to use ArFunctors, +you must define a subclass of ArFunctor which overrides invoke(). For +functors that take arguments, you can only use specially defined +ArFunctor subclasses, see java/com/mobilerobots/Aria/ArFunctor_*.java. +(More can be added by adding them to wrapper.i and rebuilding the wrapper +using SWIG.) + + + + +REBUILDING THE JAVA WRAPPER +--------------------------- + +If you want to rebuild the Java wrapper you need to install SWIG: +See You should get at +least version 1.3.29. + +You then need to set the environment variable JAVA_INCLUDE to the include +directory in your Java SDK, and JAVA_BIN to the bin directory in your Java +SDK. + +If you installed Sun Java on Linux in "/usr/local/jdk", use +"/usr/local/jdk/bin" for JAVA_BIN and "/usr/local/jdk/include" for +JAVA_INCLUDE. + +If you installed "default-jdk" on Ubuntu, then use +"/usr/lib/jvm/default-java/bin" for JAVA_BIN and +"/usr/lib/jvm/default-java/include" for JAVA_INCLUDE. + +On Windows, use "C:\Program Files\Java\jdk1.6.0_10\bin" for +JAVA_BIN and "C:\Program Files\Java\jdk1.6.0_10\include" for JAVA_INCLUDE. + +In Linux, run 'make java' in the Aria directory. + +In Windows with Visual Studio 2010, open java/AriaJava-vc2010.sln, select +Tools menu -> Options -> Projects -> VC++ Directories and add your SWIG +directory. Select Release build configuration. Then build or rebuild the AriaJava +project. + diff --git a/Legacy/Aria/javaExamples/actionExample.java b/Legacy/Aria/javaExamples/actionExample.java new file mode 100644 index 0000000..5926cf7 --- /dev/null +++ b/Legacy/Aria/javaExamples/actionExample.java @@ -0,0 +1,273 @@ + +/* + +example program demonstrating how to make and use new actions. + +This example program creates two new actions, Go and Turn. Go will drive the robot forward safely, +while Turn will avoid obstacles detected by the sonar by turning. +This program also adds a predefined +action from Aria which tries to recover from stalls (hit something and +can't move forward) by backing and turning. + +Each of these actions have the normal constructor and destructor, note that +the constructors use constructor chaining to create their ArAction part +correctly. Each action then also implements the essential virtual method, +fire(). This fire function is called by the action resolver, and +returns values that, in combination with other actions' desired behavior, +determine the driving commands sent to the robot. + +Also note that each of these actions override the setRobot function; these +implementations obtain the sonar device from the robot in addition to doing the +needed caching of the robot pointer. This is what you should do if you +care about the presence or absence of a particular sensor. If you don't +care about any particular sensor you could just use one of the checkRangeDevice... +methods in ArRobot (there are four of them). +Also note that these are very naive actions, they are simply an example +of how to use actions. + +See the @ref actions Actions section of the Aria reference manual overview for more details about actions. + +Note that actions must take a small amount of time to execute, to avoid +delaying the robot synchronization cycle. + +*/ + + + +import com.mobilerobots.Aria.*; + +/** + * Example Action class that drives the robot forward, but stops if obstacles are + * detected by sonar. + */ +class ExampleGoAction extends ArAction +{ + // constructor, sets myMaxSpeed and myStopDistance + public ExampleGoAction(double maxSpeed, double stopDistance) + { + super("Go"); + myMaxSpeed = maxSpeed; + myStopDistance = stopDistance; + myDesired = new ArActionDesired(); + } + + + /** + This fire is the whole point of the action. + currentDesired is the combined desired action from other actions + previously processed by the action resolver. In this case, we're + not interested in that, we will set our desired + forward velocity in the myDesired member, and return it. + + */ + public ArActionDesired fire(ArActionDesired currentDesired) + { + double speed; + + + // reset the actionDesired (must be done), to clear + // its previous values. + myDesired.reset(); + + // get the range of the sonar + double robotRadius = 400; + double range = mySonar.currentReadingPolar(-70, 70) - robotRadius; + // if the range is greater than the stop distance, find some speed to go + if (range > myStopDistance) + { + // just an arbitrary speed based on the range + speed = range * .3; + // if that speed is greater than our max, cap it + if (speed > myMaxSpeed) + speed = myMaxSpeed; + // now set the velocity + myDesired.setVel(speed); + } + // the range was less than the stop distance, so request stop + else + { + myDesired.setVel(0); + } + // return the actionDesired to the resolver to make our request + return myDesired; + } + + + /** + Override ArAction.setRobot() to get the sonar device from the robot, or deactivate this action if it is missing. + You must also call ArAction.setRobot() to properly store + the ArRobot pointer in the ArAction base class. + */ + public void setRobot(ArRobot robot) + { + setActionRobot(robot); + mySonar = robot.findRangeDevice("sonar"); + } + + // the sonar device object obtained from the robot by setRobot() + protected ArRangeDevice mySonar; + + + /** Our current desired action: fire() modifies this object and returns + to the action resolver a pointer to this object. + This object is kept as a class member so that it persists after fire() + returns (otherwise fire() would have to create a new object each invocation, + but would never be able to delete that object). + */ + protected ArActionDesired myDesired; + + protected double myMaxSpeed; + protected double myStopDistance; +} + +/** Example action class that turns the robot away from obstacles detected by the + * sonar. Used by actionExample.java. */ +class ExampleTurnAction extends ArAction +{ + + public ExampleTurnAction(double turnThreshold, double turnAmount) + { + super("Turn"); + myTurnThreshold = turnThreshold; + myTurnAmount = turnAmount; + myTurning = 0; + myDesired = new ArActionDesired(); + } + + /** + This is the guts of the Turn action. + */ + public ArActionDesired fire(ArActionDesired currentDesired) + { + double leftRange, rightRange; + // reset the actionDesired (must be done) + myDesired.reset(); + double robotRadius = 400; + // Get the left readings and right readings off of the sonar + leftRange = (mySonar.currentReadingPolar(0, 100) - robotRadius); + rightRange = (mySonar.currentReadingPolar(-100, 0) - robotRadius); + // if neither left nor right range is within the turn threshold, + // reset the turning variable and don't turn + if (leftRange > myTurnThreshold && rightRange > myTurnThreshold) + { + myTurning = 0; + myDesired.setDeltaHeading(0); + } + // if we're already turning some direction, keep turning that direction + else if (myTurning != 0) + { + myDesired.setDeltaHeading(myTurnAmount * myTurning); + } + // if we're not turning already, but need to, and left is closer, turn right + // and set the turning variable so we turn the same direction for as long as + // we need to + else if (leftRange < rightRange) + { + myTurning = -1; + myDesired.setDeltaHeading(myTurnAmount * myTurning); + } + // if we're not turning already, but need to, and right is closer, turn left + // and set the turning variable so we turn the same direction for as long as + // we need to + else + { + myTurning = 1; + myDesired.setDeltaHeading(myTurnAmount * myTurning); + } + return myDesired; + } + + + /** + Calls the ArAction.setRobot() method to store the robot object (all setRobot overloaded functions must do this), + finds the sonar device from the robot. + */ + public void setRobot(ArRobot robot) + { + setActionRobot(robot); + mySonar = robot.findRangeDevice("sonar"); + } + + // this is to hold the sonar device form the robot + protected ArRangeDevice mySonar; + // what the action wants to do; used by the action resover after fire() + protected ArActionDesired myDesired; + // distance at which to start turning + protected double myTurnThreshold; + // amount to turn when turning is needed + protected double myTurnAmount; + // remember which turn direction we requested, to help keep turns smooth + protected int myTurning; // -1 == left, 1 == right, 0 == none +} + + + +public class actionExample { + + + /* Try to load the Aria and ArNetworking wrapper libraries when the + * program starts: + */ + static { + try { + System.loadLibrary("AriaJava"); + } catch(UnsatisfiedLinkError e) { + System.err.println("Native code library libAriaJava failed to load. Make sure that its directory is in your library path. See javaExamples/README.txt and the chapter on Dynamic Linking Problems in the SWIG Java Documentation (http://www.swig.org) for help.\n" + e); + System.exit(1); + } + } + + + public static void main(String argv[]) { + Aria.init(); + + ArSimpleConnector conn = new ArSimpleConnector(argv); + ArRobot robot = new ArRobot(); + ArSonarDevice sonar = new ArSonarDevice(); + + // Create instances of the actions defined above, plus ArActionStallRecover, + ExampleGoAction go = new ExampleGoAction(500, 350); + ExampleTurnAction turn = new ExampleTurnAction(400, 10); + + // a predefined action from Aria. + ArActionStallRecover recover = new ArActionStallRecover(); + + + // Parse all command-line arguments + if(!Aria.parseArgs()) + { + Aria.logOptions(); + System.exit(1); + } + + // Connect to the robot + if(!conn.connectRobot(robot)) + { + ArLog.log(ArLog.LogLevel.Terse, "actionExample: Could not connect to robot! Exiting."); + System.exit(2); + } + + // Add the range device to the robot. You should add all the range + // devices and such before you add actions + robot.addRangeDevice(sonar); + + + // Add our actions in order. The second argument is the priority, + // with higher priority actions going first, and possibly pre-empting lower + // priority actions. + robot.addAction(recover, 60); + robot.addAction(turn, 50); + robot.addAction(go, 40); + + // Enable the motors, disable amigobot sounds + robot.enableMotors(); + + // Run the robot processing cycle. + // 'true' means to return if it loses connection, + // after which we exit the program. + robot.run(true); + + Aria.exit(0); + } +} + diff --git a/Legacy/Aria/javaExamples/joyHandler.java b/Legacy/Aria/javaExamples/joyHandler.java new file mode 100644 index 0000000..c84fcc0 --- /dev/null +++ b/Legacy/Aria/javaExamples/joyHandler.java @@ -0,0 +1,46 @@ + +/* How to use ArJoyHandler in Java */ + +import com.mobilerobots.Aria.*; + +public class joyHandler { + + static { + try { + System.loadLibrary("AriaJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library libAriaJava failed to load. Make sure that its directory is in your library path; See javaExamples/README.txt and the chapter on Dynamic Linking Problems in the SWIG Java documentation (http://www.swig.org) for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) { + Aria.init(); + ArJoyHandler joyHandler = new ArJoyHandler(); + if(!joyHandler.init()) { + System.out.println("Error initializing joy handler. (No joystick or no joystick OS device installed?)"); + Aria.exit(1); + } + boolean havez = joyHandler.haveZAxis(); + System.out.printf("Initialized? %s\tHave Z? %s\tNum Axes %d\tNum Buttons %d\n", + joyHandler.haveJoystick()?"yes":"no", havez?"yes":"no", joyHandler.getNumAxes(), joyHandler.getNumButtons()); + while(true) { + ArJoyVec3f pos = joyHandler.getDoubles(); + ArJoyVec3i adj = joyHandler.getAdjusted(); + ArJoyVec3i unf = joyHandler.getUnfiltered(); + ArJoyVec3i speed = joyHandler.getSpeeds(); + System.out.print("("+pos.getX()+", "+pos.getY()+", "+pos.getZ()+") "+ + "\tAdjusted: ("+adj.getX()+", "+adj.getY()+", "+adj.getZ()+") "+ + "\tUnfiltered: ("+unf.getX()+", "+unf.getY()+", "+unf.getZ()+") "+ + "\tSpeed: ("+speed.getX()+", "+speed.getY()+", "+speed.getZ()+")\tButtons: ["); + for(int i = 0; i < joyHandler.getNumButtons(); ++i) { + if (joyHandler.getButton(i)) { + System.out.print(i + " "); + } + } + System.out.println("]"); + ArUtil.sleep(1000); + } + //Aria.exit(0); + } +} diff --git a/Legacy/Aria/javaExamples/laserWander.java b/Legacy/Aria/javaExamples/laserWander.java new file mode 100644 index 0000000..99723b1 --- /dev/null +++ b/Legacy/Aria/javaExamples/laserWander.java @@ -0,0 +1,82 @@ +/* A simple Java program that demonstrates using a SICK laser rangefinder + * as well as sonar on the robot, and using a predefined ArAction from + * the ARIA library to avoid obstacles. + * + * NOTE you currently must change the call to configureShort() below if + * you are using the simulator. This is a bug in the Java wrapper. + */ + +import com.mobilerobots.Aria.*; + +public class laserWander { + + static { + try { + System.loadLibrary("AriaJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library libAriaJava) failed to load. Make sure that its directory is in your library path; See javaExamples/README.txt and the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) { + System.out.println("Starting Java Laser Example"); + + Aria.init(Aria.SigHandleMethod.SIGHANDLE_THREAD, true); + + // Main robot object + ArRobot robot = new ArRobot("robot1", true, true, true); + + // Range device + ArSick laser = new ArSick(); + ArSonarDevice sonar = new ArSonarDevice(); + robot.addRangeDevice(sonar); + robot.addRangeDevice(laser); + + // Connect to robot + ArSimpleConnector conn = new ArSimpleConnector(argv); + if(!Aria.parseArgs()) + { + System.err.println("Error parsing arguments (defaults or command line). Exiting."); + Aria.logOptions(); + System.exit(1); + } + if (!conn.connectRobot(robot)) + { + System.err.println("Could not connect to robot, exiting.\n"); + System.exit(1); + } + + // Configure and connect to laser. The first argument determines whether + // to use simulated laser connection over the TCP port, or to try to connect + // to a real SICK on the serial port. + conn.setupLaser(laser); + //laser.configureShort(false /* Use Simulator? */, ArSick.BaudRate.BAUD38400, ArSick.Degrees.DEGREES180, ArSick.Increment.INCREMENT_ONE); + laser.runAsync(); + if(!laser.blockingConnect()) + { + System.err.println("Could not connect to a laser, it won't be used."); + } + else + { + } + + // Add actions + ArActionBumpers bumpers = new ArActionBumpers(); + ArActionLimiterForwards limiter = new ArActionLimiterForwards("speed limiter", 300, 600, 250, 1.1); + ArActionTurn turn = new ArActionTurn(); + ArActionConstantVelocity constantVel = new ArActionConstantVelocity("constant velocity", 400); + robot.addAction(bumpers, 75); + robot.addAction(limiter, 49); + robot.addAction(turn, 30); + robot.addAction(constantVel, 20); + + + // Let program run forever until cancelled + System.out.println("Wandering..."); + robot.enableMotors(); + robot.run(true); + System.out.println("Robot disconnected. Shutting down and exiting."); + Aria.exit(0); + } +} diff --git a/Legacy/Aria/javaExamples/map.java b/Legacy/Aria/javaExamples/map.java new file mode 100644 index 0000000..d9a4f5c --- /dev/null +++ b/Legacy/Aria/javaExamples/map.java @@ -0,0 +1,45 @@ + +/* A simple example of connecting to and driving the robot with direct + * motion commands. + */ + +import com.mobilerobots.Aria.*; + +public class map { + + static { + try { + System.loadLibrary("AriaJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library libAriaJava failed to load. Make sure that its directory is in your library path; See javaExamples/README.txt and the chapter on Dynamic Linking Problems in the SWIG Java documentation (http://www.swig.org) for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) { + System.out.println("Starting Java Map Test"); + + Aria.init(); + + //System.out.println("Will be able to load maps from the c++ maps directory: + //../maps."); + //ArMap map = new ArMap("../maps/"); + ArMap map = new ArMap(); + System.out.println("loading map: ../maps/columbia.map"); + if(!map.readFile("../maps/columbia.map")) + { + System.out.println("Error loading map."); + } + else + { + //System.out.println("writing map: out.map in ../maps directory"); + System.out.println("writing map: out.map"); + if(!map.writeFile("out.map")) + { + System.out.println("error writing map"); + } + } + + Aria.exit(0); + } +} diff --git a/Legacy/Aria/javaExamples/robotSyncTaskExample.java b/Legacy/Aria/javaExamples/robotSyncTaskExample.java new file mode 100644 index 0000000..7aa9e5e --- /dev/null +++ b/Legacy/Aria/javaExamples/robotSyncTaskExample.java @@ -0,0 +1,114 @@ +/* + Shows how to add a task callback to ArRobot's synchronization/processing cycle + + This program will just have the robot wander around, it uses some avoidance + routines, then just has a constant velocity. A sensor interpretation task callback is invoked + by the ArRobot object every cycle as it runs, which records the robot's current + pose and velocity. + + In Java, to pass an ArFunctor object to Aria, you must define a subclass + of ArFunctor which overrides the invoke() method. + + Note that tasks must take a small amount of time to execute, to avoid delaying the + robot cycle. +*/ + +import com.mobilerobots.Aria.*; + +class PrintingTask extends ArFunctor +{ + private ArRobot myRobot; + + + // Constructor. Adds our 'user task' to the given robot object. + public PrintingTask(ArRobot robot) + { + System.out.println("Java PrintingTask: adding sensor interpretation task to ArRobot..."); + myRobot = robot; + myRobot.addSensorInterpTask("PrintingTask", 50, this); + } + + // This method will be called when Aria invokes the task functor + public void invoke() + { + // print out some info about the robot + System.out.println("Java PrintingTask: x " + (int) myRobot.getX() + + " y " + (int) myRobot.getY() + + " th " + (int) myRobot.getTh() + + " vel " + (int) myRobot.getVel() + + " mpacs " + (int) myRobot.getMotorPacCount()); + + // Need sensor readings? Try myRobot.getRangeDevices() to get all + // range devices, then for each device in the list, call lockDevice(), + // getCurrentBuffer() to get a list of recent sensor reading positions, then + // unlockDevice(). + } + +} + + +public class robotSyncTaskExample +{ + static { + try { + System.loadLibrary("AriaJava"); + } catch(UnsatisfiedLinkError e) { + System.err.println("Native code library (libAriaJava.so or AriaJava.dll) failed to load. Make sure that it is in your library path."); + System.exit(1); + } + } + + public static void main(String argv[]) + { + Aria.init(); + ArArgumentParser parser = new ArArgumentParser(argv); + parser.loadDefaultArguments(); + ArSimpleConnector con = new ArSimpleConnector(parser); + if(!Aria.parseArgs()) + { + Aria.logOptions(); + System.exit(1); + } + + ArRobot robot = new ArRobot(); + + ArSonarDevice sonar = new ArSonarDevice(); + + PrintingTask printingTask = new PrintingTask(robot); + + // the actions we will use to wander + ArActionStallRecover recover = new ArActionStallRecover(); + ArActionAvoidFront avoidFront = new ArActionAvoidFront(); + ArActionConstantVelocity constantVelocity = new ArActionConstantVelocity("Constant Velocity", 400); + + + // add the sonar object to the robot + robot.addRangeDevice(sonar); + + // open the connection to the robot; if this fails exit + if(!con.connectRobot(robot)) + { + System.err.println("Could not connect to the robot."); + System.exit(1); + } + System.out.println("Java robotSyncTaskExample: Connected to the robot. (Press Ctrl-C to exit)"); + + + // turn on the motors + robot.enableMotors(); + + // add the wander actions + robot.addAction(recover, 100); + robot.addAction(avoidFront, 50); + robot.addAction(constantVelocity, 25); + + // Start the robot process cycle running. Each cycle, it calls the robot's + // tasks. When the PrintingTask was created above, it added a new + // task to the robot. 'true' means that if the robot connection + // is lost, then ArRobot's processing cycle ends and this call returns. + robot.run(true); + + System.out.println("Java robotSyncTaskExample: Disconnected. Goodbye."); + + } +} diff --git a/Legacy/Aria/javaExamples/simple.java b/Legacy/Aria/javaExamples/simple.java new file mode 100644 index 0000000..5a1c117 --- /dev/null +++ b/Legacy/Aria/javaExamples/simple.java @@ -0,0 +1,71 @@ + +/* A simple example of connecting to and driving the robot with direct + * motion commands. + */ + +import com.mobilerobots.Aria.*; + +public class simple { + + static { + try { + System.loadLibrary("AriaJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library libAriaJava failed to load. Make sure that its directory is in your library path; See javaExamples/README.txt and the chapter on Dynamic Linking Problems in the SWIG Java documentation (http://www.swig.org) for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) { + System.out.println("Starting Java Test"); + + Aria.init(); + + ArRobot robot = new ArRobot(); + ArSimpleConnector conn = new ArSimpleConnector(argv); + + if(!Aria.parseArgs()) + { + Aria.logOptions(); + Aria.exit(1); + } + + if (!conn.connectRobot(robot)) + { + System.err.println("Could not connect to robot, exiting.\n"); + System.exit(1); + } + robot.runAsync(true); + robot.lock(); + System.out.println("Sending command to move forward 1 meter..."); + robot.enableMotors(); + robot.move(1000); + robot.unlock(); + System.out.println("Sleeping for 5 seconds..."); + ArUtil.sleep(5000); + robot.lock(); + System.out.println("Sending command to rotate 90 degrees..."); + robot.setHeading(90); + robot.unlock(); + System.out.println("Sleeping for 5 seconds..."); + ArUtil.sleep(5000); + robot.lock(); + System.out.println("Robot coords: robot.getX()=" + robot.getX() + ", robot.getY()=" + robot.getY() + ", robot.getTh()=" + robot.getTh()); + ArPose p = robot.getPose(); + System.out.println(" pose.getX()=" + p.getX() + ", pose.getY()=" + p.getY() + ", pose.getTh()=" + p.getTh()); + double[] xout = {0}; + double[] yout = {0}; + double[] thout = {0}; + p.getPose(xout, yout, thout); + System.out.println(" pose.getPose(): x=" + xout[0] + ", y=" + yout[0] + ", th=" + thout[0]); + robot.unlock(); + robot.lock(); + System.out.println("exiting."); + robot.stopRunning(true); + robot.unlock(); + robot.lock(); + robot.disconnect(); + robot.unlock(); + Aria.exit(0); + } +} diff --git a/Legacy/Aria/javaExamples/socket.java b/Legacy/Aria/javaExamples/socket.java new file mode 100644 index 0000000..19685cc --- /dev/null +++ b/Legacy/Aria/javaExamples/socket.java @@ -0,0 +1,54 @@ + + +import com.mobilerobots.Aria.*; + +public class socket { + + static { + try { + System.loadLibrary("AriaJava"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library libAriaJava failed to load. Make sure that its directory is in your library path; See javaExamples/README.txt and the chapter on Dynamic Linking Problems in the SWIG Java documentation (http://www.swig.org) for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) { + Aria.init(); + ArSocket s1 = new ArSocket(); // server socket. accepts clients. + ArSocket s2 = new ArSocket(); // client + ArSocket s1client = new ArSocket(); // used by server to communicate with client + if (!s1.open(6789, ArSocket.Type.TCP)) { + System.err.println("Error opening first TCP socket on port 6789."); + Aria.exit(1); + } + System.out.println("First socket opened and listening on port 6789."); + System.out.println("Connecting second socket to localhost port 6789..."); + if (!s2.connect("localhost", 6789)) { + System.err.println("Error connecting second TCP socket to local host port 6789"); + Aria.exit(2); + } + if (!s1.accept(s1client)) { + System.err.println("Error accepting client on first socket."); + Aria.exit(3); + } + System.out.println("Connected."); + System.out.println("Second socket is sending \"hello\" to first..."); + s2.write("hello"); + String text = new String(""); + text = s1client.read(512, 5000); // arguments are buffer size and timeout to wait + /* + while(text.length() == 0) + { + text = s1client.read(512, 5000); // arguments are buffer size and timeout to wait + } + */ + System.out.println("=> First socket recieved \""+text+"\" ("+text.length()+")"); + System.out.println("First socket is sending \"hello\" to second..."); + s1client.write("hello"); + text = s2.read(512, 5000); + System.out.println("=> Second socket recieved \""+text+"\""); + s2.close(); + Aria.exit(0); + } +} diff --git a/Legacy/Aria/lib/libAria.so b/Legacy/Aria/lib/libAria.so new file mode 100644 index 0000000..ee2c0c5 Binary files /dev/null and b/Legacy/Aria/lib/libAria.so differ diff --git a/Legacy/Aria/maps/ActivMediaLab.map b/Legacy/Aria/maps/ActivMediaLab.map new file mode 100644 index 0000000..2532bb2 --- /dev/null +++ b/Legacy/Aria/maps/ActivMediaLab.map @@ -0,0 +1,78 @@ +2D-Map +LineMinPos: 0 0 +LineMaxPos: 12640 5759 +NumLines: 71 +Cairn: RobotHome 7760 675 0 "" ICON "Home" +LINES +1820 1239 1820 3719 +6410 5619 6980 5619 +7930 4369 7930 4919 +11710 1749 11710 859 +0 3489 0 2599 +10 2599 250 2599 +10180 10 10180 360 +12070 5759 12090 5759 +10130 360 10170 360 +560 1869 790 1869 +7940 4369 8100 4369 +12090 4969 12090 5759 +6310 5019 6410 5019 +6310 5019 6310 4909 +1820 1244 8090 1244 +790 2399 790 1869 +7600 4919 7600 5019 +5500 3359 7870 3359 +8090 2259 8090 1259 +6980 5019 7590 5019 +10130 370 10130 80 +8760 70 10140 70 +8100 4919 10120 4919 +8100 4909 8100 4369 +275 0 8700 0 +12540 3409 12640 3409 +10190 10 11620 10 +6410 5619 6410 5019 +450 3619 450 3489 +10790 5749 10790 4999 +440 3619 1210 3619 +8070 3509 8070 3049 +1246 703 1243 4 +1243 4 444 7 +444 7 447 706 +447 706 1246 703 +11620 869 11620 9 +8000 2259 8090 2259 +10 3489 450 3489 +11610 2029 11610 1739 +11620 1749 11710 1749 +8700 350 8750 350 +12090 4969 12525 4969 +12540 4954 12540 3394 +10120 4999 10790 4999 +7610 4919 7930 4919 +5490 4909 6310 4909 +7980 3049 8070 3049 +5490 4899 5490 3369 +260 1319 260 14 +11610 2020 12610 2020 +12610 2020 12610 3380 +270 2399 770 2399 +6980 5019 6980 5619 +1210 3719 1830 3719 +7880 3349 7880 3509 +270 1319 550 1319 +560 1859 560 1329 +11620 869 11710 869 +10120 4999 10120 4919 +8750 70 8750 340 +10790 5759 12090 5759 +8700 350 8700 10 +7990 3049 7990 2259 +260 2589 260 2399 +1210 3719 1210 3619 +7900 3509 8060 3509 +8510 2122 8510 1602 +8510 1602 8110 1602 +8110 1602 8110 2122 +8110 2122 8510 2122 +DATA diff --git a/Legacy/Aria/maps/columbia.map b/Legacy/Aria/maps/columbia.map new file mode 100644 index 0000000..a6af792 --- /dev/null +++ b/Legacy/Aria/maps/columbia.map @@ -0,0 +1,63824 @@ +2D-Map +MinPos: -4780 -27000 +MaxPos: 19560 24680 +NumPoints: 63311 +PointsAreSorted: true +Resolution: 20 +LineMinPos: -4756 -26950 +LineMaxPos: 19533 19394 +NumLines: 470 +LinesAreSorted: true +MapInfo: BoundaryType Name=Measure "Label=Measuring stick" "Desc=Line that displays its length" Shape=Measure Color0=0xdd03e0 +MapInfo: DockType Name=Dock "Label=Unspecified dock" TaskListCount=10 TaskListIds=DockForcedDock|DockIdleDock|DockRequestedDock|DockDrivingToDock|DockDrivingIntoDock|DockDocked|DockNowUnforced|DockNowForced|DockUndocking|DockUndocked "TaskListLabels=Forced dock|Idle dock|Requested dock|Driving to dock|Driving into dock|Docked|Dock now unforced|Dock now forced|Undocking|Undocked" TaskClasses=Instant NameRequired=1 +MapInfo: DockType Name=DockPatrolBot "Label=PatrolBot dock" TaskListCount=10 TaskListIds=DockForcedDock|DockIdleDock|DockRequestedDock|DockDrivingToDock|DockDrivingIntoDock|DockDocked|DockNowUnforced|DockNowForced|DockUndocking|DockUndocked "TaskListLabels=Forced dock|Idle dock|Requested dock|Driving to dock|Driving into dock|Docked|Dock now unforced|Dock now forced|Undocking|Undocked" TaskClasses=Instant NameRequired=1 +MapInfo: DockType Name=DockPatrolBotNiMH "Label=PatrolBot NiMH dock" TaskListCount=10 TaskListIds=DockForcedDock|DockIdleDock|DockRequestedDock|DockDrivingToDock|DockDrivingIntoDock|DockDocked|DockNowUnforced|DockNowForced|DockUndocking|DockUndocked "TaskListLabels=Forced dock|Idle dock|Requested dock|Driving to dock|Driving into dock|Docked|Dock now unforced|Dock now forced|Undocking|Undocked" TaskClasses=Instant NameRequired=1 +MapInfo: DockType Name=DockPioneer "Label=Pioneer dock" TaskListCount=10 TaskListIds=DockForcedDock|DockIdleDock|DockRequestedDock|DockDrivingToDock|DockDrivingIntoDock|DockDocked|DockNowUnforced|DockNowForced|DockUndocking|DockUndocked "TaskListLabels=Forced dock|Idle dock|Requested dock|Driving to dock|Driving into dock|Docked|Dock now unforced|Dock now forced|Undocking|Undocked" TaskClasses=Instant NameRequired=1 +MapInfo: DockType Name=DockPowerBot "Label=PowerBot dock" TaskListCount=10 TaskListIds=DockForcedDock|DockIdleDock|DockRequestedDock|DockDrivingToDock|DockDrivingIntoDock|DockDocked|DockNowUnforced|DockNowForced|DockUndocking|DockUndocked "TaskListLabels=Forced dock|Idle dock|Requested dock|Driving to dock|Driving into dock|Docked|Dock now unforced|Dock now forced|Undocking|Undocked" TaskClasses=Instant NameRequired=1 +MapInfo: GoalType Name=Goal +MapInfo: LocationType Name=Label "Label=Label" "Desc=Fixed-size text label" Color0=0x000000 Color1=0xffffff Shape=Label FtFix=1 FtSize=18 +Cairn: ForbiddenLine -5536 -27106 0.000000 "" ICON "" -5536 -27106 10917 -27106 +Cairn: ForbiddenLine -4980 8880 0.000000 "" ICON "" -4980 8880 -4980 -27738 +Cairn: ForbiddenLine -4959 -18161 0.000000 "" ICON "" -4959 -18161 5637 -18160 +Cairn: ForbiddenLine -4880 -20700 0.000000 "" ICON "" -4880 -20700 5639 -20701 +Cairn: ForbiddenArea 0 0 0.000000 "" ICON "" -4540 -10800 -3080 -7780 +Cairn: Goal -3961 -8481 0.000000 "" ICON "Inside Forbidden Area" +Cairn: GoalWithHeading -1860 -22440 -48.576300 "" ICON "Lobby door" +Cairn: Goal -1603 -13238 0.000000 "" ICON "Impossible Goal" +Cairn: GoalWithHeading -785 177 0.000000 "" ICON "dock" +Cairn: RobotHome -182 176 0.000000 "" ICON "" +Cairn: ForbiddenArea 0 0 0.000000 "" ICON "" 280 -14900 3900 -13000 +Cairn: ForbiddenLine 540 19340 0.000000 "" ICON "" 540 19340 540 9020 +Cairn: ForbiddenLine 720 9060 0.000000 "" ICON "" 720 9060 -5060 9060 +Cairn: Goal 1700 18320 0.000000 "" ICON "Hallway 1" +Cairn: ForbiddenLine 10374 -11043 0.000000 "" ICON "" 10374 -11043 10374 -27374 +Cairn: Goal 12900 18420 0.000000 "" ICON "Hallway 2" +Cairn: Goal 13020 -12197 0.000000 "" ICON "Workshop" +Cairn: ForbiddenLine 13740 8480 0.000000 "" ICON "" 13740 8480 19680 8480 +Cairn: GoalWithHeading 17980 -9640 0.000000 "" ICON "Side door" +Cairn: ForbiddenLine 19620 19500 0.000000 "" ICON "" 19620 19500 680 19500 +Cairn: ForbiddenLine 19680 -11100 0.000000 "" ICON "" 19680 -11100 19680 19340 +Cairn: ForbiddenLine 19780 -17720 0.000000 "" ICON "" 19780 -17720 7740 -17720 +Cairn: ForbiddenLine 19820 -11040 0.000000 "" ICON "" 19820 -11040 19820 -17820 +LINES +-4756 7542 -4756 3523 +-4740 8862 -4740 7542 +-4705 -10825 -4705 -12798 +-4696 -15203 -4213 -15203 +-4696 -14060 -4696 -15203 +-4687 8837 841 8837 +-4686 -1851 -4686 -2538 +-4682 656 -4682 -294 +-4681 -294 -4681 -1851 +-4672 -7612 -4672 -10723 +-4656 -3027 -4656 -4167 +-4585 -7716 -4585 10601 +-4369 -12798 -4369 -13762 +-4266 -17817 -2236 -17817 +-4225 -13762 -4225 -14060 +-4202 -10683 -4405 -10940 +-4180 -22921 -4180 -23422 +-4002 -10691 -4298 -11078 +-3690 -3863 -1872 -3863 +-3506 -1605 -3506 -2142 +-3192 -9359 -3362 -9783 +-3169 -20919 -3169 -21760 +-3164 3045 -2359 3045 +-3078 -23539 -503 -23539 +-3078 -22977 -3078 -23539 +-3075 -22298 -3663 -22619 +-3075 -21760 -3075 -22298 +-2693 1092 -2165 1092 +-2502 -20919 -3169 -20919 +-2319 1057 -2693 1057 +-2319 2910 -2319 1057 +-2236 -18031 -1521 -18031 +-2165 563 -3095 563 +-2165 1092 -2165 563 +-2050 8930 -2853 8930 +-1977 -13693 -1977 -12779 +-1977 -12779 -1228 -12779 +-1872 -3863 -1872 -5784 +-1848 -5784 -1848 -6823 +-1215 -18918 -1215 -19484 +-1169 -12854 -1169 -10778 +-1169 -10778 1326 -10778 +-1160 -17819 -1160 -13697 +-1160 -13697 -1839 -13697 +-1077 -12078 -1077 -12854 +-1076 -21403 -2061 -21403 +-1075 -21073 -1075 -21403 +-1066 -11464 -1066 -12078 +-711 -21073 -1075 -21073 +-619 -7251 49 -7251 +-611 -8090 -611 -8462 +-549 -21552 -1078 -21552 +-549 -21016 -549 -21552 +-503 -23539 -503 -22582 +-435 -26892 10479 -26892 +-435 -26085 63 -26085 +-435 -22931 -435 -26892 +-414 -14412 -315 -14818 +-396 -22923 59 -22923 +-396 -22582 -396 -22923 +-272 -23828 245 -23828 +-74 2753 -74 3359 +-74 3359 679 3359 +13 1004 133 1386 +45 4860 45 5242 +45 5242 619 5242 +59 -22923 59 -23654 +63 -26099 63 -26862 +96 -26897 1584 -26897 +129 1387 39 1085 +174 -5432 665 -5432 +245 -23741 245 -24387 +465 841 613 1359 +480 179 540 443 +507 782 -9 921 +574 7525 -208 7525 +586 -25 480 179 +622 -20934 -711 -20934 +649 4860 45 4860 +665 -5432 665 -4195 +679 3359 679 4860 +694 -19065 694 -19845 +734 -19964 52 -19964 +736 6590 736 7594 +749 -4195 749 -3862 +754 14804 754 13885 +760 -2702 760 25 +763 417 763 2753 +763 2753 -74 2753 +815 19287 815 14804 +855 13885 855 6590 +861 -7612 -4672 -7612 +861 -3876 861 -7612 +866 5609 866 -2695 +871 -17002 1774 -17002 +882 -13756 1023 -13897 +1119 -25351 1648 -25351 +1149 -24442 1574 -24442 +1220 -23967 1220 -23501 +1220 -23501 1908 -23501 +1326 -10778 1326 -10856 +1360 -10926 764 -11672 +1508 -20954 1508 -19891 +1536 -13520 1791 -13520 +1558 19140 1375 19244 +1604 -24427 1604 -25425 +1908 -23483 2601 -23483 +1956 -23561 1956 -26950 +2078 -19711 2450 -20789 +2229 -10784 5239 -10784 +2232 19268 1558 19140 +2405 -20954 1508 -20954 +2450 -20789 2405 -20954 +2591 -17025 3311 -17025 +2600 -23372 3101 -23372 +2601 -23483 2601 -22935 +2601 -22935 3096 -22935 +2675 -7512 2675 19253 +2675 19253 2253 19163 +2682 18004 2682 17376 +2691 15999 2691 13579 +2714 10213 2714 9786 +2716 5524 2716 5045 +2718 13579 2718 13051 +2734 11716 2734 10791 +2749 -6882 2749 -7512 +2749 -2413 3518 -2413 +2749 3142 2749 -2413 +2753 4543 2753 4051 +2755 13051 2755 11716 +2763 4051 2763 3142 +2764 6333 2764 5524 +2775 -3540 3520 -3540 +2775 -2954 2775 -3540 +2790 6817 2790 6333 +2825 -4379 2825 -5255 +2914 -19714 2248 -19580 +2986 -13871 3128 -13729 +3059 12879 3059 12533 +3096 -22935 3096 -23491 +3101 -23491 4417 -23491 +3144 8624 3144 8177 +3163 -6272 3163 -6720 +3227 17093 3227 16709 +3256 8184 3441 6997 +3293 18004 2682 18004 +3307 13714 4579 13714 +3351 -7116 3736 -7116 +3356 -3956 3472 -4337 +3369 14588 3692 14694 +3433 -20228 3433 -18534 +3473 3094 4570 3094 +3518 -2413 3518 -2804 +3520 -3540 3520 -3932 +3594 -5488 3725 -5667 +3725 -5667 3681 -5984 +3736 -7497 7036 -7497 +3905 -10892 2229 -10892 +3970 -20228 3433 -20228 +4063 3103 5850 3103 +4251 19044 3327 19044 +4393 14159 5490 14159 +4417 -23386 5001 -23386 +4434 13658 4489 13237 +4475 -23393 5056 -23393 +4508 -22943 5053 -22943 +4570 3016 2749 3016 +4653 -10885 3905 -10885 +4868 -12174 5066 -11787 +4900 11884 5306 11884 +5001 -23488 5631 -23488 +5034 18197 4551 18197 +5080 13762 5719 13762 +5081 -6363 5650 -6363 +5118 2432 5222 1829 +5136 -12183 5136 -10958 +5146 -16029 5146 -12183 +5207 2426 5072 2426 +5207 3020 5207 2426 +5222 1829 4879 1829 +5239 -17797 5904 -17797 +5239 -10958 5239 -17797 +5375 -26851 5375 -25007 +5375 -25007 3772 -25007 +5426 11958 5593 11690 +5434 10261 5162 10261 +5434 10608 5434 10261 +5490 14174 4393 14174 +5593 11690 5891 11690 +5606 -26909 6981 -26909 +5687 18948 5046 18948 +5704 -6394 5704 -6548 +5711 -6494 5673 -6452 +5715 -20949 3333 -20949 +5715 -18119 5715 -20949 +5719 13639 4437 13639 +5719 13762 5719 13639 +5723 3484 5852 3020 +5723 3798 5723 3484 +5850 3020 5207 3020 +5891 11637 6142 11637 +5904 -17797 5824 -18132 +6142 10796 5419 10796 +6142 11185 5929 11185 +6142 11637 6142 11185 +6253 -26609 6253 -26796 +6318 -26598 6845 -26598 +6496 -24504 6496 -23485 +6496 -23485 6963 -23485 +6504 -23488 6944 -23488 +6638 8172 7221 8172 +6713 13742 7698 13742 +6765 13541 6718 13743 +6771 -17793 7431 -17793 +6785 7839 6638 8172 +6863 18000 6469 18109 +6876 -18147 6771 -17793 +6931 -20976 6931 -18138 +6943 -22390 6943 -21853 +6943 -21853 7959 -21692 +6944 -23488 6944 -26877 +6993 3021 6993 3621 +6993 3621 7699 3621 +7012 14149 7631 14231 +7015 -5334 7015 -4357 +7015 -4357 10977 -4357 +7036 -7497 7036 -6311 +7052 14708 7120 15003 +7070 14877 6884 14877 +7106 -4442 7106 -5334 +7115 -6311 7115 -7247 +7143 7354 7183 7511 +7219 -7266 7570 -7266 +7220 4369 7220 5038 +7220 5038 7425 5077 +7221 8162 7374 8292 +7378 9765 7470 10006 +7395 13902 7395 14143 +7431 -17793 7431 -10770 +7431 -10770 8441 -10770 +7433 8130 7209 8130 +7470 10006 7646 10103 +7474 13041 7474 13364 +7480 4205 7220 4369 +7539 -20739 6968 -20739 +7570 -7132 7852 -7132 +7572 -24026 10233 -24026 +7579 -20729 10263 -20729 +7588 15155 7588 15958 +7607 14143 7607 14387 +7616 8276 7636 8276 +7632 8278 7616 8276 +7643 7270 7359 7420 +7646 10053 7674 10058 +7653 10088 7690 10067 +7655 14367 7655 14679 +7710 9628 7378 9765 +7727 13915 8153 13915 +7730 14679 7052 14679 +7796 13385 7840 13041 +7811 15133 8148 15133 +7840 13041 7474 13041 +7849 14547 8106 14450 +7852 -6863 8205 -6863 +7865 3021 6993 3021 +7884 9034 7884 9243 +7908 14198 8196 14198 +8000 13654 6708 13654 +8038 -24057 9082 -24057 +8042 14198 8042 13870 +8043 13870 8043 13654 +8091 14347 7655 14347 +8117 -23576 8040 -23148 +8142 15472 7811 15133 +8148 14870 7730 14870 +8148 15133 8148 14870 +8153 13915 7959 13756 +8196 14198 7735 13902 +8205 -6863 8205 -6674 +8205 -6674 8610 -6674 +8266 -4442 7106 -4442 +8273 15775 8409 15646 +8277 -4992 8355 -4455 +8286 16325 8351 16133 +8295 9323 8849 9323 +8297 16078 8404 15874 +8342 15710 8342 15627 +8351 16133 8297 16078 +8397 15634 8116 15527 +8421 11214 8421 11809 +8441 -12020 8659 -11902 +8441 -10770 8441 -12020 +8474 11348 9527 11348 +8481 18589 8481 17131 +8490 4952 8490 5439 +8490 5439 9398 5439 +8561 16325 8286 16325 +8561 17131 8561 16325 +8610 -7199 9279 -7199 +8610 -6674 8610 -7199 +8635 3483 9344 3483 +8659 -11902 8870 -12250 +8794 -5086 8277 -4992 +8877 -6408 8989 -6156 +8877 -4574 8794 -5086 +9040 13692 11314 13692 +9102 -2611 9062 -2369 +9134 19024 8618 19024 +9279 -7199 9279 -6703 +9279 -6703 9687 -6703 +9319 -10765 10126 -10765 +9527 11348 9156 12100 +9537 13229 9537 13622 +9537 13622 9040 13622 +9551 -21776 9551 -20989 +9631 18600 9333 18656 +9687 -7500 10068 -7500 +9687 -6703 9687 -7500 +9997 -13351 10310 -13305 +10068 -7616 2675 -7616 +10126 -10765 10126 -10391 +10126 -10391 10895 -10391 +10158 -20754 10158 -20338 +10233 -24026 10233 -17765 +10457 19055 9856 18965 +10465 -11876 10465 -11499 +10496 2716 7865 2716 +10578 -12731 11154 -12731 +10688 12983 10688 13370 +10895 -10281 11635 -10281 +10922 -7509 11232 -6541 +10980 -7594 10980 -7514 +11154 -12717 11154 -12272 +11165 -11746 11165 -11381 +11306 -11627 11306 -17613 +11308 -11381 11308 -11746 +11310 -11062 11310 -11467 +11312 -12272 11312 -12704 +11363 -5097 11363 -4529 +11479 18951 10463 19102 +11510 -4465 8176 -4465 +11635 -10761 12529 -10761 +11635 -10281 11635 -10761 +11649 -12746 11649 -14225 +11757 -11169 11350 -11169 +11789 -14625 12231 -14625 +11825 9814 11825 10388 +11849 6326 11849 7195 +11879 11815 11879 12220 +11882 8411 11882 8920 +11884 -2719 11884 3014 +11884 3014 10496 3014 +11905 -6892 11905 -5097 +11905 -5097 11363 -5097 +11937 4370 11937 4899 +11945 14243 11945 14725 +11953 19394 11953 12755 +11962 -7594 10980 -7594 +11962 14780 11962 -7594 +11966 14725 11966 16648 +11981 16648 11981 17463 +12137 -13754 12137 -14463 +12146 -13773 11735 -13773 +12198 -17646 12742 -17646 +12529 -10761 12352 -11791 +12687 19368 12394 19368 +12740 -14626 11758 -14626 +13056 -16615 13359 -16615 +13340 19304 13101 19348 +13378 -10753 19366 -10753 +13384 -10859 13384 -10768 +13537 -17479 7921 -17479 +13563 19370 13340 19304 +13604 -11838 13604 -10865 +13604 -10865 13378 -10865 +13766 869 13766 17485 +13770 18476 13770 19337 +13793 -6532 13793 -204 +13814 -8441 13814 -7491 +13872 17284 15506 17284 +13872 17485 13872 17284 +13878 2935 13878 769 +13880 19337 13880 18476 +13885 -1169 14390 -1085 +13885 -204 13885 -1169 +13987 -1682 13987 -2353 +14018 12862 14597 12862 +14041 1365 14041 869 +14080 -7860 15025 -7860 +14083 15161 14657 15161 +14094 -15260 14150 -15203 +14094 -15165 14094 -15260 +14119 -13843 14215 -13843 +14145 -13782 14145 -13895 +14165 -17514 14793 -17514 +14262 -11838 13604 -11838 +14360 -718 15012 -718 +14482 -15969 14880 -15969 +14577 -14958 14837 -14958 +14670 -3178 15611 -3404 +14716 -13843 14837 -13843 +14750 -15243 14802 -15190 +14750 -15148 14750 -15243 +14752 -1160 14752 -1651 +14776 -13782 14776 -13912 +15025 -7932 16029 -7932 +15176 1367 15176 942 +15194 2198 14750 2075 +15219 -1097 15244 -1097 +15226 -10943 14871 -10943 +15365 13600 15745 13600 +15401 -6055 15401 -5735 +15401 -5735 14042 -5735 +15506 17284 15506 16580 +15545 -594 15678 -736 +15611 -3404 15545 -3802 +15620 -2128 15778 -2332 +15638 -3817 14817 -3630 +15644 -610 15673 -739 +15677 -737 15306 -1166 +15747 -1160 14752 -1160 +15778 -2642 15591 -2783 +15778 -2332 15778 -2642 +15828 -6055 15401 -6055 +15853 2722 15170 2722 +15874 -16643 14958 -16643 +15874 -16314 15874 -16643 +15894 -4903 15894 -5870 +16029 -8060 16399 -8060 +16161 -663 16059 -897 +16276 -8441 13814 -8441 +16294 -11866 16046 -11528 +16332 -16314 15874 -16314 +16356 -8440 19333 -8440 +16464 -3733 15743 -3844 +16715 14303 16715 15654 +16715 15654 17542 15654 +16886 -5581 17180 -5463 +17124 -8330 17124 -7954 +17210 -5551 16881 -5551 +17326 -1021 17188 -269 +17396 -6331 17396 -5551 +17554 -1155 17294 -1193 +17600 -1604 17553 -1271 +17646 17130 17646 19286 +17646 19286 13880 19286 +17819 -1687 17600 -1604 +17834 -11609 19316 -11609 +17834 -11348 17834 -11609 +17898 -8043 18494 -8043 +18005 -12394 18005 -12758 +18293 -5551 18293 -5222 +18348 14828 18855 14828 +18471 -1181 17982 -1181 +18503 15971 18503 16358 +18624 -8038 18624 -7597 +19197 -6851 19197 -6538 +19213 -7577 19213 -6851 +19282 2221 19282 3514 +19306 -5119 19306 -4701 +19316 -11609 19316 -17468 +19324 -2072 19324 -1654 +19325 -4701 19325 -3268 +19333 -9011 19533 -9211 +19333 -8440 19333 -9011 +19333 -3268 19333 -2072 +19353 -10328 19353 -10806 +19366 -17468 13507 -17468 +19529 -10196 19529 -9192 +19529 -10153 19353 -10328 +DATA +-4780 -16460 +-4780 3300 +-4780 3360 +-4780 3400 +-4780 6380 +-4760 -16640 +-4760 -16620 +-4760 -16600 +-4760 -16580 +-4760 -16560 +-4760 -16540 +-4760 -16520 +-4760 -16500 +-4760 -16480 +-4760 -16460 +-4760 -16440 +-4760 -16420 +-4760 -16400 +-4760 -16380 +-4760 -16360 +-4760 -16340 +-4760 -16320 +-4760 -16300 +-4760 -16260 +-4760 -16240 +-4760 -16220 +-4760 3540 +-4760 3560 +-4760 3580 +-4760 3600 +-4760 3620 +-4760 3640 +-4760 3660 +-4760 3680 +-4760 3700 +-4760 3720 +-4760 3740 +-4760 3760 +-4760 3780 +-4760 3800 +-4760 3820 +-4760 3840 +-4760 3860 +-4760 3880 +-4760 3900 +-4760 3920 +-4760 3940 +-4760 3960 +-4760 3980 +-4760 4000 +-4760 4020 +-4760 4040 +-4760 4060 +-4760 4080 +-4760 4100 +-4760 4120 +-4760 4140 +-4760 4160 +-4760 4180 +-4760 4200 +-4760 4220 +-4760 4240 +-4760 4260 +-4760 4280 +-4760 4300 +-4760 4320 +-4760 4340 +-4760 4360 +-4760 4380 +-4760 4400 +-4760 4420 +-4760 4440 +-4760 4460 +-4760 4480 +-4760 4500 +-4760 4520 +-4760 4540 +-4760 4560 +-4760 4580 +-4760 4600 +-4760 4620 +-4760 4640 +-4760 4660 +-4760 4680 +-4760 4700 +-4760 4720 +-4760 4740 +-4760 4760 +-4760 4780 +-4760 4800 +-4760 4820 +-4760 4840 +-4760 4860 +-4760 4880 +-4760 4900 +-4760 4920 +-4760 4940 +-4760 4960 +-4760 4980 +-4760 5000 +-4760 5020 +-4760 5040 +-4760 5060 +-4760 5080 +-4760 5100 +-4760 5120 +-4760 5140 +-4760 5160 +-4760 5180 +-4760 5200 +-4760 5220 +-4760 5240 +-4760 5260 +-4760 5280 +-4760 5300 +-4760 5320 +-4760 5340 +-4760 5360 +-4760 5380 +-4760 5400 +-4760 5420 +-4760 5440 +-4760 5460 +-4760 5480 +-4760 5500 +-4760 5520 +-4760 5540 +-4760 5560 +-4760 5580 +-4760 5600 +-4760 5620 +-4760 5640 +-4760 5660 +-4760 5680 +-4760 5700 +-4760 5720 +-4760 5740 +-4760 5760 +-4760 5800 +-4760 5820 +-4760 5840 +-4760 5860 +-4760 5880 +-4760 5900 +-4760 5920 +-4760 5940 +-4760 5960 +-4760 5980 +-4760 6000 +-4760 6020 +-4760 6040 +-4760 6060 +-4760 6080 +-4760 6100 +-4760 6120 +-4760 6140 +-4760 6160 +-4760 6180 +-4760 6200 +-4760 6220 +-4760 6240 +-4760 6260 +-4760 6280 +-4760 6300 +-4760 6320 +-4760 6340 +-4760 6360 +-4760 6380 +-4760 6400 +-4760 6420 +-4760 6440 +-4760 6460 +-4760 6480 +-4760 6500 +-4760 6520 +-4760 6540 +-4760 6560 +-4760 6580 +-4760 6600 +-4760 6620 +-4760 6640 +-4760 6660 +-4760 6680 +-4760 6700 +-4760 6720 +-4760 6740 +-4760 6760 +-4760 6780 +-4760 6800 +-4760 6820 +-4760 6840 +-4760 6860 +-4760 6880 +-4760 6900 +-4760 6920 +-4760 6960 +-4760 6980 +-4760 7000 +-4760 7020 +-4760 7040 +-4760 7060 +-4760 7080 +-4760 7100 +-4760 7120 +-4760 7140 +-4760 7160 +-4760 7200 +-4760 7220 +-4760 7260 +-4760 7300 +-4760 7320 +-4760 7340 +-4760 7400 +-4760 7440 +-4760 7500 +-4760 7520 +-4760 7700 +-4760 7880 +-4760 7980 +-4760 8060 +-4760 8080 +-4760 8200 +-4760 8300 +-4760 8360 +-4760 8400 +-4760 8540 +-4760 8720 +-4760 8800 +-4740 -16640 +-4740 -15040 +-4740 -14920 +-4740 -14800 +-4740 -14740 +-4740 -14660 +-4740 -12780 +-4740 -12700 +-4740 -12620 +-4740 -12580 +-4740 -12520 +-4740 -12500 +-4740 -12440 +-4740 -12380 +-4740 -12320 +-4740 -12300 +-4740 -12260 +-4740 -12200 +-4740 -12160 +-4740 -12120 +-4740 -12080 +-4740 -12020 +-4740 -11980 +-4740 -11840 +-4740 -11820 +-4740 -11740 +-4740 -11660 +-4740 -11580 +-4740 -11520 +-4740 -11500 +-4740 -11480 +-4740 -11440 +-4740 -11420 +-4740 -11340 +-4740 -11200 +-4740 -11160 +-4740 3300 +-4740 3520 +-4740 3560 +-4740 3580 +-4740 3600 +-4740 3640 +-4740 3660 +-4740 3680 +-4740 3700 +-4740 3740 +-4740 3760 +-4740 3780 +-4740 3800 +-4740 3820 +-4740 3840 +-4740 3920 +-4740 3940 +-4740 3960 +-4740 3980 +-4740 4000 +-4740 4020 +-4740 4040 +-4740 4060 +-4740 4080 +-4740 4100 +-4740 4120 +-4740 4140 +-4740 4160 +-4740 4180 +-4740 4200 +-4740 4220 +-4740 4240 +-4740 4260 +-4740 4280 +-4740 4300 +-4740 4320 +-4740 4360 +-4740 4380 +-4740 4400 +-4740 4420 +-4740 4440 +-4740 4460 +-4740 4480 +-4740 4540 +-4740 4560 +-4740 4600 +-4740 4620 +-4740 4640 +-4740 4660 +-4740 4680 +-4740 4700 +-4740 4720 +-4740 4740 +-4740 4760 +-4740 4780 +-4740 4800 +-4740 4840 +-4740 4860 +-4740 4880 +-4740 4900 +-4740 4920 +-4740 4940 +-4740 4960 +-4740 4980 +-4740 5000 +-4740 5020 +-4740 5040 +-4740 5060 +-4740 5080 +-4740 5100 +-4740 5120 +-4740 5140 +-4740 5160 +-4740 5180 +-4740 5200 +-4740 5220 +-4740 5240 +-4740 5260 +-4740 5280 +-4740 5300 +-4740 5320 +-4740 5340 +-4740 5360 +-4740 5380 +-4740 5400 +-4740 5440 +-4740 5480 +-4740 5500 +-4740 5520 +-4740 5540 +-4740 5560 +-4740 5580 +-4740 5600 +-4740 5620 +-4740 5640 +-4740 5680 +-4740 5700 +-4740 5720 +-4740 5740 +-4740 5760 +-4740 5780 +-4740 5800 +-4740 5820 +-4740 5840 +-4740 5860 +-4740 5880 +-4740 5900 +-4740 5920 +-4740 5960 +-4740 5980 +-4740 6000 +-4740 6020 +-4740 6040 +-4740 6060 +-4740 6080 +-4740 6100 +-4740 6120 +-4740 6140 +-4740 6160 +-4740 6180 +-4740 6200 +-4740 6220 +-4740 6260 +-4740 6280 +-4740 6300 +-4740 6320 +-4740 6340 +-4740 6360 +-4740 6380 +-4740 6400 +-4740 6420 +-4740 6440 +-4740 6480 +-4740 6500 +-4740 6520 +-4740 6540 +-4740 6560 +-4740 6580 +-4740 6600 +-4740 6640 +-4740 6660 +-4740 6680 +-4740 6700 +-4740 6720 +-4740 6740 +-4740 6760 +-4740 6780 +-4740 6800 +-4740 6820 +-4740 6840 +-4740 6860 +-4740 6880 +-4740 6900 +-4740 6920 +-4740 6940 +-4740 6960 +-4740 6980 +-4740 7000 +-4740 7040 +-4740 7060 +-4740 7080 +-4740 7100 +-4740 7120 +-4740 7140 +-4740 7160 +-4740 7180 +-4740 7200 +-4740 7220 +-4740 7240 +-4740 7260 +-4740 7280 +-4740 7300 +-4740 7320 +-4740 7340 +-4740 7380 +-4740 7420 +-4740 7440 +-4740 7480 +-4740 7500 +-4740 7580 +-4740 7600 +-4740 7680 +-4740 7760 +-4740 7780 +-4740 7860 +-4740 7900 +-4740 7960 +-4740 8000 +-4740 8060 +-4740 8100 +-4740 8120 +-4740 8140 +-4740 8160 +-4740 8180 +-4740 8200 +-4740 8240 +-4740 8260 +-4740 8280 +-4740 8300 +-4740 8340 +-4740 8360 +-4740 8380 +-4740 8400 +-4740 8420 +-4740 8460 +-4740 8480 +-4740 8500 +-4740 8520 +-4740 8540 +-4740 8580 +-4740 8620 +-4740 8640 +-4740 8660 +-4740 8680 +-4740 8700 +-4740 8740 +-4740 8760 +-4740 8780 +-4740 8800 +-4740 8840 +-4740 8860 +-4740 9440 +-4720 -16640 +-4720 -15200 +-4720 -15060 +-4720 -15000 +-4720 -14980 +-4720 -14920 +-4720 -14880 +-4720 -14700 +-4720 -14680 +-4720 -14620 +-4720 -14600 +-4720 -14440 +-4720 -14280 +-4720 -14260 +-4720 -14220 +-4720 -14200 +-4720 -14180 +-4720 -14160 +-4720 -14140 +-4720 -14100 +-4720 -14080 +-4720 -14060 +-4720 -12840 +-4720 -12820 +-4720 -12800 +-4720 -12780 +-4720 -12760 +-4720 -12740 +-4720 -12720 +-4720 -12700 +-4720 -12680 +-4720 -12660 +-4720 -12640 +-4720 -12620 +-4720 -12600 +-4720 -12580 +-4720 -12560 +-4720 -12540 +-4720 -12520 +-4720 -12500 +-4720 -12480 +-4720 -12460 +-4720 -12440 +-4720 -12420 +-4720 -12400 +-4720 -12380 +-4720 -12360 +-4720 -12340 +-4720 -12320 +-4720 -12300 +-4720 -12280 +-4720 -12260 +-4720 -12240 +-4720 -12220 +-4720 -12200 +-4720 -12180 +-4720 -12160 +-4720 -12140 +-4720 -12120 +-4720 -12100 +-4720 -12080 +-4720 -12060 +-4720 -12040 +-4720 -12020 +-4720 -12000 +-4720 -11980 +-4720 -11960 +-4720 -11940 +-4720 -11920 +-4720 -11900 +-4720 -11880 +-4720 -11860 +-4720 -11840 +-4720 -11820 +-4720 -11800 +-4720 -11780 +-4720 -11760 +-4720 -11740 +-4720 -11720 +-4720 -11700 +-4720 -11680 +-4720 -11660 +-4720 -11640 +-4720 -11620 +-4720 -11600 +-4720 -11580 +-4720 -11560 +-4720 -11540 +-4720 -11520 +-4720 -11500 +-4720 -11480 +-4720 -11460 +-4720 -11440 +-4720 -11420 +-4720 -11400 +-4720 -11380 +-4720 -11360 +-4720 -11340 +-4720 -11320 +-4720 -11300 +-4720 -11280 +-4720 -11260 +-4720 -11240 +-4720 -11220 +-4720 -11200 +-4720 -11180 +-4720 -11160 +-4720 -11140 +-4720 -11120 +-4720 -11100 +-4720 -11080 +-4720 -11060 +-4720 -11040 +-4720 -11020 +-4720 -11000 +-4720 -10980 +-4720 -10960 +-4720 -10940 +-4720 -10920 +-4720 -10900 +-4720 -10880 +-4720 -10860 +-4720 -10840 +-4720 -10820 +-4720 -10800 +-4720 -10780 +-4720 -10760 +-4720 -10700 +-4720 -10660 +-4720 -10640 +-4720 -10600 +-4720 -10560 +-4720 -10540 +-4720 -10520 +-4720 -10480 +-4720 -10440 +-4720 -10400 +-4720 -10380 +-4720 -10360 +-4720 -10320 +-4720 -10280 +-4720 -10200 +-4720 -10120 +-4720 -10100 +-4720 -10040 +-4720 -9920 +-4720 -9740 +-4720 -9220 +-4720 1840 +-4720 1860 +-4720 1880 +-4720 1900 +-4720 1940 +-4720 1960 +-4720 2000 +-4720 2040 +-4720 2060 +-4720 2080 +-4720 2100 +-4720 2120 +-4720 2140 +-4720 2160 +-4720 2180 +-4720 2200 +-4720 2220 +-4720 2240 +-4720 2260 +-4720 2280 +-4720 2300 +-4720 2340 +-4720 2360 +-4720 2380 +-4720 2400 +-4720 2420 +-4720 2440 +-4720 2460 +-4720 2500 +-4720 2520 +-4720 2600 +-4720 2820 +-4720 2840 +-4720 2880 +-4720 2980 +-4720 3000 +-4720 3040 +-4720 3060 +-4720 3080 +-4720 3100 +-4720 3120 +-4720 3140 +-4720 3160 +-4720 3180 +-4720 3200 +-4720 3220 +-4720 3240 +-4720 3320 +-4720 3540 +-4720 3560 +-4720 6720 +-4720 6740 +-4720 6920 +-4720 7020 +-4720 7080 +-4720 7200 +-4720 7240 +-4720 7260 +-4720 7280 +-4720 7300 +-4720 7320 +-4720 7340 +-4720 7360 +-4720 7420 +-4720 7480 +-4720 7540 +-4720 7580 +-4720 7640 +-4720 7660 +-4720 7760 +-4720 7780 +-4720 7840 +-4720 7860 +-4720 7880 +-4720 7900 +-4720 7960 +-4720 7980 +-4720 8000 +-4720 8040 +-4720 8080 +-4720 8120 +-4720 8160 +-4720 8180 +-4720 8200 +-4720 8220 +-4720 8240 +-4720 8260 +-4720 8300 +-4720 8320 +-4720 8340 +-4720 8360 +-4720 8380 +-4720 8420 +-4720 8440 +-4720 8480 +-4720 8500 +-4720 8520 +-4720 8540 +-4720 8560 +-4720 8580 +-4720 8600 +-4720 8620 +-4720 8640 +-4720 8660 +-4720 8700 +-4720 8720 +-4720 8760 +-4720 8820 +-4720 8840 +-4720 8860 +-4720 8880 +-4720 8900 +-4720 9020 +-4720 9080 +-4720 9260 +-4720 9420 +-4720 9460 +-4720 9620 +-4720 9640 +-4720 9740 +-4720 9820 +-4700 -16660 +-4700 -16640 +-4700 -15220 +-4700 -15200 +-4700 -15180 +-4700 -15160 +-4700 -15140 +-4700 -15120 +-4700 -15100 +-4700 -15080 +-4700 -15060 +-4700 -15040 +-4700 -15020 +-4700 -15000 +-4700 -14980 +-4700 -14960 +-4700 -14940 +-4700 -14920 +-4700 -14900 +-4700 -14880 +-4700 -14860 +-4700 -14840 +-4700 -14820 +-4700 -14800 +-4700 -14780 +-4700 -14760 +-4700 -14740 +-4700 -14720 +-4700 -14700 +-4700 -14680 +-4700 -14660 +-4700 -14640 +-4700 -14620 +-4700 -14600 +-4700 -14580 +-4700 -14560 +-4700 -14540 +-4700 -14520 +-4700 -14500 +-4700 -14480 +-4700 -14460 +-4700 -14440 +-4700 -14420 +-4700 -14400 +-4700 -14380 +-4700 -14360 +-4700 -14340 +-4700 -14320 +-4700 -14300 +-4700 -14280 +-4700 -14260 +-4700 -14240 +-4700 -14220 +-4700 -14200 +-4700 -14180 +-4700 -14160 +-4700 -14140 +-4700 -12840 +-4700 -12820 +-4700 -12800 +-4700 -12780 +-4700 -12760 +-4700 -12740 +-4700 -12720 +-4700 -12700 +-4700 -12680 +-4700 -12660 +-4700 -12640 +-4700 -12620 +-4700 -12600 +-4700 -12580 +-4700 -12560 +-4700 -12540 +-4700 -12520 +-4700 -12500 +-4700 -12480 +-4700 -12460 +-4700 -12440 +-4700 -12420 +-4700 -12400 +-4700 -12380 +-4700 -12360 +-4700 -12340 +-4700 -12320 +-4700 -12300 +-4700 -12280 +-4700 -12260 +-4700 -12240 +-4700 -12220 +-4700 -12200 +-4700 -12180 +-4700 -12160 +-4700 -12140 +-4700 -12120 +-4700 -12100 +-4700 -12080 +-4700 -12060 +-4700 -12040 +-4700 -12020 +-4700 -12000 +-4700 -11980 +-4700 -11960 +-4700 -11940 +-4700 -11920 +-4700 -11900 +-4700 -11880 +-4700 -11860 +-4700 -11840 +-4700 -11820 +-4700 -11800 +-4700 -11780 +-4700 -11760 +-4700 -11740 +-4700 -11720 +-4700 -11700 +-4700 -11680 +-4700 -11660 +-4700 -11640 +-4700 -11620 +-4700 -11600 +-4700 -11580 +-4700 -11560 +-4700 -11540 +-4700 -11520 +-4700 -11500 +-4700 -11480 +-4700 -11460 +-4700 -11440 +-4700 -11420 +-4700 -11400 +-4700 -11380 +-4700 -11360 +-4700 -11340 +-4700 -11320 +-4700 -11300 +-4700 -11280 +-4700 -11260 +-4700 -11240 +-4700 -11220 +-4700 -11200 +-4700 -11180 +-4700 -11160 +-4700 -11140 +-4700 -11120 +-4700 -11100 +-4700 -11080 +-4700 -11060 +-4700 -11040 +-4700 -11020 +-4700 -11000 +-4700 -10980 +-4700 -10960 +-4700 -10940 +-4700 -10920 +-4700 -10900 +-4700 -10880 +-4700 -10860 +-4700 -10820 +-4700 -10800 +-4700 -10780 +-4700 -10760 +-4700 -10740 +-4700 -10720 +-4700 -10660 +-4700 -10640 +-4700 -10620 +-4700 -10600 +-4700 -10580 +-4700 -10560 +-4700 -10540 +-4700 -10520 +-4700 -10500 +-4700 -10480 +-4700 -10460 +-4700 -10440 +-4700 -10420 +-4700 -10400 +-4700 -10380 +-4700 -10360 +-4700 -10340 +-4700 -10320 +-4700 -10300 +-4700 -10280 +-4700 -10260 +-4700 -10240 +-4700 -10220 +-4700 -10200 +-4700 -10180 +-4700 -10160 +-4700 -10140 +-4700 -10120 +-4700 -10100 +-4700 -10080 +-4700 -10060 +-4700 -10040 +-4700 -10020 +-4700 -10000 +-4700 -9980 +-4700 -9960 +-4700 -9940 +-4700 -9920 +-4700 -9900 +-4700 -9880 +-4700 -9860 +-4700 -9840 +-4700 -9820 +-4700 -9800 +-4700 -9780 +-4700 -9760 +-4700 -9740 +-4700 -9720 +-4700 -9700 +-4700 -9680 +-4700 -9660 +-4700 -9640 +-4700 -9320 +-4700 -9280 +-4700 -9200 +-4700 -9040 +-4700 -9020 +-4700 -8960 +-4700 -8940 +-4700 -8700 +-4700 -8660 +-4700 -8040 +-4700 -7900 +-4700 -7860 +-4700 -7780 +-4700 -7720 +-4700 -2560 +-4700 -2540 +-4700 -2520 +-4700 -2500 +-4700 -2480 +-4700 -2460 +-4700 -2440 +-4700 -2420 +-4700 -2400 +-4700 -2380 +-4700 -2360 +-4700 -2340 +-4700 -2320 +-4700 -2300 +-4700 -2280 +-4700 -2260 +-4700 -2240 +-4700 -2220 +-4700 -2200 +-4700 -2140 +-4700 -2120 +-4700 -2080 +-4700 -2060 +-4700 -1680 +-4700 -1580 +-4700 -1520 +-4700 -1500 +-4700 -1460 +-4700 -1440 +-4700 -1380 +-4700 -1360 +-4700 -1280 +-4700 -1000 +-4700 -920 +-4700 -840 +-4700 -760 +-4700 -680 +-4700 -40 +-4700 20 +-4700 200 +-4700 240 +-4700 280 +-4700 340 +-4700 460 +-4700 500 +-4700 540 +-4700 600 +-4700 620 +-4700 640 +-4700 800 +-4700 820 +-4700 840 +-4700 940 +-4700 980 +-4700 1020 +-4700 1060 +-4700 1080 +-4700 1100 +-4700 1840 +-4700 1860 +-4700 1880 +-4700 1900 +-4700 1940 +-4700 1960 +-4700 1980 +-4700 2060 +-4700 2080 +-4700 2400 +-4700 2480 +-4700 2520 +-4700 2580 +-4700 2740 +-4700 2900 +-4700 2960 +-4700 2980 +-4700 3020 +-4700 3060 +-4700 3140 +-4700 3160 +-4700 3180 +-4700 3200 +-4700 3260 +-4700 3300 +-4700 3440 +-4700 3500 +-4700 3560 +-4700 7140 +-4700 7240 +-4700 7300 +-4700 8060 +-4700 8100 +-4700 8120 +-4700 8160 +-4700 8340 +-4700 8360 +-4700 8500 +-4700 8540 +-4700 8560 +-4700 8580 +-4700 8600 +-4700 8640 +-4700 8660 +-4700 8680 +-4700 8720 +-4700 8860 +-4700 8880 +-4700 8940 +-4700 8960 +-4700 9000 +-4700 9020 +-4700 9100 +-4700 9140 +-4700 9160 +-4700 9240 +-4700 9300 +-4700 10060 +-4700 10080 +-4700 10100 +-4680 -16660 +-4680 -15220 +-4680 -15200 +-4680 -15180 +-4680 -15160 +-4680 -15140 +-4680 -15100 +-4680 -15080 +-4680 -15000 +-4680 -14920 +-4680 -14860 +-4680 -14820 +-4680 -12840 +-4680 -12820 +-4680 -12000 +-4680 -11900 +-4680 -11880 +-4680 -11820 +-4680 -11740 +-4680 -11660 +-4680 -11620 +-4680 -11280 +-4680 -11260 +-4680 -11120 +-4680 -11020 +-4680 -10820 +-4680 -10800 +-4680 -10760 +-4680 -10720 +-4680 -10680 +-4680 -10660 +-4680 -10600 +-4680 -10580 +-4680 -10480 +-4680 -10440 +-4680 -10420 +-4680 -10400 +-4680 -10380 +-4680 -10360 +-4680 -10340 +-4680 -10320 +-4680 -10300 +-4680 -10280 +-4680 -10260 +-4680 -10240 +-4680 -10220 +-4680 -10200 +-4680 -10180 +-4680 -10160 +-4680 -10140 +-4680 -10120 +-4680 -10100 +-4680 -10080 +-4680 -10060 +-4680 -10040 +-4680 -10020 +-4680 -10000 +-4680 -9980 +-4680 -9960 +-4680 -9940 +-4680 -9920 +-4680 -9900 +-4680 -9880 +-4680 -9860 +-4680 -9840 +-4680 -9820 +-4680 -9800 +-4680 -9780 +-4680 -9760 +-4680 -9740 +-4680 -9720 +-4680 -9700 +-4680 -9680 +-4680 -9660 +-4680 -9640 +-4680 -9620 +-4680 -9600 +-4680 -9580 +-4680 -9560 +-4680 -9540 +-4680 -9520 +-4680 -9500 +-4680 -9480 +-4680 -9460 +-4680 -9440 +-4680 -9420 +-4680 -9400 +-4680 -9380 +-4680 -9360 +-4680 -9340 +-4680 -9320 +-4680 -9300 +-4680 -9280 +-4680 -9260 +-4680 -9240 +-4680 -9220 +-4680 -9200 +-4680 -9180 +-4680 -9160 +-4680 -9140 +-4680 -9120 +-4680 -9100 +-4680 -9080 +-4680 -9060 +-4680 -9040 +-4680 -9020 +-4680 -9000 +-4680 -8980 +-4680 -8960 +-4680 -8940 +-4680 -8920 +-4680 -8900 +-4680 -8880 +-4680 -8860 +-4680 -8840 +-4680 -8820 +-4680 -8800 +-4680 -8780 +-4680 -8760 +-4680 -8740 +-4680 -8720 +-4680 -8700 +-4680 -8680 +-4680 -8660 +-4680 -8640 +-4680 -8620 +-4680 -8600 +-4680 -8580 +-4680 -8560 +-4680 -8540 +-4680 -8520 +-4680 -8500 +-4680 -8480 +-4680 -8460 +-4680 -8440 +-4680 -8420 +-4680 -8400 +-4680 -8380 +-4680 -8360 +-4680 -8340 +-4680 -8320 +-4680 -8300 +-4680 -8280 +-4680 -8260 +-4680 -8240 +-4680 -8220 +-4680 -8200 +-4680 -8180 +-4680 -8160 +-4680 -8140 +-4680 -8120 +-4680 -8100 +-4680 -8080 +-4680 -8060 +-4680 -8040 +-4680 -8020 +-4680 -8000 +-4680 -7980 +-4680 -7960 +-4680 -7940 +-4680 -7920 +-4680 -7900 +-4680 -7880 +-4680 -7860 +-4680 -7840 +-4680 -7820 +-4680 -7800 +-4680 -7780 +-4680 -7760 +-4680 -7740 +-4680 -7720 +-4680 -7700 +-4680 -7680 +-4680 -7660 +-4680 -7640 +-4680 -7620 +-4680 -3600 +-4680 -3580 +-4680 -3520 +-4680 -3500 +-4680 -3480 +-4680 -3460 +-4680 -3440 +-4680 -3420 +-4680 -3400 +-4680 -3380 +-4680 -3340 +-4680 -3320 +-4680 -3300 +-4680 -3280 +-4680 -3240 +-4680 -3220 +-4680 -3200 +-4680 -3180 +-4680 -3160 +-4680 -3140 +-4680 -3100 +-4680 -3060 +-4680 -3020 +-4680 -2560 +-4680 -2540 +-4680 -2520 +-4680 -2500 +-4680 -2480 +-4680 -2460 +-4680 -2440 +-4680 -2420 +-4680 -2400 +-4680 -2380 +-4680 -2340 +-4680 -2320 +-4680 -2300 +-4680 -2280 +-4680 -2260 +-4680 -2240 +-4680 -2220 +-4680 -2200 +-4680 -2180 +-4680 -2160 +-4680 -2140 +-4680 -2120 +-4680 -2100 +-4680 -2080 +-4680 -2060 +-4680 -2040 +-4680 -2020 +-4680 -2000 +-4680 -1980 +-4680 -1960 +-4680 -1820 +-4680 -1800 +-4680 -1740 +-4680 -1720 +-4680 -1700 +-4680 -1680 +-4680 -1640 +-4680 -1620 +-4680 -1600 +-4680 -1580 +-4680 -1560 +-4680 -1540 +-4680 -1520 +-4680 -1500 +-4680 -1480 +-4680 -1460 +-4680 -1440 +-4680 -1420 +-4680 -1400 +-4680 -1380 +-4680 -1360 +-4680 -1340 +-4680 -1320 +-4680 -1300 +-4680 -1280 +-4680 -1260 +-4680 -1240 +-4680 -1220 +-4680 -1200 +-4680 -1180 +-4680 -1160 +-4680 -1140 +-4680 -1120 +-4680 -1100 +-4680 -1080 +-4680 -1060 +-4680 -1040 +-4680 -1020 +-4680 -1000 +-4680 -980 +-4680 -960 +-4680 -940 +-4680 -920 +-4680 -900 +-4680 -880 +-4680 -860 +-4680 -840 +-4680 -820 +-4680 -800 +-4680 -780 +-4680 -760 +-4680 -740 +-4680 -720 +-4680 -660 +-4680 -620 +-4680 -540 +-4680 -480 +-4680 -460 +-4680 -400 +-4680 -360 +-4680 -340 +-4680 -320 +-4680 -240 +-4680 -220 +-4680 -200 +-4680 -180 +-4680 -100 +-4680 -80 +-4680 -60 +-4680 -40 +-4680 -20 +-4680 0 +-4680 20 +-4680 40 +-4680 60 +-4680 80 +-4680 100 +-4680 120 +-4680 140 +-4680 160 +-4680 180 +-4680 200 +-4680 220 +-4680 240 +-4680 260 +-4680 280 +-4680 300 +-4680 320 +-4680 340 +-4680 360 +-4680 380 +-4680 400 +-4680 420 +-4680 440 +-4680 460 +-4680 480 +-4680 500 +-4680 520 +-4680 540 +-4680 560 +-4680 580 +-4680 600 +-4680 620 +-4680 660 +-4680 680 +-4680 700 +-4680 740 +-4680 760 +-4680 780 +-4680 800 +-4680 820 +-4680 840 +-4680 860 +-4680 880 +-4680 900 +-4680 920 +-4680 960 +-4680 1000 +-4680 1020 +-4680 1100 +-4680 1820 +-4680 1840 +-4680 2520 +-4680 2540 +-4680 2600 +-4680 2700 +-4680 2920 +-4680 3020 +-4680 3080 +-4680 3100 +-4680 3320 +-4680 3540 +-4680 3560 +-4680 7460 +-4680 8860 +-4680 8880 +-4680 9300 +-4680 10060 +-4660 -16740 +-4660 -16720 +-4660 -16700 +-4660 -16680 +-4660 -16660 +-4660 -15220 +-4660 -15200 +-4660 -12840 +-4660 -12820 +-4660 -12800 +-4660 -10820 +-4660 -10800 +-4660 -10780 +-4660 -10740 +-4660 -10720 +-4660 -10700 +-4660 -10680 +-4660 -10640 +-4660 -10580 +-4660 -10560 +-4660 -10540 +-4660 -10440 +-4660 -10420 +-4660 -10400 +-4660 -9380 +-4660 -9300 +-4660 -9240 +-4660 -9200 +-4660 -9180 +-4660 -9140 +-4660 -9120 +-4660 -9100 +-4660 -9080 +-4660 -9060 +-4660 -9040 +-4660 -9020 +-4660 -9000 +-4660 -8980 +-4660 -8960 +-4660 -8940 +-4660 -8920 +-4660 -8900 +-4660 -8880 +-4660 -8860 +-4660 -8840 +-4660 -8820 +-4660 -8800 +-4660 -8780 +-4660 -8760 +-4660 -8740 +-4660 -8720 +-4660 -8700 +-4660 -8680 +-4660 -8660 +-4660 -8640 +-4660 -8620 +-4660 -8600 +-4660 -8580 +-4660 -8560 +-4660 -8540 +-4660 -8520 +-4660 -8500 +-4660 -8480 +-4660 -8460 +-4660 -8440 +-4660 -8420 +-4660 -8400 +-4660 -8380 +-4660 -8360 +-4660 -8340 +-4660 -8320 +-4660 -8300 +-4660 -8280 +-4660 -8260 +-4660 -8240 +-4660 -8220 +-4660 -8200 +-4660 -8180 +-4660 -8160 +-4660 -8140 +-4660 -8120 +-4660 -8100 +-4660 -8080 +-4660 -8060 +-4660 -8040 +-4660 -8020 +-4660 -8000 +-4660 -7980 +-4660 -7960 +-4660 -7940 +-4660 -7920 +-4660 -7900 +-4660 -7880 +-4660 -7860 +-4660 -7840 +-4660 -7820 +-4660 -7800 +-4660 -7780 +-4660 -7760 +-4660 -7740 +-4660 -7720 +-4660 -7700 +-4660 -7680 +-4660 -7660 +-4660 -7640 +-4660 -7620 +-4660 -7600 +-4660 -7580 +-4660 -4140 +-4660 -4100 +-4660 -4060 +-4660 -4000 +-4660 -3980 +-4660 -3940 +-4660 -3920 +-4660 -3900 +-4660 -3880 +-4660 -3860 +-4660 -3840 +-4660 -3820 +-4660 -3800 +-4660 -3780 +-4660 -3760 +-4660 -3740 +-4660 -3720 +-4660 -3700 +-4660 -3680 +-4660 -3660 +-4660 -3640 +-4660 -3620 +-4660 -3600 +-4660 -3580 +-4660 -3560 +-4660 -3540 +-4660 -3520 +-4660 -3500 +-4660 -3480 +-4660 -3460 +-4660 -3440 +-4660 -3420 +-4660 -3400 +-4660 -3380 +-4660 -3360 +-4660 -3340 +-4660 -3320 +-4660 -3300 +-4660 -3280 +-4660 -3260 +-4660 -3240 +-4660 -3220 +-4660 -3200 +-4660 -3180 +-4660 -3160 +-4660 -3140 +-4660 -3120 +-4660 -3100 +-4660 -3080 +-4660 -3040 +-4660 -2540 +-4660 -2300 +-4660 -2060 +-4660 -1980 +-4660 -1220 +-4660 -1140 +-4660 -1120 +-4660 -1100 +-4660 -1080 +-4660 -1020 +-4660 -1000 +-4660 -980 +-4660 -960 +-4660 -940 +-4660 -920 +-4660 -900 +-4660 -880 +-4660 -860 +-4660 -840 +-4660 -820 +-4660 -800 +-4660 -780 +-4660 -760 +-4660 -740 +-4660 -720 +-4660 -700 +-4660 -680 +-4660 -660 +-4660 -620 +-4660 -600 +-4660 -560 +-4660 -540 +-4660 -480 +-4660 -460 +-4660 -420 +-4660 -380 +-4660 -300 +-4660 -260 +-4660 -100 +-4660 -20 +-4660 60 +-4660 140 +-4660 180 +-4660 200 +-4660 260 +-4660 320 +-4660 620 +-4660 680 +-4660 720 +-4660 740 +-4660 760 +-4660 800 +-4660 820 +-4660 840 +-4660 860 +-4660 940 +-4660 980 +-4660 1000 +-4660 1020 +-4660 1040 +-4660 1080 +-4660 1800 +-4660 2520 +-4660 2760 +-4660 2940 +-4660 3000 +-4660 3020 +-4660 3060 +-4660 3080 +-4660 3560 +-4660 7420 +-4660 7520 +-4660 7700 +-4660 8860 +-4660 8880 +-4660 9380 +-4660 9460 +-4660 10060 +-4640 -16760 +-4640 -16740 +-4640 -16720 +-4640 -16660 +-4640 -15200 +-4640 -12820 +-4640 -12800 +-4640 -10820 +-4640 -10700 +-4640 -10680 +-4640 -10640 +-4640 -10540 +-4640 -10440 +-4640 -10420 +-4640 -9280 +-4640 -9140 +-4640 -8760 +-4640 -8720 +-4640 -8440 +-4640 -8400 +-4640 -8260 +-4640 -8200 +-4640 -8120 +-4640 -8100 +-4640 -8080 +-4640 -8060 +-4640 -8040 +-4640 -8020 +-4640 -7880 +-4640 -7640 +-4640 -7620 +-4640 -7600 +-4640 -4160 +-4640 -4140 +-4640 -4120 +-4640 -4100 +-4640 -4080 +-4640 -4060 +-4640 -4040 +-4640 -4020 +-4640 -4000 +-4640 -3980 +-4640 -3960 +-4640 -3940 +-4640 -3920 +-4640 -3900 +-4640 -3880 +-4640 -3860 +-4640 -3840 +-4640 -3820 +-4640 -3800 +-4640 -3780 +-4640 -3760 +-4640 -3740 +-4640 -3720 +-4640 -3700 +-4640 -3680 +-4640 -3660 +-4640 -3640 +-4640 -3600 +-4640 -2560 +-4640 -720 +-4640 -700 +-4640 -280 +-4640 0 +-4640 200 +-4640 680 +-4640 760 +-4640 800 +-4640 840 +-4640 880 +-4640 980 +-4640 1080 +-4640 1100 +-4640 1800 +-4640 1820 +-4640 2920 +-4640 3020 +-4640 3340 +-4640 3540 +-4640 7420 +-4640 8840 +-4640 8860 +-4640 9460 +-4640 10040 +-4620 -22960 +-4620 -22940 +-4620 -22920 +-4620 -22900 +-4620 -22880 +-4620 -22860 +-4620 -22840 +-4620 -22820 +-4620 -16760 +-4620 -16740 +-4620 -16720 +-4620 -15220 +-4620 -15200 +-4620 -12820 +-4620 -12800 +-4620 -10880 +-4620 -10860 +-4620 -10840 +-4620 -10820 +-4620 -10800 +-4620 -10760 +-4620 -10740 +-4620 -10720 +-4620 -10700 +-4620 -10680 +-4620 -10480 +-4620 -10440 +-4620 -7640 +-4620 -7620 +-4620 -7600 +-4620 -4160 +-4620 -4140 +-4620 -4080 +-4620 -4020 +-4620 -720 +-4620 800 +-4620 820 +-4620 840 +-4620 860 +-4620 980 +-4620 1000 +-4620 1080 +-4620 1100 +-4620 1800 +-4620 1820 +-4620 2620 +-4620 2940 +-4620 3040 +-4620 3300 +-4620 3320 +-4620 3340 +-4620 3360 +-4620 3400 +-4620 3540 +-4620 7440 +-4620 7580 +-4620 7680 +-4620 7720 +-4620 8840 +-4620 8860 +-4620 8880 +-4620 9980 +-4620 10060 +-4600 -22980 +-4600 -22960 +-4600 -22940 +-4600 -22920 +-4600 -22900 +-4600 -22880 +-4600 -22860 +-4600 -22840 +-4600 -22820 +-4600 -22800 +-4600 -22780 +-4600 -16760 +-4600 -16740 +-4600 -16720 +-4600 -15220 +-4600 -15200 +-4600 -12820 +-4600 -7640 +-4600 -7620 +-4600 -7600 +-4600 -4160 +-4600 -4140 +-4600 840 +-4600 1080 +-4600 1800 +-4600 1820 +-4600 1840 +-4600 2660 +-4600 3300 +-4600 3520 +-4600 3540 +-4600 3560 +-4600 7480 +-4600 7600 +-4600 7700 +-4600 8840 +-4600 8860 +-4600 9460 +-4600 10040 +-4600 10060 +-4580 -23000 +-4580 -22920 +-4580 -22900 +-4580 -16760 +-4580 -16740 +-4580 -16720 +-4580 -15220 +-4580 -15200 +-4580 -14040 +-4580 -12820 +-4580 -12800 +-4580 -7620 +-4580 -7600 +-4580 -4200 +-4580 -4180 +-4580 -4160 +-4580 -4140 +-4580 -3020 +-4580 -3000 +-4580 -2580 +-4580 -2560 +-4580 -320 +-4580 840 +-4580 1080 +-4580 1100 +-4580 1820 +-4580 2640 +-4580 2800 +-4580 2900 +-4580 3380 +-4580 3400 +-4580 3420 +-4580 3440 +-4580 3460 +-4580 3480 +-4580 3500 +-4580 3520 +-4580 3560 +-4580 7240 +-4580 7280 +-4580 7600 +-4580 8840 +-4580 8860 +-4580 8880 +-4580 9220 +-4580 9440 +-4580 9460 +-4580 10060 +-4560 -16760 +-4560 -16740 +-4560 -16720 +-4560 -15220 +-4560 -15200 +-4560 -12840 +-4560 -12820 +-4560 -12800 +-4560 -7640 +-4560 -7620 +-4560 -7600 +-4560 -4400 +-4560 -4380 +-4560 -4340 +-4560 -4300 +-4560 -4280 +-4560 -4240 +-4560 -4220 +-4560 -4200 +-4560 -4180 +-4560 -4160 +-4560 -2980 +-4560 -2960 +-4560 -2940 +-4560 -2580 +-4560 640 +-4560 860 +-4560 1080 +-4560 1100 +-4560 2600 +-4560 2780 +-4560 2860 +-4560 3400 +-4560 3420 +-4560 3440 +-4560 3460 +-4560 3480 +-4560 3500 +-4560 3520 +-4560 3560 +-4560 7220 +-4560 7540 +-4560 7660 +-4560 8840 +-4560 8860 +-4560 9460 +-4560 10040 +-4560 10060 +-4560 10080 +-4560 10100 +-4560 10800 +-4540 -22920 +-4540 -16760 +-4540 -16740 +-4540 -16720 +-4540 -15200 +-4540 -12820 +-4540 -12800 +-4540 -7620 +-4540 -5700 +-4540 -5080 +-4540 -5060 +-4540 -4980 +-4540 -4920 +-4540 -4880 +-4540 -4860 +-4540 -4840 +-4540 -4800 +-4540 -4760 +-4540 -4740 +-4540 -4720 +-4540 -4700 +-4540 -4660 +-4540 -4640 +-4540 -4620 +-4540 -4600 +-4540 -4580 +-4540 -4540 +-4540 -4500 +-4540 -4480 +-4540 -4460 +-4540 -4420 +-4540 -4380 +-4540 -4360 +-4540 -4320 +-4540 -4300 +-4540 -4280 +-4540 -4240 +-4540 -4200 +-4540 -2700 +-4540 -320 +-4540 -280 +-4540 620 +-4540 640 +-4540 1080 +-4540 1100 +-4540 1820 +-4540 2780 +-4540 2960 +-4540 3480 +-4540 7260 +-4540 7280 +-4540 7540 +-4540 8860 +-4540 8880 +-4540 9200 +-4540 9320 +-4540 9480 +-4540 9860 +-4540 10060 +-4540 10080 +-4540 10800 +-4520 -16740 +-4520 -16720 +-4520 -15220 +-4520 -15200 +-4520 -12820 +-4520 -12800 +-4520 -7640 +-4520 -7620 +-4520 -5760 +-4520 -5520 +-4520 -5480 +-4520 -5440 +-4520 -5340 +-4520 -5320 +-4520 -5300 +-4520 -5200 +-4520 -5140 +-4520 -5120 +-4520 -5080 +-4520 -4980 +-4520 -4960 +-4520 -4940 +-4520 -4880 +-4520 -4760 +-4520 -4700 +-4520 -2760 +-4520 -2740 +-4520 -2720 +-4520 -2700 +-4520 -200 +-4520 600 +-4520 1080 +-4520 1100 +-4520 1800 +-4520 1820 +-4520 2760 +-4520 2860 +-4520 2920 +-4520 7280 +-4520 8840 +-4520 8860 +-4520 9140 +-4520 9260 +-4520 9400 +-4520 9440 +-4520 9460 +-4520 9760 +-4520 9840 +-4520 9920 +-4520 10060 +-4520 10080 +-4500 -16760 +-4500 -16740 +-4500 -16720 +-4500 -15220 +-4500 -15200 +-4500 -12840 +-4500 -12820 +-4500 -7620 +-4500 -2920 +-4500 -2780 +-4500 -2760 +-4500 600 +-4500 1100 +-4500 1820 +-4500 1840 +-4500 2980 +-4500 8860 +-4500 8880 +-4500 9360 +-4500 9460 +-4500 9700 +-4500 9720 +-4500 9780 +-4500 9840 +-4500 9880 +-4500 9900 +-4500 9920 +-4500 9940 +-4500 10020 +-4500 10040 +-4500 10060 +-4500 10080 +-4500 10480 +-4480 -22960 +-4480 -16760 +-4480 -16740 +-4480 -16720 +-4480 -15220 +-4480 -15200 +-4480 -12820 +-4480 -12800 +-4480 -7620 +-4480 -2820 +-4480 -2800 +-4480 -2780 +-4480 1100 +-4480 1820 +-4480 2820 +-4480 2860 +-4480 2900 +-4480 3140 +-4480 8840 +-4480 8860 +-4480 9100 +-4480 9160 +-4480 9200 +-4480 9240 +-4480 9260 +-4480 9320 +-4480 9380 +-4480 9420 +-4480 9480 +-4480 9620 +-4480 9640 +-4480 10040 +-4480 10060 +-4480 10080 +-4480 10800 +-4460 -22920 +-4460 -22900 +-4460 -16740 +-4460 -15220 +-4460 -15200 +-4460 -12820 +-4460 -7640 +-4460 -7620 +-4460 -7600 +-4460 1100 +-4460 2840 +-4460 3140 +-4460 8860 +-4460 8880 +-4460 8900 +-4460 9000 +-4460 9020 +-4460 9100 +-4460 9160 +-4460 9180 +-4460 9240 +-4460 9260 +-4460 9280 +-4460 9320 +-4460 9420 +-4460 9440 +-4460 9460 +-4460 9480 +-4460 10020 +-4460 10040 +-4460 10060 +-4460 10080 +-4460 10100 +-4460 10220 +-4440 -22920 +-4440 -16740 +-4440 -16720 +-4440 -15220 +-4440 -15200 +-4440 -13700 +-4440 -13360 +-4440 -13060 +-4440 -12820 +-4440 -12800 +-4440 -7640 +-4440 -7620 +-4440 -7600 +-4440 1080 +-4440 1100 +-4440 1120 +-4440 1800 +-4440 1820 +-4440 1840 +-4440 8860 +-4440 8880 +-4440 8900 +-4440 8980 +-4440 9080 +-4440 9300 +-4440 9320 +-4440 9340 +-4440 9420 +-4440 9440 +-4440 9460 +-4440 9480 +-4440 9500 +-4440 9520 +-4440 9600 +-4440 10040 +-4440 10060 +-4440 10080 +-4440 10100 +-4440 10160 +-4440 10300 +-4420 -22900 +-4420 -16760 +-4420 -16740 +-4420 -16720 +-4420 -15200 +-4420 -13760 +-4420 -13720 +-4420 -13620 +-4420 -13560 +-4420 -13540 +-4420 -13460 +-4420 -13440 +-4420 -13420 +-4420 -13340 +-4420 -13320 +-4420 -13240 +-4420 -13220 +-4420 -13200 +-4420 -13120 +-4420 -13100 +-4420 -13000 +-4420 -12940 +-4420 -12920 +-4420 -12900 +-4420 -12820 +-4420 -12800 +-4420 -7640 +-4420 -7620 +-4420 -7600 +-4420 200 +-4420 1080 +-4420 1100 +-4420 1820 +-4420 2960 +-4420 3120 +-4420 8860 +-4420 8880 +-4420 8900 +-4420 8920 +-4420 9000 +-4420 9280 +-4420 9320 +-4420 9360 +-4420 9440 +-4420 9460 +-4420 9480 +-4420 9520 +-4420 9540 +-4420 9560 +-4420 10060 +-4420 10080 +-4420 10100 +-4420 10120 +-4420 10160 +-4420 10420 +-4400 -22920 +-4400 -17020 +-4400 -16860 +-4400 -16740 +-4400 -16720 +-4400 -15220 +-4400 -15200 +-4400 -13740 +-4400 -13700 +-4400 -13660 +-4400 -13640 +-4400 -13620 +-4400 -13600 +-4400 -13580 +-4400 -13560 +-4400 -13540 +-4400 -13480 +-4400 -13460 +-4400 -13400 +-4400 -13360 +-4400 -13320 +-4400 -13300 +-4400 -13280 +-4400 -13260 +-4400 -13240 +-4400 -13220 +-4400 -13160 +-4400 -13100 +-4400 -13060 +-4400 -12980 +-4400 -12960 +-4400 -12940 +-4400 -12860 +-4400 -12820 +-4400 -12800 +-4400 -7620 +-4400 200 +-4400 1080 +-4400 1100 +-4400 1820 +-4400 3120 +-4400 8860 +-4400 8880 +-4400 8900 +-4400 8960 +-4400 8980 +-4400 9440 +-4400 9460 +-4400 9480 +-4400 9500 +-4400 9520 +-4400 9540 +-4400 10080 +-4400 10120 +-4400 10160 +-4400 10420 +-4380 -17140 +-4380 -17120 +-4380 -17100 +-4380 -17060 +-4380 -17000 +-4380 -16960 +-4380 -16940 +-4380 -16920 +-4380 -16900 +-4380 -16840 +-4380 -16740 +-4380 -16720 +-4380 -15200 +-4380 -13760 +-4380 -13740 +-4380 -13720 +-4380 -13700 +-4380 -13680 +-4380 -13660 +-4380 -13640 +-4380 -13620 +-4380 -13600 +-4380 -13580 +-4380 -13560 +-4380 -13540 +-4380 -13520 +-4380 -13500 +-4380 -13480 +-4380 -13460 +-4380 -13440 +-4380 -13420 +-4380 -13400 +-4380 -13380 +-4380 -13360 +-4380 -13340 +-4380 -13320 +-4380 -13300 +-4380 -13280 +-4380 -13260 +-4380 -13240 +-4380 -13220 +-4380 -13200 +-4380 -13180 +-4380 -13160 +-4380 -13140 +-4380 -13120 +-4380 -13100 +-4380 -13080 +-4380 -13060 +-4380 -13040 +-4380 -13020 +-4380 -13000 +-4380 -12980 +-4380 -12960 +-4380 -12940 +-4380 -12920 +-4380 -12900 +-4380 -12880 +-4380 -12860 +-4380 -12840 +-4380 -12820 +-4380 -12800 +-4380 -12780 +-4380 -12760 +-4380 -12740 +-4380 -7640 +-4380 -7620 +-4380 -7600 +-4380 1100 +-4380 1120 +-4380 1820 +-4380 8880 +-4380 8940 +-4380 10060 +-4380 10080 +-4380 10140 +-4380 10200 +-4380 10780 +-4380 10800 +-4360 -22920 +-4360 -22900 +-4360 -17380 +-4360 -17360 +-4360 -17220 +-4360 -17200 +-4360 -17180 +-4360 -17160 +-4360 -17140 +-4360 -17120 +-4360 -17100 +-4360 -17080 +-4360 -17060 +-4360 -17040 +-4360 -17020 +-4360 -17000 +-4360 -16980 +-4360 -16960 +-4360 -16940 +-4360 -16920 +-4360 -16900 +-4360 -16880 +-4360 -16860 +-4360 -16840 +-4360 -16820 +-4360 -16800 +-4360 -16780 +-4360 -16760 +-4360 -16740 +-4360 -16720 +-4360 -15200 +-4360 -13760 +-4360 -13740 +-4360 -13720 +-4360 -13700 +-4360 -13680 +-4360 -13660 +-4360 -13640 +-4360 -13620 +-4360 -13600 +-4360 -13580 +-4360 -13540 +-4360 -13520 +-4360 -13500 +-4360 -13480 +-4360 -13440 +-4360 -13420 +-4360 -13400 +-4360 -13380 +-4360 -13360 +-4360 -13340 +-4360 -13320 +-4360 -13300 +-4360 -13280 +-4360 -13260 +-4360 -13240 +-4360 -13220 +-4360 -13200 +-4360 -13180 +-4360 -13160 +-4360 -13140 +-4360 -13120 +-4360 -13100 +-4360 -13080 +-4360 -13060 +-4360 -13040 +-4360 -13020 +-4360 -13000 +-4360 -12980 +-4360 -12960 +-4360 -12940 +-4360 -12920 +-4360 -12900 +-4360 -12880 +-4360 -12860 +-4360 -12840 +-4360 -12820 +-4360 -12800 +-4360 -12780 +-4360 -12760 +-4360 -12740 +-4360 -7640 +-4360 -7620 +-4360 3140 +-4360 8880 +-4360 10060 +-4360 10100 +-4360 10160 +-4360 10200 +-4360 10780 +-4340 -23520 +-4340 -17420 +-4340 -17400 +-4340 -17380 +-4340 -17360 +-4340 -17340 +-4340 -17320 +-4340 -17300 +-4340 -17280 +-4340 -17260 +-4340 -17240 +-4340 -17220 +-4340 -17200 +-4340 -17180 +-4340 -17160 +-4340 -17140 +-4340 -17120 +-4340 -17040 +-4340 -17020 +-4340 -17000 +-4340 -16900 +-4340 -16840 +-4340 -16800 +-4340 -16780 +-4340 -16760 +-4340 -15200 +-4340 -13760 +-4340 -13740 +-4340 -12780 +-4340 -12760 +-4340 -7640 +-4340 -7620 +-4340 -7600 +-4340 1080 +-4340 1100 +-4340 1800 +-4340 1820 +-4340 1840 +-4340 3100 +-4340 3120 +-4340 3140 +-4340 10020 +-4340 10060 +-4340 10080 +-4340 10100 +-4340 10120 +-4320 -23520 +-4320 -17440 +-4320 -17420 +-4320 -17400 +-4320 -17380 +-4320 -17320 +-4320 -17300 +-4320 -17280 +-4320 -17260 +-4320 -17240 +-4320 -15720 +-4320 -15660 +-4320 -15220 +-4320 -15200 +-4320 -13760 +-4320 -13740 +-4320 -7620 +-4320 -7600 +-4320 -220 +-4320 -200 +-4320 1080 +-4320 1100 +-4320 1120 +-4320 1800 +-4320 1820 +-4320 1840 +-4320 3080 +-4320 3100 +-4320 3120 +-4320 10040 +-4320 10060 +-4320 10080 +-4300 -17500 +-4300 -17480 +-4300 -17460 +-4300 -17440 +-4300 -15720 +-4300 -15660 +-4300 -15640 +-4300 -15220 +-4300 -15200 +-4300 -13760 +-4300 -13740 +-4300 -7640 +-4300 -7620 +-4300 -7600 +-4300 -200 +-4300 1100 +-4300 1820 +-4300 2800 +-4300 2840 +-4300 2860 +-4300 2920 +-4300 2960 +-4300 2980 +-4300 3000 +-4300 3020 +-4300 3040 +-4300 3060 +-4300 3080 +-4300 3100 +-4300 10020 +-4300 10040 +-4300 10060 +-4280 -22920 +-4280 -17820 +-4280 -17500 +-4280 -17480 +-4280 -17460 +-4280 -17440 +-4280 -15620 +-4280 -15600 +-4280 -15560 +-4280 -15200 +-4280 -14020 +-4280 -13920 +-4280 -13900 +-4280 -13860 +-4280 -13840 +-4280 -13800 +-4280 -13780 +-4280 -13760 +-4280 -13740 +-4280 -7640 +-4280 -7620 +-4280 -7600 +-4280 1100 +-4280 1120 +-4280 1640 +-4280 1680 +-4280 1760 +-4280 1780 +-4280 1800 +-4280 1820 +-4280 2840 +-4280 2880 +-4280 2900 +-4280 2920 +-4280 2960 +-4280 2980 +-4280 10060 +-4280 10080 +-4280 10300 +-4260 -23000 +-4260 -22980 +-4260 -22940 +-4260 -22920 +-4260 -22900 +-4260 -17820 +-4260 -17740 +-4260 -17660 +-4260 -17540 +-4260 -17520 +-4260 -17500 +-4260 -15620 +-4260 -15580 +-4260 -15560 +-4260 -15220 +-4260 -15200 +-4260 -13840 +-4260 -13760 +-4260 -13740 +-4260 -7620 +-4260 -7600 +-4260 1100 +-4260 1120 +-4260 1620 +-4260 1680 +-4260 1740 +-4260 1760 +-4260 2840 +-4260 2860 +-4260 2880 +-4260 2900 +-4260 2920 +-4260 10040 +-4260 10060 +-4260 10080 +-4240 -23000 +-4240 -22940 +-4240 -22920 +-4240 -22900 +-4240 -17820 +-4240 -17800 +-4240 -17700 +-4240 -17680 +-4240 -17660 +-4240 -17560 +-4240 -17540 +-4240 -17520 +-4240 -15540 +-4240 -15460 +-4240 -15400 +-4240 -15380 +-4240 -15360 +-4240 -15340 +-4240 -15300 +-4240 -15280 +-4240 -15260 +-4240 -15220 +-4240 -15200 +-4240 -14060 +-4240 -14040 +-4240 -14020 +-4240 -14000 +-4240 -13980 +-4240 -13960 +-4240 -13940 +-4240 -13920 +-4240 -13900 +-4240 -13880 +-4240 -13860 +-4240 -13840 +-4240 -13820 +-4240 -13800 +-4240 -13780 +-4240 -13760 +-4240 -13740 +-4240 -7640 +-4240 -7620 +-4240 -7600 +-4240 1100 +-4240 1120 +-4240 10040 +-4240 10060 +-4240 10080 +-4240 10160 +-4220 -23360 +-4220 -23340 +-4220 -23320 +-4220 -23200 +-4220 -23180 +-4220 -23100 +-4220 -23080 +-4220 -22960 +-4220 -22940 +-4220 -22920 +-4220 -17820 +-4220 -17800 +-4220 -17700 +-4220 -17680 +-4220 -17620 +-4220 -17600 +-4220 -17580 +-4220 -17560 +-4220 -17540 +-4220 -15480 +-4220 -15460 +-4220 -15440 +-4220 -15420 +-4220 -15400 +-4220 -15380 +-4220 -15360 +-4220 -15340 +-4220 -15320 +-4220 -15300 +-4220 -15280 +-4220 -15260 +-4220 -15240 +-4220 -15220 +-4220 -15200 +-4220 -14060 +-4220 -14040 +-4220 -14020 +-4220 -14000 +-4220 -13980 +-4220 -13960 +-4220 -13940 +-4220 -13920 +-4220 -13900 +-4220 -13880 +-4220 -13860 +-4220 -13840 +-4220 -13820 +-4220 -13800 +-4220 -13780 +-4220 -13760 +-4220 -7620 +-4220 -7600 +-4220 1100 +-4220 1120 +-4220 10020 +-4220 10040 +-4220 10060 +-4220 10120 +-4200 -23380 +-4200 -23360 +-4200 -23220 +-4200 -23200 +-4200 -23180 +-4200 -23160 +-4200 -23140 +-4200 -23120 +-4200 -23100 +-4200 -23080 +-4200 -23060 +-4200 -23040 +-4200 -23020 +-4200 -23000 +-4200 -22980 +-4200 -22960 +-4200 -22940 +-4200 -22920 +-4200 -17820 +-4200 -17800 +-4200 -17640 +-4200 -15460 +-4200 -7620 +-4200 1100 +-4200 1120 +-4200 10020 +-4200 10040 +-4200 10060 +-4200 10080 +-4180 -23420 +-4180 -23400 +-4180 -23380 +-4180 -23360 +-4180 -23320 +-4180 -23300 +-4180 -23280 +-4180 -23260 +-4180 -23240 +-4180 -23220 +-4180 -23200 +-4180 -23180 +-4180 -23160 +-4180 -23140 +-4180 -23120 +-4180 -23100 +-4180 -23080 +-4180 -23060 +-4180 -23040 +-4180 -23020 +-4180 -23000 +-4180 -22960 +-4180 -17820 +-4180 -7640 +-4180 -7620 +-4180 -7600 +-4180 1120 +-4180 10040 +-4180 10060 +-4180 10080 +-4160 -23400 +-4160 -23380 +-4160 -23280 +-4160 -23140 +-4160 -23100 +-4160 -17820 +-4160 -17800 +-4160 -7620 +-4160 1120 +-4160 10040 +-4160 10060 +-4160 10100 +-4160 10160 +-4140 -17820 +-4140 -17800 +-4140 -7640 +-4140 -7620 +-4140 -7600 +-4140 1120 +-4140 10040 +-4140 10060 +-4140 10080 +-4120 -17840 +-4120 -17820 +-4120 -17800 +-4120 -7620 +-4120 1120 +-4120 10040 +-4120 10060 +-4120 10080 +-4100 -17820 +-4100 -17800 +-4100 -7620 +-4100 -7600 +-4100 1120 +-4100 10060 +-4100 10100 +-4080 -17820 +-4080 -7640 +-4080 -7620 +-4080 -7600 +-4080 1120 +-4080 10040 +-4080 10060 +-4080 10080 +-4060 -17820 +-4060 -17800 +-4060 -7640 +-4060 -7620 +-4060 -7600 +-4060 1120 +-4060 1140 +-4060 10040 +-4060 10060 +-4060 10080 +-4040 -17820 +-4040 -7620 +-4040 -7600 +-4040 1120 +-4040 1140 +-4040 10040 +-4020 -17820 +-4020 -17800 +-4020 -7640 +-4020 -7620 +-4020 1120 +-4020 1140 +-4020 10060 +-4020 10120 +-4000 -17820 +-4000 -7620 +-4000 1120 +-4000 1140 +-3980 -17820 +-3980 -17800 +-3980 -7620 +-3980 1140 +-3980 9880 +-3960 -17820 +-3960 -17800 +-3960 -7620 +-3960 -7600 +-3960 1120 +-3960 1140 +-3960 9860 +-3940 -17820 +-3940 -17800 +-3940 -7640 +-3940 -7620 +-3940 440 +-3940 1140 +-3940 9760 +-3940 9780 +-3940 9900 +-3940 9940 +-3940 9980 +-3920 -17820 +-3920 -17800 +-3920 -7620 +-3920 -7600 +-3920 380 +-3920 400 +-3920 1120 +-3920 1140 +-3920 1160 +-3900 -17820 +-3900 -17800 +-3900 -7620 +-3900 -7600 +-3900 360 +-3900 380 +-3900 1140 +-3900 9800 +-3880 -17820 +-3880 -17800 +-3880 -17760 +-3880 -17720 +-3880 -7620 +-3880 -4060 +-3880 1160 +-3880 9700 +-3880 10020 +-3860 -17800 +-3860 -17780 +-3860 -17760 +-3860 -17740 +-3860 -17720 +-3860 -7620 +-3860 -4060 +-3860 1140 +-3860 9600 +-3860 9660 +-3840 -17760 +-3840 -17740 +-3840 -17720 +-3840 -17700 +-3840 -7620 +-3840 320 +-3840 1140 +-3840 9580 +-3840 9600 +-3840 9680 +-3840 9700 +-3840 9720 +-3840 9760 +-3840 9780 +-3820 -17800 +-3820 -17760 +-3820 -17720 +-3820 -17700 +-3820 -7620 +-3820 -7600 +-3820 320 +-3820 1120 +-3820 1140 +-3820 9720 +-3820 9780 +-3820 9820 +-3820 10460 +-3800 -17820 +-3800 -17800 +-3800 -17780 +-3800 -17740 +-3800 -17720 +-3800 -17700 +-3800 -7620 +-3800 320 +-3800 340 +-3800 1120 +-3800 1140 +-3800 9740 +-3800 9760 +-3800 9780 +-3800 9800 +-3800 9820 +-3800 10100 +-3800 10360 +-3800 10720 +-3780 -17820 +-3780 -17800 +-3780 -17760 +-3780 -17740 +-3780 -17720 +-3780 -17700 +-3780 -7620 +-3780 -3920 +-3780 -3900 +-3780 300 +-3780 320 +-3780 340 +-3780 360 +-3780 380 +-3780 1120 +-3780 1140 +-3780 9460 +-3780 9780 +-3780 9800 +-3780 9820 +-3780 9860 +-3780 10020 +-3780 10260 +-3780 10500 +-3780 10580 +-3780 10620 +-3780 10700 +-3760 -17820 +-3760 -17800 +-3760 -17780 +-3760 -17700 +-3760 -7620 +-3760 -3920 +-3760 -3900 +-3760 300 +-3760 320 +-3760 340 +-3760 1140 +-3760 9420 +-3760 9440 +-3760 9820 +-3760 9880 +-3760 10300 +-3740 -22620 +-3740 -17820 +-3740 -17800 +-3740 -17780 +-3740 -17760 +-3740 -17720 +-3740 -17700 +-3740 -7620 +-3740 -3900 +-3740 -3860 +-3740 260 +-3740 400 +-3740 1140 +-3740 9440 +-3740 9820 +-3740 9840 +-3740 10680 +-3720 -22620 +-3720 -17820 +-3720 -7640 +-3720 -7620 +-3720 -7600 +-3720 -3880 +-3720 1120 +-3720 9840 +-3720 9860 +-3720 9880 +-3720 10700 +-3720 10740 +-3700 -22620 +-3700 -22600 +-3700 -17820 +-3700 -17800 +-3700 -7620 +-3700 -7600 +-3700 -3880 +-3700 -3860 +-3700 9840 +-3700 9860 +-3700 9880 +-3700 9900 +-3700 10720 +-3680 -22620 +-3680 -22600 +-3680 -17820 +-3680 -7620 +-3680 -3880 +-3680 -3860 +-3680 440 +-3680 1140 +-3680 9320 +-3680 9860 +-3680 9880 +-3680 10700 +-3660 -22620 +-3660 -22600 +-3660 -22580 +-3660 -17820 +-3660 -17800 +-3660 -7620 +-3660 -3880 +-3660 -3860 +-3660 420 +-3660 440 +-3660 9340 +-3660 9360 +-3660 9860 +-3660 9880 +-3660 9920 +-3640 -22600 +-3640 -22580 +-3640 -17820 +-3640 -17800 +-3640 -7620 +-3640 -3880 +-3640 -3860 +-3640 440 +-3640 460 +-3640 500 +-3640 9320 +-3640 9340 +-3640 9880 +-3640 9900 +-3640 10680 +-3640 10720 +-3620 -22580 +-3620 -17820 +-3620 -17800 +-3620 -7620 +-3620 -7600 +-3620 -3880 +-3620 -3860 +-3620 500 +-3620 9880 +-3620 9900 +-3620 9920 +-3620 9940 +-3620 10720 +-3620 10740 +-3600 -22560 +-3600 -17820 +-3600 -17800 +-3600 -7640 +-3600 -7620 +-3600 -7600 +-3600 -3880 +-3600 -3860 +-3600 440 +-3600 460 +-3600 480 +-3600 9320 +-3600 9340 +-3600 9880 +-3600 9900 +-3600 9940 +-3600 10660 +-3600 10680 +-3600 10700 +-3600 24620 +-3580 -22560 +-3580 -22540 +-3580 -17820 +-3580 -17800 +-3580 -7620 +-3580 -7600 +-3580 -3860 +-3580 -3840 +-3580 440 +-3580 460 +-3580 480 +-3580 9340 +-3580 9900 +-3580 10320 +-3580 10720 +-3580 24620 +-3560 -22560 +-3560 -22540 +-3560 -17820 +-3560 -7620 +-3560 -7600 +-3560 -3860 +-3560 -3840 +-3560 9900 +-3560 9920 +-3560 10720 +-3560 10740 +-3540 -22540 +-3540 -22520 +-3540 -17820 +-3540 -7620 +-3540 -7600 +-3540 -3880 +-3540 -3860 +-3540 -3840 +-3540 420 +-3540 440 +-3540 460 +-3540 480 +-3540 9340 +-3540 9900 +-3540 9920 +-3540 9940 +-3540 9960 +-3540 10720 +-3520 -22520 +-3520 -17820 +-3520 -17800 +-3520 -7620 +-3520 -7600 +-3520 -3860 +-3520 9340 +-3520 9900 +-3520 9920 +-3520 9940 +-3520 10020 +-3520 10040 +-3520 10180 +-3520 10200 +-3520 10720 +-3500 -22520 +-3500 -22500 +-3500 -17820 +-3500 -17800 +-3500 -7620 +-3500 -7600 +-3500 -3860 +-3500 9360 +-3500 9900 +-3500 9920 +-3500 9940 +-3500 9960 +-3500 10060 +-3500 10720 +-3480 -17820 +-3480 -7620 +-3480 -7600 +-3480 -3860 +-3480 420 +-3480 440 +-3480 460 +-3480 500 +-3480 940 +-3480 9360 +-3480 9380 +-3480 10720 +-3480 10740 +-3460 -17820 +-3460 -7620 +-3460 -7600 +-3460 -3880 +-3460 -3860 +-3460 -3840 +-3460 420 +-3460 440 +-3460 9380 +-3460 9400 +-3460 10720 +-3440 -23080 +-3440 -22480 +-3440 -22460 +-3440 -17820 +-3440 -17800 +-3440 -7620 +-3440 -7600 +-3440 -3860 +-3440 420 +-3440 440 +-3440 460 +-3440 9380 +-3440 9400 +-3440 9420 +-3440 10720 +-3420 -23100 +-3420 -22480 +-3420 -22460 +-3420 -17820 +-3420 -17800 +-3420 -7620 +-3420 -3880 +-3420 -3860 +-3420 400 +-3420 420 +-3420 440 +-3420 9420 +-3420 10080 +-3420 10100 +-3420 10720 +-3400 -22480 +-3400 -22460 +-3400 -22440 +-3400 -17820 +-3400 -17800 +-3400 -7640 +-3400 -7620 +-3400 -7600 +-3400 -3860 +-3400 9440 +-3400 10720 +-3400 10740 +-3380 -17820 +-3380 -7620 +-3380 -7600 +-3380 -3860 +-3380 9420 +-3380 9440 +-3380 10720 +-3360 -22440 +-3360 -22420 +-3360 -17820 +-3360 -17800 +-3360 -7620 +-3360 -7600 +-3360 -3880 +-3360 -3860 +-3360 780 +-3360 800 +-3360 10720 +-3340 -23040 +-3340 -22440 +-3340 -22420 +-3340 -17820 +-3340 -17800 +-3340 -7620 +-3340 -7600 +-3340 -4040 +-3340 -3860 +-3340 -3840 +-3340 740 +-3340 760 +-3340 10540 +-3340 10720 +-3340 10740 +-3320 -22440 +-3320 -22420 +-3320 -22400 +-3320 -17820 +-3320 -7640 +-3320 -7620 +-3320 -7600 +-3320 -3880 +-3320 -3860 +-3320 -3840 +-3320 740 +-3320 760 +-3320 10720 +-3320 10740 +-3300 -22420 +-3300 -22400 +-3300 -17820 +-3300 -17800 +-3300 -7620 +-3300 -7600 +-3300 -3880 +-3300 -3860 +-3300 -3840 +-3300 760 +-3300 10520 +-3300 10540 +-3300 10720 +-3300 10740 +-3280 -22400 +-3280 -22380 +-3280 -17820 +-3280 -17800 +-3280 -7620 +-3280 -7600 +-3280 -3860 +-3280 10720 +-3260 -23000 +-3260 -22380 +-3260 -17820 +-3260 -7620 +-3260 -7600 +-3260 -7560 +-3260 660 +-3260 680 +-3260 700 +-3260 740 +-3260 760 +-3260 10740 +-3240 -23060 +-3240 -22380 +-3240 -22360 +-3240 -17820 +-3240 -7620 +-3240 -7600 +-3240 -3880 +-3240 -3860 +-3240 -3840 +-3240 660 +-3240 10720 +-3220 -22380 +-3220 -22360 +-3220 -22340 +-3220 -22320 +-3220 -17820 +-3220 -17800 +-3220 -7620 +-3220 -7600 +-3220 -3860 +-3220 -3840 +-3220 460 +-3220 640 +-3220 10720 +-3220 10740 +-3200 -22360 +-3200 -22340 +-3200 -22320 +-3200 -21800 +-3200 -21740 +-3200 -21720 +-3200 -21700 +-3200 -21680 +-3200 -21660 +-3200 -21640 +-3200 -21620 +-3200 -21600 +-3200 -21580 +-3200 -21560 +-3200 -21540 +-3200 -21520 +-3200 -21480 +-3200 -21440 +-3200 -21400 +-3200 -17820 +-3200 -17800 +-3200 -7640 +-3200 -7620 +-3200 -7600 +-3200 -3860 +-3200 -3840 +-3200 420 +-3200 10720 +-3180 -22980 +-3180 -22960 +-3180 -22360 +-3180 -22340 +-3180 -21780 +-3180 -21760 +-3180 -21740 +-3180 -21680 +-3180 -21660 +-3180 -21640 +-3180 -21620 +-3180 -21600 +-3180 -21580 +-3180 -21560 +-3180 -21540 +-3180 -21520 +-3180 -21500 +-3180 -21480 +-3180 -21460 +-3180 -21440 +-3180 -21420 +-3180 -21400 +-3180 -21380 +-3180 -21360 +-3180 -21340 +-3180 -21320 +-3180 -21300 +-3180 -21280 +-3180 -21260 +-3180 -21240 +-3180 -21220 +-3180 -21200 +-3180 -21160 +-3180 -21120 +-3180 -17820 +-3180 -17800 +-3180 -7620 +-3180 -7600 +-3180 -3860 +-3180 400 +-3180 3020 +-3160 -22960 +-3160 -21740 +-3160 -21380 +-3160 -21360 +-3160 -21320 +-3160 -21300 +-3160 -21280 +-3160 -21260 +-3160 -21240 +-3160 -21220 +-3160 -21200 +-3160 -21180 +-3160 -21160 +-3160 -21140 +-3160 -21120 +-3160 -21100 +-3160 -17820 +-3160 -17800 +-3160 -7640 +-3160 -7620 +-3160 -3880 +-3160 380 +-3160 3040 +-3140 -22980 +-3140 -22960 +-3140 -21760 +-3140 -21100 +-3140 -17820 +-3140 -7620 +-3140 -7600 +-3140 -7580 +-3140 -4040 +-3140 -3880 +-3140 -3860 +-3140 360 +-3140 380 +-3140 400 +-3140 420 +-3140 440 +-3140 580 +-3140 600 +-3140 3040 +-3120 -23000 +-3120 -22960 +-3120 -22320 +-3120 -22300 +-3120 -21100 +-3120 -17820 +-3120 -7640 +-3120 -7620 +-3120 -3860 +-3120 -3840 +-3120 360 +-3120 380 +-3120 400 +-3120 420 +-3120 440 +-3120 580 +-3120 3040 +-3120 3060 +-3100 -23520 +-3100 -23500 +-3100 -23480 +-3100 -23460 +-3100 -23440 +-3100 -23420 +-3100 -23400 +-3100 -23380 +-3100 -23360 +-3100 -23340 +-3100 -23320 +-3100 -23300 +-3100 -23280 +-3100 -23260 +-3100 -23240 +-3100 -23220 +-3100 -23200 +-3100 -23180 +-3100 -23160 +-3100 -23140 +-3100 -23120 +-3100 -23100 +-3100 -23080 +-3100 -23040 +-3100 -22980 +-3100 -22960 +-3100 -22320 +-3100 -22300 +-3100 -22240 +-3100 -22220 +-3100 -22200 +-3100 -22180 +-3100 -22160 +-3100 -22140 +-3100 -22120 +-3100 -22100 +-3100 -22080 +-3100 -22060 +-3100 -22040 +-3100 -22020 +-3100 -22000 +-3100 -21980 +-3100 -21960 +-3100 -21940 +-3100 -21920 +-3100 -21900 +-3100 -21880 +-3100 -21860 +-3100 -21840 +-3100 -21100 +-3100 -21020 +-3100 -20980 +-3100 -17820 +-3100 -17800 +-3100 -7620 +-3100 -7580 +-3100 -3880 +-3100 -3860 +-3100 360 +-3100 400 +-3100 420 +-3100 440 +-3100 560 +-3100 580 +-3100 3020 +-3100 3040 +-3080 -23540 +-3080 -23520 +-3080 -23500 +-3080 -23420 +-3080 -23380 +-3080 -23360 +-3080 -23340 +-3080 -23320 +-3080 -23300 +-3080 -23280 +-3080 -23260 +-3080 -23180 +-3080 -23160 +-3080 -23140 +-3080 -23100 +-3080 -23080 +-3080 -23060 +-3080 -23040 +-3080 -23020 +-3080 -23000 +-3080 -22980 +-3080 -22960 +-3080 -22300 +-3080 -22280 +-3080 -22260 +-3080 -22240 +-3080 -22220 +-3080 -22200 +-3080 -22180 +-3080 -22160 +-3080 -22140 +-3080 -22120 +-3080 -22100 +-3080 -22080 +-3080 -22060 +-3080 -22040 +-3080 -22020 +-3080 -22000 +-3080 -21980 +-3080 -21960 +-3080 -21940 +-3080 -21920 +-3080 -21900 +-3080 -21880 +-3080 -21860 +-3080 -21840 +-3080 -21820 +-3080 -21800 +-3080 -21780 +-3080 -21760 +-3080 -21100 +-3080 -21080 +-3080 -21060 +-3080 -21020 +-3080 -21000 +-3080 -20980 +-3080 -20940 +-3080 -20920 +-3080 -17820 +-3080 -17800 +-3080 -7620 +-3080 -7600 +-3080 -3860 +-3080 380 +-3080 560 +-3080 3040 +-3080 3060 +-3080 3660 +-3080 3680 +-3080 3700 +-3060 -23520 +-3060 -23100 +-3060 -23080 +-3060 -23060 +-3060 -23020 +-3060 -23000 +-3060 -22980 +-3060 -22260 +-3060 -22240 +-3060 -22200 +-3060 -22140 +-3060 -22120 +-3060 -22060 +-3060 -21960 +-3060 -21920 +-3060 -21900 +-3060 -21840 +-3060 -21800 +-3060 -21780 +-3060 -21060 +-3060 -21040 +-3060 -20920 +-3060 -17820 +-3060 -17800 +-3060 -7620 +-3060 -3860 +-3060 560 +-3060 3040 +-3060 3660 +-3060 3680 +-3060 3700 +-3040 -23540 +-3040 -23520 +-3040 -23500 +-3040 -20920 +-3040 -17820 +-3040 -7620 +-3040 -3880 +-3040 -3860 +-3040 540 +-3040 560 +-3040 3040 +-3040 3060 +-3020 -23540 +-3020 -23520 +-3020 -20920 +-3020 -17820 +-3020 -17800 +-3020 -7640 +-3020 -7620 +-3020 -7600 +-3020 -3880 +-3020 -3860 +-3020 -3840 +-3020 540 +-3020 560 +-3020 3040 +-3000 -23540 +-3000 -23520 +-3000 -20920 +-3000 -17820 +-3000 -17800 +-3000 -7620 +-3000 -7600 +-3000 -3860 +-3000 540 +-3000 560 +-3000 3040 +-2980 -23540 +-2980 -23520 +-2980 -23500 +-2980 -20920 +-2980 -17820 +-2980 -7620 +-2980 -7600 +-2980 -3860 +-2980 540 +-2980 560 +-2980 3020 +-2980 3040 +-2980 3060 +-2980 3160 +-2960 -23540 +-2960 -23520 +-2960 -20920 +-2960 -17820 +-2960 -17800 +-2960 -7640 +-2960 -7620 +-2960 -7600 +-2960 -3860 +-2960 540 +-2960 560 +-2960 3040 +-2940 -23540 +-2940 -23520 +-2940 -23500 +-2940 -20920 +-2940 -17820 +-2940 -17800 +-2940 -7640 +-2940 -7620 +-2940 -3880 +-2940 540 +-2940 560 +-2940 3040 +-2940 3060 +-2940 3120 +-2940 3140 +-2920 -23540 +-2920 -23520 +-2920 -23500 +-2920 -20920 +-2920 -17820 +-2920 -17800 +-2920 -7620 +-2920 -7580 +-2920 -3860 +-2920 520 +-2920 540 +-2920 560 +-2920 3040 +-2920 3060 +-2900 -23540 +-2900 -23520 +-2900 -20920 +-2900 -17820 +-2900 -7620 +-2900 -7600 +-2900 -3880 +-2900 -3860 +-2900 -3840 +-2900 560 +-2900 580 +-2900 3000 +-2900 3040 +-2900 3060 +-2880 -23540 +-2880 -23300 +-2880 -20920 +-2880 -17820 +-2880 -17800 +-2880 -7620 +-2880 -7600 +-2880 -4040 +-2880 -3880 +-2880 -3860 +-2880 540 +-2880 560 +-2880 3040 +-2880 3060 +-2880 8920 +-2880 8940 +-2860 -23540 +-2860 -23520 +-2860 -23500 +-2860 -23340 +-2860 -23300 +-2860 -20920 +-2860 -17820 +-2860 -17800 +-2860 -7620 +-2860 -7600 +-2860 -3860 +-2860 540 +-2860 560 +-2860 3040 +-2860 3060 +-2860 8920 +-2860 8940 +-2840 -23540 +-2840 -23520 +-2840 -23340 +-2840 -23280 +-2840 -20920 +-2840 -17820 +-2840 -17800 +-2840 -7640 +-2840 -7620 +-2840 -7600 +-2840 -4060 +-2840 -4040 +-2840 -3880 +-2840 -3860 +-2840 540 +-2840 560 +-2840 3040 +-2840 3060 +-2840 8920 +-2840 8940 +-2820 -23540 +-2820 -23520 +-2820 -23500 +-2820 -23280 +-2820 -23260 +-2820 -23240 +-2820 -17820 +-2820 -7620 +-2820 -3880 +-2820 -3860 +-2820 560 +-2820 580 +-2820 3040 +-2820 8920 +-2820 8940 +-2800 -23540 +-2800 -23520 +-2800 -23260 +-2800 -23240 +-2800 -20920 +-2800 -17820 +-2800 -17800 +-2800 -7620 +-2800 -7600 +-2800 -3880 +-2800 -3860 +-2800 560 +-2800 580 +-2800 3040 +-2800 3060 +-2800 8940 +-2800 8960 +-2780 -23540 +-2780 -23520 +-2780 -23280 +-2780 -23260 +-2780 -20920 +-2780 -17820 +-2780 -17800 +-2780 -7620 +-2780 -7600 +-2780 -3880 +-2780 -3860 +-2780 520 +-2780 540 +-2780 560 +-2780 3040 +-2780 3060 +-2780 8920 +-2780 8940 +-2760 -23540 +-2760 -23520 +-2760 -23500 +-2760 -20920 +-2760 -17820 +-2760 -7640 +-2760 -7620 +-2760 -7600 +-2760 -3860 +-2760 -3840 +-2760 540 +-2760 560 +-2760 580 +-2760 3020 +-2760 3040 +-2760 3060 +-2760 8920 +-2760 8940 +-2740 -23540 +-2740 -23520 +-2740 -23500 +-2740 -20920 +-2740 -17820 +-2740 -17800 +-2740 -7620 +-2740 -7600 +-2740 -3880 +-2740 -3860 +-2740 540 +-2740 560 +-2740 580 +-2740 3000 +-2740 3040 +-2740 3060 +-2740 8920 +-2740 8940 +-2720 -23540 +-2720 -23520 +-2720 -20920 +-2720 -17820 +-2720 -17800 +-2720 -7620 +-2720 -4040 +-2720 -3860 +-2720 -3840 +-2720 540 +-2720 560 +-2720 580 +-2720 680 +-2720 720 +-2720 740 +-2720 760 +-2720 780 +-2720 800 +-2720 820 +-2720 860 +-2720 3020 +-2720 3040 +-2720 8920 +-2720 8940 +-2720 8960 +-2700 -23540 +-2700 -23520 +-2700 -17820 +-2700 -17800 +-2700 -7620 +-2700 -4040 +-2700 -3860 +-2700 540 +-2700 560 +-2700 580 +-2700 680 +-2700 720 +-2700 880 +-2700 1000 +-2700 1020 +-2700 1040 +-2700 1100 +-2700 3040 +-2700 3060 +-2700 8920 +-2700 8940 +-2680 -23540 +-2680 -23520 +-2680 -23500 +-2680 -20920 +-2680 -17820 +-2680 -7640 +-2680 -7620 +-2680 -7600 +-2680 -3860 +-2680 -3840 +-2680 540 +-2680 560 +-2680 580 +-2680 600 +-2680 620 +-2680 640 +-2680 660 +-2680 680 +-2680 700 +-2680 760 +-2680 780 +-2680 1020 +-2680 1060 +-2680 3000 +-2680 3040 +-2680 3060 +-2680 8920 +-2680 8940 +-2660 -23540 +-2660 -23520 +-2660 -20920 +-2660 -17820 +-2660 -17800 +-2660 -7620 +-2660 -7600 +-2660 -3860 +-2660 -3840 +-2660 560 +-2660 580 +-2660 600 +-2660 640 +-2660 1060 +-2660 3040 +-2660 3060 +-2660 3760 +-2660 3780 +-2660 3800 +-2660 8920 +-2660 8940 +-2640 -23540 +-2640 -23520 +-2640 -20920 +-2640 -20900 +-2640 -17820 +-2640 -17800 +-2640 -7620 +-2640 -3860 +-2640 560 +-2640 580 +-2640 640 +-2640 660 +-2640 680 +-2640 1060 +-2640 3000 +-2640 3040 +-2640 3780 +-2640 8920 +-2640 8940 +-2640 8960 +-2620 -23540 +-2620 -23520 +-2620 -17820 +-2620 -17800 +-2620 -7620 +-2620 -7600 +-2620 -3880 +-2620 -3860 +-2620 -3840 +-2620 560 +-2620 580 +-2620 600 +-2620 1060 +-2620 1080 +-2620 3040 +-2620 3060 +-2620 8920 +-2620 8940 +-2600 -23540 +-2600 -23520 +-2600 -20920 +-2600 -17820 +-2600 -17800 +-2600 -7620 +-2600 -7600 +-2600 -4040 +-2600 -3880 +-2600 -3860 +-2600 560 +-2600 620 +-2600 640 +-2600 660 +-2600 700 +-2600 1040 +-2600 1060 +-2600 1080 +-2600 3020 +-2600 3040 +-2600 3060 +-2600 8920 +-2600 8940 +-2580 -23540 +-2580 -23520 +-2580 -20920 +-2580 -17820 +-2580 -17800 +-2580 -7640 +-2580 -7620 +-2580 -7600 +-2580 -3860 +-2580 560 +-2580 1060 +-2580 3000 +-2580 3040 +-2580 3060 +-2580 8920 +-2580 8940 +-2560 -23540 +-2560 -23520 +-2560 -20920 +-2560 -17820 +-2560 -17800 +-2560 -7620 +-2560 -7600 +-2560 -3860 +-2560 560 +-2560 580 +-2560 640 +-2560 740 +-2560 1060 +-2560 3020 +-2560 3040 +-2560 8920 +-2560 8940 +-2560 24400 +-2540 -23540 +-2540 -23520 +-2540 -20920 +-2540 -17820 +-2540 -7620 +-2540 -7600 +-2540 -3880 +-2540 -3860 +-2540 -3840 +-2540 560 +-2540 660 +-2540 680 +-2540 740 +-2540 1060 +-2540 1080 +-2540 3040 +-2540 3060 +-2540 3240 +-2540 3260 +-2540 8920 +-2540 8940 +-2540 24400 +-2520 -23540 +-2520 -23520 +-2520 -20920 +-2520 -17820 +-2520 -17800 +-2520 -7640 +-2520 -7620 +-2520 -7600 +-2520 -3880 +-2520 -3860 +-2520 -3840 +-2520 560 +-2520 580 +-2520 620 +-2520 640 +-2520 660 +-2520 740 +-2520 760 +-2520 1060 +-2520 1100 +-2520 2640 +-2520 2660 +-2520 2700 +-2520 3000 +-2520 3020 +-2520 3040 +-2520 3060 +-2520 3240 +-2520 3260 +-2520 8920 +-2520 8940 +-2500 -23540 +-2500 -23520 +-2500 -17820 +-2500 -17800 +-2500 -7620 +-2500 -7600 +-2500 -3860 +-2500 560 +-2500 580 +-2500 680 +-2500 700 +-2500 1100 +-2500 2620 +-2500 2640 +-2500 2680 +-2500 2700 +-2500 2720 +-2500 2760 +-2500 2780 +-2500 2820 +-2500 2880 +-2500 2900 +-2500 2960 +-2500 3000 +-2500 3020 +-2500 3040 +-2500 3060 +-2500 8920 +-2500 8940 +-2480 -23540 +-2480 -17820 +-2480 -17800 +-2480 -7620 +-2480 -7600 +-2480 -3880 +-2480 -3860 +-2480 560 +-2480 580 +-2480 660 +-2480 700 +-2480 1060 +-2480 1080 +-2480 2680 +-2480 2780 +-2480 2800 +-2480 2840 +-2480 2860 +-2480 2880 +-2480 2900 +-2480 2920 +-2480 2940 +-2480 2960 +-2480 2980 +-2480 3020 +-2480 3040 +-2480 3060 +-2480 8920 +-2480 8940 +-2460 -23540 +-2460 -23520 +-2460 -17820 +-2460 -17800 +-2460 -7620 +-2460 -7600 +-2460 -4040 +-2460 -3860 +-2460 560 +-2460 580 +-2460 640 +-2460 680 +-2460 720 +-2460 1000 +-2460 1060 +-2460 2660 +-2460 2780 +-2460 2800 +-2460 2820 +-2460 2900 +-2460 2920 +-2460 3020 +-2460 3040 +-2460 3060 +-2460 8920 +-2460 8940 +-2460 8960 +-2440 -23540 +-2440 -23520 +-2440 -17820 +-2440 -17800 +-2440 -7620 +-2440 -7600 +-2440 -3880 +-2440 -3860 +-2440 560 +-2440 580 +-2440 600 +-2440 660 +-2440 700 +-2440 740 +-2440 1040 +-2440 1060 +-2440 2660 +-2440 2700 +-2440 2720 +-2440 2760 +-2440 2780 +-2440 2800 +-2440 2840 +-2440 2980 +-2440 3000 +-2440 3040 +-2440 3060 +-2440 8920 +-2440 8940 +-2420 -23540 +-2420 -23520 +-2420 -17820 +-2420 -17800 +-2420 -7640 +-2420 -7620 +-2420 -7600 +-2420 -3880 +-2420 -3860 +-2420 -3840 +-2420 560 +-2420 580 +-2420 660 +-2420 680 +-2420 740 +-2420 1040 +-2420 1060 +-2420 1080 +-2420 1100 +-2420 2720 +-2420 2740 +-2420 2760 +-2420 2780 +-2420 2800 +-2420 2820 +-2420 2840 +-2420 2960 +-2420 2980 +-2420 3000 +-2420 3020 +-2420 3040 +-2420 3060 +-2420 8580 +-2420 8920 +-2420 8940 +-2400 -23540 +-2400 -23520 +-2400 -17820 +-2400 -17800 +-2400 -7620 +-2400 -7600 +-2400 -3880 +-2400 -3860 +-2400 560 +-2400 580 +-2400 600 +-2400 700 +-2400 740 +-2400 1060 +-2400 1080 +-2400 1100 +-2400 1180 +-2400 2780 +-2400 2800 +-2400 2820 +-2400 2840 +-2400 2980 +-2400 3000 +-2400 3020 +-2400 3040 +-2400 3060 +-2400 8560 +-2400 8580 +-2400 8600 +-2400 8920 +-2400 8940 +-2380 -23540 +-2380 -23520 +-2380 -17820 +-2380 -17800 +-2380 -7620 +-2380 -7600 +-2380 -3880 +-2380 -3860 +-2380 560 +-2380 580 +-2380 740 +-2380 1060 +-2380 1080 +-2380 1100 +-2380 1160 +-2380 1200 +-2380 2740 +-2380 2780 +-2380 2800 +-2380 3040 +-2380 8920 +-2380 8940 +-2360 -23540 +-2360 -23520 +-2360 -17820 +-2360 -17800 +-2360 -7620 +-2360 -7600 +-2360 -3880 +-2360 -3860 +-2360 560 +-2360 580 +-2360 600 +-2360 660 +-2360 1040 +-2360 1060 +-2360 1080 +-2360 1100 +-2360 1200 +-2360 1240 +-2360 1260 +-2360 1280 +-2360 2740 +-2360 2780 +-2360 2800 +-2360 8920 +-2360 8940 +-2340 -23540 +-2340 -17820 +-2340 -17800 +-2340 -7620 +-2340 -7600 +-2340 -4040 +-2340 -3860 +-2340 -3840 +-2340 560 +-2340 580 +-2340 600 +-2340 680 +-2340 1020 +-2340 1060 +-2340 1080 +-2340 1100 +-2340 1240 +-2340 1260 +-2340 1280 +-2340 1300 +-2340 1320 +-2340 1360 +-2340 2320 +-2340 2380 +-2340 2400 +-2340 2440 +-2340 2560 +-2340 2600 +-2340 2640 +-2340 2660 +-2340 2680 +-2340 2700 +-2340 2720 +-2340 2740 +-2340 2760 +-2340 2780 +-2340 2800 +-2340 8920 +-2340 8940 +-2320 -23540 +-2320 -23520 +-2320 -17820 +-2320 -17800 +-2320 -7640 +-2320 -7620 +-2320 -7600 +-2320 -7580 +-2320 -3880 +-2320 -3860 +-2320 -3840 +-2320 560 +-2320 580 +-2320 600 +-2320 620 +-2320 640 +-2320 700 +-2320 1020 +-2320 1040 +-2320 1080 +-2320 1100 +-2320 1240 +-2320 1260 +-2320 1280 +-2320 1300 +-2320 1320 +-2320 1340 +-2320 1360 +-2320 1380 +-2320 1400 +-2320 1420 +-2320 1440 +-2320 1460 +-2320 1480 +-2320 1500 +-2320 1520 +-2320 1540 +-2320 1560 +-2320 1580 +-2320 1600 +-2320 1620 +-2320 1640 +-2320 1660 +-2320 1680 +-2320 1700 +-2320 1720 +-2320 1740 +-2320 1760 +-2320 1780 +-2320 1800 +-2320 1820 +-2320 1840 +-2320 1860 +-2320 1880 +-2320 1900 +-2320 1920 +-2320 1940 +-2320 1960 +-2320 1980 +-2320 2000 +-2320 2020 +-2320 2040 +-2320 2060 +-2320 2080 +-2320 2100 +-2320 2120 +-2320 2140 +-2320 2160 +-2320 2180 +-2320 2200 +-2320 2220 +-2320 2240 +-2320 2260 +-2320 2280 +-2320 2300 +-2320 2320 +-2320 2340 +-2320 2360 +-2320 2380 +-2320 2400 +-2320 2420 +-2320 2440 +-2320 2460 +-2320 2480 +-2320 2500 +-2320 2520 +-2320 2540 +-2320 2560 +-2320 2580 +-2320 2600 +-2320 2620 +-2320 2640 +-2320 2660 +-2320 2680 +-2320 2700 +-2320 2720 +-2320 2740 +-2320 2760 +-2320 2780 +-2320 2800 +-2320 8920 +-2320 8940 +-2300 -23540 +-2300 -23520 +-2300 -17840 +-2300 -17820 +-2300 -7620 +-2300 -7600 +-2300 -3880 +-2300 -3860 +-2300 560 +-2300 580 +-2300 600 +-2300 640 +-2300 680 +-2300 1020 +-2300 1060 +-2300 1080 +-2300 1100 +-2300 1320 +-2300 1340 +-2300 1360 +-2300 1380 +-2300 1400 +-2300 1420 +-2300 1440 +-2300 1460 +-2300 1480 +-2300 1500 +-2300 1520 +-2300 1540 +-2300 1560 +-2300 1580 +-2300 1600 +-2300 1620 +-2300 1640 +-2300 1660 +-2300 1680 +-2300 1700 +-2300 1720 +-2300 1740 +-2300 1760 +-2300 1780 +-2300 1800 +-2300 1820 +-2300 1840 +-2300 1860 +-2300 1880 +-2300 1900 +-2300 1920 +-2300 1940 +-2300 1960 +-2300 1980 +-2300 2000 +-2300 2020 +-2300 2040 +-2300 2060 +-2300 2080 +-2300 2100 +-2300 2120 +-2300 2140 +-2300 2160 +-2300 2180 +-2300 2200 +-2300 2240 +-2300 2260 +-2300 2280 +-2300 2300 +-2300 2320 +-2300 2340 +-2300 2360 +-2300 2380 +-2300 2400 +-2300 2420 +-2300 2440 +-2300 2460 +-2300 2480 +-2300 2500 +-2300 2520 +-2300 2540 +-2300 2560 +-2300 2580 +-2300 2600 +-2300 2620 +-2300 2640 +-2300 2660 +-2300 2680 +-2300 2700 +-2300 8920 +-2300 8940 +-2280 -23540 +-2280 -23520 +-2280 -17920 +-2280 -17900 +-2280 -17840 +-2280 -7640 +-2280 -7620 +-2280 -7600 +-2280 -3880 +-2280 -3860 +-2280 560 +-2280 580 +-2280 600 +-2280 620 +-2280 1020 +-2280 1040 +-2280 1060 +-2280 1080 +-2280 1100 +-2280 1380 +-2280 1680 +-2280 1720 +-2280 1900 +-2280 2340 +-2280 2400 +-2280 2600 +-2280 2700 +-2280 8920 +-2280 8940 +-2260 -23540 +-2260 -23520 +-2260 -17920 +-2260 -17900 +-2260 -7620 +-2260 -7600 +-2260 -3880 +-2260 -3860 +-2260 560 +-2260 580 +-2260 620 +-2260 640 +-2260 660 +-2260 680 +-2260 800 +-2260 820 +-2260 1020 +-2260 1080 +-2260 1100 +-2260 8920 +-2260 8940 +-2240 -23540 +-2240 -23520 +-2240 -17960 +-2240 -17940 +-2240 -17920 +-2240 -7640 +-2240 -7620 +-2240 -7600 +-2240 -4040 +-2240 -3880 +-2240 -3860 +-2240 -3840 +-2240 560 +-2240 580 +-2240 600 +-2240 660 +-2240 720 +-2240 780 +-2240 800 +-2240 820 +-2240 920 +-2240 1040 +-2240 1060 +-2240 1080 +-2240 1100 +-2240 8920 +-2240 8940 +-2220 -23540 +-2220 -23520 +-2220 -18000 +-2220 -17980 +-2220 -17960 +-2220 -7620 +-2220 -7600 +-2220 -3880 +-2220 -3860 +-2220 560 +-2220 580 +-2220 640 +-2220 700 +-2220 800 +-2220 840 +-2220 940 +-2220 960 +-2220 1040 +-2220 1100 +-2220 8920 +-2220 8940 +-2200 -23540 +-2200 -23520 +-2200 -18020 +-2200 -17980 +-2200 -7620 +-2200 -7600 +-2200 -3880 +-2200 -3860 +-2200 560 +-2200 580 +-2200 640 +-2200 660 +-2200 680 +-2200 740 +-2200 760 +-2200 780 +-2200 840 +-2200 960 +-2200 1020 +-2200 1080 +-2200 1100 +-2200 8920 +-2200 8940 +-2180 -23540 +-2180 -23520 +-2180 -18020 +-2180 -7640 +-2180 -7620 +-2180 -7600 +-2180 -4040 +-2180 -3880 +-2180 -3860 +-2180 540 +-2180 560 +-2180 580 +-2180 600 +-2180 620 +-2180 640 +-2180 660 +-2180 680 +-2180 780 +-2180 800 +-2180 820 +-2180 840 +-2180 880 +-2180 900 +-2180 920 +-2180 940 +-2180 960 +-2180 980 +-2180 1000 +-2180 1020 +-2180 1040 +-2180 1060 +-2180 1080 +-2180 1100 +-2180 8920 +-2180 8940 +-2160 -23540 +-2160 -18020 +-2160 -7640 +-2160 -7620 +-2160 -7600 +-2160 -3880 +-2160 -3860 +-2160 540 +-2160 560 +-2160 580 +-2160 600 +-2160 620 +-2160 640 +-2160 660 +-2160 680 +-2160 700 +-2160 720 +-2160 740 +-2160 760 +-2160 780 +-2160 800 +-2160 820 +-2160 840 +-2160 860 +-2160 880 +-2160 900 +-2160 920 +-2160 940 +-2160 960 +-2160 980 +-2160 1000 +-2160 1020 +-2160 1040 +-2160 1060 +-2160 1080 +-2160 1100 +-2160 8920 +-2160 8940 +-2140 -23540 +-2140 -23520 +-2140 -23500 +-2140 -21360 +-2140 -18040 +-2140 -18020 +-2140 -7620 +-2140 -7600 +-2140 -4040 +-2140 -3880 +-2140 -3860 +-2140 560 +-2140 580 +-2140 600 +-2140 620 +-2140 660 +-2140 700 +-2140 720 +-2140 800 +-2140 8920 +-2140 8940 +-2120 -23520 +-2120 -18020 +-2120 -7620 +-2120 -7600 +-2120 -3880 +-2120 -3860 +-2120 8580 +-2120 8600 +-2120 8920 +-2120 8940 +-2120 8960 +-2100 -23520 +-2100 -18040 +-2100 -18020 +-2100 -7640 +-2100 -7620 +-2100 -7600 +-2100 -4040 +-2100 -3880 +-2100 -3860 +-2100 8580 +-2100 8600 +-2100 8940 +-2100 8960 +-2100 8980 +-2080 -23540 +-2080 -23520 +-2080 -21400 +-2080 -18020 +-2080 -7620 +-2080 -7600 +-2080 -3880 +-2080 -3860 +-2080 -3840 +-2080 8920 +-2080 8940 +-2080 8960 +-2060 -23540 +-2060 -23520 +-2060 -21420 +-2060 -21400 +-2060 -18020 +-2060 -7620 +-2060 -7600 +-2060 -4040 +-2060 -3880 +-2060 -3860 +-2060 8920 +-2060 8940 +-2060 8960 +-2060 9080 +-2060 9140 +-2060 9360 +-2060 9580 +-2060 9620 +-2060 10120 +-2060 10240 +-2060 10360 +-2060 10780 +-2040 -23540 +-2040 -21400 +-2040 -18020 +-2040 -13140 +-2040 -7640 +-2040 -7620 +-2040 -7600 +-2040 -3880 +-2040 -3860 +-2040 8620 +-2040 8640 +-2040 8660 +-2040 8940 +-2040 8960 +-2040 8980 +-2040 9020 +-2040 9040 +-2040 9060 +-2040 9160 +-2040 9280 +-2040 9320 +-2040 9340 +-2040 9400 +-2040 9440 +-2040 9480 +-2040 9600 +-2040 9680 +-2040 9740 +-2040 9760 +-2040 9780 +-2040 9820 +-2040 9880 +-2040 9920 +-2040 9980 +-2040 10100 +-2040 10140 +-2040 10440 +-2040 10460 +-2040 10480 +-2040 10540 +-2040 10700 +-2040 10720 +-2020 -23540 +-2020 -23520 +-2020 -21420 +-2020 -21400 +-2020 -18040 +-2020 -18020 +-2020 -13400 +-2020 -13380 +-2020 -13360 +-2020 -13340 +-2020 -13320 +-2020 -13300 +-2020 -13280 +-2020 -13260 +-2020 -13240 +-2020 -13220 +-2020 -13200 +-2020 -13180 +-2020 -13160 +-2020 -13140 +-2020 -13120 +-2020 -13100 +-2020 -13060 +-2020 -7620 +-2020 -7600 +-2020 -3880 +-2020 -3860 +-2020 8620 +-2020 8940 +-2020 8960 +-2020 8980 +-2020 9040 +-2020 9120 +-2020 9140 +-2020 9180 +-2020 9200 +-2020 9240 +-2020 9260 +-2020 9280 +-2020 9340 +-2020 9360 +-2020 9400 +-2020 9420 +-2020 9480 +-2020 9520 +-2020 9560 +-2020 9600 +-2020 9780 +-2020 9840 +-2020 9860 +-2020 9900 +-2020 9920 +-2020 9940 +-2020 9980 +-2020 10000 +-2020 10020 +-2020 10100 +-2020 10240 +-2020 10260 +-2020 10280 +-2020 10300 +-2020 10360 +-2020 10460 +-2020 10520 +-2020 10560 +-2020 10620 +-2020 10660 +-2020 10680 +-2020 10700 +-2020 10740 +-2020 10780 +-2000 -23540 +-2000 -23520 +-2000 -21400 +-2000 -18040 +-2000 -18020 +-2000 -13480 +-2000 -13460 +-2000 -13440 +-2000 -13420 +-2000 -13400 +-2000 -13380 +-2000 -13360 +-2000 -13340 +-2000 -13320 +-2000 -13300 +-2000 -13280 +-2000 -13260 +-2000 -13240 +-2000 -13220 +-2000 -13200 +-2000 -13180 +-2000 -13160 +-2000 -13140 +-2000 -13120 +-2000 -13100 +-2000 -13080 +-2000 -13060 +-2000 -13040 +-2000 -13020 +-2000 -13000 +-2000 -7640 +-2000 -7620 +-2000 -7600 +-2000 -3900 +-2000 -3880 +-2000 -3860 +-2000 8600 +-2000 8620 +-2000 9000 +-2000 9100 +-2000 9120 +-2000 9320 +-2000 9400 +-2000 9420 +-2000 9460 +-2000 9540 +-2000 9580 +-2000 9660 +-2000 9740 +-2000 9760 +-2000 9860 +-2000 9920 +-2000 9940 +-2000 9960 +-2000 9980 +-2000 10000 +-2000 10060 +-2000 10140 +-2000 10220 +-2000 10460 +-2000 10500 +-2000 10600 +-2000 10660 +-2000 10780 +-1980 -23540 +-1980 -23520 +-1980 -21420 +-1980 -21400 +-1980 -18040 +-1980 -18020 +-1980 -13600 +-1980 -13580 +-1980 -13560 +-1980 -13540 +-1980 -13520 +-1980 -13500 +-1980 -13480 +-1980 -13460 +-1980 -13440 +-1980 -13420 +-1980 -13400 +-1980 -13380 +-1980 -13140 +-1980 -13120 +-1980 -13100 +-1980 -13080 +-1980 -13060 +-1980 -13040 +-1980 -13020 +-1980 -13000 +-1980 -12980 +-1980 -12960 +-1980 -12940 +-1980 -12920 +-1980 -12900 +-1980 -12840 +-1980 -7620 +-1980 -7600 +-1980 -3880 +-1980 -3860 +-1980 10720 +-1980 10740 +-1980 10780 +-1980 10800 +-1960 -23540 +-1960 -21420 +-1960 -21400 +-1960 -18040 +-1960 -18020 +-1960 -13680 +-1960 -13660 +-1960 -13640 +-1960 -13620 +-1960 -13600 +-1960 -13580 +-1960 -13560 +-1960 -13540 +-1960 -13520 +-1960 -13020 +-1960 -13000 +-1960 -12980 +-1960 -12960 +-1960 -12940 +-1960 -12920 +-1960 -12900 +-1960 -12880 +-1960 -12860 +-1960 -12840 +-1960 -12820 +-1960 -12800 +-1960 -7640 +-1960 -7620 +-1960 -7600 +-1960 -3900 +-1960 -3880 +-1960 -3860 +-1960 10780 +-1940 -23540 +-1940 -21420 +-1940 -21400 +-1940 -18040 +-1940 -18020 +-1940 -13680 +-1940 -13660 +-1940 -13640 +-1940 -13620 +-1940 -12900 +-1940 -12880 +-1940 -12860 +-1940 -12840 +-1940 -12820 +-1940 -12800 +-1940 -12780 +-1940 -7620 +-1940 -7600 +-1940 -4100 +-1940 -4080 +-1940 -4060 +-1940 -3960 +-1940 -3940 +-1940 -3920 +-1940 -3900 +-1940 -3880 +-1940 -3860 +-1940 10780 +-1940 10800 +-1920 -23540 +-1920 -23520 +-1920 -21420 +-1920 -21400 +-1920 -18040 +-1920 -18020 +-1920 -13680 +-1920 -12840 +-1920 -12820 +-1920 -12800 +-1920 -12780 +-1920 -7620 +-1920 -7600 +-1920 -4120 +-1920 -4100 +-1920 -3940 +-1920 -3920 +-1920 10780 +-1900 -23540 +-1900 -23520 +-1900 -21420 +-1900 -21400 +-1900 -18040 +-1900 -18020 +-1900 -13680 +-1900 -12800 +-1900 -12780 +-1900 -7620 +-1900 -7600 +-1900 -4160 +-1900 -4040 +-1900 -4020 +-1900 -4000 +-1900 -3980 +-1900 -3960 +-1900 -3940 +-1900 -3920 +-1900 10760 +-1900 10780 +-1900 10800 +-1880 -23540 +-1880 -21420 +-1880 -21400 +-1880 -18040 +-1880 -18020 +-1880 -13700 +-1880 -13680 +-1880 -12800 +-1880 -12780 +-1880 -7640 +-1880 -7620 +-1880 -7600 +-1880 -7000 +-1880 -5600 +-1880 -5540 +-1880 -5520 +-1880 -5480 +-1880 -5460 +-1880 -5420 +-1880 -5400 +-1880 -5380 +-1880 -5360 +-1880 -5320 +-1880 -5280 +-1880 -5240 +-1880 -5200 +-1880 -5160 +-1880 -5140 +-1880 -5120 +-1880 -5080 +-1880 -5060 +-1880 -5040 +-1880 -5020 +-1880 -5000 +-1880 -4980 +-1880 -4940 +-1880 -4920 +-1880 -4880 +-1880 -4860 +-1880 -4840 +-1880 -4820 +-1880 -4800 +-1880 -4780 +-1880 -4760 +-1880 -4740 +-1880 -4720 +-1880 -4700 +-1880 -4680 +-1880 -4660 +-1880 -4640 +-1880 -4620 +-1880 -4600 +-1880 -4580 +-1880 -4560 +-1880 -4540 +-1880 -4520 +-1880 -4500 +-1880 -4480 +-1880 -4460 +-1880 -4440 +-1880 -4420 +-1880 -4400 +-1880 -4380 +-1880 -4360 +-1880 -4340 +-1880 -4320 +-1880 -4300 +-1880 -4280 +-1880 -4260 +-1880 -4240 +-1880 -4220 +-1880 -4200 +-1880 -4180 +-1880 -4160 +-1880 -4140 +-1880 -4120 +-1880 -4100 +-1880 -4080 +-1880 -4060 +-1880 -4040 +-1880 -4020 +-1880 -4000 +-1880 -3980 +-1880 -3960 +-1880 -3940 +-1880 -3920 +-1880 10780 +-1880 10800 +-1860 -23540 +-1860 -21400 +-1860 -18040 +-1860 -18020 +-1860 -13680 +-1860 -12800 +-1860 -12780 +-1860 -12760 +-1860 -7620 +-1860 -7600 +-1860 -7240 +-1860 -6880 +-1860 -6760 +-1860 -6660 +-1860 -6640 +-1860 -6560 +-1860 -6520 +-1860 -6440 +-1860 -6400 +-1860 -6220 +-1860 -6120 +-1860 -6100 +-1860 -6080 +-1860 -6060 +-1860 -6020 +-1860 -5980 +-1860 -5920 +-1860 -5900 +-1860 -5860 +-1860 -5640 +-1860 -5540 +-1860 -5520 +-1860 -5480 +-1860 -5460 +-1860 -5440 +-1860 -5420 +-1860 -5360 +-1860 -5320 +-1860 -5280 +-1860 -5260 +-1860 -5240 +-1860 -5220 +-1860 -5200 +-1860 -5180 +-1860 -5140 +-1860 -5120 +-1860 -5100 +-1860 -5080 +-1860 -5060 +-1860 -5040 +-1860 -4980 +-1860 -4960 +-1860 -4940 +-1860 -4920 +-1860 -4900 +-1860 -4880 +-1860 -4860 +-1860 -4840 +-1860 -4820 +-1860 -4800 +-1860 -4780 +-1860 -4720 +-1860 -4700 +-1860 -4680 +-1860 -4660 +-1860 -4640 +-1860 -4600 +-1860 -4580 +-1860 -4480 +-1860 -4460 +-1860 -4420 +-1860 -4400 +-1860 -4380 +-1860 -4360 +-1860 -4340 +-1860 -4320 +-1860 -4280 +-1860 -4260 +-1860 -4240 +-1860 -4220 +-1860 -4180 +-1860 -4160 +-1860 -4140 +-1860 -4120 +-1860 -4100 +-1860 -4020 +-1860 -4000 +-1860 -3980 +-1860 10780 +-1840 -23540 +-1840 -21420 +-1840 -21400 +-1840 -18040 +-1840 -18020 +-1840 -13680 +-1840 -13660 +-1840 -12820 +-1840 -12800 +-1840 -12780 +-1840 -7620 +-1840 -7600 +-1840 -6820 +-1840 -6760 +-1840 -6700 +-1840 -6560 +-1840 -6420 +-1840 -6200 +-1840 -6160 +-1840 -6020 +-1840 -6000 +-1840 -5960 +-1840 -5940 +-1840 -5920 +-1840 -5900 +-1840 -5720 +-1840 -5700 +-1840 -5680 +-1840 -5600 +-1840 -5200 +-1840 -5160 +-1840 -5140 +-1840 -5120 +-1840 -4960 +-1840 -4880 +-1840 -4820 +-1840 -4760 +-1840 -4740 +-1840 -4580 +-1840 -4500 +-1840 -4440 +-1840 -4320 +-1840 -4280 +-1840 -4120 +-1840 10780 +-1820 -23540 +-1820 -23520 +-1820 -21400 +-1820 -18040 +-1820 -18020 +-1820 -13660 +-1820 -12800 +-1820 -12780 +-1820 -12760 +-1820 -7640 +-1820 -7620 +-1820 -7600 +-1820 -6780 +-1820 -5980 +-1820 -5900 +-1820 -5720 +-1820 10780 +-1800 -23540 +-1800 -21400 +-1800 -18040 +-1800 -18020 +-1800 -12780 +-1800 -12760 +-1800 -7620 +-1800 -7600 +-1800 -7240 +-1800 -7220 +-1800 -5700 +-1800 10780 +-1780 -23540 +-1780 -21400 +-1780 -18040 +-1780 -18020 +-1780 -12780 +-1780 -12760 +-1780 -7620 +-1780 -7600 +-1780 -5640 +-1780 10780 +-1760 -23540 +-1760 -21400 +-1760 -18040 +-1760 -18020 +-1760 -13620 +-1760 -12780 +-1760 -12760 +-1760 -7620 +-1760 -7600 +-1760 -7580 +-1760 -7240 +-1760 -5620 +-1760 10780 +-1740 -23540 +-1740 -21400 +-1740 -18040 +-1740 -13620 +-1740 -12780 +-1740 -12760 +-1740 -7620 +-1740 -7600 +-1740 -7580 +-1740 -5600 +-1740 10260 +-1740 10760 +-1740 10780 +-1720 -23540 +-1720 -21420 +-1720 -21400 +-1720 -18040 +-1720 -18020 +-1720 -13680 +-1720 -12780 +-1720 -12760 +-1720 -7640 +-1720 -7620 +-1720 -7600 +-1720 -5920 +-1720 -5880 +-1720 -5820 +-1720 -5600 +-1720 10220 +-1720 10240 +-1720 10780 +-1700 -23540 +-1700 -21400 +-1700 -18040 +-1700 -13680 +-1700 -12820 +-1700 -12780 +-1700 -12760 +-1700 -7620 +-1700 -7600 +-1700 -6000 +-1700 -5820 +-1700 -5700 +-1700 -5620 +-1700 10220 +-1700 10780 +-1680 -23540 +-1680 -21420 +-1680 -21400 +-1680 -18040 +-1680 -18020 +-1680 -13700 +-1680 -13680 +-1680 -13640 +-1680 -12780 +-1680 -12760 +-1680 -7620 +-1680 -7600 +-1680 -6040 +-1680 -6000 +-1680 -5640 +-1680 10300 +-1680 10780 +-1660 -23540 +-1660 -21400 +-1660 -18040 +-1660 -13700 +-1660 -13680 +-1660 -12860 +-1660 -12780 +-1660 -12760 +-1660 -7620 +-1660 -7600 +-1660 -6320 +-1660 -6200 +-1660 -5320 +-1660 10260 +-1660 10780 +-1640 -23540 +-1640 -21400 +-1640 -18060 +-1640 -18040 +-1640 -13700 +-1640 -13680 +-1640 -12860 +-1640 -12780 +-1640 -12760 +-1640 -7620 +-1640 -7600 +-1640 -6580 +-1640 -5340 +-1640 -5320 +-1640 -5240 +-1640 -5200 +-1640 10280 +-1640 10760 +-1640 10780 +-1620 -23540 +-1620 -21400 +-1620 -18040 +-1620 -13700 +-1620 -13680 +-1620 -12780 +-1620 -12760 +-1620 -7620 +-1620 -7600 +-1620 -5320 +-1620 -5300 +-1620 -5280 +-1620 -5260 +-1620 -5240 +-1620 -5220 +-1620 10780 +-1600 -23540 +-1600 -21400 +-1600 -18040 +-1600 -13700 +-1600 -13680 +-1600 -12780 +-1600 -12760 +-1600 -7620 +-1600 -7600 +-1600 -6800 +-1600 -6660 +-1600 -6560 +-1600 -5480 +-1600 -5460 +-1600 -5320 +-1600 -5220 +-1600 -5200 +-1600 10780 +-1580 -23540 +-1580 -21400 +-1580 -18040 +-1580 -13700 +-1580 -12840 +-1580 -12780 +-1580 -12760 +-1580 -7620 +-1580 -7600 +-1580 -6620 +-1580 -5940 +-1580 -5620 +-1580 -5520 +-1580 -5360 +-1580 -5220 +-1580 10720 +-1580 10760 +-1580 10780 +-1560 -23540 +-1560 -21400 +-1560 -18060 +-1560 -18040 +-1560 -13700 +-1560 -13680 +-1560 -12780 +-1560 -12760 +-1560 -7640 +-1560 -7620 +-1560 -7600 +-1560 -6560 +-1560 -5540 +-1560 -5520 +-1560 -5500 +-1560 -5360 +-1560 -5240 +-1560 -5220 +-1560 -5200 +-1560 10780 +-1540 -23540 +-1540 -21400 +-1540 -18060 +-1540 -18040 +-1540 -18000 +-1540 -17980 +-1540 -17960 +-1540 -17940 +-1540 -17920 +-1540 -13700 +-1540 -13660 +-1540 -12780 +-1540 -12760 +-1540 -7620 +-1540 -7600 +-1540 -6600 +-1540 -5920 +-1540 -5600 +-1540 -5360 +-1540 -5340 +-1540 -5260 +-1540 -5220 +-1540 10760 +-1540 10780 +-1520 -23540 +-1520 -21400 +-1520 -17980 +-1520 -17940 +-1520 -17920 +-1520 -17900 +-1520 -13700 +-1520 -13680 +-1520 -12780 +-1520 -12760 +-1520 -7620 +-1520 -7600 +-1520 -7580 +-1520 -6600 +-1520 -5360 +-1520 10780 +-1500 -23540 +-1500 -21400 +-1500 -17920 +-1500 -17900 +-1500 -13700 +-1500 -13680 +-1500 -12780 +-1500 -12760 +-1500 -7640 +-1500 -7620 +-1500 -7600 +-1500 -6620 +-1500 -6600 +-1500 -5380 +-1500 -5360 +-1500 -5280 +-1500 -5260 +-1500 -5240 +-1500 10780 +-1480 -23540 +-1480 -21420 +-1480 -21400 +-1480 -17920 +-1480 -17900 +-1480 -17880 +-1480 -17860 +-1480 -17840 +-1480 -17820 +-1480 -13700 +-1480 -13680 +-1480 -12780 +-1480 -12760 +-1480 -7620 +-1480 -7600 +-1480 -6000 +-1480 -5800 +-1480 -5780 +-1480 -5760 +-1480 -5740 +-1480 -5280 +-1480 -5260 +-1480 10780 +-1460 -23540 +-1460 -21400 +-1460 -17920 +-1460 -17880 +-1460 -17860 +-1460 -17840 +-1460 -17820 +-1460 -13700 +-1460 -13680 +-1460 -12780 +-1460 -12760 +-1460 -7620 +-1460 -7600 +-1460 -6600 +-1460 -6580 +-1460 -6020 +-1460 -6000 +-1460 -5780 +-1460 -5260 +-1460 10780 +-1440 -23540 +-1440 -21400 +-1440 -17820 +-1440 -17800 +-1440 -13700 +-1440 -12780 +-1440 -12760 +-1440 -7620 +-1440 -7600 +-1440 -6600 +-1440 -5900 +-1440 -5300 +-1440 -5280 +-1440 -5260 +-1440 10780 +-1420 -23540 +-1420 -21400 +-1420 -17820 +-1420 -17800 +-1420 -13700 +-1420 -13680 +-1420 -13660 +-1420 -12780 +-1420 -12760 +-1420 -7620 +-1420 -7600 +-1420 -6600 +-1420 -5920 +-1420 -5860 +-1420 -5740 +-1420 -5320 +-1420 -5300 +-1420 -5260 +-1400 -23540 +-1400 -21400 +-1400 -21380 +-1400 -17820 +-1400 -17800 +-1400 -13700 +-1400 -13680 +-1400 -12780 +-1400 -12760 +-1400 -7620 +-1400 -7600 +-1400 -6600 +-1400 -5880 +-1400 -5780 +-1400 -5760 +-1400 -5340 +-1400 -5320 +-1380 -23540 +-1380 -21400 +-1380 -17820 +-1380 -17800 +-1380 -13700 +-1380 -13680 +-1380 -12780 +-1380 -12760 +-1380 -7620 +-1380 -7600 +-1380 -6160 +-1380 7740 +-1380 7760 +-1360 -23540 +-1360 -21400 +-1360 -21380 +-1360 -17820 +-1360 -17800 +-1360 -13700 +-1360 -12780 +-1360 -12760 +-1360 -7620 +-1360 -7600 +-1360 -6620 +-1360 -6600 +-1360 -6180 +-1360 -6060 +-1360 -5760 +-1360 7740 +-1360 7760 +-1360 10780 +-1360 10800 +-1340 -23540 +-1340 -21400 +-1340 -17820 +-1340 -17800 +-1340 -13700 +-1340 -12780 +-1340 -12760 +-1340 -7640 +-1340 -7620 +-1340 -7600 +-1340 -6800 +-1340 -6620 +-1340 -6600 +-1340 -6180 +-1340 -6060 +-1340 -5780 +-1340 7740 +-1340 7760 +-1340 7780 +-1320 -23540 +-1320 -21400 +-1320 -17820 +-1320 -13700 +-1320 -13680 +-1320 -12780 +-1320 -12760 +-1320 -7640 +-1320 -7620 +-1320 -7600 +-1320 -6620 +-1320 -6600 +-1320 7740 +-1320 7760 +-1320 7780 +-1320 7800 +-1320 7960 +-1300 -23540 +-1300 -21400 +-1300 -17820 +-1300 -17800 +-1300 -13700 +-1300 -12780 +-1300 -12760 +-1300 -7640 +-1300 -7620 +-1300 -7600 +-1300 -6600 +-1300 7740 +-1300 7760 +-1300 8000 +-1280 -23540 +-1280 -21400 +-1280 -21380 +-1280 -17820 +-1280 -17800 +-1280 -13700 +-1280 -13680 +-1280 -7620 +-1280 -7600 +-1280 -6620 +-1280 -6600 +-1280 7740 +-1280 7760 +-1280 7780 +-1280 7800 +-1280 7980 +-1260 -23560 +-1260 -23540 +-1260 -21400 +-1260 -17820 +-1260 -17800 +-1260 -13700 +-1260 -13680 +-1260 -7640 +-1260 -7620 +-1260 -7600 +-1260 -6640 +-1260 -6620 +-1260 -6600 +-1260 7720 +-1260 7740 +-1260 7760 +-1260 7780 +-1260 7840 +-1260 8020 +-1260 10780 +-1240 -23540 +-1240 -21400 +-1240 -21100 +-1240 -21040 +-1240 -19620 +-1240 -19600 +-1240 -19560 +-1240 -19540 +-1240 -19520 +-1240 -19460 +-1240 -19260 +-1240 -19240 +-1240 -19160 +-1240 -19100 +-1240 -17820 +-1240 -17800 +-1240 -13700 +-1240 -13680 +-1240 -13660 +-1240 -7640 +-1240 -7620 +-1240 -7600 +-1240 -6620 +-1240 -6600 +-1240 7740 +-1240 7760 +-1240 7780 +-1240 7820 +-1220 -23540 +-1220 -21400 +-1220 -21360 +-1220 -21340 +-1220 -19700 +-1220 -19640 +-1220 -19480 +-1220 -19440 +-1220 -19420 +-1220 -19400 +-1220 -19380 +-1220 -19360 +-1220 -19340 +-1220 -19300 +-1220 -19280 +-1220 -19240 +-1220 -19220 +-1220 -19160 +-1220 -19140 +-1220 -19120 +-1220 -19060 +-1220 -19020 +-1220 -19000 +-1220 -18960 +-1220 -18920 +-1220 -18900 +-1220 -18860 +-1220 -18800 +-1220 -18760 +-1220 -17820 +-1220 -17800 +-1220 -13680 +-1220 -13440 +-1220 -13420 +-1220 -10780 +-1220 -10760 +-1220 -7620 +-1220 -7600 +-1220 -6620 +-1220 -6580 +-1220 -6560 +-1220 7740 +-1220 7760 +-1220 7780 +-1220 7860 +-1220 8140 +-1200 -23540 +-1200 -21420 +-1200 -21400 +-1200 -21340 +-1200 -21280 +-1200 -21260 +-1200 -21220 +-1200 -21200 +-1200 -17820 +-1200 -17800 +-1200 -13680 +-1200 -13520 +-1200 -13500 +-1200 -13480 +-1200 -13440 +-1200 -13400 +-1200 -13380 +-1200 -13360 +-1200 -13320 +-1200 -13280 +-1200 -10780 +-1200 -10760 +-1200 -7620 +-1200 -7600 +-1200 -7360 +-1200 -7260 +-1200 -7200 +-1200 -6760 +-1200 -6660 +-1200 -6620 +-1200 -6600 +-1200 -6580 +-1200 -6560 +-1200 7740 +-1200 7760 +-1200 7780 +-1200 7800 +-1200 8180 +-1180 -23560 +-1180 -23540 +-1180 -21420 +-1180 -21400 +-1180 -21380 +-1180 -21360 +-1180 -21340 +-1180 -21320 +-1180 -21300 +-1180 -21280 +-1180 -21260 +-1180 -21040 +-1180 -21020 +-1180 -20980 +-1180 -17820 +-1180 -17800 +-1180 -17780 +-1180 -17760 +-1180 -17740 +-1180 -17720 +-1180 -17700 +-1180 -17680 +-1180 -17660 +-1180 -17640 +-1180 -17620 +-1180 -17600 +-1180 -17580 +-1180 -17560 +-1180 -17540 +-1180 -17520 +-1180 -17500 +-1180 -17480 +-1180 -17460 +-1180 -17440 +-1180 -17420 +-1180 -17400 +-1180 -17380 +-1180 -17360 +-1180 -17340 +-1180 -17320 +-1180 -17300 +-1180 -17280 +-1180 -17260 +-1180 -17240 +-1180 -17220 +-1180 -17200 +-1180 -17180 +-1180 -17160 +-1180 -17140 +-1180 -17120 +-1180 -17100 +-1180 -17080 +-1180 -17060 +-1180 -17040 +-1180 -17020 +-1180 -17000 +-1180 -16980 +-1180 -16960 +-1180 -16940 +-1180 -16920 +-1180 -16900 +-1180 -16880 +-1180 -16860 +-1180 -16840 +-1180 -16820 +-1180 -16800 +-1180 -16780 +-1180 -16760 +-1180 -16740 +-1180 -16720 +-1180 -16700 +-1180 -16680 +-1180 -16660 +-1180 -16640 +-1180 -16620 +-1180 -16600 +-1180 -16580 +-1180 -16560 +-1180 -16540 +-1180 -16520 +-1180 -16500 +-1180 -16480 +-1180 -16460 +-1180 -16440 +-1180 -16420 +-1180 -16400 +-1180 -16380 +-1180 -16360 +-1180 -16340 +-1180 -16320 +-1180 -16300 +-1180 -16280 +-1180 -16260 +-1180 -16240 +-1180 -16220 +-1180 -16200 +-1180 -16180 +-1180 -16160 +-1180 -16140 +-1180 -16120 +-1180 -16100 +-1180 -16080 +-1180 -16060 +-1180 -16040 +-1180 -16020 +-1180 -16000 +-1180 -15980 +-1180 -15960 +-1180 -15940 +-1180 -15920 +-1180 -15900 +-1180 -15880 +-1180 -15860 +-1180 -15840 +-1180 -15820 +-1180 -15800 +-1180 -15780 +-1180 -15760 +-1180 -15740 +-1180 -15720 +-1180 -15700 +-1180 -15660 +-1180 -15640 +-1180 -15620 +-1180 -15600 +-1180 -15580 +-1180 -15560 +-1180 -15500 +-1180 -15480 +-1180 -15460 +-1180 -15440 +-1180 -15420 +-1180 -15400 +-1180 -15380 +-1180 -15360 +-1180 -15340 +-1180 -15320 +-1180 -15300 +-1180 -15280 +-1180 -15260 +-1180 -15240 +-1180 -15220 +-1180 -15200 +-1180 -15180 +-1180 -15160 +-1180 -15140 +-1180 -15120 +-1180 -15100 +-1180 -15080 +-1180 -15060 +-1180 -15040 +-1180 -15020 +-1180 -15000 +-1180 -14980 +-1180 -14960 +-1180 -14940 +-1180 -14920 +-1180 -14900 +-1180 -14880 +-1180 -14860 +-1180 -14840 +-1180 -14800 +-1180 -14780 +-1180 -14760 +-1180 -14740 +-1180 -14720 +-1180 -14700 +-1180 -14680 +-1180 -14640 +-1180 -14620 +-1180 -14600 +-1180 -14580 +-1180 -14560 +-1180 -14540 +-1180 -14520 +-1180 -14500 +-1180 -14480 +-1180 -14460 +-1180 -14440 +-1180 -14420 +-1180 -14400 +-1180 -14380 +-1180 -14360 +-1180 -14340 +-1180 -14320 +-1180 -14300 +-1180 -14280 +-1180 -14260 +-1180 -14240 +-1180 -14220 +-1180 -14200 +-1180 -14180 +-1180 -14160 +-1180 -14140 +-1180 -14100 +-1180 -14080 +-1180 -14060 +-1180 -14040 +-1180 -14020 +-1180 -14000 +-1180 -13980 +-1180 -13960 +-1180 -13940 +-1180 -13920 +-1180 -13900 +-1180 -13880 +-1180 -13860 +-1180 -13840 +-1180 -13820 +-1180 -13800 +-1180 -13780 +-1180 -13760 +-1180 -13740 +-1180 -13720 +-1180 -13700 +-1180 -13680 +-1180 -13660 +-1180 -13480 +-1180 -13400 +-1180 -13320 +-1180 -13280 +-1180 -13160 +-1180 -13140 +-1180 -13040 +-1180 -13020 +-1180 -13000 +-1180 -12980 +-1180 -12960 +-1180 -12940 +-1180 -12900 +-1180 -12880 +-1180 -12860 +-1180 -12840 +-1180 -12820 +-1180 -12800 +-1180 -12780 +-1180 -12760 +-1180 -12740 +-1180 -12720 +-1180 -12700 +-1180 -12680 +-1180 -12660 +-1180 -12640 +-1180 -12620 +-1180 -12600 +-1180 -12580 +-1180 -12560 +-1180 -12540 +-1180 -12520 +-1180 -12500 +-1180 -12480 +-1180 -12460 +-1180 -12440 +-1180 -12420 +-1180 -12400 +-1180 -12380 +-1180 -12360 +-1180 -12340 +-1180 -12320 +-1180 -12300 +-1180 -12280 +-1180 -12260 +-1180 -12240 +-1180 -12220 +-1180 -12200 +-1180 -12180 +-1180 -12160 +-1180 -12140 +-1180 -12120 +-1180 -12100 +-1180 -12080 +-1180 -12060 +-1180 -12040 +-1180 -12020 +-1180 -12000 +-1180 -11980 +-1180 -11960 +-1180 -11940 +-1180 -11920 +-1180 -11900 +-1180 -11880 +-1180 -11860 +-1180 -11840 +-1180 -11820 +-1180 -11800 +-1180 -11780 +-1180 -11760 +-1180 -11740 +-1180 -11720 +-1180 -11700 +-1180 -11680 +-1180 -11660 +-1180 -11640 +-1180 -11620 +-1180 -11600 +-1180 -11580 +-1180 -11560 +-1180 -11540 +-1180 -11520 +-1180 -11500 +-1180 -11480 +-1180 -11460 +-1180 -11440 +-1180 -11420 +-1180 -11400 +-1180 -11380 +-1180 -11360 +-1180 -11340 +-1180 -11320 +-1180 -11300 +-1180 -11280 +-1180 -11260 +-1180 -11240 +-1180 -11220 +-1180 -11200 +-1180 -11180 +-1180 -11160 +-1180 -11140 +-1180 -11120 +-1180 -11100 +-1180 -11080 +-1180 -11060 +-1180 -11040 +-1180 -11020 +-1180 -11000 +-1180 -10980 +-1180 -10960 +-1180 -10940 +-1180 -10920 +-1180 -10900 +-1180 -10880 +-1180 -10860 +-1180 -10840 +-1180 -10820 +-1180 -10800 +-1180 -10780 +-1180 -10760 +-1180 -7620 +-1180 -7600 +-1180 -7580 +-1180 -6780 +-1180 -6620 +-1180 -6600 +-1180 -6580 +-1180 -6560 +-1180 7760 +-1180 7780 +-1180 7800 +-1180 7840 +-1180 7860 +-1180 8020 +-1180 8120 +-1180 8140 +-1180 8160 +-1180 8180 +-1180 8200 +-1160 -23540 +-1160 -21420 +-1160 -21360 +-1160 -21280 +-1160 -21260 +-1160 -20980 +-1160 -20940 +-1160 -17600 +-1160 -17520 +-1160 -17420 +-1160 -17380 +-1160 -17360 +-1160 -17200 +-1160 -17140 +-1160 -17100 +-1160 -16940 +-1160 -16900 +-1160 -16840 +-1160 -16760 +-1160 -16740 +-1160 -16720 +-1160 -16700 +-1160 -16680 +-1160 -16660 +-1160 -16640 +-1160 -16620 +-1160 -16600 +-1160 -16580 +-1160 -16560 +-1160 -16540 +-1160 -16520 +-1160 -16480 +-1160 -16460 +-1160 -16440 +-1160 -16420 +-1160 -16400 +-1160 -16380 +-1160 -16360 +-1160 -16340 +-1160 -16320 +-1160 -16300 +-1160 -16280 +-1160 -16260 +-1160 -16240 +-1160 -16220 +-1160 -16200 +-1160 -16180 +-1160 -16160 +-1160 -16140 +-1160 -16120 +-1160 -16100 +-1160 -16080 +-1160 -16060 +-1160 -16040 +-1160 -16020 +-1160 -15980 +-1160 -15960 +-1160 -15940 +-1160 -15920 +-1160 -15900 +-1160 -15880 +-1160 -15860 +-1160 -15840 +-1160 -15820 +-1160 -15800 +-1160 -15780 +-1160 -15760 +-1160 -15740 +-1160 -15720 +-1160 -15700 +-1160 -15680 +-1160 -15660 +-1160 -15640 +-1160 -15620 +-1160 -15600 +-1160 -15580 +-1160 -15560 +-1160 -15540 +-1160 -15520 +-1160 -15500 +-1160 -15480 +-1160 -15460 +-1160 -15440 +-1160 -15420 +-1160 -15400 +-1160 -15380 +-1160 -15360 +-1160 -15340 +-1160 -15320 +-1160 -15300 +-1160 -15280 +-1160 -15260 +-1160 -15240 +-1160 -15220 +-1160 -15200 +-1160 -15180 +-1160 -15160 +-1160 -15140 +-1160 -15120 +-1160 -15100 +-1160 -15080 +-1160 -15060 +-1160 -15040 +-1160 -15020 +-1160 -15000 +-1160 -14980 +-1160 -14960 +-1160 -14940 +-1160 -14920 +-1160 -14900 +-1160 -14880 +-1160 -14860 +-1160 -14840 +-1160 -14820 +-1160 -14800 +-1160 -14780 +-1160 -14760 +-1160 -14740 +-1160 -14720 +-1160 -14700 +-1160 -14680 +-1160 -14660 +-1160 -14640 +-1160 -14620 +-1160 -14600 +-1160 -14580 +-1160 -14560 +-1160 -14540 +-1160 -14520 +-1160 -14500 +-1160 -14480 +-1160 -14460 +-1160 -14440 +-1160 -14420 +-1160 -14400 +-1160 -14380 +-1160 -14360 +-1160 -14340 +-1160 -14320 +-1160 -14300 +-1160 -14280 +-1160 -14260 +-1160 -14240 +-1160 -14220 +-1160 -14200 +-1160 -14180 +-1160 -14160 +-1160 -14140 +-1160 -14120 +-1160 -14100 +-1160 -14080 +-1160 -14060 +-1160 -14040 +-1160 -14020 +-1160 -14000 +-1160 -13980 +-1160 -13960 +-1160 -13940 +-1160 -13920 +-1160 -13900 +-1160 -13880 +-1160 -13860 +-1160 -13840 +-1160 -13820 +-1160 -13800 +-1160 -13780 +-1160 -13760 +-1160 -13740 +-1160 -13720 +-1160 -13700 +-1160 -13680 +-1160 -13660 +-1160 -13080 +-1160 -12980 +-1160 -12960 +-1160 -12920 +-1160 -12900 +-1160 -12860 +-1160 -12840 +-1160 -12820 +-1160 -12800 +-1160 -12780 +-1160 -12760 +-1160 -12740 +-1160 -12720 +-1160 -12700 +-1160 -12680 +-1160 -12660 +-1160 -12640 +-1160 -12620 +-1160 -12600 +-1160 -12580 +-1160 -12560 +-1160 -12540 +-1160 -12520 +-1160 -12500 +-1160 -12480 +-1160 -12460 +-1160 -12440 +-1160 -12420 +-1160 -12400 +-1160 -12380 +-1160 -12360 +-1160 -12340 +-1160 -12320 +-1160 -12300 +-1160 -12280 +-1160 -12260 +-1160 -12240 +-1160 -12220 +-1160 -12200 +-1160 -12180 +-1160 -12160 +-1160 -12140 +-1160 -12120 +-1160 -12100 +-1160 -12080 +-1160 -12060 +-1160 -12040 +-1160 -12020 +-1160 -12000 +-1160 -11980 +-1160 -11960 +-1160 -11940 +-1160 -11920 +-1160 -11900 +-1160 -11880 +-1160 -11840 +-1160 -11820 +-1160 -11800 +-1160 -11780 +-1160 -11760 +-1160 -11740 +-1160 -11720 +-1160 -11700 +-1160 -11680 +-1160 -11640 +-1160 -11620 +-1160 -11600 +-1160 -11580 +-1160 -11560 +-1160 -11540 +-1160 -11520 +-1160 -11500 +-1160 -11480 +-1160 -11460 +-1160 -11420 +-1160 -11380 +-1160 -11360 +-1160 -11340 +-1160 -11320 +-1160 -11300 +-1160 -11280 +-1160 -11240 +-1160 -11220 +-1160 -11200 +-1160 -11120 +-1160 -11100 +-1160 -11080 +-1160 -11060 +-1160 -11020 +-1160 -10940 +-1160 -10920 +-1160 -10900 +-1160 -10880 +-1160 -10800 +-1160 -10780 +-1160 -10760 +-1160 -7620 +-1160 -7600 +-1160 -6780 +-1160 -6740 +-1160 -6560 +-1160 7760 +-1160 7800 +-1160 7820 +-1160 7840 +-1160 7940 +-1160 7960 +-1160 8040 +-1140 -23540 +-1140 -23520 +-1140 -21320 +-1140 -21260 +-1140 -21000 +-1140 -20980 +-1140 -20940 +-1140 -10800 +-1140 -10780 +-1140 -10760 +-1140 -10740 +-1140 -7620 +-1140 -7600 +-1140 -7240 +-1140 -6780 +-1140 -6580 +-1140 7620 +-1140 7780 +-1140 7800 +-1140 7820 +-1140 8380 +-1120 -23540 +-1120 -23520 +-1120 -21580 +-1120 -21560 +-1120 -21280 +-1120 -21160 +-1120 -21140 +-1120 -21120 +-1120 -20940 +-1120 -10800 +-1120 -10780 +-1120 -10760 +-1120 -7620 +-1120 -7600 +-1120 -7240 +-1120 -7220 +-1120 -7200 +-1120 7620 +-1120 8360 +-1100 -23540 +-1100 -23520 +-1100 -21580 +-1100 -21560 +-1100 -21280 +-1100 -21220 +-1100 -21200 +-1100 -21180 +-1100 -21160 +-1100 -21140 +-1100 -21080 +-1100 -14600 +-1100 -14520 +-1100 -12620 +-1100 -12560 +-1100 -12340 +-1100 -12300 +-1100 -12280 +-1100 -12260 +-1100 -12240 +-1100 -12220 +-1100 -11700 +-1100 -11540 +-1100 -10800 +-1100 -10780 +-1100 -10760 +-1100 -10740 +-1100 -7620 +-1100 -7600 +-1100 -7240 +-1100 7600 +-1100 7620 +-1100 7640 +-1100 10780 +-1080 -23540 +-1080 -23520 +-1080 -21580 +-1080 -21560 +-1080 -21540 +-1080 -21280 +-1080 -21260 +-1080 -21240 +-1080 -21220 +-1080 -21200 +-1080 -21180 +-1080 -21160 +-1080 -21120 +-1080 -21100 +-1080 -21080 +-1080 -17080 +-1080 -17060 +-1080 -17000 +-1080 -16960 +-1080 -16860 +-1080 -16780 +-1080 -16680 +-1080 -16640 +-1080 -16600 +-1080 -14560 +-1080 -14520 +-1080 -14480 +-1080 -14440 +-1080 -13560 +-1080 -13540 +-1080 -12760 +-1080 -12740 +-1080 -12720 +-1080 -12700 +-1080 -12680 +-1080 -12660 +-1080 -12640 +-1080 -12620 +-1080 -12600 +-1080 -12580 +-1080 -12560 +-1080 -12540 +-1080 -12520 +-1080 -12500 +-1080 -12480 +-1080 -12460 +-1080 -12440 +-1080 -12420 +-1080 -12400 +-1080 -12360 +-1080 -12340 +-1080 -12320 +-1080 -12300 +-1080 -12260 +-1080 -12240 +-1080 -12220 +-1080 -12200 +-1080 -12180 +-1080 -12140 +-1080 -12120 +-1080 -12080 +-1080 -12060 +-1080 -12020 +-1080 -12000 +-1080 -11980 +-1080 -11960 +-1080 -11940 +-1080 -11920 +-1080 -11820 +-1080 -11800 +-1080 -11780 +-1080 -11760 +-1080 -11740 +-1080 -11720 +-1080 -11700 +-1080 -11680 +-1080 -11660 +-1080 -11640 +-1080 -11620 +-1080 -11600 +-1080 -11580 +-1080 -11540 +-1080 -11520 +-1080 -11480 +-1080 -11460 +-1080 -10800 +-1080 -10780 +-1080 -10760 +-1080 -7620 +-1080 -7600 +-1080 -7240 +-1080 -7220 +-1080 -6580 +-1080 7620 +-1080 7640 +-1080 7660 +-1080 10780 +-1060 -23540 +-1060 -21580 +-1060 -21560 +-1060 -21240 +-1060 -21200 +-1060 -21080 +-1060 -16040 +-1060 -14600 +-1060 -14580 +-1060 -14560 +-1060 -14540 +-1060 -14520 +-1060 -14500 +-1060 -14480 +-1060 -14440 +-1060 -14400 +-1060 -14380 +-1060 -14340 +-1060 -14320 +-1060 -14280 +-1060 -13600 +-1060 -13580 +-1060 -12780 +-1060 -12580 +-1060 -12380 +-1060 -12160 +-1060 -12060 +-1060 -12020 +-1060 -12000 +-1060 -11840 +-1060 -11820 +-1060 -10800 +-1060 -10780 +-1060 -10760 +-1060 -7620 +-1060 -7600 +-1060 -7260 +-1060 -7240 +-1060 -6580 +-1060 -6560 +-1060 7620 +-1060 7640 +-1060 7660 +-1060 7880 +-1040 -23560 +-1040 -23540 +-1040 -21580 +-1040 -21560 +-1040 -21520 +-1040 -21080 +-1040 -17140 +-1040 -14500 +-1040 -14460 +-1040 -14340 +-1040 -14320 +-1040 -13500 +-1040 -11920 +-1040 -11900 +-1040 -10780 +-1040 -7620 +-1040 -7600 +-1040 -7240 +-1040 -7220 +-1040 -6640 +-1040 -6580 +-1040 -6560 +-1040 7620 +-1040 7640 +-1040 7660 +-1040 7700 +-1040 7720 +-1020 -23560 +-1020 -23540 +-1020 -21560 +-1020 -21520 +-1020 -21080 +-1020 -20980 +-1020 -17180 +-1020 -17160 +-1020 -14340 +-1020 -14240 +-1020 -14200 +-1020 -13500 +-1020 -13440 +-1020 -12940 +-1020 -12760 +-1020 -11760 +-1020 -10800 +-1020 -10780 +-1020 -10760 +-1020 -7620 +-1020 -7600 +-1020 -7580 +-1020 -6780 +-1020 7640 +-1020 7660 +-1020 7680 +-1020 7700 +-1020 7740 +-1020 7860 +-1000 -23540 +-1000 -21560 +-1000 -21540 +-1000 -21520 +-1000 -21080 +-1000 -14500 +-1000 -14140 +-1000 -10800 +-1000 -10780 +-1000 -7620 +-1000 -7600 +-1000 -6660 +-1000 7640 +-1000 7660 +-1000 7680 +-1000 7700 +-1000 7740 +-1000 7760 +-1000 7960 +-980 -23560 +-980 -23540 +-980 -21560 +-980 -21540 +-980 -21140 +-980 -21100 +-980 -21080 +-980 -21060 +-980 -14480 +-980 -14460 +-980 -14160 +-980 -14020 +-980 -12760 +-980 -10780 +-980 -10760 +-980 -7620 +-980 -7600 +-980 -7580 +-980 -6900 +-980 7620 +-980 7640 +-980 7660 +-980 7680 +-980 7700 +-980 7720 +-980 7760 +-980 7780 +-980 7840 +-980 10800 +-960 -23540 +-960 -21560 +-960 -21540 +-960 -21140 +-960 -21080 +-960 -20940 +-960 -14500 +-960 -14140 +-960 -14080 +-960 -14040 +-960 -14020 +-960 -13380 +-960 -12760 +-960 -10780 +-960 -7620 +-960 -7600 +-960 -7240 +-960 -7220 +-960 -6600 +-960 -6540 +-960 -5860 +-960 7640 +-960 7660 +-960 7680 +-960 7720 +-960 7780 +-960 7800 +-940 -23560 +-940 -23540 +-940 -21560 +-940 -21100 +-940 -21080 +-940 -21060 +-940 -17200 +-940 -17140 +-940 -14500 +-940 -14440 +-940 -14000 +-940 -13600 +-940 -13300 +-940 -12820 +-940 -10800 +-940 -10780 +-940 -7640 +-940 -7620 +-940 -7600 +-940 -7240 +-940 -6600 +-940 -6540 +-940 -5880 +-940 -5860 +-940 7620 +-940 7640 +-940 7660 +-940 7700 +-940 7720 +-940 7760 +-940 7780 +-940 7860 +-940 7900 +-920 -23560 +-920 -23540 +-920 -21560 +-920 -21080 +-920 -21060 +-920 -20980 +-920 -20920 +-920 -17180 +-920 -17140 +-920 -14060 +-920 -13600 +-920 -13320 +-920 -12860 +-920 -12760 +-920 -10800 +-920 -10780 +-920 -10760 +-920 -7620 +-920 -7600 +-920 -6560 +-920 -6540 +-920 7640 +-920 7660 +-920 7700 +-920 7760 +-900 -23540 +-900 -21560 +-900 -21080 +-900 -21060 +-900 -14500 +-900 -14460 +-900 -14440 +-900 -14000 +-900 -13920 +-900 -13640 +-900 -13600 +-900 -10800 +-900 -10780 +-900 -10760 +-900 -7620 +-900 -7600 +-900 -7580 +-900 -6540 +-900 -5920 +-900 -5900 +-900 7620 +-900 7640 +-900 7660 +-900 7680 +-900 7700 +-900 7720 +-880 -23540 +-880 -21560 +-880 -21080 +-880 -21060 +-880 -20920 +-880 -15880 +-880 -14480 +-880 -13760 +-880 -13700 +-880 -13600 +-880 -12760 +-880 -11460 +-880 -10800 +-880 -10780 +-880 -10760 +-880 -7620 +-880 -7600 +-880 -6560 +-880 -6540 +-880 7640 +-880 7660 +-880 7680 +-880 7700 +-880 7740 +-860 -23560 +-860 -23540 +-860 -21560 +-860 -21080 +-860 -21060 +-860 -20920 +-860 -17180 +-860 -15640 +-860 -14500 +-860 -14480 +-860 -13760 +-860 -13700 +-860 -13660 +-860 -13640 +-860 -13600 +-860 -13000 +-860 -11460 +-860 -10800 +-860 -10780 +-860 -10760 +-860 -7640 +-860 -7620 +-860 -7600 +-860 -6540 +-860 -6220 +-860 7620 +-860 7640 +-860 7660 +-860 7680 +-860 7700 +-860 7720 +-860 7880 +-840 -23540 +-840 -21560 +-840 -21080 +-840 -21060 +-840 -20980 +-840 -13880 +-840 -13820 +-840 -13780 +-840 -13740 +-840 -13720 +-840 -13640 +-840 -13320 +-840 -12800 +-840 -12760 +-840 -10800 +-840 -10780 +-840 -10760 +-840 -7640 +-840 -7620 +-840 -7600 +-840 -6720 +-840 -6540 +-840 -6240 +-840 7660 +-840 7680 +-840 7700 +-840 7720 +-840 7740 +-840 7780 +-820 -23540 +-820 -21560 +-820 -21080 +-820 -21060 +-820 -20920 +-820 -14400 +-820 -14380 +-820 -13940 +-820 -13820 +-820 -13700 +-820 -13660 +-820 -13600 +-820 -13480 +-820 -12820 +-820 -12800 +-820 -12780 +-820 -10800 +-820 -10780 +-820 -10760 +-820 -7620 +-820 -7600 +-820 -7220 +-820 -7200 +-820 -7140 +-820 -6540 +-820 7660 +-820 7680 +-820 7700 +-820 7720 +-820 7740 +-820 7780 +-820 7820 +-800 -23540 +-800 -21560 +-800 -21080 +-800 -21060 +-800 -15880 +-800 -15620 +-800 -14420 +-800 -14360 +-800 -14100 +-800 -14080 +-800 -13900 +-800 -13860 +-800 -13660 +-800 -13520 +-800 -13000 +-800 -10780 +-800 -10760 +-800 -7620 +-800 -7600 +-800 -7580 +-800 -6500 +-800 7660 +-800 7680 +-800 7700 +-800 7720 +-800 7900 +-780 -23560 +-780 -23540 +-780 -21560 +-780 -21080 +-780 -21060 +-780 -17160 +-780 -14360 +-780 -13780 +-780 -13760 +-780 -13740 +-780 -13040 +-780 -13020 +-780 -12960 +-780 -12840 +-780 -12820 +-780 -11440 +-780 -11420 +-780 -10780 +-780 -10760 +-780 -7620 +-780 -7600 +-780 -7220 +-780 -7200 +-780 7660 +-780 7680 +-780 7700 +-780 7720 +-780 7780 +-780 7940 +-780 10780 +-760 -23540 +-760 -21560 +-760 -21080 +-760 -21060 +-760 -20920 +-760 -14420 +-760 -14360 +-760 -13780 +-760 -13700 +-760 -13200 +-760 -13140 +-760 -13040 +-760 -12880 +-760 -12820 +-760 -10780 +-760 -7640 +-760 -7620 +-760 -7600 +-760 -7240 +-760 7680 +-760 7700 +-760 7720 +-760 7740 +-760 7780 +-760 7820 +-740 -23540 +-740 -21580 +-740 -21560 +-740 -21540 +-740 -21520 +-740 -21500 +-740 -21060 +-740 -20920 +-740 -14420 +-740 -14380 +-740 -14060 +-740 -13780 +-740 -13420 +-740 -13300 +-740 -13260 +-740 -13200 +-740 -13120 +-740 -12920 +-740 -12860 +-740 -10780 +-740 -10760 +-740 -7620 +-740 -7600 +-740 -7220 +-740 -7200 +-740 7640 +-740 7660 +-740 7680 +-740 7720 +-740 7880 +-720 -23540 +-720 -21560 +-720 -21540 +-720 -21520 +-720 -21500 +-720 -21080 +-720 -21060 +-720 -21020 +-720 -20960 +-720 -20940 +-720 -20920 +-720 -14420 +-720 -14400 +-720 -14380 +-720 -14360 +-720 -14080 +-720 -14040 +-720 -13580 +-720 -13560 +-720 -13360 +-720 -13340 +-720 -13120 +-720 -13060 +-720 -13040 +-720 -13000 +-720 -12920 +-720 -12900 +-720 -12800 +-720 -10800 +-720 -10780 +-720 -10760 +-720 -7620 +-720 -7600 +-720 -7240 +-720 -5880 +-720 -5860 +-720 7620 +-720 7640 +-720 7660 +-720 7680 +-720 7700 +-720 7740 +-700 -23540 +-700 -21560 +-700 -21540 +-700 -21520 +-700 -21500 +-700 -21080 +-700 -21060 +-700 -21020 +-700 -20920 +-700 -15520 +-700 -14360 +-700 -14340 +-700 -14060 +-700 -14020 +-700 -13580 +-700 -13300 +-700 -13080 +-700 -13060 +-700 -13040 +-700 -11540 +-700 -11380 +-700 -10780 +-700 -10740 +-700 -7620 +-700 -7600 +-700 -7260 +-700 -7240 +-700 -7220 +-700 -5880 +-700 -5860 +-700 7580 +-700 7620 +-700 7640 +-700 7660 +-700 7720 +-680 -23560 +-680 -23540 +-680 -21560 +-680 -21540 +-680 -21520 +-680 -21500 +-680 -21080 +-680 -20920 +-680 -15500 +-680 -14420 +-680 -14340 +-680 -13720 +-680 -13500 +-680 -13440 +-680 -13420 +-680 -13120 +-680 -13080 +-680 -11520 +-680 -11400 +-680 -10780 +-680 -10760 +-680 -7620 +-680 -7600 +-680 -7240 +-680 -7200 +-680 7580 +-680 7600 +-680 7620 +-680 7660 +-660 -23560 +-660 -23540 +-660 -21560 +-660 -21540 +-660 -21520 +-660 -21500 +-660 -21080 +-660 -21060 +-660 -20920 +-660 -14360 +-660 -14340 +-660 -13720 +-660 -13540 +-660 -13160 +-660 -13080 +-660 -12980 +-660 -12960 +-660 -12880 +-660 -10800 +-660 -10780 +-660 -10760 +-660 -7620 +-660 -7600 +-660 -7240 +-660 -5840 +-660 7560 +-660 7580 +-660 7600 +-640 -23560 +-640 -23540 +-640 -21560 +-640 -21540 +-640 -21520 +-640 -21480 +-640 -21440 +-640 -21420 +-640 -21400 +-640 -21060 +-640 -20920 +-640 -17200 +-640 -15460 +-640 -14400 +-640 -14380 +-640 -14360 +-640 -14340 +-640 -14320 +-640 -13800 +-640 -13780 +-640 -13700 +-640 -13520 +-640 -13500 +-640 -13300 +-640 -13180 +-640 -13120 +-640 -12880 +-640 -11500 +-640 -11480 +-640 -11340 +-640 -10780 +-640 -7620 +-640 -7600 +-640 -7240 +-640 -5880 +-640 -5860 +-640 7560 +-640 7580 +-640 7620 +-620 -23560 +-620 -23540 +-620 -21560 +-620 -21480 +-620 -21460 +-620 -21420 +-620 -21400 +-620 -21060 +-620 -21000 +-620 -20920 +-620 -14400 +-620 -14360 +-620 -14320 +-620 -13120 +-620 -11440 +-620 -10780 +-620 -7620 +-620 -7600 +-620 -7580 +-620 -7260 +-620 -7220 +-620 -7200 +-620 7560 +-620 7580 +-620 7600 +-620 7620 +-600 -23560 +-600 -23540 +-600 -21560 +-600 -21540 +-600 -21480 +-600 -21400 +-600 -21120 +-600 -21100 +-600 -21080 +-600 -21060 +-600 -21000 +-600 -20920 +-600 -14380 +-600 -14340 +-600 -14320 +-600 -13820 +-600 -13760 +-600 -13540 +-600 -13300 +-600 -11440 +-600 -10780 +-600 -10760 +-600 -7620 +-600 -7600 +-600 -7260 +-600 -7240 +-600 -7220 +-600 7560 +-600 7580 +-600 7600 +-600 7620 +-600 7660 +-580 -23560 +-580 -23540 +-580 -21560 +-580 -21540 +-580 -21520 +-580 -21500 +-580 -21480 +-580 -21440 +-580 -21380 +-580 -21340 +-580 -21300 +-580 -21220 +-580 -21200 +-580 -21180 +-580 -21140 +-580 -21120 +-580 -21100 +-580 -21080 +-580 -21060 +-580 -21040 +-580 -21020 +-580 -21000 +-580 -20920 +-580 -13600 +-580 -13360 +-580 -13120 +-580 -13080 +-580 -13060 +-580 -10780 +-580 -10740 +-580 -7620 +-580 -7600 +-580 -7580 +-580 -7240 +-580 -7220 +-580 -6360 +-580 7560 +-580 7580 +-580 7600 +-580 7620 +-580 7640 +-580 8640 +-580 8680 +-580 8700 +-580 24400 +-560 -23560 +-560 -23540 +-560 -21580 +-560 -21560 +-560 -21540 +-560 -21520 +-560 -21500 +-560 -21480 +-560 -21460 +-560 -21440 +-560 -21420 +-560 -21400 +-560 -21380 +-560 -21360 +-560 -21340 +-560 -21320 +-560 -21300 +-560 -21280 +-560 -21260 +-560 -21240 +-560 -21220 +-560 -21200 +-560 -21180 +-560 -21160 +-560 -21140 +-560 -21120 +-560 -21100 +-560 -21080 +-560 -21060 +-560 -21040 +-560 -21020 +-560 -20940 +-560 -20920 +-560 -15420 +-560 -14340 +-560 -14320 +-560 -13620 +-560 -13360 +-560 -13220 +-560 -13120 +-560 -12700 +-560 -11400 +-560 -11380 +-560 -10780 +-560 -10760 +-560 -7620 +-560 -7600 +-560 -7240 +-560 -6360 +-560 7560 +-560 7580 +-560 7600 +-560 7640 +-560 24380 +-540 -23540 +-540 -22740 +-540 -22580 +-540 -21580 +-540 -21560 +-540 -21540 +-540 -21520 +-540 -21500 +-540 -21460 +-540 -21420 +-540 -21400 +-540 -21380 +-540 -21360 +-540 -21340 +-540 -20940 +-540 -20920 +-540 -15340 +-540 -15160 +-540 -14380 +-540 -14360 +-540 -14300 +-540 -13140 +-540 -12740 +-540 -10780 +-540 -10760 +-540 -7620 +-540 -7600 +-540 -7240 +-540 -7220 +-540 -4220 +-540 7580 +-540 7600 +-540 7820 +-520 -23540 +-520 -23520 +-520 -23500 +-520 -23480 +-520 -23460 +-520 -23440 +-520 -23420 +-520 -23400 +-520 -23380 +-520 -23360 +-520 -23340 +-520 -23320 +-520 -23300 +-520 -23280 +-520 -23260 +-520 -23240 +-520 -23220 +-520 -23200 +-520 -23180 +-520 -23160 +-520 -23140 +-520 -23120 +-520 -23100 +-520 -23080 +-520 -23060 +-520 -23040 +-520 -23020 +-520 -23000 +-520 -22980 +-520 -22960 +-520 -22940 +-520 -22920 +-520 -22900 +-520 -22880 +-520 -22860 +-520 -22840 +-520 -22820 +-520 -22800 +-520 -22780 +-520 -22760 +-520 -22740 +-520 -22720 +-520 -22700 +-520 -22680 +-520 -22660 +-520 -22640 +-520 -22620 +-520 -22600 +-520 -22580 +-520 -22560 +-520 -20920 +-520 -15020 +-520 -14440 +-520 -14400 +-520 -14380 +-520 -14340 +-520 -14320 +-520 -14300 +-520 -13180 +-520 -13140 +-520 -13120 +-520 -13040 +-520 -12720 +-520 -12680 +-520 -10780 +-520 -10760 +-520 -7620 +-520 -7600 +-520 -7240 +-520 -4220 +-520 7560 +-520 7580 +-520 7600 +-520 7640 +-500 -23420 +-500 -23160 +-500 -22880 +-500 -22860 +-500 -22840 +-500 -22780 +-500 -22760 +-500 -22740 +-500 -22720 +-500 -22680 +-500 -22660 +-500 -22640 +-500 -22600 +-500 -22580 +-500 -22560 +-500 -20940 +-500 -20920 +-500 -15380 +-500 -15320 +-500 -15280 +-500 -14380 +-500 -14360 +-500 -14340 +-500 -14320 +-500 -13140 +-500 -13100 +-500 -13060 +-500 -13040 +-500 -13000 +-500 -12720 +-500 -12700 +-500 -10780 +-500 -10760 +-500 -7620 +-500 -7600 +-500 -7580 +-500 -7240 +-500 -7220 +-500 -4220 +-500 -4200 +-500 7560 +-500 7580 +-500 7600 +-500 7660 +-480 -22600 +-480 -22580 +-480 -22560 +-480 -20940 +-480 -20920 +-480 -19480 +-480 -15360 +-480 -15300 +-480 -14820 +-480 -14420 +-480 -14400 +-480 -14380 +-480 -14360 +-480 -13040 +-480 -13020 +-480 -12960 +-480 -12940 +-480 -12920 +-480 -12900 +-480 -12880 +-480 -12860 +-480 -12800 +-480 -12740 +-480 -10780 +-480 -10760 +-480 -7620 +-480 -7600 +-480 -7240 +-480 -7220 +-480 -7200 +-480 -4220 +-480 -4200 +-480 7640 +-480 7660 +-480 7700 +-480 8640 +-480 8660 +-460 -22600 +-460 -22580 +-460 -20940 +-460 -20920 +-460 -15340 +-460 -14740 +-460 -14600 +-460 -14400 +-460 -14360 +-460 -13000 +-460 -12940 +-460 -12880 +-460 -12820 +-460 -12800 +-460 -12780 +-460 -12760 +-460 -10780 +-460 -10760 +-460 -7620 +-460 -7600 +-460 -7240 +-460 -7220 +-460 -4220 +-460 -4200 +-460 7620 +-460 7640 +-460 7660 +-460 7680 +-460 22320 +-440 -26200 +-440 -26060 +-440 -22600 +-440 -22580 +-440 -20940 +-440 -20920 +-440 -14920 +-440 -14480 +-440 -14460 +-440 -14440 +-440 -14420 +-440 -14400 +-440 -14380 +-440 -14360 +-440 -10800 +-440 -10780 +-440 -10760 +-440 -7620 +-440 -7600 +-440 -7240 +-440 -7220 +-440 -4220 +-440 -4200 +-440 7640 +-440 7660 +-440 7680 +-420 -26220 +-420 -26160 +-420 -26060 +-420 -26040 +-420 -25980 +-420 -25960 +-420 -25900 +-420 -25860 +-420 -25800 +-420 -25740 +-420 -25700 +-420 -25660 +-420 -25640 +-420 -25600 +-420 -25540 +-420 -25500 +-420 -25460 +-420 -25380 +-420 -25320 +-420 -25280 +-420 -25220 +-420 -25160 +-420 -23900 +-420 -23880 +-420 -23860 +-420 -23840 +-420 -23820 +-420 -23800 +-420 -23780 +-420 -23760 +-420 -23720 +-420 -23700 +-420 -23380 +-420 -22980 +-420 -22960 +-420 -22940 +-420 -22920 +-420 -22900 +-420 -22880 +-420 -22860 +-420 -22840 +-420 -22820 +-420 -22800 +-420 -22780 +-420 -22760 +-420 -22740 +-420 -22720 +-420 -22700 +-420 -22680 +-420 -22660 +-420 -22640 +-420 -22600 +-420 -22580 +-420 -20940 +-420 -20920 +-420 -15340 +-420 -15300 +-420 -14720 +-420 -14600 +-420 -14560 +-420 -14480 +-420 -14460 +-420 -14440 +-420 -14420 +-420 -14400 +-420 -11220 +-420 -11200 +-420 -11160 +-420 -10780 +-420 -10760 +-420 -7620 +-420 -7600 +-420 -7280 +-420 -7240 +-420 -7220 +-420 -7200 +-420 7640 +-420 7660 +-420 8640 +-400 -26180 +-400 -23900 +-400 -23880 +-400 -23860 +-400 -23840 +-400 -23820 +-400 -23800 +-400 -23760 +-400 -23740 +-400 -23720 +-400 -23700 +-400 -23500 +-400 -23480 +-400 -23460 +-400 -23440 +-400 -23400 +-400 -23380 +-400 -23360 +-400 -23340 +-400 -23320 +-400 -23280 +-400 -23260 +-400 -23240 +-400 -23220 +-400 -23200 +-400 -23180 +-400 -23160 +-400 -23140 +-400 -23120 +-400 -23060 +-400 -23040 +-400 -22980 +-400 -22960 +-400 -22940 +-400 -22920 +-400 -22900 +-400 -22880 +-400 -22860 +-400 -22840 +-400 -22820 +-400 -22800 +-400 -22780 +-400 -22760 +-400 -22740 +-400 -22720 +-400 -22700 +-400 -22680 +-400 -22660 +-400 -22640 +-400 -22620 +-400 -22600 +-400 -22580 +-400 -20940 +-400 -20920 +-400 -20100 +-400 -19520 +-400 -15380 +-400 -14880 +-400 -14860 +-400 -14700 +-400 -14680 +-400 -14580 +-400 -14540 +-400 -14520 +-400 -14500 +-400 -14480 +-400 -14460 +-400 -11160 +-400 -10780 +-400 -10760 +-400 -7620 +-400 -7600 +-400 -7260 +-400 -7240 +-400 -7220 +-400 7640 +-400 7660 +-400 8620 +-400 8640 +-380 -23900 +-380 -23860 +-380 -23820 +-380 -23740 +-380 -23700 +-380 -23460 +-380 -23360 +-380 -23340 +-380 -23260 +-380 -23220 +-380 -23160 +-380 -23120 +-380 -23000 +-380 -22960 +-380 -22920 +-380 -20940 +-380 -20920 +-380 -14840 +-380 -14760 +-380 -14680 +-380 -14660 +-380 -14620 +-380 -14600 +-380 -14580 +-380 -14560 +-380 -14540 +-380 -14520 +-380 -10780 +-380 -7640 +-380 -7620 +-380 -7600 +-380 -7240 +-380 -7220 +-380 8620 +-380 8640 +-360 -23700 +-360 -23460 +-360 -22980 +-360 -22940 +-360 -20940 +-360 -20920 +-360 -15460 +-360 -15400 +-360 -14760 +-360 -14740 +-360 -14680 +-360 -14660 +-360 -14640 +-360 -14620 +-360 -14600 +-360 -10780 +-360 -10760 +-360 -7620 +-360 -7600 +-360 -7280 +-360 -7260 +-360 -7240 +-360 -7220 +-360 -7200 +-360 8600 +-360 8620 +-340 -26160 +-340 -23860 +-340 -23120 +-340 -22940 +-340 -22920 +-340 -20940 +-340 -20920 +-340 -15480 +-340 -14840 +-340 -14800 +-340 -14780 +-340 -14740 +-340 -14720 +-340 -14700 +-340 -10780 +-340 -10760 +-340 -7620 +-340 -7600 +-340 -7280 +-340 -7240 +-340 -7220 +-340 8600 +-340 8660 +-320 -23860 +-320 -23480 +-320 -22940 +-320 -22920 +-320 -20940 +-320 -20920 +-320 -15660 +-320 -15620 +-320 -15480 +-320 -14820 +-320 -10780 +-320 -10760 +-320 -7620 +-320 -7600 +-320 -7260 +-320 -7240 +-320 -7220 +-320 8600 +-320 8640 +-300 -26160 +-300 -23880 +-300 -23860 +-300 -22940 +-300 -22920 +-300 -20940 +-300 -20920 +-300 -15640 +-300 -10780 +-300 -7620 +-300 -7600 +-300 -7240 +-300 -7220 +-300 8580 +-300 8600 +-300 8620 +-280 -23840 +-280 -23820 +-280 -23460 +-280 -22940 +-280 -22920 +-280 -20940 +-280 -20920 +-280 -15560 +-280 -10780 +-280 -10760 +-280 -7640 +-280 -7620 +-280 -7600 +-280 -7280 +-280 -7260 +-280 -7220 +-280 7580 +-280 7600 +-280 7680 +-280 7700 +-280 7720 +-280 7740 +-280 7760 +-280 7820 +-280 7840 +-280 8580 +-280 8600 +-280 8620 +-260 -23840 +-260 -23820 +-260 -22960 +-260 -22920 +-260 -20940 +-260 -20920 +-260 -20180 +-260 -15600 +-260 -10780 +-260 -10760 +-260 -10740 +-260 -7620 +-260 -7600 +-260 -7280 +-260 -7220 +-260 7560 +-260 7740 +-260 7780 +-260 7800 +-260 7840 +-260 7880 +-260 8580 +-260 8600 +-260 8620 +-260 8640 +-240 -26160 +-240 -24200 +-240 -24140 +-240 -23900 +-240 -23880 +-240 -23840 +-240 -23440 +-240 -22940 +-240 -22920 +-240 -20940 +-240 -20920 +-240 -20320 +-240 -20260 +-240 -20240 +-240 -10780 +-240 -10760 +-240 -7620 +-240 -7600 +-240 -7260 +-240 -7240 +-240 -7220 +-240 -7200 +-240 7540 +-240 7560 +-240 7580 +-240 7600 +-240 7640 +-240 7680 +-240 7740 +-240 7780 +-240 7800 +-240 7820 +-240 7840 +-240 7860 +-240 8580 +-240 8600 +-240 8620 +-220 -26160 +-220 -23980 +-220 -23960 +-220 -23940 +-220 -23920 +-220 -23880 +-220 -23820 +-220 -22960 +-220 -22940 +-220 -22920 +-220 -20940 +-220 -20920 +-220 -20360 +-220 -20320 +-220 -20300 +-220 -20280 +-220 -20260 +-220 -20240 +-220 -10780 +-220 -10760 +-220 -7620 +-220 -7600 +-220 -7580 +-220 -7560 +-220 -7240 +-220 -7220 +-220 7520 +-220 7540 +-220 7560 +-220 7580 +-220 7720 +-220 7780 +-220 7800 +-220 7820 +-220 7900 +-220 8600 +-220 8620 +-200 -26160 +-200 -26140 +-200 -24040 +-200 -24000 +-200 -23900 +-200 -23840 +-200 -23420 +-200 -22960 +-200 -22940 +-200 -22920 +-200 -20940 +-200 -20920 +-200 -20340 +-200 -10780 +-200 -10760 +-200 -10740 +-200 -7620 +-200 -7600 +-200 -7280 +-200 -7260 +-200 -7240 +-200 -7220 +-200 7520 +-200 7600 +-200 7800 +-200 7880 +-200 8580 +-200 8600 +-200 8620 +-180 -24120 +-180 -23840 +-180 -23820 +-180 -23220 +-180 -22960 +-180 -22940 +-180 -22920 +-180 -20940 +-180 -20920 +-180 -10800 +-180 -10780 +-180 -10760 +-180 -7620 +-180 -7600 +-180 -7280 +-180 -7240 +-180 -7220 +-180 -4580 +-180 -4560 +-180 -4540 +-180 -4500 +-180 -4480 +-180 7480 +-180 7500 +-180 7520 +-180 7600 +-180 7640 +-180 7660 +-180 7700 +-180 7740 +-180 8600 +-180 8620 +-160 -26140 +-160 -23840 +-160 -22940 +-160 -22920 +-160 -22900 +-160 -20940 +-160 -20920 +-160 -10780 +-160 -10760 +-160 -7620 +-160 -7600 +-160 -7260 +-160 -7240 +-160 -7220 +-160 -4720 +-160 -4660 +-160 -4640 +-160 -4580 +-160 -4560 +-160 -4540 +-160 -4460 +-160 7480 +-160 7500 +-160 7520 +-160 7780 +-160 7840 +-160 8580 +-160 8620 +-160 9300 +-140 -26140 +-140 -23840 +-140 -23820 +-140 -22940 +-140 -22920 +-140 -22900 +-140 -20940 +-140 -20920 +-140 -10780 +-140 -10760 +-140 -7620 +-140 -7600 +-140 -7240 +-140 -7220 +-140 -4700 +-140 -4660 +-140 -4540 +-140 -4520 +-140 -4500 +-140 -4480 +-140 -4440 +-140 3320 +-140 3340 +-140 7480 +-140 7500 +-140 7520 +-140 7800 +-140 8580 +-140 8600 +-120 -26140 +-120 -23840 +-120 -23820 +-120 -22920 +-120 -22900 +-120 -20940 +-120 -20920 +-120 -10780 +-120 -10760 +-120 -7640 +-120 -7620 +-120 -7600 +-120 -7280 +-120 -7260 +-120 -7240 +-120 -7220 +-120 -4960 +-120 -4860 +-120 -4700 +-120 -4680 +-120 -4660 +-120 -4520 +-120 -4500 +-120 -4480 +-120 -4460 +-120 -4440 +-120 3320 +-120 3340 +-120 3360 +-120 7480 +-120 7500 +-100 -26140 +-100 -23840 +-100 -23820 +-100 -23440 +-100 -23040 +-100 -22920 +-100 -20940 +-100 -10780 +-100 -10760 +-100 -7620 +-100 -7600 +-100 -7580 +-100 -7280 +-100 -7240 +-100 -7220 +-100 -7180 +-100 -7140 +-100 -7100 +-100 -5060 +-100 -4980 +-100 -4900 +-100 -4880 +-100 -4680 +-100 -4660 +-100 -4520 +-100 -4500 +-100 -4480 +-100 -4460 +-100 3320 +-100 3340 +-100 3360 +-100 7480 +-100 7500 +-100 7520 +-80 -26140 +-80 -24220 +-80 -23960 +-80 -23900 +-80 -23840 +-80 -23820 +-80 -22940 +-80 -22920 +-80 -20940 +-80 -20920 +-80 -20660 +-80 -20620 +-80 -17240 +-80 -17220 +-80 -10780 +-80 -10760 +-80 -7640 +-80 -7620 +-80 -7600 +-80 -7260 +-80 -7120 +-80 -5860 +-80 -5460 +-80 -4720 +-80 -4700 +-80 -4680 +-80 -4640 +-80 -4500 +-80 -4480 +-80 -4460 +-80 2740 +-80 2760 +-80 2780 +-80 2800 +-80 2820 +-80 2840 +-80 2860 +-80 2880 +-80 2900 +-80 2920 +-80 2940 +-80 2960 +-80 2980 +-80 3000 +-80 3020 +-80 3040 +-80 3060 +-80 3080 +-80 3100 +-80 3120 +-80 3140 +-80 3160 +-80 3180 +-80 3200 +-80 3220 +-80 3240 +-80 3260 +-80 3280 +-80 3300 +-80 3320 +-80 4840 +-80 4860 +-80 4880 +-80 4900 +-80 4920 +-80 7500 +-60 -26140 +-60 -23840 +-60 -23820 +-60 -23540 +-60 -22920 +-60 -20940 +-60 -20920 +-60 -17200 +-60 -10800 +-60 -10780 +-60 -10760 +-60 -7620 +-60 -7600 +-60 -7240 +-60 -7140 +-60 -7120 +-60 -7100 +-60 -5980 +-60 -5760 +-60 -5640 +-60 -5460 +-60 -4900 +-60 -4680 +-60 -4540 +-60 -4520 +-60 -4480 +-60 -4460 +-60 -4440 +-60 2740 +-60 2760 +-60 2780 +-60 2800 +-60 2820 +-60 2840 +-60 2860 +-60 2880 +-60 2900 +-60 2920 +-60 2940 +-60 2980 +-60 3000 +-60 3020 +-60 3040 +-60 3060 +-60 3080 +-60 3100 +-60 3120 +-60 3140 +-60 3160 +-60 3180 +-60 3200 +-60 3220 +-60 3240 +-60 3260 +-60 3280 +-60 3300 +-60 3320 +-60 3340 +-60 3360 +-60 4840 +-60 4860 +-60 4880 +-60 4900 +-60 4940 +-60 7480 +-60 7500 +-60 7520 +-40 -26140 +-40 -24080 +-40 -23820 +-40 -23000 +-40 -22920 +-40 -20940 +-40 -20920 +-40 -17200 +-40 -10800 +-40 -10780 +-40 -10760 +-40 -7620 +-40 -7600 +-40 -7580 +-40 -7280 +-40 -7260 +-40 -7220 +-40 -7200 +-40 -5800 +-40 -5640 +-40 -5460 +-40 -4920 +-40 -4900 +-40 -4740 +-40 -4720 +-40 -4700 +-40 -4600 +-40 -4460 +-40 -4420 +-40 -4380 +-40 -4360 +-40 -4340 +-40 2740 +-40 2760 +-40 3200 +-40 3240 +-40 3260 +-40 3300 +-40 3320 +-40 3340 +-40 3360 +-40 4820 +-40 4840 +-40 4860 +-40 4900 +-40 7480 +-40 7500 +-40 7520 +-20 -26140 +-20 -23840 +-20 -23820 +-20 -23500 +-20 -22980 +-20 -22940 +-20 -22920 +-20 -22900 +-20 -20940 +-20 -20920 +-20 -10780 +-20 -10760 +-20 -7640 +-20 -7620 +-20 -7600 +-20 -7240 +-20 -7220 +-20 -7200 +-20 -5640 +-20 -4960 +-20 -4940 +-20 -4920 +-20 -4760 +-20 -4720 +-20 -4700 +-20 -4580 +-20 -4420 +-20 -4380 +-20 -4360 +-20 2720 +-20 2740 +-20 2760 +-20 2780 +-20 3240 +-20 3260 +-20 3300 +-20 3320 +-20 3340 +-20 4840 +-20 4860 +-20 4880 +-20 7480 +-20 7500 +-20 7520 +0 -26160 +0 -23840 +0 -23820 +0 -23540 +0 -23520 +0 -23440 +0 -23020 +0 -22940 +0 -22920 +0 -20940 +0 -20920 +0 -10780 +0 -10760 +0 -7620 +0 -7600 +0 -7280 +0 -7260 +0 -7240 +0 -5640 +0 -5460 +0 -4940 +0 -4760 +0 -4660 +0 -4560 +0 -4420 +0 -4400 +0 -4380 +0 -4360 +0 2700 +0 2720 +0 2740 +0 2760 +0 2780 +0 3300 +0 3320 +0 3340 +0 4820 +0 4840 +0 4860 +0 7480 +0 7500 +0 7520 +20 -26460 +20 -26400 +20 -26380 +20 -26260 +20 -26240 +20 -26200 +20 -24060 +20 -23840 +20 -23820 +20 -23480 +20 -23460 +20 -23440 +20 -23400 +20 -23360 +20 -22960 +20 -22920 +20 -22900 +20 -20940 +20 -20920 +20 -19960 +20 -10780 +20 -10760 +20 -7620 +20 -7600 +20 -7220 +20 -4580 +20 -4560 +20 -4440 +20 -4400 +20 -4380 +20 -4360 +20 2740 +20 2760 +20 3300 +20 3320 +20 4820 +20 4840 +20 4860 +20 4960 +20 7480 +20 7500 +20 7520 +40 -26620 +40 -26520 +40 -26440 +40 -23960 +40 -23840 +40 -23820 +40 -23480 +40 -23460 +40 -23440 +40 -23420 +40 -23400 +40 -23380 +40 -23360 +40 -23340 +40 -23320 +40 -23300 +40 -23280 +40 -23260 +40 -23240 +40 -23220 +40 -23200 +40 -23180 +40 -23160 +40 -23140 +40 -23120 +40 -23100 +40 -23080 +40 -23060 +40 -23040 +40 -23020 +40 -23000 +40 -22980 +40 -22960 +40 -22940 +40 -22920 +40 -22900 +40 -20940 +40 -20920 +40 -19960 +40 -17220 +40 -10780 +40 -10760 +40 -7620 +40 -7600 +40 -7580 +40 -7280 +40 -7240 +40 -7220 +40 -7200 +40 -7180 +40 -5640 +40 -5460 +40 -4720 +40 -4600 +40 -4580 +40 -4440 +40 -4420 +40 -4400 +40 -4380 +40 -4360 +40 2720 +40 2740 +40 2760 +40 3300 +40 3320 +40 3340 +40 3360 +40 4820 +40 4840 +40 4860 +40 5000 +40 5020 +40 5040 +40 5060 +40 5080 +40 5100 +40 5120 +40 5140 +40 5160 +40 5180 +40 5200 +40 5220 +40 5240 +40 5260 +40 5280 +40 5300 +40 7480 +40 7500 +40 7520 +60 -26900 +60 -26780 +60 -26680 +60 -23960 +60 -23840 +60 -23820 +60 -23460 +60 -23440 +60 -23420 +60 -23400 +60 -23380 +60 -23360 +60 -23340 +60 -23320 +60 -23300 +60 -23280 +60 -23220 +60 -23140 +60 -23100 +60 -23060 +60 -23020 +60 -23000 +60 -22980 +60 -22920 +60 -20940 +60 -20920 +60 -20660 +60 -20600 +60 -20580 +60 -20560 +60 -20520 +60 -20500 +60 -19960 +60 -10780 +60 -10760 +60 -7620 +60 -7600 +60 -7220 +60 -5640 +60 -5440 +60 -4720 +60 -4600 +60 -4440 +60 -4420 +60 -4380 +60 2720 +60 2740 +60 2760 +60 3360 +60 4820 +60 4840 +60 4860 +60 4960 +60 4980 +60 5000 +60 5020 +60 5040 +60 5060 +60 5080 +60 5100 +60 5120 +60 5140 +60 5160 +60 5180 +60 5200 +60 5240 +60 5260 +60 5280 +60 5300 +60 7460 +60 7500 +60 7520 +80 -26900 +80 -23840 +80 -23820 +80 -20940 +80 -20920 +80 -20640 +80 -20600 +80 -20540 +80 -20520 +80 -19960 +80 -10780 +80 -10760 +80 -7620 +80 -7600 +80 -7220 +80 -5640 +80 -5460 +80 -4620 +80 -4600 +80 2720 +80 2740 +80 2760 +80 3360 +80 4840 +80 4860 +80 4880 +80 5240 +80 5260 +80 7500 +80 7520 +100 -23820 +100 -20940 +100 -20920 +100 -19960 +100 -10780 +100 -10760 +100 -7620 +100 -7600 +100 -7240 +100 -5640 +100 -5440 +100 -4620 +100 -4600 +100 2700 +100 2720 +100 2740 +100 2760 +100 3340 +100 3360 +100 4820 +100 4840 +100 4860 +100 5240 +100 7480 +100 7500 +100 7520 +120 -26880 +120 -23840 +120 -23820 +120 -20940 +120 -20920 +120 -19960 +120 -17220 +120 -10800 +120 -10780 +120 -10760 +120 -7620 +120 -7600 +120 -5640 +120 2720 +120 2740 +120 2760 +120 2780 +120 3360 +120 4820 +120 4840 +120 4860 +120 5240 +120 7340 +120 7360 +120 7500 +120 7520 +120 7540 +140 -26880 +140 -23880 +140 -23860 +140 -23820 +140 -20940 +140 -20920 +140 -19960 +140 -17220 +140 -10780 +140 -10760 +140 -7620 +140 -7600 +140 -5640 +140 -5460 +140 -5440 +140 2700 +140 2720 +140 2740 +140 2760 +140 3360 +140 4840 +140 4860 +140 5240 +140 7340 +140 7360 +140 7500 +140 7520 +140 7540 +160 -26900 +160 -26880 +160 -24540 +160 -24500 +160 -23840 +160 -23820 +160 -20940 +160 -20920 +160 -19960 +160 -10780 +160 -10760 +160 -7620 +160 -7600 +160 -5440 +160 2720 +160 2740 +160 2760 +160 2780 +160 3340 +160 3360 +160 4840 +160 4860 +160 5240 +160 7320 +160 7340 +160 7360 +160 7500 +160 7520 +160 7540 +160 22920 +180 -24460 +180 -23840 +180 -23820 +180 -20940 +180 -20920 +180 -19960 +180 -10780 +180 -7620 +180 -7600 +180 -5660 +180 -5460 +180 -5440 +180 -5420 +180 2720 +180 2740 +180 2760 +180 3240 +180 3360 +180 3720 +180 3740 +180 4840 +180 4860 +180 4880 +180 5240 +180 7500 +180 7520 +180 7540 +200 -26900 +200 -23920 +200 -23820 +200 -20940 +200 -19960 +200 -10780 +200 -10740 +200 -7640 +200 -7620 +200 -7600 +200 -5640 +200 -5440 +200 2740 +200 2760 +200 3360 +200 3720 +200 3740 +200 4840 +200 4860 +200 5240 +200 7520 +200 7540 +220 -26900 +220 -26880 +220 -24300 +220 -24220 +220 -24140 +220 -24100 +220 -24080 +220 -24060 +220 -24040 +220 -24020 +220 -24000 +220 -23980 +220 -23960 +220 -23940 +220 -23920 +220 -23900 +220 -23880 +220 -23860 +220 -23840 +220 -23820 +220 -20940 +220 -19960 +220 -17220 +220 -10800 +220 -10780 +220 -10760 +220 -7620 +220 -7600 +220 -5640 +220 -5460 +220 -5440 +220 -5420 +220 2720 +220 2740 +220 2760 +220 3360 +220 3740 +220 4840 +220 4860 +220 5240 +220 7500 +220 7520 +220 7540 +240 -26900 +240 -24380 +240 -24360 +240 -24340 +240 -24300 +240 -24280 +240 -24260 +240 -24240 +240 -24220 +240 -24200 +240 -24180 +240 -24160 +240 -24140 +240 -24120 +240 -24100 +240 -24080 +240 -24060 +240 -24040 +240 -24020 +240 -23980 +240 -23960 +240 -23940 +240 -23900 +240 -23880 +240 -23860 +240 -23840 +240 -23820 +240 -20940 +240 -20920 +240 -19960 +240 -10780 +240 -7640 +240 -7620 +240 -7600 +240 -5440 +240 -5420 +240 2720 +240 2740 +240 2760 +240 3360 +240 3400 +240 4840 +240 4860 +240 4880 +240 5240 +240 7540 +240 7560 +260 -26900 +260 -24340 +260 -23920 +260 -23860 +260 -20940 +260 -19960 +260 -10800 +260 -10780 +260 -10760 +260 -7620 +260 -7600 +260 -5640 +260 -5440 +260 -5420 +260 2720 +260 2740 +260 2760 +260 2780 +260 3360 +260 4840 +260 4860 +260 4880 +260 5240 +260 7520 +260 7540 +280 -26900 +280 -20940 +280 -19960 +280 -10780 +280 -10760 +280 -7620 +280 -7600 +280 -5640 +280 -5440 +280 -5420 +280 2740 +280 2760 +280 3360 +280 4840 +280 4860 +280 5240 +280 7520 +280 7540 +280 7560 +300 -20940 +300 -19960 +300 -17220 +300 -10780 +300 -10760 +300 -7620 +300 -7600 +300 -5440 +300 -5420 +300 2740 +300 3340 +300 3360 +300 4840 +300 4860 +300 4880 +300 5240 +300 7520 +300 7540 +320 -26880 +320 -20940 +320 -19960 +320 -17220 +320 -17180 +320 -10780 +320 -10760 +320 -7620 +320 -7600 +320 -5440 +320 -5420 +320 2720 +320 2740 +320 2760 +320 3220 +320 3360 +320 4840 +320 4860 +320 5240 +320 7220 +320 7320 +320 7340 +320 7380 +320 7500 +320 7520 +320 7540 +320 7560 +340 -26900 +340 -20940 +340 -20920 +340 -19960 +340 -10780 +340 -10760 +340 -7620 +340 -7600 +340 -5620 +340 -5460 +340 -5440 +340 -5420 +340 2740 +340 2760 +340 3360 +340 4840 +340 4860 +340 4880 +340 5240 +340 7260 +340 7300 +340 7320 +340 7340 +340 7360 +340 7380 +340 7520 +340 7540 +340 7560 +360 -20940 +360 -19960 +360 -10780 +360 -10760 +360 -10740 +360 -7640 +360 -7620 +360 -7600 +360 -5460 +360 -5440 +360 -5420 +360 2720 +360 2740 +360 2760 +360 3360 +360 4820 +360 4840 +360 4860 +360 5240 +360 7240 +360 7260 +360 7320 +360 7340 +360 7360 +360 7380 +360 7440 +360 7480 +360 7500 +360 7540 +360 7560 +380 -26900 +380 -20940 +380 -19960 +380 -10780 +380 -10760 +380 -7640 +380 -7620 +380 -7600 +380 -5460 +380 -5440 +380 -5420 +380 -5400 +380 2740 +380 2760 +380 2780 +380 3360 +380 4840 +380 4860 +380 5240 +380 7240 +380 7260 +380 7320 +380 7340 +380 7420 +380 7560 +400 -26900 +400 -20940 +400 -19960 +400 -17140 +400 -10800 +400 -10780 +400 -10760 +400 -7620 +400 -7600 +400 -5620 +400 -5440 +400 -5420 +400 2720 +400 2740 +400 2760 +400 2780 +400 3360 +400 4860 +400 5240 +400 5260 +400 7340 +400 7360 +400 7460 +400 7560 +420 -26900 +420 -26880 +420 -20940 +420 -20920 +420 -19960 +420 -17160 +420 -10780 +420 -10760 +420 -7620 +420 -7600 +420 -5460 +420 -5440 +420 -5420 +420 2720 +420 2740 +420 2760 +420 3360 +420 4840 +420 4860 +420 4880 +420 5240 +420 7460 +420 7560 +420 22180 +440 -26900 +440 -20940 +440 -19960 +440 -10780 +440 -10760 +440 -7620 +440 -7600 +440 -7580 +440 -5460 +440 -5440 +440 -5420 +440 2740 +440 2760 +440 3360 +440 4840 +440 4860 +440 5240 +440 5260 +440 7420 +440 7440 +460 -26900 +460 -20940 +460 -19960 +460 -17120 +460 -10780 +460 -10760 +460 -7640 +460 -7620 +460 -7600 +460 -7580 +460 -5460 +460 -5440 +460 -5420 +460 -5400 +460 120 +460 140 +460 160 +460 180 +460 220 +460 240 +460 260 +460 2740 +460 2760 +460 3360 +460 4860 +460 4880 +460 5240 +460 9780 +480 -26900 +480 -20940 +480 -20920 +480 -19960 +480 -10800 +480 -10780 +480 -10760 +480 -7620 +480 -7600 +480 -5440 +480 -5420 +480 80 +480 100 +480 120 +480 140 +480 160 +480 180 +480 200 +480 220 +480 240 +480 260 +480 280 +480 300 +480 2760 +480 2860 +480 3360 +480 4860 +480 5240 +480 5260 +480 7560 +500 -20940 +500 -19960 +500 -10780 +500 -7620 +500 -7600 +500 -5460 +500 -5440 +500 -5420 +500 60 +500 80 +500 100 +500 120 +500 140 +500 160 +500 180 +500 200 +500 220 +500 240 +500 260 +500 280 +500 300 +500 320 +500 340 +500 360 +500 2780 +500 2800 +500 3360 +500 4860 +500 4880 +500 5220 +500 5240 +500 7580 +520 -26900 +520 -21000 +520 -20940 +520 -20920 +520 -19960 +520 -17180 +520 -17140 +520 -10800 +520 -10780 +520 -10760 +520 -7620 +520 -7600 +520 -5480 +520 -5460 +520 -5440 +520 -5420 +520 20 +520 40 +520 60 +520 80 +520 100 +520 120 +520 140 +520 180 +520 200 +520 260 +520 280 +520 300 +520 320 +520 340 +520 360 +520 380 +520 400 +520 420 +520 440 +520 2760 +520 2800 +520 2860 +520 3360 +520 4840 +520 4860 +520 5240 +520 7580 +540 -26900 +540 -20980 +540 -20960 +540 -20940 +540 -19960 +540 -10780 +540 -10760 +540 -10740 +540 -7620 +540 -7600 +540 -5480 +540 -5460 +540 -5440 +540 -5420 +540 20 +540 40 +540 60 +540 80 +540 100 +540 140 +540 160 +540 320 +540 340 +540 360 +540 380 +540 400 +540 420 +540 440 +540 460 +540 2800 +540 2840 +540 3360 +540 4860 +540 4880 +540 5240 +540 7580 +560 -26900 +560 -20980 +560 -20960 +560 -20940 +560 -19980 +560 -19960 +560 -17140 +560 -10780 +560 -10760 +560 -7620 +560 -7600 +560 -5440 +560 -5420 +560 -5400 +560 -20 +560 0 +560 20 +560 40 +560 60 +560 80 +560 120 +560 140 +560 400 +560 420 +560 440 +560 2780 +560 2800 +560 2840 +560 3360 +560 4860 +560 4880 +560 5240 +560 7560 +560 7580 +560 7600 +580 -26900 +580 -20980 +580 -20960 +580 -20940 +580 -20860 +580 -19960 +580 -17180 +580 -13800 +580 -13780 +580 -10780 +580 -10760 +580 -7620 +580 -7600 +580 -5480 +580 -5460 +580 -5440 +580 -5420 +580 -80 +580 -60 +580 -40 +580 -20 +580 0 +580 20 +580 40 +580 60 +580 80 +580 100 +580 1280 +580 2780 +580 2800 +580 3180 +580 3360 +580 4840 +580 4860 +580 4880 +580 5240 +580 7560 +580 7580 +580 7600 +600 -26900 +600 -20960 +600 -20940 +600 -20920 +600 -20900 +600 -20880 +600 -20840 +600 -20820 +600 -20800 +600 -19980 +600 -19960 +600 -17180 +600 -17140 +600 -13820 +600 -13800 +600 -13780 +600 -13300 +600 -10780 +600 -10760 +600 -7620 +600 -7600 +600 -5480 +600 -5460 +600 -5440 +600 -5420 +600 -60 +600 -40 +600 -20 +600 0 +600 40 +600 60 +600 1260 +600 1280 +600 3360 +600 4860 +600 4880 +600 5240 +600 7580 +600 7600 +600 21840 +620 -20940 +620 -20920 +620 -20900 +620 -20880 +620 -20860 +620 -20840 +620 -19960 +620 -13800 +620 -13280 +620 -13260 +620 -13240 +620 -10800 +620 -10780 +620 -10760 +620 -7640 +620 -7620 +620 -7600 +620 -7580 +620 -5460 +620 -5440 +620 -5420 +620 -5360 +620 -40 +620 -20 +620 1300 +620 1320 +620 1340 +620 3360 +620 3700 +620 4860 +620 4880 +620 5240 +620 7580 +620 7600 +640 -26900 +640 -20920 +640 -20880 +640 -19960 +640 -18720 +640 -18660 +640 -17180 +640 -17140 +640 -13820 +640 -13800 +640 -13300 +640 -13280 +640 -13260 +640 -10780 +640 -10760 +640 -7620 +640 -7600 +640 -5500 +640 -5460 +640 -5440 +640 -5420 +640 -5380 +640 -5360 +640 -5340 +640 -5240 +640 -4780 +640 -40 +640 -20 +640 1340 +640 3200 +640 3360 +640 3660 +640 3700 +640 4860 +640 4880 +640 5220 +640 5240 +640 5260 +640 7580 +640 7600 +660 -26900 +660 -19980 +660 -19960 +660 -18940 +660 -18560 +660 -18460 +660 -18420 +660 -18400 +660 -17140 +660 -13800 +660 -13780 +660 -13740 +660 -13380 +660 -13300 +660 -13280 +660 -13260 +660 -10780 +660 -10760 +660 -7620 +660 -7600 +660 -5460 +660 -5440 +660 -5420 +660 -5400 +660 -5380 +660 -5360 +660 -5340 +660 -5320 +660 -5300 +660 -5260 +660 -5240 +660 -5220 +660 -5140 +660 -5120 +660 -5100 +660 -5080 +660 -5060 +660 -5040 +660 -5020 +660 -5000 +660 -4980 +660 -4960 +660 -4940 +660 -4920 +660 -4900 +660 -4880 +660 -4860 +660 -4840 +660 -4820 +660 -4800 +660 -4780 +660 -4760 +660 -4740 +660 -4720 +660 -4700 +660 -4680 +660 -4660 +660 -4640 +660 -4620 +660 -4600 +660 -4580 +660 -4560 +660 -4540 +660 -4520 +660 -4500 +660 -4480 +660 -4460 +660 -4440 +660 -4420 +660 -4400 +660 -4380 +660 -4360 +660 -4340 +660 -4320 +660 -40 +660 1680 +660 2900 +660 3280 +660 3520 +660 3580 +660 3620 +660 3660 +660 3780 +660 3820 +660 3840 +660 3900 +660 4380 +660 4500 +660 4540 +660 4580 +660 4600 +660 4680 +660 4740 +660 4860 +660 4880 +660 5240 +660 5260 +660 7580 +660 7600 +680 -26900 +680 -19960 +680 -19720 +680 -19700 +680 -19640 +680 -19620 +680 -19580 +680 -19540 +680 -19520 +680 -19480 +680 -19440 +680 -19420 +680 -19320 +680 -19300 +680 -19200 +680 -19160 +680 -19060 +680 -18360 +680 -18300 +680 -18200 +680 -17200 +680 -17160 +680 -17140 +680 -13780 +680 -13760 +680 -13740 +680 -13720 +680 -13400 +680 -13380 +680 -13340 +680 -13320 +680 -13300 +680 -13280 +680 -13260 +680 -10780 +680 -10760 +680 -7640 +680 -7620 +680 -7600 +680 -5420 +680 -5400 +680 -5380 +680 -5340 +680 -5280 +680 -5260 +680 -5240 +680 -5220 +680 -5200 +680 -5080 +680 -5060 +680 -4960 +680 -4940 +680 -4920 +680 -4900 +680 -4880 +680 -4860 +680 -4800 +680 -4760 +680 -4680 +680 -4640 +680 -4560 +680 -4540 +680 -4520 +680 -4480 +680 -4460 +680 -4440 +680 -4420 +680 -4400 +680 -4380 +680 -4360 +680 -4340 +680 -4320 +680 -4300 +680 -4280 +680 -4260 +680 -4240 +680 -4220 +680 -4200 +680 -4180 +680 -4160 +680 2860 +680 2880 +680 3000 +680 3360 +680 3380 +680 3400 +680 3420 +680 3440 +680 3460 +680 3480 +680 3500 +680 3520 +680 3540 +680 3560 +680 3580 +680 3600 +680 3620 +680 3640 +680 3660 +680 3680 +680 3700 +680 3720 +680 3740 +680 3760 +680 3780 +680 3800 +680 3820 +680 3840 +680 3860 +680 3880 +680 3900 +680 3920 +680 3940 +680 3960 +680 3980 +680 4000 +680 4020 +680 4040 +680 4060 +680 4080 +680 4100 +680 4120 +680 4140 +680 4160 +680 4180 +680 4200 +680 4220 +680 4240 +680 4260 +680 4280 +680 4300 +680 4320 +680 4340 +680 4360 +680 4380 +680 4400 +680 4420 +680 4440 +680 4460 +680 4480 +680 4500 +680 4520 +680 4540 +680 4560 +680 4580 +680 4600 +680 4620 +680 4640 +680 4660 +680 4680 +680 4700 +680 4720 +680 4740 +680 4760 +680 4780 +680 4800 +680 4820 +680 4840 +680 4860 +680 4880 +680 7620 +700 -26900 +700 -19980 +700 -19960 +700 -19280 +700 -18200 +700 -18180 +700 -17180 +700 -17140 +700 -13780 +700 -13760 +700 -13720 +700 -13400 +700 -13380 +700 -13360 +700 -11620 +700 -10800 +700 -10780 +700 -10760 +700 -7620 +700 -7600 +700 -5360 +700 -5340 +700 -5280 +700 -5260 +700 -5240 +700 -5140 +700 -4940 +700 -4920 +700 -4700 +700 -4640 +700 -4620 +700 -4600 +700 -4520 +700 -4400 +700 -4380 +700 -4360 +700 -4340 +700 -4260 +700 -4240 +700 -4220 +700 -4200 +700 -4180 +700 -4160 +700 -4140 +700 2960 +700 3360 +700 3380 +700 3400 +700 3420 +700 3460 +700 3500 +700 3520 +700 3540 +700 3560 +700 3680 +700 3700 +700 3720 +700 3820 +700 3840 +700 3860 +700 3900 +700 3940 +700 4120 +700 4300 +700 4440 +700 4780 +700 4800 +700 4820 +700 4840 +700 4860 +700 7620 +700 7640 +700 21800 +720 -26900 +720 -19980 +720 -19960 +720 -18200 +720 -17180 +720 -13760 +720 -13720 +720 -13700 +720 -13060 +720 -10780 +720 -10760 +720 -7620 +720 -7600 +720 -4220 +720 -4200 +720 -4180 +720 -4160 +720 -4140 +720 -4100 +720 -3880 +720 -3840 +720 -2740 +720 -2700 +720 -2680 +720 -1180 +720 -1140 +720 -1100 +720 -1080 +720 -1020 +720 -100 +720 40 +720 80 +720 380 +720 560 +720 620 +720 920 +720 1280 +720 1540 +720 1600 +720 1620 +720 1640 +720 1920 +720 2080 +720 2100 +720 2800 +720 2820 +720 2860 +720 5440 +720 5560 +720 7280 +720 7480 +720 7660 +740 -26900 +740 -19960 +740 -18200 +740 -17180 +740 -17140 +740 -17040 +740 -14580 +740 -13760 +740 -13740 +740 -13720 +740 -11640 +740 -10800 +740 -10780 +740 -10760 +740 -7620 +740 -7600 +740 -4240 +740 -4200 +740 -4180 +740 -4160 +740 -4140 +740 -4120 +740 -4100 +740 -4080 +740 -4060 +740 -4040 +740 -4020 +740 -3980 +740 -3960 +740 -3940 +740 -3920 +740 -3900 +740 -3880 +740 -3860 +740 -3840 +740 -3820 +740 -2760 +740 -2740 +740 -2720 +740 -2700 +740 -2680 +740 -2660 +740 -2640 +740 -2620 +740 -2600 +740 -2520 +740 -2500 +740 -2480 +740 -2460 +740 -2440 +740 -2380 +740 -2360 +740 -2300 +740 -2280 +740 -2260 +740 -2240 +740 -2180 +740 -2160 +740 -2120 +740 -2080 +740 -2060 +740 -2020 +740 -2000 +740 -1980 +740 -1960 +740 -1940 +740 -1920 +740 -1900 +740 -1880 +740 -1860 +740 -1840 +740 -1820 +740 -1800 +740 -1780 +740 -1760 +740 -1720 +740 -1700 +740 -1680 +740 -1660 +740 -1640 +740 -1620 +740 -1560 +740 -1520 +740 -1500 +740 -1480 +740 -1440 +740 -1420 +740 -1300 +740 -1260 +740 -1200 +740 -1180 +740 -1140 +740 -1100 +740 -1000 +740 -820 +740 -800 +740 -740 +740 -680 +740 -140 +740 -120 +740 -80 +740 -60 +740 20 +740 40 +740 60 +740 520 +740 620 +740 740 +740 960 +740 1040 +740 1120 +740 1140 +740 1160 +740 1180 +740 1220 +740 1300 +740 1360 +740 1380 +740 1400 +740 1420 +740 1580 +740 1620 +740 1640 +740 1660 +740 1900 +740 2040 +740 2060 +740 2120 +740 2140 +740 2180 +740 2760 +740 2780 +740 2820 +740 2840 +740 2860 +740 2940 +740 3440 +740 4820 +740 5320 +740 5580 +740 5600 +740 6680 +740 6700 +740 6720 +740 6740 +740 6760 +740 6780 +740 6820 +740 6840 +740 6860 +740 6880 +740 6920 +740 6940 +740 6960 +740 7000 +740 7020 +740 7040 +740 7080 +740 7100 +740 7120 +740 7140 +740 7160 +740 7180 +740 7220 +740 7240 +740 7260 +740 7300 +740 7320 +740 7360 +740 7380 +740 7400 +740 7420 +740 7440 +740 7460 +740 7480 +740 7520 +740 7540 +740 7580 +740 7600 +740 7620 +740 7640 +740 7660 +740 14420 +740 14440 +740 14680 +740 14700 +760 -19960 +760 -18100 +760 -17160 +760 -17140 +760 -17080 +760 -17020 +760 -13760 +760 -13740 +760 -13700 +760 -13080 +760 -13060 +760 -11680 +760 -10780 +760 -10760 +760 -7640 +760 -7620 +760 -7600 +760 -4220 +760 -4200 +760 -4180 +760 -4160 +760 -4140 +760 -4120 +760 -4100 +760 -4080 +760 -4060 +760 -4040 +760 -4020 +760 -4000 +760 -3980 +760 -3960 +760 -3940 +760 -3920 +760 -3900 +760 -3880 +760 -3860 +760 -3840 +760 -2760 +760 -2740 +760 -2720 +760 -2700 +760 -2680 +760 -2660 +760 -2640 +760 -2620 +760 -2600 +760 -2580 +760 -2560 +760 -2540 +760 -2520 +760 -2500 +760 -2480 +760 -2460 +760 -2440 +760 -2420 +760 -2400 +760 -2380 +760 -2360 +760 -2340 +760 -2320 +760 -2300 +760 -2280 +760 -2260 +760 -2240 +760 -2220 +760 -2200 +760 -2180 +760 -2160 +760 -2140 +760 -2120 +760 -2100 +760 -2080 +760 -2060 +760 -2040 +760 -2020 +760 -2000 +760 -1980 +760 -1960 +760 -1940 +760 -1920 +760 -1900 +760 -1880 +760 -1860 +760 -1840 +760 -1820 +760 -1800 +760 -1780 +760 -1760 +760 -1740 +760 -1720 +760 -1700 +760 -1680 +760 -1660 +760 -1640 +760 -1620 +760 -1600 +760 -1580 +760 -1560 +760 -1540 +760 -1520 +760 -1500 +760 -1480 +760 -1460 +760 -1440 +760 -1420 +760 -1400 +760 -1380 +760 -1360 +760 -1340 +760 -1320 +760 -1300 +760 -1280 +760 -1260 +760 -1240 +760 -1220 +760 -1200 +760 -1180 +760 -1160 +760 -1140 +760 -1120 +760 -1100 +760 -1080 +760 -1060 +760 -1040 +760 -1020 +760 -1000 +760 -980 +760 -960 +760 -940 +760 -920 +760 -900 +760 -880 +760 -860 +760 -840 +760 -820 +760 -800 +760 -780 +760 -760 +760 -740 +760 -720 +760 -700 +760 -680 +760 -660 +760 -640 +760 -620 +760 -600 +760 -580 +760 -560 +760 -540 +760 -520 +760 -500 +760 -480 +760 -460 +760 -440 +760 -420 +760 -400 +760 -380 +760 -360 +760 -340 +760 -320 +760 -300 +760 -280 +760 -260 +760 -240 +760 -220 +760 -200 +760 -180 +760 -160 +760 -140 +760 -120 +760 -100 +760 -80 +760 -60 +760 -40 +760 -20 +760 0 +760 20 +760 40 +760 60 +760 80 +760 100 +760 120 +760 220 +760 260 +760 400 +760 420 +760 440 +760 460 +760 480 +760 500 +760 520 +760 540 +760 560 +760 580 +760 600 +760 620 +760 640 +760 660 +760 680 +760 700 +760 720 +760 740 +760 760 +760 780 +760 800 +760 820 +760 840 +760 860 +760 880 +760 900 +760 920 +760 940 +760 960 +760 980 +760 1000 +760 1020 +760 1040 +760 1060 +760 1080 +760 1100 +760 1120 +760 1140 +760 1160 +760 1180 +760 1200 +760 1220 +760 1240 +760 1260 +760 1280 +760 1300 +760 1320 +760 1340 +760 1360 +760 1380 +760 1400 +760 1420 +760 1440 +760 1460 +760 1480 +760 1500 +760 1520 +760 1540 +760 1560 +760 1580 +760 1600 +760 1620 +760 1640 +760 1660 +760 1680 +760 1700 +760 1720 +760 1740 +760 1760 +760 1780 +760 1840 +760 1860 +760 1880 +760 1900 +760 1920 +760 1940 +760 1960 +760 1980 +760 2000 +760 2020 +760 2040 +760 2060 +760 2080 +760 2100 +760 2120 +760 2140 +760 2160 +760 2180 +760 2200 +760 2220 +760 2240 +760 2260 +760 2280 +760 2300 +760 2320 +760 2340 +760 2360 +760 2380 +760 2400 +760 2420 +760 2440 +760 2460 +760 2480 +760 2520 +760 2540 +760 2580 +760 2600 +760 2620 +760 2640 +760 2660 +760 2680 +760 2720 +760 2740 +760 2760 +760 2780 +760 2800 +760 2820 +760 2840 +760 2880 +760 2920 +760 2940 +760 2980 +760 3000 +760 3020 +760 3060 +760 3080 +760 3120 +760 3160 +760 3340 +760 5580 +760 5600 +760 6520 +760 6680 +760 7300 +760 7540 +760 13880 +760 13900 +760 13920 +760 13940 +760 13960 +760 13980 +760 14000 +760 14020 +760 14040 +760 14060 +760 14080 +760 14100 +760 14120 +760 14140 +760 14160 +760 14180 +760 14200 +760 14220 +760 14240 +760 14260 +760 14280 +760 14300 +760 14320 +760 14340 +760 14360 +760 14380 +760 14400 +760 14420 +760 14440 +760 14460 +760 14480 +760 14500 +760 14520 +760 14540 +760 14560 +760 14580 +760 14600 +760 14620 +760 14640 +760 14660 +760 14680 +760 14700 +760 14720 +760 14740 +760 14760 +760 14780 +760 14800 +760 14820 +760 21800 +780 -26900 +780 -18100 +780 -17180 +780 -17060 +780 -14620 +780 -13760 +780 -13740 +780 -13700 +780 -11680 +780 -11640 +780 -11620 +780 -10780 +780 -7640 +780 -7620 +780 -7600 +780 -4160 +780 -4140 +780 -4080 +780 -4020 +780 -4000 +780 -3960 +780 -3940 +780 -2760 +780 -2740 +780 -2560 +780 -2500 +780 -2480 +780 -2440 +780 -2420 +780 -2400 +780 -2380 +780 -2280 +780 -2220 +780 -1320 +780 -1240 +780 -1200 +780 -1140 +780 -1100 +780 -1060 +780 -1040 +780 -900 +780 -860 +780 -820 +780 -800 +780 -760 +780 -720 +780 -700 +780 -660 +780 -620 +780 -600 +780 -540 +780 -520 +780 -460 +780 -440 +780 -420 +780 -400 +780 -380 +780 -340 +780 -320 +780 -300 +780 -280 +780 -260 +780 -240 +780 -220 +780 -200 +780 -180 +780 -160 +780 -140 +780 -120 +780 -100 +780 -60 +780 -20 +780 0 +780 380 +780 440 +780 460 +780 480 +780 500 +780 520 +780 540 +780 560 +780 580 +780 600 +780 620 +780 640 +780 660 +780 680 +780 700 +780 720 +780 740 +780 760 +780 780 +780 800 +780 820 +780 840 +780 860 +780 880 +780 1040 +780 1220 +780 1260 +780 1280 +780 1300 +780 1440 +780 1460 +780 1500 +780 1520 +780 1560 +780 1580 +780 1680 +780 1780 +780 1860 +780 1880 +780 1900 +780 1920 +780 1940 +780 1960 +780 1980 +780 2000 +780 2020 +780 2040 +780 2060 +780 2080 +780 2100 +780 2120 +780 2140 +780 2160 +780 2180 +780 2200 +780 2220 +780 2240 +780 2260 +780 2280 +780 2300 +780 2320 +780 2340 +780 2360 +780 2380 +780 2400 +780 2420 +780 2440 +780 2480 +780 2500 +780 2520 +780 2540 +780 2560 +780 2580 +780 2620 +780 2640 +780 2660 +780 2700 +780 2720 +780 2740 +780 2760 +780 2780 +780 2800 +780 2880 +780 2900 +780 2920 +780 3120 +780 3360 +780 5580 +780 5600 +780 6520 +780 6680 +780 13860 +780 13880 +780 13900 +780 13920 +780 13940 +780 13960 +780 13980 +780 14020 +780 14040 +780 14060 +780 14080 +780 14100 +780 14120 +780 14140 +780 14160 +780 14180 +780 14200 +780 14220 +780 14240 +780 14280 +780 14320 +780 14360 +780 14380 +780 14460 +780 14480 +780 14500 +780 14520 +780 14540 +780 14560 +780 14600 +780 14620 +780 14660 +780 14720 +780 14800 +780 14820 +800 -18100 +800 -13760 +800 -13740 +800 -13720 +800 -13700 +800 -11640 +800 -11620 +800 -11600 +800 -10780 +800 -10760 +800 -7640 +800 -7620 +800 -7600 +800 -3960 +800 -3940 +800 -2760 +800 -2740 +800 -1980 +800 -1140 +800 -940 +800 -140 +800 120 +800 1500 +800 5580 +800 5600 +800 6520 +800 6680 +800 13860 +800 13880 +800 13900 +800 14720 +800 14800 +800 14820 +800 14840 +800 17320 +800 17340 +800 18440 +800 18460 +800 18480 +800 18500 +800 18540 +800 18560 +800 18580 +800 18600 +800 18620 +800 18640 +800 18680 +800 18720 +800 18740 +800 18760 +800 18780 +800 18800 +800 18820 +800 18840 +800 18860 +800 18880 +800 18900 +800 18920 +800 18940 +800 18960 +800 18980 +800 19000 +800 19020 +800 19040 +800 19060 +800 19080 +800 19120 +800 19140 +800 19160 +800 19180 +800 19200 +800 19220 +800 19240 +800 19260 +800 19280 +820 -18160 +820 -17040 +820 -17000 +820 -14740 +820 -14720 +820 -14660 +820 -14620 +820 -13760 +820 -13700 +820 -11640 +820 -11620 +820 -11600 +820 -11580 +820 -10780 +820 -10760 +820 -7640 +820 -7620 +820 -7600 +820 -7520 +820 -7480 +820 -7380 +820 -7300 +820 -7260 +820 -7240 +820 -7120 +820 -7080 +820 -7000 +820 -6940 +820 -6860 +820 -6820 +820 -6720 +820 -6660 +820 -6560 +820 -6500 +820 -6400 +820 -6340 +820 -6220 +820 -6160 +820 -6020 +820 -5940 +820 -5800 +820 -5720 +820 -5540 +820 -5460 +820 -5280 +820 -5180 +820 -4960 +820 -4880 +820 -4620 +820 -4540 +820 -4240 +820 -4120 +820 -3960 +820 -3940 +820 -3860 +820 -2760 +820 -2740 +820 4980 +820 5580 +820 5600 +820 6520 +820 6680 +820 13860 +820 13880 +820 13900 +820 14760 +820 14780 +820 14800 +820 14820 +820 14840 +820 14900 +820 14940 +820 15000 +820 15100 +820 15120 +820 15140 +820 15160 +820 15180 +820 15200 +820 15240 +820 15260 +820 15280 +820 15340 +820 15360 +820 15380 +820 15400 +820 15420 +820 15440 +820 15460 +820 15480 +820 15500 +820 15520 +820 15540 +820 15560 +820 15580 +820 15600 +820 15620 +820 15640 +820 15660 +820 15680 +820 15700 +820 15720 +820 15740 +820 15760 +820 15780 +820 15800 +820 15820 +820 15840 +820 15860 +820 15880 +820 15900 +820 15920 +820 15940 +820 15960 +820 15980 +820 16000 +820 16020 +820 16040 +820 16060 +820 16080 +820 16100 +820 16120 +820 16140 +820 16160 +820 16180 +820 16200 +820 16220 +820 16240 +820 16260 +820 16280 +820 16300 +820 16320 +820 16340 +820 16360 +820 16380 +820 16400 +820 16420 +820 16440 +820 16460 +820 16480 +820 16500 +820 16520 +820 16540 +820 16560 +820 16580 +820 16600 +820 16620 +820 16640 +820 16660 +820 16680 +820 16700 +820 16720 +820 16740 +820 16760 +820 16780 +820 16800 +820 16820 +820 16840 +820 16860 +820 16880 +820 16900 +820 16920 +820 16940 +820 16960 +820 16980 +820 17000 +820 17020 +820 17040 +820 17060 +820 17080 +820 17100 +820 17120 +820 17140 +820 17160 +820 17180 +820 17200 +820 17220 +820 17240 +820 17260 +820 17280 +820 17300 +820 17320 +820 17340 +820 17360 +820 17380 +820 17400 +820 17420 +820 17440 +820 17460 +820 17480 +820 17500 +820 17520 +820 17540 +820 17560 +820 17580 +820 17600 +820 17620 +820 17640 +820 17660 +820 17680 +820 17700 +820 17720 +820 17740 +820 17760 +820 17780 +820 17800 +820 17820 +820 17840 +820 17860 +820 17880 +820 17900 +820 17920 +820 17940 +820 17960 +820 17980 +820 18000 +820 18020 +820 18040 +820 18060 +820 18080 +820 18100 +820 18120 +820 18140 +820 18160 +820 18180 +820 18200 +820 18220 +820 18240 +820 18260 +820 18280 +820 18300 +820 18320 +820 18340 +820 18360 +820 18380 +820 18400 +820 18420 +820 18440 +820 18460 +820 18480 +820 18500 +820 18520 +820 18540 +820 18560 +820 18580 +820 18600 +820 18620 +820 18640 +820 18660 +820 18680 +820 18700 +820 18720 +820 18740 +820 18760 +820 18780 +820 18800 +820 18820 +820 18840 +820 18860 +820 18880 +820 18900 +820 18920 +820 18940 +820 18960 +820 18980 +820 19000 +820 19040 +820 19060 +820 19080 +820 19100 +820 19120 +820 19140 +820 19160 +820 19180 +820 19200 +820 19220 +820 19240 +820 19260 +820 19280 +820 19300 +820 19320 +820 19340 +840 -26900 +840 -17080 +840 -17020 +840 -17000 +840 -14740 +840 -14680 +840 -14620 +840 -14600 +840 -13780 +840 -13760 +840 -13740 +840 -13720 +840 -13700 +840 -11620 +840 -11600 +840 -11580 +840 -11560 +840 -10800 +840 -10780 +840 -10760 +840 -7620 +840 -7600 +840 -7580 +840 -7560 +840 -7540 +840 -7520 +840 -7500 +840 -7480 +840 -7460 +840 -7440 +840 -7420 +840 -7400 +840 -7380 +840 -7360 +840 -7340 +840 -7320 +840 -7300 +840 -7280 +840 -7260 +840 -7240 +840 -7220 +840 -7200 +840 -7180 +840 -7160 +840 -7140 +840 -7120 +840 -7100 +840 -7080 +840 -7060 +840 -7040 +840 -7020 +840 -7000 +840 -6980 +840 -6960 +840 -6940 +840 -6920 +840 -6900 +840 -6880 +840 -6860 +840 -6840 +840 -6820 +840 -6800 +840 -6780 +840 -6760 +840 -6740 +840 -6720 +840 -6700 +840 -6680 +840 -6660 +840 -6640 +840 -6620 +840 -6600 +840 -6580 +840 -6560 +840 -6540 +840 -6520 +840 -6500 +840 -6480 +840 -6460 +840 -6440 +840 -6420 +840 -6400 +840 -6380 +840 -6360 +840 -6340 +840 -6320 +840 -6300 +840 -6280 +840 -6260 +840 -6240 +840 -6220 +840 -6200 +840 -6180 +840 -6160 +840 -6140 +840 -6120 +840 -6100 +840 -6080 +840 -6060 +840 -6040 +840 -6020 +840 -6000 +840 -5920 +840 -5820 +840 -5800 +840 -5720 +840 -5620 +840 -5560 +840 -5540 +840 -5480 +840 -5400 +840 -5300 +840 -5240 +840 -5220 +840 -5200 +840 -5180 +840 -5160 +840 -5140 +840 -5120 +840 -5100 +840 -5080 +840 -5040 +840 -5020 +840 -5000 +840 -4960 +840 -4940 +840 -4880 +840 -4860 +840 -4840 +840 -4820 +840 -4800 +840 -4780 +840 -4760 +840 -4700 +840 -4640 +840 -4620 +840 -4600 +840 -4580 +840 -4560 +840 -4540 +840 -4520 +840 -4500 +840 -4480 +840 -4460 +840 -4440 +840 -4400 +840 -4380 +840 -4340 +840 -4320 +840 -4220 +840 -4080 +840 -4040 +840 -4020 +840 -4000 +840 -3980 +840 -3960 +840 -3940 +840 -3920 +840 -3880 +840 -3840 +840 -3820 +840 -2760 +840 -2740 +840 -2300 +840 -2080 +840 -1920 +840 -1900 +840 -1020 +840 -780 +840 -660 +840 320 +840 600 +840 2180 +840 2560 +840 3260 +840 3500 +840 5500 +840 5580 +840 5600 +840 6520 +840 8460 +840 11160 +840 11800 +840 12060 +840 12140 +840 12160 +840 12200 +840 12220 +840 12240 +840 12260 +840 12360 +840 12380 +840 12400 +840 12420 +840 12440 +840 12460 +840 12480 +840 12500 +840 12520 +840 12540 +840 12560 +840 12580 +840 12600 +840 12620 +840 12640 +840 12660 +840 12680 +840 12700 +840 12720 +840 12740 +840 12760 +840 12780 +840 12800 +840 12820 +840 12840 +840 12860 +840 12880 +840 12900 +840 12920 +840 12940 +840 12960 +840 12980 +840 13000 +840 13020 +840 13040 +840 13060 +840 13080 +840 13100 +840 13120 +840 13140 +840 13160 +840 13180 +840 13200 +840 13220 +840 13240 +840 13260 +840 13280 +840 13300 +840 13320 +840 13340 +840 13360 +840 13380 +840 13400 +840 13420 +840 13440 +840 13460 +840 13480 +840 13500 +840 13520 +840 13540 +840 13560 +840 13580 +840 13600 +840 13620 +840 13640 +840 13660 +840 13680 +840 13700 +840 13720 +840 13740 +840 13760 +840 13780 +840 13800 +840 13820 +840 13840 +840 13860 +840 13880 +840 14760 +840 14780 +840 14800 +840 14820 +840 14840 +840 14860 +840 14880 +840 14900 +840 14920 +840 14940 +840 14960 +840 14980 +840 15000 +840 15020 +840 15040 +840 15060 +840 15080 +840 15100 +840 15120 +840 15140 +840 15160 +840 15180 +840 15200 +840 15220 +840 15240 +840 15260 +840 15280 +840 15300 +840 15320 +840 15340 +840 15360 +840 15380 +840 15400 +840 15420 +840 15440 +840 15460 +840 15480 +840 15500 +840 15520 +840 15540 +840 15560 +840 15580 +840 15600 +840 15620 +840 15640 +840 15660 +840 15680 +840 15700 +840 15720 +840 15740 +840 15760 +840 15780 +840 15800 +840 15820 +840 15840 +840 15860 +840 15880 +840 15900 +840 15920 +840 15940 +840 15960 +840 15980 +840 16000 +840 16020 +840 16040 +840 16060 +840 16080 +840 16100 +840 16120 +840 16140 +840 16160 +840 16180 +840 16200 +840 16220 +840 16240 +840 16260 +840 16280 +840 16300 +840 16320 +840 16340 +840 16360 +840 16380 +840 16400 +840 16420 +840 16440 +840 16460 +840 16480 +840 16500 +840 16520 +840 16540 +840 16560 +840 16580 +840 16600 +840 16620 +840 16640 +840 16660 +840 16680 +840 16720 +840 16740 +840 16760 +840 16780 +840 16800 +840 16840 +840 16860 +840 16880 +840 16920 +840 16940 +840 16960 +840 16980 +840 17000 +840 17020 +840 17060 +840 17080 +840 17120 +840 17160 +840 17200 +840 17240 +840 17260 +840 17280 +840 17320 +840 17340 +840 17360 +840 17420 +840 17480 +840 17500 +840 17540 +840 17560 +840 17600 +840 17620 +840 17700 +840 17720 +840 17780 +840 17800 +840 17820 +840 17880 +840 17900 +840 17940 +840 17980 +840 18040 +840 18060 +840 18080 +840 18100 +840 18120 +840 18160 +840 18180 +840 18220 +840 18280 +840 18300 +840 18320 +840 18340 +840 18400 +840 18440 +840 18460 +840 18580 +840 18660 +840 18760 +840 18860 +840 18880 +840 18920 +840 18940 +840 18980 +840 19020 +840 19080 +840 19180 +840 19220 +840 19240 +840 19260 +840 19280 +840 19300 +840 19320 +840 19340 +840 19360 +860 -26900 +860 -18280 +860 -18220 +860 -17060 +860 -17000 +860 -14700 +860 -14600 +860 -13780 +860 -13760 +860 -13720 +860 -11580 +860 -11560 +860 -11540 +860 -11520 +860 -10800 +860 -10780 +860 -10760 +860 -7640 +860 -7620 +860 -7600 +860 -7580 +860 -7560 +860 -7540 +860 -7520 +860 -7500 +860 -7480 +860 -7460 +860 -7440 +860 -7420 +860 -7400 +860 -7380 +860 -7360 +860 -7340 +860 -7320 +860 -7300 +860 -7280 +860 -7260 +860 -7240 +860 -7220 +860 -7200 +860 -7180 +860 -7160 +860 -7140 +860 -7120 +860 -7100 +860 -7080 +860 -7060 +860 -7040 +860 -7020 +860 -7000 +860 -6980 +860 -6960 +860 -6940 +860 -6920 +860 -6900 +860 -6880 +860 -6860 +860 -6840 +860 -6820 +860 -6800 +860 -6780 +860 -6760 +860 -6740 +860 -6720 +860 -6700 +860 -6680 +860 -6660 +860 -6640 +860 -6620 +860 -6600 +860 -6580 +860 -6560 +860 -6540 +860 -6520 +860 -6500 +860 -6480 +860 -6460 +860 -6440 +860 -6420 +860 -6400 +860 -6380 +860 -6360 +860 -6340 +860 -6320 +860 -6300 +860 -6280 +860 -6260 +860 -6240 +860 -6220 +860 -6200 +860 -6180 +860 -6160 +860 -6140 +860 -6120 +860 -6100 +860 -6080 +860 -6060 +860 -6040 +860 -6020 +860 -6000 +860 -5980 +860 -5960 +860 -5940 +860 -5920 +860 -5900 +860 -5880 +860 -5860 +860 -5840 +860 -5820 +860 -5800 +860 -5780 +860 -5760 +860 -5740 +860 -5720 +860 -5700 +860 -5680 +860 -5660 +860 -5640 +860 -5620 +860 -5600 +860 -5580 +860 -5560 +860 -5540 +860 -5520 +860 -5500 +860 -5480 +860 -5460 +860 -5440 +860 -5420 +860 -5400 +860 -5380 +860 -5360 +860 -5340 +860 -5320 +860 -5300 +860 -5280 +860 -5260 +860 -5240 +860 -5220 +860 -5200 +860 -5180 +860 -5160 +860 -5140 +860 -5120 +860 -5100 +860 -5080 +860 -5060 +860 -5040 +860 -5020 +860 -5000 +860 -4980 +860 -4960 +860 -4940 +860 -4920 +860 -4900 +860 -4880 +860 -4860 +860 -4840 +860 -4820 +860 -4800 +860 -4780 +860 -4760 +860 -4740 +860 -4720 +860 -4700 +860 -4680 +860 -4660 +860 -4640 +860 -4620 +860 -4600 +860 -4580 +860 -4560 +860 -4540 +860 -4520 +860 -4500 +860 -4480 +860 -4460 +860 -4440 +860 -4420 +860 -4400 +860 -4380 +860 -4360 +860 -4340 +860 -4320 +860 -4300 +860 -4280 +860 -4260 +860 -4240 +860 -4220 +860 -4200 +860 -4180 +860 -4160 +860 -4140 +860 -4120 +860 -4100 +860 -4080 +860 -4060 +860 -4040 +860 -4020 +860 -4000 +860 -3980 +860 -3960 +860 -3940 +860 -3920 +860 -3900 +860 -3880 +860 -3860 +860 -3840 +860 -3820 +860 -2760 +860 -2740 +860 -2720 +860 -2700 +860 -2680 +860 -2660 +860 -2640 +860 -2620 +860 -2600 +860 -2580 +860 -2560 +860 -2540 +860 -2520 +860 -2500 +860 -2480 +860 -2460 +860 -2440 +860 -2420 +860 -2400 +860 -2380 +860 -2360 +860 -2340 +860 -2320 +860 -2300 +860 -2280 +860 -2260 +860 -2240 +860 -2220 +860 -2200 +860 -2180 +860 -2160 +860 -2140 +860 -2120 +860 -2100 +860 -2080 +860 -2060 +860 -2040 +860 -2020 +860 -2000 +860 -1980 +860 -1960 +860 -1940 +860 -1920 +860 -1900 +860 -1880 +860 -1860 +860 -1840 +860 -1820 +860 -1800 +860 -1780 +860 -1760 +860 -1740 +860 -1720 +860 -1700 +860 -1680 +860 -1660 +860 -1640 +860 -1620 +860 -1600 +860 -1580 +860 -1560 +860 -1540 +860 -1520 +860 -1500 +860 -1480 +860 -1460 +860 -1440 +860 -1420 +860 -1400 +860 -1380 +860 -1360 +860 -1340 +860 -1320 +860 -1300 +860 -1280 +860 -1260 +860 -1240 +860 -1220 +860 -1200 +860 -1180 +860 -1160 +860 -1140 +860 -1120 +860 -1100 +860 -1080 +860 -1060 +860 -1040 +860 -1020 +860 -1000 +860 -980 +860 -960 +860 -940 +860 -920 +860 -900 +860 -880 +860 -860 +860 -840 +860 -820 +860 -800 +860 -780 +860 -760 +860 -740 +860 -720 +860 -700 +860 -680 +860 -660 +860 -640 +860 -620 +860 -600 +860 -580 +860 -560 +860 -540 +860 -520 +860 -500 +860 -480 +860 -460 +860 -440 +860 -420 +860 -400 +860 -380 +860 -360 +860 -340 +860 -320 +860 -300 +860 -280 +860 -260 +860 -240 +860 -220 +860 -200 +860 -180 +860 -160 +860 -140 +860 -120 +860 -100 +860 -80 +860 -60 +860 -40 +860 -20 +860 0 +860 20 +860 40 +860 60 +860 80 +860 100 +860 120 +860 140 +860 160 +860 180 +860 200 +860 220 +860 240 +860 260 +860 280 +860 300 +860 320 +860 340 +860 360 +860 380 +860 400 +860 420 +860 440 +860 460 +860 480 +860 500 +860 520 +860 540 +860 560 +860 580 +860 600 +860 620 +860 640 +860 660 +860 680 +860 700 +860 720 +860 740 +860 760 +860 780 +860 800 +860 820 +860 840 +860 860 +860 880 +860 900 +860 920 +860 940 +860 960 +860 980 +860 1000 +860 1020 +860 1040 +860 1060 +860 1080 +860 1100 +860 1120 +860 1140 +860 1160 +860 1180 +860 1200 +860 1220 +860 1240 +860 1260 +860 1280 +860 1300 +860 1320 +860 1340 +860 1360 +860 1380 +860 1400 +860 1420 +860 1440 +860 1460 +860 1480 +860 1500 +860 1520 +860 1540 +860 1560 +860 1580 +860 1600 +860 1620 +860 1640 +860 1660 +860 1680 +860 1700 +860 1720 +860 1740 +860 1760 +860 1780 +860 1800 +860 1820 +860 1840 +860 1860 +860 1880 +860 1900 +860 1920 +860 1940 +860 1960 +860 1980 +860 2000 +860 2020 +860 2040 +860 2060 +860 2080 +860 2100 +860 2120 +860 2140 +860 2160 +860 2180 +860 2200 +860 2220 +860 2240 +860 2260 +860 2280 +860 2300 +860 2320 +860 2340 +860 2360 +860 2380 +860 2400 +860 2420 +860 2440 +860 2460 +860 2480 +860 2500 +860 2520 +860 2540 +860 2560 +860 2580 +860 2600 +860 2620 +860 2640 +860 2660 +860 2680 +860 2700 +860 2720 +860 2740 +860 2760 +860 2780 +860 2800 +860 2820 +860 2840 +860 2860 +860 2880 +860 2900 +860 2920 +860 2940 +860 2960 +860 2980 +860 3000 +860 3020 +860 3040 +860 3060 +860 3080 +860 3100 +860 3120 +860 3140 +860 3160 +860 3180 +860 3200 +860 3220 +860 3240 +860 3260 +860 3280 +860 3300 +860 3320 +860 3340 +860 3360 +860 3380 +860 3400 +860 3420 +860 3440 +860 3460 +860 3480 +860 3500 +860 3520 +860 3540 +860 3560 +860 3580 +860 3600 +860 3620 +860 3640 +860 3660 +860 3680 +860 3700 +860 3720 +860 3740 +860 3760 +860 3780 +860 3800 +860 3820 +860 3840 +860 3860 +860 3880 +860 3900 +860 3920 +860 3940 +860 3960 +860 3980 +860 4000 +860 4020 +860 4040 +860 4060 +860 4080 +860 4100 +860 4120 +860 4140 +860 4160 +860 4180 +860 4200 +860 4220 +860 4240 +860 4260 +860 4280 +860 4300 +860 4320 +860 4340 +860 4360 +860 4380 +860 4400 +860 4420 +860 4440 +860 4460 +860 4480 +860 4500 +860 4520 +860 4540 +860 4560 +860 4580 +860 4600 +860 4620 +860 4640 +860 4660 +860 4680 +860 4700 +860 4720 +860 4740 +860 4760 +860 4780 +860 4800 +860 4820 +860 4840 +860 4860 +860 4880 +860 4900 +860 4920 +860 4940 +860 4960 +860 4980 +860 5000 +860 5020 +860 5040 +860 5060 +860 5080 +860 5100 +860 5120 +860 5140 +860 5160 +860 5180 +860 5200 +860 5220 +860 5240 +860 5260 +860 5280 +860 5300 +860 5320 +860 5340 +860 5360 +860 5380 +860 5400 +860 5420 +860 5440 +860 5460 +860 5480 +860 5500 +860 5520 +860 5600 +860 6520 +860 6540 +860 6560 +860 6620 +860 6640 +860 6660 +860 6680 +860 6700 +860 6720 +860 6740 +860 6760 +860 6780 +860 6800 +860 6820 +860 6840 +860 6860 +860 6880 +860 6900 +860 6920 +860 6940 +860 6960 +860 6980 +860 7000 +860 7020 +860 7040 +860 7060 +860 7080 +860 7100 +860 7120 +860 7140 +860 7160 +860 7180 +860 7200 +860 7220 +860 7240 +860 7260 +860 7280 +860 7300 +860 7320 +860 7340 +860 7360 +860 7380 +860 7400 +860 7420 +860 7440 +860 7460 +860 7480 +860 7500 +860 7520 +860 7540 +860 7560 +860 7580 +860 7600 +860 7620 +860 7640 +860 7660 +860 7680 +860 7700 +860 7720 +860 7740 +860 7760 +860 7780 +860 7800 +860 7820 +860 7840 +860 7860 +860 7880 +860 7900 +860 7920 +860 7940 +860 7960 +860 7980 +860 8000 +860 8020 +860 8040 +860 8060 +860 8080 +860 8100 +860 8120 +860 8140 +860 8160 +860 8180 +860 8200 +860 8220 +860 8240 +860 8260 +860 8280 +860 8300 +860 8320 +860 8340 +860 8360 +860 8380 +860 8400 +860 8420 +860 8440 +860 8460 +860 8480 +860 8500 +860 8520 +860 8540 +860 8560 +860 8580 +860 8600 +860 8620 +860 8640 +860 8660 +860 8680 +860 8700 +860 8720 +860 8740 +860 8760 +860 8780 +860 8800 +860 8820 +860 8840 +860 8860 +860 8880 +860 8900 +860 8920 +860 8940 +860 8960 +860 8980 +860 9000 +860 9020 +860 9040 +860 9060 +860 9080 +860 9100 +860 9120 +860 9140 +860 9160 +860 9180 +860 9200 +860 9220 +860 9240 +860 9260 +860 9280 +860 9300 +860 9320 +860 9340 +860 9360 +860 9380 +860 9400 +860 9420 +860 9440 +860 9460 +860 9480 +860 9500 +860 9520 +860 9540 +860 9560 +860 9580 +860 9600 +860 9620 +860 9640 +860 9660 +860 9680 +860 9700 +860 9720 +860 9740 +860 9760 +860 9780 +860 9800 +860 9820 +860 9840 +860 9860 +860 9880 +860 9900 +860 9920 +860 9940 +860 9960 +860 9980 +860 10000 +860 10020 +860 10040 +860 10060 +860 10080 +860 10100 +860 10120 +860 10140 +860 10160 +860 10180 +860 10200 +860 10220 +860 10240 +860 10260 +860 10280 +860 10300 +860 10320 +860 10340 +860 10360 +860 10380 +860 10400 +860 10420 +860 10440 +860 10460 +860 10480 +860 10500 +860 10520 +860 10540 +860 10560 +860 10580 +860 10600 +860 10620 +860 10640 +860 10660 +860 10680 +860 10700 +860 10720 +860 10740 +860 10760 +860 10780 +860 10800 +860 10820 +860 10840 +860 10860 +860 10880 +860 10900 +860 10920 +860 10940 +860 10960 +860 10980 +860 11000 +860 11020 +860 11040 +860 11060 +860 11080 +860 11100 +860 11120 +860 11140 +860 11160 +860 11180 +860 11200 +860 11220 +860 11240 +860 11260 +860 11280 +860 11300 +860 11320 +860 11340 +860 11360 +860 11380 +860 11400 +860 11420 +860 11440 +860 11460 +860 11480 +860 11500 +860 11520 +860 11540 +860 11560 +860 11580 +860 11600 +860 11620 +860 11640 +860 11660 +860 11680 +860 11700 +860 11720 +860 11740 +860 11760 +860 11780 +860 11800 +860 11820 +860 11840 +860 11860 +860 11880 +860 11900 +860 11920 +860 11940 +860 11960 +860 11980 +860 12000 +860 12020 +860 12040 +860 12060 +860 12080 +860 12100 +860 12120 +860 12140 +860 12160 +860 12180 +860 12200 +860 12220 +860 12240 +860 12260 +860 12280 +860 12300 +860 12320 +860 12340 +860 12360 +860 12380 +860 12400 +860 12420 +860 12440 +860 12460 +860 12480 +860 12500 +860 12520 +860 12540 +860 12560 +860 12580 +860 12600 +860 12620 +860 12640 +860 12660 +860 12680 +860 12700 +860 12720 +860 12740 +860 12760 +860 12780 +860 12800 +860 12820 +860 12840 +860 12860 +860 12880 +860 12900 +860 12920 +860 12940 +860 12960 +860 12980 +860 13000 +860 13020 +860 13040 +860 13060 +860 13080 +860 13100 +860 13120 +860 13140 +860 13160 +860 13180 +860 13200 +860 13220 +860 13240 +860 13260 +860 13280 +860 13300 +860 13320 +860 13340 +860 13360 +860 13380 +860 13400 +860 13420 +860 13440 +860 13460 +860 13480 +860 13500 +860 13520 +860 13540 +860 13560 +860 13580 +860 13600 +860 13620 +860 13640 +860 13660 +860 13680 +860 13700 +860 13720 +860 13740 +860 13760 +860 13780 +860 13800 +860 13820 +860 13840 +860 13860 +860 13880 +860 13900 +860 14780 +860 14800 +860 14820 +860 14840 +860 14860 +860 14880 +860 14940 +860 14980 +860 15080 +860 15120 +860 15180 +860 15220 +860 15240 +860 15280 +860 15320 +860 15520 +860 15660 +860 15700 +860 15760 +860 16040 +860 16080 +860 16400 +860 16460 +860 16540 +860 16720 +860 16760 +860 16800 +860 16860 +860 17140 +860 17220 +860 17320 +860 17460 +860 17540 +860 17760 +860 17800 +860 18080 +860 18180 +860 18640 +860 19220 +860 19280 +860 19300 +860 19320 +860 19340 +860 19360 +880 -18280 +880 -18260 +880 -17040 +880 -17020 +880 -17000 +880 -14720 +880 -14700 +880 -14660 +880 -13800 +880 -13780 +880 -13760 +880 -13740 +880 -13720 +880 -11540 +880 -11520 +880 -11500 +880 -10780 +880 -10760 +880 -6480 +880 -6460 +880 -6440 +880 -6380 +880 -6340 +880 -6240 +880 -6180 +880 -6100 +880 -6080 +880 -6040 +880 -6020 +880 -6000 +880 -5980 +880 -5960 +880 -5940 +880 -5920 +880 -5900 +880 -5880 +880 -5860 +880 -5840 +880 -5800 +880 -5780 +880 -5720 +880 -5700 +880 -5680 +880 -5660 +880 -5640 +880 -5620 +880 -5600 +880 -5580 +880 -5560 +880 -5520 +880 -5500 +880 -5480 +880 -5460 +880 -5440 +880 -5420 +880 -5400 +880 -5380 +880 -5340 +880 -5320 +880 -5300 +880 -5280 +880 -5260 +880 -5220 +880 -5200 +880 -5160 +880 -5140 +880 -5100 +880 -5080 +880 -5060 +880 -5020 +880 -5000 +880 -4980 +880 -4960 +880 -4940 +880 -4900 +880 -4880 +880 -4860 +880 -4840 +880 -4820 +880 -4780 +880 -4720 +880 -4680 +880 -4660 +880 -4620 +880 -4600 +880 -4580 +880 -4540 +880 -4500 +880 -4460 +880 -4440 +880 -4420 +880 -4400 +880 -4380 +880 -4360 +880 -4340 +880 -4320 +880 -4300 +880 -4280 +880 -4260 +880 -4240 +880 -4200 +880 -4180 +880 -4160 +880 -4140 +880 -4120 +880 -4100 +880 -4080 +880 -4060 +880 -4040 +880 -4020 +880 -4000 +880 -3980 +880 -3960 +880 -3940 +880 -3920 +880 -3900 +880 -3880 +880 -3860 +880 -3840 +880 -3820 +880 -2760 +880 -2740 +880 -2720 +880 -2700 +880 -2680 +880 -2660 +880 -2640 +880 -2620 +880 -2600 +880 -2580 +880 -2560 +880 -2540 +880 -2520 +880 -2500 +880 -2480 +880 -2460 +880 -2420 +880 -2400 +880 -2380 +880 -2360 +880 -2340 +880 -2320 +880 -2300 +880 -2280 +880 -2260 +880 -2240 +880 -2220 +880 -2200 +880 -2180 +880 -2160 +880 -2140 +880 -2120 +880 -2100 +880 -2080 +880 -2060 +880 -2040 +880 -2020 +880 -2000 +880 -1980 +880 -1960 +880 -1940 +880 -1920 +880 -1900 +880 -1880 +880 -1860 +880 -1840 +880 -1820 +880 -1800 +880 -1780 +880 -1760 +880 -1740 +880 -1720 +880 -1700 +880 -1680 +880 -1660 +880 -1640 +880 -1620 +880 -1600 +880 -1580 +880 -1560 +880 -1540 +880 -1520 +880 -1500 +880 -1480 +880 -1460 +880 -1440 +880 -1420 +880 -1400 +880 -1380 +880 -1360 +880 -1340 +880 -1320 +880 -1300 +880 -1280 +880 -1260 +880 -1240 +880 -1220 +880 -1200 +880 -1180 +880 -1160 +880 -1140 +880 -1120 +880 -1100 +880 -1080 +880 -1060 +880 -1040 +880 -1020 +880 -980 +880 -960 +880 -940 +880 -920 +880 -900 +880 -880 +880 -860 +880 -840 +880 -820 +880 -800 +880 -780 +880 -760 +880 -740 +880 -720 +880 -700 +880 -680 +880 -660 +880 -640 +880 -620 +880 -600 +880 -580 +880 -560 +880 -540 +880 -520 +880 -500 +880 -480 +880 -460 +880 -440 +880 -420 +880 -400 +880 -380 +880 -360 +880 -340 +880 -320 +880 -300 +880 -280 +880 -260 +880 -240 +880 -220 +880 -200 +880 -180 +880 -160 +880 -140 +880 -120 +880 -100 +880 -80 +880 -60 +880 -40 +880 -20 +880 0 +880 20 +880 40 +880 60 +880 80 +880 100 +880 120 +880 140 +880 160 +880 180 +880 200 +880 220 +880 240 +880 260 +880 280 +880 300 +880 320 +880 340 +880 360 +880 380 +880 400 +880 420 +880 440 +880 460 +880 480 +880 500 +880 520 +880 540 +880 560 +880 580 +880 600 +880 620 +880 640 +880 660 +880 680 +880 700 +880 720 +880 740 +880 760 +880 780 +880 800 +880 820 +880 840 +880 860 +880 880 +880 900 +880 920 +880 940 +880 960 +880 980 +880 1000 +880 1020 +880 1040 +880 1060 +880 1080 +880 1100 +880 1120 +880 1140 +880 1160 +880 1180 +880 1200 +880 1220 +880 1240 +880 1260 +880 1280 +880 1300 +880 1320 +880 1340 +880 1360 +880 1380 +880 1400 +880 1420 +880 1440 +880 1460 +880 1480 +880 1500 +880 1520 +880 1540 +880 1560 +880 1580 +880 1600 +880 1620 +880 1640 +880 1660 +880 1680 +880 1700 +880 1720 +880 1740 +880 1760 +880 1780 +880 1800 +880 1820 +880 1840 +880 1860 +880 1880 +880 1900 +880 1920 +880 1940 +880 1960 +880 1980 +880 2000 +880 2020 +880 2040 +880 2060 +880 2080 +880 2100 +880 2120 +880 2140 +880 2160 +880 2180 +880 2200 +880 2220 +880 2240 +880 2260 +880 2280 +880 2300 +880 2320 +880 2340 +880 2360 +880 2380 +880 2400 +880 2420 +880 2440 +880 2460 +880 2480 +880 2500 +880 2520 +880 2540 +880 2560 +880 2580 +880 2600 +880 2620 +880 2640 +880 2660 +880 2680 +880 2700 +880 2720 +880 2740 +880 2760 +880 2780 +880 2800 +880 2820 +880 2840 +880 2860 +880 2880 +880 2900 +880 2920 +880 2940 +880 2960 +880 2980 +880 3000 +880 3020 +880 3040 +880 3060 +880 3080 +880 3100 +880 3120 +880 3140 +880 3160 +880 3180 +880 3200 +880 3220 +880 3240 +880 3260 +880 3280 +880 3300 +880 3320 +880 3340 +880 3360 +880 3380 +880 3400 +880 3420 +880 3440 +880 3460 +880 3480 +880 3500 +880 3520 +880 3540 +880 3560 +880 3580 +880 3600 +880 3620 +880 3640 +880 3660 +880 3680 +880 3700 +880 3720 +880 3740 +880 3760 +880 3780 +880 3800 +880 3820 +880 3840 +880 3860 +880 3880 +880 3900 +880 3920 +880 3940 +880 3960 +880 3980 +880 4000 +880 4020 +880 4040 +880 4060 +880 4080 +880 4100 +880 4120 +880 4140 +880 4160 +880 4180 +880 4200 +880 4220 +880 4240 +880 4260 +880 4280 +880 4300 +880 4320 +880 4340 +880 4360 +880 4380 +880 4400 +880 4420 +880 4440 +880 4460 +880 4480 +880 4500 +880 4520 +880 4540 +880 4560 +880 4580 +880 4600 +880 4620 +880 4640 +880 4660 +880 4680 +880 4700 +880 4720 +880 4740 +880 4760 +880 4780 +880 4800 +880 4820 +880 4840 +880 4860 +880 4880 +880 4900 +880 4920 +880 4940 +880 4960 +880 4980 +880 5000 +880 5020 +880 5040 +880 5060 +880 5080 +880 5100 +880 5120 +880 5140 +880 5160 +880 5180 +880 5200 +880 5220 +880 5240 +880 5260 +880 5280 +880 5300 +880 5320 +880 5340 +880 5360 +880 5380 +880 5400 +880 5420 +880 5440 +880 5460 +880 5480 +880 5500 +880 5520 +880 5540 +880 5560 +880 5580 +880 5600 +880 6520 +880 6540 +880 6560 +880 6580 +880 6600 +880 6620 +880 6640 +880 6660 +880 6680 +880 6700 +880 6740 +880 6760 +880 6780 +880 6800 +880 6820 +880 6840 +880 6860 +880 6880 +880 6900 +880 6920 +880 6940 +880 6960 +880 6980 +880 7000 +880 7060 +880 7080 +880 7100 +880 7120 +880 7140 +880 7160 +880 7180 +880 7200 +880 7220 +880 7240 +880 7260 +880 7280 +880 7300 +880 7320 +880 7360 +880 7380 +880 7400 +880 7420 +880 7440 +880 7460 +880 7480 +880 7500 +880 7520 +880 7540 +880 7560 +880 7580 +880 7600 +880 7620 +880 7640 +880 7660 +880 7680 +880 7700 +880 7720 +880 7740 +880 7760 +880 7780 +880 7800 +880 7820 +880 7840 +880 7860 +880 7880 +880 7900 +880 7920 +880 7940 +880 7960 +880 7980 +880 8000 +880 8020 +880 8040 +880 8060 +880 8080 +880 8100 +880 8120 +880 8140 +880 8160 +880 8200 +880 8220 +880 8240 +880 8260 +880 8280 +880 8300 +880 8320 +880 8340 +880 8360 +880 8380 +880 8400 +880 8420 +880 8440 +880 8460 +880 8480 +880 8500 +880 8520 +880 8540 +880 8560 +880 8580 +880 8600 +880 8620 +880 8640 +880 8660 +880 8680 +880 8740 +880 8760 +880 8780 +880 8800 +880 8820 +880 8840 +880 8860 +880 8880 +880 8900 +880 8920 +880 8940 +880 8960 +880 8980 +880 9000 +880 9020 +880 9060 +880 9080 +880 9100 +880 9120 +880 9140 +880 9160 +880 9180 +880 9200 +880 9220 +880 9260 +880 9280 +880 9300 +880 9320 +880 9340 +880 9360 +880 9380 +880 9440 +880 9460 +880 9480 +880 9500 +880 9520 +880 9540 +880 9560 +880 9580 +880 9600 +880 9620 +880 9640 +880 9660 +880 9680 +880 9700 +880 9720 +880 9740 +880 9760 +880 9780 +880 9800 +880 9840 +880 9860 +880 9880 +880 9900 +880 9920 +880 9940 +880 9960 +880 9980 +880 10000 +880 10020 +880 10040 +880 10080 +880 10100 +880 10140 +880 10160 +880 10220 +880 10240 +880 10260 +880 10280 +880 10300 +880 10360 +880 10380 +880 10420 +880 10440 +880 10480 +880 10500 +880 10520 +880 10560 +880 10620 +880 10640 +880 10680 +880 10700 +880 10780 +880 10820 +880 10860 +880 10880 +880 10920 +880 10940 +880 10960 +880 10980 +880 11020 +880 11040 +880 11060 +880 11080 +880 11120 +880 11140 +880 11160 +880 11180 +880 11220 +880 11280 +880 11300 +880 11320 +880 11360 +880 11380 +880 11440 +880 11460 +880 11480 +880 11520 +880 11560 +880 11580 +880 11620 +880 11640 +880 11680 +880 11700 +880 11740 +880 11780 +880 11800 +880 11820 +880 11840 +880 11880 +880 11900 +880 11960 +880 11980 +880 12020 +880 12100 +880 12120 +880 12160 +880 12240 +880 12360 +880 12380 +880 12400 +880 13820 +880 13840 +880 13860 +880 13880 +880 19220 +880 19240 +880 19300 +880 19320 +880 19340 +900 -18280 +900 -18260 +900 -17060 +900 -17040 +900 -17020 +900 -17000 +900 -14680 +900 -14640 +900 -13800 +900 -13780 +900 -13760 +900 -13740 +900 -11520 +900 -11500 +900 -11480 +900 -10780 +900 -10760 +900 -5760 +900 -5040 +900 -4400 +900 -4360 +900 -4200 +900 -4160 +900 -4060 +900 -4000 +900 -3960 +900 -3920 +900 -3900 +900 -3880 +900 -2740 +900 -2720 +900 -2400 +900 -2320 +900 -2300 +900 -1640 +900 -920 +900 -900 +900 -740 +900 -720 +900 -100 +900 -40 +900 100 +900 140 +900 280 +900 400 +900 560 +900 580 +900 680 +900 720 +900 740 +900 900 +900 960 +900 1020 +900 1040 +900 1140 +900 1160 +900 1220 +900 1340 +900 1440 +900 1460 +900 1560 +900 1620 +900 1640 +900 1660 +900 1800 +900 1860 +900 1880 +900 1940 +900 1980 +900 2040 +900 2100 +900 2160 +900 2260 +900 2320 +900 2420 +900 2440 +900 2540 +900 2560 +900 2600 +900 2740 +900 2780 +900 2800 +900 2840 +900 2860 +900 2880 +900 3000 +900 3020 +900 3180 +900 3200 +900 3380 +900 3440 +900 3560 +900 3680 +900 3740 +900 3900 +900 3960 +900 3980 +900 4020 +900 4180 +900 4260 +900 4280 +900 4360 +900 4380 +900 4480 +900 4600 +900 4720 +900 5040 +900 5300 +900 5340 +900 5360 +900 5380 +900 5400 +900 5420 +900 5440 +900 5500 +900 5520 +900 5580 +900 5600 +900 6560 +900 6620 +900 6660 +900 6680 +900 6700 +900 6760 +900 7000 +900 7180 +900 7220 +900 7400 +900 7720 +900 7740 +900 7760 +900 7840 +900 7980 +900 8000 +900 8040 +900 8160 +900 8740 +900 8900 +900 9020 +900 9100 +900 9440 +900 9740 +900 10100 +900 10200 +900 10260 +900 10320 +900 10400 +900 10420 +900 10580 +900 13840 +900 19220 +900 19240 +900 19340 +900 22100 +900 22180 +900 22200 +920 -26900 +920 -17040 +920 -17020 +920 -17000 +920 -14720 +920 -14700 +920 -13800 +920 -13780 +920 -13760 +920 -13740 +920 -11520 +920 -11480 +920 -11460 +920 -10800 +920 -10780 +920 -10760 +920 19220 +920 19240 +920 19320 +920 19360 +940 -26900 +940 -18320 +940 -18300 +940 -17060 +940 -17040 +940 -17020 +940 -17000 +940 -14700 +940 -14660 +940 -14200 +940 -13840 +940 -13820 +940 -13800 +940 -13780 +940 -11460 +940 -11440 +940 -11420 +940 -10780 +940 -10760 +940 19220 +940 19240 +940 19340 +940 22040 +940 22120 +940 22160 +960 -26900 +960 -18340 +960 -18300 +960 -17060 +960 -17020 +960 -14720 +960 -14700 +960 -14680 +960 -14660 +960 -14060 +960 -13880 +960 -13840 +960 -13820 +960 -13800 +960 -13780 +960 -11460 +960 -11440 +960 -11420 +960 -11400 +960 -10780 +960 19180 +960 19200 +960 19220 +960 19240 +960 19280 +960 22020 +960 22240 +980 -17040 +980 -17020 +980 -17000 +980 -14820 +980 -14780 +980 -14760 +980 -14700 +980 -14120 +980 -14100 +980 -13920 +980 -13900 +980 -13880 +980 -13860 +980 -13840 +980 -13820 +980 -11420 +980 -11400 +980 -11380 +980 -10780 +980 -10760 +980 -10740 +980 19160 +980 19180 +980 19200 +980 19280 +980 22020 +980 22040 +1000 -26900 +1000 -18340 +1000 -17060 +1000 -17040 +1000 -17020 +1000 -17000 +1000 -14680 +1000 -14660 +1000 -14060 +1000 -14040 +1000 -14020 +1000 -13960 +1000 -13940 +1000 -13920 +1000 -13900 +1000 -13880 +1000 -13860 +1000 -11420 +1000 -11380 +1000 -11360 +1000 -11340 +1000 -10780 +1000 -10760 +1000 19160 +1000 19180 +1000 19200 +1000 21960 +1020 -18340 +1020 -18320 +1020 -17020 +1020 -17000 +1020 -13980 +1020 -13960 +1020 -13940 +1020 -13920 +1020 -11380 +1020 -11360 +1020 -11340 +1020 -11320 +1020 -10800 +1020 -10780 +1020 -10760 +1020 19140 +1020 19160 +1020 19180 +1020 22000 +1040 -26900 +1040 -17060 +1040 -17040 +1040 -17020 +1040 -17000 +1040 -11340 +1040 -11320 +1040 -11300 +1040 -10980 +1040 -10780 +1040 -10760 +1040 19140 +1040 19160 +1040 19180 +1040 19200 +1040 19220 +1040 22020 +1060 -18340 +1060 -18140 +1060 -17060 +1060 -17020 +1060 -17000 +1060 -11340 +1060 -11300 +1060 -11280 +1060 -10780 +1060 -10760 +1060 19160 +1060 19180 +1060 19200 +1060 19220 +1060 19240 +1060 19260 +1080 -26900 +1080 -18280 +1080 -18100 +1080 -17060 +1080 -17040 +1080 -17020 +1080 -17000 +1080 -14540 +1080 -11280 +1080 -11260 +1080 -10780 +1080 -10760 +1080 -10740 +1080 19200 +1080 19220 +1080 19240 +1080 19260 +1080 22020 +1100 -26900 +1100 -17020 +1100 -17000 +1100 -14580 +1100 -14560 +1100 -11280 +1100 -11260 +1100 -11240 +1100 -11220 +1100 -10780 +1100 -10760 +1100 19220 +1100 19240 +1100 19260 +1120 -26900 +1120 -18320 +1120 -18100 +1120 -17040 +1120 -17020 +1120 -17000 +1120 -11240 +1120 -11220 +1120 -11200 +1120 -10940 +1120 -10780 +1120 -10760 +1120 19220 +1120 19240 +1120 19260 +1120 19280 +1120 21900 +1120 21940 +1120 22000 +1120 22040 +1120 22100 +1140 -24480 +1140 -24460 +1140 -18420 +1140 -18160 +1140 -17060 +1140 -17040 +1140 -17020 +1140 -17000 +1140 -11220 +1140 -11200 +1140 -11180 +1140 -10800 +1140 -10780 +1140 -10760 +1140 -10740 +1140 19220 +1140 19240 +1140 19260 +1140 21940 +1140 21960 +1160 -26900 +1160 -25360 +1160 -24600 +1160 -24540 +1160 -24500 +1160 -24480 +1160 -24460 +1160 -17060 +1160 -17040 +1160 -17020 +1160 -17000 +1160 -11180 +1160 -11160 +1160 -10780 +1160 -10760 +1160 19180 +1160 19200 +1160 19220 +1160 19240 +1160 19260 +1160 19280 +1160 19300 +1160 21920 +1180 -26900 +1180 -25340 +1180 -24680 +1180 -24520 +1180 -24480 +1180 -23960 +1180 -23580 +1180 -23560 +1180 -23520 +1180 -23500 +1180 -18340 +1180 -18320 +1180 -17060 +1180 -17040 +1180 -17020 +1180 -17000 +1180 -11180 +1180 -11160 +1180 -11140 +1180 -11120 +1180 -10780 +1180 -10760 +1180 19200 +1180 19220 +1180 19240 +1180 19280 +1180 21920 +1180 21940 +1180 23200 +1200 -26900 +1200 -25360 +1200 -24480 +1200 -24460 +1200 -23980 +1200 -23960 +1200 -23940 +1200 -23900 +1200 -23880 +1200 -23860 +1200 -23840 +1200 -23820 +1200 -23800 +1200 -23760 +1200 -23740 +1200 -23700 +1200 -23680 +1200 -23640 +1200 -23600 +1200 -23560 +1200 -23540 +1200 -23520 +1200 -23500 +1200 -18340 +1200 -17020 +1200 -17000 +1200 -11160 +1200 -11140 +1200 -11120 +1200 -11100 +1200 -11060 +1200 -10800 +1200 -10780 +1200 -10760 +1200 19200 +1200 19220 +1200 19240 +1200 19260 +1200 19280 +1220 -26900 +1220 -25360 +1220 -24660 +1220 -24500 +1220 -24460 +1220 -24020 +1220 -23960 +1220 -23940 +1220 -23900 +1220 -23880 +1220 -23840 +1220 -23820 +1220 -23780 +1220 -23760 +1220 -23720 +1220 -23700 +1220 -23680 +1220 -23660 +1220 -23640 +1220 -23500 +1220 -23480 +1220 -18400 +1220 -18340 +1220 -17020 +1220 -17000 +1220 -11140 +1220 -11120 +1220 -11100 +1220 -11080 +1220 -10960 +1220 -10920 +1220 -10780 +1220 -10760 +1220 -10740 +1220 19200 +1220 19220 +1240 -25360 +1240 -24780 +1240 -24460 +1240 -23540 +1240 -23500 +1240 -18400 +1240 -18380 +1240 -17040 +1240 -17000 +1240 -11120 +1240 -11100 +1240 -11080 +1240 -11060 +1240 -11040 +1240 -10780 +1240 -10760 +1240 -10740 +1240 19160 +1240 19200 +1240 19220 +1260 -26900 +1260 -25360 +1260 -24840 +1260 -24480 +1260 -24460 +1260 -23500 +1260 -23480 +1260 -17040 +1260 -11080 +1260 -11060 +1260 -11040 +1260 -11020 +1260 -10980 +1260 -10780 +1260 -10760 +1260 -10740 +1260 19160 +1260 19180 +1280 -24840 +1280 -24460 +1280 -24440 +1280 -23500 +1280 -23480 +1280 -18800 +1280 -18740 +1280 -18340 +1280 -17040 +1280 -17020 +1280 -17000 +1280 -11060 +1280 -11040 +1280 -11020 +1280 -11000 +1280 -10980 +1280 -10940 +1280 -10920 +1280 -10900 +1280 -10880 +1280 -10860 +1280 -10840 +1280 -10800 +1280 -10780 +1280 -10760 +1280 -10740 +1280 19140 +1280 19160 +1280 19180 +1300 -26900 +1300 -25340 +1300 -24900 +1300 -24440 +1300 -23500 +1300 -23480 +1300 -18720 +1300 -11040 +1300 -11020 +1300 -11000 +1300 -10980 +1300 -10960 +1300 -10940 +1300 -10920 +1300 -10900 +1300 -10880 +1300 -10860 +1300 -10840 +1300 -10820 +1300 -10800 +1300 -10780 +1300 -10760 +1300 -10740 +1300 19120 +1300 19140 +1300 19160 +1300 19180 +1320 -25340 +1320 -24460 +1320 -23500 +1320 -23480 +1320 -17000 +1320 -11020 +1320 -11000 +1320 -10980 +1320 -10960 +1320 -10940 +1320 -10920 +1320 -10900 +1320 -10880 +1320 -10860 +1320 -10840 +1320 -10820 +1320 -10800 +1320 -10780 +1320 -10760 +1320 -10740 +1320 19140 +1320 19160 +1320 19180 +1320 19200 +1320 21980 +1340 -26900 +1340 -25340 +1340 -24460 +1340 -23500 +1340 -23480 +1340 -18320 +1340 -17040 +1340 -17020 +1340 -17000 +1340 -10960 +1340 -10940 +1340 -10920 +1340 -10900 +1340 19140 +1340 19160 +1340 19180 +1340 19200 +1360 -26900 +1360 -25340 +1360 -25000 +1360 -24460 +1360 -24440 +1360 -23500 +1360 -23480 +1360 -18360 +1360 -17060 +1360 -17000 +1360 19160 +1360 19180 +1360 19200 +1360 19220 +1380 -26900 +1380 -25340 +1380 -24460 +1380 -24420 +1380 -23500 +1380 -23480 +1380 -18360 +1380 -17000 +1380 19160 +1380 19180 +1380 19200 +1380 19220 +1380 19240 +1400 -26900 +1400 -25340 +1400 -24400 +1400 -23500 +1400 -23480 +1400 -18420 +1400 19180 +1400 19200 +1400 19220 +1400 19240 +1400 21780 +1420 -25340 +1420 -24460 +1420 -23500 +1420 -23480 +1420 -18260 +1420 -17040 +1420 -17020 +1420 -17000 +1420 19220 +1420 19240 +1420 21780 +1420 21800 +1440 -26900 +1440 -23500 +1440 -23480 +1440 -18120 +1440 -17000 +1440 19220 +1460 -26900 +1460 -25340 +1460 -23520 +1460 -23500 +1460 -23480 +1460 -18400 +1460 -17040 +1460 -17020 +1460 19200 +1460 19220 +1460 21780 +1480 -26900 +1480 -25340 +1480 -23500 +1480 -23480 +1480 -20820 +1480 -20800 +1480 -20780 +1480 -20760 +1480 -20740 +1480 -20720 +1480 -20660 +1480 -20460 +1480 -20440 +1480 -20200 +1480 -20140 +1480 -18400 +1480 -17000 +1480 19180 +1480 19200 +1480 19220 +1480 21740 +1480 21820 +1480 21840 +1480 21940 +1500 -26900 +1500 -25340 +1500 -23500 +1500 -23480 +1500 -20820 +1500 -20800 +1500 -20780 +1500 -20760 +1500 -20740 +1500 -20720 +1500 -20700 +1500 -20680 +1500 -20660 +1500 -20640 +1500 -20620 +1500 -20600 +1500 -20580 +1500 -20560 +1500 -20540 +1500 -20520 +1500 -20500 +1500 -20480 +1500 -20460 +1500 -20440 +1500 -20420 +1500 -20400 +1500 -20380 +1500 -20360 +1500 -20340 +1500 -20320 +1500 -20300 +1500 -20280 +1500 -20260 +1500 -20240 +1500 -20220 +1500 -20200 +1500 -20180 +1500 -20160 +1500 -20140 +1500 -20120 +1500 -20100 +1500 -20080 +1500 -20060 +1500 -20040 +1500 -20020 +1500 -20000 +1500 -19980 +1500 -19960 +1500 -19940 +1500 -19920 +1500 -18380 +1500 -17040 +1500 -17000 +1500 19160 +1500 19180 +1500 19200 +1500 21740 +1500 21780 +1500 21860 +1520 -25360 +1520 -23500 +1520 -23480 +1520 -20900 +1520 -20880 +1520 -20820 +1520 -20800 +1520 -19900 +1520 -18380 +1520 -17000 +1520 -13520 +1520 -13500 +1520 -13480 +1520 -13460 +1520 -13440 +1520 19140 +1520 19160 +1520 19180 +1520 21980 +1520 22020 +1520 22040 +1540 -26900 +1540 -23500 +1540 -23480 +1540 -20960 +1540 -20940 +1540 -20920 +1540 -20900 +1540 -20880 +1540 -20860 +1540 -20840 +1540 -20820 +1540 -20800 +1540 -18400 +1540 -17060 +1540 -17040 +1540 -17020 +1540 -17000 +1540 -13520 +1540 -13500 +1540 -13460 +1540 19140 +1540 19160 +1540 19180 +1540 22020 +1540 22060 +1560 -26900 +1560 -26880 +1560 -25340 +1560 -23500 +1560 -23480 +1560 -20980 +1560 -20960 +1560 -20940 +1560 -20820 +1560 -20800 +1560 -20780 +1560 -18380 +1560 -17020 +1560 -17000 +1560 -13540 +1560 -13520 +1560 -13480 +1560 -13220 +1560 19140 +1560 19160 +1580 -24680 +1580 -23500 +1580 -20980 +1580 -20960 +1580 -20800 +1580 -20760 +1580 -18380 +1580 -17060 +1580 -13540 +1580 -13520 +1580 -13200 +1580 19140 +1580 19160 +1580 22060 +1580 24520 +1600 -26900 +1600 -23500 +1600 -20980 +1600 -20960 +1600 -20940 +1600 -20780 +1600 -18400 +1600 -18380 +1600 -17000 +1600 -13520 +1600 -13240 +1600 -13220 +1600 -13200 +1600 19120 +1600 19140 +1600 19160 +1620 -24740 +1620 -23520 +1620 -23500 +1620 -20960 +1620 -20940 +1620 -20740 +1620 -18380 +1620 -17000 +1620 -13540 +1620 19120 +1620 19140 +1620 19160 +1640 -23500 +1640 -20960 +1640 -20940 +1640 -20740 +1640 -18380 +1640 -17060 +1640 19120 +1640 19140 +1640 19160 +1660 -26900 +1660 -23520 +1660 -23500 +1660 -20960 +1660 -20940 +1660 -20660 +1660 -18400 +1660 -18380 +1660 -18220 +1660 -17000 +1660 -13520 +1660 -13200 +1660 19120 +1660 19140 +1660 19160 +1680 -23520 +1680 -23500 +1680 -20960 +1680 -20940 +1680 -18560 +1680 -17040 +1680 -17000 +1680 -13520 +1680 -13220 +1680 -13200 +1680 19140 +1680 19160 +1680 19180 +1700 -26900 +1700 -23520 +1700 -23500 +1700 -20980 +1700 -20960 +1700 -20940 +1700 -13520 +1700 -13500 +1700 -13240 +1700 -13200 +1700 19160 +1700 19180 +1700 19200 +1720 -23520 +1720 -23500 +1720 -20960 +1720 -20940 +1720 -18400 +1720 -13520 +1720 -13500 +1720 19160 +1720 19180 +1720 19200 +1720 21860 +1740 -23520 +1740 -23500 +1740 -20960 +1740 -20940 +1740 -18500 +1740 -18380 +1740 -17000 +1740 -13520 +1740 -13500 +1740 19160 +1740 19180 +1740 19200 +1740 21760 +1760 -23520 +1760 -23500 +1760 -20960 +1760 -20940 +1760 -17000 +1760 -13520 +1760 -13500 +1760 19180 +1760 19200 +1760 21780 +1780 -23520 +1780 -23500 +1780 -20980 +1780 -20960 +1780 -20940 +1780 -18460 +1780 -18440 +1780 -13600 +1780 -13580 +1780 -13540 +1780 -13520 +1780 -13500 +1780 19180 +1780 19200 +1800 -23520 +1800 -23500 +1800 -20960 +1800 -20940 +1800 -18420 +1800 -13600 +1800 -13560 +1800 -13540 +1800 -13520 +1800 19160 +1800 19180 +1800 19200 +1820 -23520 +1820 -23500 +1820 -20980 +1820 -20960 +1820 -20940 +1820 -17000 +1820 19160 +1820 19180 +1820 19200 +1820 24400 +1840 -23520 +1840 -23500 +1840 -20960 +1840 -20940 +1840 -13980 +1840 -13960 +1840 19160 +1840 19180 +1840 19200 +1840 19220 +1840 19240 +1840 24400 +1860 -23540 +1860 -23520 +1860 -23500 +1860 -20960 +1860 -20940 +1860 -18840 +1860 -18440 +1860 -18420 +1860 -17000 +1860 -13980 +1860 -13960 +1860 -13940 +1860 19120 +1860 19160 +1860 19180 +1860 19200 +1860 19220 +1860 19240 +1860 24420 +1880 -23520 +1880 -23500 +1880 -20980 +1880 -20960 +1880 -20940 +1880 -18420 +1880 -13940 +1880 -13920 +1880 -13900 +1880 -13880 +1880 -13860 +1880 19140 +1880 19160 +1880 19180 +1880 24420 +1900 -23540 +1900 -23520 +1900 -20980 +1900 -20960 +1900 -20940 +1900 -13900 +1900 -13880 +1900 -13860 +1900 -13840 +1900 19140 +1900 19160 +1900 19180 +1920 -25100 +1920 -25080 +1920 -25060 +1920 -25020 +1920 -25000 +1920 -24960 +1920 -24920 +1920 -24860 +1920 -23520 +1920 -23500 +1920 -20980 +1920 -20960 +1920 -18800 +1920 -18620 +1920 -18460 +1920 -18440 +1920 -13880 +1920 -13860 +1920 19160 +1920 19180 +1940 -23580 +1940 -23540 +1940 -23520 +1940 -20960 +1940 -20940 +1940 -19260 +1940 -19240 +1940 -19160 +1940 -19140 +1940 -19120 +1940 -19080 +1940 -19000 +1940 -18980 +1940 -18900 +1940 -18840 +1940 -18620 +1940 -18580 +1940 -18480 +1940 -18420 +1940 -17000 +1940 -13860 +1940 -13840 +1940 19160 +1940 19180 +1940 19200 +1960 -23580 +1960 -23540 +1960 -23520 +1960 -20960 +1960 -20940 +1960 -13860 +1960 -13840 +1960 -13800 +1960 19160 +1960 19180 +1960 19200 +1960 19220 +1980 -23580 +1980 -23540 +1980 -20960 +1980 -20940 +1980 -13840 +1980 -13800 +1980 19200 +1980 19220 +1980 19240 +2000 -23560 +2000 -23540 +2000 -23520 +2000 -23500 +2000 -20960 +2000 -20940 +2000 -19080 +2000 -19040 +2000 -13840 +2000 -13820 +2000 -13800 +2000 19200 +2000 19220 +2000 19240 +2020 -23600 +2020 -23580 +2020 -23560 +2020 -23540 +2020 -23520 +2020 -23500 +2020 -23480 +2020 -20980 +2020 -20960 +2020 -20940 +2020 -18880 +2020 -13840 +2020 -13820 +2020 -13800 +2020 19220 +2020 19240 +2020 23620 +2040 -23500 +2040 -23480 +2040 -23460 +2040 -20960 +2040 -20940 +2040 -18880 +2040 -13840 +2040 -13820 +2040 -13800 +2040 19220 +2040 19240 +2060 -23500 +2060 -23480 +2060 -20980 +2060 -20960 +2060 -20940 +2060 -19780 +2060 -19760 +2060 -19720 +2060 -19620 +2060 -13840 +2060 -13820 +2060 -13800 +2060 19220 +2060 19240 +2060 19260 +2060 22000 +2080 -23500 +2080 -23480 +2080 -20980 +2080 -20960 +2080 -20940 +2080 -19840 +2080 -19800 +2080 -19780 +2080 -19760 +2080 -19740 +2080 -19720 +2080 -19700 +2080 -19680 +2080 -19660 +2080 -13840 +2080 -13820 +2080 -13800 +2080 19200 +2080 19220 +2080 19240 +2080 19280 +2080 21940 +2100 -23500 +2100 -23480 +2100 -20960 +2100 -19760 +2100 -19700 +2100 -19620 +2100 -13840 +2100 -13820 +2100 -13800 +2100 19220 +2100 19240 +2100 19260 +2100 21960 +2120 -23500 +2120 -23480 +2120 -20980 +2120 -20960 +2120 -20940 +2120 -19620 +2120 -13860 +2120 -13840 +2120 -13820 +2120 -13800 +2120 19180 +2120 19200 +2120 19220 +2120 19240 +2120 19260 +2120 21940 +2120 21960 +2140 -23500 +2140 -23480 +2140 -20960 +2140 -20940 +2140 -19940 +2140 -19620 +2140 -13860 +2140 -13840 +2140 -13820 +2140 -13800 +2140 19180 +2140 19200 +2140 19220 +2140 21880 +2140 21940 +2160 -23500 +2160 -23480 +2160 -20960 +2160 -20940 +2160 -19940 +2160 -19620 +2160 -18880 +2160 -13860 +2160 -13840 +2160 -13820 +2160 -13800 +2160 19160 +2160 19180 +2160 19200 +2160 19220 +2160 21940 +2180 -23500 +2180 -23480 +2180 -20980 +2180 -20960 +2180 -20940 +2180 -20000 +2180 -19980 +2180 -19620 +2180 -18880 +2180 -13860 +2180 -13840 +2180 -13820 +2180 -13800 +2180 19160 +2180 19180 +2180 19200 +2180 19220 +2200 -23500 +2200 -23480 +2200 -20960 +2200 -20940 +2200 -20080 +2200 -20060 +2200 -20040 +2200 -20020 +2200 -19620 +2200 -18880 +2200 -13900 +2200 -13880 +2200 -13860 +2200 -13840 +2200 19160 +2200 19180 +2200 19200 +2200 19240 +2220 -23500 +2220 -23480 +2220 -20960 +2220 -20940 +2220 -20100 +2220 -19620 +2220 -13920 +2220 -13900 +2220 -13880 +2220 -13860 +2220 -10880 +2220 -10860 +2220 -10840 +2220 -10820 +2220 -10800 +2220 -10780 +2220 -10760 +2220 -10740 +2220 19160 +2220 19180 +2240 -23500 +2240 -23480 +2240 -20980 +2240 -20960 +2240 -20700 +2240 -20200 +2240 -20180 +2240 -20160 +2240 -19620 +2240 -18880 +2240 -13940 +2240 -13920 +2240 -13900 +2240 -13880 +2240 -10920 +2240 -10900 +2240 -10880 +2240 -10860 +2240 -10840 +2240 -10820 +2240 -10800 +2240 -10780 +2240 -10760 +2240 19160 +2240 19180 +2240 21960 +2260 -23500 +2260 -23480 +2260 -20980 +2260 -20960 +2260 -20940 +2260 -20800 +2260 -20760 +2260 -20280 +2260 -20260 +2260 -20240 +2260 -19620 +2260 -19600 +2260 -19460 +2260 -18880 +2260 -13960 +2260 -13940 +2260 -13920 +2260 -13900 +2260 -10920 +2260 -10900 +2260 -10880 +2260 -10860 +2260 -10840 +2260 -10780 +2260 -10760 +2260 19160 +2280 -23500 +2280 -23480 +2280 -20980 +2280 -20960 +2280 -20940 +2280 -20340 +2280 -20300 +2280 -20280 +2280 -19620 +2280 -19580 +2280 -19440 +2280 -13980 +2280 -13960 +2280 -13940 +2280 -13920 +2280 -13900 +2280 -10920 +2280 -10900 +2280 -10880 +2280 -10800 +2280 -10780 +2280 -10760 +2280 19220 +2300 -23500 +2300 -23480 +2300 -20980 +2300 -20960 +2300 -20940 +2300 -20820 +2300 -20800 +2300 -20480 +2300 -20400 +2300 -20380 +2300 -20360 +2300 -20340 +2300 -19620 +2300 -13980 +2300 -10920 +2300 -10900 +2300 -10880 +2300 -10780 +2300 -10760 +2300 -10740 +2300 19220 +2300 19240 +2320 -23500 +2320 -23480 +2320 -20980 +2320 -20960 +2320 -20940 +2320 -20820 +2320 -20780 +2320 -20740 +2320 -20540 +2320 -20520 +2320 -20460 +2320 -20440 +2320 -20420 +2320 -20400 +2320 -10900 +2320 -10880 +2320 -10800 +2320 -10780 +2320 -10760 +2320 19180 +2320 19200 +2320 19220 +2340 -23500 +2340 -23480 +2340 -20980 +2340 -20960 +2340 -20840 +2340 -20820 +2340 -20780 +2340 -20760 +2340 -20680 +2340 -20600 +2340 -20580 +2340 -20500 +2340 -20480 +2340 -20460 +2340 -10900 +2340 -10880 +2340 -10800 +2340 -10780 +2340 -10760 +2340 19200 +2340 19220 +2340 19240 +2340 19260 +2360 -23500 +2360 -23480 +2360 -20980 +2360 -20960 +2360 -20660 +2360 -20640 +2360 -20560 +2360 -20540 +2360 -20520 +2360 -20500 +2360 -19580 +2360 -10900 +2360 -10880 +2360 -10800 +2360 -10780 +2360 -10760 +2360 -10740 +2360 19200 +2360 19220 +2360 19240 +2380 -23500 +2380 -23480 +2380 -20980 +2380 -20960 +2380 -20940 +2380 -20920 +2380 -20900 +2380 -20880 +2380 -20860 +2380 -20840 +2380 -20820 +2380 -20740 +2380 -20720 +2380 -20700 +2380 -20640 +2380 -20620 +2380 -20600 +2380 -20580 +2380 -19620 +2380 -19600 +2380 -17020 +2380 -10880 +2380 -10800 +2380 -10780 +2380 -10760 +2380 19180 +2380 19200 +2380 19220 +2380 19240 +2380 19260 +2400 -23500 +2400 -23480 +2400 -20980 +2400 -20960 +2400 -20940 +2400 -20920 +2400 -20900 +2400 -20880 +2400 -20860 +2400 -20840 +2400 -20780 +2400 -20760 +2400 -20700 +2400 -20680 +2400 -20660 +2400 -20640 +2400 -20620 +2400 -19620 +2400 -10880 +2400 -10800 +2400 -10780 +2400 -10760 +2400 19200 +2400 19220 +2420 -23500 +2420 -23480 +2420 -20920 +2420 -20900 +2420 -20820 +2420 -20800 +2420 -20780 +2420 -20760 +2420 -20740 +2420 -20720 +2420 -20700 +2420 -19620 +2420 -19600 +2420 -10900 +2420 -10880 +2420 -10800 +2420 -10780 +2420 -10760 +2420 19160 +2420 19180 +2420 19200 +2420 19220 +2440 -23500 +2440 -23480 +2440 -20840 +2440 -20820 +2440 -20800 +2440 -20780 +2440 -20760 +2440 -20740 +2440 -19620 +2440 -19600 +2440 -17000 +2440 -10880 +2440 -10800 +2440 -10780 +2440 -10760 +2440 19160 +2440 19180 +2440 19200 +2440 19220 +2440 19240 +2460 -23500 +2460 -23480 +2460 -20820 +2460 -20800 +2460 -19640 +2460 -19620 +2460 -10900 +2460 -10880 +2460 -10800 +2460 -10780 +2460 -10760 +2460 19160 +2460 19180 +2460 19200 +2460 19220 +2460 19240 +2460 19260 +2460 19280 +2460 19360 +2460 21380 +2480 -23500 +2480 -23480 +2480 -19640 +2480 -19580 +2480 -19520 +2480 -17020 +2480 -17000 +2480 -10900 +2480 -10880 +2480 -10860 +2480 -10800 +2480 -10780 +2480 -10760 +2480 19160 +2480 19180 +2480 19200 +2480 19300 +2480 19340 +2480 21360 +2500 -23500 +2500 -23480 +2500 -19640 +2500 -19620 +2500 -17020 +2500 -17000 +2500 -10900 +2500 -10880 +2500 -10800 +2500 -10780 +2500 -10760 +2500 19160 +2500 19180 +2500 19200 +2500 19280 +2500 19320 +2500 19340 +2500 19360 +2500 21360 +2520 -23500 +2520 -23480 +2520 -19640 +2520 -19500 +2520 -19380 +2520 -10880 +2520 -10800 +2520 -10780 +2520 -10760 +2520 -10740 +2520 19160 +2520 19180 +2520 19200 +2520 19320 +2520 19340 +2520 19360 +2520 21320 +2520 21380 +2520 24460 +2540 -23500 +2540 -23480 +2540 -23360 +2540 -23340 +2540 -19640 +2540 -19600 +2540 -10880 +2540 -10800 +2540 -10780 +2540 -10760 +2540 19160 +2540 19180 +2540 19200 +2540 21320 +2540 21340 +2560 -23500 +2560 -23480 +2560 -23460 +2560 -23400 +2560 -23380 +2560 -23360 +2560 -23340 +2560 -23020 +2560 -22960 +2560 -22940 +2560 -22920 +2560 -22900 +2560 -19640 +2560 -19340 +2560 -19220 +2560 -10880 +2560 -10800 +2560 -10780 +2560 -10760 +2560 19160 +2560 19180 +2560 19200 +2560 19220 +2560 21320 +2580 -23500 +2580 -23480 +2580 -23420 +2580 -23400 +2580 -23360 +2580 -23340 +2580 -23320 +2580 -23300 +2580 -23280 +2580 -23260 +2580 -23240 +2580 -23220 +2580 -23200 +2580 -23180 +2580 -23160 +2580 -23140 +2580 -23120 +2580 -23100 +2580 -23080 +2580 -23060 +2580 -23040 +2580 -23000 +2580 -22980 +2580 -22960 +2580 -22940 +2580 -22920 +2580 -22900 +2580 -19660 +2580 -19640 +2580 -19320 +2580 -19040 +2580 -17040 +2580 -10880 +2580 -10860 +2580 -10800 +2580 -10780 +2580 -10760 +2580 -10740 +2580 19220 +2580 19240 +2580 21320 +2600 -23500 +2600 -23480 +2600 -23460 +2600 -23440 +2600 -23420 +2600 -23380 +2600 -23360 +2600 -23340 +2600 -23320 +2600 -23300 +2600 -23280 +2600 -23260 +2600 -23220 +2600 -23200 +2600 -23180 +2600 -23160 +2600 -23120 +2600 -23080 +2600 -23060 +2600 -23040 +2600 -23020 +2600 -23000 +2600 -22980 +2600 -22960 +2600 -22940 +2600 -22920 +2600 -22900 +2600 -19660 +2600 -19120 +2600 -17040 +2600 -10880 +2600 -10800 +2600 -10780 +2600 -10760 +2600 19220 +2600 19240 +2600 19260 +2600 21340 +2620 -23500 +2620 -23480 +2620 -23380 +2620 -23360 +2620 -23340 +2620 -23160 +2620 -23120 +2620 -22940 +2620 -22900 +2620 -19660 +2620 -17020 +2620 -10880 +2620 -10860 +2620 -10800 +2620 -10780 +2620 -10760 +2620 -7640 +2620 19040 +2620 19140 +2620 19160 +2620 19180 +2620 19200 +2620 19220 +2620 19240 +2620 19260 +2620 21220 +2640 -23480 +2640 -23440 +2640 -23380 +2640 -23360 +2640 -22940 +2640 -22920 +2640 -22900 +2640 -19060 +2640 -19020 +2640 -19000 +2640 -17040 +2640 -10880 +2640 -10860 +2640 -10800 +2640 -10780 +2640 -10760 +2640 -7640 +2640 -7620 +2640 -7600 +2640 13380 +2640 13720 +2640 13740 +2640 13760 +2640 13820 +2640 13840 +2640 13960 +2640 14060 +2640 14080 +2640 14100 +2640 14120 +2640 14160 +2640 14180 +2640 14220 +2640 14260 +2640 14300 +2640 14380 +2640 14400 +2640 14420 +2640 14440 +2640 14460 +2640 14520 +2640 14540 +2640 14560 +2640 14580 +2640 14600 +2640 14660 +2640 14700 +2640 14720 +2640 14740 +2640 14780 +2640 14820 +2640 14860 +2640 14880 +2640 14900 +2640 14940 +2640 14960 +2640 14980 +2640 15000 +2640 15020 +2640 15040 +2640 15160 +2640 15180 +2640 15200 +2640 15360 +2640 15400 +2640 15460 +2640 15480 +2640 15500 +2640 15520 +2640 15600 +2640 15620 +2640 15640 +2640 15660 +2640 15680 +2640 15700 +2640 15720 +2640 15740 +2640 15760 +2640 15780 +2640 15800 +2640 15820 +2640 15840 +2640 15860 +2640 15880 +2640 15900 +2640 15920 +2640 15940 +2640 15960 +2640 15980 +2640 16000 +2640 16020 +2640 16040 +2640 16060 +2640 16080 +2640 16100 +2640 16120 +2640 16140 +2640 16160 +2640 16180 +2640 16200 +2640 16220 +2640 16240 +2640 16260 +2640 16280 +2640 16300 +2640 16320 +2640 16340 +2640 16360 +2640 16380 +2640 16400 +2640 16420 +2640 16440 +2640 16460 +2640 16480 +2640 16500 +2640 16520 +2640 16540 +2640 16580 +2640 16600 +2640 16620 +2640 16640 +2640 16660 +2640 16680 +2640 16700 +2640 16740 +2640 16760 +2640 16780 +2640 16800 +2640 16820 +2640 16840 +2640 16860 +2640 16880 +2640 16900 +2640 16920 +2640 16940 +2640 16960 +2640 16980 +2640 17000 +2640 17020 +2640 17040 +2640 17060 +2640 17080 +2640 17100 +2640 17120 +2640 17140 +2640 17200 +2640 17220 +2640 17360 +2640 17400 +2640 17460 +2640 17500 +2640 17520 +2640 17540 +2640 17560 +2640 17580 +2640 17600 +2640 17620 +2640 17640 +2640 17660 +2640 17680 +2640 17700 +2640 17720 +2640 17740 +2640 17760 +2640 17780 +2640 17800 +2640 17820 +2640 17840 +2640 17860 +2640 17880 +2640 17900 +2640 17920 +2640 17940 +2640 17960 +2640 17980 +2640 18000 +2640 18020 +2640 18040 +2640 18060 +2640 18080 +2640 18100 +2640 18120 +2640 18140 +2640 18160 +2640 18180 +2640 18200 +2640 18220 +2640 18240 +2640 18260 +2640 18280 +2640 18300 +2640 18320 +2640 18340 +2640 18360 +2640 18380 +2640 18400 +2640 18420 +2640 18440 +2640 18460 +2640 18480 +2640 18500 +2640 18520 +2640 18540 +2640 18560 +2640 18580 +2640 18600 +2640 18620 +2640 18640 +2640 18660 +2640 18680 +2640 18700 +2640 18720 +2640 18740 +2640 18760 +2640 18780 +2640 18800 +2640 18820 +2640 18840 +2640 18860 +2640 18880 +2640 18900 +2640 18920 +2640 18940 +2640 18960 +2640 18980 +2640 19000 +2640 19020 +2640 19040 +2640 19060 +2640 19080 +2640 19100 +2640 19120 +2640 19140 +2640 19160 +2640 19180 +2640 19200 +2640 19220 +2640 19240 +2640 21220 +2660 -23480 +2660 -23460 +2660 -23380 +2660 -23360 +2660 -22920 +2660 -22900 +2660 -19660 +2660 -17040 +2660 -11400 +2660 -10880 +2660 -10860 +2660 -10800 +2660 -10780 +2660 -10760 +2660 -7640 +2660 -7620 +2660 -7600 +2660 -7580 +2660 -7560 +2660 -7540 +2660 -7520 +2660 -7500 +2660 -7480 +2660 -7460 +2660 -7440 +2660 -7420 +2660 -7400 +2660 -7380 +2660 -7360 +2660 -7340 +2660 -7320 +2660 -7300 +2660 -7280 +2660 -7260 +2660 -7240 +2660 -7220 +2660 -7200 +2660 -7180 +2660 -7160 +2660 -7140 +2660 -7120 +2660 -7100 +2660 -7080 +2660 -7060 +2660 -7040 +2660 -7020 +2660 -7000 +2660 -6980 +2660 -6960 +2660 -6940 +2660 -6920 +2660 -6900 +2660 -6880 +2660 -6860 +2660 -6840 +2660 -6820 +2660 -6800 +2660 -6780 +2660 -6760 +2660 -6740 +2660 -6720 +2660 -6700 +2660 -6680 +2660 -6660 +2660 -6640 +2660 -6620 +2660 -6600 +2660 -6580 +2660 -6560 +2660 -6540 +2660 -6520 +2660 -6500 +2660 -6480 +2660 -6460 +2660 -6420 +2660 -6400 +2660 -6360 +2660 -6320 +2660 -6300 +2660 -6280 +2660 -6260 +2660 -6240 +2660 -6200 +2660 -6160 +2660 -6140 +2660 -6120 +2660 -6100 +2660 -6080 +2660 -6060 +2660 -6040 +2660 -6020 +2660 -6000 +2660 -5980 +2660 -5960 +2660 -5940 +2660 -5920 +2660 -5900 +2660 -5880 +2660 -5860 +2660 -5840 +2660 -5820 +2660 -5800 +2660 -5780 +2660 -5760 +2660 -5740 +2660 -5720 +2660 -5700 +2660 -5680 +2660 -5660 +2660 -5620 +2660 -5600 +2660 -5580 +2660 -5560 +2660 -5540 +2660 -5520 +2660 -5500 +2660 -5480 +2660 -5460 +2660 -5440 +2660 -5420 +2660 -5400 +2660 -5380 +2660 -5360 +2660 -5340 +2660 -5320 +2660 -5300 +2660 -5280 +2660 -5260 +2660 -5240 +2660 -5220 +2660 -5200 +2660 -5180 +2660 -5140 +2660 -5120 +2660 -5080 +2660 -5060 +2660 -5040 +2660 -5020 +2660 -5000 +2660 -4940 +2660 -4920 +2660 -4900 +2660 -4880 +2660 -4860 +2660 -4840 +2660 -4820 +2660 -4800 +2660 -4780 +2660 -4760 +2660 -4560 +2660 -4520 +2660 -4460 +2660 -4440 +2660 -4360 +2660 -4340 +2660 -4320 +2660 -4300 +2660 -4280 +2660 -4260 +2660 -4240 +2660 -4220 +2660 -4180 +2660 -4160 +2660 -4140 +2660 -4120 +2660 -4100 +2660 -4080 +2660 -4060 +2660 -4040 +2660 -4020 +2660 -4000 +2660 -3980 +2660 -3960 +2660 -3940 +2660 -3920 +2660 -3900 +2660 -3880 +2660 -3860 +2660 -3840 +2660 -3820 +2660 -3800 +2660 -3780 +2660 -3760 +2660 -3740 +2660 -3720 +2660 -3700 +2660 -3680 +2660 -3660 +2660 -3640 +2660 -3620 +2660 -3600 +2660 -3580 +2660 -3560 +2660 -3540 +2660 -3520 +2660 -3500 +2660 -3480 +2660 -3460 +2660 -3440 +2660 -3420 +2660 -3400 +2660 -3380 +2660 -3360 +2660 -3340 +2660 -3320 +2660 -3300 +2660 -3280 +2660 -3260 +2660 -3240 +2660 -3220 +2660 -3180 +2660 -3160 +2660 -3040 +2660 -3020 +2660 -3000 +2660 -2840 +2660 -2820 +2660 -2800 +2660 -2780 +2660 -2760 +2660 -2720 +2660 -2700 +2660 -2640 +2660 -2620 +2660 -2600 +2660 -2580 +2660 -2540 +2660 -2500 +2660 -2480 +2660 -2420 +2660 -2400 +2660 -2300 +2660 -2240 +2660 -2220 +2660 -2160 +2660 -2120 +2660 -2100 +2660 -2040 +2660 -1980 +2660 -1960 +2660 -1920 +2660 -1880 +2660 -1820 +2660 -1720 +2660 -1700 +2660 -1600 +2660 -1500 +2660 -1360 +2660 -1260 +2660 -1200 +2660 -1160 +2660 -1120 +2660 -1020 +2660 -720 +2660 -700 +2660 -680 +2660 -600 +2660 -560 +2660 -160 +2660 -80 +2660 20 +2660 40 +2660 60 +2660 260 +2660 600 +2660 740 +2660 760 +2660 940 +2660 960 +2660 980 +2660 1120 +2660 1180 +2660 1200 +2660 1240 +2660 1280 +2660 1360 +2660 1440 +2660 1500 +2660 1660 +2660 1700 +2660 1780 +2660 2160 +2660 2220 +2660 2260 +2660 2360 +2660 2740 +2660 2840 +2660 3140 +2660 3200 +2660 3300 +2660 3500 +2660 3620 +2660 3660 +2660 3700 +2660 3900 +2660 4240 +2660 4560 +2660 4940 +2660 5040 +2660 5080 +2660 5300 +2660 5320 +2660 5340 +2660 5380 +2660 5400 +2660 5560 +2660 5620 +2660 5700 +2660 5800 +2660 5920 +2660 6220 +2660 6320 +2660 6340 +2660 6520 +2660 6560 +2660 6620 +2660 6640 +2660 6800 +2660 7060 +2660 7600 +2660 8040 +2660 8160 +2660 8200 +2660 8240 +2660 8280 +2660 8400 +2660 8520 +2660 8680 +2660 9120 +2660 9180 +2660 9680 +2660 9840 +2660 9860 +2660 9940 +2660 10040 +2660 10120 +2660 10180 +2660 10260 +2660 10460 +2660 10480 +2660 10540 +2660 10900 +2660 10940 +2660 11000 +2660 11020 +2660 11060 +2660 11120 +2660 11140 +2660 11160 +2660 11180 +2660 11220 +2660 11240 +2660 11280 +2660 11320 +2660 11340 +2660 11360 +2660 11380 +2660 11460 +2660 11480 +2660 11500 +2660 11520 +2660 11560 +2660 11580 +2660 11600 +2660 11620 +2660 11640 +2660 11660 +2660 11680 +2660 11700 +2660 11720 +2660 11740 +2660 11760 +2660 11780 +2660 11800 +2660 11820 +2660 11840 +2660 11880 +2660 11900 +2660 11920 +2660 11940 +2660 12000 +2660 12020 +2660 12040 +2660 12060 +2660 12080 +2660 12100 +2660 12120 +2660 12140 +2660 12160 +2660 12180 +2660 12200 +2660 12280 +2660 12340 +2660 12360 +2660 12480 +2660 12500 +2660 12520 +2660 12540 +2660 12580 +2660 12600 +2660 12640 +2660 12660 +2660 12700 +2660 12720 +2660 12740 +2660 12760 +2660 12780 +2660 12800 +2660 12820 +2660 12840 +2660 12860 +2660 12880 +2660 12900 +2660 12920 +2660 12940 +2660 12960 +2660 12980 +2660 13000 +2660 13020 +2660 13040 +2660 13060 +2660 13080 +2660 13100 +2660 13120 +2660 13140 +2660 13160 +2660 13180 +2660 13200 +2660 13220 +2660 13240 +2660 13260 +2660 13280 +2660 13300 +2660 13320 +2660 13340 +2660 13360 +2660 13380 +2660 13400 +2660 13420 +2660 13440 +2660 13460 +2660 13480 +2660 13500 +2660 13520 +2660 13540 +2660 13560 +2660 13580 +2660 13600 +2660 13620 +2660 13640 +2660 13660 +2660 13680 +2660 13700 +2660 13720 +2660 13740 +2660 13760 +2660 13780 +2660 13800 +2660 13820 +2660 13840 +2660 13860 +2660 13880 +2660 13900 +2660 13920 +2660 13940 +2660 13960 +2660 13980 +2660 14000 +2660 14020 +2660 14040 +2660 14060 +2660 14080 +2660 14100 +2660 14120 +2660 14140 +2660 14160 +2660 14180 +2660 14200 +2660 14220 +2660 14240 +2660 14260 +2660 14280 +2660 14300 +2660 14320 +2660 14340 +2660 14360 +2660 14380 +2660 14400 +2660 14420 +2660 14440 +2660 14460 +2660 14480 +2660 14500 +2660 14520 +2660 14540 +2660 14560 +2660 14580 +2660 14600 +2660 14620 +2660 14640 +2660 14660 +2660 14680 +2660 14700 +2660 14720 +2660 14740 +2660 14760 +2660 14780 +2660 14800 +2660 14820 +2660 14840 +2660 14860 +2660 14880 +2660 14900 +2660 14920 +2660 14940 +2660 14960 +2660 14980 +2660 15000 +2660 15020 +2660 15040 +2660 15060 +2660 15080 +2660 15100 +2660 15120 +2660 15140 +2660 15160 +2660 15180 +2660 15200 +2660 15220 +2660 15240 +2660 15260 +2660 15280 +2660 15300 +2660 15320 +2660 15340 +2660 15360 +2660 15380 +2660 15400 +2660 15420 +2660 15440 +2660 15460 +2660 15480 +2660 15500 +2660 15520 +2660 15540 +2660 15560 +2660 15580 +2660 15600 +2660 15620 +2660 15640 +2660 15660 +2660 15680 +2660 15700 +2660 15720 +2660 15740 +2660 15760 +2660 15780 +2660 15800 +2660 15820 +2660 15840 +2660 15860 +2660 15880 +2660 15900 +2660 15920 +2660 15940 +2660 15960 +2660 15980 +2660 16000 +2660 16020 +2660 16040 +2660 16060 +2660 16080 +2660 16100 +2660 16120 +2660 16140 +2660 16160 +2660 16180 +2660 16200 +2660 16220 +2660 16240 +2660 16260 +2660 16280 +2660 16300 +2660 16320 +2660 16340 +2660 16360 +2660 16380 +2660 16400 +2660 16420 +2660 16440 +2660 16460 +2660 16480 +2660 16500 +2660 16520 +2660 16540 +2660 16560 +2660 16580 +2660 16600 +2660 16620 +2660 16640 +2660 16660 +2660 16680 +2660 16700 +2660 16720 +2660 16740 +2660 16760 +2660 16780 +2660 16800 +2660 16820 +2660 16840 +2660 16860 +2660 16880 +2660 16900 +2660 16920 +2660 16940 +2660 16960 +2660 16980 +2660 17000 +2660 17020 +2660 17040 +2660 17060 +2660 17080 +2660 17100 +2660 17120 +2660 17140 +2660 17160 +2660 17180 +2660 17200 +2660 17220 +2660 17240 +2660 17260 +2660 17280 +2660 17300 +2660 17320 +2660 17340 +2660 17360 +2660 17380 +2660 17400 +2660 17420 +2660 17440 +2660 17460 +2660 17480 +2660 17500 +2660 17520 +2660 17540 +2660 17560 +2660 17580 +2660 17600 +2660 17620 +2660 17640 +2660 17660 +2660 17680 +2660 17700 +2660 17720 +2660 17740 +2660 17760 +2660 17780 +2660 17800 +2660 17820 +2660 17840 +2660 17860 +2660 17880 +2660 17900 +2660 17920 +2660 17940 +2660 17960 +2660 17980 +2660 18000 +2660 18020 +2660 18040 +2660 18060 +2660 18080 +2660 18100 +2660 18120 +2660 18140 +2660 18160 +2660 18180 +2660 18200 +2660 18220 +2660 18240 +2660 18260 +2660 18280 +2660 18300 +2660 18320 +2660 18340 +2660 18360 +2660 18380 +2660 18400 +2660 18420 +2660 18440 +2660 18460 +2660 18480 +2660 18500 +2660 18520 +2660 18540 +2660 18560 +2660 18600 +2660 18640 +2660 18660 +2660 18700 +2660 18720 +2660 18780 +2660 18820 +2660 18860 +2660 18880 +2660 18940 +2660 18960 +2660 19100 +2660 19140 +2660 19200 +2680 -23480 +2680 -23460 +2680 -23440 +2680 -23380 +2680 -23360 +2680 -18980 +2680 -18960 +2680 -17040 +2680 -17020 +2680 -17000 +2680 -11440 +2680 -11420 +2680 -10880 +2680 -10860 +2680 -10800 +2680 -10780 +2680 -10760 +2680 -7640 +2680 -7620 +2680 -7600 +2680 -7580 +2680 -7560 +2680 -7540 +2680 -7520 +2680 -7500 +2680 -7480 +2680 -7460 +2680 -7440 +2680 -7420 +2680 -7400 +2680 -7380 +2680 -7360 +2680 -7340 +2680 -7320 +2680 -7300 +2680 -7280 +2680 -7260 +2680 -7240 +2680 -7220 +2680 -7200 +2680 -7180 +2680 -7160 +2680 -7140 +2680 -7120 +2680 -7100 +2680 -7080 +2680 -7060 +2680 -7040 +2680 -7020 +2680 -7000 +2680 -6980 +2680 -6960 +2680 -6940 +2680 -6920 +2680 -6900 +2680 -6880 +2680 -6860 +2680 -6840 +2680 -6820 +2680 -6800 +2680 -6780 +2680 -6760 +2680 -6740 +2680 -6720 +2680 -6700 +2680 -6680 +2680 -6660 +2680 -6640 +2680 -6620 +2680 -6600 +2680 -6580 +2680 -6560 +2680 -6540 +2680 -6520 +2680 -6500 +2680 -6480 +2680 -6460 +2680 -6440 +2680 -6420 +2680 -6400 +2680 -6380 +2680 -6360 +2680 -6340 +2680 -6320 +2680 -6300 +2680 -6280 +2680 -6260 +2680 -6240 +2680 -6220 +2680 -6200 +2680 -6180 +2680 -6160 +2680 -6140 +2680 -6120 +2680 -6100 +2680 -6080 +2680 -6060 +2680 -6040 +2680 -6020 +2680 -6000 +2680 -5980 +2680 -5960 +2680 -5940 +2680 -5920 +2680 -5900 +2680 -5880 +2680 -5860 +2680 -5840 +2680 -5820 +2680 -5800 +2680 -5780 +2680 -5760 +2680 -5740 +2680 -5720 +2680 -5700 +2680 -5680 +2680 -5660 +2680 -5640 +2680 -5620 +2680 -5600 +2680 -5580 +2680 -5560 +2680 -5540 +2680 -5520 +2680 -5500 +2680 -5480 +2680 -5460 +2680 -5440 +2680 -5420 +2680 -5400 +2680 -5380 +2680 -5360 +2680 -5340 +2680 -5320 +2680 -5300 +2680 -5280 +2680 -5260 +2680 -5240 +2680 -5220 +2680 -5200 +2680 -5180 +2680 -5160 +2680 -5140 +2680 -5120 +2680 -5100 +2680 -5080 +2680 -5060 +2680 -5040 +2680 -5020 +2680 -5000 +2680 -4980 +2680 -4960 +2680 -4940 +2680 -4920 +2680 -4900 +2680 -4880 +2680 -4860 +2680 -4840 +2680 -4820 +2680 -4800 +2680 -4780 +2680 -4760 +2680 -4740 +2680 -4720 +2680 -4700 +2680 -4680 +2680 -4660 +2680 -4640 +2680 -4620 +2680 -4580 +2680 -4560 +2680 -4540 +2680 -4520 +2680 -4500 +2680 -4480 +2680 -4460 +2680 -4440 +2680 -4420 +2680 -4400 +2680 -4380 +2680 -4360 +2680 -4340 +2680 -4320 +2680 -4300 +2680 -4280 +2680 -4260 +2680 -4240 +2680 -4220 +2680 -4200 +2680 -4180 +2680 -4160 +2680 -4140 +2680 -4120 +2680 -4100 +2680 -4080 +2680 -4060 +2680 -4040 +2680 -4020 +2680 -4000 +2680 -3980 +2680 -3960 +2680 -3940 +2680 -3920 +2680 -3900 +2680 -3880 +2680 -3860 +2680 -3840 +2680 -3820 +2680 -3800 +2680 -3780 +2680 -3760 +2680 -3740 +2680 -3720 +2680 -3700 +2680 -3680 +2680 -3660 +2680 -3640 +2680 -3620 +2680 -3600 +2680 -3580 +2680 -3560 +2680 -3540 +2680 -3520 +2680 -3500 +2680 -3480 +2680 -3460 +2680 -3440 +2680 -3420 +2680 -3400 +2680 -3380 +2680 -3360 +2680 -3340 +2680 -3320 +2680 -3300 +2680 -3280 +2680 -3260 +2680 -3240 +2680 -3220 +2680 -3200 +2680 -3180 +2680 -3160 +2680 -3140 +2680 -3120 +2680 -3100 +2680 -3080 +2680 -3060 +2680 -3040 +2680 -3020 +2680 -3000 +2680 -2980 +2680 -2960 +2680 -2940 +2680 -2920 +2680 -2900 +2680 -2880 +2680 -2860 +2680 -2840 +2680 -2820 +2680 -2800 +2680 -2780 +2680 -2760 +2680 -2740 +2680 -2720 +2680 -2700 +2680 -2680 +2680 -2660 +2680 -2640 +2680 -2620 +2680 -2600 +2680 -2580 +2680 -2560 +2680 -2540 +2680 -2520 +2680 -2500 +2680 -2480 +2680 -2460 +2680 -2440 +2680 -2420 +2680 -2400 +2680 -2380 +2680 -2360 +2680 -2340 +2680 -2320 +2680 -2300 +2680 -2280 +2680 -2260 +2680 -2240 +2680 -2220 +2680 -2200 +2680 -2180 +2680 -2160 +2680 -2140 +2680 -2120 +2680 -2100 +2680 -2080 +2680 -2060 +2680 -2040 +2680 -2020 +2680 -2000 +2680 -1980 +2680 -1960 +2680 -1940 +2680 -1920 +2680 -1900 +2680 -1880 +2680 -1860 +2680 -1840 +2680 -1820 +2680 -1800 +2680 -1780 +2680 -1760 +2680 -1740 +2680 -1720 +2680 -1700 +2680 -1680 +2680 -1660 +2680 -1640 +2680 -1620 +2680 -1600 +2680 -1580 +2680 -1560 +2680 -1540 +2680 -1520 +2680 -1500 +2680 -1480 +2680 -1460 +2680 -1440 +2680 -1420 +2680 -1400 +2680 -1360 +2680 -1340 +2680 -1320 +2680 -1300 +2680 -1280 +2680 -1260 +2680 -1240 +2680 -1220 +2680 -1200 +2680 -1180 +2680 -1160 +2680 -1140 +2680 -1120 +2680 -1100 +2680 -1080 +2680 -1060 +2680 -1040 +2680 -1020 +2680 -1000 +2680 -980 +2680 -960 +2680 -940 +2680 -920 +2680 -900 +2680 -880 +2680 -860 +2680 -840 +2680 -820 +2680 -800 +2680 -780 +2680 -760 +2680 -740 +2680 -720 +2680 -700 +2680 -680 +2680 -660 +2680 -640 +2680 -620 +2680 -600 +2680 -580 +2680 -560 +2680 -540 +2680 -520 +2680 -500 +2680 -480 +2680 -460 +2680 -440 +2680 -420 +2680 -400 +2680 -380 +2680 -360 +2680 -340 +2680 -320 +2680 -300 +2680 -280 +2680 -260 +2680 -240 +2680 -220 +2680 -200 +2680 -180 +2680 -160 +2680 -140 +2680 -120 +2680 -100 +2680 -80 +2680 -60 +2680 -40 +2680 -20 +2680 0 +2680 20 +2680 40 +2680 60 +2680 80 +2680 100 +2680 120 +2680 140 +2680 160 +2680 180 +2680 200 +2680 220 +2680 240 +2680 260 +2680 280 +2680 300 +2680 320 +2680 340 +2680 360 +2680 380 +2680 400 +2680 420 +2680 440 +2680 460 +2680 480 +2680 500 +2680 520 +2680 540 +2680 560 +2680 580 +2680 600 +2680 620 +2680 640 +2680 660 +2680 680 +2680 700 +2680 720 +2680 740 +2680 760 +2680 780 +2680 800 +2680 820 +2680 840 +2680 860 +2680 880 +2680 900 +2680 920 +2680 940 +2680 960 +2680 980 +2680 1000 +2680 1020 +2680 1040 +2680 1060 +2680 1080 +2680 1100 +2680 1120 +2680 1140 +2680 1160 +2680 1180 +2680 1200 +2680 1220 +2680 1240 +2680 1260 +2680 1280 +2680 1300 +2680 1320 +2680 1340 +2680 1360 +2680 1380 +2680 1400 +2680 1420 +2680 1440 +2680 1460 +2680 1480 +2680 1500 +2680 1520 +2680 1540 +2680 1560 +2680 1580 +2680 1600 +2680 1620 +2680 1640 +2680 1660 +2680 1680 +2680 1700 +2680 1720 +2680 1740 +2680 1760 +2680 1780 +2680 1800 +2680 1820 +2680 1840 +2680 1860 +2680 1880 +2680 1900 +2680 1920 +2680 1960 +2680 1980 +2680 2000 +2680 2020 +2680 2040 +2680 2060 +2680 2080 +2680 2100 +2680 2120 +2680 2140 +2680 2160 +2680 2180 +2680 2200 +2680 2220 +2680 2240 +2680 2260 +2680 2280 +2680 2300 +2680 2320 +2680 2340 +2680 2360 +2680 2380 +2680 2400 +2680 2420 +2680 2440 +2680 2460 +2680 2480 +2680 2500 +2680 2520 +2680 2540 +2680 2560 +2680 2580 +2680 2600 +2680 2620 +2680 2640 +2680 2660 +2680 2680 +2680 2700 +2680 2720 +2680 2740 +2680 2760 +2680 2780 +2680 2800 +2680 2820 +2680 2840 +2680 2860 +2680 2880 +2680 2900 +2680 2920 +2680 2940 +2680 2960 +2680 2980 +2680 3000 +2680 3020 +2680 3040 +2680 3060 +2680 3080 +2680 3100 +2680 3120 +2680 3140 +2680 3160 +2680 3180 +2680 3200 +2680 3220 +2680 3240 +2680 3260 +2680 3280 +2680 3300 +2680 3320 +2680 3340 +2680 3360 +2680 3380 +2680 3400 +2680 3420 +2680 3440 +2680 3460 +2680 3480 +2680 3500 +2680 3520 +2680 3540 +2680 3560 +2680 3580 +2680 3600 +2680 3620 +2680 3640 +2680 3660 +2680 3680 +2680 3700 +2680 3720 +2680 3740 +2680 3760 +2680 3780 +2680 3800 +2680 3820 +2680 3840 +2680 3860 +2680 3880 +2680 3900 +2680 3920 +2680 3940 +2680 3960 +2680 3980 +2680 4000 +2680 4020 +2680 4040 +2680 4060 +2680 4080 +2680 4100 +2680 4120 +2680 4140 +2680 4160 +2680 4180 +2680 4200 +2680 4220 +2680 4240 +2680 4260 +2680 4280 +2680 4300 +2680 4320 +2680 4340 +2680 4360 +2680 4380 +2680 4400 +2680 4420 +2680 4440 +2680 4460 +2680 4480 +2680 4500 +2680 4520 +2680 4540 +2680 4580 +2680 4600 +2680 4620 +2680 4640 +2680 4660 +2680 4680 +2680 4700 +2680 4720 +2680 4740 +2680 4760 +2680 4780 +2680 4800 +2680 4820 +2680 4840 +2680 4860 +2680 4880 +2680 4900 +2680 4920 +2680 4940 +2680 4960 +2680 4980 +2680 5000 +2680 5020 +2680 5040 +2680 5060 +2680 5080 +2680 5100 +2680 5120 +2680 5140 +2680 5160 +2680 5180 +2680 5200 +2680 5220 +2680 5240 +2680 5260 +2680 5280 +2680 5300 +2680 5320 +2680 5340 +2680 5360 +2680 5380 +2680 5400 +2680 5420 +2680 5440 +2680 5460 +2680 5480 +2680 5500 +2680 5520 +2680 5540 +2680 5560 +2680 5580 +2680 5600 +2680 5620 +2680 5640 +2680 5660 +2680 5680 +2680 5700 +2680 5720 +2680 5740 +2680 5760 +2680 5780 +2680 5800 +2680 5820 +2680 5840 +2680 5860 +2680 5880 +2680 5900 +2680 5920 +2680 5940 +2680 5960 +2680 5980 +2680 6000 +2680 6020 +2680 6040 +2680 6060 +2680 6080 +2680 6100 +2680 6120 +2680 6140 +2680 6160 +2680 6180 +2680 6200 +2680 6220 +2680 6240 +2680 6260 +2680 6280 +2680 6300 +2680 6320 +2680 6340 +2680 6360 +2680 6380 +2680 6400 +2680 6420 +2680 6440 +2680 6460 +2680 6480 +2680 6500 +2680 6520 +2680 6540 +2680 6560 +2680 6580 +2680 6600 +2680 6620 +2680 6640 +2680 6660 +2680 6680 +2680 6700 +2680 6720 +2680 6740 +2680 6760 +2680 6780 +2680 6800 +2680 6820 +2680 6840 +2680 6860 +2680 6880 +2680 6900 +2680 6920 +2680 6940 +2680 6960 +2680 6980 +2680 7000 +2680 7020 +2680 7040 +2680 7060 +2680 7080 +2680 7100 +2680 7120 +2680 7140 +2680 7160 +2680 7180 +2680 7200 +2680 7220 +2680 7240 +2680 7260 +2680 7280 +2680 7300 +2680 7320 +2680 7340 +2680 7360 +2680 7380 +2680 7400 +2680 7420 +2680 7440 +2680 7460 +2680 7480 +2680 7500 +2680 7520 +2680 7540 +2680 7580 +2680 7640 +2680 7660 +2680 7680 +2680 7700 +2680 7720 +2680 7740 +2680 7760 +2680 7780 +2680 7800 +2680 7820 +2680 7840 +2680 7860 +2680 7880 +2680 7900 +2680 7920 +2680 7940 +2680 7960 +2680 7980 +2680 8000 +2680 8020 +2680 8040 +2680 8060 +2680 8080 +2680 8100 +2680 8120 +2680 8140 +2680 8160 +2680 8180 +2680 8200 +2680 8220 +2680 8240 +2680 8260 +2680 8280 +2680 8300 +2680 8320 +2680 8340 +2680 8360 +2680 8380 +2680 8400 +2680 8420 +2680 8440 +2680 8460 +2680 8480 +2680 8500 +2680 8520 +2680 8540 +2680 8560 +2680 8580 +2680 8600 +2680 8620 +2680 8640 +2680 8660 +2680 8680 +2680 8700 +2680 8720 +2680 8740 +2680 8760 +2680 8780 +2680 8800 +2680 8820 +2680 8840 +2680 8860 +2680 8880 +2680 8900 +2680 8920 +2680 8940 +2680 8960 +2680 8980 +2680 9000 +2680 9020 +2680 9040 +2680 9060 +2680 9080 +2680 9100 +2680 9120 +2680 9140 +2680 9160 +2680 9180 +2680 9200 +2680 9220 +2680 9240 +2680 9260 +2680 9280 +2680 9300 +2680 9320 +2680 9340 +2680 9380 +2680 9400 +2680 9420 +2680 9440 +2680 9460 +2680 9480 +2680 9500 +2680 9520 +2680 9540 +2680 9560 +2680 9580 +2680 9600 +2680 9620 +2680 9640 +2680 9660 +2680 9680 +2680 9700 +2680 9720 +2680 9740 +2680 9760 +2680 9780 +2680 9800 +2680 9820 +2680 9840 +2680 9860 +2680 9880 +2680 9900 +2680 9920 +2680 9940 +2680 9960 +2680 9980 +2680 10000 +2680 10020 +2680 10040 +2680 10060 +2680 10080 +2680 10100 +2680 10120 +2680 10140 +2680 10160 +2680 10180 +2680 10200 +2680 10220 +2680 10240 +2680 10260 +2680 10280 +2680 10300 +2680 10320 +2680 10340 +2680 10360 +2680 10380 +2680 10400 +2680 10420 +2680 10440 +2680 10460 +2680 10480 +2680 10500 +2680 10520 +2680 10540 +2680 10560 +2680 10580 +2680 10600 +2680 10620 +2680 10640 +2680 10660 +2680 10680 +2680 10700 +2680 10720 +2680 10740 +2680 10760 +2680 10780 +2680 10800 +2680 10820 +2680 10840 +2680 10860 +2680 10880 +2680 10900 +2680 10920 +2680 10940 +2680 10960 +2680 10980 +2680 11000 +2680 11020 +2680 11040 +2680 11060 +2680 11080 +2680 11100 +2680 11120 +2680 11140 +2680 11160 +2680 11180 +2680 11200 +2680 11220 +2680 11240 +2680 11260 +2680 11280 +2680 11300 +2680 11320 +2680 11340 +2680 11360 +2680 11380 +2680 11400 +2680 11420 +2680 11440 +2680 11460 +2680 11480 +2680 11500 +2680 11520 +2680 11540 +2680 11560 +2680 11580 +2680 11600 +2680 11620 +2680 11640 +2680 11660 +2680 11680 +2680 11700 +2680 11720 +2680 11740 +2680 11760 +2680 11780 +2680 11800 +2680 11820 +2680 11840 +2680 11860 +2680 11880 +2680 11900 +2680 11920 +2680 11940 +2680 11960 +2680 11980 +2680 12000 +2680 12020 +2680 12040 +2680 12060 +2680 12080 +2680 12100 +2680 12120 +2680 12140 +2680 12160 +2680 12180 +2680 12200 +2680 12220 +2680 12240 +2680 12260 +2680 12280 +2680 12300 +2680 12320 +2680 12340 +2680 12360 +2680 12380 +2680 12400 +2680 12420 +2680 12440 +2680 12460 +2680 12480 +2680 12500 +2680 12520 +2680 12540 +2680 12560 +2680 12580 +2680 12600 +2680 12620 +2680 12640 +2680 12660 +2680 12680 +2680 12700 +2680 12720 +2680 12740 +2680 12760 +2680 12780 +2680 12800 +2680 12820 +2680 12840 +2680 12860 +2680 12880 +2680 12900 +2680 12920 +2680 12940 +2680 12960 +2680 12980 +2680 13000 +2680 13020 +2680 13040 +2680 13060 +2680 13080 +2680 13100 +2680 13120 +2680 13140 +2680 13160 +2680 13180 +2680 13200 +2680 13220 +2680 13240 +2680 13260 +2680 13280 +2680 13300 +2680 13320 +2680 13340 +2680 13360 +2680 13380 +2680 13400 +2680 13420 +2680 13440 +2680 13460 +2680 13480 +2680 13500 +2680 13520 +2680 13540 +2680 13560 +2680 13580 +2680 13620 +2680 13640 +2680 13700 +2680 13860 +2680 13880 +2680 13920 +2680 13980 +2680 14020 +2680 14080 +2680 14100 +2680 14120 +2680 14140 +2680 14160 +2680 14180 +2680 14300 +2680 14360 +2680 14740 +2680 14920 +2680 14940 +2680 14960 +2680 14980 +2680 15000 +2680 15020 +2680 15040 +2680 15060 +2680 15080 +2680 15100 +2680 15120 +2680 15140 +2680 15160 +2680 15180 +2680 15200 +2680 15220 +2680 15240 +2680 15260 +2680 15280 +2680 15300 +2680 15320 +2680 15340 +2680 15360 +2680 15380 +2680 15400 +2680 15420 +2680 15440 +2680 15460 +2680 15480 +2680 15500 +2680 15520 +2680 15540 +2680 15560 +2680 15580 +2680 15600 +2680 15620 +2680 15640 +2680 15980 +2680 16380 +2680 16440 +2680 16460 +2680 16500 +2680 16540 +2680 16580 +2680 16640 +2680 17100 +2680 17120 +2680 17140 +2680 17160 +2680 17220 +2680 17240 +2680 17260 +2680 17280 +2680 17300 +2680 17320 +2680 17340 +2680 17360 +2680 17380 +2680 17400 +2680 17420 +2680 17440 +2680 17460 +2680 17480 +2680 17500 +2680 17520 +2680 17540 +2680 17560 +2680 17580 +2680 17600 +2680 17620 +2680 17640 +2680 17660 +2680 17680 +2680 17700 +2680 17720 +2680 17740 +2680 17760 +2680 17780 +2680 17800 +2680 17820 +2680 17840 +2680 17860 +2680 17880 +2680 17900 +2680 17920 +2680 21900 +2700 -23480 +2700 -23460 +2700 -23380 +2700 -23360 +2700 -23340 +2700 -19680 +2700 -19660 +2700 -18960 +2700 -18920 +2700 -17040 +2700 -17020 +2700 -17000 +2700 -11440 +2700 -11420 +2700 -11400 +2700 -10880 +2700 -10860 +2700 -10780 +2700 -10760 +2700 -10740 +2700 -7640 +2700 -7620 +2700 -7600 +2700 -7080 +2700 -6680 +2700 -6640 +2700 -6620 +2700 -6600 +2700 -6580 +2700 -6560 +2700 -6540 +2700 -6520 +2700 -6500 +2700 -6480 +2700 -6460 +2700 -6440 +2700 -6420 +2700 -6400 +2700 -6380 +2700 -6360 +2700 -6340 +2700 -6320 +2700 -6300 +2700 -6280 +2700 -6260 +2700 -6240 +2700 -6220 +2700 -6200 +2700 -6180 +2700 -6160 +2700 -6140 +2700 -6120 +2700 -6100 +2700 -6080 +2700 -6020 +2700 -6000 +2700 -5980 +2700 -5960 +2700 -5940 +2700 -5920 +2700 -5900 +2700 -5880 +2700 -5860 +2700 -5840 +2700 -5800 +2700 -5780 +2700 -5760 +2700 -5740 +2700 -5680 +2700 -5660 +2700 -5640 +2700 -5620 +2700 -5600 +2700 -5580 +2700 -5560 +2700 -5540 +2700 -5520 +2700 -5500 +2700 -5480 +2700 -5460 +2700 -5440 +2700 -5420 +2700 -5400 +2700 -5380 +2700 -5360 +2700 -5340 +2700 -5320 +2700 -5300 +2700 -5260 +2700 -5240 +2700 -5220 +2700 -5200 +2700 -5180 +2700 -5160 +2700 -5140 +2700 -5120 +2700 -5100 +2700 -5080 +2700 -5060 +2700 -5040 +2700 -5020 +2700 -5000 +2700 -4980 +2700 -4960 +2700 -4940 +2700 -4920 +2700 -4900 +2700 -4880 +2700 -4860 +2700 -4840 +2700 -4820 +2700 -4800 +2700 -4780 +2700 -4760 +2700 -4740 +2700 -4720 +2700 -4700 +2700 -4680 +2700 -4660 +2700 -4640 +2700 -4620 +2700 -4600 +2700 -4580 +2700 -4560 +2700 -4540 +2700 -4520 +2700 -4500 +2700 -4480 +2700 -4460 +2700 -4440 +2700 -4420 +2700 -4400 +2700 -4380 +2700 -4360 +2700 -4340 +2700 -4320 +2700 -4300 +2700 -4280 +2700 -4260 +2700 -4240 +2700 -4220 +2700 -4180 +2700 -4160 +2700 -4140 +2700 -4100 +2700 -4080 +2700 -4020 +2700 -3920 +2700 -3860 +2700 -3760 +2700 -3500 +2700 -3480 +2700 -3460 +2700 -3440 +2700 -3420 +2700 -3400 +2700 -3380 +2700 -3360 +2700 -3340 +2700 -3320 +2700 -3300 +2700 -3280 +2700 -3260 +2700 -3240 +2700 -3220 +2700 -3200 +2700 -3180 +2700 -3160 +2700 -3140 +2700 -3120 +2700 -3100 +2700 -3080 +2700 -3060 +2700 -3040 +2700 -3020 +2700 -3000 +2700 -2980 +2700 -2960 +2700 -2940 +2700 -2920 +2700 -2900 +2700 -2880 +2700 -2860 +2700 -2840 +2700 -2820 +2700 -2800 +2700 -2780 +2700 -2760 +2700 -2740 +2700 -2720 +2700 -2700 +2700 -2680 +2700 -2640 +2700 -2600 +2700 -2540 +2700 -2520 +2700 -2500 +2700 -2460 +2700 -2440 +2700 -2340 +2700 -2320 +2700 -2180 +2700 -2160 +2700 -2140 +2700 -2120 +2700 -2100 +2700 -2080 +2700 -2060 +2700 -2040 +2700 -2020 +2700 -2000 +2700 -1980 +2700 -1960 +2700 -1940 +2700 -1920 +2700 -1900 +2700 -1880 +2700 -1860 +2700 -1840 +2700 -1820 +2700 -1800 +2700 -1780 +2700 -1760 +2700 -1740 +2700 -1720 +2700 -1700 +2700 -1680 +2700 -1660 +2700 -1640 +2700 -1620 +2700 -1600 +2700 -1580 +2700 -1560 +2700 -1540 +2700 -1520 +2700 -1500 +2700 -1480 +2700 -1460 +2700 -1440 +2700 -1420 +2700 -1400 +2700 -1380 +2700 -1360 +2700 -1340 +2700 -1320 +2700 -1300 +2700 -1280 +2700 -1260 +2700 -1240 +2700 -1220 +2700 -1200 +2700 -1180 +2700 -1160 +2700 -1140 +2700 -1120 +2700 -1100 +2700 -1080 +2700 -1060 +2700 -1040 +2700 -1020 +2700 -1000 +2700 -980 +2700 -960 +2700 -940 +2700 -920 +2700 -900 +2700 -880 +2700 -860 +2700 -840 +2700 -820 +2700 -800 +2700 -780 +2700 -760 +2700 -740 +2700 -720 +2700 -700 +2700 -680 +2700 -660 +2700 -640 +2700 -620 +2700 -600 +2700 -580 +2700 -560 +2700 -540 +2700 -520 +2700 -500 +2700 -480 +2700 -460 +2700 -440 +2700 -420 +2700 -400 +2700 -380 +2700 -360 +2700 -340 +2700 -320 +2700 -300 +2700 -280 +2700 -260 +2700 -240 +2700 -220 +2700 -200 +2700 -180 +2700 -160 +2700 -140 +2700 -120 +2700 -100 +2700 -80 +2700 -60 +2700 -40 +2700 -20 +2700 0 +2700 20 +2700 40 +2700 60 +2700 80 +2700 100 +2700 120 +2700 140 +2700 160 +2700 180 +2700 200 +2700 220 +2700 240 +2700 260 +2700 280 +2700 300 +2700 320 +2700 340 +2700 360 +2700 380 +2700 400 +2700 420 +2700 440 +2700 460 +2700 480 +2700 500 +2700 520 +2700 540 +2700 560 +2700 580 +2700 600 +2700 620 +2700 640 +2700 660 +2700 680 +2700 700 +2700 720 +2700 740 +2700 760 +2700 780 +2700 800 +2700 820 +2700 840 +2700 860 +2700 880 +2700 900 +2700 920 +2700 940 +2700 980 +2700 1000 +2700 1020 +2700 1040 +2700 1100 +2700 1120 +2700 1160 +2700 1220 +2700 1260 +2700 1280 +2700 1300 +2700 1320 +2700 1340 +2700 1360 +2700 1380 +2700 1440 +2700 1460 +2700 1480 +2700 1500 +2700 1520 +2700 1540 +2700 1560 +2700 1580 +2700 1600 +2700 1620 +2700 1640 +2700 1660 +2700 1680 +2700 1700 +2700 1720 +2700 1740 +2700 1760 +2700 1780 +2700 1800 +2700 1820 +2700 1840 +2700 1860 +2700 1880 +2700 1900 +2700 1920 +2700 1940 +2700 1960 +2700 1980 +2700 2000 +2700 2020 +2700 2040 +2700 2060 +2700 2080 +2700 2100 +2700 2120 +2700 2140 +2700 2160 +2700 2180 +2700 2200 +2700 2220 +2700 2240 +2700 2260 +2700 2280 +2700 2300 +2700 2320 +2700 2340 +2700 2360 +2700 2380 +2700 2400 +2700 2420 +2700 2440 +2700 2460 +2700 2480 +2700 2500 +2700 2520 +2700 2540 +2700 2560 +2700 2580 +2700 2600 +2700 2620 +2700 2640 +2700 2660 +2700 2680 +2700 2700 +2700 2720 +2700 2740 +2700 2760 +2700 2780 +2700 2800 +2700 2820 +2700 2840 +2700 2860 +2700 2880 +2700 2900 +2700 2920 +2700 2940 +2700 2960 +2700 2980 +2700 3000 +2700 3020 +2700 3040 +2700 3060 +2700 3080 +2700 3100 +2700 3120 +2700 3140 +2700 3160 +2700 3180 +2700 3200 +2700 3220 +2700 3240 +2700 3260 +2700 3280 +2700 3300 +2700 3320 +2700 3340 +2700 3360 +2700 3380 +2700 3400 +2700 3420 +2700 3440 +2700 3460 +2700 3480 +2700 3500 +2700 3520 +2700 3540 +2700 3560 +2700 3580 +2700 3600 +2700 3620 +2700 3640 +2700 3660 +2700 3680 +2700 3700 +2700 3720 +2700 3740 +2700 3760 +2700 3780 +2700 3800 +2700 3820 +2700 3840 +2700 3860 +2700 3880 +2700 3900 +2700 3920 +2700 3940 +2700 3960 +2700 3980 +2700 4000 +2700 4020 +2700 4040 +2700 4060 +2700 4080 +2700 4100 +2700 4120 +2700 4140 +2700 4160 +2700 4180 +2700 4200 +2700 4220 +2700 4240 +2700 4260 +2700 4280 +2700 4300 +2700 4320 +2700 4340 +2700 4360 +2700 4380 +2700 4400 +2700 4420 +2700 4440 +2700 4460 +2700 4480 +2700 4500 +2700 4520 +2700 4540 +2700 4560 +2700 4580 +2700 4600 +2700 4620 +2700 4640 +2700 4660 +2700 4680 +2700 4700 +2700 4720 +2700 4740 +2700 4760 +2700 4780 +2700 4800 +2700 4820 +2700 4840 +2700 4860 +2700 4880 +2700 4900 +2700 4920 +2700 4940 +2700 4960 +2700 4980 +2700 5000 +2700 5020 +2700 5040 +2700 5060 +2700 5080 +2700 5100 +2700 5120 +2700 5140 +2700 5160 +2700 5180 +2700 5200 +2700 5220 +2700 5240 +2700 5260 +2700 5280 +2700 5300 +2700 5320 +2700 5340 +2700 5360 +2700 5380 +2700 5400 +2700 5420 +2700 5440 +2700 5460 +2700 5480 +2700 5500 +2700 5520 +2700 5540 +2700 5560 +2700 5580 +2700 5600 +2700 5620 +2700 5640 +2700 5660 +2700 5680 +2700 5700 +2700 5720 +2700 5740 +2700 5760 +2700 5780 +2700 5800 +2700 5820 +2700 5840 +2700 5860 +2700 5880 +2700 5900 +2700 5920 +2700 5940 +2700 5960 +2700 5980 +2700 6000 +2700 6020 +2700 6040 +2700 6060 +2700 6080 +2700 6100 +2700 6120 +2700 6140 +2700 6160 +2700 6180 +2700 6200 +2700 6220 +2700 6240 +2700 6260 +2700 6280 +2700 6300 +2700 6320 +2700 6340 +2700 6360 +2700 6380 +2700 6440 +2700 6460 +2700 6480 +2700 6520 +2700 6540 +2700 6560 +2700 6580 +2700 6600 +2700 6620 +2700 6660 +2700 6680 +2700 6700 +2700 6760 +2700 6800 +2700 6820 +2700 6840 +2700 6860 +2700 6880 +2700 6900 +2700 6920 +2700 6940 +2700 6960 +2700 7000 +2700 7020 +2700 7040 +2700 7060 +2700 7080 +2700 7100 +2700 7120 +2700 7160 +2700 7180 +2700 7200 +2700 7220 +2700 7240 +2700 7260 +2700 7280 +2700 7300 +2700 7320 +2700 7340 +2700 7360 +2700 7380 +2700 7400 +2700 7420 +2700 7440 +2700 7460 +2700 7480 +2700 7500 +2700 7520 +2700 7540 +2700 7560 +2700 7580 +2700 7600 +2700 7620 +2700 7640 +2700 7660 +2700 7680 +2700 7700 +2700 7720 +2700 7740 +2700 7760 +2700 7780 +2700 7800 +2700 7820 +2700 7840 +2700 7860 +2700 7880 +2700 7900 +2700 7920 +2700 7940 +2700 7980 +2700 8000 +2700 8020 +2700 8040 +2700 8060 +2700 8100 +2700 8140 +2700 8160 +2700 8180 +2700 8200 +2700 8260 +2700 8300 +2700 8320 +2700 8360 +2700 8400 +2700 8440 +2700 8540 +2700 8580 +2700 8600 +2700 8620 +2700 8640 +2700 8660 +2700 8700 +2700 8720 +2700 8760 +2700 8780 +2700 8800 +2700 8820 +2700 8860 +2700 8880 +2700 8900 +2700 8920 +2700 8940 +2700 8960 +2700 8980 +2700 9000 +2700 9020 +2700 9040 +2700 9060 +2700 9080 +2700 9100 +2700 9120 +2700 9140 +2700 9160 +2700 9180 +2700 9200 +2700 9220 +2700 9240 +2700 9260 +2700 9280 +2700 9300 +2700 9320 +2700 9340 +2700 9360 +2700 9380 +2700 9400 +2700 9420 +2700 9440 +2700 9460 +2700 9480 +2700 9500 +2700 9540 +2700 9580 +2700 9620 +2700 9640 +2700 9680 +2700 9700 +2700 9760 +2700 9840 +2700 9860 +2700 9900 +2700 9920 +2700 9940 +2700 10120 +2700 10160 +2700 10240 +2700 10300 +2700 10420 +2700 10540 +2700 10560 +2700 10580 +2700 10600 +2700 10620 +2700 10640 +2700 10660 +2700 10680 +2700 10700 +2700 10720 +2700 10740 +2700 10760 +2700 10780 +2700 10800 +2700 10820 +2700 10840 +2700 10860 +2700 10880 +2700 10900 +2700 10920 +2700 10940 +2700 10960 +2700 10980 +2700 11000 +2700 11020 +2700 11040 +2700 11060 +2700 11080 +2700 11100 +2700 11200 +2700 11280 +2700 11320 +2700 11360 +2700 11460 +2700 11520 +2700 11580 +2700 11620 +2700 11960 +2700 12060 +2700 12200 +2700 12220 +2700 12240 +2700 12260 +2700 12280 +2700 12300 +2700 12320 +2700 12340 +2700 12360 +2700 12380 +2700 12400 +2700 12420 +2700 12440 +2700 12460 +2700 12480 +2700 12500 +2700 12520 +2700 12540 +2700 12560 +2700 12580 +2700 12600 +2700 12620 +2700 12640 +2700 12660 +2700 12680 +2700 12700 +2700 12720 +2700 12740 +2700 12760 +2700 12780 +2700 12800 +2700 12920 +2700 13100 +2700 13200 +2700 13220 +2700 13280 +2700 13340 +2700 13380 +2700 13420 +2700 13740 +2700 13800 +2700 14000 +2700 14080 +2700 14100 +2700 14120 +2700 14140 +2700 14160 +2700 14180 +2700 14200 +2700 14240 +2700 14260 +2700 14280 +2700 14300 +2700 14320 +2700 14340 +2700 14360 +2700 14380 +2700 14420 +2700 14440 +2700 14460 +2700 14480 +2700 14500 +2700 14520 +2700 14540 +2700 14560 +2700 14580 +2700 14600 +2700 14620 +2700 14640 +2700 14660 +2700 14680 +2700 14700 +2700 14720 +2700 14740 +2700 14760 +2700 14780 +2700 14800 +2700 14820 +2700 14840 +2700 14860 +2700 14880 +2700 14900 +2700 14920 +2700 14940 +2700 14960 +2700 14980 +2700 15000 +2700 15020 +2700 15040 +2700 15060 +2700 15080 +2700 15100 +2700 15120 +2700 15140 +2700 15160 +2700 15180 +2700 15200 +2700 15220 +2700 15240 +2700 15260 +2700 15280 +2700 15300 +2700 15320 +2700 15340 +2700 15360 +2700 15380 +2700 15400 +2700 15420 +2700 15440 +2700 15460 +2700 15480 +2700 15500 +2700 15520 +2700 15540 +2700 15560 +2700 15580 +2700 15600 +2700 15620 +2700 15640 +2700 15660 +2700 15680 +2700 15700 +2700 15720 +2700 15740 +2700 15760 +2700 15780 +2700 15800 +2700 15820 +2700 15840 +2700 15860 +2700 15880 +2700 15900 +2700 15920 +2700 15940 +2700 15960 +2700 15980 +2700 16000 +2700 16140 +2700 16200 +2700 16220 +2700 16240 +2700 16260 +2700 16280 +2700 16300 +2700 16320 +2700 16340 +2700 16360 +2700 16380 +2700 16400 +2700 16420 +2700 16440 +2700 16460 +2700 16480 +2700 16500 +2700 16520 +2700 16540 +2700 16560 +2700 16580 +2700 16600 +2700 16620 +2700 16640 +2700 16660 +2700 16680 +2700 16700 +2700 16720 +2700 16740 +2700 16760 +2700 16780 +2700 17200 +2700 17260 +2700 17280 +2700 17300 +2700 17320 +2700 17340 +2700 17400 +2700 17420 +2700 17440 +2700 17480 +2700 17500 +2700 17520 +2700 17540 +2700 17560 +2700 17580 +2700 17600 +2700 17620 +2700 17640 +2700 17660 +2700 17680 +2700 17700 +2700 17720 +2700 17740 +2700 17760 +2700 17780 +2700 17800 +2700 17820 +2700 17840 +2700 17860 +2700 17880 +2700 17900 +2700 17920 +2700 17940 +2700 21260 +2700 21340 +2720 -23480 +2720 -23440 +2720 -23420 +2720 -23380 +2720 -23360 +2720 -22940 +2720 -22920 +2720 -22900 +2720 -19680 +2720 -17040 +2720 -17000 +2720 -12740 +2720 -12720 +2720 -12700 +2720 -10880 +2720 -10860 +2720 -10800 +2720 -10780 +2720 -10760 +2720 -7640 +2720 -7620 +2720 -6660 +2720 -6640 +2720 -6620 +2720 -6600 +2720 -6580 +2720 -6540 +2720 -6520 +2720 -6480 +2720 -6460 +2720 -6440 +2720 -6420 +2720 -6400 +2720 -6380 +2720 -6360 +2720 -6340 +2720 -6320 +2720 -6300 +2720 -6280 +2720 -6260 +2720 -6240 +2720 -6220 +2720 -6200 +2720 -6180 +2720 -6160 +2720 -6140 +2720 -6120 +2720 -6100 +2720 -6060 +2720 -6040 +2720 -6000 +2720 -5980 +2720 -5940 +2720 -5020 +2720 -5000 +2720 -4980 +2720 -4960 +2720 -4940 +2720 -4900 +2720 -4880 +2720 -4860 +2720 -4840 +2720 -4820 +2720 -4800 +2720 -4780 +2720 -4760 +2720 -4740 +2720 -4720 +2720 -4700 +2720 -4680 +2720 -4660 +2720 -4640 +2720 -4620 +2720 -4600 +2720 -4580 +2720 -4560 +2720 -4540 +2720 -4520 +2720 -4500 +2720 -4480 +2720 -4460 +2720 -4440 +2720 -4420 +2720 -4360 +2720 -4340 +2720 -4300 +2720 -4280 +2720 -4180 +2720 -4100 +2720 -3480 +2720 -3460 +2720 -3420 +2720 -3400 +2720 -3380 +2720 -3360 +2720 -3340 +2720 -3320 +2720 -3300 +2720 -3280 +2720 -3260 +2720 -3240 +2720 -3220 +2720 -3200 +2720 -3180 +2720 -3160 +2720 -3140 +2720 -3120 +2720 -3100 +2720 -3080 +2720 -3060 +2720 -3040 +2720 -3020 +2720 -3000 +2720 -2980 +2720 -2960 +2720 -2940 +2720 -2920 +2720 -2900 +2720 -2880 +2720 -2860 +2720 -2840 +2720 -2800 +2720 -2760 +2720 -2740 +2720 -1880 +2720 -1780 +2720 -1760 +2720 -1740 +2720 -1720 +2720 -1700 +2720 -1680 +2720 -1660 +2720 -1640 +2720 -1620 +2720 -1600 +2720 -1580 +2720 -1560 +2720 -1540 +2720 -1520 +2720 -1500 +2720 -1480 +2720 -1460 +2720 -1440 +2720 -1420 +2720 -1400 +2720 -1380 +2720 -1360 +2720 -1340 +2720 -1300 +2720 -1280 +2720 -1260 +2720 -1240 +2720 -1200 +2720 -1180 +2720 -560 +2720 -180 +2720 -100 +2720 -80 +2720 -60 +2720 -20 +2720 0 +2720 20 +2720 40 +2720 60 +2720 80 +2720 100 +2720 120 +2720 140 +2720 160 +2720 180 +2720 200 +2720 220 +2720 240 +2720 260 +2720 280 +2720 300 +2720 320 +2720 340 +2720 360 +2720 400 +2720 440 +2720 460 +2720 500 +2720 1460 +2720 1480 +2720 1500 +2720 1520 +2720 1540 +2720 1560 +2720 1580 +2720 1600 +2720 1620 +2720 1640 +2720 1680 +2720 1700 +2720 1720 +2720 1740 +2720 1780 +2720 1800 +2720 1820 +2720 1860 +2720 1880 +2720 1900 +2720 1920 +2720 1940 +2720 1960 +2720 1980 +2720 2000 +2720 2040 +2720 2080 +2720 2100 +2720 2120 +2720 3200 +2720 3220 +2720 3260 +2720 4040 +2720 4060 +2720 4080 +2720 4180 +2720 4220 +2720 4240 +2720 4260 +2720 4280 +2720 4300 +2720 4320 +2720 4360 +2720 4380 +2720 4420 +2720 4440 +2720 4460 +2720 4480 +2720 4500 +2720 4520 +2720 4540 +2720 4560 +2720 4580 +2720 4600 +2720 4620 +2720 4640 +2720 4660 +2720 4680 +2720 4700 +2720 4740 +2720 4940 +2720 4960 +2720 4980 +2720 5000 +2720 5020 +2720 5040 +2720 5060 +2720 5080 +2720 5100 +2720 5120 +2720 5160 +2720 5180 +2720 5200 +2720 5220 +2720 5260 +2720 5320 +2720 5340 +2720 5360 +2720 5380 +2720 5420 +2720 5440 +2720 5460 +2720 5480 +2720 5520 +2720 5560 +2720 5580 +2720 5680 +2720 5700 +2720 5720 +2720 5740 +2720 5760 +2720 5780 +2720 5800 +2720 5820 +2720 5840 +2720 5860 +2720 5880 +2720 5900 +2720 5920 +2720 5940 +2720 5960 +2720 5980 +2720 6000 +2720 6020 +2720 6040 +2720 6060 +2720 6080 +2720 6100 +2720 6120 +2720 6140 +2720 6160 +2720 6180 +2720 6200 +2720 6220 +2720 6240 +2720 6260 +2720 6280 +2720 6300 +2720 6320 +2720 6340 +2720 6360 +2720 6380 +2720 6400 +2720 6460 +2720 6480 +2720 6520 +2720 6560 +2720 6580 +2720 6680 +2720 7040 +2720 7160 +2720 7280 +2720 7300 +2720 7320 +2720 7340 +2720 7360 +2720 7380 +2720 7400 +2720 7420 +2720 7440 +2720 7460 +2720 7480 +2720 7500 +2720 7520 +2720 7540 +2720 7560 +2720 7580 +2720 7600 +2720 7620 +2720 7640 +2720 7660 +2720 7680 +2720 7700 +2720 7720 +2720 7740 +2720 7760 +2720 7780 +2720 7800 +2720 7820 +2720 7840 +2720 8040 +2720 8180 +2720 8200 +2720 8240 +2720 8320 +2720 8440 +2720 8460 +2720 8620 +2720 8640 +2720 8660 +2720 8700 +2720 8740 +2720 8760 +2720 8780 +2720 8800 +2720 8820 +2720 8840 +2720 8860 +2720 8880 +2720 8900 +2720 8960 +2720 8980 +2720 9000 +2720 9020 +2720 9040 +2720 9060 +2720 9080 +2720 9100 +2720 9120 +2720 9140 +2720 9160 +2720 9200 +2720 9220 +2720 9240 +2720 9260 +2720 9280 +2720 9300 +2720 9320 +2720 9340 +2720 9360 +2720 9380 +2720 9420 +2720 9440 +2720 9460 +2720 9480 +2720 9500 +2720 9520 +2720 9540 +2720 9780 +2720 9800 +2720 9820 +2720 9860 +2720 9880 +2720 9900 +2720 9920 +2720 9940 +2720 9960 +2720 10000 +2720 10020 +2720 10040 +2720 10060 +2720 10080 +2720 10100 +2720 10120 +2720 10140 +2720 10160 +2720 10220 +2720 10580 +2720 10600 +2720 10640 +2720 10660 +2720 10680 +2720 10700 +2720 10720 +2720 10760 +2720 10780 +2720 10800 +2720 10860 +2720 10880 +2720 10900 +2720 10920 +2720 10940 +2720 10960 +2720 10980 +2720 11000 +2720 11020 +2720 11040 +2720 11060 +2720 11080 +2720 11100 +2720 11120 +2720 11140 +2720 11160 +2720 11200 +2720 11220 +2720 11240 +2720 11260 +2720 11280 +2720 11300 +2720 11320 +2720 11340 +2720 11380 +2720 11440 +2720 11500 +2720 11680 +2720 11720 +2720 11740 +2720 11840 +2720 11960 +2720 11980 +2720 12080 +2720 12120 +2720 12180 +2720 12200 +2720 12220 +2720 12240 +2720 12260 +2720 12280 +2720 12300 +2720 12320 +2720 12340 +2720 12360 +2720 12380 +2720 12420 +2720 12460 +2720 12480 +2720 12500 +2720 12520 +2720 12560 +2720 12580 +2720 12620 +2720 12640 +2720 12660 +2720 12680 +2720 12720 +2720 12740 +2720 12760 +2720 12900 +2720 12960 +2720 13000 +2720 13020 +2720 13040 +2720 13060 +2720 13080 +2720 13100 +2720 13120 +2720 13140 +2720 13160 +2720 13180 +2720 13200 +2720 13240 +2720 13260 +2720 13280 +2720 13300 +2720 13320 +2720 13340 +2720 13380 +2720 13420 +2720 13460 +2720 13540 +2720 13720 +2720 13760 +2720 13780 +2720 13820 +2720 13840 +2720 13880 +2720 13900 +2720 13940 +2720 13960 +2720 14000 +2720 14020 +2720 14060 +2720 14080 +2720 14100 +2720 14120 +2720 14140 +2720 14160 +2720 14180 +2720 14200 +2720 14220 +2720 14240 +2720 14260 +2720 14280 +2720 14300 +2720 14320 +2720 14340 +2720 14360 +2720 14380 +2720 14400 +2720 14420 +2720 14440 +2720 14480 +2720 14500 +2720 14540 +2720 14600 +2720 14620 +2720 14640 +2720 14660 +2720 14700 +2720 14720 +2720 14740 +2720 14760 +2720 14820 +2720 14840 +2720 14860 +2720 14880 +2720 14900 +2720 15560 +2720 15640 +2720 15980 +2720 16000 +2720 16020 +2720 16080 +2720 16120 +2720 16140 +2720 16160 +2720 16200 +2720 16320 +2720 16520 +2720 17440 +2720 17660 +2720 17920 +2740 -23480 +2740 -23460 +2740 -23420 +2740 -23400 +2740 -23380 +2740 -23360 +2740 -22920 +2740 -19680 +2740 -19660 +2740 -18900 +2740 -18860 +2740 -18780 +2740 -17040 +2740 -17020 +2740 -14820 +2740 -14800 +2740 -12740 +2740 -12720 +2740 -12700 +2740 -10900 +2740 -10880 +2740 -10860 +2740 -10800 +2740 -10780 +2740 -10760 +2740 -7640 +2740 -7620 +2740 -7520 +2740 -7400 +2740 -7340 +2740 -7300 +2740 -7260 +2740 -7220 +2740 -7180 +2740 -7160 +2740 -7140 +2740 -7100 +2740 -7080 +2740 -7040 +2740 -7020 +2740 -7000 +2740 -6960 +2740 -6940 +2740 -6920 +2740 -6880 +2740 -6860 +2740 -6660 +2740 -6580 +2740 -6560 +2740 -6520 +2740 -6500 +2740 -6320 +2740 -6300 +2740 -6280 +2740 -6260 +2740 -6240 +2740 -6220 +2740 -6200 +2740 -6180 +2740 -6160 +2740 -6140 +2740 -6080 +2740 -6060 +2740 -6040 +2740 -6020 +2740 -6000 +2740 -5960 +2740 -5940 +2740 -5420 +2740 -5400 +2740 -5380 +2740 -5360 +2740 -5340 +2740 -5320 +2740 -5300 +2740 -5280 +2740 -5260 +2740 -5040 +2740 -5020 +2740 -5000 +2740 -4740 +2740 -4660 +2740 -4640 +2740 -4620 +2740 -4600 +2740 -4580 +2740 -4560 +2740 -4540 +2740 -4520 +2740 -4500 +2740 -4480 +2740 -4460 +2740 -4360 +2740 -4340 +2740 -4320 +2740 -4300 +2740 -4280 +2740 -4260 +2740 -4240 +2740 -4220 +2740 -4200 +2740 -4180 +2740 -4160 +2740 -4140 +2740 -4120 +2740 -4080 +2740 -4040 +2740 -4000 +2740 -3500 +2740 -3480 +2740 -3460 +2740 -3440 +2740 -3420 +2740 -3400 +2740 -3360 +2740 -3340 +2740 -3320 +2740 -3300 +2740 -3280 +2740 -3260 +2740 -3240 +2740 -3220 +2740 -3200 +2740 -3180 +2740 -3160 +2740 -3140 +2740 -3120 +2740 -3100 +2740 -3080 +2740 -3060 +2740 -3040 +2740 -3020 +2740 -3000 +2740 -2980 +2740 -2960 +2740 -2940 +2740 -2920 +2740 -2900 +2740 -2880 +2740 -2860 +2740 -2840 +2740 -2820 +2740 -2780 +2740 -2720 +2740 -2700 +2740 -2660 +2740 -2640 +2740 -2620 +2740 -2440 +2740 -2420 +2740 -2400 +2740 -2380 +2740 -2360 +2740 -2340 +2740 -2320 +2740 -2280 +2740 -2260 +2740 -2240 +2740 -2220 +2740 -2200 +2740 -2180 +2740 -2160 +2740 -2140 +2740 -2120 +2740 -2100 +2740 -2060 +2740 -2040 +2740 -2020 +2740 -2000 +2740 -1980 +2740 -1960 +2740 -1940 +2740 -1920 +2740 -1900 +2740 -1880 +2740 -1860 +2740 -1840 +2740 -1820 +2740 -1800 +2740 -1780 +2740 -1760 +2740 -1740 +2740 -1720 +2740 -1700 +2740 -1680 +2740 -1660 +2740 -1640 +2740 -1620 +2740 -1600 +2740 -1580 +2740 -1560 +2740 -1540 +2740 -1520 +2740 -1500 +2740 -1480 +2740 -1460 +2740 -1440 +2740 -1420 +2740 -1400 +2740 -1380 +2740 -1360 +2740 -1340 +2740 -1320 +2740 -1300 +2740 -1280 +2740 -1260 +2740 -1240 +2740 -1220 +2740 -1200 +2740 -1180 +2740 -1160 +2740 -1140 +2740 -1120 +2740 -1100 +2740 -1080 +2740 -1060 +2740 -1040 +2740 -1020 +2740 -1000 +2740 -980 +2740 -960 +2740 -940 +2740 -920 +2740 -880 +2740 -860 +2740 -840 +2740 -820 +2740 -800 +2740 -780 +2740 -760 +2740 -720 +2740 -700 +2740 -680 +2740 -660 +2740 -640 +2740 -620 +2740 -600 +2740 -580 +2740 -560 +2740 -540 +2740 -520 +2740 -500 +2740 -480 +2740 -460 +2740 -440 +2740 -420 +2740 -400 +2740 -380 +2740 -320 +2740 -300 +2740 -280 +2740 -260 +2740 -240 +2740 -220 +2740 -200 +2740 -140 +2740 -120 +2740 -100 +2740 -80 +2740 -60 +2740 -40 +2740 -20 +2740 0 +2740 20 +2740 40 +2740 60 +2740 80 +2740 100 +2740 120 +2740 140 +2740 160 +2740 180 +2740 200 +2740 220 +2740 240 +2740 260 +2740 280 +2740 300 +2740 320 +2740 340 +2740 360 +2740 380 +2740 400 +2740 420 +2740 440 +2740 460 +2740 480 +2740 500 +2740 520 +2740 540 +2740 560 +2740 580 +2740 600 +2740 620 +2740 640 +2740 660 +2740 680 +2740 700 +2740 720 +2740 740 +2740 760 +2740 780 +2740 800 +2740 820 +2740 840 +2740 860 +2740 880 +2740 900 +2740 920 +2740 940 +2740 960 +2740 980 +2740 1000 +2740 1020 +2740 1040 +2740 1060 +2740 1080 +2740 1100 +2740 1120 +2740 1140 +2740 1160 +2740 1180 +2740 1200 +2740 1220 +2740 1240 +2740 1260 +2740 1280 +2740 1300 +2740 1320 +2740 1340 +2740 1360 +2740 1380 +2740 1400 +2740 1420 +2740 1440 +2740 1460 +2740 1500 +2740 1520 +2740 1560 +2740 1580 +2740 1600 +2740 1620 +2740 1640 +2740 1660 +2740 1680 +2740 1700 +2740 1720 +2740 1740 +2740 1760 +2740 1780 +2740 1800 +2740 1820 +2740 1840 +2740 1860 +2740 1880 +2740 1900 +2740 1920 +2740 1940 +2740 1960 +2740 1980 +2740 2000 +2740 2020 +2740 2040 +2740 2060 +2740 2080 +2740 2140 +2740 2160 +2740 2180 +2740 2200 +2740 2220 +2740 2240 +2740 2260 +2740 2280 +2740 2300 +2740 2320 +2740 2340 +2740 2360 +2740 2380 +2740 2400 +2740 2420 +2740 2460 +2740 2480 +2740 2500 +2740 2520 +2740 2540 +2740 2560 +2740 2580 +2740 2620 +2740 2640 +2740 2660 +2740 2680 +2740 2700 +2740 2740 +2740 2760 +2740 2780 +2740 2800 +2740 2820 +2740 2840 +2740 2860 +2740 2880 +2740 2900 +2740 2920 +2740 2940 +2740 2980 +2740 3280 +2740 3300 +2740 3320 +2740 4080 +2740 4120 +2740 4160 +2740 4180 +2740 4240 +2740 4280 +2740 4300 +2740 4320 +2740 4340 +2740 4360 +2740 4380 +2740 4400 +2740 4420 +2740 4440 +2740 4460 +2740 4480 +2740 4640 +2740 4680 +2740 4700 +2740 4720 +2740 4780 +2740 4800 +2740 4960 +2740 5020 +2740 5060 +2740 5100 +2740 5120 +2740 5140 +2740 5160 +2740 5200 +2740 5220 +2740 5240 +2740 5260 +2740 5280 +2740 5300 +2740 5320 +2740 5340 +2740 5360 +2740 5380 +2740 5400 +2740 5420 +2740 5460 +2740 5480 +2740 5500 +2740 5520 +2740 5560 +2740 5580 +2740 5600 +2740 5640 +2740 5660 +2740 5680 +2740 5740 +2740 5780 +2740 5820 +2740 5840 +2740 5860 +2740 5900 +2740 5920 +2740 5960 +2740 5980 +2740 6100 +2740 6120 +2740 6140 +2740 6160 +2740 6180 +2740 6200 +2740 6240 +2740 6260 +2740 6300 +2740 6320 +2740 6340 +2740 6360 +2740 6380 +2740 6400 +2740 6420 +2740 6440 +2740 6500 +2740 6520 +2740 6620 +2740 6640 +2740 6680 +2740 6720 +2740 6800 +2740 7320 +2740 7340 +2740 7360 +2740 7380 +2740 7480 +2740 7500 +2740 7520 +2740 7540 +2740 7560 +2740 7580 +2740 7600 +2740 7620 +2740 7640 +2740 7660 +2740 7680 +2740 7700 +2740 7760 +2740 7820 +2740 8020 +2740 8120 +2740 8160 +2740 8240 +2740 8560 +2740 8580 +2740 8620 +2740 8680 +2740 8740 +2740 8760 +2740 8780 +2740 8800 +2740 8820 +2740 8840 +2740 8860 +2740 8920 +2740 8960 +2740 8980 +2740 9060 +2740 9120 +2740 9140 +2740 9160 +2740 9300 +2740 9340 +2740 9360 +2740 9380 +2740 9440 +2740 9500 +2740 9520 +2740 9820 +2740 9900 +2740 9960 +2740 10020 +2740 10040 +2740 10080 +2740 10100 +2740 10140 +2740 10160 +2740 10220 +2740 10240 +2740 10280 +2740 10300 +2740 10340 +2740 10380 +2740 10400 +2740 10500 +2740 10580 +2740 10620 +2740 10800 +2740 10840 +2740 10860 +2740 10880 +2740 10900 +2740 10920 +2740 10940 +2740 10980 +2740 11000 +2740 11020 +2740 11060 +2740 11080 +2740 11100 +2740 11140 +2740 11160 +2740 11180 +2740 11220 +2740 11240 +2740 11260 +2740 11280 +2740 11300 +2740 11320 +2740 11340 +2740 11360 +2740 11380 +2740 11400 +2740 11420 +2740 11440 +2740 11460 +2740 11480 +2740 11500 +2740 11520 +2740 11540 +2740 11560 +2740 11580 +2740 11640 +2740 11680 +2740 11700 +2740 11720 +2740 11740 +2740 11800 +2740 11820 +2740 11840 +2740 11860 +2740 11880 +2740 11900 +2740 11920 +2740 11960 +2740 11980 +2740 12020 +2740 12040 +2740 12060 +2740 12100 +2740 12240 +2740 12300 +2740 12320 +2740 12340 +2740 12360 +2740 12380 +2740 12400 +2740 12420 +2740 12440 +2740 12460 +2740 12480 +2740 12500 +2740 12520 +2740 12560 +2740 12680 +2740 13000 +2740 13080 +2740 13100 +2740 13220 +2740 13240 +2740 13280 +2740 13300 +2740 13380 +2740 13400 +2740 13440 +2740 13480 +2740 13580 +2740 13720 +2740 13840 +2740 14020 +2740 14060 +2740 14240 +2740 14260 +2740 16780 +2740 17960 +2740 18000 +2740 22220 +2760 -23440 +2760 -23380 +2760 -23360 +2760 -22940 +2760 -22920 +2760 -19680 +2760 -18840 +2760 -17040 +2760 -14820 +2760 -12720 +2760 -11000 +2760 -10920 +2760 -10880 +2760 -10860 +2760 -10780 +2760 -10760 +2760 -7640 +2760 -7620 +2760 -7520 +2760 -7500 +2760 -7460 +2760 -7440 +2760 -7420 +2760 -7400 +2760 -7360 +2760 -7340 +2760 -7320 +2760 -7300 +2760 -7280 +2760 -7260 +2760 -7240 +2760 -7220 +2760 -7180 +2760 -7160 +2760 -7140 +2760 -7100 +2760 -7080 +2760 -7040 +2760 -7000 +2760 -6960 +2760 -6920 +2760 -6880 +2760 -6840 +2760 -6820 +2760 -6780 +2760 -6600 +2760 -6580 +2760 -6500 +2760 -6460 +2760 -6440 +2760 -6340 +2760 -6320 +2760 -6280 +2760 -6240 +2760 -6220 +2760 -6200 +2760 -6040 +2760 -5920 +2760 -5860 +2760 -5840 +2760 -5820 +2760 -5800 +2760 -5780 +2760 -5760 +2760 -5740 +2760 -5720 +2760 -5700 +2760 -5680 +2760 -5660 +2760 -5640 +2760 -5620 +2760 -5600 +2760 -5580 +2760 -5560 +2760 -5540 +2760 -5520 +2760 -5480 +2760 -5460 +2760 -5440 +2760 -5420 +2760 -5400 +2760 -5380 +2760 -5340 +2760 -5320 +2760 -5300 +2760 -5280 +2760 -5260 +2760 -4680 +2760 -4580 +2760 -4560 +2760 -4520 +2760 -4320 +2760 -4160 +2760 -3500 +2760 -3440 +2760 -3420 +2760 -3400 +2760 -3380 +2760 -3340 +2760 -3320 +2760 -3300 +2760 -3260 +2760 -3240 +2760 -3220 +2760 -3200 +2760 -3180 +2760 -3160 +2760 -3140 +2760 -3120 +2760 -3080 +2760 -3060 +2760 -3040 +2760 -3020 +2760 -3000 +2760 -2980 +2760 -2960 +2760 -2940 +2760 -2920 +2760 -2900 +2760 -2880 +2760 -2860 +2760 -2840 +2760 -2820 +2760 -2440 +2760 -2420 +2760 -2400 +2760 -2380 +2760 -2360 +2760 -2340 +2760 -2320 +2760 -2300 +2760 -2280 +2760 -2260 +2760 -2240 +2760 -2200 +2760 -2180 +2760 -2160 +2760 -2140 +2760 -2120 +2760 -2100 +2760 -2080 +2760 -2060 +2760 -2040 +2760 -2020 +2760 -2000 +2760 -1980 +2760 -1960 +2760 -1940 +2760 -1920 +2760 -1900 +2760 -1880 +2760 -1860 +2760 -1840 +2760 -1820 +2760 -1800 +2760 -1780 +2760 -1760 +2760 -1740 +2760 -1720 +2760 -1700 +2760 -1660 +2760 -1640 +2760 -1620 +2760 -1600 +2760 -1580 +2760 -1560 +2760 -1540 +2760 -1520 +2760 -1480 +2760 -1460 +2760 -1440 +2760 -1420 +2760 -1400 +2760 -1380 +2760 -1360 +2760 -1340 +2760 -1300 +2760 -1280 +2760 -1260 +2760 -1240 +2760 -1220 +2760 -1200 +2760 -1180 +2760 -1160 +2760 -1140 +2760 -1120 +2760 -1100 +2760 -1080 +2760 -1060 +2760 -1040 +2760 -1020 +2760 -1000 +2760 -980 +2760 -960 +2760 -940 +2760 -920 +2760 -900 +2760 -880 +2760 -860 +2760 -840 +2760 -820 +2760 -800 +2760 -780 +2760 -760 +2760 -740 +2760 -720 +2760 -700 +2760 -680 +2760 -660 +2760 -640 +2760 -620 +2760 -600 +2760 -580 +2760 -560 +2760 -540 +2760 -520 +2760 -500 +2760 -480 +2760 -460 +2760 -440 +2760 -420 +2760 -400 +2760 -380 +2760 -360 +2760 -340 +2760 -320 +2760 -300 +2760 -280 +2760 -260 +2760 -240 +2760 -220 +2760 -200 +2760 -180 +2760 -160 +2760 -140 +2760 -120 +2760 -100 +2760 -80 +2760 -60 +2760 -40 +2760 -20 +2760 0 +2760 20 +2760 40 +2760 60 +2760 80 +2760 100 +2760 120 +2760 140 +2760 160 +2760 180 +2760 200 +2760 220 +2760 240 +2760 260 +2760 280 +2760 300 +2760 320 +2760 340 +2760 360 +2760 380 +2760 400 +2760 420 +2760 440 +2760 460 +2760 480 +2760 500 +2760 520 +2760 540 +2760 560 +2760 580 +2760 600 +2760 620 +2760 640 +2760 660 +2760 680 +2760 700 +2760 720 +2760 740 +2760 760 +2760 780 +2760 800 +2760 820 +2760 840 +2760 860 +2760 880 +2760 900 +2760 920 +2760 940 +2760 960 +2760 980 +2760 1000 +2760 1020 +2760 1040 +2760 1060 +2760 1080 +2760 1100 +2760 1120 +2760 1140 +2760 1160 +2760 1180 +2760 1200 +2760 1220 +2760 1240 +2760 1260 +2760 1280 +2760 1300 +2760 1320 +2760 1340 +2760 1360 +2760 1380 +2760 1400 +2760 1420 +2760 1440 +2760 1460 +2760 1480 +2760 1500 +2760 1520 +2760 1540 +2760 1580 +2760 1600 +2760 1620 +2760 1640 +2760 1660 +2760 1680 +2760 1700 +2760 1720 +2760 1740 +2760 1760 +2760 1780 +2760 1800 +2760 1820 +2760 1840 +2760 1860 +2760 1880 +2760 1920 +2760 1940 +2760 1980 +2760 2000 +2760 2020 +2760 2040 +2760 2060 +2760 2080 +2760 2100 +2760 2120 +2760 2140 +2760 2160 +2760 2180 +2760 2200 +2760 2220 +2760 2240 +2760 2260 +2760 2280 +2760 2300 +2760 2320 +2760 2340 +2760 2360 +2760 2380 +2760 2400 +2760 2420 +2760 2440 +2760 2460 +2760 2480 +2760 2500 +2760 2520 +2760 2540 +2760 2580 +2760 2600 +2760 2620 +2760 2640 +2760 2660 +2760 2680 +2760 2700 +2760 2720 +2760 2740 +2760 2760 +2760 2780 +2760 2800 +2760 2820 +2760 2840 +2760 2860 +2760 2880 +2760 2900 +2760 2920 +2760 2940 +2760 2960 +2760 2980 +2760 3000 +2760 3020 +2760 3220 +2760 3260 +2760 3280 +2760 3300 +2760 3320 +2760 3340 +2760 3360 +2760 3380 +2760 3400 +2760 3420 +2760 3440 +2760 3460 +2760 3480 +2760 3500 +2760 3520 +2760 3540 +2760 3560 +2760 3580 +2760 3600 +2760 3620 +2760 3640 +2760 3660 +2760 3680 +2760 3720 +2760 3740 +2760 3760 +2760 3780 +2760 3800 +2760 3820 +2760 3840 +2760 3860 +2760 3880 +2760 3900 +2760 3920 +2760 3940 +2760 3980 +2760 4000 +2760 4040 +2760 4160 +2760 4180 +2760 4240 +2760 4260 +2760 4280 +2760 4300 +2760 4320 +2760 4380 +2760 4400 +2760 4420 +2760 4440 +2760 4460 +2760 4480 +2760 4520 +2760 4540 +2760 4560 +2760 4580 +2760 4600 +2760 4620 +2760 4640 +2760 4660 +2760 4680 +2760 4720 +2760 4740 +2760 4780 +2760 4800 +2760 4820 +2760 4840 +2760 4940 +2760 5020 +2760 5040 +2760 5120 +2760 5180 +2760 5220 +2760 5420 +2760 5440 +2760 5460 +2760 5640 +2760 5660 +2760 5680 +2760 5720 +2760 5740 +2760 5760 +2760 5800 +2760 5820 +2760 5840 +2760 5880 +2760 5900 +2760 5940 +2760 5960 +2760 5980 +2760 6000 +2760 6060 +2760 6100 +2760 6120 +2760 6140 +2760 6160 +2760 6200 +2760 6360 +2760 6380 +2760 6400 +2760 6500 +2760 6520 +2760 6540 +2760 6560 +2760 6580 +2760 6600 +2760 6620 +2760 6640 +2760 6680 +2760 6720 +2760 6760 +2760 6780 +2760 6820 +2760 7640 +2760 7660 +2760 7680 +2760 7700 +2760 8060 +2760 8160 +2760 8180 +2760 8200 +2760 8500 +2760 8520 +2760 8580 +2760 8600 +2760 8620 +2760 8860 +2760 8880 +2760 8920 +2760 8960 +2760 9040 +2760 9060 +2760 9080 +2760 9100 +2760 9120 +2760 9140 +2760 9160 +2760 9180 +2760 9420 +2760 9480 +2760 9500 +2760 9520 +2760 10160 +2760 10180 +2760 10220 +2760 10260 +2760 10280 +2760 10300 +2760 10320 +2760 10360 +2760 10380 +2760 10420 +2760 10560 +2760 10640 +2760 10880 +2760 10920 +2760 10960 +2760 11000 +2760 11020 +2760 11040 +2760 11080 +2760 11100 +2760 11120 +2760 11140 +2760 11160 +2760 11200 +2760 11220 +2760 11240 +2760 11260 +2760 11280 +2760 11300 +2760 11380 +2760 11400 +2760 11420 +2760 11460 +2760 11500 +2760 11520 +2760 11540 +2760 11600 +2760 11700 +2760 11760 +2760 11860 +2760 11880 +2760 11900 +2760 11940 +2760 11980 +2760 12000 +2760 12020 +2760 12060 +2760 12080 +2760 12100 +2760 12140 +2760 12160 +2760 12180 +2760 12200 +2760 12240 +2760 12280 +2760 12300 +2760 12360 +2760 12380 +2760 12400 +2760 12440 +2760 12460 +2760 12480 +2760 12500 +2760 12520 +2760 12540 +2760 12560 +2760 12580 +2760 12600 +2760 12620 +2760 12820 +2760 12880 +2760 12900 +2760 12940 +2760 13000 +2760 13040 +2760 13060 +2760 13100 +2760 13120 +2760 13140 +2760 13160 +2760 13200 +2760 13240 +2760 13300 +2760 13340 +2760 13360 +2760 13380 +2760 13440 +2760 13480 +2760 13500 +2760 13580 +2760 13720 +2760 14120 +2760 14260 +2760 14300 +2760 16040 +2760 16760 +2760 17980 +2760 18000 +2760 21360 +2780 -23480 +2780 -23460 +2780 -23420 +2780 -23380 +2780 -23360 +2780 -17020 +2780 -17000 +2780 -11020 +2780 -10900 +2780 -10880 +2780 -10860 +2780 -10780 +2780 -10760 +2780 -7640 +2780 -7620 +2780 -6020 +2780 -6000 +2780 -5960 +2780 -5880 +2780 -5800 +2780 -5780 +2780 -5520 +2780 -5440 +2780 -5280 +2780 -5260 +2780 -5040 +2780 -4580 +2780 -4560 +2780 -4520 +2780 -4360 +2780 -3560 +2780 -3540 +2780 -3520 +2780 -3500 +2780 -3460 +2780 -3440 +2780 -3420 +2780 -3400 +2780 -3380 +2780 -3360 +2780 -3340 +2780 -3320 +2780 -3300 +2780 -3280 +2780 -3260 +2780 -3240 +2780 -3220 +2780 -3200 +2780 -3180 +2780 -3160 +2780 -3140 +2780 -3120 +2780 -3100 +2780 -3080 +2780 -3060 +2780 -3040 +2780 -2960 +2780 -2820 +2780 -2440 +2780 -2420 +2780 -2400 +2780 3000 +2780 3020 +2780 3100 +2780 3120 +2780 3140 +2780 3200 +2780 3260 +2780 3280 +2780 3400 +2780 3480 +2780 3500 +2780 3540 +2780 3600 +2780 4160 +2780 4720 +2780 4800 +2780 4880 +2780 4980 +2780 5020 +2780 5040 +2780 5100 +2780 5140 +2780 5160 +2780 5180 +2780 5220 +2780 5360 +2780 5380 +2780 5400 +2780 5420 +2780 5480 +2780 5500 +2780 5520 +2780 5540 +2780 5560 +2780 5580 +2780 5600 +2780 5620 +2780 5640 +2780 5680 +2780 5700 +2780 5720 +2780 5740 +2780 5760 +2780 5780 +2780 5800 +2780 5820 +2780 5840 +2780 5860 +2780 5900 +2780 5920 +2780 5960 +2780 6000 +2780 6040 +2780 6060 +2780 6080 +2780 6140 +2780 6160 +2780 6200 +2780 6220 +2780 6240 +2780 6260 +2780 6380 +2780 6420 +2780 6440 +2780 6500 +2780 6520 +2780 6560 +2780 6580 +2780 6600 +2780 6620 +2780 6640 +2780 6660 +2780 6680 +2780 6700 +2780 6720 +2780 6740 +2780 6760 +2780 6800 +2780 6820 +2780 6840 +2780 6860 +2780 6880 +2780 6900 +2780 6940 +2780 7680 +2780 7700 +2780 7720 +2780 8180 +2780 8200 +2780 8240 +2780 8260 +2780 8280 +2780 8300 +2780 8500 +2780 8540 +2780 8960 +2780 8980 +2780 9020 +2780 9060 +2780 9080 +2780 9220 +2780 9380 +2780 10440 +2780 10700 +2780 11220 +2780 11560 +2780 11580 +2780 11600 +2780 11760 +2780 11880 +2780 12080 +2780 12180 +2780 12200 +2780 12260 +2780 12300 +2780 12400 +2780 12500 +2780 12540 +2780 12560 +2780 12600 +2780 12660 +2780 12700 +2780 12720 +2780 12760 +2780 12780 +2780 12800 +2780 12900 +2780 12920 +2780 12940 +2780 13040 +2780 13380 +2780 14100 +2780 14140 +2780 16020 +2780 16100 +2780 17980 +2780 18000 +2780 21280 +2780 21320 +2780 21380 +2800 -23480 +2800 -23460 +2800 -23440 +2800 -23380 +2800 -23360 +2800 -18740 +2800 -17020 +2800 -11020 +2800 -10900 +2800 -10880 +2800 -10800 +2800 -10780 +2800 -10760 +2800 -10740 +2800 -7640 +2800 -7620 +2800 -7520 +2800 -6280 +2800 -6260 +2800 -5740 +2800 -5260 +2800 -5140 +2800 -5100 +2800 -5040 +2800 -5000 +2800 -4960 +2800 -4920 +2800 -4900 +2800 -4880 +2800 -4820 +2800 -4740 +2800 -4660 +2800 -4600 +2800 -4580 +2800 -4560 +2800 -4540 +2800 -4520 +2800 -4500 +2800 -4480 +2800 -4360 +2800 -4340 +2800 -3960 +2800 -3920 +2800 -3540 +2800 -3360 +2800 -3140 +2800 -2820 +2800 -2800 +2800 -2400 +2800 3000 +2800 3020 +2800 3100 +2800 3140 +2800 3160 +2800 3220 +2800 3240 +2800 3720 +2800 4100 +2800 4540 +2800 4600 +2800 4620 +2800 4660 +2800 4680 +2800 4720 +2800 4740 +2800 4860 +2800 4880 +2800 4960 +2800 5000 +2800 5040 +2800 5060 +2800 5120 +2800 5160 +2800 5420 +2800 5460 +2800 5480 +2800 5540 +2800 5560 +2800 5620 +2800 5640 +2800 5660 +2800 5720 +2800 5960 +2800 6000 +2800 6020 +2800 6060 +2800 6200 +2800 6240 +2800 6300 +2800 6320 +2800 6340 +2800 6440 +2800 6460 +2800 6500 +2800 6520 +2800 6560 +2800 6580 +2800 6620 +2800 6640 +2800 6700 +2800 6720 +2800 6740 +2800 6760 +2800 6780 +2800 6800 +2800 6820 +2800 6880 +2800 6920 +2800 6940 +2800 8080 +2800 8540 +2800 8700 +2800 8720 +2800 8740 +2800 8940 +2800 8960 +2800 9000 +2800 9080 +2800 9740 +2800 10440 +2800 10500 +2800 10600 +2800 11220 +2800 11500 +2800 11520 +2800 11600 +2800 11780 +2800 11800 +2800 11960 +2800 11980 +2800 12080 +2800 12240 +2800 12480 +2800 12600 +2800 12860 +2800 13040 +2800 13480 +2800 13500 +2800 14120 +2800 14140 +2800 15960 +2800 16040 +2800 16060 +2800 18000 +2800 18020 +2800 21420 +2820 -23380 +2820 -23360 +2820 -19700 +2820 -18180 +2820 -17040 +2820 -10900 +2820 -10880 +2820 -10800 +2820 -10780 +2820 -10760 +2820 -7640 +2820 -7620 +2820 -7540 +2820 -7520 +2820 -6300 +2820 -6280 +2820 -6260 +2820 -6240 +2820 -6220 +2820 -5280 +2820 -5260 +2820 -5240 +2820 -5220 +2820 -5200 +2820 -5180 +2820 -5160 +2820 -5140 +2820 -5120 +2820 -5100 +2820 -5080 +2820 -5060 +2820 -5040 +2820 -5020 +2820 -5000 +2820 -4980 +2820 -4960 +2820 -4940 +2820 -4920 +2820 -4900 +2820 -4880 +2820 -4860 +2820 -4840 +2820 -4820 +2820 -4800 +2820 -4780 +2820 -4760 +2820 -4740 +2820 -4720 +2820 -4700 +2820 -4680 +2820 -4660 +2820 -4640 +2820 -4620 +2820 -4600 +2820 -4580 +2820 -4560 +2820 -4540 +2820 -4520 +2820 -4500 +2820 -4480 +2820 -4460 +2820 -4440 +2820 -4420 +2820 -4400 +2820 -4380 +2820 -4360 +2820 -3540 +2820 -2440 +2820 -2420 +2820 -2400 +2820 3000 +2820 3020 +2820 3120 +2820 3200 +2820 3280 +2820 3940 +2820 4160 +2820 6360 +2820 6760 +2820 6840 +2820 8060 +2820 8080 +2820 8100 +2820 8140 +2820 8320 +2820 8420 +2820 8920 +2820 8940 +2820 8960 +2820 9040 +2820 9220 +2820 10380 +2820 10420 +2820 11540 +2820 11780 +2820 11800 +2820 11980 +2820 12740 +2820 13460 +2820 17220 +2820 17260 +2820 17300 +2820 17820 +2820 17840 +2820 17860 +2820 17880 +2820 18000 +2820 18020 +2820 18040 +2820 21340 +2820 21360 +2820 21400 +2840 -23480 +2840 -23460 +2840 -23380 +2840 -23360 +2840 -19700 +2840 -19660 +2840 -19640 +2840 -19020 +2840 -19000 +2840 -18160 +2840 -17040 +2840 -17020 +2840 -10900 +2840 -10880 +2840 -10800 +2840 -10780 +2840 -10760 +2840 -7640 +2840 -7620 +2840 -7540 +2840 -6280 +2840 -6240 +2840 -5280 +2840 -5260 +2840 -5240 +2840 -5220 +2840 -5200 +2840 -5180 +2840 -5160 +2840 -5140 +2840 -5120 +2840 -5100 +2840 -5080 +2840 -5060 +2840 -5040 +2840 -5020 +2840 -5000 +2840 -4980 +2840 -4960 +2840 -4940 +2840 -4920 +2840 -4900 +2840 -4880 +2840 -4860 +2840 -4840 +2840 -4820 +2840 -4800 +2840 -4780 +2840 -4760 +2840 -4740 +2840 -4720 +2840 -4700 +2840 -4660 +2840 -4620 +2840 -4600 +2840 -4560 +2840 -4540 +2840 -4460 +2840 -4440 +2840 -3540 +2840 -2820 +2840 -2440 +2840 -2420 +2840 -2400 +2840 3000 +2840 3020 +2840 3080 +2840 3140 +2840 3180 +2840 3220 +2840 3240 +2840 3260 +2840 3300 +2840 4900 +2840 4920 +2840 4980 +2840 6380 +2840 6400 +2840 7680 +2840 8040 +2840 8060 +2840 8940 +2840 8960 +2840 9020 +2840 9180 +2840 9220 +2840 9280 +2840 9460 +2840 10340 +2840 10440 +2840 10480 +2840 10560 +2840 11600 +2840 11660 +2840 11700 +2840 11800 +2840 11980 +2840 16060 +2840 17820 +2840 17860 +2840 17880 +2840 17980 +2840 18000 +2840 22020 +2860 -23500 +2860 -23480 +2860 -23380 +2860 -23360 +2860 -23000 +2860 -22940 +2860 -19720 +2860 -19700 +2860 -19080 +2860 -17040 +2860 -17020 +2860 -11020 +2860 -10900 +2860 -10880 +2860 -10800 +2860 -10780 +2860 -10760 +2860 -7640 +2860 -7620 +2860 -7540 +2860 -7520 +2860 -6240 +2860 -2800 +2860 -2440 +2860 -2420 +2860 -2400 +2860 3000 +2860 3020 +2860 3100 +2860 3140 +2860 3160 +2860 3180 +2860 3200 +2860 3220 +2860 4880 +2860 4920 +2860 4960 +2860 6380 +2860 6860 +2860 6900 +2860 8060 +2860 8100 +2860 8140 +2860 8160 +2860 8920 +2860 9060 +2860 9180 +2860 9300 +2860 9360 +2860 9400 +2860 10440 +2860 11480 +2860 11500 +2860 11680 +2860 11980 +2860 13500 +2860 13740 +2860 15960 +2860 16060 +2860 16080 +2860 16100 +2860 16200 +2860 16520 +2860 16540 +2860 16720 +2860 16800 +2860 16960 +2860 17100 +2860 17840 +2860 18000 +2880 -23380 +2880 -23360 +2880 -22940 +2880 -22920 +2880 -19700 +2880 -19100 +2880 -18120 +2880 -17040 +2880 -17020 +2880 -12880 +2880 -12860 +2880 -11020 +2880 -11000 +2880 -10900 +2880 -10880 +2880 -10800 +2880 -10780 +2880 -10760 +2880 -7640 +2880 -7620 +2880 -7540 +2880 -3540 +2880 -2820 +2880 -2440 +2880 -2420 +2880 -2400 +2880 3000 +2880 3020 +2880 3120 +2880 3140 +2880 3160 +2880 4920 +2880 4940 +2880 6340 +2880 6900 +2880 8040 +2880 8060 +2880 8120 +2880 8140 +2880 9020 +2880 9060 +2880 10460 +2880 10500 +2880 10740 +2880 10760 +2880 11980 +2880 13620 +2880 13720 +2880 15960 +2880 15980 +2880 16000 +2880 16020 +2880 16040 +2880 16060 +2880 16100 +2880 16160 +2880 16200 +2880 16520 +2880 16540 +2880 17000 +2880 17040 +2880 17980 +2880 18000 +2880 18040 +2900 -23500 +2900 -23460 +2900 -23380 +2900 -23360 +2900 -22980 +2900 -22960 +2900 -22940 +2900 -22920 +2900 -22900 +2900 -19720 +2900 -18120 +2900 -17040 +2900 -12860 +2900 -12840 +2900 -11020 +2900 -11000 +2900 -10900 +2900 -10880 +2900 -10800 +2900 -10780 +2900 -10760 +2900 -7640 +2900 -7620 +2900 -3540 +2900 -2820 +2900 -2420 +2900 -2400 +2900 3000 +2900 3020 +2900 3100 +2900 3140 +2900 4920 +2900 4940 +2900 6340 +2900 6900 +2900 6920 +2900 8060 +2900 8080 +2900 8120 +2900 8320 +2900 9380 +2900 9460 +2900 9480 +2900 10380 +2900 10580 +2900 10600 +2900 11500 +2900 11700 +2900 13700 +2900 13720 +2900 15960 +2900 16160 +2900 16180 +2900 16720 +2900 18000 +2900 18020 +2900 18040 +2920 -23500 +2920 -23480 +2920 -23380 +2920 -23360 +2920 -22980 +2920 -22940 +2920 -22900 +2920 -19640 +2920 -19620 +2920 -17040 +2920 -17020 +2920 -12900 +2920 -12880 +2920 -12860 +2920 -12840 +2920 -12800 +2920 -12780 +2920 -12760 +2920 -10900 +2920 -10880 +2920 -10800 +2920 -10780 +2920 -10760 +2920 -10740 +2920 -7640 +2920 -7620 +2920 -7540 +2920 -7520 +2920 -3540 +2920 -2820 +2920 -2800 +2920 -2440 +2920 -2420 +2920 -2400 +2920 3000 +2920 3020 +2920 3080 +2920 3100 +2920 3120 +2920 3200 +2920 6320 +2920 6840 +2920 6860 +2920 8040 +2920 8060 +2920 8080 +2920 8340 +2920 8680 +2920 9380 +2920 10540 +2920 10660 +2920 11460 +2920 11480 +2920 11500 +2920 11520 +2920 11580 +2920 11640 +2920 11980 +2920 12000 +2920 13580 +2920 14200 +2920 16180 +2920 16720 +2920 18000 +2940 -23500 +2940 -23380 +2940 -23360 +2940 -22960 +2940 -22940 +2940 -22920 +2940 -22900 +2940 -19520 +2940 -19500 +2940 -19200 +2940 -18120 +2940 -17020 +2940 -12880 +2940 -12860 +2940 -12840 +2940 -12820 +2940 -12780 +2940 -12760 +2940 -10880 +2940 -10800 +2940 -10780 +2940 -10760 +2940 -7640 +2940 -7620 +2940 -7520 +2940 -6280 +2940 -3560 +2940 -3540 +2940 -2440 +2940 -2420 +2940 -2400 +2940 3000 +2940 3020 +2940 3100 +2940 3120 +2940 3140 +2940 6840 +2940 8040 +2940 8080 +2940 9340 +2940 9500 +2940 10400 +2940 10520 +2940 10540 +2940 10660 +2940 10680 +2940 11500 +2940 11520 +2940 11540 +2940 11560 +2940 11580 +2940 11600 +2940 11620 +2940 11960 +2940 12000 +2940 13580 +2940 13700 +2940 16720 +2940 17980 +2940 18000 +2940 18020 +2960 -23500 +2960 -23400 +2960 -23380 +2960 -22960 +2960 -22940 +2960 -22920 +2960 -19380 +2960 -19180 +2960 -17020 +2960 -13980 +2960 -13960 +2960 -13940 +2960 -13860 +2960 -12860 +2960 -12840 +2960 -12740 +2960 -10920 +2960 -10880 +2960 -10800 +2960 -10780 +2960 -10760 +2960 -7640 +2960 -7620 +2960 -7520 +2960 -6260 +2960 -5840 +2960 -3540 +2960 -2820 +2960 -2440 +2960 -2420 +2960 -2400 +2960 3000 +2960 3020 +2960 3120 +2960 3160 +2960 6860 +2960 6900 +2960 6920 +2960 8040 +2960 8060 +2960 8680 +2960 9400 +2960 9420 +2960 10300 +2960 10320 +2960 10580 +2960 10640 +2960 10660 +2960 11520 +2960 11540 +2960 11580 +2960 11600 +2960 12000 +2960 17980 +2960 18000 +2960 18020 +2980 -23500 +2980 -23380 +2980 -22940 +2980 -22920 +2980 -22900 +2980 -19360 +2980 -19200 +2980 -19120 +2980 -17040 +2980 -17020 +2980 -14020 +2980 -14000 +2980 -13980 +2980 -13960 +2980 -13940 +2980 -13920 +2980 -13900 +2980 -13880 +2980 -13860 +2980 -11000 +2980 -10980 +2980 -10920 +2980 -10880 +2980 -10800 +2980 -10780 +2980 -10760 +2980 -7640 +2980 -7620 +2980 -7600 +2980 -7540 +2980 -5860 +2980 -5840 +2980 -5820 +2980 -5800 +2980 -5780 +2980 -5740 +2980 -5720 +2980 -3560 +2980 -3540 +2980 -2820 +2980 -2440 +2980 -2420 +2980 3000 +2980 3020 +2980 3100 +2980 3120 +2980 3140 +2980 3160 +2980 4820 +2980 4840 +2980 4960 +2980 5000 +2980 6920 +2980 6960 +2980 8080 +2980 8320 +2980 8600 +2980 8680 +2980 8700 +2980 9480 +2980 10240 +2980 10560 +2980 10580 +2980 10620 +2980 11500 +2980 11540 +2980 13640 +2980 13720 +2980 14240 +2980 16720 +2980 17980 +2980 18000 +2980 18040 +2980 22040 +3000 -23400 +3000 -23380 +3000 -23360 +3000 -23000 +3000 -22940 +3000 -22920 +3000 -19220 +3000 -18820 +3000 -17060 +3000 -17040 +3000 -13900 +3000 -13880 +3000 -13860 +3000 -13840 +3000 -13800 +3000 -10980 +3000 -10920 +3000 -10900 +3000 -10880 +3000 -10800 +3000 -10780 +3000 -10760 +3000 -7640 +3000 -7620 +3000 -6940 +3000 -5860 +3000 -5720 +3000 -5700 +3000 -5680 +3000 -5660 +3000 -5640 +3000 -5600 +3000 -3540 +3000 -2820 +3000 -2420 +3000 -2400 +3000 3000 +3000 3020 +3000 3100 +3000 3140 +3000 3160 +3000 4080 +3000 4980 +3000 5140 +3000 6860 +3000 8060 +3000 8100 +3000 8520 +3000 10240 +3000 10580 +3000 10620 +3000 10640 +3000 11540 +3000 11560 +3000 13720 +3000 13740 +3000 14200 +3000 16720 +3000 18000 +3000 18020 +3000 18040 +3000 21960 +3020 -23400 +3020 -23380 +3020 -23360 +3020 -23020 +3020 -23000 +3020 -22980 +3020 -22940 +3020 -22900 +3020 -18800 +3020 -18600 +3020 -18580 +3020 -17020 +3020 -14780 +3020 -14100 +3020 -13840 +3020 -13820 +3020 -13800 +3020 -10980 +3020 -10900 +3020 -10880 +3020 -10800 +3020 -10780 +3020 -10760 +3020 -7640 +3020 -7620 +3020 -7540 +3020 -7520 +3020 -6280 +3020 -5960 +3020 -5900 +3020 -5860 +3020 -5580 +3020 -3540 +3020 -2820 +3020 -2440 +3020 -2420 +3020 -2400 +3020 3000 +3020 3020 +3020 3120 +3020 4920 +3020 5140 +3020 5260 +3020 5280 +3020 8080 +3020 8320 +3020 9840 +3020 10280 +3020 12000 +3020 12020 +3020 12540 +3020 13700 +3020 14200 +3020 14220 +3020 14240 +3020 17980 +3020 18000 +3020 18020 +3020 22000 +3020 22180 +3020 22500 +3040 -23500 +3040 -23440 +3040 -23420 +3040 -23400 +3040 -23380 +3040 -23360 +3040 -22960 +3040 -22940 +3040 -22900 +3040 -18660 +3040 -17040 +3040 -17020 +3040 -14780 +3040 -14760 +3040 -13820 +3040 -13800 +3040 -13780 +3040 -10900 +3040 -10880 +3040 -10800 +3040 -10780 +3040 -10760 +3040 -7640 +3040 -7620 +3040 -5980 +3040 -5920 +3040 -5860 +3040 -5560 +3040 -3540 +3040 -2820 +3040 -2420 +3040 -2400 +3040 3000 +3040 3020 +3040 3100 +3040 3160 +3040 4920 +3040 5200 +3040 5220 +3040 5260 +3040 5300 +3040 6920 +3040 7620 +3040 8060 +3040 8080 +3040 8340 +3040 9500 +3040 10260 +3040 10360 +3040 10380 +3040 12020 +3040 12520 +3040 13160 +3040 13720 +3040 17980 +3040 18000 +3040 18040 +3040 22040 +3060 -23500 +3060 -23480 +3060 -23420 +3060 -23380 +3060 -23360 +3060 -23340 +3060 -23300 +3060 -23240 +3060 -23180 +3060 -23120 +3060 -23060 +3060 -23040 +3060 -23020 +3060 -23000 +3060 -22980 +3060 -22960 +3060 -22940 +3060 -18620 +3060 -18120 +3060 -17040 +3060 -17020 +3060 -14780 +3060 -14760 +3060 -14740 +3060 -13800 +3060 -13780 +3060 -13760 +3060 -10980 +3060 -10960 +3060 -10940 +3060 -10900 +3060 -10880 +3060 -10800 +3060 -10780 +3060 -10760 +3060 -7640 +3060 -7620 +3060 -7540 +3060 -7520 +3060 -6260 +3060 -5980 +3060 -5940 +3060 -5900 +3060 -5880 +3060 -5860 +3060 -5840 +3060 -5560 +3060 -5540 +3060 -3540 +3060 -2820 +3060 -2420 +3060 -2400 +3060 3000 +3060 3020 +3060 3120 +3060 3180 +3060 4940 +3060 4960 +3060 5280 +3060 6060 +3060 6180 +3060 6860 +3060 8060 +3060 8080 +3060 8100 +3060 8660 +3060 8700 +3060 9860 +3060 10280 +3060 10300 +3060 12520 +3060 12540 +3060 12560 +3060 12580 +3060 12600 +3060 12620 +3060 12680 +3060 12720 +3060 12740 +3060 12760 +3060 12780 +3060 12800 +3060 12820 +3060 12840 +3060 12880 +3060 13080 +3060 13140 +3060 13620 +3060 13700 +3060 13720 +3060 16720 +3060 18000 +3060 18020 +3060 21880 +3060 22080 +3080 -23500 +3080 -23440 +3080 -23400 +3080 -23380 +3080 -23360 +3080 -23340 +3080 -23320 +3080 -23300 +3080 -23280 +3080 -23260 +3080 -23240 +3080 -23220 +3080 -23200 +3080 -23180 +3080 -23160 +3080 -23140 +3080 -23120 +3080 -23100 +3080 -23060 +3080 -23020 +3080 -23000 +3080 -22960 +3080 -22940 +3080 -22900 +3080 -18120 +3080 -17040 +3080 -17020 +3080 -14760 +3080 -14660 +3080 -14200 +3080 -13800 +3080 -13780 +3080 -13760 +3080 -13740 +3080 -10980 +3080 -10900 +3080 -10880 +3080 -10800 +3080 -10780 +3080 -10760 +3080 -7640 +3080 -7620 +3080 -6740 +3080 -5920 +3080 -5540 +3080 -5520 +3080 -3540 +3080 -2440 +3080 -2420 +3080 -2400 +3080 3000 +3080 3020 +3080 3080 +3080 3120 +3080 3140 +3080 3180 +3080 3200 +3080 4860 +3080 4880 +3080 4900 +3080 5200 +3080 5220 +3080 5260 +3080 5280 +3080 5300 +3080 6080 +3080 6100 +3080 6200 +3080 6820 +3080 6860 +3080 6900 +3080 6920 +3080 8080 +3080 8320 +3080 8640 +3080 8700 +3080 9800 +3080 10240 +3080 12520 +3080 12540 +3080 12560 +3080 12580 +3080 12600 +3080 12620 +3080 12640 +3080 12660 +3080 12680 +3080 12700 +3080 12720 +3080 12740 +3080 12760 +3080 12820 +3080 12840 +3080 12880 +3080 13700 +3080 13720 +3080 13740 +3080 16700 +3080 17980 +3080 18000 +3080 18020 +3100 -23500 +3100 -23480 +3100 -23420 +3100 -23400 +3100 -23380 +3100 -23360 +3100 -23300 +3100 -23240 +3100 -23200 +3100 -23180 +3100 -23160 +3100 -23140 +3100 -23120 +3100 -23100 +3100 -23080 +3100 -23060 +3100 -23040 +3100 -23000 +3100 -22980 +3100 -22960 +3100 -22940 +3100 -22920 +3100 -17060 +3100 -17040 +3100 -17020 +3100 -14780 +3100 -14760 +3100 -14740 +3100 -14700 +3100 -14660 +3100 -13780 +3100 -13760 +3100 -13740 +3100 -10980 +3100 -10900 +3100 -10800 +3100 -10780 +3100 -10760 +3100 -7620 +3100 -7600 +3100 -6740 +3100 -6720 +3100 -6260 +3100 -5960 +3100 -5920 +3100 -5880 +3100 -5520 +3100 -3540 +3100 -2820 +3100 -2420 +3100 -2400 +3100 3000 +3100 3020 +3100 3100 +3100 3120 +3100 3140 +3100 3180 +3100 5160 +3100 5220 +3100 5260 +3100 5280 +3100 6180 +3100 6860 +3100 6920 +3100 7700 +3100 8060 +3100 8080 +3100 8100 +3100 8340 +3100 8660 +3100 8700 +3100 10220 +3100 10240 +3100 12560 +3100 12600 +3100 12640 +3100 12700 +3100 12780 +3100 12820 +3100 12860 +3100 12880 +3100 13600 +3100 13700 +3100 13720 +3100 16680 +3100 16700 +3100 16720 +3100 18000 +3100 18020 +3100 18040 +3100 22100 +3100 22240 +3120 -23500 +3120 -23480 +3120 -22980 +3120 -22960 +3120 -22940 +3120 -17060 +3120 -17020 +3120 -17000 +3120 -14780 +3120 -14760 +3120 -14680 +3120 -14660 +3120 -13760 +3120 -13740 +3120 -13720 +3120 -10980 +3120 -10960 +3120 -10900 +3120 -10880 +3120 -10800 +3120 -10780 +3120 -10760 +3120 -10740 +3120 -7640 +3120 -7620 +3120 -7520 +3120 -6460 +3120 -6260 +3120 -5980 +3120 -5880 +3120 -5860 +3120 -5500 +3120 -3540 +3120 -3520 +3120 -2420 +3120 -2400 +3120 3020 +3120 3100 +3120 3120 +3120 3200 +3120 4920 +3120 4960 +3120 5000 +3120 5200 +3120 5240 +3120 5260 +3120 6080 +3120 6140 +3120 6180 +3120 8080 +3120 8340 +3120 8480 +3120 9040 +3120 9060 +3120 9080 +3120 9140 +3120 9260 +3120 9760 +3120 10300 +3120 10360 +3120 13040 +3120 13060 +3120 13080 +3120 13720 +3120 16680 +3120 16700 +3120 18000 +3120 18020 +3120 18040 +3140 -23500 +3140 -23480 +3140 -18120 +3140 -18100 +3140 -17040 +3140 -17020 +3140 -14780 +3140 -14720 +3140 -14680 +3140 -14640 +3140 -14280 +3140 -13740 +3140 -13720 +3140 -10980 +3140 -10900 +3140 -10880 +3140 -10800 +3140 -10780 +3140 -10760 +3140 -7640 +3140 -7620 +3140 -6720 +3140 -6700 +3140 -6680 +3140 -6660 +3140 -6620 +3140 -6600 +3140 -6580 +3140 -6540 +3140 -6420 +3140 -6340 +3140 -6300 +3140 -5880 +3140 -5480 +3140 -5460 +3140 -3540 +3140 -3520 +3140 -2820 +3140 -2440 +3140 -2420 +3140 -2400 +3140 3000 +3140 3020 +3140 3100 +3140 3120 +3140 3140 +3140 3160 +3140 3180 +3140 3200 +3140 4860 +3140 4880 +3140 4900 +3140 4920 +3140 4940 +3140 5000 +3140 5180 +3140 5200 +3140 5220 +3140 5240 +3140 6060 +3140 6080 +3140 6100 +3140 6120 +3140 6140 +3140 6160 +3140 6200 +3140 6860 +3140 6880 +3140 6920 +3140 8060 +3140 8080 +3140 8260 +3140 8300 +3140 8320 +3140 8340 +3140 8360 +3140 8380 +3140 8400 +3140 8420 +3140 8440 +3140 8460 +3140 8480 +3140 8500 +3140 8520 +3140 8540 +3140 8560 +3140 8580 +3140 8600 +3140 8620 +3140 8640 +3140 9020 +3140 9040 +3140 9100 +3140 9140 +3140 9160 +3140 9280 +3140 9320 +3140 9340 +3140 9400 +3140 9880 +3140 9900 +3140 10280 +3140 10300 +3140 10380 +3140 13020 +3140 13040 +3140 13060 +3140 13080 +3140 13100 +3140 13580 +3140 13640 +3140 13700 +3140 13720 +3140 13740 +3140 16700 +3140 16720 +3140 18000 +3140 18020 +3160 -23500 +3160 -23480 +3160 -18120 +3160 -17040 +3160 -17020 +3160 -14720 +3160 -14700 +3160 -14680 +3160 -13740 +3160 -13720 +3160 -11000 +3160 -10980 +3160 -10880 +3160 -10820 +3160 -10800 +3160 -10780 +3160 -10760 +3160 -7640 +3160 -7620 +3160 -7600 +3160 -6680 +3160 -6660 +3160 -6640 +3160 -6620 +3160 -6600 +3160 -6580 +3160 -6560 +3160 -6540 +3160 -6520 +3160 -6500 +3160 -6480 +3160 -6460 +3160 -6440 +3160 -6420 +3160 -6400 +3160 -6380 +3160 -6360 +3160 -6340 +3160 -6320 +3160 -6300 +3160 -6280 +3160 -6260 +3160 -5920 +3160 -5480 +3160 -5460 +3160 -4240 +3160 -3540 +3160 -3520 +3160 -2820 +3160 -2420 +3160 -2400 +3160 3020 +3160 3100 +3160 3140 +3160 4900 +3160 4920 +3160 4940 +3160 6080 +3160 6120 +3160 6140 +3160 6900 +3160 8080 +3160 8100 +3160 8260 +3160 8300 +3160 8320 +3160 8340 +3160 8400 +3160 8420 +3160 8460 +3160 8500 +3160 8520 +3160 8540 +3160 8560 +3160 8620 +3160 8660 +3160 9240 +3160 9260 +3160 9300 +3160 9320 +3160 9360 +3160 9380 +3160 9420 +3160 9900 +3160 10260 +3160 10280 +3160 10300 +3160 10400 +3160 13040 +3160 13720 +3160 16680 +3160 16700 +3160 18000 +3160 18020 +3160 18040 +3160 22280 +3180 -23500 +3180 -23480 +3180 -23460 +3180 -17020 +3180 -17000 +3180 -14700 +3180 -14660 +3180 -14480 +3180 -13760 +3180 -13740 +3180 -13720 +3180 -10900 +3180 -10880 +3180 -10800 +3180 -10780 +3180 -10760 +3180 -7640 +3180 -7620 +3180 -6660 +3180 -6640 +3180 -6620 +3180 -6580 +3180 -6560 +3180 -6540 +3180 -6520 +3180 -6500 +3180 -6480 +3180 -6460 +3180 -6440 +3180 -6420 +3180 -6400 +3180 -6380 +3180 -6360 +3180 -6340 +3180 -6320 +3180 -6300 +3180 -6280 +3180 -6260 +3180 -5920 +3180 -5880 +3180 -5460 +3180 -5440 +3180 -3540 +3180 -3520 +3180 -2420 +3180 -2400 +3180 3000 +3180 3020 +3180 3100 +3180 3120 +3180 4140 +3180 4920 +3180 4940 +3180 4960 +3180 5000 +3180 6060 +3180 6080 +3180 6100 +3180 6120 +3180 6160 +3180 6920 +3180 7460 +3180 7540 +3180 7600 +3180 7620 +3180 7700 +3180 8000 +3180 8060 +3180 8080 +3180 8100 +3180 8340 +3180 9120 +3180 9180 +3180 9200 +3180 9240 +3180 9320 +3180 9360 +3180 9380 +3180 9400 +3180 9440 +3180 9460 +3180 13040 +3180 13080 +3180 13100 +3180 13720 +3180 18000 +3180 18020 +3180 18040 +3180 18180 +3200 -23520 +3200 -23500 +3200 -23480 +3200 -18120 +3200 -17040 +3200 -17020 +3200 -14840 +3200 -14780 +3200 -14760 +3200 -14700 +3200 -14680 +3200 -13740 +3200 -13720 +3200 -10980 +3200 -10880 +3200 -10800 +3200 -10780 +3200 -10760 +3200 -7640 +3200 -7620 +3200 -7600 +3200 -6500 +3200 -6440 +3200 -6420 +3200 -5920 +3200 -5900 +3200 -5460 +3200 -5440 +3200 -3540 +3200 -3520 +3200 -2820 +3200 -2440 +3200 -2420 +3200 -2400 +3200 3020 +3200 3080 +3200 3100 +3200 3120 +3200 3160 +3200 4940 +3200 4960 +3200 4980 +3200 6100 +3200 6120 +3200 6860 +3200 6880 +3200 6920 +3200 7240 +3200 7300 +3200 7600 +3200 8060 +3200 8080 +3200 8320 +3200 8340 +3200 8360 +3200 8380 +3200 8400 +3200 8420 +3200 8440 +3200 8460 +3200 8480 +3200 8500 +3200 8520 +3200 8540 +3200 8560 +3200 8580 +3200 8600 +3200 8620 +3200 9120 +3200 9280 +3200 9340 +3200 9460 +3200 12160 +3200 12180 +3200 12200 +3200 12220 +3200 12240 +3200 12260 +3200 12280 +3200 12300 +3200 12320 +3200 12340 +3200 13020 +3200 13040 +3200 13060 +3200 13700 +3200 13720 +3200 13740 +3200 16680 +3200 16700 +3200 16820 +3200 16940 +3200 16960 +3200 18000 +3200 18140 +3220 -23500 +3220 -23480 +3220 -23460 +3220 -18120 +3220 -18100 +3220 -17060 +3220 -17040 +3220 -17020 +3220 -14800 +3220 -14720 +3220 -13740 +3220 -13720 +3220 -13700 +3220 -11020 +3220 -10980 +3220 -10920 +3220 -10900 +3220 -10800 +3220 -10780 +3220 -10760 +3220 -10740 +3220 -7640 +3220 -7620 +3220 -7320 +3220 -5900 +3220 -3540 +3220 -3520 +3220 -2420 +3220 -2400 +3220 3000 +3220 3020 +3220 3080 +3220 3100 +3220 3120 +3220 3140 +3220 4940 +3220 6820 +3220 6840 +3220 6860 +3220 6880 +3220 6920 +3220 7060 +3220 7140 +3220 8060 +3220 8080 +3220 8340 +3220 8560 +3220 9360 +3220 9380 +3220 9400 +3220 9420 +3220 9440 +3220 9460 +3220 9480 +3220 9500 +3220 10280 +3220 12060 +3220 12080 +3220 12100 +3220 12120 +3220 12140 +3220 12160 +3220 12180 +3220 12200 +3220 12220 +3220 13060 +3220 13080 +3220 13100 +3220 13700 +3220 13720 +3220 16680 +3220 16700 +3220 16720 +3220 16740 +3220 16760 +3220 16780 +3220 16800 +3220 16820 +3220 16840 +3220 16860 +3220 16880 +3220 16940 +3220 16960 +3220 17000 +3220 17040 +3220 17060 +3220 18000 +3220 18020 +3220 18040 +3220 18160 +3240 -23500 +3240 -23480 +3240 -18120 +3240 -18100 +3240 -17060 +3240 -17040 +3240 -17020 +3240 -14700 +3240 -13780 +3240 -13760 +3240 -13740 +3240 -13720 +3240 -11020 +3240 -11000 +3240 -10980 +3240 -10940 +3240 -10920 +3240 -10880 +3240 -10800 +3240 -10780 +3240 -10760 +3240 -7640 +3240 -7620 +3240 -5900 +3240 -3540 +3240 -3520 +3240 -2820 +3240 -2800 +3240 -2440 +3240 -2400 +3240 3000 +3240 3020 +3240 3100 +3240 3120 +3240 3140 +3240 4900 +3240 4920 +3240 6840 +3240 6860 +3240 6940 +3240 8060 +3240 8080 +3240 9480 +3240 9600 +3240 9640 +3240 9700 +3240 9760 +3240 9800 +3240 10300 +3240 12040 +3240 12060 +3240 12080 +3240 12100 +3240 12140 +3240 13620 +3240 13680 +3240 13700 +3240 13720 +3240 13980 +3240 14000 +3240 16760 +3240 16780 +3240 16800 +3240 16820 +3240 16840 +3240 16860 +3240 16880 +3240 16900 +3240 16920 +3240 16940 +3240 16960 +3240 16980 +3240 17000 +3240 17020 +3240 17040 +3240 17060 +3240 17080 +3240 18000 +3240 18020 +3240 18040 +3240 18120 +3240 18160 +3240 18180 +3260 -23500 +3260 -23480 +3260 -18120 +3260 -17020 +3260 -14740 +3260 -14700 +3260 -13740 +3260 -13720 +3260 -10800 +3260 -10780 +3260 -10760 +3260 -7640 +3260 -7620 +3260 -7220 +3260 -4320 +3260 -3540 +3260 -3520 +3260 -2840 +3260 -2820 +3260 -2420 +3260 -2400 +3260 3000 +3260 3020 +3260 3080 +3260 3100 +3260 3120 +3260 4900 +3260 4920 +3260 6860 +3260 6880 +3260 6900 +3260 6920 +3260 7500 +3260 7520 +3260 7540 +3260 7640 +3260 7700 +3260 7820 +3260 8020 +3260 8060 +3260 8080 +3260 8100 +3260 9200 +3260 9360 +3260 9440 +3260 9460 +3260 9500 +3260 9780 +3260 10300 +3260 13040 +3260 13080 +3260 13700 +3260 17000 +3260 17020 +3260 17040 +3260 17060 +3260 17100 +3260 18000 +3260 18020 +3260 18160 +3280 -23500 +3280 -23480 +3280 -18100 +3280 -17140 +3280 -17120 +3280 -17020 +3280 -17000 +3280 -14780 +3280 -14740 +3280 -13740 +3280 -13720 +3280 -10800 +3280 -10780 +3280 -10760 +3280 -7640 +3280 -7620 +3280 -5900 +3280 -5880 +3280 -3540 +3280 -3520 +3280 -2840 +3280 -2820 +3280 -2800 +3280 -2420 +3280 -2400 +3280 3000 +3280 3020 +3280 3120 +3280 4820 +3280 4860 +3280 4880 +3280 4920 +3280 4960 +3280 6840 +3280 6860 +3280 6900 +3280 6920 +3280 6940 +3280 7100 +3280 7500 +3280 7520 +3280 7540 +3280 7560 +3280 7580 +3280 7600 +3280 7620 +3280 7640 +3280 7660 +3280 7680 +3280 7700 +3280 7720 +3280 7740 +3280 7760 +3280 7780 +3280 7800 +3280 7820 +3280 7840 +3280 7860 +3280 7880 +3280 7900 +3280 7920 +3280 7940 +3280 7960 +3280 7980 +3280 8000 +3280 8020 +3280 8040 +3280 8060 +3280 9200 +3280 9460 +3280 9480 +3280 9500 +3280 9520 +3280 9540 +3280 9560 +3280 9580 +3280 9600 +3280 9620 +3280 9640 +3280 9660 +3280 9680 +3280 9700 +3280 9720 +3280 13020 +3280 13040 +3280 13060 +3280 13100 +3280 13700 +3280 13720 +3280 14060 +3280 18000 +3280 18020 +3280 18040 +3280 18160 +3300 -23500 +3300 -23480 +3300 -18100 +3300 -17020 +3300 -17000 +3300 -13760 +3300 -13740 +3300 -10880 +3300 -10820 +3300 -10800 +3300 -10780 +3300 -10760 +3300 -10740 +3300 -7640 +3300 -7620 +3300 -7160 +3300 -7140 +3300 -5900 +3300 -4320 +3300 -3540 +3300 -3520 +3300 -2580 +3300 -2440 +3300 -2400 +3300 3020 +3300 3080 +3300 3120 +3300 3140 +3300 4920 +3300 4940 +3300 6820 +3300 6840 +3300 6880 +3300 6900 +3300 6940 +3300 7080 +3300 7260 +3300 7280 +3300 7460 +3300 7480 +3300 7500 +3300 7520 +3300 7540 +3300 7560 +3300 7580 +3300 7600 +3300 7620 +3300 7640 +3300 7660 +3300 7680 +3300 7700 +3300 7720 +3300 7740 +3300 7760 +3300 7780 +3300 7800 +3300 7840 +3300 7880 +3300 7900 +3300 7940 +3300 7960 +3300 8000 +3300 8040 +3300 8080 +3300 9180 +3300 9200 +3300 9480 +3300 9500 +3300 9520 +3300 9540 +3300 9560 +3300 9580 +3300 9600 +3300 9620 +3300 9660 +3300 9680 +3300 9700 +3300 9720 +3300 9740 +3300 13040 +3300 13080 +3300 13700 +3300 13720 +3300 14080 +3300 18020 +3300 18040 +3300 18160 +3300 18180 +3320 -23500 +3320 -23480 +3320 -20980 +3320 -20960 +3320 -20940 +3320 -20920 +3320 -20900 +3320 -20880 +3320 -20860 +3320 -20840 +3320 -20820 +3320 -14820 +3320 -14800 +3320 -14760 +3320 -13800 +3320 -13760 +3320 -13740 +3320 -10880 +3320 -10800 +3320 -10780 +3320 -10760 +3320 -10740 +3320 -7640 +3320 -7620 +3320 -7600 +3320 -7100 +3320 -5900 +3320 -4300 +3320 -3540 +3320 -3520 +3320 -2820 +3320 -2420 +3320 -2400 +3320 3020 +3320 3120 +3320 3140 +3320 4880 +3320 4920 +3320 6820 +3320 6840 +3320 6860 +3320 6880 +3320 6900 +3320 6940 +3320 7080 +3320 7140 +3320 7160 +3320 7240 +3320 7280 +3320 7400 +3320 7440 +3320 7460 +3320 7500 +3320 7620 +3320 7640 +3320 7720 +3320 7760 +3320 7780 +3320 7800 +3320 7820 +3320 7860 +3320 7880 +3320 7900 +3320 7920 +3320 7940 +3320 7960 +3320 7980 +3320 8000 +3320 8020 +3320 8040 +3320 8060 +3320 9220 +3320 9700 +3320 13040 +3320 13060 +3320 13680 +3320 13700 +3320 13720 +3320 18160 +3320 19000 +3340 -23500 +3340 -23480 +3340 -20980 +3340 -20960 +3340 -20920 +3340 -20840 +3340 -20820 +3340 -18120 +3340 -18100 +3340 -17160 +3340 -17120 +3340 -14780 +3340 -14760 +3340 -13800 +3340 -13760 +3340 -10880 +3340 -10820 +3340 -10800 +3340 -10780 +3340 -10760 +3340 -7640 +3340 -7620 +3340 -7120 +3340 -7100 +3340 -4320 +3340 -4000 +3340 -3980 +3340 -3960 +3340 -3940 +3340 -3540 +3340 -3520 +3340 -3500 +3340 -2820 +3340 -2660 +3340 -2420 +3340 -2400 +3340 3020 +3340 3100 +3340 3120 +3340 3140 +3340 4940 +3340 6820 +3340 6840 +3340 6860 +3340 6880 +3340 6900 +3340 7020 +3340 7060 +3340 7080 +3340 7100 +3340 7120 +3340 7160 +3340 7180 +3340 7200 +3340 7220 +3340 7260 +3340 7280 +3340 7340 +3340 7380 +3340 7420 +3340 7440 +3340 7480 +3340 7560 +3340 7580 +3340 7600 +3340 7620 +3340 7640 +3340 7660 +3340 7680 +3340 7700 +3340 7720 +3340 7740 +3340 7760 +3340 7780 +3340 7800 +3340 7820 +3340 7840 +3340 7860 +3340 7880 +3340 7900 +3340 7920 +3340 7940 +3340 7960 +3340 7980 +3340 8000 +3340 8020 +3340 8040 +3340 9240 +3340 9260 +3340 13040 +3340 13080 +3340 13160 +3340 13260 +3340 13420 +3340 13540 +3340 13700 +3340 18160 +3340 19000 +3340 19020 +3360 -23500 +3360 -23480 +3360 -20980 +3360 -20960 +3360 -18120 +3360 -17160 +3360 -17140 +3360 -14780 +3360 -14760 +3360 -13780 +3360 -13760 +3360 -10880 +3360 -10800 +3360 -10780 +3360 -10760 +3360 -7640 +3360 -7620 +3360 -7600 +3360 -7120 +3360 -7100 +3360 -4020 +3360 -4000 +3360 -3980 +3360 -3960 +3360 -3940 +3360 -3920 +3360 -3540 +3360 -3520 +3360 -2820 +3360 -2800 +3360 -2440 +3360 -2420 +3360 -2400 +3360 3000 +3360 3020 +3360 4920 +3360 4940 +3360 6520 +3360 6640 +3360 6740 +3360 6780 +3360 6800 +3360 6840 +3360 6860 +3360 6960 +3360 6980 +3360 7000 +3360 7040 +3360 7060 +3360 7080 +3360 7120 +3360 7160 +3360 7180 +3360 7220 +3360 7240 +3360 7260 +3360 7280 +3360 7300 +3360 7320 +3360 7340 +3360 7360 +3360 7380 +3360 7400 +3360 7420 +3360 7440 +3360 7460 +3360 7480 +3360 7580 +3360 7600 +3360 7620 +3360 7640 +3360 7660 +3360 7680 +3360 7700 +3360 7720 +3360 7740 +3360 7760 +3360 7800 +3360 7820 +3360 7840 +3360 7880 +3360 7900 +3360 7940 +3360 8000 +3360 13020 +3360 13060 +3360 13080 +3360 13320 +3360 13700 +3360 13720 +3360 14580 +3360 18980 +3360 19020 +3380 -23500 +3380 -23480 +3380 -20980 +3380 -20960 +3380 -20220 +3380 -20180 +3380 -19060 +3380 -19020 +3380 -19000 +3380 -18960 +3380 -18920 +3380 -18880 +3380 -18780 +3380 -18760 +3380 -18720 +3380 -18600 +3380 -18540 +3380 -18120 +3380 -17140 +3380 -17120 +3380 -14780 +3380 -10880 +3380 -10800 +3380 -10780 +3380 -10760 +3380 -7640 +3380 -7620 +3380 -7120 +3380 -7100 +3380 -5920 +3380 -4320 +3380 -4080 +3380 -4060 +3380 -4040 +3380 -4020 +3380 -4000 +3380 -3980 +3380 -3960 +3380 -3920 +3380 -3560 +3380 -3540 +3380 -2820 +3380 -2440 +3380 -2420 +3380 -2400 +3380 3000 +3380 3020 +3380 4780 +3380 6460 +3380 6480 +3380 6500 +3380 6520 +3380 6540 +3380 6560 +3380 6580 +3380 6600 +3380 6620 +3380 6640 +3380 6660 +3380 6680 +3380 6700 +3380 6720 +3380 6740 +3380 6780 +3380 6800 +3380 6820 +3380 6840 +3380 6860 +3380 6980 +3380 7020 +3380 7040 +3380 7100 +3380 7120 +3380 7140 +3380 7160 +3380 7180 +3380 7200 +3380 7220 +3380 7240 +3380 7260 +3380 7300 +3380 7320 +3380 7360 +3380 7380 +3380 7400 +3380 7420 +3380 7440 +3380 7460 +3380 11720 +3380 11740 +3380 11780 +3380 11800 +3380 13040 +3380 13100 +3380 13220 +3380 13240 +3380 13700 +3380 13720 +3380 14580 +3380 14600 +3380 19000 +3380 19020 +3380 19040 +3400 -23500 +3400 -23480 +3400 -20980 +3400 -20960 +3400 -20240 +3400 -20220 +3400 -20200 +3400 -19060 +3400 -18780 +3400 -18700 +3400 -18540 +3400 -18260 +3400 -18220 +3400 -18180 +3400 -18140 +3400 -17120 +3400 -17100 +3400 -10880 +3400 -10860 +3400 -10800 +3400 -10780 +3400 -10760 +3400 -7640 +3400 -7620 +3400 -7120 +3400 -7100 +3400 -4340 +3400 -4320 +3400 -4180 +3400 -4160 +3400 -4140 +3400 -4120 +3400 -4100 +3400 -4080 +3400 -4060 +3400 -3940 +3400 -3540 +3400 -2820 +3400 -2580 +3400 -2540 +3400 -2440 +3400 -2420 +3400 -2400 +3400 3000 +3400 3020 +3400 3120 +3400 4940 +3400 6520 +3400 6560 +3400 6580 +3400 6640 +3400 6660 +3400 6720 +3400 6740 +3400 6760 +3400 6780 +3400 6800 +3400 7040 +3400 7260 +3400 7320 +3400 7360 +3400 7420 +3400 11700 +3400 11780 +3400 13040 +3400 13100 +3400 13260 +3400 13480 +3400 13700 +3400 14560 +3400 14580 +3400 16160 +3400 18800 +3400 18820 +3400 19020 +3400 19040 +3420 -23500 +3420 -23480 +3420 -20980 +3420 -20960 +3420 -20240 +3420 -20220 +3420 -20180 +3420 -20140 +3420 -20120 +3420 -20080 +3420 -20060 +3420 -20040 +3420 -20020 +3420 -20000 +3420 -19980 +3420 -19960 +3420 -19940 +3420 -19920 +3420 -19900 +3420 -19880 +3420 -19860 +3420 -19840 +3420 -19800 +3420 -19780 +3420 -19760 +3420 -19740 +3420 -19720 +3420 -19700 +3420 -19680 +3420 -19640 +3420 -19620 +3420 -19600 +3420 -19580 +3420 -19560 +3420 -19540 +3420 -19520 +3420 -19500 +3420 -19460 +3420 -19440 +3420 -19420 +3420 -19400 +3420 -19340 +3420 -19320 +3420 -19300 +3420 -19280 +3420 -19200 +3420 -19180 +3420 -19160 +3420 -19080 +3420 -19060 +3420 -17140 +3420 -17120 +3420 -17100 +3420 -10900 +3420 -10880 +3420 -10800 +3420 -10780 +3420 -10760 +3420 -7640 +3420 -7620 +3420 -7120 +3420 -7100 +3420 -5780 +3420 -4320 +3420 -4260 +3420 -4240 +3420 -4220 +3420 -4200 +3420 -4180 +3420 -4160 +3420 -4140 +3420 -4120 +3420 -4100 +3420 -3920 +3420 -2840 +3420 -2800 +3420 -2540 +3420 -2480 +3420 -2440 +3420 -2420 +3420 -2400 +3420 3000 +3420 3020 +3420 3160 +3420 3200 +3420 3240 +3420 3260 +3420 4620 +3420 4660 +3420 4940 +3420 4960 +3420 6960 +3420 6980 +3420 7000 +3420 7020 +3420 7040 +3420 7060 +3420 7120 +3420 7140 +3420 7160 +3420 7180 +3420 7280 +3420 7340 +3420 8740 +3420 8760 +3420 9220 +3420 9400 +3420 10520 +3420 11720 +3420 13080 +3420 13100 +3420 13440 +3420 13560 +3420 13580 +3420 13700 +3420 14600 +3420 14620 +3420 19020 +3440 -23500 +3440 -23460 +3440 -20980 +3440 -20960 +3440 -20240 +3440 -20220 +3440 -20140 +3440 -20100 +3440 -20080 +3440 -19780 +3440 -19420 +3440 -19260 +3440 -17120 +3440 -10900 +3440 -10880 +3440 -10860 +3440 -10820 +3440 -10800 +3440 -10780 +3440 -10760 +3440 -7640 +3440 -7620 +3440 -7120 +3440 -7100 +3440 -6140 +3440 -6100 +3440 -4340 +3440 -4280 +3440 -4260 +3440 -4240 +3440 -4220 +3440 -4200 +3440 -4180 +3440 -4160 +3440 -3940 +3440 -3920 +3440 -3900 +3440 -3880 +3440 -3540 +3440 -2820 +3440 -2420 +3440 -2400 +3440 3000 +3440 3020 +3440 3080 +3440 3100 +3440 3140 +3440 3160 +3440 3240 +3440 4620 +3440 4660 +3440 4800 +3440 4820 +3440 4860 +3440 4940 +3440 6360 +3440 6400 +3440 7000 +3440 7060 +3440 7080 +3440 7100 +3440 7120 +3440 7140 +3440 7200 +3440 7220 +3440 7240 +3440 7260 +3440 7280 +3440 7300 +3440 7320 +3440 7340 +3440 8720 +3440 8760 +3440 9240 +3440 9260 +3440 9400 +3440 10520 +3440 10560 +3440 11720 +3440 11740 +3440 11860 +3440 13060 +3440 13100 +3440 13380 +3440 13540 +3440 13580 +3440 13720 +3440 14560 +3440 14580 +3440 14620 +3440 14660 +3440 19020 +3440 19040 +3460 -23500 +3460 -23480 +3460 -23380 +3460 -23360 +3460 -20960 +3460 -20240 +3460 -20220 +3460 -17120 +3460 -10920 +3460 -10880 +3460 -10800 +3460 -10780 +3460 -10760 +3460 -7640 +3460 -7620 +3460 -7120 +3460 -7100 +3460 -6140 +3460 -6120 +3460 -6100 +3460 -5980 +3460 -5920 +3460 -4340 +3460 -4320 +3460 -4300 +3460 -4280 +3460 -4260 +3460 -4240 +3460 -4220 +3460 -3920 +3460 -3540 +3460 -2820 +3460 -2800 +3460 -2520 +3460 -2500 +3460 -2440 +3460 -2420 +3460 -2400 +3460 3000 +3460 3020 +3460 3040 +3460 3080 +3460 3120 +3460 3140 +3460 3220 +3460 3240 +3460 4500 +3460 4580 +3460 4600 +3460 4620 +3460 4640 +3460 4680 +3460 4700 +3460 4780 +3460 4800 +3460 4840 +3460 4880 +3460 4920 +3460 4940 +3460 4960 +3460 5000 +3460 6360 +3460 6400 +3460 6420 +3460 6980 +3460 7000 +3460 7020 +3460 7060 +3460 7080 +3460 7100 +3460 7120 +3460 7140 +3460 7160 +3460 7180 +3460 7200 +3460 7220 +3460 7240 +3460 7260 +3460 7280 +3460 7300 +3460 7320 +3460 7340 +3460 7360 +3460 7400 +3460 7440 +3460 8140 +3460 8700 +3460 8720 +3460 8740 +3460 8760 +3460 9220 +3460 9360 +3460 10480 +3460 10500 +3460 10540 +3460 11720 +3460 11740 +3460 11760 +3460 11820 +3460 13420 +3460 13580 +3460 13700 +3460 13720 +3460 14580 +3460 14620 +3460 19020 +3480 -23500 +3480 -23480 +3480 -23460 +3480 -23380 +3480 -23360 +3480 -23340 +3480 -23120 +3480 -20980 +3480 -20960 +3480 -20220 +3480 -17160 +3480 -17120 +3480 -13080 +3480 -13060 +3480 -10900 +3480 -10880 +3480 -10860 +3480 -10820 +3480 -10800 +3480 -10780 +3480 -10760 +3480 -7640 +3480 -7620 +3480 -7600 +3480 -7120 +3480 -7100 +3480 -6140 +3480 -6120 +3480 -6100 +3480 -4340 +3480 -4320 +3480 -4300 +3480 -3920 +3480 -3900 +3480 -3540 +3480 -2880 +3480 -2860 +3480 -2840 +3480 -2820 +3480 -2440 +3480 -2420 +3480 -2400 +3480 3000 +3480 3020 +3480 3040 +3480 3080 +3480 3100 +3480 3120 +3480 3160 +3480 3180 +3480 3200 +3480 3220 +3480 4460 +3480 4520 +3480 4560 +3480 4580 +3480 4660 +3480 4680 +3480 4740 +3480 4760 +3480 4800 +3480 4860 +3480 4880 +3480 4940 +3480 4960 +3480 4980 +3480 5000 +3480 6360 +3480 6380 +3480 6420 +3480 6440 +3480 7060 +3480 7100 +3480 7120 +3480 7140 +3480 7160 +3480 7180 +3480 7200 +3480 7220 +3480 7240 +3480 7260 +3480 7280 +3480 7300 +3480 7320 +3480 7340 +3480 7360 +3480 7380 +3480 7400 +3480 7420 +3480 7440 +3480 7460 +3480 8120 +3480 8660 +3480 8700 +3480 8720 +3480 8740 +3480 9220 +3480 9240 +3480 9260 +3480 9280 +3480 9300 +3480 9320 +3480 9340 +3480 9360 +3480 10420 +3480 10460 +3480 10480 +3480 10500 +3480 11740 +3480 11760 +3480 11780 +3480 11800 +3480 13420 +3480 13460 +3480 13540 +3480 13600 +3480 13700 +3480 13720 +3480 14600 +3480 14620 +3480 19000 +3480 19020 +3500 -23500 +3500 -23480 +3500 -23380 +3500 -23360 +3500 -23120 +3500 -23100 +3500 -20980 +3500 -20960 +3500 -20240 +3500 -20220 +3500 -17120 +3500 -13080 +3500 -13060 +3500 -10960 +3500 -10920 +3500 -10900 +3500 -10860 +3500 -10800 +3500 -10780 +3500 -10760 +3500 -7640 +3500 -7620 +3500 -7600 +3500 -7120 +3500 -7100 +3500 -6120 +3500 -6100 +3500 -3920 +3500 -3900 +3500 -3880 +3500 -3840 +3500 -3780 +3500 -3760 +3500 -3740 +3500 -3720 +3500 -3700 +3500 -3680 +3500 -3660 +3500 -3640 +3500 -3600 +3500 -3580 +3500 -3560 +3500 -3540 +3500 -3520 +3500 -3500 +3500 -2860 +3500 -2840 +3500 -2800 +3500 -2780 +3500 -2760 +3500 -2740 +3500 -2720 +3500 -2700 +3500 -2680 +3500 -2660 +3500 -2640 +3500 -2600 +3500 -2540 +3500 -2520 +3500 -2500 +3500 -2480 +3500 -2460 +3500 -2440 +3500 -2420 +3500 -2400 +3500 3000 +3500 3020 +3500 3040 +3500 3100 +3500 3120 +3500 3140 +3500 3160 +3500 3200 +3500 3220 +3500 4500 +3500 4560 +3500 4580 +3500 4600 +3500 4660 +3500 4680 +3500 4700 +3500 4720 +3500 4740 +3500 4780 +3500 4800 +3500 4880 +3500 4900 +3500 4920 +3500 4940 +3500 4960 +3500 4980 +3500 6360 +3500 6380 +3500 6400 +3500 6420 +3500 6440 +3500 8120 +3500 8160 +3500 8680 +3500 8720 +3500 9240 +3500 9260 +3500 9360 +3500 10420 +3500 10440 +3500 10460 +3500 10480 +3500 11740 +3500 11780 +3500 13460 +3500 13580 +3500 13620 +3500 13680 +3500 13700 +3500 14580 +3500 14600 +3500 14640 +3500 16100 +3500 19000 +3500 19020 +3500 19040 +3520 -23500 +3520 -23480 +3520 -23120 +3520 -23100 +3520 -20980 +3520 -20960 +3520 -20240 +3520 -20220 +3520 -17120 +3520 -17100 +3520 -13060 +3520 -13040 +3520 -10940 +3520 -10900 +3520 -10880 +3520 -10800 +3520 -10780 +3520 -7640 +3520 -7620 +3520 -7600 +3520 -7140 +3520 -7120 +3520 -7100 +3520 -6040 +3520 -5520 +3520 -5480 +3520 -3940 +3520 -3920 +3520 -3900 +3520 -3880 +3520 -3860 +3520 -3840 +3520 -3820 +3520 -3800 +3520 -3780 +3520 -3760 +3520 -3740 +3520 -3720 +3520 -3700 +3520 -3680 +3520 -3660 +3520 -3640 +3520 -3620 +3520 -3600 +3520 -3580 +3520 -3560 +3520 -3540 +3520 -3520 +3520 -2820 +3520 -2800 +3520 -2780 +3520 -2760 +3520 -2740 +3520 -2720 +3520 -2700 +3520 -2680 +3520 -2660 +3520 -2640 +3520 -2620 +3520 -2600 +3520 -2580 +3520 -2560 +3520 -2540 +3520 -2520 +3520 -2500 +3520 -2480 +3520 -2460 +3520 -2440 +3520 -2420 +3520 3020 +3520 3100 +3520 3120 +3520 3160 +3520 3180 +3520 3200 +3520 4480 +3520 4500 +3520 4920 +3520 4940 +3520 4960 +3520 6340 +3520 6360 +3520 6380 +3520 6400 +3520 8120 +3520 8140 +3520 8680 +3520 9260 +3520 9280 +3520 9300 +3520 9320 +3520 9340 +3520 9360 +3520 9380 +3520 9400 +3520 9420 +3520 9440 +3520 9460 +3520 9480 +3520 11780 +3520 13140 +3520 13160 +3520 13220 +3520 13240 +3520 13520 +3520 13540 +3520 13680 +3520 13700 +3520 14640 +3520 16080 +3520 19020 +3520 19040 +3520 19060 +3520 19080 +3540 -23500 +3540 -23480 +3540 -23120 +3540 -23100 +3540 -20960 +3540 -20220 +3540 -17140 +3540 -17120 +3540 -10980 +3540 -10960 +3540 -10940 +3540 -10880 +3540 -10800 +3540 -10780 +3540 -10760 +3540 -7640 +3540 -7620 +3540 -7600 +3540 -7580 +3540 -7120 +3540 -7100 +3540 -6080 +3540 -6060 +3540 -5480 +3540 -5460 +3540 -5440 +3540 -3920 +3540 -3900 +3540 -3880 +3540 -3860 +3540 -3840 +3540 -3820 +3540 -3800 +3540 -3780 +3540 -3760 +3540 -3740 +3540 -3720 +3540 -3700 +3540 -3680 +3540 -3660 +3540 -3620 +3540 -3540 +3540 -2800 +3540 -2760 +3540 -2740 +3540 -2720 +3540 -2660 +3540 -2640 +3540 -2620 +3540 -2580 +3540 -2560 +3540 -2520 +3540 -2500 +3540 -2480 +3540 -2460 +3540 -2440 +3540 -2420 +3540 -2400 +3540 3020 +3540 3100 +3540 3120 +3540 3140 +3540 3160 +3540 4440 +3540 4500 +3540 4940 +3540 6340 +3540 6360 +3540 6380 +3540 8120 +3540 8140 +3540 8160 +3540 9260 +3540 9300 +3540 9360 +3540 9420 +3540 9480 +3540 9500 +3540 13220 +3540 13560 +3540 13580 +3540 13620 +3540 13700 +3540 14620 +3540 14640 +3540 16060 +3540 16080 +3540 19020 +3540 19040 +3540 19080 +3540 19100 +3540 19120 +3560 -23500 +3560 -20960 +3560 -20240 +3560 -20220 +3560 -17120 +3560 -10960 +3560 -10940 +3560 -10900 +3560 -10880 +3560 -10800 +3560 -10780 +3560 -10760 +3560 -7640 +3560 -7620 +3560 -7600 +3560 -7580 +3560 -7120 +3560 -7100 +3560 -6060 +3560 -5860 +3560 -5740 +3560 -5520 +3560 -5500 +3560 -5480 +3560 -5460 +3560 -5440 +3560 -3880 +3560 -3820 +3560 -3680 +3560 -3580 +3560 -2440 +3560 -2420 +3560 3020 +3560 3080 +3560 3100 +3560 3120 +3560 3140 +3560 4420 +3560 4440 +3560 6360 +3560 6380 +3560 8140 +3560 9300 +3560 9360 +3560 9460 +3560 9500 +3560 13140 +3560 13600 +3560 13660 +3560 13680 +3560 13700 +3560 14640 +3560 14660 +3560 19040 +3560 19060 +3560 19080 +3560 19100 +3560 19140 +3580 -23500 +3580 -23480 +3580 -20960 +3580 -20220 +3580 -17140 +3580 -17120 +3580 -11000 +3580 -10960 +3580 -10900 +3580 -10800 +3580 -10780 +3580 -10760 +3580 -7640 +3580 -7620 +3580 -7600 +3580 -7120 +3580 -7100 +3580 -6080 +3580 -6060 +3580 -5820 +3580 -5680 +3580 -5620 +3580 -5500 +3580 -5480 +3580 -5460 +3580 -5440 +3580 -3560 +3580 3020 +3580 3040 +3580 3080 +3580 3100 +3580 3120 +3580 3160 +3580 4420 +3580 4440 +3580 8120 +3580 8140 +3580 13580 +3580 13620 +3580 13660 +3580 13700 +3580 13720 +3580 14620 +3580 14660 +3580 16100 +3580 16240 +3580 16600 +3580 17840 +3580 17860 +3580 19040 +3580 19060 +3580 19080 +3580 19100 +3580 19120 +3600 -23500 +3600 -23480 +3600 -20980 +3600 -20960 +3600 -20240 +3600 -20220 +3600 -17120 +3600 -17100 +3600 -11000 +3600 -10960 +3600 -10820 +3600 -10800 +3600 -10780 +3600 -10760 +3600 -7640 +3600 -7620 +3600 -7600 +3600 -7120 +3600 -7100 +3600 -6040 +3600 -5980 +3600 -5520 +3600 -5500 +3600 -5480 +3600 -5460 +3600 -3580 +3600 3020 +3600 3040 +3600 3100 +3600 3120 +3600 3140 +3600 4420 +3600 4440 +3600 8120 +3600 8140 +3600 8160 +3600 13620 +3600 13640 +3600 13700 +3600 13720 +3600 14660 +3600 16220 +3600 16580 +3600 16600 +3600 17840 +3600 17860 +3600 19040 +3600 19060 +3620 -23500 +3620 -23480 +3620 -20960 +3620 -20940 +3620 -20220 +3620 -17120 +3620 -17100 +3620 -13100 +3620 -10900 +3620 -10880 +3620 -10820 +3620 -10800 +3620 -10780 +3620 -10760 +3620 -10740 +3620 -7640 +3620 -7620 +3620 -7600 +3620 -7580 +3620 -7140 +3620 -7120 +3620 -7100 +3620 -6060 +3620 -6040 +3620 -6020 +3620 -6000 +3620 -5560 +3620 -5540 +3620 -5520 +3620 -5500 +3620 -3120 +3620 3020 +3620 3080 +3620 3100 +3620 3120 +3620 3140 +3620 3160 +3620 4180 +3620 4360 +3620 4380 +3620 4400 +3620 13560 +3620 13600 +3620 13680 +3620 13700 +3620 13720 +3620 14620 +3620 14660 +3620 14680 +3620 16160 +3620 16220 +3620 16240 +3620 17840 +3620 17860 +3620 17880 +3620 17900 +3620 19020 +3620 19040 +3620 19060 +3640 -23500 +3640 -20980 +3640 -20960 +3640 -20240 +3640 -20220 +3640 -17140 +3640 -17120 +3640 -13200 +3640 -13140 +3640 -13120 +3640 -10800 +3640 -10780 +3640 -10760 +3640 -7640 +3640 -7620 +3640 -7600 +3640 -7580 +3640 -7120 +3640 -7100 +3640 -6020 +3640 -6000 +3640 -5580 +3640 -5560 +3640 -5540 +3640 -5520 +3640 -5500 +3640 -3120 +3640 3020 +3640 3040 +3640 3060 +3640 3080 +3640 3120 +3640 3140 +3640 4160 +3640 4180 +3640 4320 +3640 4340 +3640 4380 +3640 13580 +3640 13600 +3640 13680 +3640 13700 +3640 13720 +3640 14620 +3640 14640 +3640 14660 +3640 14680 +3640 16020 +3640 16040 +3640 16080 +3640 16100 +3640 16120 +3640 16140 +3640 16160 +3640 16220 +3640 16240 +3640 16260 +3640 17880 +3640 19040 +3640 19060 +3660 -23500 +3660 -23480 +3660 -20960 +3660 -20240 +3660 -20220 +3660 -17120 +3660 -10880 +3660 -10800 +3660 -10780 +3660 -10760 +3660 -7640 +3660 -7620 +3660 -7600 +3660 -7580 +3660 -7120 +3660 -7100 +3660 -6000 +3660 -5980 +3660 -5940 +3660 -5600 +3660 -5580 +3660 -5560 +3660 -5540 +3660 -3140 +3660 -3120 +3660 -3100 +3660 3020 +3660 3080 +3660 3120 +3660 3140 +3660 4200 +3660 4280 +3660 4320 +3660 4340 +3660 13580 +3660 13600 +3660 13640 +3660 13680 +3660 13700 +3660 14660 +3660 14680 +3660 14700 +3660 16020 +3660 16040 +3660 16060 +3660 16080 +3660 16100 +3660 16120 +3660 16140 +3660 16160 +3660 16240 +3660 16260 +3660 19040 +3660 19060 +3660 19080 +3680 -23500 +3680 -23480 +3680 -20980 +3680 -20960 +3680 -20240 +3680 -17140 +3680 -13080 +3680 -13060 +3680 -13040 +3680 -12840 +3680 -12820 +3680 -12800 +3680 -11020 +3680 -11000 +3680 -10880 +3680 -10800 +3680 -10780 +3680 -10740 +3680 -7640 +3680 -7620 +3680 -7600 +3680 -7580 +3680 -7140 +3680 -7120 +3680 -7100 +3680 -5980 +3680 -5960 +3680 -5940 +3680 -5920 +3680 -5900 +3680 -5880 +3680 -5860 +3680 -5640 +3680 -5620 +3680 -5600 +3680 -5580 +3680 -5560 +3680 -3140 +3680 -3120 +3680 3000 +3680 3020 +3680 3080 +3680 3140 +3680 3160 +3680 4260 +3680 4280 +3680 4320 +3680 4340 +3680 4360 +3680 13560 +3680 13600 +3680 13680 +3680 13700 +3680 14680 +3680 14700 +3680 16020 +3680 16040 +3680 16060 +3680 17780 +3680 17800 +3680 19040 +3680 19060 +3680 19080 +3700 -23500 +3700 -23480 +3700 -23440 +3700 -20960 +3700 -20240 +3700 -20220 +3700 -17120 +3700 -12820 +3700 -12800 +3700 -11000 +3700 -10920 +3700 -10900 +3700 -10880 +3700 -10800 +3700 -10780 +3700 -10760 +3700 -7640 +3700 -7620 +3700 -7600 +3700 -7580 +3700 -7460 +3700 -7120 +3700 -7100 +3700 -5980 +3700 -5960 +3700 -5940 +3700 -5920 +3700 -5900 +3700 -5880 +3700 -5860 +3700 -5840 +3700 -5820 +3700 -5800 +3700 -5780 +3700 -5760 +3700 -5740 +3700 -5720 +3700 -5660 +3700 -5640 +3700 -5620 +3700 -5600 +3700 -5580 +3700 -3120 +3700 -3100 +3700 3020 +3700 3040 +3700 3080 +3700 3100 +3700 3120 +3700 3140 +3700 4300 +3700 4320 +3700 13560 +3700 13600 +3700 13620 +3700 13680 +3700 13700 +3700 14660 +3700 14680 +3700 14700 +3700 19020 +3700 19040 +3700 19060 +3720 -23500 +3720 -23480 +3720 -20960 +3720 -20240 +3720 -20220 +3720 -17120 +3720 -12820 +3720 -12800 +3720 -11020 +3720 -10920 +3720 -10900 +3720 -10800 +3720 -10780 +3720 -7640 +3720 -7620 +3720 -7600 +3720 -7580 +3720 -7500 +3720 -7480 +3720 -7460 +3720 -7320 +3720 -7140 +3720 -7120 +3720 -7100 +3720 -6000 +3720 -5940 +3720 -5920 +3720 -5900 +3720 -5840 +3720 -5820 +3720 -5800 +3720 -5780 +3720 -5760 +3720 -5740 +3720 -5720 +3720 -5700 +3720 -5680 +3720 -5660 +3720 -5640 +3720 -5620 +3720 -5600 +3720 -3140 +3720 -3120 +3720 3020 +3720 3080 +3720 3100 +3720 3120 +3720 3140 +3720 4300 +3720 13600 +3720 13660 +3720 13680 +3720 13700 +3720 14260 +3720 17800 +3720 19040 +3720 19060 +3720 19080 +3740 -23500 +3740 -23480 +3740 -20960 +3740 -20940 +3740 -20240 +3740 -20220 +3740 -17140 +3740 -12820 +3740 -12800 +3740 -11000 +3740 -10980 +3740 -10900 +3740 -10820 +3740 -10800 +3740 -10780 +3740 -10760 +3740 -7640 +3740 -7620 +3740 -7600 +3740 -7580 +3740 -7520 +3740 -7500 +3740 -7400 +3740 -7340 +3740 -7280 +3740 -7240 +3740 -7200 +3740 -7180 +3740 -7160 +3740 -7140 +3740 -7120 +3740 -7100 +3740 -5800 +3740 -5780 +3740 -5760 +3740 -5740 +3740 -5720 +3740 -5700 +3740 -5680 +3740 -5660 +3740 -5640 +3740 -3140 +3740 -3120 +3740 3020 +3740 3040 +3740 3080 +3740 3120 +3740 13580 +3740 13620 +3740 13700 +3740 14180 +3740 14200 +3740 14240 +3740 17760 +3740 19060 +3740 19080 +3760 -23500 +3760 -23480 +3760 -20960 +3760 -20940 +3760 -20240 +3760 -17180 +3760 -11020 +3760 -11000 +3760 -10980 +3760 -10960 +3760 -10820 +3760 -10800 +3760 -10780 +3760 -10760 +3760 -10740 +3760 -7640 +3760 -7620 +3760 -7600 +3760 -7580 +3760 -7540 +3760 -7520 +3760 -7500 +3760 -7480 +3760 -7460 +3760 -7440 +3760 -7420 +3760 -7400 +3760 -7380 +3760 -7360 +3760 -7340 +3760 -7320 +3760 -7300 +3760 -7280 +3760 -7260 +3760 -7240 +3760 -7220 +3760 -7200 +3760 -7180 +3760 -7160 +3760 -7140 +3760 -7120 +3760 -5740 +3760 -5700 +3760 -5680 +3760 -5660 +3760 -3180 +3760 -3120 +3760 3020 +3760 3040 +3760 3060 +3760 3080 +3760 3120 +3760 3140 +3760 13580 +3760 13600 +3760 13640 +3760 13720 +3760 14180 +3760 14220 +3760 14240 +3760 14260 +3760 14280 +3760 14320 +3760 17660 +3760 17680 +3780 -23500 +3780 -23480 +3780 -20960 +3780 -20940 +3780 -20240 +3780 -20220 +3780 -17180 +3780 -11020 +3780 -11000 +3780 -10900 +3780 -10880 +3780 -10800 +3780 -10780 +3780 -10760 +3780 -7640 +3780 -7620 +3780 -7600 +3780 -7580 +3780 -7520 +3780 -7500 +3780 -7440 +3780 -7400 +3780 -7380 +3780 -7340 +3780 -7300 +3780 -7200 +3780 -7180 +3780 -7140 +3780 -3500 +3780 -3160 +3780 -3140 +3780 -3120 +3780 3020 +3780 3040 +3780 3060 +3780 3080 +3780 3100 +3780 3120 +3780 13560 +3780 13600 +3780 13700 +3780 13720 +3780 14240 +3780 14260 +3780 14280 +3780 14320 +3780 14340 +3780 19020 +3780 19060 +3800 -23500 +3800 -23480 +3800 -20960 +3800 -20940 +3800 -20240 +3800 -20220 +3800 -17200 +3800 -17180 +3800 -10800 +3800 -10780 +3800 -10760 +3800 -10740 +3800 -7640 +3800 -7620 +3800 -7600 +3800 -7580 +3800 -7540 +3800 -7520 +3800 -7500 +3800 -3540 +3800 -3520 +3800 -3500 +3800 -3160 +3800 -3140 +3800 -3120 +3800 3020 +3800 3040 +3800 3080 +3800 3140 +3800 13560 +3800 13600 +3800 13720 +3800 14260 +3800 14280 +3800 14300 +3800 17660 +3800 17680 +3800 17700 +3800 19020 +3800 19040 +3800 19060 +3820 -23500 +3820 -23480 +3820 -20980 +3820 -20960 +3820 -20940 +3820 -20220 +3820 -17200 +3820 -17180 +3820 -13300 +3820 -10880 +3820 -10800 +3820 -10780 +3820 -10760 +3820 -7640 +3820 -7620 +3820 -7600 +3820 -7580 +3820 -7500 +3820 -7460 +3820 -3500 +3820 -3440 +3820 -3420 +3820 -3400 +3820 -3380 +3820 -3160 +3820 -3140 +3820 3020 +3820 3040 +3820 3080 +3820 3120 +3820 6820 +3820 13580 +3820 13640 +3820 13720 +3820 17640 +3820 17660 +3820 19040 +3820 19080 +3840 -23500 +3840 -23480 +3840 -20960 +3840 -20940 +3840 -20240 +3840 -20220 +3840 -17180 +3840 -10900 +3840 -10880 +3840 -10800 +3840 -10780 +3840 -10760 +3840 -7640 +3840 -7620 +3840 -7600 +3840 -7580 +3840 -7480 +3840 -7460 +3840 -7440 +3840 -3440 +3840 -3420 +3840 -3400 +3840 -3380 +3840 -3160 +3840 3020 +3840 3100 +3840 3120 +3840 3140 +3840 6840 +3840 13580 +3840 13600 +3840 13620 +3840 13700 +3840 13720 +3840 17640 +3840 17660 +3840 17680 +3840 19040 +3860 -23500 +3860 -23480 +3860 -20980 +3860 -20960 +3860 -20940 +3860 -20240 +3860 -20220 +3860 -17180 +3860 -10920 +3860 -10800 +3860 -10780 +3860 -10760 +3860 -7640 +3860 -7620 +3860 -7600 +3860 -7580 +3860 -7500 +3860 -7480 +3860 -7460 +3860 -7440 +3860 -7420 +3860 -3160 +3860 -3140 +3860 3020 +3860 3080 +3860 3100 +3860 3120 +3860 6780 +3860 6800 +3860 6820 +3860 13520 +3860 13700 +3860 13720 +3860 17640 +3860 17660 +3860 17680 +3860 19040 +3860 19060 +3860 19080 +3880 -23500 +3880 -23480 +3880 -20960 +3880 -20940 +3880 -20220 +3880 -17180 +3880 -13380 +3880 -13360 +3880 -13340 +3880 -10920 +3880 -10900 +3880 -10800 +3880 -10780 +3880 -10760 +3880 -7640 +3880 -7620 +3880 -7600 +3880 -7580 +3880 -7440 +3880 -7420 +3880 -7400 +3880 -3160 +3880 -3140 +3880 -3100 +3880 3000 +3880 3020 +3880 3040 +3880 3060 +3880 3080 +3880 3100 +3880 3120 +3880 6780 +3880 6800 +3880 13600 +3880 13620 +3880 13720 +3880 17640 +3880 17660 +3880 19040 +3880 19060 +3900 -23500 +3900 -23480 +3900 -20960 +3900 -20940 +3900 -20240 +3900 -17200 +3900 -17180 +3900 -13320 +3900 -10940 +3900 -10920 +3900 -10900 +3900 -10800 +3900 -10780 +3900 -10760 +3900 -7640 +3900 -7620 +3900 -7600 +3900 -7580 +3900 -7520 +3900 -7500 +3900 -7480 +3900 -7460 +3900 -7440 +3900 -7420 +3900 -3180 +3900 -3160 +3900 -3140 +3900 3000 +3900 3020 +3900 3040 +3900 3060 +3900 3080 +3900 3100 +3900 3120 +3900 6800 +3900 13540 +3900 13600 +3900 13620 +3900 13700 +3900 13720 +3900 17640 +3900 17660 +3900 17860 +3900 18040 +3900 18060 +3900 18080 +3900 19040 +3900 19060 +3920 -23500 +3920 -23480 +3920 -20960 +3920 -20940 +3920 -20240 +3920 -20220 +3920 -17200 +3920 -17180 +3920 -13360 +3920 -10920 +3920 -10880 +3920 -10800 +3920 -10780 +3920 -10760 +3920 -7640 +3920 -7620 +3920 -7600 +3920 -7580 +3920 -7440 +3920 -7420 +3920 -7400 +3920 -3180 +3920 -3160 +3920 -3140 +3920 3000 +3920 3020 +3920 3040 +3920 3080 +3920 6800 +3920 13600 +3920 13720 +3920 17660 +3920 17680 +3920 17800 +3920 17820 +3920 17860 +3920 17880 +3920 19020 +3920 19040 +3920 19060 +3940 -23500 +3940 -23480 +3940 -20960 +3940 -20940 +3940 -17180 +3940 -10880 +3940 -10800 +3940 -10780 +3940 -10760 +3940 -7640 +3940 -7620 +3940 -7600 +3940 -7580 +3940 -7440 +3940 -7420 +3940 -7400 +3940 -3180 +3940 -3160 +3940 -3140 +3940 3020 +3940 3040 +3940 3080 +3940 13480 +3940 13500 +3940 13720 +3940 17660 +3940 17680 +3940 17700 +3940 17720 +3940 17760 +3940 17800 +3940 17860 +3940 17880 +3940 17900 +3940 19060 +3960 -23500 +3960 -23480 +3960 -20960 +3960 -20940 +3960 -20240 +3960 -20220 +3960 -17180 +3960 -10900 +3960 -10880 +3960 -10800 +3960 -10780 +3960 -10760 +3960 -7640 +3960 -7620 +3960 -7600 +3960 -7580 +3960 -7420 +3960 -7400 +3960 -3180 +3960 -3160 +3960 -3140 +3960 3020 +3960 3040 +3960 3060 +3960 3080 +3960 3100 +3960 3120 +3960 13640 +3960 13720 +3960 13740 +3960 17680 +3960 17700 +3960 17720 +3960 17740 +3960 17780 +3960 17800 +3960 17880 +3960 17900 +3960 17920 +3960 17940 +3960 19040 +3960 19060 +3960 19080 +3980 -23500 +3980 -23480 +3980 -23440 +3980 -20960 +3980 -20940 +3980 -20240 +3980 -17220 +3980 -10880 +3980 -10800 +3980 -10780 +3980 -10760 +3980 -7620 +3980 -7600 +3980 -7580 +3980 -7520 +3980 -7460 +3980 -7440 +3980 -7420 +3980 -7400 +3980 -3180 +3980 -3160 +3980 3020 +3980 3060 +3980 3080 +3980 3120 +3980 13440 +3980 13480 +3980 13520 +3980 13620 +3980 13720 +3980 13740 +3980 17720 +3980 17760 +3980 17780 +3980 17900 +3980 17920 +3980 17940 +3980 19040 +4000 -23500 +4000 -23480 +4000 -20960 +4000 -20940 +4000 -17200 +4000 -10880 +4000 -10800 +4000 -10780 +4000 -7640 +4000 -7620 +4000 -7600 +4000 -7580 +4000 -7460 +4000 -7440 +4000 -7420 +4000 -3180 +4000 -3160 +4000 3000 +4000 3020 +4000 3080 +4000 3100 +4000 3120 +4000 13440 +4000 13460 +4000 13500 +4000 13720 +4000 19040 +4000 24460 +4020 -23500 +4020 -23480 +4020 -20960 +4020 -20940 +4020 -10900 +4020 -10880 +4020 -10800 +4020 -10780 +4020 -10760 +4020 -10740 +4020 -7640 +4020 -7620 +4020 -7600 +4020 -7580 +4020 -7440 +4020 -7420 +4020 -7400 +4020 -3200 +4020 -3180 +4020 -3160 +4020 3000 +4020 3020 +4020 3100 +4020 3120 +4020 3140 +4020 3160 +4020 10580 +4020 13480 +4020 13500 +4020 13720 +4020 19020 +4020 19040 +4040 -23500 +4040 -23480 +4040 -20960 +4040 -20940 +4040 -10880 +4040 -10800 +4040 -10780 +4040 -10760 +4040 -7640 +4040 -7620 +4040 -7600 +4040 -7580 +4040 -7480 +4040 -7460 +4040 -7440 +4040 -7420 +4040 -3240 +4040 -3220 +4040 -3200 +4040 -3180 +4040 -3160 +4040 3000 +4040 3020 +4040 3100 +4040 3120 +4040 13460 +4040 13520 +4040 13720 +4040 19040 +4040 19060 +4060 -23500 +4060 -23480 +4060 -20960 +4060 -20940 +4060 -10880 +4060 -10800 +4060 -10780 +4060 -10760 +4060 -10740 +4060 -7640 +4060 -7620 +4060 -7600 +4060 -7580 +4060 -7460 +4060 -7440 +4060 -7420 +4060 -3240 +4060 -3220 +4060 -3180 +4060 3000 +4060 3020 +4060 3080 +4060 3100 +4060 3120 +4060 3160 +4060 10580 +4060 10600 +4060 10620 +4060 13460 +4060 13500 +4060 13580 +4060 13720 +4060 19020 +4060 19060 +4080 -23500 +4080 -23480 +4080 -20960 +4080 -20940 +4080 -10920 +4080 -10900 +4080 -10880 +4080 -10800 +4080 -10780 +4080 -10760 +4080 -7640 +4080 -7620 +4080 -7600 +4080 -7460 +4080 -7440 +4080 -7420 +4080 3020 +4080 3100 +4080 3140 +4080 10600 +4080 10620 +4080 10640 +4080 13460 +4080 13480 +4080 13600 +4080 13720 +4080 13740 +4080 19020 +4080 19040 +4080 19060 +4100 -23500 +4100 -23480 +4100 -20960 +4100 -20940 +4100 -10920 +4100 -10800 +4100 -10780 +4100 -10760 +4100 -7640 +4100 -7620 +4100 -7460 +4100 -7420 +4100 3020 +4100 3080 +4100 3100 +4100 3120 +4100 3160 +4100 10600 +4100 10620 +4100 10640 +4100 10680 +4100 13480 +4100 13720 +4100 19040 +4100 19060 +4100 19080 +4120 -23500 +4120 -23480 +4120 -23460 +4120 -20980 +4120 -20960 +4120 -20940 +4120 -10880 +4120 -10800 +4120 -10780 +4120 -10760 +4120 -7640 +4120 -7620 +4120 -7600 +4120 -7460 +4120 -7440 +4120 -7420 +4120 3000 +4120 3100 +4120 10600 +4120 10640 +4120 10660 +4120 11800 +4120 11840 +4120 11860 +4120 11880 +4120 11900 +4120 13480 +4120 13720 +4120 19040 +4120 19060 +4120 19080 +4120 24480 +4140 -23500 +4140 -23480 +4140 -20960 +4140 -20940 +4140 -10800 +4140 -10780 +4140 -10760 +4140 -7640 +4140 -7620 +4140 -7600 +4140 -7480 +4140 -7460 +4140 -7440 +4140 -7420 +4140 3000 +4140 3020 +4140 3080 +4140 3100 +4140 10620 +4140 10640 +4140 11820 +4140 11840 +4140 11860 +4140 11900 +4140 13460 +4140 13480 +4140 13500 +4140 13520 +4140 13720 +4140 19060 +4140 19080 +4160 -23500 +4160 -23480 +4160 -20960 +4160 -20940 +4160 -10880 +4160 -10800 +4160 -10780 +4160 -7640 +4160 -7620 +4160 -7460 +4160 -7440 +4160 -7420 +4160 3000 +4160 3020 +4160 3080 +4160 3100 +4160 3140 +4160 10660 +4160 11860 +4160 11900 +4160 13500 +4160 19100 +4160 23060 +4180 -23500 +4180 -23480 +4180 -20960 +4180 -20940 +4180 -10880 +4180 -10800 +4180 -10780 +4180 -10760 +4180 -7640 +4180 -7620 +4180 -7440 +4180 -7420 +4180 3000 +4180 3020 +4180 3080 +4180 3100 +4180 3140 +4180 4460 +4180 13460 +4180 13500 +4180 13520 +4180 13600 +4180 19040 +4180 22820 +4200 -23500 +4200 -23480 +4200 -20960 +4200 -20940 +4200 -10880 +4200 -10800 +4200 -10780 +4200 -10760 +4200 -7640 +4200 -7620 +4200 -7440 +4200 -7420 +4200 3000 +4200 3020 +4200 3100 +4200 3120 +4200 3140 +4200 4460 +4200 4480 +4200 4500 +4200 13460 +4200 13480 +4200 13720 +4200 19040 +4200 22760 +4200 24120 +4220 -23500 +4220 -23480 +4220 -23460 +4220 -20960 +4220 -20940 +4220 -10900 +4220 -10880 +4220 -10800 +4220 -10780 +4220 -10760 +4220 -7640 +4220 -7620 +4220 -7480 +4220 -7460 +4220 -7440 +4220 -7420 +4220 3000 +4220 3020 +4220 3100 +4220 3160 +4220 4480 +4220 13460 +4220 13500 +4220 13520 +4220 13620 +4220 13720 +4220 19020 +4220 19040 +4220 19080 +4220 22320 +4240 -23500 +4240 -23480 +4240 -20960 +4240 -20940 +4240 -17180 +4240 -10900 +4240 -10880 +4240 -10800 +4240 -10780 +4240 -10760 +4240 -10740 +4240 -7640 +4240 -7620 +4240 -7440 +4240 -7420 +4240 3000 +4240 3020 +4240 3100 +4240 3120 +4240 3140 +4240 13520 +4240 19040 +4240 19060 +4240 22280 +4240 24000 +4260 -23500 +4260 -23480 +4260 -20960 +4260 -20940 +4260 -10900 +4260 -10880 +4260 -10800 +4260 -10780 +4260 -10760 +4260 -7640 +4260 -7620 +4260 -7600 +4260 -7480 +4260 -7460 +4260 -7420 +4260 3000 +4260 3020 +4260 3100 +4260 3140 +4260 13500 +4260 13520 +4260 13620 +4260 14060 +4260 14160 +4260 19040 +4260 19060 +4280 -23500 +4280 -23480 +4280 -20960 +4280 -20940 +4280 -10880 +4280 -10860 +4280 -10800 +4280 -10780 +4280 -7640 +4280 -7620 +4280 -7440 +4280 -7420 +4280 3000 +4280 3020 +4280 3100 +4280 3140 +4280 13480 +4280 13600 +4280 14080 +4280 14100 +4280 14120 +4280 14140 +4280 19020 +4280 19040 +4280 19060 +4300 -23480 +4300 -23460 +4300 -23440 +4300 -23420 +4300 -20960 +4300 -20940 +4300 -10900 +4300 -10880 +4300 -10800 +4300 -10780 +4300 -10760 +4300 -7640 +4300 -7620 +4300 -7460 +4300 -7420 +4300 3000 +4300 3100 +4300 3120 +4300 3140 +4300 3160 +4300 13500 +4300 13600 +4300 14140 +4300 19040 +4300 22280 +4320 -23480 +4320 -23440 +4320 -23420 +4320 -23180 +4320 -23160 +4320 -23140 +4320 -20960 +4320 -20940 +4320 -10900 +4320 -10880 +4320 -10800 +4320 -10780 +4320 -7640 +4320 -7620 +4320 -7460 +4320 -7440 +4320 -7420 +4320 3000 +4320 3020 +4320 3100 +4320 3140 +4320 13620 +4320 13640 +4320 14200 +4320 19080 +4340 -23480 +4340 -23460 +4340 -23440 +4340 -23420 +4340 -23160 +4340 -23140 +4340 -20960 +4340 -20940 +4340 -17200 +4340 -10900 +4340 -10880 +4340 -10860 +4340 -10800 +4340 -10780 +4340 -10760 +4340 -7640 +4340 -7620 +4340 -7460 +4340 -7440 +4340 -7420 +4340 3000 +4340 3020 +4340 3080 +4340 3100 +4340 3140 +4340 13500 +4340 13560 +4340 13720 +4340 14180 +4340 14200 +4340 19080 +4360 -23500 +4360 -23480 +4360 -23460 +4360 -23440 +4360 -23200 +4360 -23160 +4360 -20960 +4360 -20940 +4360 -10880 +4360 -10800 +4360 -10780 +4360 -10760 +4360 -7640 +4360 -7620 +4360 -7440 +4360 -7420 +4360 3000 +4360 3020 +4360 3100 +4360 3120 +4360 13520 +4360 13580 +4360 13600 +4360 14180 +4360 14200 +4380 -23500 +4380 -23480 +4380 -20960 +4380 -20940 +4380 -17220 +4380 -10900 +4380 -10880 +4380 -10800 +4380 -10780 +4380 -10760 +4380 -7640 +4380 -7620 +4380 -7480 +4380 -7440 +4380 -7420 +4380 3020 +4380 3080 +4380 3100 +4380 3120 +4380 3140 +4380 3160 +4380 12920 +4380 13500 +4380 13520 +4380 13560 +4380 13580 +4380 13600 +4380 13620 +4380 14160 +4380 14180 +4380 14200 +4380 19060 +4400 -23500 +4400 -23480 +4400 -20960 +4400 -20940 +4400 -17200 +4400 -10900 +4400 -10880 +4400 -10800 +4400 -10780 +4400 -10760 +4400 -7640 +4400 -7620 +4400 -7460 +4400 -7440 +4400 -7420 +4400 3020 +4400 3080 +4400 3100 +4400 3120 +4400 3140 +4400 3160 +4400 12920 +4400 12940 +4400 13520 +4400 13580 +4400 14140 +4400 14160 +4400 14180 +4420 -23500 +4420 -23480 +4420 -20960 +4420 -20940 +4420 -10980 +4420 -10900 +4420 -10880 +4420 -10860 +4420 -10800 +4420 -10780 +4420 -10760 +4420 -7640 +4420 -7620 +4420 -7460 +4420 -7440 +4420 -7420 +4420 3000 +4420 3020 +4420 3080 +4420 3120 +4420 3140 +4420 13160 +4420 13220 +4420 13240 +4420 13580 +4420 14140 +4420 14160 +4440 -23480 +4440 -23380 +4440 -20960 +4440 -20940 +4440 -17200 +4440 -11000 +4440 -10940 +4440 -10900 +4440 -10880 +4440 -10800 +4440 -10780 +4440 -10760 +4440 -7640 +4440 -7620 +4440 -7460 +4440 -7440 +4440 -7420 +4440 3000 +4440 3020 +4440 3120 +4440 3140 +4440 13160 +4440 13220 +4440 13380 +4440 13400 +4440 13440 +4440 13460 +4440 13480 +4440 13640 +4440 13720 +4440 14160 +4460 -23500 +4460 -23480 +4460 -23400 +4460 -23380 +4460 -23360 +4460 -23340 +4460 -22960 +4460 -22940 +4460 -20960 +4460 -20940 +4460 -17200 +4460 -10980 +4460 -10960 +4460 -10900 +4460 -10880 +4460 -10800 +4460 -10780 +4460 -10760 +4460 -7640 +4460 -7620 +4460 -7460 +4460 -7440 +4460 -7420 +4460 3000 +4460 3020 +4460 3080 +4460 3120 +4460 5760 +4460 13220 +4460 13300 +4460 13320 +4460 13340 +4460 13380 +4460 13420 +4460 13440 +4460 13460 +4460 13480 +4460 13500 +4460 13580 +4460 13620 +4460 14160 +4480 -23500 +4480 -23480 +4480 -23440 +4480 -23420 +4480 -23400 +4480 -23360 +4480 -23340 +4480 -23300 +4480 -23160 +4480 -23140 +4480 -23100 +4480 -23080 +4480 -23020 +4480 -22980 +4480 -22960 +4480 -22940 +4480 -22920 +4480 -22900 +4480 -20960 +4480 -20940 +4480 -17220 +4480 -11020 +4480 -11000 +4480 -10900 +4480 -10800 +4480 -10780 +4480 -10760 +4480 -7640 +4480 -7620 +4480 -7440 +4480 -7420 +4480 3000 +4480 3020 +4480 3100 +4480 3120 +4480 3160 +4480 3180 +4480 5720 +4480 5740 +4480 13140 +4480 13160 +4480 13180 +4480 13200 +4480 13220 +4480 13240 +4480 13260 +4480 13280 +4480 13300 +4480 13320 +4480 13340 +4480 13380 +4480 13400 +4480 13420 +4480 13440 +4480 13460 +4480 13480 +4480 13580 +4480 13600 +4480 13620 +4480 13640 +4480 14140 +4480 14160 +4480 24480 +4500 -23480 +4500 -23440 +4500 -23420 +4500 -23360 +4500 -23340 +4500 -23320 +4500 -23300 +4500 -23180 +4500 -23160 +4500 -23140 +4500 -23120 +4500 -23100 +4500 -23080 +4500 -23060 +4500 -23040 +4500 -23020 +4500 -23000 +4500 -22980 +4500 -22960 +4500 -22940 +4500 -22920 +4500 -20960 +4500 -20940 +4500 -17200 +4500 -11040 +4500 -11000 +4500 -10860 +4500 -10800 +4500 -10780 +4500 -10760 +4500 -10740 +4500 -7640 +4500 -7620 +4500 -7480 +4500 -7460 +4500 -7440 +4500 -7420 +4500 3000 +4500 3020 +4500 3080 +4500 3100 +4500 3120 +4500 3140 +4500 3160 +4500 5720 +4500 5740 +4500 13140 +4500 13160 +4500 13180 +4500 13200 +4500 13220 +4500 13240 +4500 13260 +4500 13280 +4500 13300 +4500 13340 +4500 13420 +4500 13540 +4500 13560 +4500 13580 +4500 13600 +4500 13620 +4500 13640 +4500 14160 +4520 -23500 +4520 -23480 +4520 -23400 +4520 -23380 +4520 -23340 +4520 -23080 +4520 -23020 +4520 -23000 +4520 -22940 +4520 -22920 +4520 -20960 +4520 -20940 +4520 -11080 +4520 -11040 +4520 -10880 +4520 -10800 +4520 -10780 +4520 -10760 +4520 -7640 +4520 -7620 +4520 -7600 +4520 -7460 +4520 -7440 +4520 -7420 +4520 3000 +4520 3020 +4520 3100 +4520 3120 +4520 3140 +4520 3160 +4520 12920 +4520 12940 +4520 12980 +4520 13020 +4520 13560 +4520 13620 +4520 13640 +4520 13660 +4520 13700 +4520 14160 +4540 -23500 +4540 -23480 +4540 -23420 +4540 -23400 +4540 -23380 +4540 -23040 +4540 -23000 +4540 -22940 +4540 -22920 +4540 -20960 +4540 -20940 +4540 -17200 +4540 -11060 +4540 -10800 +4540 -10780 +4540 -7640 +4540 -7620 +4540 -7480 +4540 -7460 +4540 -7440 +4540 -7420 +4540 3020 +4540 3080 +4540 3100 +4540 12920 +4540 12940 +4540 12960 +4540 12980 +4540 13000 +4540 13020 +4540 13040 +4540 13060 +4540 13080 +4540 13100 +4540 13620 +4540 13640 +4540 13720 +4540 14160 +4540 24480 +4560 -23480 +4560 -23400 +4560 -23380 +4560 -23020 +4560 -22940 +4560 -22920 +4560 -20960 +4560 -20940 +4560 -17200 +4560 -10880 +4560 -10800 +4560 -10780 +4560 -10760 +4560 -7640 +4560 -7620 +4560 -7440 +4560 -7420 +4560 3000 +4560 3020 +4560 3080 +4560 3100 +4560 3120 +4560 5720 +4560 5760 +4560 12960 +4560 13060 +4560 13080 +4560 13100 +4560 13640 +4560 14160 +4560 18200 +4580 -23420 +4580 -23400 +4580 -23380 +4580 -22940 +4580 -22920 +4580 -20960 +4580 -20940 +4580 -17220 +4580 -11180 +4580 -10960 +4580 -10940 +4580 -10880 +4580 -10800 +4580 -10780 +4580 -10760 +4580 -7640 +4580 -7620 +4580 -7460 +4580 -7440 +4580 -7420 +4580 -7400 +4580 3020 +4580 3080 +4580 3100 +4580 3120 +4580 3140 +4580 5720 +4580 13640 +4580 14160 +4580 18180 +4580 18200 +4580 18220 +4580 18240 +4600 -23480 +4600 -23400 +4600 -23380 +4600 -22920 +4600 -20960 +4600 -20940 +4600 -17220 +4600 -11160 +4600 -10880 +4600 -10800 +4600 -10780 +4600 -10760 +4600 -10740 +4600 -7640 +4600 -7620 +4600 -7500 +4600 -7440 +4600 -7420 +4600 3000 +4600 3020 +4600 3100 +4600 3120 +4600 5760 +4600 13640 +4600 13660 +4600 13700 +4600 14160 +4600 18180 +4600 18200 +4620 -23400 +4620 -23380 +4620 -22980 +4620 -22960 +4620 -22940 +4620 -20960 +4620 -20940 +4620 -10900 +4620 -10800 +4620 -10780 +4620 -10760 +4620 -7640 +4620 -7620 +4620 -7480 +4620 -7460 +4620 -7440 +4620 -7420 +4620 3000 +4620 3080 +4620 3100 +4620 3120 +4620 3140 +4620 3160 +4620 13640 +4620 13720 +4620 14160 +4620 18180 +4620 18200 +4640 -23400 +4640 -23380 +4640 -22960 +4640 -22940 +4640 -22900 +4640 -20980 +4640 -20960 +4640 -20940 +4640 -10900 +4640 -10880 +4640 -10800 +4640 -10780 +4640 -7640 +4640 -7620 +4640 -7500 +4640 -7480 +4640 -7440 +4640 -7420 +4640 -7400 +4640 3000 +4640 3020 +4640 3100 +4640 3140 +4640 3160 +4640 14140 +4640 14160 +4640 18180 +4640 18200 +4640 18220 +4660 -23400 +4660 -23380 +4660 -23340 +4660 -23020 +4660 -23000 +4660 -22960 +4660 -22940 +4660 -22920 +4660 -22900 +4660 -20960 +4660 -20940 +4660 -11860 +4660 -11840 +4660 -11820 +4660 -10800 +4660 -10780 +4660 -10760 +4660 -7640 +4660 -7620 +4660 -7600 +4660 -7500 +4660 -7460 +4660 -7440 +4660 -7420 +4660 3080 +4660 3100 +4660 3140 +4660 3160 +4660 13640 +4660 14160 +4660 18160 +4660 18180 +4660 18200 +4680 -23380 +4680 -23340 +4680 -23020 +4680 -23000 +4680 -22940 +4680 -22920 +4680 -20960 +4680 -20940 +4680 -11840 +4680 -11800 +4680 -10800 +4680 -10780 +4680 -10760 +4680 -7640 +4680 -7620 +4680 -7520 +4680 -7500 +4680 -7460 +4680 -7440 +4680 -7420 +4680 3020 +4680 3080 +4680 3100 +4680 3140 +4680 13620 +4680 13640 +4680 13660 +4680 14160 +4680 18200 +4700 -23400 +4700 -23380 +4700 -23340 +4700 -23020 +4700 -22940 +4700 -22920 +4700 -20960 +4700 -20940 +4700 -20400 +4700 -20380 +4700 -20360 +4700 -20340 +4700 -20320 +4700 -20300 +4700 -11880 +4700 -11860 +4700 -11820 +4700 -11800 +4700 -10900 +4700 -10880 +4700 -10800 +4700 -10780 +4700 -10760 +4700 -7640 +4700 -7620 +4700 -7500 +4700 -7460 +4700 -7440 +4700 -7420 +4700 -7400 +4700 3080 +4700 3100 +4700 3120 +4700 3140 +4700 3160 +4700 13620 +4700 13640 +4700 13660 +4700 14140 +4700 14160 +4700 18180 +4700 18200 +4720 -23400 +4720 -23380 +4720 -23100 +4720 -23020 +4720 -23000 +4720 -22960 +4720 -22940 +4720 -22920 +4720 -20960 +4720 -20940 +4720 -11120 +4720 -10800 +4720 -10780 +4720 -10760 +4720 -7640 +4720 -7620 +4720 -7500 +4720 -7480 +4720 -7460 +4720 -7440 +4720 -7420 +4720 -7400 +4720 3060 +4720 3080 +4720 3140 +4720 13640 +4720 13720 +4720 14160 +4720 18200 +4720 18220 +4740 -23400 +4740 -23380 +4740 -22940 +4740 -22900 +4740 -20960 +4740 -20940 +4740 -15640 +4740 -15600 +4740 -10800 +4740 -10780 +4740 -10760 +4740 -7640 +4740 -7620 +4740 -7600 +4740 -7500 +4740 -7460 +4740 -7420 +4740 3060 +4740 3080 +4740 3100 +4740 3120 +4740 3160 +4740 13620 +4740 13640 +4740 13660 +4740 14160 +4740 18180 +4740 18200 +4760 -23400 +4760 -23380 +4760 -23260 +4760 -23220 +4760 -23100 +4760 -23060 +4760 -23040 +4760 -23000 +4760 -22960 +4760 -22940 +4760 -22920 +4760 -22900 +4760 -20960 +4760 -20940 +4760 -11140 +4760 -10800 +4760 -10780 +4760 -10740 +4760 -7640 +4760 -7620 +4760 -7520 +4760 -7500 +4760 -7480 +4760 -7460 +4760 -7440 +4760 3080 +4760 3100 +4760 3120 +4760 3140 +4760 13640 +4760 13660 +4760 14160 +4760 18180 +4760 18200 +4760 18220 +4780 -23400 +4780 -23260 +4780 -23240 +4780 -23200 +4780 -22940 +4780 -20960 +4780 -20940 +4780 -20220 +4780 -11220 +4780 -10800 +4780 -10780 +4780 -10760 +4780 -7640 +4780 -7620 +4780 -7540 +4780 -7520 +4780 -7500 +4780 3080 +4780 3100 +4780 3120 +4780 3140 +4780 13640 +4780 14160 +4780 18200 +4780 18220 +4800 -23400 +4800 -23380 +4800 -23260 +4800 -23220 +4800 -23040 +4800 -22960 +4800 -22940 +4800 -20960 +4800 -20940 +4800 -20200 +4800 -11240 +4800 -11200 +4800 -10800 +4800 -10780 +4800 -10760 +4800 -7640 +4800 -7620 +4800 -7520 +4800 -7500 +4800 -7480 +4800 -7460 +4800 3080 +4800 3100 +4800 3140 +4800 13640 +4800 14160 +4800 18180 +4800 18200 +4820 -23400 +4820 -23380 +4820 -22960 +4820 -22940 +4820 -20960 +4820 -20940 +4820 -10900 +4820 -10860 +4820 -10800 +4820 -10780 +4820 -10760 +4820 -7640 +4820 -7620 +4820 -7540 +4820 -7520 +4820 -7500 +4820 3060 +4820 3080 +4820 3100 +4820 3140 +4820 3160 +4820 13640 +4820 14160 +4820 18180 +4820 18200 +4840 -23400 +4840 -23380 +4840 -23240 +4840 -22960 +4840 -22940 +4840 -20960 +4840 -20940 +4840 -10920 +4840 -10900 +4840 -10880 +4840 -10800 +4840 -10780 +4840 -10760 +4840 -7640 +4840 -7620 +4840 -7600 +4840 -7540 +4840 -7520 +4840 -7500 +4840 3080 +4840 3120 +4840 3140 +4840 3160 +4840 13620 +4840 13640 +4840 13660 +4840 14160 +4840 18180 +4840 18200 +4860 -23400 +4860 -23280 +4860 -22960 +4860 -22940 +4860 -20960 +4860 -20940 +4860 -12180 +4860 -12160 +4860 -10900 +4860 -10880 +4860 -10800 +4860 -10780 +4860 -10760 +4860 -10740 +4860 -7640 +4860 -7620 +4860 -7600 +4860 -7500 +4860 1840 +4860 3080 +4860 3120 +4860 3140 +4860 13640 +4860 13800 +4860 14160 +4860 18180 +4860 18200 +4860 18220 +4880 -23420 +4880 -23400 +4880 -22960 +4880 -22940 +4880 -20960 +4880 -20940 +4880 -12220 +4880 -12200 +4880 -12160 +4880 -12120 +4880 -12100 +4880 -12060 +4880 -10800 +4880 -10780 +4880 -7640 +4880 -7620 +4880 -7600 +4880 -7560 +4880 -7540 +4880 -7520 +4880 -7500 +4880 1820 +4880 1840 +4880 3080 +4880 3100 +4880 3120 +4880 3140 +4880 11880 +4880 13640 +4880 13660 +4880 13780 +4880 14160 +4880 18200 +4900 -23400 +4900 -22960 +4900 -22940 +4900 -20960 +4900 -20940 +4900 -12280 +4900 -12260 +4900 -12180 +4900 -12120 +4900 -12080 +4900 -12060 +4900 -10900 +4900 -10880 +4900 -10800 +4900 -10780 +4900 -10760 +4900 -7640 +4900 -7620 +4900 -7600 +4900 -7540 +4900 -7520 +4900 -7500 +4900 1800 +4900 1820 +4900 1840 +4900 2080 +4900 3060 +4900 3100 +4900 3120 +4900 3140 +4900 3160 +4900 11620 +4900 11900 +4900 13640 +4900 13660 +4900 13780 +4900 14140 +4900 14160 +4900 18180 +4900 18200 +4900 22320 +4920 -23400 +4920 -22960 +4920 -22940 +4920 -20960 +4920 -20940 +4920 -12060 +4920 -10880 +4920 -10800 +4920 -10780 +4920 -7640 +4920 -7620 +4920 -7600 +4920 -7540 +4920 -7520 +4920 -7500 +4920 1800 +4920 1820 +4920 3100 +4920 3120 +4920 11900 +4920 13640 +4920 13660 +4920 14160 +4920 18200 +4940 -23400 +4940 -22960 +4940 -22940 +4940 -20960 +4940 -20940 +4940 -12020 +4940 -12000 +4940 -10800 +4940 -10780 +4940 -10760 +4940 -7640 +4940 -7620 +4940 -7600 +4940 -7580 +4940 -7520 +4940 1800 +4940 1820 +4940 3000 +4940 3080 +4940 3100 +4940 3140 +4940 11600 +4940 11620 +4940 11900 +4940 13640 +4940 14160 +4940 18180 +4940 18200 +4940 18220 +4940 22320 +4960 -23400 +4960 -23360 +4960 -22960 +4960 -22940 +4960 -20960 +4960 -20940 +4960 -12000 +4960 -11900 +4960 -10800 +4960 -10780 +4960 -10760 +4960 -7640 +4960 -7620 +4960 -7600 +4960 -7540 +4960 -7520 +4960 -7500 +4960 1800 +4960 1820 +4960 1840 +4960 1880 +4960 3080 +4960 3100 +4960 3120 +4960 3140 +4960 11480 +4960 11620 +4960 11640 +4960 11900 +4960 14160 +4960 18180 +4960 18200 +4960 18220 +4960 18240 +4960 22240 +4980 -23400 +4980 -23380 +4980 -23340 +4980 -23320 +4980 -23240 +4980 -23220 +4980 -22960 +4980 -22940 +4980 -20960 +4980 -20940 +4980 -12320 +4980 -12020 +4980 -11980 +4980 -11960 +4980 -11920 +4980 -10800 +4980 -10780 +4980 -10760 +4980 -10740 +4980 -7640 +4980 -7620 +4980 -7600 +4980 -7580 +4980 -7520 +4980 -7500 +4980 1820 +4980 1840 +4980 1920 +4980 2060 +4980 3020 +4980 3060 +4980 3080 +4980 3100 +4980 3120 +4980 3140 +4980 3160 +4980 11580 +4980 11640 +4980 11880 +4980 11900 +4980 13640 +4980 14160 +4980 18180 +4980 18200 +4980 18520 +5000 -23500 +5000 -23480 +5000 -23460 +5000 -23440 +5000 -23420 +5000 -23400 +5000 -23380 +5000 -23340 +5000 -23300 +5000 -23220 +5000 -23200 +5000 -22960 +5000 -22940 +5000 -20960 +5000 -20940 +5000 -12320 +5000 -12300 +5000 -12140 +5000 -12120 +5000 -12080 +5000 -12060 +5000 -12000 +5000 -11940 +5000 -10800 +5000 -10780 +5000 -10760 +5000 -7640 +5000 -7620 +5000 -7600 +5000 -7520 +5000 -7500 +5000 1820 +5000 1840 +5000 1960 +5000 2080 +5000 3020 +5000 3080 +5000 3100 +5000 3120 +5000 11600 +5000 11640 +5000 11900 +5000 13620 +5000 13640 +5000 14160 +5000 18180 +5000 18200 +5000 18400 +5000 18740 +5000 22240 +5020 -23500 +5020 -23480 +5020 -23460 +5020 -23020 +5020 -23000 +5020 -22980 +5020 -22960 +5020 -22940 +5020 -20960 +5020 -20940 +5020 -12320 +5020 -12300 +5020 -12260 +5020 -12240 +5020 -12200 +5020 -12180 +5020 -12120 +5020 -12060 +5020 -11880 +5020 -10900 +5020 -10800 +5020 -10780 +5020 -10760 +5020 -7640 +5020 -7620 +5020 -7600 +5020 -7520 +5020 -7500 +5020 1820 +5020 2300 +5020 2420 +5020 2440 +5020 2720 +5020 3080 +5020 3120 +5020 3160 +5020 10540 +5020 10560 +5020 11480 +5020 11880 +5020 11900 +5020 13620 +5020 13640 +5020 14140 +5020 14160 +5020 18180 +5020 18200 +5020 18220 +5020 18240 +5020 18280 +5020 18340 +5020 18380 +5020 18420 +5020 18440 +5020 18460 +5020 18500 +5020 18520 +5020 18540 +5020 18560 +5020 18620 +5020 18640 +5020 18660 +5020 18720 +5020 18760 +5020 18880 +5020 18900 +5040 -26920 +5040 -23500 +5040 -23480 +5040 -23000 +5040 -22960 +5040 -22940 +5040 -20960 +5040 -20940 +5040 -12260 +5040 -12160 +5040 -12100 +5040 -12080 +5040 -12040 +5040 -12000 +5040 -11880 +5040 -10800 +5040 -10780 +5040 -7640 +5040 -7620 +5040 -7600 +5040 -7520 +5040 -7500 +5040 1820 +5040 1840 +5040 2080 +5040 2320 +5040 3080 +5040 3100 +5040 3120 +5040 3140 +5040 10560 +5040 10580 +5040 11480 +5040 11640 +5040 11900 +5040 13620 +5040 13640 +5040 14140 +5040 14160 +5040 18180 +5040 18200 +5040 18260 +5040 18320 +5040 18340 +5040 18460 +5040 18480 +5040 18500 +5040 18520 +5040 18560 +5040 18580 +5040 18760 +5040 18780 +5040 18860 +5040 18880 +5040 18900 +5040 18920 +5040 22660 +5060 -23500 +5060 -23480 +5060 -20960 +5060 -20940 +5060 -14520 +5060 -12240 +5060 -12220 +5060 -12020 +5060 -11820 +5060 -11800 +5060 -11440 +5060 -11320 +5060 -10880 +5060 -10800 +5060 -10780 +5060 -10760 +5060 -7640 +5060 -7620 +5060 -7600 +5060 -7520 +5060 -7500 +5060 1820 +5060 1840 +5060 2340 +5060 3020 +5060 3080 +5060 3100 +5060 3140 +5060 3160 +5060 10540 +5060 10560 +5060 10620 +5060 11460 +5060 11500 +5060 11880 +5060 11900 +5060 13620 +5060 13640 +5060 14160 +5060 14180 +5060 18180 +5060 18200 +5060 18280 +5060 18340 +5060 18360 +5060 18420 +5060 18440 +5060 18520 +5060 18620 +5060 18740 +5060 18820 +5060 18940 +5080 -23500 +5080 -23480 +5080 -20960 +5080 -20940 +5080 -14540 +5080 -12300 +5080 -12060 +5080 -12040 +5080 -11780 +5080 -11420 +5080 -11260 +5080 -10880 +5080 -10860 +5080 -10800 +5080 -10780 +5080 -10760 +5080 -7640 +5080 -7620 +5080 -7600 +5080 -7540 +5080 -7520 +5080 -7500 +5080 -6380 +5080 -6360 +5080 1820 +5080 1840 +5080 1960 +5080 2300 +5080 2420 +5080 2720 +5080 3100 +5080 3120 +5080 3140 +5080 3160 +5080 5700 +5080 10540 +5080 10560 +5080 10580 +5080 11880 +5080 11900 +5080 13620 +5080 13640 +5080 13760 +5080 13780 +5080 14140 +5080 14160 +5080 14180 +5080 18940 +5080 18960 +5100 -23500 +5100 -23480 +5100 -20960 +5100 -20940 +5100 -15280 +5100 -14500 +5100 -14480 +5100 -14460 +5100 -14080 +5100 -14040 +5100 -14020 +5100 -13960 +5100 -13920 +5100 -13900 +5100 -13620 +5100 -13600 +5100 -13560 +5100 -13540 +5100 -12340 +5100 -12320 +5100 -12160 +5100 -12140 +5100 -12100 +5100 -12080 +5100 -12020 +5100 -11920 +5100 -11860 +5100 -11780 +5100 -11760 +5100 -11740 +5100 -11440 +5100 -11420 +5100 -11380 +5100 -11360 +5100 -11320 +5100 -11300 +5100 -11280 +5100 -11260 +5100 -11040 +5100 -10940 +5100 -10900 +5100 -10880 +5100 -10800 +5100 -10780 +5100 -10740 +5100 -7640 +5100 -7620 +5100 -7600 +5100 -7580 +5100 -7540 +5100 -7520 +5100 -7500 +5100 -6380 +5100 -6360 +5100 -6340 +5100 1820 +5100 1840 +5100 2080 +5100 2300 +5100 2420 +5100 2440 +5100 2720 +5100 3000 +5100 3020 +5100 3060 +5100 3080 +5100 3100 +5100 3120 +5100 3140 +5100 5680 +5100 5700 +5100 10540 +5100 10560 +5100 10580 +5100 10600 +5100 10620 +5100 10640 +5100 11500 +5100 11880 +5100 11900 +5100 13620 +5100 13640 +5100 13740 +5100 14140 +5100 14160 +5100 14180 +5100 18940 +5120 -23500 +5120 -23480 +5120 -20960 +5120 -20940 +5120 -16040 +5120 -16000 +5120 -15980 +5120 -15800 +5120 -15760 +5120 -15700 +5120 -15620 +5120 -15520 +5120 -15460 +5120 -15300 +5120 -15280 +5120 -15080 +5120 -14700 +5120 -14660 +5120 -14560 +5120 -14500 +5120 -14480 +5120 -14460 +5120 -14440 +5120 -14320 +5120 -14120 +5120 -14080 +5120 -14060 +5120 -14020 +5120 -13980 +5120 -13940 +5120 -13920 +5120 -13880 +5120 -13840 +5120 -13820 +5120 -13800 +5120 -13780 +5120 -13740 +5120 -13720 +5120 -13700 +5120 -13680 +5120 -13660 +5120 -13600 +5120 -13580 +5120 -13540 +5120 -13520 +5120 -13500 +5120 -13480 +5120 -13440 +5120 -13420 +5120 -13400 +5120 -13380 +5120 -13320 +5120 -13300 +5120 -13280 +5120 -13240 +5120 -13220 +5120 -13180 +5120 -13160 +5120 -13140 +5120 -13120 +5120 -13080 +5120 -13060 +5120 -13040 +5120 -13020 +5120 -12980 +5120 -12960 +5120 -12920 +5120 -12900 +5120 -12880 +5120 -12840 +5120 -12820 +5120 -12800 +5120 -12780 +5120 -12760 +5120 -12740 +5120 -12720 +5120 -12700 +5120 -12680 +5120 -12660 +5120 -12640 +5120 -12620 +5120 -12600 +5120 -12580 +5120 -12560 +5120 -12540 +5120 -12520 +5120 -12500 +5120 -12480 +5120 -12460 +5120 -12440 +5120 -12420 +5120 -12400 +5120 -12380 +5120 -12360 +5120 -12340 +5120 -12280 +5120 -12260 +5120 -12240 +5120 -12220 +5120 -12120 +5120 -12080 +5120 -12060 +5120 -12000 +5120 -11980 +5120 -11960 +5120 -11940 +5120 -11920 +5120 -11900 +5120 -11880 +5120 -11860 +5120 -11840 +5120 -11800 +5120 -11780 +5120 -11760 +5120 -11720 +5120 -11700 +5120 -11680 +5120 -11660 +5120 -11640 +5120 -11620 +5120 -11600 +5120 -11580 +5120 -11560 +5120 -11540 +5120 -11520 +5120 -11480 +5120 -11460 +5120 -11420 +5120 -11400 +5120 -11340 +5120 -11300 +5120 -11280 +5120 -11260 +5120 -11240 +5120 -11220 +5120 -11200 +5120 -11180 +5120 -11160 +5120 -11140 +5120 -11120 +5120 -11080 +5120 -11060 +5120 -11040 +5120 -11020 +5120 -11000 +5120 -10980 +5120 -10960 +5120 -10940 +5120 -10920 +5120 -10800 +5120 -10780 +5120 -10760 +5120 -7640 +5120 -7620 +5120 -7600 +5120 -7520 +5120 -7500 +5120 -6380 +5120 -6360 +5120 -6340 +5120 1820 +5120 1840 +5120 1860 +5120 2080 +5120 2280 +5120 2300 +5120 2420 +5120 2720 +5120 3020 +5120 3080 +5120 3120 +5120 5680 +5120 5700 +5120 10280 +5120 10560 +5120 10580 +5120 10600 +5120 10620 +5120 10640 +5120 10660 +5120 10680 +5120 10700 +5120 11500 +5120 11880 +5120 13620 +5120 13640 +5120 13760 +5120 13780 +5120 14140 +5120 14160 +5120 18940 +5140 -23500 +5140 -23480 +5140 -20960 +5140 -20940 +5140 -15680 +5140 -15580 +5140 -15460 +5140 -15400 +5140 -15360 +5140 -15300 +5140 -15280 +5140 -15260 +5140 -15200 +5140 -15180 +5140 -15160 +5140 -15120 +5140 -15100 +5140 -15080 +5140 -15060 +5140 -15020 +5140 -15000 +5140 -14980 +5140 -14940 +5140 -14920 +5140 -14900 +5140 -14880 +5140 -14840 +5140 -14820 +5140 -14800 +5140 -14780 +5140 -14760 +5140 -14740 +5140 -14720 +5140 -14680 +5140 -14660 +5140 -14640 +5140 -14620 +5140 -14600 +5140 -14580 +5140 -14560 +5140 -14460 +5140 -14440 +5140 -14420 +5140 -14400 +5140 -14380 +5140 -14360 +5140 -14340 +5140 -14320 +5140 -14300 +5140 -14280 +5140 -14260 +5140 -14240 +5140 -14220 +5140 -14200 +5140 -14180 +5140 -14160 +5140 -14140 +5140 -14120 +5140 -14100 +5140 -14080 +5140 -14060 +5140 -14000 +5140 -13980 +5140 -13960 +5140 -13940 +5140 -13900 +5140 -13860 +5140 -13840 +5140 -13820 +5140 -13800 +5140 -13780 +5140 -13760 +5140 -13740 +5140 -13720 +5140 -13700 +5140 -13680 +5140 -13660 +5140 -13640 +5140 -13620 +5140 -13600 +5140 -13560 +5140 -13540 +5140 -13520 +5140 -13500 +5140 -13480 +5140 -13460 +5140 -13440 +5140 -13420 +5140 -13400 +5140 -13380 +5140 -13360 +5140 -13340 +5140 -13320 +5140 -13300 +5140 -13280 +5140 -13260 +5140 -13240 +5140 -13220 +5140 -13200 +5140 -13180 +5140 -13160 +5140 -13140 +5140 -13120 +5140 -13100 +5140 -13080 +5140 -13060 +5140 -13040 +5140 -13020 +5140 -13000 +5140 -12980 +5140 -12960 +5140 -12940 +5140 -12920 +5140 -12900 +5140 -12880 +5140 -12860 +5140 -12840 +5140 -12820 +5140 -12800 +5140 -12780 +5140 -12760 +5140 -12740 +5140 -12720 +5140 -12700 +5140 -12660 +5140 -12640 +5140 -12620 +5140 -12600 +5140 -12580 +5140 -12560 +5140 -12540 +5140 -12520 +5140 -12500 +5140 -12480 +5140 -12460 +5140 -12440 +5140 -12420 +5140 -12400 +5140 -12380 +5140 -12360 +5140 -12340 +5140 -12320 +5140 -12220 +5140 -12200 +5140 -12180 +5140 -11900 +5140 -11720 +5140 -11680 +5140 -11660 +5140 -11640 +5140 -11620 +5140 -11600 +5140 -11580 +5140 -11560 +5140 -11540 +5140 -11520 +5140 -11500 +5140 -11480 +5140 -11460 +5140 -11440 +5140 -11420 +5140 -11400 +5140 -11360 +5140 -11340 +5140 -11320 +5140 -11300 +5140 -11280 +5140 -11260 +5140 -11240 +5140 -11220 +5140 -11200 +5140 -11180 +5140 -11140 +5140 -11040 +5140 -11020 +5140 -10980 +5140 -10800 +5140 -10780 +5140 -10760 +5140 -7640 +5140 -7620 +5140 -7600 +5140 -7580 +5140 -7520 +5140 -7500 +5140 -6380 +5140 -6360 +5140 -6340 +5140 1820 +5140 1840 +5140 1860 +5140 1880 +5140 2080 +5140 2100 +5140 2220 +5140 2280 +5140 2300 +5140 2420 +5140 2440 +5140 2680 +5140 2720 +5140 2740 +5140 3020 +5140 3060 +5140 3080 +5140 3100 +5140 3120 +5140 3140 +5140 5700 +5140 10280 +5140 10300 +5140 10580 +5140 10600 +5140 10640 +5140 10700 +5140 11600 +5140 11860 +5140 11880 +5140 11900 +5140 13620 +5140 13640 +5140 13760 +5140 14140 +5140 14160 +5140 14180 +5140 18940 +5140 18960 +5160 -23500 +5160 -23480 +5160 -20940 +5160 -15920 +5160 -15820 +5160 -15760 +5160 -15700 +5160 -15680 +5160 -15660 +5160 -15620 +5160 -15600 +5160 -15580 +5160 -15560 +5160 -15520 +5160 -15500 +5160 -15480 +5160 -15460 +5160 -15440 +5160 -15400 +5160 -15380 +5160 -15360 +5160 -15340 +5160 -15320 +5160 -15300 +5160 -15260 +5160 -15240 +5160 -15220 +5160 -15200 +5160 -15180 +5160 -15160 +5160 -15140 +5160 -15120 +5160 -15100 +5160 -15080 +5160 -15040 +5160 -15020 +5160 -15000 +5160 -14980 +5160 -14940 +5160 -14900 +5160 -14840 +5160 -14820 +5160 -14800 +5160 -14720 +5160 -14680 +5160 -14620 +5160 -14540 +5160 -14440 +5160 -14420 +5160 -14400 +5160 -14340 +5160 -14320 +5160 -14300 +5160 -14280 +5160 -14260 +5160 -14200 +5160 -14140 +5160 -13440 +5160 -13340 +5160 -11640 +5160 -11580 +5160 -11520 +5160 -11460 +5160 -10800 +5160 -10780 +5160 -10760 +5160 -7640 +5160 -7620 +5160 -7600 +5160 -7540 +5160 -7520 +5160 -7500 +5160 -6380 +5160 -6360 +5160 -6340 +5160 1820 +5160 1840 +5160 1860 +5160 2040 +5160 2060 +5160 2080 +5160 2100 +5160 2120 +5160 2140 +5160 2160 +5160 2180 +5160 2200 +5160 2220 +5160 2240 +5160 2260 +5160 2280 +5160 2300 +5160 2420 +5160 2440 +5160 2460 +5160 2540 +5160 2680 +5160 2700 +5160 2720 +5160 2740 +5160 2760 +5160 2920 +5160 3020 +5160 3060 +5160 3080 +5160 3100 +5160 3120 +5160 3140 +5160 5280 +5160 10280 +5160 10580 +5160 10700 +5160 11740 +5160 11820 +5160 11860 +5160 11880 +5160 13620 +5160 13640 +5160 13760 +5160 13780 +5160 14140 +5160 14160 +5160 14180 +5160 18940 +5180 -23500 +5180 -23480 +5180 -20960 +5180 -20940 +5180 -16040 +5180 -15980 +5180 -15900 +5180 -15840 +5180 -15760 +5180 -15700 +5180 -15640 +5180 -15620 +5180 -15560 +5180 -15500 +5180 -15440 +5180 -15420 +5180 -15320 +5180 -10800 +5180 -10780 +5180 -10760 +5180 -7620 +5180 -7600 +5180 -7580 +5180 -7520 +5180 -7500 +5180 -6380 +5180 -6360 +5180 -6340 +5180 1820 +5180 1840 +5180 1860 +5180 1880 +5180 2000 +5180 2020 +5180 2040 +5180 2060 +5180 2080 +5180 2100 +5180 2120 +5180 2140 +5180 2160 +5180 2180 +5180 2200 +5180 2220 +5180 2240 +5180 2260 +5180 2420 +5180 2440 +5180 2460 +5180 2500 +5180 2520 +5180 2720 +5180 2740 +5180 2760 +5180 2780 +5180 2800 +5180 2840 +5180 2860 +5180 2880 +5180 2900 +5180 2920 +5180 2940 +5180 3020 +5180 3080 +5180 3100 +5180 3120 +5180 3140 +5180 5260 +5180 5280 +5180 10260 +5180 10280 +5180 11180 +5180 11280 +5180 11320 +5180 11440 +5180 11520 +5180 11560 +5180 11640 +5180 11720 +5180 11760 +5180 11780 +5180 11800 +5180 11820 +5180 11840 +5180 11860 +5180 11880 +5180 13620 +5180 13640 +5180 13760 +5180 13780 +5180 14140 +5180 14160 +5180 18940 +5200 -23500 +5200 -23480 +5200 -20960 +5200 -20940 +5200 -12800 +5200 -12640 +5200 -12460 +5200 -12300 +5200 -12140 +5200 -12020 +5200 -11980 +5200 -11840 +5200 -11820 +5200 -11540 +5200 -11480 +5200 -11260 +5200 -11180 +5200 -11160 +5200 -11140 +5200 -11060 +5200 -11040 +5200 -11020 +5200 -10960 +5200 -10920 +5200 -10900 +5200 -10800 +5200 -10780 +5200 -10760 +5200 -7640 +5200 -7620 +5200 -7600 +5200 -7520 +5200 -7500 +5200 -6380 +5200 -6360 +5200 -6340 +5200 1840 +5200 1860 +5200 1880 +5200 1900 +5200 1960 +5200 1980 +5200 2000 +5200 2020 +5200 2060 +5200 2080 +5200 2400 +5200 2420 +5200 2440 +5200 2460 +5200 2480 +5200 2500 +5200 2520 +5200 2540 +5200 2560 +5200 2620 +5200 2640 +5200 2660 +5200 2720 +5200 2740 +5200 2760 +5200 2780 +5200 2800 +5200 2820 +5200 2840 +5200 2860 +5200 2880 +5200 2900 +5200 3020 +5200 3040 +5200 3080 +5200 3100 +5200 3120 +5200 5260 +5200 5280 +5200 5300 +5200 10260 +5200 10280 +5200 11480 +5200 11520 +5200 11540 +5200 11580 +5200 11600 +5200 11700 +5200 11720 +5200 11740 +5200 11760 +5200 11780 +5200 11800 +5200 11820 +5200 13620 +5200 13640 +5200 13760 +5200 13780 +5200 14140 +5200 14160 +5200 18940 +5220 -23500 +5220 -23480 +5220 -20960 +5220 -20940 +5220 -16820 +5220 -16500 +5220 -16480 +5220 -16460 +5220 -16380 +5220 -16340 +5220 -16200 +5220 -16120 +5220 -16100 +5220 -16000 +5220 -15980 +5220 -15920 +5220 -15900 +5220 -15880 +5220 -15860 +5220 -15800 +5220 -15780 +5220 -15760 +5220 -15740 +5220 -15720 +5220 -15700 +5220 -15680 +5220 -15660 +5220 -15580 +5220 -15560 +5220 -15540 +5220 -15520 +5220 -15500 +5220 -15480 +5220 -15460 +5220 -15440 +5220 -15420 +5220 -15400 +5220 -15380 +5220 -15360 +5220 -15340 +5220 -15320 +5220 -15300 +5220 -15280 +5220 -15260 +5220 -15240 +5220 -15220 +5220 -15200 +5220 -15180 +5220 -15160 +5220 -15140 +5220 -15120 +5220 -15100 +5220 -15080 +5220 -15060 +5220 -15040 +5220 -15020 +5220 -15000 +5220 -14980 +5220 -14960 +5220 -14940 +5220 -14920 +5220 -14900 +5220 -14880 +5220 -14860 +5220 -14840 +5220 -14820 +5220 -14800 +5220 -14780 +5220 -14760 +5220 -14740 +5220 -14720 +5220 -14700 +5220 -14680 +5220 -14660 +5220 -14640 +5220 -14620 +5220 -14600 +5220 -14580 +5220 -14560 +5220 -14540 +5220 -14520 +5220 -14500 +5220 -14480 +5220 -14460 +5220 -14440 +5220 -14420 +5220 -14400 +5220 -14380 +5220 -14360 +5220 -14340 +5220 -14320 +5220 -14300 +5220 -14280 +5220 -14260 +5220 -14240 +5220 -14220 +5220 -14200 +5220 -14180 +5220 -14160 +5220 -14140 +5220 -14120 +5220 -14100 +5220 -14080 +5220 -14060 +5220 -14040 +5220 -14020 +5220 -14000 +5220 -13980 +5220 -13960 +5220 -13940 +5220 -13920 +5220 -13900 +5220 -13880 +5220 -13860 +5220 -13840 +5220 -13820 +5220 -13800 +5220 -13780 +5220 -13760 +5220 -13740 +5220 -13720 +5220 -13700 +5220 -13680 +5220 -13660 +5220 -13640 +5220 -13620 +5220 -13600 +5220 -13580 +5220 -13560 +5220 -13540 +5220 -13520 +5220 -13500 +5220 -13480 +5220 -13460 +5220 -13440 +5220 -13420 +5220 -13400 +5220 -13380 +5220 -13360 +5220 -13340 +5220 -13320 +5220 -13300 +5220 -13280 +5220 -13260 +5220 -13240 +5220 -13220 +5220 -13200 +5220 -13180 +5220 -13160 +5220 -13140 +5220 -13120 +5220 -13100 +5220 -13080 +5220 -13060 +5220 -13040 +5220 -13020 +5220 -13000 +5220 -12980 +5220 -12960 +5220 -12940 +5220 -12920 +5220 -12900 +5220 -12880 +5220 -12860 +5220 -12840 +5220 -12820 +5220 -12800 +5220 -12780 +5220 -12760 +5220 -12740 +5220 -12720 +5220 -12700 +5220 -12680 +5220 -12660 +5220 -12640 +5220 -12620 +5220 -12600 +5220 -12580 +5220 -12560 +5220 -12540 +5220 -12520 +5220 -12500 +5220 -12480 +5220 -12460 +5220 -12440 +5220 -12420 +5220 -12400 +5220 -12380 +5220 -12360 +5220 -12340 +5220 -12320 +5220 -12300 +5220 -12280 +5220 -12260 +5220 -12240 +5220 -12220 +5220 -12200 +5220 -12180 +5220 -12160 +5220 -12140 +5220 -12120 +5220 -12100 +5220 -12080 +5220 -12060 +5220 -12040 +5220 -12020 +5220 -12000 +5220 -11980 +5220 -11960 +5220 -11940 +5220 -11920 +5220 -11900 +5220 -11880 +5220 -11860 +5220 -11840 +5220 -11820 +5220 -11800 +5220 -11780 +5220 -11760 +5220 -11740 +5220 -11720 +5220 -11700 +5220 -11680 +5220 -11660 +5220 -11640 +5220 -11620 +5220 -11600 +5220 -11580 +5220 -11560 +5220 -11540 +5220 -11520 +5220 -11500 +5220 -11480 +5220 -11460 +5220 -11440 +5220 -11420 +5220 -11400 +5220 -11380 +5220 -11360 +5220 -11340 +5220 -11320 +5220 -11300 +5220 -11280 +5220 -11260 +5220 -11240 +5220 -11220 +5220 -11200 +5220 -11180 +5220 -11160 +5220 -11140 +5220 -11120 +5220 -11100 +5220 -11080 +5220 -11060 +5220 -11040 +5220 -11020 +5220 -11000 +5220 -10980 +5220 -10960 +5220 -10940 +5220 -10920 +5220 -10900 +5220 -10880 +5220 -10860 +5220 -10840 +5220 -10820 +5220 -10800 +5220 -10780 +5220 -10760 +5220 -10740 +5220 -7640 +5220 -7620 +5220 -7600 +5220 -7520 +5220 -7500 +5220 -6420 +5220 -6380 +5220 -6360 +5220 -6340 +5220 -6320 +5220 -6300 +5220 -6280 +5220 -6260 +5220 1860 +5220 1880 +5220 1900 +5220 1920 +5220 1940 +5220 1960 +5220 1980 +5220 2000 +5220 2420 +5220 2440 +5220 2460 +5220 2480 +5220 2500 +5220 2520 +5220 2540 +5220 2560 +5220 2580 +5220 2600 +5220 2620 +5220 2640 +5220 2660 +5220 2800 +5220 3000 +5220 3020 +5220 3080 +5220 3100 +5220 3120 +5220 3140 +5220 5240 +5220 5260 +5220 5280 +5220 5300 +5220 6160 +5220 6180 +5220 6200 +5220 10260 +5220 10780 +5220 10960 +5220 11520 +5220 11660 +5220 11700 +5220 11720 +5220 11760 +5220 11780 +5220 11800 +5220 11820 +5220 11840 +5220 13620 +5220 13640 +5220 13760 +5220 13780 +5220 14140 +5220 14160 +5220 14180 +5220 18940 +5220 22380 +5240 -23500 +5240 -23480 +5240 -20960 +5240 -20940 +5240 -17800 +5240 -17780 +5240 -17760 +5240 -17740 +5240 -17720 +5240 -17700 +5240 -17680 +5240 -17660 +5240 -17640 +5240 -17620 +5240 -17600 +5240 -17580 +5240 -17560 +5240 -17540 +5240 -17520 +5240 -17500 +5240 -17480 +5240 -17460 +5240 -17440 +5240 -17420 +5240 -17400 +5240 -17380 +5240 -17360 +5240 -17340 +5240 -17320 +5240 -17300 +5240 -17280 +5240 -17260 +5240 -17240 +5240 -17220 +5240 -17200 +5240 -17180 +5240 -17160 +5240 -17140 +5240 -17120 +5240 -17100 +5240 -17080 +5240 -17060 +5240 -17040 +5240 -17020 +5240 -17000 +5240 -16980 +5240 -16960 +5240 -16940 +5240 -16920 +5240 -16900 +5240 -16880 +5240 -16860 +5240 -16840 +5240 -16820 +5240 -16800 +5240 -16780 +5240 -16760 +5240 -16740 +5240 -16720 +5240 -16700 +5240 -16680 +5240 -16660 +5240 -16640 +5240 -16620 +5240 -16600 +5240 -16580 +5240 -16560 +5240 -16540 +5240 -16520 +5240 -16500 +5240 -16480 +5240 -16460 +5240 -16440 +5240 -16420 +5240 -16400 +5240 -16380 +5240 -16360 +5240 -16340 +5240 -16320 +5240 -16300 +5240 -16280 +5240 -16260 +5240 -16240 +5240 -16220 +5240 -16200 +5240 -16180 +5240 -16160 +5240 -16140 +5240 -16120 +5240 -16100 +5240 -16080 +5240 -16060 +5240 -16040 +5240 -16020 +5240 -16000 +5240 -15980 +5240 -15960 +5240 -15940 +5240 -15920 +5240 -15900 +5240 -15880 +5240 -15860 +5240 -15840 +5240 -15820 +5240 -15800 +5240 -15780 +5240 -15760 +5240 -15740 +5240 -15720 +5240 -15700 +5240 -15680 +5240 -15660 +5240 -15640 +5240 -15620 +5240 -15600 +5240 -15580 +5240 -15560 +5240 -15540 +5240 -15520 +5240 -15500 +5240 -15480 +5240 -15460 +5240 -15440 +5240 -15420 +5240 -15400 +5240 -15380 +5240 -15360 +5240 -15340 +5240 -15320 +5240 -15300 +5240 -15280 +5240 -15260 +5240 -15240 +5240 -15220 +5240 -15200 +5240 -15180 +5240 -15160 +5240 -15140 +5240 -15120 +5240 -15100 +5240 -15080 +5240 -15060 +5240 -15040 +5240 -15020 +5240 -15000 +5240 -14980 +5240 -14960 +5240 -14940 +5240 -14920 +5240 -14900 +5240 -14880 +5240 -14860 +5240 -14840 +5240 -14820 +5240 -14800 +5240 -14780 +5240 -14760 +5240 -14740 +5240 -14720 +5240 -14700 +5240 -14680 +5240 -14660 +5240 -14640 +5240 -14620 +5240 -14600 +5240 -14580 +5240 -14560 +5240 -14540 +5240 -14520 +5240 -14500 +5240 -14480 +5240 -14460 +5240 -14440 +5240 -14420 +5240 -14400 +5240 -14380 +5240 -14360 +5240 -14340 +5240 -14320 +5240 -14300 +5240 -14280 +5240 -14260 +5240 -14240 +5240 -14220 +5240 -14200 +5240 -14180 +5240 -14160 +5240 -14140 +5240 -14120 +5240 -14100 +5240 -14080 +5240 -14060 +5240 -14040 +5240 -14020 +5240 -14000 +5240 -13980 +5240 -13960 +5240 -13940 +5240 -13920 +5240 -13900 +5240 -13880 +5240 -13860 +5240 -13840 +5240 -13820 +5240 -13800 +5240 -13780 +5240 -13760 +5240 -13740 +5240 -13720 +5240 -13700 +5240 -13680 +5240 -13660 +5240 -13640 +5240 -13620 +5240 -13600 +5240 -13580 +5240 -13560 +5240 -13540 +5240 -13520 +5240 -13500 +5240 -13480 +5240 -13460 +5240 -13440 +5240 -13420 +5240 -13400 +5240 -13380 +5240 -13360 +5240 -13340 +5240 -13320 +5240 -13300 +5240 -13280 +5240 -13260 +5240 -13240 +5240 -13220 +5240 -13200 +5240 -13180 +5240 -13160 +5240 -13140 +5240 -13120 +5240 -13100 +5240 -13080 +5240 -13060 +5240 -13040 +5240 -13020 +5240 -13000 +5240 -12980 +5240 -12960 +5240 -12940 +5240 -12920 +5240 -12900 +5240 -12880 +5240 -12860 +5240 -12840 +5240 -12820 +5240 -12800 +5240 -12780 +5240 -12760 +5240 -12740 +5240 -12720 +5240 -12700 +5240 -12680 +5240 -12660 +5240 -12640 +5240 -12620 +5240 -12600 +5240 -12580 +5240 -12560 +5240 -12540 +5240 -12520 +5240 -12500 +5240 -12480 +5240 -12460 +5240 -12440 +5240 -12420 +5240 -12400 +5240 -12380 +5240 -12360 +5240 -12340 +5240 -12320 +5240 -12300 +5240 -12280 +5240 -12260 +5240 -12240 +5240 -12220 +5240 -12200 +5240 -12180 +5240 -12160 +5240 -12140 +5240 -12120 +5240 -12100 +5240 -12080 +5240 -12060 +5240 -12040 +5240 -12020 +5240 -12000 +5240 -11980 +5240 -11960 +5240 -11940 +5240 -11920 +5240 -11900 +5240 -11880 +5240 -11860 +5240 -11840 +5240 -11820 +5240 -11800 +5240 -11780 +5240 -11760 +5240 -11740 +5240 -11720 +5240 -11700 +5240 -11680 +5240 -11660 +5240 -11640 +5240 -11620 +5240 -11600 +5240 -11580 +5240 -11560 +5240 -11540 +5240 -11520 +5240 -11500 +5240 -11480 +5240 -11460 +5240 -11440 +5240 -11420 +5240 -11400 +5240 -11380 +5240 -11360 +5240 -11340 +5240 -11320 +5240 -11300 +5240 -11280 +5240 -11260 +5240 -11240 +5240 -11220 +5240 -11200 +5240 -11180 +5240 -11160 +5240 -11140 +5240 -11120 +5240 -11100 +5240 -11080 +5240 -11060 +5240 -11040 +5240 -11020 +5240 -11000 +5240 -10980 +5240 -10960 +5240 -10940 +5240 -10920 +5240 -10900 +5240 -10880 +5240 -10860 +5240 -10840 +5240 -10820 +5240 -10800 +5240 -10780 +5240 -10760 +5240 -7620 +5240 -7600 +5240 -7520 +5240 -7500 +5240 -6400 +5240 -6380 +5240 -6360 +5240 -6340 +5240 -6320 +5240 -6300 +5240 -6280 +5240 -6260 +5240 -6240 +5240 1880 +5240 1920 +5240 1960 +5240 1980 +5240 2560 +5240 2580 +5240 2600 +5240 2620 +5240 2640 +5240 2660 +5240 3000 +5240 3020 +5240 3100 +5240 3120 +5240 3140 +5240 3160 +5240 5220 +5240 5240 +5240 5260 +5240 5280 +5240 5300 +5240 6160 +5240 6180 +5240 6200 +5240 10260 +5240 10280 +5240 10760 +5240 10780 +5240 10800 +5240 10940 +5240 11200 +5240 11520 +5240 11540 +5240 11560 +5240 11580 +5240 11600 +5240 11640 +5240 11660 +5240 11680 +5240 11700 +5240 11720 +5240 11760 +5240 11780 +5240 11820 +5240 13620 +5240 13640 +5240 13760 +5240 13780 +5240 14140 +5240 14160 +5240 14180 +5240 14200 +5240 18940 +5260 -23500 +5260 -23480 +5260 -20980 +5260 -20960 +5260 -20940 +5260 -17800 +5260 -17720 +5260 -17640 +5260 -17620 +5260 -17600 +5260 -17580 +5260 -17520 +5260 -17460 +5260 -17400 +5260 -17380 +5260 -17360 +5260 -17340 +5260 -17320 +5260 -17300 +5260 -17260 +5260 -17200 +5260 -17160 +5260 -17140 +5260 -17080 +5260 -17020 +5260 -16860 +5260 -16460 +5260 -16240 +5260 -16200 +5260 -15740 +5260 -12920 +5260 -11900 +5260 -11700 +5260 -10880 +5260 -10840 +5260 -10820 +5260 -10800 +5260 -10780 +5260 -10760 +5260 -7640 +5260 -7620 +5260 -7600 +5260 -7560 +5260 -7520 +5260 -7500 +5260 -6400 +5260 -6380 +5260 -6360 +5260 -6340 +5260 -6320 +5260 3000 +5260 3020 +5260 3100 +5260 3120 +5260 3200 +5260 5180 +5260 5220 +5260 5240 +5260 5260 +5260 6080 +5260 6160 +5260 6180 +5260 6200 +5260 10240 +5260 10800 +5260 10820 +5260 11160 +5260 13640 +5260 13760 +5260 14140 +5260 14160 +5260 14180 +5260 14200 +5260 18940 +5280 -23500 +5280 -23480 +5280 -20960 +5280 -20940 +5280 -17820 +5280 -17800 +5280 -7640 +5280 -7620 +5280 -7600 +5280 -7580 +5280 -7520 +5280 -7500 +5280 -6400 +5280 -6380 +5280 -6360 +5280 -6340 +5280 3000 +5280 3020 +5280 3100 +5280 3120 +5280 3140 +5280 3200 +5280 5180 +5280 5200 +5280 5220 +5280 5240 +5280 5260 +5280 6100 +5280 6120 +5280 6140 +5280 6160 +5280 6180 +5280 6200 +5280 10260 +5280 10840 +5280 11200 +5280 11540 +5280 11640 +5280 13620 +5280 13640 +5280 13760 +5280 13780 +5280 14140 +5280 14160 +5280 14180 +5280 14200 +5280 18940 +5300 -23500 +5300 -23480 +5300 -20960 +5300 -20940 +5300 -17820 +5300 -17800 +5300 -7640 +5300 -7620 +5300 -7600 +5300 -7520 +5300 -7500 +5300 -6400 +5300 -6380 +5300 -6360 +5300 3020 +5300 3100 +5300 3160 +5300 3200 +5300 5160 +5300 5180 +5300 5200 +5300 5220 +5300 5240 +5300 5260 +5300 6080 +5300 6100 +5300 6120 +5300 6140 +5300 6160 +5300 6180 +5300 10220 +5300 10240 +5300 10260 +5300 10820 +5300 11160 +5300 11180 +5300 11620 +5300 11640 +5300 13640 +5300 13760 +5300 13780 +5300 14140 +5300 14160 +5300 14180 +5300 14200 +5300 18940 +5300 18960 +5300 22400 +5320 -26020 +5320 -23500 +5320 -23480 +5320 -20960 +5320 -20940 +5320 -17820 +5320 -17800 +5320 -7640 +5320 -7620 +5320 -7600 +5320 -7540 +5320 -7520 +5320 -7500 +5320 -6400 +5320 -6380 +5320 -6360 +5320 3020 +5320 3100 +5320 3120 +5320 3160 +5320 5160 +5320 5180 +5320 5200 +5320 5220 +5320 5240 +5320 5260 +5320 6080 +5320 6100 +5320 6120 +5320 6140 +5320 6160 +5320 6180 +5320 10220 +5320 10240 +5320 10260 +5320 10760 +5320 10780 +5320 10800 +5320 11220 +5320 11460 +5320 11620 +5320 11640 +5320 11660 +5320 13620 +5320 13640 +5320 13760 +5320 13780 +5320 14140 +5320 14160 +5320 14180 +5320 14200 +5320 18940 +5340 -25940 +5340 -25680 +5340 -23500 +5340 -20960 +5340 -20940 +5340 -17800 +5340 -7640 +5340 -7620 +5340 -7600 +5340 -7580 +5340 -7540 +5340 -7520 +5340 -7500 +5340 -6400 +5340 -6380 +5340 -6360 +5340 -6340 +5340 3020 +5340 3100 +5340 3120 +5340 3140 +5340 5160 +5340 5180 +5340 5200 +5340 5220 +5340 5240 +5340 5260 +5340 6080 +5340 6100 +5340 6120 +5340 6140 +5340 6160 +5340 10220 +5340 10240 +5340 11000 +5340 11200 +5340 11460 +5340 11620 +5340 11640 +5340 13620 +5340 13640 +5340 13760 +5340 13780 +5340 14140 +5340 14160 +5340 14180 +5340 14200 +5340 18940 +5360 -25940 +5360 -25560 +5360 -24980 +5360 -23500 +5360 -23480 +5360 -20940 +5360 -17800 +5360 -7640 +5360 -7620 +5360 -7600 +5360 -7520 +5360 -6400 +5360 -6380 +5360 -6360 +5360 -6340 +5360 3020 +5360 3120 +5360 3220 +5360 3240 +5360 3260 +5360 5180 +5360 5200 +5360 5220 +5360 5240 +5360 5260 +5360 6060 +5360 6080 +5360 6100 +5360 6120 +5360 6140 +5360 6160 +5360 10220 +5360 10240 +5360 10780 +5360 10800 +5360 11000 +5360 11200 +5360 11520 +5360 11580 +5360 11600 +5360 11660 +5360 13620 +5360 13640 +5360 13760 +5360 13780 +5360 14120 +5360 14160 +5360 14180 +5360 14200 +5360 18940 +5360 22340 +5360 22360 +5360 22380 +5360 22520 +5380 -24980 +5380 -24960 +5380 -24940 +5380 -23500 +5380 -23480 +5380 -20960 +5380 -20940 +5380 -17800 +5380 -7640 +5380 -7620 +5380 -7600 +5380 -7580 +5380 -7540 +5380 -7520 +5380 -7500 +5380 -6380 +5380 -6360 +5380 -6340 +5380 3020 +5380 3120 +5380 3240 +5380 5180 +5380 5200 +5380 5220 +5380 5240 +5380 5260 +5380 6080 +5380 6100 +5380 6120 +5380 6140 +5380 10220 +5380 10240 +5380 10440 +5380 10700 +5380 10740 +5380 10760 +5380 10780 +5380 10800 +5380 10860 +5380 11020 +5380 11200 +5380 11220 +5380 11600 +5380 13640 +5380 13760 +5380 13780 +5380 14160 +5380 14180 +5380 14200 +5380 18940 +5380 22360 +5380 22520 +5400 -24980 +5400 -23500 +5400 -23480 +5400 -20960 +5400 -20940 +5400 -17820 +5400 -17800 +5400 -7640 +5400 -7620 +5400 -7600 +5400 -7540 +5400 -7520 +5400 -7500 +5400 -6380 +5400 -6360 +5400 -6340 +5400 3020 +5400 3100 +5400 3120 +5400 3160 +5400 3220 +5400 3240 +5400 5260 +5400 6080 +5400 6100 +5400 6120 +5400 6140 +5400 6160 +5400 10220 +5400 10240 +5400 10420 +5400 10440 +5400 10460 +5400 10680 +5400 10700 +5400 10720 +5400 10740 +5400 10780 +5400 10800 +5400 10820 +5400 10840 +5400 11020 +5400 11200 +5400 11220 +5400 11280 +5400 11440 +5400 11600 +5400 13640 +5400 13760 +5400 13780 +5400 14160 +5400 14180 +5400 14200 +5400 18940 +5420 -25060 +5420 -23500 +5420 -23480 +5420 -20960 +5420 -20940 +5420 -17840 +5420 -17800 +5420 -7640 +5420 -7620 +5420 -7600 +5420 -7580 +5420 -7560 +5420 -7520 +5420 -7500 +5420 -6380 +5420 -6360 +5420 -6340 +5420 3020 +5420 3100 +5420 3120 +5420 3140 +5420 3160 +5420 3220 +5420 3240 +5420 3980 +5420 4000 +5420 10200 +5420 10220 +5420 10240 +5420 10260 +5420 10300 +5420 10320 +5420 10400 +5420 10440 +5420 10740 +5420 10760 +5420 10800 +5420 10820 +5420 10840 +5420 11020 +5420 11240 +5420 11600 +5420 13620 +5420 13640 +5420 13760 +5420 13780 +5420 14160 +5420 14180 +5440 -25180 +5440 -25000 +5440 -24980 +5440 -24940 +5440 -23500 +5440 -23480 +5440 -20940 +5440 -17820 +5440 -17800 +5440 -7640 +5440 -7620 +5440 -7520 +5440 -7500 +5440 -6380 +5440 -6360 +5440 -6340 +5440 3020 +5440 3100 +5440 3120 +5440 3960 +5440 3980 +5440 4000 +5440 10220 +5440 10240 +5440 10260 +5440 10280 +5440 10300 +5440 10320 +5440 10340 +5440 10360 +5440 10380 +5440 10400 +5440 10420 +5440 10780 +5440 10800 +5440 10820 +5440 10860 +5440 11220 +5440 11260 +5440 13620 +5440 13640 +5440 13740 +5440 13760 +5440 13780 +5440 14140 +5440 14160 +5440 14180 +5440 14200 +5440 18940 +5440 18960 +5440 22320 +5460 -24980 +5460 -24940 +5460 -23500 +5460 -23480 +5460 -20960 +5460 -20940 +5460 -17800 +5460 -7640 +5460 -7620 +5460 -7520 +5460 -7500 +5460 -6380 +5460 -6360 +5460 -6340 +5460 3020 +5460 3100 +5460 3120 +5460 3140 +5460 3160 +5460 10260 +5460 10280 +5460 10300 +5460 10320 +5460 10340 +5460 10380 +5460 10400 +5460 10420 +5460 10800 +5460 10820 +5460 10840 +5460 10880 +5460 11020 +5460 11040 +5460 11260 +5460 11280 +5460 11840 +5460 11860 +5460 11880 +5460 13620 +5460 13640 +5460 13740 +5460 13760 +5460 13780 +5460 14160 +5460 14180 +5460 14200 +5460 17520 +5460 17540 +5460 22340 +5480 -23500 +5480 -23480 +5480 -20960 +5480 -20940 +5480 -17800 +5480 -7640 +5480 -7620 +5480 -7520 +5480 -7500 +5480 -6380 +5480 -6360 +5480 -6340 +5480 3020 +5480 3100 +5480 3120 +5480 3140 +5480 10780 +5480 10800 +5480 10820 +5480 10860 +5480 10880 +5480 10900 +5480 11020 +5480 11260 +5480 11280 +5480 11840 +5480 11860 +5480 11880 +5480 11900 +5480 13640 +5480 13740 +5480 13760 +5480 13780 +5480 14160 +5480 14180 +5480 14200 +5480 17480 +5480 17500 +5480 17520 +5480 17580 +5480 17720 +5480 18960 +5500 -25080 +5500 -25040 +5500 -23500 +5500 -23480 +5500 -20960 +5500 -20940 +5500 -17800 +5500 -7640 +5500 -7620 +5500 -7520 +5500 -7500 +5500 -6380 +5500 -6360 +5500 -6340 +5500 3020 +5500 3100 +5500 3120 +5500 10780 +5500 10800 +5500 10820 +5500 10840 +5500 11020 +5500 11820 +5500 11840 +5500 11860 +5500 13620 +5500 13640 +5500 13740 +5500 13760 +5500 13780 +5500 14160 +5500 14180 +5500 14200 +5500 17480 +5500 17500 +5500 17520 +5500 17540 +5500 17580 +5500 17740 +5500 18960 +5520 -25000 +5520 -24960 +5520 -24940 +5520 -24920 +5520 -24900 +5520 -23500 +5520 -23480 +5520 -20960 +5520 -20940 +5520 -17820 +5520 -17800 +5520 -7640 +5520 -7620 +5520 -7540 +5520 -7520 +5520 -7500 +5520 -6380 +5520 -6360 +5520 3020 +5520 3100 +5520 3120 +5520 3160 +5520 10800 +5520 10820 +5520 10860 +5520 11000 +5520 11020 +5520 11100 +5520 11220 +5520 11260 +5520 11640 +5520 11820 +5520 11840 +5520 11860 +5520 13620 +5520 13640 +5520 13740 +5520 13760 +5520 13780 +5520 14160 +5520 14180 +5520 14200 +5520 14220 +5520 17480 +5520 17500 +5520 17520 +5520 17540 +5520 17600 +5520 17640 +5520 17860 +5520 22360 +5540 -24980 +5540 -24900 +5540 -23500 +5540 -23480 +5540 -20940 +5540 -17820 +5540 -17800 +5540 -7640 +5540 -7620 +5540 -7520 +5540 -7500 +5540 -6380 +5540 -6360 +5540 -6340 +5540 3020 +5540 3100 +5540 3120 +5540 3140 +5540 3160 +5540 10780 +5540 10800 +5540 10820 +5540 10840 +5540 10900 +5540 10980 +5540 11000 +5540 11040 +5540 11260 +5540 11760 +5540 11780 +5540 11800 +5540 11820 +5540 11840 +5540 13620 +5540 13640 +5540 13740 +5540 13760 +5540 14160 +5540 14180 +5540 14200 +5540 14220 +5540 14240 +5540 17460 +5540 17480 +5540 17500 +5540 17520 +5540 17560 +5540 17620 +5540 17660 +5540 17680 +5540 18940 +5540 18960 +5560 -25080 +5560 -25040 +5560 -24940 +5560 -24920 +5560 -24900 +5560 -23480 +5560 -23460 +5560 -20960 +5560 -20940 +5560 -17820 +5560 -17800 +5560 -7640 +5560 -7620 +5560 -7600 +5560 -7520 +5560 -7500 +5560 -6380 +5560 -6360 +5560 -6340 +5560 3020 +5560 3100 +5560 3120 +5560 3140 +5560 10800 +5560 10840 +5560 10860 +5560 10900 +5560 10920 +5560 11220 +5560 11460 +5560 11660 +5560 11740 +5560 11760 +5560 11780 +5560 11800 +5560 11820 +5560 13640 +5560 13740 +5560 13760 +5560 13780 +5560 14180 +5560 14200 +5560 14220 +5560 14240 +5560 17500 +5560 17520 +5560 17540 +5560 17600 +5560 17620 +5560 17820 +5560 17980 +5560 22200 +5580 -25080 +5580 -25060 +5580 -24980 +5580 -24960 +5580 -24920 +5580 -23500 +5580 -23480 +5580 -20960 +5580 -20940 +5580 -17800 +5580 -7640 +5580 -7620 +5580 -7520 +5580 -7500 +5580 -6380 +5580 -6360 +5580 -6340 +5580 3020 +5580 3100 +5580 3120 +5580 3140 +5580 10800 +5580 10820 +5580 10840 +5580 10860 +5580 10880 +5580 10960 +5580 11580 +5580 11620 +5580 11640 +5580 11720 +5580 11740 +5580 11760 +5580 11780 +5580 13620 +5580 13640 +5580 13740 +5580 13760 +5580 13780 +5580 17520 +5580 17540 +5580 17560 +5580 17580 +5580 18960 +5580 22340 +5600 -26920 +5600 -26900 +5600 -25100 +5600 -25040 +5600 -25000 +5600 -24940 +5600 -23560 +5600 -23500 +5600 -23480 +5600 -20960 +5600 -20940 +5600 -19900 +5600 -19860 +5600 -19820 +5600 -19800 +5600 -19740 +5600 -19680 +5600 -19640 +5600 -19620 +5600 -19600 +5600 -19580 +5600 -19520 +5600 -19480 +5600 -19360 +5600 -19320 +5600 -19260 +5600 -19220 +5600 -19180 +5600 -19160 +5600 -19080 +5600 -19060 +5600 -18800 +5600 -17800 +5600 -7640 +5600 -7620 +5600 -7540 +5600 -7520 +5600 -7500 +5600 -6380 +5600 -6360 +5600 -6340 +5600 3020 +5600 3100 +5600 3120 +5600 3160 +5600 10780 +5600 10800 +5600 10840 +5600 10860 +5600 10920 +5600 10940 +5600 11680 +5600 11700 +5600 11720 +5600 11740 +5600 13640 +5600 13720 +5600 13740 +5600 13760 +5600 13780 +5600 17520 +5600 17540 +5600 17560 +5600 17580 +5600 18960 +5600 22340 +5620 -26920 +5620 -25220 +5620 -25180 +5620 -25060 +5620 -25040 +5620 -25020 +5620 -25000 +5620 -23540 +5620 -23520 +5620 -23500 +5620 -23480 +5620 -20960 +5620 -20940 +5620 -19840 +5620 -19800 +5620 -19780 +5620 -19720 +5620 -19700 +5620 -19660 +5620 -19620 +5620 -19600 +5620 -19560 +5620 -19520 +5620 -19500 +5620 -19460 +5620 -19440 +5620 -19420 +5620 -19400 +5620 -19340 +5620 -17820 +5620 -17800 +5620 -7640 +5620 -7620 +5620 -7520 +5620 -7500 +5620 -6820 +5620 -6420 +5620 -6400 +5620 -6380 +5620 -6360 +5620 -6340 +5620 3020 +5620 3100 +5620 3120 +5620 10780 +5620 10800 +5620 10820 +5620 10840 +5620 10880 +5620 10900 +5620 11700 +5620 13620 +5620 13640 +5620 13720 +5620 13740 +5620 13760 +5620 13780 +5620 17520 +5620 17540 +5620 17580 +5620 17640 +5640 -26920 +5640 -25160 +5640 -25140 +5640 -25120 +5640 -25080 +5640 -25060 +5640 -25040 +5640 -25020 +5640 -25000 +5640 -23560 +5640 -23540 +5640 -20960 +5640 -20940 +5640 -17820 +5640 -17800 +5640 -7640 +5640 -7620 +5640 -7600 +5640 -7520 +5640 -7500 +5640 -6840 +5640 -6820 +5640 -6440 +5640 -6420 +5640 -6400 +5640 -6380 +5640 -6360 +5640 3020 +5640 3100 +5640 3120 +5640 10800 +5640 10820 +5640 10840 +5640 10860 +5640 10880 +5640 11680 +5640 11700 +5640 13620 +5640 13640 +5640 13720 +5640 13740 +5640 13760 +5640 13780 +5640 17520 +5640 17540 +5640 17580 +5640 18960 +5660 -26920 +5660 -25260 +5660 -25140 +5660 -25120 +5660 -25100 +5660 -25080 +5660 -25040 +5660 -20960 +5660 -20940 +5660 -17820 +5660 -17800 +5660 -7640 +5660 -7620 +5660 -7520 +5660 -7500 +5660 -6840 +5660 -6800 +5660 -6460 +5660 -6440 +5660 -6420 +5660 -6400 +5660 -6380 +5660 3020 +5660 3100 +5660 3120 +5660 3140 +5660 3760 +5660 10780 +5660 10800 +5660 10820 +5660 10840 +5660 10860 +5660 11220 +5660 11680 +5660 11700 +5660 13180 +5660 13200 +5660 13560 +5660 13620 +5660 13640 +5660 13720 +5660 13740 +5660 13760 +5660 17520 +5660 17540 +5660 17580 +5660 17600 +5660 17620 +5660 17640 +5680 -26920 +5680 -25300 +5680 -25280 +5680 -25240 +5680 -25140 +5680 -25100 +5680 -20960 +5680 -20940 +5680 -18540 +5680 -18360 +5680 -17800 +5680 -7640 +5680 -7620 +5680 -7520 +5680 -7500 +5680 -6560 +5680 -6480 +5680 -6460 +5680 -6440 +5680 -6420 +5680 -6400 +5680 3020 +5680 3100 +5680 3120 +5680 3740 +5680 3760 +5680 3780 +5680 10780 +5680 10800 +5680 10820 +5680 10840 +5680 10860 +5680 11680 +5680 11700 +5680 13160 +5680 13180 +5680 13580 +5680 13600 +5680 13620 +5680 13640 +5680 13740 +5680 13760 +5680 13780 +5680 13800 +5680 17520 +5680 17540 +5680 17560 +5680 17580 +5680 17600 +5680 17880 +5680 18940 +5680 22380 +5700 -26920 +5700 -26900 +5700 -25380 +5700 -25360 +5700 -25340 +5700 -25280 +5700 -25260 +5700 -25240 +5700 -25220 +5700 -20960 +5700 -20940 +5700 -20920 +5700 -20900 +5700 -20880 +5700 -20860 +5700 -20840 +5700 -20820 +5700 -20800 +5700 -20780 +5700 -20760 +5700 -20740 +5700 -20720 +5700 -20700 +5700 -20680 +5700 -20660 +5700 -20640 +5700 -20620 +5700 -20600 +5700 -20580 +5700 -20560 +5700 -20540 +5700 -20520 +5700 -20500 +5700 -20480 +5700 -20460 +5700 -20440 +5700 -20420 +5700 -20400 +5700 -20380 +5700 -20360 +5700 -20340 +5700 -20320 +5700 -20300 +5700 -20280 +5700 -20260 +5700 -20240 +5700 -20220 +5700 -20200 +5700 -20180 +5700 -20160 +5700 -20140 +5700 -20120 +5700 -20100 +5700 -20080 +5700 -20060 +5700 -20040 +5700 -20020 +5700 -20000 +5700 -19980 +5700 -19960 +5700 -19940 +5700 -19920 +5700 -19900 +5700 -19880 +5700 -19860 +5700 -19840 +5700 -19820 +5700 -19800 +5700 -19780 +5700 -19760 +5700 -19740 +5700 -19720 +5700 -19700 +5700 -19680 +5700 -19660 +5700 -19640 +5700 -19620 +5700 -19600 +5700 -19580 +5700 -19560 +5700 -19540 +5700 -19520 +5700 -19500 +5700 -19480 +5700 -19460 +5700 -19440 +5700 -19420 +5700 -19400 +5700 -19380 +5700 -19360 +5700 -19340 +5700 -19320 +5700 -19300 +5700 -19280 +5700 -19260 +5700 -19240 +5700 -19220 +5700 -19200 +5700 -19180 +5700 -19160 +5700 -19140 +5700 -19120 +5700 -19100 +5700 -19080 +5700 -19060 +5700 -19040 +5700 -19020 +5700 -19000 +5700 -18980 +5700 -18960 +5700 -18940 +5700 -18920 +5700 -18900 +5700 -18880 +5700 -18860 +5700 -18840 +5700 -18820 +5700 -18800 +5700 -18780 +5700 -18760 +5700 -18740 +5700 -18720 +5700 -18700 +5700 -18680 +5700 -18660 +5700 -18640 +5700 -18620 +5700 -18600 +5700 -18580 +5700 -18560 +5700 -18540 +5700 -18520 +5700 -18500 +5700 -18480 +5700 -18460 +5700 -18440 +5700 -18420 +5700 -18400 +5700 -18380 +5700 -18360 +5700 -18340 +5700 -18320 +5700 -18300 +5700 -18280 +5700 -18260 +5700 -18240 +5700 -18220 +5700 -18200 +5700 -18180 +5700 -18160 +5700 -18140 +5700 -18120 +5700 -17820 +5700 -17800 +5700 -7640 +5700 -7620 +5700 -7520 +5700 -7500 +5700 -6740 +5700 -6720 +5700 -6700 +5700 -6680 +5700 -6660 +5700 -6640 +5700 -6620 +5700 -6600 +5700 -6580 +5700 -6560 +5700 -6540 +5700 -6520 +5700 -6500 +5700 -6480 +5700 -6460 +5700 -6440 +5700 -6420 +5700 3020 +5700 3100 +5700 3120 +5700 3140 +5700 3520 +5700 3540 +5700 3720 +5700 3740 +5700 3780 +5700 3800 +5700 10780 +5700 10800 +5700 10820 +5700 10840 +5700 10860 +5700 10920 +5700 10940 +5700 11220 +5700 11680 +5700 11700 +5700 13140 +5700 13160 +5700 13180 +5700 13200 +5700 13560 +5700 13580 +5700 13600 +5700 13620 +5700 13640 +5700 13660 +5700 13680 +5700 13700 +5700 13720 +5700 13740 +5700 13760 +5700 13780 +5700 17540 +5700 17560 +5700 17580 +5700 17620 +5700 17640 +5700 17660 +5700 17880 +5700 18960 +5720 -26920 +5720 -25420 +5720 -25400 +5720 -25380 +5720 -25360 +5720 -25300 +5720 -20960 +5720 -20940 +5720 -20920 +5720 -20900 +5720 -20880 +5720 -20860 +5720 -20840 +5720 -20820 +5720 -20800 +5720 -20780 +5720 -20760 +5720 -20740 +5720 -20700 +5720 -20680 +5720 -20660 +5720 -20640 +5720 -20620 +5720 -20600 +5720 -20580 +5720 -20560 +5720 -20540 +5720 -20520 +5720 -20500 +5720 -20460 +5720 -20420 +5720 -20400 +5720 -20360 +5720 -20280 +5720 -20160 +5720 -20120 +5720 -20080 +5720 -20040 +5720 -19580 +5720 -19560 +5720 -19440 +5720 -19420 +5720 -19400 +5720 -19380 +5720 -19360 +5720 -19320 +5720 -19100 +5720 -18960 +5720 -18860 +5720 -18780 +5720 -18680 +5720 -18640 +5720 -18620 +5720 -18580 +5720 -18560 +5720 -18540 +5720 -18460 +5720 -18320 +5720 -18300 +5720 -18280 +5720 -18240 +5720 -18120 +5720 -17800 +5720 -7640 +5720 -7620 +5720 -7600 +5720 -7520 +5720 -7500 +5720 -6680 +5720 -6660 +5720 -6600 +5720 -6580 +5720 -6540 +5720 -6520 +5720 -6500 +5720 -6460 +5720 3020 +5720 3100 +5720 3120 +5720 3140 +5720 3300 +5720 3320 +5720 3340 +5720 3360 +5720 3380 +5720 3400 +5720 3420 +5720 3440 +5720 3460 +5720 3480 +5720 3500 +5720 3520 +5720 3540 +5720 3560 +5720 3580 +5720 3600 +5720 3620 +5720 3640 +5720 3680 +5720 3700 +5720 3720 +5720 3740 +5720 3760 +5720 3800 +5720 3960 +5720 4000 +5720 10780 +5720 10800 +5720 10820 +5720 10840 +5720 10860 +5720 11680 +5720 11700 +5720 13120 +5720 13140 +5720 13160 +5720 13180 +5720 13200 +5720 13560 +5720 13580 +5720 13600 +5720 13620 +5720 13640 +5720 13660 +5720 13680 +5720 13700 +5720 13720 +5720 13740 +5720 13760 +5720 17580 +5720 17620 +5720 17640 +5720 17660 +5720 17720 +5720 18940 +5720 18960 +5720 22340 +5740 -26920 +5740 -25400 +5740 -25300 +5740 -18140 +5740 -18120 +5740 -18100 +5740 -17820 +5740 -17800 +5740 -7640 +5740 -7620 +5740 -7540 +5740 -7520 +5740 -7500 +5740 3020 +5740 3100 +5740 3120 +5740 3140 +5740 3300 +5740 3320 +5740 3340 +5740 3360 +5740 3380 +5740 3420 +5740 3440 +5740 3460 +5740 3500 +5740 3520 +5740 3540 +5740 3560 +5740 3600 +5740 3640 +5740 3680 +5740 3700 +5740 3720 +5740 3740 +5740 3780 +5740 3980 +5740 4000 +5740 10800 +5740 10820 +5740 10840 +5740 10860 +5740 11020 +5740 11660 +5740 11680 +5740 11700 +5740 13100 +5740 13120 +5740 13140 +5740 13160 +5740 13180 +5740 13200 +5740 13580 +5740 13600 +5740 13620 +5740 13640 +5740 13660 +5740 13680 +5740 13700 +5740 13720 +5740 13740 +5740 13760 +5740 17580 +5740 17600 +5740 17620 +5740 17700 +5740 17740 +5740 17900 +5740 18940 +5740 18960 +5740 23300 +5760 -26920 +5760 -18140 +5760 -18120 +5760 -17820 +5760 -17800 +5760 -7640 +5760 -7620 +5760 -7540 +5760 -7520 +5760 -7500 +5760 3020 +5760 3100 +5760 3120 +5760 3360 +5760 3400 +5760 3420 +5760 3440 +5760 3460 +5760 3480 +5760 3500 +5760 3560 +5760 3580 +5760 3600 +5760 3620 +5760 3680 +5760 3760 +5760 3780 +5760 3800 +5760 3960 +5760 3980 +5760 4000 +5760 10780 +5760 10800 +5760 10820 +5760 10840 +5760 10860 +5760 10880 +5760 10920 +5760 11080 +5760 11100 +5760 11680 +5760 11700 +5760 13120 +5760 13160 +5760 13180 +5760 17580 +5760 17600 +5760 17620 +5760 17640 +5760 17860 +5760 17880 +5760 18960 +5780 -26920 +5780 -26900 +5780 -18140 +5780 -18120 +5780 -18100 +5780 -17800 +5780 -7640 +5780 -7620 +5780 -7520 +5780 -7500 +5780 3020 +5780 3100 +5780 3120 +5780 3260 +5780 3280 +5780 3300 +5780 3960 +5780 3980 +5780 4000 +5780 10760 +5780 10780 +5780 10800 +5780 10820 +5780 10860 +5780 10940 +5780 10960 +5780 11680 +5780 11700 +5780 17620 +5780 17640 +5780 17860 +5780 18940 +5780 18960 +5800 -26920 +5800 -26900 +5800 -18140 +5800 -18120 +5800 -18100 +5800 -17820 +5800 -17800 +5800 -7640 +5800 -7620 +5800 -7520 +5800 -7500 +5800 3020 +5800 3100 +5800 3120 +5800 3140 +5800 3280 +5800 3300 +5800 3980 +5800 4000 +5800 10760 +5800 10780 +5800 10800 +5800 10820 +5800 10840 +5800 10860 +5800 10880 +5800 10900 +5800 11660 +5800 11680 +5800 11700 +5800 17640 +5800 17880 +5800 17900 +5800 18940 +5800 18960 +5820 -26920 +5820 -18140 +5820 -18120 +5820 -18100 +5820 -18080 +5820 -18060 +5820 -18040 +5820 -18020 +5820 -18000 +5820 -17980 +5820 -17840 +5820 -17820 +5820 -17800 +5820 -7640 +5820 -7620 +5820 -7520 +5820 -7500 +5820 3020 +5820 3040 +5820 3080 +5820 3100 +5820 3120 +5820 10780 +5820 10800 +5820 10880 +5820 10900 +5820 10920 +5820 11060 +5820 11220 +5820 11680 +5820 11700 +5820 18960 +5840 -26920 +5840 -26900 +5840 -18120 +5840 -18100 +5840 -18080 +5840 -18060 +5840 -18040 +5840 -18020 +5840 -18000 +5840 -17980 +5840 -17960 +5840 -17840 +5840 -17820 +5840 -7640 +5840 -7620 +5840 -7520 +5840 -7500 +5840 3000 +5840 3020 +5840 3040 +5840 3060 +5840 3080 +5840 3100 +5840 3120 +5840 3140 +5840 10780 +5840 10800 +5840 10840 +5840 10880 +5840 10900 +5840 11080 +5840 11200 +5840 11660 +5840 11680 +5840 11700 +5840 18940 +5840 18960 +5840 22440 +5860 -26960 +5860 -26920 +5860 -26900 +5860 -18000 +5860 -17980 +5860 -17960 +5860 -17940 +5860 -17880 +5860 -17860 +5860 -17840 +5860 -17820 +5860 -17800 +5860 -7640 +5860 -7620 +5860 -7520 +5860 -7500 +5860 3020 +5860 3040 +5860 3060 +5860 3080 +5860 3100 +5860 3120 +5860 10760 +5860 10780 +5860 10800 +5860 10820 +5860 10860 +5860 10900 +5860 10920 +5860 10940 +5860 11100 +5860 11220 +5860 11380 +5860 11660 +5860 11680 +5860 11700 +5860 18940 +5860 18960 +5880 -26920 +5880 -17980 +5880 -17960 +5880 -17940 +5880 -17920 +5880 -17900 +5880 -17880 +5880 -17860 +5880 -17840 +5880 -17820 +5880 -7640 +5880 -7620 +5880 -7520 +5880 -7500 +5880 10780 +5880 10800 +5880 10860 +5880 10900 +5880 10920 +5880 11300 +5880 11400 +5880 11560 +5880 11580 +5880 11600 +5880 11620 +5880 11640 +5880 11660 +5880 11680 +5880 11700 +5880 18940 +5880 18960 +5900 -26900 +5900 -17920 +5900 -17900 +5900 -17880 +5900 -17860 +5900 -7640 +5900 -7620 +5900 -7520 +5900 -7500 +5900 10760 +5900 10780 +5900 10800 +5900 10880 +5900 10900 +5900 10920 +5900 10960 +5900 11620 +5900 11640 +5900 11660 +5900 18940 +5900 18960 +5920 -26920 +5920 -26900 +5920 -7640 +5920 -7620 +5920 -7600 +5920 -7520 +5920 -7500 +5920 10780 +5920 10800 +5920 10880 +5920 10900 +5920 10920 +5920 11060 +5920 11080 +5920 11220 +5920 11620 +5920 11640 +5920 11660 +5920 18920 +5920 18940 +5920 18960 +5940 -26920 +5940 -7640 +5940 -7620 +5940 -7520 +5940 -7500 +5940 10760 +5940 10780 +5940 10800 +5940 10880 +5940 10920 +5940 11180 +5940 11200 +5940 11620 +5940 11640 +5940 18920 +5940 18940 +5940 18960 +5960 -26920 +5960 -7640 +5960 -7620 +5960 -7520 +5960 -7500 +5960 10760 +5960 10780 +5960 10820 +5960 10860 +5960 10880 +5960 10900 +5960 10940 +5960 11140 +5960 11180 +5960 11620 +5960 11640 +5960 11660 +5960 18940 +5980 -26920 +5980 -26900 +5980 -7640 +5980 -7620 +5980 -7520 +5980 -7500 +5980 10760 +5980 10780 +5980 10820 +5980 10840 +5980 10860 +5980 10880 +5980 10900 +5980 10960 +5980 11140 +5980 11220 +5980 11620 +5980 11640 +5980 11660 +5980 18940 +5980 18960 +6000 -26920 +6000 -26900 +6000 -7640 +6000 -7620 +6000 -7520 +6000 -7500 +6000 10760 +6000 10780 +6000 10840 +6000 10880 +6000 10900 +6000 10980 +6000 11140 +6000 11180 +6000 11200 +6000 11220 +6000 11620 +6000 11640 +6000 11660 +6000 18940 +6020 -26920 +6020 -26900 +6020 -7640 +6020 -7620 +6020 -7520 +6020 -7500 +6020 10760 +6020 10780 +6020 10800 +6020 10880 +6020 10900 +6020 11160 +6020 11200 +6020 11220 +6020 11620 +6020 11640 +6020 11660 +6020 18940 +6020 18960 +6040 -26920 +6040 -26900 +6040 -7640 +6040 -7620 +6040 -7600 +6040 -7520 +6040 -7500 +6040 10760 +6040 10780 +6040 10800 +6040 11180 +6040 11200 +6040 11220 +6040 11240 +6040 11620 +6040 11640 +6040 11660 +6040 18920 +6040 18940 +6040 18960 +6060 -26940 +6060 -26920 +6060 -7640 +6060 -7620 +6060 -7520 +6060 -7500 +6060 10780 +6060 10800 +6060 10900 +6060 11200 +6060 11220 +6060 11240 +6060 11620 +6060 11640 +6060 11660 +6060 18920 +6060 18940 +6080 -26920 +6080 -26900 +6080 -7640 +6080 -7620 +6080 -7520 +6080 -7500 +6080 10780 +6080 10800 +6080 10900 +6080 10920 +6080 10940 +6080 11160 +6080 11180 +6080 11200 +6080 11620 +6080 11640 +6080 18880 +6080 18900 +6080 18920 +6080 18940 +6100 -26960 +6100 -26920 +6100 -26900 +6100 -7640 +6100 -7620 +6100 -7520 +6100 -7500 +6100 10760 +6100 10780 +6100 10800 +6100 10920 +6100 11180 +6100 11200 +6100 11220 +6100 11240 +6100 11620 +6100 11640 +6100 11660 +6100 18900 +6100 18940 +6100 18960 +6120 -26980 +6120 -26920 +6120 -26900 +6120 -7640 +6120 -7620 +6120 -7520 +6120 -7500 +6120 10760 +6120 10780 +6120 10800 +6120 10820 +6120 10840 +6120 10860 +6120 10880 +6120 10900 +6120 10920 +6120 10940 +6120 10960 +6120 10980 +6120 11000 +6120 11020 +6120 11040 +6120 11060 +6120 11080 +6120 11100 +6120 11120 +6120 11140 +6120 11180 +6120 11200 +6120 11220 +6120 11240 +6120 11260 +6120 11280 +6120 11300 +6120 11340 +6120 11360 +6120 11420 +6120 11480 +6120 11520 +6120 11560 +6120 11620 +6120 11640 +6120 11660 +6120 15260 +6120 15280 +6120 15300 +6120 15320 +6120 17580 +6120 18160 +6120 18260 +6120 18380 +6120 18420 +6120 18440 +6120 18480 +6120 18500 +6120 18520 +6120 18540 +6120 18580 +6140 -26920 +6140 -7640 +6140 -7620 +6140 -7520 +6140 -7500 +6140 10720 +6140 10740 +6140 10760 +6140 10780 +6140 10800 +6140 10820 +6140 10840 +6140 10860 +6140 10880 +6140 10900 +6140 10920 +6140 10940 +6140 10960 +6140 10980 +6140 11000 +6140 11020 +6140 11040 +6140 11060 +6140 11080 +6140 11100 +6140 11120 +6140 11140 +6140 11160 +6140 11180 +6140 11200 +6140 11220 +6140 11240 +6140 11260 +6140 11280 +6140 11300 +6140 11320 +6140 11340 +6140 11360 +6140 11380 +6140 11400 +6140 11420 +6140 11440 +6140 11460 +6140 11480 +6140 11500 +6140 11520 +6140 11540 +6140 11560 +6140 11580 +6140 11600 +6140 11620 +6140 11640 +6140 11660 +6140 11680 +6140 11700 +6140 15280 +6140 15300 +6140 15320 +6140 17560 +6140 17580 +6140 18140 +6140 18160 +6140 18180 +6140 18240 +6140 18260 +6140 18280 +6140 18300 +6140 18340 +6140 18360 +6140 18460 +6140 18680 +6140 18940 +6160 -26920 +6160 -26900 +6160 -7640 +6160 -7620 +6160 -7520 +6160 -7500 +6160 10720 +6160 10740 +6160 10760 +6160 10780 +6160 10800 +6160 10820 +6160 10840 +6160 10860 +6160 10880 +6160 10900 +6160 10920 +6160 10940 +6160 10960 +6160 10980 +6160 11000 +6160 11020 +6160 11040 +6160 11060 +6160 11080 +6160 11100 +6160 11120 +6160 11140 +6160 11160 +6160 11180 +6160 11200 +6160 11220 +6160 11240 +6160 11260 +6160 11280 +6160 11300 +6160 11320 +6160 11340 +6160 11360 +6160 11380 +6160 11400 +6160 11420 +6160 11440 +6160 11460 +6160 11480 +6160 11500 +6160 11520 +6160 11540 +6160 11560 +6160 11580 +6160 11600 +6160 11620 +6160 11640 +6160 11660 +6160 11680 +6160 11700 +6160 15260 +6160 15300 +6160 15320 +6160 15360 +6160 15560 +6160 15580 +6160 17560 +6160 17580 +6160 18140 +6160 18300 +6160 18920 +6160 18940 +6180 -26940 +6180 -26920 +6180 -26900 +6180 -7640 +6180 -7620 +6180 -7520 +6180 -7500 +6180 10760 +6180 10780 +6180 10800 +6180 11200 +6180 11220 +6180 11240 +6180 11260 +6180 15560 +6180 15580 +6180 18140 +6180 18160 +6180 18840 +6200 -26920 +6200 -26900 +6200 -7640 +6200 -7620 +6200 -7520 +6200 -7500 +6200 11220 +6200 11240 +6200 15560 +6200 15580 +6200 15600 +6200 18140 +6200 18160 +6200 18940 +6220 -26920 +6220 -26900 +6220 -7640 +6220 -7620 +6220 -7520 +6220 -7500 +6220 18120 +6220 18140 +6220 18160 +6220 18340 +6220 18940 +6240 -26960 +6240 -26940 +6240 -26920 +6240 -26900 +6240 -7640 +6240 -7620 +6240 -7520 +6240 -7500 +6240 18140 +6240 18160 +6240 18180 +6260 -26960 +6260 -26940 +6260 -26920 +6260 -26900 +6260 -7640 +6260 -7620 +6260 -7600 +6260 -7520 +6260 -7500 +6260 18140 +6260 18160 +6260 18180 +6280 -26920 +6280 -26900 +6280 -7640 +6280 -7620 +6280 -7520 +6280 -7500 +6280 18140 +6280 18160 +6280 18220 +6300 -26920 +6300 -26900 +6300 -7640 +6300 -7620 +6300 -7520 +6300 -7500 +6300 18140 +6300 18160 +6300 18200 +6300 18400 +6320 -26920 +6320 -26900 +6320 -7640 +6320 -7620 +6320 -7520 +6320 -7500 +6320 18140 +6320 18160 +6320 18220 +6320 18240 +6320 18260 +6320 18860 +6340 -26940 +6340 -26920 +6340 -7640 +6340 -7620 +6340 -7520 +6340 -7500 +6340 18180 +6340 18880 +6340 18900 +6360 -26940 +6360 -26920 +6360 -26900 +6360 -7640 +6360 -7620 +6360 -7520 +6360 -7500 +6360 15260 +6360 18240 +6360 19040 +6380 -27000 +6380 -26920 +6380 -26900 +6380 -7640 +6380 -7620 +6380 -7600 +6380 -7520 +6380 -7500 +6380 15260 +6380 15280 +6380 18400 +6400 -26920 +6400 -26900 +6400 -7640 +6400 -7620 +6400 -7520 +6400 -7500 +6400 15260 +6400 15280 +6400 15300 +6400 18380 +6400 18880 +6400 19040 +6420 -26920 +6420 -26900 +6420 -7640 +6420 -7620 +6420 -7540 +6420 -7520 +6420 -7500 +6420 15260 +6420 15280 +6420 15500 +6420 15520 +6420 15560 +6420 18180 +6420 18200 +6420 18220 +6420 18260 +6420 18400 +6420 18840 +6420 18940 +6440 -26920 +6440 -26900 +6440 -7640 +6440 -7620 +6440 -7520 +6440 -7500 +6440 15280 +6440 15500 +6440 15520 +6440 15540 +6440 18160 +6440 18180 +6440 18200 +6460 -26940 +6460 -26920 +6460 -26900 +6460 -23940 +6460 -23800 +6460 -23740 +6460 -23680 +6460 -23640 +6460 -7640 +6460 -7620 +6460 -7520 +6460 -7500 +6460 15260 +6460 15520 +6460 15540 +6460 18160 +6460 18180 +6460 18200 +6460 18220 +6480 -26920 +6480 -26900 +6480 -24500 +6480 -24480 +6480 -24460 +6480 -24440 +6480 -24420 +6480 -24400 +6480 -24380 +6480 -24360 +6480 -24340 +6480 -24320 +6480 -24300 +6480 -24280 +6480 -24260 +6480 -24240 +6480 -24200 +6480 -24180 +6480 -24160 +6480 -24140 +6480 -24120 +6480 -24100 +6480 -24080 +6480 -24040 +6480 -24020 +6480 -24000 +6480 -23980 +6480 -23960 +6480 -23940 +6480 -23920 +6480 -23900 +6480 -23880 +6480 -23860 +6480 -23840 +6480 -23820 +6480 -23800 +6480 -23780 +6480 -23760 +6480 -23740 +6480 -23720 +6480 -23700 +6480 -23680 +6480 -23660 +6480 -23640 +6480 -23620 +6480 -7640 +6480 -7620 +6480 -7600 +6480 -7520 +6480 -7500 +6480 18100 +6480 18120 +6480 18140 +6480 18180 +6480 18200 +6480 18460 +6480 19000 +6480 19040 +6500 -26980 +6500 -26920 +6500 -26900 +6500 -24520 +6500 -24460 +6500 -24440 +6500 -24300 +6500 -24260 +6500 -24220 +6500 -24180 +6500 -24140 +6500 -24120 +6500 -24100 +6500 -24080 +6500 -24020 +6500 -23980 +6500 -23920 +6500 -23840 +6500 -23800 +6500 -23760 +6500 -23700 +6500 -23680 +6500 -23660 +6500 -23640 +6500 -23620 +6500 -23600 +6500 -7640 +6500 -7620 +6500 -7520 +6500 -7500 +6500 18080 +6500 18120 +6500 18160 +6500 18180 +6500 18420 +6500 19040 +6520 -26960 +6520 -26920 +6520 -26900 +6520 -24480 +6520 -24340 +6520 -24260 +6520 -24220 +6520 -23660 +6520 -23620 +6520 -23600 +6520 -23580 +6520 -23560 +6520 -23540 +6520 -23520 +6520 -23500 +6520 -7640 +6520 -7620 +6520 -7540 +6520 -7520 +6520 -7500 +6520 18080 +6520 19040 +6520 19060 +6540 -26940 +6540 -26920 +6540 -26900 +6540 -23600 +6540 -23580 +6540 -23540 +6540 -23520 +6540 -23500 +6540 -23480 +6540 -7640 +6540 -7620 +6540 -7520 +6540 -7500 +6540 18080 +6540 18100 +6540 19040 +6560 -26920 +6560 -26900 +6560 -23660 +6560 -23500 +6560 -23480 +6560 -7640 +6560 -7620 +6560 -7600 +6560 -7520 +6560 -7500 +6560 18080 +6560 18100 +6560 19060 +6580 -26900 +6580 -23660 +6580 -23640 +6580 -23520 +6580 -23500 +6580 -23480 +6580 -7640 +6580 -7620 +6580 -7520 +6580 -7500 +6580 8120 +6580 8140 +6580 18080 +6580 19040 +6580 19060 +6580 19080 +6600 -26920 +6600 -23680 +6600 -23500 +6600 -23480 +6600 -23460 +6600 -7640 +6600 -7620 +6600 -7600 +6600 -7520 +6600 -7500 +6600 8120 +6600 8140 +6600 8160 +6600 18060 +6600 18080 +6600 19040 +6600 19060 +6620 -26920 +6620 -26900 +6620 -23500 +6620 -23480 +6620 -7640 +6620 -7620 +6620 -7520 +6620 -7500 +6620 8120 +6620 8140 +6620 8160 +6620 18080 +6620 19040 +6620 19060 +6640 -26920 +6640 -26900 +6640 -23500 +6640 -23480 +6640 -7640 +6640 -7620 +6640 -7520 +6640 -7500 +6640 8140 +6640 8160 +6640 18080 +6640 19040 +6640 19060 +6660 -26920 +6660 -26900 +6660 -24820 +6660 -23500 +6660 -23480 +6660 -7640 +6660 -7620 +6660 -7520 +6660 -7500 +6660 8100 +6660 8120 +6660 8140 +6660 8160 +6660 18060 +6660 19040 +6660 19060 +6680 -26900 +6680 -23500 +6680 -23480 +6680 -7640 +6680 -7620 +6680 -7600 +6680 -7520 +6680 -7500 +6680 8020 +6680 8040 +6680 8060 +6680 8080 +6680 8100 +6680 8120 +6680 8140 +6680 8160 +6680 13620 +6680 13640 +6680 13660 +6680 13680 +6680 13700 +6680 13720 +6680 13740 +6680 16380 +6680 18060 +6680 18080 +6680 18940 +6700 -26900 +6700 -23500 +6700 -23480 +6700 -7640 +6700 -7620 +6700 -7520 +6700 -7500 +6700 8000 +6700 8020 +6700 8040 +6700 8060 +6700 8080 +6700 8140 +6700 8160 +6700 13640 +6700 13660 +6700 13680 +6700 13700 +6700 13720 +6700 13740 +6700 14600 +6700 14620 +6700 14640 +6700 14660 +6700 16360 +6700 16380 +6700 16400 +6700 16420 +6700 16460 +6700 18060 +6700 18080 +6700 18100 +6700 18960 +6700 19040 +6700 19060 +6720 -26900 +6720 -24020 +6720 -23500 +6720 -23480 +6720 -7640 +6720 -7620 +6720 -7520 +6720 -7500 +6720 7880 +6720 7900 +6720 7920 +6720 7960 +6720 7980 +6720 8000 +6720 8020 +6720 8140 +6720 8160 +6720 8180 +6720 8200 +6720 13520 +6720 13620 +6720 13640 +6720 13660 +6720 13680 +6720 13700 +6720 13720 +6720 13740 +6720 13760 +6720 14620 +6720 14640 +6720 14660 +6720 14840 +6720 14860 +6720 14880 +6720 14900 +6720 14920 +6720 14940 +6720 16380 +6720 16400 +6720 16420 +6720 16440 +6720 16740 +6720 16760 +6720 16780 +6720 16800 +6720 18060 +6720 18940 +6720 19040 +6720 19060 +6740 -26920 +6740 -26900 +6740 -23500 +6740 -23480 +6740 -7640 +6740 -7620 +6740 -7540 +6740 -7520 +6740 -7500 +6740 7880 +6740 7900 +6740 7920 +6740 7940 +6740 7960 +6740 7980 +6740 8140 +6740 8160 +6740 8180 +6740 8200 +6740 13520 +6740 13540 +6740 13620 +6740 13640 +6740 13660 +6740 13680 +6740 13700 +6740 13720 +6740 13740 +6740 14620 +6740 14640 +6740 14820 +6740 14840 +6740 14860 +6740 14880 +6740 14900 +6740 14920 +6740 14940 +6740 14960 +6740 16360 +6740 16380 +6740 16400 +6740 16440 +6740 16460 +6740 16740 +6740 16760 +6740 16780 +6740 18020 +6740 18040 +6740 18720 +6740 18820 +6740 19020 +6740 19040 +6740 19060 +6760 -26920 +6760 -23500 +6760 -23480 +6760 -17920 +6760 -7640 +6760 -7620 +6760 -7600 +6760 -7520 +6760 -7500 +6760 7860 +6760 7880 +6760 7900 +6760 7920 +6760 7940 +6760 8160 +6760 8180 +6760 8200 +6760 13080 +6760 13100 +6760 13520 +6760 13540 +6760 13560 +6760 13640 +6760 13660 +6760 13740 +6760 13760 +6760 14620 +6760 14820 +6760 14860 +6760 14880 +6760 14940 +6760 16360 +6760 16380 +6760 16400 +6760 16740 +6760 18020 +6760 18060 +6760 18180 +6760 19060 +6780 -26900 +6780 -23520 +6780 -23500 +6780 -23480 +6780 -17980 +6780 -17940 +6780 -17920 +6780 -17900 +6780 -17880 +6780 -17860 +6780 -17840 +6780 -17820 +6780 -7640 +6780 -7620 +6780 -7540 +6780 -7520 +6780 -7500 +6780 7840 +6780 7860 +6780 7880 +6780 8160 +6780 8180 +6780 8200 +6780 13080 +6780 13100 +6780 13520 +6780 13540 +6780 13560 +6780 13620 +6780 13640 +6780 13660 +6780 13720 +6780 13740 +6780 13760 +6780 14860 +6780 14880 +6780 14920 +6780 16360 +6780 16380 +6780 18000 +6780 18020 +6780 18040 +6780 18820 +6780 18940 +6800 -23540 +6800 -23520 +6800 -23500 +6800 -23480 +6800 -17980 +6800 -17960 +6800 -17940 +6800 -17920 +6800 -17880 +6800 -17860 +6800 -17840 +6800 -17820 +6800 -7640 +6800 -7620 +6800 -7540 +6800 -7520 +6800 -7500 +6800 7840 +6800 7860 +6800 7880 +6800 8180 +6800 8200 +6800 13060 +6800 13080 +6800 13100 +6800 13520 +6800 13540 +6800 13620 +6800 13640 +6800 13660 +6800 13740 +6800 14860 +6800 14880 +6800 14920 +6800 16360 +6800 18000 +6800 18020 +6800 18040 +6800 18480 +6800 19040 +6820 -23920 +6820 -23820 +6820 -23500 +6820 -23480 +6820 -18140 +6820 -18120 +6820 -18060 +6820 -17980 +6820 -17960 +6820 -17940 +6820 -17840 +6820 -17820 +6820 -7640 +6820 -7620 +6820 -7520 +6820 -7500 +6820 3020 +6820 3060 +6820 3080 +6820 3100 +6820 3120 +6820 3140 +6820 7840 +6820 7860 +6820 8120 +6820 8140 +6820 8180 +6820 13620 +6820 13640 +6820 13660 +6820 13720 +6820 13740 +6820 14860 +6820 14880 +6820 14900 +6820 18000 +6820 18020 +6820 19040 +6840 -26920 +6840 -26900 +6840 -23500 +6840 -23480 +6840 -18140 +6840 -18120 +6840 -18100 +6840 -18080 +6840 -18060 +6840 -18040 +6840 -18020 +6840 -18000 +6840 -17980 +6840 -17960 +6840 -17840 +6840 -17820 +6840 -17800 +6840 -7640 +6840 -7620 +6840 -7600 +6840 -7520 +6840 -7500 +6840 3000 +6840 3020 +6840 3040 +6840 3060 +6840 3080 +6840 3100 +6840 3120 +6840 3140 +6840 7840 +6840 7860 +6840 8120 +6840 8140 +6840 13660 +6840 13740 +6840 14860 +6840 14880 +6840 14920 +6840 17980 +6840 18000 +6840 18020 +6860 -26920 +6860 -26900 +6860 -23520 +6860 -23500 +6860 -23480 +6860 -18160 +6860 -18140 +6860 -18120 +6860 -17820 +6860 -17800 +6860 -7640 +6860 -7620 +6860 -7520 +6860 -7500 +6860 3020 +6860 3040 +6860 3060 +6860 3080 +6860 3100 +6860 3120 +6860 3140 +6860 7860 +6860 7880 +6860 8120 +6860 8140 +6860 8160 +6860 8180 +6860 13620 +6860 13640 +6860 13660 +6860 13720 +6860 13740 +6860 14860 +6860 14880 +6860 16540 +6860 16560 +6860 16580 +6860 16600 +6860 16640 +6860 18000 +6860 18020 +6880 -23520 +6880 -23500 +6880 -23480 +6880 -18160 +6880 -18120 +6880 -18100 +6880 -17800 +6880 -7640 +6880 -7620 +6880 -7520 +6880 -7500 +6880 3020 +6880 3040 +6880 3080 +6880 3100 +6880 3120 +6880 3140 +6880 7860 +6880 7880 +6880 7900 +6880 8120 +6880 8140 +6880 8160 +6880 8180 +6880 8200 +6880 13600 +6880 13620 +6880 13640 +6880 13660 +6880 13720 +6880 13740 +6880 14860 +6880 14880 +6880 14920 +6880 16500 +6880 16520 +6880 16540 +6880 16560 +6880 16580 +6880 16600 +6880 16620 +6880 16640 +6880 16660 +6880 16680 +6880 18000 +6880 18040 +6880 19000 +6880 19040 +6900 -23520 +6900 -23500 +6900 -23480 +6900 -23460 +6900 -22380 +6900 -22360 +6900 -22340 +6900 -20940 +6900 -20920 +6900 -20900 +6900 -18640 +6900 -18620 +6900 -18180 +6900 -18160 +6900 -18140 +6900 -18120 +6900 -18100 +6900 -17800 +6900 -7640 +6900 -7620 +6900 -7520 +6900 -7500 +6900 3020 +6900 3100 +6900 3120 +6900 7880 +6900 7900 +6900 8120 +6900 8160 +6900 8180 +6900 8200 +6900 13620 +6900 13640 +6900 13660 +6900 13720 +6900 13740 +6900 14860 +6900 14880 +6900 16460 +6900 16500 +6900 16520 +6900 16680 +6900 18000 +6900 18020 +6920 -26860 +6920 -26820 +6920 -26060 +6920 -26020 +6920 -25900 +6920 -25860 +6920 -25840 +6920 -25720 +6920 -25680 +6920 -25660 +6920 -25580 +6920 -25520 +6920 -25500 +6920 -25480 +6920 -25420 +6920 -25380 +6920 -25280 +6920 -25180 +6920 -25140 +6920 -23500 +6920 -23480 +6920 -23460 +6920 -23440 +6920 -23420 +6920 -23400 +6920 -23380 +6920 -23360 +6920 -23340 +6920 -23320 +6920 -23300 +6920 -22420 +6920 -22400 +6920 -22380 +6920 -22360 +6920 -22340 +6920 -22320 +6920 -22300 +6920 -22280 +6920 -22260 +6920 -22240 +6920 -22220 +6920 -22200 +6920 -22180 +6920 -22160 +6920 -22140 +6920 -22120 +6920 -22100 +6920 -22080 +6920 -22060 +6920 -22040 +6920 -22020 +6920 -22000 +6920 -21980 +6920 -21960 +6920 -21940 +6920 -21920 +6920 -21900 +6920 -21880 +6920 -20980 +6920 -20960 +6920 -20940 +6920 -20920 +6920 -20900 +6920 -20880 +6920 -20860 +6920 -20840 +6920 -20820 +6920 -20800 +6920 -20780 +6920 -20760 +6920 -20740 +6920 -20720 +6920 -20700 +6920 -20680 +6920 -20660 +6920 -20640 +6920 -20620 +6920 -20600 +6920 -20580 +6920 -20560 +6920 -20540 +6920 -20520 +6920 -20500 +6920 -20480 +6920 -20460 +6920 -20440 +6920 -20420 +6920 -20400 +6920 -20380 +6920 -20360 +6920 -20340 +6920 -20320 +6920 -20300 +6920 -20280 +6920 -20260 +6920 -20240 +6920 -20220 +6920 -20200 +6920 -20180 +6920 -20160 +6920 -20140 +6920 -20120 +6920 -20100 +6920 -20080 +6920 -20060 +6920 -20040 +6920 -20020 +6920 -20000 +6920 -19980 +6920 -19960 +6920 -19940 +6920 -19920 +6920 -19900 +6920 -19880 +6920 -19860 +6920 -19840 +6920 -19820 +6920 -19800 +6920 -19780 +6920 -19760 +6920 -19740 +6920 -19720 +6920 -19700 +6920 -19680 +6920 -19660 +6920 -19640 +6920 -19620 +6920 -19600 +6920 -19580 +6920 -19560 +6920 -19540 +6920 -19520 +6920 -19500 +6920 -19480 +6920 -19460 +6920 -19440 +6920 -19420 +6920 -19400 +6920 -19380 +6920 -19360 +6920 -19340 +6920 -19320 +6920 -19300 +6920 -19280 +6920 -19260 +6920 -19240 +6920 -19220 +6920 -19200 +6920 -19180 +6920 -19160 +6920 -19140 +6920 -19120 +6920 -19100 +6920 -19080 +6920 -19060 +6920 -19040 +6920 -19020 +6920 -19000 +6920 -18980 +6920 -18960 +6920 -18940 +6920 -18920 +6920 -18900 +6920 -18880 +6920 -18860 +6920 -18840 +6920 -18820 +6920 -18800 +6920 -18780 +6920 -18760 +6920 -18740 +6920 -18720 +6920 -18700 +6920 -18680 +6920 -18660 +6920 -18640 +6920 -18620 +6920 -18600 +6920 -18580 +6920 -18560 +6920 -18540 +6920 -18520 +6920 -18500 +6920 -18480 +6920 -18460 +6920 -18440 +6920 -18420 +6920 -18400 +6920 -18380 +6920 -18360 +6920 -18340 +6920 -18320 +6920 -18300 +6920 -18280 +6920 -18260 +6920 -18240 +6920 -18220 +6920 -18200 +6920 -18180 +6920 -18160 +6920 -18140 +6920 -18120 +6920 -17820 +6920 -17800 +6920 -7640 +6920 -7620 +6920 -7520 +6920 -7500 +6920 3000 +6920 3020 +6920 3100 +6920 3120 +6920 7880 +6920 8120 +6920 8140 +6920 8180 +6920 8200 +6920 13640 +6920 13660 +6920 13740 +6920 14860 +6920 14880 +6920 16440 +6920 16460 +6920 16480 +6920 16500 +6920 16520 +6940 -26900 +6940 -23500 +6940 -23480 +6940 -23460 +6940 -23440 +6940 -23420 +6940 -23400 +6940 -23340 +6940 -23320 +6940 -23300 +6940 -22420 +6940 -22400 +6940 -22380 +6940 -22320 +6940 -22300 +6940 -22280 +6940 -22260 +6940 -22240 +6940 -22220 +6940 -22200 +6940 -22180 +6940 -22160 +6940 -22140 +6940 -22120 +6940 -22100 +6940 -22080 +6940 -22060 +6940 -22040 +6940 -22020 +6940 -22000 +6940 -21980 +6940 -21960 +6940 -21920 +6940 -21900 +6940 -21880 +6940 -20980 +6940 -20960 +6940 -20900 +6940 -20880 +6940 -20860 +6940 -20840 +6940 -20820 +6940 -20800 +6940 -20780 +6940 -20760 +6940 -20740 +6940 -20720 +6940 -20700 +6940 -20680 +6940 -20640 +6940 -20620 +6940 -20600 +6940 -20560 +6940 -20540 +6940 -20440 +6940 -20400 +6940 -20360 +6940 -20200 +6940 -19640 +6940 -19380 +6940 -19360 +6940 -19020 +6940 -17820 +6940 -17800 +6940 -7640 +6940 -7620 +6940 -7520 +6940 -7500 +6940 3020 +6940 3120 +6940 8140 +6940 8160 +6940 8180 +6940 8200 +6940 13620 +6940 13640 +6940 13660 +6940 13720 +6940 13740 +6940 14860 +6940 14880 +6940 14900 +6940 14920 +6940 16440 +6940 16460 +6940 16480 +6940 16500 +6960 -26900 +6960 -23440 +6960 -23420 +6960 -23340 +6960 -23320 +6960 -23300 +6960 -22420 +6960 -22040 +6960 -22020 +6960 -21900 +6960 -21880 +6960 -21000 +6960 -20960 +6960 -20700 +6960 -19960 +6960 -19900 +6960 -19880 +6960 -18940 +6960 -17800 +6960 -7640 +6960 -7620 +6960 -7520 +6960 -7500 +6960 -5300 +6960 -4380 +6960 3020 +6960 3100 +6960 3120 +6960 3180 +6960 3300 +6960 3320 +6960 3340 +6960 3360 +6960 3400 +6960 3420 +6960 3460 +6960 3500 +6960 3520 +6960 3580 +6960 3600 +6960 3620 +6960 7960 +6960 8120 +6960 8180 +6960 8200 +6960 8240 +6960 13620 +6960 13640 +6960 13660 +6960 13720 +6960 13740 +6960 14840 +6960 14880 +6960 14900 +6960 14920 +6960 16460 +6980 -26680 +6980 -23320 +6980 -23300 +6980 -21880 +6980 -21860 +6980 -20980 +6980 -17820 +6980 -17800 +6980 -7640 +6980 -7620 +6980 -7520 +6980 -7500 +6980 -5320 +6980 -5300 +6980 -5260 +6980 -4980 +6980 -4720 +6980 -4700 +6980 -4520 +6980 -4500 +6980 -4460 +6980 -4440 +6980 -4420 +6980 -4400 +6980 -4380 +6980 -4360 +6980 -4340 +6980 3020 +6980 3120 +6980 3140 +6980 3160 +6980 3180 +6980 3200 +6980 3220 +6980 3240 +6980 3260 +6980 3280 +6980 3300 +6980 3320 +6980 3340 +6980 3360 +6980 3380 +6980 3400 +6980 3420 +6980 3440 +6980 3460 +6980 3480 +6980 3500 +6980 3520 +6980 3540 +6980 3560 +6980 3580 +6980 3600 +6980 3620 +6980 7920 +6980 7940 +6980 8120 +6980 8140 +6980 8160 +6980 8180 +6980 8200 +6980 8220 +6980 8240 +6980 13620 +6980 13640 +6980 13660 +6980 13740 +6980 14820 +6980 14840 +6980 14860 +6980 14880 +6980 16460 +7000 -23340 +7000 -23320 +7000 -23300 +7000 -21900 +7000 -21880 +7000 -20980 +7000 -17800 +7000 -7640 +7000 -7620 +7000 -7520 +7000 -7500 +7000 -6320 +7000 -6300 +7000 -5340 +7000 -5320 +7000 -5300 +7000 -5280 +7000 -5260 +7000 -5240 +7000 -5220 +7000 -5200 +7000 -5180 +7000 -5160 +7000 -5140 +7000 -5080 +7000 -5060 +7000 -5040 +7000 -5020 +7000 -5000 +7000 -4980 +7000 -4960 +7000 -4940 +7000 -4920 +7000 -4900 +7000 -4880 +7000 -4860 +7000 -4840 +7000 -4820 +7000 -4800 +7000 -4780 +7000 -4760 +7000 -4740 +7000 -4720 +7000 -4700 +7000 -4680 +7000 -4660 +7000 -4640 +7000 -4620 +7000 -4600 +7000 -4580 +7000 -4560 +7000 -4540 +7000 -4520 +7000 -4500 +7000 -4480 +7000 -4460 +7000 -4440 +7000 -4420 +7000 -4400 +7000 -4380 +7000 -4360 +7000 3020 +7000 3040 +7000 3140 +7000 3200 +7000 3220 +7000 3240 +7000 3260 +7000 3280 +7000 3300 +7000 3320 +7000 3340 +7000 3360 +7000 3380 +7000 3400 +7000 3420 +7000 3440 +7000 3460 +7000 3480 +7000 3500 +7000 3520 +7000 3540 +7000 3560 +7000 3580 +7000 3600 +7000 3620 +7000 3640 +7000 7900 +7000 7920 +7000 7940 +7000 8160 +7000 8180 +7000 8200 +7000 8220 +7000 8240 +7000 13620 +7000 13640 +7000 13660 +7000 13680 +7000 13740 +7000 14820 +7000 14860 +7000 16480 +7000 16500 +7000 19060 +7020 -23320 +7020 -23300 +7020 -21900 +7020 -21880 +7020 -21860 +7020 -20960 +7020 -17800 +7020 -7640 +7020 -7620 +7020 -7520 +7020 -7500 +7020 -7460 +7020 -7440 +7020 -7420 +7020 -7400 +7020 -7380 +7020 -7340 +7020 -7300 +7020 -7280 +7020 -7260 +7020 -7240 +7020 -7200 +7020 -7140 +7020 -7120 +7020 -7100 +7020 -7000 +7020 -6960 +7020 -6940 +7020 -6920 +7020 -6840 +7020 -6800 +7020 -6780 +7020 -6740 +7020 -6700 +7020 -6660 +7020 -6640 +7020 -6620 +7020 -6600 +7020 -6580 +7020 -6560 +7020 -6540 +7020 -6520 +7020 -6500 +7020 -6480 +7020 -6460 +7020 -6440 +7020 -6420 +7020 -6400 +7020 -6380 +7020 -6360 +7020 -6340 +7020 -6320 +7020 -6300 +7020 -5340 +7020 -5320 +7020 -5300 +7020 -5280 +7020 -5260 +7020 -5240 +7020 -5220 +7020 -5200 +7020 -5180 +7020 -5160 +7020 -5140 +7020 -5120 +7020 -5100 +7020 -5080 +7020 -5060 +7020 -5040 +7020 -5020 +7020 -5000 +7020 -4980 +7020 -4960 +7020 -4940 +7020 -4920 +7020 -4900 +7020 -4880 +7020 -4860 +7020 -4840 +7020 -4820 +7020 -4800 +7020 -4780 +7020 -4760 +7020 -4740 +7020 -4720 +7020 -4700 +7020 -4680 +7020 -4660 +7020 -4640 +7020 -4620 +7020 -4600 +7020 -4580 +7020 -4560 +7020 -4540 +7020 -4520 +7020 -4500 +7020 -4480 +7020 -4460 +7020 -4440 +7020 -4420 +7020 -4400 +7020 -4380 +7020 -4360 +7020 3000 +7020 3020 +7020 3440 +7020 3480 +7020 3520 +7020 3580 +7020 3600 +7020 3620 +7020 3640 +7020 8040 +7020 8060 +7020 8080 +7020 8100 +7020 8120 +7020 8140 +7020 8160 +7020 8180 +7020 8200 +7020 13620 +7020 13640 +7020 13660 +7020 13740 +7020 14140 +7020 14160 +7020 14660 +7020 16460 +7020 16500 +7040 -23320 +7040 -23300 +7040 -22460 +7040 -22440 +7040 -21900 +7040 -21880 +7040 -21860 +7040 -21840 +7040 -17820 +7040 -17800 +7040 -7640 +7040 -7620 +7040 -7520 +7040 -7500 +7040 -7480 +7040 -7460 +7040 -7420 +7040 -7400 +7040 -7380 +7040 -7360 +7040 -7340 +7040 -7320 +7040 -7300 +7040 -7280 +7040 -7260 +7040 -7240 +7040 -7220 +7040 -7200 +7040 -7180 +7040 -7160 +7040 -7120 +7040 -7100 +7040 -7080 +7040 -7060 +7040 -7040 +7040 -7020 +7040 -6960 +7040 -6940 +7040 -6920 +7040 -6900 +7040 -6880 +7040 -6860 +7040 -6840 +7040 -6820 +7040 -6800 +7040 -6780 +7040 -6760 +7040 -6740 +7040 -6720 +7040 -6700 +7040 -6680 +7040 -6380 +7040 -6340 +7040 -6320 +7040 -6300 +7040 -5340 +7040 -5320 +7040 -5300 +7040 -5280 +7040 -5020 +7040 -4380 +7040 -4360 +7040 3020 +7040 3300 +7040 3320 +7040 3340 +7040 3360 +7040 3380 +7040 3400 +7040 3420 +7040 3440 +7040 3460 +7040 3480 +7040 3520 +7040 3540 +7040 3560 +7040 3580 +7040 3600 +7040 3620 +7040 3640 +7040 8020 +7040 8040 +7040 8080 +7040 8100 +7040 8140 +7040 8160 +7040 8180 +7040 13620 +7040 13640 +7040 13660 +7040 13740 +7040 14140 +7040 14160 +7040 14660 +7040 14680 +7040 14700 +7040 16460 +7040 16480 +7040 18880 +7060 -23340 +7060 -23320 +7060 -22460 +7060 -21880 +7060 -21860 +7060 -21840 +7060 -21820 +7060 -17820 +7060 -17800 +7060 -7640 +7060 -7620 +7060 -7240 +7060 -7220 +7060 -7160 +7060 -7140 +7060 -7120 +7060 -7100 +7060 -7080 +7060 -7060 +7060 -7040 +7060 -7000 +7060 -6980 +7060 -6960 +7060 -6920 +7060 -6860 +7060 -6820 +7060 -6780 +7060 -6760 +7060 -6420 +7060 -6340 +7060 -6320 +7060 -6300 +7060 -5340 +7060 -5320 +7060 -5300 +7060 -5280 +7060 -4380 +7060 -4360 +7060 3020 +7060 3600 +7060 3620 +7060 7380 +7060 8020 +7060 8040 +7060 8060 +7060 8140 +7060 8160 +7060 8180 +7060 8200 +7060 13620 +7060 13640 +7060 13660 +7060 13740 +7060 14120 +7060 14140 +7060 14160 +7060 14660 +7060 14680 +7060 14700 +7060 14720 +7060 14740 +7060 14760 +7060 18840 +7060 22740 +7060 22880 +7080 -21980 +7080 -21940 +7080 -21900 +7080 -21880 +7080 -21860 +7080 -21840 +7080 -21820 +7080 -17800 +7080 -7640 +7080 -7620 +7080 -7500 +7080 -7180 +7080 -7140 +7080 -7100 +7080 -7080 +7080 -7060 +7080 -7040 +7080 -7020 +7080 -7000 +7080 -6980 +7080 -6940 +7080 -6900 +7080 -6880 +7080 -6860 +7080 -6840 +7080 -6800 +7080 -6780 +7080 -6760 +7080 -6700 +7080 -6660 +7080 -6360 +7080 -6340 +7080 -6320 +7080 -6300 +7080 -5340 +7080 -5320 +7080 -5300 +7080 -4380 +7080 -4360 +7080 3020 +7080 3580 +7080 3600 +7080 3620 +7080 7380 +7080 8020 +7080 8040 +7080 8120 +7080 8140 +7080 8160 +7080 8200 +7080 13620 +7080 13640 +7080 13660 +7080 13720 +7080 13740 +7080 14120 +7080 14140 +7080 14160 +7080 14660 +7080 14680 +7080 14700 +7080 14740 +7080 14760 +7080 14780 +7080 14940 +7080 15760 +7080 16460 +7080 16480 +7100 -23480 +7100 -21900 +7100 -21840 +7100 -21820 +7100 -17800 +7100 -7640 +7100 -7620 +7100 -7220 +7100 -7180 +7100 -7160 +7100 -7140 +7100 -7120 +7100 -7100 +7100 -7080 +7100 -7060 +7100 -7040 +7100 -7020 +7100 -7000 +7100 -6980 +7100 -6960 +7100 -6940 +7100 -6920 +7100 -6900 +7100 -6880 +7100 -6860 +7100 -6840 +7100 -6820 +7100 -6800 +7100 -6780 +7100 -6760 +7100 -6740 +7100 -6720 +7100 -6700 +7100 -6680 +7100 -6660 +7100 -6600 +7100 -6580 +7100 -6540 +7100 -6500 +7100 -6480 +7100 -6460 +7100 -6440 +7100 -6420 +7100 -6400 +7100 -6380 +7100 -6360 +7100 -6340 +7100 -6320 +7100 -6300 +7100 -5340 +7100 -5320 +7100 -5300 +7100 -5280 +7100 -5260 +7100 -5240 +7100 -5220 +7100 -5200 +7100 -5180 +7100 -5160 +7100 -5140 +7100 -5120 +7100 -5100 +7100 -5080 +7100 -5060 +7100 -5040 +7100 -5020 +7100 -5000 +7100 -4980 +7100 -4960 +7100 -4940 +7100 -4920 +7100 -4900 +7100 -4880 +7100 -4860 +7100 -4840 +7100 -4820 +7100 -4800 +7100 -4780 +7100 -4760 +7100 -4740 +7100 -4720 +7100 -4700 +7100 -4680 +7100 -4660 +7100 -4640 +7100 -4620 +7100 -4600 +7100 -4580 +7100 -4560 +7100 -4540 +7100 -4520 +7100 -4500 +7100 -4480 +7100 -4460 +7100 -4440 +7100 -4420 +7100 -4380 +7100 -4360 +7100 3020 +7100 3600 +7100 3620 +7100 7360 +7100 7380 +7100 7400 +7100 8040 +7100 8120 +7100 8160 +7100 8180 +7100 8200 +7100 13620 +7100 13640 +7100 13660 +7100 13740 +7100 14160 +7100 14680 +7100 14700 +7100 14780 +7100 14800 +7100 14820 +7100 14900 +7100 14920 +7100 14940 +7100 15800 +7100 16500 +7120 -21960 +7120 -21920 +7120 -21840 +7120 -21820 +7120 -17820 +7120 -17800 +7120 -7640 +7120 -7620 +7120 -7460 +7120 -7420 +7120 -7400 +7120 -7380 +7120 -7360 +7120 -7340 +7120 -7320 +7120 -7300 +7120 -7240 +7120 -7200 +7120 -7160 +7120 -7120 +7120 -7100 +7120 -7080 +7120 -7060 +7120 -7040 +7120 -7020 +7120 -7000 +7120 -6980 +7120 -6960 +7120 -6940 +7120 -6900 +7120 -6880 +7120 -6860 +7120 -6840 +7120 -6820 +7120 -6800 +7120 -6780 +7120 -6760 +7120 -6740 +7120 -6720 +7120 -6700 +7120 -6680 +7120 -6660 +7120 -6640 +7120 -6620 +7120 -6600 +7120 -6580 +7120 -6560 +7120 -6540 +7120 -6520 +7120 -6500 +7120 -6480 +7120 -6460 +7120 -6440 +7120 -6420 +7120 -6400 +7120 -6380 +7120 -6360 +7120 -6340 +7120 -6320 +7120 -6300 +7120 -5340 +7120 -5320 +7120 -5300 +7120 -5280 +7120 -5260 +7120 -5240 +7120 -5220 +7120 -5200 +7120 -5160 +7120 -5140 +7120 -5120 +7120 -5100 +7120 -5060 +7120 -5040 +7120 -5020 +7120 -5000 +7120 -4960 +7120 -4920 +7120 -4900 +7120 -4800 +7120 -4780 +7120 -4760 +7120 -4740 +7120 -4700 +7120 -4620 +7120 -4580 +7120 -4560 +7120 -4520 +7120 -4500 +7120 -4480 +7120 -4460 +7120 -4440 +7120 -4420 +7120 -4380 +7120 -4360 +7120 3020 +7120 3580 +7120 3600 +7120 3620 +7120 4320 +7120 4420 +7120 7280 +7120 7300 +7120 7320 +7120 7340 +7120 7360 +7120 7380 +7120 7400 +7120 7420 +7120 7440 +7120 7480 +7120 7500 +7120 8120 +7120 8140 +7120 8160 +7120 8180 +7120 8200 +7120 8220 +7120 13620 +7120 13640 +7120 13660 +7120 13740 +7120 14140 +7120 14160 +7120 14680 +7120 14700 +7120 14880 +7120 14900 +7120 14920 +7120 14940 +7120 14960 +7120 14980 +7120 15020 +7120 15040 +7120 15840 +7120 15940 +7120 16460 +7120 18780 +7120 19000 +7140 -21980 +7140 -21820 +7140 -17800 +7140 -7640 +7140 -7620 +7140 -7500 +7140 -7480 +7140 -7460 +7140 -7440 +7140 -7420 +7140 -7380 +7140 -7340 +7140 -7300 +7140 -7180 +7140 -7160 +7140 -7140 +7140 -7120 +7140 -7100 +7140 -7060 +7140 -6900 +7140 -6380 +7140 -6340 +7140 -4500 +7140 -4480 +7140 -4460 +7140 -4440 +7140 -4420 +7140 -4380 +7140 -4360 +7140 -4340 +7140 3000 +7140 3020 +7140 3600 +7140 3620 +7140 4320 +7140 4340 +7140 4420 +7140 4440 +7140 7260 +7140 7280 +7140 7300 +7140 7320 +7140 7340 +7140 7360 +7140 7380 +7140 7400 +7140 7420 +7140 7440 +7140 7460 +7140 7480 +7140 8120 +7140 8140 +7140 8160 +7140 8180 +7140 8200 +7140 8220 +7140 8240 +7140 13640 +7140 13660 +7140 13680 +7140 13740 +7140 14160 +7140 14180 +7140 14760 +7140 14880 +7140 15000 +7140 15020 +7140 15040 +7140 15060 +7140 15080 +7140 15120 +7140 15840 +7140 15920 +7140 15940 +7140 15960 +7140 15980 +7140 16460 +7140 16480 +7140 16500 +7140 19040 +7160 -21840 +7160 -21820 +7160 -20920 +7160 -17820 +7160 -17800 +7160 -7640 +7160 -7620 +7160 -7600 +7160 -7480 +7160 -7380 +7160 -7280 +7160 -7260 +7160 -7160 +7160 -6420 +7160 -6360 +7160 -4480 +7160 -4460 +7160 -4420 +7160 -4380 +7160 -4360 +7160 3000 +7160 3020 +7160 3580 +7160 3600 +7160 3620 +7160 4320 +7160 4340 +7160 4360 +7160 4420 +7160 4440 +7160 4460 +7160 4480 +7160 4500 +7160 4800 +7160 4920 +7160 7280 +7160 7300 +7160 7320 +7160 7340 +7160 7360 +7160 7380 +7160 7400 +7160 7420 +7160 7440 +7160 7460 +7160 7500 +7160 8120 +7160 8140 +7160 8160 +7160 8180 +7160 8200 +7160 8220 +7160 8240 +7160 13620 +7160 13640 +7160 13660 +7160 13740 +7160 14160 +7160 14680 +7160 14700 +7160 14820 +7160 14840 +7160 14860 +7160 15020 +7160 15040 +7160 15060 +7160 15080 +7160 15100 +7160 15120 +7160 15140 +7160 15160 +7160 15940 +7160 15960 +7160 15980 +7160 16000 +7160 16460 +7160 16480 +7160 18820 +7160 18880 +7180 -21820 +7180 -17820 +7180 -17800 +7180 -7640 +7180 -7620 +7180 -7480 +7180 -7140 +7180 -7120 +7180 -7100 +7180 -4480 +7180 -4440 +7180 -4420 +7180 -4360 +7180 3020 +7180 3600 +7180 3620 +7180 4340 +7180 4360 +7180 4420 +7180 4440 +7180 4460 +7180 4500 +7180 4520 +7180 4540 +7180 4560 +7180 4760 +7180 4780 +7180 4800 +7180 4820 +7180 4840 +7180 4860 +7180 4880 +7180 4900 +7180 4920 +7180 5020 +7180 5040 +7180 7320 +7180 7340 +7180 7360 +7180 7380 +7180 7400 +7180 7420 +7180 7460 +7180 7480 +7180 7500 +7180 8100 +7180 8120 +7180 8140 +7180 8160 +7180 8180 +7180 8200 +7180 8220 +7180 13620 +7180 13640 +7180 13660 +7180 13740 +7180 14160 +7180 14180 +7180 14680 +7180 14860 +7180 15080 +7180 15100 +7180 15120 +7180 15140 +7180 15160 +7180 15200 +7180 15800 +7180 15820 +7180 15920 +7180 18820 +7200 -24020 +7200 -21820 +7200 -21800 +7200 -20920 +7200 -17800 +7200 -7640 +7200 -7620 +7200 -7480 +7200 -7240 +7200 -7180 +7200 -7140 +7200 -7120 +7200 -7100 +7200 -4480 +7200 -4440 +7200 -4420 +7200 -4380 +7200 -4360 +7200 3020 +7200 3620 +7200 3640 +7200 4320 +7200 4340 +7200 4360 +7200 4440 +7200 4460 +7200 4480 +7200 4500 +7200 4520 +7200 4540 +7200 4780 +7200 4800 +7200 4820 +7200 4840 +7200 4860 +7200 4880 +7200 4900 +7200 4920 +7200 4940 +7200 4960 +7200 5020 +7200 5040 +7200 7360 +7200 7380 +7200 7440 +7200 7460 +7200 7480 +7200 7500 +7200 8120 +7200 8140 +7200 8160 +7200 8180 +7200 8200 +7200 8220 +7200 8240 +7200 13620 +7200 13640 +7200 13660 +7200 13740 +7200 14160 +7200 14180 +7200 14660 +7200 14680 +7200 15160 +7200 15200 +7200 15780 +7200 15840 +7200 15860 +7200 15880 +7200 15900 +7200 15940 +7220 -22540 +7220 -22520 +7220 -21820 +7220 -21800 +7220 -17800 +7220 -7640 +7220 -7620 +7220 -7480 +7220 -7180 +7220 -7140 +7220 -7120 +7220 -7100 +7220 -4480 +7220 -4460 +7220 -4440 +7220 -4420 +7220 -4380 +7220 -4360 +7220 3000 +7220 3020 +7220 3580 +7220 3600 +7220 3620 +7220 4360 +7220 4440 +7220 4460 +7220 4500 +7220 4520 +7220 4540 +7220 4620 +7220 4640 +7220 4660 +7220 4700 +7220 4720 +7220 4740 +7220 4760 +7220 4780 +7220 4800 +7220 4820 +7220 4840 +7220 4860 +7220 4920 +7220 4940 +7220 4960 +7220 4980 +7220 5000 +7220 5020 +7220 5040 +7220 8120 +7220 8140 +7220 8160 +7220 8180 +7220 8200 +7220 8240 +7220 8260 +7220 13640 +7220 13660 +7220 13680 +7220 13740 +7220 14160 +7220 14180 +7220 14660 +7220 14680 +7220 15140 +7220 15160 +7220 15820 +7220 15900 +7220 15920 +7220 16000 +7220 18860 +7240 -24020 +7240 -22520 +7240 -21980 +7240 -21820 +7240 -21800 +7240 -17820 +7240 -17800 +7240 -7640 +7240 -7620 +7240 -7600 +7240 -7480 +7240 -7180 +7240 -7160 +7240 -7140 +7240 -7120 +7240 -7100 +7240 -4480 +7240 -4440 +7240 -4420 +7240 -4380 +7240 -4360 +7240 3000 +7240 3020 +7240 3580 +7240 3600 +7240 3620 +7240 4340 +7240 4360 +7240 4420 +7240 4440 +7240 4520 +7240 4540 +7240 4560 +7240 4620 +7240 4640 +7240 4660 +7240 4680 +7240 4700 +7240 4720 +7240 4740 +7240 4780 +7240 4800 +7240 4820 +7240 4840 +7240 4860 +7240 4880 +7240 4900 +7240 4920 +7240 4940 +7240 4960 +7240 4980 +7240 5020 +7240 5040 +7240 8120 +7240 8140 +7240 8180 +7240 8200 +7240 8220 +7240 13620 +7240 13640 +7240 13660 +7240 13680 +7240 13720 +7240 13740 +7240 14180 +7240 14200 +7240 14620 +7240 14640 +7240 14660 +7240 14680 +7240 15760 +7240 15780 +7240 15960 +7240 16020 +7240 19020 +7260 -24040 +7260 -22540 +7260 -22520 +7260 -21980 +7260 -21820 +7260 -21800 +7260 -17820 +7260 -17800 +7260 -7640 +7260 -7620 +7260 -7600 +7260 -7320 +7260 -7140 +7260 -7100 +7260 -4480 +7260 -4460 +7260 -4440 +7260 -4420 +7260 -4380 +7260 -4360 +7260 3000 +7260 3020 +7260 3600 +7260 3620 +7260 4240 +7260 4340 +7260 4360 +7260 4440 +7260 4540 +7260 4560 +7260 4580 +7260 4600 +7260 4620 +7260 4640 +7260 4660 +7260 4680 +7260 4700 +7260 4760 +7260 4780 +7260 4820 +7260 4840 +7260 4860 +7260 4880 +7260 4900 +7260 4960 +7260 4980 +7260 5020 +7260 5040 +7260 5080 +7260 8100 +7260 8120 +7260 8140 +7260 8160 +7260 8180 +7260 8200 +7260 8220 +7260 13620 +7260 13640 +7260 13660 +7260 13740 +7260 13760 +7260 13880 +7260 13900 +7260 14160 +7260 14180 +7260 14640 +7260 14660 +7260 15780 +7260 15960 +7260 16020 +7260 16040 +7260 16060 +7260 16100 +7280 -24020 +7280 -21800 +7280 -17820 +7280 -17800 +7280 -7640 +7280 -7620 +7280 -4480 +7280 -4440 +7280 -4380 +7280 -4360 +7280 3020 +7280 3600 +7280 3620 +7280 4240 +7280 4260 +7280 4340 +7280 4440 +7280 4520 +7280 4580 +7280 4600 +7280 4640 +7280 4660 +7280 4680 +7280 4760 +7280 4800 +7280 4820 +7280 4860 +7280 4880 +7280 4920 +7280 4940 +7280 4960 +7280 4980 +7280 5020 +7280 5080 +7280 8120 +7280 8140 +7280 8160 +7280 8200 +7280 8240 +7280 8260 +7280 8280 +7280 8300 +7280 13600 +7280 13620 +7280 13640 +7280 13660 +7280 13740 +7280 13880 +7280 13900 +7280 14180 +7280 14640 +7280 15940 +7280 16000 +7280 16020 +7280 16060 +7280 16100 +7280 19040 +7280 19060 +7300 -24040 +7300 -21820 +7300 -21800 +7300 -17820 +7300 -17800 +7300 -7640 +7300 -7620 +7300 -7600 +7300 -7300 +7300 -4480 +7300 -4440 +7300 -4420 +7300 -4380 +7300 -4360 +7300 -4340 +7300 3020 +7300 3600 +7300 3620 +7300 4220 +7300 4240 +7300 4260 +7300 4340 +7300 4440 +7300 4520 +7300 4580 +7300 4760 +7300 4840 +7300 4860 +7300 4900 +7300 4920 +7300 4940 +7300 4960 +7300 4980 +7300 5020 +7300 5040 +7300 5060 +7300 5080 +7300 8100 +7300 8120 +7300 8140 +7300 8160 +7300 8180 +7300 8200 +7300 8220 +7300 8240 +7300 8260 +7300 8280 +7300 8300 +7300 13620 +7300 13640 +7300 13660 +7300 13740 +7300 13900 +7300 14180 +7300 14640 +7300 15780 +7300 16000 +7300 16080 +7300 16760 +7300 19060 +7300 23640 +7320 -24020 +7320 -22540 +7320 -21820 +7320 -21800 +7320 -17800 +7320 -7640 +7320 -7620 +7320 -7300 +7320 -7280 +7320 -7240 +7320 -4480 +7320 -4440 +7320 -4380 +7320 -4360 +7320 3020 +7320 3580 +7320 3600 +7320 3620 +7320 4220 +7320 4240 +7320 4340 +7320 4420 +7320 4440 +7320 4680 +7320 4760 +7320 4900 +7320 4940 +7320 4980 +7320 5020 +7320 5040 +7320 8120 +7320 8140 +7320 8160 +7320 8180 +7320 8200 +7320 8220 +7320 8240 +7320 8260 +7320 8280 +7320 8300 +7320 13620 +7320 13640 +7320 13660 +7320 13740 +7320 13900 +7320 14080 +7320 14100 +7320 14180 +7320 14640 +7320 15860 +7320 15920 +7320 15940 +7320 15980 +7320 19060 +7340 -24020 +7340 -22540 +7340 -21800 +7340 -17800 +7340 -7640 +7340 -7620 +7340 -7600 +7340 -7300 +7340 -7280 +7340 -7260 +7340 -4480 +7340 -4440 +7340 -4420 +7340 -4380 +7340 -4360 +7340 3000 +7340 3020 +7340 3600 +7340 3620 +7340 4240 +7340 4340 +7340 4440 +7340 4500 +7340 4580 +7340 4740 +7340 4760 +7340 4840 +7340 4920 +7340 4960 +7340 4980 +7340 5000 +7340 5020 +7340 5060 +7340 8120 +7340 8140 +7340 8160 +7340 8180 +7340 8220 +7340 8240 +7340 8260 +7340 8300 +7340 13620 +7340 13640 +7340 13660 +7340 13740 +7340 13900 +7340 14180 +7340 14200 +7340 15820 +7340 15840 +7340 15860 +7340 15880 +7340 15940 +7340 23640 +7360 -24040 +7360 -21800 +7360 -21780 +7360 -17800 +7360 -17780 +7360 -7640 +7360 -7620 +7360 -7280 +7360 -7260 +7360 -7240 +7360 -4480 +7360 -4440 +7360 -4400 +7360 -4380 +7360 -4360 +7360 3020 +7360 3600 +7360 3620 +7360 4200 +7360 4240 +7360 4400 +7360 4420 +7360 4480 +7360 4500 +7360 4520 +7360 4580 +7360 4680 +7360 4700 +7360 4720 +7360 4760 +7360 4860 +7360 4880 +7360 4920 +7360 4960 +7360 4980 +7360 5020 +7360 5040 +7360 5060 +7360 5080 +7360 8080 +7360 8120 +7360 8140 +7360 8160 +7360 8180 +7360 8240 +7360 13620 +7360 13640 +7360 13660 +7360 13740 +7360 13920 +7360 14180 +7360 14200 +7360 14640 +7360 19060 +7360 19080 +7380 -24020 +7380 -21800 +7380 -21780 +7380 -17820 +7380 -17800 +7380 -17780 +7380 -10760 +7380 -7640 +7380 -7620 +7380 -7300 +7380 -7280 +7380 -7260 +7380 -7240 +7380 -4480 +7380 -4440 +7380 -4420 +7380 -4400 +7380 -4360 +7380 3000 +7380 3020 +7380 3600 +7380 3620 +7380 4200 +7380 4220 +7380 4240 +7380 4300 +7380 4320 +7380 4340 +7380 4380 +7380 4400 +7380 4460 +7380 4500 +7380 4560 +7380 4600 +7380 4620 +7380 4660 +7380 4680 +7380 4740 +7380 4880 +7380 4900 +7380 4920 +7380 4940 +7380 4960 +7380 4980 +7380 5020 +7380 5040 +7380 5060 +7380 5080 +7380 5100 +7380 8100 +7380 8120 +7380 8140 +7380 8160 +7380 8180 +7380 8220 +7380 8240 +7380 8260 +7380 8300 +7380 13620 +7380 13640 +7380 13660 +7380 13740 +7380 13760 +7380 13900 +7380 14200 +7380 14660 +7380 19060 +7400 -24020 +7400 -21800 +7400 -21780 +7400 -17820 +7400 -17800 +7400 -17780 +7400 -12040 +7400 -12020 +7400 -12000 +7400 -11540 +7400 -11520 +7400 -11500 +7400 -11400 +7400 -11380 +7400 -11360 +7400 -11340 +7400 -11320 +7400 -11300 +7400 -11280 +7400 -11260 +7400 -11240 +7400 -11220 +7400 -11200 +7400 -11180 +7400 -11160 +7400 -11140 +7400 -11120 +7400 -11100 +7400 -11080 +7400 -11060 +7400 -11040 +7400 -11020 +7400 -11000 +7400 -10980 +7400 -10960 +7400 -10940 +7400 -10920 +7400 -10900 +7400 -10880 +7400 -10860 +7400 -10840 +7400 -10820 +7400 -10800 +7400 -10780 +7400 -10760 +7400 -10740 +7400 -7640 +7400 -7620 +7400 -7400 +7400 -7300 +7400 -7280 +7400 -7260 +7400 -7240 +7400 -4480 +7400 -4440 +7400 -4420 +7400 -4360 +7400 3020 +7400 3580 +7400 3600 +7400 3620 +7400 3640 +7400 4200 +7400 4220 +7400 4240 +7400 4300 +7400 4340 +7400 4380 +7400 4760 +7400 4860 +7400 5060 +7400 5080 +7400 8060 +7400 8080 +7400 8100 +7400 8120 +7400 8140 +7400 8160 +7400 8180 +7400 8200 +7400 8220 +7400 8240 +7400 8260 +7400 8280 +7400 8300 +7400 13620 +7400 13640 +7400 13660 +7400 13740 +7400 13900 +7400 13920 +7400 13940 +7400 13960 +7400 13980 +7400 14000 +7400 14020 +7400 14060 +7400 14080 +7400 14200 +7400 15980 +7400 19060 +7400 22960 +7400 22980 +7400 23640 +7400 23680 +7420 -24040 +7420 -23500 +7420 -21780 +7420 -17820 +7420 -17800 +7420 -17780 +7420 -17760 +7420 -17740 +7420 -17720 +7420 -17700 +7420 -17680 +7420 -17660 +7420 -17640 +7420 -17620 +7420 -17600 +7420 -17580 +7420 -17560 +7420 -17540 +7420 -17520 +7420 -17500 +7420 -17480 +7420 -17460 +7420 -17440 +7420 -17420 +7420 -17400 +7420 -17380 +7420 -17360 +7420 -17340 +7420 -17320 +7420 -17300 +7420 -17280 +7420 -17240 +7420 -17220 +7420 -17200 +7420 -17180 +7420 -17160 +7420 -17140 +7420 -17120 +7420 -17100 +7420 -17080 +7420 -17060 +7420 -17040 +7420 -17020 +7420 -17000 +7420 -16980 +7420 -16960 +7420 -16940 +7420 -16920 +7420 -16900 +7420 -16880 +7420 -16860 +7420 -16840 +7420 -16820 +7420 -16800 +7420 -16780 +7420 -16760 +7420 -16740 +7420 -16720 +7420 -16700 +7420 -16680 +7420 -16660 +7420 -16640 +7420 -16620 +7420 -16600 +7420 -16580 +7420 -16560 +7420 -16540 +7420 -16520 +7420 -16500 +7420 -16480 +7420 -16460 +7420 -16440 +7420 -16420 +7420 -16400 +7420 -16380 +7420 -16360 +7420 -16340 +7420 -16320 +7420 -16300 +7420 -16280 +7420 -16260 +7420 -16240 +7420 -16220 +7420 -16200 +7420 -16180 +7420 -16160 +7420 -16140 +7420 -16120 +7420 -16100 +7420 -16080 +7420 -16060 +7420 -16040 +7420 -16020 +7420 -16000 +7420 -15980 +7420 -15960 +7420 -15940 +7420 -15920 +7420 -15900 +7420 -15880 +7420 -15860 +7420 -15840 +7420 -15820 +7420 -15800 +7420 -15780 +7420 -15760 +7420 -15740 +7420 -15720 +7420 -15700 +7420 -15680 +7420 -15660 +7420 -15640 +7420 -15620 +7420 -15600 +7420 -15580 +7420 -15560 +7420 -15540 +7420 -15520 +7420 -15500 +7420 -15480 +7420 -15460 +7420 -15440 +7420 -15420 +7420 -15400 +7420 -15380 +7420 -15360 +7420 -15340 +7420 -15320 +7420 -15300 +7420 -15280 +7420 -15260 +7420 -15240 +7420 -15220 +7420 -15200 +7420 -15180 +7420 -15160 +7420 -15140 +7420 -15120 +7420 -15100 +7420 -15080 +7420 -15060 +7420 -15040 +7420 -15020 +7420 -15000 +7420 -14980 +7420 -14960 +7420 -14940 +7420 -14920 +7420 -14900 +7420 -14880 +7420 -14860 +7420 -14840 +7420 -14820 +7420 -14800 +7420 -14780 +7420 -14760 +7420 -14740 +7420 -14720 +7420 -14700 +7420 -14680 +7420 -14660 +7420 -14640 +7420 -14620 +7420 -14600 +7420 -14580 +7420 -14560 +7420 -14540 +7420 -14520 +7420 -14500 +7420 -14480 +7420 -14460 +7420 -14440 +7420 -14420 +7420 -14400 +7420 -14380 +7420 -14360 +7420 -14340 +7420 -14320 +7420 -14300 +7420 -14280 +7420 -14260 +7420 -14240 +7420 -14220 +7420 -14200 +7420 -14180 +7420 -14160 +7420 -14140 +7420 -14120 +7420 -14100 +7420 -14080 +7420 -14060 +7420 -14040 +7420 -14020 +7420 -14000 +7420 -13980 +7420 -13960 +7420 -13940 +7420 -13920 +7420 -13900 +7420 -13880 +7420 -13860 +7420 -13840 +7420 -13820 +7420 -13800 +7420 -13780 +7420 -13760 +7420 -13740 +7420 -13720 +7420 -13700 +7420 -13680 +7420 -13660 +7420 -13640 +7420 -13620 +7420 -13600 +7420 -13580 +7420 -13560 +7420 -13540 +7420 -13520 +7420 -13500 +7420 -13480 +7420 -13460 +7420 -13440 +7420 -13420 +7420 -13400 +7420 -13380 +7420 -13360 +7420 -13340 +7420 -13320 +7420 -13300 +7420 -13280 +7420 -13260 +7420 -13240 +7420 -13220 +7420 -13200 +7420 -13180 +7420 -13160 +7420 -13140 +7420 -13120 +7420 -13100 +7420 -13080 +7420 -13060 +7420 -13040 +7420 -13020 +7420 -13000 +7420 -12980 +7420 -12960 +7420 -12940 +7420 -12920 +7420 -12900 +7420 -12880 +7420 -12860 +7420 -12840 +7420 -12820 +7420 -12800 +7420 -12780 +7420 -12760 +7420 -12740 +7420 -12720 +7420 -12700 +7420 -12680 +7420 -12660 +7420 -12640 +7420 -12620 +7420 -12600 +7420 -12580 +7420 -12560 +7420 -12540 +7420 -12520 +7420 -12500 +7420 -12480 +7420 -12460 +7420 -12440 +7420 -12420 +7420 -12400 +7420 -12380 +7420 -12360 +7420 -12340 +7420 -12320 +7420 -12300 +7420 -12280 +7420 -12260 +7420 -12240 +7420 -12220 +7420 -12200 +7420 -12180 +7420 -12160 +7420 -12140 +7420 -12120 +7420 -12100 +7420 -12080 +7420 -12060 +7420 -12040 +7420 -12020 +7420 -12000 +7420 -11980 +7420 -11960 +7420 -11940 +7420 -11920 +7420 -11900 +7420 -11880 +7420 -11860 +7420 -11840 +7420 -11820 +7420 -11800 +7420 -11780 +7420 -11760 +7420 -11740 +7420 -11720 +7420 -11700 +7420 -11680 +7420 -11660 +7420 -11640 +7420 -11620 +7420 -11600 +7420 -11580 +7420 -11560 +7420 -11540 +7420 -11520 +7420 -11500 +7420 -11480 +7420 -11460 +7420 -11440 +7420 -11420 +7420 -11400 +7420 -11380 +7420 -11360 +7420 -11340 +7420 -11320 +7420 -11300 +7420 -11280 +7420 -11260 +7420 -11240 +7420 -11220 +7420 -11200 +7420 -11180 +7420 -11160 +7420 -11140 +7420 -11120 +7420 -11100 +7420 -11080 +7420 -11060 +7420 -11040 +7420 -11020 +7420 -11000 +7420 -10980 +7420 -10960 +7420 -10940 +7420 -10920 +7420 -10900 +7420 -10880 +7420 -10860 +7420 -10840 +7420 -10820 +7420 -10800 +7420 -10780 +7420 -10760 +7420 -10740 +7420 -7640 +7420 -7620 +7420 -7280 +7420 -7260 +7420 -7240 +7420 -4480 +7420 -4440 +7420 -4380 +7420 -4360 +7420 3020 +7420 3600 +7420 3620 +7420 4200 +7420 4240 +7420 4340 +7420 4380 +7420 4400 +7420 4420 +7420 4440 +7420 5080 +7420 5100 +7420 7320 +7420 8160 +7420 8180 +7420 8240 +7420 8280 +7420 8320 +7420 9740 +7420 9760 +7420 9780 +7420 9800 +7420 9820 +7420 9840 +7420 9860 +7420 9880 +7420 9900 +7420 9920 +7420 9940 +7420 9960 +7420 9980 +7420 10000 +7420 13620 +7420 13640 +7420 13660 +7420 13740 +7420 13940 +7420 13960 +7420 14000 +7420 14020 +7420 14060 +7420 14200 +7420 17520 +7420 19060 +7440 -24020 +7440 -21780 +7440 -17780 +7440 -17720 +7440 -17700 +7440 -17680 +7440 -17660 +7440 -17640 +7440 -17620 +7440 -17600 +7440 -17580 +7440 -17560 +7440 -17540 +7440 -17520 +7440 -17500 +7440 -17480 +7440 -17460 +7440 -17440 +7440 -17420 +7440 -17400 +7440 -17380 +7440 -17360 +7440 -17340 +7440 -17320 +7440 -17300 +7440 -17280 +7440 -17260 +7440 -17240 +7440 -17220 +7440 -17200 +7440 -17180 +7440 -17160 +7440 -17140 +7440 -17120 +7440 -17100 +7440 -17080 +7440 -17060 +7440 -17040 +7440 -17020 +7440 -17000 +7440 -16980 +7440 -16960 +7440 -16940 +7440 -16920 +7440 -16900 +7440 -16880 +7440 -16860 +7440 -16840 +7440 -16820 +7440 -16800 +7440 -16780 +7440 -16760 +7440 -16740 +7440 -16720 +7440 -16700 +7440 -16680 +7440 -16660 +7440 -16640 +7440 -16620 +7440 -16600 +7440 -16580 +7440 -16560 +7440 -16540 +7440 -16520 +7440 -16500 +7440 -16480 +7440 -16460 +7440 -16440 +7440 -16420 +7440 -16400 +7440 -16380 +7440 -16360 +7440 -16340 +7440 -16320 +7440 -16300 +7440 -16280 +7440 -16260 +7440 -16240 +7440 -16220 +7440 -16180 +7440 -16160 +7440 -16140 +7440 -16120 +7440 -16100 +7440 -16080 +7440 -16060 +7440 -16040 +7440 -16020 +7440 -16000 +7440 -15980 +7440 -15960 +7440 -15940 +7440 -15920 +7440 -15900 +7440 -15880 +7440 -15860 +7440 -15840 +7440 -15820 +7440 -15800 +7440 -15780 +7440 -15760 +7440 -15740 +7440 -15720 +7440 -15700 +7440 -15660 +7440 -15640 +7440 -15560 +7440 -15500 +7440 -15460 +7440 -15440 +7440 -15420 +7440 -15400 +7440 -15380 +7440 -15360 +7440 -15340 +7440 -15320 +7440 -15300 +7440 -15280 +7440 -15260 +7440 -15240 +7440 -15220 +7440 -15180 +7440 -15160 +7440 -15120 +7440 -15100 +7440 -15080 +7440 -15060 +7440 -15040 +7440 -15020 +7440 -15000 +7440 -14980 +7440 -14960 +7440 -14920 +7440 -14740 +7440 -14640 +7440 -14620 +7440 -14600 +7440 -14400 +7440 -14240 +7440 -14220 +7440 -14180 +7440 -14160 +7440 -14140 +7440 -14100 +7440 -14060 +7440 -14040 +7440 -14000 +7440 -13980 +7440 -13960 +7440 -13940 +7440 -13900 +7440 -13880 +7440 -13840 +7440 -13820 +7440 -13680 +7440 -13640 +7440 -13220 +7440 -13200 +7440 -13160 +7440 -13140 +7440 -13120 +7440 -13100 +7440 -13080 +7440 -12980 +7440 -12960 +7440 -12940 +7440 -12920 +7440 -12900 +7440 -12860 +7440 -12840 +7440 -12820 +7440 -12700 +7440 -12680 +7440 -12660 +7440 -12640 +7440 -12420 +7440 -12360 +7440 -12300 +7440 -12260 +7440 -12000 +7440 -11980 +7440 -11940 +7440 -11860 +7440 -11800 +7440 -11700 +7440 -11680 +7440 -11600 +7440 -11580 +7440 -11240 +7440 -11100 +7440 -10900 +7440 -10880 +7440 -10800 +7440 -10780 +7440 -10760 +7440 -7640 +7440 -7620 +7440 -7300 +7440 -7280 +7440 -7260 +7440 -7240 +7440 -4480 +7440 -4440 +7440 -4420 +7440 -4400 +7440 -4380 +7440 -4360 +7440 3020 +7440 3600 +7440 3620 +7440 4180 +7440 4200 +7440 4220 +7440 4240 +7440 4320 +7440 4340 +7440 4420 +7440 5060 +7440 7320 +7440 7340 +7440 7360 +7440 7380 +7440 7400 +7440 8120 +7440 8160 +7440 8200 +7440 8240 +7440 8280 +7440 8300 +7440 8320 +7440 8340 +7440 9720 +7440 9800 +7440 9820 +7440 9840 +7440 9860 +7440 9880 +7440 9900 +7440 9920 +7440 9940 +7440 9960 +7440 9980 +7440 10000 +7440 13620 +7440 13640 +7440 13660 +7440 13740 +7440 14200 +7440 17560 +7440 19060 +7440 23400 +7460 -24020 +7460 -21780 +7460 -21760 +7460 -17740 +7460 -17560 +7460 -17140 +7460 -10780 +7460 -10760 +7460 -7640 +7460 -7620 +7460 -7300 +7460 -7280 +7460 -7260 +7460 -7240 +7460 -4480 +7460 -4440 +7460 -4420 +7460 -4380 +7460 -4360 +7460 -4340 +7460 3020 +7460 3600 +7460 3620 +7460 3640 +7460 4880 +7460 7300 +7460 7320 +7460 7340 +7460 7360 +7460 7380 +7460 8140 +7460 8160 +7460 8240 +7460 8260 +7460 8280 +7460 8300 +7460 8320 +7460 9760 +7460 9780 +7460 9800 +7460 9820 +7460 9860 +7460 9900 +7460 9960 +7460 9980 +7460 10000 +7460 10020 +7460 13060 +7460 13080 +7460 13120 +7460 13140 +7460 13160 +7460 13180 +7460 13200 +7460 13220 +7460 13240 +7460 13260 +7460 13280 +7460 13300 +7460 13340 +7460 13380 +7460 13400 +7460 13620 +7460 13660 +7460 13740 +7460 14200 +7460 14220 +7460 14620 +7460 17400 +7460 18520 +7460 19060 +7460 23560 +7460 24680 +7480 -24040 +7480 -23520 +7480 -23500 +7480 -21780 +7480 -21760 +7480 -10800 +7480 -10780 +7480 -10760 +7480 -7640 +7480 -7620 +7480 -7600 +7480 -7460 +7480 -7400 +7480 -7300 +7480 -7280 +7480 -7260 +7480 -7240 +7480 -4480 +7480 -4460 +7480 -4440 +7480 -4420 +7480 -4380 +7480 -4360 +7480 3000 +7480 3020 +7480 3580 +7480 3600 +7480 3620 +7480 4200 +7480 7300 +7480 7320 +7480 7340 +7480 7360 +7480 7380 +7480 7400 +7480 8120 +7480 8160 +7480 8180 +7480 8200 +7480 8240 +7480 8260 +7480 9720 +7480 9740 +7480 9760 +7480 9780 +7480 9980 +7480 10000 +7480 10020 +7480 10040 +7480 10060 +7480 13020 +7480 13040 +7480 13060 +7480 13080 +7480 13100 +7480 13120 +7480 13140 +7480 13160 +7480 13180 +7480 13200 +7480 13220 +7480 13240 +7480 13260 +7480 13280 +7480 13300 +7480 13320 +7480 13340 +7480 13360 +7480 13620 +7480 13640 +7480 13660 +7480 13680 +7480 14220 +7480 16380 +7480 16420 +7480 16440 +7480 16760 +7480 16820 +7480 16840 +7480 17520 +7480 18520 +7480 18560 +7480 19060 +7480 23360 +7480 23560 +7500 -24020 +7500 -24000 +7500 -23500 +7500 -21980 +7500 -21780 +7500 -21760 +7500 -10780 +7500 -10760 +7500 -7640 +7500 -7620 +7500 -7460 +7500 -7300 +7500 -7280 +7500 -7260 +7500 -7240 +7500 -4440 +7500 -4420 +7500 -4400 +7500 -4380 +7500 -4360 +7500 3000 +7500 3020 +7500 3480 +7500 3600 +7500 3620 +7500 7280 +7500 7300 +7500 7320 +7500 7340 +7500 7360 +7500 8140 +7500 8160 +7500 8180 +7500 8200 +7500 8220 +7500 8240 +7500 8260 +7500 8280 +7500 8300 +7500 9720 +7500 9740 +7500 10000 +7500 10020 +7500 10040 +7500 10060 +7500 13020 +7500 13040 +7500 13060 +7500 13080 +7500 13100 +7500 13120 +7500 13140 +7500 13160 +7500 13200 +7500 13220 +7500 13240 +7500 13260 +7500 13280 +7500 13300 +7500 13320 +7500 13340 +7500 13380 +7500 13400 +7500 13620 +7500 13640 +7500 13660 +7500 13680 +7500 13740 +7500 14640 +7500 14660 +7500 14680 +7500 15120 +7500 16380 +7500 16400 +7500 16420 +7500 16440 +7500 16780 +7500 16820 +7500 16900 +7500 16960 +7500 17220 +7500 17400 +7500 17560 +7500 17600 +7500 17980 +7500 18520 +7500 18540 +7500 18580 +7500 19060 +7500 23360 +7520 -24040 +7520 -23980 +7520 -23480 +7520 -22600 +7520 -21780 +7520 -21760 +7520 -10780 +7520 -10760 +7520 -7640 +7520 -7620 +7520 -7600 +7520 -7460 +7520 -7340 +7520 -7320 +7520 -7300 +7520 -7260 +7520 -4480 +7520 -4440 +7520 -4420 +7520 -4380 +7520 -4360 +7520 3000 +7520 3020 +7520 3620 +7520 7040 +7520 7060 +7520 7080 +7520 7100 +7520 7280 +7520 7300 +7520 7320 +7520 7340 +7520 8120 +7520 8160 +7520 8180 +7520 8200 +7520 8240 +7520 8260 +7520 8300 +7520 9700 +7520 9720 +7520 10020 +7520 10040 +7520 10060 +7520 10080 +7520 13020 +7520 13040 +7520 13060 +7520 13340 +7520 13360 +7520 13400 +7520 13420 +7520 13460 +7520 13620 +7520 13640 +7520 13660 +7520 14620 +7520 14640 +7520 16400 +7520 16440 +7520 16740 +7520 16760 +7520 16780 +7520 17060 +7520 17160 +7520 17300 +7520 18540 +7520 18560 +7520 19060 +7520 22900 +7520 22920 +7520 23580 +7540 -24020 +7540 -23780 +7540 -23480 +7540 -22620 +7540 -22600 +7540 -21780 +7540 -21760 +7540 -10780 +7540 -10760 +7540 -7640 +7540 -7620 +7540 -7600 +7540 -7480 +7540 -7320 +7540 -4480 +7540 -4460 +7540 -4440 +7540 -4420 +7540 -4380 +7540 -4360 +7540 3000 +7540 3020 +7540 3120 +7540 3620 +7540 7060 +7540 7080 +7540 7100 +7540 7260 +7540 7280 +7540 7300 +7540 7320 +7540 7340 +7540 8120 +7540 8180 +7540 8240 +7540 8260 +7540 8280 +7540 8300 +7540 8320 +7540 9680 +7540 9700 +7540 10020 +7540 10040 +7540 10060 +7540 10080 +7540 10100 +7540 13020 +7540 13040 +7540 13060 +7540 13340 +7540 13360 +7540 13420 +7540 13620 +7540 13660 +7540 13740 +7540 14200 +7540 14600 +7540 15100 +7540 16420 +7540 17120 +7540 17140 +7540 17560 +7540 18500 +7540 18540 +7540 18800 +7540 18840 +7540 19040 +7540 19060 +7560 -24000 +7560 -23980 +7560 -23900 +7560 -23760 +7560 -23720 +7560 -23460 +7560 -21760 +7560 -21740 +7560 -10800 +7560 -10780 +7560 -10760 +7560 -7640 +7560 -7620 +7560 -7600 +7560 -7500 +7560 -4480 +7560 -4440 +7560 -4420 +7560 -4360 +7560 -4340 +7560 2980 +7560 3000 +7560 3020 +7560 3620 +7560 3640 +7560 4740 +7560 4760 +7560 7020 +7560 7060 +7560 7240 +7560 7260 +7560 7280 +7560 7300 +7560 7340 +7560 8120 +7560 8140 +7560 8160 +7560 8180 +7560 8260 +7560 8320 +7560 8340 +7560 9660 +7560 9680 +7560 10020 +7560 10040 +7560 10060 +7560 10080 +7560 10100 +7560 13020 +7560 13040 +7560 13060 +7560 13080 +7560 13280 +7560 13360 +7560 13380 +7560 13400 +7560 13440 +7560 13620 +7560 13640 +7560 13660 +7560 13720 +7560 14180 +7560 14660 +7560 16420 +7560 16440 +7560 16460 +7560 16480 +7560 16500 +7560 16520 +7560 16560 +7560 16760 +7560 17140 +7560 17320 +7560 17520 +7560 17860 +7560 18520 +7560 18540 +7560 18680 +7560 18700 +7560 18880 +7560 18940 +7560 19040 +7560 19060 +7560 22660 +7560 22680 +7560 23580 +7560 24620 +7580 -24040 +7580 -24020 +7580 -23760 +7580 -23700 +7580 -23480 +7580 -22620 +7580 -21760 +7580 -21740 +7580 -10800 +7580 -10780 +7580 -10760 +7580 -7640 +7580 -7620 +7580 -7520 +7580 -4480 +7580 -4440 +7580 -4420 +7580 -4380 +7580 -4360 +7580 3000 +7580 3020 +7580 3620 +7580 7220 +7580 7240 +7580 7260 +7580 7320 +7580 8120 +7580 8140 +7580 8160 +7580 8180 +7580 8200 +7580 8240 +7580 8260 +7580 8280 +7580 9660 +7580 9680 +7580 10040 +7580 10060 +7580 10080 +7580 10100 +7580 13020 +7580 13040 +7580 13060 +7580 13360 +7580 13380 +7580 13620 +7580 13660 +7580 13680 +7580 13740 +7580 15160 +7580 15200 +7580 15300 +7580 15320 +7580 15380 +7580 15400 +7580 15440 +7580 15460 +7580 15560 +7580 15600 +7580 15640 +7580 15660 +7580 15680 +7580 15720 +7580 15760 +7580 15780 +7580 15840 +7580 15860 +7580 16000 +7580 16060 +7580 16120 +7580 16140 +7580 16160 +7580 16180 +7580 16200 +7580 16220 +7580 16240 +7580 16260 +7580 16280 +7580 16300 +7580 16360 +7580 16400 +7580 16420 +7580 16520 +7580 16540 +7580 16560 +7580 16580 +7580 16600 +7580 16620 +7580 16640 +7580 16660 +7580 16680 +7580 16700 +7580 16720 +7580 16740 +7580 16760 +7580 16780 +7580 16800 +7580 16820 +7580 16840 +7580 16900 +7580 17100 +7580 17180 +7580 17220 +7580 17260 +7580 17320 +7580 17400 +7580 17420 +7580 17440 +7580 17480 +7580 17500 +7580 17540 +7580 17560 +7580 17580 +7580 17600 +7580 17620 +7580 17680 +7580 17720 +7580 17740 +7580 17760 +7580 17780 +7580 17800 +7580 17820 +7580 17840 +7580 17860 +7580 17880 +7580 17900 +7580 17940 +7580 17980 +7580 18000 +7580 18020 +7580 18100 +7580 18180 +7580 18200 +7580 18220 +7580 18240 +7580 18280 +7580 18300 +7580 18320 +7580 18340 +7580 18360 +7580 18400 +7580 18420 +7580 18460 +7580 18480 +7580 18500 +7580 18520 +7580 18540 +7580 18580 +7580 18700 +7580 18820 +7580 18880 +7580 18920 +7580 18940 +7580 19000 +7580 22840 +7600 -23960 +7600 -23920 +7600 -23900 +7600 -23740 +7600 -23720 +7600 -23480 +7600 -23460 +7600 -22640 +7600 -21760 +7600 -10780 +7600 -10760 +7600 -7640 +7600 -7620 +7600 -7600 +7600 -7520 +7600 -7500 +7600 -4480 +7600 -4460 +7600 -4440 +7600 -4420 +7600 -4400 +7600 -4380 +7600 -4360 +7600 3020 +7600 3620 +7600 7220 +7600 7240 +7600 7260 +7600 7280 +7600 7300 +7600 8120 +7600 8140 +7600 8240 +7600 8260 +7600 8280 +7600 9660 +7600 9680 +7600 10040 +7600 10060 +7600 10080 +7600 10100 +7600 13020 +7600 13040 +7600 13060 +7600 13380 +7600 13620 +7600 13660 +7600 14180 +7600 14200 +7600 14220 +7600 14240 +7600 14260 +7600 14280 +7600 14320 +7600 14340 +7600 14380 +7600 14400 +7600 14420 +7600 14440 +7600 14460 +7600 15100 +7600 15160 +7600 15200 +7600 15220 +7600 15240 +7600 15260 +7600 15280 +7600 15300 +7600 15320 +7600 15340 +7600 15360 +7600 15380 +7600 15400 +7600 15420 +7600 15440 +7600 15460 +7600 15480 +7600 15500 +7600 15520 +7600 15540 +7600 15560 +7600 15580 +7600 15600 +7600 15620 +7600 15640 +7600 15660 +7600 15680 +7600 15700 +7600 15720 +7600 15760 +7600 15780 +7600 15800 +7600 15820 +7600 15840 +7600 15860 +7600 15900 +7600 15920 +7600 15940 +7600 15960 +7600 16000 +7600 16020 +7600 16080 +7600 16240 +7600 16280 +7600 16320 +7600 16340 +7600 16360 +7600 16380 +7600 16400 +7600 16420 +7600 16500 +7600 16540 +7600 16580 +7600 16620 +7600 16640 +7600 16660 +7600 16680 +7600 16700 +7600 17220 +7600 17360 +7600 17420 +7600 17440 +7600 17500 +7600 17560 +7600 23260 +7620 -24040 +7620 -23820 +7620 -23460 +7620 -21760 +7620 -21740 +7620 -10780 +7620 -10760 +7620 -7640 +7620 -7620 +7620 -7600 +7620 -7520 +7620 -7500 +7620 -7180 +7620 -7140 +7620 -7100 +7620 -4480 +7620 -4460 +7620 -4440 +7620 -4420 +7620 -4380 +7620 -4360 +7620 -4340 +7620 3020 +7620 3620 +7620 7220 +7620 7240 +7620 7260 +7620 7280 +7620 7320 +7620 7360 +7620 8200 +7620 8240 +7620 8260 +7620 8280 +7620 8300 +7620 9660 +7620 10040 +7620 10060 +7620 10080 +7620 10100 +7620 13000 +7620 13020 +7620 13040 +7620 13060 +7620 13340 +7620 13360 +7620 13380 +7620 13620 +7620 13640 +7620 13660 +7620 13680 +7620 13720 +7620 14200 +7620 14220 +7620 14240 +7620 14260 +7620 14280 +7620 14320 +7620 14360 +7620 14380 +7620 14400 +7620 14420 +7620 14480 +7620 14500 +7620 14540 +7620 14560 +7620 14580 +7620 14600 +7620 14640 +7620 14680 +7620 14880 +7620 14900 +7620 14940 +7620 15300 +7620 15420 +7620 23720 +7640 -23980 +7640 -23880 +7640 -23460 +7640 -23440 +7640 -21760 +7640 -21740 +7640 -10780 +7640 -10760 +7640 -7640 +7640 -7620 +7640 -7600 +7640 -7520 +7640 -7500 +7640 -7380 +7640 -7320 +7640 -7300 +7640 -7280 +7640 -7260 +7640 -7240 +7640 -7220 +7640 -7200 +7640 -7160 +7640 -7140 +7640 -7120 +7640 -7100 +7640 -4480 +7640 -4440 +7640 -4420 +7640 -4380 +7640 -4360 +7640 3000 +7640 3020 +7640 3620 +7640 7220 +7640 7240 +7640 7260 +7640 7280 +7640 8180 +7640 8240 +7640 8260 +7640 8280 +7640 9640 +7640 9660 +7640 10060 +7640 10080 +7640 10100 +7640 13020 +7640 13060 +7640 13080 +7640 13260 +7640 13360 +7640 13620 +7640 13640 +7640 13660 +7640 13720 +7640 13740 +7640 13760 +7640 13800 +7640 23740 +7660 -24020 +7660 -23940 +7660 -21740 +7660 -10800 +7660 -10780 +7660 -10760 +7660 -7640 +7660 -7620 +7660 -7600 +7660 -7580 +7660 -7520 +7660 -7500 +7660 -7480 +7660 -7420 +7660 -7400 +7660 -7380 +7660 -7360 +7660 -7340 +7660 -7280 +7660 -7140 +7660 -7120 +7660 -7100 +7660 -4480 +7660 -4460 +7660 -4440 +7660 -4420 +7660 -4400 +7660 -4380 +7660 -4360 +7660 -4340 +7660 3000 +7660 3020 +7660 3620 +7660 3640 +7660 7220 +7660 7240 +7660 7260 +7660 7280 +7660 7300 +7660 7320 +7660 7340 +7660 8160 +7660 8180 +7660 8200 +7660 8260 +7660 8280 +7660 8300 +7660 9640 +7660 9660 +7660 10060 +7660 10080 +7660 10100 +7660 13020 +7660 13040 +7660 13060 +7660 13280 +7660 13400 +7660 13600 +7660 13620 +7660 13640 +7660 13660 +7660 13740 +7660 13760 +7660 13800 +7660 13820 +7660 13840 +7660 14160 +7660 14180 +7660 14220 +7660 14240 +7660 14260 +7660 14280 +7660 14300 +7660 14320 +7660 14340 +7660 14360 +7660 14380 +7660 14400 +7660 14420 +7660 14440 +7660 14460 +7660 14480 +7660 14500 +7660 14520 +7660 14540 +7660 14560 +7660 14580 +7660 14600 +7680 -10780 +7680 -10760 +7680 -7640 +7680 -7620 +7680 -7600 +7680 -7540 +7680 -7520 +7680 -7500 +7680 -7480 +7680 -7460 +7680 -7140 +7680 -7120 +7680 -7100 +7680 -4480 +7680 -4420 +7680 -4400 +7680 -4380 +7680 -4360 +7680 2980 +7680 3000 +7680 3020 +7680 7220 +7680 7300 +7680 7320 +7680 7340 +7680 8260 +7680 8280 +7680 9640 +7680 9660 +7680 10040 +7680 10060 +7680 10080 +7680 10100 +7680 13020 +7680 13040 +7680 13060 +7680 13340 +7680 13360 +7680 13620 +7680 13640 +7680 13660 +7680 14540 +7680 14600 +7700 -10800 +7700 -10780 +7700 -10760 +7700 -7640 +7700 -7620 +7700 -7600 +7700 -7440 +7700 -7420 +7700 -7140 +7700 -7120 +7700 -7100 +7700 -4480 +7700 -4420 +7700 -4400 +7700 -4380 +7700 -4360 +7700 2980 +7700 3000 +7700 3020 +7700 3620 +7700 3640 +7700 7320 +7700 7340 +7700 8160 +7700 8180 +7700 8260 +7700 8280 +7700 8300 +7700 9640 +7700 10040 +7700 10060 +7700 10080 +7700 10100 +7700 13020 +7700 13040 +7700 13060 +7700 13100 +7700 13340 +7700 13640 +7720 -24020 +7720 -23460 +7720 -21740 +7720 -21720 +7720 -10800 +7720 -10780 +7720 -10760 +7720 -7640 +7720 -7620 +7720 -7140 +7720 -7100 +7720 -4480 +7720 -4460 +7720 -4440 +7720 -4420 +7720 -4400 +7720 -4380 +7720 -4360 +7720 2820 +7720 2840 +7720 2860 +7720 2880 +7720 2900 +7720 2920 +7720 3020 +7720 4020 +7720 4040 +7720 4920 +7720 7180 +7720 7280 +7720 7320 +7720 7340 +7720 7360 +7720 7380 +7720 8180 +7720 8200 +7720 8260 +7720 8280 +7720 8300 +7720 9640 +7720 9660 +7720 10040 +7720 10060 +7720 12960 +7720 12980 +7720 13000 +7720 13020 +7720 13040 +7720 13060 +7720 13340 +7720 13600 +7720 13620 +7720 13640 +7720 13660 +7720 14380 +7740 -23480 +7740 -23460 +7740 -21740 +7740 -21720 +7740 -10780 +7740 -10760 +7740 -7640 +7740 -7620 +7740 -7600 +7740 -7140 +7740 -7120 +7740 -7100 +7740 -4480 +7740 -4460 +7740 -4440 +7740 -4420 +7740 -4400 +7740 -4380 +7740 -4360 +7740 2820 +7740 2840 +7740 2860 +7740 2880 +7740 2900 +7740 2940 +7740 3020 +7740 3080 +7740 4920 +7740 7180 +7740 7220 +7740 7260 +7740 7280 +7740 7300 +7740 7320 +7740 7360 +7740 7380 +7740 8180 +7740 8200 +7740 8260 +7740 8280 +7740 9640 +7740 9660 +7740 10000 +7740 10040 +7740 10060 +7740 12960 +7740 12980 +7740 13020 +7740 13040 +7740 13060 +7740 13340 +7740 13620 +7740 13940 +7740 14340 +7740 14360 +7740 14380 +7760 -24020 +7760 -21740 +7760 -21720 +7760 -10780 +7760 -10760 +7760 -7640 +7760 -7620 +7760 -7600 +7760 -7140 +7760 -7120 +7760 -7100 +7760 -4480 +7760 -4460 +7760 -4420 +7760 -4400 +7760 -4380 +7760 -4360 +7760 -4340 +7760 2820 +7760 2840 +7760 2860 +7760 2880 +7760 2900 +7760 2920 +7760 2940 +7760 2960 +7760 3020 +7760 3040 +7760 7180 +7760 7200 +7760 7220 +7760 7240 +7760 7260 +7760 7280 +7760 7360 +7760 8160 +7760 8200 +7760 8260 +7760 8280 +7760 9620 +7760 9660 +7760 10020 +7760 10040 +7760 10060 +7760 12960 +7760 12980 +7760 13000 +7760 13020 +7760 13040 +7760 13060 +7760 13160 +7760 13320 +7760 13340 +7760 13360 +7760 13620 +7760 13640 +7760 13920 +7760 13960 +7760 14300 +7760 14320 +7760 23000 +7780 -24000 +7780 -23900 +7780 -22700 +7780 -21720 +7780 -10800 +7780 -10780 +7780 -10760 +7780 -7640 +7780 -7620 +7780 -7600 +7780 -7140 +7780 -7120 +7780 -7100 +7780 -4480 +7780 -4460 +7780 -4440 +7780 -4420 +7780 -4400 +7780 -4380 +7780 -4360 +7780 -4340 +7780 2820 +7780 2880 +7780 2920 +7780 3020 +7780 7180 +7780 7200 +7780 7220 +7780 7240 +7780 7260 +7780 7300 +7780 8200 +7780 8220 +7780 8280 +7780 9660 +7780 10000 +7780 10020 +7780 10040 +7780 10060 +7780 12960 +7780 12980 +7780 13000 +7780 13020 +7780 13040 +7780 13060 +7780 13180 +7780 13220 +7780 13260 +7780 13280 +7780 13300 +7780 13320 +7780 13340 +7780 13560 +7780 13620 +7780 13660 +7780 13900 +7780 13980 +7780 14040 +7780 14860 +7780 15140 +7780 15180 +7780 15200 +7800 -23920 +7800 -22720 +7800 -22700 +7800 -21740 +7800 -21720 +7800 -10780 +7800 -10760 +7800 -7640 +7800 -7620 +7800 -7600 +7800 -7140 +7800 -7120 +7800 -7100 +7800 -4460 +7800 -4420 +7800 -4400 +7800 -4380 +7800 -4360 +7800 2800 +7800 2820 +7800 2980 +7800 3000 +7800 3020 +7800 7160 +7800 7180 +7800 7220 +7800 7240 +7800 7280 +7800 7300 +7800 8160 +7800 8180 +7800 8220 +7800 8240 +7800 8280 +7800 8300 +7800 9680 +7800 9980 +7800 10000 +7800 10020 +7800 10040 +7800 12960 +7800 12980 +7800 13000 +7800 13020 +7800 13040 +7800 13060 +7800 13180 +7800 13200 +7800 13220 +7800 13240 +7800 13300 +7800 13320 +7800 13340 +7800 13600 +7800 13620 +7800 13640 +7800 13760 +7800 13920 +7800 13960 +7800 13980 +7800 14040 +7800 14060 +7800 14160 +7800 14180 +7800 14300 +7800 14400 +7800 14820 +7800 14840 +7800 14860 +7800 15120 +7800 15160 +7800 15220 +7820 -22720 +7820 -22700 +7820 -21740 +7820 -21720 +7820 -21700 +7820 -10780 +7820 -10760 +7820 -7640 +7820 -7620 +7820 -7600 +7820 -7140 +7820 -7120 +7820 -7040 +7820 -7020 +7820 -7000 +7820 -6980 +7820 -6960 +7820 -6940 +7820 -6920 +7820 -6900 +7820 -4460 +7820 -4440 +7820 -4420 +7820 -4400 +7820 -4380 +7820 -4360 +7820 -4340 +7820 2700 +7820 2720 +7820 2740 +7820 2780 +7820 2820 +7820 3020 +7820 7220 +7820 7240 +7820 8200 +7820 8220 +7820 8240 +7820 8280 +7820 8320 +7820 8340 +7820 8360 +7820 8380 +7820 8940 +7820 8960 +7820 9700 +7820 9980 +7820 10000 +7820 13020 +7820 13040 +7820 13060 +7820 13080 +7820 13100 +7820 13120 +7820 13180 +7820 13200 +7820 13220 +7820 13240 +7820 13260 +7820 13280 +7820 13300 +7820 13320 +7820 13580 +7820 13600 +7820 13620 +7820 13640 +7820 13780 +7820 13920 +7820 13940 +7820 13980 +7820 14000 +7820 14020 +7820 14080 +7820 14100 +7820 14140 +7820 14180 +7820 14200 +7820 14300 +7820 14380 +7820 14760 +7820 14780 +7820 14820 +7820 14840 +7820 15100 +7820 15120 +7820 15140 +7820 15160 +7820 15180 +7820 15640 +7820 22900 +7840 -24040 +7840 -22720 +7840 -22700 +7840 -21740 +7840 -21720 +7840 -10780 +7840 -10760 +7840 -7640 +7840 -7620 +7840 -7600 +7840 -7140 +7840 -7120 +7840 -7100 +7840 -7080 +7840 -7060 +7840 -6900 +7840 -6880 +7840 -6860 +7840 -6840 +7840 -4460 +7840 -4420 +7840 -4400 +7840 -4380 +7840 -4360 +7840 2680 +7840 2700 +7840 2720 +7840 2740 +7840 2760 +7840 2780 +7840 2800 +7840 2820 +7840 2920 +7840 3080 +7840 7220 +7840 7260 +7840 8180 +7840 8200 +7840 8220 +7840 8280 +7840 8300 +7840 8320 +7840 8340 +7840 8360 +7840 9700 +7840 9920 +7840 9940 +7840 9960 +7840 9980 +7840 13000 +7840 13020 +7840 13040 +7840 13060 +7840 13080 +7840 13100 +7840 13120 +7840 13140 +7840 13160 +7840 13180 +7840 13200 +7840 13220 +7840 13240 +7840 13260 +7840 13280 +7840 13300 +7840 13320 +7840 13620 +7840 13640 +7840 13660 +7840 13780 +7840 13900 +7840 13920 +7840 14000 +7840 14020 +7840 14040 +7840 14200 +7840 14220 +7840 14280 +7840 14360 +7840 14620 +7840 14740 +7840 14760 +7840 14780 +7840 14800 +7840 15100 +7840 15180 +7840 15460 +7840 15640 +7860 -24040 +7860 -21720 +7860 -21700 +7860 -10780 +7860 -10760 +7860 -7640 +7860 -7620 +7860 -7140 +7860 -7120 +7860 -6880 +7860 -6860 +7860 -6840 +7860 -4480 +7860 -4460 +7860 -4420 +7860 -4400 +7860 -4380 +7860 -4360 +7860 -4340 +7860 2680 +7860 2720 +7860 2760 +7860 2800 +7860 2820 +7860 3020 +7860 7160 +7860 7180 +7860 7200 +7860 7220 +7860 7240 +7860 7260 +7860 8200 +7860 8220 +7860 8940 +7860 8960 +7860 9020 +7860 9060 +7860 9120 +7860 9140 +7860 9180 +7860 9200 +7860 9900 +7860 9920 +7860 9940 +7860 9960 +7860 9980 +7860 13020 +7860 13040 +7860 13060 +7860 13080 +7860 13120 +7860 13300 +7860 13620 +7860 13640 +7860 13660 +7860 13900 +7860 13920 +7860 13940 +7860 14000 +7860 14080 +7860 14280 +7860 14300 +7860 14320 +7860 14360 +7860 14540 +7860 14560 +7860 14760 +7860 14780 +7860 14820 +7860 14840 +7860 15120 +7860 15160 +7860 15200 +7860 15600 +7880 -24000 +7880 -21720 +7880 -21700 +7880 -10780 +7880 -10760 +7880 -7640 +7880 -7620 +7880 -7600 +7880 -7140 +7880 -7120 +7880 -6880 +7880 -6860 +7880 -6840 +7880 -6820 +7880 -6800 +7880 -4460 +7880 -4400 +7880 -4380 +7880 -4360 +7880 -4340 +7880 2680 +7880 3020 +7880 7180 +7880 7200 +7880 7220 +7880 7260 +7880 8180 +7880 8220 +7880 9020 +7880 9040 +7880 9060 +7880 9080 +7880 9100 +7880 9120 +7880 9140 +7880 9160 +7880 9180 +7880 9200 +7880 9240 +7880 9260 +7880 9860 +7880 9880 +7880 9900 +7880 13620 +7880 13640 +7880 13980 +7880 14000 +7880 14100 +7880 14220 +7880 14240 +7880 14260 +7880 14280 +7880 14320 +7880 14340 +7880 14360 +7880 14380 +7880 14620 +7880 14820 +7880 14840 +7880 14880 +7880 15120 +7880 15140 +7880 15180 +7880 15200 +7880 15220 +7880 15260 +7880 15460 +7880 15520 +7880 15540 +7880 15580 +7900 -23500 +7900 -21720 +7900 -21700 +7900 -10800 +7900 -10780 +7900 -10760 +7900 -7640 +7900 -7620 +7900 -7600 +7900 -6880 +7900 -6860 +7900 -6840 +7900 -6820 +7900 -4460 +7900 -4440 +7900 -4420 +7900 -4400 +7900 -4380 +7900 -4360 +7900 2680 +7900 3020 +7900 7160 +7900 7180 +7900 7200 +7900 7220 +7900 8180 +7900 8220 +7900 9020 +7900 9040 +7900 9060 +7900 9100 +7900 9120 +7900 9140 +7900 9160 +7900 9180 +7900 9200 +7900 9220 +7900 9240 +7900 9260 +7900 9900 +7900 13620 +7900 13640 +7900 13760 +7900 13820 +7900 13900 +7900 14000 +7900 14100 +7900 14240 +7900 14340 +7900 14360 +7900 14380 +7900 14820 +7900 14840 +7900 14860 +7900 15140 +7900 15220 +7900 15240 +7900 15260 +7900 15500 +7900 15520 +7900 15620 +7900 15860 +7900 15880 +7920 -24040 +7920 -21720 +7920 -10780 +7920 -10760 +7920 -7640 +7920 -7620 +7920 -7600 +7920 -6880 +7920 -6860 +7920 -6840 +7920 -6820 +7920 -6800 +7920 -4460 +7920 -4440 +7920 -4360 +7920 2680 +7920 3100 +7920 8140 +7920 8160 +7920 8180 +7920 8200 +7920 9900 +7920 13620 +7920 13640 +7920 13660 +7920 13700 +7920 13720 +7920 13820 +7920 13940 +7920 13980 +7920 14000 +7920 14020 +7920 14080 +7920 14200 +7920 14220 +7920 14260 +7920 14280 +7920 14480 +7920 14520 +7920 14760 +7920 15140 +7920 15200 +7920 15220 +7920 15240 +7920 15280 +7920 15460 +7920 15500 +7920 15760 +7920 15780 +7940 -24040 +7940 -21700 +7940 -10780 +7940 -10760 +7940 -7640 +7940 -7620 +7940 -7600 +7940 -6880 +7940 -6860 +7940 -6840 +7940 -6820 +7940 -4460 +7940 -4380 +7940 -4360 +7940 -4340 +7940 2680 +7940 8160 +7940 13620 +7940 13640 +7940 13760 +7940 13900 +7940 13920 +7940 13940 +7940 13980 +7940 14040 +7940 14060 +7940 14180 +7940 14200 +7940 14220 +7940 14240 +7940 14280 +7940 14480 +7940 14500 +7940 14520 +7940 14640 +7940 14760 +7940 14780 +7940 14800 +7940 14860 +7940 14880 +7940 15120 +7940 15140 +7940 15220 +7940 15260 +7940 15280 +7940 15300 +7940 15480 +7940 15600 +7940 15720 +7960 -10780 +7960 -10760 +7960 -7640 +7960 -7620 +7960 -7600 +7960 -6880 +7960 -6860 +7960 -6840 +7960 -6820 +7960 -4460 +7960 -4440 +7960 -4380 +7960 -4360 +7960 -4340 +7960 2680 +7960 9000 +7960 9160 +7960 9180 +7960 13620 +7960 13660 +7960 13700 +7960 13720 +7960 13740 +7960 13760 +7960 13880 +7960 13900 +7960 13920 +7960 14040 +7960 14080 +7960 14160 +7960 14180 +7960 14220 +7960 14280 +7960 14300 +7960 14380 +7960 14500 +7960 14520 +7960 14540 +7960 14560 +7960 14620 +7960 14760 +7960 14860 +7960 14880 +7960 15120 +7960 15140 +7960 15280 +7960 15300 +7960 15460 +7960 15520 +7960 15560 +7960 15580 +7960 15640 +7960 15700 +7960 15720 +7960 15780 +7960 15800 +7960 15840 +7960 16020 +7980 -24060 +7980 -24040 +7980 -10800 +7980 -10780 +7980 -10760 +7980 -7640 +7980 -7620 +7980 -7600 +7980 -6880 +7980 -6860 +7980 -6840 +7980 -6820 +7980 -6800 +7980 -4460 +7980 -4440 +7980 -4400 +7980 -4380 +7980 -4360 +7980 2680 +7980 8980 +7980 9000 +7980 9120 +7980 9140 +7980 13620 +7980 13640 +7980 13660 +7980 13720 +7980 13740 +7980 13760 +7980 13920 +7980 13960 +7980 13980 +7980 14060 +7980 14080 +7980 14100 +7980 14180 +7980 14280 +7980 14320 +7980 14500 +7980 14560 +7980 14620 +7980 14640 +7980 14760 +7980 14800 +7980 14820 +7980 14840 +7980 14880 +7980 15120 +7980 15140 +7980 15520 +7980 15560 +7980 15580 +7980 15680 +7980 15700 +7980 15780 +7980 15840 +8000 -24040 +8000 -20740 +8000 -20720 +8000 -10800 +8000 -10780 +8000 -10760 +8000 -7640 +8000 -7620 +8000 -7600 +8000 -6880 +8000 -6860 +8000 -6840 +8000 -6820 +8000 -4460 +8000 -4400 +8000 -4380 +8000 -4360 +8000 2680 +8000 3100 +8000 9000 +8000 9120 +8000 9160 +8000 9180 +8000 13600 +8000 13620 +8000 13640 +8000 13660 +8000 13680 +8000 13700 +8000 13740 +8000 13760 +8000 13780 +8000 13860 +8000 13900 +8000 13920 +8000 13940 +8000 13960 +8000 13980 +8000 14100 +8000 14180 +8000 14200 +8000 14280 +8000 14320 +8000 14480 +8000 14500 +8000 14540 +8000 14560 +8000 14580 +8000 14620 +8000 14640 +8000 14780 +8000 14800 +8000 14840 +8000 14880 +8000 15120 +8000 15140 +8000 15440 +8000 15520 +8000 15540 +8000 15560 +8000 15580 +8000 15660 +8000 15700 +8000 15820 +8000 15940 +8000 16060 +8020 -24060 +8020 -23300 +8020 -23280 +8020 -23240 +8020 -23220 +8020 -23200 +8020 -23180 +8020 -23160 +8020 -20740 +8020 -20720 +8020 -17820 +8020 -10780 +8020 -10760 +8020 -7640 +8020 -7620 +8020 -7600 +8020 -6880 +8020 -6860 +8020 -6840 +8020 -4480 +8020 -4460 +8020 -4440 +8020 -4400 +8020 -4380 +8020 -4360 +8020 -4340 +8020 2680 +8020 8980 +8020 9000 +8020 9120 +8020 9140 +8020 9160 +8020 13620 +8020 13640 +8020 13660 +8020 13680 +8020 13720 +8020 13740 +8020 13800 +8020 13880 +8020 13900 +8020 13920 +8020 13940 +8020 14020 +8020 14040 +8020 14060 +8020 14080 +8020 14160 +8020 14180 +8020 14200 +8020 14280 +8020 14320 +8020 14340 +8020 14360 +8020 14480 +8020 14500 +8020 14520 +8020 14580 +8020 14600 +8020 14620 +8020 14700 +8020 14740 +8020 14760 +8020 14780 +8020 14800 +8020 14820 +8020 14840 +8020 14880 +8020 15120 +8020 15140 +8020 15300 +8020 15320 +8020 15340 +8020 15380 +8020 15400 +8020 15420 +8020 15440 +8020 15460 +8020 15560 +8020 15680 +8020 15700 +8020 15760 +8020 15840 +8040 -23440 +8040 -23400 +8040 -23380 +8040 -23360 +8040 -23340 +8040 -23320 +8040 -23300 +8040 -23280 +8040 -23260 +8040 -23240 +8040 -23220 +8040 -23200 +8040 -23160 +8040 -23140 +8040 -23120 +8040 -20740 +8040 -20720 +8040 -20700 +8040 -17800 +8040 -17780 +8040 -10800 +8040 -10780 +8040 -10760 +8040 -7640 +8040 -7620 +8040 -7600 +8040 -7580 +8040 -6880 +8040 -6860 +8040 -4460 +8040 -4400 +8040 -4380 +8040 -4360 +8040 2680 +8040 9120 +8040 13620 +8040 13640 +8040 13660 +8040 13680 +8040 13700 +8040 13720 +8040 13760 +8040 13780 +8040 13800 +8040 13820 +8040 13840 +8040 13860 +8040 13880 +8040 13900 +8040 13920 +8040 14020 +8040 14040 +8040 14060 +8040 14080 +8040 14120 +8040 14140 +8040 14180 +8040 14200 +8040 14280 +8040 14300 +8040 14320 +8040 14340 +8040 14440 +8040 14480 +8040 14500 +8040 14520 +8040 14540 +8040 14560 +8040 14580 +8040 14600 +8040 14620 +8040 14640 +8040 14680 +8040 14760 +8040 14780 +8040 14840 +8040 14860 +8040 14880 +8040 15120 +8040 15140 +8040 15320 +8040 15340 +8040 15360 +8040 15380 +8040 15400 +8040 15420 +8040 15440 +8040 15560 +8040 15580 +8040 15600 +8040 15700 +8040 15840 +8040 15960 +8060 -24040 +8060 -23500 +8060 -23460 +8060 -23440 +8060 -23420 +8060 -23400 +8060 -23380 +8060 -23360 +8060 -23340 +8060 -23320 +8060 -23280 +8060 -23240 +8060 -23200 +8060 -23140 +8060 -23120 +8060 -17780 +8060 -12360 +8060 -12340 +8060 -12320 +8060 -12300 +8060 -10800 +8060 -10780 +8060 -10760 +8060 -7640 +8060 -7620 +8060 -7600 +8060 -7580 +8060 -6880 +8060 -6860 +8060 -4460 +8060 -4400 +8060 -4380 +8060 -4360 +8060 2680 +8060 3320 +8060 3340 +8060 9140 +8060 9160 +8060 13600 +8060 13620 +8060 13660 +8060 13680 +8060 13700 +8060 13720 +8060 13740 +8060 13800 +8060 13820 +8060 13840 +8060 13860 +8060 13880 +8060 13900 +8060 13920 +8060 13940 +8060 14060 +8060 14080 +8060 14100 +8060 14120 +8060 14140 +8060 14160 +8060 14180 +8060 14200 +8060 14300 +8060 14320 +8060 14340 +8060 14360 +8060 14380 +8060 14460 +8060 14480 +8060 14500 +8060 14520 +8060 14540 +8060 14560 +8060 14580 +8060 14600 +8060 14640 +8060 14680 +8060 14700 +8060 14720 +8060 14740 +8060 14760 +8060 14780 +8060 14840 +8060 14860 +8060 14880 +8060 15120 +8060 15140 +8060 15360 +8060 15380 +8060 15400 +8060 15600 +8060 15740 +8080 -24060 +8080 -24040 +8080 -23560 +8080 -23520 +8080 -23500 +8080 -23480 +8080 -23460 +8080 -23440 +8080 -23420 +8080 -23180 +8080 -20740 +8080 -20680 +8080 -20660 +8080 -20640 +8080 -20620 +8080 -20600 +8080 -20580 +8080 -20560 +8080 -20540 +8080 -20500 +8080 -12440 +8080 -10800 +8080 -10780 +8080 -10760 +8080 -7620 +8080 -7600 +8080 -7580 +8080 -6880 +8080 -6860 +8080 -6840 +8080 -4460 +8080 -4440 +8080 -4400 +8080 -4360 +8080 -4340 +8080 2680 +8080 3040 +8080 3100 +8080 3120 +8080 3340 +8080 13620 +8080 13640 +8080 13660 +8080 13680 +8080 13700 +8080 13720 +8080 13820 +8080 13840 +8080 13860 +8080 13900 +8080 14080 +8080 14120 +8080 14140 +8080 14160 +8080 14180 +8080 14200 +8080 14340 +8080 14360 +8080 14380 +8080 14440 +8080 14460 +8080 14480 +8080 14500 +8080 14580 +8080 14600 +8080 14620 +8080 14640 +8080 14660 +8080 14680 +8080 14700 +8080 14720 +8080 14740 +8080 14840 +8080 14860 +8080 14880 +8080 15120 +8080 15140 +8080 15380 +8080 15400 +8100 -24040 +8100 -23560 +8100 -23540 +8100 -23520 +8100 -23500 +8100 -23480 +8100 -23440 +8100 -23420 +8100 -23400 +8100 -23340 +8100 -20740 +8100 -20660 +8100 -20540 +8100 -10800 +8100 -10780 +8100 -10760 +8100 -7620 +8100 -7600 +8100 -7580 +8100 -6880 +8100 -6860 +8100 -4460 +8100 -4440 +8100 -4400 +8100 -4380 +8100 -4360 +8100 -4340 +8100 2680 +8100 3360 +8100 13620 +8100 13660 +8100 13680 +8100 13700 +8100 13720 +8100 13840 +8100 13860 +8100 13880 +8100 13900 +8100 14060 +8100 14080 +8100 14100 +8100 14120 +8100 14140 +8100 14160 +8100 14180 +8100 14200 +8100 14320 +8100 14340 +8100 14380 +8100 14400 +8100 14420 +8100 14440 +8100 14460 +8100 14480 +8100 14580 +8100 14600 +8100 14620 +8100 14640 +8100 14660 +8100 14680 +8100 14700 +8100 14720 +8100 14740 +8100 14840 +8100 14860 +8100 14880 +8100 15120 +8100 15140 +8100 15400 +8120 -23600 +8120 -23580 +8120 -23420 +8120 -23120 +8120 -10800 +8120 -10780 +8120 -10760 +8120 -7640 +8120 -7620 +8120 -7600 +8120 -7580 +8120 -6880 +8120 -6860 +8120 -4480 +8120 -4460 +8120 -4400 +8120 -4380 +8120 -4360 +8120 2680 +8120 3140 +8120 3360 +8120 13880 +8120 14120 +8120 14140 +8120 14320 +8120 14340 +8120 14360 +8120 14380 +8120 14400 +8120 14420 +8120 14440 +8120 14460 +8120 14600 +8120 14640 +8120 14820 +8120 14840 +8120 14860 +8120 14880 +8120 14900 +8120 14920 +8120 14940 +8120 14960 +8120 14980 +8120 15000 +8120 15020 +8120 15060 +8120 15120 +8120 15140 +8120 15980 +8120 16000 +8140 -24060 +8140 -23140 +8140 -23100 +8140 -20740 +8140 -11320 +8140 -11080 +8140 -10800 +8140 -10780 +8140 -10760 +8140 -7620 +8140 -7600 +8140 -7580 +8140 -6920 +8140 -6900 +8140 -6860 +8140 -6840 +8140 -4480 +8140 -4460 +8140 -4440 +8140 -4400 +8140 -4360 +8140 -4340 +8140 2660 +8140 2680 +8140 2960 +8140 3080 +8140 3360 +8140 14320 +8140 14340 +8140 14360 +8140 14380 +8140 14400 +8140 14420 +8140 14440 +8140 14460 +8140 14820 +8140 14840 +8140 14860 +8140 14880 +8140 14900 +8140 14920 +8140 14940 +8140 14960 +8140 14980 +8140 15000 +8140 15020 +8140 15060 +8140 15080 +8140 15100 +8140 15120 +8140 15140 +8140 15800 +8160 -24060 +8160 -23320 +8160 -23120 +8160 -17820 +8160 -12180 +8160 -11060 +8160 -10800 +8160 -10780 +8160 -10760 +8160 -7620 +8160 -7600 +8160 -7580 +8160 -7220 +8160 -4480 +8160 -4460 +8160 -4400 +8160 -4360 +8160 2680 +8160 3100 +8160 3360 +8160 14340 +8160 14360 +8160 14400 +8160 14420 +8160 14440 +8160 14820 +8160 14840 +8160 14860 +8160 14880 +8160 14900 +8160 14920 +8160 14940 +8160 14960 +8160 14980 +8160 15000 +8160 15020 +8160 15040 +8160 15060 +8160 15080 +8160 15100 +8160 15120 +8160 15140 +8160 15800 +8160 15860 +8160 16020 +8180 -24060 +8180 -23400 +8180 -23120 +8180 -17820 +8180 -11060 +8180 -10780 +8180 -10760 +8180 -7620 +8180 -7600 +8180 -7580 +8180 -7300 +8180 -6880 +8180 -6840 +8180 -6680 +8180 -4480 +8180 -4460 +8180 -4420 +8180 -4360 +8180 -4340 +8180 2680 +8180 3340 +8180 14940 +8180 14960 +8180 14980 +8180 15000 +8180 15020 +8180 15040 +8180 15060 +8180 15080 +8180 15100 +8180 15120 +8180 15140 +8180 15160 +8180 15520 +8180 15540 +8180 15760 +8180 15780 +8180 15800 +8180 15840 +8180 15880 +8180 15900 +8200 -24040 +8200 -23320 +8200 -23100 +8200 -20740 +8200 -17780 +8200 -17540 +8200 -11240 +8200 -10800 +8200 -10780 +8200 -10760 +8200 -7640 +8200 -7620 +8200 -7600 +8200 -7580 +8200 -7560 +8200 -7180 +8200 -7080 +8200 -6940 +8200 -6920 +8200 -6900 +8200 -6880 +8200 -6860 +8200 -6840 +8200 -6820 +8200 -6800 +8200 -6780 +8200 -6760 +8200 -6740 +8200 -6720 +8200 -6700 +8200 -6680 +8200 -6660 +8200 -4480 +8200 -4460 +8200 -4360 +8200 -4340 +8200 2680 +8200 15540 +8200 15560 +8200 15740 +8200 15780 +8200 15840 +8200 15860 +8200 16020 +8220 -24060 +8220 -23160 +8220 -20740 +8220 -17780 +8220 -12280 +8220 -12200 +8220 -11140 +8220 -11120 +8220 -10980 +8220 -10800 +8220 -10780 +8220 -10760 +8220 -7640 +8220 -7620 +8220 -7600 +8220 -7580 +8220 -7560 +8220 -6780 +8220 -6720 +8220 -6680 +8220 -6660 +8220 -6640 +8220 -6620 +8220 -6600 +8220 -4480 +8220 -4460 +8220 -4360 +8220 -4340 +8220 2660 +8220 2680 +8220 3080 +8220 8940 +8220 9180 +8220 9200 +8220 9220 +8220 9240 +8220 9260 +8220 9280 +8220 15540 +8220 15580 +8220 15620 +8220 15640 +8220 15820 +8220 15840 +8240 -24060 +8240 -20740 +8240 -17800 +8240 -11060 +8240 -10800 +8240 -10780 +8240 -10760 +8240 -7640 +8240 -7620 +8240 -7600 +8240 -7580 +8240 -6680 +8240 -6660 +8240 -6640 +8240 -6620 +8240 -6600 +8240 -4480 +8240 -4460 +8240 -4360 +8240 -4340 +8240 2660 +8240 2680 +8240 3120 +8240 8920 +8240 8940 +8240 9060 +8240 9180 +8240 9200 +8240 9240 +8240 9260 +8240 11680 +8240 11700 +8240 15520 +8240 15540 +8240 15580 +8240 15600 +8240 15780 +8240 15800 +8240 15820 +8240 15840 +8240 15900 +8240 15920 +8240 16000 +8240 16320 +8240 16360 +8260 -24060 +8260 -20740 +8260 -10800 +8260 -10780 +8260 -10760 +8260 -7640 +8260 -7620 +8260 -7600 +8260 -7580 +8260 -7560 +8260 -6700 +8260 -6680 +8260 -6660 +8260 -6640 +8260 -6620 +8260 -4920 +8260 -4480 +8260 -4460 +8260 -4360 +8260 -4340 +8260 2680 +8260 3420 +8260 3460 +8260 3480 +8260 3500 +8260 8920 +8260 9080 +8260 9100 +8260 9180 +8260 9200 +8260 9220 +8260 9240 +8260 9260 +8260 9280 +8260 9300 +8260 11260 +8260 11280 +8260 11300 +8260 11320 +8260 11340 +8260 11360 +8260 11660 +8260 11680 +8260 11700 +8260 11720 +8260 11740 +8260 15520 +8260 15540 +8260 15560 +8260 15580 +8260 15760 +8260 15780 +8260 15840 +8260 15980 +8260 16000 +8260 16040 +8260 16320 +8260 16360 +8280 -23300 +8280 -23200 +8280 -20740 +8280 -12100 +8280 -10800 +8280 -10780 +8280 -10760 +8280 -7620 +8280 -7600 +8280 -7580 +8280 -7560 +8280 -6680 +8280 -6660 +8280 -6640 +8280 -5000 +8280 -4980 +8280 -4960 +8280 -4940 +8280 -4920 +8280 -4900 +8280 -4880 +8280 -4840 +8280 -4480 +8280 -4460 +8280 -4360 +8280 -4340 +8280 2680 +8280 3080 +8280 3100 +8280 3420 +8280 3520 +8280 8920 +8280 9100 +8280 9140 +8280 9200 +8280 9220 +8280 9240 +8280 9260 +8280 9280 +8280 9300 +8280 9320 +8280 9340 +8280 11260 +8280 11280 +8280 11300 +8280 11320 +8280 11340 +8280 11360 +8280 11380 +8280 11660 +8280 11680 +8280 11700 +8280 11720 +8280 11740 +8280 11760 +8280 15520 +8280 15540 +8280 15560 +8280 15580 +8280 15740 +8280 15760 +8280 15780 +8280 16000 +8280 16040 +8280 16080 +8280 16100 +8280 16240 +8280 16280 +8280 16300 +8280 16320 +8280 16360 +8300 -24060 +8300 -23380 +8300 -23340 +8300 -20740 +8300 -17800 +8300 -12120 +8300 -12100 +8300 -12080 +8300 -11980 +8300 -11120 +8300 -10980 +8300 -10800 +8300 -10780 +8300 -10760 +8300 -7640 +8300 -7620 +8300 -7600 +8300 -7580 +8300 -7560 +8300 -6680 +8300 -6660 +8300 -6640 +8300 -5000 +8300 -4980 +8300 -4960 +8300 -4940 +8300 -4920 +8300 -4900 +8300 -4880 +8300 -4860 +8300 -4840 +8300 -4820 +8300 -4800 +8300 -4780 +8300 -4760 +8300 -4740 +8300 -4460 +8300 -4360 +8300 2680 +8300 3080 +8300 3300 +8300 3320 +8300 3560 +8300 8920 +8300 9100 +8300 9140 +8300 9240 +8300 9260 +8300 9300 +8300 9320 +8300 9340 +8300 11260 +8300 11280 +8300 11300 +8300 11320 +8300 11340 +8300 11360 +8300 11380 +8300 11400 +8300 11660 +8300 11680 +8300 11700 +8300 11720 +8300 11740 +8300 15520 +8300 15540 +8300 15580 +8300 15740 +8300 15760 +8300 15780 +8300 15800 +8300 15820 +8300 15840 +8300 15860 +8300 15940 +8300 15980 +8300 16000 +8300 16060 +8300 16080 +8300 16100 +8300 16120 +8300 16140 +8300 16180 +8300 16240 +8300 16280 +8300 16300 +8300 16320 +8300 16340 +8300 16360 +8320 -24040 +8320 -23400 +8320 -23320 +8320 -12100 +8320 -12080 +8320 -12060 +8320 -12040 +8320 -10960 +8320 -10940 +8320 -10780 +8320 -10760 +8320 -10740 +8320 -7620 +8320 -7600 +8320 -7580 +8320 -6680 +8320 -6660 +8320 -5040 +8320 -5020 +8320 -5000 +8320 -4980 +8320 -4800 +8320 -4780 +8320 -4760 +8320 -4740 +8320 -4720 +8320 -4700 +8320 -4680 +8320 -4660 +8320 -4640 +8320 -4600 +8320 -4480 +8320 -4460 +8320 -4360 +8320 -4340 +8320 2660 +8320 2680 +8320 3100 +8320 8980 +8320 9260 +8320 9280 +8320 9300 +8320 9320 +8320 9340 +8320 11340 +8320 11360 +8320 11400 +8320 11700 +8320 15540 +8320 15560 +8320 15580 +8320 15600 +8320 15640 +8320 15680 +8320 15720 +8320 15740 +8320 15780 +8320 15800 +8320 15820 +8320 15840 +8320 15860 +8320 15920 +8320 15960 +8320 15980 +8320 16000 +8320 16080 +8320 16100 +8320 16120 +8320 16140 +8320 16160 +8320 16180 +8320 16200 +8320 16260 +8320 16280 +8320 16300 +8320 16320 +8320 16340 +8340 -24060 +8340 -20740 +8340 -12080 +8340 -12060 +8340 -10980 +8340 -10960 +8340 -10940 +8340 -10920 +8340 -10780 +8340 -10760 +8340 -10740 +8340 -7620 +8340 -7600 +8340 -7580 +8340 -7560 +8340 -6680 +8340 -6660 +8340 -6640 +8340 -5020 +8340 -5000 +8340 -4980 +8340 -4640 +8340 -4620 +8340 -4600 +8340 -4580 +8340 -4560 +8340 -4540 +8340 -4460 +8340 -4360 +8340 -4340 +8340 2660 +8340 2680 +8340 3340 +8340 3500 +8340 8940 +8340 9280 +8340 9300 +8340 9340 +8340 9360 +8340 15520 +8340 15540 +8340 15560 +8340 15580 +8340 15600 +8340 15620 +8340 15640 +8340 15660 +8340 15680 +8340 15700 +8340 15720 +8340 15740 +8340 15820 +8340 15840 +8340 15860 +8340 15880 +8340 15960 +8340 15980 +8340 16000 +8340 16080 +8340 16100 +8340 16120 +8340 16180 +8340 16200 +8340 16220 +8340 16260 +8340 16320 +8340 16340 +8340 16360 +8360 -24060 +8360 -20740 +8360 -12060 +8360 -12040 +8360 -10960 +8360 -10940 +8360 -10880 +8360 -10800 +8360 -10780 +8360 -10760 +8360 -10740 +8360 -7620 +8360 -7600 +8360 -7580 +8360 -7560 +8360 -7540 +8360 -6680 +8360 -6660 +8360 -6640 +8360 -5020 +8360 -5000 +8360 -4980 +8360 -4480 +8360 -4460 +8360 -4360 +8360 2680 +8360 3100 +8360 8920 +8360 9300 +8360 9320 +8360 9340 +8360 9360 +8360 15560 +8360 15580 +8360 15600 +8360 15620 +8360 15640 +8360 15660 +8360 15680 +8360 15700 +8360 15720 +8360 15820 +8360 15840 +8360 15860 +8360 15880 +8360 15940 +8360 15960 +8360 16080 +8360 16120 +8360 16140 +8360 16160 +8360 16180 +8360 16200 +8360 16220 +8360 16240 +8360 16300 +8360 16320 +8360 16340 +8360 16360 +8380 -23320 +8380 -23080 +8380 -23060 +8380 -23040 +8380 -20740 +8380 -12060 +8380 -12040 +8380 -12020 +8380 -12000 +8380 -11860 +8380 -11840 +8380 -11820 +8380 -11740 +8380 -10940 +8380 -10920 +8380 -10900 +8380 -10880 +8380 -10860 +8380 -10840 +8380 -10820 +8380 -10800 +8380 -10780 +8380 -10760 +8380 -10740 +8380 -7640 +8380 -7620 +8380 -7600 +8380 -7580 +8380 -7540 +8380 -6680 +8380 -6660 +8380 -5040 +8380 -5020 +8380 -5000 +8380 -4500 +8380 -4460 +8380 -4360 +8380 -4340 +8380 2680 +8380 3040 +8380 3100 +8380 8880 +8380 8900 +8380 8920 +8380 9320 +8380 9340 +8380 11660 +8380 11680 +8380 11700 +8380 11760 +8380 11780 +8380 15620 +8380 15640 +8380 15660 +8380 15680 +8380 15700 +8380 15860 +8380 15880 +8380 15900 +8380 15920 +8380 15940 +8380 15960 +8380 16120 +8380 16140 +8380 16160 +8380 16180 +8380 16320 +8380 16340 +8380 16360 +8400 -24060 +8400 -23480 +8400 -23300 +8400 -23280 +8400 -23200 +8400 -23080 +8400 -23060 +8400 -23040 +8400 -20740 +8400 -14940 +8400 -12040 +8400 -12020 +8400 -12000 +8400 -11860 +8400 -11820 +8400 -11780 +8400 -11760 +8400 -11740 +8400 -11720 +8400 -11700 +8400 -11680 +8400 -11640 +8400 -11600 +8400 -11580 +8400 -11560 +8400 -11540 +8400 -11520 +8400 -11500 +8400 -11480 +8400 -11460 +8400 -11440 +8400 -11400 +8400 -11380 +8400 -11360 +8400 -11300 +8400 -11280 +8400 -11160 +8400 -11140 +8400 -10980 +8400 -10960 +8400 -10940 +8400 -10920 +8400 -10900 +8400 -10880 +8400 -10860 +8400 -10840 +8400 -10820 +8400 -10800 +8400 -10780 +8400 -10760 +8400 -7620 +8400 -7600 +8400 -7580 +8400 -7560 +8400 -7540 +8400 -7520 +8400 -6680 +8400 -6660 +8400 -6640 +8400 -5040 +8400 -5020 +8400 -5000 +8400 -4480 +8400 -4360 +8400 -4340 +8400 2680 +8400 3100 +8400 8860 +8400 8880 +8400 9320 +8400 9340 +8400 11620 +8400 11640 +8400 11660 +8400 11680 +8400 11700 +8400 11720 +8400 11740 +8400 11760 +8400 11780 +8400 11800 +8400 15660 +8400 15880 +8400 15900 +8400 15920 +8400 15940 +8400 16320 +8400 16340 +8400 16360 +8420 -24060 +8420 -23280 +8420 -20740 +8420 -14940 +8420 -14840 +8420 -12040 +8420 -12020 +8420 -12000 +8420 -11840 +8420 -11820 +8420 -11780 +8420 -11760 +8420 -11740 +8420 -11720 +8420 -11700 +8420 -11680 +8420 -11660 +8420 -11640 +8420 -11620 +8420 -11600 +8420 -11580 +8420 -11560 +8420 -11540 +8420 -11520 +8420 -11500 +8420 -11480 +8420 -11460 +8420 -11440 +8420 -11420 +8420 -11400 +8420 -11380 +8420 -11360 +8420 -11340 +8420 -11320 +8420 -11300 +8420 -11280 +8420 -11260 +8420 -11240 +8420 -11220 +8420 -11200 +8420 -11180 +8420 -11160 +8420 -11140 +8420 -11100 +8420 -11080 +8420 -11060 +8420 -11040 +8420 -11020 +8420 -11000 +8420 -10980 +8420 -10960 +8420 -10940 +8420 -10920 +8420 -10900 +8420 -10880 +8420 -10860 +8420 -10840 +8420 -10820 +8420 -10800 +8420 -10780 +8420 -10760 +8420 -7640 +8420 -7620 +8420 -7600 +8420 -7580 +8420 -6700 +8420 -6680 +8420 -6660 +8420 -6640 +8420 -5040 +8420 -5020 +8420 -5000 +8420 -4360 +8420 -4340 +8420 2680 +8420 3100 +8420 8860 +8420 9300 +8420 9320 +8420 9340 +8420 9360 +8420 11220 +8420 11240 +8420 11260 +8420 11280 +8420 11300 +8420 11320 +8420 11340 +8420 11360 +8420 11380 +8420 11400 +8420 11420 +8420 11440 +8420 11460 +8420 11480 +8420 11500 +8420 11520 +8420 11540 +8420 11600 +8420 11640 +8420 11660 +8420 11680 +8420 11700 +8420 11720 +8420 11740 +8420 11760 +8420 11780 +8420 11800 +8420 11820 +8420 15940 +8420 16300 +8420 16320 +8420 16340 +8440 -23240 +8440 -23200 +8440 -20740 +8440 -20720 +8440 -14860 +8440 -14840 +8440 -14740 +8440 -12040 +8440 -12020 +8440 -12000 +8440 -11700 +8440 -11660 +8440 -11620 +8440 -11600 +8440 -11580 +8440 -11560 +8440 -11540 +8440 -11520 +8440 -11500 +8440 -11480 +8440 -11460 +8440 -11440 +8440 -11420 +8440 -11400 +8440 -11380 +8440 -11360 +8440 -11340 +8440 -11320 +8440 -11300 +8440 -11280 +8440 -11260 +8440 -11240 +8440 -11220 +8440 -11200 +8440 -11180 +8440 -11160 +8440 -11140 +8440 -11120 +8440 -11100 +8440 -11080 +8440 -11060 +8440 -11040 +8440 -11020 +8440 -11000 +8440 -10980 +8440 -10960 +8440 -10940 +8440 -10920 +8440 -10900 +8440 -7620 +8440 -7600 +8440 -7580 +8440 -7560 +8440 -6680 +8440 -6660 +8440 -5040 +8440 -5020 +8440 -5000 +8440 -4480 +8440 -4360 +8440 -4340 +8440 2680 +8440 3100 +8440 8860 +8440 9320 +8440 9340 +8440 11200 +8440 11220 +8440 11240 +8440 11260 +8440 11300 +8440 11320 +8440 11340 +8440 11360 +8440 11380 +8440 11400 +8440 11420 +8440 11440 +8440 11460 +8440 11480 +8440 11500 +8440 11520 +8440 11540 +8440 11560 +8440 11580 +8440 11600 +8440 11620 +8440 11640 +8440 11660 +8440 11680 +8440 11700 +8440 11720 +8440 11740 +8440 11760 +8440 11780 +8440 11800 +8440 11820 +8440 11840 +8440 16320 +8440 16360 +8460 -20740 +8460 -12020 +8460 -12000 +8460 -11980 +8460 -11320 +8460 -11220 +8460 -11180 +8460 -11160 +8460 -11140 +8460 -11120 +8460 -11100 +8460 -11080 +8460 -11060 +8460 -11040 +8460 -11020 +8460 -11000 +8460 -10980 +8460 -10960 +8460 -10940 +8460 -10920 +8460 -10900 +8460 -7620 +8460 -7600 +8460 -7580 +8460 -7560 +8460 -6680 +8460 -6660 +8460 -5040 +8460 -5020 +8460 -4360 +8460 -4340 +8460 2660 +8460 2680 +8460 3100 +8460 4940 +8460 4960 +8460 4980 +8460 5000 +8460 5060 +8460 5240 +8460 5420 +8460 5460 +8460 5500 +8460 9300 +8460 9320 +8460 9340 +8460 11240 +8460 11260 +8460 11280 +8460 11300 +8460 11320 +8460 11340 +8460 11360 +8460 11380 +8460 11400 +8460 11440 +8460 11500 +8460 11620 +8460 11760 +8460 11780 +8460 11800 +8460 11820 +8460 16300 +8460 16320 +8460 16340 +8460 16360 +8480 -24060 +8480 -21960 +8480 -12000 +8480 -11980 +8480 -11960 +8480 -7620 +8480 -7600 +8480 -7580 +8480 -6680 +8480 -6660 +8480 -5060 +8480 -5040 +8480 -5020 +8480 -4480 +8480 -4360 +8480 -4340 +8480 2680 +8480 3120 +8480 3540 +8480 3560 +8480 4960 +8480 4980 +8480 5000 +8480 5020 +8480 5040 +8480 5060 +8480 5080 +8480 5100 +8480 5120 +8480 5140 +8480 5160 +8480 5180 +8480 5200 +8480 5220 +8480 5240 +8480 5260 +8480 5280 +8480 5320 +8480 5360 +8480 5380 +8480 5420 +8480 5440 +8480 5460 +8480 5480 +8480 5500 +8480 5900 +8480 8860 +8480 9320 +8480 9340 +8480 11240 +8480 11340 +8480 11360 +8480 11380 +8480 11720 +8480 11740 +8480 11760 +8480 11780 +8480 11800 +8480 16300 +8480 16320 +8480 16340 +8480 16360 +8480 17240 +8480 17260 +8480 17280 +8480 17300 +8480 17320 +8480 17340 +8480 17360 +8480 17380 +8480 17400 +8480 17420 +8480 17440 +8480 17460 +8480 17480 +8480 17540 +8480 17600 +8480 17660 +8480 17680 +8480 17700 +8480 17720 +8480 17760 +8480 17780 +8480 17880 +8480 18400 +8500 -24060 +8500 -23200 +8500 -20740 +8500 -13520 +8500 -12000 +8500 -11980 +8500 -11960 +8500 -7620 +8500 -7600 +8500 -7580 +8500 -7560 +8500 -6680 +8500 -6660 +8500 -5060 +8500 -5040 +8500 -5020 +8500 -4360 +8500 -4340 +8500 2680 +8500 3120 +8500 3180 +8500 5020 +8500 5040 +8500 5060 +8500 5080 +8500 5100 +8500 5120 +8500 5140 +8500 5160 +8500 5180 +8500 5200 +8500 5220 +8500 5240 +8500 5260 +8500 5280 +8500 5300 +8500 5320 +8500 5340 +8500 5360 +8500 5380 +8500 5400 +8500 5420 +8500 5460 +8500 5480 +8500 5500 +8500 5860 +8500 5880 +8500 5900 +8500 8840 +8500 9300 +8500 9320 +8500 9340 +8500 9360 +8500 11320 +8500 11340 +8500 11380 +8500 11400 +8500 11740 +8500 11760 +8500 11780 +8500 11800 +8500 16300 +8500 16320 +8500 16340 +8500 17220 +8500 17280 +8500 17340 +8500 17380 +8500 17400 +8500 17440 +8500 17460 +8500 17480 +8500 17500 +8500 17520 +8500 17600 +8500 17620 +8500 17640 +8500 17660 +8500 17680 +8500 17700 +8500 17740 +8500 17780 +8500 17800 +8500 17820 +8500 17860 +8500 17880 +8500 17900 +8500 17920 +8500 17940 +8500 17960 +8500 17980 +8500 18020 +8500 18060 +8500 18080 +8500 18160 +8500 18200 +8500 18240 +8500 18260 +8500 18280 +8500 18300 +8500 18320 +8500 18340 +8500 18420 +8500 18560 +8500 18620 +8500 18660 +8500 18700 +8500 18720 +8500 18840 +8500 18860 +8500 19000 +8520 -24060 +8520 -23160 +8520 -20740 +8520 -13980 +8520 -13900 +8520 -12000 +8520 -11980 +8520 -11960 +8520 -7640 +8520 -7620 +8520 -7600 +8520 -7580 +8520 -7560 +8520 -6700 +8520 -6680 +8520 -6660 +8520 -5060 +8520 -5040 +8520 -5020 +8520 -4480 +8520 -4360 +8520 -4340 +8520 2680 +8520 3480 +8520 3560 +8520 3580 +8520 3600 +8520 4960 +8520 5120 +8520 5140 +8520 5160 +8520 5180 +8520 5220 +8520 5260 +8520 5320 +8520 5340 +8520 5920 +8520 9300 +8520 9320 +8520 9340 +8520 9360 +8520 11320 +8520 11340 +8520 16300 +8520 16320 +8520 16340 +8520 18020 +8520 18080 +8520 18100 +8520 18120 +8520 18420 +8520 18440 +8520 18460 +8520 18480 +8520 18500 +8520 18560 +8520 18580 +8520 18680 +8520 18700 +8520 18860 +8520 18880 +8520 18900 +8520 18920 +8520 19000 +8520 19020 +8540 -23180 +8540 -13900 +8540 -13560 +8540 -13540 +8540 -11980 +8540 -11960 +8540 -7640 +8540 -7620 +8540 -7600 +8540 -7580 +8540 -7560 +8540 -6680 +8540 -6660 +8540 -5060 +8540 -5040 +8540 -5020 +8540 -4480 +8540 -4360 +8540 -4340 +8540 2680 +8540 3120 +8540 3340 +8540 3460 +8540 3480 +8540 3540 +8540 4960 +8540 5180 +8540 5220 +8540 5260 +8540 5300 +8540 5360 +8540 5380 +8540 5440 +8540 5460 +8540 5880 +8540 5920 +8540 5940 +8540 9040 +8540 9080 +8540 9180 +8540 9200 +8540 9300 +8540 9320 +8540 9340 +8540 11320 +8540 11340 +8540 16300 +8540 16320 +8540 16340 +8540 16360 +8540 18440 +8540 18880 +8540 18900 +8540 19000 +8560 -21960 +8560 -20740 +8560 -13540 +8560 -11960 +8560 -11940 +8560 -11920 +8560 -7620 +8560 -7600 +8560 -7580 +8560 -7560 +8560 -7540 +8560 -6700 +8560 -6680 +8560 -5060 +8560 -5040 +8560 -4360 +8560 -4340 +8560 -3300 +8560 -3280 +8560 -3260 +8560 -3240 +8560 -3220 +8560 -3200 +8560 -3180 +8560 2680 +8560 2700 +8560 3260 +8560 3340 +8560 3420 +8560 3520 +8560 3540 +8560 5400 +8560 5440 +8560 5460 +8560 5480 +8560 5860 +8560 5900 +8560 8840 +8560 9040 +8560 9100 +8560 9140 +8560 9160 +8560 9300 +8560 9320 +8560 9340 +8560 11320 +8560 11340 +8560 16300 +8560 16320 +8560 16340 +8560 16360 +8560 16380 +8560 16400 +8560 16420 +8560 16440 +8560 16460 +8560 16480 +8560 16500 +8560 16520 +8560 16540 +8560 16560 +8560 16580 +8560 16600 +8560 16620 +8560 16640 +8560 16680 +8560 16900 +8560 19000 +8580 -24060 +8580 -21960 +8580 -20740 +8580 -11960 +8580 -11940 +8580 -11920 +8580 -11900 +8580 -7640 +8580 -7620 +8580 -7600 +8580 -7580 +8580 -6680 +8580 -5060 +8580 -5040 +8580 -4480 +8580 -4360 +8580 -4340 +8580 -3320 +8580 -3300 +8580 -3280 +8580 -3260 +8580 -3240 +8580 -3220 +8580 -3200 +8580 -3180 +8580 2680 +8580 3120 +8580 3160 +8580 3400 +8580 5380 +8580 5820 +8580 5860 +8580 8840 +8580 9320 +8580 9340 +8580 9360 +8580 11320 +8580 11340 +8580 16340 +8580 16360 +8580 16380 +8580 16400 +8580 16420 +8580 16440 +8580 16460 +8580 16480 +8580 16500 +8580 16520 +8580 16540 +8580 16560 +8580 16580 +8580 16600 +8580 16620 +8580 16640 +8580 16660 +8580 16680 +8580 16700 +8580 16720 +8580 16740 +8580 16760 +8580 16780 +8580 16800 +8580 16820 +8580 16840 +8580 16860 +8580 16880 +8580 16900 +8580 16920 +8580 16940 +8580 16960 +8580 16980 +8580 17000 +8580 18980 +8580 19000 +8580 19020 +8600 -20740 +8600 -11940 +8600 -11920 +8600 -11900 +8600 -7640 +8600 -7620 +8600 -7600 +8600 -7580 +8600 -7200 +8600 -7180 +8600 -7160 +8600 -7140 +8600 -7120 +8600 -7100 +8600 -7080 +8600 -7060 +8600 -7040 +8600 -7020 +8600 -7000 +8600 -6980 +8600 -6960 +8600 -6940 +8600 -6920 +8600 -6900 +8600 -6880 +8600 -6860 +8600 -6840 +8600 -6820 +8600 -6800 +8600 -6780 +8600 -6740 +8600 -6700 +8600 -6680 +8600 -6660 +8600 -5080 +8600 -5060 +8600 -5040 +8600 -4480 +8600 -4360 +8600 -4340 +8600 -3340 +8600 -3320 +8600 -3300 +8600 -3200 +8600 -3180 +8600 2680 +8600 3100 +8600 3320 +8600 3400 +8600 5400 +8600 5480 +8600 5500 +8600 5820 +8600 5860 +8600 8840 +8600 8860 +8600 9300 +8600 9320 +8600 9340 +8600 11320 +8600 11340 +8600 16340 +8600 16400 +8600 16420 +8600 16540 +8600 16780 +8600 16800 +8600 16820 +8600 16840 +8600 16860 +8600 16900 +8600 16920 +8600 16940 +8600 16960 +8600 16980 +8600 19000 +8600 19020 +8600 19040 +8620 -24060 +8620 -11940 +8620 -11920 +8620 -11900 +8620 -7640 +8620 -7620 +8620 -7600 +8620 -7200 +8620 -7020 +8620 -7000 +8620 -6920 +8620 -6880 +8620 -6860 +8620 -6840 +8620 -6820 +8620 -6800 +8620 -6780 +8620 -6760 +8620 -6740 +8620 -6720 +8620 -6700 +8620 -5080 +8620 -5060 +8620 -5040 +8620 -4360 +8620 -4340 +8620 -3180 +8620 -3160 +8620 -3140 +8620 2680 +8620 3140 +8620 3460 +8620 3480 +8620 5040 +8620 5380 +8620 5420 +8620 5460 +8620 9300 +8620 9320 +8620 9340 +8620 11320 +8620 11340 +8620 16520 +8620 19000 +8620 19020 +8620 19040 +8640 -20740 +8640 -20720 +8640 -11940 +8640 -11920 +8640 -11900 +8640 -7640 +8640 -7620 +8640 -7600 +8640 -7200 +8640 -5080 +8640 -5060 +8640 -5040 +8640 -4480 +8640 -4360 +8640 -4340 +8640 -3160 +8640 -3140 +8640 2680 +8640 3140 +8640 3300 +8640 3460 +8640 5020 +8640 5440 +8640 8860 +8640 9300 +8640 9320 +8640 9340 +8640 9360 +8640 11320 +8640 11340 +8640 11360 +8640 19020 +8640 19040 +8660 -24060 +8660 -21960 +8660 -20740 +8660 -20720 +8660 -11960 +8660 -11940 +8660 -11920 +8660 -11900 +8660 -7640 +8660 -7620 +8660 -7600 +8660 -7200 +8660 -5100 +8660 -5080 +8660 -5060 +8660 -5040 +8660 -4480 +8660 -4460 +8660 -4360 +8660 -4340 +8660 -3160 +8660 2680 +8660 2980 +8660 5420 +8660 5440 +8660 8860 +8660 9300 +8660 9320 +8660 9340 +8660 11320 +8660 11340 +8660 11520 +8660 19020 +8660 19040 +8680 -20740 +8680 -12000 +8680 -11980 +8680 -11960 +8680 -11940 +8680 -7620 +8680 -7600 +8680 -7200 +8680 -5080 +8680 -5060 +8680 -5040 +8680 -4480 +8680 -4460 +8680 -4360 +8680 -4340 +8680 -3140 +8680 2680 +8680 3320 +8680 5020 +8680 5400 +8680 5420 +8680 5440 +8680 8840 +8680 8860 +8680 9300 +8680 9320 +8680 11320 +8680 11340 +8680 11540 +8680 19020 +8680 19040 +8700 -24080 +8700 -20740 +8700 -12020 +8700 -12000 +8700 -11980 +8700 -11960 +8700 -7640 +8700 -7620 +8700 -7600 +8700 -7200 +8700 -5080 +8700 -5060 +8700 -5040 +8700 -4480 +8700 -4460 +8700 -4360 +8700 -4340 +8700 -3160 +8700 2680 +8700 3140 +8700 3340 +8700 3360 +8700 3440 +8700 5400 +8700 5440 +8700 8860 +8700 9320 +8700 9340 +8700 11340 +8700 11360 +8700 11540 +8700 11560 +8700 19020 +8700 19040 +8720 -24060 +8720 -12060 +8720 -12040 +8720 -12020 +8720 -12000 +8720 -7620 +8720 -7600 +8720 -7200 +8720 -5080 +8720 -5060 +8720 -4480 +8720 -4460 +8720 -4360 +8720 -4340 +8720 2680 +8720 3460 +8720 3480 +8720 5440 +8720 8880 +8720 8900 +8720 9300 +8720 9320 +8720 9340 +8720 11320 +8720 11340 +8720 11420 +8720 11440 +8720 11560 +8720 19020 +8720 19040 +8740 -24060 +8740 -21840 +8740 -21800 +8740 -20740 +8740 -12100 +8740 -12080 +8740 -12060 +8740 -12040 +8740 -7640 +8740 -7620 +8740 -7600 +8740 -7200 +8740 -5100 +8740 -5080 +8740 -4480 +8740 -4460 +8740 -4360 +8740 -4340 +8740 2680 +8740 2700 +8740 3260 +8740 5040 +8740 5380 +8740 5400 +8740 5420 +8740 5440 +8740 9320 +8740 9340 +8740 11340 +8740 11420 +8740 11560 +8740 19020 +8740 19040 +8760 -24080 +8760 -21960 +8760 -21900 +8760 -21840 +8760 -21800 +8760 -21780 +8760 -21760 +8760 -12820 +8760 -12120 +8760 -12100 +8760 -12080 +8760 -12060 +8760 -7620 +8760 -7600 +8760 -7220 +8760 -7200 +8760 -5080 +8760 -4480 +8760 -4460 +8760 -4360 +8760 -4340 +8760 2680 +8760 5380 +8760 5400 +8760 5420 +8760 5460 +8760 8860 +8760 8880 +8760 9300 +8760 9320 +8760 9340 +8760 11340 +8760 11420 +8760 11560 +8760 11580 +8760 19000 +8760 19020 +8760 19040 +8760 22860 +8780 -21900 +8780 -21760 +8780 -21740 +8780 -14260 +8780 -12160 +8780 -12140 +8780 -12120 +8780 -12100 +8780 -7620 +8780 -7600 +8780 -7220 +8780 -7200 +8780 -5100 +8780 -5080 +8780 -5060 +8780 -5040 +8780 -4980 +8780 -4480 +8780 -4460 +8780 -4360 +8780 -4340 +8780 5400 +8780 5420 +8780 8860 +8780 8880 +8780 8900 +8780 9300 +8780 9320 +8780 9340 +8780 9360 +8780 11340 +8780 19000 +8780 19020 +8780 19040 +8800 -14260 +8800 -12180 +8800 -12160 +8800 -12140 +8800 -12120 +8800 -7620 +8800 -7600 +8800 -7200 +8800 -5080 +8800 -5060 +8800 -5040 +8800 -5020 +8800 -5000 +8800 -4980 +8800 -4960 +8800 -4940 +8800 -4900 +8800 -4480 +8800 -4460 +8800 -4360 +8800 -4340 +8800 3360 +8800 3400 +8800 5420 +8800 8880 +8800 9120 +8800 9300 +8800 9320 +8800 9340 +8800 9360 +8800 11340 +8800 11360 +8800 19020 +8800 19040 +8820 -24080 +8820 -12220 +8820 -12200 +8820 -12180 +8820 -12160 +8820 -7640 +8820 -7620 +8820 -7600 +8820 -7200 +8820 -5020 +8820 -5000 +8820 -4980 +8820 -4960 +8820 -4940 +8820 -4920 +8820 -4900 +8820 -4880 +8820 -4860 +8820 -4840 +8820 -4820 +8820 -4580 +8820 -4560 +8820 -4480 +8820 -4460 +8820 -4360 +8820 -4340 +8820 3260 +8820 3340 +8820 3440 +8820 3460 +8820 3500 +8820 5440 +8820 8860 +8820 8880 +8820 9300 +8820 9320 +8820 9340 +8820 9360 +8820 11340 +8820 11420 +8820 11460 +8820 19020 +8820 19040 +8840 -24080 +8840 -24060 +8840 -14220 +8840 -12700 +8840 -12240 +8840 -12220 +8840 -12200 +8840 -12180 +8840 -7620 +8840 -7600 +8840 -7200 +8840 -5040 +8840 -5000 +8840 -4980 +8840 -4960 +8840 -4940 +8840 -4920 +8840 -4900 +8840 -4880 +8840 -4860 +8840 -4840 +8840 -4820 +8840 -4800 +8840 -4780 +8840 -4760 +8840 -4740 +8840 -4720 +8840 -4700 +8840 -4600 +8840 -4580 +8840 -4560 +8840 -4540 +8840 -4480 +8840 -4460 +8840 -4360 +8840 -4340 +8840 2840 +8840 3380 +8840 3420 +8840 3480 +8840 5060 +8840 8860 +8840 9260 +8840 9300 +8840 9320 +8840 11340 +8840 11420 +8840 19020 +8840 19040 +8860 -24060 +8860 -12700 +8860 -12260 +8860 -12240 +8860 -12220 +8860 -7640 +8860 -7620 +8860 -7600 +8860 -7200 +8860 -6420 +8860 -6360 +8860 -5040 +8860 -4940 +8860 -4880 +8860 -4800 +8860 -4780 +8860 -4760 +8860 -4740 +8860 -4720 +8860 -4700 +8860 -4680 +8860 -4660 +8860 -4640 +8860 -4620 +8860 -4600 +8860 -4580 +8860 -4560 +8860 -4480 +8860 -4460 +8860 -4360 +8860 -4340 +8860 2860 +8860 3260 +8860 3420 +8860 5380 +8860 5420 +8860 8860 +8860 9300 +8860 9340 +8860 11340 +8860 11420 +8860 11460 +8860 19020 +8880 -21720 +8880 -16340 +8880 -14100 +8880 -7640 +8880 -7620 +8880 -7600 +8880 -7200 +8880 -6440 +8880 -6420 +8880 -6400 +8880 -6380 +8880 -6360 +8880 -6340 +8880 -6320 +8880 -6300 +8880 -4660 +8880 -4640 +8880 -4620 +8880 -4600 +8880 -4480 +8880 -4460 +8880 -4360 +8880 -4340 +8880 2720 +8880 2740 +8880 2760 +8880 2800 +8880 2860 +8880 3380 +8880 3440 +8880 3460 +8880 3500 +8880 5040 +8880 5420 +8880 8880 +8880 8900 +8880 11340 +8880 19000 +8880 19020 +8900 -21720 +8900 -13920 +8900 -7640 +8900 -7620 +8900 -7600 +8900 -7220 +8900 -7200 +8900 -6420 +8900 -6360 +8900 -6340 +8900 -6320 +8900 -6300 +8900 -4620 +8900 -4480 +8900 -4460 +8900 -4360 +8900 -4340 +8900 2720 +8900 2740 +8900 2780 +8900 2800 +8900 2820 +8900 2840 +8900 2860 +8900 3160 +8900 3420 +8900 3460 +8900 3540 +8900 5020 +8900 5420 +8900 5440 +8900 6260 +8900 6280 +8900 6300 +8900 8860 +8900 9140 +8900 11320 +8900 11340 +8900 18980 +8900 19000 +8900 19020 +8900 19040 +8920 -24080 +8920 -24060 +8920 -24020 +8920 -23980 +8920 -21840 +8920 -13900 +8920 -7640 +8920 -7620 +8920 -7600 +8920 -7220 +8920 -7200 +8920 -6340 +8920 -6320 +8920 -6300 +8920 -6280 +8920 -6260 +8920 -6240 +8920 -4480 +8920 -4460 +8920 -4360 +8920 -4340 +8920 2720 +8920 2740 +8920 3400 +8920 3480 +8920 3500 +8920 3520 +8920 3620 +8920 3640 +8920 5440 +8920 6180 +8920 6200 +8920 6220 +8920 6240 +8920 6280 +8920 6300 +8920 6320 +8920 6340 +8920 6360 +8920 6380 +8920 6400 +8920 9120 +8920 11320 +8920 11340 +8920 19000 +8920 19020 +8940 -24040 +8940 -16340 +8940 -13900 +8940 -7640 +8940 -7620 +8940 -7600 +8940 -7220 +8940 -7200 +8940 -6340 +8940 -6320 +8940 -6300 +8940 -6280 +8940 -6260 +8940 -6240 +8940 -4480 +8940 -4460 +8940 -4360 +8940 2720 +8940 2740 +8940 3520 +8940 3560 +8940 6180 +8940 6240 +8940 6280 +8940 6300 +8940 6320 +8940 6340 +8940 6360 +8940 6400 +8940 9120 +8940 11320 +8940 11340 +8940 19000 +8940 19020 +8940 19040 +8960 -16340 +8960 -13920 +8960 -13900 +8960 -7640 +8960 -7620 +8960 -7600 +8960 -7200 +8960 -6320 +8960 -6300 +8960 -6280 +8960 -6260 +8960 -6220 +8960 -6200 +8960 -6180 +8960 -6160 +8960 -6140 +8960 -4480 +8960 -4460 +8960 -4380 +8960 -4360 +8960 -4340 +8960 2720 +8960 2740 +8960 3300 +8960 3440 +8960 3560 +8960 3580 +8960 5720 +8960 6180 +8960 6200 +8960 9140 +8960 11320 +8960 11340 +8960 19000 +8960 19020 +8960 19040 +8980 -13920 +8980 -7640 +8980 -7620 +8980 -7600 +8980 -7220 +8980 -7200 +8980 -6240 +8980 -6220 +8980 -6200 +8980 -6180 +8980 -6160 +8980 -6140 +8980 -4480 +8980 -4460 +8980 -4420 +8980 -4380 +8980 -4340 +8980 2720 +8980 2740 +8980 3180 +8980 3480 +8980 3580 +8980 5740 +8980 5780 +8980 9080 +8980 11320 +8980 11340 +8980 19020 +8980 19040 +9000 -16340 +9000 -13940 +9000 -13920 +9000 -7640 +9000 -7620 +9000 -7600 +9000 -7220 +9000 -7200 +9000 -6240 +9000 -6200 +9000 -6160 +9000 -6140 +9000 -4480 +9000 -4460 +9000 -4440 +9000 -4360 +9000 2720 +9000 2740 +9000 3660 +9000 5400 +9000 5420 +9000 5740 +9000 5760 +9000 5780 +9000 9060 +9000 11340 +9000 11360 +9000 19000 +9000 19020 +9000 19040 +9020 -21860 +9020 -13940 +9020 -7620 +9020 -7600 +9020 -7220 +9020 -7200 +9020 -6320 +9020 -6300 +9020 -6180 +9020 -6160 +9020 -4480 +9020 -4460 +9020 -4440 +9020 -4420 +9020 -4400 +9020 -4380 +9020 -4360 +9020 -4340 +9020 2720 +9020 2740 +9020 3380 +9020 3480 +9020 3520 +9020 3560 +9020 5560 +9020 5580 +9020 5600 +9020 5640 +9020 5680 +9020 5720 +9020 5740 +9020 5760 +9020 5780 +9020 6040 +9020 6100 +9020 6120 +9020 6140 +9020 6160 +9020 6200 +9020 11320 +9020 11340 +9020 11420 +9020 11440 +9020 13660 +9020 13680 +9020 13700 +9020 13720 +9020 13740 +9020 13760 +9020 19000 +9020 19020 +9020 19040 +9040 -16340 +9040 -7620 +9040 -7600 +9040 -7220 +9040 -7200 +9040 -6320 +9040 -6300 +9040 -4500 +9040 -4480 +9040 -4460 +9040 -4440 +9040 -4420 +9040 -4360 +9040 2720 +9040 2740 +9040 3340 +9040 3380 +9040 5400 +9040 5440 +9040 5580 +9040 5600 +9040 5640 +9040 5680 +9040 5700 +9040 5720 +9040 5740 +9040 5780 +9040 6040 +9040 6100 +9040 6200 +9040 11340 +9040 11360 +9040 11420 +9040 11440 +9040 13600 +9040 13620 +9040 13640 +9040 13660 +9040 13680 +9040 13700 +9040 13720 +9040 13740 +9040 13760 +9040 18980 +9040 19000 +9040 19020 +9060 -24060 +9060 -16340 +9060 -7640 +9060 -7620 +9060 -7600 +9060 -7220 +9060 -7200 +9060 -6300 +9060 -4480 +9060 -4460 +9060 -4440 +9060 -4420 +9060 -4380 +9060 -4360 +9060 -2480 +9060 -2420 +9060 -2400 +9060 -2380 +9060 2720 +9060 2740 +9060 3220 +9060 5420 +9060 5440 +9060 5560 +9060 5620 +9060 5740 +9060 5780 +9060 6100 +9060 6160 +9060 6180 +9060 6240 +9060 11340 +9060 11360 +9060 11420 +9060 11440 +9060 13580 +9060 13600 +9060 13620 +9060 13640 +9060 13660 +9060 13680 +9060 13700 +9060 13720 +9060 18980 +9060 19000 +9060 19020 +9060 19040 +9080 -16340 +9080 -7620 +9080 -7600 +9080 -7220 +9080 -7200 +9080 -4480 +9080 -4460 +9080 -4420 +9080 -4380 +9080 -4360 +9080 -2680 +9080 -2560 +9080 -2540 +9080 -2520 +9080 -2500 +9080 -2480 +9080 -2460 +9080 -2440 +9080 -2400 +9080 -2380 +9080 2720 +9080 3340 +9080 3480 +9080 5600 +9080 5780 +9080 5800 +9080 6020 +9080 6040 +9080 6060 +9080 6100 +9080 6340 +9080 6420 +9080 6440 +9080 6460 +9080 11340 +9080 11360 +9080 13580 +9080 13600 +9080 13620 +9080 13640 +9080 13660 +9080 13680 +9080 13700 +9080 18780 +9080 18840 +9080 19000 +9100 -16340 +9100 -7620 +9100 -7600 +9100 -7220 +9100 -7200 +9100 -4480 +9100 -4460 +9100 -4440 +9100 -4360 +9100 -2680 +9100 -2660 +9100 -2640 +9100 -2620 +9100 -2600 +9100 -2580 +9100 -2560 +9100 -2540 +9100 -2520 +9100 -2500 +9100 -2480 +9100 -2460 +9100 -2440 +9100 -2360 +9100 2720 +9100 2740 +9100 4960 +9100 5760 +9100 5780 +9100 6060 +9100 6080 +9100 6120 +9100 6200 +9100 6220 +9100 6340 +9100 6460 +9100 11320 +9100 11340 +9100 11360 +9100 13600 +9100 13620 +9100 13660 +9100 13680 +9100 13700 +9100 18760 +9100 18800 +9100 18820 +9100 18840 +9100 19000 +9100 19020 +9120 -16340 +9120 -7640 +9120 -7620 +9120 -7600 +9120 -7220 +9120 -7200 +9120 -4480 +9120 -4460 +9120 -4440 +9120 -4400 +9120 -4360 +9120 -2680 +9120 -2660 +9120 -2640 +9120 -2620 +9120 -2600 +9120 -2540 +9120 -2520 +9120 2720 +9120 2740 +9120 3480 +9120 3540 +9120 5420 +9120 5580 +9120 6060 +9120 6080 +9120 6120 +9120 6180 +9120 11340 +9120 11360 +9120 11400 +9120 13600 +9120 13660 +9120 13680 +9120 13700 +9120 18720 +9120 18740 +9120 18760 +9120 18780 +9120 18820 +9120 19020 +9140 -7640 +9140 -7620 +9140 -7600 +9140 -7220 +9140 -7200 +9140 -4480 +9140 -4460 +9140 -4440 +9140 -4360 +9140 -2680 +9140 -2660 +9140 -2640 +9140 -2600 +9140 -2580 +9140 -2560 +9140 -2540 +9140 -2520 +9140 2720 +9140 2740 +9140 3480 +9140 3520 +9140 5580 +9140 6180 +9140 6240 +9140 6260 +9140 11340 +9140 11360 +9140 12080 +9140 12100 +9140 13580 +9140 13600 +9140 13660 +9140 13680 +9140 13700 +9140 18720 +9140 18740 +9140 18780 +9140 18880 +9140 19000 +9160 -16360 +9160 -7620 +9160 -7600 +9160 -7220 +9160 -7200 +9160 -4480 +9160 -4460 +9160 -4440 +9160 -4420 +9160 -4380 +9160 -4360 +9160 -2660 +9160 -2640 +9160 -2520 +9160 -2500 +9160 2720 +9160 2740 +9160 3480 +9160 3520 +9160 3560 +9160 4980 +9160 5060 +9160 5380 +9160 5420 +9160 6180 +9160 6240 +9160 11340 +9160 11360 +9160 11380 +9160 11420 +9160 11580 +9160 11600 +9160 12020 +9160 12080 +9160 12100 +9160 13600 +9160 13660 +9160 13680 +9160 13700 +9160 18700 +9160 18720 +9160 18740 +9160 18840 +9160 18920 +9180 -16360 +9180 -7640 +9180 -7620 +9180 -7600 +9180 -7200 +9180 -4480 +9180 -4460 +9180 -4440 +9180 -4420 +9180 -4360 +9180 -2660 +9180 -2500 +9180 2720 +9180 2740 +9180 3260 +9180 3340 +9180 3420 +9180 3460 +9180 3500 +9180 5080 +9180 5420 +9180 5580 +9180 11360 +9180 11380 +9180 11420 +9180 11580 +9180 11600 +9180 11980 +9180 12040 +9180 12060 +9180 12080 +9180 12100 +9180 12120 +9180 13600 +9180 13660 +9180 13680 +9180 13700 +9180 18680 +9180 18700 +9180 18720 +9180 18740 +9180 18760 +9200 -16340 +9200 -7640 +9200 -7620 +9200 -7600 +9200 -7220 +9200 -7200 +9200 -4480 +9200 -4460 +9200 -4440 +9200 -4380 +9200 -4360 +9200 -2680 +9200 -2660 +9200 -2520 +9200 -2500 +9200 2720 +9200 2740 +9200 3440 +9200 3480 +9200 3560 +9200 5140 +9200 5400 +9200 11360 +9200 11380 +9200 11400 +9200 11420 +9200 11440 +9200 11560 +9200 11580 +9200 11600 +9200 11960 +9200 12000 +9200 12020 +9200 12040 +9200 12060 +9200 12080 +9200 12100 +9200 12120 +9200 12140 +9200 13600 +9200 13680 +9200 13700 +9200 18700 +9200 18720 +9200 18740 +9220 -16360 +9220 -16340 +9220 -7620 +9220 -7600 +9220 -7220 +9220 -7200 +9220 -4480 +9220 -4460 +9220 -4440 +9220 -4420 +9220 -4380 +9220 -4360 +9220 -2680 +9220 -2660 +9220 2720 +9220 2740 +9220 3320 +9220 3500 +9220 3520 +9220 3540 +9220 5180 +9220 5380 +9220 5920 +9220 6080 +9220 6240 +9220 11340 +9220 11360 +9220 11380 +9220 11400 +9220 11420 +9220 11580 +9220 11900 +9220 11920 +9220 11940 +9220 11960 +9220 11980 +9220 12000 +9220 12020 +9220 12060 +9220 12080 +9220 12100 +9220 12120 +9220 12140 +9220 12160 +9220 13580 +9220 13600 +9220 13660 +9220 13680 +9220 13700 +9220 18720 +9220 18740 +9240 -16360 +9240 -7620 +9240 -7600 +9240 -7220 +9240 -7200 +9240 -4480 +9240 -4460 +9240 -4440 +9240 -4420 +9240 -4380 +9240 -4360 +9240 2720 +9240 2740 +9240 3220 +9240 3540 +9240 5400 +9240 5580 +9240 5960 +9240 6180 +9240 11360 +9240 11380 +9240 11400 +9240 11420 +9240 11460 +9240 11720 +9240 11740 +9240 11760 +9240 11860 +9240 11900 +9240 11920 +9240 11940 +9240 11960 +9240 11980 +9240 12100 +9240 12120 +9240 12140 +9240 12160 +9240 13600 +9240 13660 +9240 13680 +9240 13700 +9240 18580 +9240 18600 +9240 18720 +9240 18740 +9240 18760 +9240 22860 +9260 -16360 +9260 -7620 +9260 -7600 +9260 -7200 +9260 -7180 +9260 -7160 +9260 -7120 +9260 -7080 +9260 -7060 +9260 -7000 +9260 -6920 +9260 -6840 +9260 -6740 +9260 -6720 +9260 -6700 +9260 -4480 +9260 -4460 +9260 -4440 +9260 -4420 +9260 -4380 +9260 -4360 +9260 -2660 +9260 2720 +9260 2740 +9260 3400 +9260 3440 +9260 4980 +9260 5000 +9260 5940 +9260 6240 +9260 11360 +9260 11380 +9260 11740 +9260 11760 +9260 11880 +9260 11900 +9260 11920 +9260 12020 +9260 12100 +9260 12120 +9260 12140 +9260 12160 +9260 13600 +9260 13660 +9260 13680 +9260 13700 +9260 18720 +9260 18740 +9260 18760 +9280 -16360 +9280 -7640 +9280 -7620 +9280 -7600 +9280 -7200 +9280 -7160 +9280 -7120 +9280 -7100 +9280 -7080 +9280 -7060 +9280 -7040 +9280 -7020 +9280 -7000 +9280 -6980 +9280 -6960 +9280 -6940 +9280 -6920 +9280 -6900 +9280 -6880 +9280 -6860 +9280 -6840 +9280 -6820 +9280 -6800 +9280 -6780 +9280 -6760 +9280 -6740 +9280 -6720 +9280 -6700 +9280 -4480 +9280 -4460 +9280 -4440 +9280 -4360 +9280 -4340 +9280 -2660 +9280 2720 +9280 2740 +9280 3340 +9280 3460 +9280 3500 +9280 11360 +9280 11380 +9280 12000 +9280 12060 +9280 12120 +9280 12140 +9280 13600 +9280 13660 +9280 13680 +9280 13700 +9280 18720 +9280 18760 +9280 18960 +9300 -16360 +9300 -7620 +9300 -7600 +9300 -6720 +9300 -6700 +9300 -4480 +9300 -4460 +9300 -4440 +9300 -4420 +9300 -4380 +9300 -4360 +9300 -2680 +9300 2720 +9300 2740 +9300 2760 +9300 3480 +9300 11360 +9300 11380 +9300 11400 +9300 11980 +9300 12100 +9300 12120 +9300 12140 +9300 13600 +9300 13660 +9300 13680 +9300 13700 +9300 19000 +9320 -21800 +9320 -16380 +9320 -16360 +9320 -10940 +9320 -10920 +9320 -10900 +9320 -10880 +9320 -10860 +9320 -10840 +9320 -10820 +9320 -10800 +9320 -10780 +9320 -10760 +9320 -10740 +9320 -7640 +9320 -7620 +9320 -7600 +9320 -6720 +9320 -6700 +9320 -4480 +9320 -4460 +9320 -4440 +9320 -4360 +9320 2720 +9320 2740 +9320 11360 +9320 11380 +9320 11420 +9320 11440 +9320 11840 +9320 12060 +9320 13580 +9320 13600 +9320 13660 +9320 13680 +9320 13700 +9320 18740 +9320 18940 +9320 18960 +9320 19000 +9340 -21800 +9340 -16380 +9340 -16360 +9340 -10920 +9340 -10900 +9340 -10880 +9340 -10860 +9340 -10840 +9340 -10820 +9340 -10800 +9340 -10780 +9340 -10760 +9340 -10740 +9340 -7620 +9340 -7600 +9340 -6720 +9340 -6700 +9340 -4480 +9340 -4460 +9340 -4440 +9340 -4420 +9340 -4380 +9340 -4360 +9340 2720 +9340 2740 +9340 3420 +9340 3480 +9340 4980 +9340 5580 +9340 6180 +9340 11360 +9340 11380 +9340 11420 +9340 11440 +9340 11680 +9340 11700 +9340 11720 +9340 11740 +9340 11760 +9340 11820 +9340 12020 +9340 13580 +9340 13600 +9340 13660 +9340 13680 +9340 13700 +9340 18640 +9340 18880 +9340 18960 +9340 18980 +9360 -16560 +9360 -16400 +9360 -16380 +9360 -16360 +9360 -10780 +9360 -10760 +9360 -10740 +9360 -7640 +9360 -7620 +9360 -7600 +9360 -6720 +9360 -6700 +9360 -4480 +9360 -4460 +9360 -4440 +9360 -4380 +9360 -4360 +9360 2720 +9360 2740 +9360 5460 +9360 5480 +9360 5680 +9360 5700 +9360 5960 +9360 6080 +9360 11360 +9360 11380 +9360 11400 +9360 11420 +9360 11540 +9360 11560 +9360 11580 +9360 11620 +9360 11680 +9360 11700 +9360 11720 +9360 11740 +9360 11760 +9360 11780 +9360 11800 +9360 11820 +9360 11840 +9360 13600 +9360 13680 +9360 13700 +9360 18600 +9360 18620 +9360 18640 +9360 18680 +9360 18780 +9360 18800 +9360 18900 +9360 18960 +9360 18980 +9380 -16420 +9380 -16380 +9380 -16360 +9380 -10780 +9380 -10760 +9380 -10740 +9380 -7640 +9380 -7620 +9380 -7600 +9380 -6720 +9380 -6700 +9380 -4480 +9380 -4460 +9380 -4440 +9380 -4420 +9380 -4380 +9380 -4360 +9380 2720 +9380 2740 +9380 3380 +9380 3440 +9380 3480 +9380 3500 +9380 3540 +9380 5480 +9380 5520 +9380 5840 +9380 5860 +9380 5880 +9380 5920 +9380 11360 +9380 11380 +9380 11400 +9380 11420 +9380 11440 +9380 11460 +9380 11480 +9380 11500 +9380 11540 +9380 11560 +9380 11580 +9380 11600 +9380 11620 +9380 11640 +9380 11660 +9380 11680 +9380 11700 +9380 11740 +9380 11760 +9380 11780 +9380 11800 +9380 11820 +9380 13600 +9380 13660 +9380 13680 +9380 13700 +9380 18580 +9380 18620 +9380 18640 +9400 -16440 +9400 -16400 +9400 -10780 +9400 -10760 +9400 -10740 +9400 -7620 +9400 -7600 +9400 -6720 +9400 -6700 +9400 -4480 +9400 -4460 +9400 -4400 +9400 -4360 +9400 2720 +9400 2740 +9400 3460 +9400 3560 +9400 5380 +9400 5400 +9400 5500 +9400 5840 +9400 5860 +9400 5880 +9400 5900 +9400 5940 +9400 11360 +9400 11400 +9400 11420 +9400 11440 +9400 11480 +9400 11520 +9400 11540 +9400 11560 +9400 11580 +9400 11600 +9400 11720 +9400 11740 +9400 11760 +9400 13580 +9400 13600 +9400 13660 +9400 13680 +9400 13700 +9400 18580 +9400 18600 +9400 18620 +9400 18640 +9420 -10800 +9420 -10780 +9420 -10760 +9420 -7640 +9420 -7620 +9420 -7600 +9420 -6720 +9420 -6700 +9420 -4480 +9420 -4460 +9420 -4440 +9420 -4380 +9420 -4360 +9420 2720 +9420 2740 +9420 3300 +9420 3320 +9420 3480 +9420 4940 +9420 5000 +9420 5580 +9420 11360 +9420 11380 +9420 11420 +9420 11440 +9420 11480 +9420 11580 +9420 11620 +9420 11660 +9420 11680 +9420 11700 +9420 11720 +9420 11780 +9420 13580 +9420 13600 +9420 13660 +9420 13680 +9420 13700 +9420 18600 +9420 18620 +9420 18640 +9440 -10780 +9440 -10760 +9440 -10740 +9440 -7640 +9440 -7620 +9440 -7600 +9440 -6720 +9440 -6700 +9440 -4500 +9440 -4480 +9440 -4460 +9440 -4440 +9440 -4380 +9440 -4360 +9440 -4340 +9440 2740 +9440 3140 +9440 5520 +9440 5560 +9440 5880 +9440 5920 +9440 13600 +9440 13660 +9440 13680 +9440 13700 +9440 18560 +9440 18600 +9440 18620 +9440 18640 +9460 -10800 +9460 -10780 +9460 -10760 +9460 -10740 +9460 -7640 +9460 -7620 +9460 -7600 +9460 -6720 +9460 -6700 +9460 -4480 +9460 -4460 +9460 -4440 +9460 -4360 +9460 -4340 +9460 2740 +9460 2760 +9460 3460 +9460 3500 +9460 5920 +9460 6020 +9460 13600 +9460 13680 +9460 13700 +9460 18600 +9460 18620 +9460 18640 +9480 -21820 +9480 -10800 +9480 -10780 +9480 -10760 +9480 -7620 +9480 -7600 +9480 -6720 +9480 -6700 +9480 -4480 +9480 -4460 +9480 -4440 +9480 -4400 +9480 -4380 +9480 -4360 +9480 2720 +9480 2740 +9480 3380 +9480 5540 +9480 5980 +9480 6000 +9480 13580 +9480 13600 +9480 13660 +9480 13680 +9480 13700 +9480 18620 +9480 18640 +9500 -17780 +9500 -10780 +9500 -10760 +9500 -10740 +9500 -7620 +9500 -7600 +9500 -6720 +9500 -6700 +9500 -4480 +9500 -4460 +9500 -4440 +9500 -4420 +9500 -4400 +9500 -4380 +9500 -4360 +9500 2720 +9500 2740 +9500 3460 +9500 6040 +9500 10780 +9500 10800 +9500 10820 +9500 10840 +9500 11640 +9500 11680 +9500 13520 +9500 13540 +9500 13580 +9500 13600 +9500 13660 +9500 13680 +9500 13700 +9500 18580 +9500 18600 +9500 18620 +9520 -21640 +9520 -21620 +9520 -21600 +9520 -21580 +9520 -21560 +9520 -21540 +9520 -21520 +9520 -21500 +9520 -21480 +9520 -21460 +9520 -21440 +9520 -21420 +9520 -21400 +9520 -21380 +9520 -21360 +9520 -21340 +9520 -21320 +9520 -21300 +9520 -21280 +9520 -21260 +9520 -21240 +9520 -21220 +9520 -21180 +9520 -21160 +9520 -21140 +9520 -21120 +9520 -21100 +9520 -21080 +9520 -21060 +9520 -21040 +9520 -21020 +9520 -21000 +9520 -10800 +9520 -10780 +9520 -10760 +9520 -10740 +9520 -7640 +9520 -7620 +9520 -7600 +9520 -6720 +9520 -6700 +9520 -4480 +9520 -4460 +9520 -4440 +9520 -4400 +9520 -4380 +9520 -4360 +9520 -3860 +9520 -3840 +9520 -2660 +9520 -2320 +9520 2720 +9520 2740 +9520 2760 +9520 3400 +9520 3520 +9520 10780 +9520 10800 +9520 10840 +9520 10860 +9520 11680 +9520 11700 +9520 13060 +9520 13080 +9520 13100 +9520 13240 +9520 13260 +9520 13280 +9520 13300 +9520 13320 +9520 13340 +9520 13360 +9520 13380 +9520 13400 +9520 13420 +9520 13440 +9520 13460 +9520 13480 +9520 13500 +9520 13520 +9520 13540 +9520 13580 +9520 13600 +9520 13660 +9520 13680 +9520 13700 +9520 18600 +9520 18620 +9520 18640 +9540 -21780 +9540 -21760 +9540 -21740 +9540 -21720 +9540 -21700 +9540 -21680 +9540 -21660 +9540 -21640 +9540 -21620 +9540 -21600 +9540 -21580 +9540 -21560 +9540 -21540 +9540 -21520 +9540 -21500 +9540 -21480 +9540 -21460 +9540 -21440 +9540 -21420 +9540 -21400 +9540 -21380 +9540 -21360 +9540 -21340 +9540 -21320 +9540 -21300 +9540 -21280 +9540 -21260 +9540 -21240 +9540 -21220 +9540 -21200 +9540 -21180 +9540 -21160 +9540 -21140 +9540 -21120 +9540 -21100 +9540 -21080 +9540 -21060 +9540 -21040 +9540 -21020 +9540 -21000 +9540 -10780 +9540 -10760 +9540 -10740 +9540 -7620 +9540 -7600 +9540 -6720 +9540 -6700 +9540 -4480 +9540 -4460 +9540 -4440 +9540 -4420 +9540 -4400 +9540 -4380 +9540 -4360 +9540 -3860 +9540 -3840 +9540 -2900 +9540 -2880 +9540 -2860 +9540 -2840 +9540 -2820 +9540 -2800 +9540 -2780 +9540 -2760 +9540 -2740 +9540 -2720 +9540 -2700 +9540 -2680 +9540 -2660 +9540 -2320 +9540 2720 +9540 2740 +9540 3540 +9540 6020 +9540 10780 +9540 10800 +9540 11680 +9540 11700 +9540 13060 +9540 13100 +9540 13240 +9540 13260 +9540 13280 +9540 13300 +9540 13320 +9540 13340 +9540 13360 +9540 13380 +9540 13400 +9540 13420 +9540 13440 +9540 13460 +9540 13480 +9540 13500 +9540 13580 +9540 13600 +9540 13640 +9540 13660 +9540 13680 +9540 13700 +9540 18560 +9540 18580 +9540 18600 +9540 18620 +9540 18640 +9560 -21740 +9560 -21660 +9560 -21560 +9560 -21540 +9560 -21420 +9560 -21340 +9560 -21200 +9560 -21140 +9560 -21120 +9560 -21080 +9560 -21040 +9560 -17800 +9560 -10780 +9560 -10760 +9560 -10740 +9560 -7620 +9560 -7600 +9560 -6720 +9560 -6700 +9560 -4500 +9560 -4480 +9560 -4460 +9560 -4440 +9560 -4420 +9560 -4360 +9560 -3840 +9560 -2940 +9560 -2920 +9560 -2900 +9560 -2880 +9560 -2860 +9560 -2840 +9560 -2820 +9560 -2800 +9560 -2780 +9560 -2760 +9560 -2740 +9560 -2720 +9560 -2680 +9560 -2660 +9560 -2320 +9560 2740 +9560 3440 +9560 10880 +9560 11700 +9560 13220 +9560 13240 +9560 13260 +9560 13280 +9560 13300 +9560 13320 +9560 13340 +9560 13360 +9560 13380 +9560 13400 +9560 13420 +9560 13440 +9560 13480 +9560 13500 +9560 13520 +9560 13580 +9560 13600 +9560 13660 +9560 13680 +9560 13700 +9560 18580 +9560 18600 +9560 18620 +9580 -21360 +9580 -21220 +9580 -21160 +9580 -10800 +9580 -10780 +9580 -10760 +9580 -10740 +9580 -7620 +9580 -7600 +9580 -6720 +9580 -6700 +9580 -4480 +9580 -4460 +9580 -4360 +9580 -4340 +9580 -3840 +9580 -2980 +9580 -2960 +9580 -2940 +9580 -2860 +9580 -2720 +9580 -2700 +9580 -2680 +9580 2740 +9580 10780 +9580 11680 +9580 11700 +9580 13220 +9580 13240 +9580 13260 +9580 13280 +9580 13300 +9580 13320 +9580 13340 +9580 13360 +9580 13380 +9580 13400 +9580 13420 +9580 13580 +9580 13600 +9580 13640 +9580 13680 +9580 13700 +9580 18560 +9580 18580 +9580 18620 +9580 21060 +9600 -17800 +9600 -10800 +9600 -10780 +9600 -10760 +9600 -10740 +9600 -7620 +9600 -7600 +9600 -6720 +9600 -6700 +9600 -4480 +9600 -4460 +9600 -4360 +9600 -4340 +9600 -3820 +9600 -3800 +9600 -2700 +9600 -2640 +9600 -2340 +9600 -2320 +9600 2720 +9600 2740 +9600 2760 +9600 11680 +9600 13220 +9600 13320 +9600 13580 +9600 13600 +9600 13660 +9600 13680 +9600 13700 +9600 18560 +9600 18580 +9600 19060 +9620 -17820 +9620 -17800 +9620 -10780 +9620 -10760 +9620 -7640 +9620 -7620 +9620 -7600 +9620 -6720 +9620 -6700 +9620 -4480 +9620 -4460 +9620 -4360 +9620 -4340 +9620 -3820 +9620 -2680 +9620 -2660 +9620 2740 +9620 10700 +9620 10740 +9620 13220 +9620 13280 +9620 13300 +9620 13560 +9620 13580 +9620 13600 +9620 13660 +9620 13680 +9620 13700 +9620 18560 +9620 18580 +9620 18600 +9620 18620 +9640 -17800 +9640 -10780 +9640 -10760 +9640 -10740 +9640 -7620 +9640 -7600 +9640 -6720 +9640 -6700 +9640 -4480 +9640 -4460 +9640 -4380 +9640 -4360 +9640 -4340 +9640 -3820 +9640 -3800 +9640 -2700 +9640 -2480 +9640 2740 +9640 2760 +9640 10700 +9640 10760 +9640 10800 +9640 13300 +9640 13580 +9640 13600 +9640 13680 +9640 13700 +9640 18560 +9640 18580 +9640 18600 +9660 -17820 +9660 -17800 +9660 -10780 +9660 -10760 +9660 -10740 +9660 -7620 +9660 -7600 +9660 -7520 +9660 -7500 +9660 -7480 +9660 -7440 +9660 -7420 +9660 -7400 +9660 -7380 +9660 -7360 +9660 -7340 +9660 -7320 +9660 -7300 +9660 -7280 +9660 -7260 +9660 -7240 +9660 -7200 +9660 -7100 +9660 -7080 +9660 -7040 +9660 -7020 +9660 -7000 +9660 -6900 +9660 -6780 +9660 -6720 +9660 -6700 +9660 -4500 +9660 -4480 +9660 -4380 +9660 -4360 +9660 -4340 +9660 -3800 +9660 -2700 +9660 2740 +9660 10720 +9660 10740 +9660 13220 +9660 13300 +9660 13580 +9660 13660 +9660 13680 +9660 13700 +9660 18560 +9660 18580 +9680 -17820 +9680 -17800 +9680 -10780 +9680 -10760 +9680 -10740 +9680 -7620 +9680 -7600 +9680 -7520 +9680 -7500 +9680 -7460 +9680 -7440 +9680 -7420 +9680 -7400 +9680 -7380 +9680 -7360 +9680 -7340 +9680 -7320 +9680 -7300 +9680 -7280 +9680 -7260 +9680 -7240 +9680 -7220 +9680 -7200 +9680 -7180 +9680 -7160 +9680 -7140 +9680 -7120 +9680 -7100 +9680 -7080 +9680 -7060 +9680 -7040 +9680 -7020 +9680 -7000 +9680 -6980 +9680 -6960 +9680 -6940 +9680 -6920 +9680 -6900 +9680 -6880 +9680 -6860 +9680 -6840 +9680 -6820 +9680 -6800 +9680 -6780 +9680 -6760 +9680 -6720 +9680 -6700 +9680 -4500 +9680 -4480 +9680 -4460 +9680 -4360 +9680 -4340 +9680 -2660 +9680 2740 +9680 2760 +9680 10780 +9680 13220 +9680 13240 +9680 13300 +9680 13580 +9680 13660 +9680 13680 +9680 13700 +9680 18580 +9680 18600 +9700 -23700 +9700 -23660 +9700 -23620 +9700 -17820 +9700 -17800 +9700 -10780 +9700 -10760 +9700 -10740 +9700 -7640 +9700 -7620 +9700 -7600 +9700 -7520 +9700 -7500 +9700 -7400 +9700 -7380 +9700 -7360 +9700 -7340 +9700 -7320 +9700 -7300 +9700 -7280 +9700 -7260 +9700 -7240 +9700 -7220 +9700 -7200 +9700 -7180 +9700 -7160 +9700 -7140 +9700 -7120 +9700 -7100 +9700 -7080 +9700 -7060 +9700 -7040 +9700 -7020 +9700 -7000 +9700 -6980 +9700 -6960 +9700 -6940 +9700 -6920 +9700 -6900 +9700 -6880 +9700 -6860 +9700 -6840 +9700 -6820 +9700 -6800 +9700 -6780 +9700 -6760 +9700 -6740 +9700 -6720 +9700 -6700 +9700 -4480 +9700 -4460 +9700 -4360 +9700 -2700 +9700 -2680 +9700 -2660 +9700 2740 +9700 2760 +9700 10740 +9700 13220 +9700 13320 +9700 13680 +9700 13700 +9700 18560 +9700 18580 +9700 18600 +9720 -23580 +9720 -17820 +9720 -15720 +9720 -15380 +9720 -15280 +9720 -10800 +9720 -10780 +9720 -10760 +9720 -10740 +9720 -7640 +9720 -7620 +9720 -7600 +9720 -7520 +9720 -7500 +9720 -6960 +9720 -6920 +9720 -6820 +9720 -6800 +9720 -6740 +9720 -4500 +9720 -4480 +9720 -4460 +9720 -4360 +9720 -4340 +9720 -2680 +9720 -2480 +9720 -2460 +9720 -2440 +9720 -2420 +9720 -2400 +9720 -2380 +9720 -2320 +9720 -2300 +9720 2740 +9720 2760 +9720 10680 +9720 13680 +9720 13700 +9720 19080 +9740 -23780 +9740 -23520 +9740 -17820 +9740 -17800 +9740 -15720 +9740 -15580 +9740 -15380 +9740 -15340 +9740 -15280 +9740 -15240 +9740 -10800 +9740 -10780 +9740 -10760 +9740 -7640 +9740 -7620 +9740 -7600 +9740 -7520 +9740 -7500 +9740 -4480 +9740 -4460 +9740 -4360 +9740 -4340 +9740 -2680 +9740 -2500 +9740 -2480 +9740 -2440 +9740 -2400 +9740 -2380 +9740 2740 +9740 2760 +9740 10760 +9740 10820 +9740 13660 +9740 13680 +9740 13700 +9740 18980 +9760 -17800 +9760 -15780 +9760 -15740 +9760 -15560 +9760 -15320 +9760 -15300 +9760 -15280 +9760 -15260 +9760 -10800 +9760 -10780 +9760 -10760 +9760 -10740 +9760 -7620 +9760 -7600 +9760 -7520 +9760 -7500 +9760 -4480 +9760 -4360 +9760 -4340 +9760 -2680 +9760 -2660 +9760 -2560 +9760 -2520 +9760 -2420 +9760 -2380 +9760 -2300 +9760 2740 +9760 2760 +9760 5120 +9760 6000 +9760 13680 +9760 13700 +9760 18600 +9760 18920 +9760 18940 +9760 23100 +9780 -23500 +9780 -17800 +9780 -16620 +9780 -15880 +9780 -15400 +9780 -15260 +9780 -10780 +9780 -10760 +9780 -10740 +9780 -7620 +9780 -7600 +9780 -7520 +9780 -7500 +9780 -4480 +9780 -4460 +9780 -4360 +9780 -4340 +9780 -2700 +9780 -2660 +9780 -2580 +9780 -2380 +9780 -2360 +9780 2740 +9780 2760 +9780 3160 +9780 10800 +9780 13680 +9780 18560 +9780 18580 +9780 18600 +9780 18640 +9800 -17800 +9800 -16520 +9800 -16500 +9800 -15880 +9800 -15780 +9800 -15300 +9800 -15280 +9800 -10800 +9800 -10780 +9800 -10760 +9800 -7640 +9800 -7620 +9800 -7600 +9800 -7520 +9800 -7500 +9800 -4480 +9800 -4460 +9800 -4360 +9800 -2680 +9800 -2380 +9800 2740 +9800 2780 +9800 13680 +9800 18580 +9800 18600 +9800 18620 +9800 18640 +9800 18820 +9800 18840 +9820 -24480 +9820 -17820 +9820 -17800 +9820 -17440 +9820 -17320 +9820 -16680 +9820 -16540 +9820 -16520 +9820 -16500 +9820 -16480 +9820 -15920 +9820 -15900 +9820 -15420 +9820 -10800 +9820 -10780 +9820 -10760 +9820 -10740 +9820 -7620 +9820 -7600 +9820 -7520 +9820 -7500 +9820 -4480 +9820 -4460 +9820 -4360 +9820 -4340 +9820 -3960 +9820 -3940 +9820 -3900 +9820 -3440 +9820 -2680 +9820 -2660 +9820 -2640 +9820 -2360 +9820 2740 +9820 2760 +9820 3080 +9820 3140 +9820 13660 +9820 13680 +9820 13700 +9820 18940 +9820 19000 +9820 19100 +9840 -23460 +9840 -17340 +9840 -17320 +9840 -17260 +9840 -17240 +9840 -16500 +9840 -16480 +9840 -16060 +9840 -10780 +9840 -10760 +9840 -10740 +9840 -7620 +9840 -7600 +9840 -7520 +9840 -7500 +9840 -4500 +9840 -4480 +9840 -4460 +9840 -4240 +9840 -4220 +9840 -3960 +9840 -3940 +9840 -3920 +9840 -3460 +9840 2740 +9840 2760 +9840 13680 +9840 18960 +9840 19000 +9860 -24520 +9860 -24460 +9860 -23620 +9860 -17820 +9860 -17800 +9860 -17280 +9860 -17260 +9860 -17240 +9860 -16840 +9860 -16480 +9860 -16460 +9860 -15280 +9860 -10800 +9860 -10780 +9860 -10760 +9860 -10740 +9860 -7640 +9860 -7620 +9860 -7600 +9860 -7520 +9860 -7500 +9860 -4480 +9860 -4460 +9860 -4360 +9860 -4200 +9860 -3960 +9860 -3480 +9860 -3460 +9860 -3440 +9860 -2600 +9860 -2400 +9860 -2380 +9860 2740 +9860 2760 +9860 5080 +9860 13640 +9860 13660 +9860 18940 +9860 18960 +9880 -23580 +9880 -17800 +9880 -16860 +9880 -16480 +9880 -15280 +9880 -10780 +9880 -10760 +9880 -7620 +9880 -7600 +9880 -7520 +9880 -7500 +9880 -4480 +9880 -4460 +9880 -4360 +9880 -4340 +9880 -2400 +9880 -2360 +9880 -2280 +9880 2760 +9880 2780 +9880 3120 +9880 13660 +9880 13680 +9880 18940 +9880 19000 +9880 19080 +9900 -17800 +9900 -17740 +9900 -17280 +9900 -17260 +9900 -15280 +9900 -15260 +9900 -10780 +9900 -10760 +9900 -10740 +9900 -7620 +9900 -7600 +9900 -7520 +9900 -7500 +9900 -4480 +9900 -4460 +9900 -4360 +9900 -3940 +9900 -2460 +9900 -2280 +9900 -2260 +9900 2740 +9900 2760 +9900 3120 +9900 3160 +9900 13660 +9900 13680 +9900 13700 +9900 18940 +9900 18980 +9920 -23640 +9920 -23580 +9920 -17260 +9920 -16480 +9920 -12340 +9920 -12320 +9920 -10800 +9920 -10780 +9920 -10760 +9920 -10740 +9920 -7620 +9920 -7600 +9920 -7520 +9920 -7500 +9920 -4480 +9920 -4460 +9920 -4340 +9920 -4140 +9920 -2420 +9920 -2260 +9920 2740 +9920 2760 +9920 3160 +9920 13680 +9920 13700 +9920 14740 +9920 19000 +9940 -16480 +9940 -12380 +9940 -12360 +9940 -12340 +9940 -12320 +9940 -12300 +9940 -12280 +9940 -12260 +9940 -10780 +9940 -10760 +9940 -10740 +9940 -7620 +9940 -7600 +9940 -7520 +9940 -7500 +9940 -4480 +9940 -4460 +9940 -4360 +9940 -4160 +9940 -4140 +9940 -2360 +9940 -2260 +9940 2760 +9940 2780 +9940 9020 +9940 13660 +9940 13680 +9940 14740 +9940 18980 +9940 19000 +9940 19080 +9960 -13360 +9960 -12420 +9960 -12280 +9960 -12260 +9960 -10780 +9960 -10760 +9960 -10740 +9960 -7640 +9960 -7620 +9960 -7600 +9960 -7520 +9960 -7500 +9960 -7480 +9960 -4480 +9960 -4460 +9960 -4340 +9960 -4160 +9960 -3280 +9960 -3260 +9960 -3140 +9960 -2960 +9960 -2260 +9960 2760 +9960 3120 +9960 8960 +9960 9040 +9960 9060 +9960 11020 +9960 14720 +9960 14740 +9960 18960 +9960 18980 +9960 19000 +9960 19020 +9980 -24480 +9980 -23540 +9980 -15260 +9980 -13360 +9980 -12480 +9980 -12460 +9980 -12440 +9980 -12340 +9980 -12300 +9980 -12280 +9980 -10800 +9980 -10780 +9980 -10760 +9980 -10740 +9980 -7640 +9980 -7620 +9980 -7600 +9980 -7500 +9980 -7480 +9980 -4480 +9980 -4460 +9980 -4360 +9980 -4340 +9980 -3320 +9980 -3300 +9980 -3280 +9980 -3260 +9980 -3240 +9980 -3200 +9980 -3180 +9980 -3160 +9980 -3140 +9980 -3120 +9980 -3100 +9980 -3080 +9980 -3060 +9980 -3040 +9980 -3020 +9980 -3000 +9980 -2980 +9980 -2960 +9980 -2660 +9980 2740 +9980 2760 +9980 2780 +9980 3140 +9980 6060 +9980 8920 +9980 8940 +9980 9040 +9980 9060 +9980 9120 +9980 10960 +9980 11020 +9980 13640 +9980 13660 +9980 13680 +9980 18980 +9980 19000 +9980 19060 +10000 -23580 +10000 -15280 +10000 -13360 +10000 -13340 +10000 -12460 +10000 -12400 +10000 -12360 +10000 -12300 +10000 -12280 +10000 -12260 +10000 -10800 +10000 -10780 +10000 -10760 +10000 -10740 +10000 -7640 +10000 -7620 +10000 -7600 +10000 -7500 +10000 -7480 +10000 -7460 +10000 -7440 +10000 -4500 +10000 -4480 +10000 -4460 +10000 -4360 +10000 -3340 +10000 -3320 +10000 -3300 +10000 -3280 +10000 -3220 +10000 -3200 +10000 -3140 +10000 2760 +10000 3120 +10000 8940 +10000 9040 +10000 9060 +10000 9080 +10000 9160 +10000 10900 +10000 11000 +10000 11020 +10000 13640 +10000 13660 +10000 18980 +10000 19000 +10020 -13380 +10020 -12560 +10020 -12520 +10020 -12480 +10020 -12440 +10020 -12400 +10020 -12300 +10020 -12280 +10020 -12260 +10020 -10780 +10020 -10760 +10020 -7640 +10020 -7620 +10020 -7600 +10020 -7500 +10020 -7480 +10020 -4480 +10020 -4460 +10020 -4340 +10020 2760 +10020 3160 +10020 8860 +10020 8880 +10020 9040 +10020 9100 +10020 9160 +10020 11000 +10020 13600 +10020 13660 +10020 13680 +10020 14920 +10020 18960 +10020 18980 +10020 19000 +10040 -24700 +10040 -16560 +10040 -15320 +10040 -13380 +10040 -13360 +10040 -12560 +10040 -12540 +10040 -12520 +10040 -12320 +10040 -12280 +10040 -12260 +10040 -12240 +10040 -10780 +10040 -10760 +10040 -10740 +10040 -7640 +10040 -7620 +10040 -7600 +10040 -7520 +10040 -7500 +10040 -7480 +10040 -7460 +10040 -7440 +10040 -4480 +10040 -4460 +10040 -4340 +10040 -3320 +10040 2760 +10040 2780 +10040 3120 +10040 3160 +10040 9060 +10040 9160 +10040 13660 +10040 13680 +10040 14020 +10040 14040 +10040 14060 +10040 14920 +10040 14940 +10040 14960 +10040 18980 +10040 19000 +10040 19040 +10060 -15340 +10060 -13360 +10060 -13340 +10060 -12600 +10060 -12580 +10060 -12560 +10060 -12540 +10060 -12280 +10060 -12260 +10060 -12240 +10060 -10800 +10060 -10780 +10060 -10760 +10060 -10740 +10060 -10460 +10060 -7640 +10060 -7620 +10060 -7600 +10060 -7580 +10060 -7560 +10060 -7540 +10060 -7520 +10060 -7500 +10060 -7480 +10060 -4480 +10060 -4460 +10060 -2480 +10060 -2460 +10060 2760 +10060 2780 +10060 3140 +10060 3160 +10060 3480 +10060 3500 +10060 3560 +10060 8940 +10060 8960 +10060 8980 +10060 9020 +10060 9040 +10060 10980 +10060 13660 +10060 13680 +10060 14020 +10060 14060 +10060 14080 +10060 14940 +10060 14960 +10060 18980 +10060 19000 +10060 19120 +10080 -15280 +10080 -15260 +10080 -13360 +10080 -12700 +10080 -12680 +10080 -12660 +10080 -12640 +10080 -12320 +10080 -12260 +10080 -12220 +10080 -10780 +10080 -10760 +10080 -10740 +10080 -10560 +10080 -10480 +10080 -10440 +10080 -10420 +10080 -7620 +10080 -7600 +10080 -7580 +10080 -7560 +10080 -7540 +10080 -7520 +10080 -7500 +10080 -4480 +10080 -4460 +10080 -4340 +10080 -2460 +10080 -2440 +10080 -2420 +10080 -2240 +10080 2740 +10080 2760 +10080 2780 +10080 3120 +10080 3580 +10080 3600 +10080 3620 +10080 3640 +10080 3660 +10080 9000 +10080 10840 +10080 10880 +10080 13660 +10080 13680 +10080 14040 +10080 14080 +10080 14100 +10080 14920 +10080 14940 +10080 14960 +10080 14980 +10080 18960 +10080 18980 +10080 19000 +10100 -15240 +10100 -13400 +10100 -13380 +10100 -13340 +10100 -12760 +10100 -12740 +10100 -12700 +10100 -12660 +10100 -12440 +10100 -12360 +10100 -12340 +10100 -12320 +10100 -12280 +10100 -12260 +10100 -12240 +10100 -10780 +10100 -10760 +10100 -10740 +10100 -10720 +10100 -10700 +10100 -10680 +10100 -10660 +10100 -10640 +10100 -10620 +10100 -10600 +10100 -10580 +10100 -10560 +10100 -10540 +10100 -10520 +10100 -10500 +10100 -10480 +10100 -10460 +10100 -10440 +10100 -10420 +10100 -10400 +10100 -7640 +10100 -7620 +10100 -7600 +10100 -7580 +10100 -7560 +10100 -7540 +10100 -7520 +10100 -4480 +10100 -4460 +10100 -4360 +10100 -2420 +10100 2760 +10100 2780 +10100 3140 +10100 3640 +10100 3680 +10100 3700 +10100 8940 +10100 10740 +10100 10860 +10100 10980 +10100 11000 +10100 13660 +10100 13680 +10100 13700 +10100 14920 +10100 14960 +10100 18960 +10100 18980 +10100 19000 +10120 -20880 +10120 -20760 +10120 -20740 +10120 -20720 +10120 -20700 +10120 -20680 +10120 -20480 +10120 -15800 +10120 -15720 +10120 -15280 +10120 -15260 +10120 -15240 +10120 -13340 +10120 -12800 +10120 -12780 +10120 -12740 +10120 -12460 +10120 -12280 +10120 -12240 +10120 -12220 +10120 -10780 +10120 -10760 +10120 -10740 +10120 -10720 +10120 -10700 +10120 -10680 +10120 -10660 +10120 -10640 +10120 -10620 +10120 -10600 +10120 -10580 +10120 -10560 +10120 -10540 +10120 -10520 +10120 -10500 +10120 -10480 +10120 -10460 +10120 -10440 +10120 -10420 +10120 -10400 +10120 -10380 +10120 -10360 +10120 -7620 +10120 -4480 +10120 -4360 +10120 -4340 +10120 -2400 +10120 -2220 +10120 2760 +10120 2780 +10120 3680 +10120 10820 +10120 11000 +10120 13660 +10120 13680 +10120 18960 +10120 18980 +10120 19000 +10120 19100 +10140 -24840 +10140 -23540 +10140 -20880 +10140 -20840 +10140 -20820 +10140 -20800 +10140 -20780 +10140 -20760 +10140 -20720 +10140 -20680 +10140 -20640 +10140 -20620 +10140 -20600 +10140 -20580 +10140 -20540 +10140 -20520 +10140 -20500 +10140 -20480 +10140 -20460 +10140 -15720 +10140 -15700 +10140 -15340 +10140 -15260 +10140 -13320 +10140 -12820 +10140 -12580 +10140 -12480 +10140 -12360 +10140 -12340 +10140 -12300 +10140 -12220 +10140 -12200 +10140 -10780 +10140 -10760 +10140 -10740 +10140 -10720 +10140 -10700 +10140 -10680 +10140 -10660 +10140 -10640 +10140 -10620 +10140 -10600 +10140 -10580 +10140 -10560 +10140 -10540 +10140 -10520 +10140 -10500 +10140 -10480 +10140 -10460 +10140 -10440 +10140 -10420 +10140 -10400 +10140 -10380 +10140 -4480 +10140 -4460 +10140 -4360 +10140 2760 +10140 3160 +10140 10740 +10140 11000 +10140 18920 +10140 18960 +10140 18980 +10140 19000 +10160 -24340 +10160 -24160 +10160 -23540 +10160 -23520 +10160 -23500 +10160 -23460 +10160 -23400 +10160 -23360 +10160 -23340 +10160 -23320 +10160 -23300 +10160 -23280 +10160 -23260 +10160 -23240 +10160 -23220 +10160 -23200 +10160 -23180 +10160 -23160 +10160 -23140 +10160 -23120 +10160 -23100 +10160 -23080 +10160 -23060 +10160 -23040 +10160 -23020 +10160 -23000 +10160 -22960 +10160 -22940 +10160 -22880 +10160 -20900 +10160 -20880 +10160 -20820 +10160 -20760 +10160 -20740 +10160 -20720 +10160 -20700 +10160 -20680 +10160 -20660 +10160 -20620 +10160 -20600 +10160 -20580 +10160 -20540 +10160 -20520 +10160 -20500 +10160 -20480 +10160 -20440 +10160 -20420 +10160 -20400 +10160 -20380 +10160 -20340 +10160 -15780 +10160 -15760 +10160 -15260 +10160 -15240 +10160 -13340 +10160 -13320 +10160 -12840 +10160 -12360 +10160 -12300 +10160 -12240 +10160 -10740 +10160 -10480 +10160 -10460 +10160 -10440 +10160 -10420 +10160 -10400 +10160 -10380 +10160 -4480 +10160 -4460 +10160 -4340 +10160 -2220 +10160 2760 +10160 2780 +10160 3120 +10160 3160 +10160 7220 +10160 7240 +10160 10720 +10160 10740 +10160 10920 +10160 10980 +10160 13680 +10160 18920 +10160 18960 +10160 18980 +10160 19060 +10180 -24220 +10180 -23480 +10180 -23440 +10180 -23420 +10180 -23400 +10180 -23380 +10180 -23340 +10180 -23320 +10180 -23280 +10180 -23260 +10180 -23240 +10180 -23200 +10180 -23180 +10180 -23160 +10180 -23120 +10180 -23100 +10180 -23040 +10180 -23020 +10180 -22980 +10180 -22940 +10180 -22920 +10180 -22880 +10180 -20920 +10180 -20900 +10180 -20880 +10180 -20860 +10180 -20840 +10180 -20820 +10180 -20800 +10180 -20780 +10180 -20760 +10180 -20740 +10180 -20720 +10180 -20700 +10180 -20680 +10180 -20660 +10180 -20640 +10180 -20620 +10180 -20600 +10180 -20580 +10180 -20560 +10180 -20540 +10180 -20520 +10180 -20500 +10180 -20440 +10180 -20420 +10180 -20360 +10180 -20340 +10180 -15280 +10180 -14020 +10180 -14000 +10180 -13340 +10180 -13320 +10180 -12800 +10180 -12380 +10180 -12260 +10180 -12240 +10180 -10440 +10180 -10420 +10180 -10400 +10180 -10380 +10180 -4480 +10180 -4460 +10180 -2220 +10180 2760 +10180 3140 +10180 3160 +10180 3720 +10180 10700 +10180 10740 +10180 10780 +10180 10800 +10180 10920 +10180 10940 +10180 10980 +10180 13660 +10180 13680 +10180 17180 +10180 19020 +10180 19040 +10180 19080 +10200 -14020 +10200 -14000 +10200 -13960 +10200 -13300 +10200 -12940 +10200 -12920 +10200 -12340 +10200 -12260 +10200 -10420 +10200 -10400 +10200 -10380 +10200 -10360 +10200 -4480 +10200 -4460 +10200 -4360 +10200 -2460 +10200 -2440 +10200 -2220 +10200 2760 +10200 2780 +10200 3680 +10200 10780 +10200 13680 +10200 17180 +10200 17200 +10200 18960 +10200 18980 +10200 19000 +10220 -13320 +10220 -10420 +10220 -10400 +10220 -10380 +10220 -4500 +10220 -4480 +10220 -4460 +10220 -4360 +10220 -2240 +10220 2760 +10220 2780 +10220 3120 +10220 3600 +10220 10700 +10220 10760 +10220 10880 +10220 10900 +10220 13680 +10220 16720 +10220 16740 +10220 18960 +10220 18980 +10220 19060 +10240 -13320 +10240 -10420 +10240 -10400 +10240 -4480 +10240 -4460 +10240 -4300 +10240 -2440 +10240 2760 +10240 2780 +10240 3140 +10240 10680 +10240 10700 +10240 10860 +10240 10880 +10240 10900 +10240 13660 +10240 13680 +10240 16720 +10240 16760 +10240 19020 +10240 19040 +10240 19160 +10260 -13320 +10260 -13300 +10260 -10420 +10260 -10400 +10260 -10380 +10260 -4480 +10260 -4460 +10260 -4340 +10260 -2480 +10260 -2460 +10260 -2440 +10260 -2420 +10260 -2400 +10260 -2380 +10260 -2360 +10260 2760 +10260 2780 +10260 10680 +10260 10880 +10260 13680 +10260 13700 +10260 15500 +10260 16720 +10260 16760 +10260 16780 +10260 18940 +10260 19020 +10280 -13320 +10280 -10420 +10280 -10400 +10280 -10380 +10280 -4480 +10280 -4460 +10280 -2360 +10280 -2340 +10280 2760 +10280 2780 +10280 3160 +10280 7560 +10280 7580 +10280 7600 +10280 10720 +10280 10740 +10280 13660 +10280 13680 +10280 15480 +10280 15500 +10280 16800 +10280 18940 +10280 18960 +10280 19060 +10280 19080 +10280 19120 +10280 19140 +10300 -13320 +10300 -13300 +10300 -10420 +10300 -10400 +10300 -10380 +10300 -4480 +10300 -4460 +10300 -2340 +10300 -2260 +10300 2760 +10300 2780 +10300 3120 +10300 3180 +10300 7580 +10300 9720 +10300 9780 +10300 9800 +10300 13680 +10300 13700 +10300 16760 +10300 16780 +10300 18940 +10300 18960 +10300 19020 +10300 19040 +10300 19080 +10300 19100 +10320 -17800 +10320 -17260 +10320 -13300 +10320 -13180 +10320 -11620 +10320 -11600 +10320 -11560 +10320 -11540 +10320 -11520 +10320 -10420 +10320 -10400 +10320 -10380 +10320 -4480 +10320 -4460 +10320 -4340 +10320 -2360 +10320 -2340 +10320 2780 +10320 3140 +10320 3160 +10320 3360 +10320 3400 +10320 7460 +10320 7480 +10320 7500 +10320 9700 +10320 9720 +10320 9740 +10320 9760 +10320 13680 +10320 13700 +10320 19040 +10320 19080 +10320 19100 +10320 19160 +10320 19180 +10340 -17800 +10340 -13180 +10340 -13160 +10340 -13140 +10340 -11660 +10340 -11600 +10340 -11580 +10340 -11560 +10340 -11520 +10340 -10420 +10340 -10400 +10340 -10380 +10340 -4480 +10340 -4460 +10340 -4340 +10340 -2280 +10340 2760 +10340 2780 +10340 3140 +10340 3260 +10340 3460 +10340 7480 +10340 7500 +10340 7520 +10340 7540 +10340 13680 +10340 13700 +10340 19020 +10340 19040 +10340 19060 +10340 19100 +10360 -17740 +10360 -17280 +10360 -14200 +10360 -13220 +10360 -13140 +10360 -12640 +10360 -11640 +10360 -11600 +10360 -11500 +10360 -10420 +10360 -10400 +10360 -10380 +10360 -4480 +10360 -4460 +10360 -2340 +10360 2780 +10360 2800 +10360 3140 +10360 3180 +10360 3320 +10360 3400 +10360 7460 +10360 7500 +10360 7520 +10360 7940 +10360 13660 +10360 13680 +10360 13700 +10360 19020 +10360 19040 +10360 19080 +10360 19100 +10380 -17760 +10380 -17720 +10380 -17620 +10380 -14200 +10380 -14180 +10380 -14100 +10380 -11420 +10380 -10420 +10380 -10400 +10380 -10380 +10380 -4480 +10380 -4460 +10380 -4380 +10380 -4340 +10380 -4320 +10380 -2360 +10380 -2340 +10380 2780 +10380 3300 +10380 7480 +10380 7500 +10380 7860 +10380 7960 +10380 13680 +10380 13700 +10380 19020 +10380 19060 +10380 19100 +10380 19480 +10400 -17820 +10400 -17660 +10400 -17620 +10400 -14240 +10400 -14220 +10400 -14180 +10400 -14160 +10400 -14140 +10400 -14100 +10400 -14060 +10400 -12760 +10400 -11420 +10400 -11400 +10400 -10420 +10400 -10400 +10400 -10380 +10400 -4480 +10400 -4460 +10400 -4360 +10400 -4340 +10400 -4320 +10400 -2360 +10400 -2260 +10400 2780 +10400 2800 +10400 2840 +10400 3160 +10400 3200 +10400 7480 +10400 7500 +10400 7900 +10400 7940 +10400 7960 +10400 13700 +10400 19020 +10400 19040 +10400 19080 +10400 19340 +10420 -17780 +10420 -17660 +10420 -17640 +10420 -14220 +10420 -14200 +10420 -14180 +10420 -14160 +10420 -14060 +10420 -14040 +10420 -13220 +10420 -11560 +10420 -11520 +10420 -11500 +10420 -10420 +10420 -10400 +10420 -10380 +10420 -4480 +10420 -4460 +10420 -4360 +10420 -2260 +10420 2840 +10420 7480 +10420 7500 +10420 7540 +10420 7740 +10420 7760 +10420 7900 +10420 7920 +10420 7960 +10420 9640 +10420 9660 +10420 13680 +10420 19020 +10420 19040 +10420 19060 +10420 19340 +10420 19620 +10440 -17640 +10440 -16740 +10440 -14260 +10440 -14040 +10440 -14020 +10440 -14000 +10440 -12740 +10440 -11900 +10440 -11880 +10440 -11840 +10440 -11720 +10440 -11680 +10440 -11640 +10440 -11540 +10440 -11520 +10440 -11500 +10440 -10420 +10440 -10400 +10440 -10380 +10440 -4480 +10440 -4460 +10440 -4340 +10440 2840 +10440 2860 +10440 7460 +10440 7500 +10440 7540 +10440 7560 +10440 7720 +10440 7760 +10440 7920 +10440 7940 +10440 7960 +10440 13680 +10440 13700 +10440 19000 +10440 19020 +10440 19040 +10440 19060 +10440 19100 +10440 19120 +10440 19140 +10440 19340 +10460 -17640 +10460 -14280 +10460 -14000 +10460 -13220 +10460 -12760 +10460 -11900 +10460 -11880 +10460 -11860 +10460 -11840 +10460 -11820 +10460 -11800 +10460 -11780 +10460 -11760 +10460 -11720 +10460 -11700 +10460 -11680 +10460 -11660 +10460 -11640 +10460 -11620 +10460 -11600 +10460 -11580 +10460 -11560 +10460 -11520 +10460 -11340 +10460 -10420 +10460 -10400 +10460 -10380 +10460 -4480 +10460 -4460 +10460 -4360 +10460 -4340 +10460 -2280 +10460 7460 +10460 7520 +10460 7540 +10460 7560 +10460 7580 +10460 7720 +10460 7760 +10460 7780 +10460 7860 +10460 7920 +10460 7940 +10460 7960 +10460 9800 +10460 19020 +10460 19060 +10460 19140 +10460 19220 +10480 -17800 +10480 -17640 +10480 -17280 +10480 -14040 +10480 -14020 +10480 -14000 +10480 -12740 +10480 -11880 +10480 -11780 +10480 -11760 +10480 -11400 +10480 -10420 +10480 -10400 +10480 -10380 +10480 -4480 +10480 -4460 +10480 -4360 +10480 -2260 +10480 7460 +10480 7500 +10480 7540 +10480 7900 +10480 7920 +10480 7940 +10480 7960 +10480 9660 +10480 13680 +10480 13700 +10480 19240 +10500 -17640 +10500 -14000 +10500 -12760 +10500 -12740 +10500 -11880 +10500 -11860 +10500 -11820 +10500 -11800 +10500 -11740 +10500 -11680 +10500 -11660 +10500 -11620 +10500 -11600 +10500 -11500 +10500 -10420 +10500 -10400 +10500 -10380 +10500 -4480 +10500 -4460 +10500 -4360 +10500 7560 +10500 7580 +10500 7880 +10500 7900 +10500 9680 +10500 13680 +10500 13700 +10500 19000 +10500 19040 +10500 19080 +10500 19100 +10500 19320 +10500 22960 +10520 -12760 +10520 -11940 +10520 -11920 +10520 -11860 +10520 -11720 +10520 -11700 +10520 -11540 +10520 -11520 +10520 -11440 +10520 -11420 +10520 -10420 +10520 -10400 +10520 -10380 +10520 -4480 +10520 -4460 +10520 -4360 +10520 7520 +10520 7580 +10520 7820 +10520 7840 +10520 7860 +10520 7940 +10520 7960 +10520 13580 +10520 13680 +10520 13700 +10520 19080 +10520 19100 +10520 19140 +10540 -17800 +10540 -17660 +10540 -17640 +10540 -12740 +10540 -11880 +10540 -11440 +10540 -10420 +10540 -10400 +10540 -10380 +10540 -4480 +10540 -4460 +10540 -4340 +10540 -2380 +10540 7540 +10540 7820 +10540 7900 +10540 7920 +10540 7940 +10540 7960 +10540 8000 +10540 9800 +10540 13680 +10540 13700 +10540 19060 +10540 19100 +10540 19140 +10560 -17800 +10560 -17680 +10560 -17640 +10560 -12760 +10560 -12740 +10560 -10420 +10560 -10400 +10560 -10380 +10560 -4480 +10560 -4460 +10560 -4440 +10560 -4360 +10560 2980 +10560 7500 +10560 7560 +10560 7820 +10560 7940 +10560 7960 +10560 8000 +10560 9700 +10560 13680 +10560 16740 +10560 16760 +10560 18880 +10560 19080 +10560 19100 +10580 -17800 +10580 -12760 +10580 -12740 +10580 -11900 +10580 -11600 +10580 -11560 +10580 -11540 +10580 -10420 +10580 -10400 +10580 -10380 +10580 -4480 +10580 -4460 +10580 -4440 +10580 -4380 +10580 -4360 +10580 -2260 +10580 3400 +10580 7660 +10580 7700 +10580 7760 +10580 7780 +10580 7800 +10580 7880 +10580 7920 +10580 7940 +10580 7960 +10580 9860 +10580 13700 +10580 16680 +10580 16740 +10580 17420 +10580 18900 +10580 19080 +10580 19100 +10580 19300 +10600 -17800 +10600 -11600 +10600 -11480 +10600 -10440 +10600 -10420 +10600 -10400 +10600 -10380 +10600 -4480 +10600 -4460 +10600 -4440 +10600 -2260 +10600 3000 +10600 7900 +10600 7920 +10600 7980 +10600 8000 +10600 9720 +10600 12160 +10600 12180 +10600 12200 +10600 13680 +10600 16660 +10600 16680 +10600 16740 +10600 17420 +10600 17440 +10600 18900 +10600 19060 +10600 19080 +10600 19100 +10620 -17820 +10620 -17760 +10620 -17740 +10620 -12740 +10620 -12720 +10620 -12600 +10620 -11820 +10620 -10420 +10620 -10400 +10620 -10380 +10620 -4480 +10620 -4460 +10620 -4440 +10620 -4400 +10620 -4360 +10620 -3320 +10620 3000 +10620 3020 +10620 7900 +10620 7940 +10620 7960 +10620 12180 +10620 12200 +10620 13560 +10620 13580 +10620 13680 +10620 13700 +10620 19160 +10620 19780 +10640 -12760 +10640 -12740 +10640 -11560 +10640 -10420 +10640 -10400 +10640 -10380 +10640 -4460 +10640 -4440 +10640 -4360 +10640 -2400 +10640 3020 +10640 7900 +10640 7920 +10640 7940 +10640 7980 +10640 12180 +10640 12200 +10640 13560 +10640 13700 +10640 19080 +10640 19100 +10640 19120 +10640 22680 +10660 -12740 +10660 -12600 +10660 -11940 +10660 -11860 +10660 -11560 +10660 -10420 +10660 -10400 +10660 -10380 +10660 -4480 +10660 -4460 +10660 -4440 +10660 3000 +10660 3020 +10660 7820 +10660 7840 +10660 7920 +10660 7940 +10660 7980 +10660 13000 +10660 13020 +10660 13060 +10660 13220 +10660 13680 +10660 19060 +10660 19120 +10660 19140 +10660 19160 +10660 19840 +10680 -17780 +10680 -12740 +10680 -11580 +10680 -10440 +10680 -10420 +10680 -10400 +10680 -10380 +10680 -4460 +10680 -4380 +10680 3020 +10680 7580 +10680 7800 +10680 13000 +10680 13020 +10680 13040 +10680 13060 +10680 13080 +10680 13100 +10680 13120 +10680 13140 +10680 13160 +10680 13180 +10680 13200 +10680 13220 +10680 13240 +10680 13260 +10680 13280 +10680 13300 +10680 13320 +10680 13340 +10680 13360 +10680 13380 +10680 13400 +10680 13420 +10680 13440 +10680 13460 +10680 13480 +10680 13500 +10680 13660 +10680 13680 +10680 13700 +10680 17560 +10680 19060 +10700 -12740 +10700 -12720 +10700 -12660 +10700 -12640 +10700 -11920 +10700 -10420 +10700 -10400 +10700 -10380 +10700 -4480 +10700 -4460 +10700 -4440 +10700 3000 +10700 3020 +10700 3040 +10700 7460 +10700 7480 +10700 7540 +10700 7780 +10700 7840 +10700 7920 +10700 8000 +10700 9740 +10700 12980 +10700 13000 +10700 13040 +10700 13060 +10700 13100 +10700 13120 +10700 13140 +10700 13160 +10700 13180 +10700 13200 +10700 13220 +10700 13240 +10700 13260 +10700 13280 +10700 13300 +10700 13320 +10700 13340 +10700 13360 +10700 13400 +10700 13440 +10700 13660 +10700 17560 +10700 19060 +10700 19100 +10700 19120 +10700 19140 +10720 -12740 +10720 -10420 +10720 -10400 +10720 -10380 +10720 -4460 +10720 -4440 +10720 -4400 +10720 -4380 +10720 -4360 +10720 -2260 +10720 3000 +10720 7600 +10720 9740 +10720 13000 +10720 13140 +10720 13280 +10720 13340 +10720 13360 +10720 13540 +10720 13560 +10720 13580 +10720 13640 +10720 13680 +10720 16540 +10720 16580 +10720 16600 +10720 17340 +10720 19100 +10740 -17820 +10740 -17800 +10740 -12740 +10740 -10400 +10740 -10380 +10740 -4480 +10740 -4460 +10740 -4440 +10740 -4380 +10740 -2300 +10740 3000 +10740 3020 +10740 13000 +10740 13080 +10740 13580 +10740 13660 +10740 13680 +10740 13700 +10740 16520 +10740 16540 +10740 16560 +10740 16580 +10740 16600 +10740 17320 +10740 17340 +10740 19100 +10760 -12740 +10760 -10420 +10760 -10400 +10760 -10380 +10760 -4480 +10760 -4460 +10760 -4440 +10760 -4360 +10760 -2340 +10760 3020 +10760 7440 +10760 9900 +10760 13120 +10760 13140 +10760 13400 +10760 13560 +10760 13680 +10760 14860 +10760 16540 +10760 16560 +10760 16580 +10760 17300 +10760 17320 +10760 18060 +10760 18100 +10760 19080 +10760 19100 +10760 20020 +10780 -17800 +10780 -12740 +10780 -12720 +10780 -12700 +10780 -11600 +10780 -10420 +10780 -10400 +10780 -10380 +10780 -4480 +10780 -4460 +10780 -4440 +10780 -4360 +10780 -2560 +10780 -2540 +10780 -2520 +10780 -2500 +10780 -2480 +10780 -2460 +10780 -2440 +10780 -2420 +10780 -2400 +10780 -2380 +10780 -2360 +10780 -2340 +10780 -2320 +10780 -2300 +10780 -2280 +10780 -2260 +10780 -2240 +10780 -2220 +10780 3000 +10780 3020 +10780 9900 +10780 11640 +10780 13500 +10780 13680 +10780 14060 +10780 14840 +10780 14860 +10780 14880 +10780 16540 +10780 16560 +10780 17300 +10780 17320 +10780 18060 +10780 19080 +10780 19100 +10780 19120 +10800 -17800 +10800 -17780 +10800 -15840 +10800 -12740 +10800 -12720 +10800 -10420 +10800 -10400 +10800 -10380 +10800 -4480 +10800 -4460 +10800 -4440 +10800 -4360 +10800 -2480 +10800 -2440 +10800 -2340 +10800 -2280 +10800 -2260 +10800 -2240 +10800 -2220 +10800 3000 +10800 3020 +10800 4840 +10800 11620 +10800 11660 +10800 11720 +10800 11740 +10800 13400 +10800 13480 +10800 13500 +10800 13560 +10800 13640 +10800 13660 +10800 13680 +10800 13700 +10800 14060 +10800 14100 +10800 14820 +10800 14840 +10800 14860 +10800 14880 +10800 14900 +10800 16540 +10800 17300 +10800 18100 +10800 19060 +10800 19080 +10800 19140 +10800 20000 +10820 -17820 +10820 -17800 +10820 -15880 +10820 -12740 +10820 -12720 +10820 -11500 +10820 -10420 +10820 -10400 +10820 -10380 +10820 -10360 +10820 -4460 +10820 -4440 +10820 -4380 +10820 -4340 +10820 -2220 +10820 3000 +10820 11740 +10820 11760 +10820 11780 +10820 11800 +10820 11840 +10820 11860 +10820 12980 +10820 13120 +10820 13500 +10820 13560 +10820 13640 +10820 13680 +10820 14060 +10820 14080 +10820 14100 +10820 16520 +10820 18020 +10820 18080 +10820 18100 +10820 19020 +10820 19080 +10820 19120 +10840 -17800 +10840 -15880 +10840 -15860 +10840 -14500 +10840 -12740 +10840 -12720 +10840 -10620 +10840 -10440 +10840 -10420 +10840 -10400 +10840 -10380 +10840 -10360 +10840 -4480 +10840 -4460 +10840 -4440 +10840 -4420 +10840 -4360 +10840 -4340 +10840 -2220 +10840 -2200 +10840 3000 +10840 3020 +10840 11660 +10840 11680 +10840 11700 +10840 11720 +10840 11780 +10840 11800 +10840 11820 +10840 11840 +10840 11860 +10840 12980 +10840 13020 +10840 13580 +10840 13680 +10840 14060 +10840 14080 +10840 14100 +10840 14900 +10840 17880 +10840 18040 +10840 18100 +10840 19020 +10840 19060 +10840 19080 +10840 19100 +10840 19140 +10860 -17800 +10860 -15880 +10860 -15860 +10860 -14540 +10860 -14500 +10860 -12720 +10860 -12580 +10860 -12560 +10860 -10740 +10860 -10460 +10860 -10420 +10860 -10400 +10860 -10380 +10860 -10360 +10860 -10340 +10860 -10300 +10860 -10280 +10860 -4460 +10860 -4440 +10860 -2220 +10860 -2200 +10860 3020 +10860 3300 +10860 12980 +10860 13520 +10860 13560 +10860 13580 +10860 14100 +10860 17880 +10860 18020 +10860 18060 +10860 18080 +10860 19000 +10860 19040 +10860 19060 +10880 -17820 +10880 -15840 +10880 -14520 +10880 -14500 +10880 -12760 +10880 -12740 +10880 -12720 +10880 -12560 +10880 -12540 +10880 -10620 +10880 -10500 +10880 -10480 +10880 -10460 +10880 -10440 +10880 -10420 +10880 -10400 +10880 -10380 +10880 -10360 +10880 -10340 +10880 -10320 +10880 -10300 +10880 -10280 +10880 -4480 +10880 -4460 +10880 -4440 +10880 -2220 +10880 -2200 +10880 3020 +10880 13140 +10880 13580 +10880 13680 +10880 17840 +10880 18060 +10880 19020 +10880 19060 +10880 19080 +10880 19100 +10880 19820 +10880 20020 +10880 20100 +10900 -15880 +10900 -15860 +10900 -14540 +10900 -14520 +10900 -14500 +10900 -12740 +10900 -12720 +10900 -12700 +10900 -10500 +10900 -10480 +10900 -10440 +10900 -10420 +10900 -10400 +10900 -10380 +10900 -10360 +10900 -10340 +10900 -10320 +10900 -10300 +10900 -10280 +10900 -10260 +10900 -4460 +10900 -4440 +10900 -4400 +10900 -4380 +10900 -2220 +10900 -2200 +10900 3000 +10900 3020 +10900 4300 +10900 12960 +10900 12980 +10900 13660 +10900 17840 +10900 18020 +10900 18040 +10900 18060 +10900 18080 +10900 19000 +10900 19020 +10900 19040 +10900 19080 +10900 19100 +10920 -15860 +10920 -15840 +10920 -14520 +10920 -14500 +10920 -12760 +10920 -12740 +10920 -12720 +10920 -10400 +10920 -10380 +10920 -10360 +10920 -10340 +10920 -10320 +10920 -10300 +10920 -10280 +10920 -10260 +10920 -7480 +10920 -7440 +10920 -7420 +10920 -7380 +10920 -4480 +10920 -4460 +10920 -4440 +10920 -2220 +10920 3000 +10920 3020 +10920 3360 +10920 3400 +10920 8260 +10920 12960 +10920 12980 +10920 13120 +10920 13140 +10920 13680 +10920 18040 +10920 18060 +10920 18980 +10920 19000 +10920 19020 +10920 19100 +10920 19120 +10920 20080 +10940 -17820 +10940 -17800 +10940 -14520 +10940 -12740 +10940 -12720 +10940 -12700 +10940 -12620 +10940 -10320 +10940 -10300 +10940 -10280 +10940 -10260 +10940 -7480 +10940 -7460 +10940 -7440 +10940 -7420 +10940 -7400 +10940 -7380 +10940 -7360 +10940 -4480 +10940 -4460 +10940 -4440 +10940 -4360 +10940 -2220 +10940 -2200 +10940 3000 +10940 3020 +10940 3280 +10940 13100 +10940 13660 +10940 13680 +10940 17520 +10940 17980 +10940 18000 +10940 18020 +10940 18040 +10940 18060 +10940 18940 +10940 18960 +10940 18980 +10940 19000 +10940 19020 +10960 -14520 +10960 -12740 +10960 -12720 +10960 -12620 +10960 -10300 +10960 -10280 +10960 -10260 +10960 -7620 +10960 -7600 +10960 -7580 +10960 -7560 +10960 -7540 +10960 -7520 +10960 -7500 +10960 -7480 +10960 -7460 +10960 -7440 +10960 -7420 +10960 -7400 +10960 -7380 +10960 -7360 +10960 -7340 +10960 -7320 +10960 -7300 +10960 -7280 +10960 -7260 +10960 -4480 +10960 -4460 +10960 3000 +10960 3020 +10960 8300 +10960 13120 +10960 13680 +10960 13700 +10960 17520 +10960 18000 +10960 19020 +10980 -17820 +10980 -17800 +10980 -14260 +10980 -14220 +10980 -12740 +10980 -12720 +10980 -12700 +10980 -10320 +10980 -10300 +10980 -10280 +10980 -10260 +10980 -7620 +10980 -7600 +10980 -7580 +10980 -7560 +10980 -7540 +10980 -7520 +10980 -7500 +10980 -7480 +10980 -7460 +10980 -7440 +10980 -7420 +10980 -7400 +10980 -7380 +10980 -7360 +10980 -7340 +10980 -7320 +10980 -7300 +10980 -7280 +10980 -7260 +10980 -7240 +10980 -7220 +10980 -4460 +10980 -4440 +10980 -4360 +10980 -4340 +10980 -2220 +10980 3000 +10980 3020 +10980 3300 +10980 3360 +10980 3400 +10980 11660 +10980 13120 +10980 13520 +10980 13680 +10980 13700 +10980 13720 +10980 14880 +10980 17960 +10980 18040 +10980 18960 +10980 19000 +10980 19020 +10980 19040 +10980 19080 +11000 -17800 +11000 -12740 +11000 -12720 +11000 -12700 +11000 -10320 +11000 -10300 +11000 -10280 +11000 -7620 +11000 -7600 +11000 -7580 +11000 -7560 +11000 -7540 +11000 -7520 +11000 -7500 +11000 -7480 +11000 -7460 +11000 -7440 +11000 -7420 +11000 -7400 +11000 -7380 +11000 -7320 +11000 -7300 +11000 -7280 +11000 -7260 +11000 -7240 +11000 -7220 +11000 -7200 +11000 -4480 +11000 -4460 +11000 -4440 +11000 -4360 +11000 -2220 +11000 3000 +11000 11680 +11000 13100 +11000 13520 +11000 13540 +11000 17980 +11000 19000 +11000 19040 +11000 19120 +11020 -17820 +11020 -17800 +11020 -14300 +11020 -12720 +11020 -10300 +11020 -10280 +11020 -10260 +11020 -7620 +11020 -7600 +11020 -7580 +11020 -7560 +11020 -7540 +11020 -7520 +11020 -7460 +11020 -7440 +11020 -7420 +11020 -7400 +11020 -7280 +11020 -7260 +11020 -7240 +11020 -7220 +11020 -7200 +11020 -7180 +11020 -7160 +11020 -7140 +11020 -7120 +11020 -7100 +11020 -4480 +11020 -4460 +11020 -4360 +11020 -4340 +11020 -3940 +11020 -3900 +11020 -2220 +11020 3000 +11020 3020 +11020 3060 +11020 4900 +11020 8320 +11020 8360 +11020 13520 +11020 13680 +11020 14160 +11020 18000 +11020 18940 +11020 18980 +11020 19000 +11020 19020 +11020 22200 +11040 -17820 +11040 -17800 +11040 -12740 +11040 -12700 +11040 -10300 +11040 -10280 +11040 -10260 +11040 -7620 +11040 -7600 +11040 -7560 +11040 -7540 +11040 -7520 +11040 -7460 +11040 -7420 +11040 -7200 +11040 -7180 +11040 -7160 +11040 -7140 +11040 -7120 +11040 -7100 +11040 -7080 +11040 -7060 +11040 -7040 +11040 -4480 +11040 -4460 +11040 -4420 +11040 -2220 +11040 3000 +11040 4900 +11040 8240 +11040 8260 +11040 13520 +11040 18940 +11040 18980 +11040 19020 +11060 -12720 +11060 -12700 +11060 -10300 +11060 -10280 +11060 -7640 +11060 -7620 +11060 -7600 +11060 -7580 +11060 -7460 +11060 -7440 +11060 -7420 +11060 -7400 +11060 -7140 +11060 -7120 +11060 -7100 +11060 -7080 +11060 -7060 +11060 -7040 +11060 -7020 +11060 -7000 +11060 -4480 +11060 -4460 +11060 -4440 +11060 -4340 +11060 -2220 +11060 3000 +11060 3020 +11060 3920 +11060 8260 +11060 8300 +11060 13500 +11060 13520 +11060 14200 +11060 18940 +11060 18980 +11060 19020 +11060 19040 +11060 19060 +11060 19100 +11060 20060 +11080 -17820 +11080 -17800 +11080 -12740 +11080 -12720 +11080 -11200 +11080 -10300 +11080 -10280 +11080 -10260 +11080 -7640 +11080 -7620 +11080 -7600 +11080 -7580 +11080 -7500 +11080 -7460 +11080 -7420 +11080 -7060 +11080 -7040 +11080 -7020 +11080 -7000 +11080 -6980 +11080 -6960 +11080 -6940 +11080 -6920 +11080 -6900 +11080 -4480 +11080 -4460 +11080 -3300 +11080 -3280 +11080 -2240 +11080 -2220 +11080 -2200 +11080 3000 +11080 3020 +11080 8320 +11080 8360 +11080 11820 +11080 11860 +11080 13640 +11080 17960 +11080 18980 +11080 19060 +11080 22240 +11100 -14300 +11100 -12720 +11100 -12700 +11100 -10300 +11100 -10280 +11100 -10260 +11100 -7620 +11100 -7600 +11100 -7580 +11100 -7460 +11100 -7420 +11100 -7400 +11100 -7320 +11100 -7000 +11100 -6980 +11100 -6960 +11100 -6940 +11100 -6920 +11100 -4480 +11100 -4460 +11100 -4340 +11100 -4320 +11100 -3320 +11100 -2220 +11100 -2200 +11100 3000 +11100 3020 +11100 11860 +11100 11880 +11100 13140 +11100 13640 +11100 17920 +11100 18980 +11100 19000 +11100 19020 +11100 19060 +11100 19080 +11120 -17820 +11120 -17800 +11120 -14540 +11120 -14340 +11120 -12740 +11120 -12720 +11120 -12700 +11120 -12640 +11120 -12620 +11120 -12560 +11120 -12540 +11120 -12500 +11120 -12480 +11120 -12400 +11120 -11620 +11120 -11340 +11120 -10300 +11120 -10280 +11120 -10260 +11120 -7620 +11120 -7600 +11120 -7580 +11120 -7400 +11120 -7380 +11120 -7360 +11120 -6940 +11120 -6920 +11120 -6900 +11120 -6880 +11120 -6860 +11120 -6840 +11120 -6820 +11120 -6800 +11120 -4480 +11120 -4460 +11120 -4440 +11120 -2200 +11120 3000 +11120 3020 +11120 11840 +11120 11880 +11120 12700 +11120 13640 +11120 19000 +11120 19020 +11120 19080 +11140 -17820 +11140 -17800 +11140 -12740 +11140 -12720 +11140 -12700 +11140 -12680 +11140 -12660 +11140 -12640 +11140 -12620 +11140 -12600 +11140 -12580 +11140 -12560 +11140 -12540 +11140 -12520 +11140 -12480 +11140 -12460 +11140 -12420 +11140 -12400 +11140 -12360 +11140 -12220 +11140 -11720 +11140 -10300 +11140 -10280 +11140 -7620 +11140 -7600 +11140 -7580 +11140 -7480 +11140 -7460 +11140 -6880 +11140 -6860 +11140 -6840 +11140 -6820 +11140 -6800 +11140 -6780 +11140 -6760 +11140 -4460 +11140 -2200 +11140 3000 +11140 4760 +11140 11720 +11140 11740 +11140 11760 +11140 11800 +11140 11820 +11140 11840 +11140 11900 +11140 12680 +11140 12980 +11140 13640 +11140 13660 +11140 18980 +11140 19040 +11140 22200 +11140 22220 +11160 -17820 +11160 -17800 +11160 -17780 +11160 -14660 +11160 -12700 +11160 -12680 +11160 -11700 +11160 -11680 +11160 -11660 +11160 -11620 +11160 -11600 +11160 -11580 +11160 -11560 +11160 -11520 +11160 -11500 +11160 -11480 +11160 -11460 +11160 -11440 +11160 -11420 +11160 -11400 +11160 -11360 +11160 -11340 +11160 -11320 +11160 -11300 +11160 -10300 +11160 -10280 +11160 -7620 +11160 -7600 +11160 -7580 +11160 -6820 +11160 -6800 +11160 -6780 +11160 -6760 +11160 -6740 +11160 -6720 +11160 -6680 +11160 -4480 +11160 -4460 +11160 -4340 +11160 -2220 +11160 3000 +11160 3020 +11160 11720 +11160 11760 +11160 11840 +11160 12520 +11160 12640 +11160 12680 +11160 13000 +11160 13660 +11160 13680 +11160 14060 +11160 18980 +11160 19000 +11160 22220 +11180 -17820 +11180 -17800 +11180 -17780 +11180 -10300 +11180 -10280 +11180 -7620 +11180 -7600 +11180 -7580 +11180 -6740 +11180 -6720 +11180 -6700 +11180 -6680 +11180 -6660 +11180 -6640 +11180 -6620 +11180 -6600 +11180 -4480 +11180 -4460 +11180 -4440 +11180 -4340 +11180 -3300 +11180 -3220 +11180 -2220 +11180 3000 +11180 3020 +11180 12480 +11180 12500 +11180 12560 +11180 12580 +11180 12600 +11180 12620 +11180 12640 +11180 12760 +11180 12800 +11180 18960 +11180 18980 +11200 -10320 +11200 -10300 +11200 -10280 +11200 -10260 +11200 -7620 +11200 -7600 +11200 -7580 +11200 -6680 +11200 -6660 +11200 -6640 +11200 -6620 +11200 -6600 +11200 -4460 +11200 -4340 +11200 -2220 +11200 -2200 +11200 3000 +11200 3020 +11200 8180 +11200 8360 +11200 11840 +11200 12500 +11200 12540 +11200 12560 +11200 12640 +11200 12780 +11200 17980 +11200 18000 +11200 18900 +11200 18960 +11220 -17800 +11220 -17780 +11220 -17580 +11220 -17400 +11220 -17220 +11220 -17060 +11220 -14980 +11220 -14860 +11220 -14820 +11220 -14800 +11220 -14740 +11220 -14680 +11220 -10300 +11220 -10280 +11220 -10260 +11220 -7640 +11220 -7620 +11220 -7600 +11220 -7580 +11220 -6620 +11220 -6600 +11220 -6580 +11220 -6560 +11220 -6540 +11220 -4480 +11220 -4460 +11220 -4440 +11220 -4340 +11220 3000 +11220 8400 +11220 8420 +11220 12480 +11220 12560 +11220 12980 +11220 18060 +11220 18960 +11220 22260 +11240 -17800 +11240 -17720 +11240 -17660 +11240 -17640 +11240 -17600 +11240 -17580 +11240 -17560 +11240 -17420 +11240 -17340 +11240 -17280 +11240 -17220 +11240 -17180 +11240 -17160 +11240 -17020 +11240 -14960 +11240 -14920 +11240 -14880 +11240 -14860 +11240 -14840 +11240 -14740 +11240 -14680 +11240 -14100 +11240 -10300 +11240 -10280 +11240 -10260 +11240 -7620 +11240 -7600 +11240 -7360 +11240 -6560 +11240 -4480 +11240 -4460 +11240 -4340 +11240 -4000 +11240 -2240 +11240 -2220 +11240 4980 +11240 8360 +11240 12460 +11240 13260 +11240 13640 +11240 18000 +11240 18940 +11240 19000 +11260 -17780 +11260 -17740 +11260 -17540 +11260 -17460 +11260 -17340 +11260 -17260 +11260 -17200 +11260 -17140 +11260 -17100 +11260 -17080 +11260 -17000 +11260 -14940 +11260 -14920 +11260 -14760 +11260 -14740 +11260 -10320 +11260 -10300 +11260 -10280 +11260 -7620 +11260 -7600 +11260 -7580 +11260 -6580 +11260 -4480 +11260 -4460 +11260 -4000 +11260 3000 +11260 3020 +11260 5000 +11260 12500 +11260 13040 +11260 13640 +11260 18000 +11260 18960 +11260 18980 +11280 -17780 +11280 -17700 +11280 -17680 +11280 -17500 +11280 -17400 +11280 -17380 +11280 -17280 +11280 -17260 +11280 -17120 +11280 -17040 +11280 -10300 +11280 -10280 +11280 -7640 +11280 -7620 +11280 -7600 +11280 -7580 +11280 -4460 +11280 -4440 +11280 -3980 +11280 -3940 +11280 -3920 +11280 -2220 +11280 2980 +11280 3000 +11280 3020 +11280 3160 +11280 4760 +11280 4960 +11280 4980 +11280 13660 +11280 17960 +11280 18000 +11280 18160 +11280 21840 +11300 -14680 +11300 -14580 +11300 -14520 +11300 -13980 +11300 -13900 +11300 -13840 +11300 -13780 +11300 -13560 +11300 -13540 +11300 -13520 +11300 -13300 +11300 -12920 +11300 -12880 +11300 -12860 +11300 -12840 +11300 -12820 +11300 -12800 +11300 -12780 +11300 -12680 +11300 -12660 +11300 -12640 +11300 -12620 +11300 -12600 +11300 -12580 +11300 -12560 +11300 -12540 +11300 -12520 +11300 -12500 +11300 -12480 +11300 -12460 +11300 -12440 +11300 -12420 +11300 -12400 +11300 -12380 +11300 -12360 +11300 -12340 +11300 -12320 +11300 -12300 +11300 -12280 +11300 -12260 +11300 -12240 +11300 -12220 +11300 -12200 +11300 -12180 +11300 -12160 +11300 -12140 +11300 -12120 +11300 -12100 +11300 -12060 +11300 -12040 +11300 -12020 +11300 -12000 +11300 -11980 +11300 -11960 +11300 -11940 +11300 -11900 +11300 -11820 +11300 -11800 +11300 -11780 +11300 -11760 +11300 -11740 +11300 -11720 +11300 -11700 +11300 -11680 +11300 -11660 +11300 -11640 +11300 -11620 +11300 -11600 +11300 -11580 +11300 -11560 +11300 -11540 +11300 -11520 +11300 -11500 +11300 -11460 +11300 -11440 +11300 -11420 +11300 -11400 +11300 -11380 +11300 -11360 +11300 -11340 +11300 -11320 +11300 -11300 +11300 -11280 +11300 -11260 +11300 -11240 +11300 -11220 +11300 -11200 +11300 -11180 +11300 -11160 +11300 -11140 +11300 -11120 +11300 -11100 +11300 -11060 +11300 -11040 +11300 -11020 +11300 -11000 +11300 -10980 +11300 -10960 +11300 -10300 +11300 -10280 +11300 -10260 +11300 -7640 +11300 -7620 +11300 -7600 +11300 -7580 +11300 -4480 +11300 -4460 +11300 -4340 +11300 -3280 +11300 3000 +11300 3020 +11300 3160 +11300 13660 +11300 13680 +11300 18000 +11300 18980 +11300 22340 +11320 -14860 +11320 -13840 +11320 -13620 +11320 -13600 +11320 -13500 +11320 -13280 +11320 -13260 +11320 -13240 +11320 -13220 +11320 -13140 +11320 -13120 +11320 -12880 +11320 -12780 +11320 -12760 +11320 -12720 +11320 -12700 +11320 -12680 +11320 -12660 +11320 -12640 +11320 -12560 +11320 -12540 +11320 -12520 +11320 -12500 +11320 -12460 +11320 -12440 +11320 -12300 +11320 -12200 +11320 -12020 +11320 -11800 +11320 -11500 +11320 -11160 +11320 -10940 +11320 -10920 +11320 -10300 +11320 -10280 +11320 -10260 +11320 -7620 +11320 -7600 +11320 -7580 +11320 -4940 +11320 -4860 +11320 -4840 +11320 -4680 +11320 -4460 +11320 -4320 +11320 3000 +11320 3020 +11320 12580 +11320 12620 +11320 13640 +11320 13660 +11320 18960 +11320 18980 +11320 22540 +11340 -14460 +11340 -14260 +11340 -12680 +11340 -12520 +11340 -11940 +11340 -11860 +11340 -11800 +11340 -11180 +11340 -10300 +11340 -10280 +11340 -10260 +11340 -7640 +11340 -7620 +11340 -7600 +11340 -7580 +11340 -5000 +11340 -4960 +11340 -4900 +11340 -4880 +11340 -4840 +11340 -4820 +11340 -4800 +11340 -4780 +11340 -4660 +11340 -4640 +11340 -4620 +11340 -4600 +11340 -4480 +11340 -4460 +11340 -4340 +11340 -2220 +11340 3000 +11340 4540 +11340 4580 +11340 12580 +11340 12620 +11340 13680 +11340 13700 +11340 18160 +11340 18980 +11340 21820 +11340 21840 +11360 -14300 +11360 -14220 +11360 -14160 +11360 -13060 +11360 -12900 +11360 -12820 +11360 -12720 +11360 -11940 +11360 -11920 +11360 -11820 +11360 -10300 +11360 -10280 +11360 -10260 +11360 -7620 +11360 -7600 +11360 -7580 +11360 -7560 +11360 -5120 +11360 -5100 +11360 -5080 +11360 -5060 +11360 -5040 +11360 -5020 +11360 -5000 +11360 -4980 +11360 -4960 +11360 -4940 +11360 -4920 +11360 -4900 +11360 -4880 +11360 -4860 +11360 -4840 +11360 -4820 +11360 -4800 +11360 -4780 +11360 -4760 +11360 -4740 +11360 -4720 +11360 -4700 +11360 -4680 +11360 -4660 +11360 -4640 +11360 -4620 +11360 -4600 +11360 -4480 +11360 -4460 +11360 -4340 +11360 -2220 +11360 3000 +11360 3020 +11360 3200 +11360 12620 +11360 12680 +11360 18940 +11360 18980 +11380 -14120 +11380 -12820 +11380 -12700 +11380 -11540 +11380 -11180 +11380 -10300 +11380 -10280 +11380 -7620 +11380 -7600 +11380 -7580 +11380 -5120 +11380 -5100 +11380 -5080 +11380 -5060 +11380 -5040 +11380 -5020 +11380 -4960 +11380 -4940 +11380 -4920 +11380 -4900 +11380 -4860 +11380 -4460 +11380 -4000 +11380 -2260 +11380 -2220 +11380 3000 +11380 3020 +11380 7960 +11380 8020 +11380 8120 +11380 8160 +11380 8240 +11380 11780 +11380 12720 +11380 18720 +11380 18940 +11400 -14160 +11400 -13080 +11400 -13060 +11400 -12840 +11400 -12720 +11400 -11180 +11400 -10940 +11400 -10920 +11400 -10300 +11400 -10280 +11400 -7620 +11400 -7600 +11400 -7580 +11400 -5140 +11400 -5120 +11400 -5100 +11400 -4960 +11400 -4480 +11400 -4460 +11400 3000 +11400 8020 +11400 11780 +11400 12620 +11400 12700 +11400 12720 +11400 13660 +11400 18700 +11420 -14200 +11420 -14020 +11420 -13940 +11420 -12820 +11420 -12740 +11420 -12720 +11420 -11940 +11420 -11920 +11420 -11900 +11420 -11880 +11420 -11860 +11420 -10880 +11420 -10500 +11420 -10300 +11420 -10280 +11420 -10260 +11420 -7620 +11420 -7600 +11420 -7580 +11420 -5120 +11420 -5100 +11420 -4460 +11420 -4320 +11420 -2220 +11420 3000 +11420 3260 +11420 6220 +11420 6260 +11420 8040 +11420 8080 +11420 8100 +11420 8960 +11420 12620 +11420 13660 +11420 13700 +11420 16580 +11420 17920 +11420 18660 +11420 18960 +11440 -14420 +11440 -14180 +11440 -12900 +11440 -12820 +11440 -11180 +11440 -10300 +11440 -10280 +11440 -7620 +11440 -7600 +11440 -7580 +11440 -5120 +11440 -5100 +11440 -4460 +11440 -4000 +11440 3000 +11440 3020 +11440 4600 +11440 4780 +11440 8200 +11440 12520 +11440 12680 +11440 12780 +11440 12800 +11440 13680 +11440 17920 +11440 18740 +11460 -14000 +11460 -13300 +11460 -13220 +11460 -11180 +11460 -10940 +11460 -10500 +11460 -10300 +11460 -10280 +11460 -10260 +11460 -7640 +11460 -7620 +11460 -7600 +11460 -7580 +11460 -5120 +11460 -5100 +11460 -4460 +11460 3000 +11460 3020 +11460 4600 +11460 6200 +11460 12560 +11460 12740 +11460 13660 +11460 16560 +11460 16600 +11460 17740 +11460 18640 +11460 18940 +11480 -15340 +11480 -15260 +11480 -15200 +11480 -14440 +11480 -13260 +11480 -10320 +11480 -10300 +11480 -10280 +11480 -7620 +11480 -7600 +11480 -7580 +11480 -5120 +11480 -5100 +11480 -4480 +11480 -4460 +11480 -3400 +11480 3000 +11480 6280 +11480 12680 +11480 12700 +11480 16080 +11480 16240 +11480 17740 +11480 18560 +11480 18940 +11500 -15340 +11500 -15320 +11500 -15220 +11500 -14040 +11500 -13940 +11500 -11180 +11500 -10300 +11500 -10280 +11500 -7620 +11500 -7600 +11500 -7580 +11500 -5120 +11500 -5100 +11500 -4480 +11500 -4460 +11500 -2340 +11500 -2220 +11500 2980 +11500 3000 +11500 3020 +11500 12740 +11500 14100 +11500 14160 +11500 16080 +11500 16100 +11500 16220 +11500 17680 +11500 17720 +11500 18620 +11500 18660 +11500 18940 +11500 22320 +11520 -11180 +11520 -10300 +11520 -10280 +11520 -10260 +11520 -7620 +11520 -7600 +11520 -7580 +11520 -5120 +11520 -5100 +11520 -3340 +11520 3000 +11520 3020 +11520 3160 +11520 4980 +11520 6100 +11520 12360 +11520 12800 +11520 13100 +11520 13660 +11520 16480 +11520 16520 +11520 16540 +11520 17700 +11520 17840 +11520 18580 +11540 -15060 +11540 -15020 +11540 -14080 +11540 -13860 +11540 -13840 +11540 -11160 +11540 -10520 +11540 -10300 +11540 -10280 +11540 -7620 +11540 -7600 +11540 -7580 +11540 -6720 +11540 -5120 +11540 -5100 +11540 -4460 +11540 -4340 +11540 -4320 +11540 3000 +11540 3020 +11540 4060 +11540 4760 +11540 12380 +11540 12540 +11540 12580 +11540 12800 +11540 16460 +11540 16500 +11540 16520 +11540 16540 +11540 17700 +11540 17820 +11540 17920 +11540 17960 +11540 18440 +11540 18640 +11540 18760 +11540 18860 +11540 19100 +11540 23080 +11560 -14940 +11560 -14920 +11560 -14900 +11560 -14880 +11560 -14860 +11560 -14820 +11560 -14800 +11560 -14780 +11560 -14760 +11560 -14740 +11560 -14720 +11560 -14620 +11560 -14560 +11560 -13680 +11560 -13280 +11560 -13180 +11560 -13100 +11560 -11160 +11560 -10320 +11560 -10300 +11560 -10280 +11560 -10260 +11560 -7620 +11560 -7600 +11560 -7580 +11560 -5120 +11560 -5100 +11560 -4460 +11560 -4360 +11560 -4320 +11560 -4000 +11560 -3380 +11560 3000 +11560 4240 +11560 5000 +11560 12360 +11560 12540 +11560 13660 +11560 13680 +11560 16500 +11560 17680 +11560 17840 +11560 17940 +11560 18620 +11560 22300 +11580 -14580 +11580 -14540 +11580 -14500 +11580 -13680 +11580 -13240 +11580 -12900 +11580 -11180 +11580 -10300 +11580 -10280 +11580 -10260 +11580 -7640 +11580 -7620 +11580 -7600 +11580 -5120 +11580 -5100 +11580 -4480 +11580 3000 +11580 3020 +11580 3220 +11580 4860 +11580 4880 +11580 5000 +11580 6020 +11580 12640 +11580 12700 +11580 13680 +11580 17920 +11580 17940 +11580 17960 +11580 18000 +11580 18560 +11580 18620 +11580 19000 +11600 -14120 +11600 -13100 +11600 -11180 +11600 -10960 +11600 -10760 +11600 -10300 +11600 -10280 +11600 -10260 +11600 -7620 +11600 -7600 +11600 -7580 +11600 -5120 +11600 -5100 +11600 -4480 +11600 3000 +11600 3040 +11600 5000 +11600 9940 +11600 12680 +11600 13040 +11600 13680 +11600 16220 +11600 16260 +11600 17920 +11600 17960 +11600 17980 +11600 18420 +11600 18980 +11600 23140 +11620 -14320 +11620 -14280 +11620 -14160 +11620 -14080 +11620 -14020 +11620 -13920 +11620 -13900 +11620 -13620 +11620 -13360 +11620 -13120 +11620 -13040 +11620 -12900 +11620 -11180 +11620 -11160 +11620 -10780 +11620 -10760 +11620 -10740 +11620 -10720 +11620 -10700 +11620 -10680 +11620 -10660 +11620 -10640 +11620 -10620 +11620 -10600 +11620 -10580 +11620 -10560 +11620 -10540 +11620 -10520 +11620 -10500 +11620 -10480 +11620 -10460 +11620 -10440 +11620 -10420 +11620 -10400 +11620 -10380 +11620 -10360 +11620 -10340 +11620 -10320 +11620 -10300 +11620 -10280 +11620 -10260 +11620 -10240 +11620 -7620 +11620 -7600 +11620 -7580 +11620 -5100 +11620 -4460 +11620 3180 +11620 4680 +11620 5000 +11620 6140 +11620 8060 +11620 13120 +11620 13680 +11620 17900 +11620 17920 +11620 17960 +11620 18020 +11620 18460 +11620 18880 +11620 19060 +11640 -14260 +11640 -14240 +11640 -14020 +11640 -13900 +11640 -13680 +11640 -13300 +11640 -13180 +11640 -13140 +11640 -13100 +11640 -13080 +11640 -13060 +11640 -13000 +11640 -12080 +11640 -11180 +11640 -11140 +11640 -10780 +11640 -10760 +11640 -10740 +11640 -10720 +11640 -10700 +11640 -10680 +11640 -10660 +11640 -10640 +11640 -10620 +11640 -10600 +11640 -10580 +11640 -10560 +11640 -10540 +11640 -10520 +11640 -10500 +11640 -10480 +11640 -10460 +11640 -10440 +11640 -10420 +11640 -10400 +11640 -10380 +11640 -10360 +11640 -10340 +11640 -10320 +11640 -10300 +11640 -10280 +11640 -10260 +11640 -7620 +11640 -7600 +11640 -7580 +11640 -5100 +11640 -5080 +11640 -4460 +11640 -2220 +11640 3000 +11640 3040 +11640 4700 +11640 4980 +11640 5940 +11640 5960 +11640 7800 +11640 8080 +11640 8100 +11640 9860 +11640 11580 +11640 11600 +11640 16520 +11640 17260 +11640 17280 +11640 17300 +11640 17720 +11640 17740 +11640 17960 +11640 19040 +11660 -14320 +11660 -14240 +11660 -14080 +11660 -13640 +11660 -13400 +11660 -13380 +11660 -13320 +11660 -13100 +11660 -12720 +11660 -11720 +11660 -11140 +11660 -10980 +11660 -10940 +11660 -10780 +11660 -10760 +11660 -10740 +11660 -10720 +11660 -10700 +11660 -10680 +11660 -10660 +11660 -10640 +11660 -10620 +11660 -10600 +11660 -10580 +11660 -10560 +11660 -10540 +11660 -10520 +11660 -10480 +11660 -10440 +11660 -10420 +11660 -10400 +11660 -10380 +11660 -10340 +11660 -10320 +11660 -10300 +11660 -10280 +11660 -7640 +11660 -7620 +11660 -7600 +11660 -7580 +11660 -5120 +11660 -5100 +11660 -5080 +11660 -4460 +11660 -4320 +11660 -2220 +11660 3000 +11660 3020 +11660 3040 +11660 3300 +11660 3380 +11660 4900 +11660 4980 +11660 5020 +11660 5040 +11660 5060 +11660 5980 +11660 6020 +11660 6040 +11660 10620 +11660 10640 +11660 10680 +11660 10840 +11660 13680 +11660 17260 +11660 17860 +11660 17920 +11680 -14100 +11680 -13600 +11680 -13380 +11680 -13320 +11680 -12900 +11680 -12840 +11680 -12720 +11680 -12700 +11680 -11720 +11680 -11700 +11680 -11680 +11680 -11180 +11680 -10980 +11680 -10920 +11680 -10780 +11680 -10760 +11680 -10740 +11680 -7640 +11680 -7620 +11680 -7600 +11680 -7580 +11680 -5100 +11680 -5080 +11680 -4300 +11680 3000 +11680 3020 +11680 3120 +11680 3320 +11680 3360 +11680 3720 +11680 4360 +11680 4420 +11680 4480 +11680 4740 +11680 5000 +11680 5060 +11680 5080 +11680 6180 +11680 10700 +11680 10720 +11680 10760 +11680 10800 +11680 10820 +11680 10840 +11680 11700 +11680 12720 +11680 13680 +11680 17240 +11680 18440 +11680 18460 +11680 23160 +11700 -13360 +11700 -13280 +11700 -13140 +11700 -12840 +11700 -12740 +11700 -12700 +11700 -11680 +11700 -11660 +11700 -11160 +11700 -10940 +11700 -10780 +11700 -10760 +11700 -7640 +11700 -7620 +11700 -7600 +11700 -7580 +11700 -5100 +11700 -5080 +11700 3000 +11700 3020 +11700 3040 +11700 3280 +11700 4400 +11700 4440 +11700 4940 +11700 5020 +11700 5040 +11700 5060 +11700 5080 +11700 5100 +11700 5140 +11700 10680 +11700 10820 +11700 11640 +11700 11660 +11700 11680 +11700 11700 +11700 11720 +11700 11740 +11700 17240 +11700 18420 +11700 18440 +11700 18600 +11720 -13140 +11720 -13080 +11720 -13060 +11720 -12940 +11720 -12840 +11720 -12820 +11720 -12780 +11720 -12760 +11720 -11000 +11720 -10980 +11720 -10780 +11720 -10760 +11720 -7620 +11720 -7600 +11720 -7580 +11720 -5100 +11720 2980 +11720 3000 +11720 3020 +11720 3040 +11720 4540 +11720 4720 +11720 4740 +11720 5000 +11720 5060 +11720 5100 +11720 5120 +11720 5260 +11720 8860 +11720 9220 +11720 10740 +11720 12580 +11720 13440 +11720 13680 +11720 17920 +11720 18080 +11720 18400 +11720 18440 +11740 -13980 +11740 -13140 +11740 -13080 +11740 -13040 +11740 -13000 +11740 -12960 +11740 -12940 +11740 -12880 +11740 -12860 +11740 -12840 +11740 -12820 +11740 -12800 +11740 -12760 +11740 -12720 +11740 -12700 +11740 -12100 +11740 -12060 +11740 -11180 +11740 -10780 +11740 -10760 +11740 -7620 +11740 -7600 +11740 -7580 +11740 -5100 +11740 -4320 +11740 3000 +11740 3020 +11740 3160 +11740 4560 +11740 4920 +11740 4980 +11740 5120 +11740 5140 +11740 5220 +11740 5260 +11740 5300 +11740 5500 +11740 5800 +11740 6040 +11740 6560 +11740 7200 +11740 10720 +11740 11620 +11740 11680 +11740 11740 +11740 11760 +11740 12580 +11740 13320 +11740 13680 +11740 18060 +11740 18440 +11740 18460 +11740 18520 +11740 18580 +11740 23160 +11740 23180 +11760 -14680 +11760 -13200 +11760 -13100 +11760 -13060 +11760 -13000 +11760 -12920 +11760 -12900 +11760 -12740 +11760 -12720 +11760 -12160 +11760 -12140 +11760 -12060 +11760 -11180 +11760 -10980 +11760 -10780 +11760 -10760 +11760 -7640 +11760 -7620 +11760 -7600 +11760 -7580 +11760 -5100 +11760 -5080 +11760 -4460 +11760 -4320 +11760 -3280 +11760 -3260 +11760 3000 +11760 3020 +11760 3220 +11760 4620 +11760 4960 +11760 4980 +11760 5280 +11760 7020 +11760 7120 +11760 7160 +11760 7240 +11760 7340 +11760 8000 +11760 9120 +11760 9140 +11760 9320 +11760 10700 +11760 11260 +11760 11400 +11760 11760 +11760 11800 +11760 12480 +11760 12660 +11760 12800 +11760 18400 +11760 18420 +11760 18440 +11760 18460 +11760 23160 +11780 -14640 +11780 -14620 +11780 -14200 +11780 -13880 +11780 -13800 +11780 -13780 +11780 -13140 +11780 -13120 +11780 -12920 +11780 -12900 +11780 -12160 +11780 -12140 +11780 -12060 +11780 -12040 +11780 -10780 +11780 -10760 +11780 -7620 +11780 -7600 +11780 -7580 +11780 -5100 +11780 -5080 +11780 3000 +11780 3100 +11780 3160 +11780 3260 +11780 3880 +11780 6440 +11780 7320 +11780 8020 +11780 8040 +11780 8200 +11780 8240 +11780 8840 +11780 9160 +11780 9540 +11780 10700 +11780 10820 +11780 10880 +11780 10900 +11780 10980 +11780 11780 +11780 11800 +11780 11820 +11780 12340 +11780 12720 +11780 13500 +11780 13660 +11780 17480 +11780 18060 +11780 18420 +11780 18500 +11780 18580 +11780 23640 +11780 23680 +11800 -14640 +11800 -14140 +11800 -14100 +11800 -13820 +11800 -13800 +11800 -13780 +11800 -13240 +11800 -13080 +11800 -12160 +11800 -12080 +11800 -12060 +11800 -10980 +11800 -10780 +11800 -10760 +11800 -7640 +11800 -7620 +11800 -7600 +11800 -7580 +11800 -5100 +11800 -5080 +11800 3000 +11800 3520 +11800 3960 +11800 3980 +11800 4700 +11800 4820 +11800 4920 +11800 5100 +11800 5120 +11800 5180 +11800 5220 +11800 5900 +11800 6240 +11800 7020 +11800 7160 +11800 7240 +11800 8020 +11800 8040 +11800 8120 +11800 8140 +11800 8380 +11800 8440 +11800 8560 +11800 8600 +11800 8640 +11800 8660 +11800 8820 +11800 8880 +11800 9140 +11800 9340 +11800 9800 +11800 11040 +11800 11800 +11800 11820 +11800 12320 +11800 12640 +11800 12780 +11800 13360 +11800 13620 +11800 17500 +11800 18080 +11800 18420 +11800 18440 +11800 18600 +11820 -14640 +11820 -14100 +11820 -13240 +11820 -13220 +11820 -13080 +11820 -12140 +11820 -10800 +11820 -10780 +11820 -10760 +11820 -7620 +11820 -7600 +11820 -7580 +11820 -5100 +11820 -4460 +11820 -4320 +11820 -4180 +11820 3000 +11820 3280 +11820 3520 +11820 3660 +11820 3740 +11820 3880 +11820 4040 +11820 5040 +11820 5080 +11820 5340 +11820 5420 +11820 5480 +11820 5560 +11820 5640 +11820 5660 +11820 5700 +11820 6100 +11820 6260 +11820 6400 +11820 6420 +11820 6480 +11820 6540 +11820 6580 +11820 6820 +11820 6840 +11820 6960 +11820 7000 +11820 7040 +11820 7120 +11820 7140 +11820 7160 +11820 7180 +11820 7280 +11820 7300 +11820 7600 +11820 7780 +11820 7800 +11820 8020 +11820 8080 +11820 8140 +11820 8240 +11820 8260 +11820 8320 +11820 8360 +11820 8580 +11820 8880 +11820 8900 +11820 9160 +11820 9180 +11820 9200 +11820 9280 +11820 9340 +11820 9360 +11820 9380 +11820 9420 +11820 9460 +11820 9540 +11820 9580 +11820 9700 +11820 9720 +11820 9800 +11820 9860 +11820 9900 +11820 9920 +11820 9940 +11820 9960 +11820 9980 +11820 10060 +11820 10100 +11820 10180 +11820 10360 +11820 10380 +11820 10540 +11820 11300 +11820 11400 +11820 11720 +11820 11760 +11820 11780 +11820 11840 +11820 11860 +11820 11900 +11820 12420 +11820 12840 +11820 12900 +11820 12920 +11820 13140 +11820 17920 +11820 17940 +11820 18020 +11820 18380 +11820 18460 +11820 22100 +11820 23780 +11840 -14640 +11840 -14620 +11840 -13240 +11840 -13080 +11840 -13040 +11840 -12120 +11840 -12100 +11840 -10980 +11840 -10960 +11840 -10780 +11840 -10760 +11840 -7620 +11840 -7600 +11840 -7580 +11840 -5100 +11840 -5080 +11840 -4180 +11840 -2520 +11840 -2220 +11840 3000 +11840 3160 +11840 3420 +11840 4060 +11840 4620 +11840 4720 +11840 5040 +11840 5120 +11840 5200 +11840 5280 +11840 5360 +11840 5420 +11840 5520 +11840 5580 +11840 5720 +11840 6020 +11840 6060 +11840 6120 +11840 6160 +11840 6200 +11840 6280 +11840 6320 +11840 6340 +11840 6360 +11840 6460 +11840 6480 +11840 6500 +11840 6580 +11840 6600 +11840 6660 +11840 6680 +11840 6700 +11840 6780 +11840 6800 +11840 6820 +11840 6880 +11840 6900 +11840 6940 +11840 6980 +11840 7000 +11840 7080 +11840 7180 +11840 7200 +11840 7240 +11840 7260 +11840 7340 +11840 7360 +11840 7420 +11840 7480 +11840 7520 +11840 7800 +11840 7820 +11840 8040 +11840 8060 +11840 8120 +11840 8160 +11840 8200 +11840 8340 +11840 8360 +11840 8400 +11840 8420 +11840 8440 +11840 8460 +11840 8560 +11840 8600 +11840 8660 +11840 8760 +11840 8800 +11840 8880 +11840 8900 +11840 8980 +11840 9000 +11840 9080 +11840 9200 +11840 9220 +11840 9280 +11840 9320 +11840 9560 +11840 9600 +11840 9760 +11840 9840 +11840 9900 +11840 9980 +11840 10040 +11840 10060 +11840 10080 +11840 10120 +11840 10140 +11840 10160 +11840 10180 +11840 10220 +11840 10240 +11840 10260 +11840 10300 +11840 10320 +11840 10340 +11840 10400 +11840 10420 +11840 10480 +11840 10500 +11840 10540 +11840 10620 +11840 10640 +11840 10660 +11840 10720 +11840 10740 +11840 10820 +11840 10920 +11840 11020 +11840 11040 +11840 11140 +11840 11200 +11840 11220 +11840 11240 +11840 11300 +11840 11640 +11840 11680 +11840 11820 +11840 11840 +11840 11860 +11840 11900 +11840 11940 +11840 11960 +11840 11980 +11840 12020 +11840 12040 +11840 12100 +11840 12140 +11840 12160 +11840 12220 +11840 12400 +11840 12460 +11840 12560 +11840 12720 +11840 12780 +11840 12920 +11840 13380 +11840 13680 +11840 14880 +11840 14900 +11840 18040 +11840 18440 +11840 22020 +11840 22060 +11840 23800 +11860 -17780 +11860 -14640 +11860 -14620 +11860 -10980 +11860 -10940 +11860 -10780 +11860 -10760 +11860 -7640 +11860 -7620 +11860 -7600 +11860 -7580 +11860 -7560 +11860 -6760 +11860 -5760 +11860 -5140 +11860 -5120 +11860 -5100 +11860 -5060 +11860 -5040 +11860 -5020 +11860 -4080 +11860 -3240 +11860 -3220 +11860 -1120 +11860 -880 +11860 -420 +11860 -180 +11860 -140 +11860 -120 +11860 -20 +11860 180 +11860 560 +11860 580 +11860 680 +11860 720 +11860 860 +11860 960 +11860 1000 +11860 1280 +11860 1420 +11860 1440 +11860 1460 +11860 2080 +11860 2100 +11860 2260 +11860 2400 +11860 2420 +11860 2520 +11860 2680 +11860 2800 +11860 2980 +11860 3000 +11860 4680 +11860 4720 +11860 4900 +11860 5360 +11860 5520 +11860 5560 +11860 5620 +11860 5660 +11860 5740 +11860 5780 +11860 5880 +11860 5900 +11860 6080 +11860 6300 +11860 6360 +11860 6380 +11860 6420 +11860 6500 +11860 6520 +11860 6540 +11860 6600 +11860 6620 +11860 6640 +11860 6660 +11860 6700 +11860 6720 +11860 6740 +11860 6760 +11860 6800 +11860 6820 +11860 6840 +11860 6860 +11860 6900 +11860 6960 +11860 7000 +11860 7020 +11860 7060 +11860 7100 +11860 7120 +11860 7240 +11860 7400 +11860 7440 +11860 7660 +11860 8120 +11860 8280 +11860 8380 +11860 9200 +11860 9240 +11860 9460 +11860 9500 +11860 9560 +11860 9660 +11860 9720 +11860 9880 +11860 9980 +11860 10120 +11860 10200 +11860 10260 +11860 10280 +11860 10300 +11860 10360 +11860 10400 +11860 10440 +11860 10460 +11860 10480 +11860 10500 +11860 10540 +11860 10560 +11860 10580 +11860 10620 +11860 10640 +11860 10660 +11860 10680 +11860 10720 +11860 10740 +11860 10800 +11860 10880 +11860 10900 +11860 10940 +11860 10960 +11860 11000 +11860 11020 +11860 11120 +11860 11160 +11860 11200 +11860 11220 +11860 11300 +11860 11460 +11860 11480 +11860 11620 +11860 11640 +11860 11680 +11860 11700 +11860 11760 +11860 11820 +11860 11840 +11860 11920 +11860 11940 +11860 11980 +11860 12000 +11860 12020 +11860 12040 +11860 12060 +11860 12080 +11860 12120 +11860 12140 +11860 12160 +11860 12180 +11860 12200 +11860 12220 +11860 12240 +11860 12300 +11860 12440 +11860 12500 +11860 12580 +11860 12620 +11860 12780 +11860 12820 +11860 12840 +11860 12880 +11860 12900 +11860 12940 +11860 12960 +11860 13000 +11860 13020 +11860 13040 +11860 13120 +11860 13280 +11860 13300 +11860 13380 +11860 13400 +11860 13440 +11860 13680 +11860 17920 +11860 17960 +11860 18560 +11880 -14640 +11880 -10980 +11880 -10940 +11880 -10780 +11880 -10760 +11880 -7620 +11880 -7600 +11880 -7580 +11880 -6900 +11880 -6880 +11880 -6740 +11880 -6700 +11880 -6580 +11880 -6540 +11880 -6500 +11880 -6400 +11880 -6380 +11880 -6360 +11880 -6320 +11880 -6300 +11880 -6280 +11880 -6260 +11880 -6240 +11880 -6220 +11880 -6200 +11880 -6180 +11880 -6160 +11880 -6140 +11880 -6120 +11880 -6100 +11880 -6080 +11880 -6060 +11880 -6040 +11880 -6020 +11880 -6000 +11880 -5980 +11880 -5960 +11880 -5940 +11880 -5920 +11880 -5880 +11880 -5840 +11880 -5820 +11880 -5800 +11880 -5780 +11880 -5760 +11880 -5720 +11880 -5700 +11880 -5620 +11880 -5600 +11880 -5540 +11880 -5500 +11880 -5440 +11880 -5400 +11880 -5380 +11880 -5320 +11880 -5260 +11880 -5240 +11880 -5200 +11880 -5180 +11880 -5160 +11880 -5140 +11880 -5120 +11880 -5100 +11880 -5040 +11880 -4320 +11880 -4300 +11880 -4260 +11880 -4240 +11880 -4080 +11880 -4060 +11880 -4000 +11880 -3980 +11880 -3960 +11880 -3940 +11880 -3920 +11880 -3900 +11880 -3880 +11880 -3860 +11880 -3820 +11880 -3800 +11880 -3780 +11880 -3760 +11880 -3740 +11880 -3700 +11880 -3640 +11880 -3620 +11880 -3600 +11880 -3580 +11880 -3560 +11880 -3520 +11880 -3480 +11880 -3460 +11880 -3440 +11880 -3420 +11880 -3400 +11880 -3360 +11880 -3340 +11880 -3300 +11880 -3080 +11880 -3020 +11880 -3000 +11880 -2720 +11880 -2680 +11880 -2640 +11880 -2600 +11880 -2520 +11880 -2500 +11880 -2460 +11880 -2440 +11880 -2420 +11880 -2400 +11880 -2380 +11880 -2360 +11880 -2340 +11880 -2300 +11880 -2280 +11880 -2240 +11880 -2220 +11880 -2180 +11880 -2160 +11880 -2140 +11880 -2120 +11880 -2100 +11880 -2080 +11880 -2060 +11880 -2040 +11880 -2020 +11880 -2000 +11880 -1980 +11880 -1960 +11880 -1940 +11880 -1920 +11880 -1900 +11880 -1880 +11880 -1860 +11880 -1840 +11880 -1820 +11880 -1800 +11880 -1780 +11880 -1760 +11880 -1740 +11880 -1720 +11880 -1700 +11880 -1620 +11880 -1600 +11880 -1580 +11880 -1560 +11880 -1520 +11880 -1460 +11880 -1440 +11880 -1420 +11880 -1400 +11880 -1340 +11880 -1320 +11880 -1300 +11880 -1280 +11880 -1260 +11880 -1220 +11880 -1180 +11880 -1140 +11880 -1120 +11880 -1100 +11880 -1080 +11880 -1060 +11880 -1040 +11880 -1020 +11880 -1000 +11880 -980 +11880 -960 +11880 -940 +11880 -920 +11880 -900 +11880 -880 +11880 -860 +11880 -840 +11880 -820 +11880 -800 +11880 -780 +11880 -760 +11880 -740 +11880 -720 +11880 -700 +11880 -680 +11880 -660 +11880 -640 +11880 -620 +11880 -600 +11880 -580 +11880 -560 +11880 -540 +11880 -520 +11880 -500 +11880 -480 +11880 -460 +11880 -440 +11880 -420 +11880 -400 +11880 -380 +11880 -360 +11880 -340 +11880 -320 +11880 -300 +11880 -280 +11880 -260 +11880 -240 +11880 -220 +11880 -200 +11880 -180 +11880 -160 +11880 -140 +11880 -120 +11880 -100 +11880 -60 +11880 -40 +11880 0 +11880 20 +11880 40 +11880 60 +11880 80 +11880 140 +11880 160 +11880 180 +11880 200 +11880 220 +11880 260 +11880 300 +11880 320 +11880 340 +11880 360 +11880 400 +11880 420 +11880 440 +11880 460 +11880 480 +11880 500 +11880 520 +11880 540 +11880 560 +11880 580 +11880 600 +11880 620 +11880 640 +11880 660 +11880 680 +11880 700 +11880 720 +11880 740 +11880 760 +11880 780 +11880 800 +11880 820 +11880 840 +11880 860 +11880 880 +11880 900 +11880 920 +11880 940 +11880 960 +11880 980 +11880 1000 +11880 1020 +11880 1040 +11880 1060 +11880 1080 +11880 1100 +11880 1120 +11880 1140 +11880 1160 +11880 1180 +11880 1200 +11880 1220 +11880 1240 +11880 1260 +11880 1280 +11880 1300 +11880 1320 +11880 1340 +11880 1360 +11880 1380 +11880 1400 +11880 1420 +11880 1440 +11880 1460 +11880 1480 +11880 1500 +11880 1520 +11880 1540 +11880 1580 +11880 1620 +11880 1640 +11880 1660 +11880 1680 +11880 1700 +11880 1720 +11880 1740 +11880 1760 +11880 1780 +11880 1800 +11880 1820 +11880 1840 +11880 1860 +11880 1880 +11880 1900 +11880 1920 +11880 1940 +11880 1960 +11880 1980 +11880 2000 +11880 2020 +11880 2040 +11880 2060 +11880 2080 +11880 2100 +11880 2120 +11880 2140 +11880 2160 +11880 2180 +11880 2200 +11880 2220 +11880 2240 +11880 2260 +11880 2280 +11880 2300 +11880 2320 +11880 2340 +11880 2360 +11880 2380 +11880 2400 +11880 2420 +11880 2440 +11880 2460 +11880 2480 +11880 2500 +11880 2520 +11880 2540 +11880 2560 +11880 2580 +11880 2600 +11880 2620 +11880 2640 +11880 2660 +11880 2680 +11880 2700 +11880 2720 +11880 2740 +11880 2760 +11880 2780 +11880 2800 +11880 2820 +11880 2840 +11880 2860 +11880 2880 +11880 2900 +11880 2920 +11880 2940 +11880 2960 +11880 2980 +11880 3000 +11880 3380 +11880 3700 +11880 3820 +11880 4560 +11880 4800 +11880 5140 +11880 5200 +11880 5240 +11880 5320 +11880 5980 +11880 6820 +11880 6840 +11880 6940 +11880 7020 +11880 7040 +11880 7120 +11880 7140 +11880 7280 +11880 7400 +11880 7480 +11880 7560 +11880 7600 +11880 7640 +11880 7680 +11880 7780 +11880 7820 +11880 7880 +11880 7920 +11880 7980 +11880 8020 +11880 8080 +11880 8100 +11880 8180 +11880 8340 +11880 8420 +11880 8460 +11880 8500 +11880 8520 +11880 8580 +11880 8600 +11880 8700 +11880 8720 +11880 8820 +11880 8920 +11880 9040 +11880 9100 +11880 9160 +11880 9260 +11880 9300 +11880 9340 +11880 9380 +11880 9440 +11880 9540 +11880 9620 +11880 9760 +11880 9920 +11880 9940 +11880 10020 +11880 10100 +11880 10440 +11880 10480 +11880 11120 +11880 11140 +11880 11240 +11880 11260 +11880 11300 +11880 11360 +11880 11380 +11880 11400 +11880 11460 +11880 11540 +11880 11560 +11880 11580 +11880 11620 +11880 11660 +11880 11680 +11880 11800 +11880 11820 +11880 11880 +11880 11940 +11880 11960 +11880 12040 +11880 12080 +11880 12180 +11880 12220 +11880 12240 +11880 12280 +11880 12300 +11880 12320 +11880 12380 +11880 12400 +11880 12440 +11880 12460 +11880 12480 +11880 12500 +11880 12520 +11880 12560 +11880 12620 +11880 12780 +11880 12960 +11880 12980 +11880 13000 +11880 13020 +11880 13060 +11880 13120 +11880 16180 +11880 17840 +11880 18020 +11880 22520 +11900 -15820 +11900 -14640 +11900 -12380 +11900 -12360 +11900 -12340 +11900 -12320 +11900 -10780 +11900 -10760 +11900 -7640 +11900 -7620 +11900 -7600 +11900 -7580 +11900 -6900 +11900 -6880 +11900 -6840 +11900 -6820 +11900 -6800 +11900 -6780 +11900 -6760 +11900 -6740 +11900 -6720 +11900 -6700 +11900 -6680 +11900 -6660 +11900 -6640 +11900 -6620 +11900 -6600 +11900 -6580 +11900 -6560 +11900 -6540 +11900 -6520 +11900 -6500 +11900 -6480 +11900 -6460 +11900 -6440 +11900 -6420 +11900 -6400 +11900 -6380 +11900 -6360 +11900 -6340 +11900 -6320 +11900 -6300 +11900 -6280 +11900 -6260 +11900 -6240 +11900 -6220 +11900 -6200 +11900 -6180 +11900 -6160 +11900 -6140 +11900 -6120 +11900 -6100 +11900 -6080 +11900 -6060 +11900 -6040 +11900 -6020 +11900 -6000 +11900 -5980 +11900 -5960 +11900 -5940 +11900 -5920 +11900 -5900 +11900 -5880 +11900 -5860 +11900 -5840 +11900 -5820 +11900 -5800 +11900 -5780 +11900 -5760 +11900 -5740 +11900 -5720 +11900 -5700 +11900 -5680 +11900 -5660 +11900 -5640 +11900 -5620 +11900 -5600 +11900 -5580 +11900 -5560 +11900 -5540 +11900 -5520 +11900 -5500 +11900 -5480 +11900 -5460 +11900 -5440 +11900 -5420 +11900 -5400 +11900 -5380 +11900 -5360 +11900 -5340 +11900 -5320 +11900 -5300 +11900 -5280 +11900 -5260 +11900 -5240 +11900 -5220 +11900 -5200 +11900 -5180 +11900 -5160 +11900 -5140 +11900 -5120 +11900 -5100 +11900 -5080 +11900 -5060 +11900 -5040 +11900 -4300 +11900 -4280 +11900 -4260 +11900 -4220 +11900 -4200 +11900 -4180 +11900 -4160 +11900 -4120 +11900 -4100 +11900 -3960 +11900 -3940 +11900 -3880 +11900 -3860 +11900 -3840 +11900 -3800 +11900 -3780 +11900 -3740 +11900 -3720 +11900 -3680 +11900 -3660 +11900 -3620 +11900 -3580 +11900 -3540 +11900 -3480 +11900 -3140 +11900 -3120 +11900 -3080 +11900 -3040 +11900 -3020 +11900 -2820 +11900 -2800 +11900 -2600 +11900 -2540 +11900 -2360 +11900 -2300 +11900 -2240 +11900 -2220 +11900 -2180 +11900 -2160 +11900 -2140 +11900 -2120 +11900 -2100 +11900 -2060 +11900 -2040 +11900 -2000 +11900 -1980 +11900 -1940 +11900 -1900 +11900 -1860 +11900 -1820 +11900 -1700 +11900 -1680 +11900 -1660 +11900 -1640 +11900 -1620 +11900 -1600 +11900 -1580 +11900 -1560 +11900 -1540 +11900 -1520 +11900 -1500 +11900 -1480 +11900 -1460 +11900 -1440 +11900 -1420 +11900 -1400 +11900 -1380 +11900 -1360 +11900 -1340 +11900 -1320 +11900 -1300 +11900 -1280 +11900 -1260 +11900 -1240 +11900 -1220 +11900 -1200 +11900 -1180 +11900 -1160 +11900 -920 +11900 -780 +11900 -600 +11900 -540 +11900 -440 +11900 -400 +11900 -260 +11900 -240 +11900 -120 +11900 -100 +11900 -80 +11900 -60 +11900 -40 +11900 -20 +11900 0 +11900 20 +11900 40 +11900 60 +11900 80 +11900 100 +11900 120 +11900 140 +11900 160 +11900 180 +11900 200 +11900 220 +11900 240 +11900 260 +11900 280 +11900 300 +11900 320 +11900 340 +11900 360 +11900 380 +11900 400 +11900 420 +11900 440 +11900 460 +11900 480 +11900 760 +11900 900 +11900 980 +11900 1180 +11900 1400 +11900 1480 +11900 1500 +11900 1520 +11900 1540 +11900 1560 +11900 1580 +11900 1600 +11900 1620 +11900 1640 +11900 1660 +11900 1680 +11900 1700 +11900 1720 +11900 1740 +11900 1760 +11900 1780 +11900 1800 +11900 1820 +11900 1840 +11900 1860 +11900 1880 +11900 1900 +11900 1940 +11900 1960 +11900 1980 +11900 2000 +11900 2020 +11900 2040 +11900 2080 +11900 2100 +11900 2120 +11900 2340 +11900 2360 +11900 2380 +11900 2540 +11900 2580 +11900 2640 +11900 2660 +11900 2860 +11900 2940 +11900 2960 +11900 3260 +11900 3300 +11900 3420 +11900 3480 +11900 3520 +11900 3540 +11900 3580 +11900 3600 +11900 3640 +11900 3720 +11900 3740 +11900 3780 +11900 3800 +11900 4200 +11900 4220 +11900 4240 +11900 4600 +11900 4820 +11900 5520 +11900 5660 +11900 5760 +11900 5860 +11900 6280 +11900 6760 +11900 6880 +11900 6920 +11900 6940 +11900 7000 +11900 7340 +11900 7360 +11900 7520 +11900 7640 +11900 7680 +11900 7700 +11900 7780 +11900 7820 +11900 8000 +11900 8020 +11900 8160 +11900 8180 +11900 8400 +11900 8620 +11900 8780 +11900 8800 +11900 8900 +11900 8940 +11900 8980 +11900 9000 +11900 9040 +11900 9080 +11900 9100 +11900 9140 +11900 9160 +11900 9180 +11900 9200 +11900 9240 +11900 9260 +11900 9320 +11900 9360 +11900 9380 +11900 9400 +11900 9460 +11900 9480 +11900 9500 +11900 9820 +11900 9900 +11900 9940 +11900 10640 +11900 10700 +11900 10780 +11900 10800 +11900 10820 +11900 10920 +11900 10960 +11900 10980 +11900 11000 +11900 11100 +11900 11120 +11900 11220 +11900 11240 +11900 11260 +11900 11280 +11900 11320 +11900 11380 +11900 11500 +11900 11560 +11900 11680 +11900 12000 +11900 12020 +11900 12080 +11900 12200 +11900 12220 +11900 12280 +11900 12320 +11900 12340 +11900 12360 +11900 12380 +11900 12400 +11900 12440 +11900 12580 +11900 12720 +11900 12780 +11900 13040 +11900 13060 +11900 13080 +11900 13660 +11900 13680 +11900 15080 +11900 16180 +11900 16720 +11900 17520 +11900 17820 +11900 17840 +11900 17900 +11920 -15780 +11920 -14640 +11920 -14620 +11920 -12380 +11920 -12360 +11920 -12340 +11920 -12320 +11920 -12300 +11920 -10980 +11920 -10780 +11920 -10760 +11920 -7640 +11920 -7620 +11920 -7600 +11920 -7580 +11920 -6920 +11920 -6900 +11920 -6880 +11920 -6860 +11920 -6820 +11920 -6780 +11920 -6760 +11920 -6740 +11920 -6720 +11920 -6660 +11920 -6640 +11920 -6620 +11920 -6600 +11920 -6560 +11920 -6540 +11920 -6520 +11920 -6500 +11920 -6480 +11920 -6440 +11920 -6420 +11920 -5760 +11920 -5740 +11920 -5720 +11920 -5700 +11920 -5680 +11920 -5660 +11920 -5640 +11920 -5620 +11920 -5600 +11920 -5580 +11920 -5560 +11920 -5540 +11920 -5520 +11920 -5500 +11920 -5480 +11920 -5460 +11920 -5420 +11920 -5400 +11920 -5380 +11920 -5360 +11920 -5340 +11920 -5320 +11920 -5300 +11920 -5280 +11920 -5260 +11920 -5240 +11920 -5220 +11920 -5200 +11920 -5180 +11920 -3260 +11920 -3180 +11920 -3160 +11920 -3120 +11920 -3100 +11920 -3080 +11920 -3040 +11920 -3020 +11920 -3000 +11920 -2880 +11920 -2860 +11920 -2840 +11920 -2820 +11920 -1860 +11920 -1800 +11920 -1700 +11920 -1680 +11920 -1660 +11920 -1640 +11920 -1620 +11920 -1600 +11920 -1580 +11920 -1560 +11920 -1540 +11920 -1520 +11920 -1500 +11920 -1480 +11920 -1440 +11920 -1400 +11920 -1380 +11920 -1340 +11920 -1320 +11920 -1300 +11920 -1280 +11920 -1260 +11920 -1220 +11920 -1180 +11920 -1160 +11920 -260 +11920 -60 +11920 -20 +11920 40 +11920 60 +11920 80 +11920 100 +11920 120 +11920 160 +11920 200 +11920 220 +11920 240 +11920 280 +11920 300 +11920 360 +11920 380 +11920 400 +11920 1520 +11920 1600 +11920 1680 +11920 1720 +11920 1740 +11920 1760 +11920 1780 +11920 1820 +11920 1840 +11920 1860 +11920 1920 +11920 2260 +11920 2600 +11920 2700 +11920 3580 +11920 3680 +11920 3720 +11920 4180 +11920 4200 +11920 4220 +11920 4240 +11920 4260 +11920 4280 +11920 4300 +11920 4320 +11920 4340 +11920 4380 +11920 4400 +11920 4440 +11920 4460 +11920 4500 +11920 4560 +11920 4600 +11920 4660 +11920 4700 +11920 4720 +11920 4800 +11920 4860 +11920 4900 +11920 5060 +11920 5100 +11920 5340 +11920 5400 +11920 5440 +11920 5540 +11920 5620 +11920 5680 +11920 5700 +11920 5720 +11920 5780 +11920 5820 +11920 5860 +11920 5880 +11920 5900 +11920 5920 +11920 5940 +11920 5980 +11920 6000 +11920 6020 +11920 6060 +11920 6080 +11920 6100 +11920 6120 +11920 6140 +11920 6160 +11920 6180 +11920 6200 +11920 6220 +11920 6260 +11920 6280 +11920 6300 +11920 6340 +11920 6440 +11920 6480 +11920 7300 +11920 7320 +11920 7360 +11920 7380 +11920 7400 +11920 7420 +11920 7460 +11920 7480 +11920 7500 +11920 7520 +11920 7540 +11920 7560 +11920 7580 +11920 7600 +11920 7620 +11920 7640 +11920 7660 +11920 7680 +11920 7700 +11920 7720 +11920 7740 +11920 7780 +11920 7800 +11920 7820 +11920 7840 +11920 7860 +11920 7900 +11920 7940 +11920 8020 +11920 8880 +11920 8940 +11920 9020 +11920 9040 +11920 9060 +11920 9080 +11920 9100 +11920 9120 +11920 9140 +11920 9160 +11920 9180 +11920 9200 +11920 9220 +11920 9240 +11920 9260 +11920 9280 +11920 9300 +11920 9320 +11920 9340 +11920 9360 +11920 9380 +11920 9400 +11920 9420 +11920 9460 +11920 9480 +11920 9500 +11920 10260 +11920 10640 +11920 10660 +11920 10680 +11920 10700 +11920 10720 +11920 10740 +11920 10760 +11920 10780 +11920 10800 +11920 10820 +11920 10840 +11920 10860 +11920 10880 +11920 10900 +11920 10920 +11920 10940 +11920 10960 +11920 10980 +11920 11000 +11920 11020 +11920 11040 +11920 11060 +11920 11080 +11920 11100 +11920 11120 +11920 11140 +11920 11160 +11920 11180 +11920 11260 +11920 11280 +11920 11300 +11920 11320 +11920 12300 +11920 12320 +11920 12340 +11920 12360 +11920 12380 +11920 12400 +11920 12420 +11920 12440 +11920 12460 +11920 12480 +11920 12500 +11920 12520 +11920 12540 +11920 12560 +11920 12580 +11920 12600 +11920 12620 +11920 12640 +11920 12660 +11920 12680 +11920 12700 +11920 12720 +11920 12740 +11920 12760 +11920 12780 +11920 12800 +11920 12820 +11920 12840 +11920 12860 +11920 12880 +11920 12900 +11920 12920 +11920 13660 +11920 13680 +11920 13780 +11920 13840 +11920 13860 +11920 13900 +11920 13960 +11920 14040 +11920 14100 +11920 14240 +11920 14620 +11920 14660 +11920 14920 +11920 15120 +11920 15140 +11920 15560 +11920 15660 +11920 15680 +11920 15720 +11920 15780 +11920 15800 +11920 15820 +11920 15840 +11920 15860 +11920 15900 +11920 15920 +11920 15960 +11920 16300 +11920 16380 +11920 17220 +11920 17240 +11920 17360 +11920 17400 +11920 17420 +11920 17460 +11920 17520 +11920 17620 +11920 17640 +11920 17680 +11920 17720 +11920 17760 +11920 17780 +11920 17880 +11920 17900 +11920 17920 +11920 18500 +11940 -14620 +11940 -10780 +11940 -10760 +11940 -7640 +11940 -7620 +11940 -7600 +11940 -7580 +11940 -6960 +11940 -6940 +11940 -6920 +11940 -6900 +11940 -6880 +11940 -6840 +11940 -6820 +11940 -6800 +11940 -6760 +11940 -6740 +11940 -6680 +11940 -6640 +11940 -6620 +11940 -6580 +11940 -6520 +11940 -6500 +11940 -6480 +11940 -6460 +11940 -6440 +11940 -6420 +11940 -5780 +11940 -5760 +11940 -5740 +11940 -5720 +11940 -5700 +11940 -5680 +11940 -5660 +11940 -5600 +11940 -5540 +11940 -5500 +11940 -5480 +11940 -5460 +11940 -5440 +11940 -5420 +11940 -5360 +11940 -5340 +11940 -5320 +11940 -5300 +11940 -5280 +11940 -5260 +11940 -5240 +11940 -5220 +11940 -5200 +11940 -3460 +11940 -3320 +11940 -3300 +11940 -3280 +11940 -3260 +11940 -3240 +11940 -3220 +11940 -3200 +11940 -3180 +11940 -3160 +11940 -3140 +11940 -3120 +11940 -3100 +11940 -3080 +11940 -3060 +11940 -3040 +11940 -3020 +11940 -3000 +11940 -2980 +11940 -2960 +11940 -2940 +11940 -2920 +11940 -2900 +11940 -2880 +11940 -2860 +11940 -2840 +11940 -2820 +11940 -2800 +11940 -2780 +11940 -1900 +11940 -1860 +11940 -1840 +11940 -1820 +11940 -1800 +11940 -1780 +11940 -1760 +11940 -1740 +11940 -1720 +11940 -1700 +11940 -1680 +11940 -1660 +11940 -1640 +11940 -1620 +11940 -1600 +11940 -1580 +11940 -1560 +11940 -1540 +11940 -1520 +11940 -1500 +11940 -1480 +11940 -1460 +11940 -1440 +11940 -1420 +11940 -1380 +11940 -1360 +11940 -1340 +11940 -1320 +11940 -1300 +11940 -1280 +11940 -1260 +11940 -1240 +11940 -1220 +11940 -1200 +11940 -920 +11940 -860 +11940 -340 +11940 -220 +11940 -200 +11940 -180 +11940 -140 +11940 -120 +11940 -100 +11940 -80 +11940 -60 +11940 -40 +11940 0 +11940 20 +11940 60 +11940 80 +11940 100 +11940 120 +11940 140 +11940 160 +11940 180 +11940 200 +11940 220 +11940 240 +11940 260 +11940 280 +11940 300 +11940 320 +11940 340 +11940 360 +11940 380 +11940 400 +11940 420 +11940 440 +11940 460 +11940 480 +11940 500 +11940 520 +11940 740 +11940 900 +11940 920 +11940 940 +11940 980 +11940 1080 +11940 1120 +11940 1320 +11940 1480 +11940 1540 +11940 1560 +11940 1580 +11940 1600 +11940 1620 +11940 1640 +11940 1660 +11940 1680 +11940 1700 +11940 1720 +11940 1740 +11940 1760 +11940 1780 +11940 1800 +11940 1820 +11940 1840 +11940 1860 +11940 1900 +11940 1920 +11940 1940 +11940 1960 +11940 1980 +11940 2000 +11940 2020 +11940 2040 +11940 2060 +11940 2080 +11940 2100 +11940 2560 +11940 3380 +11940 3540 +11940 3740 +11940 3820 +11940 3840 +11940 3880 +11940 3900 +11940 3940 +11940 3960 +11940 3980 +11940 4000 +11940 4020 +11940 4040 +11940 4060 +11940 4080 +11940 4100 +11940 4140 +11940 4180 +11940 4200 +11940 4220 +11940 4240 +11940 4260 +11940 4280 +11940 4300 +11940 4320 +11940 4340 +11940 4360 +11940 4380 +11940 4400 +11940 4420 +11940 4440 +11940 4460 +11940 4480 +11940 4500 +11940 4520 +11940 4540 +11940 4560 +11940 4580 +11940 4600 +11940 4620 +11940 4640 +11940 4660 +11940 4700 +11940 4720 +11940 4760 +11940 4820 +11940 5120 +11940 5160 +11940 5400 +11940 5420 +11940 5480 +11940 5540 +11940 5560 +11940 5600 +11940 5640 +11940 5780 +11940 5800 +11940 5820 +11940 5840 +11940 5860 +11940 5880 +11940 5900 +11940 5920 +11940 5940 +11940 5960 +11940 5980 +11940 6000 +11940 6020 +11940 6040 +11940 6060 +11940 6080 +11940 6100 +11940 6120 +11940 6140 +11940 6160 +11940 6180 +11940 6200 +11940 6220 +11940 6240 +11940 6260 +11940 6280 +11940 6300 +11940 6320 +11940 6340 +11940 6360 +11940 6380 +11940 6400 +11940 6420 +11940 6440 +11940 6500 +11940 6520 +11940 6560 +11940 6600 +11940 6620 +11940 6640 +11940 6680 +11940 6700 +11940 6720 +11940 6820 +11940 6840 +11940 6860 +11940 6880 +11940 6940 +11940 6960 +11940 7000 +11940 7020 +11940 7040 +11940 7180 +11940 7200 +11940 7220 +11940 7240 +11940 7260 +11940 7280 +11940 7300 +11940 7320 +11940 7340 +11940 7360 +11940 7380 +11940 7400 +11940 7420 +11940 7440 +11940 7460 +11940 7480 +11940 7500 +11940 7520 +11940 7540 +11940 7560 +11940 7580 +11940 7600 +11940 7620 +11940 7640 +11940 7660 +11940 7680 +11940 7700 +11940 7720 +11940 7740 +11940 7760 +11940 7780 +11940 7800 +11940 7820 +11940 7840 +11940 7860 +11940 7880 +11940 7900 +11940 7920 +11940 7940 +11940 7960 +11940 7980 +11940 8020 +11940 8040 +11940 8060 +11940 8080 +11940 8100 +11940 8120 +11940 8140 +11940 8160 +11940 8180 +11940 8200 +11940 8220 +11940 8240 +11940 8260 +11940 8280 +11940 8300 +11940 8320 +11940 8340 +11940 8360 +11940 8380 +11940 8400 +11940 8420 +11940 8440 +11940 8460 +11940 8480 +11940 8500 +11940 8520 +11940 8540 +11940 8560 +11940 8580 +11940 8600 +11940 8620 +11940 8640 +11940 8660 +11940 8680 +11940 8700 +11940 8720 +11940 8740 +11940 8760 +11940 8780 +11940 8800 +11940 8820 +11940 8840 +11940 8860 +11940 8880 +11940 8900 +11940 8920 +11940 8940 +11940 8960 +11940 8980 +11940 9000 +11940 9020 +11940 9040 +11940 9060 +11940 9080 +11940 9100 +11940 9120 +11940 9140 +11940 9160 +11940 9180 +11940 9200 +11940 9220 +11940 9240 +11940 9260 +11940 9280 +11940 9300 +11940 9320 +11940 9340 +11940 9360 +11940 9380 +11940 9400 +11940 9420 +11940 9440 +11940 9460 +11940 9480 +11940 9500 +11940 9520 +11940 9540 +11940 9560 +11940 9580 +11940 9600 +11940 9620 +11940 9640 +11940 9660 +11940 9680 +11940 9700 +11940 9720 +11940 9740 +11940 9760 +11940 9780 +11940 9800 +11940 9820 +11940 9840 +11940 9860 +11940 9880 +11940 9900 +11940 9920 +11940 9940 +11940 9960 +11940 9980 +11940 10000 +11940 10020 +11940 10040 +11940 10060 +11940 10080 +11940 10100 +11940 10120 +11940 10140 +11940 10160 +11940 10180 +11940 10200 +11940 10220 +11940 10240 +11940 10260 +11940 10280 +11940 10300 +11940 10320 +11940 10340 +11940 10360 +11940 10380 +11940 10400 +11940 10420 +11940 10440 +11940 10460 +11940 10480 +11940 10500 +11940 10520 +11940 10540 +11940 10560 +11940 10580 +11940 10600 +11940 10620 +11940 10640 +11940 10660 +11940 10680 +11940 10700 +11940 10720 +11940 10740 +11940 10760 +11940 10780 +11940 10800 +11940 10820 +11940 10840 +11940 10860 +11940 10880 +11940 10900 +11940 10920 +11940 10940 +11940 10960 +11940 10980 +11940 11000 +11940 11020 +11940 11040 +11940 11060 +11940 11080 +11940 11100 +11940 11120 +11940 11140 +11940 11160 +11940 11180 +11940 11200 +11940 11220 +11940 11240 +11940 11260 +11940 11280 +11940 11300 +11940 11320 +11940 11340 +11940 11360 +11940 11380 +11940 11400 +11940 11420 +11940 11440 +11940 11460 +11940 11480 +11940 11500 +11940 11520 +11940 11540 +11940 11560 +11940 11580 +11940 11600 +11940 11620 +11940 11640 +11940 11660 +11940 11680 +11940 11700 +11940 11720 +11940 11740 +11940 11760 +11940 11780 +11940 11800 +11940 11820 +11940 11840 +11940 11860 +11940 11880 +11940 11900 +11940 11920 +11940 11940 +11940 11960 +11940 11980 +11940 12000 +11940 12020 +11940 12040 +11940 12060 +11940 12080 +11940 12100 +11940 12120 +11940 12140 +11940 12160 +11940 12180 +11940 12200 +11940 12220 +11940 12240 +11940 12260 +11940 12280 +11940 12300 +11940 12320 +11940 12340 +11940 12360 +11940 12380 +11940 12400 +11940 12420 +11940 12440 +11940 12460 +11940 12480 +11940 12500 +11940 12520 +11940 12540 +11940 12560 +11940 12580 +11940 12600 +11940 12620 +11940 12640 +11940 12660 +11940 12680 +11940 12700 +11940 12720 +11940 12740 +11940 12760 +11940 12780 +11940 12800 +11940 12820 +11940 12840 +11940 12860 +11940 12880 +11940 12900 +11940 12920 +11940 12940 +11940 12960 +11940 12980 +11940 13000 +11940 13020 +11940 13040 +11940 13060 +11940 13080 +11940 13100 +11940 13120 +11940 13140 +11940 13160 +11940 13180 +11940 13200 +11940 13220 +11940 13240 +11940 13260 +11940 13280 +11940 13360 +11940 13420 +11940 13440 +11940 13480 +11940 13500 +11940 13520 +11940 13540 +11940 13560 +11940 13640 +11940 13660 +11940 13720 +11940 13800 +11940 13840 +11940 13880 +11940 13900 +11940 13920 +11940 13940 +11940 13960 +11940 13980 +11940 14000 +11940 14020 +11940 14040 +11940 14080 +11940 14100 +11940 14160 +11940 14180 +11940 14220 +11940 14260 +11940 14280 +11940 14300 +11940 14320 +11940 14360 +11940 14380 +11940 14400 +11940 14420 +11940 14440 +11940 14480 +11940 14520 +11940 14540 +11940 14580 +11940 14600 +11940 14640 +11940 14680 +11940 14700 +11940 14720 +11940 14740 +11940 14760 +11940 14780 +11940 14800 +11940 14820 +11940 14860 +11940 14920 +11940 14960 +11940 14980 +11940 15020 +11940 15060 +11940 15080 +11940 15100 +11940 15140 +11940 15160 +11940 15300 +11940 15360 +11940 15480 +11940 15500 +11940 15520 +11940 15540 +11940 15560 +11940 15580 +11940 15600 +11940 15620 +11940 15640 +11940 15660 +11940 15680 +11940 15700 +11940 15720 +11940 15740 +11940 15760 +11940 15780 +11940 15800 +11940 15820 +11940 15840 +11940 15860 +11940 15880 +11940 15900 +11940 15920 +11940 15940 +11940 15960 +11940 15980 +11940 16000 +11940 16020 +11940 16040 +11940 16060 +11940 16080 +11940 16360 +11940 16400 +11940 16420 +11940 16440 +11940 16620 +11940 16720 +11940 17200 +11940 17220 +11940 17240 +11940 17260 +11940 17280 +11940 17300 +11940 17320 +11940 17340 +11940 17360 +11940 17380 +11940 17400 +11940 17420 +11940 17440 +11940 17460 +11940 17480 +11940 17500 +11940 17520 +11940 17540 +11940 17560 +11940 17580 +11940 17600 +11940 17620 +11940 17640 +11940 17660 +11940 17680 +11940 17700 +11940 17720 +11940 17740 +11940 17760 +11940 17780 +11940 17800 +11940 22880 +11940 22940 +11960 -17760 +11960 -17740 +11960 -15800 +11960 -14640 +11960 -14620 +11960 -10980 +11960 -10780 +11960 -10760 +11960 -7620 +11960 -7600 +11960 -7580 +11960 -7540 +11960 -7140 +11960 -7020 +11960 -6980 +11960 -6960 +11960 -6940 +11960 -6920 +11960 -6900 +11960 -6880 +11960 -6860 +11960 -6840 +11960 -6820 +11960 -6800 +11960 -6780 +11960 -6760 +11960 -6740 +11960 -6720 +11960 -6700 +11960 -6680 +11960 -6660 +11960 -6640 +11960 -6620 +11960 -6600 +11960 -6580 +11960 -6560 +11960 -6540 +11960 -6520 +11960 -6500 +11960 -6480 +11960 -6460 +11960 -6440 +11960 -6300 +11960 -5900 +11960 -5800 +11960 -5780 +11960 -5760 +11960 -5740 +11960 -5720 +11960 -5700 +11960 -5680 +11960 -5660 +11960 -5640 +11960 -5620 +11960 -5600 +11960 -5580 +11960 -5560 +11960 -5480 +11960 -5460 +11960 -5440 +11960 -5420 +11960 -5400 +11960 -5380 +11960 -5360 +11960 -5340 +11960 -5320 +11960 -5300 +11960 -5280 +11960 -5260 +11960 -5240 +11960 -5220 +11960 -5200 +11960 -4460 +11960 -4120 +11960 -3980 +11960 -3960 +11960 -3940 +11960 -3900 +11960 -3820 +11960 -3700 +11960 -3660 +11960 -3560 +11960 -3540 +11960 -3520 +11960 -3480 +11960 -3460 +11960 -3440 +11960 -3420 +11960 -3400 +11960 -3380 +11960 -3360 +11960 -3340 +11960 -3320 +11960 -3300 +11960 -3280 +11960 -3260 +11960 -3240 +11960 -3220 +11960 -3200 +11960 -3180 +11960 -3160 +11960 -3140 +11960 -3120 +11960 -3100 +11960 -3080 +11960 -3060 +11960 -3040 +11960 -3020 +11960 -3000 +11960 -2980 +11960 -2960 +11960 -2940 +11960 -2920 +11960 -2900 +11960 -2880 +11960 -2860 +11960 -2840 +11960 -2820 +11960 -2800 +11960 -2780 +11960 -2760 +11960 -2740 +11960 -2720 +11960 -2700 +11960 -2680 +11960 -2660 +11960 -2640 +11960 -2620 +11960 -2600 +11960 -2580 +11960 -2560 +11960 -2540 +11960 -2520 +11960 -2500 +11960 -2480 +11960 -2460 +11960 -2440 +11960 -2420 +11960 -2400 +11960 -2380 +11960 -2360 +11960 -2340 +11960 -2320 +11960 -2300 +11960 -2280 +11960 -2260 +11960 -2240 +11960 -2220 +11960 -2200 +11960 -2180 +11960 -2160 +11960 -2140 +11960 -2120 +11960 -2100 +11960 -2080 +11960 -2060 +11960 -2040 +11960 -2020 +11960 -2000 +11960 -1980 +11960 -1960 +11960 -1940 +11960 -1920 +11960 -1900 +11960 -1880 +11960 -1860 +11960 -1840 +11960 -1820 +11960 -1800 +11960 -1780 +11960 -1760 +11960 -1740 +11960 -1720 +11960 -1700 +11960 -1680 +11960 -1660 +11960 -1640 +11960 -1620 +11960 -1600 +11960 -1580 +11960 -1560 +11960 -1540 +11960 -1520 +11960 -1500 +11960 -1480 +11960 -1460 +11960 -1440 +11960 -1420 +11960 -1400 +11960 -1380 +11960 -1360 +11960 -1340 +11960 -1320 +11960 -1300 +11960 -1280 +11960 -1260 +11960 -1240 +11960 -1220 +11960 -1200 +11960 -1180 +11960 -1160 +11960 -1140 +11960 -1120 +11960 -1100 +11960 -1080 +11960 -1060 +11960 -1040 +11960 -1020 +11960 -1000 +11960 -980 +11960 -960 +11960 -940 +11960 -920 +11960 -900 +11960 -880 +11960 -860 +11960 -840 +11960 -820 +11960 -800 +11960 -780 +11960 -760 +11960 -740 +11960 -720 +11960 -700 +11960 -680 +11960 -660 +11960 -640 +11960 -620 +11960 -600 +11960 -580 +11960 -560 +11960 -540 +11960 -520 +11960 -500 +11960 -480 +11960 -460 +11960 -440 +11960 -420 +11960 -400 +11960 -380 +11960 -360 +11960 -340 +11960 -320 +11960 -300 +11960 -280 +11960 -260 +11960 -240 +11960 -220 +11960 -200 +11960 -180 +11960 -160 +11960 -140 +11960 -120 +11960 -100 +11960 -80 +11960 -60 +11960 -40 +11960 -20 +11960 0 +11960 20 +11960 40 +11960 60 +11960 80 +11960 100 +11960 120 +11960 140 +11960 160 +11960 180 +11960 200 +11960 220 +11960 240 +11960 260 +11960 280 +11960 300 +11960 320 +11960 340 +11960 360 +11960 380 +11960 400 +11960 420 +11960 440 +11960 460 +11960 480 +11960 500 +11960 520 +11960 540 +11960 560 +11960 580 +11960 600 +11960 620 +11960 640 +11960 660 +11960 680 +11960 700 +11960 720 +11960 740 +11960 760 +11960 780 +11960 800 +11960 820 +11960 840 +11960 860 +11960 880 +11960 900 +11960 920 +11960 940 +11960 960 +11960 980 +11960 1000 +11960 1020 +11960 1040 +11960 1060 +11960 1080 +11960 1100 +11960 1120 +11960 1140 +11960 1160 +11960 1180 +11960 1200 +11960 1220 +11960 1240 +11960 1260 +11960 1280 +11960 1300 +11960 1320 +11960 1340 +11960 1360 +11960 1380 +11960 1400 +11960 1420 +11960 1440 +11960 1460 +11960 1480 +11960 1500 +11960 1520 +11960 1540 +11960 1560 +11960 1580 +11960 1600 +11960 1620 +11960 1640 +11960 1660 +11960 1680 +11960 1700 +11960 1720 +11960 1740 +11960 1760 +11960 1780 +11960 1800 +11960 1820 +11960 1840 +11960 1860 +11960 1880 +11960 1900 +11960 1920 +11960 1940 +11960 1960 +11960 1980 +11960 2000 +11960 2020 +11960 2040 +11960 2060 +11960 2080 +11960 2100 +11960 2120 +11960 2140 +11960 2160 +11960 2180 +11960 2200 +11960 2220 +11960 2240 +11960 2260 +11960 2280 +11960 2300 +11960 2320 +11960 2340 +11960 2360 +11960 2380 +11960 2400 +11960 2420 +11960 2440 +11960 2460 +11960 2480 +11960 2500 +11960 2520 +11960 2540 +11960 2560 +11960 2580 +11960 2600 +11960 2620 +11960 2640 +11960 2660 +11960 2680 +11960 2700 +11960 2720 +11960 2740 +11960 2760 +11960 2780 +11960 2800 +11960 2820 +11960 2840 +11960 2860 +11960 2880 +11960 2900 +11960 2920 +11960 2940 +11960 2960 +11960 2980 +11960 3000 +11960 3020 +11960 3040 +11960 3060 +11960 3080 +11960 3100 +11960 3120 +11960 3140 +11960 3160 +11960 3180 +11960 3200 +11960 3220 +11960 3240 +11960 3260 +11960 3280 +11960 3300 +11960 3320 +11960 3340 +11960 3360 +11960 3380 +11960 3400 +11960 3420 +11960 3440 +11960 3460 +11960 3480 +11960 3500 +11960 3520 +11960 3540 +11960 3560 +11960 3580 +11960 3600 +11960 3620 +11960 3640 +11960 3660 +11960 3680 +11960 3700 +11960 3720 +11960 3740 +11960 3760 +11960 3780 +11960 3800 +11960 3820 +11960 3840 +11960 3860 +11960 3880 +11960 3900 +11960 3920 +11960 3940 +11960 3960 +11960 3980 +11960 4000 +11960 4020 +11960 4040 +11960 4060 +11960 4080 +11960 4100 +11960 4120 +11960 4140 +11960 4160 +11960 4180 +11960 4200 +11960 4220 +11960 4240 +11960 4260 +11960 4280 +11960 4300 +11960 4320 +11960 4340 +11960 4360 +11960 4380 +11960 4400 +11960 4420 +11960 4440 +11960 4460 +11960 4480 +11960 4500 +11960 4520 +11960 4540 +11960 4560 +11960 4580 +11960 4600 +11960 4620 +11960 4640 +11960 4660 +11960 4680 +11960 4700 +11960 4720 +11960 4740 +11960 4760 +11960 4780 +11960 4800 +11960 4820 +11960 4840 +11960 4860 +11960 4880 +11960 4900 +11960 4920 +11960 4940 +11960 4960 +11960 4980 +11960 5000 +11960 5020 +11960 5040 +11960 5060 +11960 5080 +11960 5100 +11960 5120 +11960 5140 +11960 5160 +11960 5180 +11960 5200 +11960 5220 +11960 5240 +11960 5260 +11960 5280 +11960 5300 +11960 5320 +11960 5340 +11960 5360 +11960 5380 +11960 5400 +11960 5420 +11960 5440 +11960 5460 +11960 5480 +11960 5500 +11960 5520 +11960 5540 +11960 5560 +11960 5580 +11960 5600 +11960 5620 +11960 5640 +11960 5660 +11960 5680 +11960 5700 +11960 5720 +11960 5740 +11960 5760 +11960 5780 +11960 5800 +11960 5820 +11960 5840 +11960 5860 +11960 5880 +11960 5900 +11960 5920 +11960 5940 +11960 5960 +11960 5980 +11960 6000 +11960 6020 +11960 6040 +11960 6060 +11960 6080 +11960 6100 +11960 6120 +11960 6140 +11960 6160 +11960 6180 +11960 6200 +11960 6220 +11960 6240 +11960 6260 +11960 6280 +11960 6300 +11960 6320 +11960 6340 +11960 6360 +11960 6380 +11960 6400 +11960 6420 +11960 6440 +11960 6460 +11960 6480 +11960 6500 +11960 6520 +11960 6540 +11960 6560 +11960 6580 +11960 6600 +11960 6620 +11960 6640 +11960 6660 +11960 6680 +11960 6700 +11960 6720 +11960 6740 +11960 6760 +11960 6780 +11960 6800 +11960 6820 +11960 6840 +11960 6860 +11960 6880 +11960 6900 +11960 6920 +11960 6940 +11960 6960 +11960 6980 +11960 7000 +11960 7020 +11960 7040 +11960 7060 +11960 7080 +11960 7100 +11960 7120 +11960 7140 +11960 7160 +11960 7180 +11960 7200 +11960 7220 +11960 7240 +11960 7260 +11960 7280 +11960 7300 +11960 7320 +11960 7340 +11960 7360 +11960 7380 +11960 7400 +11960 7420 +11960 7440 +11960 7460 +11960 7480 +11960 7500 +11960 7520 +11960 7540 +11960 7560 +11960 7580 +11960 7600 +11960 7620 +11960 7640 +11960 7660 +11960 7680 +11960 7700 +11960 7720 +11960 7760 +11960 7780 +11960 7800 +11960 7820 +11960 7840 +11960 7860 +11960 7880 +11960 7900 +11960 7920 +11960 7940 +11960 7960 +11960 7980 +11960 8000 +11960 8020 +11960 8040 +11960 8060 +11960 8080 +11960 8100 +11960 8120 +11960 8140 +11960 8160 +11960 8180 +11960 8200 +11960 8220 +11960 8240 +11960 8260 +11960 8280 +11960 8300 +11960 8320 +11960 8340 +11960 8360 +11960 8380 +11960 8400 +11960 8420 +11960 8440 +11960 8460 +11960 8480 +11960 8500 +11960 8520 +11960 8540 +11960 8560 +11960 8580 +11960 8600 +11960 8620 +11960 8640 +11960 8660 +11960 8680 +11960 8700 +11960 8720 +11960 8740 +11960 8760 +11960 8780 +11960 8800 +11960 8820 +11960 8840 +11960 8860 +11960 8880 +11960 8900 +11960 8920 +11960 8940 +11960 8960 +11960 8980 +11960 9000 +11960 9020 +11960 9040 +11960 9060 +11960 9080 +11960 9100 +11960 9120 +11960 9140 +11960 9160 +11960 9180 +11960 9200 +11960 9220 +11960 9260 +11960 9280 +11960 9300 +11960 9320 +11960 9340 +11960 9360 +11960 9420 +11960 9440 +11960 9460 +11960 9480 +11960 9500 +11960 9520 +11960 9540 +11960 9560 +11960 9580 +11960 9600 +11960 9620 +11960 9640 +11960 9660 +11960 9680 +11960 9700 +11960 9720 +11960 9740 +11960 9760 +11960 9780 +11960 9800 +11960 9820 +11960 9840 +11960 9860 +11960 9880 +11960 9900 +11960 9920 +11960 9940 +11960 9960 +11960 9980 +11960 10000 +11960 10020 +11960 10040 +11960 10060 +11960 10080 +11960 10100 +11960 10120 +11960 10140 +11960 10160 +11960 10180 +11960 10200 +11960 10220 +11960 10240 +11960 10260 +11960 10280 +11960 10300 +11960 10320 +11960 10340 +11960 10360 +11960 10380 +11960 10420 +11960 10440 +11960 10460 +11960 10480 +11960 10500 +11960 10520 +11960 10560 +11960 10580 +11960 10600 +11960 10620 +11960 10640 +11960 10660 +11960 10680 +11960 10700 +11960 10720 +11960 10740 +11960 10780 +11960 10800 +11960 10820 +11960 10840 +11960 10920 +11960 10940 +11960 10980 +11960 11000 +11960 11020 +11960 11040 +11960 11080 +11960 11100 +11960 11120 +11960 11140 +11960 11160 +11960 11180 +11960 11220 +11960 11240 +11960 11260 +11960 11280 +11960 11300 +11960 11320 +11960 11340 +11960 11360 +11960 11380 +11960 11400 +11960 11420 +11960 11440 +11960 11460 +11960 11480 +11960 11500 +11960 11520 +11960 11540 +11960 11560 +11960 11580 +11960 11600 +11960 11620 +11960 11640 +11960 11660 +11960 11680 +11960 11700 +11960 11720 +11960 11740 +11960 11760 +11960 11780 +11960 11800 +11960 11820 +11960 11840 +11960 11860 +11960 11880 +11960 11900 +11960 11920 +11960 11940 +11960 11960 +11960 11980 +11960 12000 +11960 12020 +11960 12040 +11960 12060 +11960 12080 +11960 12100 +11960 12120 +11960 12140 +11960 12160 +11960 12180 +11960 12200 +11960 12220 +11960 12240 +11960 12260 +11960 12280 +11960 12300 +11960 12320 +11960 12340 +11960 12360 +11960 12400 +11960 12420 +11960 12440 +11960 12480 +11960 12500 +11960 12520 +11960 12560 +11960 12580 +11960 12600 +11960 12620 +11960 12640 +11960 12660 +11960 12680 +11960 12720 +11960 12740 +11960 12760 +11960 12780 +11960 12800 +11960 12820 +11960 12840 +11960 12860 +11960 12880 +11960 12900 +11960 12920 +11960 12940 +11960 12960 +11960 12980 +11960 13000 +11960 13020 +11960 13040 +11960 13060 +11960 13080 +11960 13100 +11960 13120 +11960 13140 +11960 13160 +11960 13180 +11960 13200 +11960 13220 +11960 13240 +11960 13260 +11960 13280 +11960 13300 +11960 13320 +11960 13340 +11960 13360 +11960 13380 +11960 13400 +11960 13420 +11960 13440 +11960 13460 +11960 13480 +11960 13500 +11960 13520 +11960 13540 +11960 13560 +11960 13580 +11960 13600 +11960 13620 +11960 13640 +11960 13660 +11960 13680 +11960 13700 +11960 13720 +11960 13740 +11960 13760 +11960 13780 +11960 13800 +11960 13820 +11960 13840 +11960 13860 +11960 13880 +11960 13900 +11960 13920 +11960 13940 +11960 13960 +11960 13980 +11960 14000 +11960 14020 +11960 14040 +11960 14060 +11960 14080 +11960 14100 +11960 14120 +11960 14140 +11960 14160 +11960 14180 +11960 14200 +11960 14220 +11960 14240 +11960 14260 +11960 14280 +11960 14300 +11960 14320 +11960 14340 +11960 14360 +11960 14380 +11960 14400 +11960 14420 +11960 14440 +11960 14460 +11960 14480 +11960 14500 +11960 14520 +11960 14540 +11960 14560 +11960 14580 +11960 14600 +11960 14620 +11960 14640 +11960 14660 +11960 14680 +11960 14700 +11960 14720 +11960 14740 +11960 14760 +11960 14780 +11960 14800 +11960 14820 +11960 14840 +11960 14860 +11960 14880 +11960 14900 +11960 14920 +11960 14940 +11960 14960 +11960 14980 +11960 15000 +11960 15020 +11960 15040 +11960 15060 +11960 15080 +11960 15100 +11960 15120 +11960 15140 +11960 15160 +11960 15180 +11960 15200 +11960 15220 +11960 15240 +11960 15260 +11960 15280 +11960 15300 +11960 15320 +11960 15340 +11960 15360 +11960 15380 +11960 15400 +11960 15420 +11960 15440 +11960 15460 +11960 15480 +11960 15500 +11960 15520 +11960 15540 +11960 15560 +11960 15580 +11960 15600 +11960 15620 +11960 15640 +11960 15660 +11960 15680 +11960 15700 +11960 15720 +11960 15740 +11960 15760 +11960 15780 +11960 15800 +11960 15820 +11960 15840 +11960 15860 +11960 15880 +11960 15900 +11960 15920 +11960 15940 +11960 15960 +11960 15980 +11960 16000 +11960 16020 +11960 16040 +11960 16060 +11960 16080 +11960 16100 +11960 16120 +11960 16140 +11960 16160 +11960 16180 +11960 16200 +11960 16220 +11960 16240 +11960 16260 +11960 16280 +11960 16300 +11960 16320 +11960 16340 +11960 16360 +11960 16380 +11960 16400 +11960 16420 +11960 16440 +11960 16460 +11960 16480 +11960 16500 +11960 16520 +11960 16540 +11960 16560 +11960 16580 +11960 16600 +11960 16620 +11960 16640 +11960 16660 +11960 16680 +11960 16700 +11960 16720 +11960 16740 +11960 16760 +11960 16780 +11960 16800 +11960 16820 +11960 16840 +11960 16860 +11960 16880 +11960 16900 +11960 16920 +11960 16940 +11960 16960 +11960 16980 +11960 17000 +11960 17020 +11960 17040 +11960 17060 +11960 17080 +11960 17100 +11960 17120 +11960 17140 +11960 17160 +11960 17180 +11960 17200 +11960 17220 +11960 17240 +11960 17260 +11960 17280 +11960 17300 +11960 17320 +11960 17340 +11960 17360 +11960 17380 +11960 17400 +11960 17420 +11960 17440 +11960 17460 +11960 17480 +11960 17500 +11960 17520 +11960 17540 +11960 17560 +11960 17580 +11960 17600 +11960 17620 +11960 17640 +11960 17660 +11960 17680 +11960 17700 +11960 17720 +11960 17740 +11960 17760 +11960 17780 +11960 17800 +11960 17820 +11960 17840 +11960 17860 +11960 17880 +11960 17900 +11960 17920 +11960 17940 +11960 17960 +11960 17980 +11960 18000 +11960 18020 +11960 18040 +11960 18060 +11960 18080 +11960 18100 +11960 18120 +11960 18140 +11960 18160 +11960 18180 +11960 18200 +11960 18220 +11960 18240 +11960 18260 +11960 18280 +11960 18300 +11960 18320 +11960 18340 +11960 18360 +11960 18380 +11960 18400 +11960 18420 +11960 18440 +11960 18460 +11960 18480 +11960 18500 +11960 18520 +11960 18540 +11960 18560 +11960 18580 +11960 18600 +11960 18620 +11960 18640 +11960 18660 +11960 18680 +11960 18700 +11960 18720 +11960 18740 +11960 18760 +11960 18780 +11960 18800 +11960 18820 +11960 18840 +11960 18860 +11960 18880 +11960 18900 +11960 18920 +11960 18940 +11960 18960 +11960 18980 +11960 19020 +11960 19040 +11960 19060 +11960 19080 +11960 19100 +11960 19120 +11960 19140 +11960 19160 +11960 19180 +11960 19220 +11960 19240 +11960 19280 +11960 19320 +11960 19360 +11960 22940 +11960 23820 +11980 -17740 +11980 -17720 +11980 -15800 +11980 -14640 +11980 -14620 +11980 -10980 +11980 -10780 +11980 -10760 +11980 -7640 +11980 -7620 +11980 -7600 +11980 -7580 +11980 -7560 +11980 -7540 +11980 -7520 +11980 -7500 +11980 -7480 +11980 -7460 +11980 -7440 +11980 -7420 +11980 -7400 +11980 -7380 +11980 -7360 +11980 -7340 +11980 -7320 +11980 -7300 +11980 -7280 +11980 -7260 +11980 -7240 +11980 -7220 +11980 -7200 +11980 -7180 +11980 -7160 +11980 -7140 +11980 -7120 +11980 -7100 +11980 -7080 +11980 -7060 +11980 -7040 +11980 -7020 +11980 -7000 +11980 -6980 +11980 -6960 +11980 -6940 +11980 -6920 +11980 -6900 +11980 -6880 +11980 -6860 +11980 -6840 +11980 -6820 +11980 -6800 +11980 -6780 +11980 -6760 +11980 -6740 +11980 -6720 +11980 -6700 +11980 -6680 +11980 -6660 +11980 -6640 +11980 -6620 +11980 -6600 +11980 -6580 +11980 -6560 +11980 -6540 +11980 -6520 +11980 -6500 +11980 -6480 +11980 -6460 +11980 -6440 +11980 -6420 +11980 -6400 +11980 -6380 +11980 -6360 +11980 -6340 +11980 -6320 +11980 -6300 +11980 -6280 +11980 -6260 +11980 -6240 +11980 -6220 +11980 -6200 +11980 -6180 +11980 -6160 +11980 -6140 +11980 -6120 +11980 -6100 +11980 -6080 +11980 -6060 +11980 -6040 +11980 -6020 +11980 -6000 +11980 -5980 +11980 -5960 +11980 -5940 +11980 -5920 +11980 -5900 +11980 -5880 +11980 -5860 +11980 -5840 +11980 -5820 +11980 -5800 +11980 -5780 +11980 -5760 +11980 -5740 +11980 -5720 +11980 -5700 +11980 -5680 +11980 -5660 +11980 -5640 +11980 -5620 +11980 -5600 +11980 -5580 +11980 -5560 +11980 -5540 +11980 -5520 +11980 -5500 +11980 -5480 +11980 -5460 +11980 -5440 +11980 -5420 +11980 -5400 +11980 -5380 +11980 -5360 +11980 -5340 +11980 -5320 +11980 -5300 +11980 -5280 +11980 -5260 +11980 -5240 +11980 -5220 +11980 -5200 +11980 -5180 +11980 -5160 +11980 -5140 +11980 -5120 +11980 -5100 +11980 -5080 +11980 -5060 +11980 -5040 +11980 -5020 +11980 -5000 +11980 -4980 +11980 -4960 +11980 -4940 +11980 -4920 +11980 -4900 +11980 -4880 +11980 -4860 +11980 -4840 +11980 -4820 +11980 -4800 +11980 -4780 +11980 -4760 +11980 -4740 +11980 -4720 +11980 -4700 +11980 -4680 +11980 -4660 +11980 -4640 +11980 -4620 +11980 -4600 +11980 -4580 +11980 -4560 +11980 -4540 +11980 -4520 +11980 -4500 +11980 -4480 +11980 -4460 +11980 -4440 +11980 -4420 +11980 -4400 +11980 -4380 +11980 -4360 +11980 -4340 +11980 -4320 +11980 -4300 +11980 -4280 +11980 -4260 +11980 -4240 +11980 -4220 +11980 -4200 +11980 -4180 +11980 -4160 +11980 -4140 +11980 -4120 +11980 -4100 +11980 -4080 +11980 -4060 +11980 -4040 +11980 -4020 +11980 -4000 +11980 -3980 +11980 -3960 +11980 -3940 +11980 -3920 +11980 -3900 +11980 -3880 +11980 -3860 +11980 -3840 +11980 -3820 +11980 -3800 +11980 -3780 +11980 -3760 +11980 -3740 +11980 -3720 +11980 -3700 +11980 -3680 +11980 -3660 +11980 -3640 +11980 -3620 +11980 -3600 +11980 -3580 +11980 -3560 +11980 -3540 +11980 -3520 +11980 -3500 +11980 -3480 +11980 -3460 +11980 -3440 +11980 -3420 +11980 -3400 +11980 -3380 +11980 -3360 +11980 -3340 +11980 -3320 +11980 -3300 +11980 -3280 +11980 -3260 +11980 -3240 +11980 -3220 +11980 -3200 +11980 -3180 +11980 -3160 +11980 -3140 +11980 -3120 +11980 -3100 +11980 -3080 +11980 -3060 +11980 -3040 +11980 -3020 +11980 -3000 +11980 -2980 +11980 -2960 +11980 -2940 +11980 -2920 +11980 -2900 +11980 -2880 +11980 -2860 +11980 -2840 +11980 -2820 +11980 -2800 +11980 -2780 +11980 -2760 +11980 -2740 +11980 -2720 +11980 -2700 +11980 -2680 +11980 -2660 +11980 -2640 +11980 -2620 +11980 -2600 +11980 -2580 +11980 -2560 +11980 -2540 +11980 -2520 +11980 -2500 +11980 -2480 +11980 -2460 +11980 -2440 +11980 -2420 +11980 -2400 +11980 -2380 +11980 -2360 +11980 -2340 +11980 -2320 +11980 -2300 +11980 -2280 +11980 -2260 +11980 -2240 +11980 -2220 +11980 -2200 +11980 -2180 +11980 -2160 +11980 -2140 +11980 -2120 +11980 -2100 +11980 -2080 +11980 -2060 +11980 -2040 +11980 -2020 +11980 -2000 +11980 -1980 +11980 -1960 +11980 -1940 +11980 -1920 +11980 -1900 +11980 -1880 +11980 -1860 +11980 -1840 +11980 -1820 +11980 -1800 +11980 -1780 +11980 -1760 +11980 -1740 +11980 -1720 +11980 -1700 +11980 -1680 +11980 -1660 +11980 -1640 +11980 -1620 +11980 -1540 +11980 -1520 +11980 -1500 +11980 -1480 +11980 -1460 +11980 -1420 +11980 -1400 +11980 -1380 +11980 -1360 +11980 -1340 +11980 -1320 +11980 -1300 +11980 -1280 +11980 -1260 +11980 -1240 +11980 -1220 +11980 -1200 +11980 -1180 +11980 -1160 +11980 -1140 +11980 -1120 +11980 -1100 +11980 -1080 +11980 -1060 +11980 -1040 +11980 -1020 +11980 -1000 +11980 -980 +11980 -960 +11980 -940 +11980 -920 +11980 -900 +11980 -880 +11980 -860 +11980 -840 +11980 -820 +11980 -800 +11980 -780 +11980 -760 +11980 -740 +11980 -720 +11980 -700 +11980 -680 +11980 -660 +11980 -640 +11980 -620 +11980 -600 +11980 -580 +11980 -560 +11980 -540 +11980 -520 +11980 -500 +11980 -480 +11980 -460 +11980 -440 +11980 -420 +11980 -400 +11980 -380 +11980 -360 +11980 -340 +11980 -320 +11980 -300 +11980 -280 +11980 -260 +11980 -240 +11980 -220 +11980 -200 +11980 -180 +11980 -160 +11980 -140 +11980 -120 +11980 -100 +11980 -80 +11980 -60 +11980 -40 +11980 -20 +11980 0 +11980 60 +11980 80 +11980 100 +11980 140 +11980 160 +11980 180 +11980 200 +11980 220 +11980 240 +11980 260 +11980 280 +11980 300 +11980 320 +11980 340 +11980 380 +11980 400 +11980 420 +11980 460 +11980 480 +11980 500 +11980 520 +11980 540 +11980 560 +11980 580 +11980 600 +11980 620 +11980 640 +11980 660 +11980 680 +11980 700 +11980 720 +11980 760 +11980 800 +11980 840 +11980 860 +11980 880 +11980 920 +11980 940 +11980 960 +11980 1020 +11980 1040 +11980 1060 +11980 1100 +11980 1120 +11980 1140 +11980 1180 +11980 1200 +11980 1220 +11980 1240 +11980 1280 +11980 1300 +11980 1320 +11980 1360 +11980 1380 +11980 1400 +11980 1420 +11980 1440 +11980 1460 +11980 1480 +11980 1500 +11980 1540 +11980 1560 +11980 1580 +11980 1600 +11980 1720 +11980 1740 +11980 1820 +11980 1860 +11980 1880 +11980 1900 +11980 1960 +11980 1980 +11980 2000 +11980 2040 +11980 2060 +11980 2080 +11980 2100 +11980 2120 +11980 2140 +11980 2160 +11980 2180 +11980 2200 +11980 2220 +11980 2240 +11980 2260 +11980 2280 +11980 2300 +11980 2320 +11980 2340 +11980 2380 +11980 2400 +11980 2420 +11980 2460 +11980 2480 +11980 2500 +11980 2520 +11980 2560 +11980 2580 +11980 2660 +11980 2680 +11980 2720 +11980 2740 +11980 2760 +11980 2800 +11980 2820 +11980 2840 +11980 2860 +11980 2920 +11980 2940 +11980 2960 +11980 2980 +11980 3000 +11980 3020 +11980 3040 +11980 3060 +11980 3080 +11980 3100 +11980 3120 +11980 3160 +11980 3200 +11980 3220 +11980 3260 +11980 3280 +11980 3320 +11980 3340 +11980 3360 +11980 3380 +11980 3400 +11980 3420 +11980 3440 +11980 3460 +11980 3480 +11980 3500 +11980 3520 +11980 3540 +11980 3560 +11980 3580 +11980 3600 +11980 3620 +11980 3640 +11980 3660 +11980 3680 +11980 3700 +11980 3720 +11980 3740 +11980 3820 +11980 3840 +11980 3860 +11980 3900 +11980 3920 +11980 4000 +11980 4020 +11980 4040 +11980 4060 +11980 4080 +11980 4100 +11980 4120 +11980 4140 +11980 4280 +11980 4300 +11980 4580 +11980 4700 +11980 4720 +11980 4740 +11980 4760 +11980 4780 +11980 4800 +11980 4880 +11980 4900 +11980 5100 +11980 5220 +11980 13840 +11980 14420 +11980 14460 +11980 14480 +11980 14500 +11980 14520 +11980 14560 +11980 14620 +11980 14740 +11980 14760 +11980 14780 +11980 14800 +11980 14820 +11980 14840 +11980 14880 +11980 14900 +11980 14920 +11980 14940 +11980 14980 +11980 15000 +11980 15060 +11980 15080 +11980 15100 +11980 15120 +11980 15140 +11980 15160 +11980 15180 +11980 15200 +11980 15220 +11980 15240 +11980 15260 +11980 15280 +11980 15300 +11980 15320 +11980 15340 +11980 15360 +11980 15380 +11980 15400 +11980 15420 +11980 15460 +11980 15480 +11980 15500 +11980 15520 +11980 15540 +11980 15560 +11980 15580 +11980 15600 +11980 15620 +11980 15640 +11980 15660 +11980 15680 +11980 15700 +11980 15720 +11980 15740 +11980 15760 +11980 15780 +11980 15800 +11980 15820 +11980 15840 +11980 15860 +11980 15880 +11980 15900 +11980 15920 +11980 15940 +11980 15960 +11980 15980 +11980 16000 +11980 16020 +11980 16040 +11980 16060 +11980 16080 +11980 16100 +11980 16120 +11980 16140 +11980 16160 +11980 16180 +11980 16200 +11980 16220 +11980 16240 +11980 16260 +11980 16280 +11980 16300 +11980 16320 +11980 16340 +11980 16360 +11980 16380 +11980 16400 +11980 16420 +11980 16440 +11980 16460 +11980 16480 +11980 16500 +11980 16520 +11980 16540 +11980 16560 +11980 16580 +11980 16600 +11980 16620 +11980 16640 +11980 16660 +11980 16700 +11980 16720 +11980 16740 +11980 16760 +11980 16780 +11980 16800 +11980 16820 +11980 16840 +11980 16860 +11980 16880 +11980 16900 +11980 16920 +11980 16940 +11980 16960 +11980 16980 +11980 17000 +11980 17020 +11980 17040 +11980 17060 +11980 17080 +11980 17100 +11980 17120 +11980 17160 +11980 17180 +11980 17200 +11980 17220 +11980 17240 +11980 17260 +11980 17320 +11980 17340 +11980 17360 +11980 17420 +11980 17460 +11980 17500 +11980 17520 +11980 17540 +11980 17640 +11980 17660 +11980 17720 +11980 17760 +11980 17780 +11980 17800 +11980 17820 +11980 17840 +11980 17860 +11980 17880 +11980 17900 +11980 17920 +11980 17940 +11980 17960 +11980 17980 +11980 18000 +11980 18020 +11980 18040 +11980 18060 +11980 18080 +11980 18100 +11980 18120 +11980 18140 +11980 18160 +11980 18180 +11980 18200 +11980 18220 +11980 18240 +11980 18260 +11980 18280 +11980 18300 +11980 18320 +11980 18340 +11980 18360 +11980 18380 +11980 18400 +11980 18420 +11980 18440 +11980 18460 +11980 18480 +11980 18500 +11980 18520 +11980 18540 +11980 18560 +11980 18580 +11980 18600 +11980 18620 +11980 18640 +11980 18660 +11980 18680 +11980 18700 +11980 18720 +11980 18740 +11980 18760 +11980 18780 +11980 18800 +11980 18820 +11980 18840 +11980 18860 +11980 18880 +11980 18900 +11980 18920 +11980 18940 +11980 18960 +11980 18980 +11980 19000 +11980 19020 +11980 19040 +11980 19060 +11980 19080 +11980 19100 +11980 19120 +11980 19140 +11980 19160 +11980 19180 +11980 19200 +11980 19220 +11980 19240 +11980 19260 +11980 19280 +11980 19300 +11980 19320 +11980 19340 +11980 19360 +11980 19380 +11980 19400 +12000 -14620 +12000 -10780 +12000 -10760 +12000 -7620 +12000 -7600 +12000 -7580 +12000 -7560 +12000 -7540 +12000 -7520 +12000 -7500 +12000 -7480 +12000 -7460 +12000 -7440 +12000 -7420 +12000 -7400 +12000 -7380 +12000 -7360 +12000 -7340 +12000 -7320 +12000 -7300 +12000 -7280 +12000 -7260 +12000 -7240 +12000 -7220 +12000 -7200 +12000 -7180 +12000 -7160 +12000 -7140 +12000 -7120 +12000 -7100 +12000 -7080 +12000 -7060 +12000 -7040 +12000 -7020 +12000 -7000 +12000 -6980 +12000 -6960 +12000 -6940 +12000 -6920 +12000 -6900 +12000 -6880 +12000 -6860 +12000 -6820 +12000 -6800 +12000 -6760 +12000 -6740 +12000 -6720 +12000 -6700 +12000 -6600 +12000 -6580 +12000 -6560 +12000 -6540 +12000 -6520 +12000 -6480 +12000 -6460 +12000 -6400 +12000 -6380 +12000 -6360 +12000 -6340 +12000 -6320 +12000 -6300 +12000 -6280 +12000 -6260 +12000 -6240 +12000 -6220 +12000 -6200 +12000 -6180 +12000 -6140 +12000 -6120 +12000 -6100 +12000 -6080 +12000 -6040 +12000 -6020 +12000 -6000 +12000 -5980 +12000 -5960 +12000 -5940 +12000 -5920 +12000 -5900 +12000 -5880 +12000 -5820 +12000 -5800 +12000 -5780 +12000 -5700 +12000 -5600 +12000 -5580 +12000 -5560 +12000 -5540 +12000 -5520 +12000 -5480 +12000 -5440 +12000 -5420 +12000 -5400 +12000 -5380 +12000 -5360 +12000 -5340 +12000 -5320 +12000 -5300 +12000 -5280 +12000 -5260 +12000 -5240 +12000 -5220 +12000 -5200 +12000 -5180 +12000 -5160 +12000 -5140 +12000 -5120 +12000 -5100 +12000 -5080 +12000 -5060 +12000 -5040 +12000 -5020 +12000 -5000 +12000 -4980 +12000 -4960 +12000 -4940 +12000 -4920 +12000 -4900 +12000 -4880 +12000 -4860 +12000 -4840 +12000 -4820 +12000 -4800 +12000 -4780 +12000 -4760 +12000 -4740 +12000 -4720 +12000 -4700 +12000 -4680 +12000 -4660 +12000 -4640 +12000 -4620 +12000 -4580 +12000 -4560 +12000 -4540 +12000 -4520 +12000 -4500 +12000 -4480 +12000 -4460 +12000 -4440 +12000 -4420 +12000 -4400 +12000 -4360 +12000 -4340 +12000 -4320 +12000 -4300 +12000 -4260 +12000 -4240 +12000 -4220 +12000 -4200 +12000 -4180 +12000 -4160 +12000 -4120 +12000 -4100 +12000 -4060 +12000 -4040 +12000 -4020 +12000 -4000 +12000 -3960 +12000 -3940 +12000 -3920 +12000 -3860 +12000 -3840 +12000 -3820 +12000 -3800 +12000 -3760 +12000 -3740 +12000 -3720 +12000 -3700 +12000 -3660 +12000 -3640 +12000 -3600 +12000 -3580 +12000 -3360 +12000 -3320 +12000 -3280 +12000 -3140 +12000 -3100 +12000 -3040 +12000 -2960 +12000 -2940 +12000 -2920 +12000 -2860 +12000 -2820 +12000 -2740 +12000 -2680 +12000 -2520 +12000 -2480 +12000 -2380 +12000 -2320 +12000 -2220 +12000 -1920 +12000 -1880 +12000 -1860 +12000 -1620 +12000 -1500 +12000 -1260 +12000 -1200 +12000 -1140 +12000 -1100 +12000 -880 +12000 -560 +12000 -460 +12000 -40 +12000 0 +12000 100 +12000 260 +12000 820 +12000 940 +12000 1200 +12000 1420 +12000 1440 +12000 1540 +12000 1580 +12000 1740 +12000 1900 +12000 2080 +12000 2380 +12000 2800 +12000 15180 +12000 15220 +12000 15280 +12000 15360 +12000 15380 +12000 15400 +12000 15440 +12000 15480 +12000 15500 +12000 15560 +12000 15580 +12000 15600 +12000 15620 +12000 15640 +12000 15660 +12000 15680 +12000 15720 +12000 15780 +12000 15820 +12000 15840 +12000 15860 +12000 15900 +12000 15920 +12000 15940 +12000 15960 +12000 16000 +12000 16020 +12000 16060 +12000 16120 +12000 16200 +12000 16260 +12000 16340 +12000 16380 +12000 16560 +12000 16580 +12000 16600 +12000 16800 +12000 16900 +12000 16920 +12000 16940 +12000 16960 +12000 16980 +12000 17000 +12000 17020 +12000 17040 +12000 17080 +12000 17100 +12000 17120 +12000 17140 +12000 17180 +12000 17220 +12000 17260 +12000 17300 +12000 17320 +12000 17380 +12000 17440 +12000 17640 +12000 17680 +12000 17700 +12000 17740 +12000 17760 +12000 17780 +12000 17800 +12000 17840 +12000 17860 +12000 17900 +12000 17960 +12000 18040 +12000 18080 +12000 18100 +12000 18160 +12000 18260 +12000 18500 +12000 18780 +12000 19200 +12000 19260 +12000 19300 +12000 19340 +12000 19360 +12000 19380 +12020 -17760 +12020 -14640 +12020 -14620 +12020 -10960 +12020 -10940 +12020 -10780 +12020 -10760 +12020 -6020 +12020 -5480 +12020 -4720 +12020 -4020 +12020 19320 +12020 19340 +12040 -17760 +12040 -17740 +12040 -15840 +12040 -14640 +12040 -14620 +12040 -11000 +12040 -10780 +12040 -10760 +12040 -10740 +12040 19320 +12060 -15860 +12060 -15840 +12060 -14640 +12060 -14620 +12060 -10980 +12060 -10940 +12060 -10780 +12060 -10760 +12060 19320 +12060 19340 +12060 19380 +12060 22840 +12080 -17740 +12080 -15840 +12080 -14660 +12080 -14640 +12080 -14620 +12080 -10780 +12080 -10760 +12080 19320 +12080 19340 +12080 22720 +12080 22900 +12080 23780 +12100 -17680 +12100 -15860 +12100 -14640 +12100 -14620 +12100 -10980 +12100 -10780 +12100 -10760 +12100 19320 +12100 19340 +12100 19400 +12100 22960 +12100 23800 +12120 -17660 +12120 -15860 +12120 -15180 +12120 -14640 +12120 -14620 +12120 -10780 +12120 -10760 +12120 19280 +12120 19300 +12120 19320 +12120 19340 +12140 -15900 +12140 -15880 +12140 -15860 +12140 -15840 +12140 -14660 +12140 -14640 +12140 -14620 +12140 -10980 +12140 -10780 +12140 -10760 +12140 19260 +12140 19280 +12140 19300 +12140 19320 +12140 19340 +12140 22880 +12160 -17660 +12160 -17640 +12160 -15960 +12160 -15900 +12160 -15860 +12160 -14660 +12160 -14640 +12160 -10780 +12160 -10760 +12160 19280 +12160 19300 +12160 19320 +12160 19340 +12160 19360 +12160 23820 +12160 23840 +12180 -17660 +12180 -17640 +12180 -15960 +12180 -14680 +12180 -14660 +12180 -14640 +12180 -10980 +12180 -10960 +12180 -10780 +12180 -10760 +12180 19280 +12180 19300 +12180 19320 +12180 19340 +12180 19360 +12180 23840 +12180 23860 +12200 -17660 +12200 -17640 +12200 -16000 +12200 -15980 +12200 -15960 +12200 -15140 +12200 -14680 +12200 -14660 +12200 -10960 +12200 -10940 +12200 -10780 +12200 -10760 +12200 -10740 +12200 19280 +12200 19300 +12200 19320 +12200 19340 +12200 19360 +12200 24280 +12220 -17660 +12220 -15060 +12220 -14740 +12220 -14720 +12220 -14680 +12220 -14660 +12220 -10940 +12220 -10780 +12220 -10760 +12220 19320 +12220 19340 +12220 19360 +12220 24600 +12220 24640 +12240 -17640 +12240 -14880 +12240 -14820 +12240 -14780 +12240 -14740 +12240 -14720 +12240 -14700 +12240 -14680 +12240 -14660 +12240 -11700 +12240 -11000 +12240 -10980 +12240 -10780 +12240 -10760 +12240 19320 +12240 19340 +12240 23920 +12240 24640 +12240 24660 +12260 -17660 +12260 -14880 +12260 -14860 +12260 -14780 +12260 -14760 +12260 -14720 +12260 -14660 +12260 -10780 +12260 -10760 +12260 19320 +12260 24660 +12280 -17660 +12280 -14680 +12280 -14660 +12280 -10780 +12280 -10760 +12280 -10740 +12280 19280 +12280 19300 +12280 19320 +12300 -17700 +12300 -17660 +12300 -17640 +12300 -14680 +12300 -11000 +12300 -10780 +12300 -10760 +12300 19260 +12300 19280 +12300 19300 +12300 19320 +12300 23440 +12320 -17680 +12320 -17660 +12320 -14680 +12320 -11800 +12320 -11780 +12320 -10820 +12320 -10780 +12320 -10760 +12320 19280 +12320 19300 +12320 19320 +12340 -17660 +12340 -14680 +12340 -14660 +12340 -11800 +12340 -11780 +12340 -11760 +12340 -11740 +12340 -10980 +12340 -10780 +12340 -10760 +12340 19300 +12340 19320 +12340 23440 +12340 23460 +12360 -17660 +12360 -14680 +12360 -14660 +12360 -11800 +12360 -11780 +12360 -11760 +12360 -11740 +12360 -11720 +12360 -11700 +12360 -11680 +12360 -11660 +12360 -11640 +12360 -11620 +12360 -10980 +12360 -10960 +12360 -10780 +12360 -10760 +12360 -10740 +12360 19300 +12360 19320 +12360 19340 +12360 23700 +12380 -17680 +12380 -17660 +12380 -17640 +12380 -14680 +12380 -14660 +12380 -11680 +12380 -11660 +12380 -11640 +12380 -11620 +12380 -11600 +12380 -11580 +12380 -11560 +12380 -11540 +12380 -11520 +12380 -11500 +12380 -11480 +12380 -10960 +12380 -10920 +12380 -10780 +12380 -10760 +12380 -10740 +12380 19320 +12380 19340 +12380 19360 +12400 -17660 +12400 -14680 +12400 -14660 +12400 -14640 +12400 -11580 +12400 -11560 +12400 -11540 +12400 -11520 +12400 -11500 +12400 -11480 +12400 -11460 +12400 -11440 +12400 -11420 +12400 -11380 +12400 -11360 +12400 -10940 +12400 -10780 +12400 -10760 +12400 -10740 +12400 19320 +12400 19340 +12400 19360 +12400 19380 +12420 -17700 +12420 -17680 +12420 -17660 +12420 -17640 +12420 -14880 +12420 -14760 +12420 -14680 +12420 -11440 +12420 -11420 +12420 -11400 +12420 -11380 +12420 -11360 +12420 -11340 +12420 -11320 +12420 -11300 +12420 -11280 +12420 -11260 +12420 -10980 +12420 -10960 +12420 -10800 +12420 -10760 +12420 -10740 +12420 19320 +12420 19340 +12420 19360 +12420 19380 +12420 23460 +12420 23640 +12440 -17700 +12440 -17680 +12440 -17660 +12440 -14880 +12440 -14780 +12440 -14760 +12440 -14680 +12440 -14660 +12440 -11340 +12440 -11320 +12440 -11300 +12440 -11280 +12440 -11260 +12440 -11240 +12440 -11220 +12440 -11200 +12440 -11180 +12440 -11160 +12440 -10900 +12440 -10880 +12440 -10860 +12440 -10840 +12440 -10780 +12440 -10760 +12440 -10740 +12440 19360 +12440 19380 +12440 19400 +12440 23500 +12440 23520 +12460 -17640 +12460 -14780 +12460 -14760 +12460 -14680 +12460 -14660 +12460 -11220 +12460 -11200 +12460 -11180 +12460 -11160 +12460 -11140 +12460 -11120 +12460 -11100 +12460 -11080 +12460 -11060 +12460 -11040 +12460 -11000 +12460 -10900 +12460 -10880 +12460 -10860 +12460 -10840 +12460 -10820 +12460 -10800 +12460 -10780 +12460 -10760 +12460 -10740 +12460 19320 +12460 19340 +12460 19360 +12460 19380 +12460 19400 +12460 23620 +12480 -17700 +12480 -17640 +12480 -14900 +12480 -14780 +12480 -14680 +12480 -14660 +12480 -11100 +12480 -11080 +12480 -11060 +12480 -11040 +12480 -11020 +12480 -11000 +12480 -10980 +12480 -10960 +12480 -10940 +12480 -10900 +12480 -10880 +12480 -10860 +12480 -10780 +12480 -10760 +12480 -10740 +12480 19320 +12480 19340 +12480 19360 +12480 19380 +12480 19400 +12480 22780 +12480 22800 +12480 23480 +12500 -17700 +12500 -14820 +12500 -14800 +12500 -14780 +12500 -14740 +12500 -14680 +12500 -14660 +12500 -11140 +12500 -11000 +12500 -10980 +12500 -10960 +12500 -10940 +12500 -10920 +12500 -10900 +12500 -10880 +12500 -10860 +12500 -10780 +12500 -10760 +12500 19300 +12500 19320 +12500 19340 +12500 19360 +12500 22780 +12500 23220 +12500 23240 +12500 23480 +12500 23500 +12500 23520 +12520 -17740 +12520 -17720 +12520 -17700 +12520 -17680 +12520 -17660 +12520 -17640 +12520 -14900 +12520 -14780 +12520 -14680 +12520 -14660 +12520 -10940 +12520 -10920 +12520 -10900 +12520 19320 +12520 19340 +12520 19360 +12520 23500 +12520 23520 +12520 23540 +12540 -17740 +12540 -17720 +12540 -17700 +12540 -17680 +12540 -17660 +12540 -14900 +12540 -14680 +12540 -14660 +12540 19340 +12540 19360 +12540 19400 +12540 23500 +12540 23520 +12540 23540 +12560 -17740 +12560 -17680 +12560 -17640 +12560 -14680 +12560 -14660 +12560 19340 +12560 19360 +12560 23520 +12560 23540 +12580 -17720 +12580 -17680 +12580 -17660 +12580 -17640 +12580 -14680 +12580 -14660 +12580 19320 +12580 19340 +12580 19360 +12580 19380 +12580 23480 +12580 23520 +12600 -17680 +12600 -17660 +12600 -14680 +12600 -14660 +12600 19340 +12600 19360 +12600 19380 +12600 23500 +12600 23520 +12620 -17740 +12620 -17660 +12620 -17640 +12620 -14680 +12620 -14660 +12620 19360 +12620 19380 +12620 23500 +12620 23540 +12640 -17760 +12640 -17740 +12640 -17660 +12640 -17640 +12640 -14680 +12640 -14660 +12640 19360 +12640 19380 +12640 23540 +12640 23600 +12660 -17740 +12660 -17700 +12660 -17680 +12660 -17660 +12660 -17640 +12660 -14680 +12660 -14660 +12660 19360 +12660 19380 +12660 23480 +12660 23520 +12680 -17780 +12680 -14680 +12680 -14660 +12680 19300 +12680 19340 +12680 19360 +12680 19380 +12680 22820 +12680 22880 +12680 23160 +12700 -17760 +12700 -17740 +12700 -17700 +12700 -17680 +12700 -17660 +12700 -14660 +12700 19320 +12700 19340 +12700 19360 +12700 19400 +12700 23120 +12700 23460 +12700 23500 +12700 23520 +12720 -17740 +12720 -17700 +12720 -17680 +12720 -17660 +12720 -14680 +12720 -14660 +12720 23520 +12720 23540 +12740 -17780 +12740 -17760 +12740 -17720 +12740 -17700 +12740 -17680 +12740 -17660 +12740 -14680 +12740 -14660 +12740 23520 +12740 23540 +12760 -17760 +12760 -17700 +12760 -17680 +12760 -14680 +12760 19260 +12760 23520 +12780 -17780 +12780 -17760 +12780 -17740 +12780 -17700 +12780 19240 +12780 19260 +12780 23540 +12800 -17800 +12800 -17780 +12800 -17740 +12800 -17700 +12800 19220 +12800 19240 +12800 19260 +12800 23540 +12820 -17800 +12820 -17760 +12820 -17740 +12820 -17720 +12820 -17700 +12820 -17600 +12820 19220 +12820 19240 +12820 19260 +12820 22540 +12820 22560 +12840 -17740 +12840 -17720 +12840 -17700 +12840 -17600 +12840 19220 +12840 19240 +12840 19260 +12840 22420 +12840 22500 +12840 22520 +12840 22540 +12840 22560 +12860 -17800 +12860 -17780 +12860 -17740 +12860 -17660 +12860 -17600 +12860 19220 +12860 19280 +12860 22420 +12860 22440 +12860 22460 +12860 22500 +12880 -17800 +12880 -17780 +12880 -17740 +12880 -17680 +12880 -17660 +12880 -17620 +12880 -17600 +12880 19220 +12880 19240 +12880 19260 +12880 19280 +12880 19300 +12880 22440 +12880 22500 +12880 22520 +12900 -17800 +12900 -17680 +12900 -17660 +12900 -17640 +12900 -17620 +12900 -17600 +12900 19240 +12900 19260 +12900 19280 +12900 22440 +12900 22480 +12900 22500 +12900 22540 +12900 22600 +12900 22660 +12900 22740 +12900 22800 +12900 22860 +12920 -17800 +12920 -17660 +12920 -17640 +12920 -17600 +12920 -17580 +12920 22620 +12920 22780 +12920 22800 +12920 23180 +12940 -17800 +12940 -17640 +12940 -17580 +12940 23080 +12940 23200 +12960 -17800 +12960 -17640 +12960 -17600 +12960 -17580 +12960 22460 +12960 23060 +12960 23320 +12980 -17800 +12980 19440 +12980 22420 +12980 22460 +12980 22480 +12980 22500 +12980 22540 +12980 23020 +13000 -17800 +13000 19420 +13000 19440 +13000 22420 +13000 22500 +13000 22540 +13020 -17800 +13020 -17780 +13020 -17760 +13020 -17640 +13020 22500 +13020 22520 +13020 22540 +13040 -17800 +13040 -17780 +13040 -17660 +13040 22480 +13040 22500 +13040 22560 +13040 23540 +13060 -17800 +13060 -17780 +13060 -17660 +13060 -16620 +13060 -16600 +13060 19320 +13060 23520 +13060 23540 +13080 -17780 +13080 -17080 +13080 -17040 +13080 -16680 +13080 -16620 +13080 -16600 +13080 19280 +13080 19300 +13080 19320 +13080 23520 +13080 23540 +13100 -17800 +13100 -17780 +13100 -16660 +13100 -16640 +13100 -16620 +13100 -16600 +13100 19280 +13100 19300 +13100 19320 +13100 19360 +13100 23520 +13100 23540 +13120 -16620 +13120 19300 +13120 19320 +13120 23540 +13120 23560 +13140 -16620 +13140 -16600 +13140 -16500 +13140 -16480 +13140 -16460 +13140 19280 +13140 19300 +13140 19320 +13140 19340 +13140 19360 +13140 23520 +13140 23540 +13140 23560 +13160 -16620 +13160 -16600 +13160 -16500 +13160 -16480 +13160 -16460 +13160 -16380 +13160 -16360 +13160 19260 +13160 19300 +13160 19320 +13160 19340 +13160 23460 +13160 23500 +13180 -16600 +13180 -16400 +13180 -16380 +13180 19300 +13180 19320 +13180 19340 +13180 23540 +13180 23560 +13200 -16620 +13200 -16520 +13200 -16500 +13200 -16380 +13200 -16360 +13200 19300 +13200 19320 +13200 19340 +13200 19360 +13200 23540 +13200 23560 +13220 -16620 +13220 -16600 +13220 -16560 +13220 -16540 +13220 -16500 +13220 19320 +13220 19340 +13220 19380 +13220 23540 +13220 23560 +13240 -16600 +13240 -16580 +13240 -16560 +13240 19320 +13240 19340 +13240 19380 +13240 23540 +13240 23560 +13260 -16620 +13260 -16560 +13260 -16540 +13260 -16520 +13260 -16500 +13260 19300 +13260 19320 +13260 19340 +13260 19380 +13260 19400 +13260 23540 +13260 23560 +13280 -16620 +13280 -16600 +13280 -16520 +13280 19300 +13280 19320 +13280 19340 +13300 -16640 +13300 -16620 +13300 -16600 +13300 -16540 +13300 -16520 +13300 -16500 +13300 19280 +13300 19300 +13300 19320 +13300 23540 +13320 -16620 +13320 -16520 +13320 -16480 +13320 -16460 +13320 19280 +13320 19300 +13320 19320 +13320 22280 +13320 22300 +13320 23540 +13340 -16640 +13340 -16620 +13340 -16460 +13340 19260 +13340 19280 +13340 19300 +13340 21840 +13340 23500 +13360 -16460 +13360 -10860 +13360 -10840 +13360 -10820 +13360 -10800 +13360 -10780 +13360 -10760 +13360 -10740 +13360 19280 +13360 19300 +13360 19340 +13360 21720 +13360 21780 +13360 21900 +13360 23540 +13380 -10880 +13380 -10860 +13380 -10840 +13380 -10820 +13380 -10800 +13380 -10780 +13380 -10760 +13380 -10740 +13380 19260 +13380 19280 +13380 19300 +13380 21820 +13400 -17620 +13400 -10880 +13400 -10860 +13400 -10840 +13400 -10820 +13400 -10800 +13400 -10780 +13400 -10760 +13400 -10740 +13400 19280 +13400 19300 +13400 19320 +13400 19340 +13400 21780 +13400 21880 +13420 -17780 +13420 -17620 +13420 -10880 +13420 -10860 +13420 -10780 +13420 -10760 +13420 -10740 +13420 19300 +13420 19320 +13440 -10880 +13440 -10760 +13440 -10740 +13440 19320 +13440 19340 +13440 19360 +13440 19380 +13460 -17800 +13460 -17780 +13460 -17760 +13460 -17740 +13460 -10900 +13460 -10880 +13460 -10760 +13460 -10740 +13460 19320 +13460 19340 +13460 19360 +13460 19380 +13480 -17780 +13480 -10880 +13480 -10860 +13480 -10780 +13480 -10760 +13480 -10740 +13480 19320 +13480 19340 +13480 19360 +13480 19380 +13480 21800 +13500 -17800 +13500 -17780 +13500 -17760 +13500 -10880 +13500 -10860 +13500 -10780 +13500 -10760 +13500 -10740 +13500 19320 +13500 19340 +13500 19360 +13500 19380 +13500 19400 +13500 19600 +13500 21820 +13520 -17800 +13520 -17780 +13520 -10880 +13520 -10860 +13520 -10780 +13520 -10760 +13520 19340 +13520 19360 +13520 19380 +13520 19400 +13520 19540 +13520 21880 +13520 21940 +13540 -17800 +13540 -17780 +13540 -17760 +13540 -10900 +13540 -10880 +13540 -10860 +13540 -10780 +13540 -10760 +13540 19320 +13540 19340 +13540 19360 +13540 19580 +13540 19640 +13540 21860 +13540 21880 +13560 -17800 +13560 -17780 +13560 -11840 +13560 -11780 +13560 -11720 +13560 -11540 +13560 -11420 +13560 -11400 +13560 -11380 +13560 -11100 +13560 -10880 +13560 -10860 +13560 -10780 +13560 -10760 +13560 -10740 +13560 19300 +13560 19320 +13560 19340 +13560 19360 +13560 19380 +13560 19480 +13560 19520 +13580 -17800 +13580 -17780 +13580 -11840 +13580 -11820 +13580 -11800 +13580 -11780 +13580 -11760 +13580 -11740 +13580 -11720 +13580 -11700 +13580 -11680 +13580 -11660 +13580 -11640 +13580 -11620 +13580 -11600 +13580 -11580 +13580 -11560 +13580 -11540 +13580 -11500 +13580 -11480 +13580 -11460 +13580 -11440 +13580 -11420 +13580 -11400 +13580 -11380 +13580 -11360 +13580 -11340 +13580 -10980 +13580 -10920 +13580 -10880 +13580 -10860 +13580 -10800 +13580 -10780 +13580 -10760 +13580 -10740 +13580 19300 +13580 19320 +13580 19340 +13580 19360 +13580 19400 +13580 19500 +13580 19680 +13580 21900 +13600 -17800 +13600 -17780 +13600 -11840 +13600 -11820 +13600 -11800 +13600 -11780 +13600 -11760 +13600 -11740 +13600 -11720 +13600 -11700 +13600 -11680 +13600 -11660 +13600 -11640 +13600 -11620 +13600 -11600 +13600 -11580 +13600 -11560 +13600 -11540 +13600 -11520 +13600 -11500 +13600 -11480 +13600 -11460 +13600 -11440 +13600 -11420 +13600 -11400 +13600 -11380 +13600 -11360 +13600 -11340 +13600 -11320 +13600 -11300 +13600 -11280 +13600 -11260 +13600 -11240 +13600 -11220 +13600 -11200 +13600 -11180 +13600 -11160 +13600 -11140 +13600 -11120 +13600 -11100 +13600 -11080 +13600 -11060 +13600 -11040 +13600 -11020 +13600 -11000 +13600 -10980 +13600 -10960 +13600 -10940 +13600 -10920 +13600 -10880 +13600 -10860 +13600 -10800 +13600 -10760 +13600 19280 +13600 19300 +13600 19320 +13600 19340 +13600 19360 +13600 19440 +13600 19460 +13600 19500 +13600 19520 +13600 19640 +13620 -17800 +13620 -17780 +13620 -11840 +13620 -11820 +13620 -11800 +13620 -11780 +13620 -11760 +13620 -11740 +13620 -11720 +13620 -11700 +13620 -11680 +13620 -11660 +13620 -11640 +13620 -11600 +13620 -11580 +13620 -11560 +13620 -11540 +13620 -11520 +13620 -11500 +13620 -11460 +13620 -11420 +13620 -11400 +13620 -11380 +13620 -11360 +13620 -11340 +13620 -11320 +13620 -11300 +13620 -11280 +13620 -11260 +13620 -11180 +13620 -11120 +13620 -11100 +13620 -11080 +13620 -11060 +13620 -11040 +13620 -11020 +13620 -11000 +13620 -10980 +13620 -10960 +13620 -10940 +13620 -10920 +13620 -10900 +13620 -10880 +13620 -10860 +13620 -10800 +13620 -10780 +13620 -10760 +13620 19280 +13620 19300 +13620 19320 +13620 19380 +13620 19460 +13620 19500 +13620 19520 +13620 21920 +13640 -17800 +13640 -17780 +13640 -11840 +13640 -11820 +13640 -11720 +13640 -11640 +13640 -11620 +13640 -11560 +13640 -11520 +13640 -11480 +13640 -11460 +13640 -11420 +13640 -11400 +13640 -11360 +13640 -11340 +13640 -11320 +13640 -11300 +13640 -11260 +13640 -11240 +13640 -11080 +13640 -11060 +13640 -11000 +13640 -10980 +13640 -10880 +13640 -10860 +13640 -10760 +13640 -10740 +13640 19280 +13640 19300 +13640 19360 +13640 19420 +13640 19440 +13640 19500 +13640 19520 +13660 -17800 +13660 -17780 +13660 -11840 +13660 -11820 +13660 -11700 +13660 -11680 +13660 -11580 +13660 -11560 +13660 -11540 +13660 -11520 +13660 -11500 +13660 -11480 +13660 -11380 +13660 -11260 +13660 -10880 +13660 -10800 +13660 -10780 +13660 -10760 +13660 19260 +13660 19280 +13660 19340 +13660 19360 +13660 19380 +13660 19420 +13680 -17800 +13680 -17780 +13680 -11840 +13680 -11600 +13680 -11580 +13680 -10980 +13680 -10880 +13680 -10780 +13680 -10760 +13680 -10740 +13680 19360 +13680 19380 +13680 19400 +13680 19420 +13700 -17800 +13700 -17780 +13700 -11840 +13700 -11820 +13700 -11600 +13700 -11560 +13700 -11540 +13700 -10980 +13700 -10780 +13700 -10760 +13700 -10740 +13700 19360 +13700 19420 +13700 19440 +13720 -17800 +13720 -17780 +13720 -11840 +13720 -10980 +13720 -10780 +13720 -10760 +13720 8380 +13720 8580 +13720 8700 +13720 8840 +13720 9320 +13720 17420 +13720 19360 +13720 19380 +13720 19400 +13720 19460 +13720 19480 +13740 -17800 +13740 -17780 +13740 -11840 +13740 -11720 +13740 -10920 +13740 -10800 +13740 -10780 +13740 -10760 +13740 940 +13740 8100 +13740 8160 +13740 8260 +13740 8300 +13740 8360 +13740 8420 +13740 8440 +13740 8520 +13740 8540 +13740 8720 +13740 8780 +13740 8800 +13740 8860 +13740 8880 +13740 9000 +13740 9100 +13740 9160 +13740 9220 +13740 9260 +13740 9300 +13740 9420 +13740 9440 +13740 9520 +13740 9540 +13740 9600 +13740 9900 +13740 10040 +13740 10080 +13740 10100 +13740 10160 +13740 10260 +13740 17420 +13740 17440 +13740 17460 +13740 19320 +13740 19360 +13740 19380 +13740 19400 +13740 19420 +13740 19440 +13760 -17800 +13760 -11840 +13760 -11700 +13760 -11000 +13760 -10940 +13760 -10800 +13760 -10780 +13760 -10760 +13760 -8200 +13760 -7620 +13760 -7600 +13760 -7560 +13760 -6500 +13760 -6440 +13760 -5780 +13760 -5640 +13760 -5340 +13760 -5100 +13760 -4720 +13760 -4080 +13760 -3680 +13760 -3640 +13760 -3600 +13760 -3260 +13760 -3220 +13760 -2880 +13760 -2780 +13760 -2760 +13760 -2720 +13760 -2560 +13760 -2500 +13760 -2480 +13760 -2420 +13760 -2220 +13760 -2100 +13760 -2080 +13760 -2060 +13760 -2000 +13760 -1980 +13760 -1900 +13760 -1780 +13760 -1760 +13760 -1740 +13760 -1600 +13760 -1560 +13760 -1540 +13760 -1480 +13760 -1360 +13760 -1320 +13760 -1220 +13760 -1200 +13760 -1160 +13760 -1120 +13760 -1100 +13760 -1080 +13760 -1060 +13760 -1040 +13760 -1020 +13760 -1000 +13760 -960 +13760 -940 +13760 -860 +13760 -840 +13760 -820 +13760 -800 +13760 -780 +13760 -760 +13760 -720 +13760 -680 +13760 -660 +13760 -640 +13760 -480 +13760 -460 +13760 -440 +13760 -380 +13760 -360 +13760 -340 +13760 -300 +13760 -280 +13760 -260 +13760 -240 +13760 -220 +13760 -200 +13760 -180 +13760 -160 +13760 -140 +13760 720 +13760 780 +13760 800 +13760 840 +13760 860 +13760 880 +13760 900 +13760 920 +13760 940 +13760 960 +13760 980 +13760 1000 +13760 1020 +13760 1040 +13760 1080 +13760 1100 +13760 1120 +13760 1140 +13760 1160 +13760 1180 +13760 1200 +13760 1220 +13760 1240 +13760 1260 +13760 1280 +13760 1300 +13760 1320 +13760 1340 +13760 1360 +13760 1380 +13760 1400 +13760 1420 +13760 1440 +13760 1460 +13760 1480 +13760 1500 +13760 1520 +13760 1540 +13760 1560 +13760 1580 +13760 1600 +13760 1620 +13760 1640 +13760 1660 +13760 1680 +13760 1700 +13760 1720 +13760 1740 +13760 1760 +13760 1780 +13760 1800 +13760 1820 +13760 1840 +13760 1860 +13760 1880 +13760 1900 +13760 1920 +13760 1940 +13760 1960 +13760 1980 +13760 2000 +13760 2020 +13760 2040 +13760 2060 +13760 2080 +13760 2100 +13760 2120 +13760 2140 +13760 2160 +13760 2180 +13760 2200 +13760 2220 +13760 2240 +13760 2260 +13760 2280 +13760 2300 +13760 2320 +13760 2340 +13760 2360 +13760 2380 +13760 2400 +13760 2420 +13760 2440 +13760 2460 +13760 2480 +13760 2500 +13760 2520 +13760 2540 +13760 2560 +13760 2580 +13760 2600 +13760 2620 +13760 2640 +13760 2660 +13760 2680 +13760 2700 +13760 2720 +13760 2740 +13760 2760 +13760 2780 +13760 2800 +13760 2820 +13760 2840 +13760 2860 +13760 2880 +13760 2900 +13760 2920 +13760 2940 +13760 2960 +13760 2980 +13760 3000 +13760 3020 +13760 3040 +13760 3060 +13760 3080 +13760 3100 +13760 3120 +13760 3140 +13760 3160 +13760 3180 +13760 3200 +13760 3220 +13760 3240 +13760 3260 +13760 3280 +13760 3300 +13760 3320 +13760 3340 +13760 3360 +13760 3380 +13760 3400 +13760 3420 +13760 3440 +13760 3460 +13760 3480 +13760 3500 +13760 3520 +13760 3540 +13760 3560 +13760 3580 +13760 3600 +13760 3620 +13760 3640 +13760 3660 +13760 3680 +13760 3700 +13760 3720 +13760 3740 +13760 3760 +13760 3780 +13760 3800 +13760 3820 +13760 3840 +13760 3860 +13760 3880 +13760 3900 +13760 3920 +13760 3940 +13760 3960 +13760 3980 +13760 4000 +13760 4020 +13760 4040 +13760 4060 +13760 4080 +13760 4100 +13760 4120 +13760 4140 +13760 4160 +13760 4180 +13760 4200 +13760 4220 +13760 4240 +13760 4260 +13760 4280 +13760 4300 +13760 4320 +13760 4340 +13760 4360 +13760 4380 +13760 4400 +13760 4420 +13760 4440 +13760 4460 +13760 4480 +13760 4500 +13760 4520 +13760 4540 +13760 4560 +13760 4580 +13760 4600 +13760 4620 +13760 4640 +13760 4660 +13760 4680 +13760 4700 +13760 4720 +13760 4740 +13760 4760 +13760 4780 +13760 4800 +13760 4820 +13760 4840 +13760 4860 +13760 4880 +13760 4900 +13760 4920 +13760 4940 +13760 4960 +13760 4980 +13760 5000 +13760 5020 +13760 5040 +13760 5060 +13760 5080 +13760 5100 +13760 5120 +13760 5140 +13760 5160 +13760 5180 +13760 5200 +13760 5220 +13760 5240 +13760 5260 +13760 5280 +13760 5300 +13760 5320 +13760 5340 +13760 5360 +13760 5380 +13760 5400 +13760 5420 +13760 5440 +13760 5460 +13760 5480 +13760 5500 +13760 5520 +13760 5540 +13760 5560 +13760 5580 +13760 5600 +13760 5620 +13760 5640 +13760 5660 +13760 5680 +13760 5700 +13760 5720 +13760 5740 +13760 5760 +13760 5780 +13760 5800 +13760 5820 +13760 5840 +13760 5880 +13760 5900 +13760 5920 +13760 5940 +13760 5960 +13760 5980 +13760 6000 +13760 6040 +13760 6060 +13760 6080 +13760 6100 +13760 6120 +13760 6140 +13760 6160 +13760 6180 +13760 6200 +13760 6220 +13760 6240 +13760 6260 +13760 6280 +13760 6300 +13760 6320 +13760 6340 +13760 6360 +13760 6380 +13760 6420 +13760 6440 +13760 6480 +13760 6500 +13760 6520 +13760 6560 +13760 6580 +13760 6600 +13760 6620 +13760 6640 +13760 6660 +13760 6680 +13760 6700 +13760 6720 +13760 6740 +13760 6760 +13760 6780 +13760 6800 +13760 6820 +13760 6840 +13760 6860 +13760 6880 +13760 6900 +13760 6920 +13760 6940 +13760 6960 +13760 6980 +13760 7000 +13760 7020 +13760 7040 +13760 7060 +13760 7080 +13760 7100 +13760 7120 +13760 7140 +13760 7160 +13760 7180 +13760 7200 +13760 7220 +13760 7240 +13760 7260 +13760 7280 +13760 7300 +13760 7320 +13760 7340 +13760 7360 +13760 7380 +13760 7400 +13760 7420 +13760 7440 +13760 7460 +13760 7480 +13760 7500 +13760 7520 +13760 7540 +13760 7560 +13760 7580 +13760 7600 +13760 7620 +13760 7640 +13760 7660 +13760 7680 +13760 7700 +13760 7720 +13760 7740 +13760 7760 +13760 7780 +13760 7800 +13760 7820 +13760 7840 +13760 7860 +13760 7880 +13760 7900 +13760 7920 +13760 7940 +13760 7960 +13760 7980 +13760 8000 +13760 8020 +13760 8040 +13760 8060 +13760 8080 +13760 8100 +13760 8120 +13760 8140 +13760 8160 +13760 8180 +13760 8200 +13760 8220 +13760 8240 +13760 8260 +13760 8280 +13760 8300 +13760 8320 +13760 8340 +13760 8360 +13760 8380 +13760 8400 +13760 8420 +13760 8440 +13760 8460 +13760 8480 +13760 8500 +13760 8520 +13760 8540 +13760 8560 +13760 8580 +13760 8600 +13760 8620 +13760 8640 +13760 8660 +13760 8680 +13760 8700 +13760 8720 +13760 8740 +13760 8760 +13760 8780 +13760 8800 +13760 8820 +13760 8840 +13760 8860 +13760 8880 +13760 8900 +13760 8920 +13760 8940 +13760 8960 +13760 8980 +13760 9000 +13760 9020 +13760 9040 +13760 9060 +13760 9080 +13760 9100 +13760 9120 +13760 9140 +13760 9160 +13760 9180 +13760 9200 +13760 9220 +13760 9240 +13760 9260 +13760 9280 +13760 9300 +13760 9320 +13760 9340 +13760 9360 +13760 9380 +13760 9400 +13760 9420 +13760 9440 +13760 9460 +13760 9480 +13760 9500 +13760 9520 +13760 9540 +13760 9560 +13760 9580 +13760 9600 +13760 9620 +13760 9640 +13760 9660 +13760 9680 +13760 9700 +13760 9720 +13760 9740 +13760 9760 +13760 9780 +13760 9800 +13760 9820 +13760 9840 +13760 9860 +13760 9880 +13760 9900 +13760 9920 +13760 9940 +13760 9960 +13760 9980 +13760 10000 +13760 10020 +13760 10040 +13760 10060 +13760 10080 +13760 10100 +13760 10120 +13760 10140 +13760 10160 +13760 10180 +13760 10200 +13760 10220 +13760 10240 +13760 10260 +13760 10280 +13760 10300 +13760 10320 +13760 10340 +13760 10360 +13760 10380 +13760 10400 +13760 10420 +13760 10440 +13760 10460 +13760 10480 +13760 10500 +13760 10520 +13760 10540 +13760 10560 +13760 10580 +13760 10600 +13760 10620 +13760 10640 +13760 10660 +13760 10680 +13760 10700 +13760 10720 +13760 10740 +13760 10760 +13760 10780 +13760 10800 +13760 10820 +13760 10840 +13760 10860 +13760 10880 +13760 10900 +13760 10920 +13760 10940 +13760 10960 +13760 10980 +13760 11000 +13760 11020 +13760 11040 +13760 11060 +13760 11080 +13760 11100 +13760 11120 +13760 11140 +13760 11160 +13760 11180 +13760 11200 +13760 11220 +13760 11240 +13760 11260 +13760 11280 +13760 11300 +13760 11320 +13760 11340 +13760 11360 +13760 11380 +13760 11400 +13760 11420 +13760 11440 +13760 11460 +13760 11480 +13760 11500 +13760 11520 +13760 11540 +13760 11560 +13760 11580 +13760 11600 +13760 11620 +13760 11640 +13760 11660 +13760 11680 +13760 11700 +13760 11720 +13760 11740 +13760 11760 +13760 11780 +13760 11800 +13760 11820 +13760 11840 +13760 11860 +13760 11880 +13760 11900 +13760 11920 +13760 11940 +13760 11960 +13760 11980 +13760 12000 +13760 12020 +13760 12040 +13760 12060 +13760 12080 +13760 12100 +13760 12120 +13760 12140 +13760 12160 +13760 12180 +13760 12200 +13760 12220 +13760 12240 +13760 12260 +13760 12280 +13760 12300 +13760 12320 +13760 12340 +13760 12360 +13760 12380 +13760 12400 +13760 12420 +13760 12440 +13760 12460 +13760 12480 +13760 12500 +13760 12520 +13760 12540 +13760 12560 +13760 12580 +13760 12600 +13760 12620 +13760 12640 +13760 12660 +13760 12680 +13760 12700 +13760 12720 +13760 12740 +13760 12760 +13760 12780 +13760 12820 +13760 12840 +13760 12860 +13760 12880 +13760 12900 +13760 12920 +13760 12940 +13760 12960 +13760 12980 +13760 13000 +13760 13020 +13760 13040 +13760 13060 +13760 13080 +13760 13100 +13760 13120 +13760 13140 +13760 13160 +13760 13180 +13760 13200 +13760 13220 +13760 13240 +13760 13260 +13760 13280 +13760 13300 +13760 13320 +13760 13340 +13760 13360 +13760 13380 +13760 13400 +13760 13420 +13760 13440 +13760 13460 +13760 13480 +13760 13500 +13760 13520 +13760 13540 +13760 13560 +13760 13580 +13760 13600 +13760 13620 +13760 13640 +13760 13680 +13760 13700 +13760 13720 +13760 13740 +13760 13780 +13760 13800 +13760 13820 +13760 13840 +13760 13860 +13760 13900 +13760 13920 +13760 13940 +13760 14020 +13760 14040 +13760 14100 +13760 14160 +13760 14280 +13760 14300 +13760 14320 +13760 14340 +13760 14440 +13760 14480 +13760 14500 +13760 14520 +13760 14560 +13760 14620 +13760 14660 +13760 14680 +13760 14700 +13760 14740 +13760 14760 +13760 14780 +13760 14800 +13760 14820 +13760 14860 +13760 14880 +13760 14900 +13760 14920 +13760 14940 +13760 14960 +13760 15060 +13760 15100 +13760 15120 +13760 15180 +13760 15200 +13760 15220 +13760 15240 +13760 15260 +13760 15340 +13760 15360 +13760 15380 +13760 15420 +13760 15440 +13760 15460 +13760 15500 +13760 15520 +13760 15620 +13760 15640 +13760 15660 +13760 15700 +13760 15760 +13760 15780 +13760 15860 +13760 15960 +13760 15980 +13760 16000 +13760 16040 +13760 16060 +13760 16080 +13760 16100 +13760 16140 +13760 16260 +13760 16280 +13760 16300 +13760 16360 +13760 16420 +13760 16580 +13760 16620 +13760 16680 +13760 16700 +13760 16720 +13760 16920 +13760 16980 +13760 17000 +13760 17020 +13760 17040 +13760 17060 +13760 17080 +13760 17100 +13760 17120 +13760 17140 +13760 17160 +13760 17200 +13760 17220 +13760 17240 +13760 17260 +13760 17280 +13760 17300 +13760 17320 +13760 17340 +13760 17360 +13760 17380 +13760 17400 +13760 17420 +13760 17440 +13760 17460 +13760 17480 +13760 18440 +13760 18480 +13760 18500 +13760 18520 +13760 18540 +13760 18560 +13760 18680 +13760 18740 +13760 18800 +13760 18820 +13760 18880 +13760 18940 +13760 18980 +13760 19000 +13760 19020 +13760 19040 +13760 19060 +13760 19100 +13760 19120 +13760 19140 +13760 19160 +13760 19180 +13760 19200 +13760 19280 +13760 19300 +13760 19320 +13760 19340 +13760 19360 +13760 19380 +13760 19400 +13760 19420 +13780 -17800 +13780 -17780 +13780 -11840 +13780 -10940 +13780 -10760 +13780 -8400 +13780 -8380 +13780 -8340 +13780 -7860 +13780 -7680 +13780 -7640 +13780 -7620 +13780 -7600 +13780 -7580 +13780 -7560 +13780 -7540 +13780 -7520 +13780 -7500 +13780 -6540 +13780 -6520 +13780 -6500 +13780 -6480 +13780 -6460 +13780 -6440 +13780 -6420 +13780 -6380 +13780 -6360 +13780 -6280 +13780 -6260 +13780 -6220 +13780 -5920 +13780 -5820 +13780 -5800 +13780 -5780 +13780 -5720 +13780 -5700 +13780 -5680 +13780 -5660 +13780 -5640 +13780 -5620 +13780 -5580 +13780 -5560 +13780 -5540 +13780 -5520 +13780 -5480 +13780 -5440 +13780 -5420 +13780 -5400 +13780 -5360 +13780 -5340 +13780 -5320 +13780 -5300 +13780 -5280 +13780 -5260 +13780 -5240 +13780 -5220 +13780 -5200 +13780 -5180 +13780 -5160 +13780 -5140 +13780 -5120 +13780 -5100 +13780 -5080 +13780 -5060 +13780 -5040 +13780 -5020 +13780 -5000 +13780 -4980 +13780 -4960 +13780 -4940 +13780 -4920 +13780 -4900 +13780 -4880 +13780 -4860 +13780 -4840 +13780 -4820 +13780 -4800 +13780 -4780 +13780 -4760 +13780 -4740 +13780 -4720 +13780 -4700 +13780 -4680 +13780 -4660 +13780 -4640 +13780 -4620 +13780 -4600 +13780 -4580 +13780 -4560 +13780 -4540 +13780 -4500 +13780 -4480 +13780 -4460 +13780 -4440 +13780 -4420 +13780 -4400 +13780 -4380 +13780 -4360 +13780 -4340 +13780 -4320 +13780 -4300 +13780 -4280 +13780 -4260 +13780 -4240 +13780 -4220 +13780 -4200 +13780 -4180 +13780 -4160 +13780 -4140 +13780 -4120 +13780 -4100 +13780 -4080 +13780 -4060 +13780 -4040 +13780 -4020 +13780 -4000 +13780 -3980 +13780 -3960 +13780 -3940 +13780 -3920 +13780 -3900 +13780 -3880 +13780 -3860 +13780 -3840 +13780 -3820 +13780 -3800 +13780 -3780 +13780 -3760 +13780 -3740 +13780 -3720 +13780 -3700 +13780 -3680 +13780 -3660 +13780 -3640 +13780 -3620 +13780 -3600 +13780 -3580 +13780 -3560 +13780 -3540 +13780 -3520 +13780 -3500 +13780 -3480 +13780 -3460 +13780 -3440 +13780 -3420 +13780 -3400 +13780 -3380 +13780 -3360 +13780 -3340 +13780 -3320 +13780 -3300 +13780 -3280 +13780 -3260 +13780 -3240 +13780 -3220 +13780 -3200 +13780 -3180 +13780 -3160 +13780 -3140 +13780 -3120 +13780 -3100 +13780 -3080 +13780 -3060 +13780 -3040 +13780 -3020 +13780 -3000 +13780 -2980 +13780 -2960 +13780 -2940 +13780 -2920 +13780 -2900 +13780 -2880 +13780 -2860 +13780 -2840 +13780 -2820 +13780 -2800 +13780 -2780 +13780 -2760 +13780 -2740 +13780 -2720 +13780 -2700 +13780 -2680 +13780 -2660 +13780 -2640 +13780 -2620 +13780 -2600 +13780 -2580 +13780 -2560 +13780 -2540 +13780 -2520 +13780 -2500 +13780 -2480 +13780 -2460 +13780 -2440 +13780 -2420 +13780 -2400 +13780 -2380 +13780 -2360 +13780 -2340 +13780 -2320 +13780 -2300 +13780 -2280 +13780 -2260 +13780 -2240 +13780 -2220 +13780 -2200 +13780 -2180 +13780 -2160 +13780 -2140 +13780 -2120 +13780 -2100 +13780 -2080 +13780 -2060 +13780 -2040 +13780 -2020 +13780 -2000 +13780 -1980 +13780 -1960 +13780 -1940 +13780 -1920 +13780 -1900 +13780 -1880 +13780 -1860 +13780 -1840 +13780 -1820 +13780 -1800 +13780 -1780 +13780 -1760 +13780 -1740 +13780 -1720 +13780 -1700 +13780 -1680 +13780 -1660 +13780 -1640 +13780 -1620 +13780 -1600 +13780 -1580 +13780 -1560 +13780 -1540 +13780 -1520 +13780 -1500 +13780 -1480 +13780 -1460 +13780 -1440 +13780 -1420 +13780 -1400 +13780 -1380 +13780 -1360 +13780 -1340 +13780 -1320 +13780 -1300 +13780 -1280 +13780 -1260 +13780 -1240 +13780 -1220 +13780 -1200 +13780 -1180 +13780 -1160 +13780 -1140 +13780 -1120 +13780 -1100 +13780 -1080 +13780 -1060 +13780 -1040 +13780 -1020 +13780 -1000 +13780 -980 +13780 -960 +13780 -940 +13780 -920 +13780 -900 +13780 -880 +13780 -860 +13780 -840 +13780 -820 +13780 -800 +13780 -780 +13780 -760 +13780 -740 +13780 -720 +13780 -700 +13780 -680 +13780 -660 +13780 -640 +13780 -620 +13780 -600 +13780 -580 +13780 -560 +13780 -540 +13780 -520 +13780 -500 +13780 -480 +13780 -460 +13780 -440 +13780 -420 +13780 -400 +13780 -380 +13780 -360 +13780 -340 +13780 -320 +13780 -300 +13780 -280 +13780 -260 +13780 -240 +13780 -220 +13780 -200 +13780 -180 +13780 -160 +13780 -140 +13780 720 +13780 740 +13780 760 +13780 780 +13780 800 +13780 820 +13780 840 +13780 860 +13780 880 +13780 920 +13780 940 +13780 960 +13780 980 +13780 1000 +13780 1020 +13780 1040 +13780 1060 +13780 1080 +13780 1100 +13780 1120 +13780 1140 +13780 1160 +13780 1180 +13780 1200 +13780 1220 +13780 1240 +13780 1260 +13780 1280 +13780 1300 +13780 1320 +13780 1340 +13780 1360 +13780 1380 +13780 1400 +13780 1420 +13780 1440 +13780 1460 +13780 1480 +13780 1500 +13780 1520 +13780 1540 +13780 1560 +13780 1580 +13780 1600 +13780 1620 +13780 1640 +13780 1660 +13780 1680 +13780 1700 +13780 1720 +13780 1740 +13780 1760 +13780 1780 +13780 1800 +13780 1820 +13780 1840 +13780 1860 +13780 1880 +13780 1900 +13780 1920 +13780 1940 +13780 1960 +13780 1980 +13780 2000 +13780 2020 +13780 2040 +13780 2060 +13780 2080 +13780 2100 +13780 2120 +13780 2140 +13780 2160 +13780 2180 +13780 2200 +13780 2220 +13780 2240 +13780 2260 +13780 2280 +13780 2300 +13780 2320 +13780 2340 +13780 2360 +13780 2380 +13780 2400 +13780 2420 +13780 2440 +13780 2460 +13780 2480 +13780 2500 +13780 2520 +13780 2540 +13780 2560 +13780 2580 +13780 2600 +13780 2620 +13780 2640 +13780 2660 +13780 2680 +13780 2700 +13780 2720 +13780 2740 +13780 2760 +13780 2780 +13780 2800 +13780 2820 +13780 2840 +13780 2860 +13780 2880 +13780 2900 +13780 2920 +13780 2940 +13780 2960 +13780 2980 +13780 3000 +13780 3020 +13780 3040 +13780 3060 +13780 3080 +13780 3100 +13780 3120 +13780 3140 +13780 3160 +13780 3180 +13780 3200 +13780 3220 +13780 3240 +13780 3260 +13780 3280 +13780 3300 +13780 3320 +13780 3340 +13780 3360 +13780 3380 +13780 3400 +13780 3420 +13780 3440 +13780 3460 +13780 3480 +13780 3500 +13780 3520 +13780 3540 +13780 3560 +13780 3580 +13780 3600 +13780 3620 +13780 3640 +13780 3660 +13780 3680 +13780 3700 +13780 3720 +13780 3740 +13780 3760 +13780 3780 +13780 3800 +13780 3820 +13780 3840 +13780 3860 +13780 3880 +13780 3900 +13780 3920 +13780 3940 +13780 3960 +13780 3980 +13780 4000 +13780 4020 +13780 4040 +13780 4060 +13780 4080 +13780 4100 +13780 4120 +13780 4140 +13780 4160 +13780 4180 +13780 4200 +13780 4220 +13780 4240 +13780 4260 +13780 4280 +13780 4300 +13780 4320 +13780 4340 +13780 4360 +13780 4380 +13780 4400 +13780 4420 +13780 4440 +13780 4460 +13780 4480 +13780 4500 +13780 4520 +13780 4540 +13780 4560 +13780 4580 +13780 4600 +13780 4620 +13780 4640 +13780 4660 +13780 4680 +13780 4700 +13780 4720 +13780 4740 +13780 4760 +13780 4780 +13780 4800 +13780 4820 +13780 4840 +13780 4860 +13780 4880 +13780 4900 +13780 4920 +13780 4940 +13780 4960 +13780 4980 +13780 5000 +13780 5020 +13780 5040 +13780 5060 +13780 5080 +13780 5100 +13780 5120 +13780 5140 +13780 5160 +13780 5180 +13780 5200 +13780 5220 +13780 5240 +13780 5260 +13780 5280 +13780 5300 +13780 5320 +13780 5340 +13780 5360 +13780 5380 +13780 5400 +13780 5420 +13780 5440 +13780 5460 +13780 5480 +13780 5500 +13780 5520 +13780 5540 +13780 5560 +13780 5580 +13780 5600 +13780 5620 +13780 5640 +13780 5660 +13780 5680 +13780 5700 +13780 5720 +13780 5740 +13780 5760 +13780 5780 +13780 5800 +13780 5820 +13780 5840 +13780 5860 +13780 5880 +13780 5900 +13780 5920 +13780 5940 +13780 5960 +13780 5980 +13780 6000 +13780 6020 +13780 6040 +13780 6060 +13780 6080 +13780 6100 +13780 6120 +13780 6140 +13780 6160 +13780 6180 +13780 6200 +13780 6220 +13780 6240 +13780 6260 +13780 6280 +13780 6300 +13780 6320 +13780 6340 +13780 6360 +13780 6380 +13780 6400 +13780 6420 +13780 6440 +13780 6460 +13780 6480 +13780 6500 +13780 6520 +13780 6540 +13780 6560 +13780 6580 +13780 6600 +13780 6620 +13780 6640 +13780 6660 +13780 6680 +13780 6700 +13780 6720 +13780 6740 +13780 6760 +13780 6780 +13780 6800 +13780 6820 +13780 6840 +13780 6860 +13780 6880 +13780 6900 +13780 6920 +13780 6940 +13780 6960 +13780 6980 +13780 7000 +13780 7020 +13780 7040 +13780 7060 +13780 7080 +13780 7100 +13780 7120 +13780 7140 +13780 7160 +13780 7180 +13780 7200 +13780 7220 +13780 7240 +13780 7260 +13780 7280 +13780 7300 +13780 7320 +13780 7340 +13780 7360 +13780 7380 +13780 7400 +13780 7420 +13780 7440 +13780 7460 +13780 7480 +13780 7500 +13780 7520 +13780 7540 +13780 7560 +13780 7580 +13780 7600 +13780 7620 +13780 7640 +13780 7660 +13780 7680 +13780 7700 +13780 7720 +13780 7740 +13780 7760 +13780 7780 +13780 7800 +13780 7820 +13780 7840 +13780 7860 +13780 7880 +13780 7900 +13780 7920 +13780 7940 +13780 7960 +13780 7980 +13780 8000 +13780 8020 +13780 8040 +13780 8060 +13780 8120 +13780 8140 +13780 8160 +13780 8200 +13780 8220 +13780 8240 +13780 8260 +13780 8280 +13780 8300 +13780 8320 +13780 8360 +13780 8400 +13780 8420 +13780 8500 +13780 8520 +13780 8540 +13780 8560 +13780 8580 +13780 8600 +13780 8620 +13780 8640 +13780 8660 +13780 8680 +13780 8860 +13780 9040 +13780 9080 +13780 9100 +13780 9140 +13780 9280 +13780 9300 +13780 9320 +13780 9340 +13780 9360 +13780 9380 +13780 9400 +13780 9440 +13780 9480 +13780 9520 +13780 9620 +13780 9640 +13780 9660 +13780 9700 +13780 9740 +13780 9760 +13780 9780 +13780 9860 +13780 9900 +13780 9920 +13780 9940 +13780 10020 +13780 10040 +13780 10080 +13780 10120 +13780 10140 +13780 10220 +13780 10240 +13780 10280 +13780 10300 +13780 10320 +13780 10340 +13780 10360 +13780 10380 +13780 10400 +13780 10420 +13780 10440 +13780 10460 +13780 10480 +13780 10500 +13780 10520 +13780 10540 +13780 10560 +13780 10580 +13780 10600 +13780 10620 +13780 10640 +13780 10660 +13780 10680 +13780 10700 +13780 10720 +13780 10740 +13780 10760 +13780 10780 +13780 10800 +13780 10820 +13780 10840 +13780 10860 +13780 10880 +13780 10900 +13780 10920 +13780 10940 +13780 10960 +13780 10980 +13780 11000 +13780 11020 +13780 11040 +13780 11060 +13780 11080 +13780 11100 +13780 11120 +13780 11140 +13780 11160 +13780 11180 +13780 11200 +13780 11220 +13780 11240 +13780 11260 +13780 11280 +13780 11300 +13780 11320 +13780 11340 +13780 11360 +13780 11380 +13780 11400 +13780 11420 +13780 11440 +13780 11460 +13780 11480 +13780 11500 +13780 11520 +13780 11540 +13780 11560 +13780 11580 +13780 11600 +13780 11620 +13780 11640 +13780 11660 +13780 11680 +13780 11700 +13780 11720 +13780 11740 +13780 11760 +13780 11780 +13780 11800 +13780 11820 +13780 11840 +13780 11860 +13780 11880 +13780 11900 +13780 11920 +13780 11940 +13780 11960 +13780 11980 +13780 12000 +13780 12020 +13780 12040 +13780 12060 +13780 12080 +13780 12100 +13780 12120 +13780 12140 +13780 12160 +13780 12180 +13780 12200 +13780 12220 +13780 12240 +13780 12260 +13780 12280 +13780 12300 +13780 12320 +13780 12340 +13780 12360 +13780 12380 +13780 12400 +13780 12420 +13780 12440 +13780 12460 +13780 12480 +13780 12500 +13780 12520 +13780 12540 +13780 12560 +13780 12580 +13780 12600 +13780 12620 +13780 12640 +13780 12660 +13780 12680 +13780 12700 +13780 12720 +13780 12740 +13780 12760 +13780 12780 +13780 12800 +13780 12820 +13780 12840 +13780 12860 +13780 12880 +13780 12900 +13780 12920 +13780 12940 +13780 12960 +13780 12980 +13780 13000 +13780 13020 +13780 13040 +13780 13060 +13780 13080 +13780 13100 +13780 13120 +13780 13140 +13780 13160 +13780 13180 +13780 13200 +13780 13220 +13780 13240 +13780 13260 +13780 13280 +13780 13300 +13780 13320 +13780 13340 +13780 13360 +13780 13380 +13780 13400 +13780 13420 +13780 13440 +13780 13460 +13780 13480 +13780 13500 +13780 13520 +13780 13540 +13780 13560 +13780 13580 +13780 13600 +13780 13620 +13780 13640 +13780 13660 +13780 13680 +13780 13700 +13780 13720 +13780 13740 +13780 13760 +13780 13780 +13780 13800 +13780 13820 +13780 13840 +13780 13860 +13780 13880 +13780 13900 +13780 13920 +13780 13940 +13780 13960 +13780 13980 +13780 14000 +13780 14020 +13780 14040 +13780 14060 +13780 14080 +13780 14100 +13780 14120 +13780 14140 +13780 14160 +13780 14180 +13780 14200 +13780 14220 +13780 14240 +13780 14260 +13780 14280 +13780 14300 +13780 14320 +13780 14340 +13780 14360 +13780 14380 +13780 14400 +13780 14420 +13780 14440 +13780 14460 +13780 14480 +13780 14500 +13780 14520 +13780 14540 +13780 14560 +13780 14580 +13780 14600 +13780 14620 +13780 14640 +13780 14660 +13780 14680 +13780 14700 +13780 14720 +13780 14740 +13780 14760 +13780 14780 +13780 14800 +13780 14820 +13780 14840 +13780 14860 +13780 14880 +13780 14900 +13780 14920 +13780 14940 +13780 14960 +13780 14980 +13780 15000 +13780 15020 +13780 15040 +13780 15060 +13780 15080 +13780 15100 +13780 15120 +13780 15140 +13780 15160 +13780 15180 +13780 15200 +13780 15220 +13780 15240 +13780 15260 +13780 15280 +13780 15300 +13780 15320 +13780 15340 +13780 15360 +13780 15380 +13780 15400 +13780 15420 +13780 15440 +13780 15460 +13780 15480 +13780 15500 +13780 15520 +13780 15540 +13780 15560 +13780 15580 +13780 15600 +13780 15620 +13780 15640 +13780 15660 +13780 15680 +13780 15700 +13780 15720 +13780 15740 +13780 15760 +13780 15780 +13780 15800 +13780 15820 +13780 15840 +13780 15860 +13780 15880 +13780 15900 +13780 15920 +13780 15940 +13780 15960 +13780 15980 +13780 16000 +13780 16020 +13780 16040 +13780 16060 +13780 16080 +13780 16100 +13780 16120 +13780 16140 +13780 16160 +13780 16180 +13780 16200 +13780 16220 +13780 16240 +13780 16260 +13780 16280 +13780 16300 +13780 16320 +13780 16340 +13780 16360 +13780 16380 +13780 16400 +13780 16420 +13780 16440 +13780 16460 +13780 16480 +13780 16500 +13780 16520 +13780 16540 +13780 16560 +13780 16580 +13780 16600 +13780 16620 +13780 16640 +13780 16660 +13780 16680 +13780 16700 +13780 16720 +13780 16740 +13780 16760 +13780 16780 +13780 16800 +13780 16820 +13780 16840 +13780 16860 +13780 16880 +13780 16900 +13780 16920 +13780 16940 +13780 16960 +13780 16980 +13780 17000 +13780 17020 +13780 17040 +13780 17060 +13780 17080 +13780 17100 +13780 17120 +13780 17140 +13780 17160 +13780 17180 +13780 17200 +13780 17220 +13780 17240 +13780 17260 +13780 17280 +13780 17300 +13780 17320 +13780 17340 +13780 17360 +13780 17380 +13780 17400 +13780 17420 +13780 17440 +13780 17460 +13780 17480 +13780 18400 +13780 18460 +13780 18480 +13780 18500 +13780 18520 +13780 18540 +13780 18560 +13780 18580 +13780 18600 +13780 18620 +13780 18640 +13780 18660 +13780 18680 +13780 18700 +13780 18720 +13780 18740 +13780 18760 +13780 18780 +13780 18800 +13780 18820 +13780 18840 +13780 18860 +13780 18880 +13780 18900 +13780 18920 +13780 18940 +13780 18960 +13780 18980 +13780 19000 +13780 19020 +13780 19040 +13780 19060 +13780 19080 +13780 19100 +13780 19120 +13780 19140 +13780 19160 +13780 19180 +13780 19200 +13780 19220 +13780 19240 +13780 19260 +13780 19280 +13780 19300 +13780 19320 +13780 19340 +13780 19380 +13800 -17800 +13800 -17780 +13800 -17760 +13800 -11840 +13800 -10940 +13800 -10780 +13800 -10760 +13800 -10740 +13800 -8440 +13800 -8420 +13800 -8400 +13800 -8380 +13800 -8360 +13800 -8340 +13800 -8320 +13800 -8300 +13800 -8280 +13800 -8260 +13800 -8240 +13800 -8220 +13800 -8200 +13800 -8180 +13800 -8160 +13800 -8140 +13800 -8120 +13800 -8100 +13800 -8080 +13800 -8060 +13800 -8040 +13800 -8020 +13800 -8000 +13800 -7980 +13800 -7960 +13800 -7940 +13800 -7920 +13800 -7900 +13800 -7880 +13800 -7860 +13800 -7840 +13800 -7820 +13800 -7800 +13800 -7780 +13800 -7760 +13800 -7740 +13800 -7720 +13800 -7700 +13800 -7680 +13800 -7660 +13800 -7640 +13800 -7620 +13800 -7600 +13800 -7580 +13800 -7560 +13800 -7540 +13800 -7520 +13800 -7500 +13800 -6540 +13800 -6520 +13800 -6500 +13800 -6480 +13800 -6460 +13800 -6440 +13800 -6420 +13800 -6400 +13800 -6380 +13800 -6360 +13800 -6340 +13800 -6320 +13800 -6300 +13800 -6280 +13800 -6260 +13800 -6240 +13800 -6220 +13800 -6200 +13800 -6180 +13800 -6160 +13800 -6140 +13800 -6120 +13800 -6100 +13800 -6080 +13800 -6060 +13800 -6040 +13800 -6020 +13800 -6000 +13800 -5980 +13800 -5960 +13800 -5940 +13800 -5920 +13800 -5900 +13800 -5880 +13800 -5860 +13800 -5840 +13800 -5820 +13800 -5800 +13800 -5780 +13800 -5760 +13800 -5740 +13800 -5720 +13800 -5700 +13800 -5680 +13800 -5660 +13800 -5640 +13800 -5620 +13800 -5600 +13800 -5580 +13800 -5560 +13800 -5540 +13800 -5520 +13800 -5500 +13800 -5480 +13800 -5460 +13800 -5440 +13800 -5420 +13800 -5400 +13800 -5380 +13800 -5360 +13800 -5340 +13800 -5320 +13800 -5300 +13800 -5280 +13800 -5260 +13800 -5240 +13800 -5220 +13800 -5200 +13800 -5180 +13800 -5160 +13800 -5140 +13800 -5120 +13800 -5100 +13800 -5080 +13800 -5060 +13800 -5040 +13800 -5020 +13800 -5000 +13800 -4980 +13800 -4960 +13800 -4940 +13800 -4920 +13800 -4900 +13800 -4880 +13800 -4860 +13800 -4840 +13800 -4820 +13800 -4800 +13800 -4780 +13800 -4760 +13800 -4740 +13800 -4720 +13800 -4700 +13800 -4680 +13800 -4660 +13800 -4640 +13800 -4620 +13800 -4600 +13800 -4580 +13800 -4560 +13800 -4540 +13800 -4520 +13800 -4500 +13800 -4480 +13800 -4460 +13800 -4440 +13800 -4420 +13800 -4400 +13800 -4380 +13800 -4360 +13800 -4340 +13800 -4320 +13800 -4300 +13800 -4280 +13800 -4260 +13800 -4240 +13800 -4220 +13800 -4200 +13800 -4180 +13800 -4160 +13800 -4140 +13800 -4120 +13800 -4100 +13800 -4080 +13800 -4060 +13800 -4040 +13800 -4020 +13800 -4000 +13800 -3980 +13800 -3960 +13800 -3940 +13800 -3920 +13800 -3900 +13800 -3880 +13800 -3860 +13800 -3840 +13800 -3820 +13800 -3800 +13800 -3780 +13800 -3760 +13800 -3740 +13800 -3720 +13800 -3700 +13800 -3680 +13800 -3660 +13800 -3640 +13800 -3620 +13800 -3600 +13800 -3580 +13800 -3560 +13800 -3540 +13800 -3520 +13800 -3500 +13800 -3480 +13800 -3460 +13800 -3440 +13800 -3420 +13800 -3400 +13800 -3380 +13800 -3360 +13800 -3340 +13800 -3320 +13800 -3300 +13800 -3280 +13800 -3260 +13800 -3240 +13800 -3220 +13800 -3200 +13800 -3180 +13800 -3160 +13800 -3140 +13800 -3120 +13800 -3100 +13800 -3080 +13800 -3060 +13800 -3040 +13800 -3020 +13800 -3000 +13800 -2980 +13800 -2960 +13800 -2940 +13800 -2920 +13800 -2900 +13800 -2880 +13800 -2860 +13800 -2840 +13800 -2820 +13800 -2800 +13800 -2780 +13800 -2760 +13800 -2720 +13800 -2700 +13800 -2680 +13800 -2640 +13800 -2620 +13800 -2600 +13800 -2580 +13800 -2560 +13800 -2540 +13800 -2520 +13800 -2500 +13800 -2480 +13800 -2460 +13800 -2420 +13800 -2400 +13800 -2380 +13800 -2360 +13800 -2340 +13800 -2320 +13800 -2300 +13800 -2200 +13800 -2180 +13800 -2160 +13800 -2120 +13800 -2060 +13800 -2020 +13800 -2000 +13800 -1980 +13800 -1940 +13800 -1920 +13800 -1880 +13800 -1840 +13800 -1820 +13800 -1800 +13800 -1760 +13800 -1740 +13800 -1720 +13800 -1700 +13800 -1680 +13800 -1620 +13800 -1580 +13800 -1560 +13800 -1460 +13800 -1420 +13800 -1400 +13800 -1380 +13800 -1360 +13800 -1340 +13800 -1320 +13800 -1300 +13800 -1240 +13800 -1220 +13800 -1200 +13800 -1140 +13800 -940 +13800 -920 +13800 -900 +13800 -860 +13800 -780 +13800 -560 +13800 -500 +13800 -480 +13800 -460 +13800 -380 +13800 -360 +13800 -340 +13800 -280 +13800 -260 +13800 -220 +13800 -160 +13800 -140 +13800 720 +13800 740 +13800 760 +13800 780 +13800 800 +13800 820 +13800 840 +13800 860 +13800 1280 +13800 1400 +13800 1780 +13800 1840 +13800 1900 +13800 2520 +13800 2740 +13800 2880 +13800 3220 +13800 3260 +13800 3620 +13800 4180 +13800 4560 +13800 4880 +13800 4940 +13800 6340 +13800 7280 +13800 14700 +13800 16460 +13800 16540 +13800 16640 +13800 16660 +13800 16760 +13800 16820 +13800 17020 +13800 17460 +13800 17480 +13800 18420 +13800 18440 +13800 18460 +13800 18480 +13800 18620 +13800 18640 +13800 18660 +13800 18680 +13800 18700 +13800 18720 +13800 18740 +13800 18780 +13800 18800 +13800 18840 +13800 18860 +13800 19000 +13820 -17780 +13820 -17760 +13820 -11860 +13820 -11840 +13820 -10980 +13820 -10800 +13820 -10780 +13820 -10760 +13820 -8480 +13820 -8460 +13820 -8440 +13820 -8420 +13820 -8400 +13820 -8380 +13820 -8360 +13820 -8340 +13820 -8320 +13820 -8300 +13820 -8280 +13820 -8260 +13820 -8240 +13820 -8220 +13820 -8200 +13820 -8180 +13820 -8160 +13820 -8140 +13820 -8120 +13820 -8100 +13820 -8080 +13820 -8060 +13820 -8040 +13820 -8020 +13820 -8000 +13820 -7980 +13820 -7960 +13820 -7940 +13820 -7920 +13820 -7900 +13820 -7880 +13820 -7860 +13820 -7840 +13820 -7820 +13820 -7800 +13820 -7780 +13820 -7760 +13820 -7740 +13820 -7720 +13820 -7700 +13820 -7680 +13820 -7660 +13820 -7640 +13820 -7620 +13820 -7600 +13820 -7580 +13820 -7560 +13820 -7540 +13820 -7520 +13820 -7500 +13820 -6540 +13820 -6520 +13820 -6440 +13820 -6420 +13820 -6400 +13820 -6380 +13820 -6340 +13820 -6320 +13820 -6280 +13820 -6240 +13820 -6200 +13820 -6180 +13820 -6160 +13820 -6140 +13820 -6120 +13820 -6100 +13820 -6080 +13820 -6060 +13820 -6040 +13820 -6020 +13820 -6000 +13820 -5980 +13820 -5960 +13820 -5940 +13820 -5920 +13820 -5900 +13820 -5880 +13820 -5860 +13820 -5840 +13820 -5820 +13820 -5760 +13820 -5720 +13820 -4740 +13820 -4320 +13820 -3880 +13820 -3320 +13820 -2920 +13820 -2700 +13820 -1960 +13820 -1020 +13820 -420 +13820 -380 +13820 -360 +13820 -280 +13820 -260 +13820 720 +13820 740 +13820 760 +13820 780 +13820 800 +13820 840 +13820 1640 +13820 2620 +13820 3640 +13820 4140 +13820 5980 +13820 17460 +13820 17480 +13820 18440 +13820 18460 +13820 18480 +13840 -17800 +13840 -17780 +13840 -11840 +13840 -10980 +13840 -10800 +13840 -10780 +13840 -10760 +13840 -8480 +13840 -8460 +13840 -8440 +13840 -8420 +13840 -8400 +13840 -8380 +13840 -8360 +13840 -8340 +13840 -8320 +13840 -8300 +13840 -8280 +13840 -8260 +13840 -8240 +13840 -8220 +13840 -8200 +13840 -8180 +13840 -8160 +13840 -8140 +13840 -8120 +13840 -8100 +13840 -8080 +13840 -8060 +13840 -8040 +13840 -8020 +13840 -8000 +13840 -7980 +13840 -7960 +13840 -7940 +13840 -7920 +13840 -7900 +13840 -7880 +13840 -7860 +13840 -7840 +13840 -7820 +13840 -7800 +13840 -7780 +13840 -7760 +13840 -7740 +13840 -7720 +13840 -7700 +13840 -7680 +13840 -7660 +13840 -7620 +13840 -7580 +13840 -7560 +13840 -7540 +13840 -7520 +13840 -6540 +13840 -6520 +13840 -6440 +13840 -6360 +13840 -6280 +13840 -5800 +13840 -4540 +13840 -2620 +13840 -420 +13840 -380 +13840 -360 +13840 -340 +13840 -280 +13840 -260 +13840 700 +13840 720 +13840 760 +13840 780 +13840 800 +13840 820 +13840 840 +13840 860 +13840 17460 +13840 17480 +13840 18440 +13840 18460 +13840 18480 +13860 -17800 +13860 -17780 +13860 -11860 +13860 -11840 +13860 -10980 +13860 -10800 +13860 -10760 +13860 -10740 +13860 -8480 +13860 -8460 +13860 -8440 +13860 -8420 +13860 -8400 +13860 -8380 +13860 -8360 +13860 -8340 +13860 -8320 +13860 -8300 +13860 -8280 +13860 -8260 +13860 -8240 +13860 -8220 +13860 -8180 +13860 -8160 +13860 -8140 +13860 -8100 +13860 -8060 +13860 -8040 +13860 -8020 +13860 -7980 +13860 -7960 +13860 -7940 +13860 -7880 +13860 -7800 +13860 -7760 +13860 -7740 +13860 -7700 +13860 -7660 +13860 -7540 +13860 -7520 +13860 -6540 +13860 -6520 +13860 -420 +13860 -380 +13860 -360 +13860 -280 +13860 -260 +13860 700 +13860 720 +13860 740 +13860 760 +13860 780 +13860 800 +13860 820 +13860 840 +13860 860 +13860 920 +13860 940 +13860 980 +13860 1680 +13860 1720 +13860 1740 +13860 1760 +13860 1780 +13860 1800 +13860 1840 +13860 1860 +13860 1880 +13860 1900 +13860 1940 +13860 2180 +13860 2280 +13860 2320 +13860 2460 +13860 2500 +13860 2860 +13860 2900 +13860 17240 +13860 17280 +13860 17340 +13860 17460 +13860 17480 +13860 18440 +13860 18460 +13860 18480 +13860 18760 +13860 18880 +13860 18900 +13860 19100 +13860 19120 +13860 19280 +13880 -17780 +13880 -11860 +13880 -11840 +13880 -10780 +13880 -10760 +13880 -8500 +13880 -8480 +13880 -8460 +13880 -8440 +13880 -7720 +13880 -7540 +13880 -7520 +13880 -6540 +13880 -6520 +13880 -5080 +13880 -4840 +13880 -4680 +13880 -4480 +13880 -1100 +13880 -1080 +13880 -1060 +13880 -1040 +13880 -1020 +13880 -1000 +13880 -980 +13880 -960 +13880 -940 +13880 -920 +13880 -900 +13880 -880 +13880 -860 +13880 -840 +13880 -820 +13880 -800 +13880 -780 +13880 -760 +13880 -740 +13880 -720 +13880 -700 +13880 -680 +13880 -660 +13880 -640 +13880 -620 +13880 -600 +13880 -580 +13880 -560 +13880 -540 +13880 -520 +13880 -500 +13880 -480 +13880 -460 +13880 -440 +13880 -420 +13880 -400 +13880 -380 +13880 -360 +13880 -340 +13880 -320 +13880 -300 +13880 -280 +13880 -260 +13880 700 +13880 720 +13880 740 +13880 760 +13880 780 +13880 800 +13880 820 +13880 840 +13880 860 +13880 880 +13880 900 +13880 920 +13880 940 +13880 960 +13880 980 +13880 1000 +13880 1020 +13880 1040 +13880 1060 +13880 1080 +13880 1100 +13880 1120 +13880 1140 +13880 1160 +13880 1180 +13880 1220 +13880 1240 +13880 1260 +13880 1340 +13880 1420 +13880 1440 +13880 1460 +13880 1480 +13880 1500 +13880 1520 +13880 1540 +13880 1560 +13880 1580 +13880 1600 +13880 1620 +13880 1640 +13880 1660 +13880 1680 +13880 1700 +13880 1720 +13880 1740 +13880 1760 +13880 1780 +13880 1800 +13880 1820 +13880 1840 +13880 1860 +13880 1880 +13880 1900 +13880 1920 +13880 1980 +13880 2020 +13880 2060 +13880 2140 +13880 2160 +13880 2180 +13880 2200 +13880 2240 +13880 2260 +13880 2300 +13880 2320 +13880 2340 +13880 2360 +13880 2380 +13880 2420 +13880 2440 +13880 2460 +13880 2480 +13880 2500 +13880 2520 +13880 2540 +13880 2560 +13880 2580 +13880 2600 +13880 2620 +13880 2640 +13880 2660 +13880 2680 +13880 2740 +13880 2760 +13880 2800 +13880 2820 +13880 2840 +13880 2880 +13880 2900 +13880 2920 +13880 2940 +13880 17160 +13880 17180 +13880 17200 +13880 17220 +13880 17240 +13880 17260 +13880 17280 +13880 17300 +13880 17320 +13880 17340 +13880 17360 +13880 17380 +13880 17400 +13880 17420 +13880 17440 +13880 17460 +13880 17480 +13880 18440 +13880 18460 +13880 18480 +13880 18520 +13880 18560 +13880 18580 +13880 18600 +13880 18620 +13880 18660 +13880 18680 +13880 18700 +13880 18720 +13880 18740 +13880 18760 +13880 18780 +13880 18800 +13880 18820 +13880 18840 +13880 18860 +13880 18880 +13880 18900 +13880 18920 +13880 18940 +13880 18960 +13880 18980 +13880 19000 +13880 19020 +13880 19040 +13880 19060 +13880 19080 +13880 19100 +13880 19120 +13880 19140 +13880 19160 +13880 19180 +13880 19200 +13880 19220 +13880 19240 +13880 19260 +13880 19280 +13900 -17780 +13900 -17760 +13900 -11860 +13900 -11840 +13900 -10980 +13900 -10780 +13900 -10760 +13900 -10740 +13900 -8480 +13900 -8460 +13900 -8440 +13900 -7540 +13900 -7520 +13900 -6540 +13900 -6520 +13900 -3780 +13900 -3720 +13900 -3620 +13900 -3560 +13900 -3540 +13900 -3520 +13900 -3480 +13900 -3380 +13900 -3340 +13900 -3320 +13900 -3260 +13900 -3200 +13900 -3040 +13900 -2740 +13900 -1200 +13900 -1180 +13900 -1120 +13900 -1100 +13900 -1080 +13900 -1060 +13900 -1020 +13900 -1000 +13900 -980 +13900 -940 +13900 -900 +13900 -880 +13900 -800 +13900 -780 +13900 -760 +13900 -720 +13900 -700 +13900 -640 +13900 -600 +13900 -520 +13900 -500 +13900 -480 +13900 -460 +13900 -440 +13900 -420 +13900 -400 +13900 -380 +13900 -360 +13900 -340 +13900 -320 +13900 -300 +13900 -280 +13900 -260 +13900 720 +13900 740 +13900 760 +13900 780 +13900 800 +13900 820 +13900 840 +13900 860 +13900 880 +13900 940 +13900 960 +13900 1000 +13900 1020 +13900 1040 +13900 1080 +13900 1440 +13900 1480 +13900 1520 +13900 1640 +13900 1660 +13900 1840 +13900 2700 +13900 2920 +13900 2940 +13900 3020 +13900 3040 +13900 3060 +13900 3120 +13900 3180 +13900 3200 +13900 3260 +13900 3280 +13900 17180 +13900 17220 +13900 17240 +13900 17340 +13900 17360 +13900 17380 +13900 17400 +13900 17420 +13900 17440 +13900 17460 +13900 18460 +13900 18480 +13900 18500 +13900 18520 +13900 18540 +13900 18560 +13900 18580 +13900 18600 +13900 18620 +13900 18640 +13900 18660 +13900 18680 +13900 18700 +13900 18720 +13900 18740 +13900 18760 +13900 18780 +13900 18800 +13900 18820 +13900 18840 +13900 18860 +13900 18880 +13900 18900 +13900 18920 +13900 18940 +13900 18960 +13900 18980 +13900 19000 +13900 19020 +13900 19040 +13900 19060 +13900 19080 +13900 19100 +13900 19120 +13900 19140 +13900 19180 +13900 19200 +13900 19220 +13900 19240 +13900 19260 +13900 19280 +13920 -17800 +13920 -17780 +13920 -17760 +13920 -17520 +13920 -16960 +13920 -11860 +13920 -11840 +13920 -10920 +13920 -10780 +13920 -10760 +13920 -10740 +13920 -8460 +13920 -8440 +13920 -7720 +13920 -7700 +13920 -7540 +13920 -7520 +13920 -7500 +13920 -6540 +13920 -6520 +13920 -6500 +13920 -3560 +13920 -3460 +13920 -3380 +13920 -3260 +13920 -3240 +13920 -3200 +13920 -3180 +13920 -3040 +13920 -1200 +13920 -1180 +13920 -1120 +13920 -1100 +13920 -1080 +13920 800 +13920 2080 +13920 2940 +13920 2960 +13920 3000 +13920 3140 +13920 3280 +13920 17180 +13920 17200 +13920 18520 +13920 18540 +13920 18560 +13920 19260 +13920 19280 +13940 -17780 +13940 -17640 +13940 -17600 +13940 -17500 +13940 -17000 +13940 -16960 +13940 -16940 +13940 -11860 +13940 -11840 +13940 -10920 +13940 -10760 +13940 -10740 +13940 -8480 +13940 -8460 +13940 -8440 +13940 -7540 +13940 -7520 +13940 -6540 +13940 -6520 +13940 -6500 +13940 -3680 +13940 -1200 +13940 -1180 +13940 -1120 +13940 -1100 +13940 -1080 +13940 3280 +13940 17180 +13940 17200 +13940 17220 +13940 17240 +13940 19280 +13960 -17780 +13960 -17600 +13960 -16960 +13960 -11860 +13960 -11840 +13960 -11120 +13960 -10940 +13960 -10800 +13960 -10760 +13960 -8460 +13960 -8440 +13960 -1200 +13960 -1180 +13960 -1120 +13960 -1100 +13960 3280 +13960 3300 +13960 17200 +13960 17220 +13960 17240 +13960 17260 +13960 19260 +13960 19280 +13960 19300 +13980 -17800 +13980 -17780 +13980 -16960 +13980 -16940 +13980 -11860 +13980 -11840 +13980 -11180 +13980 -11160 +13980 -10960 +13980 -10780 +13980 -10760 +13980 -8460 +13980 -8440 +13980 -2740 +13980 -2360 +13980 -2300 +13980 -2260 +13980 -2240 +13980 -2200 +13980 -2160 +13980 -2140 +13980 -2100 +13980 -2060 +13980 -2040 +13980 -2000 +13980 -1960 +13980 -1940 +13980 -1900 +13980 -1880 +13980 -1860 +13980 -1840 +13980 -1820 +13980 -1800 +13980 -1200 +13980 -1180 +13980 -1100 +13980 3300 +13980 17240 +13980 17260 +13980 19280 +14000 -17800 +14000 -11860 +14000 -11840 +14000 -10780 +14000 -10760 +14000 -8460 +14000 -8440 +14000 -3500 +14000 -3480 +14000 -3460 +14000 -2920 +14000 -2040 +14000 -2000 +14000 -1960 +14000 -1900 +14000 -1800 +14000 -1760 +14000 -1740 +14000 -1700 +14000 -1680 +14000 -1640 +14000 -1200 +14000 -1180 +14000 -1100 +14000 3280 +14000 12880 +14000 12900 +14000 12920 +14000 12980 +14000 13000 +14000 13080 +14000 13100 +14000 13180 +14000 13200 +14000 13260 +14000 13280 +14000 13360 +14000 13420 +14000 13580 +14000 13640 +14000 13660 +14000 13700 +14000 17240 +14000 17260 +14000 19280 +14000 19300 +14020 -17780 +14020 -17520 +14020 -17100 +14020 -16960 +14020 -11860 +14020 -11840 +14020 -10780 +14020 -10760 +14020 -10740 +14020 -8480 +14020 -8460 +14020 -8440 +14020 -5700 +14020 -1640 +14020 -1200 +14020 -1180 +14020 -1100 +14020 980 +14020 1140 +14020 1300 +14020 1340 +14020 3280 +14020 12860 +14020 12920 +14020 12940 +14020 12960 +14020 13020 +14020 13040 +14020 13080 +14020 13180 +14020 13200 +14020 13220 +14020 13260 +14020 13280 +14020 13320 +14020 13340 +14020 13360 +14020 13380 +14020 13420 +14020 13440 +14020 13480 +14020 13520 +14020 13560 +14020 13620 +14020 13660 +14020 13720 +14020 13740 +14020 17240 +14020 17260 +14020 19280 +14020 19300 +14040 -17780 +14040 -16960 +14040 -11860 +14040 -11840 +14040 -10800 +14040 -10780 +14040 -10760 +14040 -10740 +14040 -8460 +14040 -8440 +14040 -5720 +14040 -5700 +14040 -5600 +14040 -1200 +14040 -1180 +14040 -1100 +14040 960 +14040 980 +14040 1000 +14040 1020 +14040 1040 +14040 1060 +14040 1080 +14040 1100 +14040 1120 +14040 1140 +14040 1160 +14040 1180 +14040 1200 +14040 1220 +14040 1240 +14040 1260 +14040 1280 +14040 1300 +14040 1320 +14040 1340 +14040 1360 +14040 3300 +14040 12860 +14040 12880 +14040 12900 +14040 13540 +14040 17240 +14040 17260 +14040 19260 +14040 19280 +14060 -17200 +14060 -11860 +14060 -11840 +14060 -10780 +14060 -10760 +14060 -8460 +14060 -8440 +14060 -8420 +14060 -7860 +14060 -7840 +14060 -5720 +14060 -1240 +14060 -1220 +14060 -1200 +14060 -1180 +14060 -1100 +14060 980 +14060 1020 +14060 1040 +14060 1080 +14060 1120 +14060 1140 +14060 1160 +14060 1180 +14060 1200 +14060 1220 +14060 1260 +14060 1280 +14060 1320 +14060 3280 +14060 12840 +14060 12860 +14060 13540 +14060 13600 +14060 13620 +14060 13640 +14060 17240 +14060 17260 +14060 19260 +14060 19280 +14080 -17760 +14080 -17240 +14080 -17200 +14080 -15240 +14080 -15220 +14080 -15200 +14080 -11860 +14080 -11840 +14080 -10780 +14080 -10760 +14080 -8460 +14080 -8440 +14080 -7980 +14080 -7940 +14080 -7900 +14080 -7880 +14080 -7860 +14080 -7840 +14080 -5720 +14080 -1240 +14080 -1200 +14080 -1180 +14080 -1100 +14080 3300 +14080 12860 +14080 13600 +14080 13620 +14080 17240 +14080 17260 +14080 19280 +14100 -17760 +14100 -17280 +14100 -17220 +14100 -15200 +14100 -11860 +14100 -11840 +14100 -10800 +14100 -10780 +14100 -10760 +14100 -8460 +14100 -8440 +14100 -8060 +14100 -7960 +14100 -7880 +14100 -7860 +14100 -5720 +14100 -1200 +14100 -1180 +14100 -1100 +14100 3300 +14100 12840 +14100 12860 +14100 15160 +14100 17240 +14100 17260 +14100 19260 +14100 19280 +14100 19300 +14120 -17320 +14120 -17240 +14120 -17220 +14120 -17160 +14120 -15220 +14120 -15200 +14120 -15180 +14120 -13880 +14120 -13860 +14120 -13840 +14120 -13820 +14120 -11860 +14120 -11840 +14120 -10920 +14120 -10780 +14120 -10760 +14120 -8460 +14120 -8440 +14120 -8360 +14120 -8300 +14120 -8080 +14120 -7880 +14120 -7860 +14120 -5740 +14120 -5720 +14120 -2740 +14120 -1200 +14120 -1180 +14120 -1100 +14120 -920 +14120 -900 +14120 1660 +14120 12840 +14120 12860 +14120 17240 +14120 17260 +14120 19260 +14120 19280 +14120 19300 +14140 -17220 +14140 -17200 +14140 -17180 +14140 -17160 +14140 -15200 +14140 -15180 +14140 -13880 +14140 -13860 +14140 -13840 +14140 -13820 +14140 -11860 +14140 -11840 +14140 -10760 +14140 -8460 +14140 -8440 +14140 -8360 +14140 -8340 +14140 -7880 +14140 -7860 +14140 -5740 +14140 -5720 +14140 -2740 +14140 -1200 +14140 -1180 +14140 -900 +14140 12860 +14140 17240 +14140 17260 +14140 19260 +14140 19280 +14140 19300 +14160 -17540 +14160 -17520 +14160 -15180 +14160 -13840 +14160 -13820 +14160 -13800 +14160 -11860 +14160 -10780 +14160 -10760 +14160 -10740 +14160 -8460 +14160 -8440 +14160 -8340 +14160 -8320 +14160 -7900 +14160 -7880 +14160 -7860 +14160 -7840 +14160 -5740 +14160 -5720 +14160 -1100 +14160 -940 +14160 -920 +14160 -900 +14160 1240 +14160 1640 +14160 1660 +14160 1680 +14160 1920 +14160 12840 +14160 12860 +14160 17240 +14160 17260 +14160 17280 +14160 19260 +14160 19280 +14160 19300 +14180 -17540 +14180 -17520 +14180 -13840 +14180 -13820 +14180 -11860 +14180 -11840 +14180 -10780 +14180 -10760 +14180 -8460 +14180 -8440 +14180 -8320 +14180 -7880 +14180 -7860 +14180 -7840 +14180 -5740 +14180 -5720 +14180 -1100 +14180 -940 +14180 1220 +14180 1660 +14180 1680 +14180 1700 +14180 1720 +14180 1740 +14180 1760 +14180 1800 +14180 3020 +14180 12860 +14180 15140 +14180 15160 +14180 17240 +14180 17260 +14180 17280 +14180 19280 +14180 19300 +14200 -17500 +14200 -13820 +14200 -11860 +14200 -11840 +14200 -10780 +14200 -10760 +14200 -8460 +14200 -8440 +14200 -8400 +14200 -7880 +14200 -7860 +14200 -5740 +14200 -5720 +14200 -1640 +14200 -1200 +14200 -1100 +14200 -940 +14200 -920 +14200 -900 +14200 1200 +14200 1240 +14200 1620 +14200 1640 +14200 1740 +14200 1760 +14200 1780 +14200 1960 +14200 3020 +14200 12840 +14200 12860 +14200 15160 +14200 17240 +14200 17260 +14200 17280 +14200 19260 +14200 19280 +14200 19300 +14220 -17520 +14220 -11860 +14220 -10760 +14220 -8480 +14220 -8460 +14220 -8440 +14220 -7860 +14220 -5740 +14220 -5720 +14220 -2760 +14220 -1100 +14220 -940 +14220 1220 +14220 1240 +14220 1660 +14220 1680 +14220 1700 +14220 1720 +14220 1760 +14220 3000 +14220 3020 +14220 12860 +14220 15140 +14220 15160 +14220 17260 +14220 17280 +14220 19260 +14220 19280 +14220 19300 +14240 -17520 +14240 -11880 +14240 -11860 +14240 -11840 +14240 -10760 +14240 -8460 +14240 -8440 +14240 -8420 +14240 -7880 +14240 -7860 +14240 -5740 +14240 -1640 +14240 -1100 +14240 1220 +14240 1240 +14240 1720 +14240 3020 +14240 12840 +14240 12860 +14240 15160 +14240 17260 +14240 17280 +14240 19260 +14240 19280 +14260 -17540 +14260 -17520 +14260 -11860 +14260 -10760 +14260 -8460 +14260 -8440 +14260 -7880 +14260 -7860 +14260 -5740 +14260 -5720 +14260 -1620 +14260 -1100 +14260 -940 +14260 1220 +14260 1240 +14260 3020 +14260 12860 +14260 15160 +14260 17260 +14260 19260 +14260 19280 +14260 19300 +14280 -17540 +14280 -17520 +14280 -10800 +14280 -10780 +14280 -10760 +14280 -8460 +14280 -8440 +14280 -8420 +14280 -7880 +14280 -7860 +14280 -5740 +14280 -2740 +14280 -1180 +14280 -1100 +14280 -980 +14280 -940 +14280 3020 +14280 12840 +14280 12860 +14280 15140 +14280 15160 +14280 17260 +14280 17280 +14280 19260 +14280 19280 +14280 19300 +14300 -10800 +14300 -10760 +14300 -10740 +14300 -8480 +14300 -8460 +14300 -8440 +14300 -7880 +14300 -7860 +14300 -7840 +14300 -5740 +14300 -1100 +14300 -1000 +14300 -940 +14300 12860 +14300 17260 +14300 17280 +14300 19260 +14300 19280 +14300 19300 +14320 -17520 +14320 -17240 +14320 -17220 +14320 -10760 +14320 -8460 +14320 -8440 +14320 -7880 +14320 -7860 +14320 -5740 +14320 -2740 +14320 -1100 +14320 -980 +14320 -940 +14320 -720 +14320 -700 +14320 -680 +14320 -660 +14320 -560 +14320 3020 +14320 12840 +14320 12860 +14320 15140 +14320 15160 +14320 15280 +14320 17260 +14320 17280 +14320 19280 +14320 19300 +14340 -17540 +14340 -17520 +14340 -17240 +14340 -10760 +14340 -8460 +14340 -8440 +14340 -7880 +14340 -7860 +14340 -5760 +14340 -5740 +14340 -5720 +14340 -1100 +14340 -1020 +14340 -940 +14340 -700 +14340 -680 +14340 -540 +14340 3020 +14340 12840 +14340 12860 +14340 15160 +14340 17260 +14340 17280 +14340 19280 +14340 19300 +14360 -17540 +14360 -17520 +14360 -10780 +14360 -10760 +14360 -8480 +14360 -8460 +14360 -8440 +14360 -7880 +14360 -7860 +14360 -5740 +14360 -5720 +14360 -1640 +14360 -1000 +14360 -720 +14360 -700 +14360 -680 +14360 -660 +14360 -560 +14360 3040 +14360 12840 +14360 12860 +14360 15140 +14360 15160 +14360 17260 +14360 17280 +14360 19260 +14360 19280 +14360 19300 +14380 -17520 +14380 -10780 +14380 -10760 +14380 -8460 +14380 -8440 +14380 -8420 +14380 -7880 +14380 -7860 +14380 -7840 +14380 -5740 +14380 -5720 +14380 -980 +14380 -720 +14380 -700 +14380 -680 +14380 2780 +14380 3020 +14380 3040 +14380 12840 +14380 12860 +14380 15160 +14380 17260 +14380 17280 +14380 19280 +14400 -17520 +14400 -17500 +14400 -10780 +14400 -10760 +14400 -8460 +14400 -8440 +14400 -8400 +14400 -7880 +14400 -7860 +14400 -7840 +14400 -5740 +14400 -2760 +14400 -1640 +14400 -940 +14400 -740 +14400 -720 +14400 -700 +14400 2780 +14400 3040 +14400 12860 +14400 15140 +14400 15160 +14400 17260 +14400 17280 +14400 17300 +14400 19280 +14400 19300 +14420 -17520 +14420 -10760 +14420 -10740 +14420 -8460 +14420 -8440 +14420 -7880 +14420 -7860 +14420 -7840 +14420 -5740 +14420 -1000 +14420 -980 +14420 -960 +14420 -760 +14420 -740 +14420 -720 +14420 3060 +14420 12860 +14420 15140 +14420 15160 +14420 15420 +14420 15440 +14420 17260 +14420 17280 +14420 19280 +14420 19300 +14440 -17540 +14440 -17520 +14440 -17220 +14440 -16200 +14440 -16080 +14440 -16060 +14440 -10760 +14440 -8460 +14440 -8440 +14440 -8420 +14440 -7880 +14440 -7860 +14440 -7840 +14440 -5740 +14440 -1640 +14440 -980 +14440 -740 +14440 -720 +14440 2400 +14440 3040 +14440 12840 +14440 15160 +14440 15520 +14440 17260 +14440 17280 +14440 19280 +14460 -17520 +14460 -17240 +14460 -16220 +14460 -16200 +14460 -16060 +14460 -10760 +14460 -8460 +14460 -8440 +14460 -7880 +14460 -7860 +14460 -7840 +14460 -5740 +14460 -5720 +14460 -2760 +14460 -980 +14460 -960 +14460 -740 +14460 -720 +14460 780 +14460 800 +14460 2400 +14460 2420 +14460 3040 +14460 3060 +14460 12840 +14460 12860 +14460 15140 +14460 15160 +14460 15460 +14460 17260 +14460 17280 +14460 19280 +14460 19300 +14480 -17520 +14480 -17240 +14480 -17220 +14480 -17180 +14480 -17160 +14480 -16440 +14480 -16140 +14480 -16120 +14480 -16100 +14480 -16080 +14480 -16040 +14480 -16020 +14480 -10760 +14480 -10740 +14480 -8460 +14480 -8440 +14480 -7880 +14480 -7860 +14480 -7840 +14480 -5740 +14480 -5720 +14480 -720 +14480 780 +14480 800 +14480 2420 +14480 2440 +14480 12840 +14480 12860 +14480 15140 +14480 15160 +14480 15540 +14480 15560 +14480 15580 +14480 17260 +14480 17280 +14480 19280 +14480 19300 +14500 -17520 +14500 -17200 +14500 -17180 +14500 -16040 +14500 -16020 +14500 -10780 +14500 -10760 +14500 -8480 +14500 -8460 +14500 -8440 +14500 -7880 +14500 -7860 +14500 -5740 +14500 -3200 +14500 -740 +14500 -720 +14500 800 +14500 2440 +14500 3060 +14500 12840 +14500 15160 +14500 17260 +14500 17280 +14500 19280 +14500 19300 +14520 -17520 +14520 -16060 +14520 -16020 +14520 -16000 +14520 -10820 +14520 -10760 +14520 -8460 +14520 -8440 +14520 -7880 +14520 -7860 +14520 -5740 +14520 -2980 +14520 -740 +14520 -720 +14520 2480 +14520 12860 +14520 15160 +14520 17260 +14520 17280 +14520 19280 +14540 -17540 +14540 -17520 +14540 -17500 +14540 -16040 +14540 -16020 +14540 -16000 +14540 -15980 +14540 -10800 +14540 -10760 +14540 -8460 +14540 -8440 +14540 -8420 +14540 -7880 +14540 -7860 +14540 -7840 +14540 -5740 +14540 -3500 +14540 -720 +14540 12840 +14540 12860 +14540 15140 +14540 15160 +14540 17260 +14540 17280 +14540 19280 +14540 19300 +14560 -17520 +14560 -16000 +14560 -15980 +14560 -15960 +14560 -10800 +14560 -10780 +14560 -10760 +14560 -8460 +14560 -8440 +14560 -7860 +14560 -5740 +14560 -1220 +14560 -1180 +14560 -740 +14560 -720 +14560 12840 +14560 12860 +14560 14580 +14560 15140 +14560 15160 +14560 17260 +14560 17280 +14560 19280 +14560 19300 +14580 -17520 +14580 -17240 +14580 -17220 +14580 -16000 +14580 -15960 +14580 -10760 +14580 -8460 +14580 -8440 +14580 -5760 +14580 -5740 +14580 -3560 +14580 -3540 +14580 -1640 +14580 -1180 +14580 -720 +14580 12860 +14580 15140 +14580 17260 +14580 17280 +14580 19280 +14600 -17520 +14600 -17200 +14600 -16000 +14600 -15980 +14600 -15960 +14600 -11280 +14600 -10760 +14600 -8460 +14600 -8440 +14600 -7880 +14600 -7860 +14600 -7840 +14600 -5740 +14600 -3540 +14600 -3180 +14600 -2960 +14600 -2780 +14600 -2760 +14600 -2720 +14600 -1660 +14600 -1160 +14600 -720 +14600 12860 +14600 15140 +14600 15160 +14600 17280 +14600 17300 +14600 19260 +14600 19280 +14620 -17520 +14620 -17160 +14620 -15980 +14620 -15960 +14620 -14940 +14620 -11260 +14620 -10760 +14620 -8460 +14620 -8420 +14620 -7880 +14620 -7860 +14620 -5760 +14620 -5740 +14620 -3220 +14620 -1660 +14620 -1180 +14620 -720 +14620 2480 +14620 14720 +14620 14740 +14620 14760 +14620 14820 +14620 15140 +14620 17280 +14620 19280 +14640 -17520 +14640 -17160 +14640 -15980 +14640 -15960 +14640 -14960 +14640 -10800 +14640 -10760 +14640 -10740 +14640 -8460 +14640 -8440 +14640 -7880 +14640 -7860 +14640 -5740 +14640 -3580 +14640 -3220 +14640 -2740 +14640 -1180 +14640 -740 +14640 -720 +14640 2260 +14640 2280 +14640 12860 +14640 14720 +14640 14780 +14640 14800 +14640 14820 +14640 14840 +14640 14860 +14640 14880 +14640 14900 +14640 14920 +14640 14940 +14640 14980 +14640 15020 +14640 15040 +14640 15060 +14640 15140 +14640 17260 +14640 17280 +14640 17300 +14640 19280 +14660 -17520 +14660 -15980 +14660 -15960 +14660 -11220 +14660 -10760 +14660 -8460 +14660 -8440 +14660 -7880 +14660 -5760 +14660 -5740 +14660 -3180 +14660 -3100 +14660 -1180 +14660 -720 +14660 -580 +14660 2500 +14660 14760 +14660 14780 +14660 14860 +14660 14880 +14660 14960 +14660 15020 +14660 15040 +14660 15060 +14660 15120 +14660 15140 +14660 15160 +14660 17260 +14660 17280 +14660 17300 +14660 19280 +14660 19300 +14680 -17520 +14680 -15980 +14680 -15960 +14680 -10820 +14680 -10760 +14680 -8460 +14680 -8440 +14680 -8420 +14680 -7880 +14680 -7860 +14680 -5760 +14680 -5740 +14680 -3080 +14680 -1240 +14680 -740 +14680 -720 +14680 -600 +14680 -580 +14680 2360 +14680 2380 +14680 2420 +14680 2440 +14680 2480 +14680 2540 +14680 2620 +14680 12860 +14680 17280 +14680 17300 +14680 19280 +14680 19300 +14700 -17520 +14700 -15980 +14700 -15960 +14700 -15940 +14700 -10760 +14700 -8460 +14700 -8440 +14700 -7880 +14700 -7860 +14700 -5760 +14700 -5740 +14700 -3580 +14700 -3060 +14700 -2740 +14700 -1260 +14700 -1180 +14700 -720 +14700 -580 +14700 2460 +14700 2560 +14700 2580 +14700 3280 +14700 12860 +14700 17260 +14700 17280 +14700 17300 +14700 19280 +14720 -17520 +14720 -17500 +14720 -15980 +14720 -15960 +14720 -15940 +14720 -15220 +14720 -10760 +14720 -8460 +14720 -8440 +14720 -7880 +14720 -7860 +14720 -5760 +14720 -5740 +14720 -4100 +14720 -3600 +14720 -3580 +14720 -3040 +14720 -2720 +14720 -2700 +14720 -2660 +14720 -1660 +14720 -1180 +14720 -740 +14720 -720 +14720 -700 +14720 3300 +14720 12860 +14720 17280 +14720 19280 +14720 19300 +14740 -15980 +14740 -15960 +14740 -15240 +14740 -15220 +14740 -14980 +14740 -14960 +14740 -13880 +14740 -13860 +14740 -11100 +14740 -10760 +14740 -10740 +14740 -8460 +14740 -8440 +14740 -7880 +14740 -7860 +14740 -5760 +14740 -5740 +14740 -3120 +14740 -2520 +14740 -2460 +14740 -2440 +14740 -2380 +14740 -1660 +14740 -1640 +14740 -1620 +14740 -1600 +14740 -1580 +14740 -1560 +14740 -1540 +14740 -1520 +14740 -1500 +14740 -1480 +14740 -1460 +14740 -1440 +14740 -1420 +14740 -1380 +14740 -1360 +14740 -1320 +14740 -1260 +14740 -1180 +14740 -1160 +14740 -740 +14740 -720 +14740 -700 +14740 2080 +14740 2100 +14740 12860 +14740 17280 +14740 17300 +14740 19280 +14740 19300 +14760 -17520 +14760 -17500 +14760 -15980 +14760 -15220 +14760 -13880 +14760 -13860 +14760 -13840 +14760 -10760 +14760 -8460 +14760 -8440 +14760 -7880 +14760 -5760 +14760 -5740 +14760 -1660 +14760 -1620 +14760 -1600 +14760 -1580 +14760 -1560 +14760 -1540 +14760 -1520 +14760 -1500 +14760 -1480 +14760 -1460 +14760 -1440 +14760 -1420 +14760 -1400 +14760 -1380 +14760 -1360 +14760 -1340 +14760 -1320 +14760 -1300 +14760 -1180 +14760 -720 +14760 2060 +14760 2080 +14760 12840 +14760 12860 +14760 17280 +14760 17300 +14760 19260 +14760 19280 +14760 19300 +14780 -17520 +14780 -17480 +14780 -17460 +14780 -15980 +14780 -15960 +14780 -15940 +14780 -15200 +14780 -15180 +14780 -13900 +14780 -13880 +14780 -13860 +14780 -13840 +14780 -13820 +14780 -10760 +14780 -10740 +14780 -8480 +14780 -8460 +14780 -8440 +14780 -7880 +14780 -7860 +14780 -5760 +14780 -5740 +14780 -3620 +14780 -2880 +14780 -2860 +14780 -1320 +14780 -1180 +14780 -740 +14780 -720 +14780 -700 +14780 2100 +14780 12840 +14780 12860 +14780 17280 +14780 17300 +14780 19280 +14800 -17520 +14800 -16000 +14800 -15980 +14800 -15940 +14800 -15200 +14800 -13840 +14800 -10780 +14800 -10760 +14800 -8480 +14800 -8460 +14800 -8440 +14800 -7880 +14800 -7860 +14800 -5740 +14800 -3620 +14800 -3220 +14800 -1180 +14800 -740 +14800 -720 +14800 -700 +14800 2080 +14800 2100 +14800 3300 +14800 3320 +14800 12840 +14800 12860 +14800 17280 +14800 17300 +14800 19280 +14800 19300 +14820 -17520 +14820 -16020 +14820 -16000 +14820 -13840 +14820 -13820 +14820 -13800 +14820 -10760 +14820 -8480 +14820 -8460 +14820 -8440 +14820 -7880 +14820 -7860 +14820 -5760 +14820 -5740 +14820 -3620 +14820 -3600 +14820 -3240 +14820 -1180 +14820 -1160 +14820 -740 +14820 -720 +14820 -700 +14820 2080 +14820 3300 +14820 12860 +14820 17280 +14820 19280 +14840 -16000 +14840 -13820 +14840 -10780 +14840 -10760 +14840 -8460 +14840 -8440 +14840 -8420 +14840 -7880 +14840 -7860 +14840 -5740 +14840 -1180 +14840 -740 +14840 -720 +14840 -700 +14840 2100 +14840 2380 +14840 3300 +14840 12840 +14840 17280 +14840 17300 +14840 19280 +14860 -17480 +14860 -16040 +14860 -10960 +14860 -10780 +14860 -10760 +14860 -8460 +14860 -8440 +14860 -7880 +14860 -7860 +14860 -5740 +14860 -3600 +14860 -3220 +14860 -1180 +14860 -740 +14860 -720 +14860 2080 +14860 2100 +14860 2120 +14860 2300 +14860 2400 +14860 2440 +14860 3280 +14860 3340 +14860 12840 +14860 17280 +14860 17300 +14860 19260 +14860 19280 +14880 -10960 +14880 -10800 +14880 -10760 +14880 -8480 +14880 -8460 +14880 -8440 +14880 -7880 +14880 -5740 +14880 -5720 +14880 -3980 +14880 -3100 +14880 -1180 +14880 -1160 +14880 -740 +14880 -720 +14880 -700 +14880 2100 +14880 2120 +14880 2300 +14880 2320 +14880 3300 +14880 3320 +14880 12840 +14880 17280 +14880 17300 +14880 19280 +14900 -10960 +14900 -10760 +14900 -8460 +14900 -8440 +14900 -7880 +14900 -7860 +14900 -5760 +14900 -5740 +14900 -3640 +14900 -3180 +14900 -3140 +14900 -3100 +14900 -1180 +14900 -1160 +14900 -740 +14900 -720 +14900 2100 +14900 2120 +14900 2160 +14900 2300 +14900 2320 +14900 2420 +14900 3300 +14900 3320 +14900 12840 +14900 17280 +14900 17300 +14900 19260 +14900 19280 +14900 19300 +14920 -10940 +14920 -10760 +14920 -8460 +14920 -8440 +14920 -7880 +14920 -7860 +14920 -5760 +14920 -5740 +14920 -3620 +14920 -3240 +14920 -3040 +14920 -3020 +14920 -1180 +14920 -740 +14920 -720 +14920 2120 +14920 2140 +14920 2200 +14920 2320 +14920 2400 +14920 3300 +14920 12840 +14920 17280 +14920 17300 +14920 19280 +14940 -10940 +14940 -10760 +14940 -8480 +14940 -8460 +14940 -8440 +14940 -7880 +14940 -7860 +14940 -5760 +14940 -5740 +14940 -3660 +14940 -1180 +14940 -740 +14940 -720 +14940 2120 +14940 2140 +14940 2320 +14940 2400 +14940 2500 +14940 3300 +14940 12840 +14940 12860 +14940 17280 +14940 17300 +14940 19260 +14940 19280 +14940 19300 +14960 -10960 +14960 -10760 +14960 -10740 +14960 -8460 +14960 -8440 +14960 -7880 +14960 -7860 +14960 -5740 +14960 -3660 +14960 -3640 +14960 -1180 +14960 -740 +14960 -720 +14960 2120 +14960 2140 +14960 2180 +14960 2320 +14960 2380 +14960 17280 +14960 17300 +14960 19280 +14980 -16300 +14980 -10760 +14980 -8460 +14980 -8440 +14980 -8420 +14980 -7880 +14980 -7860 +14980 -6100 +14980 -6080 +14980 -6060 +14980 -6020 +14980 -5760 +14980 -5740 +14980 -3680 +14980 -3660 +14980 -3260 +14980 -1180 +14980 -1160 +14980 -740 +14980 -720 +14980 2120 +14980 2140 +14980 2320 +14980 2420 +14980 2460 +14980 2640 +14980 3300 +14980 17280 +14980 17300 +14980 19280 +15000 -10960 +15000 -10940 +15000 -10760 +15000 -8440 +15000 -7880 +15000 -6120 +15000 -6100 +15000 -6080 +15000 -6060 +15000 -6040 +15000 -6020 +15000 -6000 +15000 -5760 +15000 -5740 +15000 -3700 +15000 -3260 +15000 -1160 +15000 -740 +15000 -720 +15000 2120 +15000 2140 +15000 2320 +15000 2340 +15000 2380 +15000 2400 +15000 2480 +15000 2500 +15000 2600 +15000 12860 +15000 17280 +15000 17300 +15000 19280 +15020 -16300 +15020 -10960 +15020 -10760 +15020 -8460 +15020 -8440 +15020 -6100 +15020 -6080 +15020 -6060 +15020 -6040 +15020 -6020 +15020 -6000 +15020 -5980 +15020 -5960 +15020 -5760 +15020 -5740 +15020 -3660 +15020 -3260 +15020 -1180 +15020 -920 +15020 -740 +15020 -720 +15020 2120 +15020 2140 +15020 2320 +15020 2360 +15020 2400 +15020 2480 +15020 12860 +15020 17280 +15020 17300 +15020 19260 +15020 19280 +15020 19300 +15040 -16400 +15040 -10960 +15040 -10760 +15040 -8460 +15040 -8440 +15040 -6120 +15040 -6100 +15040 -6040 +15040 -6020 +15040 -5980 +15040 -5960 +15040 -5940 +15040 -5920 +15040 -5780 +15040 -5760 +15040 -5740 +15040 -3680 +15040 -1180 +15040 -1160 +15040 -720 +15040 -700 +15040 -680 +15040 -660 +15040 2120 +15040 2140 +15040 2160 +15040 2340 +15040 2400 +15040 12860 +15040 17280 +15040 17300 +15040 19280 +15060 -10960 +15060 -10760 +15060 -8440 +15060 -8040 +15060 -6120 +15060 -6100 +15060 -6080 +15060 -6040 +15060 -5960 +15060 -5940 +15060 -5920 +15060 -5900 +15060 -5760 +15060 -5740 +15060 -3680 +15060 -3660 +15060 -1180 +15060 -1160 +15060 -1100 +15060 -1060 +15060 -840 +15060 -680 +15060 -660 +15060 2120 +15060 2140 +15060 2160 +15060 17280 +15060 17300 +15060 19280 +15080 -16420 +15080 -10960 +15080 -10940 +15080 -10780 +15080 -10760 +15080 -10740 +15080 -8460 +15080 -8400 +15080 -8020 +15080 -8000 +15080 -7980 +15080 -7960 +15080 -7940 +15080 -6120 +15080 -6100 +15080 -6080 +15080 -6020 +15080 -5980 +15080 -5960 +15080 -5920 +15080 -5900 +15080 -5760 +15080 -5740 +15080 -3700 +15080 -1180 +15080 -1160 +15080 -1100 +15080 -840 +15080 -700 +15080 -680 +15080 -660 +15080 2120 +15080 2140 +15080 2200 +15080 2440 +15080 2840 +15080 17280 +15080 17300 +15080 19280 +15100 -16440 +15100 -16420 +15100 -10760 +15100 -8460 +15100 -8440 +15100 -8420 +15100 -7960 +15100 -7940 +15100 -7920 +15100 -6140 +15100 -6120 +15100 -6100 +15100 -6060 +15100 -6040 +15100 -6020 +15100 -5920 +15100 -5900 +15100 -5780 +15100 -5760 +15100 -5740 +15100 -4060 +15100 -3720 +15100 -3700 +15100 -3280 +15100 -1180 +15100 -1120 +15100 -1100 +15100 -800 +15100 -780 +15100 -760 +15100 -740 +15100 -720 +15100 -700 +15100 -680 +15100 2120 +15100 2160 +15100 2440 +15100 2520 +15100 2820 +15100 2860 +15100 17280 +15100 17300 +15100 19280 +15120 -16420 +15120 -10960 +15120 -10940 +15120 -10760 +15120 -8440 +15120 -7960 +15120 -7940 +15120 -7920 +15120 -6140 +15120 -6120 +15120 -6100 +15120 -6040 +15120 -5900 +15120 -5760 +15120 -3700 +15120 -3300 +15120 -1180 +15120 -1160 +15120 -1100 +15120 -860 +15120 -800 +15120 -740 +15120 -700 +15120 2100 +15120 2120 +15120 2140 +15120 2160 +15120 2180 +15120 14140 +15120 14200 +15120 17280 +15120 17300 +15120 19260 +15120 19280 +15140 -16420 +15140 -10960 +15140 -10760 +15140 -8460 +15140 -8440 +15140 -7960 +15140 -7940 +15140 -6100 +15140 -6040 +15140 -6020 +15140 -5780 +15140 -5760 +15140 -3720 +15140 -1180 +15140 -1160 +15140 -1100 +15140 -800 +15140 2140 +15140 2160 +15140 2180 +15140 14160 +15140 14180 +15140 17280 +15140 17300 +15140 19280 +15160 -16420 +15160 -10960 +15160 -10760 +15160 -10740 +15160 -8460 +15160 -8440 +15160 -7960 +15160 -7940 +15160 -7920 +15160 -6020 +15160 -5780 +15160 -5760 +15160 -3720 +15160 -3300 +15160 -1160 +15160 -1100 +15160 940 +15160 960 +15160 980 +15160 1060 +15160 1160 +15160 1180 +15160 1220 +15160 1240 +15160 1280 +15160 1320 +15160 1340 +15160 1380 +15160 1400 +15160 2140 +15160 2160 +15160 2180 +15160 2320 +15160 14180 +15160 17280 +15160 17300 +15160 19280 +15180 -16420 +15180 -10960 +15180 -10940 +15180 -10760 +15180 -8460 +15180 -8440 +15180 -7960 +15180 -7940 +15180 -7920 +15180 -5780 +15180 -5760 +15180 -3720 +15180 -3700 +15180 -1180 +15180 -1160 +15180 -1100 +15180 940 +15180 960 +15180 980 +15180 1000 +15180 1020 +15180 1040 +15180 1060 +15180 1080 +15180 1100 +15180 1120 +15180 1140 +15180 1160 +15180 1180 +15180 1200 +15180 1220 +15180 1240 +15180 1260 +15180 1280 +15180 1300 +15180 1320 +15180 1340 +15180 1360 +15180 1380 +15180 2180 +15180 2200 +15180 2220 +15180 2260 +15180 2280 +15180 2300 +15180 2320 +15180 2340 +15180 2480 +15180 2700 +15180 2720 +15180 13440 +15180 13480 +15180 14200 +15180 17280 +15180 17300 +15180 19280 +15200 -16420 +15200 -16400 +15200 -10960 +15200 -10800 +15200 -10780 +15200 -10760 +15200 -8460 +15200 -8440 +15200 -7960 +15200 -7940 +15200 -7920 +15200 -5780 +15200 -5760 +15200 -3720 +15200 -2100 +15200 -1180 +15200 -1160 +15200 -1100 +15200 980 +15200 1000 +15200 1040 +15200 1060 +15200 1080 +15200 1120 +15200 1140 +15200 1180 +15200 1220 +15200 1260 +15200 1300 +15200 1320 +15200 1360 +15200 2200 +15200 2260 +15200 2280 +15200 2320 +15200 2340 +15200 2360 +15200 2400 +15200 2500 +15200 2520 +15200 2560 +15200 2660 +15200 2700 +15200 2720 +15200 2740 +15200 13460 +15200 13480 +15200 17280 +15200 17300 +15200 19260 +15200 19280 +15220 -16400 +15220 -10960 +15220 -10940 +15220 -10800 +15220 -10760 +15220 -8460 +15220 -8440 +15220 -7940 +15220 -7920 +15220 -5760 +15220 -3740 +15220 -3320 +15220 -2100 +15220 -1180 +15220 -1160 +15220 -1100 +15220 -1080 +15220 2400 +15220 2500 +15220 2700 +15220 2720 +15220 13460 +15220 13480 +15220 17280 +15220 17300 +15220 19280 +15240 -16420 +15240 -16400 +15240 -10960 +15240 -10760 +15240 -8460 +15240 -8440 +15240 -7960 +15240 -7940 +15240 -7920 +15240 -5760 +15240 -3740 +15240 -3720 +15240 -3320 +15240 -1180 +15240 -1160 +15240 -1100 +15240 2700 +15240 2720 +15240 2740 +15240 13480 +15240 13900 +15240 17280 +15240 17300 +15240 19280 +15260 -16420 +15260 -16400 +15260 -10940 +15260 -10760 +15260 -8460 +15260 -8440 +15260 -7960 +15260 -7940 +15260 -7920 +15260 -5760 +15260 -3740 +15260 -1180 +15260 -1160 +15260 -1100 +15260 2700 +15260 2720 +15260 2740 +15260 13460 +15260 13900 +15260 17280 +15260 17300 +15260 19280 +15280 -16420 +15280 -10760 +15280 -8460 +15280 -8440 +15280 -7960 +15280 -7920 +15280 -5780 +15280 -5760 +15280 -3740 +15280 -1180 +15280 -1160 +15280 -1100 +15280 2700 +15280 2720 +15280 2740 +15280 13460 +15280 13480 +15280 13920 +15280 17280 +15280 17300 +15280 19280 +15300 -16420 +15300 -16400 +15300 -10760 +15300 -8460 +15300 -8440 +15300 -7960 +15300 -7940 +15300 -7920 +15300 -5780 +15300 -5760 +15300 -3760 +15300 -3740 +15300 -3340 +15300 -1180 +15300 -1160 +15300 2700 +15300 2720 +15300 2740 +15300 13460 +15300 13480 +15300 13920 +15300 13940 +15300 17280 +15300 17300 +15300 19260 +15300 19280 +15320 -10880 +15320 -10760 +15320 -8460 +15320 -8440 +15320 -8400 +15320 -7960 +15320 -7940 +15320 -7920 +15320 -5780 +15320 -5760 +15320 -3760 +15320 -3340 +15320 -1180 +15320 -1160 +15320 -1080 +15320 2700 +15320 2720 +15320 13460 +15320 13480 +15320 13980 +15320 14000 +15320 17280 +15320 17300 +15320 19260 +15320 19280 +15340 -10880 +15340 -10780 +15340 -10760 +15340 -10740 +15340 -8460 +15340 -8440 +15340 -7960 +15340 -7940 +15340 -5780 +15340 -5760 +15340 -3760 +15340 -2100 +15340 -1160 +15340 -1100 +15340 2700 +15340 2720 +15340 2740 +15340 13460 +15340 13480 +15340 13980 +15340 17280 +15340 17300 +15340 19280 +15360 -10880 +15360 -10760 +15360 -8460 +15360 -8440 +15360 -7960 +15360 -7940 +15360 -5780 +15360 -3760 +15360 -1180 +15360 -1160 +15360 -1100 +15360 -640 +15360 2700 +15360 2720 +15360 17280 +15360 17300 +15360 19280 +15380 -10880 +15380 -10860 +15380 -10760 +15380 -8460 +15380 -8440 +15380 -7960 +15380 -7940 +15380 -7920 +15380 -6020 +15380 -6000 +15380 -5980 +15380 -5960 +15380 -5940 +15380 -5900 +15380 -5880 +15380 -5800 +15380 -5780 +15380 -3760 +15380 -1160 +15380 -1100 +15380 -660 +15380 -620 +15380 -580 +15380 2700 +15380 2720 +15380 2740 +15380 13560 +15380 13580 +15380 17280 +15380 17300 +15380 19260 +15380 19280 +15400 -10880 +15400 -10760 +15400 -8480 +15400 -8460 +15400 -7960 +15400 -7940 +15400 -7920 +15400 -7480 +15400 -7460 +15400 -7440 +15400 -6040 +15400 -6020 +15400 -6000 +15400 -5980 +15400 -5960 +15400 -5940 +15400 -5920 +15400 -5900 +15400 -5880 +15400 -5860 +15400 -5840 +15400 -5780 +15400 -3780 +15400 -3420 +15400 -3400 +15400 -3360 +15400 -1180 +15400 -1160 +15400 -1100 +15400 -1040 +15400 -720 +15400 -680 +15400 -660 +15400 -600 +15400 -580 +15400 -560 +15400 -540 +15400 2700 +15400 2720 +15400 13580 +15400 13600 +15400 17280 +15400 17300 +15400 19260 +15400 19280 +15420 -10880 +15420 -10780 +15420 -10760 +15420 -10740 +15420 -8460 +15420 -8440 +15420 -8420 +15420 -7960 +15420 -7940 +15420 -7920 +15420 -7480 +15420 -7460 +15420 -7440 +15420 -7420 +15420 -6060 +15420 -6040 +15420 -6020 +15420 -6000 +15420 -5800 +15420 -5780 +15420 -3780 +15420 -3480 +15420 -3360 +15420 -1160 +15420 -1100 +15420 -980 +15420 -880 +15420 -700 +15420 -520 +15420 -500 +15420 2700 +15420 2720 +15420 2740 +15420 5200 +15420 13600 +15420 17280 +15420 17300 +15420 19280 +15440 -10940 +15440 -10920 +15440 -10900 +15440 -10880 +15440 -10760 +15440 -8460 +15440 -7940 +15440 -7440 +15440 -7420 +15440 -7400 +15440 -6080 +15440 -6060 +15440 -6040 +15440 -5900 +15440 -3780 +15440 -3500 +15440 -1180 +15440 -1160 +15440 -1080 +15440 -680 +15440 -500 +15440 2700 +15440 2720 +15440 2740 +15440 5200 +15440 13580 +15440 13600 +15440 17220 +15440 17260 +15440 17280 +15440 19260 +15440 19280 +15460 -16580 +15460 -10980 +15460 -10960 +15460 -10920 +15460 -10880 +15460 -10760 +15460 -8460 +15460 -8440 +15460 -8420 +15460 -8400 +15460 -7960 +15460 -7940 +15460 -6060 +15460 -6040 +15460 -5900 +15460 -5800 +15460 -5780 +15460 -3780 +15460 -2860 +15460 -2100 +15460 -1180 +15460 -1160 +15460 -860 +15460 -660 +15460 2700 +15460 2720 +15460 2740 +15460 5180 +15460 13580 +15460 13600 +15460 17220 +15460 17240 +15460 17260 +15460 17280 +15460 17300 +15460 19280 +15480 -10980 +15480 -10960 +15480 -10940 +15480 -10920 +15480 -10880 +15480 -10780 +15480 -10760 +15480 -8460 +15480 -7940 +15480 -7920 +15480 -6060 +15480 -6040 +15480 -5840 +15480 -5800 +15480 -5780 +15480 -3800 +15480 -1180 +15480 -1160 +15480 -880 +15480 -660 +15480 2700 +15480 2720 +15480 2740 +15480 5200 +15480 13600 +15480 17200 +15480 17220 +15480 17240 +15480 17260 +15480 17280 +15480 17300 +15480 19280 +15500 -16600 +15500 -10960 +15500 -10940 +15500 -10920 +15500 -10900 +15500 -10760 +15500 -8480 +15500 -8460 +15500 -8440 +15500 -8420 +15500 -7940 +15500 -7920 +15500 -6060 +15500 -6040 +15500 -5800 +15500 -5780 +15500 -3800 +15500 -3600 +15500 -2860 +15500 -2840 +15500 -1180 +15500 -1160 +15500 2700 +15500 2720 +15500 5180 +15500 5200 +15500 13600 +15500 16840 +15500 16860 +15500 16880 +15500 16940 +15500 17000 +15500 17040 +15500 17060 +15500 17080 +15500 17100 +15500 17120 +15500 17140 +15500 17160 +15500 17180 +15500 17200 +15500 17220 +15500 17240 +15500 17280 +15500 19260 +15500 19280 +15520 -16580 +15520 -11380 +15520 -10760 +15520 -10740 +15520 -8440 +15520 -7940 +15520 -7920 +15520 -6060 +15520 -6040 +15520 -5800 +15520 -3820 +15520 -3800 +15520 -3760 +15520 -3720 +15520 -3700 +15520 -3680 +15520 -3660 +15520 -3640 +15520 -2840 +15520 -1160 +15520 -1000 +15520 -940 +15520 -840 +15520 -600 +15520 2700 +15520 2720 +15520 2740 +15520 2760 +15520 2800 +15520 2900 +15520 5180 +15520 5200 +15520 13580 +15520 13600 +15520 16560 +15520 16580 +15520 16600 +15520 16620 +15520 16640 +15520 16680 +15520 16700 +15520 16720 +15520 16740 +15520 16760 +15520 16780 +15520 16800 +15520 16820 +15520 16840 +15520 16860 +15520 16880 +15520 16900 +15520 16920 +15520 16940 +15520 16960 +15520 16980 +15520 17000 +15520 17020 +15520 17040 +15520 17060 +15520 17080 +15520 17100 +15520 17120 +15520 17140 +15520 17160 +15520 17180 +15520 17200 +15520 17220 +15520 19260 +15520 19280 +15540 -16600 +15540 -16580 +15540 -11360 +15540 -11020 +15540 -11000 +15540 -10760 +15540 -10740 +15540 -8460 +15540 -8440 +15540 -7940 +15540 -7920 +15540 -6080 +15540 -6060 +15540 -6040 +15540 -5800 +15540 -5780 +15540 -3800 +15540 -3780 +15540 -3760 +15540 -3740 +15540 -3660 +15540 -3640 +15540 -2840 +15540 -2820 +15540 -1160 +15540 -1040 +15540 -920 +15540 -840 +15540 -600 +15540 2700 +15540 2720 +15540 2740 +15540 2760 +15540 2820 +15540 2900 +15540 2920 +15540 2940 +15540 5180 +15540 5200 +15540 13580 +15540 13600 +15540 16580 +15540 16600 +15540 16620 +15540 16640 +15540 16660 +15540 16680 +15540 16700 +15540 16720 +15540 16740 +15540 16760 +15540 16780 +15540 16800 +15540 16840 +15540 16860 +15540 16880 +15540 16900 +15540 16920 +15540 16960 +15540 17180 +15540 19260 +15540 19280 +15560 -16600 +15560 -11380 +15560 -11340 +15560 -11240 +15560 -11020 +15560 -11000 +15560 -10920 +15560 -10780 +15560 -10760 +15560 -8460 +15560 -8440 +15560 -7960 +15560 -7940 +15560 -7920 +15560 -6080 +15560 -6060 +15560 -5800 +15560 -3760 +15560 -3720 +15560 -3700 +15560 -3680 +15560 -3620 +15560 -3600 +15560 -3580 +15560 -3560 +15560 -2820 +15560 -1180 +15560 -1160 +15560 -940 +15560 -900 +15560 -840 +15560 -620 +15560 -560 +15560 2720 +15560 2740 +15560 2780 +15560 2840 +15560 2860 +15560 2880 +15560 2900 +15560 2920 +15560 5180 +15560 5200 +15560 5280 +15560 13580 +15560 13600 +15560 19260 +15560 19280 +15580 -16600 +15580 -16580 +15580 -11360 +15580 -11240 +15580 -10980 +15580 -10960 +15580 -10800 +15580 -10780 +15580 -10760 +15580 -8460 +15580 -7960 +15580 -7940 +15580 -7920 +15580 -6080 +15580 -6060 +15580 -5800 +15580 -5780 +15580 -3700 +15580 -3680 +15580 -3660 +15580 -3640 +15580 -3560 +15580 -3520 +15580 -3500 +15580 -3480 +15580 -3440 +15580 -2820 +15580 -2800 +15580 -2120 +15580 -1160 +15580 -860 +15580 -840 +15580 -620 +15580 2740 +15580 2820 +15580 2880 +15580 2900 +15580 2940 +15580 5220 +15580 5240 +15580 5280 +15580 5320 +15580 8640 +15580 13580 +15580 13600 +15580 19260 +15580 19280 +15600 -16600 +15600 -16580 +15600 -11340 +15600 -11240 +15600 -11220 +15600 -11200 +15600 -10880 +15600 -10800 +15600 -10760 +15600 -8480 +15600 -8460 +15600 -8440 +15600 -7960 +15600 -7940 +15600 -6080 +15600 -6060 +15600 -5800 +15600 -5780 +15600 -3600 +15600 -3480 +15600 -3460 +15600 -3420 +15600 -3380 +15600 -2780 +15600 -2760 +15600 -2140 +15600 -2100 +15600 -1180 +15600 -1160 +15600 -840 +15600 -820 +15600 -600 +15600 2780 +15600 2800 +15600 2880 +15600 2900 +15600 5200 +15600 5300 +15600 5320 +15600 8640 +15600 13580 +15600 13600 +15600 19280 +15620 -16580 +15620 -16560 +15620 -11340 +15620 -11320 +15620 -11240 +15620 -11200 +15620 -10900 +15620 -10880 +15620 -10860 +15620 -10760 +15620 -10740 +15620 -8460 +15620 -8440 +15620 -7940 +15620 -7920 +15620 -6080 +15620 -6060 +15620 -5820 +15620 -5800 +15620 -3540 +15620 -3420 +15620 -2760 +15620 -2160 +15620 -2140 +15620 -1180 +15620 -1160 +15620 -880 +15620 -820 +15620 -680 +15620 -600 +15620 2760 +15620 2780 +15620 2800 +15620 5220 +15620 5320 +15620 5340 +15620 8620 +15620 9040 +15620 13580 +15620 13600 +15620 19280 +15640 -16580 +15640 -16560 +15640 -11300 +15640 -10900 +15640 -10880 +15640 -10760 +15640 -8460 +15640 -8440 +15640 -7940 +15640 -7920 +15640 -6100 +15640 -6080 +15640 -6060 +15640 -5820 +15640 -5800 +15640 -2760 +15640 -2740 +15640 -2700 +15640 -2180 +15640 -2160 +15640 -1180 +15640 -1160 +15640 -800 +15640 -780 +15640 -740 +15640 -720 +15640 -700 +15640 -680 +15640 -660 +15640 -620 +15640 2760 +15640 2780 +15640 2800 +15640 5220 +15640 5340 +15640 13580 +15640 13600 +15640 19260 +15640 19280 +15660 -16600 +15660 -16580 +15660 -10760 +15660 -8460 +15660 -8440 +15660 -8420 +15660 -8380 +15660 -7940 +15660 -7920 +15660 -6100 +15660 -6080 +15660 -6060 +15660 -5820 +15660 -5800 +15660 -2740 +15660 -2200 +15660 -2180 +15660 -1180 +15660 -1160 +15660 -800 +15660 -780 +15660 -760 +15660 -740 +15660 -720 +15660 -700 +15660 2760 +15660 2780 +15660 2940 +15660 5320 +15660 9040 +15660 13580 +15660 13600 +15660 19260 +15660 19280 +15680 -16580 +15680 -10800 +15680 -10760 +15680 -8460 +15680 -8440 +15680 -7960 +15680 -7940 +15680 -6080 +15680 -6060 +15680 -5800 +15680 -3520 +15680 -2900 +15680 -2880 +15680 -2860 +15680 -2720 +15680 -2240 +15680 -2220 +15680 -2200 +15680 -1180 +15680 -1160 +15680 -1140 +15680 -780 +15680 -760 +15680 -740 +15680 -720 +15680 -700 +15680 2760 +15680 2780 +15680 2840 +15680 5320 +15680 5340 +15680 9860 +15680 13580 +15680 13600 +15680 19260 +15680 19280 +15700 -16580 +15700 -10840 +15700 -10760 +15700 -10740 +15700 -8460 +15700 -8420 +15700 -7940 +15700 -7920 +15700 -6080 +15700 -6060 +15700 -5820 +15700 -5800 +15700 -5780 +15700 -3520 +15700 -3500 +15700 -2900 +15700 -2700 +15700 -2260 +15700 -2240 +15700 -1180 +15700 -1160 +15700 -1040 +15700 -760 +15700 -700 +15700 2760 +15700 2780 +15700 3040 +15700 5320 +15700 8440 +15700 8460 +15700 9880 +15700 13580 +15700 13600 +15700 19260 +15700 19280 +15720 -16580 +15720 -10800 +15720 -10760 +15720 -10740 +15720 -8460 +15720 -8440 +15720 -7960 +15720 -7940 +15720 -6080 +15720 -6060 +15720 -5820 +15720 -5800 +15720 -3520 +15720 -2900 +15720 -2880 +15720 -2860 +15720 -2840 +15720 -2700 +15720 -2680 +15720 -1180 +15720 -1160 +15720 -1040 +15720 2740 +15720 2760 +15720 2780 +15720 5320 +15720 8040 +15720 8440 +15720 8460 +15720 10100 +15720 13580 +15720 13600 +15720 19260 +15720 19280 +15740 -16600 +15740 -16580 +15740 -10940 +15740 -10920 +15740 -10900 +15740 -10880 +15740 -10760 +15740 -8460 +15740 -8440 +15740 -8420 +15740 -7940 +15740 -7920 +15740 -6080 +15740 -6060 +15740 -5800 +15740 -3540 +15740 -3520 +15740 -2900 +15740 -2880 +15740 -2680 +15740 -2660 +15740 -2580 +15740 -2320 +15740 -2300 +15740 -1180 +15740 -1160 +15740 -1140 +15740 -1120 +15740 -1100 +15740 -1080 +15740 -1060 +15740 -1040 +15740 2740 +15740 2760 +15740 3420 +15740 5320 +15740 8360 +15740 8460 +15740 13580 +15740 13600 +15740 19260 +15740 19280 +15760 -16600 +15760 -16580 +15760 -16560 +15760 -12680 +15760 -12660 +15760 -10960 +15760 -10940 +15760 -10920 +15760 -10900 +15760 -10760 +15760 -10740 +15760 -8460 +15760 -8440 +15760 -7940 +15760 -7920 +15760 -6060 +15760 -6040 +15760 -5800 +15760 -2680 +15760 -2660 +15760 -2640 +15760 -2620 +15760 -2600 +15760 -2580 +15760 -2560 +15760 -2540 +15760 -2520 +15760 -2500 +15760 -2340 +15760 -2320 +15760 -2300 +15760 -1160 +15760 -1140 +15760 -1120 +15760 -1100 +15760 -1080 +15760 -1060 +15760 2740 +15760 2760 +15760 2780 +15760 5320 +15760 5340 +15760 8540 +15760 8620 +15760 9880 +15760 10100 +15760 13600 +15760 19260 +15760 19280 +15780 -16580 +15780 -16560 +15780 -12700 +15780 -12680 +15780 -12660 +15780 -12640 +15780 -10980 +15780 -10960 +15780 -10940 +15780 -10920 +15780 -10900 +15780 -10880 +15780 -10860 +15780 -10820 +15780 -10780 +15780 -10760 +15780 -10740 +15780 -8460 +15780 -8440 +15780 -7940 +15780 -5820 +15780 -5800 +15780 -2620 +15780 -2580 +15780 -2560 +15780 -2540 +15780 -2520 +15780 -2500 +15780 -2480 +15780 -2460 +15780 -2440 +15780 -2420 +15780 -2400 +15780 -2380 +15780 -2360 +15780 -2340 +15780 2760 +15780 2780 +15780 5320 +15780 5360 +15780 8600 +15780 10060 +15780 13600 +15780 19260 +15780 19280 +15800 -16580 +15800 -12680 +15800 -12660 +15800 -10940 +15800 -10780 +15800 -10760 +15800 -8460 +15800 -8440 +15800 -7940 +15800 -7920 +15800 -5820 +15800 -5800 +15800 -5780 +15800 -5760 +15800 -2460 +15800 -2420 +15800 -2400 +15800 -2380 +15800 -2360 +15800 2760 +15800 2780 +15800 2800 +15800 5320 +15800 5340 +15800 5360 +15800 8580 +15800 8600 +15800 8620 +15800 10080 +15800 10120 +15800 13600 +15800 19260 +15800 19280 +15820 -16560 +15820 -10940 +15820 -10780 +15820 -10760 +15820 -10740 +15820 -7940 +15820 -5820 +15820 -5800 +15820 -5760 +15820 -960 +15820 2740 +15820 2760 +15820 2780 +15820 2800 +15820 2820 +15820 2840 +15820 5300 +15820 5320 +15820 5340 +15820 8620 +15820 8640 +15820 9720 +15820 10020 +15820 13740 +15820 19260 +15820 19280 +15840 -16580 +15840 -16560 +15840 -16440 +15840 -11180 +15840 -11140 +15840 -10940 +15840 -10800 +15840 -10760 +15840 -10740 +15840 -8460 +15840 -8440 +15840 -7940 +15840 -5800 +15840 -5760 +15840 -5740 +15840 -980 +15840 2720 +15840 2740 +15840 2760 +15840 2780 +15840 2820 +15840 2840 +15840 2880 +15840 2900 +15840 2960 +15840 5340 +15840 8600 +15840 8620 +15840 10020 +15840 13720 +15840 13740 +15840 19260 +15840 19280 +15860 -16560 +15860 -16540 +15860 -16520 +15860 -16480 +15860 -16420 +15860 -16400 +15860 -16380 +15860 -10920 +15860 -10820 +15860 -10800 +15860 -10780 +15860 -10760 +15860 -10740 +15860 -8440 +15860 -8400 +15860 -7960 +15860 -7920 +15860 -5760 +15860 -5740 +15860 -5720 +15860 -5700 +15860 -5440 +15860 -3420 +15860 -1000 +15860 -980 +15860 -940 +15860 2760 +15860 2780 +15860 2940 +15860 2960 +15860 2980 +15860 3040 +15860 5320 +15860 5340 +15860 5360 +15860 8620 +15860 8640 +15860 9760 +15860 12420 +15860 12460 +15860 12480 +15860 12560 +15860 12620 +15860 12940 +15860 13240 +15860 13300 +15860 13660 +15860 13680 +15860 13720 +15860 13740 +15860 19260 +15860 19280 +15880 -16540 +15880 -16520 +15880 -16460 +15880 -16440 +15880 -16420 +15880 -16380 +15880 -10760 +15880 -8460 +15880 -8440 +15880 -5760 +15880 -5740 +15880 -5720 +15880 -5680 +15880 -5660 +15880 -5640 +15880 -5620 +15880 -5600 +15880 -5580 +15880 -5560 +15880 -5540 +15880 -5520 +15880 -5480 +15880 -5460 +15880 -5440 +15880 -5420 +15880 -5400 +15880 -5380 +15880 -5360 +15880 -5340 +15880 -5320 +15880 -5300 +15880 -5240 +15880 -5220 +15880 -5200 +15880 -5180 +15880 -5160 +15880 -5140 +15880 -5120 +15880 -5100 +15880 -5080 +15880 -5060 +15880 -5020 +15880 -5000 +15880 -4980 +15880 -3340 +15880 -1020 +15880 5320 +15880 5340 +15880 8620 +15880 12080 +15880 12240 +15880 12280 +15880 12360 +15880 12520 +15880 13240 +15880 13580 +15880 13600 +15880 13620 +15880 13700 +15880 19260 +15880 19280 +15900 -16500 +15900 -16480 +15900 -16440 +15900 -16380 +15900 -10760 +15900 -10740 +15900 -8460 +15900 -8440 +15900 -8400 +15900 -7980 +15900 -7960 +15900 -5580 +15900 -5540 +15900 -5520 +15900 -5500 +15900 -5460 +15900 -5440 +15900 -5420 +15900 -5400 +15900 -5380 +15900 -5360 +15900 -5340 +15900 -5320 +15900 -5300 +15900 -5280 +15900 -5260 +15900 -5240 +15900 -5220 +15900 -5200 +15900 -5180 +15900 -5160 +15900 -5140 +15900 -5120 +15900 -5100 +15900 -5080 +15900 -5060 +15900 -5040 +15900 -5020 +15900 -5000 +15900 -4980 +15900 -4960 +15900 -4940 +15900 -4920 +15900 -3360 +15900 -1000 +15900 5320 +15900 5340 +15900 9940 +15900 10100 +15900 19260 +15900 19280 +15920 -16380 +15920 -16360 +15920 -10920 +15920 -10760 +15920 -10740 +15920 -8460 +15920 -8440 +15920 -5240 +15920 -5200 +15920 -5180 +15920 -5160 +15920 -5140 +15920 -5120 +15920 -5100 +15920 -4980 +15920 -4960 +15920 -4940 +15920 -4920 +15920 -3860 +15920 -3840 +15920 -3820 +15920 -1060 +15920 -1000 +15920 -980 +15920 5300 +15920 5320 +15920 5340 +15920 5360 +15920 8320 +15920 8600 +15920 8620 +15920 8640 +15920 10080 +15920 19260 +15920 19280 +15940 -17020 +15940 -16380 +15940 -16360 +15940 -10900 +15940 -10880 +15940 -10820 +15940 -10760 +15940 -10740 +15940 -8460 +15940 -8440 +15940 -8420 +15940 -3860 +15940 -3840 +15940 -3420 +15940 -3360 +15940 -1080 +15940 -1020 +15940 -1000 +15940 -980 +15940 -920 +15940 5320 +15940 5340 +15940 8600 +15940 8620 +15940 10000 +15940 10080 +15940 19260 +15940 19280 +15960 -16760 +15960 -16360 +15960 -10880 +15960 -10760 +15960 -10740 +15960 -8460 +15960 -8440 +15960 -3860 +15960 -3840 +15960 -3820 +15960 -3800 +15960 -3360 +15960 -1080 +15960 -1060 +15960 -1020 +15960 -980 +15960 -940 +15960 -920 +15960 5300 +15960 5340 +15960 5360 +15960 8580 +15960 10000 +15960 10080 +15960 18740 +15960 18760 +15960 19260 +15960 19280 +15980 -17140 +15980 -16380 +15980 -10880 +15980 -10760 +15980 -8480 +15980 -8460 +15980 -8440 +15980 -3840 +15980 -3820 +15980 -3360 +15980 -1060 +15980 -1040 +15980 -1020 +15980 -1000 +15980 -980 +15980 -960 +15980 -940 +15980 -920 +15980 5320 +15980 5340 +15980 5360 +15980 8560 +15980 10080 +15980 18740 +15980 18760 +15980 18780 +15980 18800 +15980 19040 +15980 19060 +15980 19260 +15980 19280 +16000 -16380 +16000 -16360 +16000 -10900 +16000 -10880 +16000 -10800 +16000 -10780 +16000 -10760 +16000 -8440 +16000 -3840 +16000 -3820 +16000 -3800 +16000 -1080 +16000 -1060 +16000 -1020 +16000 -980 +16000 -960 +16000 -940 +16000 -920 +16000 8600 +16000 8620 +16000 10000 +16000 18720 +16000 18740 +16000 18760 +16000 18800 +16000 19020 +16000 19040 +16000 19260 +16000 19280 +16020 -16380 +16020 -16360 +16020 -12400 +16020 -10900 +16020 -10760 +16020 -10740 +16020 -8500 +16020 -8460 +16020 -8440 +16020 -3840 +16020 -3820 +16020 -3800 +16020 -1080 +16020 -1060 +16020 -1040 +16020 -960 +16020 -940 +16020 -920 +16020 -900 +16020 8620 +16020 8640 +16020 9800 +16020 10060 +16020 10080 +16020 18780 +16020 19040 +16020 19260 +16020 19280 +16040 -16380 +16040 -16360 +16040 -16340 +16040 -12420 +16040 -12400 +16040 -11560 +16040 -11540 +16040 -11520 +16040 -10900 +16040 -10760 +16040 -10740 +16040 -8480 +16040 -8460 +16040 -3820 +16040 -3800 +16040 -3780 +16040 -1080 +16040 -1060 +16040 -980 +16040 -960 +16040 -940 +16040 -900 +16040 8600 +16040 8620 +16040 8640 +16040 9780 +16040 10060 +16040 19260 +16040 19280 +16060 -16380 +16060 -16360 +16060 -16340 +16060 -12400 +16060 -11580 +16060 -11560 +16060 -11540 +16060 -11520 +16060 -11500 +16060 -11480 +16060 -10880 +16060 -10760 +16060 -10740 +16060 -8460 +16060 -8440 +16060 -3820 +16060 -3800 +16060 -3420 +16060 -1100 +16060 -1040 +16060 -980 +16060 -940 +16060 -920 +16060 -900 +16060 -880 +16060 -860 +16060 -760 +16060 8600 +16060 8620 +16060 19260 +16060 19280 +16080 -16940 +16080 -16380 +16080 -16360 +16080 -12580 +16080 -12560 +16080 -12540 +16080 -11600 +16080 -11580 +16080 -11560 +16080 -11540 +16080 -11500 +16080 -11480 +16080 -10860 +16080 -10760 +16080 -8460 +16080 -8440 +16080 -3800 +16080 -3780 +16080 -3760 +16080 -3440 +16080 -1080 +16080 -1060 +16080 -1040 +16080 -1000 +16080 -980 +16080 -960 +16080 -940 +16080 -920 +16080 -900 +16080 -880 +16080 -860 +16080 -840 +16080 -760 +16080 5340 +16080 8620 +16080 9960 +16080 10040 +16080 19260 +16080 19280 +16100 -16380 +16100 -16360 +16100 -16340 +16100 -12580 +16100 -12560 +16100 -12540 +16100 -11640 +16100 -11620 +16100 -11600 +16100 -11460 +16100 -11440 +16100 -10900 +16100 -10880 +16100 -10760 +16100 -10740 +16100 -8460 +16100 -8420 +16100 -8400 +16100 -3800 +16100 -3780 +16100 -1080 +16100 -1060 +16100 -1040 +16100 -1020 +16100 -960 +16100 -940 +16100 -920 +16100 -880 +16100 -860 +16100 -840 +16100 -820 +16100 -800 +16100 -780 +16100 -760 +16100 5340 +16100 5360 +16100 8600 +16100 9940 +16100 10000 +16100 19260 +16100 19280 +16120 -11660 +16120 -11640 +16120 -11620 +16120 -10760 +16120 -8480 +16120 -8460 +16120 -8440 +16120 -8340 +16120 -7180 +16120 -7160 +16120 -7140 +16120 -7120 +16120 -7100 +16120 -3800 +16120 -3780 +16120 -3760 +16120 -3740 +16120 -3440 +16120 -3420 +16120 -1060 +16120 -1040 +16120 -1020 +16120 -1000 +16120 -920 +16120 -800 +16120 -780 +16120 -760 +16120 -740 +16120 8620 +16120 9920 +16120 19260 +16120 19280 +16140 -16360 +16140 -16340 +16140 -11700 +16140 -11680 +16140 -11660 +16140 -10780 +16140 -10760 +16140 -10740 +16140 -8480 +16140 -8460 +16140 -8420 +16140 -8340 +16140 -3780 +16140 -3760 +16140 -1060 +16140 -1040 +16140 -1020 +16140 -1000 +16140 -780 +16140 8600 +16140 8620 +16140 8640 +16140 9900 +16140 19260 +16140 19280 +16160 -16360 +16160 -16340 +16160 -11720 +16160 -11700 +16160 -11680 +16160 -11420 +16160 -11400 +16160 -10880 +16160 -10760 +16160 -10740 +16160 -8460 +16160 -8080 +16160 -3800 +16160 -3780 +16160 -3760 +16160 -3420 +16160 -1040 +16160 -1020 +16160 -1000 +16160 -760 +16160 -720 +16160 -700 +16160 -680 +16160 8600 +16160 8620 +16160 9780 +16160 9840 +16160 9920 +16160 19260 +16160 19280 +16180 -16380 +16180 -16360 +16180 -11740 +16180 -11720 +16180 -11440 +16180 -11420 +16180 -11400 +16180 -10880 +16180 -10780 +16180 -10760 +16180 -8440 +16180 -8340 +16180 -8080 +16180 -3780 +16180 -3760 +16180 -3740 +16180 -3420 +16180 -700 +16180 -680 +16180 -660 +16180 8620 +16180 8640 +16180 9160 +16180 9480 +16180 9880 +16180 19260 +16180 19280 +16200 -16360 +16200 -16340 +16200 -11780 +16200 -11760 +16200 -11740 +16200 -11440 +16200 -11400 +16200 -10880 +16200 -10760 +16200 -10740 +16200 -8480 +16200 -8460 +16200 -8420 +16200 -8080 +16200 -3780 +16200 -3760 +16200 -680 +16200 8620 +16200 9120 +16200 9140 +16200 19260 +16200 19280 +16220 -16360 +16220 -16340 +16220 -11800 +16220 -11780 +16220 -11760 +16220 -11380 +16220 -11360 +16220 -10900 +16220 -10880 +16220 -10760 +16220 -10740 +16220 -8460 +16220 -8420 +16220 -8340 +16220 -8080 +16220 -7160 +16220 -3780 +16220 -3760 +16220 -3740 +16220 -3720 +16220 -3460 +16220 -3420 +16220 -3400 +16220 8600 +16220 8640 +16220 9100 +16220 19260 +16220 19280 +16240 -16360 +16240 -14620 +16240 -14600 +16240 -14580 +16240 -11840 +16240 -11820 +16240 -11800 +16240 -11780 +16240 -11760 +16240 -11360 +16240 -11340 +16240 -10880 +16240 -10780 +16240 -10760 +16240 -8460 +16240 -8080 +16240 -8060 +16240 -7160 +16240 -7140 +16240 -3780 +16240 -3760 +16240 -3720 +16240 -3420 +16240 -3400 +16240 -3380 +16240 8600 +16240 8620 +16240 9120 +16240 19260 +16240 19280 +16260 -16360 +16260 -16340 +16260 -14580 +16260 -14560 +16260 -11840 +16260 -11820 +16260 -10880 +16260 -10760 +16260 -8460 +16260 -8340 +16260 -8080 +16260 -8060 +16260 -7160 +16260 -7140 +16260 -3780 +16260 -3760 +16260 -3740 +16260 -3720 +16260 -3380 +16260 8600 +16260 8620 +16260 8640 +16260 9120 +16260 19260 +16260 19280 +16280 -16380 +16280 -16360 +16280 -16340 +16280 -14560 +16280 -12440 +16280 -12420 +16280 -11880 +16280 -11860 +16280 -11840 +16280 -10880 +16280 -10760 +16280 -10740 +16280 -8460 +16280 -8440 +16280 -8420 +16280 -8060 +16280 -7160 +16280 -7140 +16280 -3760 +16280 -3720 +16280 8640 +16280 9120 +16280 19260 +16280 19280 +16300 -16380 +16300 -16360 +16300 -16340 +16300 -16320 +16300 -14540 +16300 -12420 +16300 -10760 +16300 -10740 +16300 -8460 +16300 -8340 +16300 -7160 +16300 -3780 +16300 -3760 +16300 -3740 +16300 -3720 +16300 8600 +16300 8620 +16300 9100 +16300 9120 +16300 19260 +16300 19280 +16320 -16320 +16320 -14820 +16320 -14580 +16320 -14540 +16320 -14520 +16320 -10880 +16320 -10760 +16320 -10740 +16320 -8480 +16320 -8460 +16320 -8440 +16320 -8340 +16320 -8060 +16320 -7160 +16320 -7140 +16320 -3780 +16320 -3760 +16320 -3720 +16320 8600 +16320 8620 +16320 8640 +16320 9100 +16320 9120 +16320 19260 +16320 19280 +16340 -16320 +16340 -14800 +16340 -14760 +16340 -11860 +16340 -10900 +16340 -10760 +16340 -10740 +16340 -8460 +16340 -8440 +16340 -8340 +16340 -7140 +16340 -3780 +16340 -3760 +16340 -3740 +16340 -3720 +16340 -3660 +16340 8600 +16340 8620 +16340 19260 +16340 19280 +16360 -14840 +16360 -14800 +16360 -14780 +16360 -14520 +16360 -10900 +16360 -10760 +16360 -10740 +16360 -8320 +16360 -8060 +16360 -7160 +16360 -3780 +16360 -3760 +16360 -3740 +16360 -3720 +16360 8600 +16360 8640 +16360 9100 +16360 9120 +16360 19260 +16360 19280 +16380 -14540 +16380 -14500 +16380 -12620 +16380 -12600 +16380 -10880 +16380 -10800 +16380 -10760 +16380 -8480 +16380 -8440 +16380 -8420 +16380 -8400 +16380 -8340 +16380 -8240 +16380 -7160 +16380 -7140 +16380 -3780 +16380 -3760 +16380 -3740 +16380 -3720 +16380 9120 +16380 19260 +16380 19280 +16400 -12620 +16400 -12600 +16400 -10940 +16400 -10880 +16400 -10860 +16400 -10760 +16400 -8220 +16400 -8060 +16400 -7140 +16400 -3780 +16400 -3760 +16400 -3740 +16400 8600 +16400 8620 +16400 8640 +16400 9120 +16400 19260 +16400 19280 +16420 -12660 +16420 -12620 +16420 -10960 +16420 -10940 +16420 -10920 +16420 -10900 +16420 -10880 +16420 -10860 +16420 -10780 +16420 -10760 +16420 -10740 +16420 -8460 +16420 -8440 +16420 -8340 +16420 -3780 +16420 -3760 +16420 -3740 +16420 -3720 +16420 -3700 +16420 8600 +16420 8640 +16420 9120 +16420 19260 +16420 19280 +16440 -12680 +16440 -12660 +16440 -12620 +16440 -10960 +16440 -10880 +16440 -10760 +16440 -10740 +16440 -8460 +16440 -8340 +16440 -3780 +16440 -3760 +16440 -3740 +16440 -3700 +16440 8640 +16440 9120 +16440 19260 +16440 19280 +16460 -12680 +16460 -12660 +16460 -12640 +16460 -10980 +16460 -10940 +16460 -10760 +16460 -8460 +16460 -8420 +16460 -8320 +16460 -6740 +16460 -6660 +16460 -6640 +16460 -6620 +16460 -6600 +16460 -3780 +16460 -3760 +16460 -3740 +16460 -3700 +16460 8620 +16460 9100 +16460 9120 +16460 19260 +16460 19280 +16480 -10760 +16480 -10740 +16480 -6720 +16480 -6700 +16480 -6680 +16480 -6660 +16480 -6640 +16480 -6620 +16480 -6600 +16480 8600 +16480 8620 +16480 8640 +16480 9100 +16480 9120 +16480 19260 +16480 19280 +16500 -12680 +16500 -12660 +16500 -10940 +16500 -10800 +16500 -10780 +16500 -10760 +16500 -8320 +16500 -6740 +16500 -6720 +16500 -6700 +16500 -6620 +16500 -6600 +16500 -6580 +16500 -6560 +16500 8580 +16500 8600 +16500 8620 +16500 8640 +16500 9100 +16500 9120 +16500 19260 +16500 19280 +16520 -12660 +16520 -10920 +16520 -10800 +16520 -10760 +16520 -6740 +16520 -6720 +16520 -6700 +16520 -6680 +16520 -6660 +16520 -6640 +16520 -6600 +16520 -6580 +16520 -6560 +16520 -6540 +16520 -6420 +16520 -6400 +16520 8620 +16520 8640 +16520 9120 +16520 19260 +16520 19280 +16540 -10920 +16540 -10800 +16540 -10760 +16540 -10740 +16540 -6700 +16540 -6680 +16540 -6640 +16540 -6600 +16540 -6580 +16540 -6560 +16540 -6540 +16540 -6440 +16540 -6420 +16540 -6400 +16540 9100 +16540 9120 +16540 9380 +16540 19260 +16540 19280 +16560 -10780 +16560 -10760 +16560 -10740 +16560 -8300 +16560 -6720 +16560 -6680 +16560 -6660 +16560 -6620 +16560 -6600 +16560 -6580 +16560 -6560 +16560 -6420 +16560 -6400 +16560 8620 +16560 8640 +16560 9260 +16560 9360 +16560 19260 +16560 19280 +16560 19300 +16580 -10940 +16580 -10900 +16580 -10760 +16580 -10740 +16580 8640 +16580 9180 +16580 9360 +16580 19260 +16580 19280 +16580 19300 +16600 -16180 +16600 -16160 +16600 -16140 +16600 -16100 +16600 -10760 +16600 8620 +16600 9280 +16600 9300 +16600 19260 +16600 19280 +16600 19300 +16620 -16180 +16620 -16160 +16620 -16140 +16620 -16100 +16620 -10880 +16620 -10760 +16620 8600 +16620 8620 +16620 8640 +16620 9380 +16620 19260 +16620 19280 +16620 19300 +16640 -16160 +16640 -16120 +16640 -16100 +16640 -16080 +16640 -16060 +16640 -10880 +16640 -10780 +16640 -10760 +16640 8600 +16640 8620 +16640 9320 +16640 9360 +16640 9380 +16640 19260 +16640 19280 +16640 19300 +16660 -16140 +16660 -16120 +16660 -16100 +16660 -16080 +16660 -10900 +16660 -10880 +16660 -10780 +16660 -10760 +16660 -6780 +16660 -6760 +16660 -6740 +16660 7940 +16660 8560 +16660 8600 +16660 8620 +16660 8640 +16660 19260 +16660 19280 +16680 -16140 +16680 -16100 +16680 -16080 +16680 -16060 +16680 -13980 +16680 -13960 +16680 -13940 +16680 -13920 +16680 -13900 +16680 -13880 +16680 -10900 +16680 -10880 +16680 -10780 +16680 -10760 +16680 -8460 +16680 -8440 +16680 -6760 +16680 -6740 +16680 8640 +16680 9340 +16680 9380 +16680 19260 +16680 19280 +16680 19300 +16700 -16100 +16700 -16080 +16700 -16060 +16700 -13960 +16700 -13940 +16700 -13920 +16700 -13900 +16700 -13880 +16700 -13860 +16700 -10900 +16700 -10880 +16700 -10760 +16700 -10740 +16700 -8460 +16700 -6760 +16700 -6720 +16700 7940 +16700 7960 +16700 8600 +16700 9360 +16700 19260 +16700 19280 +16720 -16080 +16720 -16060 +16720 -13860 +16720 -11120 +16720 -11100 +16720 -10760 +16720 -8460 +16720 -8420 +16720 -6760 +16720 -6740 +16720 7940 +16720 7960 +16720 8020 +16720 8120 +16720 8640 +16720 9360 +16720 11000 +16720 11600 +16720 12480 +16720 14860 +16720 14960 +16720 15000 +16720 15020 +16720 15060 +16720 15120 +16720 15160 +16720 15180 +16720 15200 +16720 15240 +16720 15280 +16720 15320 +16720 15340 +16720 15360 +16720 15380 +16720 15400 +16720 15440 +16720 15460 +16720 15480 +16720 15500 +16720 15520 +16720 15540 +16720 15580 +16720 19260 +16720 19280 +16720 19300 +16740 -16080 +16740 -16060 +16740 -16040 +16740 -13900 +16740 -13880 +16740 -13860 +16740 -10900 +16740 -10760 +16740 -10740 +16740 -8460 +16740 -8320 +16740 -6740 +16740 7940 +16740 7980 +16740 8020 +16740 8060 +16740 9320 +16740 9340 +16740 11000 +16740 11160 +16740 11440 +16740 11500 +16740 11540 +16740 11820 +16740 11880 +16740 11920 +16740 12000 +16740 12040 +16740 12100 +16740 12160 +16740 12460 +16740 12700 +16740 12740 +16740 12780 +16740 12840 +16740 12920 +16740 13020 +16740 13060 +16740 13220 +16740 13280 +16740 13440 +16740 13520 +16740 13560 +16740 13600 +16740 13640 +16740 13740 +16740 13800 +16740 14020 +16740 14120 +16740 14160 +16740 14280 +16740 14300 +16740 14380 +16740 14400 +16740 14420 +16740 14500 +16740 14540 +16740 14560 +16740 14580 +16740 14600 +16740 14620 +16740 14660 +16740 14780 +16740 14820 +16740 14900 +16740 14940 +16740 14960 +16740 15000 +16740 15060 +16740 15100 +16740 15180 +16740 15240 +16740 15260 +16740 15280 +16740 15380 +16740 15400 +16740 15500 +16740 15520 +16740 15540 +16740 15560 +16740 15580 +16740 19260 +16740 19300 +16760 -13880 +16760 -10920 +16760 -10880 +16760 -10780 +16760 -8320 +16760 8340 +16760 8620 +16760 8640 +16760 9320 +16760 11060 +16760 11980 +16760 12240 +16760 12380 +16760 12460 +16760 12900 +16760 13080 +16760 13260 +16760 13280 +16760 13300 +16760 13360 +16760 13400 +16760 13600 +16760 13680 +16760 13740 +16760 13820 +16760 13900 +16760 13980 +16760 14020 +16760 14120 +16760 14140 +16760 14340 +16760 14360 +16760 14380 +16760 14500 +16760 14560 +16760 14580 +16760 14660 +16760 14720 +16760 14760 +16760 15560 +16760 15580 +16760 19260 +16760 19280 +16760 19300 +16780 -13880 +16780 -13860 +16780 -11120 +16780 -11100 +16780 -10900 +16780 -10880 +16780 -10760 +16780 8620 +16780 9340 +16780 9360 +16780 12460 +16780 12500 +16780 12880 +16780 12980 +16780 13700 +16780 13820 +16780 13840 +16780 15560 +16780 15580 +16780 15600 +16780 15620 +16780 15640 +16780 19260 +16780 19300 +16800 -10900 +16800 -10760 +16800 -10740 +16800 -8340 +16800 8640 +16800 9320 +16800 15580 +16800 15600 +16800 15620 +16800 15640 +16800 19260 +16800 19280 +16800 19300 +16820 -11100 +16820 -10900 +16820 -10880 +16820 -10760 +16820 -8340 +16820 8640 +16820 9340 +16820 9360 +16820 15620 +16820 15640 +16820 19260 +16820 19280 +16820 19300 +16840 -11100 +16840 -10900 +16840 -10780 +16840 -10760 +16840 8640 +16840 9220 +16840 15620 +16840 15640 +16840 19260 +16840 19280 +16860 -10880 +16860 -10760 +16860 -5620 +16860 -5580 +16860 6100 +16860 6660 +16860 8040 +16860 8100 +16860 9360 +16860 15640 +16860 19260 +16860 19280 +16860 19300 +16880 -10920 +16880 -10760 +16880 -10740 +16880 -8440 +16880 -8300 +16880 -5620 +16880 -5600 +16880 -5580 +16880 -5560 +16880 -5540 +16880 -5520 +16880 -5500 +16880 6020 +16880 6040 +16880 6060 +16880 7920 +16880 15640 +16880 19260 +16880 19280 +16880 19300 +16900 -10920 +16900 -10900 +16900 -10880 +16900 -10780 +16900 -10760 +16900 -5600 +16900 -5560 +16900 -5540 +16900 -5520 +16900 6060 +16900 6620 +16900 7940 +16900 8200 +16900 15640 +16900 19260 +16900 19280 +16900 19300 +16920 -10900 +16920 -10880 +16920 -10760 +16920 -10740 +16920 -5580 +16920 -5560 +16920 -5540 +16920 5960 +16920 6000 +16920 6060 +16920 8640 +16920 9180 +16920 15640 +16920 19260 +16920 19280 +16920 19300 +16940 -10880 +16940 -10780 +16940 -10760 +16940 -8340 +16940 -5580 +16940 -5560 +16940 5920 +16940 5940 +16940 5960 +16940 6000 +16940 7940 +16940 8340 +16940 15640 +16940 15660 +16940 19260 +16940 19280 +16940 19300 +16960 -17320 +16960 -17300 +16960 -10900 +16960 -10880 +16960 -10760 +16960 -8440 +16960 -8340 +16960 -5580 +16960 -5560 +16960 5920 +16960 5980 +16960 6000 +16960 8640 +16960 15640 +16960 19280 +16960 19300 +16980 -17300 +16980 -10880 +16980 -10760 +16980 -8460 +16980 -8340 +16980 -5580 +16980 -5560 +16980 -5540 +16980 5920 +16980 5960 +16980 6000 +16980 8040 +16980 15640 +16980 15660 +16980 19260 +16980 19280 +16980 19300 +17000 -17300 +17000 -17280 +17000 -10780 +17000 -10760 +17000 -8460 +17000 -8340 +17000 -5580 +17000 -5560 +17000 5940 +17000 5980 +17000 6080 +17000 15640 +17000 15660 +17000 19260 +17000 19280 +17000 19300 +17020 -17280 +17020 -10900 +17020 -10880 +17020 -10760 +17020 -8340 +17020 -5580 +17020 -5560 +17020 -5540 +17020 4660 +17020 4880 +17020 4920 +17020 4960 +17020 5420 +17020 5940 +17020 15640 +17020 19260 +17020 19280 +17020 19300 +17040 -17300 +17040 -17280 +17040 -17260 +17040 -10920 +17040 -10900 +17040 -10780 +17040 -10760 +17040 -10740 +17040 -8420 +17040 -8340 +17040 -5580 +17040 -5560 +17040 4940 +17040 5920 +17040 5940 +17040 5980 +17040 8380 +17040 15640 +17040 15660 +17040 19260 +17040 19280 +17040 19300 +17060 -17320 +17060 -17300 +17060 -17280 +17060 -10900 +17060 -10880 +17060 -10760 +17060 -8340 +17060 -8260 +17060 -5580 +17060 -5560 +17060 4620 +17060 4980 +17060 5380 +17060 5400 +17060 5440 +17060 5720 +17060 6120 +17060 6160 +17060 15640 +17060 15660 +17060 19260 +17060 19280 +17080 -17300 +17080 -10840 +17080 -10800 +17080 -10760 +17080 -8460 +17080 -8340 +17080 -8280 +17080 -8260 +17080 -5580 +17080 -5560 +17080 -5540 +17080 4760 +17080 4800 +17080 7100 +17080 15640 +17080 15660 +17080 19280 +17080 19300 +17100 -17300 +17100 -10900 +17100 -10880 +17100 -10780 +17100 -10760 +17100 -8460 +17100 -8340 +17100 -8300 +17100 -8260 +17100 -8240 +17100 -8200 +17100 -5580 +17100 -5560 +17100 4760 +17100 6020 +17100 15640 +17100 15660 +17100 19260 +17100 19280 +17100 19300 +17120 -17300 +17120 -10800 +17120 -10760 +17120 -10740 +17120 -8460 +17120 -8340 +17120 -8300 +17120 -8280 +17120 -8260 +17120 -8240 +17120 -8220 +17120 -8200 +17120 -8180 +17120 -8160 +17120 -8140 +17120 -8120 +17120 -8100 +17120 -8080 +17120 -8060 +17120 -8040 +17120 -8020 +17120 -8000 +17120 -7980 +17120 -7960 +17120 -5560 +17120 -5540 +17120 5400 +17120 5600 +17120 5940 +17120 6000 +17120 15640 +17120 15660 +17120 19260 +17120 19280 +17120 19300 +17140 -17320 +17140 -14260 +17140 -10900 +17140 -10760 +17140 -8460 +17140 -8340 +17140 -8320 +17140 -8180 +17140 -8120 +17140 -8100 +17140 -8080 +17140 -8040 +17140 -8020 +17140 -8000 +17140 -7980 +17140 -7960 +17140 -5580 +17140 -5560 +17140 4300 +17140 4520 +17140 5920 +17140 15640 +17140 15660 +17140 19280 +17140 19300 +17160 -17320 +17160 -17300 +17160 -14380 +17160 -14340 +17160 -14320 +17160 -14300 +17160 -14260 +17160 -10900 +17160 -10760 +17160 -8460 +17160 -8320 +17160 -8300 +17160 -5580 +17160 -5560 +17160 -5540 +17160 -320 +17160 -300 +17160 -240 +17160 4520 +17160 4540 +17160 5500 +17160 15640 +17160 15660 +17160 19260 +17160 19280 +17180 -17300 +17180 -14480 +17180 -14440 +17180 -14400 +17180 -14380 +17180 -14340 +17180 -14300 +17180 -10760 +17180 -8440 +17180 -8320 +17180 -7980 +17180 -5580 +17180 -5560 +17180 -5540 +17180 -440 +17180 -400 +17180 -360 +17180 -340 +17180 -320 +17180 -300 +17180 -280 +17180 4460 +17180 4480 +17180 4800 +17180 5140 +17180 5940 +17180 15640 +17180 15660 +17180 19260 +17180 19280 +17180 19300 +17200 -17320 +17200 -17300 +17200 -14500 +17200 -14480 +17200 -14460 +17200 -14440 +17200 -14420 +17200 -14260 +17200 -14200 +17200 -10760 +17200 -10740 +17200 -8480 +17200 -8460 +17200 -8440 +17200 -5560 +17200 -5540 +17200 -440 +17200 -420 +17200 -400 +17200 -380 +17200 -360 +17200 -340 +17200 -320 +17200 -300 +17200 -280 +17200 4480 +17200 4860 +17200 5460 +17200 15640 +17200 15660 +17200 19260 +17200 19280 +17200 19300 +17220 -17300 +17220 -14580 +17220 -14560 +17220 -14520 +17220 -14300 +17220 -14280 +17220 -14260 +17220 -14240 +17220 -14200 +17220 -10760 +17220 -5580 +17220 -5560 +17220 -5540 +17220 -1160 +17220 -1120 +17220 -1060 +17220 -1040 +17220 -1000 +17220 -620 +17220 -600 +17220 -580 +17220 -520 +17220 -500 +17220 -480 +17220 -460 +17220 -440 +17220 -420 +17220 -400 +17220 -380 +17220 -340 +17220 -300 +17220 4300 +17220 4500 +17220 4520 +17220 4540 +17220 5460 +17220 15640 +17220 15660 +17220 19260 +17220 19280 +17220 19300 +17240 -14580 +17240 -14520 +17240 -10780 +17240 -10760 +17240 -8020 +17240 -5580 +17240 -5560 +17240 -5540 +17240 -1180 +17240 -1160 +17240 -1140 +17240 -1120 +17240 -1100 +17240 -1080 +17240 -1060 +17240 -1040 +17240 -1020 +17240 -1000 +17240 -700 +17240 -680 +17240 -660 +17240 -640 +17240 -620 +17240 -600 +17240 -580 +17240 -560 +17240 -540 +17240 -520 +17240 -500 +17240 -480 +17240 -460 +17240 -400 +17240 -380 +17240 -300 +17240 4300 +17240 4420 +17240 4540 +17240 4560 +17240 5020 +17240 5160 +17240 5900 +17240 15640 +17240 15660 +17240 19260 +17240 19280 +17260 -17320 +17260 -17300 +17260 -16220 +17260 -16180 +17260 -14580 +17260 -14540 +17260 -10780 +17260 -10760 +17260 -8400 +17260 -5580 +17260 -5560 +17260 -5540 +17260 -1220 +17260 -1180 +17260 -1160 +17260 -1140 +17260 -1120 +17260 -1020 +17260 -780 +17260 -740 +17260 -720 +17260 -700 +17260 -680 +17260 -660 +17260 -640 +17260 -620 +17260 -600 +17260 -580 +17260 -540 +17260 -420 +17260 -160 +17260 4380 +17260 4420 +17260 4480 +17260 4560 +17260 4660 +17260 15640 +17260 15660 +17260 19260 +17260 19280 +17260 19300 +17280 -17320 +17280 -17300 +17280 -16220 +17280 -16200 +17280 -16180 +17280 -16160 +17280 -16120 +17280 -10780 +17280 -10760 +17280 -8440 +17280 -8400 +17280 -5580 +17280 -5560 +17280 -5540 +17280 -1440 +17280 -1420 +17280 -1260 +17280 -1240 +17280 -1220 +17280 -1200 +17280 -1180 +17280 -1160 +17280 -840 +17280 -820 +17280 -800 +17280 -780 +17280 -760 +17280 -740 +17280 -720 +17280 -520 +17280 -480 +17280 -460 +17280 -440 +17280 -300 +17280 -160 +17280 -140 +17280 4560 +17280 4680 +17280 15640 +17280 19260 +17280 19280 +17280 19300 +17300 -17300 +17300 -17280 +17300 -16160 +17300 -16140 +17300 -16120 +17300 -16100 +17300 -10780 +17300 -10760 +17300 -8420 +17300 -5560 +17300 -1460 +17300 -1440 +17300 -1420 +17300 -1280 +17300 -1260 +17300 -1240 +17300 -1200 +17300 -1180 +17300 -1160 +17300 -880 +17300 -860 +17300 -840 +17300 -820 +17300 -800 +17300 -540 +17300 -500 +17300 -460 +17300 -380 +17300 -140 +17300 4380 +17300 4400 +17300 4560 +17300 4660 +17300 15640 +17300 15660 +17300 19280 +17320 -17320 +17320 -16100 +17320 -10780 +17320 -10760 +17320 -8020 +17320 -5560 +17320 -5540 +17320 -5520 +17320 -1480 +17320 -1460 +17320 -1440 +17320 -1280 +17320 -1260 +17320 -1240 +17320 -1220 +17320 -1200 +17320 -1180 +17320 -860 +17320 -360 +17320 -300 +17320 -120 +17320 -80 +17320 -60 +17320 1900 +17320 1920 +17320 4320 +17320 4340 +17320 15640 +17320 15660 +17320 17140 +17320 19260 +17320 19280 +17320 19300 +17340 -17320 +17340 -16100 +17340 -10800 +17340 -10780 +17340 -10760 +17340 -8400 +17340 -5600 +17340 -5560 +17340 -5540 +17340 -1480 +17340 -1460 +17340 -1260 +17340 -1240 +17340 -560 +17340 -500 +17340 -200 +17340 -140 +17340 1920 +17340 1940 +17340 4320 +17340 4340 +17340 15640 +17340 15660 +17340 17120 +17340 19260 +17340 19280 +17340 19300 +17360 -16120 +17360 -16100 +17360 -13980 +17360 -13960 +17360 -13940 +17360 -13920 +17360 -13880 +17360 -10840 +17360 -10820 +17360 -10780 +17360 -10760 +17360 -5660 +17360 -5560 +17360 -5420 +17360 -5400 +17360 -1480 +17360 -1460 +17360 -1440 +17360 -1280 +17360 -1260 +17360 -1240 +17360 -1220 +17360 -1180 +17360 15640 +17360 15660 +17360 17020 +17360 17100 +17360 17120 +17360 17140 +17360 17160 +17360 17200 +17360 17920 +17360 19260 +17360 19280 +17380 -16120 +17380 -13960 +17380 -13940 +17380 -13900 +17380 -13880 +17380 -13860 +17380 -10840 +17380 -10800 +17380 -10780 +17380 -10760 +17380 -10740 +17380 -8400 +17380 -6340 +17380 -6320 +17380 -6300 +17380 -6280 +17380 -6260 +17380 -6240 +17380 -6220 +17380 -6200 +17380 -6180 +17380 -6160 +17380 -6140 +17380 -6120 +17380 -6100 +17380 -6080 +17380 -6060 +17380 -6040 +17380 -6020 +17380 -6000 +17380 -5980 +17380 -5960 +17380 -5940 +17380 -5920 +17380 -5900 +17380 -5880 +17380 -5860 +17380 -5840 +17380 -5820 +17380 -5800 +17380 -5780 +17380 -5760 +17380 -5740 +17380 -5720 +17380 -5700 +17380 -5680 +17380 -5660 +17380 -5640 +17380 -5620 +17380 -5560 +17380 -5540 +17380 -5520 +17380 -5500 +17380 -1640 +17380 -1620 +17380 -1600 +17380 -1280 +17380 -1240 +17380 -1200 +17380 -1180 +17380 -140 +17380 5420 +17380 15640 +17380 15660 +17380 17020 +17380 17040 +17380 17080 +17380 17100 +17380 17120 +17380 17140 +17380 17160 +17380 17220 +17380 17240 +17380 17920 +17380 17940 +17380 19280 +17400 -13900 +17400 -13880 +17400 -10780 +17400 -10760 +17400 -8420 +17400 -6320 +17400 -6300 +17400 -6280 +17400 -6260 +17400 -6240 +17400 -6220 +17400 -6200 +17400 -6180 +17400 -6160 +17400 -6140 +17400 -6120 +17400 -6100 +17400 -6080 +17400 -6060 +17400 -6040 +17400 -6020 +17400 -6000 +17400 -5980 +17400 -5960 +17400 -5940 +17400 -5920 +17400 -5900 +17400 -5880 +17400 -5860 +17400 -5840 +17400 -5820 +17400 -5800 +17400 -5780 +17400 -5760 +17400 -5740 +17400 -5720 +17400 -5700 +17400 -5680 +17400 -5660 +17400 -5640 +17400 -5620 +17400 -5600 +17400 -5580 +17400 -5560 +17400 -5540 +17400 -5520 +17400 -5420 +17400 -1640 +17400 -1620 +17400 -1600 +17400 -1260 +17400 -1220 +17400 -1200 +17400 -1160 +17400 -940 +17400 -820 +17400 -800 +17400 -120 +17400 4780 +17400 4980 +17400 5000 +17400 5040 +17400 5380 +17400 5400 +17400 5440 +17400 15640 +17400 15660 +17400 17020 +17400 17040 +17400 17060 +17400 17080 +17400 17140 +17400 17180 +17400 17220 +17400 17240 +17400 17920 +17400 19300 +17420 -13880 +17420 -10780 +17420 -10760 +17420 -6320 +17420 -6300 +17420 -6280 +17420 -6260 +17420 -5960 +17420 -5940 +17420 -5800 +17420 -5680 +17420 -5660 +17420 -5640 +17420 -5620 +17420 -5600 +17420 -5580 +17420 -5420 +17420 -1640 +17420 -1180 +17420 -1160 +17420 -940 +17420 -860 +17420 -840 +17420 -820 +17420 -800 +17420 1560 +17420 1580 +17420 1600 +17420 4420 +17420 4440 +17420 4460 +17420 4660 +17420 4680 +17420 4740 +17420 4780 +17420 15640 +17420 15660 +17420 17020 +17420 17040 +17420 17060 +17420 17080 +17420 17140 +17420 17180 +17420 17200 +17420 17220 +17420 17260 +17420 17680 +17420 17700 +17420 17720 +17420 17740 +17420 17760 +17420 17780 +17420 17800 +17420 17820 +17420 17840 +17420 19260 +17420 19280 +17420 19300 +17440 -13900 +17440 -13860 +17440 -10760 +17440 -8020 +17440 -6340 +17440 -5560 +17440 -1180 +17440 -1160 +17440 -860 +17440 -120 +17440 4580 +17440 4620 +17440 4780 +17440 15640 +17440 17020 +17440 17040 +17440 17060 +17440 17120 +17440 17140 +17440 17160 +17440 17180 +17440 17200 +17440 17220 +17440 17660 +17440 17680 +17440 17700 +17440 17720 +17440 17740 +17440 17780 +17440 17800 +17440 17820 +17440 17840 +17440 17860 +17440 19260 +17440 19280 +17440 19300 +17460 -13860 +17460 -10760 +17460 -8080 +17460 -8000 +17460 -6280 +17460 -6260 +17460 -1180 +17460 -1160 +17460 -1120 +17460 -940 +17460 -860 +17460 -200 +17460 -100 +17460 1560 +17460 1580 +17460 4420 +17460 4440 +17460 4460 +17460 4620 +17460 15620 +17460 15640 +17460 15660 +17460 16960 +17460 17040 +17460 17100 +17460 17120 +17460 17140 +17460 17160 +17460 17220 +17460 17240 +17460 17660 +17460 17700 +17460 17740 +17460 17760 +17460 17780 +17460 17820 +17460 19040 +17460 19260 +17480 -10780 +17480 -10760 +17480 -8460 +17480 -8440 +17480 -8380 +17480 -6260 +17480 -1160 +17480 -960 +17480 -840 +17480 1540 +17480 4420 +17480 15640 +17480 16980 +17480 17020 +17480 17040 +17480 17120 +17480 17180 +17480 17200 +17480 17220 +17480 17240 +17480 17260 +17480 17680 +17480 17720 +17480 17740 +17480 17760 +17480 17820 +17480 17860 +17480 18740 +17480 19040 +17480 19060 +17480 19280 +17480 19300 +17500 -10780 +17500 -10760 +17500 -8460 +17500 -6280 +17500 -5420 +17500 -1180 +17500 -1160 +17500 -840 +17500 -100 +17500 -40 +17500 1520 +17500 1540 +17500 1560 +17500 4440 +17500 4940 +17500 5000 +17500 5120 +17500 5300 +17500 15620 +17500 15640 +17500 17000 +17500 17040 +17500 17060 +17500 17200 +17500 17220 +17500 17260 +17500 17820 +17500 17840 +17500 18720 +17500 18740 +17500 19020 +17500 19040 +17500 19280 +17500 19300 +17520 -10760 +17520 -8420 +17520 -5420 +17520 -5400 +17520 -1180 +17520 -1160 +17520 -840 +17520 -120 +17520 4480 +17520 4700 +17520 15640 +17520 15660 +17520 17100 +17520 17120 +17520 17140 +17520 17160 +17520 17220 +17520 17240 +17520 19260 +17540 -10780 +17540 -10760 +17540 -8040 +17540 -1180 +17540 -1160 +17540 -180 +17540 -80 +17540 4480 +17540 4660 +17540 15620 +17540 15640 +17540 15660 +17540 17020 +17540 17120 +17540 17160 +17540 17180 +17540 19260 +17540 19280 +17560 -10780 +17560 -10760 +17560 -8460 +17560 -8440 +17560 -8020 +17560 -8000 +17560 -6280 +17560 -1440 +17560 -1180 +17560 -1160 +17560 -940 +17560 40 +17560 15600 +17560 15640 +17560 17060 +17560 17120 +17560 17140 +17560 17220 +17560 19000 +17560 19260 +17560 19280 +17560 19300 +17580 -10820 +17580 -10780 +17580 -10740 +17580 -8060 +17580 -8020 +17580 -8000 +17580 -7980 +17580 -1580 +17580 -1560 +17580 -1540 +17580 -1520 +17580 -1500 +17580 -1480 +17580 -1460 +17580 -1440 +17580 -1420 +17580 -1400 +17580 -1380 +17580 -1360 +17580 -1180 +17580 -1160 +17580 -1120 +17580 5020 +17580 5380 +17580 5440 +17580 17120 +17580 17820 +17580 18820 +17580 18840 +17580 18860 +17580 18880 +17580 18920 +17580 18940 +17580 18960 +17580 18980 +17580 19000 +17580 19260 +17580 19300 +17600 -10780 +17600 -10760 +17600 -8460 +17600 -5400 +17600 -1580 +17600 -1560 +17600 -1540 +17600 -1520 +17600 -1500 +17600 -1380 +17600 -1360 +17600 -1180 +17600 -1160 +17600 -20 +17600 4940 +17600 15600 +17600 17000 +17600 17040 +17600 17060 +17600 17100 +17600 17840 +17600 18820 +17600 18860 +17600 18900 +17600 18920 +17600 19000 +17600 19240 +17600 19260 +17600 19280 +17620 -10780 +17620 -10760 +17620 -8440 +17620 -8420 +17620 -8380 +17620 -6260 +17620 -5400 +17620 -1640 +17620 -1620 +17620 -1600 +17620 -1560 +17620 -1540 +17620 -1520 +17620 -1420 +17620 -1260 +17620 -1180 +17620 -1160 +17620 -1120 +17620 60 +17620 17080 +17620 17100 +17620 17180 +17620 17220 +17620 17240 +17620 17280 +17620 17300 +17620 17340 +17620 17380 +17620 17400 +17620 17440 +17620 17480 +17620 17500 +17620 17540 +17620 17580 +17620 17600 +17620 17640 +17620 17680 +17620 17700 +17620 17720 +17620 17740 +17620 17760 +17620 17800 +17620 17840 +17620 17860 +17620 17940 +17620 18060 +17620 18840 +17620 18860 +17620 18920 +17620 18980 +17620 19000 +17620 19020 +17620 19260 +17620 19280 +17640 -10760 +17640 -8460 +17640 -8020 +17640 -1660 +17640 -1640 +17640 -1620 +17640 -1560 +17640 -1540 +17640 -1520 +17640 -1380 +17640 -1340 +17640 -1300 +17640 -1180 +17640 -1160 +17640 -1140 +17640 4380 +17640 17100 +17640 17180 +17640 17240 +17640 17260 +17640 17280 +17640 17320 +17640 17340 +17640 17360 +17640 17380 +17640 17400 +17640 17420 +17640 17440 +17640 17460 +17640 17480 +17640 17500 +17640 17520 +17640 17540 +17640 17560 +17640 17580 +17640 17600 +17640 17620 +17640 17640 +17640 17660 +17640 17680 +17640 17700 +17640 17720 +17640 17740 +17640 17760 +17640 17820 +17640 17840 +17640 17860 +17640 17880 +17640 17900 +17640 17920 +17640 17940 +17640 17960 +17640 17980 +17640 18000 +17640 18020 +17640 18040 +17640 18060 +17640 18080 +17640 18100 +17640 18120 +17640 18160 +17640 18180 +17640 18200 +17640 18220 +17640 18240 +17640 18260 +17640 18280 +17640 18300 +17640 18320 +17640 18340 +17640 18360 +17640 18380 +17640 18400 +17640 18420 +17640 18440 +17640 18460 +17640 18480 +17640 18500 +17640 18520 +17640 18540 +17640 18560 +17640 18580 +17640 18600 +17640 18620 +17640 18640 +17640 18660 +17640 18680 +17640 18700 +17640 18720 +17640 18740 +17640 18760 +17640 18800 +17640 18840 +17640 18860 +17640 18880 +17640 18900 +17640 18920 +17640 18940 +17640 18960 +17640 18980 +17640 19000 +17640 19020 +17640 19040 +17640 19060 +17640 19080 +17640 19100 +17640 19120 +17640 19140 +17640 19160 +17640 19180 +17640 19200 +17640 19220 +17640 19240 +17640 19260 +17640 19280 +17640 19300 +17660 -10760 +17660 -8500 +17660 -8040 +17660 -6260 +17660 -2720 +17660 -1660 +17660 -1640 +17660 -1620 +17660 -1600 +17660 -1560 +17660 -1520 +17660 -1420 +17660 -1260 +17660 -1180 +17660 -1160 +17660 1980 +17660 4380 +17660 16840 +17660 16860 +17660 16880 +17660 16920 +17660 17120 +17660 17140 +17660 17160 +17660 17180 +17660 17200 +17660 17220 +17660 17240 +17660 17260 +17660 17280 +17660 17300 +17660 17320 +17660 17340 +17660 17360 +17660 17380 +17660 17400 +17660 17420 +17660 17440 +17660 17460 +17660 17480 +17660 17500 +17660 17520 +17660 17540 +17660 17560 +17660 17580 +17660 17600 +17660 17620 +17660 17640 +17660 17660 +17660 17680 +17660 17740 +17660 17780 +17660 17840 +17660 17860 +17660 17880 +17660 17900 +17660 17960 +17660 17980 +17660 18000 +17660 18020 +17660 18040 +17660 18060 +17660 18080 +17660 18100 +17660 18120 +17660 18140 +17660 18160 +17660 18180 +17660 18200 +17660 18220 +17660 18240 +17660 18260 +17660 18280 +17660 18300 +17660 18320 +17660 18340 +17660 18360 +17660 18380 +17660 18400 +17660 18420 +17660 18440 +17660 18460 +17660 18480 +17660 18500 +17660 18520 +17660 18540 +17660 18560 +17660 18580 +17660 18600 +17660 18620 +17660 18640 +17660 18660 +17660 18680 +17660 18700 +17660 18720 +17660 18740 +17660 18760 +17660 18780 +17660 18800 +17660 18820 +17660 18880 +17660 18900 +17660 18940 +17660 18960 +17660 18980 +17660 19000 +17660 19020 +17660 19040 +17660 19060 +17660 19080 +17660 19100 +17660 19120 +17660 19140 +17660 19180 +17660 19200 +17660 19220 +17660 19260 +17680 -10760 +17680 -8520 +17680 -8500 +17680 -8460 +17680 -6280 +17680 -6260 +17680 -6240 +17680 -2760 +17680 -2740 +17680 -2720 +17680 -1660 +17680 -1640 +17680 -1620 +17680 -1540 +17680 -1440 +17680 -1320 +17680 -1300 +17680 -1280 +17680 -1260 +17680 -1200 +17680 -1180 +17680 -1160 +17680 -1140 +17680 1960 +17680 1980 +17680 5420 +17680 16820 +17680 16840 +17680 16860 +17680 16880 +17680 16900 +17680 17940 +17680 17960 +17680 17980 +17680 18000 +17680 18020 +17680 18040 +17680 18060 +17680 18080 +17680 18100 +17680 18120 +17680 18140 +17680 18160 +17680 18180 +17680 18200 +17680 18220 +17680 18240 +17680 18260 +17680 18280 +17680 18300 +17680 18320 +17680 18340 +17680 18360 +17680 18380 +17680 18400 +17680 18420 +17680 18440 +17680 18460 +17680 18480 +17680 18500 +17680 18520 +17680 18540 +17680 18580 +17680 18600 +17680 18620 +17680 18640 +17680 18660 +17680 18680 +17680 18720 +17680 18740 +17680 18800 +17680 18840 +17680 18880 +17680 18920 +17680 18960 +17680 19000 +17680 19120 +17680 19140 +17680 19160 +17680 19180 +17680 19200 +17680 19220 +17680 19240 +17680 19260 +17700 -10780 +17700 -10760 +17700 -8540 +17700 -8520 +17700 -8500 +17700 -8460 +17700 -8420 +17700 -8320 +17700 -8260 +17700 -6280 +17700 -2780 +17700 -2760 +17700 -2740 +17700 -1700 +17700 -1680 +17700 -1660 +17700 -1640 +17700 -1580 +17700 -1520 +17700 -1300 +17700 -1240 +17700 -1140 +17700 1960 +17700 1980 +17700 16800 +17700 16820 +17700 16860 +17700 17940 +17700 17960 +17700 18000 +17700 18020 +17700 18060 +17700 18120 +17700 18140 +17700 18180 +17700 18200 +17700 18240 +17700 18260 +17700 18280 +17700 18320 +17700 18340 +17700 18380 +17700 18400 +17700 18440 +17700 18460 +17700 18500 +17700 18520 +17700 18560 +17700 18580 +17700 18600 +17700 18620 +17700 18660 +17700 18700 +17700 18720 +17700 18740 +17700 18800 +17700 18840 +17700 18860 +17700 18900 +17700 18920 +17700 18940 +17700 18960 +17700 18980 +17700 19000 +17700 19020 +17700 19040 +17700 19120 +17700 19160 +17700 19180 +17700 19200 +17700 19220 +17700 19240 +17720 -10780 +17720 -10760 +17720 -8460 +17720 -8420 +17720 -8300 +17720 -8260 +17720 -8240 +17720 -8200 +17720 -8180 +17720 -8140 +17720 -8120 +17720 -8100 +17720 -8060 +17720 -8040 +17720 -8020 +17720 -8000 +17720 -7980 +17720 -6260 +17720 -2960 +17720 -2780 +17720 -2760 +17720 -2740 +17720 -1700 +17720 -1680 +17720 -1660 +17720 -1640 +17720 -1240 +17720 -1220 +17720 5420 +17720 18080 +17720 18380 +17720 18680 +17740 -10780 +17740 -10760 +17740 -8480 +17740 -8460 +17740 -8400 +17740 -8380 +17740 -8020 +17740 -7960 +17740 -6280 +17740 -4640 +17740 -4620 +17740 -4600 +17740 -2980 +17740 -2960 +17740 -2940 +17740 -2920 +17740 -2900 +17740 -2840 +17740 -2800 +17740 -2780 +17740 -2700 +17740 -1700 +17740 -1680 +17740 -1660 +17740 -1640 +17740 -1560 +17740 -1240 +17740 -1160 +17740 5420 +17740 5440 +17760 -10760 +17760 -8540 +17760 -8500 +17760 -8460 +17760 -8440 +17760 -7940 +17760 -6240 +17760 -4640 +17760 -4620 +17760 -2980 +17760 -2960 +17760 -2940 +17760 -2920 +17760 -2840 +17760 -2820 +17760 -2780 +17760 -2740 +17760 -2720 +17760 -2700 +17760 -2680 +17760 -1700 +17760 -1680 +17760 -1660 +17760 -1540 +17760 -1160 +17760 5420 +17780 -10760 +17780 -10740 +17780 -8500 +17780 -8480 +17780 -6280 +17780 -6260 +17780 -2940 +17780 -2920 +17780 -2840 +17780 -2820 +17780 -2780 +17780 -2720 +17780 -2680 +17780 -1700 +17780 -1680 +17780 -1660 +17780 -1560 +17780 -1540 +17780 -1220 +17780 1540 +17780 1580 +17780 1800 +17780 1880 +17780 5400 +17800 -8480 +17800 -8460 +17800 -8440 +17800 -6260 +17800 -2980 +17800 -2960 +17800 -2940 +17800 -2900 +17800 -2860 +17800 -2840 +17800 -1700 +17800 -1680 +17800 -1660 +17800 -1640 +17800 -1200 +17800 100 +17800 1560 +17800 1580 +17800 5400 +17800 5420 +17820 -11480 +17820 -11460 +17820 -11440 +17820 -10780 +17820 -10760 +17820 -8460 +17820 -6280 +17820 -4720 +17820 -2920 +17820 -2880 +17820 -2860 +17820 -2840 +17820 -2680 +17820 -1700 +17820 -1680 +17820 -1660 +17820 -1340 +17820 1780 +17820 5400 +17840 -11640 +17840 -11620 +17840 -11600 +17840 -11560 +17840 -11540 +17840 -11520 +17840 -11480 +17840 -11460 +17840 -10780 +17840 -10760 +17840 -8460 +17840 -8440 +17840 -4720 +17840 -4700 +17840 -2900 +17840 -2880 +17840 -2800 +17840 -2780 +17840 -2760 +17840 -2740 +17840 -2720 +17840 -2700 +17840 -1680 +17840 -1660 +17840 -1180 +17840 5380 +17840 5400 +17840 5420 +17860 -11660 +17860 -11600 +17860 -11540 +17860 -11520 +17860 -10760 +17860 -8540 +17860 -8460 +17860 -6280 +17860 -4780 +17860 -4760 +17860 -2900 +17860 -2860 +17860 -2760 +17860 5420 +17860 5480 +17880 -11640 +17880 -11620 +17880 -10760 +17880 -8480 +17880 -8080 +17880 -8020 +17880 -4780 +17880 -4760 +17880 -2780 +17880 -2760 +17880 -1200 +17880 5420 +17900 -11680 +17900 -10780 +17900 -10760 +17900 -8520 +17900 -8480 +17900 -8060 +17900 -4780 +17900 -4760 +17900 -2820 +17900 5400 +17900 5420 +17900 5460 +17920 -17360 +17920 -17340 +17920 -12680 +17920 -12480 +17920 -12460 +17920 -10780 +17920 -10760 +17920 -8540 +17920 -8520 +17920 -8480 +17920 -4780 +17920 -4760 +17920 -2840 +17920 -2820 +17920 -1140 +17920 20 +17920 5380 +17920 5400 +17920 5420 +17940 -12780 +17940 -12760 +17940 -12440 +17940 -12400 +17940 -10740 +17940 -8060 +17940 -6220 +17940 -4780 +17940 -4760 +17940 -4740 +17940 -4680 +17940 -4660 +17940 -2820 +17940 5380 +17940 5400 +17940 5440 +17960 -17320 +17960 -12760 +17960 -12660 +17960 -12560 +17960 -12480 +17960 -12440 +17960 -11680 +17960 -11660 +17960 -10780 +17960 -10760 +17960 -8380 +17960 -8040 +17960 -8020 +17960 -8000 +17960 -4660 +17960 -2860 +17960 -2820 +17960 -2800 +17960 -2780 +17960 5380 +17960 5400 +17960 5420 +17980 -12600 +17980 -10780 +17980 -10760 +17980 -10740 +17980 -8060 +17980 -2800 +17980 -2780 +17980 -1200 +17980 -1180 +17980 -1160 +17980 5380 +17980 5400 +18000 -12820 +18000 -12700 +18000 -12680 +18000 -12660 +18000 -12640 +18000 -12600 +18000 -12580 +18000 -12540 +18000 -12520 +18000 -12500 +18000 -12460 +18000 -12420 +18000 -10780 +18000 -10760 +18000 -2900 +18000 -2860 +18000 -2840 +18000 -2800 +18000 -2780 +18000 -1220 +18000 -1180 +18000 -1160 +18000 -1140 +18000 -1120 +18000 100 +18000 5380 +18020 -12740 +18020 -12720 +18020 -12680 +18020 -12660 +18020 -12640 +18020 -12620 +18020 -12580 +18020 -12500 +18020 -12420 +18020 -11660 +18020 -10780 +18020 -10760 +18020 -8440 +18020 -8060 +18020 -2940 +18020 -2920 +18020 -1180 +18020 -1140 +18020 5380 +18020 5420 +18040 -17340 +18040 -11620 +18040 -10760 +18040 -8060 +18040 -2940 +18040 -2900 +18040 -1180 +18040 5380 +18040 5400 +18060 -11640 +18060 -10800 +18060 -10760 +18060 -1200 +18060 -1180 +18060 -1160 +18060 -1120 +18060 5400 +18080 -10760 +18080 -8460 +18080 -1240 +18080 -1220 +18080 -1200 +18080 -1180 +18080 -1160 +18080 5420 +18100 -17440 +18100 -17400 +18100 -11620 +18100 -10760 +18100 -8480 +18100 -8460 +18100 -8060 +18100 -1240 +18100 -1200 +18100 -1180 +18100 -1160 +18100 -1120 +18100 5420 +18100 15760 +18100 15800 +18100 15820 +18100 15840 +18100 15860 +18100 15880 +18120 -10780 +18120 -8060 +18120 -1260 +18120 -1180 +18120 -1140 +18120 15620 +18120 15660 +18120 15680 +18120 15720 +18120 15760 +18120 15780 +18120 15800 +18120 15840 +18120 15860 +18120 15880 +18140 -17420 +18140 -10780 +18140 -10760 +18140 -6780 +18140 -6760 +18140 -1240 +18140 -1200 +18140 -1180 +18140 -1140 +18140 2780 +18140 15600 +18140 15660 +18140 15680 +18140 15700 +18140 15720 +18140 15740 +18140 15780 +18140 15880 +18160 -17440 +18160 -17400 +18160 -12960 +18160 -12840 +18160 -11620 +18160 -10760 +18160 -6840 +18160 -6780 +18160 -6760 +18160 -1240 +18160 -1200 +18160 -1180 +18160 -1120 +18160 15640 +18160 15660 +18160 15840 +18180 -17440 +18180 -17420 +18180 -12980 +18180 -12920 +18180 -12900 +18180 -12420 +18180 -11640 +18180 -10780 +18180 -10760 +18180 -8040 +18180 -6820 +18180 -6780 +18180 -6760 +18180 -6220 +18180 -1220 +18180 -1200 +18180 -1180 +18180 -1160 +18180 2780 +18200 -17440 +18200 -12920 +18200 -12900 +18200 -12420 +18200 -10780 +18200 -10760 +18200 -8460 +18200 -8080 +18200 -8060 +18200 -6820 +18200 -6800 +18200 -6760 +18200 -1240 +18200 -1200 +18200 -1180 +18200 15760 +18220 -13180 +18220 -12380 +18220 -11660 +18220 -10760 +18220 -1240 +18220 -1220 +18220 -1200 +18220 -1180 +18220 -1120 +18220 1280 +18220 15540 +18220 15660 +18240 -17420 +18240 -13160 +18240 -13140 +18240 -13080 +18240 -12840 +18240 -12360 +18240 -10780 +18240 -10760 +18240 -8040 +18240 -8000 +18240 -1200 +18240 -1180 +18240 1260 +18240 1280 +18240 3800 +18240 15680 +18260 -13140 +18260 -13080 +18260 -13060 +18260 -12920 +18260 -12900 +18260 -12360 +18260 -11680 +18260 -10780 +18260 -8120 +18260 -8060 +18260 -8040 +18260 -8000 +18260 -6760 +18260 -6640 +18260 -5560 +18260 -5480 +18260 -5420 +18260 -1220 +18260 -1200 +18260 2940 +18260 3900 +18260 3940 +18260 5940 +18260 15540 +18260 15760 +18280 -12340 +18280 -12320 +18280 -11680 +18280 -11620 +18280 -10760 +18280 -6780 +18280 -6660 +18280 -5560 +18280 -5520 +18280 -5500 +18280 -5480 +18280 -5460 +18280 -5440 +18280 -5420 +18280 -5400 +18280 -5380 +18280 -5360 +18280 -5340 +18280 -5320 +18280 -1540 +18280 -1200 +18280 -1180 +18280 -1160 +18280 -1120 +18280 1280 +18280 3720 +18280 3740 +18280 3900 +18280 4000 +18280 5940 +18280 15560 +18300 -17420 +18300 -17400 +18300 -10760 +18300 -8060 +18300 -8000 +18300 -5380 +18300 -5340 +18300 -5320 +18300 -5300 +18300 -5280 +18300 -5260 +18300 -5240 +18300 -1200 +18300 -1180 +18300 3720 +18300 5920 +18320 -12320 +18320 -11660 +18320 -10760 +18320 -8440 +18320 -8120 +18320 -8060 +18320 -8040 +18320 -8020 +18320 -8000 +18320 -7980 +18320 -5560 +18320 -5240 +18320 -1620 +18320 -1580 +18320 -1480 +18320 -1220 +18320 -1200 +18320 5900 +18320 5920 +18320 5940 +18340 -17460 +18340 -10760 +18340 -8080 +18340 -8000 +18340 -7980 +18340 -6740 +18340 -6700 +18340 -5200 +18340 -1600 +18340 -1580 +18340 -1560 +18340 -1520 +18340 -1500 +18340 -1240 +18340 -1220 +18340 -1200 +18340 -1180 +18340 14800 +18340 14820 +18360 -13060 +18360 -12840 +18360 -8020 +18360 -8000 +18360 -5200 +18360 -1480 +18360 -1220 +18360 1340 +18360 3700 +18360 5900 +18360 5980 +18360 14460 +18360 14520 +18360 14560 +18360 14580 +18360 14600 +18360 14680 +18360 14700 +18360 14720 +18360 14800 +18380 -17480 +18380 -13020 +18380 -13000 +18380 -12840 +18380 -10780 +18380 -10760 +18380 -8460 +18380 -6520 +18380 -6500 +18380 -1440 +18380 -1360 +18380 -1240 +18380 -1220 +18380 -1200 +18380 5940 +18380 14440 +18380 14480 +18380 14520 +18380 14540 +18380 14580 +18380 14600 +18380 14620 +18380 14640 +18380 14680 +18380 14720 +18380 14740 +18380 14820 +18380 15300 +18380 15320 +18400 -16320 +18400 -12920 +18400 -10760 +18400 -6640 +18400 -6620 +18400 -6500 +18400 -1500 +18400 -1220 +18400 -1200 +18400 -1180 +18400 5940 +18400 14420 +18400 14440 +18400 14540 +18400 14640 +18400 14660 +18400 14820 +18400 15300 +18400 15320 +18420 -16900 +18420 -16880 +18420 -16320 +18420 -16060 +18420 -13020 +18420 -11620 +18420 -10780 +18420 -10760 +18420 -5200 +18420 -1220 +18420 -1200 +18420 3840 +18420 5920 +18420 5980 +18420 14720 +18420 14820 +18440 -16920 +18440 -16900 +18440 -16880 +18440 -16780 +18440 -16740 +18440 -11680 +18440 -11660 +18440 -10760 +18440 -5200 +18440 -1420 +18440 -1200 +18440 -1180 +18440 5900 +18440 5920 +18440 14800 +18440 14820 +18440 15320 +18440 15340 +18460 -17660 +18460 -16800 +18460 -16780 +18460 -16760 +18460 -16640 +18460 -13060 +18460 -11620 +18460 -10780 +18460 -10760 +18460 -10740 +18460 -8440 +18460 -6700 +18460 -6660 +18460 -1440 +18460 -1200 +18460 -1180 +18460 2780 +18460 5920 +18460 14820 +18460 16160 +18480 -17580 +18480 -16960 +18480 -16920 +18480 -16780 +18480 -16740 +18480 -16620 +18480 -16300 +18480 -16240 +18480 -16080 +18480 -16040 +18480 -10780 +18480 -6740 +18480 -5180 +18480 -1340 +18480 -1200 +18480 -1180 +18480 2820 +18480 3760 +18480 5900 +18480 14820 +18480 15920 +18480 16020 +18480 16100 +18480 16320 +18500 -16960 +18500 -16780 +18500 -16640 +18500 -16600 +18500 -16000 +18500 -15980 +18500 -13100 +18500 -10780 +18500 -10760 +18500 -5200 +18500 -5180 +18500 2820 +18500 3800 +18500 4000 +18500 14800 +18500 14820 +18500 14840 +18500 15420 +18500 15460 +18500 15920 +18500 15940 +18500 15960 +18500 16000 +18500 16020 +18500 16040 +18500 16080 +18500 16100 +18500 16120 +18500 16140 +18500 16160 +18500 16180 +18500 16200 +18500 16220 +18500 16240 +18500 16260 +18500 16280 +18500 16300 +18500 16320 +18500 16340 +18520 -16860 +18520 -16700 +18520 -13980 +18520 -11660 +18520 -10760 +18520 -8060 +18520 -5280 +18520 -5160 +18520 -3400 +18520 -1580 +18520 -1560 +18520 -1340 +18520 -1220 +18520 -1180 +18520 14800 +18520 14820 +18520 14840 +18520 15080 +18520 15940 +18520 15960 +18520 15980 +18520 16000 +18520 16020 +18520 16040 +18520 16060 +18520 16080 +18520 16100 +18520 16120 +18520 16140 +18520 16160 +18520 16180 +18520 16200 +18520 16220 +18520 16240 +18520 16260 +18520 16300 +18520 16340 +18540 -17400 +18540 -17180 +18540 -16580 +18540 -16240 +18540 -15920 +18540 -13980 +18540 -11620 +18540 -10780 +18540 -8440 +18540 -6800 +18540 -5300 +18540 -5160 +18540 -4780 +18540 -4760 +18540 -4740 +18540 -4720 +18540 -4700 +18540 -4680 +18540 -4660 +18540 -4640 +18540 -4620 +18540 -4600 +18540 -3460 +18540 -3440 +18540 -3420 +18540 -3400 +18540 -1520 +18540 -1500 +18540 1280 +18540 3880 +18540 4100 +18540 14820 +18540 15060 +18540 15180 +18540 15920 +18540 16340 +18560 -17180 +18560 -16680 +18560 -16580 +18560 -16440 +18560 -16260 +18560 -16140 +18560 -16120 +18560 -15920 +18560 -15900 +18560 -13940 +18560 -11640 +18560 -8460 +18560 -8100 +18560 -8080 +18560 -8040 +18560 -6820 +18560 -6780 +18560 -6700 +18560 -5300 +18560 -4800 +18560 -4780 +18560 -4740 +18560 -4720 +18560 -4700 +18560 -4680 +18560 -4640 +18560 -4620 +18560 -4600 +18560 -3460 +18560 -3440 +18560 -1640 +18560 -1520 +18560 -1480 +18560 3620 +18560 3720 +18560 3760 +18560 14820 +18560 15480 +18580 -17140 +18580 -17100 +18580 -16680 +18580 -16620 +18580 -16220 +18580 -16060 +18580 -15920 +18580 -15900 +18580 -13960 +18580 -8040 +18580 -8000 +18580 -7740 +18580 -6700 +18580 -5260 +18580 -4840 +18580 -4820 +18580 -4800 +18580 -3460 +18580 -1680 +18580 -1660 +18580 -1520 +18580 -1480 +18580 -1180 +18580 3780 +18580 4100 +18580 14780 +18580 14820 +18580 15500 +18580 16340 +18600 -16680 +18600 -16620 +18600 -16220 +18600 -15960 +18600 -15880 +18600 -14000 +18600 -13980 +18600 -13060 +18600 -10780 +18600 -10760 +18600 -8060 +18600 -8040 +18600 -8020 +18600 -7980 +18600 -7960 +18600 -7940 +18600 -7920 +18600 -7900 +18600 -7860 +18600 -7840 +18600 -7820 +18600 -7800 +18600 -7780 +18600 -7740 +18600 -7720 +18600 -7700 +18600 -7640 +18600 -7620 +18600 -7600 +18600 -4820 +18600 -4800 +18600 -1640 +18600 -1520 +18600 -1420 +18600 14800 +18600 14820 +18600 15480 +18600 16280 +18600 16340 +18620 -16860 +18620 -16620 +18620 -16540 +18620 -16120 +18620 -16080 +18620 -16040 +18620 -15920 +18620 -15840 +18620 -15820 +18620 -15780 +18620 -15760 +18620 -15720 +18620 -15700 +18620 -13120 +18620 -10760 +18620 -8060 +18620 -8000 +18620 -7980 +18620 -7960 +18620 -7940 +18620 -7920 +18620 -7900 +18620 -7880 +18620 -7860 +18620 -7840 +18620 -7820 +18620 -7800 +18620 -7780 +18620 -7760 +18620 -7740 +18620 -7720 +18620 -7700 +18620 -7680 +18620 -7660 +18620 -7640 +18620 -7620 +18620 -4840 +18620 -1680 +18620 -1640 +18620 -1500 +18620 -1360 +18620 -1200 +18620 -1180 +18620 1980 +18620 14780 +18620 14800 +18620 14820 +18620 14840 +18620 15500 +18620 16280 +18620 16300 +18620 16340 +18640 -16520 +18640 -16020 +18640 -15920 +18640 -15840 +18640 -15820 +18640 -15720 +18640 -15700 +18640 -11660 +18640 -10760 +18640 -8040 +18640 -7940 +18640 -7880 +18640 -7800 +18640 -7720 +18640 -7680 +18640 -7620 +18640 -1720 +18640 -1680 +18640 -1520 +18640 -1180 +18640 14820 +18640 14840 +18640 15020 +18640 15040 +18640 15480 +18640 16280 +18660 -16200 +18660 -15840 +18660 -15800 +18660 -15780 +18660 -15700 +18660 -15680 +18660 -10780 +18660 -8440 +18660 -8360 +18660 -8040 +18660 -8020 +18660 -8000 +18660 -7980 +18660 -7620 +18660 -4820 +18660 -3300 +18660 -3280 +18660 -2260 +18660 -1700 +18660 1380 +18660 14800 +18660 14820 +18660 14980 +18660 16340 +18680 -17840 +18680 -17820 +18680 -17800 +18680 -16640 +18680 -16620 +18680 -15700 +18680 -14020 +18680 -13220 +18680 -10780 +18680 -10760 +18680 -8460 +18680 -8040 +18680 -7860 +18680 -3300 +18680 -3280 +18680 -2560 +18680 -2320 +18680 -2300 +18680 -2280 +18680 -2260 +18680 -2240 +18680 -1720 +18680 -1580 +18680 -1520 +18680 -1500 +18680 1920 +18680 3760 +18680 3820 +18680 14800 +18680 14820 +18700 -17780 +18700 -16660 +18700 -16020 +18700 -15680 +18700 -3320 +18700 -3300 +18700 -2660 +18700 -2640 +18700 -2580 +18700 -2560 +18700 -2320 +18700 -2300 +18700 -2260 +18700 -1720 +18700 -1620 +18700 -1540 +18700 -1500 +18700 -1180 +18700 1960 +18700 1980 +18700 3820 +18700 3980 +18700 14820 +18700 15020 +18700 15040 +18700 16280 +18700 16300 +18720 -17780 +18720 -17360 +18720 -16700 +18720 -15700 +18720 -15660 +18720 -11700 +18720 -11620 +18720 -10760 +18720 -2680 +18720 -2660 +18720 -2640 +18720 -2620 +18720 -2600 +18720 -2580 +18720 -2320 +18720 -2280 +18720 -1620 +18720 -1560 +18720 -1540 +18720 -1180 +18720 14780 +18720 14800 +18720 14820 +18740 -17800 +18740 -17340 +18740 -16540 +18740 -15700 +18740 -15660 +18740 -13240 +18740 -10780 +18740 -10760 +18740 -7620 +18740 -2660 +18740 -2320 +18740 -2300 +18740 -2260 +18740 -1220 +18740 2060 +18740 2380 +18740 3960 +18740 14800 +18740 14820 +18740 14840 +18740 16280 +18760 -16520 +18760 -15660 +18760 -15640 +18760 -15620 +18760 -11680 +18760 -11660 +18760 -11620 +18760 -10760 +18760 -8060 +18760 -7600 +18760 -2320 +18760 -2280 +18760 -2100 +18760 -1620 +18760 1480 +18760 2040 +18760 2480 +18760 3820 +18760 3980 +18760 14780 +18760 14820 +18780 -17420 +18780 -16560 +18780 -15640 +18780 -15620 +18780 -14120 +18780 -14100 +18780 -10780 +18780 -10760 +18780 -7600 +18780 -2260 +18780 -2160 +18780 4040 +18780 14820 +18780 15360 +18780 16280 +18800 -17340 +18800 -15260 +18800 -10760 +18800 -2260 +18800 -2140 +18800 14800 +18800 14820 +18820 -17800 +18820 -17100 +18820 -16480 +18820 -15660 +18820 -15580 +18820 -15260 +18820 -10760 +18820 -7600 +18820 -6420 +18820 3760 +18820 3860 +18820 4160 +18820 14800 +18820 15380 +18820 16280 +18840 -15600 +18840 -15580 +18840 -15560 +18840 -15140 +18840 -11620 +18840 -10760 +18840 -6460 +18840 -6440 +18840 -6400 +18840 720 +18840 820 +18840 1660 +18840 4240 +18840 14820 +18840 16280 +18860 -17800 +18860 -15560 +18860 -15120 +18860 -8380 +18860 -6520 +18860 -6440 +18860 -6400 +18860 -6340 +18860 640 +18860 720 +18860 760 +18860 840 +18860 880 +18860 920 +18860 1660 +18860 1700 +18860 1760 +18860 14820 +18860 15340 +18880 -16500 +18880 -15400 +18880 -10780 +18880 -10760 +18880 -7600 +18880 -6440 +18880 -6320 +18880 -6300 +18880 -6280 +18880 -6260 +18880 -6220 +18880 660 +18880 1760 +18880 15300 +18880 16280 +18900 -17780 +18900 -15120 +18900 -14200 +18900 -11620 +18900 -10760 +18900 -8440 +18900 -6300 +18900 -6260 +18900 -6240 +18900 -6220 +18900 -6200 +18900 780 +18900 880 +18900 940 +18900 960 +18900 1680 +18920 -16640 +18920 -16520 +18920 -11640 +18920 -10760 +18920 -8540 +18920 -8520 +18920 -6240 +18920 -6180 +18920 -6160 +18920 -6140 +18920 -6120 +18920 -6080 +18920 980 +18920 1860 +18920 15280 +18920 16280 +18940 -14380 +18940 -14360 +18940 -10780 +18940 -8540 +18940 -8500 +18940 -6200 +18940 -6140 +18940 -6120 +18940 -6100 +18940 -2120 +18940 -1500 +18940 980 +18940 1040 +18940 1120 +18940 1140 +18940 1200 +18940 7240 +18960 -17760 +18960 -17740 +18960 -15800 +18960 -15340 +18960 -15180 +18960 -14520 +18960 -14200 +18960 -10800 +18960 -10760 +18960 -6060 +18960 -6040 +18960 -2160 +18960 -2140 +18960 -2120 +18960 -1440 +18960 1100 +18960 1220 +18960 1300 +18960 1320 +18960 1360 +18960 1380 +18960 1840 +18960 3860 +18980 -15600 +18980 -14540 +18980 -14460 +18980 -14360 +18980 -11640 +18980 -10780 +18980 -8540 +18980 -8500 +18980 -8400 +18980 -7600 +18980 -6500 +18980 -2200 +18980 -2180 +18980 -2160 +18980 -2140 +18980 1020 +18980 1100 +18980 1180 +18980 1860 +18980 15260 +18980 16280 +19000 -15420 +19000 -14360 +19000 -14220 +19000 -10760 +19000 -8500 +19000 -2240 +19000 -2200 +19000 -2180 +19000 -2160 +19000 -2140 +19000 1060 +19000 2060 +19000 6460 +19000 6480 +19000 16280 +19020 -17780 +19020 -15520 +19020 -11620 +19020 -10760 +19020 -8520 +19020 -8480 +19020 -8460 +19020 -7600 +19020 -2240 +19020 -2220 +19020 -2180 +19020 -1360 +19020 6360 +19020 6500 +19020 16280 +19040 -17800 +19040 -15500 +19040 -10780 +19040 -8540 +19040 -8460 +19040 -8440 +19040 -6060 +19040 -6040 +19040 -2280 +19040 -2240 +19040 -2220 +19040 3700 +19040 3760 +19040 6300 +19040 6320 +19040 6340 +19040 6380 +19040 6460 +19060 -17800 +19060 -12080 +19060 -12060 +19060 -11680 +19060 -10760 +19060 -8520 +19060 -8460 +19060 -8380 +19060 -7560 +19060 -6140 +19060 -5260 +19060 1220 +19060 1760 +19060 1920 +19060 3600 +19060 3640 +19060 4180 +19060 4200 +19060 6320 +19060 15600 +19060 16300 +19080 -15300 +19080 -12060 +19080 -11620 +19080 -10760 +19080 -8480 +19080 -8440 +19080 -8400 +19080 -7620 +19080 -6840 +19080 -6120 +19080 -5260 +19080 -2220 +19080 1000 +19080 1700 +19080 1720 +19080 2040 +19080 3600 +19080 3700 +19080 6320 +19080 6440 +19080 15180 +19080 15300 +19080 15320 +19100 -17560 +19100 -15660 +19100 -14500 +19100 -12280 +19100 -12240 +19100 -12200 +19100 -12120 +19100 -12100 +19100 -10780 +19100 -10760 +19100 -7640 +19100 -5980 +19100 -2200 +19100 -1140 +19100 1580 +19100 1660 +19100 1700 +19100 3660 +19100 3700 +19100 6280 +19100 15280 +19100 15340 +19100 15440 +19120 -16560 +19120 -12300 +19120 -8400 +19120 -7580 +19120 -6020 +19120 -3200 +19120 -2160 +19120 -2140 +19120 -1140 +19120 640 +19120 1420 +19120 3080 +19120 3100 +19120 3900 +19120 4280 +19120 15040 +19120 15100 +19120 15120 +19120 15160 +19120 15180 +19120 15200 +19120 15220 +19120 15240 +19120 15260 +19120 15280 +19120 15300 +19120 15320 +19120 15340 +19120 15380 +19120 15400 +19120 15420 +19120 15440 +19120 15480 +19120 15520 +19140 -14280 +19140 -13060 +19140 -12200 +19140 -12100 +19140 -10780 +19140 -10760 +19140 -8480 +19140 -8440 +19140 -6840 +19140 -6100 +19140 -3240 +19140 -3220 +19140 -3200 +19140 -2280 +19140 -2260 +19140 -2240 +19140 -2220 +19140 -2140 +19140 1320 +19140 3000 +19140 3020 +19140 3040 +19140 15220 +19140 15240 +19140 15320 +19140 15340 +19140 15360 +19140 15400 +19140 15420 +19140 15440 +19140 15460 +19140 15520 +19140 15560 +19160 -15600 +19160 -14280 +19160 -13360 +19160 -13060 +19160 -10760 +19160 -8480 +19160 -7700 +19160 -6840 +19160 -5180 +19160 -3340 +19160 -3320 +19160 -3300 +19160 -3280 +19160 -3260 +19160 -2300 +19160 -2280 +19160 -2260 +19160 -2220 +19160 -2200 +19160 540 +19160 1360 +19160 1600 +19160 1620 +19160 1680 +19160 1700 +19160 2960 +19160 6320 +19160 6780 +19180 -17800 +19180 -17780 +19180 -15600 +19180 -14600 +19180 -13840 +19180 -13740 +19180 -13720 +19180 -13700 +19180 -13440 +19180 -10780 +19180 -10760 +19180 -8540 +19180 -7620 +19180 -7580 +19180 -7300 +19180 -7280 +19180 -7260 +19180 -7220 +19180 -7100 +19180 -7080 +19180 -7020 +19180 -6960 +19180 -6880 +19180 -6860 +19180 -6740 +19180 -6720 +19180 -6540 +19180 -5980 +19180 -5840 +19180 -5160 +19180 -3400 +19180 -3320 +19180 -3280 +19180 -3240 +19180 -2320 +19180 -2300 +19180 -2280 +19180 -2260 +19180 -2240 +19180 -1120 +19180 60 +19180 100 +19180 160 +19180 200 +19180 260 +19180 300 +19180 380 +19180 400 +19180 420 +19180 460 +19180 480 +19180 580 +19180 2960 +19180 3000 +19180 3200 +19180 6160 +19180 6220 +19180 6240 +19180 6320 +19180 6360 +19180 6400 +19180 7080 +19180 7160 +19180 7220 +19180 7300 +19180 7320 +19180 7720 +19180 7780 +19200 -13860 +19200 -13780 +19200 -13760 +19200 -13740 +19200 -13680 +19200 -13660 +19200 -13600 +19200 -13540 +19200 -13400 +19200 -11660 +19200 -10800 +19200 -10760 +19200 -8580 +19200 -7620 +19200 -7600 +19200 -7560 +19200 -7540 +19200 -7500 +19200 -7440 +19200 -7420 +19200 -7400 +19200 -7380 +19200 -7360 +19200 -7340 +19200 -7320 +19200 -7280 +19200 -7260 +19200 -7240 +19200 -7220 +19200 -7200 +19200 -7180 +19200 -7160 +19200 -7140 +19200 -7120 +19200 -7100 +19200 -7080 +19200 -7060 +19200 -7040 +19200 -7020 +19200 -7000 +19200 -6980 +19200 -6960 +19200 -6940 +19200 -6920 +19200 -6900 +19200 -6860 +19200 -6840 +19200 -6820 +19200 -6800 +19200 -6780 +19200 -6740 +19200 -6720 +19200 -6680 +19200 -6660 +19200 -6640 +19200 -6600 +19200 -6580 +19200 -3480 +19200 -3460 +19200 -3440 +19200 -3420 +19200 -3340 +19200 -3320 +19200 -3280 +19200 -3260 +19200 -2340 +19200 -2320 +19200 -2300 +19200 -2000 +19200 -1220 +19200 -1200 +19200 -1180 +19200 2900 +19200 2920 +19200 6060 +19200 6300 +19200 6380 +19200 6980 +19200 7140 +19200 7160 +19200 7300 +19200 7500 +19200 7680 +19200 7780 +19200 16280 +19220 -14100 +19220 -13780 +19220 -13760 +19220 -13640 +19220 -13400 +19220 -13380 +19220 -13360 +19220 -12220 +19220 -10760 +19220 -7680 +19220 -7580 +19220 -7560 +19220 -7540 +19220 -7520 +19220 -7500 +19220 -7480 +19220 -7460 +19220 -7440 +19220 -7420 +19220 -7400 +19220 -7380 +19220 -7360 +19220 -7340 +19220 -7320 +19220 -7300 +19220 -7280 +19220 -7260 +19220 -7240 +19220 -7220 +19220 -7200 +19220 -7180 +19220 -7160 +19220 -7140 +19220 -7120 +19220 -7100 +19220 -7060 +19220 -7040 +19220 -7020 +19220 -7000 +19220 -6940 +19220 -6920 +19220 -6840 +19220 -5220 +19220 -3460 +19220 -3440 +19220 -3400 +19220 -3380 +19220 -3360 +19220 -3320 +19220 -3300 +19220 -2320 +19220 -2300 +19220 -2220 +19220 -2200 +19220 -2180 +19220 -2140 +19220 -2060 +19220 -1640 +19220 -1620 +19220 -1600 +19220 -1200 +19220 -1180 +19220 -1140 +19220 3140 +19220 3280 +19220 6020 +19220 6180 +19220 6260 +19240 -14300 +19240 -13880 +19240 -13740 +19240 -10780 +19240 -10760 +19240 -8460 +19240 -7540 +19240 -7400 +19240 -7320 +19240 -7280 +19240 -4780 +19240 -3480 +19240 -3460 +19240 -3380 +19240 -3360 +19240 -2340 +19240 -2300 +19240 -2180 +19240 -1660 +19240 -1640 +19240 -1600 +19240 -1300 +19240 -1220 +19240 -1200 +19240 -1140 +19240 -1120 +19240 3380 +19240 6000 +19240 6020 +19240 7100 +19240 7220 +19240 7460 +19240 7620 +19240 7800 +19240 16280 +19260 -16740 +19260 -14160 +19260 -14100 +19260 -13880 +19260 -13700 +19260 -13620 +19260 -10780 +19260 -10760 +19260 -10660 +19260 -10640 +19260 -8740 +19260 -8700 +19260 -5040 +19260 -3480 +19260 -3460 +19260 -3440 +19260 -3340 +19260 -3300 +19260 -3260 +19260 -2320 +19260 -2300 +19260 -1680 +19260 -1660 +19260 -1200 +19260 3760 +19260 4300 +19260 4460 +19260 6000 +19260 6120 +19280 -16800 +19280 -16260 +19280 -14180 +19280 -14080 +19280 -13960 +19280 -13940 +19280 -13920 +19280 -13900 +19280 -13860 +19280 -13840 +19280 -13700 +19280 -13540 +19280 -13420 +19280 -11640 +19280 -10760 +19280 -10720 +19280 -10700 +19280 -10680 +19280 -10660 +19280 -10640 +19280 -10620 +19280 -10600 +19280 -8720 +19280 -8700 +19280 -8680 +19280 -8660 +19280 -5100 +19280 -4060 +19280 -3460 +19280 -3440 +19280 -3400 +19280 -3280 +19280 -3200 +19280 -3180 +19280 -3160 +19280 -2980 +19280 -2940 +19280 -2920 +19280 -2860 +19280 -2420 +19280 -2300 +19280 -2280 +19280 -2260 +19280 -2240 +19280 -2200 +19280 -1900 +19280 -1720 +19280 -1220 +19280 -1200 +19280 1980 +19280 2040 +19280 2220 +19280 2280 +19280 2300 +19280 2380 +19280 2480 +19280 2500 +19280 2580 +19280 2680 +19280 2780 +19280 2800 +19280 2820 +19280 2860 +19280 2880 +19280 2900 +19280 2960 +19280 3000 +19280 3020 +19280 3060 +19280 3080 +19280 3120 +19280 3140 +19280 3240 +19280 3260 +19280 3340 +19280 3360 +19280 3380 +19280 3480 +19280 3500 +19280 3640 +19280 3680 +19280 3720 +19280 3820 +19280 3840 +19280 4100 +19280 4180 +19280 4280 +19280 4380 +19280 4400 +19280 4460 +19280 4620 +19280 4700 +19280 4840 +19280 4900 +19280 5420 +19280 5560 +19280 5620 +19280 5660 +19280 5740 +19280 5800 +19280 5840 +19280 5880 +19280 5920 +19280 5960 +19280 6040 +19280 16300 +19300 -16880 +19300 -15120 +19300 -14940 +19300 -14920 +19300 -14880 +19300 -14820 +19300 -14800 +19300 -14760 +19300 -14480 +19300 -14420 +19300 -14400 +19300 -14300 +19300 -14280 +19300 -14180 +19300 -14160 +19300 -14100 +19300 -14080 +19300 -14060 +19300 -13980 +19300 -13960 +19300 -13920 +19300 -13900 +19300 -13860 +19300 -13740 +19300 -13720 +19300 -13680 +19300 -13540 +19300 -12200 +19300 -12120 +19300 -12060 +19300 -10760 +19300 -10720 +19300 -10700 +19300 -10680 +19300 -10660 +19300 -10620 +19300 -10600 +19300 -9040 +19300 -9020 +19300 -9000 +19300 -8920 +19300 -8900 +19300 -8880 +19300 -8860 +19300 -8840 +19300 -8820 +19300 -8780 +19300 -8760 +19300 -8740 +19300 -8720 +19300 -8700 +19300 -8680 +19300 -8660 +19300 -8640 +19300 -8620 +19300 -8600 +19300 -8580 +19300 -8560 +19300 -8520 +19300 -5320 +19300 -5300 +19300 -5280 +19300 -5180 +19300 -5140 +19300 -5120 +19300 -5080 +19300 -5060 +19300 -5040 +19300 -5020 +19300 -5000 +19300 -4980 +19300 -4960 +19300 -4940 +19300 -4920 +19300 -4900 +19300 -4860 +19300 -4840 +19300 -4820 +19300 -4800 +19300 -4760 +19300 -4740 +19300 -4700 +19300 -4460 +19300 -4180 +19300 -4160 +19300 -4040 +19300 -3920 +19300 -3900 +19300 -3480 +19300 -3460 +19300 -3440 +19300 -3400 +19300 -3380 +19300 -3340 +19300 -3320 +19300 -3300 +19300 -3280 +19300 -3220 +19300 -3180 +19300 -2980 +19300 -2960 +19300 -2920 +19300 -2900 +19300 -2860 +19300 -2400 +19300 -2340 +19300 -2260 +19300 -2200 +19300 -2180 +19300 -1900 +19300 -1860 +19300 -1720 +19300 -1640 +19300 -1460 +19300 -1240 +19300 -1220 +19300 2260 +19300 2280 +19300 2360 +19300 2380 +19300 2580 +19300 2600 +19300 2620 +19300 2680 +19300 2720 +19300 2780 +19300 2800 +19300 2920 +19300 3200 +19300 3460 +19300 3500 +19300 3700 +19300 3720 +19300 4820 +19300 4960 +19300 5020 +19300 5580 +19300 5660 +19300 16320 +19300 16400 +19320 -16640 +19320 -16560 +19320 -16260 +19320 -15340 +19320 -15180 +19320 -15080 +19320 -15060 +19320 -15040 +19320 -14980 +19320 -14880 +19320 -14840 +19320 -14780 +19320 -14760 +19320 -14700 +19320 -14680 +19320 -14660 +19320 -14640 +19320 -14620 +19320 -14600 +19320 -14560 +19320 -14540 +19320 -14500 +19320 -14460 +19320 -14440 +19320 -14360 +19320 -14280 +19320 -14120 +19320 -14100 +19320 -14080 +19320 -14060 +19320 -14040 +19320 -14020 +19320 -14000 +19320 -13980 +19320 -13920 +19320 -13860 +19320 -13820 +19320 -13800 +19320 -13660 +19320 -13640 +19320 -13600 +19320 -13580 +19320 -13560 +19320 -13540 +19320 -13520 +19320 -13460 +19320 -13380 +19320 -13360 +19320 -12180 +19320 -12160 +19320 -12120 +19320 -12100 +19320 -12080 +19320 -11980 +19320 -11960 +19320 -11940 +19320 -11920 +19320 -11900 +19320 -11880 +19320 -11860 +19320 -11840 +19320 -11820 +19320 -11800 +19320 -11780 +19320 -11760 +19320 -11740 +19320 -11720 +19320 -11680 +19320 -11660 +19320 -11640 +19320 -11620 +19320 -10760 +19320 -10740 +19320 -10720 +19320 -10700 +19320 -10680 +19320 -10660 +19320 -10640 +19320 -10620 +19320 -10600 +19320 -10580 +19320 -10560 +19320 -10540 +19320 -10520 +19320 -10500 +19320 -10480 +19320 -10460 +19320 -10440 +19320 -10420 +19320 -10400 +19320 -10380 +19320 -10360 +19320 -10340 +19320 -10320 +19320 -10300 +19320 -10280 +19320 -9100 +19320 -9080 +19320 -9060 +19320 -9040 +19320 -9020 +19320 -9000 +19320 -8980 +19320 -8960 +19320 -8940 +19320 -8920 +19320 -8900 +19320 -8880 +19320 -8860 +19320 -8840 +19320 -8820 +19320 -8800 +19320 -8780 +19320 -8760 +19320 -8740 +19320 -8720 +19320 -8700 +19320 -8660 +19320 -8640 +19320 -8620 +19320 -8600 +19320 -8580 +19320 -8560 +19320 -8540 +19320 -8520 +19320 -8480 +19320 -4580 +19320 -4560 +19320 -4520 +19320 -4500 +19320 -4480 +19320 -4460 +19320 -4440 +19320 -4420 +19320 -4400 +19320 -4380 +19320 -4360 +19320 -4340 +19320 -4320 +19320 -4300 +19320 -4280 +19320 -4260 +19320 -4240 +19320 -4220 +19320 -4200 +19320 -4180 +19320 -4160 +19320 -4140 +19320 -4120 +19320 -4100 +19320 -4080 +19320 -4060 +19320 -4040 +19320 -4020 +19320 -4000 +19320 -3980 +19320 -3960 +19320 -3940 +19320 -3920 +19320 -3900 +19320 -3880 +19320 -3860 +19320 -3840 +19320 -3820 +19320 -3800 +19320 -3780 +19320 -3760 +19320 -3740 +19320 -3720 +19320 -3700 +19320 -3680 +19320 -3660 +19320 -3640 +19320 -3620 +19320 -3600 +19320 -3580 +19320 -3560 +19320 -3540 +19320 -3520 +19320 -3500 +19320 -3480 +19320 -3460 +19320 -3360 +19320 -3320 +19320 -3300 +19320 -3200 +19320 -3180 +19320 -3160 +19320 -3140 +19320 -3100 +19320 -3060 +19320 -3040 +19320 -3020 +19320 -3000 +19320 -2980 +19320 -2960 +19320 -2940 +19320 -2920 +19320 -2900 +19320 -2880 +19320 -2860 +19320 -2840 +19320 -2820 +19320 -2780 +19320 -2760 +19320 -2740 +19320 -2720 +19320 -2700 +19320 -2680 +19320 -2660 +19320 -2640 +19320 -2620 +19320 -2600 +19320 -2560 +19320 -2540 +19320 -2520 +19320 -2500 +19320 -2480 +19320 -2460 +19320 -2440 +19320 -2420 +19320 -2400 +19320 -2380 +19320 -2360 +19320 -2340 +19320 -2320 +19320 -2300 +19320 -2280 +19320 -2260 +19320 -2240 +19320 -1920 +19320 -1900 +19320 -1880 +19320 -1840 +19320 -1800 +19320 -1780 +19320 -1760 +19320 -1720 +19320 -1700 +19320 -1680 +19320 -1660 +19320 -1640 +19320 -1540 +19320 -1520 +19320 -1500 +19320 -1480 +19320 -1440 +19320 -1400 +19320 -1380 +19320 -1360 +19320 -1340 +19320 -1300 +19320 -1260 +19320 -1240 +19320 2820 +19320 2900 +19320 3200 +19320 3380 +19320 3540 +19320 3640 +19320 3740 +19320 3840 +19320 3920 +19320 4040 +19320 4140 +19320 4260 +19320 4360 +19320 4740 +19320 5900 +19340 -16820 +19340 -16540 +19340 -16480 +19340 -16420 +19340 -16380 +19340 -16360 +19340 -16240 +19340 -15600 +19340 -15460 +19340 -14880 +19340 -14580 +19340 -14420 +19340 -14140 +19340 -14040 +19340 -13960 +19340 -13580 +19340 -13520 +19340 -13500 +19340 -13480 +19340 -12180 +19340 -11980 +19340 -11900 +19340 -11880 +19340 -11840 +19340 -11780 +19340 -11740 +19340 -11680 +19340 -10720 +19340 -10700 +19340 -10680 +19340 -10660 +19340 -10640 +19340 -10620 +19340 -10600 +19340 -10580 +19340 -10560 +19340 -10540 +19340 -10520 +19340 -10500 +19340 -10480 +19340 -10460 +19340 -10440 +19340 -10420 +19340 -10400 +19340 -10380 +19340 -10360 +19340 -10340 +19340 -10320 +19340 -10300 +19340 -10280 +19340 -10260 +19340 -9120 +19340 -9100 +19340 -9060 +19340 -9020 +19340 -8980 +19340 -8960 +19340 -8940 +19340 -8920 +19340 -8900 +19340 -8860 +19340 -8840 +19340 -8820 +19340 -8720 +19340 -8580 +19340 -4380 +19340 -4340 +19340 -4300 +19340 -3800 +19340 -3780 +19340 -3760 +19340 -3720 +19340 -3680 +19340 -3640 +19340 -3620 +19340 -3600 +19340 -3560 +19340 -3540 +19340 -3520 +19340 -3500 +19340 -3480 +19340 -3360 +19340 -3340 +19340 -3320 +19340 -3300 +19340 -3280 +19340 -3140 +19340 -3120 +19340 -3100 +19340 -3080 +19340 -3060 +19340 -3040 +19340 -3020 +19340 -3000 +19340 -2980 +19340 -2960 +19340 -2940 +19340 -2880 +19340 -2860 +19340 -2840 +19340 -2820 +19340 -2780 +19340 -2760 +19340 -2740 +19340 -2720 +19340 -2700 +19340 -2680 +19340 -2640 +19340 -2620 +19340 -2600 +19340 -2580 +19340 -2560 +19340 -2540 +19340 -2520 +19340 -2500 +19340 -2480 +19340 -2460 +19340 -2440 +19340 -2420 +19340 -2380 +19340 -2360 +19340 -2320 +19340 -2300 +19340 -2280 +19340 -1800 +19340 -1760 +19340 -1700 +19340 -1680 +19340 -1360 +19340 -1340 +19340 -1260 +19340 -1240 +19360 -10300 +19360 -10280 +19360 -10260 +19360 -9120 +19360 -9040 +19360 -8940 +19360 -2480 +19360 -2440 +19360 -2400 +19360 -1360 +19360 -1280 +19380 -10300 +19380 -10280 +19380 -9140 +19380 -9120 +19380 -9100 +19380 -9080 +19400 -10300 +19400 -10280 +19400 -10260 +19400 -9140 +19400 -9100 +19400 -9080 +19400 -9060 +19420 -10280 +19420 -10260 +19420 -10240 +19420 -9180 +19420 -9160 +19420 -9140 +19420 -9120 +19420 -9080 +19440 -10280 +19440 -10260 +19440 -10240 +19440 -9180 +19440 -9160 +19440 -9140 +19440 -9100 +19440 -9080 +19460 -10280 +19460 -10260 +19460 -10240 +19460 -10220 +19460 -10200 +19460 -9160 +19460 -9140 +19460 -9100 +19480 -10260 +19480 -10220 +19480 -10200 +19480 -10180 +19480 -10160 +19480 -9220 +19480 -9200 +19480 -9180 +19480 -9100 +19500 -10240 +19500 -10220 +19500 -10200 +19500 -10160 +19500 -10140 +19500 -9200 +19500 -9180 +19520 -10220 +19520 -10200 +19520 -10180 +19520 -10160 +19520 -10140 +19520 -10120 +19520 -10100 +19520 -10080 +19520 -10060 +19520 -10040 +19520 -10020 +19520 -10000 +19520 -9980 +19520 -9960 +19520 -9940 +19520 -9920 +19520 -9900 +19520 -9880 +19520 -9860 +19520 -9840 +19520 -9820 +19520 -9800 +19520 -9780 +19520 -9760 +19520 -9740 +19520 -9720 +19520 -9700 +19520 -9680 +19520 -9660 +19520 -9640 +19520 -9620 +19520 -9600 +19520 -9580 +19520 -9560 +19520 -9540 +19520 -9520 +19520 -9500 +19520 -9480 +19520 -9460 +19520 -9440 +19520 -9420 +19520 -9400 +19520 -9380 +19520 -9360 +19520 -9340 +19520 -9320 +19520 -9300 +19520 -9280 +19520 -9260 +19520 -9240 +19520 -9220 +19520 -9200 +19520 -9160 +19520 -9120 +19540 -10200 +19540 -10180 +19540 -10140 +19540 -10120 +19540 -10100 +19540 -10060 +19540 -10040 +19540 -10020 +19540 -10000 +19540 -9980 +19540 -9960 +19540 -9940 +19540 -9920 +19540 -9900 +19540 -9880 +19540 -9860 +19540 -9840 +19540 -9820 +19540 -9800 +19540 -9780 +19540 -9760 +19540 -9740 +19540 -9720 +19540 -9700 +19540 -9680 +19540 -9640 +19540 -9620 +19540 -9600 +19540 -9580 +19540 -9560 +19540 -9540 +19540 -9500 +19540 -9480 +19540 -9460 +19540 -9440 +19540 -9420 +19540 -9400 +19540 -9380 +19540 -9360 +19540 -9340 +19540 -9320 +19540 -9300 +19540 -9280 +19540 -9260 +19540 -9240 +19540 -9220 +19540 -9200 +19540 -9180 +19540 -9140 +19560 -10220 +19560 -10200 +19560 -10120 +19560 -10100 +19560 -10080 +19560 -10060 +19560 -10040 +19560 -10020 +19560 -10000 +19560 -9980 +19560 -9960 +19560 -9940 +19560 -9920 +19560 -9880 +19560 -9840 +19560 -9820 +19560 -9800 +19560 -9680 +19560 -9660 +19560 -9640 +19560 -9580 +19560 -9460 +19560 -9360 diff --git a/Legacy/Aria/maps/office.map b/Legacy/Aria/maps/office.map new file mode 100644 index 0000000..43b8256 --- /dev/null +++ b/Legacy/Aria/maps/office.map @@ -0,0 +1,108 @@ +2D-Map +LineMinPos: 0 0 +LineMaxPos: 18760 14000 +NumLines: 101 +Cairn: RobotHome 1000 1498 0 "" ICON "Home" +LINES +16400 10000 18000 10000 +14200 2000 14200 0 +14600 10000 14600 4000 +16400 10000 16400 7000 +17025 1900 18725 1900 +1850 2775 1850 1975 +11900 13000 12300 13000 +0 675 2050 675 +8900 12100 8900 13000 +18670 14000 18670 0 +0 14000 18000 14000 +0 12000 3000 12000 +10025 2000 10250 2000 +14400 1900 14500 1000 +7960 4960 8200 4960 +10000 12100 12000 12100 +0 0 0 14000 +12000 12000 12000 12100 +0 10 18000 10 +8200 4960 8200 9800 +4100 13000 4200 12100 +2000 625 2000 75 +16400 4000 18000 4000 +18000 10000 18760 10000 +10000 12000 10000 12100 +10250 975 10250 2000 +8000 12000 8000 12100 +5100 12000 5100 12100 +4200 12000 4200 12100 +3900 12000 3900 12100 +7960 9800 8200 9800 +15300 2000 18000 2000 +3100 4910 3200 4960 +15300 1900 17000 1900 +2800 11975 3050 11975 +8900 12000 9200 12000 +2800 12475 2800 11975 +2800 12475 3050 12475 +12500 10000 14600 10000 +3900 12000 4200 12000 +11600 9800 11600 10000 +9200 12100 10000 12100 +10025 2000 10025 975 +14600 12000 14600 14000 +10025 975 10250 975 +17990 14000 18670 14000 +12000 12100 12300 13000 +3200 4960 3200 9760 +3000 9760 3200 9760 +5100 12000 8000 12000 +1900 1975 2000 1975 +50 2975 2050 2975 +50 2775 1850 2775 +17975 0 18700 0 +12800 12100 14600 12100 +15300 1900 15300 2000 +3050 11975 3050 12475 +14400 1900 14400 2000 +10000 4000 14600 4000 +18040 2000 18760 2000 +4000 12000 4000 14000 +6500 12000 6500 14000 +9000 12000 9000 14000 +12800 12000 12800 12100 +0 10000 11600 10000 +3000 12000 3000 12100 +0 9800 11600 9800 +2000 2025 2000 2975 +3900 12100 4200 12100 +8900 12100 9200 12100 +5100 12100 8000 12100 +10000 12000 12000 12000 +12800 12000 14600 12000 +8900 12000 8900 12100 +9200 12000 9200 12100 +12500 9800 14600 9800 +3000 9760 3000 4960 +17960 4000 18720 4000 +10050 2000 14450 2000 +14200 1900 14400 1900 +12500 9800 12500 10000 +7960 9800 7960 4960 +13300 7421 13300 6301 +13300 6301 9380 6301 +9380 6301 9380 7421 +9380 7421 13300 7421 +17300 12782 18525 12782 +18525 12782 18525 13867 +17300 13867 18525 13867 +17300 13867 17300 12782 +11900 12000 11900 14000 +16490 9813 16535 9948 +16535 9948 16535 7023 +16445 6978 16535 6978 +16535 6978 16535 7023 +16400 4008 16400 6168 +18605 9813 18650 9768 +18605 9813 18650 9858 +16445 6123 16445 6168 +16535 6168 16535 4008 +16535 4008 16535 4053 +DATA diff --git a/Legacy/Aria/maps/triangle.map b/Legacy/Aria/maps/triangle.map new file mode 100644 index 0000000..f5cfcbf --- /dev/null +++ b/Legacy/Aria/maps/triangle.map @@ -0,0 +1,16 @@ +2D-Map +LineMinPos: 0 0 +LineMaxPos: 10260 10080 +NumLines: 9 +Cairn: RobotHome 5090 3580 54 "" ICON "Home" +LINES +4970 5660 5220 5660 +4790 5830 4970 5650 +4790 5830 4850 5900 +5220 5660 5220 5760 +4860 5890 5210 5760 +0 10080 0 0 +0 0 10260 0 +10260 0 10260 10080 +0 10080 10260 10080 +DATA diff --git a/Legacy/Aria/params/amigo-sh.p b/Legacy/Aria/params/amigo-sh.p new file mode 100644 index 0000000..d47736b --- /dev/null +++ b/Legacy/Aria/params/amigo-sh.p @@ -0,0 +1,516 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass amigo-sh ; specific type of robot +RobotRadius 180.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 279.00000 ; width in mm +RobotLength 330.00000 ; length in mm of the whole robot +RobotLengthFront 160.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 170.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.01100 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 8 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 70 100 90 0 0 0 0 0 0 +SonarUnit 1 125 75 41 0 0 0 0 0 0 +SonarUnit 2 144 30 15 0 0 0 0 0 0 +SonarUnit 3 144 -30 -15 0 0 0 0 0 0 +SonarUnit 4 120 -75 -41 0 0 0 0 0 0 +SonarUnit 5 70 -100 -90 0 0 0 0 0 0 +SonarUnit 6 -146 -58 -145 0 0 0 0 0 0 +SonarUnit 7 -146 58 145 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/amigo.p b/Legacy/Aria/params/amigo.p new file mode 100644 index 0000000..d879a99 --- /dev/null +++ b/Legacy/Aria/params/amigo.p @@ -0,0 +1,516 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass amigo ; specific type of robot +RobotRadius 180.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 279.00000 ; width in mm +RobotLength 330.00000 ; length in mm of the whole robot +RobotLengthFront 160.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 170.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.50830 ; multiplier to mm from robot units +VelConvFactor 0.61540 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.01100 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 8 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 76 100 90 0 0 0 0 0 0 +SonarUnit 1 125 75 41 0 0 0 0 0 0 +SonarUnit 2 150 30 15 0 0 0 0 0 0 +SonarUnit 3 150 -30 -15 0 0 0 0 0 0 +SonarUnit 4 125 -75 -41 0 0 0 0 0 0 +SonarUnit 5 76 -100 -90 0 0 0 0 0 0 +SonarUnit 6 -140 -58 -145 0 0 0 0 0 0 +SonarUnit 7 -140 58 145 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/mt400.p b/Legacy/Aria/params/mt400.p new file mode 100644 index 0000000..6fbed76 --- /dev/null +++ b/Legacy/Aria/params/mt400.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass mt400 ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 510.00000 ; length in mm of the whole robot +RobotLengthFront 255.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 255.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 6 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 6 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 83 229 90 0 0 0 0 0 0 +SonarUnit 1 169 202 55 0 0 0 0 0 0 +SonarUnit 2 232 134 30 0 0 0 0 0 0 +SonarUnit 3 263 46 10 0 0 0 0 0 0 +SonarUnit 4 263 -46 -10 0 0 0 0 0 0 +SonarUnit 5 232 -134 -30 0 0 0 0 0 0 +SonarUnit 6 169 -202 -55 0 0 0 0 0 0 +SonarUnit 7 83 -229 -90 0 0 0 0 0 0 +SonarUnit 8 -83 -229 -90 0 0 0 0 0 0 +SonarUnit 9 -169 -202 -125 0 0 0 0 0 0 +SonarUnit 10 -232 -134 -150 0 0 0 0 0 0 +SonarUnit 11 -263 -46 -170 0 0 0 0 0 0 +SonarUnit 12 -263 46 170 0 0 0 0 0 0 +SonarUnit 13 -232 134 150 0 0 0 0 0 0 +SonarUnit 14 -169 202 125 0 0 0 0 0 0 +SonarUnit 15 -83 229 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 37 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore -76--72 72-76 ; Angles (in deg) at which to ignore readings, +/1 + ; one degree. Angles are entered as strings, separated + ; by a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 200 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_2 is upside-down. +LaserType urg ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM5 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees -120 ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees 120 ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement 1.0 ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2at.p b/Legacy/Aria/params/p2at.p new file mode 100644 index 0000000..03b9e75 --- /dev/null +++ b/Legacy/Aria/params/p2at.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2at ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.32000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 160 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 7 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2at8+.p b/Legacy/Aria/params/p2at8+.p new file mode 100644 index 0000000..37849b3 --- /dev/null +++ b/Legacy/Aria/params/p2at8+.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2at8+ ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.46500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 160 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 7 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2at8.p b/Legacy/Aria/params/p2at8.p new file mode 100644 index 0000000..8af90b2 --- /dev/null +++ b/Legacy/Aria/params/p2at8.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2at8 ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.32000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 160 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 7 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2ce.p b/Legacy/Aria/params/p2ce.p new file mode 100644 index 0000000..047d335 --- /dev/null +++ b/Legacy/Aria/params/p2ce.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2ce ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.82600 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00570 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2d8+.p b/Legacy/Aria/params/p2d8+.p new file mode 100644 index 0000000..5b70510 --- /dev/null +++ b/Legacy/Aria/params/p2d8+.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2d8+ ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 18 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2d8.p b/Legacy/Aria/params/p2d8.p new file mode 100644 index 0000000..16085ef --- /dev/null +++ b/Legacy/Aria/params/p2d8.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2d8 ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 18 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2de.p b/Legacy/Aria/params/p2de.p new file mode 100644 index 0000000..ad7bc6a --- /dev/null +++ b/Legacy/Aria/params/p2de.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2de ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.96900 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 17 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 8 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2df.p b/Legacy/Aria/params/p2df.p new file mode 100644 index 0000000..c979a0d --- /dev/null +++ b/Legacy/Aria/params/p2df.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2df ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 17 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 8 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2dx.p b/Legacy/Aria/params/p2dx.p new file mode 100644 index 0000000..17c8d2a --- /dev/null +++ b/Legacy/Aria/params/p2dx.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2dx ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.84000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 17 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 8 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2it.p b/Legacy/Aria/params/p2it.p new file mode 100644 index 0000000..e60e951 --- /dev/null +++ b/Legacy/Aria/params/p2it.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2it ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.13600 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00320 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 160 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 7 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2pb.p b/Legacy/Aria/params/p2pb.p new file mode 100644 index 0000000..23a1c78 --- /dev/null +++ b/Legacy/Aria/params/p2pb.p @@ -0,0 +1,532 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2pb ; specific type of robot +RobotRadius 300.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 513.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.42400 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 24 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -20 136 90 0 0 0 0 0 0 +SonarUnit 9 24 119 50 0 0 0 0 0 0 +SonarUnit 10 58 78 30 0 0 0 0 0 0 +SonarUnit 11 77 27 10 0 0 0 0 0 0 +SonarUnit 12 77 -27 -10 0 0 0 0 0 0 +SonarUnit 13 58 -78 -30 0 0 0 0 0 0 +SonarUnit 14 24 -119 -50 0 0 0 0 0 0 +SonarUnit 15 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 16 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 17 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 18 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 19 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 20 -255 27 170 0 0 0 0 0 0 +SonarUnit 21 -237 78 150 0 0 0 0 0 0 +SonarUnit 22 -203 119 130 0 0 0 0 0 0 +SonarUnit 23 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 17 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 8 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p2pp.p b/Legacy/Aria/params/p2pp.p new file mode 100644 index 0000000..f703b68 --- /dev/null +++ b/Legacy/Aria/params/p2pp.p @@ -0,0 +1,532 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p2pp ; specific type of robot +RobotRadius 300.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 513.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 0.26800 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR true ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 24 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -20 136 90 0 0 0 0 0 0 +SonarUnit 9 24 119 50 0 0 0 0 0 0 +SonarUnit 10 58 78 30 0 0 0 0 0 0 +SonarUnit 11 77 27 10 0 0 0 0 0 0 +SonarUnit 12 77 -27 -10 0 0 0 0 0 0 +SonarUnit 13 58 -78 -30 0 0 0 0 0 0 +SonarUnit 14 24 -119 -50 0 0 0 0 0 0 +SonarUnit 15 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 16 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 17 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 18 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 19 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 20 -255 27 170 0 0 0 0 0 0 +SonarUnit 21 -237 78 150 0 0 0 0 0 0 +SonarUnit 22 -203 119 130 0 0 0 0 0 0 +SonarUnit 23 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 16 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 1 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3at-sh-lms1xx.p b/Legacy/Aria/params/p3at-sh-lms1xx.p new file mode 100644 index 0000000..ab2f2fd --- /dev/null +++ b/Legacy/Aria/params/p3at-sh-lms1xx.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3at-sh-lms1xx ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 197 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms1XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3at-sh-lms500.p b/Legacy/Aria/params/p3at-sh-lms500.p new file mode 100644 index 0000000..933630e --- /dev/null +++ b/Legacy/Aria/params/p3at-sh-lms500.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3at-sh-lms500 ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 125 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms5XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3at-sh.p b/Legacy/Aria/params/p3at-sh.p new file mode 100644 index 0000000..5ec78a5 --- /dev/null +++ b/Legacy/Aria/params/p3at-sh.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3at-sh ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 125 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3at.p b/Legacy/Aria/params/p3at.p new file mode 100644 index 0000000..65632dc --- /dev/null +++ b/Legacy/Aria/params/p3at.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3at ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 505.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.46500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 160 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3atiw-sh.p b/Legacy/Aria/params/p3atiw-sh.p new file mode 100644 index 0000000..dcc9bed --- /dev/null +++ b/Legacy/Aria/params/p3atiw-sh.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3atiw-sh ; specific type of robot +RobotRadius 500.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 490.00000 ; width in mm +RobotLength 626.00000 ; length in mm of the whole robot +RobotLengthFront 313.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 313.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 300 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00340 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 147 136 90 0 0 0 0 0 0 +SonarUnit 1 193 119 50 0 0 0 0 0 0 +SonarUnit 2 227 79 30 0 0 0 0 0 0 +SonarUnit 3 245 27 10 0 0 0 0 0 0 +SonarUnit 4 245 -27 -10 0 0 0 0 0 0 +SonarUnit 5 227 -79 -30 0 0 0 0 0 0 +SonarUnit 6 193 -119 -50 0 0 0 0 0 0 +SonarUnit 7 147 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -144 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -189 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -223 -79 -150 0 0 0 0 0 0 +SonarUnit 11 -241 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -241 27 170 0 0 0 0 0 0 +SonarUnit 13 -223 79 150 0 0 0 0 0 0 +SonarUnit 14 -189 119 130 0 0 0 0 0 0 +SonarUnit 15 -144 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 125 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3dx-sh-lms1xx.p b/Legacy/Aria/params/p3dx-sh-lms1xx.p new file mode 100644 index 0000000..939f162 --- /dev/null +++ b/Legacy/Aria/params/p3dx-sh-lms1xx.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3dx-sh-lms1xx ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 55 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms1XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3dx-sh-lms500.p b/Legacy/Aria/params/p3dx-sh-lms500.p new file mode 100644 index 0000000..b8b9940 --- /dev/null +++ b/Legacy/Aria/params/p3dx-sh-lms500.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3dx-sh-lms500 ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 21 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms5XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3dx-sh.p b/Legacy/Aria/params/p3dx-sh.p new file mode 100644 index 0000000..1e47724 --- /dev/null +++ b/Legacy/Aria/params/p3dx-sh.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3dx-sh ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -160 ; x location of gps receiver antenna on robot, mm +GPSPY 120 ; y location of gps receiver antenna on robot, mm +GPSType novatel ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 21 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/p3dx.p b/Legacy/Aria/params/p3dx.p new file mode 100644 index 0000000..728f943 --- /dev/null +++ b/Legacy/Aria/params/p3dx.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass p3dx ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 18 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/patrolbot-sh.p b/Legacy/Aria/params/patrolbot-sh.p new file mode 100644 index 0000000..c5c3373 --- /dev/null +++ b/Legacy/Aria/params/patrolbot-sh.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass patrolbot-sh ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 510.00000 ; length in mm of the whole robot +RobotLengthFront 255.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 255.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 6 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 6 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 83 229 90 0 0 0 0 0 0 +SonarUnit 1 169 202 55 0 0 0 0 0 0 +SonarUnit 2 232 134 30 0 0 0 0 0 0 +SonarUnit 3 263 46 10 0 0 0 0 0 0 +SonarUnit 4 263 -46 -10 0 0 0 0 0 0 +SonarUnit 5 232 -134 -30 0 0 0 0 0 0 +SonarUnit 6 169 -202 -55 0 0 0 0 0 0 +SonarUnit 7 83 -229 -90 0 0 0 0 0 0 +SonarUnit 8 -83 -229 -90 0 0 0 0 0 0 +SonarUnit 9 -169 -202 -125 0 0 0 0 0 0 +SonarUnit 10 -232 -134 -150 0 0 0 0 0 0 +SonarUnit 11 -263 -46 -170 0 0 0 0 0 0 +SonarUnit 12 -263 46 170 0 0 0 0 0 0 +SonarUnit 13 -232 134 150 0 0 0 0 0 0 +SonarUnit 14 -169 202 125 0 0 0 0 0 0 +SonarUnit 15 -83 229 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 37 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore -76--72 72-76 ; Angles (in deg) at which to ignore readings, +/1 + ; one degree. Angles are entered as strings, separated + ; by a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 200 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_2 is upside-down. +LaserType urg ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM5 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees -55 ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees 55 ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement 1.0 ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/peoplebot-sh-lms1xx.p b/Legacy/Aria/params/peoplebot-sh-lms1xx.p new file mode 100644 index 0000000..e28f1a4 --- /dev/null +++ b/Legacy/Aria/params/peoplebot-sh-lms1xx.p @@ -0,0 +1,544 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass peoplebot-sh-lms1xx ; specific type of robot +RobotRadius 340.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 513.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR true ; if robot has upwards facing table sensing IR +NewTableSensingIR true ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 4 ; number of IRs on the robot +; IRUnit +IRUnit 0 1 2 333 -233 +IRUnit 1 1 2 333 233 +IRUnit 2 1 2 -2 -116 +IRUnit 3 1 2 -2 116 + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 +SonarUnit 16 -20 136 90 0 0 0 0 0 0 +SonarUnit 17 24 119 50 0 0 0 0 0 0 +SonarUnit 18 58 78 30 0 0 0 0 0 0 +SonarUnit 19 77 27 10 0 0 0 0 0 0 +SonarUnit 20 77 -27 -10 0 0 0 0 0 0 +SonarUnit 21 58 -78 -30 0 0 0 0 0 0 +SonarUnit 22 24 -119 -50 0 0 0 0 0 0 +SonarUnit 23 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 24 -191 -136 -90 0 0 0 0 0 0 +SonarUnit 25 -237 -119 -130 0 0 0 0 0 0 +SonarUnit 26 -271 -78 -150 0 0 0 0 0 0 +SonarUnit 27 -290 -27 -170 0 0 0 0 0 0 +SonarUnit 28 -290 27 170 0 0 0 0 0 0 +SonarUnit 29 -271 78 150 0 0 0 0 0 0 +SonarUnit 30 -237 119 130 0 0 0 0 0 0 +SonarUnit 31 -191 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 55 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms1XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted true ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted true ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/peoplebot-sh-lms500.p b/Legacy/Aria/params/peoplebot-sh-lms500.p new file mode 100644 index 0000000..3852694 --- /dev/null +++ b/Legacy/Aria/params/peoplebot-sh-lms500.p @@ -0,0 +1,544 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass peoplebot-sh-lms500 ; specific type of robot +RobotRadius 340.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 513.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR true ; if robot has upwards facing table sensing IR +NewTableSensingIR true ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 4 ; number of IRs on the robot +; IRUnit +IRUnit 0 1 2 333 -233 +IRUnit 1 1 2 333 233 +IRUnit 2 1 2 -2 -116 +IRUnit 3 1 2 -2 116 + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 +SonarUnit 16 -20 136 90 0 0 0 0 0 0 +SonarUnit 17 24 119 50 0 0 0 0 0 0 +SonarUnit 18 58 78 30 0 0 0 0 0 0 +SonarUnit 19 77 27 10 0 0 0 0 0 0 +SonarUnit 20 77 -27 -10 0 0 0 0 0 0 +SonarUnit 21 58 -78 -30 0 0 0 0 0 0 +SonarUnit 22 24 -119 -50 0 0 0 0 0 0 +SonarUnit 23 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 24 -191 -136 -90 0 0 0 0 0 0 +SonarUnit 25 -237 -119 -130 0 0 0 0 0 0 +SonarUnit 26 -271 -78 -150 0 0 0 0 0 0 +SonarUnit 27 -290 -27 -170 0 0 0 0 0 0 +SonarUnit 28 -290 27 170 0 0 0 0 0 0 +SonarUnit 29 -271 78 150 0 0 0 0 0 0 +SonarUnit 30 -237 119 130 0 0 0 0 0 0 +SonarUnit 31 -191 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 21 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms5XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted true ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted true ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/peoplebot-sh.p b/Legacy/Aria/params/peoplebot-sh.p new file mode 100644 index 0000000..72f8996 --- /dev/null +++ b/Legacy/Aria/params/peoplebot-sh.p @@ -0,0 +1,544 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass peoplebot-sh ; specific type of robot +RobotRadius 340.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 513.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR true ; if robot has upwards facing table sensing IR +NewTableSensingIR true ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 4 ; number of IRs on the robot +; IRUnit +IRUnit 0 1 2 333 -233 +IRUnit 1 1 2 333 233 +IRUnit 2 1 2 -2 -116 +IRUnit 3 1 2 -2 116 + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 9 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 10 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 11 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 12 -255 27 170 0 0 0 0 0 0 +SonarUnit 13 -237 78 150 0 0 0 0 0 0 +SonarUnit 14 -203 119 130 0 0 0 0 0 0 +SonarUnit 15 -157 136 90 0 0 0 0 0 0 +SonarUnit 16 -20 136 90 0 0 0 0 0 0 +SonarUnit 17 24 119 50 0 0 0 0 0 0 +SonarUnit 18 58 78 30 0 0 0 0 0 0 +SonarUnit 19 77 27 10 0 0 0 0 0 0 +SonarUnit 20 77 -27 -10 0 0 0 0 0 0 +SonarUnit 21 58 -78 -30 0 0 0 0 0 0 +SonarUnit 22 24 -119 -50 0 0 0 0 0 0 +SonarUnit 23 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 24 -191 -136 -90 0 0 0 0 0 0 +SonarUnit 25 -237 -119 -130 0 0 0 0 0 0 +SonarUnit 26 -271 -78 -150 0 0 0 0 0 0 +SonarUnit 27 -290 -27 -170 0 0 0 0 0 0 +SonarUnit 28 -290 27 170 0 0 0 0 0 0 +SonarUnit 29 -271 78 150 0 0 0 0 0 0 +SonarUnit 30 -237 119 130 0 0 0 0 0 0 +SonarUnit 31 -191 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 21 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted true ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted true ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/perfpb+.p b/Legacy/Aria/params/perfpb+.p new file mode 100644 index 0000000..be719a0 --- /dev/null +++ b/Legacy/Aria/params/perfpb+.p @@ -0,0 +1,544 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass perfpb+ ; specific type of robot +RobotRadius 340.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 511.00000 ; length in mm of the whole robot +RobotLengthFront 210.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 301.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR true ; if robot has upwards facing table sensing IR +NewTableSensingIR true ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 4 ; number of IRs on the robot +; IRUnit +IRUnit 0 1 2 333 -233 +IRUnit 1 1 2 333 233 +IRUnit 2 1 2 -2 -116 +IRUnit 3 1 2 -2 116 + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -20 136 90 0 0 0 0 0 0 +SonarUnit 9 24 119 50 0 0 0 0 0 0 +SonarUnit 10 58 78 30 0 0 0 0 0 0 +SonarUnit 11 77 27 10 0 0 0 0 0 0 +SonarUnit 12 77 -27 -10 0 0 0 0 0 0 +SonarUnit 13 58 -78 -30 0 0 0 0 0 0 +SonarUnit 14 24 -119 -50 0 0 0 0 0 0 +SonarUnit 15 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 16 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 17 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 18 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 19 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 20 -255 27 170 0 0 0 0 0 0 +SonarUnit 21 -237 78 150 0 0 0 0 0 0 +SonarUnit 22 -203 119 130 0 0 0 0 0 0 +SonarUnit 23 -157 136 90 0 0 0 0 0 0 +SonarUnit 24 -191 -136 -90 0 0 0 0 0 0 +SonarUnit 25 -237 -119 -130 0 0 0 0 0 0 +SonarUnit 26 -271 -78 -150 0 0 0 0 0 0 +SonarUnit 27 -290 -27 -170 0 0 0 0 0 0 +SonarUnit 28 -290 27 170 0 0 0 0 0 0 +SonarUnit 29 -271 78 150 0 0 0 0 0 0 +SonarUnit 30 -237 119 130 0 0 0 0 0 0 +SonarUnit 31 -191 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 21 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/perfpb.p b/Legacy/Aria/params/perfpb.p new file mode 100644 index 0000000..6467164 --- /dev/null +++ b/Legacy/Aria/params/perfpb.p @@ -0,0 +1,544 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass perfpb ; specific type of robot +RobotRadius 340.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 513.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.48500 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00600 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR true ; if robot has upwards facing table sensing IR +NewTableSensingIR true ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 4 ; number of IRs on the robot +; IRUnit +IRUnit 0 1 2 333 -233 +IRUnit 1 1 2 333 233 +IRUnit 2 1 2 -2 -116 +IRUnit 3 1 2 -2 116 + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 69 136 90 0 0 0 0 0 0 +SonarUnit 1 114 119 50 0 0 0 0 0 0 +SonarUnit 2 148 78 30 0 0 0 0 0 0 +SonarUnit 3 166 27 10 0 0 0 0 0 0 +SonarUnit 4 166 -27 -10 0 0 0 0 0 0 +SonarUnit 5 148 -78 -30 0 0 0 0 0 0 +SonarUnit 6 114 -119 -50 0 0 0 0 0 0 +SonarUnit 7 69 -136 -90 0 0 0 0 0 0 +SonarUnit 8 -20 136 90 0 0 0 0 0 0 +SonarUnit 9 24 119 50 0 0 0 0 0 0 +SonarUnit 10 58 78 30 0 0 0 0 0 0 +SonarUnit 11 77 27 10 0 0 0 0 0 0 +SonarUnit 12 77 -27 -10 0 0 0 0 0 0 +SonarUnit 13 58 -78 -30 0 0 0 0 0 0 +SonarUnit 14 24 -119 -50 0 0 0 0 0 0 +SonarUnit 15 -20 -136 -90 0 0 0 0 0 0 +SonarUnit 16 -157 -136 -90 0 0 0 0 0 0 +SonarUnit 17 -203 -119 -130 0 0 0 0 0 0 +SonarUnit 18 -237 -78 -150 0 0 0 0 0 0 +SonarUnit 19 -255 -27 -170 0 0 0 0 0 0 +SonarUnit 20 -255 27 170 0 0 0 0 0 0 +SonarUnit 21 -237 78 150 0 0 0 0 0 0 +SonarUnit 22 -203 119 130 0 0 0 0 0 0 +SonarUnit 23 -157 136 90 0 0 0 0 0 0 +SonarUnit 24 -191 -136 -90 0 0 0 0 0 0 +SonarUnit 25 -237 -119 -130 0 0 0 0 0 0 +SonarUnit 26 -271 -78 -150 0 0 0 0 0 0 +SonarUnit 27 -290 -27 -170 0 0 0 0 0 0 +SonarUnit 28 -290 27 170 0 0 0 0 0 0 +SonarUnit 29 -271 78 150 0 0 0 0 0 0 +SonarUnit 30 -237 119 130 0 0 0 0 0 0 +SonarUnit 31 -191 136 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 21 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType sony ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/pion1m.p b/Legacy/Aria/params/pion1m.p new file mode 100644 index 0000000..bef905b --- /dev/null +++ b/Legacy/Aria/params/pion1m.p @@ -0,0 +1,515 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass pion1m ; specific type of robot +RobotRadius 220.00000 ; radius in mm +RobotDiagonal 90.00000 ; half-height to diagonal of octagon +RobotWidth 400.00000 ; width in mm +RobotLength 500.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 100 ; absolute maximum degrees / sec +MaxVelocity 400 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 0 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00614 ; radians per angular unit (2PI/4096) +DistConvFactor 0.05066 ; multiplier to mm from robot units +VelConvFactor 2.53320 ; multiplier to mm/sec from robot units +RangeConvFactor 0.17340 ; multiplier to mm from sonar units +DiffConvFactor 0.00333 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 4.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 0 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 400 ; maximum desired translational velocity for the robot +RotVelMax 100 ; maximum desired rotational velocity for the robot +SettableAccsDecs false ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 7 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 100 100 90 0 0 0 0 0 0 +SonarUnit 1 120 80 30 0 0 0 0 0 0 +SonarUnit 2 130 40 15 0 0 0 0 0 0 +SonarUnit 3 130 0 0 0 0 0 0 0 0 +SonarUnit 4 130 -40 -15 0 0 0 0 0 0 +SonarUnit 5 120 -80 -30 0 0 0 0 0 0 +SonarUnit 6 100 -100 -90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/pion1x.p b/Legacy/Aria/params/pion1x.p new file mode 100644 index 0000000..9fc32b4 --- /dev/null +++ b/Legacy/Aria/params/pion1x.p @@ -0,0 +1,515 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass pion1x ; specific type of robot +RobotRadius 220.00000 ; radius in mm +RobotDiagonal 90.00000 ; half-height to diagonal of octagon +RobotWidth 400.00000 ; width in mm +RobotLength 500.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 100 ; absolute maximum degrees / sec +MaxVelocity 400 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 0 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00614 ; radians per angular unit (2PI/4096) +DistConvFactor 0.05066 ; multiplier to mm from robot units +VelConvFactor 2.53320 ; multiplier to mm/sec from robot units +RangeConvFactor 0.17340 ; multiplier to mm from sonar units +DiffConvFactor 0.00333 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 4.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 0 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 400 ; maximum desired translational velocity for the robot +RotVelMax 100 ; maximum desired rotational velocity for the robot +SettableAccsDecs false ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 7 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 100 100 90 0 0 0 0 0 0 +SonarUnit 1 120 80 30 0 0 0 0 0 0 +SonarUnit 2 130 40 15 0 0 0 0 0 0 +SonarUnit 3 130 0 0 0 0 0 0 0 0 +SonarUnit 4 130 -40 -15 0 0 0 0 0 0 +SonarUnit 5 120 -80 -30 0 0 0 0 0 0 +SonarUnit 6 100 -100 -90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/pionat.p b/Legacy/Aria/params/pionat.p new file mode 100644 index 0000000..3e177fe --- /dev/null +++ b/Legacy/Aria/params/pionat.p @@ -0,0 +1,515 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass pionat ; specific type of robot +RobotRadius 330.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 400.00000 ; width in mm +RobotLength 500.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 100 ; absolute maximum degrees / sec +MaxVelocity 500 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 0 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00614 ; radians per angular unit (2PI/4096) +DistConvFactor 0.07000 ; multiplier to mm from robot units +VelConvFactor 2.53320 ; multiplier to mm/sec from robot units +RangeConvFactor 0.17340 ; multiplier to mm from sonar units +DiffConvFactor 0.00333 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 4.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 0 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 400 ; maximum desired translational velocity for the robot +RotVelMax 100 ; maximum desired rotational velocity for the robot +SettableAccsDecs false ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 7 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 100 100 90 0 0 0 0 0 0 +SonarUnit 1 120 80 30 0 0 0 0 0 0 +SonarUnit 2 130 40 15 0 0 0 0 0 0 +SonarUnit 3 130 0 0 0 0 0 0 0 0 +SonarUnit 4 130 -40 -15 0 0 0 0 0 0 +SonarUnit 5 120 -80 -30 0 0 0 0 0 0 +SonarUnit 6 100 -100 -90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/pioneer-lx.p b/Legacy/Aria/params/pioneer-lx.p new file mode 100644 index 0000000..c64c123 --- /dev/null +++ b/Legacy/Aria/params/pioneer-lx.p @@ -0,0 +1,516 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class MTX ; general type of robot +Subclass pioneer-lx ; specific type of robot +RobotRadius 348.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 500.00000 ; width in mm +RobotLength 696.00000 ; length in mm of the whole robot +RobotLengthFront 348.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 348.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 180 ; absolute maximum degrees / sec +MaxVelocity 2500 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 4 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 8 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 324 90 16 0 0 0 0 0 0 +SonarUnit 1 331 607 10 0 0 0 0 0 0 +SonarUnit 2 331 -607 -10 0 0 0 0 0 0 +SonarUnit 3 324 -90 -16 0 0 0 0 0 0 +SonarUnit 4 -316 -90 -164 0 0 0 0 0 0 +SonarUnit 5 -325 -30 -175 0 0 0 0 0 0 +SonarUnit 6 -325 30 175 0 0 0 0 0 0 +SonarUnit 7 -316 90 164 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect true ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType mtx ; Type of the sonar board. +SonarBoardPortType serial422 ; Port type that the sonar is on. +SonarBoardPort /dev/ttyUSB2 ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 115200 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect true ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 267 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 190 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore -135--120 120-135 ; Angles (in deg) at which to ignore readings, + ; +/1 one degree. Angles are entered as strings, + ; separated by a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType s3series ; Type of laser. +LaserPortType serial422 ; Type of port the laser is on. +LaserPort /dev/ttyUSB4 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice 230400 ; StartingBaud for this laser. Leave blank to + ; use the default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect true ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType mtx ; Type of battery. +BatteryPortType serial ; Port type that the battery is on. +BatteryPort /dev/ttyUSB1 ; Port the battery is on. +BatteryBaud 115200 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect true ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType mtx ; Type of LCD. +LCDPortType serial422 ; Port type that the LCD is on. +LCDPort /dev/ttyUSB8 ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 115200 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/powerbot-sh-lms500.p b/Legacy/Aria/params/powerbot-sh-lms500.p new file mode 100644 index 0000000..9f8bc54 --- /dev/null +++ b/Legacy/Aria/params/powerbot-sh-lms500.p @@ -0,0 +1,540 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass powerbot-sh-lms500 ; specific type of robot +RobotRadius 550.00000 ; radius in mm +RobotDiagonal 240.00000 ; half-height to diagonal of octagon +RobotWidth 680.00000 ; width in mm +RobotLength 911.00000 ; length in mm of the whole robot +RobotLengthFront 369.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 542.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 360 ; absolute maximum degrees / sec +MaxVelocity 2000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00373 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 7 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM3 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 152 278 90 0 0 0 0 0 0 +SonarUnit 1 200 267 65 0 0 0 0 0 0 +SonarUnit 2 241 238 45 0 0 0 0 0 0 +SonarUnit 3 274 200 35 0 0 0 0 0 0 +SonarUnit 4 300 153 25 0 0 0 0 0 0 +SonarUnit 5 320 96 15 0 0 0 0 0 0 +SonarUnit 6 332 33 5 0 0 0 0 0 0 +SonarUnit 7 0 0 -180 0 0 0 0 0 0 +SonarUnit 8 332 -33 -5 0 0 0 0 0 0 +SonarUnit 9 320 -96 -15 0 0 0 0 0 0 +SonarUnit 10 300 -153 -25 0 0 0 0 0 0 +SonarUnit 11 274 -200 -35 0 0 0 0 0 0 +SonarUnit 12 241 -238 -45 0 0 0 0 0 0 +SonarUnit 13 200 -267 -65 0 0 0 0 0 0 +SonarUnit 14 152 -278 -90 0 0 0 0 0 0 +SonarUnit 15 0 0 -180 0 0 0 0 0 0 +SonarUnit 16 -298 -278 -90 0 0 0 0 0 0 +SonarUnit 17 -347 -267 -115 0 0 0 0 0 0 +SonarUnit 18 -388 -238 -135 0 0 0 0 0 0 +SonarUnit 19 -420 -200 -145 0 0 0 0 0 0 +SonarUnit 20 -447 -153 -155 0 0 0 0 0 0 +SonarUnit 21 -467 -96 -165 0 0 0 0 0 0 +SonarUnit 22 -478 -33 -175 0 0 0 0 0 0 +SonarUnit 23 0 0 -180 0 0 0 0 0 0 +SonarUnit 24 -478 33 175 0 0 0 0 0 0 +SonarUnit 25 -467 96 165 0 0 0 0 0 0 +SonarUnit 26 -447 153 155 0 0 0 0 0 0 +SonarUnit 27 -420 200 145 0 0 0 0 0 0 +SonarUnit 28 -388 238 135 0 0 0 0 0 0 +SonarUnit 29 -347 267 115 0 0 0 0 0 0 +SonarUnit 30 -298 278 90 0 0 0 0 0 0 +SonarUnit 31 0 0 -180 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 251 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms5XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/powerbot-sh-uarcs.p b/Legacy/Aria/params/powerbot-sh-uarcs.p new file mode 100644 index 0000000..f2aec64 --- /dev/null +++ b/Legacy/Aria/params/powerbot-sh-uarcs.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass powerbot-sh-uarcs ; specific type of robot +RobotRadius 550.00000 ; radius in mm +RobotDiagonal 240.00000 ; half-height to diagonal of octagon +RobotWidth 680.00000 ; width in mm +RobotLength 911.00000 ; length in mm of the whole robot +RobotLengthFront 369.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 542.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 360 ; absolute maximum degrees / sec +MaxVelocity 2000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00373 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 7 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM3 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 -298 -278 -90 0 0 0 0 0 0 +SonarUnit 1 -347 -267 -115 0 0 0 0 0 0 +SonarUnit 2 -388 -238 -135 0 0 0 0 0 0 +SonarUnit 3 -420 -200 -145 0 0 0 0 0 0 +SonarUnit 4 -447 -153 -155 0 0 0 0 0 0 +SonarUnit 5 -467 -96 -165 0 0 0 0 0 0 +SonarUnit 6 -478 -33 -175 0 0 0 0 0 0 +SonarUnit 7 0 0 -180 0 0 0 0 0 0 +SonarUnit 8 -478 33 175 0 0 0 0 0 0 +SonarUnit 9 -467 96 165 0 0 0 0 0 0 +SonarUnit 10 -447 153 155 0 0 0 0 0 0 +SonarUnit 11 -420 200 145 0 0 0 0 0 0 +SonarUnit 12 -388 238 135 0 0 0 0 0 0 +SonarUnit 13 -347 267 115 0 0 0 0 0 0 +SonarUnit 14 -298 278 90 0 0 0 0 0 0 +SonarUnit 15 0 0 -180 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 251 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM2 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/powerbot-sh.p b/Legacy/Aria/params/powerbot-sh.p new file mode 100644 index 0000000..9c1687a --- /dev/null +++ b/Legacy/Aria/params/powerbot-sh.p @@ -0,0 +1,540 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass powerbot-sh ; specific type of robot +RobotRadius 550.00000 ; radius in mm +RobotDiagonal 240.00000 ; half-height to diagonal of octagon +RobotWidth 680.00000 ; width in mm +RobotLength 911.00000 ; length in mm of the whole robot +RobotLengthFront 369.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 542.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 360 ; absolute maximum degrees / sec +MaxVelocity 2000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00373 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 7 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM3 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 152 278 90 0 0 0 0 0 0 +SonarUnit 1 200 267 65 0 0 0 0 0 0 +SonarUnit 2 241 238 45 0 0 0 0 0 0 +SonarUnit 3 274 200 35 0 0 0 0 0 0 +SonarUnit 4 300 153 25 0 0 0 0 0 0 +SonarUnit 5 320 96 15 0 0 0 0 0 0 +SonarUnit 6 332 33 5 0 0 0 0 0 0 +SonarUnit 7 0 0 -180 0 0 0 0 0 0 +SonarUnit 8 332 -33 -5 0 0 0 0 0 0 +SonarUnit 9 320 -96 -15 0 0 0 0 0 0 +SonarUnit 10 300 -153 -25 0 0 0 0 0 0 +SonarUnit 11 274 -200 -35 0 0 0 0 0 0 +SonarUnit 12 241 -238 -45 0 0 0 0 0 0 +SonarUnit 13 200 -267 -65 0 0 0 0 0 0 +SonarUnit 14 152 -278 -90 0 0 0 0 0 0 +SonarUnit 15 0 0 -180 0 0 0 0 0 0 +SonarUnit 16 -298 -278 -90 0 0 0 0 0 0 +SonarUnit 17 -347 -267 -115 0 0 0 0 0 0 +SonarUnit 18 -388 -238 -135 0 0 0 0 0 0 +SonarUnit 19 -420 -200 -145 0 0 0 0 0 0 +SonarUnit 20 -447 -153 -155 0 0 0 0 0 0 +SonarUnit 21 -467 -96 -165 0 0 0 0 0 0 +SonarUnit 22 -478 -33 -175 0 0 0 0 0 0 +SonarUnit 23 0 0 -180 0 0 0 0 0 0 +SonarUnit 24 -478 33 175 0 0 0 0 0 0 +SonarUnit 25 -467 96 165 0 0 0 0 0 0 +SonarUnit 26 -447 153 155 0 0 0 0 0 0 +SonarUnit 27 -420 200 145 0 0 0 0 0 0 +SonarUnit 28 -388 238 135 0 0 0 0 0 0 +SonarUnit 29 -347 267 115 0 0 0 0 0 0 +SonarUnit 30 -298 278 90 0 0 0 0 0 0 +SonarUnit 31 0 0 -180 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 251 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM2 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/powerbot.p b/Legacy/Aria/params/powerbot.p new file mode 100644 index 0000000..d1c5d6b --- /dev/null +++ b/Legacy/Aria/params/powerbot.p @@ -0,0 +1,539 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass powerbot ; specific type of robot +RobotRadius 550.00000 ; radius in mm +RobotDiagonal 240.00000 ; half-height to diagonal of octagon +RobotWidth 680.00000 ; width in mm +RobotLength 911.00000 ; length in mm of the whole robot +RobotLengthFront 369.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 542.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 360 ; absolute maximum degrees / sec +MaxVelocity 2000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 0.58130 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00373 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 7 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 5 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM3 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 32 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 152 278 90 0 0 0 0 0 0 +SonarUnit 1 200 267 65 0 0 0 0 0 0 +SonarUnit 2 241 238 45 0 0 0 0 0 0 +SonarUnit 3 274 200 35 0 0 0 0 0 0 +SonarUnit 4 300 153 25 0 0 0 0 0 0 +SonarUnit 5 320 96 15 0 0 0 0 0 0 +SonarUnit 6 332 33 5 0 0 0 0 0 0 +SonarUnit 7 0 0 -180 0 0 0 0 0 0 +SonarUnit 8 332 -33 -5 0 0 0 0 0 0 +SonarUnit 9 320 -96 -15 0 0 0 0 0 0 +SonarUnit 10 300 -153 -25 0 0 0 0 0 0 +SonarUnit 11 274 -200 -35 0 0 0 0 0 0 +SonarUnit 12 241 -238 -45 0 0 0 0 0 0 +SonarUnit 13 200 -267 -65 0 0 0 0 0 0 +SonarUnit 14 152 -278 -90 0 0 0 0 0 0 +SonarUnit 15 0 0 -180 0 0 0 0 0 0 +SonarUnit 16 -298 -278 -90 0 0 0 0 0 0 +SonarUnit 17 -347 -267 -115 0 0 0 0 0 0 +SonarUnit 18 -388 -238 -135 0 0 0 0 0 0 +SonarUnit 19 -420 -200 -145 0 0 0 0 0 0 +SonarUnit 20 -447 -153 -155 0 0 0 0 0 0 +SonarUnit 21 -467 -96 -165 0 0 0 0 0 0 +SonarUnit 22 -478 -33 -175 0 0 0 0 0 0 +SonarUnit 23 0 0 -180 0 0 0 0 0 0 +SonarUnit 24 -478 33 175 0 0 0 0 0 0 +SonarUnit 25 -467 96 165 0 0 0 0 0 0 +SonarUnit 26 -447 153 155 0 0 0 0 0 0 +SonarUnit 27 -420 200 145 0 0 0 0 0 0 +SonarUnit 28 -388 238 135 0 0 0 0 0 0 +SonarUnit 29 -347 267 115 0 0 0 0 0 0 +SonarUnit 30 -298 278 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 251 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM2 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vcc4 ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort 1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/psos1m.p b/Legacy/Aria/params/psos1m.p new file mode 100644 index 0000000..7c1fc28 --- /dev/null +++ b/Legacy/Aria/params/psos1m.p @@ -0,0 +1,515 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass psos1m ; specific type of robot +RobotRadius 220.00000 ; radius in mm +RobotDiagonal 90.00000 ; half-height to diagonal of octagon +RobotWidth 400.00000 ; width in mm +RobotLength 500.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 100 ; absolute maximum degrees / sec +MaxVelocity 400 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 0 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00614 ; radians per angular unit (2PI/4096) +DistConvFactor 0.05066 ; multiplier to mm from robot units +VelConvFactor 2.53320 ; multiplier to mm/sec from robot units +RangeConvFactor 0.17340 ; multiplier to mm from sonar units +DiffConvFactor 0.00333 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 4.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 0 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 400 ; maximum desired translational velocity for the robot +RotVelMax 100 ; maximum desired rotational velocity for the robot +SettableAccsDecs false ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 7 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 100 100 90 0 0 0 0 0 0 +SonarUnit 1 120 80 30 0 0 0 0 0 0 +SonarUnit 2 130 40 15 0 0 0 0 0 0 +SonarUnit 3 130 0 0 0 0 0 0 0 0 +SonarUnit 4 130 -40 -15 0 0 0 0 0 0 +SonarUnit 5 120 -80 -30 0 0 0 0 0 0 +SonarUnit 6 100 -100 -90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/psos1x.p b/Legacy/Aria/params/psos1x.p new file mode 100644 index 0000000..aa9711d --- /dev/null +++ b/Legacy/Aria/params/psos1x.p @@ -0,0 +1,515 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass psos1x ; specific type of robot +RobotRadius 220.00000 ; radius in mm +RobotDiagonal 90.00000 ; half-height to diagonal of octagon +RobotWidth 400.00000 ; width in mm +RobotLength 500.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 100 ; absolute maximum degrees / sec +MaxVelocity 400 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 0 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00614 ; radians per angular unit (2PI/4096) +DistConvFactor 0.05066 ; multiplier to mm from robot units +VelConvFactor 2.53320 ; multiplier to mm/sec from robot units +RangeConvFactor 0.17340 ; multiplier to mm from sonar units +DiffConvFactor 0.00333 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 4.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 0 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 400 ; maximum desired translational velocity for the robot +RotVelMax 100 ; maximum desired rotational velocity for the robot +SettableAccsDecs false ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 7 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 100 100 90 0 0 0 0 0 0 +SonarUnit 1 120 80 30 0 0 0 0 0 0 +SonarUnit 2 130 40 15 0 0 0 0 0 0 +SonarUnit 3 130 0 0 0 0 0 0 0 0 +SonarUnit 4 130 -40 -15 0 0 0 0 0 0 +SonarUnit 5 120 -80 -30 0 0 0 0 0 0 +SonarUnit 6 100 -100 -90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/psos43m.p b/Legacy/Aria/params/psos43m.p new file mode 100644 index 0000000..37ca0bc --- /dev/null +++ b/Legacy/Aria/params/psos43m.p @@ -0,0 +1,515 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass psos43m ; specific type of robot +RobotRadius 220.00000 ; radius in mm +RobotDiagonal 90.00000 ; half-height to diagonal of octagon +RobotWidth 400.00000 ; width in mm +RobotLength 500.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 100 ; absolute maximum degrees / sec +MaxVelocity 400 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 0 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00614 ; radians per angular unit (2PI/4096) +DistConvFactor 0.05066 ; multiplier to mm from robot units +VelConvFactor 2.53320 ; multiplier to mm/sec from robot units +RangeConvFactor 0.17340 ; multiplier to mm from sonar units +DiffConvFactor 0.00333 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 4.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers false ; if robot has a front bump ring +NumFrontBumpers 0 ; number of front bumpers on the robot +RearBumpers false ; if the robot has a rear bump ring +NumRearBumpers 0 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 400 ; maximum desired translational velocity for the robot +RotVelMax 100 ; maximum desired rotational velocity for the robot +SettableAccsDecs false ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 7 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 100 100 90 0 0 0 0 0 0 +SonarUnit 1 120 80 30 0 0 0 0 0 0 +SonarUnit 2 130 40 15 0 0 0 0 0 0 +SonarUnit 3 130 0 0 0 0 0 0 0 0 +SonarUnit 4 130 -40 -15 0 0 0 0 0 0 +SonarUnit 5 120 -80 -30 0 0 0 0 0 0 +SonarUnit 6 100 -100 -90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/researchPB-lms500.p b/Legacy/Aria/params/researchPB-lms500.p new file mode 100644 index 0000000..31c780d --- /dev/null +++ b/Legacy/Aria/params/researchPB-lms500.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass researchPB-lms500 ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 510.00000 ; length in mm of the whole robot +RobotLengthFront 255.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 255.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 6 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 6 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 83 229 90 0 0 0 0 0 0 +SonarUnit 1 169 202 55 0 0 0 0 0 0 +SonarUnit 2 232 134 30 0 0 0 0 0 0 +SonarUnit 3 263 46 10 0 0 0 0 0 0 +SonarUnit 4 263 -46 -10 0 0 0 0 0 0 +SonarUnit 5 232 -134 -30 0 0 0 0 0 0 +SonarUnit 6 169 -202 -55 0 0 0 0 0 0 +SonarUnit 7 83 -229 -90 0 0 0 0 0 0 +SonarUnit 8 -83 -229 -90 0 0 0 0 0 0 +SonarUnit 9 -169 -202 -125 0 0 0 0 0 0 +SonarUnit 10 -232 -134 -150 0 0 0 0 0 0 +SonarUnit 11 -263 -46 -170 0 0 0 0 0 0 +SonarUnit 12 -263 46 170 0 0 0 0 0 0 +SonarUnit 13 -232 134 150 0 0 0 0 0 0 +SonarUnit 14 -169 202 125 0 0 0 0 0 0 +SonarUnit 15 -83 229 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 37 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore -76--72 72-76 ; Angles (in deg) at which to ignore readings, +/1 + ; one degree. Angles are entered as strings, separated + ; by a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms5XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 200 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_2 is upside-down. +LaserType urg ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM5 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees -55 ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees 55 ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement 1.0 ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/researchPB.p b/Legacy/Aria/params/researchPB.p new file mode 100644 index 0000000..085ae56 --- /dev/null +++ b/Legacy/Aria/params/researchPB.p @@ -0,0 +1,524 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass researchPB ; specific type of robot +RobotRadius 250.00000 ; radius in mm +RobotDiagonal 120.00000 ; half-height to diagonal of octagon +RobotWidth 425.00000 ; width in mm +RobotLength 510.00000 ; length in mm of the whole robot +RobotLengthFront 255.00000 ; length in mm to the front of the robot (if this is + ; 0 (or non existent) this value will be set to half + ; of RobotLength) +RobotLengthRear 255.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 500 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets true ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 6 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 6 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 16 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) +SonarUnit 0 83 229 90 0 0 0 0 0 0 +SonarUnit 1 169 202 55 0 0 0 0 0 0 +SonarUnit 2 232 134 30 0 0 0 0 0 0 +SonarUnit 3 263 46 10 0 0 0 0 0 0 +SonarUnit 4 263 -46 -10 0 0 0 0 0 0 +SonarUnit 5 232 -134 -30 0 0 0 0 0 0 +SonarUnit 6 169 -202 -55 0 0 0 0 0 0 +SonarUnit 7 83 -229 -90 0 0 0 0 0 0 +SonarUnit 8 -83 -229 -90 0 0 0 0 0 0 +SonarUnit 9 -169 -202 -125 0 0 0 0 0 0 +SonarUnit 10 -232 -134 -150 0 0 0 0 0 0 +SonarUnit 11 -263 -46 -170 0 0 0 0 0 0 +SonarUnit 12 -263 46 170 0 0 0 0 0 0 +SonarUnit 13 -232 134 150 0 0 0 0 0 0 +SonarUnit 14 -169 202 125 0 0 0 0 0 0 +SonarUnit 15 -83 229 90 0 0 0 0 0 0 + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 37 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore -76--72 72-76 ; Angles (in deg) at which to ignore readings, +/1 + ; one degree. Angles are entered as strings, separated + ; by a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 200 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_2 is upside-down. +LaserType urg ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM5 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees -55 ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees 55 ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement 1.0 ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType vapix ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType vapix ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/seekur.p b/Legacy/Aria/params/seekur.p new file mode 100644 index 0000000..a1bfc79 --- /dev/null +++ b/Legacy/Aria/params/seekur.p @@ -0,0 +1,508 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass seekur ; specific type of robot +RobotRadius 833.00000 ; radius in mm +RobotDiagonal 400.00000 ; half-height to diagonal of octagon +RobotWidth 1270.00000 ; width in mm +RobotLength 1410.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 190 ; absolute maximum degrees / sec +MaxVelocity 2200 ; absolute maximum mm / sec +MaxLatVelocity 2200 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 5 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 3 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel true ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX -200 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType trimble ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 38400 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 0 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 690 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM3 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType rvision ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/seekurjr.p b/Legacy/Aria/params/seekurjr.p new file mode 100644 index 0000000..e082704 --- /dev/null +++ b/Legacy/Aria/params/seekurjr.p @@ -0,0 +1,508 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass seekurjr ; specific type of robot +RobotRadius 600.00000 ; radius in mm +RobotDiagonal 600.00000 ; half-height to diagonal of octagon +RobotWidth 830.00000 ; width in mm +RobotLength 1200.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 80 ; absolute maximum degrees / sec +MaxVelocity 1200 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand false ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00560 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 4 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 4 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes true ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType trimble ; type of gps receiver (trimble, novatel, standard) +GPSPort COM2 ; port the gps is on +GPSBaud 38400 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 0 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX 527 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_1 is upside-down. +LaserType lms1XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.1 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees -117 ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees 117 ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX -527 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType lms1XX ; Type of laser. +LaserPortType tcp ; Type of port the laser is on. +LaserPort 192.168.0.2 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled false ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees -117 ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees 117 ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect true ; If true, connect to this PTZ by default. +PTZType rvision ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect true ; If true, connect to this device by default. +VideoType v4l ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/params/wheelchair-sh.p b/Legacy/Aria/params/wheelchair-sh.p new file mode 100644 index 0000000..87a6114 --- /dev/null +++ b/Legacy/Aria/params/wheelchair-sh.p @@ -0,0 +1,508 @@ +ConfigVersion 2.0 +;SectionFlags for : +; Robot parameter file + +Section General settings +;SectionFlags for General settings: +Class Pioneer ; general type of robot +Subclass wheelchair-sh ; specific type of robot +RobotRadius 550.00000 ; radius in mm +RobotDiagonal 300.00000 ; half-height to diagonal of octagon +RobotWidth 680.00000 ; width in mm +RobotLength 1340.00000 ; length in mm of the whole robot +RobotLengthFront 0.00000 ; length in mm to the front of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +RobotLengthRear 0.00000 ; length in mm to the rear of the robot (if this is 0 + ; (or non existent) this value will be set to half of + ; RobotLength) +Holonomic true ; turns in own radius +MaxRVelocity 360 ; absolute maximum degrees / sec +MaxVelocity 2000 ; absolute maximum mm / sec +MaxLatVelocity 0 ; absolute lateral maximum mm / sec +HasMoveCommand true ; has built in move command +RequestIOPackets false ; automatically request IO packets +RequestEncoderPackets false ; automatically request encoder packets +SwitchToBaudRate 38400 ; switch to this baud if non-0 and supported on robot + +Section Conversion factors +;SectionFlags for Conversion factors: +AngleConvFactor 0.00153 ; radians per angular unit (2PI/4096) +DistConvFactor 1.00000 ; multiplier to mm from robot units +VelConvFactor 1.00000 ; multiplier to mm/sec from robot units +RangeConvFactor 1.00000 ; multiplier to mm from sonar units +DiffConvFactor 0.00373 ; ratio of angular velocity to wheel velocity (unused + ; in newer firmware that calculates and returns this) +Vel2Divisor 20.00000 ; divisor for VEL2 commands +GyroScaler 1.62600 ; Scaling factor for gyro readings + +Section Accessories the robot has +;SectionFlags for Accessories the robot has: +TableSensingIR false ; if robot has upwards facing table sensing IR +NewTableSensingIR false ; if table sensing IR are sent in IO packet +FrontBumpers true ; if robot has a front bump ring +NumFrontBumpers 4 ; number of front bumpers on the robot +RearBumpers true ; if the robot has a rear bump ring +NumRearBumpers 3 ; number of rear bumpers on the robot + +Section IR parameters +;SectionFlags for IR parameters: +IRNum 0 ; number of IRs on the robot +; IRUnit + +Section Movement control parameters +; if these are 0 the parameters from robot flash will be used, otherwise these +; values will be used +;SectionFlags for Movement control parameters: +SettableVelMaxes false ; if TransVelMax and RotVelMax can be set +TransVelMax 0 ; maximum desired translational velocity for the robot +RotVelMax 0 ; maximum desired rotational velocity for the robot +SettableAccsDecs true ; if the accel and decel parameters can be set +TransAccel 0 ; translational acceleration +TransDecel 0 ; translational deceleration +RotAccel 0 ; rotational acceleration +RotDecel 0 ; rotational deceleration +HasLatVel false ; if the robot has lateral velocity +LatVelMax 0 ; maximum desired lateral velocity for the robot +LatAccel 0 ; lateral acceleration +LatDecel 0 ; lateral deceleration + +Section GPS parameters +;SectionFlags for GPS parameters: +GPSPX 0 ; x location of gps receiver antenna on robot, mm +GPSPY 0 ; y location of gps receiver antenna on robot, mm +GPSType standard ; type of gps receiver (trimble, novatel, standard) +GPSPort COM3 ; port the gps is on +GPSBaud 9600 ; gps baud rate (9600, 19200, 38400, etc.) + +Section Compass parameters +;SectionFlags for Compass parameters: +CompassType robot ; type of compass: robot (typical configuration), or + ; serialTCM (computer serial port) +CompassPort ; serial port name, if CompassType is serialTCM + +Section Sonar parameters +;SectionFlags for Sonar parameters: +SonarNum 0 ; Number of sonars on the robot. +; SonarUnit (for MTX sonar there is also ) + +Section SonarBoard_1 +; Information about the connection to this Sonar Board. +;SectionFlags for SonarBoard_1: +SonarAutoConnect false ; SonarBoard_1 exists and should be automatically + ; connected at startup. +SonarBoardType ; Type of the sonar board. +SonarBoardPortType ; Port type that the sonar is on. +SonarBoardPort ; Port the sonar is on. +SonarBoardPowerOutput ; Power output that controls this Sonar Board's power. +SonarBaud 0 ; Baud rate for the sonar board communication. (9600, + ; 19200, 38400, etc.). +SonarDelay 2 ; range [0, 10], Sonar delay (in ms). +SonarGain 10 ; range [0, 31], Default sonar gain for the board, + ; range 0-31. +SonarDetectionThreshold 25 ; range [0, 65535], Default sonar detection + ; threshold for the board. +SonarMaxRange 4335 ; range [0, 4335], Default maximum sonar range for + ; the board. + +Section Laser parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser parameters: +LaserAutoConnect false ; Laser_1 exists and should be automatically connected + ; at startup. +LaserX -418 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped true ; Laser_1 is upside-down. +LaserType lms2xx ; Type of laser. +LaserPortType serial ; Type of port the laser is on. +LaserPort COM2 ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Laser 2 parameters +; Information about the connection to this laser and its position on the +; vehicle. +;SectionFlags for Laser 2 parameters: +LaserAutoConnect false ; Laser_2 exists and should be automatically connected + ; at startup. +LaserX 0 ; Location (in mm) of the laser in X (+ front, - back) + ; relative to the robot's idealized center of + ; rotation. +LaserY 0 ; Location (in mm) of the laser in Y (+ left, - right) + ; relative to the robot's idealized center of + ; rotation. +LaserTh 0.00000 ; range [-180, 180], Rotation (in deg) of the laser + ; (+ counterclockwise, - clockwise). +LaserZ 0 ; minimum 0, Height (in mm) of the laser from the + ; ground. 0 means unknown. +LaserIgnore ; Angles (in deg) at which to ignore readings, +/1 one + ; degree. Angles are entered as strings, separated by + ; a space. +LaserFlipped false ; Laser_2 is upside-down. +LaserType ; Type of laser. +LaserPortType ; Type of port the laser is on. +LaserPort ; Port the laser is on. +LaserPowerOutput ; Power output that controls this laser's power. +LaserStartingBaudChoice ; StartingBaud for this laser. Leave blank to use the + ; default. +LaserAutoBaudChoice ; AutoBaud for this laser. Leave blank to use the + ; default. +LaserPowerControlled true ; When enabled (true), this indicates that the power + ; to the laser is controlled by the serial port line. +LaserMaxRange 0 ; Maximum range (in mm) to use for the laser. This + ; should be specified only when the range needs to be + ; shortened. 0 to use the default range. +LaserCumulativeBufferSize 0 ; Cumulative buffer size to use for the laser. 0 to + ; use the default. +LaserStartDegrees ; Start angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degrees are + ; permitted. Leave blank to use the default. +LaserEndDegrees ; End angle (in deg) for the laser. This may be used + ; to constrain the angle. Fractional degreees are + ; permitted. Leave blank to use the default. +LaserDegreesChoice ; Degrees choice for the laser. This may be used to + ; constrain the range. Leave blank to use the default. +LaserIncrement ; Increment (in deg) for the laser. Fractional degrees + ; are permitted. Leave blank to use the default. +LaserIncrementChoice ; Increment choice for the laser. This may be used to + ; increase the increment. Leave blank to use the + ; default. +LaserUnitsChoice ; Units for the laser. This may be used to increase + ; the size of the units. Leave blank to use the + ; default. +LaserReflectorBitsChoice ; ReflectorBits for the laser. Leave blank to use the + ; default. + +Section Battery_1 +; Information about the connection to this battery. +;SectionFlags for Battery_1: +BatteryAutoConnect false ; Battery_1 exists and should be automatically + ; connected at startup. +BatteryType ; Type of battery. +BatteryPortType ; Port type that the battery is on. +BatteryPort ; Port the battery is on. +BatteryBaud 0 ; Baud rate to use for battery communication (9600, + ; 19200, 38400, etc.). + +Section LCD_1 +; The physical definition of this LCD. +;SectionFlags for LCD_1: +LCDAutoConnect false ; LCD_1 exists and should automatically be connected + ; at startup. +LCDDisconnectOnConnectFailure false ; The LCD is a key component and is + ; required for operation. If this is enabled and there + ; is a failure in the LCD communications, then the + ; robot will restart. +LCDType ; Type of LCD. +LCDPortType ; Port type that the LCD is on. +LCDPort ; Port that the LCD is on. +LCDPowerOutput ; Power output that controls this LCD's power. +LCDBaud 0 ; Baud rate for the LCD communication (9600, 19200, + ; 38400, etc.). + +Section PTZ 1 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 1 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 2 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 2 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 3 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 3 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 4 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 4 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 5 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 5 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 6 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 6 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 7 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 7 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section PTZ 8 parameters +; Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom +; control (PTZ) of a camera +;SectionFlags for PTZ 8 parameters: +PTZAutoConnect false ; If true, connect to this PTZ by default. +PTZType unknown ; PTZ or PTU type +PTZInverted false ; If unit is mounted inverted (upside-down) +PTZSerialPort none ; serial port, or none if not using serial port + ; communication +PTZRobotAuxSerialPort -1 ; Pioneer aux. serial port, or -1 if not using aux. + ; serial port for communication. +PTZAddress 192.168.0.90 ; IP address or hostname, or none if not using network + ; communication. +PTZTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 1 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 1 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 2 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 2 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 3 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 3 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 4 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 4 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 5 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 5 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 6 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 6 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 7 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 7 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection + +Section Video 8 parameters +; Information about the connection to a video acquisition device, +; framegrabber, or camera +;SectionFlags for Video 8 parameters: +VideoAutoConnect false ; If true, connect to this device by default. +VideoType unknown ; Device type +VideoInverted false ; If image should be flipped (for cameras mounted + ; inverted/upside-down) +VideoWidth -1 ; Desired width of image +VideoHeight -1 ; Desired height of image +VideoDeviceIndex -1 ; Device index +VideoDeviceName none ; Device name (overrides VideoDeviceIndex) +VideoChannel 1 ; Input channel +VideoAnalogSignalFormat ; NTSC or PAL +VideoAddress 192.168.0.90 ; IP address or hostname, or none if not using + ; network communication. +VideoTCPPort 80 ; TCP Port to use for HTTP network connection diff --git a/Legacy/Aria/python/ArNetworkingPy.vcxproj b/Legacy/Aria/python/ArNetworkingPy.vcxproj new file mode 100644 index 0000000..a7a4cc0 --- /dev/null +++ b/Legacy/Aria/python/ArNetworkingPy.vcxproj @@ -0,0 +1,99 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + ArNetworkingPy + ManagedCProj + + + + DynamicLibrary + MultiByte + false + + + DynamicLibrary + MultiByte + false + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\lib\ + ..\obj\$(ProjectName)-$(Configuration)-VC10\ + true + .\ + ..\obj\$(ProjectName)-$(Configuration)-VC10\ + false + + + + Disabled + ..\include;..\ArNetworking\include;$(PYTHON_INCLUDE);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;DEBUG;%(PreprocessorDefinitions) + false + Sync + Default + MultiThreadedDebugDLL + true + Level3 + ProgramDatabase + Default + + + $(PYTHON_LIB);AriaDebugVC10.lib;ArNetworkingDebugVC10.lib + _ArNetworkingPy_d.dll + ../lib;$(PYTHON_LIBDIR);%(AdditionalLibraryDirectories) + true + true + ../lib/_ArNetworkingPy_d.lib + + + + + ..\include;..\ArNetworking\include;$(PYTHON_INCLUDE);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;ARIA_STATIC;NDEBUG;%(PreprocessorDefinitions) + false + Sync + MultiThreadedDLL + true + Level3 + ProgramDatabase + Default + + + $(PYTHON_LIB);AriaVC10.lib;ArNetworkingVC10.lib + _ArNetworkingPy.dll + ../lib;$(PYTHON_LIBDIR);%(AdditionalLibraryDirectories) + true + ..\lib\_ArNetworkingPy.lib + + + + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/python/ArNetworkingPython.vcproj b/Legacy/Aria/python/ArNetworkingPython.vcproj new file mode 100644 index 0000000..1d89bd6 --- /dev/null +++ b/Legacy/Aria/python/ArNetworkingPython.vcproj @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/python/ArNetworkingPython.vcxproj b/Legacy/Aria/python/ArNetworkingPython.vcxproj new file mode 100644 index 0000000..d509e23 --- /dev/null +++ b/Legacy/Aria/python/ArNetworkingPython.vcxproj @@ -0,0 +1,114 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + ArNetworkingPython + ManagedCProj + + + + DynamicLibrary + MultiByte + false + + + DynamicLibrary + MultiByte + false + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\lib\ + ../obj/$(ProjectName)-$(Configuration)-VC10\ + true + ../python/ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + _ArNetworkingPy + + + + Disabled + ..\include;..\ArNetworking\include;$(PYTHON_INCLUDE);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;DEBUG;%(PreprocessorDefinitions) + false + Sync + Default + MultiThreadedDebugDLL + true + Level3 + ProgramDatabase + Default + + + $(PYTHON_LIB);AriaDebugVC10.lib;ArNetworkingDebugVC10.lib + _ArNetworkingPy_d.dll + ../lib;$(PYTHON_LIBDIR);%(AdditionalLibraryDirectories) + true + true + ../lib/_ArNetworkingPy_d.lib + + + + + ..\include;..\ArNetworking\include;$(PYTHON_INCLUDE);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;ARIA_STATIC;NDEBUG;%(PreprocessorDefinitions) + false + Sync + MultiThreadedDLL + true + Level3 + ProgramDatabase + Default + + + AriaVC10.lib;ArNetworkingVC10.lib;$(PYTHON_LIB) + _ArNetworkingPy.dll + ../lib;$(PYTHON_LIBDIR);%(AdditionalLibraryDirectories) + true + _ArNetworkingPy.lib + + + + + + + + + + + false + + + false + + + false + + + false + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/python/ArNetworkingSwigPython.vcproj b/Legacy/Aria/python/ArNetworkingSwigPython.vcproj new file mode 100644 index 0000000..bc77944 --- /dev/null +++ b/Legacy/Aria/python/ArNetworkingSwigPython.vcproj @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/python/ArNetworkingSwigPython.vcxproj b/Legacy/Aria/python/ArNetworkingSwigPython.vcxproj new file mode 100644 index 0000000..708fb38 --- /dev/null +++ b/Legacy/Aria/python/ArNetworkingSwigPython.vcxproj @@ -0,0 +1,103 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521} + ArNetworkingSwigPython + ManagedCProj + + + + Application + MultiByte + OldSyntax + + + Application + MultiByte + OldSyntax + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + Level3 + ProgramDatabase + + + Custom Build Step: Running C:\swig\swig.exe to generate Python wrapper code + cd $(ProjectDir) +C:\swig\swig.exe -Fmicrosoft -c++ -python -module ArNetworkingPy -DWIN32 -DAREXPORT -outdir $(ProjectDir) -o ArNetworkingPy_wrap.cpp -I$(ProjectDir)\..\include -I$(ProjectDir)\..\ArNetworking\include $(ProjectDir)\..\ArNetworking\include\wrapper.i + + ../ArNetworking/include/wrapper.i;%(Inputs) + ArNetworkingPy_d.py;ArNetworkingPy_wrap.cpp;ArNetworkingPy_wrap.h;%(Outputs) + + + $(OutDir)$(ProjectName).exe + $(PYTHON_LIBDIR);%(AdditionalLibraryDirectories) + true + true + + + + + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + MultiThreadedDLL + Level3 + ProgramDatabase + + + (ArNetworkingSwigPython Custom Build Step) Running C:\swig\swig.exe to generate Python wrapper code + del "$(ProjectDir)\ArNetworkingPy_wrap.cpp" +del "$(ProjectDir)\ArNetworkingPy_wrap.h" +del "$(ProjectDir)\ArNetworkingPy.py" +cd $(ProjectDir) +C:\swig\swig.exe -Fmicrosoft -c++ -python -module ArNetworkingPy -DWIN32 -DAREXPORT -outdir . -o ArNetworkingPy_wrap.cpp -I..\include -I..\ArNetworking\include ..\ArNetworking\include\wrapper.i + + ../ArNetworking/include/wrapper.i;../ArNetworking/include/*.h;%(Inputs) + $(ProjectDir)/ArNetworkingPy.py;$(ProjectDir)/ArNetworkingPy_wrap.cpp;$(ProjectDir)/ArNetworkingPy_wrap.h;%(Outputs) + + + $(OutDir)$(ProjectName).exe + true + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/python/AriaPy-vc2003.sln b/Legacy/Aria/python/AriaPy-vc2003.sln new file mode 100644 index 0000000..23e2973 --- /dev/null +++ b/Legacy/Aria/python/AriaPy-vc2003.sln @@ -0,0 +1,73 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaPy", "AriaPy.vcproj", "{7BADF083-FA45-4E04-B907-94007E257C20}" + ProjectSection(ProjectDependencies) = postProject + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35} = {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingPython", "ArNetworkingPython.vcproj", "{7A0CBE13-1A83-481F-9DB8-9E2372366950}" + ProjectSection(ProjectDependencies) = postProject + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35} = {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35} + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521} = {7D28CD1A-B1DE-4109-9653-D8B26D0DA521} + {7BADF083-FA45-4E04-B907-94007E257C20} = {7BADF083-FA45-4E04-B907-94007E257C20} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} = {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2003.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingLib", "..\ArNetworking\src\ArNetworkingLib.vcproj", "{95FF1CC1-5006-4DEE-99D9-0B6C418C9689}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingSwigPython", "ArNetworkingSwigPython.vcproj", "{7D28CD1A-B1DE-4109-9653-D8B26D0DA521}" + ProjectSection(ProjectDependencies) = postProject + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35} = {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35} + {7BADF083-FA45-4E04-B907-94007E257C20} = {7BADF083-FA45-4E04-B907-94007E257C20} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} = {95FF1CC1-5006-4DEE-99D9-0B6C418C9689} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaSwigPython", "AriaSwigPython.vcproj", "{DDAB880A-2C68-4D8E-AD24-B3D940CCFB35}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {7BADF083-FA45-4E04-B907-94007E257C20}.Debug.ActiveCfg = Debug|Win32 + {7BADF083-FA45-4E04-B907-94007E257C20}.Debug.Build.0 = Debug|Win32 + {7BADF083-FA45-4E04-B907-94007E257C20}.Release.ActiveCfg = Release|Win32 + {7BADF083-FA45-4E04-B907-94007E257C20}.Release.Build.0 = Release|Win32 + {7A0CBE13-1A83-481F-9DB8-9E2372366950}.Debug.ActiveCfg = Debug|Win32 + {7A0CBE13-1A83-481F-9DB8-9E2372366950}.Debug.Build.0 = Debug|Win32 + {7A0CBE13-1A83-481F-9DB8-9E2372366950}.Release.ActiveCfg = Release|Win32 + {7A0CBE13-1A83-481F-9DB8-9E2372366950}.Release.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.Build.0 = Release|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Debug.ActiveCfg = Debug|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Debug.Build.0 = Debug|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Release.ActiveCfg = Release|Win32 + {95FF1CC1-5006-4DEE-99D9-0B6C418C9689}.Release.Build.0 = Release|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Debug.ActiveCfg = Debug|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Debug.Build.0 = Debug|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Release.ActiveCfg = Release|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Release.Build.0 = Release|Win32 + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35}.Debug.ActiveCfg = Debug|Win32 + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35}.Debug.Build.0 = Debug|Win32 + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35}.Release.ActiveCfg = Release|Win32 + {DDAB880A-2C68-4D8E-AD24-B3D940CCFB35}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/python/AriaPy-vc2010.sln b/Legacy/Aria/python/AriaPy-vc2010.sln new file mode 100644 index 0000000..e05c436 --- /dev/null +++ b/Legacy/Aria/python/AriaPy-vc2010.sln @@ -0,0 +1,74 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2010.vcxproj", "{606257AE-E882-4C66-84C0-72331642D09F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaSwigPython", "AriaSwigPython.vcxproj", "{9F0DC202-C927-577C-88F5-7F6E12832692}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaPy", "AriaPy.vcxproj", "{BFF53580-2375-8484-97C9-D494520D8496}" + ProjectSection(ProjectDependencies) = postProject + {9F0DC202-C927-577C-88F5-7F6E12832692} = {9F0DC202-C927-577C-88F5-7F6E12832692} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingSwigPython", "ArNetworkingSwigPython.vcxproj", "{7D28CD1A-B1DE-4109-9653-D8B26D0DA521}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingDLL", "..\ArNetworking\src\ArNetworkingDLL-vc2010.vcxproj", "{783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArNetworkingPy", "ArNetworkingPy.vcxproj", "{85F15893-6F00-6C19-CC3C-E7A07644B62A}" + ProjectSection(ProjectDependencies) = postProject + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521} = {7D28CD1A-B1DE-4109-9653-D8B26D0DA521} + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} = {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575} + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|x64.ActiveCfg = Debug|x64 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|x64.Build.0 = Debug|x64 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|x64.ActiveCfg = Release|x64 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|x64.Build.0 = Release|x64 + {9F0DC202-C927-577C-88F5-7F6E12832692}.Debug|Win32.ActiveCfg = Debug|Win32 + {9F0DC202-C927-577C-88F5-7F6E12832692}.Debug|Win32.Build.0 = Debug|Win32 + {9F0DC202-C927-577C-88F5-7F6E12832692}.Debug|x64.ActiveCfg = Debug|Win32 + {9F0DC202-C927-577C-88F5-7F6E12832692}.Release|Win32.ActiveCfg = Release|Win32 + {9F0DC202-C927-577C-88F5-7F6E12832692}.Release|Win32.Build.0 = Release|Win32 + {9F0DC202-C927-577C-88F5-7F6E12832692}.Release|x64.ActiveCfg = Release|Win32 + {BFF53580-2375-8484-97C9-D494520D8496}.Debug|Win32.ActiveCfg = Debug|Win32 + {BFF53580-2375-8484-97C9-D494520D8496}.Debug|Win32.Build.0 = Debug|Win32 + {BFF53580-2375-8484-97C9-D494520D8496}.Debug|x64.ActiveCfg = Debug|Win32 + {BFF53580-2375-8484-97C9-D494520D8496}.Release|Win32.ActiveCfg = Release|Win32 + {BFF53580-2375-8484-97C9-D494520D8496}.Release|Win32.Build.0 = Release|Win32 + {BFF53580-2375-8484-97C9-D494520D8496}.Release|x64.ActiveCfg = Release|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Debug|Win32.ActiveCfg = Debug|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Debug|Win32.Build.0 = Debug|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Debug|x64.ActiveCfg = Debug|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Release|Win32.ActiveCfg = Release|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Release|Win32.Build.0 = Release|Win32 + {7D28CD1A-B1DE-4109-9653-D8B26D0DA521}.Release|x64.ActiveCfg = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|Win32.ActiveCfg = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|Win32.Build.0 = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Debug|x64.ActiveCfg = Debug|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|Win32.ActiveCfg = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|Win32.Build.0 = Release|Win32 + {783BA2AB-07CE-43AD-8FC2-FFD9F19DF575}.Release|x64.ActiveCfg = Release|Win32 + {85F15893-6F00-6C19-CC3C-E7A07644B62A}.Debug|Win32.ActiveCfg = Debug|Win32 + {85F15893-6F00-6C19-CC3C-E7A07644B62A}.Debug|Win32.Build.0 = Debug|Win32 + {85F15893-6F00-6C19-CC3C-E7A07644B62A}.Debug|x64.ActiveCfg = Debug|Win32 + {85F15893-6F00-6C19-CC3C-E7A07644B62A}.Release|Win32.ActiveCfg = Release|Win32 + {85F15893-6F00-6C19-CC3C-E7A07644B62A}.Release|Win32.Build.0 = Release|Win32 + {85F15893-6F00-6C19-CC3C-E7A07644B62A}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/python/AriaPy.vcproj b/Legacy/Aria/python/AriaPy.vcproj new file mode 100644 index 0000000..9b736db --- /dev/null +++ b/Legacy/Aria/python/AriaPy.vcproj @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/python/AriaPy.vcxproj b/Legacy/Aria/python/AriaPy.vcxproj new file mode 100644 index 0000000..83aa648 --- /dev/null +++ b/Legacy/Aria/python/AriaPy.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\ + ../obj/$(ProjectName)-$(Configuration)-VC10\ + false + .\../lib\ + ../obj/$(ProjectName)-$(Configuration)-VC10\ + false + + + + MaxSpeed + OnlyExplicitInline + ../include;$(PYTHON_INCLUDE);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;_USRDLL;ARIADLL_EXPORTS;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + .\../staticobjNet/AriaPy.pch + Level3 + true + Default + + + AriaVC10.lib;$(PYTHON_LIB) + _AriaPy.dll + + + true + ../lib;%(AdditionalLibraryDirectories) + ..\lib\_AriaPy.lib + MachineX86 + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\../lib/AriaPy.tlb + + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + Disabled + ../include;$(PYTHON_INCLUDE);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + false + false + true + true + Level3 + true + ProgramDatabase + Default + + + AriaDebugVC10.lib;$(PYTHON_LIB) + _AriaPy_d.dll + + + true + ..\lib;$(PYTHON_LIBDIR);%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + ../lib/_AriaPy_d.lib + MachineX86 + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\../lib/AriaPy.tlb + + + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + + + + + + + + + false + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/python/AriaSwigPython.vcproj b/Legacy/Aria/python/AriaSwigPython.vcproj new file mode 100644 index 0000000..9d874bd --- /dev/null +++ b/Legacy/Aria/python/AriaSwigPython.vcproj @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/python/AriaSwigPython.vcxproj b/Legacy/Aria/python/AriaSwigPython.vcxproj new file mode 100644 index 0000000..c0dbd5f --- /dev/null +++ b/Legacy/Aria/python/AriaSwigPython.vcxproj @@ -0,0 +1,110 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + RunSwigPython + ManagedCProj + + + + Application + MultiByte + OldSyntax + + + Application + MultiByte + OldSyntax + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../python + ../obj/$(ProjectName)-$(Configuration)-VC10\ + true + ../python + ../obj/$(ProjectName)-$(Configuration)-VC10\ + false + + + + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + Level3 + ProgramDatabase + + + Running C:\swig\swig.exe to generate Python wrapper code + C:\swig\swig.exe -Fmicrosoft -c++ -python -module AriaPy -DWIN32 -DAREXPORT -outdir $(ProjectDir) -o AriaPy_wrap.cpp -I$(ProjectDir)\..\include $(ProjectDir)\..\include\wrapper.i + + ../include/wrapper.i;%(Inputs) + AriaPy.py;AriaPy_wrap.cpp;AriaPy_wrap.h;%(Outputs) + + + $(OutDir)$(ProjectName).exe + true + true + + + + + WIN32;NDEBUG;%(PreprocessorDefinitions) + false + MultiThreadedDLL + Level3 + ProgramDatabase + + + Running C:\swig\swig.exe to generate Python wrapper code + echo ProjectDir is $(ProjectDir) +cd "$(ProjectDir)" +del "$(ProjectDir)\AriaPy_wrap.cpp" +del "$(ProjectDir)\AriaPy_wrap.h" +del "$(ProjectDir)\AriaPy.py" +C:\swig\swig.exe -Fmicrosoft -c++ -python -module AriaPy -DWIN32 -DAREXPORT -outdir . -o AriaPy_wrap.cpp -I..\include ..\include\wrapper.i + + ../include/wrapper.i;%(Inputs) + AriaPy.py;AriaPy_wrap.cpp;AriaPy_wrap.h;%(Outputs) + + + $(OutDir)$(ProjectName).exe + true + + + + + false + + + + + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/pythonExamples/README.txt b/Legacy/Aria/pythonExamples/README.txt new file mode 100644 index 0000000..be1572c --- /dev/null +++ b/Legacy/Aria/pythonExamples/README.txt @@ -0,0 +1,152 @@ + + + +USING THE PYTHON WRAPPER FOR ARIA +--------------------------------- + +A "wrapper" library for Python has been provided in the "python" directory. +This wrapper layer provides a Python API which simply makes calls into the +regular Aria C++ library (libAria.so/AriaVC10.dll). In general, the Python API +mirrors the C++ API. + +The Aria Python wrapper currently requires Python version 2.4.4 if on Debian 3 or Windows, +Python 2.5 if on Debian 5, or Python 2.7 if on Ubuntu 12. Multiple versions of +Python may be installed on Debian Linux; if so, commands are provided such as +'python2.4' or 'python2.5' or 'python2' to invoke the different versions of +Python. + + NOTE: You should use the versions of Python mentioned above, since the wrapper + library code is generally only compatible with the runtime libraries provided + by these versions. To use a different version of Python, you must + rebuild the wrapper library (see below). + +You can download Python 2.4.4 from: + http://www.python.org/download/releases/2.4.4 +(Python 2.2 is also at python.org.) + +On Debian, you can install Python 2.5 by entering the following command +when connected to the Internet: + + sudo apt-get install python + +Or, you can download Python 2.5.5 from: + http://www.python.org/download/releases/2.5.5 + +On Ubuntu, you can install Python 2.7 with the following command: + + sudo apt-get install python2.7 + + + (NOTE if using Python 2.6 or later: Python 2.6 requires native C++ DLLs to be + named with a ".pyd" file extension, rather than .dll/.so as was + allowed in previous versions. So if Python 2.6 is unable to import the + AriaPy DLL module, rename _AriaPy.dll or _AriaPy.so to _AriaPy.pyd + in the python/ subdirectory.) + +Documentation about the Python language and libraries is at: + http://docs.python.org + +To use the wrapper library you must create an environment variable called PYTHONPATH +that has the full path to Aria's 'python' directory in it. + +On Linux, set it to: + /usr/local/Aria/python + +On Windows, set it to: + C:\Program Files\MobileRobots\Aria\python + +Environment variables are set in Windows in the Advanced tab of the System control panel. + + +For an example you can start the simulator, then enter +the pythonExamples directory and run: + + python simple.py + +On Windows, you can just double-click simple.py. + + NOTE: The Python wrapper API is not as well tested as Aria itself. If + you encounter problems, please notify the aria-users mailing list. Furthermore, + some methods have been omitted or renamed, and you have to do a few things + differently (see next section). + + + + +USING ACTIONS IN PYTHON +----------------------- + +Writing classes in Python that subclass classes from Aria is not as +straightforward as making subclasses of native Python classes. Subclasses +of classes in the wrapper are not direct subclasses of the C++ classes, +they are only subclasses of the Python wrapper classes, which implement the logic +to redirect calls between the C++ and wrapper classes. The practical +consequences of this include the following: + +1. You cannot call a virtual method in the parent class which the subclass + overrides -- it will always be directed to the subclass's implementation. + For example, you can override ArAction::setRobot(), which is a virtual + method. But then, any call to setRobot() on the subclass will always + be directed to the subclass's implementation; calling + self.ArAction.setRobot() from you subclass's setRobot() override would + result in an infinite recursion, so Swig throws an exception instead. + There is no workaround for this other than extending each parent class + in wrapper.i ad-hoc to include an additional method with a new name to + invoke the method defined in the parent. We have done this for a few + cases (such as ArAction::setRobot()), but If this ever becomes neccesary + for any others, please let us know and we will add the extension. + +2. Swig currently does not make protected methods available to + subclasses, though this may be fixed in the future. + + +OTHER DIFFERENCES +----------------- + +See the C++ API docs for various classes for notes about how they might be +used differently in Python. For example, ArConfigArg and ArFunctor are used +slightly differently (since those classes use features unique to C++). + + + +REBUILDING THE PYTHON WRAPPER +----------------------------- + +You must rebuild the Python wrapper if you make any interface changes to +ARIA and want them to be available in Python. You may also need to rebuild +the wrapper if you want to use another version of Python (as distributed, the +wrapper libraries were built with and linked against the 2.4 Python runtime library +on Debian Linux and Windows, and 2.2 on RedHat 7). + +If you want to rebuild the Python wrapper you need to install SWIG, you +can get it from http://www.swig.org/download.html (use version 1.3.29 or newer.) +You'll also need Python, which you can get from +http://www.python.org. + +On Linux, you may also need to install a Python "Development" package in addition +to the main Python runtime package. e.g. on Debian, install python2.4-dev. On +Windows, if the python24_d.lib library is missing, you can download the +Python 2.4 source code and compile the "python" project in the PCbuild subdirectory. + +Set the environment variable PYTHON_INCLUDE to the full path of Python's +include directory. On Linux, this is usually /usr/include/python2.4 for +Python 2.4 or /usr/include/python2.2 for Python 2.2 or /usr/include/python2.7 +for Python 2.7. On Windows, it depends +on where you installed Python but a typical value is C:\Python24\include for +Ptyhon 2.4). + +On Windows you'll also need to set the environment variables +PYTHON_LIB to the full path of the Python library and PYTHON_LIBDIR to the directory +containing all the Python libs. These depend on where +you installed Python, but a typical value would be "C:\Python24\libs\python24.lib" for +PYTHON_LIB and "C:\Python24\libs" for PYTHON_LIBDIR for Python 2.4. +Set environment variables in the Advanced section of the System control panel. + +On Linux Run 'make python' in the Aria directory, and again run 'make python' in +the ArNetworking subdirectory if you also want the wrapper library for +ArNetworking. On Windows, open the AriaPy-vc2010.sln file in the 'python' +directory with Visual Studio 2010 and build AriaPy and, if desired, +ArNetworkingPy in Release configuration. The native ARIAlibrary may be +automatically rebuilt if neccesary. + + diff --git a/Legacy/Aria/pythonExamples/basicActions.py b/Legacy/Aria/pythonExamples/basicActions.py new file mode 100644 index 0000000..563c8d8 --- /dev/null +++ b/Legacy/Aria/pythonExamples/basicActions.py @@ -0,0 +1,85 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + +# Wander around, avoiding obstacles, using some ArActions predefined in ARIA. + +Aria_init() +parser = ArArgumentParser(sys.argv) +parser.loadDefaultArguments() +if not Aria_parseArgs(): + Aria_logOptions() + Aria_exit(1) +robot = ArRobot() +conn = ArRobotConnector(parser, robot) +if not conn.connectRobot(): + print "Could not connect to robot, exiting" + Aria_exit(1) + + +# Most robots have sonar: +print "Creating sonar object..." +sonar = ArSonarDevice() +robot.addRangeDevice(sonar) + +# Some robots have laser rangefinders (enabled in robot's parameter .p file or +# with -connectLaser command line argument): +laserConn = ArLaserConnector(parser, robot, conn) +if not laserConn.connectLasers(): + print "Warning: could not connect to laser(s)." + +# Add actions to ArRobot. While running the robot's action resolver will +# determine motion commands by evaluating the actions in order from lowest +# number to highest (so lower order actions' desired motion commands can +# supercede higher) + +print "Adding actions..." +print " 1. StallRecover" +stallRecover = ArActionStallRecover() +robot.addAction(stallRecover, 1) +print " 2. AvoidFront" +avoid = ArActionAvoidFront() +robot.addAction(avoid, 2) +print " 3. LimitFront" +limitFront = ArActionLimiterForwards("limitFront", 300, 600, 250) +robot.addAction(limitFront, 3) +print " 4. LimitBack" +limitBack = ArActionLimiterBackwards() +robot.addAction(limitBack, 4) +print " 5. ConstantVelocity" +constVel = ArActionConstantVelocity() +robot.addAction(constVel, 5) + + +# Run robot thread here in the main thread. +# 1 (=true) makes the function exit if the robot connection goes away unexpectedly. +print "Running robot..." +robot.enableMotors() +robot.run(1) + +print "goodbye." +Aria_exit(0) diff --git a/Legacy/Aria/pythonExamples/configExample.cfg b/Legacy/Aria/pythonExamples/configExample.cfg new file mode 100644 index 0000000..ca15c16 --- /dev/null +++ b/Legacy/Aria/pythonExamples/configExample.cfg @@ -0,0 +1,13 @@ +Section Example Section +; Contains parameters created by the configExample +;SectionFlags for Example Section: +ExampleIntegerParameter 0 ; range [-10, 10], Example parameter integer. + +ExampleDoubleParameter 0.5 ; range [0, 1], Example double precision floating + ; point number. + +ExampleBoolParameter false ; Example boolean parameter. + +ExampleStringParameter Hello, world Modified! Modified! Modified! Modified! ; + ; Example string parameter. + diff --git a/Legacy/Aria/pythonExamples/configExample.py b/Legacy/Aria/pythonExamples/configExample.py new file mode 100644 index 0000000..26bb00f --- /dev/null +++ b/Legacy/Aria/pythonExamples/configExample.py @@ -0,0 +1,164 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + +""" +* @example configExample.cpp Example program demonstrating the use of ArConfig + * + * This program shows how to use ArConfig to store configuration parameters + * and load/save them from a file. + * + * The ArNetworking library includes server classes that will let you + * use a remote client such as MobileEyes to view and change the configuration. + * See the ArNetworking documentation and examples. + """ + + +class ConfigExample: + + def __init__(self): + + # The global class Aria() contains an ArConfig object. You can create + # other instances of ArConfig, but this is how you can share one ArConfig + # among various program modules. + # If you want to store a config parameter in ArConfig, first you must add + # it to the ArConfig() object. Parameters are stored in sections. + # + # In the C++ library, ArConfigArg stores a pointer to a variable, which is + # directly modified by ArConfig. In Python, however, it can't do that, so + # you must get the value from ArConfig using findSection() and findParam(). + # Furthermore, the wrapper library can't distinguish between integers, + # booleans, etc. so you must use special _Int, _Double, _Bool, and _String + # subclasses for different types. + + config = Aria_getConfig() + config.setSectionComment("Example Section", "Contains parameters created by the configExample") + + # Add an integer which ranges from -10 to 10: + intParam = ArConfigArg_Int("ExampleIntegerParameter", 0, "Example parameter integer.", -10, 10) + config.addParam(intParam, "Example Section", ArPriority.NORMAL) + + # Add a floating point number which ranges from 0.0 to 1.0: + doubleParam = ArConfigArg_Double("ExampleDoubleParameter", 0.5, "Example double precision floating point number.", 0.0, 1.0) + config.addParam(doubleParam, "Example Section", ArPriority.NORMAL) + + # Essential parameters can be placed in the "Important" priority level: + boolParam = ArConfigArg_Bool("ExampleBoolParameter", 1, "Example boolean parameter.") + config.addParam(boolParam, "Example Section", ArPriority.IMPORTANT) + + # Unimportant parameters can be placed in the "Trivial" priority level: + stringParam = ArConfigArg_String("ExampleStringParameter", "Hello, world", "Example string parameter.") + config.addParam(stringParam, "Example Section", ArPriority.TRIVIAL) + + # You can set a callback to be invoked when the configuration changes, in + # case you need to respond to any changes in the parameter values: + config.addProcessFileCB(self.processConfigFile, 0) + + + # Method called by config process callback when a new file is loaded. + # It can return False (0) to indicate an error, or True (1) to indicate no error. + def processConfigFile(self): + config = Aria_getConfig() + section = config.findSection("Example Section") + if not section: + ArLog.log(ArLog.Normal, "configExample: config file does not have section \"Example Section\".") + return 0 + intParam = section.findParam("ExampleIntegerParameter") + if not intParam: + ArLog.log(ArLog.Normal, "configExample: config file does not have ExampleIntegerParameter") + return 0 + doubleParam = section.findParam("ExampleDoubleParameter") + if not doubleParam: + ArLog.log(ArLog.Normal, "configExample: config file does not have ExampleDoubleParameter.") + return 0 + stringParam = section.findParam("ExampleStringParameter") + if not stringParam: + ArLog.log(ArLog.Normal, "configExample: config file does not have ExampleStringParameter.") + return 0 + boolParam = section.findParam("ExampleBoolParameter") + if not boolParam: + ArLog.log(ArLog.Normal, "configExample: config file does not have ExampleBoolParameter.") + return 0 + ArLog.log(ArLog.Normal, ( "configExample: processConfigFile callback: Config changed. New values: int=%d, float=%f, bool=%s, string=\"%s\"." % (intParam.getInt(), doubleParam.getDouble(), boolParam.getBool(), stringParam.getString()) ) ) + return True + +Aria_init() +argParser = ArArgumentParser(sys.argv) +argParser.loadDefaultArguments() +if len(sys.argv) < 2 or not Aria_parseArgs() or argParser.checkArgument("-help"): + ArLog.log(ArLog.Terse, "configExample: Error: no config file given as command line argument."); + ArLog.log(ArLog.Terse, "configExample: usage: configExample .\nFor example, \"configExample configExample.cfg\".") + Aria_logOptions() + Aria_shutdown() + sys.exit(1) + +# Object containing config parameters, and responding to changes (defined above): +configExample = ConfigExample() + +# Load a config file given on the command line into the global +# ArConfig object kept by Aria_ Normally ArConfig expects config +# files to be in the main ARIA directory (i.e. /usr/local/Aria or +# a directory specified by the $ARIA environment variable)., but +# let's add "pythonExamples" to it, to load files from the pythonExamples +# directory. +filename = argParser.getArg(1) +config = Aria_getConfig() +config.setBaseDirectory(config.getBaseDirectory() + "pythonExamples/") +ArLog.log(ArLog.Normal, "configExample: loading configuration file \"%s\" from directory \"%s\"... (processConfigFile callback should be called with new values)" % (filename, config.getBaseDirectory())) +#config.setProcessFileCallbacksLogLevel(ArLog.Normal) +if (not config.parseFile(filename, False)): + ArLog.log(ArLog.Terse, "configExample: Error loading configuration file \"%s\"." % (filename)) +else: + ArLog.log(ArLog.Normal, "configExample: Loaded configuration file \"%s\". Setting some values; processConfigFile callback should be called each time and see the new value." % (filename)) + + # Try changing some of the parameters: + # After changing a config value, you should invoke the callbacks. + section = config.findSection("Example Section") + if section: + arg = section.findParam("ExampleBoolParameter") + if arg: + print "configExample: setting ExampleBoolParameter to %s" % (not arg.getBool()) + arg.setBool(not arg.getBool()) + arg = section.findParam("ExampleStringParameter") + if arg: + print "configExample: setting ExampleStringParameter to \"%s\"" % (arg.getString() + " Modified!") + arg.setString(arg.getString() + " Modified!") + if not config.callProcessFileCallBacks(False): + ArLog.log(ArLog.Terse, "configExample: Error processing modified config.") + else: + ArLog.log(ArLog.Normal, "configExample: Successfully modified config and invoked callbacks.") + + +# You can save the configuration as well: +ArLog.log(ArLog.Normal, "configExample: Saving configuration...") +if not config.writeFile(filename): + ArLog.log(ArLog.Terse, "configExample: Error saving configuration to file \"%s\"not ", filename) + +# end of program. +ArLog.log(ArLog.Normal, "configExample: end of program.") +Aria_shutdown() + diff --git a/Legacy/Aria/pythonExamples/customActions.py b/Legacy/Aria/pythonExamples/customActions.py new file mode 100644 index 0000000..df5794e --- /dev/null +++ b/Legacy/Aria/pythonExamples/customActions.py @@ -0,0 +1,256 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + + +""" +An example program demonstrating how to make and use new actions. + +This example program creates two new actions, Go and Turn. Go will drive the robot forward safely, +while Turn will aobstacles detected by the sonar by turning. +This program also adds a predefined +action from which = Aria() tries to recover from stalls (hit something and +can't move forward) by backing and turning. + +Each of these actions have the normal constructor and destructor, note that +the constructors also call ArAction.__init__ to call the parent ArAction +constructor. +Each action then also implements the essential method fire(). This fire +function is called by the action resolver, and returns values that, in +combination with other actions' desired behavior, determine the driving +commands sent to the robot. + +Also note that each of these actions override the ArAction::setRobot function; these +implementations obtain the sonar device from the robot in addition to doing the +needed caching of the robot pointer. This is what you should do if you +care about the presence or absence of a particular sensor. If you don't +care about any particular sensor you could just use the checkRangeDevice +methods from ArRobot (there are four of them) in your fire() method. +Also note that these are very naive actions, they are simply an example +of how to use actions. + +See the Actions section of the Aria reference manual for more details about +actions, and see the Python README.txt for notes on the tricky aspects +of implementing an ArAction or other subclass. + +Also, as a general note, remember actions must take a small amount of time to execute, to avoid +delaying the robot synchronization cycle. + +""" + + + +# Action that drives the robot forward, but stops if obstacles are +# detected by sonar. +class ActionGo(ArAction): + + # constructor, sets myMaxSpeed and myStopDistance + def __init__(self, maxSpeed, stopDistance): + ArAction.__init__(self, "Go") + self.myMaxSpeed = maxSpeed + self.myStopDistance = stopDistance + self.myDesired = ArActionDesired() + self.mySonar = None + # Swig doesn't wrap protected methods yet # self.setNextArgument(ArArg("maximum speed", self.myMaxSpeed, "Maximum speed to go.")) + # Swig doesn't wrap protected methods yet # self.setNextArgument(ArArg("stop distance", self.myStopDistance, "Distance at which to stop.")) + + # This fire method is where the real work of the action happens. + # currentDesired is the combined desired action from other actions + # previously processed by the action resolver. In this case, we're + # not interested in that, we will set our desired + # forward velocity in the myDesired member, and return it. + # Note that myDesired must be a class member:, since this method + # will return a pointer to myDesired to the caller. If we had + # declared the desired action as a local variable in this method, + # the pointer we returned would be invalid after this method + # returned. + def fire(self, currentDesired): + # reset the actionDesired (must be done), to clear + # its previous values. + self.myDesired.reset() + + # if the sonar is null we can't do anything, so deactivate + if self.mySonar == None: + deactivate() + return None + + # get the range of the sonar + range = self.mySonar.currentReadingPolar(-70, 70) - self.getRobot().getRobotRadius() + + # if the range is greater than the stop distance, find some speed to go + if (range > self.myStopDistance): + # just an arbitrary speed based on the range + speed = range * .3 + # if that speed is greater than our max, cap it + if (speed > self.myMaxSpeed): + speed = self.myMaxSpeed + # now set the velocity + self.myDesired.setVel(speed) + else: + # the range was less than the stop distance, so request stop + self.myDesired.setVel(0) + + # return a reference to our actionDesired to the resolver to make our request + return self.myDesired + + + # Override setRobot() to get a reference to the sonar device + def setRobot(self, robot): + + # Set myRobot object in parent ArAction class (must be done if + # you overload setRobot): + #self.myRobot = robot + print "ActionGo: setting robot on ArAction..." + self.setActionRobot(robot) + + # Find sonar device for use in fire(): + self.mySonar = robot.findRangeDevice("sonar") + if (self.mySonar == None): + ArLog.log(ArLog.Terse, "actionExample: ActionGo: Warning: The robot had no sonar range device, deactivating!") + deactivate() + + +# Action that turns the robot away from obstacles detected by the +# sonar. + +class ActionTurn(ArAction): + def __init__(self, turnThreshold, turnAmount): + ArAction.__init__(self, "Turn") + self.myDesired = ArActionDesired() + self.myTurnThreshold = turnThreshold + self.myTurnAmount = turnAmount + + # Swig doesn't wrap protected methods yet # self.setNextArgument(ArArg("turn threshold (mm)", self.myTurnThreshold, "The number of mm away from obstacle to begin turnning.")) + # Swig doesn't wrap protected methods yet # self.setNextArgument(ArArg("turn amount (deg)", self.myTurnAmount, "The number of degress to turn if turning.")) + + # remember which turn direction we requested, to help keep turns smooth + self.myTurning = 0 # -1 == left, 1 == right, 0 == none + + + def setRobot(self, robot): + # Sets myRobot in the parent ArAction class (must be done): + print "ActionTurn: calling ArAction.setActionRobot..." + self.setActionRobot(robot) + #self.myRobot = robot + + + # Find sonar object for use in fire(): + self.mySonar = robot.findRangeDevice("sonar") + if (self.mySonar == None): + ArLog.log(ArLog.Terse, "actionExample: ActionTurn: Warning: I found no sonar, deactivating.") + self.deactivate() + + def fire(self, currentDesired): + + # reset the actionDesired (must be done) + self.myDesired.reset() + + # if the sonar is null we can't do anything, so deactivate + if self.mySonar == None: + self.deactivate() + return None + + # Get the left readings and right readings off of the sonar + leftRange = (self.mySonar.currentReadingPolar(0, 100) - + self.getRobot().getRobotRadius()) + rightRange = (self.mySonar.currentReadingPolar(-100, 0) - + self.getRobot().getRobotRadius()) + + # if neither left nor right range is within the turn threshold, + # reset the turning variable and don't turn + if (leftRange > self.myTurnThreshold and rightRange > self.myTurnThreshold): + self.myTurning = 0 + self.myDesired.setDeltaHeading(0) + + # if we're already turning some direction, keep turning that direction + elif (self.myTurning != 0): + self.myDesired.setDeltaHeading(self.myTurnAmount * self.myTurning) + + # if we're not turning already, but need to, and left is closer, turn right + # and set the turning variable so we turn the same direction for as long as + # we need to + elif (leftRange < rightRange): + self.myTurning = -1 + self.myDesired.setDeltaHeading(self.myTurnAmount * self.myTurning) + + # if we're not turning already, but need to, and right is closer, turn left + # and set the turning variable so we turn the same direction for as long as + # we need to + else : + self.myTurning = 1 + self.myDesired.setDeltaHeading(self.myTurnAmount * self.myTurning) + + # return the actionDesired, so resolver knows what to do + return self.myDesired + + + +Aria_init() +parser = ArArgumentParser(sys.argv) +parser.loadDefaultArguments() +conn = ArSimpleConnector(parser) +robot = ArRobot() +sonar = ArSonarDevice() + +# Create instances of the actions defined above, plus ArActionStallRecover, +# a predefined action from Aria_ +go = ActionGo(500, 350) +turn = ActionTurn(400, 10) +recover = ArActionStallRecover() + + +# Parse all command-line arguments +if not Aria_parseArgs(): + Aria_logOptions() + Aria_exit(1) + +# Connect to the robot +if not conn.connectRobot(robot): + ArLog.log(ArLog.Terse, "actionExample: Could not connect to robotnot Exiting.") + Aria_exit(1) + +# Add the range device to the robot. You should add all the range +# devices and such before you add actions +robot.addRangeDevice(sonar) + + +# Add our actions in order. The second argument is the priority, +# with higher priority actions going first, and possibly pre-empting lower +# priority actions. +robot.addAction(recover, 100) +robot.addAction(go, 50) +robot.addAction(turn, 49) + +# Enable the motors +robot.enableMotors() + +# Run the robot processing cycle. +# 'true' means to return if it loses connection, +# after which we exit the program. +robot.run(1) + +Aria_shutdown() diff --git a/Legacy/Aria/pythonExamples/pythonThreadTest.py b/Legacy/Aria/pythonExamples/pythonThreadTest.py new file mode 100644 index 0000000..84aabf1 --- /dev/null +++ b/Legacy/Aria/pythonExamples/pythonThreadTest.py @@ -0,0 +1,62 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from threading import Thread +from AriaPy import * +import time + +# A quick test to make sure that built in Python threads work when the AriaPy library is also loaded +# and initialized. + +Aria_init() + +# A subclass of Python's thread class, to contain a method that runs in a new thread + +class ExampleThread(Thread): + + def __init__(self, name, time = 2): + Thread.__init__(self) + self.name = name + self.time = time + print name+ " init" + + def run(self): + while 1: + print "thread " + self.name + time.sleep(self.time) + +exampleThread1 = ExampleThread("thread 1", 2) +exampleThread2 = ExampleThread("thread 2", 4) +exampleThread3 = ExampleThread("thread 3", 2.5) + + +exampleThread1.start() +exampleThread2.start() +exampleThread3.start() + +while 1: + print "main!" + time.sleep(1.5) + diff --git a/Legacy/Aria/pythonExamples/rangeDeviceReading.py b/Legacy/Aria/pythonExamples/rangeDeviceReading.py new file mode 100644 index 0000000..a10073f --- /dev/null +++ b/Legacy/Aria/pythonExamples/rangeDeviceReading.py @@ -0,0 +1,81 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + +# This Python script connects to the robot and prints out the current +# Sonar and Laser range readings. + +Aria_init() +argparser = ArArgumentParser(sys.argv) +argparser.loadDefaultArguments() +robot = ArRobot() +conn = ArSimpleConnector(argparser) + +if not Aria_parseArgs(): + Aria_logOptions() + Aria_exit(1) + +sonar = ArSonarDevice() +robot.addRangeDevice(sonar) + +laser = ArSick() +laser.configureShort(1) +robot.addRangeDevice(laser) + +if (not conn.connectRobot(robot)): + print "Could not connect to robot, exiting" + Aria_exit(1) + + + + +robot.runAsync(1) +laser.runAsync() +print "Connecting to laser and waiting 1 sec..." +laser.blockingConnect() +ArUtil_sleep(1000) +robot.lock() +poses = sonar.getCurrentBufferAsVector() +print "Sonar readings (%d) (Point coordinates in space):" % (len(poses)) +for p in poses: + print " sonar reading at ", p +robot.unlock() + +print "" +print "" + +laser.lockDevice() +readings = laser.getRawReadingsAsVector() +print "Laser readings (%d):" % (len(readings)) +for r in readings: + print " from laser placed at pose (X:%g, Y:%g) reading point pos is %s, distance is %d" % (r.getSensorX(), r.getSensorY(), r.getPose(), r.getRange()) +laser.unlockDevice() + + +laser.disconnect() +print "goodbye." +Aria_exit(0) diff --git a/Legacy/Aria/pythonExamples/robotSyncTaskExample.py b/Legacy/Aria/pythonExamples/robotSyncTaskExample.py new file mode 100644 index 0000000..f05ef9c --- /dev/null +++ b/Legacy/Aria/pythonExamples/robotSyncTaskExample.py @@ -0,0 +1,113 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + +# Shows how to add a task callback to ArRobot's synchronization/processing cycle +# +# This program will just have the robot wander around, it uses some aance +# routines, then just has a constant velocity. A sensor interpretation task callback is invoked +# by the ArRobot object every cycle as it runs, which records the robot's current +# pose and velocity. +# +# Note that tasks must take a small amount of time to execute, to adelaying the +# robot cycle. +# +# Callbacks are done differently in Python than in C++. In the Aria C++ +# library, a class called ArFunctor is used to store +# a function pointer, and an instance of an object. Different ArFunctor +# subclasses are used for functions with different arguments, and for global +# functions which are not object methods. Instead, in the Python wrapper, you +# can simply pass a function (whether defined globally, or bound to an object +# if defined as a method, or created on the fly as a 'lambda' expression) +# whenever the Aria API calls for an ArFunctor*. The most common use is shown +# below: a method bound to an object is passed directly as a sensor interpretation +# task. + + +class PrintingTask: + + # Constructor. Adds a sensor interpretation task to the given robot object. + def __init__(self, robot): + self.myRobot = robot + robot.addSensorInterpTask("PrintingTask", 50, self.doTask) + + # This method will be called by ArRobot as a sensor interpretation task + def doTask(self): + print "x %6.1f y %6.1f th %6.1f vel %7.1f mpacs %3d" % (self.myRobot.getX(), self.myRobot.getY(), self.myRobot.getTh(), self.myRobot.getVel(), self.myRobot.getMotorPacCount()) + + + +Aria_init() + +parser = ArArgumentParser(sys.argv) +robot = ArRobot() +con = ArRobotConnector(parser, robot) + +if not con.connectRobot(): + print "Could not connect to robot, exiting" + Aria_logOptions() + Aria_exit(1) + + +sonar = ArSonarDevice() + +# This object encapsulates the task we want to do every cycle. +# Upon creation, it puts a callback functor in the ArRobot object +# as a 'user task'. +pt = PrintingTask(robot) + +# actions used to wander +recover = ArActionStallRecover() +aFront = ArActionAvoidFront() +constantVelocity = ArActionConstantVelocity("Constant Velocity", 400) + + +robot.addRangeDevice(sonar) + +if not con.connectRobot(robot): + print "Could not connect to the robot." + Aria_exit(2) +print "Connected to the robot. (Press Ctrl-C to exit)" + + +# turn on the motors, turn off amigobot sounds +robot.comInt(ArCommands.ENABLE, 1) +robot.comInt(ArCommands.SOUNDTOG, 0) + +# add the wander actions +robot.addAction(recover, 100) +robot.addAction(aFront, 50) +robot.addAction(constantVelocity, 25) + +# Start the robot process cycle running. Each cycle, it calls the robot's +# tasks. When the PrintingTask was created above, it added a new +# task to the robot. '1' means that if the robot connection +# is lost, then ArRobot's processing cycle ends and self call returns. +robot.run(1) + +print "Disconnected. Goodbye." + diff --git a/Legacy/Aria/pythonExamples/simple.py b/Legacy/Aria/pythonExamples/simple.py new file mode 100644 index 0000000..e7ddc9e --- /dev/null +++ b/Legacy/Aria/pythonExamples/simple.py @@ -0,0 +1,88 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + +# Global library initialization, just like the C++ API: +Aria_init() + +parser = ArArgumentParser(sys.argv) +parser.loadDefaultArguments() + +# Create a robot object: +robot = ArRobot() + + +# Create a "simple connector" object and connect to either the simulator +# or the robot. Unlike the C++ API which takes int and char* pointers, +# the Python constructor just takes argv as a list. +print "Connecting..." + +con = ArRobotConnector(parser, robot) +if not Aria_parseArgs(): + Aria_logOptions() + Aria_exit(1) + +if not con.connectRobot(): + print "Could not connect to robot, exiting" + Aria_exit(1) + + +# Run the robot threads in the background: +print "Running..." +robot.runAsync(1) + +# Drive the robot a bit, then exit. +robot.lock() +print "Robot position using ArRobot accessor methods: (", robot.getX(), ",", robot.getY(), ",", robot.getTh(), ")" +pose = robot.getPose() +print "Robot position by printing ArPose object: ", pose +print "Robot position using special python-only ArPose members: (", pose.x, ",", pose.y, ",", pose.th, ")" +print "Sending command to move forward 1 meter..." +robot.enableMotors() +robot.move(1000) +robot.unlock() + +print "Sleeping for 5 seconds..." +ArUtil_sleep(5000) + +robot.lock() +print "Sending command to rotate 90 degrees..." +robot.setHeading(90) +robot.unlock() + +print "Sleeping for 5 seconds..." +ArUtil_sleep(5000) + +robot.lock() +print "Robot position (", robot.getX(), ",", robot.getY(), ",", robot.getTh(), ")" +pose = robot.getPose() +print "Robot position by printing ArPose object: ", pose +print "Robot position using special python-only ArPose members: (", pose.x, ",", pose.y, ",", pose.th, ")" +robot.unlock() + +print "Exiting." +Aria_shutdown() diff --git a/Legacy/Aria/pythonExamples/teleop.py b/Legacy/Aria/pythonExamples/teleop.py new file mode 100644 index 0000000..0547da4 --- /dev/null +++ b/Legacy/Aria/pythonExamples/teleop.py @@ -0,0 +1,104 @@ +""" +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +""" +from AriaPy import * +import sys + +# This is an example of how to use the limiting behaviors. +# +# The way it works is that it has a limiting behavior higher priority +# than the joydrive action behavior. So the joydrive action can try +# to do whatever it wants, but it won't work. + +Aria_init() + +# Robot and device objects +robot = ArRobot() +sonar = ArSonarDevice() +sick = ArSick() +robot.addRangeDevice(sonar) + +if 1: + robot.addRangeDevice(sick) + +# the joydrive action +jdAct = ArActionJoydrive() + +# a keyboard drive action +kdAct = ArActionKeydrive() + +# limiter for close obstacles +limiter = ArActionLimiterForwards("speed limiter near", 300, 600, 250) + +# limiter for far away obstacles +limiterFar = ArActionLimiterForwards("speed limiter far", 300, 1100, 400) + +# if the robot has upward facing IR sensors ("under the table" sensors), this +# stops us too +tableLimiter = ArActionLimiterTableSensor() + +# limiter so we don't bump things backwards +backwardsLimiter = ArActionLimiterBackwards() + + + +connector = ArSimpleConnector(sys.argv) + +if not connector.parseArgs(): + connector.logOptions() + Aria_exit(1) + +# try to connect to the robot, if we fail exit +print "Connecting to the robot..." +if not connector.connectRobot(robot): + print "Could not connect to robot. exiting" + Aria_shutdown() + Aria_exit(1) + +# try to connect to the laser, if we succeed, add as range device to robot +print "setup and connect sick" +sick.runAsync() +connector.setupLaser(sick) +if sick.blockingConnect(): + print "Connected to SICK laser" +else: + print "Note, could not connect to SICK laser." + +print "Connected to the robot. Use arrow keys or joystick to move. Spacebar to stop." + +# add the actions, put the limiters on top, then have the joydrive action, +# this will keep the action from being able to drive too fast and hit +# something +robot.addAction(tableLimiter, 100) +robot.addAction(limiter, 95) +robot.addAction(limiterFar, 90) +robot.addAction(backwardsLimiter, 85) +robot.addAction(kdAct, 51) +robot.addAction(jdAct, 50) + +# enable motors and run the robot until connection is lost +robot.enableMotors() +robot.run(1) +Aria_shutdown() diff --git a/Legacy/Aria/src/ArACTS.cpp b/Legacy/Aria/src/ArACTS.cpp new file mode 100644 index 0000000..1206e58 --- /dev/null +++ b/Legacy/Aria/src/ArACTS.cpp @@ -0,0 +1,319 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArACTS.h" + + +AREXPORT ArACTS_1_2::ArACTS_1_2() : + mySensorTaskCB(this, &ArACTS_1_2::actsHandler) +{ + myRobot = NULL; + myBlobsBad = true; + myInverted = false; +} + +AREXPORT ArACTS_1_2::~ArACTS_1_2() +{ + +} + +/** + Opens the port to the ACTS server + @param robot the robot to attach this to, which puts a sensorInterp on the + robot so that ArACTS will always have fresh data from ACTS... giving a + NULL value is perfectly acceptable, in this case ArACTS will not do any + processing or requesting and you'll have to use receiveBlobInfo and + requestPacket (or just call actsHandler) + @param port the port the ACTS server is running on, default of 5001 + @param host the host the ACTS server is running on, default is localhost + (ie this machine) + @return true if the connection was established, false otherwise +*/ +AREXPORT bool ArACTS_1_2::openPort(ArRobot *robot, const char *host, int port) +{ + int ret; + std::string str; + if ((ret = myConn.open(host, port)) != 0) + { + str = myConn.getOpenMessage(ret); + ArLog::log(ArLog::Terse, "ArACTS_1_2: Could not connect to ACTS running on %s:%d (%s)", host, port, str.c_str()); + return false; + + } + myRequested = false; + setRobot(robot); + return true; +} + +/** + Closes the port to the ACTS server + @return true if the connection was closed properly, false otherwise +*/ +AREXPORT bool ArACTS_1_2::closePort(void) +{ + return myConn.close(); +} + +/** + Requests a packet from the ACTS server, specifically it sends the + request to the acts server over its connection + @return true if the command was sent succesfully, false otherwise +*/ +AREXPORT bool ArACTS_1_2::requestPacket(void) +{ + const char c = '0'; + if (myConn.getStatus() != ArDeviceConnection::STATUS_OPEN) + { + ArLog::log(ArLog::Verbose, + "ArACTS_1_2::requestPacket: No connection to ACTS.\n"); + return false; + } + return myConn.write(&c, 1); +} + +/** + Sends a command to the ACTS server requesting that ACTS quit + @return true if the request was sent succesfully, false otherwise +*/ +AREXPORT bool ArACTS_1_2::requestQuit(void) +{ + const char c = '1'; + if (myConn.getStatus() != ArDeviceConnection::STATUS_OPEN) + { + ArLog::log(ArLog::Verbose, + "ArACTS_1_2::requestQuit: No connection to ACTS.\n"); + return false; + } + return myConn.write(&c, 1); +} + +/** + Checks the connection to the ACTS server for data, if data is there it + fills in the blob information, otherwise just returns false + @return true if there was new data and the data could be read succesfully +*/ +AREXPORT bool ArACTS_1_2::receiveBlobInfo(void) +{ + int i; + char *data; + int numBlobs = 0; + + myBlobsBad = true; + if (myConn.getStatus() != ArDeviceConnection::STATUS_OPEN) + { + ArLog::log(ArLog::Verbose, + "ArACTS_1_2::receiveBlobInfo: No connection to ACTS.\n"); + return false; + } + + if (!myConn.read(myData, NUM_CHANNELS*4, 20)) + { + ArLog::log(ArLog::Verbose, + "ArACTS_1_2::receiveBlobInfo: Couldn't get the blob stats.\n"); + return false; + } + data = myData; + for (i = 0; i < NUM_CHANNELS; i++) + { + myBlobIndex[i] = (*(data++))-1; + myBlobIndex[i] = myBlobIndex[i] << 6; + myBlobIndex[i] |= (*(data++))-1; + + myBlobNum[i] = (*(data++))-1; + myBlobNum[i] = myBlobNum[i] << 6; + myBlobNum[i] |= (*(data++))-1; + numBlobs += myBlobNum[i]; + } + if (numBlobs == 0) + return true; + if (!myConn.read(myData, numBlobs * ACTS_BLOB_DATA_SIZE, 10)) + { + ArLog::log(ArLog::Normal, + "ArACTS_1_2::receiveBlobInfo: Couldn't read blob data.\n"); + return false; + } + myBlobsBad = false; + return true; +} + +/** + @return the number of blobs on the channel, or -1 if the channel is invalid +*/ +AREXPORT int ArACTS_1_2::getNumBlobs(int channel) +{ + + if (channel >= 1 && channel <= NUM_CHANNELS) + { + --channel; + return myBlobNum[channel]; + } + else + return -1; +} + +int ArACTS_1_2::getData(char *rawData) +{ + int temp; + temp = (*(rawData++)) - 1; + temp = temp << 6; + temp |= (*(rawData++)) - 1; + + return temp; +} + +/** + Gets the blobNumber from the channel given, fills the information for + that blob into the given blob structure. + @param channel the channel to get the blob from + @param blobNumber the number of the blob to get from the given channel + @param blob the blob instance to fill in with the data about the requested + blob + @return true if the blob instance could be filled in from the +*/ +AREXPORT bool ArACTS_1_2::getBlob(int channel, int blobNumber, ArACTSBlob *blob) +{ + char * blobInfo; + int i; + int temp; + + if (myBlobsBad) + { + ArLog::log(ArLog::Verbose, + "ArACTS_1_2::getBlob: There is no valid blob data.\n"); + return false; + } + + if (channel <= 0 || channel > NUM_CHANNELS) + { + ArLog::log(ArLog::Normal, + "ArACTS_1_2::getBlob: Channel %d out of range 1 to %d\n", + channel, NUM_CHANNELS); + return false; + } + --channel; + + if (blobNumber <= 0 || blobNumber > myBlobNum[channel]) + { + ArLog::log(ArLog::Normal, + "ArACTS_1_2::getBlob: Blob number %d out of range 1 to %d", + blobNumber, myBlobNum[channel]); + return false; + } + --blobNumber; + + blobInfo = myData + (myBlobIndex[channel]+blobNumber) * ACTS_BLOB_DATA_SIZE; + + temp = 0; + for (i = 0; i < 4; i++) + { + temp = temp << 6; + temp |= (*(blobInfo++)) - 1; + } + blob->setArea(temp); + + blob->setXCG(invertX(getData(blobInfo))); + blobInfo += 2; + + blob->setYCG(invertY(getData(blobInfo))); + blobInfo += 2; + + blob->setLeft(invertX(getData(blobInfo))); + blobInfo += 2; + + blob->setRight(invertX(getData(blobInfo))); + blobInfo += 2; + + blob->setTop(invertY(getData(blobInfo))); + blobInfo += 2; + + blob->setBottom(invertY(getData(blobInfo))); + blobInfo += 2; + + return true; +} + +int ArACTS_1_2::invertX(int before) +{ + if (myInverted) + return myWidth - before; + else + return before; +} + +int ArACTS_1_2::invertY(int before) +{ + if (myInverted) + return myHeight - before; + else + return before; +} + +/** + This inverts the image, but since ACTS doesn't tell this driver the + height or width, you need to provide both of those for the image, + default is 160x120. + @param width the width of the images acts is grabbing (pixels) + @param height the height of the images acts is grabbing (pixels) +**/ +AREXPORT void ArACTS_1_2::invert(int width, int height) +{ + myInverted = true; + myWidth = true; + myHeight = true; +} + +AREXPORT bool ArACTS_1_2::isConnected(void) +{ + if (myConn.getStatus() != ArDeviceConnection::STATUS_OPEN) + return false; + else + return true; +} + +AREXPORT ArRobot *ArACTS_1_2::getRobot(void) +{ + return myRobot; +} +AREXPORT void ArACTS_1_2::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&mySensorTaskCB); + myRobot->addSensorInterpTask("acts Handler", 50, &mySensorTaskCB); + } +} + +AREXPORT void ArACTS_1_2::actsHandler(void) +{ + if (!myRequested || receiveBlobInfo()) + { + myRequested = true; + requestPacket(); + } + +} diff --git a/Legacy/Aria/src/ArAMPTU.cpp b/Legacy/Aria/src/ArAMPTU.cpp new file mode 100644 index 0000000..739182f --- /dev/null +++ b/Legacy/Aria/src/ArAMPTU.cpp @@ -0,0 +1,346 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArAMPTU.h" +#include "ArCommands.h" +#include "ArLog.h" +#include "ArRobot.h" + +AREXPORT ArAMPTUPacket::ArAMPTUPacket(ArTypes::UByte2 bufferSize) : + ArBasePacket(bufferSize, 3) +{ + myUnitNumber = 0; +} + +AREXPORT ArAMPTUPacket::~ArAMPTUPacket() +{ + +} + +AREXPORT void ArAMPTUPacket::byteToBuf(ArTypes::Byte val) +{ + if (myLength + 1 > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArAMPTUPacket::uByteToBuf: Trying to add beyond length of buffer."); + return; + } + myBuf[myLength] = val; + ++myLength; +} + +AREXPORT void ArAMPTUPacket::byte2ToBuf(ArTypes::Byte2 val) +{ + if ((myLength + 2) > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArAMPTUPacket::Byte2ToBuf: Trying to add beyond length of buffer."); + return; + } + myBuf[myLength] = val/255;//(val & 0xff00) >> 8; + ++myLength; + myBuf[myLength] = val%255;//(val & 0x00ff); + ++myLength; +} + +AREXPORT void ArAMPTUPacket::finalizePacket(void) +{ + int length = myLength; + myLength = 0; + byteToBuf('P'); + byteToBuf('T'); + byteToBuf('0' + myUnitNumber); + myLength = length; +} + +/** + Each AMPTU has a unit number, so that you can daisy chain multiple ones + together. This number is incorporated into the packet header, thus the + packet has to know what the number is. + @return the unit number this packet has +*/ +AREXPORT unsigned char ArAMPTUPacket::getUnitNumber(void) +{ + return myUnitNumber; +} + +/** + Each AMPTU has a unit number, so that you can daisy chain multiple ones + together. This number is incorporated into the packet header, thus the + packet has to know what the number is. + @param unitNumber the unit number for this packet, this needs to be 0-7 + @return true if the number is acceptable, false otherwise +*/ +AREXPORT bool ArAMPTUPacket::setUnitNumber(unsigned char unitNumber) +{ + if (unitNumber > 7) + return false; + + myUnitNumber = unitNumber; + return true; +} + +/** + @param robot the robot to attach to + @param unitNumber the unit number for this packet, this needs to be 0-7 +*/ +AREXPORT ArAMPTU::ArAMPTU(ArRobot *robot, int unitNumber) : + ArPTZ(robot) +{ + myRobot = robot; + myPanSlew = 0; + myTiltSlew = 0; + myPan = 0; + myTilt = 0; + myUnitNumber = unitNumber; + ArPTZ::setLimits(150, -150, 90, -90); +} + +AREXPORT ArAMPTU::~ArAMPTU() +{ +} + +AREXPORT bool ArAMPTU::init(void) +{ + if (!myPacket.setUnitNumber(myUnitNumber)) + { + ArLog::log(ArLog::Terse, "ArAMPTU::init: the unit number is invalid."); + return false; + } + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::INIT); + if (!sendPacket(&myPacket)) + return false; + + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::RESP); + myPacket.byteToBuf(0); + if (!sendPacket(&myPacket)) + return false; + + if (!panTilt(0, 0)) + return false; + + return true; +} + +AREXPORT bool ArAMPTU::pan_i(double deg) +{ + if (deg > getMaxPosPan_i()) + deg = getMaxPosPan_i(); + if (deg < getMaxNegPan_i()) + deg = getMaxNegPan_i(); + + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::ABSPAN); + myPacket.byte2ToBuf(ArMath::roundInt(deg + + (getMaxPosPan_i() - getMaxNegPan_i())/2)); + + myPan = deg; + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::panRel_i(double deg) +{ + if (deg + myPan > getMaxPosPan_i()) + deg = getMaxPosPan_i() - myPan; + if (deg + myPan < getMaxNegPan_i()) + deg = getMaxNegPan_i() - myPan; + + myPan += deg; + myPacket.empty(); + + if (deg >= 0) + myPacket.byteToBuf(ArAMPTUCommands::RELPANCW); + else + myPacket.byteToBuf(ArAMPTUCommands::RELPANCCW); + + myPacket.byte2ToBuf(ArMath::roundInt(fabs(deg))); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::tilt_i(double deg) +{ + if (deg > getMaxPosTilt_i()) + deg = getMaxPosTilt_i(); + if (deg < getMaxNegTilt_i()) + deg = getMaxNegTilt_i(); + + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::ABSTILT); + myPacket.byteToBuf(ArMath::roundInt(deg + + (getMaxPosTilt_i() - getMaxNegTilt_i())/2)); + + myTilt = deg; + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::tiltRel_i(double deg) +{ + if (deg + myTilt > getMaxPosTilt_i()) + deg = getMaxPosTilt_i() - myTilt; + if (deg + myTilt < getMaxNegTilt_i()) + deg = getMaxNegTilt_i() - myTilt; + + myTilt += deg; + myPacket.empty(); + + if (deg >= 0) + myPacket.byteToBuf(ArAMPTUCommands::RELTILTU); + else + myPacket.byteToBuf(ArAMPTUCommands::RELTILTD); + + myPacket.byteToBuf(ArMath::roundInt(fabs(deg))); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::panTilt_i(double panDeg, double tiltDeg) +{ + if (panDeg > getMaxPosPan_i()) + panDeg = getMaxPosPan_i(); + if (panDeg < getMaxNegPan_i()) + panDeg = getMaxNegPan_i(); + + if (tiltDeg > getMaxPosTilt_i()) + tiltDeg = getMaxPosTilt_i(); + if (tiltDeg < getMaxNegTilt_i()) + tiltDeg = getMaxNegTilt_i(); + + if (myPan - panDeg == 0 && myTilt - tiltDeg == 0) + return true; + if (myPan - panDeg == 0) + return tilt(tiltDeg); + if (myTilt - tiltDeg == 0) + return pan(panDeg); + myPan = panDeg; + myTilt = tiltDeg; + + + + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::PANTILT); + myPacket.byte2ToBuf(ArMath::roundInt(myPan + + (getMaxPosPan_i() - getMaxNegPan_i())/2)); + myPacket.byteToBuf(ArMath::roundInt(myTilt + (getMaxPosTilt_i() - + getMaxNegTilt_i())/2)); + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::panTiltRel_i(double panDeg, double tiltDeg) +{ + if (panDeg + myPan > getMaxPosPan_i()) + panDeg = getMaxPosPan_i() - myPan; + if (panDeg + myPan < getMaxNegPan_i()) + panDeg = getMaxNegPan_i() - myPan; + + if (tiltDeg + myTilt > getMaxPosTilt_i()) + tiltDeg = getMaxPosTilt_i() - myTilt; + if (tiltDeg + myTilt < getMaxNegTilt_i()) + tiltDeg = getMaxNegTilt_i() - myTilt; + + myPan += panDeg; + myTilt += tiltDeg; + + if (panDeg == 0 && tiltDeg == 0) + return true; + if (panDeg == 0) + return tiltRel(tiltDeg); + if (tiltDeg == 0) + return panRel(panDeg); + + myPacket.empty(); + if (panDeg >= 0 && tiltDeg >= 0) + myPacket.byteToBuf(ArAMPTUCommands::PANTILTUCW); + else if (panDeg >= 0 && tiltDeg < 0) + myPacket.byteToBuf(ArAMPTUCommands::PANTILTDCW); + else if (panDeg < 0 && tiltDeg >= 0) + myPacket.byteToBuf(ArAMPTUCommands::PANTILTUCCW); + else + myPacket.byteToBuf(ArAMPTUCommands::PANTILTDCCW); + + myPacket.byte2ToBuf(ArMath::roundInt(fabs(panDeg))); + myPacket.byte2ToBuf(ArMath::roundInt(fabs(tiltDeg))); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::panSlew(double deg) +{ + if (deg > MAX_PAN_SLEW) + deg = MAX_PAN_SLEW; + if (deg < MIN_SLEW) + deg = MIN_SLEW; + + myPanSlew = deg; + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::PANSLEW); + myPacket.byteToBuf((int)(256 - (3840 / (float)deg))); + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::tiltSlew(double deg) +{ + if (deg > MAX_TILT_SLEW) + deg = MAX_TILT_SLEW; + if (deg < MIN_SLEW) + deg = MIN_SLEW; + + myTiltSlew = deg; + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::TILTSLEW); + myPacket.byteToBuf((int)(256 - (3840 / (float)deg))); + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::pause(void) +{ + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::PAUSE); + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::resume(void) +{ + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::CONT); + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::purge(void) +{ + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::PURGE); + return sendPacket(&myPacket); +} + +AREXPORT bool ArAMPTU::requestStatus(void) +{ + myPacket.empty(); + myPacket.byteToBuf(ArAMPTUCommands::STATUS); + return sendPacket(&myPacket); +} + diff --git a/Legacy/Aria/src/ArASyncTask.cpp b/Legacy/Aria/src/ArASyncTask.cpp new file mode 100644 index 0000000..3412631 --- /dev/null +++ b/Legacy/Aria/src/ArASyncTask.cpp @@ -0,0 +1,90 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#if !defined(WIN32) || defined(MINGW) +#include +#endif +#include "ariaOSDef.h" +#include "ArASyncTask.h" +#include "ArLog.h" + + +AREXPORT ArASyncTask::ArASyncTask() : + myFunc(this, &ArASyncTask::runThread, NULL) +{ +} + +AREXPORT ArASyncTask::~ArASyncTask() +{ +} + +AREXPORT int ArASyncTask::create(bool joinable, bool lowerPriority) +{ + return(ArThread::create(&myFunc, joinable, lowerPriority)); +} + +/** + This will run the code of the ArASyncTask without creating a new + thread to run it in. It performs the needed setup then calls runThread(). + This is good if you have a task which you wish to run multiple + instances of and you want to use the main() thread instead of having + it block, waiting for exit of the program. + @param arg the argument to pass to the runThread() +*/ +AREXPORT void * ArASyncTask::runInThisThread(void *arg) +{ + myJoinable=true; + myRunning=true; +#if defined(WIN32) && !defined(MINGW) + myThread=GetCurrentThreadId(); +#else + myThread=pthread_self(); +#endif + + if (myName.size() == 0) + { + ArLog::log(ourLogLevel, "Running anonymous thread with ID %d", + myThread); + //ArLog::logBacktrace(ArLog::Normal); + } + else + { + ArLog::log(ourLogLevel, "Running %s thread with ID %d", myName.c_str(), + myThread); + } + + addThreadToMap(myThread, this); + /* + ourThreadsMutex.lock(); + // MPL BUGFIX, this wasn't workign for some reason (was printing + // 0)... so I got rid of it and did it the easier way anyhow + //printf("!!!! %d\n", ourThreads.insert(MapType::value_type(myThread, this)).second); + ourThreads[myThread] = this; + ourThreadsMutex.unlock(); + */ + + return(runThread(arg)); +} diff --git a/Legacy/Aria/src/ArAction.cpp b/Legacy/Aria/src/ArAction.cpp new file mode 100644 index 0000000..503329e --- /dev/null +++ b/Legacy/Aria/src/ArAction.cpp @@ -0,0 +1,158 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArResolver.h" +#include "ArAction.h" +#include "ArLog.h" +#include "ArRobot.h" +#include + +AREXPORT bool ArAction::ourDefaultActivationState = true; + +AREXPORT ArAction::ArAction(const char *name, const char *description) +{ + myRobot = NULL; + myNumArgs = 0; + myName = name; + myDescription = description; + myIsActive = ourDefaultActivationState; +} + +AREXPORT ArAction::~ArAction() +{ + if (myRobot != NULL) + myRobot->remAction(this); +} + +AREXPORT const char *ArAction::getName(void) const +{ + return myName.c_str(); +} + +AREXPORT const char *ArAction::getDescription(void) const +{ + return myDescription.c_str(); +} + +AREXPORT int ArAction::getNumArgs(void) const +{ + return myNumArgs; +} + +AREXPORT void ArAction::setNextArgument(ArArg const &arg) +{ + myArgumentMap[myNumArgs] = arg; + myNumArgs++; +} + +AREXPORT ArArg *ArAction::getArg(int number) +{ + std::map::iterator it; + + it = myArgumentMap.find(number); + if (it != myArgumentMap.end()) + return &(*it).second; + else + return NULL; +} + +AREXPORT const ArArg *ArAction::getArg(int number) const +{ + std::map::const_iterator it; + + it = myArgumentMap.find(number); + if (it != myArgumentMap.end()) + return &(*it).second; + else + return NULL; +} + +/** + * @swignote If you override this method in a Java or Python subclass, use + * setActionRobotObj(ArRobot) instead of trying to call super.setRobot() or + * ArAction.setRobot(). (SWIG's subclassing "directors" feature cannot properly + * direct the call to the parent class, an infinite recursion results instead.) + */ +AREXPORT void ArAction::setRobot(ArRobot *robot) +{ + myRobot = robot; +} + +AREXPORT bool ArAction::isActive(void) const +{ + return myIsActive; +} + +AREXPORT void ArAction::activate(void) +{ + myIsActive = true; +} + +AREXPORT void ArAction::deactivate(void) +{ + myIsActive = false; +} + +AREXPORT void ArAction::log(bool verbose) const +{ + int i; + std::string str; + const ArArg *arg; + const ArActionDesired *desired; + + ArLog::log(ArLog::Terse, "Action %s isActive %d", getName(), myIsActive); + if (myIsActive && (desired = getDesired()) != NULL) + desired->log(); + if (!verbose) + return; + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "Action %s is described as: %s", + getName(), getDescription()); + else + ArLog::log(ArLog::Terse, "Action %s has no description.", + getName()); + if (getNumArgs() == 0) + ArLog::log(ArLog::Terse, "Action %s has no arguments.\n", + getName()); + else + { + ArLog::log(ArLog::Terse, "Action %s has %d arguments, of type(s):", + (getName()), getNumArgs()); + + for (i = 0; i < getNumArgs(); i++) + { + arg = getArg(i); + if (arg == NULL) + continue; + arg->log(); + } + ArLog::log(ArLog::Terse, ""); + } +} + + + diff --git a/Legacy/Aria/src/ArActionAvoidFront.cpp b/Legacy/Aria/src/ArActionAvoidFront.cpp new file mode 100644 index 0000000..41c01ef --- /dev/null +++ b/Legacy/Aria/src/ArActionAvoidFront.cpp @@ -0,0 +1,158 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" + +#include "ariaOSDef.h" +#include "ArActionAvoidFront.h" +#include "ArResolver.h" +#include "ArRobot.h" +#include "ArLog.h" + +/** + @param name the name of the action + @param obstacleDistance distance at which to turn. (mm) + @param avoidVelocity Speed at which to go while avoiding an obstacle. + (mm/sec) + @param turnAmount Degrees to turn relative to current heading while + avoiding obstacle (deg) + @param useTableIRIfAvail Whether to use the table sensing IR if they are + available +*/ +AREXPORT ArActionAvoidFront::ArActionAvoidFront(const char *name, + double obstacleDistance, + double avoidVelocity, + double turnAmount, + bool useTableIRIfAvail) : + ArAction(name, "Slows down and avoids obstacles in front of the robot.") +{ + setNextArgument(ArArg("obstacle distance", &myObsDist, + "Distance at which to turn. (mm)")); + myObsDist = obstacleDistance; + + setNextArgument(ArArg("avoid speed", &myAvoidVel, + "Speed at which to go while avoiding an obstacle. (mm/sec)")); + myAvoidVel = avoidVelocity; + + setNextArgument(ArArg("turn ammount", &myTurnAmountParam, + "Degrees to turn relative to current heading while avoiding obstacle (deg)")); + myTurnAmountParam = turnAmount; + + setNextArgument(ArArg("use table IR", &myUseTableIRIfAvail, + "true to use table sensing IR for avoidance if the robot has them, false otherwise")); + myUseTableIRIfAvail = useTableIRIfAvail; + + myTurning = 0; +} + +AREXPORT ArActionAvoidFront::~ArActionAvoidFront() +{ + +} + +AREXPORT ArActionDesired *ArActionAvoidFront::fire(ArActionDesired currentDesired) +{ + double dist, angle; + + if (currentDesired.getDeltaHeadingStrength() >= 1.0) + myTurning = 0; + + myDesired.reset(); + + dist = (myRobot->checkRangeDevicesCurrentPolar(-70, 70, &angle) + - myRobot->getRobotRadius()); + + // printf("%5.0f %3.0f ", dist, angle); + + if (dist > myObsDist && + (!myUseTableIRIfAvail || + (myUseTableIRIfAvail && !myRobot->hasTableSensingIR()) || + (myUseTableIRIfAvail && myRobot->hasTableSensingIR() && + !myRobot->isLeftTableSensingIRTriggered() && + !myRobot->isRightTableSensingIRTriggered()))) + { + if (myTurning != 0) + { + myDesired.setDeltaHeading(0); + myTurning = 0; + return &myDesired; + } + else + { + //printf("\n"); + myTurning = 0; + return NULL; + } + } + +// printf("Avoiding "); + + if (myTurning == 0) + { + if (myUseTableIRIfAvail && myRobot->hasTableSensingIR() && + myRobot->isLeftTableSensingIRTriggered()) + myTurning = 1; + else if (myUseTableIRIfAvail && myRobot->hasTableSensingIR() && + myRobot->isRightTableSensingIRTriggered()) + myTurning = -1; + else if (angle < 0) + myTurning = 1; + else + myTurning = -1; + myTurnAmount = myTurnAmountParam; + myQuadrants.clear(); + } + + myQuadrants.update(myRobot->getTh()); + if (myTurning && myQuadrants.didAll()) + { + myQuadrants.clear(); + myTurnAmount /= 2; + if (myTurnAmount == 0) + myTurnAmount = myTurnAmountParam; + } + + myDesired.setDeltaHeading(myTurning * myTurnAmount); + + if (dist > myObsDist/2 && + (!myUseTableIRIfAvail || + (myUseTableIRIfAvail && !myRobot->hasTableSensingIR()) || + (myUseTableIRIfAvail && myRobot->hasTableSensingIR() && + !myRobot->isLeftTableSensingIRTriggered() && + !myRobot->isRightTableSensingIRTriggered()))) + { + //printf(" scaling %f %f %f ", myAvoidVel * dist / myObsDist, + //dist, myObsDist); + myDesired.setVel(myAvoidVel * dist / myObsDist); + } + else + { +// printf(" zerovel\n"); + myDesired.setVel(0); + } + + //printf("\n"); + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionAvoidSide.cpp b/Legacy/Aria/src/ArActionAvoidSide.cpp new file mode 100644 index 0000000..540f0c5 --- /dev/null +++ b/Legacy/Aria/src/ArActionAvoidSide.cpp @@ -0,0 +1,85 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionAvoidSide.h" +#include "ArRobot.h" + +/** + @param name name of the action + @param obstacleDistance distance at which to start avoiding (mm) + @param turnAmount degrees at which to turn (deg) +*/ + +AREXPORT ArActionAvoidSide::ArActionAvoidSide(const char *name, + double obstacleDistance, + double turnAmount) : + ArAction(name, "Avoids side obstacles, ie walls") +{ + setNextArgument(ArArg("obstacle distance", &myObsDist, + "Distance at which to start avoiding (mm)")); + myObsDist = obstacleDistance; + setNextArgument(ArArg("turn amount", &myTurnAmount, + "Degrees at which to turn (deg)")); + myTurnAmount = turnAmount; + + myTurning = false; + +} + +AREXPORT ArActionAvoidSide::~ArActionAvoidSide() +{ + +} + +AREXPORT ArActionDesired *ArActionAvoidSide::fire( + ArActionDesired currentDesired) +{ + double leftDist, rightDist; + + leftDist = (myRobot->checkRangeDevicesCurrentPolar(60, 120) - + myRobot->getRobotRadius()); + rightDist = (myRobot->checkRangeDevicesCurrentPolar(-120, -60) - + myRobot->getRobotRadius()); + + myDesired.reset(); + if (leftDist < myObsDist) + { + myDesired.setDeltaHeading(-myTurnAmount); + myDesired.setVel(0); + myTurning = true; + } + else if (rightDist < myObsDist) + { + myDesired.setDeltaHeading(myTurnAmount); + myDesired.setVel(0); + myTurning = true; + } + else if (myTurning) + myDesired.setDeltaHeading(0); + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionBumpers.cpp b/Legacy/Aria/src/ArActionBumpers.cpp new file mode 100644 index 0000000..6914c26 --- /dev/null +++ b/Legacy/Aria/src/ArActionBumpers.cpp @@ -0,0 +1,232 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionBumpers.h" +#include "ArRobot.h" + +/** + @param name name of the action instance + @param backOffSpeed speed at which to back away (mm/sec) + @param backOffTime number of milisecons to back up for (msec) + @param turnTime number of milisecons to alow for turn (msec) + @param setMaximums if true, set desired maximum translation velocity limits to backOffSpeed while performing the action; if false, retain existing limits. +*/ +AREXPORT ArActionBumpers::ArActionBumpers(const char *name, + double backOffSpeed, + int backOffTime, int turnTime, + bool setMaximums) : + ArAction(name, "Reacts to the bumpers triggering") +{ + setNextArgument(ArArg("back off speed", &myBackOffSpeed, + "Speed at which to back away (mm/sec)")); + myBackOffSpeed = backOffSpeed; + + setNextArgument(ArArg("back off time", &myBackOffTime, + "Number of msec to back up for (msec)")); + myBackOffTime = backOffTime; + + //myStopTime = 1000; + + setNextArgument(ArArg("turn time", &myTurnTime, + "Number of msec to allow for turn (msec)")); + myTurnTime = turnTime; + + setNextArgument(ArArg("set maximums", &mySetMaximums, + "Whether to set maximum vels or not (bool)")); + mySetMaximums = setMaximums; + + myFiring = false; + mySpeed = 0.0; + myHeading = 0.0; + + // MPL I wrote this code, but checking for BIT8 makes no sense, BIT0 is the stall, BIT8 would be beyond this data + myBumpMask = (ArUtil::BIT1 | ArUtil::BIT2 | ArUtil::BIT3 | ArUtil::BIT4 | + ArUtil::BIT5 | ArUtil::BIT6 | ArUtil::BIT7 | ArUtil::BIT8); +} + +AREXPORT ArActionBumpers::~ArActionBumpers() +{ + +} + +AREXPORT void ArActionBumpers::activate(void) +{ + myFiring = false; + ArAction::activate(); +} + +AREXPORT double ArActionBumpers::findDegreesToTurn(int bumpValue, int whichBumper) +{ + double totalTurn = 0; + int numTurn = 0; + int numBumpers; + + double turnRange = 135; + + if(whichBumper == 1) numBumpers = myRobot->getNumFrontBumpers(); + else numBumpers = myRobot->getNumRearBumpers(); + + for (int i = 0; i < numBumpers; i++) + { + // MPL I wrote this code, but checking for BIT8 makes no sense, BIT0 is the stall, BIT8 would be beyond this data + if((i == 0 && (bumpValue & ArUtil::BIT1)) || + (i == 1 && (bumpValue & ArUtil::BIT2)) || + (i == 2 && (bumpValue & ArUtil::BIT3)) || + (i == 3 && (bumpValue & ArUtil::BIT4)) || + (i == 4 && (bumpValue & ArUtil::BIT5)) || + (i == 5 && (bumpValue & ArUtil::BIT6)) || + (i == 6 && (bumpValue & ArUtil::BIT7)) || + (i == 7 && (bumpValue & ArUtil::BIT8))) + { + totalTurn = totalTurn + (i * (turnRange / (double)numBumpers) + + ((turnRange / (double)numBumpers) / 2) - (turnRange / 2)); + ++numTurn; + } + } + + totalTurn = totalTurn / (double)numTurn; + + if(totalTurn < 0) totalTurn = ((turnRange / 2) + totalTurn) * -1; + else totalTurn = ((turnRange / 2) - totalTurn); + + return totalTurn; +} + +AREXPORT ArActionDesired *ArActionBumpers::fire(ArActionDesired currentDesired) +{ + int frontBump; + int rearBump; + int whichBumper; + + if (myRobot->hasFrontBumpers()) + frontBump = ((myRobot->getStallValue() & 0xff00) >> 8) & myBumpMask; + else + frontBump = 0; + if (myRobot->hasRearBumpers()) + rearBump = (myRobot->getStallValue() & 0xff) & myBumpMask; + else + rearBump = 0; + + if (frontBump != 0) + ArLog::log(ArLog::Verbose, "########## Front bump %x\n", frontBump); + if (rearBump != 0) + ArLog::log(ArLog::Verbose, "########## Rear bump %x\n", rearBump); + + + myDesired.reset(); + if (myFiring) + { + if (myStartBack.mSecSince() < myBackOffTime) + { + if ((mySpeed < 0 && rearBump != 0) || + (mySpeed > 0 && frontBump != 0)) + { + //printf("0 norot\n"); + myDesired.setVel(0); + } + else + { + //printf("%.0f norot\n", mySpeed); + myDesired.setVel(mySpeed); + } + + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myStartBack.mSecSince() < myBackOffTime + myTurnTime && + ArMath::fabs(ArMath::subAngle(myRobot->getTh(), myHeading)) > 3) + { + //printf("0 %.0f\n", myHeading); + myDesired.setVel(0); + myDesired.setHeading(myHeading); + return &myDesired; + } + /* + else if (myStoppedSince.mSecSince() < myStopTime) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + */ + myFiring = false; + ArLog::log(ArLog::Normal, "Bumpers: done"); + } + + if (myRobot->getVel() > 25) + { + if (frontBump == 0) + return NULL; + whichBumper = 1; + ArLog::log(ArLog::Normal, + "Bumpers: Bumped a forward bumper while going forward, turning %.0f", + findDegreesToTurn(frontBump, whichBumper)); + myHeading = ArMath::addAngle(myRobot->getTh(), + findDegreesToTurn(frontBump, whichBumper)); + mySpeed = -myBackOffSpeed; + myStartBack.setToNow(); + } + else if (myRobot->getVel() < -25) + { + if (rearBump == 0) + return NULL; + whichBumper = 2; + ArLog::log(ArLog::Normal, + "Bumpers: Bumped a rear bumper while going backwards, turning %.0f \n", + findDegreesToTurn(rearBump, whichBumper)); + myHeading = ArMath::subAngle(myRobot->getTh(), + findDegreesToTurn(rearBump, whichBumper)); + mySpeed = myBackOffSpeed; + myStartBack.setToNow(); + } + /* + else if (myRobot->getVel() >= -5 && myRobot->getVel() <= 5) + { + if (frontBump == 0 && rearBump == 0) + return NULL; + myStoppedSince.setToNow(); + } + */ + else + { + return NULL; + } + + //myStartBack.setToNow(); + myFiring = true; + myDesired.setVel(mySpeed); + myDesired.setHeading(myHeading); + // Set the maximums if that feature is desired + if (mySetMaximums) + { + if (mySpeed > 0) + myDesired.setMaxVel(mySpeed); + else + myDesired.setMaxNegVel(mySpeed); + } + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionColorFollow.cpp b/Legacy/Aria/src/ArActionColorFollow.cpp new file mode 100644 index 0000000..3a7b416 --- /dev/null +++ b/Legacy/Aria/src/ArActionColorFollow.cpp @@ -0,0 +1,285 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" + +#include "ariaOSDef.h" +#include "ArActionColorFollow.h" +#include "ArResolver.h" +#include "ArRobot.h" + +// Constructor: Initialize the color follow action +AREXPORT ArActionColorFollow::ArActionColorFollow(const char *name, ArACTS_1_2 *acts, + ArPTZ *camera, double speed, + int width, int height) : + ArAction(name, "Follows the largest blob of color.") +{ + myActs = acts; + myAcquire = true; + killMovement = true; + myCamera = camera; + myChannel = 0; + myState = NO_TARGET; + myMove = STOPPED; + myLocation = CENTER; + setChannel(1); + myMaxTime = 2000; + myWidth = width; + myHeight = height; + mySpeed = speed; +} + +// Destructor +AREXPORT ArActionColorFollow::~ArActionColorFollow(void) {} + + +// The color follow action +AREXPORT ArActionDesired *ArActionColorFollow::fire(ArActionDesired currentDesired) +{ + ArACTSBlob blob; + ArACTSBlob largestBlob; + + bool haveBlob = false; + + int numberOfBlobs; + int blobArea = 20; + + double xRel, yRel; + + // Reset the desired action + myDesired.reset(); + + // If we are in fact connected to ACTS... + if(myActs != NULL) + { + numberOfBlobs = myActs->getNumBlobs(myChannel); + + // If there are blobs to be seen, set the time to now + if(numberOfBlobs != 0) + { + // Find the largest blob + for(int i = 0; i < numberOfBlobs; i++) + { + myActs->getBlob(myChannel, i + 1, &blob); + if(blob.getArea() > blobArea) + { + haveBlob = true; + blobArea = blob.getArea(); + largestBlob = blob; + } + } + + myLastSeen.setToNow(); + } + + // Decide the state of myState: do we have a target or not + if (myLastSeen.mSecSince() > myMaxTime) + { + myState = NO_TARGET; + } + else + { + myState = TARGET; + } + + // If we have a target start following + if(myState == TARGET) myMove = FOLLOWING; + // If not and we are allowed to acquire one, start searching + else if(myState == NO_TARGET && myAcquire) + { + myMove = ACQUIRING; + } + // Otherwise stay still + else myMove = STOPPED; + } + + // We are not connected to acts, dont do anything + else + { + myState = NO_TARGET; + myMove = STOPPED; + } + + // If we are following a blob of color + if(myMove == FOLLOWING) + { + if(haveBlob) + { + // Determine where the largest blob's center of gravity + // is relative to the center of the camera + xRel = (double)(largestBlob.getXCG() - myWidth/2.0) / (double)myWidth; + yRel = (double)(largestBlob.getYCG() - myHeight/2.0) / (double)myHeight; + + // Tilt the camera toward the blob + if(!(ArMath::fabs(yRel) < .20) && myCamera != NULL) + { + if (-yRel > 0) + myCamera->tiltRel(1); + else + myCamera->tiltRel(-1); + } + + // If we can move, move after that blob + if(!killMovement) + { + // Set the heading and velocity for the robot + if (ArMath::fabs(xRel) < .10) + { + myLocation = CENTER; + myDesired.setDeltaHeading(0); + myDesired.setVel(mySpeed); + return &myDesired; + } + else + { + if (ArMath::fabs(-xRel * 10) <= 10) + { + if(xRel < 0) myLocation = RIGHT; + if(xRel > 0) myLocation = LEFT; + myDesired.setDeltaHeading(-xRel * 10); + } + else if (-xRel > 0) + { + myLocation = RIGHT; + myDesired.setDeltaHeading(10); + } + else + { + myLocation = LEFT; + myDesired.setDeltaHeading(-10); + } + + myDesired.setVel(mySpeed); + return &myDesired; + } + } + } + // If we do not have a blob in sight, yet are still + // supposed to be following one... + else if(!killMovement) + { + // head toward where the blob was last seen + if(myLocation == LEFT) + { + myDesired.setDeltaHeading(-10); + myDesired.setVel(0); + } + if(myLocation == RIGHT) + { + myDesired.setDeltaHeading(10); + myDesired.setVel(0); + } + if(myLocation == CENTER) + { + myDesired.setDeltaHeading(0); + myDesired.setVel(mySpeed); + } + + return &myDesired; + } + } + // If we are acquiring, keep turning around in a circle + else if(myMove == ACQUIRING) + { + if(myCamera != NULL) myCamera->tilt(0); + + if (!killMovement) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(8); + return &myDesired; + } + } + + // If we dont meet one of the above conditions, just sit tight + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; +} + +// Set the channel that the blob info will be obtained from +AREXPORT bool ArActionColorFollow::setChannel(int channel) +{ + // Make sure that the requested channel is in range + if (channel >= 1 && channel <= ArACTS_1_2::NUM_CHANNELS) + { + myChannel = channel; + return true; + } + else + return false; +} + +// Set the camera that we are controlling +AREXPORT void ArActionColorFollow::setCamera(ArPTZ *camera) +{ + myCamera = camera; +} + +// Toggle whether or not we should attempt to acquire a +// target or just stay still +AREXPORT void ArActionColorFollow::setAcquire(bool acquire) +{ + myAcquire = acquire; +} + +// Kill movement +AREXPORT void ArActionColorFollow::stopMovement(void) +{ + killMovement = true; +} + +// Start moving +AREXPORT void ArActionColorFollow::startMovement(void) +{ + killMovement = false; +} + +// Return the channel that we are looking on +AREXPORT int ArActionColorFollow::getChannel(void) +{ + return myChannel; +} + +// Return if we are actively trying to find a blob +// if one cannot be seen +AREXPORT bool ArActionColorFollow::getAcquire(void) +{ + return myAcquire; +} + +// Return whether we are supposed to be moving or not +AREXPORT bool ArActionColorFollow::getMovement(void) +{ + return !killMovement; +} + +// Return whether we can see a target or not +AREXPORT bool ArActionColorFollow::getBlob(void) +{ + if(myState == TARGET) return true; + else return false; +} diff --git a/Legacy/Aria/src/ArActionConstantVelocity.cpp b/Legacy/Aria/src/ArActionConstantVelocity.cpp new file mode 100644 index 0000000..5dca9a0 --- /dev/null +++ b/Legacy/Aria/src/ArActionConstantVelocity.cpp @@ -0,0 +1,57 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionConstantVelocity.h" + +/** + @param name name of the action + @param velocity velocity to travel at (mm/sec) +*/ +AREXPORT ArActionConstantVelocity::ArActionConstantVelocity(const char *name, + double velocity) : + ArAction(name, "Sets the robot to travel straight at a constant velocity.") +{ + setNextArgument(ArArg("velocity", &myVelocity, + "The velocity to make the robot travel at. (mm/sec)")); + myVelocity = velocity; +} + +AREXPORT ArActionConstantVelocity::~ArActionConstantVelocity() +{ + +} + +AREXPORT ArActionDesired *ArActionConstantVelocity::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + + myDesired.setVel(myVelocity); + myDesired.setDeltaHeading(0); + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionDeceleratingLimiter.cpp b/Legacy/Aria/src/ArActionDeceleratingLimiter.cpp new file mode 100644 index 0000000..cb3320b --- /dev/null +++ b/Legacy/Aria/src/ArActionDeceleratingLimiter.cpp @@ -0,0 +1,550 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionDeceleratingLimiter.h" +#include "ArRobot.h" +#include "ArCommands.h" +#include "ariaInternal.h" +#include "ArRobotConfigPacketReader.h" +#include "ArRangeDevice.h" + +/** + @param name name of the action + @param type whether we're an action for going forwards (ArActionDeceleratingLimiter::FORWARDS) + backwards (ArActionDeceleratingLimiter::BACKWARDS), or laterally to the left + (ArActionDeceleratingLimiter::LATERAL_LEFT) or laterally + to the right (ArActionDeceleratingLimiter::LATERAL_RIGHT). This causes + ArActionDeceleratingLimiter to choose the right values and choose X or Y translation + decelerations and speeds. +*/ +AREXPORT ArActionDeceleratingLimiter::ArActionDeceleratingLimiter( + const char *name, + LimiterType type) : + ArAction(name, + "Slows the robot down and cranks up deceleration so as not to hit anything in front of it.") +{ + myType = type; + setParameters(); + + myLastStopped = false; + myUseLocationDependentDevices = true; + myStopRotationToo = false; + +} + +AREXPORT ArActionDeceleratingLimiter::~ArActionDeceleratingLimiter() +{ + +} + +/** + @param clearance distance at which to estop (mm) + @param sideClearanceAtSlowSpeed distance on the side to stop for if going at slow speed or slower (mm) + @param paddingAtSlowSpeed distance in addition to clerance at which to stop at slow speed (mm) + @param slowSpeed speed which we consider to be "slow" (mm/sec) + @param sideClearanceAtFastSpeed distance on the side to stop for if going at fast speed or faster (mm) + @param paddingAtFastSpeed distance in addition to clerance at which to stop at fast speed (mm) + @param fastSpeed speed which we consider to be "fast" (mm/sec) + @param preferredDecel the maximum deceleration to slow for obstacles (unless it will be insufficient to keep the clearances free, then decelerate faster) + @param useEStop if something is detected within the clearance, cause an immediate emergecy stop + @param maxEmergencyDecel ultimate limit on deceleration to apply when slowing for an obstacle detected within clearance (mm/sec/sec); if 0, use the robot's maximum decel parameter. +*/ +AREXPORT void ArActionDeceleratingLimiter::setParameters( + double clearance, + double sideClearanceAtSlowSpeed, + double paddingAtSlowSpeed, + double slowSpeed, + double sideClearanceAtFastSpeed, + double paddingAtFastSpeed, + double fastSpeed, + double preferredDecel, + bool useEStop, + double maxEmergencyDecel) +{ + myClearance = clearance; + mySideClearanceAtSlowSpeed = sideClearanceAtSlowSpeed; + myPaddingAtSlowSpeed = paddingAtSlowSpeed; + mySlowSpeed = slowSpeed; + mySideClearanceAtFastSpeed = sideClearanceAtFastSpeed; + myPaddingAtFastSpeed = paddingAtFastSpeed; + myFastSpeed = fastSpeed; + myPreferredDecel = preferredDecel; + myUseEStop = useEStop; + myMaxEmergencyDecel = maxEmergencyDecel; +} + +AREXPORT void ArActionDeceleratingLimiter::addToConfig(ArConfig *config, + const char *section, + const char *prefix) +{ + std::string strPrefix; + std::string name; + if (prefix == NULL || prefix[0] == '\0') + strPrefix = ""; + else + strPrefix = prefix; + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); + + name = strPrefix; + name += "Clearance"; + config->addParam( + ArConfigArg(name.c_str(), &myClearance, + "Don't get closer than this to something in front or back. (mm)"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "SlowSpeed"; + config->addParam( + ArConfigArg(name.c_str(), + &mySlowSpeed, + "Consider this speed slow (mm/sec)"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "SideClearanceAtSlowSpeed"; + config->addParam( + ArConfigArg(name.c_str(), + &mySideClearanceAtSlowSpeed, + "Don't get closer than this to something on the side if we're going at slow speed or below. (mm)"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "PaddingAtSlowSpeed"; + config->addParam( + ArConfigArg(name.c_str(), &myPaddingAtSlowSpeed, + "Try to stop this far away from clearance at slow speed or below. (mm)", 0), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "FastSpeed"; + config->addParam( + ArConfigArg(name.c_str(), + &myFastSpeed, + "Consider this speed fast (mm/sec)"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "SideClearanceAtFastSpeed"; + config->addParam( + ArConfigArg(name.c_str(), + &mySideClearanceAtFastSpeed, + "Don't get closer than this to something on the side if we're going at fast speed or above. (mm)"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "PaddingAtFastSpeed"; + config->addParam( + ArConfigArg(name.c_str(), &myPaddingAtFastSpeed, + "Try to stop this far away from clearance at fast speed or below. (mm)", 0), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "PreferredDecel"; + config->addParam( + ArConfigArg(name.c_str(), + &myPreferredDecel, + "The maximum decel we'll use until something might infringe on clearance and sideClearanceAtSlowSpeed (mm/sec/sec"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "MaxEmergencyDecel"; + config->addParam( + ArConfigArg(name.c_str(), + &myMaxEmergencyDecel, + "The maximum decel we'll ever use, 0 means use the robot's maximum (mm/sec/sec"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "UseEStop"; + config->addParam( + ArConfigArg(name.c_str(), + &myUseEStop, + "Whether to use an EStop to stop if something will intrude on our clearance"), + section, ArPriority::NORMAL); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); +} + +AREXPORT ArActionDesired * +ArActionDeceleratingLimiter::fire(ArActionDesired currentDesired) +{ + double dist; + const ArRangeDevice *distRangeDevice = NULL; + double distInner; + const ArRangeDevice *distInnerRangeDevice = NULL; + double absVel; + bool printing = false; + + //ArLog::LogLevel verboseLogLevel = ArLog::Verbose; + ArLog::LogLevel verboseLogLevel = ArLog::Verbose; + if (printing) + verboseLogLevel = ArLog::Normal; + + double lookAhead = 16000; + + //if (myType == LATERAL_RIGHT) + //printing = true; + + myDesired.reset(); + // see if we're going the right direction for this to work + if (myType == FORWARDS && myRobot->getVel() < -100) + return NULL; + else if (myType == BACKWARDS && myRobot->getVel() > 100) + return NULL; + else if (myType == LATERAL_LEFT && myRobot->getLatVel() < -100) + return NULL; + else if (myType == LATERAL_RIGHT && myRobot->getLatVel() > 100) + return NULL; + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + absVel = ArMath::fabs(myRobot->getVel()); + else + absVel = ArMath::fabs(myRobot->getLatVel()); + + double sideClearance; + double padding; + + // see if we're going slow + if (absVel <= mySlowSpeed) + { + sideClearance = mySideClearanceAtSlowSpeed; + padding = myPaddingAtSlowSpeed; + } + // or if we're going fast + else if (absVel >= myFastSpeed) + { + sideClearance = mySideClearanceAtFastSpeed; + padding = myPaddingAtFastSpeed; + } + // or if we have to interpolate + else + { + sideClearance = (((mySideClearanceAtFastSpeed - + mySideClearanceAtSlowSpeed) * + ((absVel - mySlowSpeed) / + (myFastSpeed - mySlowSpeed))) + + mySideClearanceAtSlowSpeed); + padding = (((myPaddingAtFastSpeed - + myPaddingAtSlowSpeed) * + ((absVel - mySlowSpeed) / + (myFastSpeed - mySlowSpeed))) + + myPaddingAtSlowSpeed); + } + + + //if (printing) + //ArLog::log(ArLog::Normal, "%d side %.0f padding %.0f", myType, sideClearance, padding); + + ArPose obstaclePose(-1, -1, -1); + ArPose obstacleInnerPose(-1, -1, -1); + + if (myType == FORWARDS) + dist = myRobot->checkRangeDevicesCurrentBox( + 0, + -(myRobot->getRobotWidth()/2.0 + sideClearance), + myRobot->getRobotLength()/2.0 + myClearance + padding + lookAhead, + (myRobot->getRobotWidth()/2.0 + sideClearance), + &obstaclePose, + &distRangeDevice, myUseLocationDependentDevices); + else if (myType == BACKWARDS) + dist = myRobot->checkRangeDevicesCurrentBox( + 0, + -(myRobot->getRobotWidth()/2.0 + sideClearance), + -(myRobot->getRobotLength()/2.0 + myClearance + padding + lookAhead), + (myRobot->getRobotWidth()/2.0 + sideClearance), + &obstaclePose, + &distRangeDevice, myUseLocationDependentDevices); + //todo + else if (myType == LATERAL_LEFT) + dist = myRobot->checkRangeDevicesCurrentBox( + -(myRobot->getRobotLength()/2.0 + sideClearance), + 0, + (myRobot->getRobotLength()/2.0 + sideClearance), + myRobot->getRobotWidth()/2.0 + myClearance + padding + lookAhead, + &obstaclePose, + &distRangeDevice, myUseLocationDependentDevices); + //todo + else if (myType == LATERAL_RIGHT) + dist = myRobot->checkRangeDevicesCurrentBox( + -(myRobot->getRobotLength()/2.0 + sideClearance), + -(myRobot->getRobotWidth()/2.0 + myClearance + padding + lookAhead), + (myRobot->getRobotLength()/2.0 + sideClearance), + 0, + &obstaclePose, + &distRangeDevice, myUseLocationDependentDevices); + + if (myType == FORWARDS) + distInner = myRobot->checkRangeDevicesCurrentBox( + 0, + -(myRobot->getRobotWidth()/2.0 + mySideClearanceAtSlowSpeed), + myRobot->getRobotLength()/2.0 + myClearance + lookAhead, + (myRobot->getRobotWidth()/2.0 + mySideClearanceAtSlowSpeed), + &obstacleInnerPose, + &distInnerRangeDevice, myUseLocationDependentDevices); + else if (myType == BACKWARDS) + distInner = myRobot->checkRangeDevicesCurrentBox( + 0, + -(myRobot->getRobotWidth()/2.0 + mySideClearanceAtSlowSpeed), + -(myRobot->getRobotLength()/2.0 + myClearance + lookAhead), + (myRobot->getRobotWidth()/2.0 + mySideClearanceAtSlowSpeed), + &obstacleInnerPose, + &distInnerRangeDevice, myUseLocationDependentDevices); + // todo + else if (myType == LATERAL_LEFT) + distInner = myRobot->checkRangeDevicesCurrentBox( + -(myRobot->getRobotLength()/2.0 + mySideClearanceAtSlowSpeed), + 0, + (myRobot->getRobotLength()/2.0 + mySideClearanceAtSlowSpeed), + myRobot->getRobotWidth()/2.0 + myClearance + lookAhead, + &obstacleInnerPose, + &distInnerRangeDevice, myUseLocationDependentDevices); + // todo + else if (myType == LATERAL_RIGHT) + distInner = myRobot->checkRangeDevicesCurrentBox( + -(myRobot->getRobotLength()/2.0 + mySideClearanceAtSlowSpeed), + -(myRobot->getRobotWidth()/2.0 + myClearance + lookAhead), + (myRobot->getRobotLength()/2.0 + mySideClearanceAtSlowSpeed), + 0, + &obstacleInnerPose, + &distInnerRangeDevice, myUseLocationDependentDevices); + + // subtract off our clearance and padding to see how far we have to stop + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + dist -= myRobot->getRobotLength() / 2.0; + else + dist -= myRobot->getRobotWidth() / 2.0; + dist -= myClearance; + dist -= padding; + + // this is what we estop for, so don't subtract our padding from this + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + distInner -= myRobot->getRobotLength() / 2.0; + else + distInner -= myRobot->getRobotWidth() / 2.0; + distInner -= myClearance; + + if (printing) + ArLog::log(ArLog::Normal, "%d dist %.0f (%.0f %.0f from %s)", myType, dist, + obstaclePose.getX(), obstaclePose.getY(), + distRangeDevice != NULL ? distRangeDevice->getName() : "none"); + // see if we need to throw an estop + if (distInner < 1 && absVel > 5) + { + if (printing && !myLastStopped) + ArLog::log(ArLog::Normal, "%s: Stopping", getName()); + if (absVel > 100) + { + if (myUseEStop) + { + if (distInnerRangeDevice != NULL) + ArLog::log(ArLog::Normal, "%s: estopping because of reading from %s", getName(), distInnerRangeDevice->getName()); + else + ArLog::log(ArLog::Normal, "%s: estopping because of reading from unknown", getName()); + myRobot->comInt(ArCommands::ESTOP, 1); + } + else + { + if (distInnerRangeDevice != NULL) + ArLog::log(ArLog::Normal, + "%s: maximum deceleration because of reading from %s", + getName(), distInnerRangeDevice->getName()); + else + ArLog::log(ArLog::Normal, + "%s: maximum deceleration because of reading from unknown", + getName()); + } + // if we have a maximum emergency decel, use that + if (fabs(myMaxEmergencyDecel) > 1) + { + if (printing) + ArLog::log(ArLog::Normal, "Max emergency decel %.0f", + myMaxEmergencyDecel); + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + myDesired.setTransDecel(myMaxEmergencyDecel); + else + myDesired.setLatDecel(myMaxEmergencyDecel); + } + // if we don't use the robot's top decel + else if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived()) + { + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + ArLog::log(ArLog::Normal, "Robots max decel %d", + myRobot->getOrigRobotConfig()->getTransAccelTop()); + else + ArLog::log(ArLog::Normal, "Robots max lat decel %d", + myRobot->getOrigRobotConfig()->getLatAccelTop()); + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + myDesired.setTransDecel( + myRobot->getOrigRobotConfig()->getTransAccelTop()); + else + myDesired.setLatDecel( + myRobot->getOrigRobotConfig()->getLatAccelTop()); + } + // if we don't have that either use our preferred decel + else + { + if (printing) + ArLog::log(ArLog::Normal, "Prefered decel %g", myPreferredDecel); + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + myDesired.setTransDecel(myPreferredDecel); + else + myDesired.setLatDecel(myPreferredDecel); + } + } + myLastStopped = true; + if (myType == FORWARDS) + myDesired.setMaxVel(0); + else if (myType == BACKWARDS) + myDesired.setMaxNegVel(0); + if (myType == LATERAL_LEFT) + myDesired.setMaxLeftLatVel(0); + else if (myType == LATERAL_RIGHT) + myDesired.setMaxRightLatVel(0); + + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + myDesired.setVel(0); + else + myDesired.setLeftLatVel(0); + if (myStopRotationToo) + myDesired.setRotVel(0); + if (distInnerRangeDevice != NULL) + ArLog::log(verboseLogLevel, + "%s: Stopping (inner) because of reading from %s", getName(), + distInnerRangeDevice->getName()); + else + ArLog::log(verboseLogLevel, + "%s: Stopping (inner) because of reading from unknown", + getName()); + return &myDesired; + } + // if our distance is greater than how far it'd take us to stop + //ArLog::log(ArLog::Normal, "%.0f %.0f %.0f", dist, absVel, absVel * absVel / 2.0 / myRobot->getTransDecel()); + double robotDeceleration; + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + robotDeceleration = myRobot->getTransDecel(); + else + robotDeceleration = myRobot->getLatDecel(); + if (dist > absVel * absVel / 2.0 / robotDeceleration) + { + if (printing) + ArLog::log(ArLog::Normal, "%d Nothing", myType); + return NULL; + } + + if (printing && myLastStopped) + ArLog::log(ArLog::Normal, "%d moving", myType); + myLastStopped = false; + //ArLog::log(ArLog::Normal, "%f ", dist); + //maxVel = (dist - clearance); + double deceleration = - absVel * absVel / dist / 2.0; + double decelerationInner = - absVel * absVel / distInner / 2.0; + // make sure the robot or other actions aren't already decelerating + // more than we want to + + // the reason its okay that below uses deceleration instead of + // decelerationInner is because unless padding is negative (no + // longer allowed) the deceleration before the cap will always be + // higher than decelerationInner + + + //ArLog::log(ArLog::Normal, "%.0f %.0f %.0f %.0f", deceleration, myRobot->getTransDecel(), currentDesired.getTransDecelStrength(), currentDesired.getTransDecel()); + if ((myType != LATERAL_LEFT && myType != LATERAL_RIGHT && + fabs(deceleration) > fabs(myRobot->getTransDecel()) && + (currentDesired.getTransDecelStrength() < ArActionDesired::MIN_STRENGTH + || fabs(deceleration) > fabs(currentDesired.getTransDecel()))) || + ((myType == LATERAL_LEFT || myType == LATERAL_RIGHT) && + fabs(deceleration) > fabs(myRobot->getLatDecel()) && + (currentDesired.getLatDecelStrength() < ArActionDesired::MIN_STRENGTH + || fabs(deceleration) > fabs(currentDesired.getLatDecel())))) + { + double decelDesired; + // if our deceleration is faster than we want to decel see if we + // actually will have to decel that fast or not + if (fabs(myMaxEmergencyDecel) > 1 && + fabs(decelerationInner) > myMaxEmergencyDecel) + decelDesired = myMaxEmergencyDecel; + else if (fabs(decelerationInner) > myPreferredDecel) + decelDesired = fabs(decelerationInner); + else if (fabs(myMaxEmergencyDecel) > 1 && + fabs(deceleration) > myMaxEmergencyDecel) + decelDesired = myMaxEmergencyDecel; + else if (fabs(deceleration) > myPreferredDecel) + decelDesired = myPreferredDecel; + else + decelDesired = fabs(deceleration); + + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + myDesired.setTransDecel(decelDesired); + else + myDesired.setLatDecel(decelDesired); + if (printing) + ArLog::log(ArLog::Normal, "Set deceleration to %g", decelDesired); + } + else + { + if (myType != LATERAL_LEFT && myType != LATERAL_RIGHT) + deceleration = myRobot->getTransDecel(); + else + deceleration = myRobot->getLatDecel(); + } + + //double maxVel = absVel - deceleration / 10.0; + + if (printing) + ArLog::log(ArLog::Normal, "%d accel %.0f", myType, deceleration); + //ArLog::log(ArLog::Normal, "Max vel %f (stopdist %.1f slowdist %.1f slowspeed %.1f", maxVel, myStopDist, mySlowDist, mySlowSpeed); + + /* + ArLog::log(ArLog::Normal, "%s: Stopping because of reading from %s (%.0f %.0f %.0f %.0f)", + getName(), distInnerRangeDevice->getName(), + dist, deceleration, robotDeceleration, + absVel * absVel / 2.0 / robotDeceleration); + */ + if (distInnerRangeDevice != NULL) + ArLog::log(verboseLogLevel, + "%s: Stopping because of reading from %s", + getName(), distInnerRangeDevice->getName()); + else + ArLog::log(verboseLogLevel, + "%s: Stopping because of reading from unknown", + getName()); + + if (myType == FORWARDS) + myDesired.setMaxVel(0); + else if (myType == BACKWARDS) + myDesired.setMaxNegVel(0); + else if (myType == LATERAL_LEFT) + myDesired.setMaxLeftLatVel(0); + else if (myType == LATERAL_RIGHT) + myDesired.setMaxRightLatVel(0); + + return &myDesired; +} + + + diff --git a/Legacy/Aria/src/ArActionDesired.cpp b/Legacy/Aria/src/ArActionDesired.cpp new file mode 100644 index 0000000..16a9e55 --- /dev/null +++ b/Legacy/Aria/src/ArActionDesired.cpp @@ -0,0 +1,164 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionDesired.h" + +/* Need to export symbols but can't prior to VS 2010 (The VS 2003 _MSC_VER is version 1310, 2005 is 14xx, 2008 is 15xx, 2010 is 1600)*/ +//#if (_MSC_VER < 1600) +//#define STATIC_CONST_AREXPORT // defined to nothing +//#else +//#define STATIC_CONST_AREXPORT AREXPORT +//#endif + +AREXPORT const double ArActionDesired::NO_STRENGTH = 0.0; +AREXPORT const double ArActionDesired::MIN_STRENGTH = .000001; +AREXPORT const double ArActionDesired::MAX_STRENGTH = 1.0; + +AREXPORT const double ArActionDesiredChannel::NO_STRENGTH = + ArActionDesired::NO_STRENGTH; +AREXPORT const double ArActionDesiredChannel::MIN_STRENGTH = + ArActionDesired::MIN_STRENGTH; +AREXPORT const double ArActionDesiredChannel::MAX_STRENGTH = + ArActionDesired::MAX_STRENGTH; + + +AREXPORT void ArActionDesired::log(void) const +{ + // all those maxes and movement parameters + if (getMaxVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "\tMaxTransVel %.0f", getMaxVel()); + if (getMaxNegVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "\tMaxTransNegVel %.0f", + getMaxNegVel()); + if (getTransAccelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "\tTransAccel %.0f", getTransAccel()); + if (getTransDecelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "\tTransDecel %.0f", getTransDecel()); + + if (getMaxRotVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tMaxRotVel %.0f", "", + getMaxRotVel()); + if (getMaxRotVelPosStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tMaxRotVelPos %.0f", "", + getMaxRotVelPos()); + if (getMaxRotVelNegStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tMaxRotVelNeg %.0f", "", + getMaxRotVelNeg()); + if (getRotAccelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tRotAccel %.0f", "", + getRotAccel()); + if (getRotDecelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tRotDecel %.0f", "", + getRotDecel()); + + if (getMaxLeftLatVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%12s\tMaxLeftLatVel %.0f", "", + getMaxLeftLatVel()); + if (getMaxRightLatVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%12s\tMaxRightLatVel %.0f", "", + getMaxRightLatVel()); + if (getLatAccelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%12s\tLatAccel %.0f", "", + getLatAccel()); + if (getLatDecelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%12s\tLatDecel %.0f", "", + getLatDecel()); + + // the actual movement part + if (getVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "\tVel %.0f", getVel()); + if (getHeadingStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tHeading %.0f", "", + getHeading()); + if (getDeltaHeadingStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tDeltaHeading %.0f", "", + getDeltaHeading()); + if (getRotVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%25s\tRotVel %.0f", "", + getRotVel()); + if (getLatVelStrength() >= ArActionDesired::MIN_STRENGTH) + ArLog::log(ArLog::Normal, "%12s\tLatVel %.0f", "", + getLatVel()); +} + + +AREXPORT bool ArActionDesired::isAnythingDesired(void) const +{ + if (getVelStrength() >= ArActionDesired::MIN_STRENGTH || + getMaxVelStrength() >= ArActionDesired::MIN_STRENGTH || + getMaxNegVelStrength() >= ArActionDesired::MIN_STRENGTH || + getTransAccelStrength() >= ArActionDesired::MIN_STRENGTH || + getTransDecelStrength() >= ArActionDesired::MIN_STRENGTH || + + getHeadingStrength() >= ArActionDesired::MIN_STRENGTH || + getDeltaHeadingStrength() >= ArActionDesired::MIN_STRENGTH || + getRotVelStrength() >= ArActionDesired::MIN_STRENGTH || + getMaxRotVelStrength() >= ArActionDesired::MIN_STRENGTH || + getMaxRotVelPosStrength() >= ArActionDesired::MIN_STRENGTH || + getMaxRotVelNegStrength() >= ArActionDesired::MIN_STRENGTH || + getRotAccelStrength() >= ArActionDesired::MIN_STRENGTH || + getRotDecelStrength() >= ArActionDesired::MIN_STRENGTH || + + getMaxLeftLatVelStrength() >= ArActionDesired::MIN_STRENGTH || + getMaxRightLatVelStrength() >= ArActionDesired::MIN_STRENGTH || + getLatAccelStrength() >= ArActionDesired::MIN_STRENGTH || + getLatDecelStrength() >= ArActionDesired::MIN_STRENGTH || + getLatVelStrength() >= ArActionDesired::MIN_STRENGTH) + return true; + else + return false; +} + +AREXPORT void ArActionDesired::sanityCheck(const char *actionName) +{ + myMaxVelDes.checkLowerBound(actionName, "TransMaxVel", 0); + myMaxNegVelDes.checkUpperBound(actionName, "TransMaxNegVel", 0); + + myTransAccelDes.checkLowerBound(actionName, "TransAccel", 1); + myTransDecelDes.checkLowerBound(actionName, "TransDecel", 1); + + if (myMaxRotVelDes.getStrength() >= ArActionDesired::MIN_STRENGTH && + ArMath::roundInt(myMaxRotVelDes.getDesired()) == 0) + ArLog::log(ArLog::Normal, + "ActionSanityChecking: '%s' setting %s to %g which winds up as 0 (this is just a warning)", + actionName, "MaxRotVel", myMaxRotVelDes.getDesired()); + myMaxRotVelDes.checkLowerBound(actionName, "MaxRotVel", 0); + + + myMaxRotVelPosDes.checkLowerBound(actionName, "MaxRotVelPos", 1); + myMaxRotVelNegDes.checkLowerBound(actionName, "MaxRotVelNeg", 1); + + myRotAccelDes.checkLowerBound(actionName, "RotAccel", 1); + myRotDecelDes.checkLowerBound(actionName, "RotDecel", 1); + + myMaxLeftLatVelDes.checkLowerBound(actionName, "MaxLeftLatVel", 0); + myMaxRightLatVelDes.checkLowerBound(actionName, "MaxRightLatVel", 0); + + myLatAccelDes.checkLowerBound(actionName, "LatAccel", 1); + myLatDecelDes.checkLowerBound(actionName, "LatDecel", 1); +}; diff --git a/Legacy/Aria/src/ArActionDriveDistance.cpp b/Legacy/Aria/src/ArActionDriveDistance.cpp new file mode 100644 index 0000000..d4e0cd2 --- /dev/null +++ b/Legacy/Aria/src/ArActionDriveDistance.cpp @@ -0,0 +1,145 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionDriveDistance.h" +#include "ArRobot.h" + +AREXPORT ArActionDriveDistance::ArActionDriveDistance(const char *name, + double speed, + double deceleration) : + ArAction(name, "Drives a given distance.") +{ + myPrinting = false; + + setNextArgument(ArArg("speed", &mySpeed, + "Speed to travel to at. (mm/sec)")); + setNextArgument(ArArg("deceleration", &myDeceleration, + "Speed to decelerate at. (mm/sec/sec)")); + mySpeed = speed; + myDeceleration = deceleration; + myState = STATE_NO_DISTANCE; +} + +AREXPORT ArActionDriveDistance::~ArActionDriveDistance() +{ + +} + +AREXPORT bool ArActionDriveDistance::haveAchievedDistance(void) +{ + if (myState == STATE_ACHIEVED_DISTANCE) + return true; + else + return false; +} + +AREXPORT void ArActionDriveDistance::cancelDistance(void) +{ + myState = STATE_NO_DISTANCE; +} + +AREXPORT void ArActionDriveDistance::setDistance( + double distance, bool useEncoders) +{ + myState = STATE_GOING_DISTANCE; + myDistance = distance; + myUseEncoders = useEncoders; + if (myUseEncoders) + myLastPose = myRobot->getEncoderPose(); + else + myLastPose = myRobot->getPose(); + myDistTravelled = 0; + myLastVel = 0; +} + + +AREXPORT ArActionDesired *ArActionDriveDistance::fire( + ArActionDesired currentDesired) +{ + double distToGo; + double vel; + + // if we're there we don't do anything + if (myState == STATE_ACHIEVED_DISTANCE || myState == STATE_NO_DISTANCE) + return NULL; + + + if (myUseEncoders) + { + myDistTravelled += myRobot->getEncoderPose().findDistanceTo(myLastPose); + myLastPose = myRobot->getEncoderPose(); + } + else + { + myDistTravelled += myRobot->getPose().findDistanceTo(myLastPose); + myLastPose = myRobot->getPose(); + } + + if (myDistance >= 0) + distToGo = myDistance - myDistTravelled; + else + distToGo = -myDistance - myDistTravelled; + + if (distToGo <= 0 && ArMath::fabs(myRobot->getVel() < 5)) + { + if (myPrinting) + { + ArLog::log(ArLog::Normal, + "Achieved distToGo %.0f realVel %.0f realVelDelta %.0f", + distToGo, myRobot->getVel(), myRobot->getVel() - myLastVel); + } + myState = STATE_ACHIEVED_DISTANCE; + myDesired.setVel(0); + myDesired.setRotVel(0); + return &myDesired; + } + + myDesired.setRotVel(0); + // if we're close, stop + if (distToGo <= 0) + { + myDesired.setVel(0); + vel = 0; + } + else + { + vel = sqrt(distToGo * myDeceleration * 2); + if (vel > mySpeed) + vel = mySpeed; + if (myDistance < 0) + vel *= -1; + myDesired.setVel(vel); + } + if (myPrinting) + ArLog::log(ArLog::Normal, + "distToGo %.0f cmdVel %.0f realVel %.0f realVelDelta %.0f", + distToGo, vel, myRobot->getVel(), + myRobot->getVel() - myLastVel); + myLastVel = myRobot->getVel(); + return &myDesired; +} + diff --git a/Legacy/Aria/src/ArActionGoto.cpp b/Legacy/Aria/src/ArActionGoto.cpp new file mode 100644 index 0000000..ccfd30d --- /dev/null +++ b/Legacy/Aria/src/ArActionGoto.cpp @@ -0,0 +1,182 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionGoto.h" +#include "ArRobot.h" + +AREXPORT ArActionGoto::ArActionGoto(const char *name, ArPose goal, + double closeDist, double speed, + double speedToTurnAt, double turnAmount) : + ArAction(name, "Goes to the given goal.") +{ + myDirectionToTurn = myCurTurnDir = 1; + myTurnedBack = false; + myPrinting = false; + + setNextArgument(ArArg("goal", &myGoal, "ArPose to go to. (ArPose)")); + setGoal(goal); + + setNextArgument(ArArg("close dist", &myCloseDist, + "Distance that is close enough to goal. (mm)")); + myCloseDist = closeDist; + + setNextArgument(ArArg("speed", &mySpeed, + "Speed to travel to goal at. (mm/sec)")); + mySpeed = speed; + + setNextArgument(ArArg("speed to turn at", &mySpeedToTurnAt, + "Speed to start obstacle avoiding at (mm/sec)")); + mySpeedToTurnAt = speedToTurnAt; + + setNextArgument(ArArg("amount to turn", &myTurnAmount, + "Amount to turn when avoiding (deg)")); + myTurnAmount = turnAmount; + +} + +AREXPORT ArActionGoto::~ArActionGoto() +{ + +} + +AREXPORT bool ArActionGoto::haveAchievedGoal(void) +{ + if (myState == STATE_ACHIEVED_GOAL) + return true; + else + return false; +} + +AREXPORT void ArActionGoto::cancelGoal(void) +{ + myState = STATE_NO_GOAL; +} + +AREXPORT void ArActionGoto::setGoal(ArPose goal) +{ + myState = STATE_GOING_TO_GOAL; + myGoal = goal; + myTurnedBack = false; + myCurTurnDir = myDirectionToTurn; + myOldGoal = myGoal; +} + +AREXPORT ArActionDesired *ArActionGoto::fire(ArActionDesired currentDesired) +{ + double angle; + double dist; + double vel; + + /* If myGoal changed since the last time setGoal() was called (it's an action + * argument) call setGoal() to reset to the new goal. + */ + if (myGoal.findDistanceTo(myOldGoal) > 5) + setGoal(myGoal); + + // if we're there we don't do anything + if (myState == STATE_ACHIEVED_GOAL || myState == STATE_NO_GOAL) + return NULL; + + dist = myRobot->getPose().findDistanceTo(myGoal); + if (dist < myCloseDist && ArMath::fabs(myRobot->getVel() < 5)) + { + if (myPrinting) + printf("Achieved goal\n"); + myState = STATE_ACHIEVED_GOAL; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + if (myPrinting) + printf("%.0f ", dist); + // see where we want to point + angle = myRobot->getPose().findAngleTo(myGoal); + + if (ArMath::fabs(ArMath::subAngle(angle, myRobot->getTh())) > 120) + { + myCurTurnDir *= -1; + } + + + // see if somethings in front of us + if (currentDesired.getMaxVelStrength() > 0 && + currentDesired.getMaxVel() < mySpeedToTurnAt) + { + if (myPrinting) + printf("Something slowing us down. "); + myDesired.setDeltaHeading(myTurnAmount * myCurTurnDir); + } + else + { + if (myPrinting) + printf("Can speed up and turn back again. "); + // see if we want to just point at the goal or not + if (ArMath::fabs( + ArMath::subAngle(angle, + ArMath::addAngle(myTurnAmount * + myCurTurnDir * -1, + myRobot->getTh()))) + > myTurnAmount/2) + { + if (myPrinting) + printf("Pointing to goal "); + myDesired.setHeading(angle); + } + else + { + if (myPrinting) + printf("turning back "); + myDesired.setDeltaHeading(myTurnAmount * myCurTurnDir * -1); + } + } + if (dist < myCloseDist && ArMath::fabs(myRobot->getVel() < 5)) + { + if (myPrinting) + printf("#achieved\n"); + myState = STATE_ACHIEVED_GOAL; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + } + // if we're close, stop + else if (dist < myCloseDist) + { + if (myPrinting) + printf("#stop\n"); + myDesired.setVel(0); + } + else + { + vel = sqrt(dist * 200 * 2); + if (vel > mySpeed) + vel = mySpeed; + if (myPrinting) + printf("#go %.0f\n", vel); + myDesired.setVel(vel); + } + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionGotoStraight.cpp b/Legacy/Aria/src/ArActionGotoStraight.cpp new file mode 100644 index 0000000..724159e --- /dev/null +++ b/Legacy/Aria/src/ArActionGotoStraight.cpp @@ -0,0 +1,191 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionGotoStraight.h" +#include "ArRobot.h" + +AREXPORT ArActionGotoStraight::ArActionGotoStraight(const char *name, + double speed) : + ArAction(name, "Goes to the given goal.") +{ + myPrinting = false; + + setNextArgument(ArArg("speed", &mySpeed, + "Speed to travel to goal at. (mm/sec)")); + mySpeed = speed; + myState = STATE_NO_GOAL; + + myUseEncoderGoal = false; + myBacking = false; + setCloseDist(); +} + +AREXPORT ArActionGotoStraight::~ArActionGotoStraight() +{ + +} + +AREXPORT bool ArActionGotoStraight::haveAchievedGoal(void) +{ + if (myState == STATE_ACHIEVED_GOAL) + return true; + else + return false; +} + +AREXPORT void ArActionGotoStraight::cancelGoal(void) +{ + myState = STATE_NO_GOAL; +} + +AREXPORT void ArActionGotoStraight::setGoal(ArPose goal, bool backToGoal, + bool justDistance) +{ + myState = STATE_GOING_TO_GOAL; + myGoal = goal; + myUseEncoderGoal = false; + myBacking = backToGoal; + myLastPose = myRobot->getPose(); + myDist = myRobot->getPose().findDistanceTo(goal); + myJustDist = true; + myDistTravelled = 0; +} + +AREXPORT void ArActionGotoStraight::setGoalRel(double dist, + double deltaHeading, + bool backToGoal, + bool justDistance) +{ + ArPose goal; + goal.setX(dist * ArMath::cos(deltaHeading)); + goal.setY(dist * ArMath::sin(deltaHeading)); + goal = myRobot->getToGlobalTransform().doTransform(goal); + setGoal(goal, backToGoal, justDistance); +} + +AREXPORT void ArActionGotoStraight::setEncoderGoal(ArPose encoderGoal, + bool backToGoal, + bool justDistance) +{ + myState = STATE_GOING_TO_GOAL; + myEncoderGoal = encoderGoal; + myUseEncoderGoal = true; + myBacking = backToGoal; + myDist = myRobot->getEncoderPose().findDistanceTo(encoderGoal); + myJustDist = justDistance; + myDistTravelled = 0; + myLastPose = myRobot->getEncoderPose(); +} + +AREXPORT void ArActionGotoStraight::setEncoderGoalRel(double dist, + double deltaHeading, + bool backToGoal, + bool justDistance) +{ + ArPose goal; + goal.setX(dist * ArMath::cos(deltaHeading)); + goal.setY(dist * ArMath::sin(deltaHeading)); + goal = myRobot->getToGlobalTransform().doTransform(goal); + goal = myRobot->getEncoderTransform().doInvTransform(goal); + setEncoderGoal(goal, backToGoal, justDistance); +} + +AREXPORT ArActionDesired *ArActionGotoStraight::fire(ArActionDesired currentDesired) +{ + double angle; + double dist; + double distToGo; + double vel; + + // if we're there we don't do anything + if (myState == STATE_ACHIEVED_GOAL || myState == STATE_NO_GOAL) + return NULL; + + + ArPose goal; + if (!myUseEncoderGoal) + { + goal = myGoal; + myDistTravelled += myRobot->getPose().findDistanceTo(myLastPose); + myLastPose = myRobot->getPose(); + } + else + { + goal = myRobot->getEncoderTransform().doTransform(myEncoderGoal); + myDistTravelled += myRobot->getEncoderPose().findDistanceTo(myLastPose); + myLastPose = myRobot->getEncoderPose(); + } + + if (myJustDist) + { + distToGo = myDist - myDistTravelled; + dist = fabs(distToGo); + } + else + { + dist = myRobot->getPose().findDistanceTo(goal); + } + + if (((myJustDist && distToGo <= 0) || + (!myJustDist && dist < myCloseDist)) + && ArMath::fabs(myRobot->getVel() < 5)) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Achieved goal"); + myState = STATE_ACHIEVED_GOAL; + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + // see where we want to point + angle = myRobot->getPose().findAngleTo(goal); + if (myBacking) + angle = ArMath::subAngle(angle, 180); + myDesired.setHeading(angle); + // if we're close, stop + if ((myJustDist && distToGo <= 0) || + (!myJustDist && dist < myCloseDist)) + { + myDesired.setVel(0); + vel = 0; + } + else + { + vel = sqrt(dist * 200 * 2); + if (vel > mySpeed) + vel = mySpeed; + if (myBacking) + vel *= -1; + myDesired.setVel(vel); + } + if (myPrinting) + ArLog::log(ArLog::Normal, "dist %.0f angle %.0f vel %.0f", + dist, angle, vel); + return &myDesired; +} + diff --git a/Legacy/Aria/src/ArActionGroup.cpp b/Legacy/Aria/src/ArActionGroup.cpp new file mode 100644 index 0000000..cfb3209 --- /dev/null +++ b/Legacy/Aria/src/ArActionGroup.cpp @@ -0,0 +1,160 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionGroup.h" +#include "ArAction.h" +#include "ArRobot.h" +#include "ArLog.h" + +/** + @param robot The robot that this action group is attached to. New actions added to this group (using addAction()) will be added to this robot object for evaluation in its action resolution task. +**/ + +AREXPORT ArActionGroup::ArActionGroup(ArRobot *robot) +{ + myRobot = robot; +} + +AREXPORT ArActionGroup::~ArActionGroup() +{ + removeActions(); +} + + +/** + * The given action will be included in this group, and then added to this + * group's robot (specified in the constructor) by using + * ArRobot::addAction(). + @param action the action to add to the robot and to this group + @param priority the priority to give the action; same meaning as in ArRobot::addAction + @see ArRobot::addAction +*/ +AREXPORT void ArActionGroup::addAction(ArAction *action, int priority) +{ + if (myRobot == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionGroup::addAction: NULL robot pointer... failed."); + return; + } + myActions.push_front(action); + myRobot->addAction(action, priority); +} + +/** + @param action the action to remove from the robot + @see ArRobot::remAction +*/ +AREXPORT void ArActionGroup::remAction(ArAction *action) +{ + if (myRobot == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionGroup::remAction: NULL robot pointer... failed."); + return; + } + myActions.remove(action); + myRobot->remAction(action); +} + +AREXPORT void ArActionGroup::activate(void) +{ + std::list::iterator it; + if (myRobot == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionGroup::activate: NULL robot pointer... failed."); + return; + } + for (it = myActions.begin(); it != myActions.end(); it++) + (*it)->activate(); +} + +AREXPORT void ArActionGroup::activateExclusive(void) +{ + std::list::iterator it; + + if (myRobot == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionGroup::activateExclusive: NULL robot pointer... failed."); + return; + } + myRobot->deactivateActions(); + for (it = myActions.begin(); it != myActions.end(); it++) + (*it)->activate(); +} + +AREXPORT void ArActionGroup::deactivate(void) +{ + std::list::iterator it; + if (myRobot == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionGroup::deactivate: NULL robot pointer... failed."); + return; + } + // this was around since 2003 but it shouldn't deactivate actions on + // the robot in deactivate... + + //myRobot->deactivateActions(); + for (it = myActions.begin(); it != myActions.end(); it++) + (*it)->deactivate(); +} + +AREXPORT std::list *ArActionGroup::getActionList(void) +{ + return &myActions; +} + +AREXPORT void ArActionGroup::removeActions(void) +{ + std::list::iterator it; + + if (myRobot == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionGroup::removeActions: NULL robot pointer... very bad."); + return; + } + + for (it = myActions.begin(); it != myActions.end(); ++it) + myRobot->remAction((*it)); +} + +AREXPORT void ArActionGroup::deleteActions(void) +{ + /* MPL removed this since it doesn't differentiate between actions it added and actions added to it, double deletes are no fun + */ + /* + std::list::iterator it; + for (it = myActions.begin(); it != myActions.end(); ++it) + { + delete (*it); + } + */ +} diff --git a/Legacy/Aria/src/ArActionGroups.cpp b/Legacy/Aria/src/ArActionGroups.cpp new file mode 100644 index 0000000..0c7f79a --- /dev/null +++ b/Legacy/Aria/src/ArActionGroups.cpp @@ -0,0 +1,357 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionGroup.h" +#include "ArActionGroups.h" +#include "ArActionLimiterTableSensor.h" +#include "ArActionLimiterForwards.h" +#include "ArActionLimiterBackwards.h" +#include "ArActionInput.h" +#include "ArActionStop.h" +#include "ArActionStallRecover.h" +#include "ArActionBumpers.h" +#include "ArActionAvoidFront.h" +#include "ArActionConstantVelocity.h" +#include "ArActionJoydrive.h" +#include "ArActionKeydrive.h" +#include "ArActionDeceleratingLimiter.h" +#include "ArActionRatioInput.h" +#include "ArRatioInputKeydrive.h" +#include "ArRatioInputJoydrive.h" +#include "ArRatioInputRobotJoydrive.h" + +AREXPORT ArActionGroupInput::ArActionGroupInput(ArRobot *robot) + : ArActionGroup(robot) +{ + addAction(new ArActionLimiterTableSensor, 100); + addAction(new ArActionLimiterForwards("Speed Limiter Near", + 300, 600, 250), + 90); + addAction(new ArActionLimiterForwards("Speed Limiter Far", + 300, 1100, 400), + 89); + addAction(new ArActionLimiterBackwards, 80); + myInput = new ArActionInput; + addAction(myInput, 70); +} + +AREXPORT ArActionGroupInput::~ArActionGroupInput() +{ + removeActions(); + deleteActions(); +} + +AREXPORT void ArActionGroupInput::setVel(double vel) +{ + myInput->setVel(vel); +} + +AREXPORT void ArActionGroupInput::setRotVel(double rotVel) +{ + myInput->setRotVel(rotVel); +} + +AREXPORT void ArActionGroupInput::deltaHeadingFromCurrent(double delta) +{ + myInput->deltaHeadingFromCurrent(delta); +} + +AREXPORT void ArActionGroupInput::setHeading(double heading) +{ + myInput->setHeading(heading); +} + +AREXPORT void ArActionGroupInput::clear(void) +{ + myInput->clear(); +} + +AREXPORT ArActionInput *ArActionGroupInput::getActionInput(void) +{ + return myInput; +} + +AREXPORT ArActionGroupStop::ArActionGroupStop(ArRobot *robot) + : ArActionGroup(robot) +{ + myActionStop = new ArActionStop; + addAction(myActionStop, 100); +} + +AREXPORT ArActionGroupStop::~ArActionGroupStop() +{ + removeActions(); + deleteActions(); +} + +AREXPORT ArActionStop *ArActionGroupStop::getActionStop(void) +{ + return myActionStop; +} + +AREXPORT ArActionGroupTeleop::ArActionGroupTeleop(ArRobot *robot) + : ArActionGroup(robot) +{ + addAction(new ArActionLimiterTableSensor, 100); + addAction(new ArActionLimiterForwards("Speed Limiter Near", + 300, 600, 250), + 90); + addAction(new ArActionLimiterForwards("Speed Limiter Far", + 300, 1100, 400), + 89); + addAction(new ArActionLimiterBackwards, 80); + myJoydrive = new ArActionJoydrive; + myJoydrive->setStopIfNoButtonPressed(false); + addAction(myJoydrive, 70); + addAction(new ArActionKeydrive, 69); +} + +AREXPORT ArActionGroupTeleop::~ArActionGroupTeleop() +{ + removeActions(); + deleteActions(); +} + +AREXPORT void ArActionGroupTeleop::setThrottleParams(int lowSpeed, + int highSpeed) +{ + myJoydrive->setThrottleParams(lowSpeed, highSpeed); +} + +AREXPORT ArActionGroupUnguardedTeleop::ArActionGroupUnguardedTeleop(ArRobot *robot) + : ArActionGroup(robot) +{ + myJoydrive = new ArActionJoydrive; + myJoydrive->setStopIfNoButtonPressed(false); + addAction(myJoydrive, 70); + addAction(new ArActionKeydrive, 69); +} + +AREXPORT ArActionGroupUnguardedTeleop::~ArActionGroupUnguardedTeleop() +{ + removeActions(); + deleteActions(); +} + +AREXPORT void ArActionGroupUnguardedTeleop::setThrottleParams(int lowSpeed, + int highSpeed) +{ + myJoydrive->setThrottleParams(lowSpeed, highSpeed); +} + +AREXPORT ArActionGroupWander::ArActionGroupWander(ArRobot *robot, int forwardVel, int avoidFrontDist, int avoidVel, int avoidTurnAmt) + : ArActionGroup(robot) +{ + addAction(new ArActionBumpers, 100); + addAction(new ArActionStallRecover, 90); + //addAction(new ArActionAvoidFront("Avoid Front Near", 250, 0), 80); + addAction(new ArActionAvoidFront("Avoid Front", avoidFrontDist, avoidVel, avoidTurnAmt), 79); + addAction(new ArActionConstantVelocity("Constant Velocity", + forwardVel), + 50); + +} + +AREXPORT ArActionGroupWander::~ArActionGroupWander() +{ + removeActions(); + deleteActions(); +} + +// The color follow action group +AREXPORT ArActionGroupColorFollow::ArActionGroupColorFollow(ArRobot *robot, ArACTS_1_2 *acts, ArPTZ *camera) + : ArActionGroup(robot) +{ + // Add the limiters so the robot is less likely to run into things + addAction(new ArActionLimiterTableSensor, 100); + addAction(new ArActionLimiterForwards("Speed Limiter Near", + 300, 600, 250), + 90); + addAction(new ArActionLimiterForwards("Speed Limiter Far", + 300, 1100, 400), + 89); + addAction(new ArActionLimiterBackwards, 80); + + // Construct the color follower and add it + myColorFollow = new ArActionColorFollow("Follow a color.", acts, camera); + addAction(myColorFollow, 70); +} + +// Destructor +AREXPORT ArActionGroupColorFollow::~ArActionGroupColorFollow() +{ + removeActions(); + deleteActions(); +} + +// Set the channel to get blob info from +AREXPORT void ArActionGroupColorFollow::setChannel(int channel) +{ + myColorFollow->setChannel(channel); +} + +// Set the camera to control +AREXPORT void ArActionGroupColorFollow::setCamera(ArPTZ *camera) +{ + myColorFollow->setCamera(camera); +} + +// Allow the robot to move +AREXPORT void ArActionGroupColorFollow::startMovement() +{ + myColorFollow->startMovement(); +} + +// Keep the robot from moving +AREXPORT void ArActionGroupColorFollow::stopMovement() +{ + myColorFollow->stopMovement(); +} + +// Toggle whether or not the robot will try to actively +// acquire a color blob +AREXPORT void ArActionGroupColorFollow::setAcquire(bool acquire) +{ + myColorFollow->setAcquire(acquire); +} + +// Return the channel that the robot is looking on +AREXPORT int ArActionGroupColorFollow::getChannel() +{ + return myColorFollow->getChannel(); +} + +// Return whether the robot is allowed to actively +// acquire a color blob +AREXPORT bool ArActionGroupColorFollow::getAcquire() +{ + return myColorFollow->getAcquire(); +} + +// Return whether the robot is allowed to move +AREXPORT bool ArActionGroupColorFollow::getMovement() +{ + return myColorFollow->getMovement(); +} + +// Return if the robot is targeting a color blob +AREXPORT bool ArActionGroupColorFollow::getBlob() +{ + return myColorFollow->getBlob(); +} + +AREXPORT ArActionGroupRatioDrive::ArActionGroupRatioDrive(ArRobot *robot) + : ArActionGroup(robot) +{ + // add the actions, put the ratio input on top, then have the + // limiters since the ratio doesn't touch decel except lightly + // whereas the limiter will touch it strongly + + myInput = new ArActionRatioInput; + addAction(myInput, 50); + + myKeydrive = new ArRatioInputKeydrive(robot, myInput); + myJoydrive = new ArRatioInputJoydrive(robot, myInput); + myRobotJoydrive = new ArRatioInputRobotJoydrive(robot, myInput); + + myDeceleratingLimiterForward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterForward", ArActionDeceleratingLimiter::FORWARDS); + addAction(myDeceleratingLimiterForward, 40); + + myDeceleratingLimiterBackward = new ArActionDeceleratingLimiter( + "DeceleratingLimiterBackward", + ArActionDeceleratingLimiter::BACKWARDS); + addAction(myDeceleratingLimiterBackward, 39); + + myDeceleratingLimiterLateralLeft = NULL; + myDeceleratingLimiterLateralRight = NULL; + if (myRobot->hasLatVel()) + { + myDeceleratingLimiterLateralLeft = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateral", + ArActionDeceleratingLimiter::LATERAL_LEFT); + addAction(myDeceleratingLimiterLateralLeft, 38); + myDeceleratingLimiterLateralRight = new ArActionDeceleratingLimiter( + "DeceleratingLimiterLateralRight", + ArActionDeceleratingLimiter::LATERAL_RIGHT); + addAction(myDeceleratingLimiterLateralRight, 37); + } + +} + +AREXPORT ArActionGroupRatioDrive::~ArActionGroupRatioDrive() +{ + removeActions(); + deleteActions(); +} + + +AREXPORT ArActionRatioInput *ArActionGroupRatioDrive::getActionRatioInput(void) +{ + return myInput; +} + +AREXPORT void ArActionGroupRatioDrive::addToConfig(ArConfig *config, + const char *section) +{ + myInput->addToConfig(config, section); + myDeceleratingLimiterForward->addToConfig(config, section, "Forward"); + myDeceleratingLimiterBackward->addToConfig(config, section, "Backward"); +} + +AREXPORT ArActionGroupRatioDriveUnsafe::ArActionGroupRatioDriveUnsafe(ArRobot *robot) + : ArActionGroup(robot) +{ + // add the actions, put the ratio input on top, then have the + // limiters since the ratio doesn't touch decel except lightly + // whereas the limiter will touch it strongly + + myInput = new ArActionRatioInput; + addAction(myInput, 50); + + myKeydrive = new ArRatioInputKeydrive(robot, myInput); + myJoydrive = new ArRatioInputJoydrive(robot, myInput); + myRobotJoydrive = new ArRatioInputRobotJoydrive(robot, myInput); +} + +AREXPORT ArActionGroupRatioDriveUnsafe::~ArActionGroupRatioDriveUnsafe() +{ + removeActions(); + deleteActions(); +} + + +AREXPORT ArActionRatioInput *ArActionGroupRatioDriveUnsafe::getActionRatioInput(void) +{ + return myInput; +} + +AREXPORT void ArActionGroupRatioDriveUnsafe::addToConfig(ArConfig *config, + const char *section) +{ + myInput->addToConfig(config, section); +} diff --git a/Legacy/Aria/src/ArActionIRs.cpp b/Legacy/Aria/src/ArActionIRs.cpp new file mode 100644 index 0000000..27ffd67 --- /dev/null +++ b/Legacy/Aria/src/ArActionIRs.cpp @@ -0,0 +1,243 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionIRs.h" +#include "ArRobot.h" +#include "ArCommands.h" + +/** + @param name name of the action + @param backOffSpeed speed at which to back away (mm/sec) + @param backOffTime number of msec to back up for (msec) + @param turnTime number of msec to alow for turn (msec) + @param setMaximums if true, set desired maximum speed limits to backOffSpeed when performing the action; otherwise use existing speed limits. +*/ +AREXPORT ArActionIRs::ArActionIRs(const char *name, + double backOffSpeed, + int backOffTime, int turnTime, + bool setMaximums) : + ArAction(name, "Reacts to the IRs triggering") +{ + setNextArgument(ArArg("back off speed", &myBackOffSpeed, + "Speed at which to back away (mm/sec)")); + myBackOffSpeed = backOffSpeed; + + setNextArgument(ArArg("back off time", &myBackOffTime, + "Number of msec to back up for (msec)")); + myBackOffTime = backOffTime; + + myStopTime = 1000; + + setNextArgument(ArArg("turn time", &myTurnTime, + "Number of msec to allow for turn (msec)")); + myTurnTime = turnTime; + + setNextArgument(ArArg("set maximums", &mySetMaximums, + "Whether to set maximum vels or not (bool)")); + mySetMaximums = setMaximums; + + myFiring = false; + mySpeed = 0.0; + myHeading = 0.0; +} + +AREXPORT ArActionIRs::~ArActionIRs() +{ + +} + +AREXPORT void ArActionIRs::setRobot(ArRobot *robot) +{ + myRobot = robot; + const ArRobotParams *params; + params = myRobot->getRobotParams(); + myParams = *params; + + for(int i = 0; i < myParams.getNumIR(); i++) + cycleCounters.push_back(1); +} + +AREXPORT ArActionDesired *ArActionIRs::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + + double angle = 0; + int counter = 0; + double turnRange = 135; + + ArUtil::BITS bit; + + if(myFiring) + { + if (myStartBack.mSecSince() < myBackOffTime) + { + myDesired.setVel(mySpeed); + myDesired.setDeltaHeading(0); + return &myDesired; + } + else if (myStartBack.mSecSince() < myBackOffTime + myTurnTime && + ArMath::fabs(ArMath::subAngle(myRobot->getTh(), myHeading)) > 3) + { + myDesired.setVel(0); + myDesired.setHeading(myHeading); + return &myDesired; + } + else if(stoppedSince.mSecSince() < myStopTime) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + myFiring = false; + } + + + if(myParams.haveTableSensingIR()) + { + for (int i = 0; i < myParams.getNumIR(); ++i) + { + switch(i) + { + case 0: + bit = ArUtil::BIT0; + break; + case 1: + bit = ArUtil::BIT1; + break; + case 2: + bit = ArUtil::BIT2; + break; + case 3: + bit = ArUtil::BIT3; + break; + case 4: + bit = ArUtil::BIT4; + break; + case 5: + bit = ArUtil::BIT5; + break; + case 6: + bit = ArUtil::BIT6; + break; + case 7: + bit = ArUtil::BIT7; + break; + } + if(myParams.haveNewTableSensingIR() && myRobot->getIODigInSize() > 3) + { + if((myParams.getIRType(i) && !(myRobot->getIODigIn(3) & bit)) || + (!myParams.getIRType(i) && (myRobot->getIODigIn(3) & bit))) + { + if(cycleCounters[i] < myParams.getIRCycles(i)) + { + cycleCounters[i] = cycleCounters[i] + 1; + } + else + { + cycleCounters[i] = 1; + + ArPose pose; + pose.setX(myParams.getIRX(i)); + pose.setY(myParams.getIRY(i)); + if(pose.getX() > 0) + { + ArPose center(0,0,0); + angle += center.findAngleTo(pose); + counter++; + } + } + } + else + { + cycleCounters[i] = 1; + } + } + else + { + if(!(myRobot->getDigIn() & bit)) + { + if(cycleCounters[i] < myParams.getIRCycles(i)) + { + cycleCounters[i] = cycleCounters[i] + 1; + } + else + { + cycleCounters[i] = 1; + + ArPose pose; + pose.setX(myParams.getIRX(i)); + pose.setY(myParams.getIRY(i)); + if(pose.getX() > 0) + { + ArPose center(0,0,0); + angle += center.findAngleTo(pose); + counter++; + } + } + } + else + { + cycleCounters[i] = 1; + } + + } + } + + if(counter > 0 && myRobot->getVel() > 50) + { + angle = angle / (double) counter; + if(angle > (turnRange / 2)) + angle = turnRange / 2; + else if(angle < -(turnRange / 2)) + angle = -(turnRange / 2); + + if(angle < 0) angle = ((turnRange / 2) + angle) * -1; + else angle = ((turnRange / 2) - angle); + + myHeading = ArMath::addAngle(myRobot->getTh(), angle); + mySpeed = -myBackOffSpeed; + myStartBack.setToNow(); + ArLog::log(ArLog::Normal, "ArActionIRS: estopping"); + myRobot->comInt(ArCommands::ESTOP, 0); + myFiring = true; + + myDesired.setVel(mySpeed); + myDesired.setHeading(myHeading); + + } + else if(counter > 0 && (myRobot->getVel() > -50 && myRobot->getVel() < 50)) + { + stoppedSince.setToNow(); + } + else return NULL; + } + else return NULL; + + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionInput.cpp b/Legacy/Aria/src/ArActionInput.cpp new file mode 100644 index 0000000..914e3bd --- /dev/null +++ b/Legacy/Aria/src/ArActionInput.cpp @@ -0,0 +1,95 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionInput.h" +#include "ArRobot.h" +/** + @param name name of the action +*/ +AREXPORT ArActionInput::ArActionInput(const char *name) : + ArAction(name, "Inputs vel and heading") +{ + clear(); +} + +AREXPORT ArActionInput::~ArActionInput() +{ +} + +AREXPORT void ArActionInput::setVel(double vel) +{ + myUsingVel = true; + myVelSet = vel; +} + +AREXPORT void ArActionInput::setRotVel(double rotVel) +{ + myRotRegime = ROTVEL; + myRotVal = rotVel; +} + +AREXPORT void ArActionInput::deltaHeadingFromCurrent(double delta) +{ + myRotRegime = DELTAHEADING; + myRotVal = delta; +} + +AREXPORT void ArActionInput::setHeading(double heading) +{ + myRotRegime = SETHEADING; + myRotVal = heading; +} + +AREXPORT void ArActionInput::clear(void) +{ + myUsingVel = false; + myRotRegime = NONE; +} + +AREXPORT ArActionDesired *ArActionInput::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + + if (myUsingVel) + myDesired.setVel(myVelSet); + + if (myRotRegime == ROTVEL) + myDesired.setRotVel(myRotVal); + else if (myRotRegime == DELTAHEADING) + { + myDesired.setDeltaHeading(myRotVal); + myRotVal = 0; + } + else if (myRotRegime == SETHEADING) + myDesired.setHeading(myRotVal); + else if (myRotRegime != NONE) + ArLog::log(ArLog::Normal, "ArActionInput::fire: Bad rot regime %d", + myRotRegime); + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionJoydrive.cpp b/Legacy/Aria/src/ArActionJoydrive.cpp new file mode 100644 index 0000000..ef9f919 --- /dev/null +++ b/Legacy/Aria/src/ArActionJoydrive.cpp @@ -0,0 +1,191 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionJoydrive.h" +#include "ArRobot.h" +#include "ariaInternal.h" + +/** + This action is for driving around the robot with a joystick, you + must hold in a button on the joystick and then lean the joytsick + over to have it drive. You may need to calibrate the joystick for + it to work right, for details about this see ArJoyHandler. If the + Aria static class already has a joyhandler this class will use that + otherwise it'll make and initialize one and use that (setting it in + the Aria class) + + @param name the name of this action + + @param transVelMax the maximum velocity the joydrive action will + go, it reachs this when the joystick is all the way forwards + + @param turnAmountMax the maximum amount the joydrive action will + turn, it reachs this when the joystick is all the way forwards + + @param stopIfNoButtonPressed if this is true and there is a + joystick and no button is pressed, the action will have the robot + stop... otherwise it'll do nothing (letting lower priority actions + fire) + + @param useOSCalForJoystick If true, then the existing OS calibration + for the joystick will be used, otherwise our own autocalibration will + be used. Default is true. + + + @see ArJoyHandler::setUseOSCal() +**/ + +AREXPORT ArActionJoydrive::ArActionJoydrive(const char *name, + double transVelMax, + double turnAmountMax, + bool stopIfNoButtonPressed, + bool useOSCalForJoystick) : + ArAction(name, "This action reads the joystick and sets the translational and rotational velocities based on this.") +{ + if ((myJoyHandler = Aria::getJoyHandler()) == NULL) + { + myJoyHandler = new ArJoyHandler; + myJoyHandler->init(); + Aria::setJoyHandler(myJoyHandler); + } + + setSpeeds(transVelMax, turnAmountMax); + + setNextArgument(ArArg("trans vel max", &myTransVelMax, "The full speed to go when the joystick is maxed forwards/backwards (mm/sec)")); + + setNextArgument(ArArg("turn amount max", &myTurnAmountMax, "The full amount to turn if the joystick is pushed all the way right/left (deg)")); + + setNextArgument(ArArg("stop if no button pressed", &myStopIfNoButtonPressed, "If this is true, then joydrive will stop the robot if there is no button pressed, otherwise it will just let whatever lower priority things go.")); + myStopIfNoButtonPressed = stopIfNoButtonPressed; + + setNextArgument(ArArg("use os calibration for joystick", &myUseOSCal, "If this is true then the os calibration for the joystick will be used, otherwise autocalibration will be used.")); + myUseOSCal = useOSCalForJoystick; + myPreviousUseOSCal = myUseOSCal; + + myUseThrottle = false; +} + +AREXPORT ArActionJoydrive::~ArActionJoydrive() +{ + +} + +AREXPORT void ArActionJoydrive::setStopIfNoButtonPressed( + bool stopIfNoButtonPressed) +{ + myStopIfNoButtonPressed = stopIfNoButtonPressed; +} + +AREXPORT bool ArActionJoydrive::getStopIfNoButtonPressed(void) +{ + return myStopIfNoButtonPressed; +} + +AREXPORT bool ArActionJoydrive::joystickInited(void) +{ + return myJoyHandler->haveJoystick(); +} + +/** + @see ArJoyHandler::setUseOSCal +**/ +AREXPORT void ArActionJoydrive::setUseOSCal(bool useOSCal) +{ + myUseOSCal = useOSCal; + myPreviousUseOSCal = useOSCal; + myJoyHandler->setUseOSCal(useOSCal); +} + +/** + @see ArJoyHandler::getUseOSCal +**/ +AREXPORT bool ArActionJoydrive::getUseOSCal(void) +{ + return myUseOSCal; +} + +AREXPORT void ArActionJoydrive::setSpeeds(double transVelMax, + double turnAmountMax) +{ + myTransVelMax = transVelMax; + myTurnAmountMax = turnAmountMax; +} + +AREXPORT void ArActionJoydrive::setThrottleParams(double lowSpeed, double highSpeed) +{ + myUseThrottle = true; + myLowThrottle = lowSpeed; + myHighThrottle = highSpeed; +} + +AREXPORT ArActionDesired *ArActionJoydrive::fire(ArActionDesired currentDesired) +{ + double rot, trans, throttle; + + myDesired.reset(); + if (myPreviousUseOSCal != myUseOSCal) + { + myJoyHandler->setUseOSCal(myUseOSCal); + myPreviousUseOSCal = myUseOSCal; + } + + if (myJoyHandler->haveJoystick() && myJoyHandler->getButton(1)) + { + // get the readings from the joystick + myJoyHandler->getDoubles(&rot, &trans); + rot *= myTurnAmountMax; + // if we're not using the throttle just mult simply, or if we + // don't know if we have a throttle + if (!myUseThrottle || !myJoyHandler->haveZAxis()) + { + trans *= myTransVelMax; + } + // if we are using the throttle, interpolate its position between + // low and high throttle values + else + { + throttle = myJoyHandler->getAxis(3); + throttle += 1.0; + throttle /= 2.0; + trans = trans * (myLowThrottle + + (throttle * (myHighThrottle - myLowThrottle))); + } + // set what we want to do + myDesired.setVel(trans); + myDesired.setDeltaHeading(-rot); + // return the actionDesired + return &myDesired; + } + else if (myJoyHandler->haveJoystick() && myStopIfNoButtonPressed) + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } + + return NULL; +} diff --git a/Legacy/Aria/src/ArActionKeydrive.cpp b/Legacy/Aria/src/ArActionKeydrive.cpp new file mode 100644 index 0000000..27b41f7 --- /dev/null +++ b/Legacy/Aria/src/ArActionKeydrive.cpp @@ -0,0 +1,236 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionKeydrive.h" +#include "ArRobot.h" +#include "ariaInternal.h" +#include "ArKeyHandler.h" + +AREXPORT ArActionKeydrive::ArActionKeydrive(const char *name, + double transVelMax, + double turnAmountMax, + double velIncrement, + double turnIncrement) + : + ArAction(name, "This action reads the keyboard arrow keys and sets the translational and rotational velocities based on this."), + myUpCB(this, &ArActionKeydrive::up), + myDownCB(this, &ArActionKeydrive::down), + myLeftCB(this, &ArActionKeydrive::left), + myRightCB(this, &ArActionKeydrive::right), + mySpaceCB(this, &ArActionKeydrive::space) +{ + setNextArgument(ArArg("trans vel max", &myTransVelMax, "The maximum speed to go (mm/sec)")); + myTransVelMax = transVelMax; + + setNextArgument(ArArg("turn amount max", &myTurnAmountMax, "The maximum amount to turn (deg/cycle)")); + myTurnAmountMax = turnAmountMax; + + setNextArgument(ArArg("vel increment per keypress", &myVelIncrement, "The amount to increment velocity by per keypress (mm/sec)")); + myVelIncrement = velIncrement; + + setNextArgument(ArArg("turn increment per keypress", &myVelIncrement, "The amount to turn by per keypress (deg)")); + myTurnIncrement = turnIncrement; + + myDesiredSpeed = 0; + myDeltaVel = 0; + myTurnAmount = 0; + mySpeedReset = true; +} + +AREXPORT ArActionKeydrive::~ArActionKeydrive() +{ + +} + +AREXPORT void ArActionKeydrive::setRobot(ArRobot *robot) +{ + ArKeyHandler *keyHandler; + myRobot = robot; + if (robot == NULL) + return; + + // see if there is already a keyhandler, if not make one for ourselves + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + myRobot->attachKeyHandler(keyHandler); + } + takeKeys(); +} + +AREXPORT void ArActionKeydrive::takeKeys(void) +{ + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionKeydrive::takeKeys: There is no key handler, keydrive will not work."); + } + // now that we have one, add our keys as callbacks, print out big + // warning messages if they fail + if (!keyHandler->addKeyHandler(ArKeyHandler::UP, &myUpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for up, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::DOWN, &myDownCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for down, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::LEFT, &myLeftCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for left, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::RIGHT, &myRightCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for right, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::SPACE, &mySpaceCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for space, keydrive will not work correctly."); +} + +AREXPORT void ArActionKeydrive::giveUpKeys(void) +{ + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse, + "ArActionKeydrive::giveUpKeys: There is no key handler, something is probably horribly wrong ."); + } + // now that we have one, add our keys as callbacks, print out big + // warning messages if they fail + if (!keyHandler->remKeyHandler(&myUpCB)) + ArLog::log(ArLog::Terse, "ArActionKeydrive: The key handler already didn't have a key for up, something is wrong."); + if (!keyHandler->remKeyHandler(&myDownCB)) + ArLog::log(ArLog::Terse, "ArActionKeydrive: The key handler already didn't have a key for down, something is wrong."); + if (!keyHandler->remKeyHandler(&myLeftCB)) + ArLog::log(ArLog::Terse, + "ArActionKeydrive: The key handler already didn't have a key for left, something is wrong."); + if (!keyHandler->remKeyHandler(&myRightCB)) + ArLog::log(ArLog::Terse, + "ArActionKeydrive: The key handler already didn't have a key for right, something is wrong."); + if (!keyHandler->remKeyHandler(&mySpaceCB)) + ArLog::log(ArLog::Terse, + "ArActionKeydrive: The key handler didn't have a key for space, something is wrong."); +} + +AREXPORT void ArActionKeydrive::setSpeeds(double transVelMax, + double turnAmountMax) +{ + myTransVelMax = transVelMax; + myTurnAmountMax = turnAmountMax; +} + +AREXPORT void ArActionKeydrive::setIncrements(double velIncrement, + double turnIncrement) +{ + myVelIncrement = velIncrement; + myTurnIncrement = turnIncrement; +} + +AREXPORT void ArActionKeydrive::up(void) +{ + myDeltaVel += myVelIncrement; +} + +AREXPORT void ArActionKeydrive::down(void) +{ + myDeltaVel -= myVelIncrement; +} + +AREXPORT void ArActionKeydrive::left(void) +{ + myTurnAmount += myTurnIncrement; + if (myTurnAmount > myTurnAmountMax) + myTurnAmount = myTurnAmountMax; +} + +AREXPORT void ArActionKeydrive::right(void) +{ + myTurnAmount -= myTurnIncrement; + if (myTurnAmount < -myTurnAmountMax) + myTurnAmount = -myTurnAmountMax; +} + +AREXPORT void ArActionKeydrive::space(void) +{ + mySpeedReset = false; + myDesiredSpeed = 0; + myTurnAmount = 0; +} + +AREXPORT void ArActionKeydrive::activate(void) +{ + if (!myIsActive) + takeKeys(); + myIsActive = true; +} + +AREXPORT void ArActionKeydrive::deactivate(void) +{ + if (myIsActive) + giveUpKeys(); + myIsActive = false; + myDesiredSpeed = 0; + myTurnAmount = 0; +} + +AREXPORT ArActionDesired *ArActionKeydrive::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + + // if we don't have any strength left + if (fabs(currentDesired.getVelStrength() - 1.0) < .0000000000001) + { + mySpeedReset = true; + } + + // if our speed was reset, set our desired to how fast we're going now + if (mySpeedReset && myDesiredSpeed > 0 && myDesiredSpeed > myRobot->getVel()) + myDesiredSpeed = myRobot->getVel(); + if (mySpeedReset && myDesiredSpeed < 0 && myDesiredSpeed < myRobot->getVel()) + myDesiredSpeed = myRobot->getVel(); + mySpeedReset = false; + + if (currentDesired.getMaxVelStrength() && + myDesiredSpeed > currentDesired.getMaxVel()) + myDesiredSpeed = currentDesired.getMaxVel(); + + if (currentDesired.getMaxNegVelStrength() && + myDesiredSpeed < currentDesired.getMaxNegVel()) + myDesiredSpeed = currentDesired.getMaxNegVel(); + + myDesiredSpeed += myDeltaVel; + if (myDesiredSpeed > myTransVelMax) + myDesiredSpeed = myTransVelMax; + if (myDesiredSpeed < -myTransVelMax) + myDesiredSpeed = -myTransVelMax; + + myDesired.setVel(myDesiredSpeed); + myDeltaVel = 0; + + myDesired.setDeltaHeading(myTurnAmount); + myTurnAmount = 0; + + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionLimiterBackwards.cpp b/Legacy/Aria/src/ArActionLimiterBackwards.cpp new file mode 100644 index 0000000..9c96804 --- /dev/null +++ b/Legacy/Aria/src/ArActionLimiterBackwards.cpp @@ -0,0 +1,115 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionLimiterBackwards.h" +#include "ArRobot.h" + +/** + @param name name of the action + @param stopDistance distance at which to stop (mm) + @param slowDistance distance at which to slow down (mm) + @param maxBackwardsSpeed maximum backwards speed, speed allowed scales + from this to 0 at the stop distance (mm/sec) + @param widthRatio The ratio of robot width to the width of the region this action checks for sensor readings. + @param avoidLocationDependentObstacles If true, stop as the robot nears location-dependent sensed obstacles, if false, ignore them. +*/ +AREXPORT ArActionLimiterBackwards::ArActionLimiterBackwards( + const char *name, double stopDistance, double slowDistance, + double maxBackwardsSpeed, double widthRatio, + bool avoidLocationDependentObstacles) : + ArAction(name, + "Slows the robot down so as not to hit anything behind it.") +{ + setNextArgument(ArArg("stop distance", &myStopDist, + "Distance at which to stop. (mm)")); + myStopDist = stopDistance; + + setNextArgument(ArArg("slow distance", &mySlowDist, + "Distance at which to slow down. (mm)")); + mySlowDist = slowDistance; + + setNextArgument(ArArg("maximum backwards speed", &myMaxBackwardsSpeed, + "Maximum backwards speed, scales from this to 0 at stopDistance (-mm/sec)")); + myMaxBackwardsSpeed = maxBackwardsSpeed; + + setNextArgument(ArArg("width ratio", &myWidthRatio, + "The ratio of robot width to how wide an area to check (ratio)")); + myWidthRatio = widthRatio; + + setNextArgument(ArArg("avoid location dependent obstacles", + &myAvoidLocationDependentObstacles, + "Whether to avoid location dependent obstacles or not")); + myAvoidLocationDependentObstacles = avoidLocationDependentObstacles; +} + +AREXPORT ArActionLimiterBackwards::~ArActionLimiterBackwards() +{ + +} + +AREXPORT ArActionDesired * +ArActionLimiterBackwards::fire(ArActionDesired currentDesired) +{ + double dist; + double maxVel; + + double slowStopDist = ArUtil::findMax(myStopDist, mySlowDist); + + + myDesired.reset(); + dist = myRobot->checkRangeDevicesCurrentBox( + // MPL changing this to 0 since right now it won't stop on + //bumper hits since they are inside the robot... + //-myRobot->getRobotLength()/2, + 0, + -(myRobot->getRobotWidth()/2.0 * myWidthRatio), + slowStopDist + (-myRobot->getRobotLength()), + (myRobot->getRobotWidth()/2.0 * myWidthRatio), + NULL, + NULL, + myAvoidLocationDependentObstacles); + dist -= myRobot->getRobotRadius(); + if (dist < -myStopDist) + { + //printf("backwards stop\n"); + myDesired.setMaxNegVel(0); + return &myDesired; + } + if (dist > -mySlowDist) + { + //printf("backwards nothing\n"); + myDesired.setMaxNegVel(-ArMath::fabs(myMaxBackwardsSpeed)); + return &myDesired; + } + + + maxVel = -ArMath::fabs(myMaxBackwardsSpeed) * ((-dist - myStopDist) / (mySlowDist - myStopDist)); + //printf("Neg Max vel %f (stopdist %.1f slowdist %.1f slowspeed %.1f\n", maxVel, myStopDist, mySlowDist, myMaxBackwardsSpeed); + myDesired.setMaxNegVel(maxVel); + return &myDesired; + +} diff --git a/Legacy/Aria/src/ArActionLimiterForwards.cpp b/Legacy/Aria/src/ArActionLimiterForwards.cpp new file mode 100644 index 0000000..46140cd --- /dev/null +++ b/Legacy/Aria/src/ArActionLimiterForwards.cpp @@ -0,0 +1,134 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionLimiterForwards.h" +#include "ArRobot.h" + +/** + @param name name of the action + @param stopDistance distance at which to stop (mm) + @param slowDistance distance at which to slow down (mm) + @param slowSpeed speed allowed at slowDistance, scales to 0 at slow + distance (mm/sec) + @param widthRatio Ratio of the width of the box to look at to the robot radius (multiplier) +*/ +AREXPORT ArActionLimiterForwards::ArActionLimiterForwards(const char *name, + double stopDistance, + double slowDistance, + double slowSpeed, + double widthRatio) : + ArAction(name, + "Slows the robot down so as not to hit anything in front of it.") +{ + setNextArgument(ArArg("stop distance", &myStopDist, + "Distance at which to stop. (mm)")); + myStopDist = stopDistance; + + setNextArgument(ArArg("slow distance", &mySlowDist, + "Distance at which to slow down. (mm)")); + mySlowDist = slowDistance; + + setNextArgument(ArArg("slow speed", &mySlowSpeed, + "Speed at which to slow to at the slow distance, (mm/sec)")); + mySlowSpeed = slowSpeed; + + setNextArgument(ArArg("width ratio", &myWidthRatio, + "Ratio of the width of the box to look at to the robot radius (multiplier)")); + myWidthRatio = widthRatio; + myLastStopped = false; +} + +AREXPORT ArActionLimiterForwards::~ArActionLimiterForwards() +{ + +} + +/** + @param stopDistance distance at which to stop (mm) + @param slowDistance distance at which to slow down (mm) + @param slowSpeed speed allowed at slowDistance, scales to 0 at slow + distance (mm/sec) + @param widthRatio Ratio of the width of the box to look at to the robot radius (multiplier) +*/ +AREXPORT void ArActionLimiterForwards::setParameters(double stopDistance, + double slowDistance, + double slowSpeed, + double widthRatio) +{ + myStopDist = stopDistance; + mySlowDist = slowDistance; + mySlowSpeed = slowSpeed; + myWidthRatio = widthRatio; +} + +AREXPORT ArActionDesired * +ArActionLimiterForwards::fire(ArActionDesired currentDesired) +{ + double dist; + double maxVel; + bool printing = false; + double checkDist; + + if (myStopDist > mySlowDist) + checkDist = myStopDist; + else + checkDist = mySlowDist; + + myDesired.reset(); + dist = myRobot->checkRangeDevicesCurrentBox(0, + -myRobot->getRobotWidth()/2.0 * myWidthRatio, + checkDist + myRobot->getRobotLength()/2, + myRobot->getRobotWidth()/2.0 * myWidthRatio); + dist -= myRobot->getRobotLength() / 2; + //printf("%.0f\n", dist); + if (dist < myStopDist) + { + if (printing && !myLastStopped) + printf("Stopping\n"); + myLastStopped = true; + myDesired.setMaxVel(0); + return &myDesired; + } + + if (printing && myLastStopped) + printf("Going\n"); + myLastStopped = false; + //printf("%f ", dist); + if (dist > mySlowDist) + { + //printf("Nothing\n"); + return NULL; + //return &myDesired; + } + + + maxVel = mySlowSpeed * ((dist - myStopDist) / (mySlowDist - myStopDist)); + //printf("Max vel %f (stopdist %.1f slowdist %.1f slowspeed %.1f\n", maxVel, myStopDist, mySlowDist, mySlowSpeed); + myDesired.setMaxVel(maxVel); + return &myDesired; + +} diff --git a/Legacy/Aria/src/ArActionLimiterRot.cpp b/Legacy/Aria/src/ArActionLimiterRot.cpp new file mode 100644 index 0000000..3bc879a --- /dev/null +++ b/Legacy/Aria/src/ArActionLimiterRot.cpp @@ -0,0 +1,186 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionLimiterRot.h" +#include "ArRobot.h" +#include "ArCommands.h" +#include "ariaInternal.h" +#include "ArRobotConfigPacketReader.h" +#include "ArRangeDevice.h" + +/** + @param name name of the action +*/ +AREXPORT ArActionLimiterRot::ArActionLimiterRot( + const char *name) : + ArAction(name, + "Applies a limit to rotation if there are sensor readings in the radius") +{ + setParameters(); + + myUseLocationDependentDevices = true; +} + +AREXPORT ArActionLimiterRot::~ArActionLimiterRot() +{ + +} + +/** + @param checkRadius True to check the radius and apply this speed, false not to + @param inRadiusSpeed the speed to go at if something is in the radius + +*/ +AREXPORT void ArActionLimiterRot::setParameters( + bool checkRadius, double inRadiusSpeed) +{ + myCheckRadius = checkRadius; + myInRadiusSpeed = inRadiusSpeed; +} + +AREXPORT void ArActionLimiterRot::addToConfig(ArConfig *config, + const char *section, + const char *prefix) +{ + std::string strPrefix; + std::string name; + if (prefix == NULL || prefix[0] == '\0') + strPrefix = ""; + else + strPrefix = prefix; + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); + + name = strPrefix; + name += "CheckRadius"; + config->addParam( + ArConfigArg(name.c_str(), &myCheckRadius, + "True to check the robot's radius and apply InRadiusSpeed, false not to"), + section, ArPriority::NORMAL); + + name = strPrefix; + name += "InRadiusSpeed"; + config->addParam( + ArConfigArg(name.c_str(), &myInRadiusSpeed, + "Maximum speed to allow if CheckRadius is true and there are sensor readings in the robot's radius, 0 or less means allow no rotation (deg/sec)"), + section, ArPriority::NORMAL); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); +} + +AREXPORT ArActionDesired * +ArActionLimiterRot::fire(ArActionDesired currentDesired) +{ + bool printing = false; + + + if (!myCheckRadius) + { + if (printing) + printf("Nothing\n"); + return NULL; + } + + double leftDist; + const ArRangeDevice *leftRangeDevice = NULL; + double rightDist; + const ArRangeDevice *rightRangeDevice = NULL; + + double dist; + const ArRangeDevice *rangeDevice = NULL; + + //ArLog::LogLevel verboseLogLevel = ArLog::Verbose; + ArLog::LogLevel verboseLogLevel = ArLog::Verbose; + if (printing) + verboseLogLevel = ArLog::Normal; + + + leftDist = myRobot->checkRangeDevicesCurrentPolar( + 0, 179.999, NULL, &leftRangeDevice, myUseLocationDependentDevices); + + rightDist = myRobot->checkRangeDevicesCurrentPolar( + -179.999, 0, NULL, &rightRangeDevice, myUseLocationDependentDevices); + + if (leftDist > 0 && rightDist < 0) + { + dist = leftDist; + rangeDevice = leftRangeDevice; + } + else if (rightDist > 0 && leftDist < 0) + { + dist = rightDist; + rangeDevice = rightRangeDevice; + } + else if (leftDist > 0 && rightDist > 0) + { + if (leftDist < rightDist) + { + dist = leftDist; + rangeDevice = leftRangeDevice; + } + else + { + dist = rightDist; + rangeDevice = rightRangeDevice; + } + } + else + { + dist = -1; + rangeDevice = NULL; + } + + if (printing) + printf("left %.0f right %.0f dist %.0f robotRadius %.0f\n", + leftDist, rightDist, dist, myRobot->getRobotRadius()); + + if (dist > 0 && dist < myRobot->getRobotRadius()) + { + if (myInRadiusSpeed <= 0) + { + if (printing) + printf("rot of zero\n"); + myDesired.setMaxRotVel(0); + } + else + { + if (printing) + printf("rot of %.0f\n", myInRadiusSpeed); + myDesired.setMaxRotVel(myInRadiusSpeed); + } + return &myDesired; + } + else + { + if (printing) + printf("Nothing at the end\n"); + return NULL; + } +} + + + diff --git a/Legacy/Aria/src/ArActionLimiterTableSensor.cpp b/Legacy/Aria/src/ArActionLimiterTableSensor.cpp new file mode 100644 index 0000000..f96c56f --- /dev/null +++ b/Legacy/Aria/src/ArActionLimiterTableSensor.cpp @@ -0,0 +1,56 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" + +#include "ariaOSDef.h" +#include "ArActionLimiterTableSensor.h" +#include "ArRobot.h" + +AREXPORT ArActionLimiterTableSensor::ArActionLimiterTableSensor( + const char *name) : + ArAction(name, "Limits speed to 0 if a table is seen") +{ + +} + +AREXPORT ArActionLimiterTableSensor::~ArActionLimiterTableSensor() +{ +} + +AREXPORT ArActionDesired *ArActionLimiterTableSensor::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + + if (myRobot->hasTableSensingIR() && + ((myRobot->isLeftTableSensingIRTriggered()) || + (myRobot->isRightTableSensingIRTriggered()))) + { + myDesired.setMaxVel(0); + return &myDesired; + } + return NULL; +} diff --git a/Legacy/Aria/src/ArActionMovementParameters.cpp b/Legacy/Aria/src/ArActionMovementParameters.cpp new file mode 100644 index 0000000..574c0fe --- /dev/null +++ b/Legacy/Aria/src/ArActionMovementParameters.cpp @@ -0,0 +1,230 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionMovementParameters.h" +#include "ArConfig.h" +#include "ArRobot.h" + +/** + @param name the name of this instance of the action + + @param overrideFaster if this is set to true and a fast max vel is + set and our max vel is lower we'll set the vel with all our + strength (since hopefully that faster setting was set with minimum + strength) + + @param addLatVelIfAvailable If true, include the LatVel parameters in the + ArConfig if the robot supports lateral motion. + **/ +AREXPORT ArActionMovementParameters::ArActionMovementParameters( + const char *name, + bool overrideFaster, + bool addLatVelIfAvailable) : + ArAction(name, "Sets all the max vel and accels/decels") +{ + myOverrideFaster = overrideFaster; + myAddLatVelIfAvailable = addLatVelIfAvailable; + myEnabled = true; + myEnableOnce = false; + setParameters(); +} + +AREXPORT ArActionMovementParameters::~ArActionMovementParameters() +{ + +} + +AREXPORT void ArActionMovementParameters::setParameters(double maxVel, + double maxNegVel, + double transAccel, + double transDecel, + double rotVelMax, + double rotAccel, + double rotDecel, + double latVelMax, + double latAccel, + double latDecel) +{ + myMaxVel = maxVel; + myMaxNegVel = maxNegVel; + myTransAccel = transAccel; + myTransDecel = transDecel; + myMaxRotVel = rotVelMax; + myRotAccel = rotAccel; + myRotDecel = rotDecel; + myMaxLatVel = latVelMax; + myLatAccel = latAccel; + myLatDecel = latDecel; +} + +AREXPORT void ArActionMovementParameters::addToConfig(ArConfig *config, + const char *section, + const char *prefix) +{ + std::string strPrefix; + std::string name; + if (prefix == NULL || prefix[0] == '\0') + strPrefix = ""; + else + strPrefix = prefix; + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::DETAILED); + name = strPrefix; + name += "TransVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxVel, + "Maximum forward translational velocity (0 means use default)", + 0), + //myRobot->getAbsoluteMaxTransVel()), + section, ArPriority::DETAILED); + + + name = strPrefix; + name += "TransNegVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxNegVel, + "Maximum backwards translational velocity (0 means use default)", + 0), + //myRobot->getAbsoluteMaxTransVel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "TransAccel"; + config->addParam( + ArConfigArg(name.c_str(), &myTransAccel, + "Translational acceleration (0 means use default)", 0), + //myRobot->getAbsoluteMaxTransAccel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "TransDecel"; + config->addParam( + ArConfigArg(name.c_str(), &myTransDecel, + "Translational deceleration (0 means use default)", 0), + //myRobot->getAbsoluteMaxTransDecel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "RotVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxRotVel, + "Maximum rotational velocity (0 means use default)", + 0), // myRobot->getAbsoluteMaxRotVel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "RotAccel"; + config->addParam( + ArConfigArg(name.c_str(), &myRotAccel, + "Rotational acceleration (0 means use default)", 0), + //myRobot->getAbsoluteMaxRotAccel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "RotDecel"; + config->addParam( + ArConfigArg(name.c_str(), &myRotDecel, + "Rotational deceleration (0 means use default)", 0), + //myRobot->getAbsoluteMaxRotDecel()), + section, ArPriority::DETAILED); + + if (myAddLatVelIfAvailable && myRobot != NULL && myRobot->hasLatVel()) + { + name = strPrefix; + name += "LatVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxLatVel, + "Maximum lateral velocity (0 means use default)", + 0), // myRobot->getAbsoluteMaxLatVel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "LatAccel"; + config->addParam( + ArConfigArg(name.c_str(), &myLatAccel, + "Lateral acceleration (0 means use default)", 0), + //myRobot->getAbsoluteMaxLatAccel()), + section, ArPriority::DETAILED); + + name = strPrefix; + name += "LatDecel"; + config->addParam( + ArConfigArg(name.c_str(), &myLatDecel, + "Lateral deceleration (0 means use default)", 0), + //myRobot->getAbsoluteMaxLatDecel()), + section, ArPriority::DETAILED); + } + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::DETAILED); + + +} + +AREXPORT ArActionDesired *ArActionMovementParameters::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + + if (!myEnabled && !myEnableOnce) + return NULL; + myEnableOnce = false; + + if (fabs(myMaxVel) >= 1) + myDesired.setMaxVel(myMaxVel); + + if (fabs(myMaxNegVel) >= 1) + myDesired.setMaxNegVel(-myMaxNegVel); + + if (fabs(myTransAccel) >= 1) + myDesired.setTransAccel(myTransAccel); + + if (fabs(myTransDecel) >= 1) + myDesired.setTransDecel(myTransDecel); + + if (fabs(myMaxRotVel) >= 1) + myDesired.setMaxRotVel(myMaxRotVel); + + if (fabs(myRotAccel) >= 1) + myDesired.setRotAccel(myRotAccel); + + if (fabs(myRotDecel) >= 1) + myDesired.setRotDecel(myRotDecel); + + if (fabs(myMaxLatVel) >= 1) + { + myDesired.setMaxLeftLatVel(myMaxLatVel); + myDesired.setMaxRightLatVel(myMaxLatVel); + } + + if (fabs(myLatAccel) >= 1) + myDesired.setLatAccel(myLatAccel); + + if (fabs(myLatDecel) >= 1) + myDesired.setLatDecel(myLatDecel); + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionMovementParametersDebugging.cpp b/Legacy/Aria/src/ArActionMovementParametersDebugging.cpp new file mode 100644 index 0000000..02a7c86 --- /dev/null +++ b/Legacy/Aria/src/ArActionMovementParametersDebugging.cpp @@ -0,0 +1,285 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionMovementParametersDebugging.h" +#include "ArConfig.h" +#include "ArRobot.h" + +/** + @param name the name of this instance of the action + **/ +AREXPORT ArActionMovementParametersDebugging::ArActionMovementParametersDebugging( + const char *name) : + ArAction(name, "Sets all the max vel and accels/decels in a way appropriate for debugging") +{ + myEnabled = true; + myEnableOnce = false; + + mySetMaxVel = false; + myMaxVel = 2000; + mySetMaxNegVel = false; + myMaxNegVel = 1000; + mySetTransAccel = false; + myTransAccel = 500; + mySetTransDecel = false; + myTransDecel = 500; + mySetMaxRotVel = false; + myMaxRotVel = 250; + mySetRotAccel = false; + myRotAccel = 250; + mySetRotDecel = false; + myRotDecel = 250; + mySetMaxLeftLatVel = false; + myMaxLeftLatVel = 2000; + mySetMaxRightLatVel = false; + myMaxRightLatVel = 2000; + mySetLatAccel = false; + myLatAccel = 500; + mySetLatDecel = false; + myLatDecel = 500; +} + +AREXPORT ArActionMovementParametersDebugging::~ArActionMovementParametersDebugging() +{ + +} + +AREXPORT void ArActionMovementParametersDebugging::addToConfig( + ArConfig *config, const char *section, const char *prefix) +{ + std::string strPrefix; + std::string name; + if (prefix == NULL || prefix[0] == '\0') + strPrefix = ""; + else + strPrefix = prefix; + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetTransVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &mySetMaxVel, + "True to set the transVelMax"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "TransVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxVel, + "Maximum forward translational velocity (0 means use default)"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetTransNegVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &mySetMaxNegVel, + "True to set the transNegVelMax"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "TransNegVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxNegVel, + "Maximum backwards translational velocity"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetTransAccel"; + config->addParam( + ArConfigArg(name.c_str(), &mySetTransAccel, + "True to set the transAccel"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "TransAccel"; + config->addParam( + ArConfigArg(name.c_str(), &myTransAccel, + "Translational acceleration"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetTransDecel"; + config->addParam( + ArConfigArg(name.c_str(), &mySetTransDecel, + "True to set the transDecel"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "TransDecel"; + config->addParam( + ArConfigArg(name.c_str(), &myTransDecel, + "Translational deceleration"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetRotVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &mySetMaxRotVel, + "True to set the rotVelMax"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "RotVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxRotVel, + "Maximum rotational velocity"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetRotAccel"; + config->addParam( + ArConfigArg(name.c_str(), &mySetRotAccel, + "True to set rotAccel"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "RotAccel"; + config->addParam( + ArConfigArg(name.c_str(), &myRotAccel, + "Rotational acceleration"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetRotDecel"; + config->addParam( + ArConfigArg(name.c_str(), &mySetRotDecel, + "True to set rotDecel"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "RotDecel"; + config->addParam( + ArConfigArg(name.c_str(), &myRotDecel, + "Rotational deceleration"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetLeftLatVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &mySetMaxLeftLatVel, + "True to set leftLatVelMax"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "LeftLatVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxLeftLatVel, + "Maximum left lateral velocity"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetRightLatVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &mySetMaxRightLatVel, + "True to set rightLatVelMax"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "RightLatVelMax"; + config->addParam( + ArConfigArg(name.c_str(), &myMaxRightLatVel, + "Maximum right lateral velocity"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetLatAccel"; + config->addParam( + ArConfigArg(name.c_str(), &mySetLatAccel, + "True to set latAccel"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "LatAccel"; + config->addParam( + ArConfigArg(name.c_str(), &myLatAccel, + "Lateral acceleration"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "SetLatDecel"; + config->addParam( + ArConfigArg(name.c_str(), &mySetLatDecel, + "True to set latDecel"), + section, ArPriority::EXPERT); + + name = strPrefix; + name += "LatDecel"; + config->addParam( + ArConfigArg(name.c_str(), &myLatDecel, + "Lateral deceleration"), + section, ArPriority::EXPERT); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::EXPERT); + + +} + +AREXPORT ArActionDesired *ArActionMovementParametersDebugging::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + + if (!myEnabled && !myEnableOnce) + return NULL; + myEnableOnce = false; + + if (mySetMaxVel) + myDesired.setMaxVel(myMaxVel); + + if (mySetMaxNegVel) + myDesired.setMaxNegVel(myMaxNegVel); + + if (mySetTransAccel) + myDesired.setTransAccel(myTransAccel); + + if (mySetTransDecel) + myDesired.setTransDecel(myTransDecel); + + if (mySetMaxRotVel) + myDesired.setMaxRotVel(myMaxRotVel); + + if (mySetRotAccel) + myDesired.setRotAccel(myRotAccel); + + if (mySetRotDecel) + myDesired.setRotDecel(myRotDecel); + + if (mySetMaxLeftLatVel) + myDesired.setMaxLeftLatVel(myMaxLeftLatVel); + + if (mySetMaxRightLatVel) + myDesired.setMaxRightLatVel(myMaxRightLatVel); + + if (mySetLatAccel) + myDesired.setLatAccel(myLatAccel); + + if (mySetLatDecel) + myDesired.setLatDecel(myLatDecel); + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionRatioInput.cpp b/Legacy/Aria/src/ArActionRatioInput.cpp new file mode 100644 index 0000000..2108bbf --- /dev/null +++ b/Legacy/Aria/src/ArActionRatioInput.cpp @@ -0,0 +1,523 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionRatioInput.h" +#include "ArRobot.h" + +/** + @param name name of the action +*/ +AREXPORT ArActionRatioInput::ArActionRatioInput(const char *name) : + ArAction(name, "RatioInputs vel and heading") +{ + myTransRatio = 0; + myRotRatio = 0; + myLatRatio = 0; + myThrottleRatio = 0; + myFullThrottleForwards = 0; + myFullThrottleBackwards = 0; + myRotAtFullForwards = 25; + myRotAtFullBackwards = 25; + myRotAtStopped = 50; + + myLatAtFullForwards = 0; + myLatAtFullBackwards = 0; + myLatAtStopped = 0; + + myPrinting = false; + + myTransDeadZone = 10; + myRotDeadZone = 5; + myLatDeadZone = 10; +} + +AREXPORT ArActionRatioInput::~ArActionRatioInput() +{ +} + +AREXPORT void ArActionRatioInput::addToConfig(ArConfig *config, + const char *section) +{ + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); + config->addParam( + ArConfigArg("FullThrottleForwards", &myFullThrottleForwards, + "The maximum forwards speed (0 means robot's TransVelMax) (mm/sec)", 0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("FullThrottleBackwards", &myFullThrottleBackwards, + "The maximum backwards speed (0 means 1/4 robot's TransVelMax) (mm/sec)", 0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("RotAtFullForwards", &myRotAtFullForwards, + "The maximum speed we turn at when going full forwards (0 means 1/2 robots RotVelMax) (deg/sec)", 0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("RotAtFullBackwards", &myRotAtFullBackwards, + "The maximum speed we turn at when going full backwards (0 means 1/2 robots RotVelMax) (deg/sec)", 0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("RotAtStopped", &myRotAtStopped, + "The maximum speed we turn at when stopped (0 means robot's RotVelMax) (deg/sec)", 0), + section, ArPriority::NORMAL); + + if (myRobot->hasLatVel()) + { + config->addParam( + ArConfigArg("LatAtFullForwards", &myLatAtFullForwards, + "The maximum speed we turn at when going full forwards (0 means 1/2 robots LatVelMax) (mm/sec)", 0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("LatAtFullBackwards", &myLatAtFullBackwards, + "The maximum speed we turn at when going full backwards (0 means 1/2 robots LatVelMax) (mm/sec)", 0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("LatAtStopped", &myLatAtStopped, + "The maximum speed we turn at when stopped (0 means robot's LatVelMax) (mm/sec)", 0), + section, ArPriority::NORMAL); + } + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("TransDeadZone", &myTransDeadZone, + "The percentage in the middle of the translation direction to not drive (percent)", 0), + section, ArPriority::EXPERT); + + config->addParam( + ArConfigArg("RotDeadZone", &myRotDeadZone, + "The percentage in the middle of the rotation direction to not drive (percent)", 0), + section, ArPriority::EXPERT); + + if (myRobot->hasLatVel()) + { + config->addParam( + ArConfigArg("LatDeadZone", &myLatDeadZone, + "The percentage in the middle of the lateral direction to not drive (percent)", 0), + section, ArPriority::EXPERT); + } + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); + +} + +/** + This checks the inputs and pulls them into the valid range. +**/ +AREXPORT void ArActionRatioInput::setRatios(double transRatio, + double rotRatio, + double throttleRatio, + double latRatio) +{ + setTransRatio(transRatio); + setRotRatio(rotRatio); + setThrottleRatio(throttleRatio); + setLatRatio(latRatio); +} + +/** + This checks the input for greather than 100 and less than -100 and + pulls it to within that range. +**/ +AREXPORT void ArActionRatioInput::setTransRatio(double transRatio) +{ + if (transRatio > 100) + myTransRatio = 100; + else if (transRatio < -100) + myTransRatio = -100; + else + myTransRatio = transRatio; +} + +/** + This checks the input for greather than 100 and less than -100 and + pulls it to within that range. +**/ +AREXPORT void ArActionRatioInput::setRotRatio(double rotRatio) +{ + if (rotRatio > 100) + myRotRatio = 100; + else if (rotRatio < -100) + myRotRatio = -100; + else + myRotRatio = rotRatio; +} + +/** + This checks the input for greather than 100 and less than -100 and + pulls it to within that range. +**/ +AREXPORT void ArActionRatioInput::setLatRatio(double latRatio) +{ + if (latRatio > 100) + myLatRatio = 100; + else if (latRatio < -100) + myLatRatio = -100; + else + myLatRatio = latRatio; +} + +/** + This checks the input for greather than 100 and less than 0 and + pulls it to within that range. +**/ +AREXPORT void ArActionRatioInput::setThrottleRatio(double throttleRatio) +{ + if (throttleRatio > 100) + myThrottleRatio = 100; + else if (throttleRatio < 0) + myThrottleRatio = 0; + else + myThrottleRatio = throttleRatio; +} + +/** + @param fullThrottleForwards the speed we go forwards at at full + throttle (mm/sec) + + @param fullThrottleBackwards the speed we go backwards at at full + throttle (mm/sec) + + @param rotAtFullForwards the speed we turn at at full throttle forwards + + @param rotAtFullBackwards the speed we turn at at full throttle backwards + + @param rotAtStopped the speed we turn at if there is no forward/backward + motion + + @param rotAtFullForwards the speed we turn at at full throttle forwards + + @param latAtFullForwards the lateral speed we go at at full + throttle (mm/sec) (if robot supports lateral motion) + + @param latAtFullBackwards the lateral speed we go at at full + throttle (mm/sec) (if robot supports lateral motion) + + @param latAtStopped the lateral speed we go at if stopped. + + +**/ +AREXPORT void ArActionRatioInput::setParameters(double fullThrottleForwards, + double fullThrottleBackwards, + double rotAtFullForwards, + double rotAtFullBackwards, + double rotAtStopped, + double latAtFullForwards, + double latAtFullBackwards, + double latAtStopped) +{ + myFullThrottleForwards = fullThrottleForwards; + myFullThrottleBackwards = fullThrottleBackwards; + myRotAtFullForwards = rotAtFullForwards; + myRotAtFullBackwards = rotAtFullBackwards; + myRotAtStopped = rotAtStopped; + myLatAtFullForwards = latAtFullForwards; + myLatAtFullBackwards = latAtFullBackwards; + myLatAtStopped = latAtStopped; +} + +/** + These callbacks are actually called in the order of lowest number + to highest number, but this still means higher numbers are more + important since throttle set by those will override the lower. +**/ +AREXPORT void ArActionRatioInput::addFireCallback(int priority, + ArFunctor *functor) +{ + myFireCallbacks.insert(std::pair(priority, functor)); +} + +AREXPORT void ArActionRatioInput::remFireCallback(ArFunctor *functor) +{ + std::multimap::iterator it; + for (it = myFireCallbacks.begin(); it != myFireCallbacks.end(); it++) + { + if ((*it).second == functor) + break; + + } + if (it != myFireCallbacks.end()) + { + myFireCallbacks.erase(it); + } + else + ArLog::log(ArLog::Normal, "ArActionRatioInput::RemFireCallback: could not remove callback"); +} + +AREXPORT void ArActionRatioInput::addActivateCallback(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myActivateCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myActivateCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArActionRatioInput::addActivateCallback: Invalid position."); +} + +AREXPORT void ArActionRatioInput::remActivateCallback(ArFunctor *functor) +{ + myActivateCallbacks.remove(functor); +} + +AREXPORT void ArActionRatioInput::addDeactivateCallback(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myDeactivateCallbacks.push_front(functor); + else if (position == ArListPos::LAST) + myDeactivateCallbacks.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArActionRatioInput::addDeactivateCallback: Invalid position."); +} + +AREXPORT void ArActionRatioInput::remDeactivateCallback(ArFunctor *functor) +{ + myDeactivateCallbacks.remove(functor); +} + +AREXPORT void ArActionRatioInput::activate(void) +{ + std::list::iterator it; + + if (!isActive()) + { + myTransRatio = 0; + myRotRatio = 0; + myThrottleRatio = 0; + myLatRatio = 0; + for (it = myActivateCallbacks.begin(); + it != myActivateCallbacks.end(); + it++) + (*it)->invoke(); + } + ArAction::activate(); +} + +AREXPORT void ArActionRatioInput::deactivate(void) +{ + std::list::iterator it; + + if (!isActive()) + { + myTransRatio = 0; + myRotRatio = 0; + myThrottleRatio = 0; + myLatRatio = 0; + for (it = myDeactivateCallbacks.begin(); + it != myDeactivateCallbacks.end(); + it++) + (*it)->invoke(); + } + ArAction::deactivate(); +} + +AREXPORT ArActionDesired *ArActionRatioInput::fire( + ArActionDesired currentDesired) +{ + std::multimap::iterator it; + //ArLog::log(ArLog::Normal, "Calling"); + // call the callbacks that'll set our ratios + for (it = myFireCallbacks.begin(); it != myFireCallbacks.end(); it++) + { + (*it).second->invoke(); + /*ArLog::log(ArLog::Normal, "Called %s now %g %g %g %g\n", + (*it).second->getName(), + myTransRatio, myRotRatio, myThrottleRatio, myLatRatio); + */ + } + + myDesired.reset(); + + if (myPrinting) + printf("trans %.0f rot %.0f throttle %.0f lat %.0f\n", + myTransRatio, myRotRatio, myThrottleRatio, myLatRatio); + + double fullThrottleForwards, fullThrottleBackwards; + double rotAtFullForwards, rotAtFullBackwards, rotAtStopped; + double latAtFullForwards, latAtFullBackwards, latAtStopped; + + + if (myFullThrottleForwards < 1) + fullThrottleForwards = myRobot->getTransVelMax(); + else + fullThrottleForwards = myFullThrottleForwards; + + if (myFullThrottleBackwards < 1) + fullThrottleBackwards = myRobot->getTransVelMax() / 4; + else + fullThrottleBackwards = myFullThrottleBackwards; + + if (myRotAtFullForwards < 1) + rotAtFullForwards = myRobot->getRotVelMax() / 2; + else + rotAtFullForwards = myRotAtFullForwards; + + if (myRotAtFullBackwards < 1) + rotAtFullBackwards = myRobot->getRotVelMax() / 2; + else + rotAtFullBackwards = myRotAtFullBackwards; + + if (myRotAtStopped < 1) + rotAtStopped = myRobot->getRotVelMax(); + else + rotAtStopped = myRotAtStopped; + + if (myLatAtFullForwards < 1) + latAtFullForwards = myRobot->getLatVelMax() / 2; + else + latAtFullForwards = myLatAtFullForwards; + + if (myLatAtFullBackwards < 1) + latAtFullBackwards = myRobot->getLatVelMax() / 2; + else + latAtFullBackwards = myLatAtFullBackwards; + + if (myLatAtStopped < 1) + latAtStopped = myRobot->getLatVelMax(); + else + latAtStopped = myLatAtStopped; + + + // forwards + if (myTransRatio > myTransDeadZone) + { + myDesired.setVel(myTransRatio/100.0 * + fullThrottleForwards * myThrottleRatio/100.0); + //double totalThrottle = ArMath::fabs(myTransRatio/100.0 * + //myThrottleRatio/100.0); + double speedRatio = fabs(myRobot->getVel() / fullThrottleForwards); + if (ArMath::fabs(myRotRatio) < myRotDeadZone) + myDesired.setRotVel(0); + else + myDesired.setRotVel( + myRotRatio/100.0 * ((rotAtFullForwards - rotAtStopped) * + speedRatio + rotAtStopped) * + myThrottleRatio/100.0); + if (myPrinting) + printf("forwards rot %.0f %.0f %.0f %.0f\n", myRotRatio/100.0, rotAtFullForwards - rotAtStopped, speedRatio, rotAtStopped); + if (myRobot->hasLatVel() && ArMath::fabs(myLatRatio) < myLatDeadZone) + myDesired.setLeftLatVel(0); + else if (myRobot->hasLatVel()) + myDesired.setLeftLatVel( + myLatRatio/100.0 * ((latAtFullForwards - latAtStopped) * + speedRatio + latAtStopped) * + myThrottleRatio/100.0); + if (myPrinting) + printf("forwards lat %.0f %.0f %.0f %.0f\n", myLatRatio/100.0, latAtFullForwards - latAtStopped, speedRatio, latAtStopped); + + } + // backwards + else if (myTransRatio < -myTransDeadZone) + { + myDesired.setVel(myTransRatio/100.0 * + fullThrottleBackwards * myThrottleRatio/100.0); + //double totalThrottle = ArMath::fabs(myTransRatio/100.0 * + //myThrottleRatio/100.0); + double speedRatio = fabs(myRobot->getVel() / fullThrottleForwards); + if (ArMath::fabs(myRotRatio) < myRotDeadZone) + myDesired.setRotVel(0); + else + myDesired.setRotVel( + myRotRatio/100.0 * ((rotAtFullBackwards - rotAtStopped) * + speedRatio + rotAtStopped) * + myThrottleRatio/100.0); + if (myPrinting) + printf("backwards rot %.0f %.0f %.0f %.0f\n", myRotRatio/100.0, rotAtFullBackwards - rotAtStopped, speedRatio, rotAtStopped); + if (myRobot->hasLatVel() && ArMath::fabs(myLatRatio) < myLatDeadZone) + myDesired.setLeftLatVel(0); + else if (myRobot->hasLatVel()) + myDesired.setLeftLatVel( + myLatRatio/100.0 * ((latAtFullBackwards - latAtStopped) * + speedRatio + latAtStopped) * + myThrottleRatio/100.0); + if (myPrinting) + printf("backwards lat %.0f %.0f %.0f %.0f\n", myLatRatio/100.0, latAtFullBackwards - latAtStopped, speedRatio, latAtStopped); + + } + else + { + myDesired.setVel(0); + if (ArMath::fabs(myRotRatio) < myRotDeadZone) + myDesired.setRotVel(0); + else + myDesired.setRotVel(myRotRatio/100.0 * rotAtStopped * + myThrottleRatio/100.0); + if (myRobot->hasLatVel() && ArMath::fabs(myLatRatio) < myLatDeadZone) + myDesired.setLeftLatVel(0); + else if (myRobot->hasLatVel()) + myDesired.setLeftLatVel(myLatRatio/100.0 * latAtStopped * + myThrottleRatio/100.0); + } + + if (myPrinting) + printf("ratioInput %.0f %.0f %.0f\n", myDesired.getVel(), + myDesired.getRotVel(), myDesired.getLatVel()); + + + // see if we need to up the decel + if ((myRobot->getVel() > 0 && myTransRatio < -50) || + (myRobot->getVel() < 0 && myTransRatio > 50)) + { + if (myPrinting) + printf("Decelerating trans more\n"); + myDesired.setTransDecel(myRobot->getTransDecel() * 3, + ArActionDesired::MIN_STRENGTH); + } + + // if they have the stick the opposite direction of the velocity + // then let people crank up the deceleration + if ((myRobot->getRotVel() > 0 && myRotRatio < -50) || + (myRobot->getRotVel() < 0 && myRotRatio > 50)) + { + if (myPrinting) + printf("Decelerating rot more\n"); + myDesired.setRotDecel(myRobot->getRotDecel() * 3, + ArActionDesired::MIN_STRENGTH); + } + + // if they have the stick the opposite direction of the velocity + // then let people crank up the deceleration + if (myRobot->hasLatVel() && + ((myRobot->getLatVel() > 0 && myLatRatio < -50) || + (myRobot->getLatVel() < 0 && myLatRatio > 50))) + { + if (myPrinting) + printf("Decelerating lat more\n"); + myDesired.setLatDecel(myRobot->getLatDecel() * 3, + ArActionDesired::MIN_STRENGTH); + } + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionRobotJoydrive.cpp b/Legacy/Aria/src/ArActionRobotJoydrive.cpp new file mode 100644 index 0000000..dc02cd7 --- /dev/null +++ b/Legacy/Aria/src/ArActionRobotJoydrive.cpp @@ -0,0 +1,175 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionRobotJoydrive.h" +#include "ArRobot.h" +#include "ariaInternal.h" +#include "ArCommands.h" + +/** + * @param name Name for this action + @param requireDeadmanPushed if true the button must be pushed to drive, + if false we'll follow the joystick input no matter what +**/ + +AREXPORT ArActionRobotJoydrive::ArActionRobotJoydrive( + const char *name, bool requireDeadmanPushed) : + ArAction(name, "This action reads the joystick on the robot and sets the translational and rotational velocities based on this."), + myHandleJoystickPacketCB(this, &ArActionRobotJoydrive::handleJoystickPacket), + myConnectCB(this, &ArActionRobotJoydrive::connectCallback) +{ + myRequireDeadmanPushed = requireDeadmanPushed; + setNextArgument(ArArg("whether to require the deadman to be pushed or not", &myRequireDeadmanPushed, "If this is true then deadman will need to be pushed to drive, if false we'll drive based on the joystick all the time")); + myDeadZoneLast = false; + myHandleJoystickPacketCB.setName("ArActionRobotJoydrive"); +} + +AREXPORT ArActionRobotJoydrive::~ArActionRobotJoydrive() +{ + +} + +AREXPORT void ArActionRobotJoydrive::setRobot(ArRobot *robot) +{ + ArAction::setRobot(robot); + if (myRobot != NULL) + { + myRobot->addConnectCB(&myConnectCB); + myRobot->addPacketHandler(&myHandleJoystickPacketCB); + if (robot->isConnected()) + connectCallback(); + } +} + +AREXPORT void ArActionRobotJoydrive::connectCallback(void) +{ + myRobot->comInt(ArCommands::JOYINFO, 2); +} + +AREXPORT bool ArActionRobotJoydrive::handleJoystickPacket( + ArRobotPacket *packet) +{ + if (packet->getID() != 0xF8) + return false; + + myPacketReceivedTime.setToNow(); + + myButton1 = packet->bufToUByte(); + myButton2 = packet->bufToUByte(); + myJoyX = packet->bufToUByte2(); + myJoyY = packet->bufToUByte2(); + myThrottle = packet->bufToUByte2(); + + //printf("%d %d %d %d %d\n", myButton1, myButton2, myJoyX, myJoyY, myThrottle); + return true; +} + +AREXPORT ArActionDesired *ArActionRobotJoydrive::fire(ArActionDesired currentDesired) +{ + bool printing = false; + myDesired.reset(); + // if we need the deadman to activate and it isn't pushed just bail + if (myRequireDeadmanPushed && !myButton1) + { + if (printing) + printf("ArActionRobotJoydrive: Nothing\n"); + myDeadZoneLast = false; + return NULL; + } + + // these should vary between 1 and -1 + double ratioRot = -(myJoyX - 512) / 512.0; + double ratioTrans = (myJoyY - 512) / 512.0; + double ratioThrottle = myThrottle / 1024.0; + + bool doTrans = ArMath::fabs(ratioTrans) > .33; + bool doRot = ArMath::fabs(ratioRot) > .33; + + if (0) + printf("%.0f %.0f (x %.3f y %.3f throttle %.3f)\n", ratioTrans * ratioThrottle * 1000, + ratioRot * ratioThrottle * 50, ratioTrans, ratioRot, ratioThrottle); + if (!doTrans && !doRot) + { + // if the joystick is in the center, we don't need the deadman, + // and we were stopped lasttime, then just let other stuff go + if (myDeadZoneLast && !myRequireDeadmanPushed) + { + if (printing) + printf("ArActionRobotJoydrive: deadzone Nothing\n"); + return NULL; + } + // if the deadman doesn't need to be pushed let something else happen here + if (printing) + printf("ArActionRobotJoydrive: deadzone\n"); + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + myDeadZoneLast = true; + return &myDesired; + } + + myDeadZoneLast = false; + // if they have the stick the opposite direction of the velocity + // then let people crank up the deceleration + if (doTrans && ((myRobot->getVel() > 0 && ratioTrans < -0.5) || + (myRobot->getVel() < 0 && ratioTrans > 0.5))) + { + if (printing) + printf("ArActionRobotJoydrive: Decelerating trans more\n"); + myDesired.setTransDecel(myRobot->getTransDecel() * 3); + } + + // if they have the stick the opposite direction of the velocity + // then let people crank up the deceleration + if (doRot && ((myRobot->getRotVel() > 0 && ratioRot < -0.5) || + (myRobot->getRotVel() < 0 && ratioRot > 0.5))) + { + if (printing) + printf("ArActionRobotJoydrive: Decelerating rot more\n"); + myDesired.setRotDecel(myRobot->getRotDecel() * 3); + } + + if (doTrans) + myDesired.setVel(ratioTrans * ratioThrottle * myRobot->getTransVelMax()); + else + myDesired.setVel(0); + + printf("%.0f %.0f\n", ratioTrans * ratioThrottle * myRobot->getTransVelMax(), + ratioRot * ratioThrottle * myRobot->getRotVelMax()); + + + if (doRot) + myDesired.setRotVel(ratioRot * ratioThrottle * myRobot->getRotVelMax()); + else + myDesired.setRotVel(0); + + if(printing) + printf("ArActionRobotJoydrive: (%ld ms ago) we got %d %d %.2f %.2f %.2f (speed %.0f %.0f)\n", + myPacketReceivedTime.mSecSince(), + myButton1, myButton2, ratioTrans, ratioRot, ratioThrottle, + myRobot->getVel(), myRobot->getRotVel()); + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionStallRecover.cpp b/Legacy/Aria/src/ArActionStallRecover.cpp new file mode 100644 index 0000000..e3f3be6 --- /dev/null +++ b/Legacy/Aria/src/ArActionStallRecover.cpp @@ -0,0 +1,308 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include +#include "ArRobot.h" +#include "ArResolver.h" +#include "ArActionStallRecover.h" + +/** + @param name name of the action + @param obstacleDistance distance at which not to move because of + obstacle. (mm) + @param cyclesToMove default number of cycles to move (# of cycles) (may be +changed via ArConfig) + @param speed default speed at which to back up or go forward (mm/sec) (may be +changed via ArConfig) + @param degreesToTurn default number of degrees to turn (deg) (may be changed vi +ArConfig) + @param enabled default value of "enabled" state configuration parameter (may +be changed via ArConfig) +*/ +AREXPORT +ArActionStallRecover::ArActionStallRecover(const char * name, + double obstacleDistance, + int cyclesToMove, + double speed, + double degreesToTurn, + bool enabled) : + ArAction(name, "Recovers the robot from a stall.") +{ + setNextArgument(ArArg("obstacle distance", &myObstacleDistance, + "Distance at which not to move because of obstacle. (mm)")); + myObstacleDistance = obstacleDistance; + setNextArgument(ArArg("cycles to move", &myCyclesToMove, + "Number of cycles to move (# of cycles)")); + myCyclesToMove = cyclesToMove; + setNextArgument(ArArg("speed", &mySpeed, + "Speed at which to back up or go forward (mm/sec)")); + mySpeed = speed; + setNextArgument(ArArg("degrees to turn", &myDegreesToTurn, + "Number of Degrees to turn (deg)")); + myDegreesToTurn = degreesToTurn; + setNextArgument(ArArg("enabled", &myEnabled, + "Whether stall recover is enabled or not")); + myEnabled = enabled; + + myState = STATE_NOTHING; + + myResolver = NULL; + mySequenceNum = 0; + addSequence(BACK | TURN); + addSequence(FORWARD | TURN); + addSequence(BACK); + addSequence(FORWARD); + addSequence(TURN_LEFT); + addSequence(TURN_RIGHT); + addSequence(BACK | TURN_LEFT); + addSequence(BACK | TURN_RIGHT); + addSequence(FORWARD | TURN_LEFT); + addSequence(FORWARD | TURN_RIGHT); + mySequencePos = 0; + myLastFired = 0; +} + +AREXPORT +ArActionStallRecover::~ArActionStallRecover() +{ + + +} + +AREXPORT void ArActionStallRecover::activate(void) +{ + myState = STATE_NOTHING; + ArAction::activate(); +} + +void ArActionStallRecover::addSequence(int sequence) +{ + mySequence[mySequenceNum] = sequence; + ++mySequenceNum; +} + +AREXPORT +ArActionDesired *ArActionStallRecover::fire(ArActionDesired currentDesired) +{ + std::string doingString; + + if (!myEnabled) + return NULL; + + if (myRobot->isLeftMotorStalled()) + ArLog::log(ArLog::Verbose, "########## Left stall"); + if (myRobot->isRightMotorStalled()) + ArLog::log(ArLog::Verbose, "########## Right stall"); + + if ((currentDesired.getVelStrength() >= 1.0 || + currentDesired.getDeltaHeadingStrength() >= 1.0 || + currentDesired.getHeadingStrength() >= 1.0 || + currentDesired.getRotVelStrength() >= 1.0)) + { + if (myState != STATE_NOTHING) + { + myState = STATE_NOTHING; + myCount = -1; + ArLog::log(ArLog::Normal, "StallRecover: done (interrupted)"); + } + return NULL; + } + + myActionDesired.reset(); + switch (myState) + { + case STATE_NOTHING: + if (!myRobot->isLeftMotorStalled() && !myRobot->isRightMotorStalled()) + return NULL; + if (myRobot->isLeftMotorStalled() && myRobot->isRightMotorStalled()) + doingString = "StallRecover: Both motors stalled"; + else if (myRobot->isLeftMotorStalled()) + doingString = "StallRecover: Left motor stalled"; + else if (myRobot->isRightMotorStalled()) + doingString = "StallRecover: Right motor stalled"; + if (time(NULL) - myLastFired <= 5) + { + //printf("Didn't reset... %ld time diff\n", time(NULL) - myLastFired); + ++mySequencePos; + } + else + { + //printf("Reset\n"); + mySequencePos = 0; + } + if (mySequencePos >= mySequenceNum) + mySequencePos = 0; + myDoing = mySequence[mySequencePos]; + if (myDoing & FORWARD) + doingString += " driving_forward"; + if (myDoing & BACK) + doingString += " driving_backward"; + if (myDoing & TURN) + doingString += " turning"; + if (myDoing & TURN_LEFT) + doingString += " turning_left"; + if (myDoing & TURN_RIGHT) + doingString += " turning_right"; + if (myDoing == 0) + doingString += " messed"; + ArLog::log(ArLog::Normal, doingString.c_str()); + myActionDesired.setVel(0); + myActionDesired.setDeltaHeading(0); + case STATE_GOING: + myLastFired = time(NULL); + doit(); + break; + default: + ArLog::log(ArLog::Normal, "StallRecover: Bad state"); + break; + } + return &myActionDesired; +} + +void ArActionStallRecover::doit(void) +{ + double leftDist, rightDist; + double dist; + int turnDirection; + bool transFired, rotFired; + + if (myCount == -1 || myState != STATE_GOING) + { + myCount = myCyclesToMove; + myState = STATE_GOING; + mySideStalled = 0; + if (myRobot->isLeftMotorStalled()) + mySideStalled += 1; + if (myRobot->isRightMotorStalled()) + mySideStalled += 2; + if (myDoing & TURN) + { + rightDist = myRobot->checkRangeDevicesCurrentPolar(-120, -60); + leftDist = myRobot->checkRangeDevicesCurrentPolar(60, 120); + if (mySideStalled == 1 || rightDist < 0) + turnDirection = -1; + else if (mySideStalled == 2 || leftDist < 0) + turnDirection = 1; + else if (rightDist < leftDist) + turnDirection = 1; + else + turnDirection = -1; + myDesiredHeading = myRobot->getTh() + turnDirection * myDegreesToTurn; + } + else if (myDoing & TURN_LEFT) + myDesiredHeading = myRobot->getTh() + myDegreesToTurn; + else if (myDoing & TURN_RIGHT) + myDesiredHeading = myRobot->getTh() + -1 * myDegreesToTurn; + } + else + --myCount; + + if (myDoing & MOVEMASK) + { + // if we're moving but not turning then don't turn + if (!(myDoing & TURNMASK)) + myActionDesired.setRotVel(0); + + if (myDoing & FORWARD) + dist = (myRobot->checkRangeDevicesCurrentPolar(-120, 120) - + myRobot->getRobotRadius()); + else if (myDoing & BACK) + dist = (myRobot->checkRangeDevicesCurrentPolar(120, -120) - + myRobot->getRobotRadius()); + if ((myCount <= 0 || + (dist > 0 && dist < myObstacleDistance && + myCount <= myCyclesToMove / 2))) + { + //printf("Not backing "); + myActionDesired.setVel(0); + transFired = false; + } + else + { + //printf("backing "); + if (myDoing & BACK) + myActionDesired.setVel(mySpeed * -1); + if (myDoing & FORWARD) + myActionDesired.setVel(mySpeed); + transFired = true; + } + } + else + { + transFired = false; + } + + if ((myDoing & TURNMASK)) + { + // if we're turning but not moving then don't move + if (!(myDoing & MOVEMASK)) + myActionDesired.setVel(0); + + if ((myCount <= 0 || myDegreesToTurn == 0 || + ArMath::fabs(ArMath::subAngle(myRobot->getTh(),myDesiredHeading)) < 3)) + { + //printf("Not turning \n"); + myActionDesired.setRotVel(0); + rotFired = false; + } + else + { + //printf("turning \n"); + myActionDesired.setHeading(myDesiredHeading); + rotFired = true; + } + } + else + { + rotFired = false; + } + + + if (myCount <= 0 || (!transFired && !rotFired)) + { + myState = STATE_NOTHING; + ArLog::log(ArLog::Normal, "StallRecover: done"); + myActionDesired.reset(); + return; + } +} + +void ArActionStallRecover::addToConfig(ArConfig* config, const char* sectionName, ArPriority::Priority priority) +{ + if (config == NULL || sectionName == NULL) + { + ArLog::log(ArLog::Terse, "Could not add ArActionStallRecoverToConfig because config (%p) or section (%p) are null", config, sectionName); + return; + } + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), sectionName, priority); + config->addParam(ArConfigArg("StallRecoverEnabled", &myEnabled, "Whether a stall recover should be done when the robot stalls."), sectionName, priority); + config->addParam(ArConfigArg("StallRecoverSpeed", &mySpeed, "Speed at which to back away when stalled.", 0), sectionName, priority); + config->addParam(ArConfigArg("StallRecoverDuration", &myCyclesToMove, "Cycles of operation to move when recovering from stall.", 0), sectionName, priority); + config->addParam(ArConfigArg("StallRecoverRotation", &myDegreesToTurn, "Amount of rotation when recovering (degrees).", 0), sectionName, priority); + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), sectionName, priority); +} + diff --git a/Legacy/Aria/src/ArActionStop.cpp b/Legacy/Aria/src/ArActionStop.cpp new file mode 100644 index 0000000..674c9d3 --- /dev/null +++ b/Legacy/Aria/src/ArActionStop.cpp @@ -0,0 +1,54 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionStop.h" +#include "ArRobot.h" + +/** + @param name name of the action +*/ +AREXPORT ArActionStop::ArActionStop(const char *name) : + ArAction(name, "Stops the robot") +{ +} + +AREXPORT ArActionStop::~ArActionStop() +{ +} + +AREXPORT ArActionDesired *ArActionStop::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + if (myRobot->hasLatVel()) + myDesired.setLeftLatVel(0); + + return &myDesired; +} diff --git a/Legacy/Aria/src/ArActionTriangleDriveTo.cpp b/Legacy/Aria/src/ArActionTriangleDriveTo.cpp new file mode 100644 index 0000000..86392c5 --- /dev/null +++ b/Legacy/Aria/src/ArActionTriangleDriveTo.cpp @@ -0,0 +1,964 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionTriangleDriveTo.h" +#include "ArRobot.h" +#include "ArLaser.h" +#include "ariaInternal.h" + +AREXPORT ArActionTriangleDriveTo::ArActionTriangleDriveTo( + const char *name, double finalDistFromVertex, + double approachDistFromVertex, double speed, + double closeDist, double acquireTurnSpeed) : + ArAction(name, "Finds a triangle and drives in front of it") +{ + myDataMutex.setLogName("ArActionTriangleDriveTo::myDataMutex"); + setNextArgument(ArArg("final dist from vertex", &myFinalDistFromVertex, + "Distance from vertex we want to be at (mm)")); + myFinalDistFromVertex = finalDistFromVertex; + + setNextArgument(ArArg("approach dist from vertex", &myApproachDistFromVertex, + "Distance from vertex we'll go to before going to final (0 goes straight to final) (mm)")); + myApproachDistFromVertex = approachDistFromVertex; + + setNextArgument(ArArg("speed", &mySpeed, "speed to drive at (mm/sec)")); + mySpeed = speed; + + setNextArgument(ArArg("close dist", &myCloseDist, + "how close we have to get to our final point (mm)")); + myCloseDist = closeDist; + + setNextArgument(ArArg("acquire turn speed", &myAcquireTurnSpeed, + "if we are aqcquiring the rot vel to turn at (deg/sec)")); + myAcquireTurnSpeed = acquireTurnSpeed; + + myLaser = NULL; + myLineFinder = NULL; + myOwnLineFinder = false; + myState = STATE_INACTIVE; + mySaveData = false; + myData = NULL; + myVertexSeen = false; + // set all our defaults + setTriangleParams(); + setVertexUnseenStopMSecs(); + setAcquire(); + setIgnoreTriangleDist(); + myOriginalAngle = 1000; + setMaxDistBetweenLinePoints(); + setMaxLateralDist(); + setMaxAngleMisalignment(); + myPrinting = false; + myAdjustVertex = false; + myGotoVertex = false; + myLocalXOffset = 0; + myLocalYOffset = 0; + myThOffset = 0; + myUseLegacyVertexOffset = false; +} + +AREXPORT void ArActionTriangleDriveTo::setParameters( + double finalDistFromVertex, + double approachDistFromVertex, double speed, + double closeDist, double acquireTurnSpeed) +{ + myFinalDistFromVertex = finalDistFromVertex; + myApproachDistFromVertex = approachDistFromVertex; + mySpeed = speed; + myCloseDist = closeDist; + myAcquireTurnSpeed = acquireTurnSpeed; +} + +AREXPORT ArActionTriangleDriveTo::~ArActionTriangleDriveTo() +{ + if (myOwnLineFinder) + delete myLineFinder; +} + +AREXPORT void ArActionTriangleDriveTo::activate(void) +{ + if (myPrinting) + ArLog::log(ArLog::Normal, "ArActionTriangleDriveTo: Activating"); + ArAction::activate(); + myVertexSeen = false; + myVertexSeenLast.setToNow(); + myDataMutex.lock(); + if (mySaveData && myData != NULL) + myData->setVertexSeen(false); + myDataMutex.unlock(); + + // in case we made things so early we didn't have sensors + if (myLineFinder == NULL && myRobot != NULL) + setRobot(myRobot); + + myOriginalAngle = myRobot->getTh(); + if (myLineFinder != NULL) + myState = STATE_ACQUIRE; + else + myState = STATE_FAILED; + +} + +AREXPORT void ArActionTriangleDriveTo::deactivate(void) +{ + ArAction::deactivate(); + myState = STATE_INACTIVE; +} + +AREXPORT void ArActionTriangleDriveTo::setRobot(ArRobot *robot) +{ + ArAction::setRobot(robot); + if (myLineFinder == NULL && myRobot != NULL) + { + int ii; + for (ii = 1; ii <= Aria::getMaxNumLasers(); ii++) + { + if (myRobot->findLaser(ii) != NULL && + myRobot->findLaser(ii)->isConnected()) + { + myLaser = myRobot->findLaser(ii); + myLineFinder = new ArLineFinder(myLaser); + myOwnLineFinder = true; + break; + } + } + } +} + +AREXPORT void ArActionTriangleDriveTo::setLineFinder(ArLineFinder *lineFinder) +{ + if (myLineFinder != NULL && myOwnLineFinder) + delete myLineFinder; + + myLineFinder = lineFinder; + myOwnLineFinder = false; +} + +AREXPORT ArPose ArActionTriangleDriveTo::findPoseFromVertex( + double distFromVertex) +{ + ArPose ret; + ArPose vertex; + vertex = myRobot->getEncoderTransform().doTransform(myVertex); + + ret.setX((vertex.getX() + ArMath::cos(vertex.getTh()) * distFromVertex)); + ret.setY((vertex.getY() + ArMath::sin(vertex.getTh()) * distFromVertex)); + return ret; +} + +/** + This finds our vertex point and angle from vertex. + + @internal + + @param initial if we're finding the initial vertex then we look for + more in front of us than on the side and closer, if we're not + finding the initial one we look more towards where we found it last + time + + @param goStraight we're just driving straight in to the vertex in the second + stage. +**/ +AREXPORT void ArActionTriangleDriveTo::findTriangle(bool initial, + bool goStraight) +{ + if (myGotLinesCounter != myRobot->getCounter()) + { + ArTime now; + now.setToNow(); + myLineFinder->setMaxDistBetweenPoints(myMaxDistBetweenLinePoints); + myLines = myLineFinder->getLines(); + //printf("took %d\n", now.mSecSince()); + } + myGotLinesCounter = myRobot->getCounter(); + // myLineFinder->saveLast(); + + int start; + int len = myLines->size(); + FILE *corners = NULL; + /*if ((corners = ArUtil::fopen("corners", "w+")) == NULL) + { + printf("Couldn't open corners file\n"); + } + */ + // length of line 1 + double line1Dist; + // length of line 2 + double line2Dist; + // distance from the end of line1 to the beginning of line2 + double distLine1ToLine2; + // difference in angle between line1 and line2 + double angleBetween; + // difference between the angleBetween and the angleBetween we want + double angleDelta; + /// difference between line1 and how long it should be + double line1Delta; + /// difference between line2 and how long it should be + double line2Delta; + // the score for the line evaluated + double lineScore; + // our position of this vertex + ArPose vertex; + // the score for our good line + double goodLineScore = 0.0; + // my pose for the good vertex + ArPose goodVertex; + ArLineSegment vertexLine; + ArPose adjustedVertex; + + ArPose lastVertex; + bool printing = false; + + lastVertex = myRobot->getEncoderTransform().doTransform(myVertex); + + for (start = 0; start < len; start++) + { + if (start + 1 < len) + { + line1Dist = (*myLines)[start]->getEndPoint1().findDistanceTo( + (*myLines)[start]->getEndPoint2()); + line2Dist = (*myLines)[start+1]->getEndPoint1().findDistanceTo( + (*myLines)[start+1]->getEndPoint2()); + distLine1ToLine2 = (*myLines)[start]->getEndPoint2().findDistanceTo( + (*myLines)[start+1]->getEndPoint1()); + angleBetween = ArMath::subAngle(180, + ArMath::subAngle((*myLines)[start]->getLineAngle(), + (*myLines)[start+1]->getLineAngle())); + + if (myAngleBetween != 0) + angleDelta = ArMath::fabs(ArMath::subAngle( + angleBetween, myAngleBetween)); + else + angleDelta = 0; + + if (myLine1Length != 0) + line1Delta = ArMath::fabs(line1Dist - myLine1Length); + else + line1Delta = 0; + + if (myLine2Length != 0) + line2Delta = ArMath::fabs(line2Dist - myLine2Length); + else + line2Delta = 0; + + + if (printing) + ArLog::log(ArLog::Normal, "dl1l2 %5.0f l1d %5.0f l2d %5.0f ab %5.0f thdt %5.0f l1dt %5.0f l2dt %5.0f", + distLine1ToLine2, + line1Dist, + line2Dist, + angleBetween, + angleDelta, + line1Delta, line2Delta); + + // if any of these is true the line is just too bad and we should bail + if (line1Delta > 125 || line2Delta > 125 || + angleDelta > 15 || distLine1ToLine2 > 100) + continue; + + + ArPose intersection; + + + ArLine *line1Line = new ArLine(*(*myLines)[start]->getLine()); + ArLine *line2Line = new ArLine(*(*myLines)[start+1]->getLine()); + if (!line1Line->intersects(line2Line, &intersection)) + { + ArLog::log(ArLog::Terse, "ArActionTriangeDriveTo: couldn't find intersection of lines (shouldn't happen)"); + return; + } + delete line1Line; + delete line2Line; + + + + /* + printf("corner at polar %5.0f %5.0f pose (%.0f %.0f) angleDelta %.0f %.0f\n", + myFinder->getLinesTakenPose().findAngleTo(intersection), + myFinder->getLinesTakenPose().findDistanceTo(intersection), + intersection.getX(), intersection.getY(), + angleDelta, + ArMath::fabs((line1Delta + line2Delta) / 2)); + */ + if (corners != NULL) + fprintf(corners, "%.0f %.0f\n", intersection.getX(), + intersection.getY()); + + vertex.setPose(intersection); + /* + vertex.setTh(ArMath::subAngle(ArMath::atan2((*myLines)[start]->getY1() - + (*myLines)[start+1]->getY2(), + (*myLines)[start]->getX1() - + (*myLines)[start+1]->getX2()), + 90));; + */ + // if we don't care about the angle or it's a non-inverted + // triangle use the old way + if (myAngleBetween > -.1) + vertex.setTh(ArMath::addAngle((*myLines)[start]->getLineAngle(), + angleBetween / 2)); + // if it's an inverted triangle flip the angle so that things + // work right + else + vertex.setTh(ArMath::addAngle(180, + ArMath::addAngle((*myLines)[start]->getLineAngle(), + angleBetween / 2))); + + vertexLine.newEndPoints(vertex.getX(), vertex.getY(), + vertex.getX() + ArMath::cos(vertex.getTh()) * 20000, + vertex.getY() + ArMath::sin(vertex.getTh()) * 20000); + + if (myMaxLateralDist > 0) + { + ArLineSegment robotLine; + + robotLine.newEndPoints( + myRobot->getX(), myRobot->getY(), + myRobot->getX() + ArMath::cos(myRobot->getTh()) * 20000, + myRobot->getY() + ArMath::sin(myRobot->getTh()) * 20000); + + if (robotLine.getDistToLine(vertex) > myMaxLateralDist) + { + if (printing) + ArLog::log(ArLog::Normal, + "Robot off possible vertex line by %.0f, ignoring it", + robotLine.getDistToLine(vertex)); + continue; + } + } + + if (myMaxAngleMisalignment > 0) + { + //if (fabs(ArMath::subAngle(ArMath::subAngle(myRobot->getTh(), 180), + //vertex.getTh())) > myMaxAngleMisalignment) + if (fabs(ArMath::subAngle(ArMath::subAngle(myOriginalAngle, 180), + vertex.getTh())) > myMaxAngleMisalignment) + { + if (printing) + ArLog::log(ArLog::Normal, + "Robot misaligned from possible vertex line by %.0f (original %.0f robot %.0f line %.0f), ignoring it", + fabs(ArMath::subAngle( + ArMath::subAngle(myOriginalAngle, 180), + vertex.getTh())), + myOriginalAngle, myRobot->getTh(), vertex.getTh()); + continue; + } + } + + if (myAdjustVertex) + { + ArPose end1 = (*myLines)[start]->getEndPoint1(); + ArPose end2 = (*myLines)[start+1]->getEndPoint2(); + ArPose vertexLocal = vertex; + end1 = myRobot->getToLocalTransform().doTransform(end1); + end2 = myRobot->getToLocalTransform().doTransform(end2); + vertexLocal = myRobot->getToLocalTransform().doTransform(vertexLocal); + + ArPose closest; + /* old way that checked too large an area + myLaser->currentReadingBox(0, end1.getY(), + ArUtil::findMax(end1.getX(), end2.getX()), + end2.getY(), + &closest); + */ + + // new way that looks 100 mm closer to the robot than the + // vertex this may not be quite right because there's a chance + // the vertex won't be closest to the robot but that will be + // at an angle deep enough we probably won't see the other + // side the of the triangle so we should be okay + myLaser->currentReadingBox(vertexLocal.getX() - 100, end1.getY(), + ArUtil::findMax(end1.getX(), end2.getX()), + end2.getY(), + &closest); + closest = myRobot->getToGlobalTransform().doTransform(closest); + //printf("%g %g %g %g close %g %g\n", end1.getX(), end1.getY(), + //end2.getX(), end2.getY(), closest.getX(), closest.getY()); + + adjustedVertex.setPose( + closest.getX(), closest.getY(), + ArMath::addAngle((*myLines)[start]->getLineAngle(), + angleBetween / 2)); + + } + + + //printf("One that may be good enough\n"); + // if we got here we should calculate the score for the line + // first we calculate the score based on it matching + lineScore = 0; + lineScore += 10 - 1 * (line1Delta / 25); + //printf("1 %.0f\n", lineScore); + lineScore += 10 - 1 * (line2Delta / 25); + //printf("2 %.0f\n", lineScore); + lineScore += 10 - 1 * (angleDelta / 2); + //printf("3 %.0f\n", lineScore); + // now we calculate based on its position + + // if we're in our initial one we mostly want to make sure its + // in front of us + if (initial) + { + if (printing) + printf("init %.0f (%.3f) %.0f\n", + ArMath::subAngle(myRobot->getTh(), + myRobot->getPose().findAngleTo(vertex)), + 90 - ArMath::fabs(myRobot->findDeltaHeadingTo(vertex)) / 90, + vertexLine.getDistToLine(myRobot->getPose())); + + //ArMath::subAngle(myRobot->getTh(), + //myRobot->getPose().findAngleTo(vertex)))) / 90, + + // weight it more heavily for the lines in front of us + lineScore *= .5 + .5 * (30 - + ArMath::fabs( + ArMath::subAngle(myRobot->getTh(), + myRobot->getPose().findAngleTo(vertex)))) / 30; + if (printing) + printf("angle %.0f\n", lineScore); + lineScore *= .5 + .5 * (1500 - + vertexLine.getDistToLine(myRobot->getPose())) / 1500; + if (printing) + printf("disttoline %.0f\n", lineScore); + + // weight it more heavily if the vertex points towards along + // the same line as the line from the robot to the vertex + lineScore *= .5 + .5 * (30 - fabs(ArMath::subAngle( + vertex.getTh(), vertex.findAngleTo(myRobot->getPose())))); + + if (printing) + printf("anglefrompointing %.0f (%.0f %.0f)\n", lineScore, + vertex.getTh(), vertex.findAngleTo(myRobot->getPose())); + + } + // for not the initial one weight them more heavily if they're + // close to us + else + { + double dist = lastVertex.findDistanceTo(vertex); + if (dist < 100) + lineScore *= 1; + if (dist < 200) + lineScore *= .8; + else if (dist < 400) + lineScore *= .5; + else if (dist < 600) + lineScore *= .2; + else if (dist < 800) + lineScore *= .1; + else + lineScore *= 0; + + double angleFromLast = fabs(ArMath::subAngle(lastVertex.getTh(), + vertex.getTh())); + //printf("AngleFromLast %.0f %.0f %.0f\n", angleFromLast, lastVertex.getTh(), vertex.getTh()); + if (angleFromLast < 5) + lineScore *= 1; + else if (angleFromLast < 10) + lineScore *= .75; + else if (angleFromLast < 20) + lineScore *= .5; + else if (angleFromLast < 30) + lineScore *= .25; + else + lineScore *= 0; + + if (goStraight) + { + double angle = fabs(myRobot->findDeltaHeadingTo(vertex)); + if (angle < 2) + lineScore *= 1; + else if (angle < 5) + lineScore *= .5; + else if (angle < 10) + lineScore *= .1; + else + lineScore *= 0; + } + } + if (printing) + printf("linescore %.0f\n", lineScore); + // if the match is too bad just bail + if (lineScore < 5) + { + continue; + } + // otherwise see if its better then our previous one, if so set + // our actual vertex to it + if (goodLineScore < 1 || lineScore > goodLineScore) + { + if (printing) + printf("#### %.0f %.0f %.0f at %.0f %.0f\n", + vertex.getX(), vertex.getY(), vertex.getTh(), + myRobot->getPose().findAngleTo(vertex), + myRobot->getPose().findDistanceTo(vertex)); + goodLineScore = lineScore; + ArPose usedVertex; + if (myAdjustVertex) + usedVertex = adjustedVertex; + else + usedVertex = vertex; + + if (myLocalXOffset != 0 || myLocalYOffset != 0 || + fabs(myThOffset) > .00001) + { + ArPose before = usedVertex; + //ArLog::log(ArLog::Normal, + //"@@ Before %.0f %.0f %.0f (%d %d %.1f)", + //usedVertex.getX(), usedVertex.getY(), usedVertex.getTh(), + //myLocalXOffset, myLocalYOffset, myThOffset); + // old wrong code + if (myUseLegacyVertexOffset) + { + ArLog::log(ArLog::Normal, "Legacy vertex mode..."); + usedVertex.setX(usedVertex.getX() + + myLocalXOffset * ArMath::cos(usedVertex.getTh()) + + myLocalYOffset * ArMath::sin(usedVertex.getTh())); + usedVertex.setY(usedVertex.getY() - + myLocalXOffset * ArMath::sin(usedVertex.getTh()) - + myLocalYOffset * ArMath::cos(usedVertex.getTh())); + usedVertex.setTh(ArMath::addAngle(vertex.getTh(), myThOffset)); + //ArLog::log(ArLog::Normal, "@@ After %.0f %.0f %.0f (%.0f angle from before to after)", + //usedVertex.getX(), usedVertex.getY(), usedVertex.getTh(), + //before.findAngleTo(usedVertex)); + } + else + { + ArLog::log(ArLog::Normal, "New vertex mode..."); + // new code that uses a transform and does it right + // make a transform so that our existing vertex becomes the origin + ArTransform localTrans(before, ArPose(0, 0)); + // then do an inverse transform to pull the local offset out of + ArPose transformed = localTrans.doInvTransform(ArPose(myLocalXOffset, myLocalYOffset)); + usedVertex.setX(transformed.getX()); + usedVertex.setY(transformed.getY()); + usedVertex.setTh(ArMath::addAngle(vertex.getTh(), myThOffset)); + //ArLog::log(ArLog::Normal, "@@ Transformed %.0f %.0f %.0f (%.0f angle from before to after)", + //transformed.getX(), transformed.getY(), transformed.getTh(), + //before.findAngleTo(transformed)); + } + } + + myVertex = myRobot->getEncoderTransform().doInvTransform(usedVertex); + + myVertexSeen = true; + myVertexSeenLast.setToNow(); + myDataMutex.lock(); + if (mySaveData && myData != NULL) + { + myData->setVertexSeenThisCycle(true); + myData->setVertexSeen(true); + } + myDataMutex.unlock(); + } + continue; + + } + } + + if (corners != NULL) + fclose(corners); + myDataMutex.lock(); + if (mySaveData && myData != NULL) + myData->setLinesAndVertex( + myLines, myRobot->getEncoderTransform().doTransform(myVertex)); + myDataMutex.unlock(); +} + +AREXPORT ArActionDesired *ArActionTriangleDriveTo::fire( + ArActionDesired currentDesired) +{ + myDesired.reset(); + double dist; + double angle; + double vel; + ArPose approach; + ArPose final; + ArPose vertex; + + myDataMutex.lock(); + if (myData != NULL) + { + delete myData; + myData = NULL; + } + if (mySaveData) + myData = new Data; + if (mySaveData && myData != NULL) + { + myData->setVertexSeenThisCycle(false); + myData->setVertexSeen(myVertexSeen); + } + myDataMutex.unlock(); + + vertex = myRobot->getEncoderTransform().doTransform(myVertex); + + switch (myState) + { + case STATE_INACTIVE: + return NULL; + case STATE_SUCCEEDED: + case STATE_FAILED: + myDesired.setVel(0); + myDesired.setRotVel(0); + return &myDesired; + case STATE_ACQUIRE: + if (myPrinting) + ArLog::log(ArLog::Normal, "Acquire"); + findTriangle(true); + if (!myVertexSeen && + myVertexSeenLast.mSecSince() > myVertexUnseenStopMSecs) + { + if (myAcquire) + { + myState = STATE_SEARCHING; + return fire(currentDesired); + } + else + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Failed"); + myState = STATE_FAILED; + return fire(currentDesired); + } + } + if (myVertexSeen) + { + approach = findPoseFromVertex(myApproachDistFromVertex); + final = findPoseFromVertex(myFinalDistFromVertex); + if (mySaveData) + { + myDataMutex.lock(); + if (myData != NULL) + { + myData->setApproach(approach); + myData->setFinal(final); + } + myDataMutex.unlock(); + } + // if we aren't approaching or if its behind us go straight to + // final + if (myPrinting) + ArLog::log(ArLog::Normal, "%.0f", ArMath::fabs(myRobot->findDeltaHeadingTo(approach))); + if (myApproachDistFromVertex <= 0 || + ArMath::fabs(myRobot->findDeltaHeadingTo(approach)) > 90 || + (ArMath::fabs(myRobot->findDeltaHeadingTo(approach)) > 45 && + myRobot->findDistanceTo(final) < myRobot->findDistanceTo(approach))) + + { + if (myGotoVertex) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Going to vertex"); + myState = STATE_GOTO_VERTEX; + } + else + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Going to final"); + myState = STATE_GOTO_FINAL; + } + return fire(currentDesired); + } + // otherwise we go to our approach + else + { + myState = STATE_GOTO_APPROACH; + return fire(currentDesired); + } + } + myDesired.setVel(0); + myDesired.setRotVel(0); + return &myDesired; + case STATE_SEARCHING: + if (myPrinting) + ArLog::log(ArLog::Normal, "Searching"); + myVertexSeen = false; + myDataMutex.lock(); + if (mySaveData && myData != NULL) + myData->setVertexSeen(false); + myDataMutex.unlock(); + + findTriangle(true); + if (myVertexSeen) + { + myState = STATE_ACQUIRE; + return fire(currentDesired); + } + myDesired.setVel(0); + myDesired.setRotVel(myAcquireTurnSpeed); + return &myDesired; + break; + case STATE_GOTO_APPROACH: + findTriangle(false); + if (!myVertexSeen && + myVertexSeenLast.mSecSince() > myVertexUnseenStopMSecs) + { + if (myAcquire) + { + myState = STATE_SEARCHING; + return fire(currentDesired); + } + else + { + ArLog::log(ArLog::Normal, "ArActionTriangleDriveTo: Failed"); + myState = STATE_FAILED; + return fire(currentDesired); + } + } + approach = findPoseFromVertex(myApproachDistFromVertex); + if (mySaveData) + { + myDataMutex.lock(); + if (myData != NULL) + myData->setApproach(approach); + myDataMutex.unlock(); + } + dist = myRobot->getPose().findDistanceTo(approach); + angle = myRobot->getPose().findAngleTo(approach); + if (dist < myCloseDist || + (dist < myCloseDist * 2 && + ArMath::fabs(myRobot->findDeltaHeadingTo(approach)) > 30)) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Goto approach there"); + myState = STATE_ALIGN_APPROACH; + return fire(currentDesired); + } + myDesired.setHeading(angle); + vel = sqrt(dist * 400 * 2); + vel *= (180 - ArMath::fabs(myRobot->findDeltaHeadingTo(approach))) / 180; + if (vel < 0) + vel = 0; + if (vel > mySpeed) + vel = mySpeed; + myDesired.setVel(vel); + if (myPrinting) + ArLog::log(ArLog::Normal, "Goto approach speed %.0f dist %.0f angle %.0f", vel, dist, angle); + return &myDesired; + case STATE_ALIGN_APPROACH: + angle = myRobot->getPose().findAngleTo(vertex); + if (myPrinting) + ArLog::log(ArLog::Normal, "Align approach %.0f %.0f", myRobot->getTh(), + angle); + if (ArMath::fabs(ArMath::subAngle(myRobot->getTh(), angle)) < 2 && + ArMath::fabs(myRobot->getVel()) < 5) + { + //ArLog::log(ArLog::Normal, "finaldist %.0f", ArMath::fabs(myFinalDistFromVertex)); + if (myGotoVertex) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Going to vertex"); + myState = STATE_GOTO_VERTEX; + } + else + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Going to final"); + myState = STATE_GOTO_FINAL; + } + return fire(currentDesired); + } + myDesired.setHeading(angle); + myDesired.setVel(0); + return &myDesired; + case STATE_GOTO_VERTEX: + final = findPoseFromVertex(0); + if (myUseIgnoreInGoto && + (myRobot->findDistanceTo(final) > + myFinalDistFromVertex + myIgnoreTriangleDist)) + findTriangle(false, true); + + if (!myVertexSeen && + myVertexSeenLast.mSecSince() > myVertexUnseenStopMSecs) + { + ArLog::log(ArLog::Normal, "ActionTriangle: Failed"); + myState = STATE_FAILED; + return fire(currentDesired); + } + final = findPoseFromVertex(0); + if (mySaveData) + { + myDataMutex.lock(); + if (myData != NULL) + myData->setFinal(final); + myDataMutex.unlock(); + } + dist = myRobot->findDistanceTo(final); + dist -= myFinalDistFromVertex; + angle = myRobot->findDeltaHeadingTo(final); + if (ArMath::fabs(angle) > 10) + { + ArLog::log(ArLog::Normal, "ActionTriangle: FAILING because trying to turn %.0f degrees to something %.0f away that we saw %ld ms ago ", angle, dist, myVertexSeenLast.mSecSince()); + myState = STATE_FAILED; + return fire(currentDesired); + } + else + { + myDesired.setDeltaHeading(angle); + } + if (dist > 0) + vel = sqrt(dist * 100 * 2); + else + vel = 0; + if (vel < 0) + vel = 0; + if (vel > mySpeed) + vel = mySpeed; + myDesired.setVel(vel); + if (dist <= 0 && fabs(myRobot->getVel()) < 5) + { + ArLog::log(ArLog::Normal, "ArActionTriangleDriveTo: Succeeded (vertex) %g", dist); + myState = STATE_SUCCEEDED; + return fire(currentDesired); + } + if (myPrinting) + ArLog::log(ArLog::Normal, "Goto vertex speed %.0f dist %.0f angle %.0f %ld ago", + vel, dist, myRobot->findDeltaHeadingTo(final), + myVertexSeenLast.mSecSince()); + return &myDesired; + + case STATE_GOTO_FINAL: + // see if we are close enough we just keep the same reading, + // otherwise we get the new reading + + final = findPoseFromVertex(myFinalDistFromVertex); + + //if (myRobot->findDistanceTo(final) > 250) + if (myRobot->findDistanceTo(final) > myIgnoreTriangleDist) + findTriangle(false); + + if (!myVertexSeen && + myVertexSeenLast.mSecSince() > myVertexUnseenStopMSecs) + { + if (myAcquire) + { + myState = STATE_SEARCHING; + return fire(currentDesired); + } + else + { + ArLog::log(ArLog::Normal, "ArActionTriangleDriveTo: Failed"); + myState = STATE_FAILED; + return fire(currentDesired); + } + } + final = findPoseFromVertex(myFinalDistFromVertex); + if (mySaveData) + { + myDataMutex.lock(); + if (myData != NULL) + myData->setFinal(final); + myDataMutex.unlock(); + } + dist = myRobot->getPose().findDistanceTo(final); + angle = myRobot->getPose().findAngleTo(final); + if (myPrinting) + ArLog::log(ArLog::Normal, + "final %.0f away at %.0f vertex %.0f away %ld ago", + dist, myRobot->findDeltaHeadingTo(final), + myRobot->findDistanceTo(vertex), + myVertexSeenLast.mSecSince()); + + if ((dist < 5) || + (myRobot->getVel() > 0 && dist < myCloseDist && + ArMath::fabs(myRobot->findDeltaHeadingTo(final)) > 20) || + (myRobot->getVel() < 0 && dist < myCloseDist && + ArMath::fabs(myRobot->findDeltaHeadingTo(final)) < 160) || + (ArMath::fabs(myRobot->getVel()) < 5 && dist < myCloseDist)) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Goto final there"); + myState = STATE_ALIGN_FINAL; + return fire(currentDesired); + } + + if (ArMath::fabs(ArMath::subAngle(myRobot->getTh(), + angle)) < 90) + { + myDesired.setHeading(angle); + vel = sqrt(dist * 100 * 2); + vel *= (45 - ArMath::fabs(myRobot->findDeltaHeadingTo(final))) / 45; + if (vel < 0) + vel = 0; + if (vel > mySpeed) + vel = mySpeed; + myDesired.setVel(vel); + if (myPrinting) + ArLog::log(ArLog::Normal, "Goto final speed %.0f dist %.0f angle %.0f", vel, dist, myRobot->findDeltaHeadingTo(final)); + + return &myDesired; + } + else + { + myDesired.setHeading( + ArMath::subAngle(myRobot->getPose().findAngleTo(final), 180)); + vel = -1 * sqrt(dist * 100 * 2); + vel *= (45 - ArMath::fabs(ArMath::subAngle(180, + myRobot->findDeltaHeadingTo(final)))) / 45; + if (vel > 0) + vel = 0; + if (vel < -mySpeed) + vel = -mySpeed; + myDesired.setVel(vel); + if (myPrinting) + ArLog::log(ArLog::Normal, "Goto final (backing) speed %.0f dist %.0f angle %.0f (turning to %.0f)", vel, dist, angle, + ArMath::subAngle(180, myRobot->findDeltaHeadingTo(final))); + return &myDesired; + } + case STATE_ALIGN_FINAL: + angle = myRobot->getPose().findAngleTo(vertex); + if (ArMath::fabs(ArMath::subAngle(myRobot->getTh(), angle)) < 2 && + ArMath::fabs(myRobot->getVel()) < 5) + { + ArLog::log(ArLog::Normal, "ArActionTriangleDriveTo: Succeeded"); + myState = STATE_SUCCEEDED; + return fire(currentDesired); + } + if (myPrinting) + ArLog::log(ArLog::Normal, "Align final"); + myDesired.setHeading(angle); + myDesired.setVel(0); + return &myDesired; + } + + findTriangle(true); + return NULL; + +} + +ArActionTriangleDriveTo::Data *ArActionTriangleDriveTo::getData(void) +{ + Data *data = NULL; + myDataMutex.lock(); + data = myData; + myData = NULL; + myDataMutex.unlock(); + return data; +} + + diff --git a/Legacy/Aria/src/ArActionTurn.cpp b/Legacy/Aria/src/ArActionTurn.cpp new file mode 100644 index 0000000..d5987e0 --- /dev/null +++ b/Legacy/Aria/src/ArActionTurn.cpp @@ -0,0 +1,119 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArActionTurn.h" +#include "ArRobot.h" + +AREXPORT ArActionTurn::ArActionTurn(const char *name, double speedStartTurn, + double speedFullTurn, double turnAmount) : + ArAction(name, + "Turns the robot depending on actions by higher priority actions.") +{ + setNextArgument(ArArg("speed start turn", &mySpeedStart, + "max vel at which to start turning (mm/sec)")); + mySpeedStart = speedStartTurn; + + setNextArgument(ArArg("speed full turn", &mySpeedFull, + "max vel at which to turn the full amount (mm/sec)")); + mySpeedFull = speedFullTurn; + + setNextArgument(ArArg("turn amount", &myTurnAmount, + "max vel at which to start turning (mm/sec)")); + myTurnAmount = turnAmount; + + myTurning = 0; + +} + +AREXPORT ArActionTurn::~ArActionTurn() +{ + +} + +AREXPORT ArActionDesired *ArActionTurn::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + double turnAmount; + double angle; + + // if there's no strength, bail + // if our max velocity is higher than our start turn, bail + if (myRobot->getVel() > mySpeedStart) + { + if (myTurning != 0) + { + //printf("Resetting\n"); + myTurning = 0; + } + return NULL; + } + + // we're going to turn now... so figure out the amount to turn + + // if our max vel is lower than the turn amount, just do the full turn + if (myRobot->getVel() < mySpeedFull) + { + //printf("full\n"); + turnAmount = myTurnAmount; + } + // otherwise scale it + else + { + turnAmount = ((mySpeedStart - myRobot->getVel()) / + (mySpeedStart - mySpeedFull)) * myTurnAmount; + + //printf("%.2f\n", (mySpeedStart - currentDesired.getMaxVel()) / (mySpeedStart - mySpeedFull)); + } + // if we're already turning, turn that direction + if (myTurning != 0) + turnAmount *= myTurning; + // find out which side the closest obstacle is, and turn away + else + { + if (myRobot->checkRangeDevicesCurrentPolar(-90, 90, &angle) < 3000) + { + if (angle > 0) + { + //printf("### right\n"); + myTurning = -1; + } + else + { + //printf("### left\n"); + myTurning = 1; + } + } + else + { + //printf("### left\n"); + myTurning = 1; + } + turnAmount *= myTurning; + } + myDesired.setDeltaHeading(turnAmount); + return &myDesired; +} diff --git a/Legacy/Aria/src/ArAnalogGyro.cpp b/Legacy/Aria/src/ArAnalogGyro.cpp new file mode 100644 index 0000000..9a72fa0 --- /dev/null +++ b/Legacy/Aria/src/ArAnalogGyro.cpp @@ -0,0 +1,347 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArCommands.h" +#include "ArExport.h" +#include "ArAnalogGyro.h" +#include "ArRobot.h" +#include "ArRobotConfigPacketReader.h" + +/** +**/ +AREXPORT ArAnalogGyro::ArAnalogGyro(ArRobot *robot) : + myHandleGyroPacketCB(this, &ArAnalogGyro::handleGyroPacket), + myEncoderCorrectCB(this, &ArAnalogGyro::encoderCorrect), + myStabilizingCB(this, &ArAnalogGyro::stabilizingCallback), + myUserTaskCB(this, &ArAnalogGyro::userTaskCallback) +{ + myRobot = robot; + myHandleGyroPacketCB.setName("ArAnalogGyro"); + myRobot->addStabilizingCB(&myStabilizingCB); + // this scaling factor now comes from the parameter file + myScalingFactor = 0; + myHeading = 0; + myReadingThisCycle = false; + + myAverageTotal = 0; + myAverageCount = 0; + myLastAverageTaken.setSec(0); + myLastAverageTaken.setMSec(0); + myLastAverage = 0; + // nominal values + myGyroSigma = .01; + myInertialVarianceModel = 0.001; + myRotVarianceModel = .25; // deg2/deg + myTransVarianceModel = 4.0; // deg2/meter + myAccumulatedDelta = 0; + myIsActive = true; + myHaveGottenData = false; + myLogAnomalies = false; + myGyroType = GYRO_NONE; + myHasGyroOnlyMode = false; + myHasNoData = true; + myGyroWorking = true; + if (myRobot->isConnected()) + stabilizingCallback(); + myUserTaskCB.setName("ArAnalogGyro"); + myRobot->addUserTask("ArAnalogGyro", 50, &myUserTaskCB); + +} + +AREXPORT ArAnalogGyro::~ArAnalogGyro() +{ + myRobot->comInt(ArCommands::GYRO, 0); + myRobot->remPacketHandler(&myHandleGyroPacketCB); + myRobot->remStabilizingCB(&myStabilizingCB); + myRobot->setEncoderCorrectionCallback(NULL); +} + +AREXPORT void ArAnalogGyro::stabilizingCallback(void) +{ + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->getHasGyro() == 1) + { + myGyroType = GYRO_ANALOG_COMPUTER; + myHasGyroOnlyMode = false; + myHasNoData = false; + myHaveGottenData = false; + // moved these two here from above + myRobot->setEncoderCorrectionCallback(&myEncoderCorrectCB); + myRobot->addPacketHandler(&myHandleGyroPacketCB); + + myScalingFactor = myRobot->getRobotParams()->getGyroScaler(); + + if (!myRobot->isConnected()) + ArLog::log(ArLog::Normal, "Stabilizing gyro"); + if (!myRobot->isConnected() && myRobot->getStabilizingTime() < 3000) + myRobot->setStabilizingTime(3000); + myRobot->comInt(ArCommands::GYRO, 1); + } + else if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->getGyroType() >= 2) + { + myGyroType = GYRO_ANALOG_CONTROLLER; + myHasGyroOnlyMode = true; + myHasNoData = true; + myHaveGottenData = true; + if (!myRobot->isConnected()) + ArLog::log(ArLog::Normal, "Stabilizing microcontroller gyro"); + myRobot->setStabilizingTime(2000); + // only set this if it isn't already set (since this now comes in + // the config packet so its variable per connection/robot) + if (myRobot->getOdometryDelay() == 0) + myRobot->setOdometryDelay(25); + } +} + +AREXPORT bool ArAnalogGyro::handleGyroPacket(ArRobotPacket *packet) +{ + int numReadings; + int i; + double reading; + int temperature; + double rate; + ArTime now; + + if (packet->getID() != 0x98) + return false; + + numReadings = packet->bufToByte(); + if (numReadings > 0) + myHaveGottenData = true; + //packet->log(); + //printf("%d readings %d bytes ", numReadings, packet->getLength() - packet->getReadLength()); + for (i = 0; i < numReadings; i++) + { + reading = packet->bufToByte2(); + temperature = packet->bufToUByte(); + + // if we haven't moved, check our average, to see if we've moved, + // we see if the average is within .5% of the average and + // if the velocity is less then 1 mm / sec and + // if the rotational velocity is less then 1 deg / sec + //printf("%d %g %g %g %g\n", myAverageCount, myAverageTotal / myAverageCount, reading, myRobot->getVel(), myRobot->getRotVel()); + if ((myAverageCount == 0 || fabs(myAverageTotal / myAverageCount - reading) < myAverageTotal / myAverageCount * .005) && + fabs(myRobot->getVel()) < 1 && + fabs(myRobot->getRotVel()) < 1) + { + if (myAverageStarted.mSecSince() > 1000 && myAverageCount > 25) + { + //printf("new average\n"); + myLastAverage = myAverageTotal / myAverageCount; + myLastAverageTaken.setToNow(); + myAverageTotal = 0; + myAverageCount = 0; + myAverageStarted.setToNow(); + } + myAverageTotal += reading; + myAverageCount++; + } + else + { + myAverageTotal = 0; + myAverageCount = 0; + myAverageStarted.setToNow(); + } + + if (myLastAverage == 0) + continue; + reading -= myLastAverage; + rate = ((reading * 5.0 / 1023)) * 300 / 2.5 * myScalingFactor; + rate *= -1; + + myTemperature = temperature; + //printf("reading %10f rate %10f diff %10f temp %d, ave %g\n", reading, rate, rate * .025, temperature, myLastAverage); + + // if we're not moving and the reading is small disregard it + if ((fabs(myRobot->getVel()) < 2 && fabs(myRobot->getRotVel()) < 2) && + ArMath::fabs(reading) < 2) + { + rate = 0; + } + myHeading += rate * .025; + //printf("rate %6.3f, reading %6.3f heading %6.3f\n", rate, reading, myHeading); + + myHeading = ArMath::fixAngle(myHeading); + + if (myTimeLastPacket != time(NULL)) + { + myTimeLastPacket = time(NULL); + myPacCount = myPacCurrentCount; + myPacCurrentCount = 0; + } + myPacCurrentCount++; + myReadingThisCycle = true; + //printf("(%3d %3d)", reading, temperature); + } + //printf("\n"); + return true; +} + +AREXPORT double ArAnalogGyro::encoderCorrect(ArPoseWithTime deltaPose) +{ + ArPose ret; + + // variables + double inertialVariance; + double encoderVariance; + + double robotDeltaTh; + double inertialDeltaTh; + double deltaTh; + + /* + ArPose lastPose; + double lastTh; + ArPose thisPose; + double thisTh; + */ + ArPoseWithTime zero(0.0, 0.0, 0.0); + + + // if we didn't get a reading this take what we got at face value + if (!myReadingThisCycle) + { + //ArLog::log(ArLog::Verbose, "ArAnalogGyro: no inertial reading, using encoder"); + myAccumulatedDelta += deltaPose.getTh(); + //printf("adding %f\n", myAccumulatedDelta); + return deltaPose.getTh(); + } + + // 6/20/05 MPL added this fix + robotDeltaTh = ArMath::fixAngle(myAccumulatedDelta + deltaPose.getTh()); + //printf("using %f %f %f\n", robotDeltaTh, myAccumulatedDelta, deltaPose.getTh()); + + inertialVariance = (myGyroSigma * myGyroSigma * 10); + // was: deltaPose.getTime().mSecSince(myLastAsked)/10.0); + + + //printf("@ %10f %10f %10f %10f\n", multiplier, ArMath::subAngle(thisTh, lastTh), thisTh, lastTh); + inertialDeltaTh = ArMath::subAngle(myHeading, myLastHeading); + + inertialVariance += fabs(inertialDeltaTh) * myInertialVarianceModel; + encoderVariance = (fabs(deltaPose.getTh()) * myRotVarianceModel + + deltaPose.findDistanceTo(zero) * myTransVarianceModel); + + + if (myLogAnomalies) + { + if (fabs(inertialDeltaTh) < 1 && fabs(robotDeltaTh) < 1) + { + + } + else if (fabs(robotDeltaTh) < 1 && fabs(inertialDeltaTh) > 2) + ArLog::log(ArLog::Normal, "ArAnalogGyro::anomaly: Gyro (%.1f) moved but encoder (%.1f) didn't, using gyro", inertialDeltaTh, robotDeltaTh); + else if ((inertialDeltaTh < -1 && robotDeltaTh > 1) || + (robotDeltaTh < -1 && inertialDeltaTh > 1)) + ArLog::log(ArLog::Normal, "ArAnalogGyro::anomaly: gyro (%.1f) moved opposite of robot (%.1f)", inertialDeltaTh, robotDeltaTh); + else if (fabs(robotDeltaTh) < fabs(inertialDeltaTh * .66666)) + ArLog::log(ArLog::Normal, "ArAnalogGyro::anomaly: robot (%.1f) moved less than gyro (%.1f)", robotDeltaTh, inertialDeltaTh); + else if (fabs(inertialDeltaTh) < fabs(robotDeltaTh * .66666)) + ArLog::log(ArLog::Normal, "ArAnalogGyro::anomaly: gyro (%.1f) moved less than robot (%.1f)", inertialDeltaTh, robotDeltaTh); + } + + + //don't divide by 0, or close to it + if (fabs(inertialVariance + encoderVariance) < .00000001) + deltaTh = 0; + // if we get no encoder readings, but we get gyro readings, just + // believe the gyro (this case is new 6/20/05 MPL) + else if (fabs(robotDeltaTh) < 1 && fabs(inertialDeltaTh) > 2) + deltaTh = ArMath::fixAngle(inertialDeltaTh); + else + deltaTh = ArMath::fixAngle( + (robotDeltaTh * + (inertialVariance / (inertialVariance + encoderVariance))) + + (inertialDeltaTh * + (encoderVariance / (inertialVariance + encoderVariance)))); + + // now we need to compensate for the readings we got when we didn't + // have gyro readings + deltaTh -= myAccumulatedDelta; + myReadingThisCycle = false; + myLastHeading = myHeading; + //printf("%6.3f %6.3f %6.3f\n", deltaTh, inertialDeltaTh, robotDeltaTh); + + myAccumulatedDelta = 0; + + if (myIsActive) + return deltaTh; + else + return deltaPose.getTh(); +} + + +AREXPORT void ArAnalogGyro::activate(void) +{ + if (!myIsActive || myIsGyroOnlyActive) + ArLog::log(ArLog::Normal, "Activating gyro"); + myIsActive = true; + myIsGyroOnlyActive = false; + if (myGyroType == GYRO_ANALOG_CONTROLLER) + myRobot->comInt(ArCommands::GYRO, 1); +} + +AREXPORT void ArAnalogGyro::deactivate(void) +{ + if (myIsActive || myIsGyroOnlyActive) + ArLog::log(ArLog::Normal, "Dectivating gyro"); + myIsActive = false; + myIsGyroOnlyActive = false; + if (myGyroType == GYRO_ANALOG_CONTROLLER) + myRobot->comInt(ArCommands::GYRO, 0); +} + +AREXPORT void ArAnalogGyro::activateGyroOnly(void) +{ + if (!myHasGyroOnlyMode) + { + ArLog::log(ArLog::Normal, + "An attempt was made (and rejected) to set gyro only mode on a gyro that cannot do that mode"); + return; + } + if (!myIsActive || !myIsGyroOnlyActive) + ArLog::log(ArLog::Normal, "Activating gyro only"); + myIsActive = false; + myIsGyroOnlyActive = true; + if (myGyroType == GYRO_ANALOG_CONTROLLER) + myRobot->comInt(ArCommands::GYRO, 2); +} + +AREXPORT void ArAnalogGyro::userTaskCallback(void) +{ + if ((myRobot->getFaultFlags() & ArUtil::BIT4) && myGyroWorking) + { + ArLog::log(ArLog::Normal, "ArAnalogGyro: Gyro failed"); + myGyroWorking = false; + } + + if (!(myRobot->getFaultFlags() & ArUtil::BIT4) && !myGyroWorking) + { + ArLog::log(ArLog::Normal, "ArAnalogGyro: Gyro recovered"); + myGyroWorking = true; + } +} diff --git a/Legacy/Aria/src/ArArg.cpp b/Legacy/Aria/src/ArArg.cpp new file mode 100644 index 0000000..7bd5136 --- /dev/null +++ b/Legacy/Aria/src/ArArg.cpp @@ -0,0 +1,487 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArArg.h" +#include "ArLog.h" +#include "ArArgumentBuilder.h" + +AREXPORT ArArg::ArArg() +{ + myType = INVALID; + myName = ""; + myDescription = ""; + clear(); +} + +AREXPORT ArArg::ArArg(const char * name, int *pointer, + const char * description, int minInt, int maxInt) +{ + myType = INT; + myName = name; + myDescription = description; + clear(); + myMinInt = minInt; + myMaxInt = maxInt; + myIntPointer = pointer; +} + +AREXPORT ArArg::ArArg(const char * name, double *pointer, + const char * description, double minDouble, + double maxDouble) +{ + myType = DOUBLE; + myName = name; + myDescription = description; + clear(); + myMinDouble = minDouble; + myMaxDouble = maxDouble; + myDoublePointer = pointer; +} + +AREXPORT ArArg::ArArg(const char * name, bool *pointer, + const char * description) +{ + myType = BOOL; + myName = name; + myDescription = description; + clear(); + myBoolPointer = pointer; +} + +AREXPORT ArArg::ArArg(const char * name, ArPose *pointer, + const char * description) +{ + myType = POSE; + myName = name; + myDescription = description; + clear(); + myPosePointer = pointer; +} + +AREXPORT ArArg::ArArg(const char * name, char *pointer, + const char * description, size_t maxStrLen) +{ + myType = STRING; + myName = name; + myDescription = description; + clear(); + myStringPointer = pointer; + myMaxStrLen = maxStrLen; +} + +/** + This constructor is for the functor type of argument, this is for + cases that need to be complicated and have more than one argument + value per name, such as the sonar in a config file, and where this data + needs to be used to construct compound data structures rather than + single variables. + + @param name argument name + @param description argument description + + @param setFunctor when an argument is read it is passed to this + functor which should set up whatever it needs to from the data + + @param getFunctor since parameter files need to be written too, + this get functor will get a list of strings to be written to the file +**/ +AREXPORT ArArg::ArArg(const char *name, + ArRetFunctor1 *setFunctor, + ArRetFunctor *> *getFunctor, + const char *description) +{ + myType = FUNCTOR; + myName = name; + myDescription = description; + clear(); + mySetFunctor = setFunctor; + myGetFunctor = getFunctor; +} + +AREXPORT ArArg::ArArg(const char * description) +{ + myType = DESCRIPTION_HOLDER; + myDescription = description; + clear(); +} + +AREXPORT ArArg::ArArg(const ArArg & arg) +{ + myType = arg.myType; + myName = arg.myName; + myDescription = arg.myDescription; + myIntPointer = arg.myIntPointer; + myDoublePointer = arg.myDoublePointer; + myPosePointer = arg.myPosePointer; + myBoolPointer = arg.myBoolPointer; + myStringPointer = arg.myStringPointer; + myMinInt = arg.myMinInt; + myMaxInt = arg.myMaxInt; + myMinDouble = arg.myMinDouble; + myMaxDouble = arg.myMaxDouble; + myMaxStrLen = arg.myMaxStrLen; + mySetFunctor = arg.mySetFunctor; + myGetFunctor = arg.myGetFunctor; + myConfigPrioritySet = arg.myConfigPrioritySet; + myConfigPriority = arg.myConfigPriority; +} + +AREXPORT ArArg &ArArg::operator=(const ArArg & arg) +{ + if (this != &arg) { + myType = arg.myType; + myName = arg.myName; + myDescription = arg.myDescription; + myIntPointer = arg.myIntPointer; + myDoublePointer = arg.myDoublePointer; + myPosePointer = arg.myPosePointer; + myBoolPointer = arg.myBoolPointer; + myStringPointer = arg.myStringPointer; + myMinInt = arg.myMinInt; + myMaxInt = arg.myMaxInt; + myMinDouble = arg.myMinDouble; + myMaxDouble = arg.myMaxDouble; + myMaxStrLen = arg.myMaxStrLen; + mySetFunctor = arg.mySetFunctor; + myGetFunctor = arg.myGetFunctor; + myConfigPrioritySet = arg.myConfigPrioritySet; + myConfigPriority = arg.myConfigPriority; + } + return *this; +} + + +AREXPORT ArArg::~ArArg() +{ +} + +AREXPORT void ArArg::clear(void) +{ + myIntPointer = NULL; + myDoublePointer = NULL; + myBoolPointer = NULL; + myPosePointer = NULL; + myStringPointer = NULL; + myMinInt = INT_MIN; + myMaxInt = INT_MAX; + myMinDouble = -HUGE_VAL; + myMaxDouble = HUGE_VAL; + myMaxStrLen = 0; + mySetFunctor = NULL; + myGetFunctor = NULL; + myConfigPrioritySet = false; + myConfigPriority = ArPriority::NORMAL; +} + +/** + @see INVALID + @see INT + @see DOUBLE + @see BOOL + @see POSE */ +AREXPORT ArArg::Type ArArg::getType(void) const +{ + return myType; +} + +AREXPORT int ArArg::getMinInt(void) const +{ + return myMinInt; +} + +AREXPORT int ArArg::getMaxInt(void) const +{ + return myMaxInt; +} + +AREXPORT double ArArg::getMinDouble(void) const +{ + return myMinDouble; +} + +AREXPORT double ArArg::getMaxDouble(void) const +{ + return myMaxDouble; +} + +AREXPORT const char *ArArg::getName(void) const +{ + return myName.c_str(); +} + +AREXPORT const char *ArArg::getDescription(void) const +{ + return myDescription.c_str(); +} + +AREXPORT int ArArg::getInt(void) const +{ + if (myIntPointer != NULL) + return *myIntPointer; + else + return 0; +} + +AREXPORT double ArArg::getDouble(void) const +{ + if (myDoublePointer != NULL) + return *myDoublePointer; + else + return 0; +} + +AREXPORT bool ArArg::getBool(void) const +{ + if (myBoolPointer != NULL) + return *myBoolPointer; + else + return false; +} + +AREXPORT const char *ArArg::getString(void) const +{ + if (myStringPointer != NULL) + return myStringPointer; + else + return NULL; +} + +AREXPORT ArPose ArArg::getPose(void) const +{ + ArPose pose; + if (myPosePointer != NULL) + return *myPosePointer; + else + return pose; +} + +AREXPORT const std::list *ArArg::getArgsWithFunctor(void) const +{ + if (myGetFunctor == NULL) + return NULL; + else + return myGetFunctor->invokeR(); +} + +AREXPORT bool ArArg::setInt(int val) +{ + if (val < myMinInt) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setInt value %d below range [%d, %d]", getName(), val, myMinInt, myMaxInt); + return false; + } + if (val > myMaxInt) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setInt value %d above range [%d, %d]", getName(), val, myMinInt, myMaxInt); + return false; + } + if (myIntPointer == NULL) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setInt called with NULL int pointer.", getName()); + } + // if we got to here we're good + *myIntPointer = val; + return true; +} + +AREXPORT bool ArArg::setDouble(double val) +{ + if (val < myMinDouble) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setDouble value %g below range [%g, %g]", getName(), val, myMinDouble, myMaxDouble); + return false; + } + if (val > myMaxDouble) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setDouble value %g above range [%g, %g]", getName(), val, myMinDouble, myMaxDouble); + return false; + } + if (myDoublePointer == NULL) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setDouble called with NULL pointer.", getName()); + return false; + } + // if we got to here we're good + *myDoublePointer = val; + return true; +} + + +AREXPORT bool ArArg::setBool(bool val) +{ + if (myBoolPointer == NULL) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setBool called with NULL pointer.", getName()); + return false; + } + *myBoolPointer = val; + return true; +} + +AREXPORT bool ArArg::setString(const char *str) +{ + size_t len; + if (myStringPointer == NULL) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setString called with NULL pointer.", getName()); + return false; + } + // this is >= so that if it wouldn't have room with NULL that's + // taken care of too + if ((len = strlen(str)) >= myMaxStrLen) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setString called with argument %d long, when max length is %d.", getName(), len, myMaxStrLen); + return false; + } + strcpy(myStringPointer, str); + return true; +} + +AREXPORT bool ArArg::setPose(ArPose pose) +{ + if (myPosePointer == NULL) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setPose called with NULL pointer.", getName()); + return false; + } + *myPosePointer = pose; + return true; + +} + +AREXPORT bool ArArg::setArgWithFunctor(ArArgumentBuilder *argument) +{ + if (mySetFunctor == NULL) + { + ArLog::log(ArLog::Normal, "ArArg of %s: setArgWithFunctor called with NULL pointer.", getName()); + return false; + } + return mySetFunctor->invokeR(argument); +} + + +AREXPORT void ArArg::log(void) const +{ + std::list::const_iterator it; + const std::list *argList; + + switch (getType()) + { + case ArArg::INVALID: + ArLog::log(ArLog::Terse, + "\tType: %10s. This argument was not created properly.", + "invalid"); + case ArArg::INT: + ArLog::log(ArLog::Terse, "\tType: %10s name: %12s value: %d", "int", + getName(), getInt()); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "\t\tDescription: %s", + getDescription()); + break; + case ArArg::DOUBLE: + ArLog::log(ArLog::Terse, "\tType: %10s name: %12s value: %f", "double", + getName(), getDouble()); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "\t\tDescription: %s", + getDescription()); + break; + case ArArg::STRING: + ArLog::log(ArLog::Terse, "\tType: %10s name: %12s value: %s", "string", + getName(), getString()); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "\t\tDescription: %s", + getDescription()); + break; + case ArArg::BOOL: + ArLog::log(ArLog::Terse, "\tType: %10s name: %12s value: %d", "bool", + getName(), getBool()); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "\t\tDescription: %s", + getDescription()); + break; + case ArArg::POSE: + ArLog::log(ArLog::Terse, "\tType: %10s name: %12s value: (%.1f %.1f %.1f)", + "pose", getName(), getPose().getX(), getPose().getY(), + getPose().getTh()); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "\t\tDescription: %s", + getDescription()); + break; + case ArArg::FUNCTOR: + ArLog::log(ArLog::Terse, "\tType: %10s name: %12s", + "functor", getName(), getPose().getX(), getPose().getY(), + getPose().getTh()); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "\t\tDescription: %s", + getDescription()); + ArLog::log(ArLog::Terse, "\t\tValues:"); + argList = myGetFunctor->invokeR(); + for (it = argList->begin(); it != argList->end(); it++) + ArLog::log(ArLog::Terse, "\t\t\t%s", (*it)->getFullString()); + break; + case ArArg::DESCRIPTION_HOLDER: + ArLog::log(ArLog::Terse, "\tType: %20s Description: %s", + "description_holder", getDescription()); + + default: + ArLog::log(ArLog::Terse, + "\tType: %10s. This type doesn't have a case in ArArg::print.", + "unknown"); + break; + } + + if (myConfigPrioritySet) + ArLog::log(ArLog::Terse, "\t\tPriority: %s", + ArPriority::getPriorityName(myConfigPriority)); +} + +/** + If this is true then the config priority is set and you can use + getConfigPriority. +**/ +AREXPORT bool ArArg::getConfigPrioritySet(void) const +{ + return myConfigPrioritySet; +} + +/** + The priority of this argument when used in ArConfig. + **/ +AREXPORT ArPriority::Priority ArArg::getConfigPriority(void) const +{ + return myConfigPriority; +} + +/** + The priority of this argument when used in ArConfig. + **/ + +AREXPORT void ArArg::setConfigPriority(ArPriority::Priority priority) +{ + myConfigPriority = priority; + myConfigPrioritySet = true; +} diff --git a/Legacy/Aria/src/ArArgumentBuilder.cpp b/Legacy/Aria/src/ArArgumentBuilder.cpp new file mode 100644 index 0000000..2f3f41d --- /dev/null +++ b/Legacy/Aria/src/ArArgumentBuilder.cpp @@ -0,0 +1,969 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArArgumentBuilder.h" +#include "ArLog.h" +#include +#include +#include +#include +#include + +char * cppstrdup(const char *str) +{ + char *ret; + ret = new char[strlen(str) + 1]; + strcpy(ret, str); + return ret; +} +/** + * @param argvLen the largest number of arguments to parse + * @param extraSpaceChar if not NULL, then this character will also be + * used to break up arguments (in addition to whitespace) + * @param ignoreNormalSpaces a bool set to true if only the extraSpaceChar + * should be used to separate arguments + * @param isPreCompressQuotes a bool set to true if strings enclosed in + * double-quotes should be parsed as a single argument (such strings + * must be surrounded by spaces). This is roughly equivalent to calling + * ArArgumentBuilder::compressQuoted(false) on the resulting builder, but + * is more efficient and handles embedded spaces better. The default value + * is false and preserves the original behavior where each argument is a + * space-separated alphanumeric string. +**/ +AREXPORT ArArgumentBuilder::ArArgumentBuilder(size_t argvLen, + char extraSpaceChar, + bool ignoreNormalSpaces, + bool isPreCompressQuotes) +{ + + myArgc = 0; + myOrigArgc = 0; + myArgvLen = argvLen; + myArgv = new char *[myArgvLen]; + myFirstAdd = true; + myExtraSpace = extraSpaceChar; + myIgnoreNormalSpaces = ignoreNormalSpaces; + myIsPreCompressQuotes = isPreCompressQuotes; + myIsQuiet = false; +} + +AREXPORT ArArgumentBuilder::ArArgumentBuilder(const ArArgumentBuilder & builder) +{ + size_t i; + myFullString = builder.myFullString; + myExtraString = builder.myExtraString; + myArgc = builder.getArgc(); + myArgvLen = builder.getArgvLen(); + myOrigArgc = myArgc; + myArgv = new char *[myArgvLen]; + for (i = 0; i < myArgc; i++) + myArgv[i] = cppstrdup(builder.getArg(i)); + //myArgv[i] = strdup(builder.getArg(i)); + myIsQuiet = builder.myIsQuiet; + myExtraSpace = builder.myExtraSpace; + myIgnoreNormalSpaces = builder.myIgnoreNormalSpaces; + myIsPreCompressQuotes = builder.myIsPreCompressQuotes; +} + +AREXPORT ArArgumentBuilder &ArArgumentBuilder::operator=(const ArArgumentBuilder & builder) +{ + if (this != &builder) { + + size_t i = 0; + + // Delete old stuff... + if (myOrigArgc > 0) + { + for (i = 0; i < myOrigArgc; ++i) + delete[] myArgv[i]; + } + delete[] myArgv; + + // Then copy new stuff... + myFullString = builder.myFullString; + myExtraString = builder.myExtraString; + myArgc = builder.getArgc(); + myArgvLen = builder.getArgvLen(); + + myOrigArgc = myArgc; + myArgv = new char *[myArgvLen]; + for (i = 0; i < myArgc; i++) { + myArgv[i] = cppstrdup(builder.getArg(i)); + } + myIsQuiet = builder.myIsQuiet; + myExtraSpace = builder.myExtraSpace; + myIgnoreNormalSpaces = builder.myIgnoreNormalSpaces; + myIsPreCompressQuotes = builder.myIsPreCompressQuotes; + } + return *this; +} + +AREXPORT ArArgumentBuilder::~ArArgumentBuilder() +{ + size_t i; + if (myOrigArgc > 0) + { + for (i = 0; i < myOrigArgc; ++i) + delete[] myArgv[i]; + } + delete[] myArgv; +} + + +AREXPORT void ArArgumentBuilder::removeArg(size_t which, + bool isRebuildFullString) +{ + size_t i; + char *temp; + + if (which < 0) { + ArLog::log(ArLog::Terse, "ArArgumentBuilder::removeArg: cannot remove arg at negative index (%i)", + which); + return; + } + if (which > myArgc - 1) + { + ArLog::log(ArLog::Terse, "ArArgumentBuilder::removeArg: %d is greater than the number of arguments which is %d", which, myArgc); + return; + } + + + temp = myArgv[which]; + //delete[] myArgv[which]; + for (i = which; i < myArgc - 1; i++) + myArgv[i] = myArgv[i+1]; + // delete the one off the end + myArgc -= 1; + // Just stuffing the deleted argument value at the end of the array (not sure why) + myArgv[i] = temp; + + // Note: It seems that compressQuoted calls removeArg and depends on it not + // changing the full string. Therefore, the parameter was added so that the + // desired behavior could be specified by the caller. + if (isRebuildFullString) { + rebuildFullString(); + } + +} + +AREXPORT void ArArgumentBuilder::add(const char *str, ...) +{ + char buf[10000]; + va_list ptr; + va_start(ptr, str); + vsnprintf(buf, sizeof(buf), str, ptr); + internalAdd(buf, -1); + va_end(ptr); +} + + +bool ArArgumentBuilder::isSpace(char c) +{ + if ((!myIgnoreNormalSpaces) && (isspace(c))) { + return true; + } + else if ((myExtraSpace != '\0') && (c == myExtraSpace)) { + return true; + } + return false; + +} // end method isSpace + + +bool ArArgumentBuilder::isStartArg(const char *buf, + int len, + int index, + int *endArgFlagsOut) +{ + if (index < len) { + + if (!isSpace(buf[index])) { + + if ((myIsPreCompressQuotes) && (buf[index] == '\"')) { + if (endArgFlagsOut != NULL) { + *endArgFlagsOut = ANY_SPACE | QUOTE; + } + + } + else { // not precompressed quote + if (endArgFlagsOut != NULL) { + // This is set to ANY_SPACE to preserve the original behavior -- i.e. space + // character "matches" with myExtraSpace (if set) + *endArgFlagsOut = ANY_SPACE; + } + } // end else not precompressed quote + + return true; + + } // end if not space + } // end if not end of buf + + return false; + +} // end method isStartArg + + +bool ArArgumentBuilder::isEndArg(const char *buf, + int len, + int &index, + int endArgFlags) +{ + if (index >= len) { + return true; + } + + if ((endArgFlags & QUOTE) != 0) { + + if (buf[index] == '\"') { + if ((index + 1 >= len) || (buf[index + 1] == '\0')) { + // Quote is at EOL + index++; + return true; + } + else if (isSpace(buf[index + 1])) { + + // Space follows quote + index++; + return true; + } + } // end if quote found + + } // end if need to find quote + else { // just looking for a space + if (isSpace(buf[index])) { + return true; + } + } // end else just looking for a space + + return false; + +} // end method isEndArg + + +/** + Internal function that adds a string starting at some given space + + @param str the string to add + + @param position the position to add the string at, a position less + than 0 means to add at the end, if this number is greater than how + many positions exist then it will also be added at the end + **/ +AREXPORT void ArArgumentBuilder::internalAdd(const char *str, int position) +{ + char buf[10000]; + int i = 0; + int j = 0; + size_t k = 0; + int len = 0; + bool addAtEnd = true; + //size_t startingArgc = getArgc(); + + bool isArgInProgress = false; + int curArgStartIndex = -1; + + + if (position < 0 || (size_t)position > myArgc) + addAtEnd = true; + else + addAtEnd = false; + + strncpy(buf, str, sizeof(buf)); + len = strlen(buf); + + // can do whatever you want with the buf now + // first we advance to non-space + for (i = 0; i < len; ++i) + { + if (!isSpace(buf[i])) { + //(!myIgnoreNormalSpaces && !isspace(buf[i])) || + // (myExtraSpace != '\0' && buf[i] != myExtraSpace)) + break; + } // end if non-space found + } // end for each char in buffer + + // see if we're done + if (i == len) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "All white space add for argument builder."); + } + return; + } + + int endArgFlags = ANY_SPACE; + + // walk through the line until we get to the end of the buffer... + // we keep track of if we're looking for white space or non-white... + // if we're looking for white space when we find it we have finished + // one argument, so we toss that into argv, reset pointers and moveon + for (curArgStartIndex = i; ; ++i) + { + + // Remove the slash of escaped spaces. This is primarily done to handle command + // line arguments (especially on Linux). If quotes are "pre-compressed", then + // the backslash is preserved. Consecutive backslashes are also preserved + // (i.e. "\\ " is not modified). + if (!myIsPreCompressQuotes && + (buf[i] == '\\') && (i + 1 < len) && (buf[i + 1] == ' ') && + ((i == 0) || (buf[i - 1] != '\\'))) + { + for (j = i; j < len && j != '\0'; j++) + { + buf[j] = buf[j + 1]; + } + --len; + } // end if escaped space + + // If we're not in the middle of an argument, then determine whether the + // current buffer position marks the start of one. + else if ((!isArgInProgress) && + (i < len) && + (buf[i] != '\0') && + (isStartArg(buf, len, i, &endArgFlags))) + { + curArgStartIndex = i; + isArgInProgress = true; + } + // If we are in the middle of an argument, then determine whether the current + // buffer position marks the end of it. (Note that i may be incremented by + // isEndArg when quotes are pre-compressed.) + else if (isArgInProgress && + ((i == len) || + (buf[i] == '\0') || + (isEndArg(buf, len, i, endArgFlags)))) + + { + // see if we have room in our argvLen + if (myArgc + 1 >= myArgvLen) + { + ArLog::log(ArLog::Terse, "ArArgumentBuilder::Add: could not add argument since argc (%u) has grown beyond the argv given in the constructor (%u)", myArgc, myArgvLen); + } + else // room in arg array + { + // if we're adding at the end just put it there, also put it + // at the end if its too far out + if (addAtEnd) + { + myArgv[myArgc] = new char[i - curArgStartIndex + 1]; + strncpy(myArgv[myArgc], &buf[curArgStartIndex], i - curArgStartIndex); + myArgv[myArgc][i - curArgStartIndex] = '\0'; + // add to our full string + // if its not our first add a space (or whatever our space char is) + if (!myFirstAdd && myExtraSpace == '\0') + myFullString += " "; + else if (!myFirstAdd) + myFullString += myExtraSpace; + + myFullString += myArgv[myArgc]; + myFirstAdd = false; + + myArgc++; + myOrigArgc = myArgc; + } + // otherwise stick it where we wanted it if we can or just + else // insert arg at specified position + { + // first move things down + for (k = myArgc + 1; k > (size_t)position; k--) + { + myArgv[k] = myArgv[k - 1]; + } + myArgc++; + myOrigArgc = myArgc; + + myArgv[position] = new char[i - curArgStartIndex + 1]; + strncpy(myArgv[position], &buf[curArgStartIndex], i - curArgStartIndex); + myArgv[position][i - curArgStartIndex] = '\0'; + position++; + + rebuildFullString(); + myFirstAdd = false; + + } // end else insert arg at specified position + + } // end else room in arg array + + isArgInProgress = false; + endArgFlags = ANY_SPACE; + + } // end else if found end of argument + + // if we're at the end or its a null, we're at the end of the buf + if (i == len || buf[i] == '\0') + break; + + } // end for each char in buffer (after non-whitespace found) + +} // end method internalAdd + + +/** + @param str the string to add + + @param position the position to add the string at, a position less + than 0 means to add at the end, if this number is greater than how + many positions exist then it will also be added at the end +**/ +AREXPORT void ArArgumentBuilder::addPlain(const char *str, int position) +{ + internalAdd(str, position); +} + +/** + @param argc how many arguments to add + @param argv the strings to add + @param position the position to add the string at, a position less + than 0 means to add at the end, if this number is greater than how + many positions exist then it will also be added at the end +**/ +AREXPORT void ArArgumentBuilder::addStrings(char **argv, int argc, + int position) +{ + addStrings(argc, argv, position); +} + +/** + @param argc how many arguments to add + @param argv the strings to add + @param position the position to add the string at, a position less + than 0 means to add at the end, if this number is greater than how + many positions exist then it will also be added at the end +**/ +AREXPORT void ArArgumentBuilder::addStrings(int argc, char **argv, + int position) +{ + int i; + if(position < 0) + { + // Don't try to use incremental positions, since the sequence would be out + // of order, just keep using the same special "at-end" meaning of negative position + // value + for (i = 0; i < argc; i++) + internalAdd(argv[i], position); + } + else + { + for (i = 0; i < argc; i++) + internalAdd(argv[i], position + i); + } +} + +/** + @param argc how many arguments to add + @param argv the strings to add + @param position the position to add the string at, a position less + than 0 means to add at the end, if this number is greater than how + many positions exist then it will also be added at the end +**/ +AREXPORT void ArArgumentBuilder::addStringsAsIs(int argc, char **argv, + int position) +{ + int i; + if(position < 0) + { + // Don't try to use incremental positions, since the sequence would be out + // of order, just keep using the same special "at-end" meaning of negative position + // value + for (i = 0; i < argc; i++) + internalAddAsIs(argv[i], position); + } + else + { + for (i = 0; i < argc; i++) + internalAddAsIs(argv[i], position + i); + } +} + +/** + @param str the string to add + + @param position the position to add the string at, a position less + than 0 means to add at the end, if this number is greater than how + many positions exist then it will also be added at the end +**/ +AREXPORT void ArArgumentBuilder::addPlainAsIs(const char *str, int position) +{ + internalAddAsIs(str, position); +} + +AREXPORT void ArArgumentBuilder::internalAddAsIs(const char *str, int position) +{ + size_t k = 0; + + bool addAtEnd; + if (position < 0 || (size_t)position > myArgc) + addAtEnd = true; + else + addAtEnd = false; + + + if (addAtEnd) + { + myArgv[myArgc] = new char[strlen(str) + 1]; + strcpy(myArgv[myArgc], str); + myArgv[myArgc][strlen(str)] = '\0'; + + // add to our full string + // if its not our first add a space (or whatever our space char is) + if (!myFirstAdd && myExtraSpace == '\0') + myFullString += " "; + else if (!myFirstAdd) + myFullString += myExtraSpace; + + myFullString += myArgv[myArgc]; + myFirstAdd = false; + + myArgc++; + myOrigArgc = myArgc; + } + else + { + // first move things down + for (k = myArgc + 1; k > (size_t)position; k--) + { + myArgv[k] = myArgv[k - 1]; + } + myArgc++; + myOrigArgc = myArgc; + + myArgv[position] = new char[strlen(str) + 1]; + strcpy(myArgv[position], str); + myArgv[position][strlen(str)] = '\0'; + + rebuildFullString(); + myFirstAdd = false; + } + + +} + +AREXPORT size_t ArArgumentBuilder::getArgc(void) const +{ + return myArgc; +} + +AREXPORT char** ArArgumentBuilder::getArgv(void) const +{ + return myArgv; +} + +AREXPORT const char *ArArgumentBuilder::getFullString(void) const +{ + return myFullString.c_str(); +} + +AREXPORT const char *ArArgumentBuilder::getExtraString(void) const +{ + return myExtraString.c_str(); +} + +AREXPORT void ArArgumentBuilder::setExtraString(const char *str) +{ + myExtraString = str; +} + +AREXPORT void ArArgumentBuilder::setFullString(const char *str) +{ + myFullString = str; +} + +AREXPORT const char* ArArgumentBuilder::getArg(size_t whichArg) const +{ + if ((whichArg >= 0) && (whichArg < myArgc)) { + return myArgv[whichArg]; + } + else { + return NULL; + } +} + +AREXPORT void ArArgumentBuilder::log(void) const +{ + size_t i; + ArLog::log(ArLog::Terse, "Num arguments: %d", myArgc); + for (i = 0; i < myArgc; ++i) + ArLog::log(ArLog::Terse, "Arg %d: %s", i, myArgv[i]); +} + +AREXPORT bool ArArgumentBuilder::isArgBool(size_t whichArg) const +{ + if (whichArg > myArgc || getArg(whichArg) == NULL) + return false; + + if (strcasecmp(getArg(whichArg), "true") == 0 || + strcasecmp(getArg(whichArg), "1") == 0 || + strcasecmp(getArg(whichArg), "false") == 0 || + strcasecmp(getArg(whichArg), "0") == 0) + return true; + else + return false; +} + +AREXPORT bool ArArgumentBuilder::getArgBool(size_t whichArg, + bool *ok) const +{ + bool isSuccess = false; + bool ret = false; + + const char *str = getArg(whichArg); + + // If the arg was successfully obtained... + if (str != NULL) { + + if (strcasecmp(str, "true") == 0 || + strcasecmp(str, "1") == 0) { + isSuccess = true; + ret = true; + } + else if (strcasecmp(str, "false") == 0 || + strcasecmp(str, "0") == 0) { + isSuccess = true; + ret = false; + } + } // end if valid arg + + if (ok != NULL) { + *ok = isSuccess; + } + if (isSuccess) { + return ret; + } + else { + return 0; + } +} // end method getArgBool + + +AREXPORT bool ArArgumentBuilder::isArgInt(size_t whichArg, bool forceHex) const +{ + const char *str; + int ret; + char *endPtr; + if (whichArg > myArgc || getArg(whichArg) == NULL) + return false; + + int base = 10; + str = getArg(whichArg); + + if (forceHex) + base = 16; + // see if it has the hex prefix and strip it + if (strlen(str) > 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + { + str = &str[2]; + base = 16; + } + + ret = strtol(str, &endPtr, base); + if (endPtr[0] == '\0' && endPtr != str) + return true; + else + return false; +} + +AREXPORT int ArArgumentBuilder::getArgInt(size_t whichArg, + bool *ok, bool forceHex) const +{ + bool isSuccess = false; + int ret = 0; + + const char *str = getArg(whichArg); + + // If the specified arg was successfully obtained... + if (str != NULL) { + + int base = 10; + if (forceHex) + base = 16; + // see if it has the hex prefix and strip it + if (strlen(str) > 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + { + str = &str[2]; + base = 16; + } + char *endPtr = NULL; + ret = strtol(str, &endPtr, base); + + if (endPtr[0] == '\0' && endPtr != str) { + isSuccess = true; + } + } // end if valid arg + + if (ok != NULL) { + *ok = isSuccess; + } + + if (isSuccess) + return ret; + else + return 0; + +} // end method getArgInt + +AREXPORT bool ArArgumentBuilder::isArgLongLongInt(size_t whichArg) const +{ + const char *str; + long long int ret; + char *endPtr; + if (whichArg > myArgc || getArg(whichArg) == NULL) + return false; + + int base = 10; + str = getArg(whichArg); + // see if its a hex number + if (strlen(str) > 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + { + str = &str[2]; + base = 16; + } + +#ifndef _MSC_VER + ret = strtoll(str, &endPtr, base); +#else + ret = _strtoi64(str, &endPtr, base); +#endif + + if (endPtr[0] == '\0' && endPtr != str) + return true; + else + return false; +} + +AREXPORT int ArArgumentBuilder::getArgLongLongInt(size_t whichArg, + bool *ok) const +{ + bool isSuccess = false; + long long ret = 0; + + const char *str = getArg(whichArg); + + // If the specified arg was successfully obtained... + if (str != NULL) { + + int base = 10; + // see if its a hex number + if (strlen(str) > 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + { + str = &str[2]; + base = 16; + } + + char *endPtr = NULL; +#ifndef _MSC_VER + ret = strtoll(str, &endPtr, base); +#else + ret = _strtoi64(str, &endPtr, base); +#endif + + if (endPtr[0] == '\0' && endPtr != str) { + isSuccess = true; + } + } // end if valid arg + + if (ok != NULL) { + *ok = isSuccess; + } + + if (isSuccess) + return ret; + else + return 0; + +} // end method getArgInt + +AREXPORT bool ArArgumentBuilder::isArgDouble(size_t whichArg) const +{ + const char *str; + double ret; + char *endPtr; + if (whichArg > myArgc || getArg(whichArg) == NULL) + return false; + + str = getArg(whichArg); + if (strcmp(str, "-INF") == 0) + { + return true; + } + else if (strcmp(str, "INF") == 0) + { + return true; + } + else + { + ret = strtod(str, &endPtr); + if (endPtr[0] == '\0' && endPtr != str) + return true; + else + return false; + } + +} + +AREXPORT double ArArgumentBuilder::getArgDouble(size_t whichArg, + bool *ok) const +{ + bool isSuccess = false; + double ret = 0; + + const char *str = getArg(whichArg); + + // If the specified arg was successfully obtained... + if (str != NULL) { + + if (strcmp(str, "-INF") == 0) + { + isSuccess = true; + ret = -HUGE_VAL; + } + else if (strcmp(str, "INF") == 0) + { + isSuccess = true; + ret = HUGE_VAL; + } + else { // check regular values + + char *endPtr = NULL; + ret = strtod(str, &endPtr); + if (endPtr[0] == '\0' && endPtr != str) { + isSuccess = true; + } + } // end else check regular values + } // end if valid arg + + if (ok != NULL) { + *ok = isSuccess; + } + + if (isSuccess) + return ret; + else + return 0; + +} // end method getArgDouble + + +AREXPORT void ArArgumentBuilder::compressQuoted(bool stripQuotationMarks) +{ + size_t argLen; + size_t i; + std::string myNewArg; + + for (i = 0; i < myArgc; i++) + { + argLen = strlen(myArgv[i]); + if (stripQuotationMarks && argLen >= 2 && + myArgv[i][0] == '"' && myArgv[i][argLen - 1] == '"') + { + myNewArg = &myArgv[i][1]; + myNewArg[myNewArg.size() - 1] = '\0'; + delete[] myArgv[i]; + // but replacing ourself with the new arg + myArgv[i] = cppstrdup(myNewArg.c_str()); + //myArgv[i] = strdup(myNewArg.c_str()); + continue; + } + // if this arg begins with a quote but doesn't end with one + if (argLen >= 2 && myArgv[i][0] == '"' && myArgv[i][argLen - 1] != '"') + { + // start the new value for this arg, if stripping quotations + // then start after the quote + if (stripQuotationMarks) + myNewArg = &myArgv[i][1]; + else + myNewArg = myArgv[i]; + + bool isEndQuoteFound = false; + + // now while the end char of the next args isn't the end of our + // start quote we toss things into this arg + while ((i + 1 < myArgc) && !isEndQuoteFound) { + + int nextArgLen = strlen(myArgv[i+1]); + + // Check whether the next arg contains the ending quote... + if ((nextArgLen > 0) && + (myArgv[i+1][nextArgLen - 1] == '"')) + { + isEndQuoteFound = true; + } + + // Concatenate the next arg to this one... + myNewArg += " "; + myNewArg += myArgv[i+1]; + // if we are striping quotes off then replace the quote + if (stripQuotationMarks && myNewArg.size() > 0 && isEndQuoteFound) + myNewArg[myNewArg.size() - 1] = '\0'; + // removing those next args + removeArg(i+1); + // and ourself + delete[] myArgv[i]; + + // but replacing ourself with the new arg + myArgv[i] = cppstrdup(myNewArg.c_str()); + //myArgv[i] = strdup(myNewArg.c_str()); + } + } + } +} + +AREXPORT void ArArgumentBuilder::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; +} + +AREXPORT void ArArgumentBuilder::rebuildFullString() +{ + myFullString = ""; + for (size_t k = 0; k < myArgc; k++) + { + myFullString += myArgv[k]; + // Don't tack an extra space on at the end. + if (k < myArgc - 1) { + myFullString += " "; + } + } + +} // end method rebuildFullString + +// ---------------------------------------------------------------------------- + +bool ArArgumentBuilderCompareOp::operator()(ArArgumentBuilder* arg1, + ArArgumentBuilder* arg2) const +{ + if (arg1 == NULL) { + return true; + } + else if (arg2 == NULL) { + return false; + } + std::string arg1String = arg1->getFullString(); + std::string arg2String = arg2->getFullString(); + + return (arg1String.compare(arg2String) < 0); + +} diff --git a/Legacy/Aria/src/ArArgumentParser.cpp b/Legacy/Aria/src/ArArgumentParser.cpp new file mode 100644 index 0000000..aa49ddd --- /dev/null +++ b/Legacy/Aria/src/ArArgumentParser.cpp @@ -0,0 +1,884 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArArgumentBuilder.h" +#include "ArArgumentParser.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include + +std::list ArArgumentParser::ourDefaultArgumentLocs; +std::list ArArgumentParser::ourDefaultArgumentLocIsFile; +/** + @param argc pointer to program argument count (e.g. @a argc from main()) + @param argv array of program arguments (e.g. @a arcv from main()) +**/ +AREXPORT ArArgumentParser::ArArgumentParser(int *argc, char **argv) +{ + myArgc = argc; + myArgv = argv; + myUsingBuilder = false; + myBuilder = NULL; + myOwnBuilder = false; + myReallySetOnlyTrue = false; + myEmptyArg[0] = '\0'; + myHelp = false; +} + +/** + * @param builder an ArArgumentBuilder object containing arguments +**/ +AREXPORT ArArgumentParser::ArArgumentParser(ArArgumentBuilder *builder) +{ + myUsingBuilder = true; + myBuilder = builder; + myOwnBuilder = false; + myReallySetOnlyTrue = false; + myEmptyArg[0] = '\0'; + myHelp = false; +} + +AREXPORT ArArgumentParser::~ArArgumentParser() +{ + if (myOwnBuilder) + { + delete myBuilder; + myBuilder = NULL; + } +} + +AREXPORT bool ArArgumentParser::checkArgumentVar(const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + arg[sizeof(arg) - 1] = '\0'; + va_end(ptr); + return checkArgument(arg); +} + + +/** + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param ... the extra string to feed into the argument for parsing + (like printf) + + @return true if the argument was found, false otherwise +**/ +AREXPORT bool ArArgumentParser::checkArgument(const char *argument) +{ + size_t i; + std::string extraHyphen; + extraHyphen = "-"; + extraHyphen += argument; + for (i = 0; i < getArgc(); i++) + { + if (strcasecmp(argument, getArgv()[i]) == 0 || + strcasecmp(extraHyphen.c_str(), getArgv()[i]) == 0) + { + removeArg(i); + // MPL took this out so you could add the same arg multiple times + //checkArgument(argument); + return true; + } + } + return false; +} + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param dest if the parameter to the argument is found then the dest + is set to the parameter + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @param ... the extra string to feed into the argument for + parsing (like printf) + + @return true if either this argument wasn't there or if the + argument was there with a valid parameter +**/ +AREXPORT bool ArArgumentParser::checkParameterArgumentStringVar( + bool *wasReallySet, const char **dest, const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + va_end(ptr); + return checkParameterArgumentString(arg, dest, wasReallySet); +} + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param dest if the parameter to the argument is found then the dest + is set to the parameter + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @param returnFirst if we should go just take the first argument + (true) or if we should through the list and pull up the last one + (default is false, use true if you want to use the same parameter + multiple times) + + @return true if either this argument wasn't there or if the + argument was there with a valid parameter +**/ +AREXPORT bool ArArgumentParser::checkParameterArgumentString( + const char *argument, const char **dest, bool *wasReallySet, + bool returnFirst) +{ + char *param; + param = checkParameterArgument(argument, returnFirst); + + if (param == NULL) + { + if (wasReallySet && !myReallySetOnlyTrue) + *wasReallySet = false; + return true; + } + else if (param[0] != '\0') + { + *dest = param; + if (wasReallySet) + *wasReallySet = true; + return true; + } + else + { + ArLog::log(ArLog::Normal, "No argument given to %s", argument); + return false; + } +} + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the boolean value, + or false if @a argument was not found and @a dest was not changed. + + @param dest if @a argument is found and is followed by a + recognized string representation of a boolean value + ("true", "false", "1", or "0"), then @a dest is set to the appropriate value + + @param argument the argument string to search for. If the argument is found, + it is removed from the list of arguments + + @param ... if @a argument contains format codes (like printf()), provide + the values to substitute following @a argument. + + @return false if @a argument was found but was not followed by a recognized + value (an error), or true if @a argument was not found, or if the + argument was there with a valid parameter +*/ +AREXPORT bool ArArgumentParser::checkParameterArgumentBoolVar( + bool *wasReallySet, bool *dest, const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + va_end(ptr); + return checkParameterArgumentBool(arg, dest, wasReallySet); +} + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param dest if @a argument is found and is followed by a + recognized string representation of a boolean value + ("true", "false", "1", or "0"), then @a dest is set to the appropriate value + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @param returnFirst if we should go just take the first argument + (true) or if we should through the list and pull up the last one + (default is false, use true if you want to use the same parameter + multiple times) + + @param argument the argument string to search for. If the argument is found, + it is removed from the list of arguments + + @return false if @a argument was found but was not followed by a recognized + value (an error), or true if @a argument was not found, or if the + argument was there with a valid parameter +*/ +AREXPORT bool ArArgumentParser::checkParameterArgumentBool(const char *argument, + bool *dest, + bool *wasReallySet, + bool returnFirst) +{ + char *param; + param = checkParameterArgument(argument, returnFirst); + + if (param == NULL) + { + if (wasReallySet && !myReallySetOnlyTrue) + *wasReallySet = false; + return true; + } + else if (param[0] != '\0') + { + if (strcasecmp(param, "true") == 0 || strcmp(param, "1") == 0) + { + *dest = true; + if (wasReallySet) + *wasReallySet = true; + return true; + } + else if (strcasecmp(param, "false") == 0 || strcmp(param, "0") == 0) + { + *dest = false; + if (wasReallySet) + *wasReallySet = true; + return true; + } + else + { + ArLog::log(ArLog::Normal, + "Argument given to %s was not a bool (true, false, 1, 0) it was the string %s", + argument, param); + return false; + } + + } + else + { + ArLog::log(ArLog::Normal, "No argument given to %s", argument); + return false; + } + +} + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param dest if the parameter to the argument is found and is a + valid integer then dest is set to the integer value + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @param ... the extra string to feed into the argument for + parsing (like printf) + + @return true if either this argument wasn't there or if the + argument was there with a valid parameter +**/ +AREXPORT bool ArArgumentParser::checkParameterArgumentIntegerVar( + bool *wasReallySet, int *dest, const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + va_end(ptr); + return checkParameterArgumentInteger(arg, dest, wasReallySet); +} + + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param dest if the parameter to the argument is found and is a + valid integer then dest is set to the integer value + + @param returnFirst if we should go just take the first argument + (true) or if we should through the list and pull up the last one + (default is false, use true if you want to use the same parameter + multiple times) + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @return true if either this argument wasn't there or if the + argument was there with a valid parameter +**/ +AREXPORT bool ArArgumentParser::checkParameterArgumentInteger( + const char *argument, int *dest, bool *wasReallySet, bool returnFirst) +{ + char *param; + char *endPtr; + int intVal; + + param = checkParameterArgument(argument, returnFirst); + + if (param == NULL) + { + if (wasReallySet && !myReallySetOnlyTrue) + *wasReallySet = false; + return true; + } + else if (param[0] != '\0') + { + intVal = strtol(param, &endPtr, 10); + if (endPtr[0] == '\0') + { + *dest = intVal; + if (wasReallySet) + *wasReallySet = true; + return true; + } + else + { + ArLog::log(ArLog::Normal, + "Argument given to %s was not an integer it was the string %s", + argument, param); + return false; + } + + } + else + { + ArLog::log(ArLog::Normal, "No argument given to %s", argument); + return false; + } + +} + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param dest if the parameter to the argument is found and is a + valid integer then dest is set to the integer value + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @param ... the extra string to feed into the argument for + parsing (like printf) + + @return true if either this argument wasn't there or if the + argument was there with a valid parameter +**/ +AREXPORT bool ArArgumentParser::checkParameterArgumentFloatVar( + bool *wasReallySet, float *dest, const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + va_end(ptr); + return checkParameterArgumentFloat(arg, dest, wasReallySet); +} + + + +/** + @param argument the argument to check for. if found, it is removed from the list of arguments + @param dest if the parameter given after the argument is found and is a + valid float, then the target of this pointer is assigned to the found value. + @param returnFirst true if only the first instance of the argument given should be used, false if only the last (and all preceding instances discarded). + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + @return false if the argument was given but an error occurred while parsing the float parameter (i.e. no parameter given, or it was not a parsable float). +*/ +AREXPORT bool ArArgumentParser::checkParameterArgumentFloat( + const char *argument, float *dest, bool *wasReallySet, bool returnFirst) +{ + char *param = checkParameterArgument(argument, returnFirst); + if (param == NULL) + { + if (wasReallySet && !myReallySetOnlyTrue) *wasReallySet = false; + return true; + } + else if (param[0] != '\0') + { + char *endPtr; + float floatVal = strtod(param, &endPtr); + if(endPtr == param) + { + ArLog::log(ArLog::Normal, "Argument given with %s was not a valid number", argument); + return false; + } + else + { + *dest = floatVal; + if (wasReallySet) *wasReallySet = true; + return true; + } + } + else + { + ArLog::log(ArLog::Normal, "No argument given with %s", argument); + return false; + } +} + + +/** + This is like checkParameterArgument but lets you fail out if the + argument is there but the parameter for it is not + + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param dest if the parameter to the argument is found and is a + valid integer then dest is set to the integer value + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + + @param ... the extra string to feed into the argument for + parsing (like printf) + + @return true if either this argument wasn't there or if the + argument was there with a valid parameter +**/ +AREXPORT bool ArArgumentParser::checkParameterArgumentDoubleVar( + bool *wasReallySet, double *dest, const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + va_end(ptr); + return checkParameterArgumentDouble(arg, dest, wasReallySet); +} + +/** + @param argument the argument to check for. if found, it is removed from the list of arguments + @param dest if the parameter given after the argument is found and is a + valid double, then the target of this pointer is assigned to the found value. + @param returnFirst true if only the first instance of the argument given should be used, false if only the last (and all preceding instances discarded). + + @param wasReallySet the target of this pointer is set to true if + @a argument was found followed by a valid value, + and @a dest was set to the value, + or false if @a argument was not found and @a dest was not changed. + @return false if the argument was given but an error occurred while parsing the double parameter (i.e. no parameter given, or it was not a parsable double). +*/ +AREXPORT bool ArArgumentParser::checkParameterArgumentDouble( + const char *argument, double *dest, bool *wasReallySet, bool returnFirst) +{ + char *param = checkParameterArgument(argument, returnFirst); + if (param == NULL) + { + if (wasReallySet && !myReallySetOnlyTrue) *wasReallySet = false; + return true; + } + else if (param[0] != '\0') + { + char *endPtr; + double doubleVal = strtod(param, &endPtr); + if(endPtr == param) + { + ArLog::log(ArLog::Normal, "Argument given with %s was not a valid number", argument); + return false; + } + else + { + *dest = doubleVal; + if (wasReallySet) *wasReallySet = true; + return true; + } + } + else + { + ArLog::log(ArLog::Normal, "No argument given with %s", argument); + return false; + } +} + + +/** + @param argument the string to check for, if the argument is found + its pulled from the list of arguments + + @param ... the extra string to feed into the argument for + parsing (like printf) + + @return NULL if the argument wasn't found, the argument after the + one given if the argument was found, or a string with the first + char as NULL again if the argument after the one given isn't there + **/ +AREXPORT char *ArArgumentParser::checkParameterArgumentVar(const char *argument, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, argument); + vsnprintf(arg, sizeof(arg), argument, ptr); + va_end(ptr); + return checkParameterArgument(arg); +} +/** + @param argument the string to check for. If the argument is found, + then it is removed from the argument list + + @param returnFirst true if we should just take the first matching argument, + or false if we should iterate through the list and only use the last one + (default is false, use true if you want to use the same parameter + multiple times) + + @return NULL if the argument wasn't found; the value given after the + found argument; or at empty string (with a NULL first character) if + the argument was found but no value followed the argument flag. +**/ +AREXPORT char * ArArgumentParser::checkParameterArgument(const char *argument, + bool returnFirst) +{ + char *ret; + char *retRecursive; + size_t i; + std::string extraHyphen; + + extraHyphen = "-"; + extraHyphen += argument; + + for (i = 0; i < getArgc(); i++) + { + if (strcasecmp(argument, getArgv()[i]) == 0 || + strcasecmp(extraHyphen.c_str(), getArgv()[i]) == 0) + { + // see if we have a ret, we don't if the ret would be beyond argc + if (getArgc() > i+1) + { + ret = getArgv()[i+1]; + } + else + { + ret = myEmptyArg; + } + // remove our argument + removeArg(i); + // if we have a return remove that one too + if (ret != NULL && ret != myEmptyArg) + removeArg(i); + // now see if there are any more, if so return that + if (returnFirst) + { + return ret; + } + else if ((retRecursive = checkParameterArgument(argument)) != NULL) + { + return retRecursive; + } + // otherwise return what we found + else + { + return ret; + } + } + } + return NULL; +} + +void ArArgumentParser::removeArg(size_t which) +{ + if (which >= getArgc()) + { + ArLog::log(ArLog::Terse, "ArArgumentParser::removeArg: %d is greater than the number of arguments which is %d", which, getArgc()); + return; + } + if (myUsingBuilder) + { + myBuilder->removeArg(which); + } + else + { + size_t i; + for (i = which; i < getArgc() - 1; i++) + myArgv[i] = myArgv[i+1]; + *myArgc -= 1; + } +} + +AREXPORT size_t ArArgumentParser::getArgc(void) const +{ + if (myUsingBuilder) + return myBuilder->getArgc(); + else + return *myArgc; +} + +AREXPORT char** ArArgumentParser::getArgv(void) const +{ + if (myUsingBuilder) + return myBuilder->getArgv(); + else + return myArgv; +} + +AREXPORT const char* ArArgumentParser::getArg(size_t whichArg) const +{ + if (whichArg >= getArgc()) + return NULL; + else + return getArgv()[whichArg]; +} + +AREXPORT void ArArgumentParser::log(void) const +{ + size_t i; + ArLog::log(ArLog::Terse, "Num arguments: %d", getArgc()); + for (i = 0; i < getArgc(); ++i) + ArLog::log(ArLog::Terse, "Arg %d: %s", i, getArgv()[i]); +} + +AREXPORT const char *ArArgumentParser::getStartingArguments(void) const +{ + if (myUsingBuilder) + return myBuilder->getFullString(); + else + return NULL; +} + +AREXPORT void ArArgumentParser::addDefaultArgument( + const char *argument, int position) +{ + if (!myUsingBuilder) + { + myBuilder = new ArArgumentBuilder; + myBuilder->addStringsAsIs(*myArgc, myArgv); + myOwnBuilder = true; + myUsingBuilder = true; + } + myBuilder->addPlain(argument, position); +} + +AREXPORT void ArArgumentParser::addDefaultArgumentAsIs( + const char *argument, int position) +{ + if (!myUsingBuilder) + { + myBuilder = new ArArgumentBuilder; + myBuilder->addStringsAsIs(*myArgc, myArgv); + myOwnBuilder = true; + myUsingBuilder = true; + } + myBuilder->addPlainAsIs(argument, position); +} + +/** + * Search all locations for argument defaults and parse them. + * These locations may be environment variables to read argument varues + * from, or files to read. + * @sa addDefaultArgumentLocation + * + * @note If you use this function your normal argc (passed into main()) will + * have been modified, and won't reflect reality anymore. You'll have to use + * getArgc() to get the actual original argument count. This is a little wierd but is + * this way so lots of people don't have to change lots of code. + */ +AREXPORT void ArArgumentParser::loadDefaultArguments(int position) +{ + std::list::iterator it; + std::list::iterator bIt; + const char *str; + char *argumentsPtr; + char arguments[100000]; + + if (!myUsingBuilder) + { + myBuilder = new ArArgumentBuilder; + myBuilder->addStringsAsIs(*myArgc, myArgv); + myOwnBuilder = true; + myUsingBuilder = true; + } + + for (it = ourDefaultArgumentLocs.begin(), + bIt = ourDefaultArgumentLocIsFile.begin(); + it != ourDefaultArgumentLocs.end(); + it++, bIt++) + { + str = (*it).c_str(); + // see if its an environmental variable + if (!(*bIt) && (argumentsPtr = getenv(str)) != NULL) + { + ArArgumentBuilder compressed; + compressed.addPlain(argumentsPtr); + compressed.compressQuoted(true); + myBuilder->addStringsAsIs(compressed.getArgc(), compressed.getArgv(), + position); + ArLog::log(ArLog::Normal, + "Added arguments from environmental variable '%s'", str); + } + // see if we have a file + else if ((*bIt) && + ArUtil::getStringFromFile(str, arguments, sizeof(arguments))) + { + ArArgumentBuilder compressed; + compressed.addPlain(arguments); + compressed.compressQuoted(true); + myBuilder->addStringsAsIs(compressed.getArgc(), compressed.getArgv(), + position); + ArLog::log(ArLog::Normal, "Added arguments from file '%s'", + str); + } + // the file or env didn't exit + // this'll return true otherwise it'll return false) + else + { + ArLog::log(ArLog::Verbose, + "Could not load from environmental variable or file '%s'", + str); + } + } +} + +/** + This adds a file to the list of default argument locations. + @param file Name of the file + **/ +AREXPORT void ArArgumentParser::addDefaultArgumentFile(const char *file) +{ + ourDefaultArgumentLocs.push_back(file); + ourDefaultArgumentLocIsFile.push_back(true); +} + + +/** + This adds an environment variable to the list of default argument + locations. + @param env Name of the environment variable + **/ +AREXPORT void ArArgumentParser::addDefaultArgumentEnv(const char *env) +{ + ourDefaultArgumentLocs.push_back(env); + ourDefaultArgumentLocIsFile.push_back(false); +} + +AREXPORT void ArArgumentParser::logDefaultArgumentLocations(void) +{ + std::list::iterator it; + std::list::iterator bIt; + + ArLog::log(ArLog::Normal, + "Default argument files or environmental variables:"); + for (it = ourDefaultArgumentLocs.begin(), + bIt = ourDefaultArgumentLocIsFile.begin(); + it != ourDefaultArgumentLocs.end(); + it++, bIt++) + { + if (*bIt) + ArLog::log(ArLog::Normal, "%10s%-10s%s", "", "file", (*it).c_str()); + else + ArLog::log(ArLog::Normal, "%10s%-10s%s", "", "envVar", (*it).c_str()); + } +} +/** + * Check whether a special "help" flag was given in the arguments, and also + * print a warning (Using ArLog at Normal log level) if any unparsed arguments were found. + * The following are the help flags: -help, -h, --help, /?, /h. + * @return false if a help flag was found or unparsed arguments + * were found, true otherwise. + * @param numArgsOkay If you plan on checking for additional + * arguments later in the program, you can specify the number of arguments + * expected here, which prevents this method from warning about them being unparsed + * yet. + */ +AREXPORT bool ArArgumentParser::checkHelpAndWarnUnparsed( + unsigned int numArgsOkay) +{ + + if (myHelp || checkArgument("-help") || checkArgument("-h") || + checkArgument("/?") || checkArgument("/h")) + { + myHelp = true; + return false; + } + + if (getArgc() <= 1 + numArgsOkay) + return true; + + size_t i; + char buf[2048]; + sprintf(buf, "Unhandled arguments to program:"); + for (i = 1 + (int)numArgsOkay; i < getArgc(); i++) + sprintf(buf, "%s %s", buf, getArg(i)); + ArLog::log(ArLog::Normal, buf); + ArLog::log(ArLog::Normal, + "Program will continue but to see the help listing type '%s -help'", + getArg(0)); + return true; +} + +/** + See the description for the class for more information about this +**/ +AREXPORT void ArArgumentParser::setWasReallySetOnlyTrue( + bool wasReallySetOnlyTrue) +{ + myReallySetOnlyTrue = wasReallySetOnlyTrue; +} + +/** + See the description for the class for more information about this +**/ +AREXPORT bool ArArgumentParser::getWasReallySetOnlyTrue(void) +{ + return myReallySetOnlyTrue; +} diff --git a/Legacy/Aria/src/ArBasePacket.cpp b/Legacy/Aria/src/ArBasePacket.cpp new file mode 100644 index 0000000..a57eaa7 --- /dev/null +++ b/Legacy/Aria/src/ArBasePacket.cpp @@ -0,0 +1,682 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArBasePacket.h" +#include "ArLog.h" + +#include +#include + +/** +@param bufferSize size of the buffer +@param headerLength length of the header +@param buf buffer packet uses, if NULL, instance will allocate memory +@param footerLength length of the footer following the data +*/ +AREXPORT ArBasePacket::ArBasePacket(ArTypes::UByte2 bufferSize, + ArTypes::UByte2 headerLength, + char * buf, + ArTypes::UByte2 footerLength) +{ + if (buf == NULL && bufferSize > 0) + { + myOwnMyBuf = true; + myBuf = new char[bufferSize]; + // memset(myBuf, 0, bufferSize); + } + else + { + myOwnMyBuf = false; + myBuf = buf; + } + myHeaderLength = headerLength; + myFooterLength = footerLength; + myReadLength = myHeaderLength; + myMaxLength = bufferSize; + myLength = myHeaderLength; + myIsValid = true; +} + + +AREXPORT ArBasePacket::ArBasePacket(const ArBasePacket &other) : + myHeaderLength(other.myHeaderLength), + myFooterLength(other.myFooterLength), + myMaxLength(other.myLength), + myReadLength(other.myReadLength), + myOwnMyBuf(true), + myBuf((other.myLength > 0) ? new char[other.myLength] : NULL), + myLength(other.myLength), + myIsValid(other.myIsValid) +{ + if ((myBuf != NULL) && (other.myBuf != NULL)) { + memcpy(myBuf, other.myBuf, myLength); + } +} + +AREXPORT ArBasePacket &ArBasePacket::operator=(const ArBasePacket &other) +{ + if (this != &other) { + + myHeaderLength = other.myHeaderLength; + myFooterLength = other.myFooterLength; + myReadLength = other.myReadLength; + + if (myLength != other.myLength) { + if (myOwnMyBuf && myBuf != NULL) + delete [] myBuf; + myOwnMyBuf = true; + myBuf = NULL; + if (other.myLength > 0) { + myBuf = new char[other.myLength]; + } + myLength = other.myLength; + myMaxLength = other.myLength; + } + + if ((myBuf != NULL) && (other.myBuf != NULL)) { + memcpy(myBuf, other.myBuf, myLength); + } + + myIsValid = other.myIsValid; + } + return *this; +} + + + +AREXPORT ArBasePacket::~ArBasePacket() +{ + if (myOwnMyBuf && myBuf != NULL) + delete[] myBuf; +} + + +AREXPORT void ArBasePacket::setBuf(char *buf, ArTypes::UByte2 bufferSize) +{ + if (myOwnMyBuf) + { + delete[] myBuf; + myOwnMyBuf = false; + } + myBuf = buf; + myMaxLength = bufferSize; +} + +AREXPORT void ArBasePacket::setMaxLength(ArTypes::UByte2 bufferSize) +{ + if (myMaxLength >= bufferSize) + return; + if (myOwnMyBuf) + { + delete[] myBuf; + myOwnMyBuf = false; + } + myBuf = new char[bufferSize]; + // memset(myBuf, 0, bufferSize); + + myMaxLength = bufferSize; + myOwnMyBuf = true; +} + +AREXPORT bool ArBasePacket::setLength(ArTypes::UByte2 length) +{ + if (myOwnMyBuf && length > myMaxLength) + return false; + + myLength = length; + return true; +} + +AREXPORT void ArBasePacket::setReadLength(ArTypes::UByte2 readLength) +{ + myReadLength = readLength; +} + +AREXPORT bool ArBasePacket::setHeaderLength(ArTypes::UByte2 length) +{ + if (myOwnMyBuf && length > myMaxLength) + return false; + + myHeaderLength = length; + return true; +} + +/** +Sets the length read back to the header length so the packet can be +reread using the other methods +*/ + +AREXPORT void ArBasePacket::resetRead(void) +{ + myReadLength = myHeaderLength; + resetValid(); +} + +/** +Sets the packet length back to be the packets header length again +*/ + +AREXPORT void ArBasePacket::empty(void) +{ + myLength = myHeaderLength; + resetValid(); +} + +AREXPORT bool ArBasePacket::isNextGood(int bytes) +{ + if (bytes <= 0) + return false; + + // make sure it comes in before the header + if (myReadLength + bytes <= myLength - myFooterLength) + return true; + + myIsValid = false; + + return false; +} + + +AREXPORT bool ArBasePacket::hasWriteCapacity(int bytes) +{ + if (bytes < 0) { + ArLog::log(ArLog::Normal, "ArBasePacket::hasWriteCapacity(%d) cannot write negative amount", + bytes); + return false; + } + + // Make sure there's enough room in the packet + if ((myLength + bytes) <= myMaxLength) { + return true; + } + + myIsValid = false; + + return false; + +} // end method hasWriteCapacity + + +/** + * A packet is considered "invalid" if an attempt is made to write too much + * data into the packet, or to read too much data from the packet. Calls to + * empty() and resetRead() will restore the valid state. +**/ +AREXPORT bool ArBasePacket::isValid(void) +{ + return myIsValid; + +} // end method isValid + +/** + * Resets the packet to the "valid" state. This method should generally + * only be called externally when the application has taken some recovery + * action. For example, if an attempt to write a long string to the packet + * fails (and isValid() returns false), then a smaller string may be written + * instead. +**/ +AREXPORT void ArBasePacket::resetValid() +{ + myIsValid = true; +} + +AREXPORT const char *ArBasePacket::getBuf(void) const +{ + return myBuf; +} + +AREXPORT char *ArBasePacket::getBuf(void) +{ + return myBuf; +} + +AREXPORT void ArBasePacket::byteToBuf(ArTypes::Byte val) +{ + if (!hasWriteCapacity(1)) { + return; + } + + memcpy(myBuf+myLength, &val, 1); + myLength += 1; +} + +AREXPORT void ArBasePacket::byte2ToBuf(ArTypes::Byte2 val) +{ + if (!hasWriteCapacity(2)) { + return; + } + + unsigned char c; + c = (val >> 8) & 0xff; + memcpy(myBuf+myLength+1, &c, 1); + c = val & 0xff; + memcpy(myBuf+myLength, &c, 1); + myLength += 2; +} + +AREXPORT void ArBasePacket::byte4ToBuf(ArTypes::Byte4 val) +{ + if (!hasWriteCapacity(4)) { + return; + } + + unsigned char c; + c = (val >> 24) & 0xff; + memcpy(myBuf+myLength+3, &c, 1); + c = (val >> 16) & 0xff; + memcpy(myBuf+myLength+2, &c, 1); + c = (val >> 8) & 0xff; + memcpy(myBuf+myLength+1, &c, 1); + c = val & 0xff; + memcpy(myBuf+myLength, &c, 1); + myLength += 4; + +} + +AREXPORT void ArBasePacket::uByteToBuf(ArTypes::UByte val) +{ + if (!hasWriteCapacity(1)) { + return; + } + memcpy(myBuf+myLength, &val, 1); + myLength += 1; +} + +AREXPORT void ArBasePacket::uByte2ToBuf(ArTypes::UByte2 val) +{ + if (!hasWriteCapacity(2)) { + return; + } + // Note that MSB is placed one byte after the LSB in the end of the buffer: + unsigned char c; + c = (val >> 8) & 0xff; + memcpy(myBuf+myLength+1, &c, 1); + c = val & 0xff; + memcpy(myBuf+myLength, &c, 1); + myLength += 2; +} + +AREXPORT void ArBasePacket::uByte4ToBuf(ArTypes::UByte4 val) +{ + if (!hasWriteCapacity(4)) { + return; + } + // TODO make sure its put in LSB first. + memcpy(myBuf+myLength, &val, 4); + myLength += 4; +} + +/** +@param str string to copy into buffer +*/ +AREXPORT void ArBasePacket::strToBuf(const char *str) +{ + if (str == NULL) { + str = ""; + } + ArTypes::UByte2 tempLen = strlen(str) + 1; + + if (!hasWriteCapacity(tempLen)) { + return; + } + + memcpy(myBuf+myLength, str, tempLen); + myLength += tempLen; +} + +/** + * This method performs no bounds checking on the given length and + * the contents of the string. For string operations, strNToBufPadded() + * is preferred. For raw data operations, dataToBuf() is preferred. +@param str character array to copy into the packet buffer +@param length how many characters to copy from str into the packet buffer +*/ +AREXPORT void ArBasePacket::strNToBuf(const char *str, int length) +{ + // Do not perform bounds checking because it breaks existing code. + + //byte4ToBuf(length); + memcpy(myBuf+myLength, str, length); + myLength+=length; + +} + + +/** +If string ends before length it pads the string with NUL ('\\0') characters. +@param str character array to copy into buffer +@param length how many bytes to copy from the str into packet +*/ +AREXPORT void ArBasePacket::strToBufPadded(const char *str, int length) +{ + if (str == NULL) { + str = ""; + } + ArTypes::UByte2 tempLen = strlen(str); + + if (!hasWriteCapacity(length)) { + return; + } + + if (tempLen >= length) { + memcpy(myBuf + myLength, str, length); + myLength += length; + } + else // string is smaller than given length + { + memcpy(myBuf + myLength, str, tempLen); + myLength += tempLen; + memset(myBuf + myLength, 0, length - tempLen); + myLength += length - tempLen; + } +} + + +/** +@param data chacter array to copy into buffer +@param length how many bytes to copy from data into packet +*/ +AREXPORT void ArBasePacket::dataToBuf(const char *data, int length) +{ + if (data == NULL) { + ArLog::log(ArLog::Normal, "ArBasePacket::dataToBuf(NULL, %d) cannot add from null address", + length); + return; + } + + if (!hasWriteCapacity(length)) { + return; + } + + memcpy(myBuf+myLength, data, length); + myLength+=length; + +} + +/** + This was added to get around having to cast data you put in, since the data shouldn't really matter if its signed or unsigned. +@param data chacter array to copy into buffer +@param length how many bytes to copy from data into packet +*/ +AREXPORT void ArBasePacket::dataToBuf(const unsigned char *data, int length) +{ + if (data == NULL) { + ArLog::log(ArLog::Normal, "ArBasePacket::dataToBuf(NULL, %d) cannot add from null address", + length); + return; + } + + if (!hasWriteCapacity(length)) { + return; + } + + memcpy(myBuf+myLength, data, length); + myLength+=length; + +} + + +AREXPORT ArTypes::Byte ArBasePacket::bufToByte(void) +{ + ArTypes::Byte ret=0; + + if (isNextGood(1)) + { + memcpy(&ret, myBuf+myReadLength, 1); + myReadLength+=1; + } + + return(ret); +} + +AREXPORT ArTypes::Byte2 ArBasePacket::bufToByte2(void) +{ + ArTypes::Byte2 ret=0; + unsigned char c1, c2; + + if (isNextGood(2)) + { + memcpy(&c1, myBuf+myReadLength, 1); + memcpy(&c2, myBuf+myReadLength+1, 1); + ret = (c1 & 0xff) | (c2 << 8); + myReadLength+=2; + } + + return ret; +} + +AREXPORT ArTypes::Byte4 ArBasePacket::bufToByte4(void) +{ + ArTypes::Byte4 ret=0; + unsigned char c1, c2, c3, c4; + + if (isNextGood(4)) + { + memcpy(&c1, myBuf+myReadLength, 1); + memcpy(&c2, myBuf+myReadLength+1, 1); + memcpy(&c3, myBuf+myReadLength+2, 1); + memcpy(&c4, myBuf+myReadLength+3, 1); + ret = (c1 & 0xff) | (c2 << 8) | (c3 << 16) | (c4 << 24); + myReadLength+=4; + } + + return ret; +} + +AREXPORT ArTypes::UByte ArBasePacket::bufToUByte(void) +{ + ArTypes::UByte ret=0; + + if (isNextGood(1)) + { + memcpy(&ret, myBuf+myReadLength, 1); + myReadLength+=1; + } + + return(ret); +} + +AREXPORT ArTypes::UByte2 ArBasePacket::bufToUByte2(void) +{ + ArTypes::UByte2 ret=0; + unsigned char c1, c2; + + if (isNextGood(2)) + { + memcpy(&c1, myBuf+myReadLength, 1); + memcpy(&c2, myBuf+myReadLength+1, 1); + ret = (c1 & 0xff) | (c2 << 8); + myReadLength+=2; + } + + return ret; +} + +AREXPORT ArTypes::UByte4 ArBasePacket::bufToUByte4(void) +{ + ArTypes::Byte4 ret=0; + unsigned char c1, c2, c3, c4; + + if (isNextGood(4)) + { + memcpy(&c1, myBuf+myReadLength, 1); + memcpy(&c2, myBuf+myReadLength+1, 1); + memcpy(&c3, myBuf+myReadLength+2, 1); + memcpy(&c4, myBuf+myReadLength+3, 1); + ret = (c1 & 0xff) | (c2 << 8) | (c3 << 16) | (c4 << 24); + myReadLength+=4; + } + + return ret; +} + +/** +Copy a string from the packet buffer into the given buffer, stopping when +the end of the packet buffer is reached, the given length is reached, +or a NUL character ('\\0') is reached. If the given length is not large +enough, then the remainder of the string is flushed from the packet. +A NUL character ('\\0') is appended to @a buf if there is sufficient room +after copying the sting from the packet, otherwise no NUL is added (i.e. +if @a len bytes are copied). +@param buf Destination buffer +@param len Maximum number of characters to copy into the destination buffer +*/ +AREXPORT void ArBasePacket::bufToStr(char *buf, int len) +{ + if (buf == NULL) { + ArLog::log(ArLog::Normal, "ArBasePacket::bufToStr(NULL, %d) cannot write to null address", + len); + return; + } + + int i; + + buf[0] = '\0'; + // see if we can read + if (isNextGood(1)) + { + // while we can read copy over those bytes + for (i = 0; + isNextGood(1) && i < (len - 1) && myBuf[myReadLength] != '\0'; + ++myReadLength, ++i) { + buf[i] = myBuf[myReadLength]; + } + // if we stopped because of a null then copy that one too + if (myBuf[myReadLength] == '\0') + { + buf[i] = myBuf[myReadLength]; + myReadLength++; + } + else if (i >= (len - 1)) { + + // Otherwise, if we stopped reading because the output buffer was full, + // then attempt to flush the rest of the string from the packet + + // This is a bit redundant with the code below, but wanted to log the + // string for debugging + myBuf[len - 1] = '\0'; + + ArLog::log(ArLog::Normal, "ArBasePacket::bufToStr(buf, %d) output buf is not large enough for packet string %s", + len, myBuf); + + while (isNextGood(1) && (myBuf[myReadLength] != '\0')) { + myReadLength++; + } + if (myBuf[myReadLength] == '\0') { + myReadLength++; + } + } // end else if output buffer filled before null-terminator + } // end if something to read + + // Make absolutely sure that the string is null-terminated... + buf[len - 1] = '\0'; + +} + +/** +copies length bytes from the buffer into data, length is passed in, not read +from packet +@param data character array to copy the data into +@param length number of bytes to copy into data +*/ +AREXPORT void ArBasePacket::bufToData(char *data, int length) +{ + if (data == NULL) { + ArLog::log(ArLog::Normal, "ArBasePacket::bufToData(NULL, %d) cannot write to null address", + length); + return; + } + if (isNextGood(length)) + { + memcpy(data, myBuf+myReadLength, length); + myReadLength += length; + } +} + + +/** + This was added to get around having to cast data you put in, since the data shouldn't really matter if its signed or unsigned. + +copies length bytes from the buffer into data, length is passed in, not read +from packet +@param data character array to copy the data into +@param length number of bytes to copy into data +*/ +AREXPORT void ArBasePacket::bufToData(unsigned char *data, int length) +{ + if (data == NULL) { + ArLog::log(ArLog::Normal, "ArBasePacket::bufToData(NULL, %d) cannot write to null address", + length); + return; + } + if (isNextGood(length)) + { + memcpy(data, myBuf+myReadLength, length); + myReadLength += length; + } +} + + +/** +Copies the given packets buffer into the buffer of this packet, also +sets this length and readlength to what the given packet has +@param packet the packet to duplicate +*/ +AREXPORT void ArBasePacket::duplicatePacket(ArBasePacket *packet) +{ + myLength = packet->getLength(); + myReadLength = packet->getReadLength(); + + // KMC Added this because otherwise... If myMaxLength < packet->getMaxLength(), + // then this will overwrite memory. + // + if (myMaxLength < myLength) { + setMaxLength(myLength); + } + + memcpy(myBuf, packet->getBuf(), myLength); +} + +AREXPORT void ArBasePacket::log(void) +{ + int i; + ArLog::log(ArLog::Terse, "Packet: (length = %i)", myLength); + for (i = 0; i < myLength; i++) + ArLog::log(ArLog::Terse, " [%03i] % 5d\t0x%x", i,(unsigned char) myBuf[i], + (unsigned char) myBuf[i]); + ArLog::log(ArLog::Terse, "\n"); +} + +AREXPORT void ArBasePacket::printHex(void) +{ + int i; + ArLog::log(ArLog::Terse, "Packet: (length = %i)", myLength); + for (i = 0; i < myLength; i++) + ArLog::log(ArLog::Terse, " [%i] 0x%x ", i,(unsigned char) myBuf[i]); + ArLog::log(ArLog::Terse, "\n"); +} + diff --git a/Legacy/Aria/src/ArBatteryConnector.cpp b/Legacy/Aria/src/ArBatteryConnector.cpp new file mode 100644 index 0000000..2e99f80 --- /dev/null +++ b/Legacy/Aria/src/ArBatteryConnector.cpp @@ -0,0 +1,723 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArBatteryConnector.h" +#include "ArRobot.h" +#include "ArBatteryMTX.h" +#include "ariaInternal.h" +#include "ArCommands.h" +#include "ArRobotConfigPacketReader.h" +/** @warning do not delete @a parser during the lifetime of this + ArBatteryConnector, which may need to access its contents later. + @param parser the parser with the arguments to parse + @param robot the robot these batteries are attached to (or NULL for none) + @param robotConnector the connector used for connecting to the robot + (so we can see if it was a sim or not) + @param autoParseArgs if this class should autoparse the args if they + aren't parsed explicitly + @param infoLogLevel The log level for information about creating + batteries and such, this is also passed to all the batteries created as + their infoLogLevel too + */ +AREXPORT ArBatteryConnector::ArBatteryConnector ( + ArArgumentParser *parser, ArRobot *robot, + ArRobotConnector *robotConnector, bool autoParseArgs, + ArLog::LogLevel infoLogLevel) : + myParseArgsCB (this, &ArBatteryConnector::parseArgs), + myLogOptionsCB (this, &ArBatteryConnector::logOptions) +{ + myParser = parser; + myOwnParser = false; + myRobot = robot; + myRobotConnector = robotConnector; + myAutoParseArgs = autoParseArgs; + myParsedArgs = false; + myBatteryLogPacketsReceived = false; + myBatteryLogPacketsSent = false; + myInfoLogLevel = infoLogLevel; + myParseArgsCB.setName ("ArBatteryConnector"); + Aria::addParseArgsCB (&myParseArgsCB, 60); + myLogOptionsCB.setName ("ArBatteryConnector"); + Aria::addLogOptionsCB (&myLogOptionsCB, 80); +} +AREXPORT ArBatteryConnector::~ArBatteryConnector (void) +{ +} +/** + * Parse command line arguments using the ArArgumentParser given in the ArBatteryConnector constructor. + * + * See parseArgs(ArArgumentParser*) for details about argument parsing. + * + @return true if the arguments were parsed successfully false if not + **/ +AREXPORT bool ArBatteryConnector::parseArgs (void) +{ + return parseArgs (myParser); +} +/** + * Parse command line arguments held by the given ArArgumentParser. + * + @return true if the arguments were parsed successfully false if not + + The following arguments are accepted for battery connections. A program may request support for more than one battery + using setMaxNumBatteries(); if multi-battery support is enabled in this way, then these arguments must have the battery index + number appended. For example, "-batteryPort" for battery 1 would instead by "-batteryPort1", and for battery 2 it would be + "-batteryPort2". +
+
-batteryPort port
+
-bp port
+
Use the given port device name when connecting to a battery. For example, COM2 or on Linux, /dev/ttyS1. + The default battery port is COM2, which is the typical Pioneer battery port setup. +
+
-connectBattery
+
-cl
+
Explicitly request that the client program connect to a battery, if it does not always do so
+
+ **/ +AREXPORT bool ArBatteryConnector::parseArgs (ArArgumentParser *parser) +{ + + if (myParsedArgs) + return true; + myParsedArgs = true; + bool typeReallySet; + const char *type; + char buf[1024]; + int i; + std::map::iterator it; + BatteryData *batteryData; + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue (true); + + for (i = 1; i <= Aria::getMaxNumBatteries(); i++) { + if (i == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", i); + typeReallySet = false; + // see if the battery is being added from the command line + if (!parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-batteryType%s", buf) || + !parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-bt%s", buf)) { + ArLog::log (ArLog::Normal, + "ArBatteryConnector: Bad battery type given for battery number %d", + i); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + + return false; + } + // if we didn't have an argument then just return + if (!typeReallySet) + continue; + if ( (it = myBatteries.find (i)) != myBatteries.end()) { + ArLog::log (ArLog::Normal, "ArBatteryConnector: A battery already exists for battery number %d, replacing it with a new one of type %s", + i, type); + batteryData = (*it).second; + delete batteryData; + myBatteries.erase (i); + } + if (typeReallySet && type != NULL) { + ArBatteryMTX *battery = NULL; + if ( (battery = Aria::batteryCreate (type, i, "ArBatteryConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArBatteryConnector: Created %s as battery %d from arguments", + battery->getName(), i); + myBatteries[i] = new BatteryData (i, battery); + battery->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "Unknown battery type %s for battery %d, choices are %s", + type, i, Aria::batteryGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } + + if (parser->checkArgument("-batteryLogPacketsReceived") || + parser->checkArgument("-blpr")) + myBatteryLogPacketsReceived = true; + + if (parser->checkArgument("-batteryLogPacketsSent") || + parser->checkArgument("-blps")) + myBatteryLogPacketsSent = true; + + // go through the robot param list and add the batteries defined + // in the parameter file. + const ArRobotParams *params = NULL; + if (myRobot != NULL) { + params = myRobot->getRobotParams(); + if (params != NULL) { + + + for (i = 1; i <= Aria::getMaxNumBatteries(); i++) { + // if we already have a battery for this then don't add one from + // the param file, since it was added either explicitly by a + // program or from the command line + if (myBatteries.find (i) != myBatteries.end()) + continue; + type = params->getBatteryMTXBoardType (i); + + // if we don't have a battery type for that number continue + if (type == NULL || type[0] == '\0') + continue; + + int baud = params->getBatteryMTXBoardBaud(i); + + if (baud == 0) + continue; + + ArBatteryMTX *battery = NULL; + if ( (battery = + Aria::batteryCreate (type, i, "ArBatteryConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArBatteryConnector::parseArgs() Created %s as battery %d from parameter file", + battery->getName(), i); + myBatteries[i] = new BatteryData (i, battery); + battery->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "ArBatteryConnector::parseArgs() Unknown battery type %s for battery %d from the .p file, choices are %s", + type, i, Aria::batteryGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } else { + ArLog::log (ArLog::Normal, "ArBatteryConnector::parseArgs() Have robot, but robot has NULL params, so cannot configure its battery"); + } + } + // now go through and parse the args for any battery that we have + + + for (it = myBatteries.begin(); it != myBatteries.end(); it++) { + batteryData = (*it).second; + if (!parseBatteryArgs (parser, batteryData)) { + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return true; + +} // end parseArgs + +AREXPORT bool ArBatteryConnector::parseBatteryArgs (ArArgumentParser *parser, + BatteryData *batteryData) +{ + char buf[512]; + if (batteryData == NULL) { + ArLog::log (ArLog::Terse, "ArBatteryConnector::parseBatteryArgs() Was given NULL battery"); + return false; + } + if (batteryData->myBattery == NULL) { + ArLog::log (ArLog::Normal, + "ArBatteryConnector::parseBatteryArgs() There is no battery for battery number %d but there should be", + batteryData->myNumber); + return false; + } + ArBatteryMTX *battery = batteryData->myBattery; + if (batteryData->myNumber == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", batteryData->myNumber); + +#if 0 + // see if we want to connect to the battery automatically + if (parser->checkArgumentVar ("-connectBattery%s", buf) || + parser->checkArgumentVar ("-cb%s", buf)) { + batteryData->myConnect = true; + batteryData->myConnectReallySet = true; + } +#endif + + // see if we do not want to connect to the battery automatically + if (parser->checkArgumentVar ("-doNotConnectBattery%s", buf) || + parser->checkArgumentVar ("-dncb%s", buf)) { + batteryData->myConnect = false; + batteryData->myConnectReallySet = true; + } + if (!parser->checkParameterArgumentStringVar (NULL, &batteryData->myPort, + "-batteryPort%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myPort, + "-bp%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myPortType, + "-batteryPortType%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myPortType, + "-bpt%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myType, + "-batteryType%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myType, + "-bt%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myBaud, + "-batteryBaud%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myBaud, + "-bb%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myAutoConn, + "-batteryAutoConn%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &batteryData->myAutoConn, + "-bac%s", buf)) + { + return false; + } + // PS - command line needs to set this to true +#if 0 + if (strcasecmp(batteryData->myAutoConn, "true") == 0) { + batteryData->myConnect = true; + batteryData->myConnectReallySet = true; + } +#endif + return internalConfigureBattery (batteryData); + +} // end parseBatteryArgs + + +bool ArBatteryConnector::internalConfigureBattery ( + BatteryData *batteryData) +{ + ArBatteryMTX *battery = batteryData->myBattery; + if (battery == NULL) { + ArLog::log (ArLog::Terse, "ArBatteryConnector::internalConfigureBattery() No battery for number %d", + batteryData->myNumber); + return false; + } + // the rest handles all the connection stuff + const ArRobotParams *params; + char portBuf[1024]; + if (batteryData->myBattery == NULL) { + ArLog::log (ArLog::Terse, "ArBatteryConnector::internalConfigureBattery() There is no battery, cannot connect"); + return false; + } + sprintf (portBuf, "%d", batteryData->myBattery->getDefaultTcpPort()); + if (myRobotConnector == NULL) { + ArLog::log (ArLog::Terse, "ArBatteryConnector::internalConfigureBattery() No ArRobotConnector is passed in so simulators and remote hosts will not work correctly"); + } + if ( (batteryData->myPort == NULL || strlen (batteryData->myPort) == 0) && + (batteryData->myPortType != NULL && strlen (batteryData->myPortType) > 0)) { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() There is a battery port type given ('%s') for battery %d (%s), but no battery port given, cannot configure battery", + batteryData->myPortType, batteryData->myNumber, battery->getName()); + return false; + } + + ArLog::log (ArLog::Verbose, "ArBatteryConnector::internalConfigureBattery() command line battery #%d type= %s port=%s portType=%s baud=%d autoconnect=%d ", + batteryData->myNumber, + batteryData->myType, + batteryData->myPort, + batteryData->myPortType, + batteryData->myBaud, + batteryData->myAutoConn); + + + if ( (batteryData->myPort != NULL && strlen (batteryData->myPort) > 0) && + (batteryData->myPortType != NULL && strlen (batteryData->myPortType) > 0)) { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() Connection type and port given for battery %d (%s), so overriding everything and using that information", + batteryData->myNumber, battery->getName()); + + if ( (batteryData->myConn = Aria::deviceConnectionCreate ( + batteryData->myPortType, batteryData->myPort, portBuf, + "ArBatteryConnector:")) == NULL) { + return false; + } + battery->setDeviceConnection (batteryData->myConn); + return true; + } + if ( (batteryData->myPort != NULL && strlen (batteryData->myPort) > 0) && + (batteryData->myPortType == NULL || strlen (batteryData->myPortType) == 0)) { + if (myRobot != NULL && (params = myRobot->getRobotParams()) != NULL) { + if (params->getBatteryMTXBoardPortType (batteryData->myNumber) != NULL && + params->getBatteryMTXBoardPortType (batteryData->myNumber) [0] != '\0') { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() There is a port given, but no port type given so using the robot parameters port type"); + if ( (batteryData->myConn = Aria::deviceConnectionCreate ( + params->getBatteryMTXBoardPortType (batteryData->myNumber), + batteryData->myPort, portBuf, + "ArBatteryConnector: ")) == NULL) { + return false; + } + } else if (battery->getDefaultPortType() != NULL && + battery->getDefaultPortType() [0] != '\0') { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() There is a port given for battery %d (%s), but no port type given and no robot parameters port type so using the battery's default port type", batteryData->myNumber, battery->getName()); + if ( (batteryData->myConn = Aria::deviceConnectionCreate ( + battery->getDefaultPortType(), + batteryData->myPort, portBuf, + "ArBatteryConnector: ")) == NULL) { + return false; + } + } else { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() There is a port given for battery %d (%s), but no port type given, no robot parameters port type, and no battery default port type, so using serial", + batteryData->myNumber, battery->getName()); + if ( (batteryData->myConn = Aria::deviceConnectionCreate ( + "serial", + batteryData->myPort, portBuf, + "ArBatteryConnector: ")) == NULL) { + return false; + } + } + battery->setDeviceConnection (batteryData->myConn); + return true; + } else { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() There is a battery port given ('%s') for battery %d (%s), but no battery port type given and there are no robot params to find the information in, so assuming serial", + batteryData->myPort, batteryData->myNumber, battery->getName()); + if ( (batteryData->myConn = Aria::deviceConnectionCreate ( + batteryData->myPortType, batteryData->myPort, portBuf, + "ArBatteryConnector: ")) == NULL) { + return false; + } + battery->setDeviceConnection (batteryData->myConn); + return true; + } + } + // if we get down here there was no information provided by the command line or in a battery connector, so see if we have params... if not then fail, if so then use those + if (myRobot == NULL || (params = myRobot->getRobotParams()) == NULL) { + ArLog::log (ArLog::Normal, "ArBatteryConnector::internalConfigureBattery() No robot params are available, and no command line information given on how to connect to the battery %d (%s), so cannot connect", batteryData->myNumber, battery->getName()); + return false; + } + + ArLog::log (ArLog::Verbose, "ArBatteryConnector::internalConfigureBattery() .p battery #%d type= %s port=%s portType=%s baud=%d autoconnect=%d ", + batteryData->myNumber, + params->getBatteryMTXBoardType (batteryData->myNumber), + params->getBatteryMTXBoardPort (batteryData->myNumber), + params->getBatteryMTXBoardPortType (batteryData->myNumber), + params->getBatteryMTXBoardBaud (batteryData->myNumber), + params->getBatteryMTXBoardAutoConn (batteryData->myNumber)); + + // see if auto connect is on + if (params->getBatteryMTXBoardAutoConn (batteryData->myNumber)) { + + batteryData->myConnect = true; + batteryData->myConnectReallySet = true; + } + + ArLog::log (ArLog::Normal, "ArBatteryConnector: Using robot params for connecting to battery %d (%s)", batteryData->myNumber, battery->getName()); + + if ( (batteryData->myConn = Aria::deviceConnectionCreate ( + params->getBatteryMTXBoardPortType (batteryData->myNumber), + params->getBatteryMTXBoardPort (batteryData->myNumber), portBuf, + "ArBatteryConnector: ")) == NULL) { + return false; + } + battery->setDeviceConnection (batteryData->myConn); + return true; +} +AREXPORT void ArBatteryConnector::logOptions (void) const +{ + ArLog::log (ArLog::Terse, "Options for ArBatteryConnector:"); + ArLog::log(ArLog::Terse, "-batteryLogPacketsReceived"); + ArLog::log(ArLog::Terse, "-blpr"); + ArLog::log(ArLog::Terse, "-batteryLogPacketsSent"); + ArLog::log(ArLog::Terse, "-blps"); + ArLog::log (ArLog::Terse, "\nOptions shown are for currently set up batteries. Activate batteries with -batteryType option"); + ArLog::log (ArLog::Terse, "to see options for that battery (e.g. \"-help -batteryType1 batteryMTX\")."); + ArLog::log (ArLog::Terse, "Valid battery types are: %s", Aria::batteryGetTypes()); + ArLog::log (ArLog::Terse, "\nSee docs for details."); + std::map::const_iterator it; + BatteryData *batteryData; + for (it = myBatteries.begin(); it != myBatteries.end(); it++) { + batteryData = (*it).second; + logBatteryOptions (batteryData); + } +} +AREXPORT void ArBatteryConnector::logBatteryOptions ( + BatteryData *batteryData, bool header, bool metaOpts) const +{ + char buf[512]; + if (batteryData == NULL) { + ArLog::log (ArLog::Normal, + "Tried to log battery options with NULL battery data"); + return; + } + if (batteryData->myBattery == NULL) { + ArLog::log (ArLog::Normal, + "ArBatteryConnector: There is no battery for battery number %d but there should be", + batteryData->myNumber); + return; + } + ArBatteryMTX *battery = batteryData->myBattery; + if (batteryData->myNumber == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", batteryData->myNumber); + if (header) { + ArLog::log (ArLog::Terse, ""); + ArLog::log (ArLog::Terse, "Battery%s: (\"%s\")", buf, battery->getName()); + } + if (metaOpts) { + ArLog::log (ArLog::Terse, "-batteryType%s <%s>", buf, Aria::batteryGetTypes()); + ArLog::log (ArLog::Terse, "-bt%s <%s>", buf, Aria::batteryGetTypes()); + ArLog::log (ArLog::Terse, "-connectBattery%s", buf); + ArLog::log (ArLog::Terse, "-cb%s", buf); + } + ArLog::log (ArLog::Terse, "-batteryPort%s ", buf); + ArLog::log (ArLog::Terse, "-bp%s ", buf); + ArLog::log (ArLog::Terse, "-batteryPortType%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log (ArLog::Terse, "-bpt%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log (ArLog::Terse, "-remoteBatteryTcpPort%s ", buf); + ArLog::log (ArLog::Terse, "-rbtp%s ", buf); +} +/** + Normally adding batteries is done from the .p file, you can use this + if you want to add them explicitly in a program (which will + override the .p file, and may cause some problems). + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArBatteryConnector::connectBatteries.() + @internal +**/ +AREXPORT bool ArBatteryConnector::addBattery ( + ArBatteryMTX *battery, int batteryNumber) +{ + std::map::iterator it; + BatteryData *batteryData = NULL; + if ( (it = myBatteries.find (batteryNumber)) != myBatteries.end()) + batteryData = (*it).second; + if (batteryData != NULL) { + if (batteryData->myBattery != NULL) + ArLog::log (ArLog::Terse, + "ArBatteryConnector::addBattery: Already have battery for number #%d of type %s but a replacement battery of type %s was passed in", + batteryNumber, batteryData->myBattery->getName(), battery->getName()); + else + ArLog::log (ArLog::Terse, + "ArBatteryConnector::addBattery: Already have battery for number #%d but a replacement battery of type %s was passed in", + batteryNumber, battery->getName()); + delete batteryData; + myBatteries.erase (batteryNumber); + } + myBatteries[batteryNumber] = new BatteryData (batteryNumber, battery); + return true; +} +AREXPORT ArBatteryMTX *ArBatteryConnector::getBattery (int batteryNumber) +{ + std::map::iterator it; + BatteryData *batteryData = NULL; + if ( (it = myBatteries.find (batteryNumber)) != myBatteries.end()) + batteryData = (*it).second; + // if we have no battery, we can't get it so just return + if (batteryData == NULL) + return NULL; + // otherwise, return the battery + return batteryData->myBattery; +} +AREXPORT bool ArBatteryConnector::replaceBattery ( + ArBatteryMTX *battery, int batteryNumber) +{ + std::map::iterator it; + BatteryData *batteryData = NULL; + if ( (it = myBatteries.find (batteryNumber)) != myBatteries.end()) + batteryData = (*it).second; + // if we have no battery, we can't replace it so just return + if (batteryData == NULL) + return false; + if (batteryData->myBattery != NULL) + ArLog::log (myInfoLogLevel, + "ArBatteryConnector::replaceBattery: Already have battery for number #%d of type %s but a replacement battery of type %s was passed in", + batteryNumber, batteryData->myBattery->getName(), battery->getName()); + else + ArLog::log (ArLog::Normal, + "ArBatteryConnector::replaceBattery: Replacing a non existant battery number #%d with a battery of type %s passed in", + batteryNumber, battery->getName()); + batteryData->myBattery = battery; + return true; +} +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArBatteryConnector::connectBatteries(). + @internal +**/ +AREXPORT bool ArBatteryConnector::setupBattery (ArBatteryMTX *battery, + int batteryNumber) +{ + if (myRobot == NULL && myRobotConnector != NULL) + myRobot = myRobotConnector->getRobot(); + std::map::iterator it; + BatteryData *batteryData = NULL; + const ArRobotParams *params; + if ( (it = myBatteries.find (batteryNumber)) != myBatteries.end()) + batteryData = (*it).second; + if (batteryData == NULL && battery == NULL) { + ArLog::log (ArLog::Terse, "ArBatteryConnector::setupBattery: Do not have battery #%d", batteryNumber) ; + return false; + } + if (batteryData != NULL && battery != NULL && + batteryData->myBattery != battery) { + if (batteryData->myBattery != NULL) + ArLog::log (ArLog::Terse, "ArBatteryConnector::setupBattery: Already have battery for number #%d (%s) but a replacement battery (%s) was passed in, this will replace all of the command line arguments for that battery", + batteryNumber, batteryData->myBattery->getName(), battery->getName()); + else + ArLog::log (ArLog::Terse, "ArBatteryConnector::setupBattery: Already have battery for number #%d but a replacement battery (%s) was passed in, this will replace all of the command line arguments for that battery", + batteryNumber, battery->getName()); + delete batteryData; + myBatteries.erase (batteryNumber); + myBatteries[batteryNumber] = new BatteryData (batteryNumber, battery); + } + if (batteryData == NULL && battery != NULL) { + batteryData = new BatteryData (batteryNumber, battery); + myBatteries[batteryNumber] = batteryData; + if (myAutoParseArgs && !parseBatteryArgs (myParser, batteryData)) { + ArLog::log (ArLog::Verbose, "ArBatteryConnector: Auto parsing args for battery %s (num %d)", batteryData->myBattery->getName(), batteryNumber); + return false; + } + } + // see if there is no battery (ie if it was a sick done in the old + // style), or if the battery passed in doesn't match the one this + // class created (I don't know how it'd happen, but...)... and then + // configure it + if ( (batteryData->myBattery == NULL || batteryData->myBattery != battery)) { + if (!internalConfigureBattery (batteryData)) + return false; + } + // setupBattery automatically adds this to the robot, since the + // connectbattery stuff is the newer more supported way and is more + // configurable.. it only adds it as a battery since the legacy code + // won't add it that way, but will add it as a range device + if (myRobot != NULL) { + myRobot->addBattery (battery, batteryNumber); + //myRobot->addRangeDevice(battery); + } else { + ArLog::log (ArLog::Normal, "ArBatteryConnector::setupBattery: No robot, so battery cannot be added to robot"); + } + return true; +} +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArBatteryConnector::connectBatteries(). + @internal +**/ +AREXPORT bool ArBatteryConnector::connectBattery (ArBatteryMTX *battery, + int batteryNumber, + bool forceConnection) +{ + std::map::iterator it; + BatteryData *batteryData = NULL; + battery->lockDevice(); + // set up the battery regardless + if (!setupBattery (battery, batteryNumber)) { + battery->unlockDevice(); + return false; + } + battery->unlockDevice(); + if ( (it = myBatteries.find (batteryNumber)) != myBatteries.end()) + batteryData = (*it).second; + if (batteryData == NULL) { + ArLog::log (ArLog::Normal, "ArBatteryConnector::connectBattery: Some horrendous error in connectBattery with battery number %d", batteryNumber); + return false; + } + // see if we want to connect + if (!forceConnection && !batteryData->myConnect) + return true; + else + return battery->blockingConnect(myBatteryLogPacketsSent, myBatteryLogPacketsReceived); +} +AREXPORT bool ArBatteryConnector::connectBatteries ( + bool continueOnFailedConnect, bool addConnectedBatteriesToRobot, + bool addAllBatteriesToRobot, bool turnOnBatteries, + bool powerCycleBatteryOnFailedConnect) +{ + std::map::iterator it; + BatteryData *batteryData = NULL; + ArLog::log (myInfoLogLevel, + "ArBatteryConnector::connectBatteries() Connecting batteries"); + if (myAutoParseArgs && !myParsedArgs) { + ArLog::log (ArLog::Verbose, + "ArBatteryConnector::connectBatteries() Auto parsing args for batteries"); + if (!parseArgs()) { + return false; + } + } + if (addAllBatteriesToRobot) { + + ArLog::log (ArLog::Verbose, + "ArBatteryConnector::connectBatteries() addAllBatteriesToRobot"); + + if (myRobot != NULL) { + + for (it = myBatteries.begin(); it != myBatteries.end(); it++) { + batteryData = (*it).second; + myRobot->addBattery (batteryData->myBattery, batteryData->myNumber); + ArLog::log (ArLog::Verbose, + "ArBatteryConnector::connectBatteries: Added %s to robot as battery %d", + batteryData->myBattery->getName(), batteryData->myNumber); + } + } else { + ArLog::log (ArLog::Normal, "ArBatteryConnector::connectBatteries: Supposed to add all batteries to robot, but there is no robot"); + return false; + } + } + for (it = myBatteries.begin(); it != myBatteries.end(); it++) { + + batteryData = (*it).second; + + if (batteryData == NULL) + continue; + + if (batteryData->myConnectReallySet && batteryData->myConnect) { + ArLog::log (myInfoLogLevel, + "ArBatteryConnector::connectBatteries: Connecting %s", + batteryData->myBattery->getName()); + batteryData->myBattery->setRobot (myRobot); + bool connected = false; + connected = batteryData->myBattery->blockingConnect(myBatteryLogPacketsSent, myBatteryLogPacketsReceived); + if (connected) { + if (!addAllBatteriesToRobot && addConnectedBatteriesToRobot) { + if (myRobot != NULL) { + myRobot->addBattery (batteryData->myBattery, batteryData->myNumber); + //myRobot->addRangeDevice(batteryData->myBattery); + ArLog::log (ArLog::Verbose, + "ArBatteryConnector::connectBatteries: Added %s to robot", + batteryData->myBattery->getName()); + } else { + ArLog::log (ArLog::Normal, + "ArBatteryConnector::connectBatteries: Could not add %s to robot, since there is no robot", + batteryData->myBattery->getName()); + } + } else if (addAllBatteriesToRobot && myRobot != NULL) { + ArLog::log (ArLog::Verbose, + "ArBatteryConnector::connectBatteries: %s already added to robot)", + batteryData->myBattery->getName()); + } else if (myRobot != NULL) { + ArLog::log (ArLog::Verbose, + "ArBatteryConnector::connectBatteries: Did not add %s to robot", + batteryData->myBattery->getName()); + } + } else { + if (!continueOnFailedConnect) { + ArLog::log (ArLog::Normal, + "ArBatteryConnector::connectBatteries: Could not connect %s, stopping", + batteryData->myBattery->getName()); + return false; + } else + ArLog::log (ArLog::Normal, + "ArBatteryConnector::connectBatteries: Could not connect %s, continuing with remainder of batteries", + batteryData->myBattery->getName()); + } + } + } + ArLog::log (myInfoLogLevel, + "ArBatteryConnector: Done connecting batteries"); + return true; +} diff --git a/Legacy/Aria/src/ArBatteryMTX.cpp b/Legacy/Aria/src/ArBatteryMTX.cpp new file mode 100644 index 0000000..735f815 --- /dev/null +++ b/Legacy/Aria/src/ArBatteryMTX.cpp @@ -0,0 +1,1291 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArBatteryMTX.h" +#include "ArSensorReading.h" +//#include "ArRobot.h" +#include "ariaOSDef.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + +//#define ARBATTERYMTXDEBUG + +#if (defined(ARBATTERYMTXDEBUG)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + + +AREXPORT ArBatteryMTX::ArBatteryMTX (int batteryBoardNum, const char *name, + ArDeviceConnection *conn, + ArRobot *robot) : + mySensorInterpTask (this, &ArBatteryMTX::sensorInterp), + myConn (conn), + myName (name), + myBoardNum (batteryBoardNum), + myAriaExitCB (this, &ArBatteryMTX::disconnect) +{ + + myInfoLogLevel = ArLog::Normal; + clear(); + setRobot (robot); + + mySendTracking = false; + myRecvTracking = false; + myAsyncConnectState = -1; + + // now from the robot params - read each unit + // searching for the units configured for this + // board, then create the unit map + if (robot && robot->getRobotParams()) { + ArLog::log (ArLog::Verbose, "%s::ArBatteryMTX Battery board %d params", + getName(), myBoardNum); + } + Aria::addExitCallback (&myAriaExitCB, -10); + //myLogLevel = ArLog::Verbose; + //myLogLevel = ArLog::Terse; + myLogLevel = ArLog::Normal; + myRobotRunningAndConnected = false; + + myStatusFlags = 0; + myLastStatusFlags = 0; + myErrorFlags = 0; + myLastErrorFlags = 0; + myFirstErrorFlagsCheck = true; + myHaveSetRTC = false; +} + + +AREXPORT ArBatteryMTX::~ArBatteryMTX() +{ + if (myRobot != NULL) { + myRobot->remSensorInterpTask (&myProcessCB); + } +} + +AREXPORT int ArBatteryMTX::getAsyncConnectState() +{ + return myAsyncConnectState; +} + + +AREXPORT void ArBatteryMTX::setDeviceConnection ( + ArDeviceConnection *conn) +{ + myConn = conn; + myConn->setDeviceName(getName()); +} + +AREXPORT ArDeviceConnection *ArBatteryMTX::getDeviceConnection (void) +{ + return myConn; +} + +AREXPORT void ArBatteryMTX::requestContinuousSysInfoPackets (void) +{ + if (myIsConnected) { + ArLog::log (ArLog::Verbose, + "%s:requestContinuousSysInfoPackets - Sending....", + getName()); + sendSystemInfo (SEND_CONTINUOUS); + myRequestedSysInfoBatteryPackets = true; + } +} + + +AREXPORT void ArBatteryMTX::stopSysInfoPackets (void) +{ + if (myIsConnected) { + ArLog::log (ArLog::Verbose, + "%s:stopSysInfoPackets - Stopping....", + getName()); + sendSystemInfo (STOP_SENDING); + myRequestedSysInfoBatteryPackets = false; + } +} + +AREXPORT bool ArBatteryMTX::haveRequestedSysInfoPackets (void) +{ + return myRequestedSysInfoBatteryPackets; +} + +AREXPORT void ArBatteryMTX::requestContinuousCellInfoPackets (void) +{ + if (myIsConnected) { + ArLog::log (ArLog::Verbose, + "%s:requestContinuousCellInfoPackets - Sending....", + getName()); + sendCellInfo (SEND_CONTINUOUS); + myRequestedCellInfoBatteryPackets = true; + } +} + +AREXPORT void ArBatteryMTX::stopCellInfoPackets (void) +{ + if (myIsConnected) { + ArLog::log (ArLog::Verbose, + "%s:stopCellInfoPackets - Stopping....", + getName()); + sendCellInfo (STOP_SENDING); + myRequestedCellInfoBatteryPackets = false; + } +} + +AREXPORT bool ArBatteryMTX::haveRequestedCellInfoPackets (void) +{ + return myRequestedCellInfoBatteryPackets; +} + +AREXPORT void ArBatteryMTX::setRobot (ArRobot *robot) +{ + myRobot = robot; + // this is the code from the laser, i changed the priority to 20 from 90 + // also it puts in mysensorinterptask instead of myprocesscb + if (myRobot != NULL) { + myRobot->remSensorInterpTask (&mySensorInterpTask); + myRobot->addSensorInterpTask (myName.c_str(), 20, &mySensorInterpTask); + } +} + +void ArBatteryMTX::clear (void) +{ + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; +} + +AREXPORT void ArBatteryMTX::batterySetName (const char *name) +{ + myName = name; + myDeviceMutex.setLogNameVar ("%s::myDeviceMutex", getName()); + myPacketsMutex.setLogNameVar ("%s::myPacketsMutex", getName()); + myDataMutex.setLogNameVar ("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar ("%s::exitCallback", getName()); + myDisconnectOnErrorCBList.setNameVar( + "%s::myDisconnectOnErrorCBList", myName.c_str()); + +} + +AREXPORT bool ArBatteryMTX::disconnect (void) +{ + if (!isConnected()) + return true; + ArLog::log (ArLog::Normal, "%s: Disconnecting", getName()); + return true; +} + +AREXPORT int ArBatteryMTX::getReadingCount() +{ + if (myTimeLastReading == time(NULL)) + return myReadingCount; + if (myTimeLastReading == time(NULL) - 1) + return myReadingCurrentCount; + return 0; +} + +AREXPORT void ArBatteryMTX::internalGotReading(void) +{ + if (myTimeLastReading != time(NULL)) + { + myTimeLastReading = time(NULL); + myReadingCount = myReadingCurrentCount; + myReadingCurrentCount = 0; + } + myReadingCurrentCount++; + + myLastReading.setToNow(); + +} + +void ArBatteryMTX::failedToConnect (void) +{ + ArLog::log (ArLog::Normal, + "%s:failedToConnect Cound not connect to battery", + getName()); + myDeviceMutex.lock(); + myTryingToConnect = true; + myDeviceMutex.unlock(); +} + +void ArBatteryMTX::sensorInterp (void) +{ + //ArBatteryMTXPacket *packet; + ArRobotPacket *packet; + + while (1) { + myPacketsMutex.lock(); + if (myPackets.empty()) { + myPacketsMutex.unlock(); + return; + } + + packet = myPackets.front(); + myPackets.pop_front(); + myPacketsMutex.unlock(); + unsigned char *buf = (unsigned char *) packet->getBuf(); + // make sure its a basic info packet with 11 bytes (includes checksum and header) + switch (packet->getID()) { + case + SYSTEM_INFO: { + if (packet->getLength() != SYSTEM_INFO_SIZE) { + ArLog::log (ArLog::Normal, + "%s:sensorInterp Could not process packet, command (%d) or packet length (%d) is invalid", + getName(), buf[3], packet->getLength()); + delete packet; + continue; + } + //ArLog::log (ArLog::Normal, + // "%s:sensorInterp Received System Info packet", + // getName()); + + // PS 12/11/12 - count system packets + myLastReading.setToNow(); + internalGotReading(); + + updateSystemInfo (&buf[3]); + delete packet; + } + break; + case + CELL_INFO: { + if (packet->getLength() != CELL_INFO_SIZE) { + ArLog::log (ArLog::Normal, + "%s:sensorInterp Could not process packet, command (%d) or packet length (%d) is invalid", + getName(), buf[3], packet->getLength()); + delete packet; + continue; + } + + // PS 12/11/12 - count system packets + myLastReading.setToNow(); + internalGotReading(); + + //ArLog::log (ArLog::Normal, + // "%s:sensorInterp Received Cell Info packet", + // getName()); + updateCellInfo (&buf[3]); + delete packet; + } + break; + case + BASIC_INFO: { + if (packet->getLength() != BASIC_INFO_SIZE) { + ArLog::log (ArLog::Normal, + "%s:sensorInterp Could not process packet, command (%d) or packet length (%d) is invalid", + getName(), buf[3], packet->getLength()); + delete packet; + continue; + } + + myLastReading.setToNow(); + internalGotReading(); + + ArTime time = packet->getTimeReceived(); + +#if 0 // for raw trace + + char obuf[256]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength() - 2; i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "%s::sensorInterp() packet = %s",getName(), obuf); +#endif + updateBasicInfo (&buf[3]); + /* + ArLog::log(ArLog::Normal, + "%s:sensorInterp charge estimate is %.2f%%",getName(), myChargeEstimate); + ArLog::log(ArLog::Normal, + "%s:sensorInterp current draw is %d",getName(), myCurrentDraw); + ArLog::log(ArLog::Normal, + "%s:sensorInterp pack voltage is %d",getName(), myPackVoltage); + ArLog::log(ArLog::Normal, + "%s:sensorInterp status flag %x",getName(), myStatusFlags); + ArLog::log(ArLog::Normal, + "%s:sensorInterp error flag %x",getName(), myErrorFlags); + */ + myDeviceMutex.lock(); + interpBasicInfo(); + myDeviceMutex.unlock(); + delete packet; + } + break; + } // end switch status + } // end while +} + + +void ArBatteryMTX::interpBasicInfo(void) +{ + // if the charger isn't on put us to the not charging state + if (!(myStatusFlags & STATUS_CHARGER_ON) && + !(myStatusFlags & STATUS_CHARGING)) + { + myChargeState = ArRobot::CHARGING_NOT; + } + else + { + + /* Taking this out so that we won't think we're docked when we're + // not really charging... if we're in the not charging state but + // we see the charger is on toss it in bulk + if (myChargeState == ArRobot::CHARGING_NOT && + (myStatusFlags & STATUS_CHARGING)) + myChargeState = ArRobot::CHARGING_BULK; + */ + // if we're in the not charging state or if the charger is on but + // we start charging toss it in overcharge + if ((myChargeState == ArRobot::CHARGING_NOT || + myChargeState == ArRobot::CHARGING_BULK) + && (myStatusFlags & STATUS_CHARGING)) + myChargeState = ArRobot::CHARGING_OVERCHARGE; + + // if we're in overcharge but we aren't charging anymore then bump + // us up to float (don't worry about if we're not on the charger, + // since that's handled above) + if (myChargeState == ArRobot::CHARGING_OVERCHARGE && + ! (myStatusFlags & STATUS_CHARGING)) + myChargeState = ArRobot::CHARGING_FLOAT; + + } + + if (myBoardNum == 1) { + myRobot->setBatteryInfo(myPackVoltage, myPackVoltage / 2.0, + true, myChargeEstimate); + myRobot->setChargeState(myChargeState); + myRobot->setIsChargerPowerGood((myStatusFlags & STATUS_CHARGER_ON)); + } + + /* MPL This isn't working correctly right now since there's an issue + * with firmware (or hardware). + + if (myStatusFlags & STATUS_ON_BUTTON_PRESSED) + { + ArLog::log(ArLog::Normal, + "BatteryMTX(%d) enabling motors because on button pressed", + myBoardNum); + myRobot->enableMotors(); + } + */ + + // process the status info + if ((myStatusFlags & STATUS_BATTERY_POWERING_OFF) && + !(myLastStatusFlags & STATUS_BATTERY_POWERING_OFF)) + { + myBatteryPoweringOffCBList.invoke(); + } + + if (!(myStatusFlags & STATUS_BATTERY_POWERING_OFF) && + (myLastStatusFlags & STATUS_BATTERY_POWERING_OFF)) + { + myBatteryPoweringOffCancelledCBList.invoke(); + } + + myLastStatusFlags = myStatusFlags; + + // process the error info + interpErrors(); + +} + +void ArBatteryMTX::interpErrors(void) +{ + // reset the current error conditions + myErrorString = ""; + myErrorCount = 0; + + // if this is our first error flag check and we have no errors then + // just note we have no errors and clear that it's our first check + if (myFirstErrorFlagsCheck && myErrorFlags == 0) + { + ArLog::log(ArLog::Normal, "%s: Connected with no errors", getName()); + } + // if our errors have changed or it's our first one then log the errors + else if (myErrorFlags != myLastErrorFlags || myFirstErrorFlagsCheck) + { + checkAndSetCurrentErrors(ERROR_BATTERY_OVERVOLTAGE, "Battery_Overvoltage"); + checkAndSetCurrentErrors(ERROR_BATTERY_UNDERVOLTAGE, "Battery_Undervoltage"); + checkAndSetCurrentErrors(ERROR_OVERCURRENT, "Overcurrent"); + checkAndSetCurrentErrors(ERROR_BLOWNFUSE, "Blownfuse"); + checkAndSetCurrentErrors(ERROR_RTC_ERROR, "RTC_Error"); + checkAndSetCurrentErrors(ERROR_OVER_TEMPERATURE, "Over_Temperature"); + checkAndSetCurrentErrors(ERROR_MASTER_SWITCH_FAULT, "Master_Switch_Fault"); + checkAndSetCurrentErrors(ERROR_SRAM_ERROR, "SRAM_Error"); + checkAndSetCurrentErrors(ERROR_CHARGER_OUT_OF_VOLTAGE_RANGE, "Charger_Out_of_Voltage_Range"); + checkAndSetCurrentErrors(ERROR_CHARGER_CIRCUIT_FAULT, "Charger_Circuit_Fault"); + + if (myFirstErrorFlagsCheck) + ArLog::log(ArLog::Normal, "%s: Connected with error flag of 0x%04x, count of %d, and string of '%s'.", + getName(), + myErrorFlags, myErrorCount, myErrorString.c_str()); + else + ArLog::log(ArLog::Normal, "%s: Error flags changed to 0x%04x, count of %d, and string of '%s'. Last error flags 0x%04x, count of %d, and string of '%s'.", + getName(), + myErrorFlags, myErrorCount, myErrorString.c_str(), + myLastErrorFlags, myLastErrorCount, myLastErrorString.c_str()); + + if ((myErrorFlags & ERROR_RTC_ERROR)) + { + if (!myHaveSetRTC) + { + ArLog::log(ArLog::Normal, "%s: Setting RTC since it hasn't been set this run and there's an error with it", getName()); + sendSetRealTimeClock(time(NULL)); + myHaveSetRTC = true; + } + else + { + ArLog::log(ArLog::Normal, "%s: Not setting RTC since it's already been set once this run", getName()); + } + } + } + + myFirstErrorFlagsCheck = false; + myLastErrorFlags = myErrorFlags; + myLastErrorCount = myErrorCount; + myLastErrorString = myErrorString; +} + +void ArBatteryMTX::checkAndSetCurrentErrors(ErrorFlags errorFlag, + const char *errorString) +{ + // if there was no error return + if (!(myErrorFlags & errorFlag)) + return; + + // if it's not the first toss a separator + if (!myErrorString.empty()) + myErrorString += " "; + + // then toss in the string + myErrorString += errorString; + + // then increment the count + myErrorCount++; +} + +AREXPORT bool ArBatteryMTX::blockingConnect (bool sendTracking, bool recvTracking) +{ + mySendTracking = sendTracking; + myRecvTracking = recvTracking; + + myAsyncConnectState = -1; + + myDeviceMutex.lock(); + if (myConn == NULL) { + ArLog::log (ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getName()); + myDeviceMutex.unlock(); + failedToConnect(); + return false; + } + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (myConn); + if (serConn != NULL) + serConn->setBaud (115200); + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log ( + ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getName()); + myDeviceMutex.unlock(); + failedToConnect(); + return false; + } + // PS - set logging level and battery type in packet receiver class + //myReceiver->setSync1(HEADER1); + //m/yReceiver.setSync2(HEADER2); + + myReceiver = new ArRobotPacketReceiver(myConn, true, HEADER1, HEADER2, + myRecvTracking, + "ArBatteryMTX"); + + mySender = new ArRobotPacketSender(myConn, HEADER1, HEADER2, + mySendTracking, + "ArBatteryMTX"); + + //myReceiver->setInfoLogLevel (myInfoLogLevel); + //myReceiver->setMyName (getName()); + //myReceiver->setDeviceConnection (myConn); + // PS 6/5/12 - not sure why these 2 are here - commenting them out + //myDeviceMutex.unlock(); + //myDeviceMutex.lock(); + myTryingToConnect = true; + myDeviceMutex.unlock(); + ArTime timeDone; + if (!timeDone.addMSec (30 * 1000)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() error adding msecs (30 * 1000)", + getName()); + } + // first stop all sending by sending a stop basic, stop info and stop cell + if (!sendBasicInfo (STOP_SENDING)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send Basic Info Request to Battery", getName()); + failedToConnect(); + return false; + } + if (!sendSystemInfo (STOP_SENDING)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send System Info Request to Battery", getName()); + failedToConnect(); + return false; + } + if (!sendCellInfo (STOP_SENDING)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send Cell Info Request to Battery", getName()); + failedToConnect(); + return false; + } +//#if 0 + // second step is to send system and cell info requests and get responses + + if (!getSystemInfo()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not get System Info from Battery", getName()); + failedToConnect(); + return false; + } + + logBatteryInfo(ArLog::Verbose); + + // second step is send cell info requests and get response + if (!getCellInfo()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not get Cell Info from Battery", getName()); + failedToConnect(); + return false; + } + + logCellInfo(ArLog::Verbose); + + +//#endif + // third step is get one basic info packet so we can log the results + if (!getBasicInfo()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not get Basic Info from Battery", getName()); + failedToConnect(); + return false; + } + + // set async connect to connected + myAsyncConnectState = 3; + + if (myBoardNum == 1) { + myRobot->setIgnoreMicroControllerBatteryInfo (true); + myRobot->setBatteryInfo ( + myPackVoltage, + myPackVoltage / 2.0, + true, + myChargeEstimate); + } + ArLog::log (ArLog::Normal, + "%s Basic Info - Charge Estimate is %g",getName(), myChargeEstimate); + ArLog::log (ArLog::Normal, + "%s Basic Info - Current Draw is %g",getName(), myCurrentDraw); + ArLog::log (ArLog::Normal, + "%s Basic Info - Pack Voltage is %g",getName(), myPackVoltage); + ArLog::log (ArLog::Normal, + "%s Basic Info - Status Flags 0x%02x",getName(), myStatusFlags); + ArLog::log (ArLog::Normal, + "%s Basic Info - Error Flags 0x%02x",getName(), myErrorFlags); + // and finally send the basic request and start the continuous sending + if (!sendBasicInfo (SEND_CONTINUOUS)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send Basic Info Request to Battery", getName()); + failedToConnect(); + return false; + } + myIsConnected = true; + myTryingToConnect = false; + ArLog::log (ArLog::Normal, "%s: Connection successful", + getName()); + + myLastReading.setToNow(); + + runAsync(); + return true; +} // end blockingConnect + +AREXPORT const char * ArBatteryMTX::getName (void) const +{ + return myName.c_str(); +} + +AREXPORT void * ArBatteryMTX::runThread (void *arg) +{ + //ArBatteryMTXPacket *packet; + ArRobotPacket *packet; + +while (getRunning() ) +{ + + while (getRunning() && myIsConnected && + (packet = myReceiver->receivePacket (500)) != NULL) { + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && checkLostConnection() ) { + ArLog::log (ArLog::Terse, + "%s::runThread() Lost connection to the MTX battery because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + disconnectOnError(); + continue; + } + +} + // if we have a robot but it isn't running yet then don't have a + // connection failure + /* MPL PS TODO This should lose connection if we + haven't heard from it in long enough... but this is + loosing connection anytime we lose one packet + (which'll always happen sometimes on serial). + if (getRunning() && myIsConnected) { + //ArLog::log (ArLog::Normal, + // "%s::runThread() Lost connection to the battery because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + // myLastReading.mSecSince() / 1000.0, + // getConnectionTimeoutSeconds() ); + ArLog::log (ArLog::Normal, + "%s::runThread() Lost connection to the battery because of error %d %d", getName(), getRunning(), myIsConnected); + myIsConnected = false; + //laserDisconnectOnError(); + continue; + } + */ + //ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(500); + + return NULL; +} + +/** + This will check if the battery has lost connection. If there is no + robot it is a straightforward check of last reading time against + getConnectionTimeoutSeconds. If there is a robot then it will not + start the check until the battery is running and connected. +**/ +AREXPORT bool ArBatteryMTX::checkLostConnection(void) +{ + + if ((myRobot == NULL || myRobotRunningAndConnected) && + getConnectionTimeoutSeconds() > 0 && + myLastReading.mSecSince() > getConnectionTimeoutSeconds() * 1000) + return true; + + if (!myRobotRunningAndConnected && myRobot != NULL && + myRobot->isRunning() && myRobot->isConnected()) + { + myRobotRunningAndConnected = true; + myLastReading.setToNow(); + } + + return false; +} + +AREXPORT void ArBatteryMTX::disconnectOnError(void) +{ + ArLog::log(ArLog::Normal, "%s: Disconnected because of error", getName()); + myDisconnectOnErrorCBList.invoke(); +} + +AREXPORT bool ArBatteryMTX::sendSystemInfo (unsigned char dataValue) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + + sendPacket.setID (SYSTEM_INFO); + sendPacket.uByteToBuf (dataValue); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSystemInfo() Could not send system info request to Battery (%d)", + getName(), dataValue); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sentSystemInfo() System Info request sent to Battery (%d)", + getName(), dataValue); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendCellInfo (unsigned char dataValue) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (CELL_INFO); + sendPacket.uByteToBuf (dataValue); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendCellInfo() Could not send cell info request to Battery (%d)", + getName(), dataValue); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendCellInfo() Cell Info request sent to Battery (%d)", + getName(), dataValue); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendBasicInfo (unsigned char dataValue) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (BASIC_INFO); + sendPacket.uByteToBuf (dataValue); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendBasicInfo() Could not send basic info request to Battery (%d)", + getName(), dataValue); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendBasicInfo() Basic Info request sent to Battery (%d)", + getName(), dataValue); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendPowerOff() +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (POWER_OFF_REQUEST); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendPowerOff() Could not send poweroff request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendPowerOff() Power Off request sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendPowerOffCancel() +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (POWER_OFF_CANCEL); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendPowerOffCancel() Could not send power off cancel request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendPowerOffCancel() Power Off Cancel request sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendStopCharging() +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (STOP_CHARGING); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendStopCharging() Could not send stop charging request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendStopCharging() Stop Charging request sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendStartCharging() +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (START_CHARGING); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendStartCharging() Could not send start charging request to Battery", getName()); + return false; + } + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendStartCharging() Start Charging request sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendSetPowerOffDelay (unsigned int msDelay) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (SET_POWER_OFF_DELAY); + sendPacket.uByte4ToBuf (msDelay); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetPowerOffDelay() Could not send power off delay request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendSetPowerOffDelay() Set Power Off Delay sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendSetRealTimeClock (unsigned int secSinceEpoch) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (SET_REAL_TIME_CLOCK); + sendPacket.uByte4ToBuf (secSinceEpoch); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetRealTimeClock() Could not send set real time clock request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendSetRealTimeClock() Set Real Time Clock sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendResetCellData() +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (RESET_CELL_DATA); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendResetCellData() Could not send reset cell data request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendResetCellData() Reset Cell Data sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendSetReserveValue (unsigned short hundredthOfPercent) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (SET_RESERVE_VALUE); + sendPacket.uByte4ToBuf (hundredthOfPercent); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetReserveValue() Could not send set reserve value request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendSetReserveValue() Set Reserve Value sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendSetBalanceValue (unsigned short hundredthOfPercent) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (SET_BALANCE_VALUE); + sendPacket.uByte4ToBuf (hundredthOfPercent); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetBalanceValue() Could not send set balance value request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendSetBalanceValue() Set Balance Value sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::sendEmergencyPowerOff() +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + //sendPacket.uByteToBuf (EMERGENCY_OFF); + sendPacket.setID (EMERGENCY_OFF); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendEmergencyPowerOff() Could not send emergency off request to Battery", getName()); + return false; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::sendEmergencyPowerOff() Emergency Off sent to Battery", getName()); + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArBatteryMTX::getSystemInfo() +{ + //ArBatteryMTXPacket *packet; + ArRobotPacket *packet; + + bool gotPacket = false; + unsigned char *buf; + for (int i = 0; i < 5; i++) { + if (!sendSystemInfo (SEND_ONCE)) { + ArLog::log (ArLog::Normal, + "%s::getSystemInfo() Could not send system info to battery", + getName()); + return false; + } + myAsyncConnectState = 0; + + packet = myReceiver->receivePacket (1000); + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getSystemInfo() No response to get system info - resending", getName()); + continue; + } + buf = (unsigned char *) packet->getBuf(); + // verify + //if ( (buf[0] != SYSTEM_INFO) || (packet->getLength() != SYSTEM_INFO_SIZE)) { + if ( (packet->getID() != SYSTEM_INFO) || (packet->getLength() != SYSTEM_INFO_SIZE)) { + ArLog::log (ArLog::Normal, + "%s::getSystemInfo() Invalid response from battery to get system info (0x%x 0x%x)", + getName(), packet->getID(), packet->getLength()); + delete packet; + continue; + } else { + updateSystemInfo (&buf[3]); + delete packet; + gotPacket = true; + break; + } + } // endfor + if (!gotPacket) { + ArLog::log (ArLog::Normal, + "%s::getSystemInfo() Cannot get system info from battery", + getName()); + return false; + } + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::getSystemInfo() - successful", getName())); + return true; +} + +AREXPORT bool ArBatteryMTX::getBasicInfo() +{ + //ArBatteryMTXPacket *packet; + ArRobotPacket *packet; + + bool gotPacket = false; + unsigned char *buf; + for (int i = 0; i < 5; i++) { + if (!sendBasicInfo (SEND_ONCE)) { + ArLog::log (ArLog::Normal, + "%s::getBasicInfo() Could not send basic info to battery", + getName()); + return false; + } + + myAsyncConnectState = 2; + + packet = myReceiver->receivePacket (1000); + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getBasicInfo() No response to get basic info - resending", getName()); + continue; + } + buf = (unsigned char *) packet->getBuf(); + // verify + if ( (packet->getID() != BASIC_INFO) || (packet->getLength() != BASIC_INFO_SIZE)) { + ArLog::log (ArLog::Normal, + "%s::getBasicInfo() Invalid response from battery to get basic info (0x%x 0x%x)", + getName(), packet->getID(), packet->getLength()); + delete packet; + continue; + } else { + char obuf[1024]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength() - 2; i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } +IFDEBUG( + ArLog::log (ArLog::Normal, + "%s::getBasicInfo() packet = %s",getName(), obuf); +) + updateBasicInfo (&buf[3]); + delete packet; + gotPacket = true; + break; + } + } // endfor + if (!gotPacket) { + ArLog::log (ArLog::Normal, + "%s::getBasicInfo() Cannot get basic info from battery", + getName()); + return false; + } + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::getBasicInfo() - successful", getName())); + return true; +} + +AREXPORT bool ArBatteryMTX::getCellInfo() +{ + unsigned char *buf; + //ArBatteryMTXPacket *packet; + ArRobotPacket *packet; + bool gotPacket = false; + for (int i = 0; i < 5; i++) { + if (!sendCellInfo (SEND_ONCE)) { + ArLog::log (ArLog::Normal, + "%s::getCellInfo() Could not send cell info to battery", + getName()); + return false; + } + myAsyncConnectState = 1; + + packet = myReceiver->receivePacket (1000); + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getCellInfo() No response to get cell info - resending", getName()); + continue; + } + + myCellPacket.duplicatePacket(packet); + + buf = (unsigned char *) packet->getBuf(); + // verify + if ( (packet->getID() != CELL_INFO) || (packet->getLength() != CELL_INFO_SIZE)) { + ArLog::log (ArLog::Normal, + "%s::getCellInfo() Invalid response from battery to get cell info (0x%x 0x%x)", + getName(), packet->getID(), packet->getLength()); + delete packet; + continue; + } else { + updateCellInfo (&buf[3]); + delete packet; + gotPacket = true; + break; + } + } // endfor + if (!gotPacket) { + ArLog::log (ArLog::Normal, + "%s::getCellInfo() Cannot get cell info from battery", + getName()); + return false; + } + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::getCellInfo() - successful", getName())); + return true; +} + +AREXPORT void ArBatteryMTX::updateSystemInfo (unsigned char *buf) +{ + myId = buf[1]; + myFirmwareVersion = buf[2]; + mySerialNumber = buf[6] << 24 | buf[5] << 16 | buf[4] << 8 | buf[3]; + myCurrentTime = buf[14] << 56 | buf[13] << 48 | buf[12] << 40 | buf[11] << 32 | buf[10] << 24 | buf[9] << 16 | buf[8] << 8 | buf[7]; + myLastChargeTime = buf[22] << 56 | buf[21] << 48 | buf[20] << 40 | buf[19] << 32 | buf[18] << 24 | buf[17] << 16 | buf[16] << 8 | buf[15]; + myChargeRemainingEstimate = buf[26] << 24 | buf[25] << 16 | buf[24] << 8 | buf[23]; + myCapacityEstimate = buf[30] << 24 | buf[29] << 16 | buf[28] << 8 | buf[27]; + myRawDelay = buf[34] << 24 | buf[33] << 16 | buf[32] << 8 | buf[31]; + myDelay = myRawDelay / 1000.0; + myCycleCount = buf[36] << 8 | buf[35]; + myRawTemperature = buf[38] << 8 | buf[37]; + myTemperature = myRawTemperature / 100.0; + myRawPaddleVolts = buf[40] << 8 | buf[39]; + myPaddleVolts = myRawPaddleVolts / 1000.0; + myRawVoltage = buf[42] << 8 | buf[41]; + myVoltage = myRawVoltage / 1000.0; + myRawFuseVoltage = buf[44] << 8 | buf[43]; + myFuseVoltage = myRawFuseVoltage / 1000.0; + myRawChargeCurrent = buf[46] << 8 | buf[45]; + myChargeCurrent = myRawChargeCurrent / 1000.0; + myRawDisChargeCurrent = buf[48] << 8 | buf[47]; + myDisChargeCurrent = myRawDisChargeCurrent / 1000.0; + myRawCellImbalance = buf[50] << 8 | buf[49]; + myCellImbalance = myRawCellImbalance / 100.0; + myRawImbalanceQuality = buf[52] << 8 | buf[51]; + myImbalanceQuality = myRawImbalanceQuality / 100.0; + myRawReserveChargeValue = buf[54] << 8 | buf[53]; + myReserveChargeValue = myRawReserveChargeValue / 100.0; +} + +AREXPORT void ArBatteryMTX::updateCellInfo (unsigned char *buf) +{ + myNumCells = buf[1]; + int idx; + for (int i = 0; i < myNumCells; i++) { + // PS - note - need to hard code this as if we used the sizeof cellinfo, we'd + // get 12 as unsigned char flages is actually 2 bytes + idx = 11 * i; + CellInfo *info = new CellInfo(); + info->myCellFlags = buf[2 + idx]; + info->myRawCellVoltage = buf[4 + idx] << 8 | buf[3 + idx]; + info->myCellVoltage = info->myRawCellVoltage / 1000.0; + info->myCellCharge = buf[8 + idx] << 24 | buf[7 + idx] << 16 | buf[6 + idx] << 8 | buf[5 + idx]; + info->myCellCapacity = buf[12 + idx] << 24 | buf[11 + idx] << 16 | buf[10 + idx] << 8 | buf[9 + idx]; + myCellNumToInfoMap[i] = info; + } +} + +AREXPORT void ArBatteryMTX::updateBasicInfo (unsigned char *buf) +{ + myRawChargeEstimate = buf[2] << 8 | buf[1]; + myChargeEstimate = myRawChargeEstimate / 100.0; + myRawCurrentDraw = buf[4] << 8 | buf[3]; + myCurrentDraw = myRawCurrentDraw / 100.0; + myRawPackVoltage = buf[6] << 8 | buf[5]; + myPackVoltage = myRawPackVoltage / 1000.0; + myStatusFlags = buf[8] << 8 | buf[7]; + myErrorFlags = buf[10] << 8 | buf[9]; +} + + +AREXPORT void ArBatteryMTX::logBatteryInfo(ArLog::LogLevel level) +{ + ArLog::log (level, + "%s ID = %d", getName(), myId); + ArLog::log (level, + "%s Firmware Version = %d", getName(), myFirmwareVersion); + ArLog::log (level, + "%s Serial Number = %d", getName(), mySerialNumber); + ArLog::log (level, + "%s Current Time = %s", getName(), ctime((time_t *)&myCurrentTime)); + //"%s Current Time = %lld", getName(), myCurrentTime); + ArLog::log (level, + "%s Last Charge Time = %s", getName(), ctime((time_t *)&myLastChargeTime)); + //"%s Last Charge Time = %lld", getName(), myLastChargeTime); + ArLog::log (level, + "%s Charge Remaining Estimate = %u Coulombs", getName(), myChargeRemainingEstimate); + ArLog::log (level, + "%s Capacity Estimate = %u Coulombs", getName(), myCapacityEstimate); + ArLog::log (level, + "%s Delay = %g seconds", getName(), myDelay); + ArLog::log (level, + "%s Cycle Count = %d", getName(), myCycleCount); + ArLog::log (level, + "%s Temperature = %g Celsius", getName(), myTemperature); + ArLog::log (level, + "%s Paddle Volts = %g volts", getName(), myPaddleVolts); + ArLog::log (level, + "%s Voltage = %g volts", getName(), myVoltage); + ArLog::log (level, + "%s Fuse Voltage = %g volts", getName(), myFuseVoltage); + ArLog::log (level, + "%s Charge Current = %g amps", getName(), myChargeCurrent); + ArLog::log (level, + "%s DisCharge Current = %g amps", getName(), myDisChargeCurrent); + ArLog::log (level, + "%s Cell Imbalance = %g", getName(), myCellImbalance); + ArLog::log (level, + "%s Imbalance Quality = %g", getName(), myImbalanceQuality); + ArLog::log (level, + "%s Reserve Charge Value = %g", getName(), myReserveChargeValue); +} + +AREXPORT void ArBatteryMTX::logCellInfo(ArLog::LogLevel level) +{ + ArLog::log (level, + "%s Number of Cells = %d", getName(), myNumCells); + for (std::map::iterator iter = + myCellNumToInfoMap.begin(); + iter != myCellNumToInfoMap.end(); + iter++) { + CellInfo *info = iter->second; + ArLog::log (level, + "%s Cell(%d) Flag = 0x%02x", getName(), iter->first, info->myCellFlags); + ArLog::log (level, + "%s Cell(%d) Voltage = %g volts", getName(), iter->first, info->myCellVoltage); + ArLog::log (level, + "%s Cell(%d) Charge = %u Coulombs", getName(), iter->first, info->myCellCharge); + ArLog::log (level, + "%s Cell(%d) Capacity = %u Coulombs", getName(), iter->first, info->myCellCapacity); + } +} + diff --git a/Legacy/Aria/src/ArBumpers.cpp b/Legacy/Aria/src/ArBumpers.cpp new file mode 100644 index 0000000..945f054 --- /dev/null +++ b/Legacy/Aria/src/ArBumpers.cpp @@ -0,0 +1,161 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobot.h" +#include "ArBumpers.h" + +/** + @param currentBufferSize The number of readings to store in the current Buffer + @param cumulativeBufferSize The number of readings in the cumulative buffer (This currently is not being used) + @param name The name of this range device + @param maxSecondsToKeepCurrent How long to keep readings in the current buffer + @param angleRange the range in front and behind the robot which is divided by the number of bumpers and used to detrmine where the sensor readings will be placed. +*/ + +AREXPORT ArBumpers::ArBumpers(size_t currentBufferSize, size_t cumulativeBufferSize, + const char *name, int maxSecondsToKeepCurrent, double angleRange) : + ArRangeDevice(currentBufferSize, cumulativeBufferSize, name, 5000, maxSecondsToKeepCurrent), + myProcessCB(this, &ArBumpers::processReadings) +{ + // MPL I wrote this code, but checking for BIT8 makes no sense, BIT0 is the stall, BIT8 would be beyond this data + myBumpMask = (ArUtil::BIT1 | ArUtil::BIT2 | ArUtil::BIT3 | ArUtil::BIT4 | + ArUtil::BIT5 | ArUtil::BIT6 | ArUtil::BIT7 | ArUtil::BIT8); + + myAngleRange = angleRange; + + setCurrentDrawingData(new ArDrawingData("polyDots", ArColor(0, 0, 0), + 120, // mm diameter of dots + 83), // layer above most everything else + true); +} + +AREXPORT ArBumpers::~ArBumpers() +{ + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&myProcessCB); + myRobot->remRangeDevice(this); + } +} + +AREXPORT void ArBumpers::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask(myName.c_str(), 10, &myProcessCB); + ArRangeDevice::setRobot(robot); +} + +/** + This function is called every 100 milliseconds. +*/ +AREXPORT void ArBumpers::processReadings(void) +{ + int frontBump; + int rearBump; + int whichBumper; + + if (myRobot->hasFrontBumpers()) + frontBump = ((myRobot->getStallValue() & 0xff00) >> 8) & myBumpMask; + else + { + frontBump = 0; + } + if (myRobot->hasRearBumpers()) + rearBump = (myRobot->getStallValue() & 0xff) & myBumpMask; + else + { + rearBump = 0; + } + + if(frontBump!= 0) + { + whichBumper = 1; + addBumpToBuffer(frontBump, whichBumper); + } + + if(rearBump != 0) + { + whichBumper = 2; + addBumpToBuffer(rearBump, whichBumper); + } + +} + +/** + @param bumpValue This is the value that tells which individual bumper has been triggered + @param whichBumper This value tells if the front or rear has been triggered +*/ +AREXPORT void ArBumpers::addBumpToBuffer(int bumpValue, int whichBumper) +{ + int numBumpers; + double x; + double y; + double degree; + double radius; + + const ArRobotParams *params; + params = myRobot->getRobotParams(); + + radius = params->getRobotRadius(); + + if(whichBumper == 1) numBumpers = myRobot->getNumFrontBumpers(); + else numBumpers = myRobot->getNumRearBumpers(); + + for (int i = 0; i < numBumpers; i++) + { + // MPL I wrote this code, but checking for BIT8 makes no sense, BIT0 is the stall, BIT8 would be beyond this data + if((i == 0 && (bumpValue & ArUtil::BIT1)) || + (i == 1 && (bumpValue & ArUtil::BIT2)) || + (i == 2 && (bumpValue & ArUtil::BIT3)) || + (i == 3 && (bumpValue & ArUtil::BIT4)) || + (i == 4 && (bumpValue & ArUtil::BIT5)) || + (i == 5 && (bumpValue & ArUtil::BIT6)) || + (i == 6 && (bumpValue & ArUtil::BIT7)) || + (i == 7 && (bumpValue & ArUtil::BIT8))) + { + degree = -1 * (i * (myAngleRange / (double)numBumpers) + + ((myAngleRange / (double)numBumpers) / 2) - (myAngleRange / 2)); + + if(whichBumper == 2) degree = degree + 180; + + x = radius * ArMath::cos(degree); + y = radius * ArMath::sin(degree); + + ArPose pose; + pose.setX(x); + pose.setY(y); + + ArTransform global = myRobot->getToGlobalTransform(); + pose = global.doTransform(pose); + + ArLog::log(ArLog::Verbose, "Bumpers: recording %s bumper hit (bumpflags=%d)", (whichBumper==1?"front":"rear"), bumpValue); + + myCurrentBuffer.addReading(pose.getX(), pose.getY()); + } + } +} diff --git a/Legacy/Aria/src/ArCameraCollection.cpp b/Legacy/Aria/src/ArCameraCollection.cpp new file mode 100644 index 0000000..303005d --- /dev/null +++ b/Legacy/Aria/src/ArCameraCollection.cpp @@ -0,0 +1,668 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#include "ArExport.h" +#include "ariaUtil.h" + +#include "ArCameraCollection.h" + +AREXPORT ArCameraCollection::ArCameraCollection() : + myMutex(), + myCameraToInfoMap() +{ + myMutex.setLogName("ArCameraCollection::myMutex"); +} // end ctor + +AREXPORT ArCameraCollection::~ArCameraCollection() +{ + ArUtil::deleteSetPairs(myCameraToInfoMap.begin(), + myCameraToInfoMap.end()); + myCameraToInfoMap.clear(); + +} // end dtor + +AREXPORT bool ArCameraCollection::addCamera(const char *cameraName, + const char *cameraType, + const char *displayName, + const char *displayType) +{ + if (cameraName == NULL) { + return false; + } + + lock(); + CameraInfo *info = findCameraInfo(cameraName); + if (info != NULL) { + unlock(); + return false; + } + + info = new CameraInfo(); + + info->myCameraName = cameraName; + info->myCameraType = cameraType; + info->myDisplayName = ((displayName != NULL) ? displayName : cameraName); + info->myDisplayType = ((displayType != NULL) ? displayType : cameraType); + + myCameraToInfoMap[cameraName] = info; + + unlock(); + return true; + +} // end method addCamera + + +AREXPORT bool ArCameraCollection::removeCamera(const char *cameraName) +{ + if (cameraName == NULL) { + return false; + } + lock(); + + std::map::iterator iter = + myCameraToInfoMap.find(cameraName); + if (iter == myCameraToInfoMap.end()) { + unlock(); + return false; + } + + delete iter->second; + iter->second = NULL; + + myCameraToInfoMap.erase(iter); + + setModified(); + + unlock(); + + return true; + +} // end method removeCamera + + +AREXPORT bool ArCameraCollection::addCameraCommand(const char *cameraName, + const char *command, + const char *cameraCommandName, + int requestInterval) +{ + if (command == NULL) { + return false; + } + lock(); + + CameraInfo *cameraInfo = findCameraInfo(cameraName); + if (cameraInfo == NULL) { + unlock(); + return false; + } + + CommandInfo *info = findCommandInfo(cameraName, command); + if (info != NULL) { + unlock(); + return false; + } + + info = new CommandInfo(); + info->myCommand = command; + info->myCameraCommandName = cameraCommandName; + info->myRequestInterval = requestInterval; + + + cameraInfo->myCommandToInfoMap[command] = info; + + setModified(); + unlock(); + + return true; + +} // end method addCameraCommand + + +AREXPORT bool ArCameraCollection::removeCameraCommand(const char *cameraName, + const char *command) +{ + lock(); + + CameraInfo *info = findCameraInfo(cameraName); + if (info == NULL) { + unlock(); + return false; + } + + std::map::iterator iter = + info->myCommandToInfoMap.find(command); + + if (iter == info->myCommandToInfoMap.end()) { + unlock(); + return false; + } + + delete iter->second; + iter->second = NULL; + + info->myCommandToInfoMap.erase(iter); + + setModified(); + unlock(); + + return true; + +} // end method removeCameraCommand + + +AREXPORT bool ArCameraCollection::addParameter(const char *cameraName, + ArCameraParameterSource *source, + const ArConfigArg ¶m) +{ + lock(); + CameraInfo *camInfo = findCameraInfo(cameraName); + if ((camInfo == NULL) || (param.getName() == NULL)) { + unlock(); + return false; + } + + ParamInfo *info = findParamInfo(cameraName, param.getName()); + if (info != NULL) { + unlock(); + return false; + } + + info = new ParamInfo(); + info->mySource = source; + info->myParam = param; + + camInfo->myParamToInfoMap[param.getName()] = info; + + unlock(); + return true; + +} // end method addParameter + + +AREXPORT bool ArCameraCollection::removeParameter(const char *cameraName, + const char *paramName) +{ + lock(); + CameraInfo *camInfo = findCameraInfo(cameraName); + if ((camInfo == NULL) || (paramName == NULL)) { + unlock(); + return false; + } + + std::map::iterator iter = + camInfo->myParamToInfoMap.find(paramName); + + if (iter == camInfo->myParamToInfoMap.end()) { + unlock(); + return false; + } + + camInfo->myParamToInfoMap.erase(iter); + + unlock(); + return true; + +} // end method removeParameter + + +AREXPORT void ArCameraCollection::getCameraNames(std::list &outList) +{ + lock(); + outList.clear(); + + for (std::map::iterator iter = myCameraToInfoMap.begin(); + iter != myCameraToInfoMap.end(); + iter++) { + outList.push_back(iter->first); + + } // end for each map entry + + unlock(); + +} // end method getCameraNames + + +AREXPORT const char *ArCameraCollection::getCameraType(const char *cameraName) +{ + const char *type = NULL; + + lock(); + + CameraInfo *info = findCameraInfo(cameraName); + if (info != NULL) { + type = info->myCameraType.c_str(); + } + unlock(); + + return type; + +} // end method getCameraType + + +AREXPORT const char *ArCameraCollection::getDisplayName(const char *cameraName) +{ + const char *displayName = NULL; + + lock(); + + CameraInfo *info = findCameraInfo(cameraName); + if (info != NULL) { + displayName = info->myDisplayName.c_str(); + } + unlock(); + + return displayName; + +} // end method getDisplayName + + +AREXPORT const char *ArCameraCollection::getDisplayType(const char *cameraName) +{ + const char *displayType = NULL; + + lock(); + + CameraInfo *info = findCameraInfo(cameraName); + if (info != NULL) { + displayType = info->myDisplayType.c_str(); + } + unlock(); + + return displayType; + +} // end method getDisplayType + + +AREXPORT void ArCameraCollection::getCameraCommands(const char *cameraName, + std::list &outList) +{ + lock(); + outList.clear(); + + CameraInfo *info = findCameraInfo(cameraName); + if (info != NULL) { + for (std::map::iterator iter = info->myCommandToInfoMap.begin(); + iter != info->myCommandToInfoMap.end(); + iter++) { + outList.push_back(iter->first); + + } // end for each map entry + } // end if info found + + unlock(); + +} // end method getCameraCommands + + +AREXPORT const char *ArCameraCollection::getCommandName(const char *cameraName, + const char *command) +{ + const char *cameraCommandName = NULL; + + lock(); + + CommandInfo *info = findCommandInfo(cameraName, command); + if (info != NULL) { + cameraCommandName = info->myCameraCommandName.c_str(); + } // end if info found + + unlock(); + + return cameraCommandName; + +} // end method getCommandName + + +AREXPORT int ArCameraCollection::getRequestInterval(const char *cameraName, + const char *command) +{ + int interval = -1; + + lock(); + + CommandInfo *info = findCommandInfo(cameraName, command); + if (info != NULL) { + interval = info->myRequestInterval; + } // end if info found + + unlock(); + + return interval; + +} // end method getRequestInterval + + +AREXPORT void ArCameraCollection::getParameterNames + (const char *cameraName, + std::list &outList) +{ + lock(); + outList.clear(); + + CameraInfo *info = findCameraInfo(cameraName); + if (info != NULL) { + for (std::map::iterator iter = info->myParamToInfoMap.begin(); + iter != info->myParamToInfoMap.end(); + iter++) { + outList.push_back(iter->first); + + } // end for each map entry + } // end if info found + + unlock(); + +} // end method getParameterNames + +AREXPORT bool ArCameraCollection::getParameter(const char *cameraName, + const char *parameterName, + ArConfigArg ¶mOut) +{ + lock(); + + ParamInfo *info = findParamInfo(cameraName, parameterName); + if (info == NULL) { + unlock(); + return false; + } + paramOut = info->myParam; + unlock(); + + return true; + +} // end method getParameter + + + +AREXPORT bool ArCameraCollection::setParameter(const char *cameraName, + const ArConfigArg ¶m) +{ + lock(); + + ParamInfo *info = findParamInfo(cameraName, param.getName()); + if (info == NULL) { + unlock(); + return false; + } + info->myParam = param; + + if (info->mySource != NULL) { + info->mySource->setParameter(param); + } + + unlock(); + return true; + +} // end method changeParameter + + +AREXPORT bool ArCameraCollection::exists(const char *cameraName) +{ + lock(); + + CameraInfo *info = findCameraInfo(cameraName); + + unlock(); + + return (info != NULL); + +} // end method exists + + +AREXPORT bool ArCameraCollection::exists(const char *cameraName, + const char *command) +{ + if ((cameraName == NULL) || (command == NULL)) { + return false; + } + + lock(); + + CommandInfo *info = findCommandInfo(cameraName, command); + + unlock(); + + return (info != NULL); + +} // end method exists + + +AREXPORT bool ArCameraCollection::parameterExists(const char *cameraName, + const char *paramName) +{ + if ((cameraName == NULL) || (paramName == NULL)) { + return false; + } + lock(); + + ParamInfo *info = findParamInfo(cameraName, paramName); + + unlock(); + + return (info != NULL); + +} + + +AREXPORT void ArCameraCollection::startUpdate() +{ + lock(); + myIsUpdatesEnabled = false; + unlock(); + +} // end method startUpdate + + +AREXPORT void ArCameraCollection::endUpdate() +{ + lock(); + myIsUpdatesEnabled = true; + // Now that updates have been re-enabled, check whether the collection was + // modified and notify any listeners. + notifyModifiedListeners(); + unlock(); + +} // end method endUpdate + + +AREXPORT bool ArCameraCollection::addModifiedCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (functor == NULL) { + return false; + } + + bool isSuccess = true; + lock(); + + switch (position) { + case ArListPos::FIRST: + myModifiedCBList.push_front(functor); + break; + + case ArListPos::LAST: + myModifiedCBList.push_back(functor); + break; + + default: + isSuccess = false; + ArLog::log(ArLog::Terse, + "ArCameraCollection::addModifiedCB: Unrecognized position = %i.", + position); + break; + } + + unlock(); + + return isSuccess; + +} // end method addModifiedCB + + +AREXPORT bool ArCameraCollection::removeModifiedCB(ArFunctor *functor) +{ + if (functor == NULL) { + return false; + } + + lock(); + // Could/should add a check to make sure functor is really there in order + // to return a more accurate status... (But this probably isn't really + // an issue since functors aren't removed all that often.) + myModifiedCBList.remove(functor); + unlock(); + + return true; + +} // end method removeModifiedCB + + +ArCameraCollection::CameraInfo *ArCameraCollection::findCameraInfo(const char *cameraName) +{ + if (cameraName == NULL) { + return NULL; + } + + CameraInfo *info = NULL; + + std::map::iterator iter = + myCameraToInfoMap.find(cameraName); + + if (iter != myCameraToInfoMap.end()) { + info = iter->second; + } + + return info; + +} // end method findCameraInfo + + +ArCameraCollection::CommandInfo *ArCameraCollection::findCommandInfo + (const char *cameraName, + const char *commandName) +{ + CameraInfo *cameraInfo = findCameraInfo(cameraName); + if (cameraInfo == NULL) { + return false; + } + + CommandInfo *info = NULL; + + std::map::iterator iter = + cameraInfo->myCommandToInfoMap.find(commandName); + + if (iter != cameraInfo->myCommandToInfoMap.end()) { + info = iter->second; + } + + return info; + +} // end method findCommandInfo + +ArCameraCollection::ParamInfo *ArCameraCollection::findParamInfo + (const char *cameraName, + const char *paramName) +{ + CameraInfo *cameraInfo = findCameraInfo(cameraName); + if (cameraInfo == NULL) { + return false; + } + + ParamInfo *info = NULL; + + std::map::iterator iter = + cameraInfo->myParamToInfoMap.find(paramName); + + if (iter != cameraInfo->myParamToInfoMap.end()) { + info = iter->second; + } + + return info; + +} // end method findParamInfo + + + +void ArCameraCollection::setModified() +{ + myIsModified = true; + notifyModifiedListeners(); +} + + +void ArCameraCollection::notifyModifiedListeners() +{ + if (!myIsUpdatesEnabled || !myIsModified) { + return; + } + + + myIsModified = false; + +} // end method notifyModifiedListeners + + +ArCameraCollection::CameraInfo::CameraInfo() : + myCameraName(), + myCameraType(), + myDisplayName(), + myDisplayType(), + myCommandToInfoMap(), + myParamToInfoMap() +{ +} + +ArCameraCollection::CameraInfo::~CameraInfo() +{ + ArUtil::deleteSetPairs(myCommandToInfoMap.begin(), + myCommandToInfoMap.end()); + myCommandToInfoMap.clear(); +} + + +ArCameraCollection::CommandInfo::CommandInfo() : + myCommand(), + myCameraCommandName(), + myRequestInterval(-1) +{ +} + +ArCameraCollection::CommandInfo::~CommandInfo() +{ +} + + +ArCameraCollection::ParamInfo::ParamInfo() : + mySource(NULL), + myParam() +{ +} + +ArCameraCollection::ParamInfo::~ParamInfo() +{ +} + + diff --git a/Legacy/Aria/src/ArCameraCommands.cpp b/Legacy/Aria/src/ArCameraCommands.cpp new file mode 100644 index 0000000..b78f048 --- /dev/null +++ b/Legacy/Aria/src/ArCameraCommands.cpp @@ -0,0 +1,60 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaUtil.h" +#include "ArCameraCommands.h" + + +AREXPORT const char *ArCameraCommands::GET_CAMERA_DATA = "getCameraData"; +AREXPORT const char *ArCameraCommands::GET_CAMERA_INFO = "getCameraInfo"; + +AREXPORT const char *ArCameraCommands::GET_PICTURE = "getPicture"; +AREXPORT const char *ArCameraCommands::GET_PICTURE_OPTIM = "getPictureOptim"; +AREXPORT const char *ArCameraCommands::GET_SNAPSHOT = "getSnapshot"; + +AREXPORT const char *ArCameraCommands::GET_DISPLAY = "getDisplay"; + + +AREXPORT const char *ArCameraCommands::SET_CAMERA_ABS = "setCameraAbs"; +AREXPORT const char *ArCameraCommands::SET_CAMERA_REL = "setCameraRel"; +AREXPORT const char *ArCameraCommands::SET_CAMERA_PCT = "setCameraPct"; + +AREXPORT const char *ArCameraCommands::GET_CAMERA_MODE_LIST = "getCameraModeList"; +AREXPORT const char *ArCameraCommands::CAMERA_MODE_UPDATED = "cameraModeUpdated"; +AREXPORT const char *ArCameraCommands::SET_CAMERA_MODE = "setCameraMode"; + +AREXPORT const char *ArCameraCommands::RESET_CAMERA = "resetCamera"; +// TODO Make these the original packet names? Move to ArNetworking? + +AREXPORT const char *ArCameraCommands::GET_CAMERA_DATA_INT = "getCameraDataInt"; +AREXPORT const char *ArCameraCommands::GET_CAMERA_INFO_INT = "getCameraInfoInt"; +AREXPORT const char *ArCameraCommands::SET_CAMERA_ABS_INT = "setCameraAbsInt"; +AREXPORT const char *ArCameraCommands::SET_CAMERA_REL_INT = "setCameraRelInt"; +AREXPORT const char *ArCameraCommands::SET_CAMERA_PCT_INT = "setCameraPctInt"; +AREXPORT const char *ArCameraCommands::GET_VIDEO = "getVideo"; + +AREXPORT const char *ArCameraCommands::GET_SNAPSHOT_PLAIN = "getSnapshotPlain"; + diff --git a/Legacy/Aria/src/ArCondition_LIN.cpp b/Legacy/Aria/src/ArCondition_LIN.cpp new file mode 100644 index 0000000..b7a00c3 --- /dev/null +++ b/Legacy/Aria/src/ArCondition_LIN.cpp @@ -0,0 +1,256 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include +#include +#include +#include +#include +#include "ariaOSDef.h" +#include "ArCondition.h" +#include "ArLog.h" + +#include + + +ArStrMap ArCondition::ourStrMap; + + +AREXPORT ArCondition::ArCondition() : + myFailedInit(false), + myCond(), + myMutex(false) +{ + myMutex.setLogName("ArCondition::myMutex"); + pthread_condattr_t attr; + + pthread_condattr_init(&attr); + if (pthread_cond_init(&myCond, &attr) != 0) + { + ArLog::log(ArLog::Terse, "ArCondition::ArCondition: Unknown error trying to create the condition."); + myFailedInit=true; + } + + pthread_condattr_destroy(&attr); + + ourStrMap[STATUS_FAILED]="General failure"; + ourStrMap[STATUS_FAILED_DESTROY]= + "Another thread is waiting on this condition so it can not be destroyed"; + ourStrMap[STATUS_FAILED_INIT] = + "Failed to initialize thread. Requested action is imposesible"; + ourStrMap[STATUS_MUTEX_FAILED_INIT]="The underlying mutex failed to init"; + ourStrMap[STATUS_MUTEX_FAILED]="The underlying mutex failed in some fashion"; +} + +AREXPORT ArCondition::~ArCondition() +{ + int ret; + + ret=pthread_cond_destroy(&myCond); + if (ret == EBUSY) + ArLog::log(ArLog::Terse, "ArCondition::~ArCondition: Trying to destroy a condition that another thread is waiting on."); + else if (ret != 0) + ArLog::log(ArLog::Terse, "ArCondition::~ArCondition: Unknown error while trying to destroy the condition."); +} + +AREXPORT int ArCondition::signal() +{ + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition::signal: Initialization of condition failed, failed to signal"); + return(STATUS_FAILED_INIT); + } + + if (pthread_cond_signal(&myCond) != 0) + { + ArLog::log(ArLog::Terse, "ArCondition::signal: Unknown error while trying to signal the condition."); + return(STATUS_FAILED); + } + + return(0); +} + +AREXPORT int ArCondition::broadcast() +{ + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition::broadcast: Initialization of condition failed, failed to broadcast"); + return(STATUS_FAILED_INIT); + } + + if (pthread_cond_broadcast(&myCond) != 0) + { + ArLog::log(ArLog::Terse, "ArCondition::broadcast: Unknown error while trying to broadcast the condition."); + return(STATUS_FAILED); + } + + return(0); +} + +AREXPORT int ArCondition::wait() +{ + int ret; + + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition::wait: Initialization of condition failed, failed to wait"); + return(STATUS_FAILED_INIT); + } + + ret=myMutex.lock(); + if (ret != 0) + { + if (ret == ArMutex::STATUS_FAILED_INIT) + return(STATUS_MUTEX_FAILED_INIT); + else + return(STATUS_MUTEX_FAILED); + } + + ret=pthread_cond_wait(&myCond, &myMutex.getMutex()); + if (ret != 0) + { + if (ret == EINTR) + return(STATUS_WAIT_INTR); + else + { + ArLog::log(ArLog::Terse, "ArCondition::wait: Unknown error while trying to wait on the condition."); + return(STATUS_FAILED); + } + } + + ret=myMutex.unlock(); + if (ret != 0) + { + if (ret == ArMutex::STATUS_FAILED_INIT) + return(STATUS_MUTEX_FAILED_INIT); + else + return(STATUS_MUTEX_FAILED); + } + + return(0); +} + +AREXPORT int ArCondition::timedWait(unsigned int msecs) +{ + int ret; + int retUnlock; + + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition::wait: Initialization of condition failed, failed to wait"); + return(STATUS_FAILED_INIT); + } + + ret=myMutex.lock(); + if (ret != 0) + { + if (ret == ArMutex::STATUS_FAILED_INIT) + return(STATUS_MUTEX_FAILED_INIT); + else + return(STATUS_MUTEX_FAILED); + } + + /* + gettimeofday(&tp, NULL); + // convert time of day to pthread time structure + spec.tv_sec = tp.tv_sec; + spec.tv_nsec = tp.tv_usec * 1000; + + // add on time specified by msecs + spec.tv_sec += (long int)rint(((float)msecs)/1000.0); + // 1 millisecond = 1000 micro seconds = 1000000 nanoseconds + spec.tv_nsec += (long int)( ( msecs % 1000 ) * 1000000); +// printf("input millisecond=%d :: sec=%ld nsec=%ld curtime=%ld %ld\n", msecs, spec.tv_sec, spec.tv_nsec, tp.tv_sec, tp.tv_usec * 1000); +*/ + struct timespec spec; +#ifdef _POSIX_TIMERS + clock_gettime(CLOCK_REALTIME, &spec); +#else +#warning posix realtime timer not available so using gettimeofday instead of clock_gettime + struct timeval tp; + gettimeofday(&tp, NULL); + spec.tv_sec = tp.tv_sec; + spec.tv_nsec = tp.tv_usec * 1000; +#endif + + spec.tv_sec += msecs / 1000; + spec.tv_nsec += msecs * 1000 * 1000; + if (spec.tv_nsec > 1000 * 1000 * 1000) + { + spec.tv_sec += 1; + spec.tv_nsec -= 1000 * 1000 * 1000; + } + + + int timedWaitErrno; + + ret=pthread_cond_timedwait(&myCond, &myMutex.getMutex(), &spec); + timedWaitErrno = errno; + + /* + if (ret != 0) + ArLog::logErrorFromOS(ArLog::Terse, "ArCondition::timedWait: Unknown error while trying to wait on the condition. Ret %d, %s", ret, strerror(ret)); + */ + + // must unlock the mutex, even if we fail, since we reacquire lock + // after timedwait times out + retUnlock=myMutex.unlock(); + + if (ret != 0) + { + if (ret == EINTR) + return(STATUS_WAIT_INTR); + else if (ret == ETIMEDOUT) + return(STATUS_WAIT_TIMEDOUT); + else + { + ArLog::logErrorFromOS(ArLog::Terse, "ArCondition::timedWait: Unknown error while trying to wait on the condition. Ret %d, %s. Errno %d, %s.", + ret, strerror(ret), + timedWaitErrno, strerror(timedWaitErrno)); + + return(STATUS_FAILED); + } + } + + if (retUnlock != 0) + { + if (retUnlock == ArMutex::STATUS_FAILED_INIT) + return(STATUS_MUTEX_FAILED_INIT); + else + return(STATUS_MUTEX_FAILED); + } + + return(0); +} + +AREXPORT const char * ArCondition::getError(int messageNumber) const +{ + ArStrMap::const_iterator it; + if ((it = ourStrMap.find(messageNumber)) != ourStrMap.end()) + return (*it).second.c_str(); + else + return NULL; +} diff --git a/Legacy/Aria/src/ArCondition_WIN.cpp b/Legacy/Aria/src/ArCondition_WIN.cpp new file mode 100644 index 0000000..08cf849 --- /dev/null +++ b/Legacy/Aria/src/ArCondition_WIN.cpp @@ -0,0 +1,155 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArCondition.h" +#include "ArLog.h" + + +ArStrMap ArCondition::ourStrMap; + + +AREXPORT ArCondition::ArCondition() : + myFailedInit(false), + myCond(), + myCount(0) +{ + myCond=CreateEvent(0, FALSE, FALSE, 0); + if (myCond == NULL) + { + DWORD err = GetLastError(); // see http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx + ArLog::log(ArLog::Terse, "ArCondition(%s)::ArCondition: Error %d trying to create the condition.", getLogName(), err); + myFailedInit=true; + } + + ourStrMap[STATUS_FAILED]="General failure"; + ourStrMap[STATUS_FAILED_DESTROY]= + "Another thread is waiting on this condition so it can not be destroyed"; + ourStrMap[STATUS_FAILED_INIT] = + "Failed to initialize thread. Requested action is imposesible"; + ourStrMap[STATUS_MUTEX_FAILED_INIT]="The underlying mutex failed to init"; + ourStrMap[STATUS_MUTEX_FAILED]="The underlying mutex failed in some fashion"; +} + +AREXPORT ArCondition::~ArCondition() +{ + if (!myFailedInit && !CloseHandle(myCond)) + ArLog::log(ArLog::Terse, "ArCondition(%s)::~ArCondition: Unknown error while trying to destroy the condition.", getLogName()); +} + +AREXPORT int ArCondition::signal() +{ + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition(%s)::signal: Initialization of condition failed, failed to signal", getLogName()); + return(STATUS_FAILED_INIT); + } + + if (!PulseEvent(myCond)) + { + ArLog::log(ArLog::Terse, "ArCondition(%s)::signal: Unknown error while trying to signal the condition.", getLogName()); + return(STATUS_FAILED); + } + + return(0); +} + +AREXPORT int ArCondition::broadcast() +{ + int ret=0; + + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition(%s)::broadcast: Initialization of condition failed, failed to broadcast", getLogName()); + return(STATUS_FAILED_INIT); + } + + ArLog::log(ArLog::Normal, "broadcasting %s", getLogName()); + for (; myCount != 0; --myCount) + { + if (PulseEvent(myCond) == 0) // PulseEvent returns 09 on error according to http://msdn.microsoft.com/en-us/library/windows/desktop/ms684914(v=vs.85).aspx + { + DWORD err = GetLastError(); // see http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx + ArLog::log(ArLog::Terse, "ArCondition(%s)::broadcast: Error %d while trying to broadcast the condition.", getLogName(), err); + ret=STATUS_FAILED; + } + } + + return(ret); +} + +AREXPORT int ArCondition::wait() +{ + DWORD ret; + + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition(%s)::wait: Initialization of condition failed, failed to wait", getLogName()); + return(STATUS_FAILED_INIT); + } + + ++myCount; + ret=WaitForSingleObject(myCond, INFINITE); + if (ret == WAIT_OBJECT_0) + return(0); + else + { + ArLog::logNoLock(ArLog::Terse, "ArCondition(%s)::wait: Failed to lock due to an unknown error", getLogName()); + return(STATUS_FAILED); + } +} + +AREXPORT int ArCondition::timedWait(unsigned int msecs) +{ + int ret; + + if (myFailedInit) + { + ArLog::log(ArLog::Terse, "ArCondition(%s)::wait: Initialization of condition failed, failed to wait", getLogName()); + return(STATUS_FAILED_INIT); + } + + ++myCount; + ret=WaitForSingleObject(myCond, msecs); + if (ret == WAIT_OBJECT_0) + return(0); + else if (ret == WAIT_TIMEOUT) + return(STATUS_WAIT_TIMEDOUT); + else + { + ArLog::logNoLock(ArLog::Terse, "ArCondition(%s)::timedWait: Failed to lock due to an unknown error", getLogName()); + return(STATUS_FAILED); + } +} + +AREXPORT const char *ArCondition::getError(int messageNumber) const +{ + ArStrMap::const_iterator it; + if ((it = ourStrMap.find(messageNumber)) != ourStrMap.end()) + return (*it).second.c_str(); + else + return NULL; +} diff --git a/Legacy/Aria/src/ArConfig.cpp b/Legacy/Aria/src/ArConfig.cpp new file mode 100644 index 0000000..1c6af08 --- /dev/null +++ b/Legacy/Aria/src/ArConfig.cpp @@ -0,0 +1,3481 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArConfig.h" +#include "ArArgumentBuilder.h" +#include "ArLog.h" + +#include + + +//#define ARDEBUG_CONFIG + +#if (defined(_DEBUG) && defined(ARDEBUG_CONFIG)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +const char *ArConfig::CURRENT_CONFIG_VERSION = "2.0"; +const char *ArConfig::CONFIG_VERSION_TAG = "ConfigVersion"; + +const char *ArConfig::CURRENT_RESOURCE_VERSION = "1.1"; +const char *ArConfig::RESOURCE_VERSION_TAG = "ConfigResourceVersion"; + +const char *ArConfig::CATEGORY_ROBOT_INTERFACE = "Robot Interface"; +const char *ArConfig::CATEGORY_ROBOT_OPERATION = "Robot Operation"; +const char *ArConfig::CATEGORY_ROBOT_PHYSICAL = "Robot Physical"; +const char *ArConfig::CATEGORY_FLEET = "Enterprise"; +const char *ArConfig::CATEGORY_SECURITY = "Security"; +const char *ArConfig::CATEGORY_DEBUG = "Debug"; + + +/** + @param baseDirectory a directory to search for files in + @param noBlanksBetweenParams if there should not be blank lines between params in output + @param ignoreBounds if this is true bounds checking will be ignored when the file is read in. this should ONLY be used by developers debugging + @param failOnBadSection if this is true and there is a bad section, then parseFile will fail + @param saveUnknown if this is true and there are unknown parameters or sections then they will be saved, if false then they will be ignored (can also be set with setSaveUnknown()) + **/ +AREXPORT ArConfig::ArConfig(const char *baseDirectory, + bool noBlanksBetweenParams, + bool ignoreBounds, + bool failOnBadSection, + bool saveUnknown) : + myRobotName(""), + myConfigName(""), + myLogPrefix("ArConfig: "), + + myArgumentParser(NULL), + myProcessFileCBList(), + myNoBlanksBetweenParams(noBlanksBetweenParams), + + myConfigVersion(), + myTranslator(NULL), + myCsvSeparatorChar('\t'), // Or tab? + + mySection(), + mySectionsToParse(NULL), + mySectionsNotToParse(), + myHighestPriorityToParse(ArPriority::FIRST_PRIORITY), + myLowestPriorityToParse(ArPriority::LAST_PRIORITY), + + myRestartLevelNeeded(ArConfigArg::NO_RESTART), + myCheckingForRestartLevel(true), + + mySectionBroken(false), + mySectionIgnored(false), + myUsingSections(false), + + myParsingListNames(), + myIsParsingListBroken(false), + + myFileName(), + myBaseDirectory(), // setBaseDirectory() is called in ctor + + myParser(NULL), + + myIgnoreBounds(ignoreBounds), + myFailOnBadSection(failOnBadSection), + + myDuplicateParams(false), + + mySaveUnknown(saveUnknown), + myIsQuiet(false), + + myPermissionAllowFactory(true), + myPermissionSaveUnknown(saveUnknown), + myProcessFileCallbacksLogLevel(ArLog::Verbose), + + myCategoryToSectionsMap(), + mySections(), + + myParserCB(this, &ArConfig::parseArgument), + myVersionCB(this, &ArConfig::parseVersion), + mySectionCB(this, &ArConfig::parseSection), + myListBeginCB(this, &ArConfig::parseListBegin), + myListEndCB(this, &ArConfig::parseListEnd), + myUnknownCB(this, &ArConfig::parseUnknown) +{ + /* taking this part out and just calling 'addParsrHandler' so all the codes in one spot + if (!myParser.addHandlerWithError("section", &mySectionCB)) + { + ArLog::log(ArLog::Normal, "Could not add section to file parser, horrific failure"); + }*/ + addParserHandlers(); + + myPermissionAllowFactory = true; + myPermissionSaveUnknown = saveUnknown; + + myArgumentParser = NULL; + mySaveUnknown = saveUnknown; + myIsQuiet = false; + setBaseDirectory(baseDirectory); + myIgnoreBounds = ignoreBounds; + myFailOnBadSection = failOnBadSection; + myProcessFileCallbacksLogLevel = ArLog::Verbose; + myUsingSections = false; + mySectionBroken = false; + mySectionIgnored = false; + myDuplicateParams = false; + + myParserCB.setName("ArConfig::parseArgument"); + myVersionCB.setName("ArConfig::parseVersion"); + mySectionCB.setName("ArConfig::parseSection"); + myListBeginCB.setName("ArConfig::parseListBegin"); + myListEndCB.setName("ArConfig::parseListEnd"); + myUnknownCB.setName("ArConfig::parseUnknown"); + + mySection = ""; +} + +AREXPORT ArConfig::~ArConfig() +{ + clearAll(); +} + + +AREXPORT ArConfig::ArConfig(const ArConfig &config) : + myRobotName(""), + myConfigName(""), + myLogPrefix("ArConfig: "), + + myArgumentParser(NULL), + myProcessFileCBList(), + myNoBlanksBetweenParams(config.myNoBlanksBetweenParams), + + myConfigVersion(config.myConfigVersion), + myTranslator(config.myTranslator), + myCsvSeparatorChar(config.myCsvSeparatorChar), + + mySection(config.mySection), + mySectionsToParse(NULL), + mySectionsNotToParse(config.mySectionsNotToParse), + myHighestPriorityToParse(config.myHighestPriorityToParse), + myLowestPriorityToParse(config.myLowestPriorityToParse), + + myRestartLevelNeeded(ArConfigArg::NO_RESTART), + myCheckingForRestartLevel(true), + + mySectionBroken(config.mySectionBroken), + mySectionIgnored(config.mySectionIgnored), + myUsingSections(config.myUsingSections), + + myParsingListNames(), + myIsParsingListBroken(false), + + myFileName(), + myBaseDirectory(), // setBaseDirectory() is called in ctor + + myParser(NULL), + + myIgnoreBounds(config.myIgnoreBounds), + myFailOnBadSection(config.myFailOnBadSection), + + myDuplicateParams(config.myDuplicateParams), + + mySaveUnknown(config.mySaveUnknown), + myIsQuiet(config.myIsQuiet), + + myPermissionAllowFactory(config.myPermissionAllowFactory), + myPermissionSaveUnknown(config.myPermissionSaveUnknown), + myProcessFileCallbacksLogLevel(config.myProcessFileCallbacksLogLevel), + + myCategoryToSectionsMap(config.myCategoryToSectionsMap), + mySections(), + + myParserCB(this, &ArConfig::parseArgument), + myVersionCB(this, &ArConfig::parseVersion), + mySectionCB(this, &ArConfig::parseSection), + myListBeginCB(this, &ArConfig::parseListBegin), + myListEndCB(this, &ArConfig::parseListEnd), + myUnknownCB(this, &ArConfig::parseUnknown) +{ + myArgumentParser = NULL; + setBaseDirectory(config.getBaseDirectory()); + + std::list::const_iterator it; + for (it = config.mySections.begin(); + it != config.mySections.end(); + it++) + { + mySections.push_back(new ArConfigSection(*(*it))); + } + copySectionsToParse(config.mySectionsToParse); + + myParserCB.setName("ArConfig::parseArgument"); + myVersionCB.setName("ArConfig::parseVersion"); + mySectionCB.setName("ArConfig::parseSection"); + myListBeginCB.setName("ArConfig::parseListBegin"); + myListEndCB.setName("ArConfig::parseListEnd"); + myUnknownCB.setName("ArConfig::parseUnknown"); + + + myParser.setQuiet(myIsQuiet); + remParserHandlers(); + addParserHandlers(); + +} + + +AREXPORT ArConfig &ArConfig::operator=(const ArConfig &config) +{ + if (this != &config) { + + // Note that the name is not copied... + IFDEBUG(ArLog::log(ArLog::Verbose, + "%soperator= (from %s) begins", + myLogPrefix.c_str(), + config.myLogPrefix.c_str())); + + // TODO: The following attributes also need to be copied (or + // something) -- ditto for copy ctor: + // myProcessFileCBList + // myParser + // The callbacks should not be copied + // myParserCB + // myVersionCB + // mySectionCB + myArgumentParser = NULL; + setBaseDirectory(config.getBaseDirectory()); + myNoBlanksBetweenParams = config.myNoBlanksBetweenParams; + myConfigVersion = config.myConfigVersion; + myIgnoreBounds = config.myIgnoreBounds; + myFailOnBadSection = config.myFailOnBadSection; + mySection = config.mySection; + mySectionBroken = config.mySectionBroken; + mySectionIgnored = config.mySectionIgnored; + myUsingSections = config.myUsingSections; + myDuplicateParams = config.myDuplicateParams; + + // KMC 7/13/12 Not copying the myParsingListNames because they are + // transient internal pointers only used while parsing. + myIsParsingListBroken = config.myIsParsingListBroken; + + myPermissionAllowFactory = config.myPermissionAllowFactory; + myPermissionSaveUnknown = config.myPermissionSaveUnknown; + + myCategoryToSectionsMap.clear(); + myCategoryToSectionsMap = config.myCategoryToSectionsMap; + + clearSections(); + + std::list::const_iterator it; + for (it = config.mySections.begin(); + it != config.mySections.end(); + it++) + { + mySections.push_back(new ArConfigSection(*(*it))); + } + + + copySectionsToParse(config.mySectionsToParse); + + mySectionsNotToParse = config.mySectionsNotToParse; + + myHighestPriorityToParse = config.myHighestPriorityToParse; + myLowestPriorityToParse = config.myLowestPriorityToParse; + myRestartLevelNeeded = config.myRestartLevelNeeded; + myCheckingForRestartLevel = config.myCheckingForRestartLevel; + + remParserHandlers(); + + addParserHandlers(); + + IFDEBUG(ArLog::log(ArLog::Verbose, + "%soperator= (from %s) ends", + myLogPrefix.c_str(), + config.myLogPrefix.c_str())); + } + return *this; + +} + +AREXPORT void ArConfig::copyAndDetach(const ArConfig &config) +{ + if (this != &config) { + + // Note that the name is not copied... + IFDEBUG(ArLog::log(ArLog::Verbose, + "%soperator= (from %s) begins", + myLogPrefix.c_str(), + config.myLogPrefix.c_str())); + + // TODO: The following attributes also need to be copied (or + // something) -- ditto for copy ctor: + // myProcessFileCBList + // myParser + // The callbacks should not be copied + // myParserCB + // myVersionCB + // mySectionCB + myArgumentParser = NULL; + setBaseDirectory(config.getBaseDirectory()); + myNoBlanksBetweenParams = config.myNoBlanksBetweenParams; + myConfigVersion = config.myConfigVersion; + myIgnoreBounds = config.myIgnoreBounds; + myFailOnBadSection = config.myFailOnBadSection; + mySection = config.mySection; + mySectionBroken = config.mySectionBroken; + mySectionIgnored = config.mySectionIgnored; + myUsingSections = config.myUsingSections; + myDuplicateParams = config.myDuplicateParams; + + // KMC 7/13/12 Not copying the myParsingListNames because they are + // transient internal pointers only used while parsing. + myIsParsingListBroken = config.myIsParsingListBroken; + + myPermissionAllowFactory = config.myPermissionAllowFactory; + myPermissionSaveUnknown = config.myPermissionSaveUnknown; + + myCategoryToSectionsMap.clear(); + myCategoryToSectionsMap = config.myCategoryToSectionsMap; + + clearSections(); + + std::list::const_iterator it; + for (it = config.mySections.begin(); + it != config.mySections.end(); + it++) + { + ArConfigSection *sectionCopy = new ArConfigSection(); + sectionCopy->setQuiet(myIsQuiet); + sectionCopy->copyAndDetach(*(*it)); + mySections.push_back(sectionCopy); + //mySections.push_back(new ArConfigSection(*(*it))); + } + + + copySectionsToParse(config.mySectionsToParse); + myHighestPriorityToParse = config.myHighestPriorityToParse; + myLowestPriorityToParse = config.myLowestPriorityToParse; + myRestartLevelNeeded = config.myRestartLevelNeeded; + myCheckingForRestartLevel = config.myCheckingForRestartLevel; + mySectionsNotToParse = config.mySectionsNotToParse; + + remParserHandlers(); + addParserHandlers(); + + IFDEBUG(ArLog::log(ArLog::Verbose, + "%soperator= (from %s) ends", + myLogPrefix.c_str(), + config.myLogPrefix.c_str())); + } + // Hmmm... Is there any use in returning... ? return *this; + +} // end method copyAndDetach + + + +/** + * These names are used solely for log messages. + * + * @param configName a char * descriptive name of the ArConfig instance + * (e.g. Server or Default) + * @param robotName an optional char * identifier of the robot that has + * the config +**/ +AREXPORT void ArConfig::setConfigName(const char *configName, + const char *robotName) +{ + myConfigName = ((configName != NULL) ? configName : ""); + myRobotName = ((robotName != NULL) ? robotName : ""); + myLogPrefix = ""; + + if (!myRobotName.empty()) { + myLogPrefix = myRobotName + ": "; + } + myLogPrefix += "ArConfig"; + + if (!myConfigName.empty()) { + myLogPrefix += " (" + myConfigName + ")"; + } + + myLogPrefix += ": "; +} + +AREXPORT void ArConfig::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; + myParser.setQuiet(isQuiet); +} + + +AREXPORT void ArConfig::setTranslator(ArConfig *xlatorConfig) +{ + myTranslator = xlatorConfig; + + if (myTranslator != NULL) { + + if (!mySections.empty()) { + ArLog::log(ArLog::Normal, + "%sArConfig::setTranslator() sections already created", + myLogPrefix.c_str()); + + for (std::list::iterator iter = mySections.begin(); + iter != mySections.end(); + iter++) { + translateSection(*iter); + } + + + } + } + +} // end method setTranslator + + +AREXPORT ArConfig *ArConfig::getTranslator() const +{ + return myTranslator; + +} // end method getTranslator + + + +/** + * @param isSummary a bool set to true if only the section names and parameter counts + * should be logged; false to log detailed parameter information + * @param sectionNameList a list of the string section names to be logged; if NULL, + * then the data for all sections are logged +**/ +AREXPORT void ArConfig::log(bool isSummary, + std::list *sectionNameList, + const char *logPrefix) +{ + std::string origLogPrefix = myLogPrefix; + + if (!ArUtil::isStrEmpty(logPrefix)) { + myLogPrefix = logPrefix; + } + + std::list *params = NULL; + + ArLog::log(ArLog::Normal, + "%slog", + myLogPrefix.c_str()); + + for (std::list::const_iterator it = mySections.begin(); + it != mySections.end(); + it++) + { + params = (*it)->getParams(); + + // If the section names were specified and the current section isn't in the + // list, then skip the section... + if (sectionNameList != NULL) { + if (!ArUtil::isStrInList((*it)->getName(), *sectionNameList)) { + continue; + } + } // end if section names specified + + + if (params == NULL) { + ArLog::log(ArLog::Normal, " Section %s has NULL params", + (*it)->getName()); + + continue; + } + + if (isSummary) { + ArLog::log(ArLog::Normal, " Section %s has %i params", + (*it)->getName(), params->size()); + continue; + } + + ArLog::log(ArLog::Normal, " Section %s:", + (*it)->getName()); + + for (std::list::iterator pit = params->begin(); pit != params->end(); pit++) + { + (*pit).log(false, 1, myLogPrefix.c_str()); + } + + } // end for each section + + ArLog::log(ArLog::Normal, + "%send", + myLogPrefix.c_str()); + + myLogPrefix = origLogPrefix; + +} // end method log + + +AREXPORT void ArConfig::clearSections(void) +{ + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sclearSections() begin", + myLogPrefix.c_str())); + + while (mySections.begin() != mySections.end()) + { + delete mySections.front(); + mySections.pop_front(); + } + // Clear this just in case... + if (mySectionsToParse != NULL) + { + delete mySectionsToParse; + mySectionsToParse = NULL; + } + + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sclearSections() end", + myLogPrefix.c_str())); + +} + +AREXPORT void ArConfig::clearAll(void) +{ + clearSections(); + ArUtil::deleteSetPairs(myProcessFileCBList.begin(), + myProcessFileCBList.end()); + myProcessFileCBList.clear(); +} + +void ArConfig::addParserHandlers(void) +{ + std::list::const_iterator it; + std::list *params; + std::list::iterator pit; + + if (!myParser.addHandlerWithError(CONFIG_VERSION_TAG, &myVersionCB)) { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, + "%sCould not add ConfigVersion parser (probably unimportant)", + myLogPrefix.c_str()); + } + } + if (!myParser.addHandlerWithError("section", &mySectionCB)) { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, + "%sCould not add section parser (probably unimportant)", + myLogPrefix.c_str()); + } + } + if (!myParser.addHandlerWithError(ArConfigArg::LIST_BEGIN_TAG, &myListBeginCB)) { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, + "%sCould not add _listBegin parser", + myLogPrefix.c_str()); + } + } + if (!myParser.addHandlerWithError(ArConfigArg::LIST_END_TAG, &myListEndCB)) { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, + "%sCould not add _listEnd parser", + myLogPrefix.c_str()); + } + } + + + for (it = mySections.begin(); + it != mySections.end(); + it++) + { + params = (*it)->getParams(); + if (params == NULL) + continue; + + for (pit = params->begin(); pit != params->end(); pit++) + { + + (*pit).addToFileParser(&myParser, + &myParserCB, + myLogPrefix.c_str(), + myIsQuiet); + + //if (!myParser.addHandlerWithError((*pit).getName(), &myParserCB)) { + // if (!myIsQuiet) { + // ArLog::log(ArLog::Verbose, + // "%sCould not add keyword %s (probably unimportant)", + // myLogPrefix.c_str(), + // (*pit).getName()); + // } + //} + } + } + + // add our parser for unknown params + if (!myParser.addHandlerWithError(NULL, &myUnknownCB)) { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, + "%sCould not add unknown param parser (probably unimportant)", + myLogPrefix.c_str()); + } + } +} + +void ArConfig::remParserHandlers(void) +{ + myParser.remHandler(&myParserCB); + myParser.remHandler(&myVersionCB); + myParser.remHandler(&mySectionCB); + myParser.remHandler(&myListBeginCB); + myParser.remHandler(&myListEndCB); + myParser.remHandler(&myUnknownCB); + +} // end method remParserHandlers + + +AREXPORT bool ArConfig::addSection(const char *categoryName, + const char *sectionName, + const char *sectionDescription) +{ + // KMC 8/10/12 Allowing empty category names for unclassified sections + if ((categoryName == NULL) || ArUtil::isStrEmpty(sectionName)) { +// if (ArUtil::isStrEmpty(categoryName) || ArUtil::isStrEmpty(sectionName)) { + ArLog::log(ArLog::Normal, + "%sFailed to add section '%s' to category '%s'", + myLogPrefix.c_str(), + ((sectionName != NULL) ? sectionName : "NULL"), + ((categoryName != NULL) ? categoryName : "NULL")); + return false; + } + + ArConfigSection *section = findSection(sectionName); + + if ((section != NULL) && (!ArUtil::isStrEmpty(section->getCategoryName()))) + { + translateSection(section); + + ArLog::log(ArLog::Normal, + "%sFailed to add section '%s' to category '%s', already defined in category '%s'", + myLogPrefix.c_str(), + ((sectionName != NULL) ? sectionName : "NULL"), + ((categoryName != NULL) ? categoryName : "NULL"), + section->getCategoryName()); + return false; + } + + if (section == NULL) { + ArLog::log(ArLog::Verbose, "%sMaking new section '%s' in category '%s'", + myLogPrefix.c_str(), sectionName, categoryName); + + section = new ArConfigSection(sectionName, + sectionDescription, + myIsQuiet, + categoryName); + mySections.push_back(section); + } + else { + ArLog::log(ArLog::Verbose, "%sAssigning existing section '%s' to category '%s'", + myLogPrefix.c_str(), sectionName, categoryName); + + section->setCategoryName(categoryName); + section->setComment(sectionDescription); + } + translateSection(section); + + // Make sure that the section is not already stored in the category map + std::list *sectionList = NULL; + + std::map >::iterator catIter = myCategoryToSectionsMap.find(categoryName); + if (catIter != myCategoryToSectionsMap.end()) { + sectionList = &(catIter->second); + } + + bool isSectionFound = false; + if (sectionList != NULL) { + isSectionFound = ArUtil::isStrInList(sectionName, *sectionList); + } + + // If the section is not already in the map, then add it. + if (!isSectionFound) { + myCategoryToSectionsMap[categoryName].push_back(sectionName); + } + + return true; + +} // end method addSection + + +/** + Set the comment string associated with a section. If the section doesn't + exist then it is created. + @deprecated use addSection instead + @warning The section name must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. The comment must not contain tab or newline, but '#' and + ';' are OK within a comment. +**/ +AREXPORT void ArConfig::setSectionComment(const char *sectionName, + const char *comment) +{ + ArConfigSection *section = findSection(sectionName); + + if (section == NULL) + { + ArLog::log(ArLog::Verbose, "%sMaking new section '%s' (for comment)", + myLogPrefix.c_str(), sectionName); + + section = new ArConfigSection(sectionName, comment, myIsQuiet); + + + mySections.push_back(section); + } + else { + section->setComment(comment); + } + + translateSection(section); + +} + + +/** + Add a flag to a section. If the section doesn't + exist then it is created. + @warning The section name and flags must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. +**/ +AREXPORT bool ArConfig::addSectionFlags(const char *sectionName, + const char *flags) +{ + ArConfigSection *section = findSection(sectionName); + + if (section == NULL) + { + ArLog::log(ArLog::Verbose, "%sMaking new section '%s' (flags)", + myLogPrefix.c_str(), sectionName); + section = new ArConfigSection(sectionName, NULL, myIsQuiet); + section->addFlags(flags, myIsQuiet); + + translateSection(section); + mySections.push_back(section); + } + else + section->addFlags(flags, myIsQuiet); + return true; +} + +/** + Add a flag to a section. If the section doesn't + exist then it is created. +**/ +AREXPORT bool ArConfig::remSectionFlag(const char *sectionName, + const char *flag) +{ + ArConfigSection *section = findSection(sectionName); + + if (section == NULL) + return false; + + section->remFlag(flag); + return true; +} + +/** Add a parameter. + * @param arg Object containing key, description and value type of this parameter. This object will be copied.... it must already have the priority, display hint, restart level, and other things like that already set. + * @param sectionName Name of the section to put this parameter in. + */ +AREXPORT bool ArConfig::addParamAsIs(const ArConfigArg &arg, + const char *sectionName) +{ + return addParam(arg, sectionName, + arg.getConfigPriority(), + arg.getDisplayHint(), + arg.getRestartLevel()); +} + +/** Add a parameter. + * @param arg Object containing key, description and value type of this parameter. This object will be copied. + * @param sectionName Name of the section to put this parameter in. + * @param priority Priority or importance of this parameter to a user. + * @param displayHint Suggest an appropriate UI control for editing this parameter's value. See ArConfigArg::setDisplayHint() for description of display hint format. + * @param restart restart level + @warning The parameter name and value must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. + */ +AREXPORT bool ArConfig::addParam(const ArConfigArg &arg, + const char *sectionName, + ArPriority::Priority priority, + const char *displayHint, + ArConfigArg::RestartLevel restart) +{ + ArConfigSection *section = findSection(sectionName); + + ArConfigSection *xltrSection = NULL; + ArConfigArg *xltrArg = NULL; + if ((myTranslator != NULL) && + (arg.getType() != ArConfigArg::SEPARATOR)) + { + xltrSection = myTranslator->findSection(sectionName); + + if (xltrSection != NULL) { + xltrArg = xltrSection->findParam(arg.getName(), + true); // allow string holders + + if (xltrArg != NULL) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::addParam() found translation arg for %s, %s", + sectionName, + arg.getName())); + + } + else { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::addParam() cannot find translation arg for %s, %s", + sectionName, + arg.getName())); + + } + } + else { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::addParam() cannot find translation section for %s", + sectionName)); + } + } + + //printf("SECTION '%s' name '%s' desc '%s'\n", sectionName, arg.getName(), arg.getDescription()); + if (section == NULL) + { + ArLog::log(ArLog::Verbose, "ArConfigArg %s: Making new section '%s' (for param)", + myLogPrefix.c_str(), sectionName); + section = new ArConfigSection(sectionName, NULL, myIsQuiet); + + translateSection(section); + + mySections.push_back(section); + } + + std::list *params = section->getParams(); + + if (params == NULL) + { + ArLog::log(ArLog::Terse, "%sSomething has gone hideously wrong in ArConfig::addParam", + myLogPrefix.c_str()); + return false; + } + + // Don't add consecutive separators + if (arg.getType() == ArConfigArg::SEPARATOR && + !params->empty() && params->back().getType() == ArConfigArg::SEPARATOR) + { + //ArLog::log(ArLog::Verbose, "Last parameter a sep, so is this one, ignoring it"); + return true; + } + + // see if we have this parameter in another section so we can require sections + std::list::iterator sectionIt; + + for (sectionIt = mySections.begin(); + sectionIt != mySections.end(); + sectionIt++) + { + ArConfigSection *curSection = *sectionIt; + + // if we have an argument of this name but we don't have see if + // this section is our own, if its not then note we have + // duplicates + if ((strlen(arg.getName()) > 0) && + (curSection->findParam(arg.getName()) != NULL)) + { + if (strcasecmp(curSection->getName(), section->getName()) != 0) { + ArLog::log(ArLog::Verbose, + "%sParameter %s (type %s) name duplicated in section %s and %s", + myLogPrefix.c_str(), + arg.getName(), + ArConfigArg::toString(arg.getType()), + curSection->getName(), section->getName()); + myDuplicateParams = true; + } + else { + ArLog::log(ArLog::Verbose, + "%sParameter %s (type %s) already exists in section %s", + myLogPrefix.c_str(), + arg.getName(), + ArConfigArg::toString(arg.getType()), + section->getName()); + } + } + } // end for each section + + // now make sure we can add it to the file parser (with the section + // stuff its okay if we can't) + if (!myParser.addHandlerWithError(arg.getName(), &myParserCB)) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "%sCould not add parameter '%s' to file parser, probably already there.", + myLogPrefix.c_str(), arg.getName()); + } + //return false; + } + + // now we add all the list names to the parser too (the function + // makes sure it's a list) + addListNamesToParser(arg); + + // remove any string holders for this param + section->remStringHolder(arg.getName()); + + + // we didn't have a parameter with this name so add it + params->push_back(arg); + + if (xltrArg != NULL) { + params->back().copyTranslation(*xltrArg); + } + + params->back().setConfigPriority(priority); + params->back().setDisplayHint(displayHint); + params->back().setRestartLevel(restart); + + params->back().setIgnoreBounds(myIgnoreBounds); + params->back().replaceSpacesInName(); + + IFDEBUG(ArLog::log(ArLog::Verbose, "%sAdded parameter '%s' to section '%s'", + myLogPrefix.c_str(), arg.getName(), section->getName())); + //arg.log(); + return true; +} + +/** + * Add a comment to a section. + @param comment Text of the comment. + @param sectionName Name of the section to add the comment to. If the section does not exist, it will be created. + @param priority Priority or importance. + @warning The section name must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. The comment must not contain tab or newline, but '#' and + ';' are OK within a comment. +**/ +AREXPORT bool ArConfig::addComment(const char *comment, const char *sectionName, + ArPriority::Priority priority) +{ + return addParam(ArConfigArg(comment), sectionName, priority); +} + +AREXPORT bool ArConfig::parseVersion(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen) +{ + if ((errorBuffer != NULL) && (errorBufferLen > 0)) { + errorBuffer[0] = '\0'; + } + if ((arg->getArgc() < 0) || (arg->getArg(0) == NULL)) { + if ((errorBuffer != NULL) && (errorBufferLen > 0)) { + snprintf(errorBuffer, errorBufferLen, + "Configuration version error (blank"); + errorBuffer[errorBufferLen - 1] = '\0'; + } + return false; + } // end if no version + + myConfigVersion = arg->getArg(0); + ArLog::log(ArLog::Normal, + "%sConfig version: %s", + myLogPrefix.c_str(), + myConfigVersion.c_str()); + + // Someday this may do something more interesting... like check + // for compatibility in the versions. + + return true; + +} // end method parseVersion + +/** + The extra string of the parser should be set to the 'Section' + command while the rest of the arg should be the arguments to the + section command. Its case insensitive. + + @param arg Should contain the 'Section' keyword as its "extra" string, and section name as argument(s). + + @param errorBuffer if this is NULL it is ignored, otherwise the + string for the error is put into the buffer, the first word should + be the parameter that has trouble + + @param errorBufferLen the length of the error buffer + **/ +AREXPORT bool ArConfig::parseSection(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen) +{ + if (myFailOnBadSection && errorBuffer != NULL) + errorBuffer[0] = '\0'; + + std::list::iterator sectionIt; + ArConfigSection *section = NULL; + + if (myFailOnBadSection && errorBuffer != NULL) + errorBuffer[0] = '\0'; + for (sectionIt = mySections.begin(); + sectionIt != mySections.end(); + sectionIt++) + { + section = (*sectionIt); + if (ArUtil::strcasecmp(section->getName(), arg->getFullString()) == 0) + { + bool isParseSection = true; + if (mySectionsToParse != NULL) { + isParseSection = false; + for (std::list::iterator sIter = mySectionsToParse->begin(); + sIter != mySectionsToParse->end(); + sIter++) { + std::string sp = *sIter; + if (ArUtil::strcasecmp(section->getName(), sp.c_str()) == 0) { + isParseSection = true; + break; + } // end if section + } // end for each section to parse + + } // end else sections to parse specified + if (mySectionsNotToParse.find(section->getName()) != + mySectionsNotToParse.end()) + { + isParseSection = false; + } + + if (isParseSection) { + ArLog::log(ArLog::Verbose, "%sConfig switching to section '%s'", + myLogPrefix.c_str(), + arg->getFullString()); + //printf("Config switching to section '%s'\n", + //arg->getFullString()); + mySection = arg->getFullString(); + mySectionBroken = false; + mySectionIgnored = false; + myUsingSections = true; + return true; + } + else { // section is valid but shouldn't be parsed + ArLog::log(ArLog::Verbose, "%signoring section '%s'", + myLogPrefix.c_str(), + arg->getFullString()); + //printf("Config switching to section '%s'\n", + //arg->getFullString()); + mySection = arg->getFullString(); + mySectionBroken = false; + mySectionIgnored = true; + myUsingSections = true; + return true; + + } // end else don't parse section + } // end if section found + } // end for each section + + + if (myFailOnBadSection) + { + mySection = ""; + mySectionBroken = true; + mySectionIgnored = false; + snprintf(errorBuffer, errorBufferLen, "ArConfig: Could not find section '%s'", + arg->getFullString()); + + ArLog::log(ArLog::Terse, + "%sCould not find section '%s', failing", + myLogPrefix.c_str(), + arg->getFullString()); + return false; + } + else + { + if (mySaveUnknown && mySectionsToParse == NULL && + myPermissionSaveUnknown) + { + ArLog::log(ArLog::Verbose, "%smaking new section '%s' to save unknown", + myLogPrefix.c_str(), arg->getFullString()); + mySection = arg->getFullString(); + mySectionBroken = false; + mySectionIgnored = false; + section = new ArConfigSection(arg->getFullString(), NULL, myIsQuiet); + + translateSection(section); + + mySections.push_back(section); + } + else + { + mySection = ""; + mySectionBroken = false; + mySectionIgnored = true; + ArLog::log(ArLog::Normal, + "%sIgnoring unknown section '%s'", + myLogPrefix.c_str(), + arg->getFullString()); + } + return true; + } +} + + +AREXPORT bool ArConfig::parseListBegin(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen) +{ + if ((arg == NULL) || (arg->getArgc() < 1)) { + ArLog::log(ArLog::Normal, + "ArConfig::parseListBegin() invalid arg input"); + return false; + } + if (mySectionIgnored) { + return true; + } + if (mySectionBroken) { + if (myFailOnBadSection) + { + return false; + } + else { + return true; + } + } + + + if (myIsParsingListBroken) { + // KMC 10/25/12 Changing this under the theory that when the containing + // list is not found, true is still returned. I believe that indicates + // it's a recoverable error ... i.e. the corresponding list parameter has + // not been added to the config. + return true; // false; + } + + if ((errorBuffer != NULL) && (errorBufferLen > 0)) { + errorBuffer[0] = '\0'; + } + + ArConfigArg *param = NULL; + + ArConfigSection *section = findSection(mySection.c_str()); + + if (section == NULL) { + ArLog::log(ArLog::Normal, + "ArConfig::parseListBegin() cannot find section %s for list %s", + mySection.c_str(), + arg->getFullString()); + return true; + } + + ArConfigArg *parentParam = section->findParam(myParsingListNames, true); + + myParsingListNames.push_back(arg->getFullString()); + param = section->findParam(myParsingListNames); + + if (param == NULL) { + + ArLog::log(ArLog::Normal, + "ArConfig::parseListBegin() cannot find param for list %s, creating LIST_HOLDER", + arg->getFullString()); + + param = new ArConfigArg(ArConfigArg::LIST_HOLDER, + arg->getFullString(), + ""); // empty description + + if (parentParam == NULL) { + addParam(*param, mySection.c_str()); + } + else { + parentParam->addArg(*param); + } + + delete param; + param = NULL; + + // myIsParsingListBroken = true; + return true; + + } // end if param not found + + return true; + +} // end method parseListBegin + + +AREXPORT bool ArConfig::parseListEnd(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen) +{ + if ((arg == NULL) || (arg->getArgc() < 1)) { + ArLog::log(ArLog::Normal, + "ArConfig::parseListBegin() invalid arg input"); + return false; + } + if (mySectionIgnored) { + return true; + } + if (mySectionBroken) { + return false; + } + + if ((myParsingListNames.empty()) || + (ArUtil::strcasequotecmp(myParsingListNames.back(), + arg->getFullString()) != 0)) { + + // If previous list was broken, this really isn't an error + ArLog::log(ArLog::Normal, + "ArConfig::parseListEnd() found end of different list %s", + arg->getFullString()); + if (myIsParsingListBroken) { + return true; + } + else { + return false; + } + } + + // Found the end of the current list + if (!myIsParsingListBroken) { + + ArConfigArg *param = NULL; + ArConfigSection *section = findSection(mySection.c_str()); + + if (section != NULL) { + param = section->findParam(myParsingListNames); + } + if (param != NULL) { + param->setValueSet(); + } + } // end if list is fine + + myIsParsingListBroken = false; + // KMC 11/7/12 Note test for empty() above. + myParsingListNames.pop_back(); + + return true; + +} // end method parseListEnd + + + +/** + The extra string of the parser should be set to the command wanted, + while the rest of the arg should be the arguments to the command. + Its case insensitive. + + @param arg Obtain parameter name from this object's "extra string" + and value(s) from its argument(s). + + @param errorBuffer If this is NULL it is ignored, otherwise the + string for the error is put into the buffer, the first word should + be the parameter that has trouble + + @param errorBufferLen the length of @a errorBuffer + **/ +AREXPORT bool ArConfig::parseArgument(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen) +{ + + + bool ret = true; + + + if (mySectionBroken) + { + ArLog::log(ArLog::Verbose, "%sSkipping parameter %s because section broken", + myLogPrefix.c_str(), + arg->getExtraString()); + if (myFailOnBadSection) + { + snprintf(errorBuffer, errorBufferLen, + "Failed because broken config section"); + return false; + } + else + { + return true; + } + } + else if (mySectionIgnored) { + return true; + } + + + if (myIsParsingListBroken) { + + ArLog::log(ArLog::Normal, "%sSkipping parameter %s because list broken", + myLogPrefix.c_str(), + arg->getExtraString()); + + return true; // ?? + + } // end if list broken + + + // if we have duplicate params and don't have sections don't trash anything + if (myDuplicateParams && myUsingSections && mySection.size() <= 0) + { + snprintf(errorBuffer, errorBufferLen, + "%s not in section, client needs an upgrade", + arg->getExtraString()); + + ArLog::log(ArLog::Normal, + "%s%s not in a section, client needs an upgrade", + myLogPrefix.c_str(), + arg->getExtraString()); + return false; + } + + // see if we found this parameter + bool found = false; + + if (errorBuffer != NULL) + errorBuffer[0] = '\0'; + + //for (std::list::iterator sectionIt = mySections.begin(); + // sectionIt != mySections.end(); + // sectionIt++) + //{ + // section = (*sectionIt); + + ArConfigSection *section = findSection(mySection.c_str()); + + if (section != NULL) { + + std::list parseParamList; + + // MPL took out the part where if the param wasn't in a section at + // all it checked all the sections, I took this out since + // everything is generally in sections these days + + // KMC Note that duplicate parameter names can and do exist within + // a section. Therefore it is necessary to iterate through all of + // the section contents and check each parameter against the extra + // string value. + std::list *paramList = section->getParams(); + if (paramList != NULL) { + + for (std::list::iterator pIter = paramList->begin(); + pIter != paramList->end(); + pIter++) { + + ArConfigArg *param = &(*pIter); + ArConfigArg *parseParam = NULL; + + if (myParsingListNames.empty()) { + if (ArUtil::strcasecmp(param->getName(),arg->getExtraString()) != 0) { + continue; + } + parseParamList.push_back(param); + + } + else { // parameter is in a list + + if (ArUtil::strcasecmp(param->getName(), myParsingListNames.front()) != 0) { + continue; + } + std::list::iterator listIter = myParsingListNames.begin(); + listIter++; // skip the one already parsed + + std::list matchParamList; + matchParamList.push_back(param); + + std::list tempParamList; + + while (listIter != myParsingListNames.end()) { + + for (std::list::iterator mIter = matchParamList.begin(); + mIter != matchParamList.end(); + mIter++) { + ArConfigArg *matchParam = *mIter; + if (matchParam == NULL) { + continue; + } + for (int i = 0; i < matchParam->getArgCount(); i++) { + + ArConfigArg *childArg = matchParam->getArg(i); + if (childArg == NULL) { + continue; + } + if (ArUtil::strcasecmp(childArg->getName(), *listIter) != 0) { + continue; + } + tempParamList.push_back(childArg); + } + } // end for each matching parameter list + + matchParamList.clear(); + matchParamList = tempParamList; + tempParamList.clear(); + + listIter++; + + } // end for each list level + + for (std::list::iterator matchIter = matchParamList.begin(); + matchIter != matchParamList.end(); + matchIter++) { + + ArConfigArg *matchParam = *matchIter; + if (matchParam == NULL) { + continue; + } + + for (int i = 0; i < matchParam->getArgCount(); i++) { + + ArConfigArg *childArg = matchParam->getArg(i); + if (childArg == NULL) { + continue; + } + if (ArUtil::strcasecmp(childArg->getName(), arg->getExtraString()) != 0) { + continue; + } + parseParamList.push_back(childArg); + } // end for each child + } // end for each matching parameter + } // end else parameter is in a list + + + for (std::list::iterator parseIter = parseParamList.begin(); + parseIter != parseParamList.end(); + parseIter++) { + + ArConfigArg *parseParam = *parseIter; + if (parseParam == NULL) { + continue; + } + + found = true; + + // Make sure that the parameter is within the specified priority range, + // primarily to avoid accidentally overwriting factory and calibration + // parameters. Return true because it is not an error condition. + // + if ((parseParam->getConfigPriority() < myHighestPriorityToParse) || + (parseParam->getConfigPriority() > myLowestPriorityToParse)) { + return true; + } + + // KMC 7/11/12 Changed this from an equality check to accomodate the new + // calibration priority + if ((myPermissionAllowFactory) || + (parseParam->getConfigPriority() < ArPriority::FACTORY)) { + + bool changed = false; + if (!parseParam->parseArgument(arg, errorBuffer, errorBufferLen, myLogPrefix.c_str(), myIsQuiet, &changed)) { + + ArLog::log(ArLog::Normal, + "ArConfig::parseArgument() error parsing %s", + arg->getFullString()); + ret = false; + } + if (changed) + { + /* + ArLog::log(ArLog::Normal, "%sParameter '%s' changed with restart level (%d)", + myLogPrefix.c_str(), + parseParam->getName(), parseParam->getRestartLevel()); + */ + if (parseParam->getRestartLevel() > myRestartLevelNeeded) + { + myRestartLevelNeeded = parseParam->getRestartLevel(); + // don't print out the warning if nothings checking for it + if (myCheckingForRestartLevel) + ArLog::log(ArLog::Normal, + "%sParameter '%s' in section '%s' changed, bumping restart level needed to %s (%d)", + myLogPrefix.c_str(), parseParam->getName(), + section->getName(), + ArConfigArg::toString(myRestartLevelNeeded), + myRestartLevelNeeded); + } + } + + + } + else { // factory parameter and no permission to change + + /// MPL we'll want to do something here, but kathleen and i still have to work out what... + /* + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, + "%s is a factory level parameter but those are not allowed to be changed", + param->getName()); + */ + + } // end else factory parameter and no permission to change + } // end if parameter found + + } // end for each parameter in section + + } // end if parameter list + } // end if section found + + // if we didn't find this param its because its a parameter in another section, so pass this off to the parser for unknown things + if (!found) + { + ArArgumentBuilder unknown; + unknown.setQuiet(myIsQuiet); + unknown.addPlain(arg->getExtraString()); + unknown.addPlain(arg->getFullString()); + return parseUnknown(&unknown, errorBuffer, errorBufferLen); + } + return ret; +} + +/** + The extra string of the parser should be set to the command wanted, + while the rest of the arg should be the arguments to the command. + Its case insensitive. + + @param arg Obtain parameter name from this argument builder's "exra" string and value(s) from its argument(s). + + @param errorBuffer if this is NULL it is ignored, otherwise the + string for the error is put into the buffer, the first word should + be the parameter that has trouble + + @param errorBufferLen the length of the error buffer + **/ +AREXPORT bool ArConfig::parseUnknown(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen) +{ + if (arg->getArgc() < 1) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "%sEmpty arg in section '%s', ignoring it", + myLogPrefix.c_str(), mySection.c_str()); + } + return true; + } + if (mySaveUnknown && mySectionsToParse == NULL && + myPermissionSaveUnknown) + { + if (arg->getArgc() < 2) + { + + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "%sNo arg for param '%s' in section '%s', saving it anyways", + myLogPrefix.c_str(), arg->getArg(0), mySection.c_str()); + } + + if (myParsingListNames.empty() || myIsParsingListBroken) { + + addParam(ArConfigArg(arg->getArg(0), ""), + mySection.c_str()); + } + else { + ArConfigSection *section = findSection(mySection.c_str()); + if (section == NULL) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseUnknown() cannot find section %s", + myLogPrefix.c_str(), + mySection.c_str()); + return false; + } + ArConfigArg *parentParam = section->findParam(myParsingListNames, true); + if (parentParam == NULL) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseUnknown() cannot find parent param %s for %s", + myLogPrefix.c_str(), + myParsingListNames.front().c_str(), + arg->getArg(0)); + return false; + } + parentParam->addArg(ArConfigArg(arg->getArg(0), "")); + + } // end else list member + } + else + { + std::string str; + // int i; + for (unsigned int i = 1; i < arg->getArgc(); i++) + { + if (i != 1) + str += ' '; + str += arg->getArg(i); + } + + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "%sUnknown '%s %s' in section '%s', saving it", + myLogPrefix.c_str(), arg->getArg(0), str.c_str(), + mySection.c_str()); + } + if (myParsingListNames.empty() || myIsParsingListBroken) { + + addParam(ArConfigArg(arg->getArg(0), str.c_str()), + mySection.c_str()); + } + else { + + ArConfigSection *section = findSection(mySection.c_str()); + if (section == NULL) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseUnknown() cannot find section %s", + myLogPrefix.c_str(), + mySection.c_str()); + return false; + } + ArConfigArg *parentParam = section->findParam(myParsingListNames, true); + if (parentParam == NULL) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseUnknown() cannot find parent param '%s' for %s", + myLogPrefix.c_str(), + myParsingListNames.front().c_str(), + arg->getArg(0)); + return false; + } + + parentParam->addArg(ArConfigArg(arg->getArg(0), str.c_str())); + + } // end else list member + } + } + else + { + ArLog::log(ArLog::Verbose, "%sUnknown '%s' in section '%s', ignoring it", + myLogPrefix.c_str(), arg->getFullString(), mySection.c_str()); + } + return true; +} +/** + @param fileName the file to load + + @param continueOnErrors whether to continue parsing if we get + errors (or just bail) + + @param noFileNotFoundMessage if the file isn't found and this param + is true it won't complain, otherwise it will + + @param errorBuffer If an error occurs and this is not NULL, copy a description of the error into this buffer + + @param errorBufferLen the length of @a errorBuffer + + @param sectionsToParse if NULL, then parse all sections; otherwise, + a list of the section names that should be parsed (sections not in + the list are ignored) + + @param highestPriority Any configuration settings with a priority before +this are ignored + + @param lowestPriority Any configuration settings with a priority after +this are ignored. + + @param restartLevelNeeded for internal use, leave as NULL + **/ +AREXPORT bool ArConfig::parseFile(const char *fileName, + bool continueOnErrors, + bool noFileNotFoundMessage, + char *errorBuffer, + size_t errorBufferLen, + std::list *sectionsToParse, + ArPriority::Priority highestPriority, + ArPriority::Priority lowestPriority, + ArConfigArg::RestartLevel *restartLevelNeeded) +{ + bool ret = true; + + if(fileName) + myFileName = fileName; + else + myFileName = ""; + + ArLog::log(myProcessFileCallbacksLogLevel, + "Starting parsing file %s (%s)", myFileName.c_str(), fileName); + + + if (errorBuffer != NULL) + errorBuffer[0] = '\0'; + + // Should be null, but just in case... + if (mySectionsToParse != NULL) + { + delete mySectionsToParse; + mySectionsToParse = NULL; + } + + copySectionsToParse(sectionsToParse); + myHighestPriorityToParse = highestPriority; + myLowestPriorityToParse = lowestPriority; + myRestartLevelNeeded = ArConfigArg::NO_RESTART; + if (restartLevelNeeded != NULL) + myCheckingForRestartLevel = true; + else + myCheckingForRestartLevel = false; + + + // parse the file (errors will go into myErrorBuffer from the functors) + ret = myParser.parseFile(fileName, continueOnErrors, noFileNotFoundMessage); + + // set our pointers so we don't copy anymore into/over it + if (errorBuffer != NULL && errorBuffer[0] != '\0') + { + errorBuffer = NULL; + errorBufferLen = 0; + } + //printf("file %s\n", ArUtil::convertBool(ret)); + + // if we have a parser and haven't failed (or we continue on errors) + // then parse the arguments from the parser + if (myArgumentParser != NULL && (ret || continueOnErrors)) + ret = parseArgumentParser(myArgumentParser, continueOnErrors, + errorBuffer, errorBufferLen) && ret; + + // set our pointers so we don't copy anymore into/over it + if (errorBuffer != NULL && errorBuffer[0] != '\0') + { + errorBuffer = NULL; + errorBufferLen = 0; + } + //printf("parser %s\n", ArUtil::convertBool(ret)); + + // if we haven't failed (or we continue on errors) then call the + // process file callbacks + if (ret || continueOnErrors) + ret = callProcessFileCallBacks(continueOnErrors, errorBuffer, + errorBufferLen) && ret; + // copy our error if we have one and haven't copied in yet + // set our pointers so we don't copy anymore into/over it + if (errorBuffer != NULL && errorBuffer[0] != '\0') + { + errorBuffer = NULL; + errorBufferLen = 0; + } + + if (restartLevelNeeded != NULL) + *restartLevelNeeded = myRestartLevelNeeded; + + // Done with the temp parsing info, so delete it... + delete mySectionsToParse; + mySectionsToParse = NULL; + + myHighestPriorityToParse = ArPriority::FIRST_PRIORITY; + myLowestPriorityToParse = ArPriority::LAST_PRIORITY; + myRestartLevelNeeded = ArConfigArg::NO_RESTART; + myCheckingForRestartLevel = true; + + ArLog::log(myProcessFileCallbacksLogLevel, + "Done parsing file %s (ret %s)", fileName, + ArUtil::convertBool(ret)); + return ret; +} + +/** + @param fileName the name of the file to write out + + @param append if true then text will be appended to the file if it exists, otherwise any existing file will be overwritten. + + @param alreadyWritten if non-NULL, a list of strings that have already been + written out, don't write it again if it's in this list; when + something is written by this function, then it is put it into this list + + @param writeExtras if this is true then the priority, display hint, restart level, and other later extras of each parameter will + also be written to the file, if it is false they will not be + + @param sectionsToWrite if NULL, then write all sections; otherwise, + a list of the section names that should be written + + @param highestPriority the ArPriority::Priority that specifies the minimum (numerical) + priority that a parameter must have in order to be written; not related to the + writeExtras flag + + @param lowestPriority the ArPriority::Priority that specifies the maximum (numerical) + priority that a parameter must have in order to be written; not related to the + writeExtras flag + **/ +AREXPORT bool ArConfig::writeFile(const char *fileName, + bool append, + std::set *alreadyWritten, + bool writeExtras, + std::list *sectionsToWrite, + ArPriority::Priority highestPriority, + ArPriority::Priority lowestPriority) +{ + FILE *file; + + std::set writtenSet; + std::set *written; + if (alreadyWritten != NULL) + written = alreadyWritten; + else + written = &writtenSet; + //std::list::iterator it; + + // later this'll have a prefix + std::string realFileName; + if (fileName[0] == '/' || fileName[0] == '\\') + { + realFileName = fileName; + } + else + { + realFileName = myBaseDirectory; + realFileName += fileName; + } + + std::string mode; + + if (append) + mode = "a"; + else + mode = "w"; + + if ((file = ArUtil::fopen(realFileName.c_str(), mode.c_str())) == NULL) + { + ArLog::log(ArLog::Terse, "%sCannot open file '%s' for writing", + myLogPrefix.c_str(), realFileName.c_str()); + return false; + } + + // Start the config file with version information + fprintf(file, "%s %s\n", CONFIG_VERSION_TAG, CURRENT_CONFIG_VERSION); + + bool firstSection = true; + std::list::iterator sectionIt; + ArConfigSection *section = NULL; + + // first write out the generic section (ie sectionless stuff, mostly + // for backwards compatibility) + if ( ((section = findSection("")) != NULL) && + (sectionsToWrite == NULL) ) + { + if (!firstSection) + fprintf(file, "\n"); + firstSection = false; + writeSection(section, file, written, writeExtras, highestPriority, lowestPriority); + } + + // then write out the rest (skip the generic section if we have one) + for (sectionIt = mySections.begin(); + sectionIt != mySections.end(); + sectionIt++) + { + section = (*sectionIt); + if (strcmp(section->getName(), "") == 0) + continue; + + if (sectionsToWrite != NULL) { + bool isSectionFound = false; + for (std::list::iterator swIter = sectionsToWrite->begin(); + swIter != sectionsToWrite->end(); + swIter++) { + std::string sp = *swIter; + if (ArUtil::strcasecmp(section->getName(), sp.c_str()) == 0) { + isSectionFound = true; + break; + } + } // end for each section to write + + if (!isSectionFound) { + continue; + } + + } // end if sections specified + + if (!firstSection) + fprintf(file, "\n"); + firstSection = false; + + writeSection(section, file, written, writeExtras, highestPriority, lowestPriority); + } + fclose(file); + return true; +} + +// ----------------------------------------------------------------------------- + + +/// Parse a config resource file, for translation. +AREXPORT bool ArConfig::parseResourceFile(const char *fileName, + bool continueOnError, + char *errorBuffer, + size_t errorBufferLen, + std::list *sectionsToParse) +{ + bool ret = true; + + if(fileName) + myFileName = fileName; + else + myFileName = ""; + + + if (errorBuffer != NULL) + errorBuffer[0] = '\0'; + + + // stat(fileName, &myReadFileStat); + FILE *file = NULL; + + char line[10000]; + + ArLog::log(ArLog::Normal, + "%sArConfig::parseResourceFile() Opening file %s", + myLogPrefix.c_str(), + fileName); + + + // Open file in binary mode to avoid conversion of CRLF in windows. + // This is necessary so that a consistent checksum value is obtained. + if ((file = ArUtil::fopen(fileName, "rb")) == NULL) + { + ArLog::log(ArLog::Terse, "Cannot open file '%s'", fileName); + // TODO This used to put the config param name into the error buffer + if (errorBuffer != NULL) { + snprintf(errorBuffer, errorBufferLen, + "Resource file invalid: cannot open file '%s'", + fileName); + } + return false; + } + + + bool isSuccess = true; + + char *localErrorBuffer = NULL; + size_t localErrorBufferLen = 0; + + if ((errorBuffer != NULL) && (errorBufferLen > 0)) { + localErrorBufferLen = errorBufferLen; + localErrorBuffer = new char[localErrorBufferLen]; + localErrorBuffer[0] = '\0'; + } + + // KMC TODO Parse and use the version info someday. + // Parse resource version. + fgets(line, sizeof(line), file); + + // KMC TODO This needs to be improved... made more generic... possibly test + // that this is really header information. + // + // Skipping two lines for the header. The third one is blank. + for (int h = 0; h < 2; h++) { + if (fgets(line, sizeof(line), file) == NULL) { + ArLog::log(ArLog::Terse, "%sArConfig::parseResourceFile() Header missing in '%s'", + myLogPrefix.c_str(), + fileName); + return false; + } + } + + bool ignoreNormalSpaces = true; + + while ((fgets(line, sizeof(line), file) != NULL)) + { + if (ArUtil::isStrEmpty(line)) { + continue; + } + + ArArgumentBuilder builder(512, myCsvSeparatorChar, ignoreNormalSpaces); // , true, true); + + builder.addPlain(line); + + if ((builder.getArgc() == 0) || + (ArUtil::isStrEmpty(builder.getArg(0)))) { + continue; // More whitespace possibilities + } + if (builder.getArgc() < ArConfigArg::RESOURCE_INDEX_OF_DESCRIPTION) { + // KMC Commented this out because Ctrl-M frequently shows in log + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() no section for %s", + builder.getFullString())); + + continue; + } + + std::string sectionName = ArConfigArg::parseResourceSectionName(&builder, + myLogPrefix.c_str()); + + ArConfigSection *section = findSection(sectionName.c_str()); + if (section == NULL) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() adding section %s", + sectionName.c_str())); + if (!addSection(CATEGORY_DEBUG, sectionName.c_str(), "")) { + ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() error adding section %s", + sectionName.c_str()); + continue; + } + + section = findSection(sectionName.c_str()); + if (section == NULL) { + ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() error finding new section %s", + sectionName.c_str()); + continue; + } + } + + std::string argName = ArConfigArg::parseResourceArgName(&builder, + myLogPrefix.c_str()); + + // An empty argument name means that the section comment should be set. + if (argName.empty()) { + + std::string desc = ArConfigArg::parseResourceDescription(&builder, + myLogPrefix.c_str()); + + if (!desc.empty()) { + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() setting comment for section %s", + section->getName())); + + section->setComment(desc.c_str()); + } + continue; + + } // end if no parameter name + + + ArConfigArg::Type argType = ArConfigArg::parseResourceType(&builder, + myLogPrefix.c_str()); + + bool isTopLevel = ArConfigArg::isResourceTopLevel(&builder, + myLogPrefix.c_str()); + + ArConfigArg *curArg = NULL; + ArConfigArg *parentArg = NULL; + + if (isTopLevel) { + curArg = section->findParam(argName.c_str()); + } + else { + std::list parentPath = ArConfigArg::parseResourceParentPath(&builder, + '|', // TODO Constant + myLogPrefix.c_str()); + parentArg = section->findParam(parentPath, true); // allow holders + if (parentArg != NULL) { + curArg = parentArg->findArg(argName.c_str()); + } + } + + if (curArg == NULL) { + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() creating arg for %s", + argName.c_str())); + + // This is a hack that should be fixed someday. If the arg type is a + // list, then create a list arg -- to which children can be added. + // If the arg is a normal arg, then create a string holder. + if ((argType != ArConfigArg::LIST) && (argType != ArConfigArg::LIST_HOLDER)) { + curArg = new ArConfigArg(ArConfigArg::STRING_HOLDER, argName.c_str(), ""); + } + else { + curArg = new ArConfigArg(ArConfigArg::LIST_HOLDER, argName.c_str(), ""); + } + + if (curArg->parseResource(&builder, NULL, 0, myLogPrefix.c_str())) { + + if (isTopLevel) { + addParamAsIs(*curArg, sectionName.c_str()); + } + else if (parentArg != NULL) { + parentArg->addArg(*curArg); + } + } + } + else { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() found arg for %s", + argName.c_str())); + curArg->parseResource(&builder, NULL, 0, myLogPrefix.c_str()); + } + + + } // end while more lines to read + + + fclose(file); + + + return ret; + +} // end method parseResourceFile + +/// Parse a config resource file with parameters suitable for custom commands. +AREXPORT void ArConfig::parseResourceFile(ArArgumentBuilder *builder) +{ + if ((builder == NULL) || + (builder->getArgc() <= 0) || + (builder->getArg(0) == NULL)) { + ArLog::log(ArLog::Normal, + "ArConfig::parseResourceFile() invalid input"); + return; + } + parseResourceFile(builder->getArg(0)); +} // end method parseResourceFile + + + +/// Write a config resource file, for translation. +AREXPORT bool ArConfig::writeResourceFile(const char *fileName, + bool append, + std::set *alreadyWritten, + std::list *sectionsToWrite) +{ + FILE *file = NULL; + char headerBuf[1024]; + + std::set writtenSet; + std::set *written = NULL; + if (alreadyWritten != NULL) + written = alreadyWritten; + else + written = &writtenSet; + + // later this'll have a prefix + std::string realFileName; + if (fileName[0] == '/' || fileName[0] == '\\') + { + realFileName = fileName; + } + else + { + realFileName = myBaseDirectory; + realFileName += fileName; + } + + std::string mode = ((!append) ? "wb" : "a"); + + if ((file = ArUtil::fopen(realFileName.c_str(), mode.c_str())) == NULL) + { + ArLog::log(ArLog::Terse, "%sCannot open file '%s' for writing", + myLogPrefix.c_str(), realFileName.c_str()); + return false; + } + + // Start the resource file with version information + fprintf(file, "%s %s\n", RESOURCE_VERSION_TAG, CURRENT_RESOURCE_VERSION); + + int headerLineCount = ArConfigArg::writeResourceHeader(file, + headerBuf, + sizeof(headerBuf), + myCsvSeparatorChar, + "SECTION", + myLogPrefix.c_str()); + + ArLog::log(ArLog::Normal, + "%sArConfig::writeResourceFile() file %s, %s %s, header contains %i lines", + myLogPrefix.c_str(), + realFileName.c_str(), + RESOURCE_VERSION_TAG, + CURRENT_RESOURCE_VERSION, + headerLineCount); + + bool firstSection = true; + ArConfigSection *section = NULL; + + // first write out the generic section (ie sectionless stuff, mostly + // for backwards compatibility) + if ( ((section = findSection("")) != NULL) && + (sectionsToWrite == NULL) ) + { + if (!firstSection) + fprintf(file, "\n"); + firstSection = false; + writeSectionResource(section, file, written); + } + + // then write out the rest (skip the generic section if we have one) + for (std::list::iterator sectionIt = mySections.begin(); + sectionIt != mySections.end(); + sectionIt++) + { + section = (*sectionIt); + if (strcmp(section->getName(), "") == 0) + continue; + + if (sectionsToWrite != NULL) { + bool isSectionFound = false; + for (std::list::iterator swIter = sectionsToWrite->begin(); + swIter != sectionsToWrite->end(); + swIter++) { + std::string sp = *swIter; + if (ArUtil::strcasecmp(section->getName(), sp.c_str()) == 0) { + isSectionFound = true; + break; + } + } // end for each section to write + + if (!isSectionFound) { + continue; + } + + } // end if sections specified + + if (!firstSection) + fprintf(file, "\n"); + firstSection = false; + + writeSectionResource(section, file, written); + } + fclose(file); + return true; + +} // end method writeResourceFile + +/// Write a config resource file with parameters suitable for custom commands. +AREXPORT void ArConfig::writeResourceFile(ArArgumentBuilder *builder) +{ + if ((builder == NULL) || + (builder->getArgc() <= 0) || + (builder->getArg(0) == NULL)) { + ArLog::log(ArLog::Normal, + "ArConfig::writeResourceFile() invalid input"); + return; + } + writeResourceFile(builder->getArg(0)); + +} // end method writeResourceFile + +// ----------------------------------------------------------------------------- + + +AREXPORT void ArConfig::writeSection(ArConfigSection *section, + FILE *file, + std::set *alreadyWritten, + bool writeExtras, + ArPriority::Priority highestPriority, + ArPriority::Priority lowestPriority) +{ + // holds each line + char line[1024]; + //// holds the fprintf + //char startLine[128]; + bool commented = false; + unsigned int startCommentColumn = 25; + + + /// clear out our written ones between sections + alreadyWritten->clear(); + + if (!ArUtil::isStrEmpty(section->getName())) { + //fprintf(file, "; %s\n", section->getName()); + fprintf(file, "Section %s\n", section->getName()); + } + + sprintf(line, "; "); + + if (!ArUtil::isStrEmpty(section->getComment())) + { + ArConfigArg::writeMultiLineComment(section->getComment(), + file, + line, + sizeof(line), + "; "); + } + + fprintf(file, ";SectionFlags for %s: %s\n", + section->getName(), section->getFlags()); + + std::list *params = section->getParams(); + + if (params == NULL) { + return; + } + + for (std::list::iterator paramIt = params->begin(); + paramIt != params->end(); + paramIt++) + { + commented = false; + + ArConfigArg *param = &(*paramIt); + + if (param->getType() == ArConfigArg::SEPARATOR) { + continue; + } + + if (alreadyWritten != NULL && + param->getType() != ArConfigArg::DESCRIPTION_HOLDER && + alreadyWritten->find(param->getName()) != alreadyWritten->end()) + continue; + + else if (alreadyWritten != NULL && + param->getType() != ArConfigArg::DESCRIPTION_HOLDER) + { + alreadyWritten->insert(param->getName()); + } + + // If the parameter's priority does not fall in the specified bounds, + // then do not write it. + if ((param->getConfigPriority() < highestPriority) || + (param->getConfigPriority() > lowestPriority)) { + continue; + } + + // Write the parameter to the file. + param->writeArguments(file, + line, + sizeof(line), + startCommentColumn, + writeExtras, + myLogPrefix.c_str()); + + + // now put a blank line between params if we should + if (!myNoBlanksBetweenParams) + fprintf(file, "\n"); + } +} + + + + +AREXPORT void ArConfig::writeSectionResource(ArConfigSection *section, + FILE *file, + std::set *alreadyWritten) +{ + if ((section == NULL) || (file == NULL)) { + ArLog::log(ArLog::Normal, + "ArConfig::writeSectionResource() error, invalid input"); + return; + } + + // holds each line + char line[10000]; // KMC TODO Reasonable max? + const size_t lineSize = sizeof(line); + + /// clear out our written ones between sections + if (alreadyWritten != NULL) { + alreadyWritten->clear(); + } + + ArConfigArg::writeResourceSectionHeader(file, + line, + lineSize, + myCsvSeparatorChar, + section->getName(), + section->getComment(), + "", + "", // TODO Display name + true, // TODO, + myLogPrefix.c_str()); + + std::list *params = section->getParams(); + + if (params == NULL) { + return; + } + + for (std::list::iterator paramIt = params->begin(); + paramIt != params->end(); + paramIt++) + { + + ArConfigArg *param = &(*paramIt); + + if (param->getType() == ArConfigArg::SEPARATOR) { + continue; + } + if (ArUtil::isStrEmpty(param->getName())) { + continue; + } + if (alreadyWritten != NULL && + param->getType() != ArConfigArg::DESCRIPTION_HOLDER && + alreadyWritten->find(param->getName()) != alreadyWritten->end()) + continue; + + else if (alreadyWritten != NULL && + param->getType() != ArConfigArg::DESCRIPTION_HOLDER) + { + alreadyWritten->insert(param->getName()); + } + + // Write the parameter to the file. + param->writeResource(file, + line, + lineSize, + myCsvSeparatorChar, + section->getName(), + myLogPrefix.c_str()); + + } +} // end method writeSectionResource + +AREXPORT void ArConfig::translateSection(ArConfigSection *section) +{ + if ((section == NULL) || (ArUtil::isStrEmpty(section->getName()))) { + return; + } + + IFDEBUG(ArLog::log(ArLog::Normal, + "%sArConfig::translateSection() %stranslator for %s", + myLogPrefix.c_str(), + ((myTranslator != NULL) ? "" : "NULL "), + section->getName())); + + if (myTranslator != NULL) + { + ArConfigSection *xltrSection = myTranslator->findSection(section->getName()); + + if (xltrSection != NULL) { + if (!ArUtil::isStrEmpty(xltrSection->getComment())) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::addSection() translator section for %s", + section->getName())); + section->setComment(xltrSection->getComment()); + } + else { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfig::addSection() no comment in translator section for %s", + section->getName())); + } + } + else { + ArLog::log(ArLog::Normal, + "ArConfig::addSection() did not find translator section for %s", + section->getName()); + } + } + +} // end method translateSection + + +AREXPORT const char *ArConfig::getBaseDirectory(void) const +{ + return myBaseDirectory.c_str(); +} + +AREXPORT void ArConfig::setBaseDirectory(const char *baseDirectory) +{ + if (baseDirectory != NULL && strlen(baseDirectory) > 0) + myBaseDirectory = baseDirectory; + else + myBaseDirectory = ""; + + myParser.setBaseDirectory(baseDirectory); +} + +AREXPORT const char *ArConfig::getFileName(void) const +{ + return myFileName.c_str(); +} + +/** + After a file has been read all the way these processFileCBs are + called in the priority (higher numbers first)... these are only + called if there were no errors parsing the file or + continueOnError was set to false when parseFile was called + + The functor should return true if the config parsed was good + (parseFile will return true) false if the config parsed wasn't + (parseFile will return false) + + @param functor the functor to call + + @param priority the functors are called in descending order, if two + things have the same number the first one added is the first one + called +**/ +AREXPORT void ArConfig::addProcessFileCB(ArRetFunctor *functor, + int priority) +{ + myProcessFileCBList.insert( + std::pair(-priority, + new ProcessFileCBType(functor))); +} + +/** + Removes a processFileCB, see addProcessFileCB for details + **/ +AREXPORT void ArConfig::remProcessFileCB(ArRetFunctor *functor) +{ + std::multimap::iterator it; + ProcessFileCBType *cb; + + for (it = myProcessFileCBList.begin(); it != myProcessFileCBList.end(); ++it) + { + if ((*it).second->haveFunctor(functor)) + { + cb = (*it).second; + myProcessFileCBList.erase(it); + delete cb; + remProcessFileCB(functor); + return; + } + } +} + +/** + After a file has been read all the way these processFileCBs are + called in the priority (higher numbers first)... these are only + called if there were no errors parsing the file or + continueOnError was set to false when parseFile was called + + The functor should return true if the config parsed was good + (parseFile will return true) false if the config parsed wasn't + (parseFile will return false) + + @param functor the functor to call + + @param priority the functors are called in descending order, if two + things have the same number the first one added is the first one + called +**/ +AREXPORT void ArConfig::addProcessFileCB( + ArRetFunctor2 *functor, + int priority) +{ + if (functor->getName() != NULL && functor->getName()[0] != '\0') + ArLog::log(ArLog::Normal, "ArConfig::addProcessFileCB: Adding error handler callback %s that should have used addProcessFileWithErrorCB", functor->getName()); + else + ArLog::log(ArLog::Normal, "ArConfig::addProcessFileCB: Adding anonymous error handler callback that should have used addProcessFileWithErrorCB"); + myProcessFileCBList.insert( + std::pair(-priority, + new ProcessFileCBType(functor))); +} +/** + This function has a different name than addProcessFileCB just so + that if you mean to get this function but have the wrong functor + you'll get an error. The rem's are the same though since that + shouldn't matter. + + After a file has been read all the way these processFileCBs are + called in the priority (higher numbers first)... these are only + called if there were no errors parsing the file or + continueOnError was set to false when parseFile was called + + The functor should return true if the config parsed was good + (parseFile will return true) false if the config parsed wasn't + (parseFile will return false) + + @param functor the functor to call (the char * and unsigned int + should be used by the functor to put an error message into that + buffer) + + @param priority the functors are called in descending order, if two + things have the same number the first one added is the first one + called +**/ +AREXPORT void ArConfig::addProcessFileWithErrorCB( + ArRetFunctor2 *functor, + int priority) +{ + myProcessFileCBList.insert( + std::pair(-priority, + new ProcessFileCBType(functor))); +} + +/** + Removes a processFileCB, see addProcessFileCB for details + **/ +AREXPORT void ArConfig::remProcessFileCB( + ArRetFunctor2 *functor) +{ + std::multimap::iterator it; + ProcessFileCBType *cb; + + for (it = myProcessFileCBList.begin(); it != myProcessFileCBList.end(); ++it) + { + if ((*it).second->haveFunctor(functor)) + { + cb = (*it).second; + myProcessFileCBList.erase(it); + delete cb; + remProcessFileCB(functor); + } + } +} + +AREXPORT bool ArConfig::callProcessFileCallBacks(bool continueOnErrors, + char *errorBuffer, + size_t errorBufferLen) +{ + bool ret = true; + std::multimap::iterator it; + ProcessFileCBType *callback; + ArLog::LogLevel level = myProcessFileCallbacksLogLevel; + + // reset our section to nothing again + mySection = ""; + + // in windows, can't simply declare an array of errorBufferLen -- so + // allocate one. + + // empty the buffer, we're only going to put the first error in it + if (errorBuffer != NULL && errorBufferLen > 0) + errorBuffer[0] = '\0'; + + ArLog::log(level, "%sProcessing file", myLogPrefix.c_str()); + for (it = myProcessFileCBList.begin(); + it != myProcessFileCBList.end(); + ++it) + { + callback = (*it).second; + if (callback->getName() != NULL && callback->getName()[0] != '\0') + ArLog::log(level, "%sProcessing functor '%s' (%d)", + myLogPrefix.c_str(), + callback->getName(), -(*it).first); + else + ArLog::log(level, "%sProcessing unnamed functor (%d)", + myLogPrefix.c_str(), + -(*it).first); + if (!(*it).second->call(errorBuffer, errorBufferLen)) + { + //printf("# %s\n", scratchBuffer); + + // if there is an error buffer and it got filled get rid of our + // pointer to it + if (errorBuffer != NULL && errorBuffer[0] != '\0') + { + errorBuffer = NULL; + errorBufferLen = 0; + } + ret = false; + if (!continueOnErrors) + { + if (callback->getName() != NULL && callback->getName()[0] != '\0') + ArLog::log(ArLog::Normal, "ArConfig: Failed, stopping because the '%s' process file callback failed", + callback->getName()); + else + ArLog::log(ArLog::Normal, "ArConfig: Failed, stopping because unnamed process file callback failed"); + break; + } + else + { + if (callback->getName() != NULL && callback->getName()[0] != '\0') + ArLog::log(ArLog::Normal, "ArConfig: Failed but continuing, the '%s' process file callback failed", + callback->getName()); + else + ArLog::log(ArLog::Normal, "ArConfig: Failed but continuing, an unnamed process file callback failed"); + } + + } + } + if (ret || continueOnErrors) + { + ArLog::log(level, "%sProcessing with own processFile", + myLogPrefix.c_str()); + if (!processFile()) + ret = false; + } + ArLog::log(level, "%sDone processing file, ret is %s", myLogPrefix.c_str(), + ArUtil::convertBool(ret)); + + return ret; +} + + +AREXPORT std::list ArConfig::getCategoryNames() const +{ + std::list retList; + + for (std::map >::const_iterator iter = + myCategoryToSectionsMap.begin(); + iter != myCategoryToSectionsMap.end(); + iter++) { + retList.push_back(iter->first); + } + return retList; + +} // end method getCategoryNames + + +/** + * @param categoryName the char * name of the category for which to find the + * section names; if empty/null, then the method returns the names of all + * sections that have not been included in any category +**/ +AREXPORT std::list ArConfig::getSectionNamesInCategory + (const char *categoryName) const +{ + std::list retList; + + if (!ArUtil::isStrEmpty(categoryName)) { + + std::map >::const_iterator iter = + myCategoryToSectionsMap.find(categoryName); + if (iter != myCategoryToSectionsMap.end()) { + retList = iter->second; + } + } + else { // find sections that have no category + + for (std::list::const_iterator sIter = mySections.begin(); + sIter != mySections.end(); + sIter++) { + + const ArConfigSection *section = *sIter; + if ((section != NULL) && + (!ArUtil::isStrEmpty(section->getName())) && + (ArUtil::isStrEmpty(section->getCategoryName()))) { + retList.push_back(section->getName()); + } + } // end for each section + + } // end else find sections that have no category + + return retList; + +} // end method getSectionNamesInCategory + + +AREXPORT std::list ArConfig::getSectionNames() const +{ + std::list retList; + + for (std::list::const_iterator sIter = mySections.begin(); + sIter != mySections.end(); + sIter++) { + + const ArConfigSection *section = *sIter; + if ((section != NULL) && + (!ArUtil::isStrEmpty(section->getName()))) { + retList.push_back(section->getName()); + } + } // end for each section + + return retList; + +} // end method getSectionNames + + +AREXPORT std::list *ArConfig::getSections(void) +{ + return &mySections; +} + + +AREXPORT void ArConfig::setNoBlanksBetweenParams(bool noBlanksBetweenParams) +{ + myNoBlanksBetweenParams = noBlanksBetweenParams; +} + +AREXPORT bool ArConfig::getNoBlanksBetweenParams(void) +{ + return myNoBlanksBetweenParams; +} + +/** + This argument parser the arguments in to check for parameters of + this name, note that ONLY the first parameter of this name will be + used, so if you have duplicates only the first one will be set. + **/ +AREXPORT void ArConfig::useArgumentParser(ArArgumentParser *parser) +{ + myArgumentParser = parser; +} + +AREXPORT bool ArConfig::parseArgumentParser(ArArgumentParser *parser, + bool continueOnError, + char *errorBuffer, + size_t errorBufferLen) +{ + std::list::iterator sectionIt; + std::list::iterator paramIt; + ArConfigSection *section = NULL; + ArConfigArg *param = NULL; + std::list *params = NULL; + + bool ret; + size_t i; + std::string strArg; + std::string strUndashArg; + ArArgumentBuilder builder; + builder.setQuiet(myIsQuiet); + + bool plainMatch; + + for (i = 0; i < parser->getArgc(); i++) + { + if (parser->getArg(i) == NULL) + { + ArLog::log(ArLog::Terse, "%sset up wrong (parseArgumentParser broken).", + myLogPrefix.c_str()); + if (errorBuffer != NULL) + strncpy(errorBuffer, + "ArConfig set up wrong (parseArgumentParser broken).", + errorBufferLen); + return false; + } + strArg = parser->getArg(i); + if (parser->getArg(i)[0] == '-') + strUndashArg += &parser->getArg(i)[1]; + else + strUndashArg = ""; + //printf("normal %s undash %s\n", strArg.c_str(), strUndashArg.c_str()); + for (sectionIt = mySections.begin(); + sectionIt != mySections.end(); + sectionIt++) + { + section = (*sectionIt); + params = section->getParams(); + + for (paramIt = params->begin(); paramIt != params->end(); paramIt++) + { + param = &(*paramIt); + /* + printf("### normal %s undash %s %d %d\n", strArg.c_str(), + strUndashArg.c_str(), + ArUtil::strcasecmp(param->getName(), strArg), + ArUtil::strcasecmp(param->getName(), strUndashArg)); + */ + if (strlen(param->getName()) > 0 && + ((plainMatch = ArUtil::strcasecmp(param->getName(),strArg)) == 0 || + ArUtil::strcasecmp(param->getName(), strUndashArg) == 0)) + { + if (plainMatch == 0) + builder.setExtraString(strArg.c_str()); + else + builder.setExtraString(strUndashArg.c_str()); + if (i+1 < parser->getArgc()) + { + builder.addPlain(parser->getArg(i+1)); + parser->removeArg(i+1); + } + parser->removeArg(i); + + // set us to use the section this is in and then parse the argument + std::string oldSection = mySection; + bool oldSectionBroken = mySectionBroken; + bool oldSectionIgnored = mySectionIgnored; + bool oldUsingSections = myUsingSections; + bool oldDuplicateParams = myDuplicateParams; + mySection = section->getName(); + mySectionBroken = false; + mySectionIgnored = false; // ?? TODO + myUsingSections = true; + myDuplicateParams = false; + ret = parseArgument(&builder, errorBuffer, errorBufferLen); + mySection = oldSection; + mySectionBroken = oldSectionBroken; + mySectionIgnored = oldSectionIgnored; + myUsingSections = oldUsingSections; + myDuplicateParams = oldDuplicateParams; + + // if we parsed the argument right or are continuing on + // errors call ourselves again (so we don't hose iterators up above) + if (ret || continueOnError) + { + //printf("Ret %s\n", ArUtil::convertBool(ret)); + return ret && parseArgumentParser(parser, continueOnError, + errorBuffer, errorBufferLen); + } + else + return false; + } + } + } + } + + return true; +} + +AREXPORT ArConfigSection *ArConfig::findSection(const char *sectionName) const +{ + // KMC 6/26/13 Added this to prevent exception in call to strcasecmp (at + // least in its current implementation). Still allowing a search for an + // empty string because that would have previously worked, and do not want + // to break any existing functionality. + if (sectionName == NULL) { + ArLog::log(ArLog::Normal, + "ArConfig::findSection() cannot find NULL section name"); + return NULL; + } + + ArConfigSection *section = NULL; + ArConfigSection *tempSection = NULL; + + for (std::list::const_iterator sectionIt = mySections.begin(); + sectionIt != mySections.end(); + sectionIt++) + { + tempSection = (*sectionIt); + if (tempSection == NULL) { + ArLog::log(ArLog::Normal, + "ArConfig::findSection(%s) unexpected null section in config", + sectionName); + continue; + } + + + if (ArUtil::strcasecmp(tempSection->getName(), sectionName) == 0) + { + section = tempSection; + // KMC 7/11/12 Added the break here (hoping there's not a compelling + // reason to always search the config for null sections. + break; + } + } + return section; + +} // end method findSection + + +void ArConfig::copySectionsToParse(std::list *from) +{ + // MPL inserted these two lines trying to track down a memory leak + if (mySectionsToParse != NULL) + delete mySectionsToParse; + std::string sections; + mySectionsToParse = NULL; + if (from != NULL) { + mySectionsToParse = new std::list(); + for (std::list::const_iterator spIter = from->begin(); + spIter != from->end(); + spIter++) { + sections += "'"; + sections += (*spIter); + sections += "' "; + mySectionsToParse->push_back(*spIter); + } // end for each section to parse + ArLog::log(ArLog::Verbose, "Will parse section(s) %s", sections.c_str()); + } // end if copy sections to parse + else + { + ArLog::log(ArLog::Verbose, "Will parse all sections"); + } +} // end method copySectionsToParse + +void ArConfig::addSectionNotToParse(const char *section) +{ + ArLog::log(ArLog::Normal, "%sWill not parse section %s", + myLogPrefix.c_str(), section); + mySectionsNotToParse.insert(section); +} // end method copySectionsToParse + + + +void ArConfig::remSectionNotToParse(const char *section) +{ + ArLog::log(ArLog::Normal, "%sWill not not parse section %s", + myLogPrefix.c_str(), section); + mySectionsNotToParse.erase(section); +} // end method copySectionsToParse + + + +AREXPORT void ArConfig::clearAllValueSet(void) +{ + std::list *sections; + ArConfigSection *section; + std::list::iterator sectionIt; + + std::list *params; + ArConfigArg *param; + std::list::iterator paramIt; + + sections = getSections(); + for (sectionIt = sections->begin(); + sectionIt != sections->end(); + sectionIt++) + { + section = (*sectionIt); + params = section->getParams(); + for (paramIt = params->begin(); paramIt != params->end(); paramIt++) + { + param = &(*paramIt); + param->clearValueSet(); + } + } +} + + +AREXPORT void ArConfig::removeAllUnsetValues(void) +{ + removeAllUnsetValues(false); +} + +AREXPORT void ArConfig::removeAllUnsetSections(void) +{ + removeAllUnsetValues(true); +} + + +AREXPORT void ArConfig::removeAllUnsetValues(bool isRemovingUnsetSectionsOnly) +{ + std::list *sections; + ArConfigSection *section; + std::list::iterator sectionIt; + + std::list *params; + ArConfigArg *param; + std::list::iterator paramIt; + std::list::iterator> removeParams; + std::list::iterator>::iterator removeParamsIt; + + sections = getSections(); + for (sectionIt = sections->begin(); + sectionIt != sections->end(); + sectionIt++) + { + section = (*sectionIt); + params = section->getParams(); + for (paramIt = params->begin(); paramIt != params->end(); paramIt++) + { + param = &(*paramIt); + if (param->getType() != ArConfigArg::SEPARATOR && + param->getType() != ArConfigArg::STRING_HOLDER && + param->getType() != ArConfigArg::LIST_HOLDER && + param->getType() != ArConfigArg::DESCRIPTION_HOLDER) + { + if (!param->isValueSet()) { + removeParams.push_back(paramIt); + } + else if (isRemovingUnsetSectionsOnly) { + removeParams.clear(); + break; + } + } + + } + while ((removeParamsIt = removeParams.begin()) != removeParams.end()) + { + ArLog::log(ArLog::Verbose, + "%s:removeAllUnsetValues: Removing %s:%s", + myLogPrefix.c_str(), + section->getName(), (*(*removeParamsIt)).getName()); + section->getParams()->erase((*removeParamsIt)); + removeParams.pop_front(); + } + } +} + + + +/** + This is more temporary than some of the others like 'setSaveUknown' + and such, this should be called by anything that's going to parse + the config... +**/ +AREXPORT void ArConfig::setPermissions( + bool allowFactory, bool saveUnknown) +{ + myPermissionAllowFactory = allowFactory; + myPermissionSaveUnknown = saveUnknown; + + ArLog::log(ArLog::Normal, "%s: Setting permissions of allowFactory to %s and saveUnknown to %s", + myLogPrefix.c_str(), + ArUtil::convertBool(myPermissionAllowFactory), + ArUtil::convertBool(myPermissionSaveUnknown)); +} + +AREXPORT ArConfigArg::RestartLevel ArConfig::getRestartLevelNeeded(void) const +{ + return myRestartLevelNeeded; +} + +AREXPORT void ArConfig::resetRestartLevelNeeded(void) +{ + myRestartLevelNeeded = ArConfigArg::NO_RESTART; +} + + +void ArConfig::addListNamesToParser(const ArConfigArg &parent) +{ + if (parent.getType() != ArConfigArg::LIST) + return; + + std::list children = parent.getArgs(); + std::list::iterator it; + + for (it = children.begin(); it != children.end(); it++) + { + ArConfigArg child = (*it); + //ArLog::log(ArLog::Normal, "@@@ Adding %s", child.getName()); + if (!myParser.addHandlerWithError(child.getName(), &myParserCB)) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "%sCould not add parameter '%s' to file parser, probably already there.", + myLogPrefix.c_str(), child.getName()); + } + } + addListNamesToParser(child); + } +} + +AREXPORT ArConfigSection::ArConfigSection(const char *name, + const char *comment, + bool isQuiet, + const char *categoryName) : + myName((name != NULL) ? name : ""), + myComment((comment != NULL) ? comment : ""), + myCategoryName((categoryName != NULL) ? categoryName : ""), + myDisplayName(""), + myFlags(NULL), + myParams(), + myIsQuiet(isQuiet) +{ + myFlags = new ArArgumentBuilder(512, '|'); + myFlags->setQuiet(myIsQuiet); +} + +AREXPORT ArConfigSection::~ArConfigSection() +{ + delete myFlags; +} + + +AREXPORT ArConfigSection::ArConfigSection(const ArConfigSection §ion) +{ + myName = section.myName; + myComment = section.myComment; + myCategoryName = section.myCategoryName; + myDisplayName = section.myDisplayName; + + myFlags = new ArArgumentBuilder(512, '|'); + // Since any messages were logged when the first section was created, + // it doesn't seem necessary to log them again. + myFlags->setQuiet(true); + myFlags->addPlain(section.myFlags->getFullString()); + + for (std::list::const_iterator it = section.myParams.begin(); + it != section.myParams.end(); + it++) + { + myParams.push_back(*it); + } + + myIsQuiet = section.myIsQuiet; +} + +AREXPORT ArConfigSection &ArConfigSection::operator=(const ArConfigSection §ion) +{ + if (this != §ion) + { + + myName = section.getName(); + myComment = section.getComment(); + myCategoryName = section.getCategoryName(); + myDisplayName = section.myDisplayName; + + delete myFlags; + myFlags = new ArArgumentBuilder(512, '|'); + //myFlags->setQuiet(myIsQuiet); + myFlags->addPlain(section.myFlags->getFullString()); + + for (std::list::const_iterator it = section.myParams.begin(); + it != section.myParams.end(); + it++) + { + myParams.push_back(*it); + } + + myIsQuiet = section.myIsQuiet; + + } + return *this; +} + + +AREXPORT void ArConfigSection::copyAndDetach(const ArConfigSection §ion) +{ + if (this != §ion) + { + + myName = section.getName(); + myComment = section.getComment(); + myCategoryName = section.getCategoryName(); + myDisplayName = section.myDisplayName; + + delete myFlags; + myFlags = new ArArgumentBuilder(512, '|'); + myFlags->setQuiet(myIsQuiet); + + myFlags->addPlain(section.myFlags->getFullString()); + + for (std::list::const_iterator it = section.myParams.begin(); + it != section.myParams.end(); + it++) + { + ArConfigArg paramCopy; + paramCopy.copyAndDetach(*it); + myParams.push_back(paramCopy); + } + + myIsQuiet = section.myIsQuiet; + + } + //return *this; + +} + + + +AREXPORT ArConfigArg *ArConfigSection::findParam(const char *paramName, + bool isAllowStringHolders) +{ + ArConfigArg *param = NULL; + ArConfigArg *tempParam = NULL; + + for (std::list::iterator pIter = myParams.begin(); + pIter != myParams.end(); + pIter++) + { + tempParam = &(*pIter); + // ignore string holders + if (!isAllowStringHolders && + ((tempParam->getType() == ArConfigArg::STRING_HOLDER) || + (tempParam->getType() == ArConfigArg::LIST_HOLDER))) + continue; + if (ArUtil::strcasecmp(tempParam->getName(), paramName) == 0) + { + param = tempParam; + } + } + return param; + +} // end method findParam + +/** + * This method provides a shortcut for looking up child parameters + * in a list type parameter that is contained in the section. + * For example: + * + * std::list maxRangeP; + * maxRangeP.push_back(laserName); + * maxRangeP.push_back("LMS2xxInfo"); + * maxRangeP.push_back("MaxRange"); + * ArConfigArg *maxRangeArg = section->findParam(maxRangeP); + * + * if(maxRangeArg) + * { + * ... + * + * + * + * This is functionally equivalent to the following, but better for long + * sequences. + * + * ArConfigArg *laserListArg = section->findParam(laserName); + * if(laserListArg) + * { + * ArConfigArg *lms2xxArg = laserListArg->findArg("LMS2xxInfo"); + * if(lms2xxArg) + * { + * ArConfigArg *maxRangeArg = lms2xxxArg->findArg("MaxRange"); + * if(maxRangeArg) + * { + * ... + * } + * else + * { + * ... + * ... + * ... + * etc. + * + * + * @param paramNamePath a list of strings that specifies the sequence of parameter + * names, from "top" to "bottom" + * @return ArConfigArg *, a pointer to the requested parameter, or NULL + * if not found +**/ +AREXPORT ArConfigArg *ArConfigSection::findParam + (const std::list ¶mNamePath, + bool isAllowHolders) +{ + if (paramNamePath.empty()) { + return NULL; + } + + ArConfigArg *topParam = findParam(paramNamePath.front().c_str(), isAllowHolders); + if (topParam == NULL) { + return NULL; + } + + // Handle the degenerate case where this method is used in a non-list lookup + if (paramNamePath.size() == 1) { + return topParam; + } + + ArConfigArg *curParam = topParam; + + std::list::const_iterator iter = paramNamePath.begin(); + iter++; // skipping the front one from above + + for (iter; iter != paramNamePath.end(); iter++) { + + // If curParam is not a LIST type, then findArg will return NULL. + curParam = curParam->findArg((*iter).c_str()); + + } // end while not found + + // At this point, curParam should either be NULL (because the path + // was not found)... or... nameIndex should equal pathLength and + // curParam should be the requested one. + + return curParam; + +} // end method findParam + + +AREXPORT ArConfigArg *ArConfigSection::findParam(const char **paramNamePath, + int pathLength, + bool isAllowHolders) +{ + if ((paramNamePath == NULL) || (pathLength <= 0)) { + ArLog::log(ArLog::Normal, + "ArConfigSection::findParam() invalid input, paramNamePath = %p pathLength = %i", + paramNamePath, + pathLength); + return NULL; + } + + std::list nameList; + for (int i = 0; i < pathLength; i++) { + nameList.push_back(paramNamePath[i]); + } // end for each path component + + return findParam(nameList, isAllowHolders); + + +} // end method findParam + + +AREXPORT bool ArConfigSection::containsParamsOfPriority + (ArPriority::Priority highestPriority, + ArPriority::Priority lowestPriority) +{ + if (highestPriority > lowestPriority) { + return false; + } + for (std::list::iterator iter = myParams.begin(); + iter != myParams.end(); + iter++) { + const ArConfigArg &arg = *iter; + + if (arg.getType() == ArConfigArg::SEPARATOR) { + continue; + } + if ((arg.getConfigPriority() >= highestPriority) && + (arg.getConfigPriority() <= lowestPriority)) { + return true; + } + } // end for each parameter + + return false; + +} // end method containsParamsOfPriority + + +// This will also remove list holders +AREXPORT bool ArConfigSection::remStringHolder(const char *paramName) +{ + ArConfigArg *tempParam = NULL; + + for (std::list::iterator pIter = myParams.begin(); + pIter != myParams.end(); + pIter++) + { + tempParam = &(*pIter); + + // pay attention to only string holders + if (ArUtil::isStrEmpty(paramName)) { + continue; + } + if ((tempParam->getType() != ArConfigArg::STRING_HOLDER) && + (tempParam->getType() != ArConfigArg::LIST_HOLDER)) { + continue; + } + + if (ArUtil::strcasecmp(tempParam->getName(), paramName) == 0) + { + myParams.erase(pIter); + // Recurse to ensure that all occurrences of the string holder + // are removed. + remStringHolder(paramName); + return true; + } + } + return false; +} + +AREXPORT bool ArConfigSection::hasFlag(const char *flag) const +{ + size_t i; + for (i = 0; i < myFlags->getArgc(); i++) + { + if (strcmp(myFlags->getArg(i), flag) == 0) + { + return true; + } + } + return false; +} + +AREXPORT bool ArConfigSection::addFlags(const char *flags, bool isQuiet) +{ + if (myFlags == NULL) { + return false; + } + myFlags->setQuiet(isQuiet); + + // MPL replacing this line with the stuff from after it until the + // return, this is so that if the section already has a flag we + // don't add it again + + //myFlags->addPlain(flags); + + size_t i; + ArArgumentBuilder theseFlags(512, '|'); + theseFlags.setQuiet(isQuiet); + + theseFlags.addPlain(flags); + + for (i = 0; i < theseFlags.getArgc(); i++) + { + if (!hasFlag(theseFlags.getArg(i))) + myFlags->addPlain(theseFlags.getArg(i)); + } + return true; +} + +AREXPORT bool ArConfigSection::remFlag(const char *flag) +{ + size_t i; + + for (i = 0; i < myFlags->getArgc(); i++) + { + if (strcmp(myFlags->getArg(i), flag) == 0) + { + myFlags->removeArg(i, true); + return remFlag(flag); + } + } + + return true; +} + +AREXPORT void ArConfigSection::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; +} + + +void ArConfigSection::setName(const char *name) +{ + myName = ((name != NULL) ? name : ""); +} + +void ArConfigSection::setComment(const char *comment) +{ + myComment = ((comment != NULL) ? comment : ""); +} + + +AREXPORT const char *ArConfigSection::getCategoryName() const +{ + return myCategoryName.c_str(); +} + +void ArConfigSection::setCategoryName(const char *categoryName) +{ + myCategoryName = ((categoryName != NULL) ? categoryName : ""); +} + + diff --git a/Legacy/Aria/src/ArConfigArg.cpp b/Legacy/Aria/src/ArConfigArg.cpp new file mode 100644 index 0000000..83cc07d --- /dev/null +++ b/Legacy/Aria/src/ArConfigArg.cpp @@ -0,0 +1,4087 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArConfigArg.h" +#include "ArLog.h" +#include "ArArgumentBuilder.h" +#include "ArFileParser.h" + +//#define ARDEBUG_CONFIGARG + +#if (defined(ARDEBUG_CONFIGARG)) +//#if (defined(_DEBUG) && defined(ARDEBUG_CONFIGARG)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +// KMC 7/16/12 Changed from 2 to 3 just to nicely align with description holder +// +int ArConfigArg::ourIndentSpaceCount = 3; + +const char *ArConfigArg::LIST_BEGIN_TAG = "_beginList"; +const char *ArConfigArg::LIST_END_TAG = "_endList"; + +const char *ArConfigArg::NULL_TAG = "NULL"; +const char *ArConfigArg::NEW_RESOURCE_TAG = "xltrNew"; + + +std::map *ArConfigArg::ourTextToTypeMap = NULL; +std::map *ArConfigArg::ourTextToRestartLevelMap = NULL; + + +const char *ArConfigArg::toString(Type t) +{ + switch (t) { + case INVALID: + return "INVALID"; + case INT: + return "INT"; + case DOUBLE: + return "DOUBLE"; + case STRING: + return "STRING"; + case CPPSTRING: + return "CPPSTRING"; + case BOOL: + return "BOOL"; + case FUNCTOR: + return "FUNCTOR"; + case DESCRIPTION_HOLDER: + return "DESCRIPTION_HOLDER"; + case STRING_HOLDER: + return "STRING_HOLDER"; + case SEPARATOR: + return "SEPARATOR"; + case LIST: + return "LIST"; + case LIST_HOLDER: + return "LIST_HOLDER"; + + } // end switch t + + return "Unknown"; + +} // end method toString + + +const char *ArConfigArg::toString(RestartLevel r) +{ + switch (r) { + + case NO_RESTART: + return "NO_RESTART"; + case RESTART_CLIENT: + return "RESTART_CLIENT"; + case RESTART_IO: + return "RESTART_IO"; + case RESTART_SOFTWARE: + return "RESTART_SOFTWARE"; + case RESTART_HARDWARE: + return "RESTART_HARDWARE"; + } + return "Unknown"; + +} // end method toString + + +ArConfigArg::Type ArConfigArg::typeFromString(const char *text) +{ + if (ArUtil::isStrEmpty(text)) { + return INVALID; + } + if (ourTextToTypeMap == NULL) { + ourTextToTypeMap = new std::map(); + (*ourTextToTypeMap)["INVALID"] = INVALID; + (*ourTextToTypeMap)["INT"] = INT; + (*ourTextToTypeMap)["DOUBLE"] = DOUBLE; + (*ourTextToTypeMap)["STRING"] = STRING; + (*ourTextToTypeMap)["CPPSTRING"] = CPPSTRING; + (*ourTextToTypeMap)["BOOL"] = BOOL; + (*ourTextToTypeMap)["FUNCTOR"] = FUNCTOR; + (*ourTextToTypeMap)["DESCRIPTION_HOLDER"] = DESCRIPTION_HOLDER; + (*ourTextToTypeMap)["STRING_HOLDER"] = STRING_HOLDER; + (*ourTextToTypeMap)["SEPARATOR"] = SEPARATOR; + (*ourTextToTypeMap)["LIST"] = LIST; + (*ourTextToTypeMap)["LIST_HOLDER"] = LIST_HOLDER; + + } + + std::map::iterator iter = ourTextToTypeMap->find(text); + if (iter != ourTextToTypeMap->end()) { + return iter->second; + } + return INVALID; + +} // end method typeFromString + + +ArConfigArg::RestartLevel ArConfigArg::restartLevelFromString(const char *text) +{ + if (ArUtil::isStrEmpty(text)) { + return NO_RESTART; + } + if (ourTextToRestartLevelMap == NULL) { + ourTextToRestartLevelMap = new std::map(); + (*ourTextToRestartLevelMap)["NO_RESTART"] = NO_RESTART; + (*ourTextToRestartLevelMap)["RESTART_CLIENT"] = RESTART_CLIENT; + (*ourTextToRestartLevelMap)["RESTART_IO"] = RESTART_IO; + (*ourTextToRestartLevelMap)["RESTART_SOFTWARE"] = RESTART_SOFTWARE; + (*ourTextToRestartLevelMap)["RESTART_HARDWARE"] = RESTART_HARDWARE; + } + std::map::iterator iter = ourTextToRestartLevelMap->find(text); + if (iter != ourTextToRestartLevelMap->end()) { + return iter->second; + } + return NO_RESTART; + +} // end method restartLevelFromString + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +AREXPORT ArConfigArg::ArConfigArg() +{ + clear(true); +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, int *pointer, + const char * description, int minInt, int maxInt) +{ + clear(true, INT, INT_INT); + set(INT, name, description); + + myData.myIntData.myIntType = INT_INT; + myData.myIntData.myMinInt = minInt; + myData.myIntData.myMaxInt = maxInt; + myData.myIntData.myIntPointer = pointer; +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, short *pointer, + const char * description, int minInt, int maxInt) + +{ + clear(true, INT, INT_SHORT); + set(INT, name, description); + + myData.myIntData.myIntType = INT_SHORT; + myData.myIntData.myMinInt = minInt; + myData.myIntData.myMaxInt = maxInt; + myData.myIntData.myIntShortPointer = pointer; +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, unsigned short *pointer, + const char * description, int minInt, int maxInt) +{ + clear(true, INT, INT_UNSIGNED_SHORT); + set(INT, name, description); + + myData.myIntData.myIntType = INT_UNSIGNED_SHORT; + myData.myIntData.myMinInt = minInt; + myData.myIntData.myMaxInt = maxInt; + myData.myIntData.myIntUnsignedShortPointer = pointer; +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, unsigned char *pointer, + const char * description, int minInt, int maxInt) +{ + clear(true, INT, INT_UNSIGNED_CHAR); + set(INT, name, description); + + myData.myIntData.myIntType = INT_UNSIGNED_CHAR; + myData.myIntData.myMinInt = minInt; + myData.myIntData.myMaxInt = maxInt; + myData.myIntData.myIntUnsignedCharPointer = pointer; +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, double *pointer, + const char * description, + double minDouble, + double maxDouble, + int precision) +{ + clear(true, DOUBLE); + set(DOUBLE, name, description); + + myData.myDoubleData.myMinDouble = minDouble; + myData.myDoubleData.myMaxDouble = maxDouble; + myData.myDoubleData.myDoublePointer = pointer; + myData.myDoubleData.myPrecision = precision; +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, bool *pointer, + const char * description) + +{ + clear(true, BOOL); + set(BOOL, name, description); + + myData.myBoolData.myBoolPointer = pointer; +} + + +/** @swigomit Use ArConfigArg_Int subclass instead. */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, int val, + const char * description, int minInt, int maxInt) +{ + clear(true, INT, INT_INT); + set(INT, name, description); + + myData.myIntData.myIntType = INT_INT; + myData.myIntData.myMinInt = minInt; + myData.myIntData.myMaxInt = maxInt; + + myData.myIntData.myIntPointer = new int; + *myData.myIntData.myIntPointer = val; + myOwnPointedTo = true; +} + +/** @swigomit Use ArConfigArg_Double subclass instead. */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, + double val, + const char * description, + double minDouble, + double maxDouble, + int precision) +{ + clear(true, DOUBLE); + set(DOUBLE, name, description); + + myData.myDoubleData.myMinDouble = minDouble; + myData.myDoubleData.myMaxDouble = maxDouble; + myData.myDoubleData.myPrecision = precision; + + myData.myDoubleData.myDoublePointer = new double; + *myData.myDoubleData.myDoublePointer = val; + myOwnPointedTo = true; +} + +/** @swigomit Use ArConfigArg_Bool subclass instead. */ +AREXPORT ArConfigArg::ArConfigArg(const char * name, bool val, + const char * description) +{ + clear(true, BOOL); + set(BOOL, name, description); + + myData.myBoolData.myBoolPointer = new bool; + *myData.myBoolData.myBoolPointer = val; + myOwnPointedTo = true; +} + +/** + * This constructor can accept both an already-allocated string, + * or ArConfigArg can to the memory managment itself (reallocation + * and finally deletion). If @a maxStrLen is 0, then ArConfigArg will + * do its own memory management, with the contents of @a str copied + * as the initial value of the internally held string. Otherwise, + * @a str must point to an allocated string, with its size given by @a + * maxStrLen. + @warning The parameter name and value must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. + * + * @swigomit Use ArConfigArg_String subclass instead (which has no maxStrLen parameter in its constructor) +*/ +AREXPORT ArConfigArg::ArConfigArg(const char * name, char *str, + const char * description, size_t maxStrLen) +{ + clear(true, STRING); + set(STRING, name, description); + + if (maxStrLen == 0) + { + // KMC own string change + // myData.myStringData.myUsingOwnedString = true; + myOwnPointedTo = true; + + if(myData.myStringData.myString) + delete myData.myStringData.myString; + myData.myStringData.myString = new std::string(str); + } + else + { + myData.myStringData.myStringPointer = str; + myData.myStringData.myMaxStrLen = maxStrLen; + } +} + +/** + * This constructor can accept a const char str, then it'll take care + * of the string itself... + + @warning The parameter name and value must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. + * + * @swigomit Use ArConfigArg_String subclass instead (which has no maxStrLen parameter in its constructor) +*/ +AREXPORT ArConfigArg::ArConfigArg(const char * name, const char *str, + const char * description) +{ + clear(true, STRING); + set(STRING, name, description); + + // KMC own string change + // myData.myStringData.myUsingOwnedString = true; + myOwnPointedTo = true; + delete myData.myStringData.myString; + myData.myStringData.myString = new std::string(str); +} + +/** @swigomit */ +AREXPORT ArConfigArg::ArConfigArg(const char *name, std::string *strptr, const char *description) +{ + clear(true, CPPSTRING); + set(CPPSTRING, name, description); + myOwnPointedTo = false; + myData.myCppStringData.myCppStringPtr = strptr; +} + +/** + This constructor is for the functor type of argument, this is for + cases that need to be complicated and have more than one argument + per name... such as the sonar in a config file. Where this data + needs to be used to construct internal data structures. + + @param name Name of this argument + + @param description Description of the purpose of this argument + + @param setFunctor When an argument is read it is passed to this + functor in an ArArgumentBuilder object. The functor should return + false if there is an error or problem handling the argument, or + true otherwise. + + @param getFunctor Since configuration needs to be serialized to + save files on disk or send data over the network etc., this + functor will be called to get a list of strings to represent this + argument and its value as text in the file etc. + + @warning The parameter name and value must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. +**/ +AREXPORT ArConfigArg::ArConfigArg(const char *name, + ArRetFunctor1 *setFunctor, + ArRetFunctor *> *getFunctor, + const char *description) +{ + clear(true, FUNCTOR); + set(FUNCTOR, name, description); + + myData.myFunctorData.mySetFunctor = setFunctor; + myData.myFunctorData.myGetFunctor = getFunctor; +} + +AREXPORT ArConfigArg::ArConfigArg(const char * str, Type type) +{ + clear(true, type); + if (type == DESCRIPTION_HOLDER) + { + myType = DESCRIPTION_HOLDER; + myDescription = str; + } + else + { + ArLog::log(ArLog::Terse, "ArConfigArg: Bad type %d for '%s'", type, str); + } +} + +/** + * This constructor is used for creating composite (LIST or LIST_HOLDER type) + * parameters. +**/ +AREXPORT ArConfigArg::ArConfigArg(Type type, + const char *name, + const char *description) +{ + clear(true, type); + set(type, name, description); + if ((type == LIST) || + (type == LIST_HOLDER) || + (type == STRING_HOLDER)) { + myOwnPointedTo = true; + } +} + +/** + * This constructor is useful for creating separators within a config + * section. +**/ +AREXPORT ArConfigArg::ArConfigArg(Type type) +{ + clear(true, type); + set(type, "", ""); +} + +/** + @warning The parameter name and value must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. +*/ +AREXPORT ArConfigArg::ArConfigArg(const char *name, const char *str) +{ + /* MPL Taking this out + ArLog::log(ArLog::Normal, + "ArConfigArg::ctor() STRING_HOLDER %s : %s", + ((name != NULL) ? name : ""), + ((str != NULL) ? str : "")); + */ + + clear(true, STRING_HOLDER); + set(STRING_HOLDER, name, ""); + + // KMC own string change + // myData.myStringData.myUsingOwnedString = true; + myOwnPointedTo = true; + + if(myData.myStringData.myString) + delete myData.myStringData.myString; + myData.myStringData.myString = new std::string(str); +} + + +AREXPORT ArConfigArg::ArConfigArg(const char *argName, + const ArConfigArg & arg) +{ + clear(true, + arg.myType, + ((arg.myType == INT) ? arg.myData.myIntData.myIntType : INT_NOT)); + + copy(arg, false); + + myName = ((argName != NULL) ? argName : ""); + +} // end ctor + + +AREXPORT ArConfigArg::ArConfigArg(const ArConfigArg & arg) +{ + clear(true, + arg.myType, + ((arg.myType == INT) ? arg.myData.myIntData.myIntType : INT_NOT)); + + copy(arg, false); +} + +AREXPORT ArConfigArg &ArConfigArg::operator=(const ArConfigArg & arg) +{ + if (this != &arg) + { + copy(arg, false); + } + return *this; +} + +AREXPORT void ArConfigArg::copyAndDetach(const ArConfigArg &arg) +{ + copy(arg, true); + +} + + +void ArConfigArg::copy(const ArConfigArg &arg, + bool isDetach) +{ + // Clear any existing data, freeing memory as necessary. + clear(false, + myType, + ((myType == INT) ? myData.myIntData.myIntType : INT_NOT)); + + // If the type has changed,then set up the union for the new type. + // Note that the isDelete flag is set to false because pointers + // may contain bogus information (from the previous type). + // + if ((myType != arg.myType) || + ((myType == INT) && + (myData.myIntData.myIntType != arg.myData.myIntData.myIntType))) { + + clear(false, + arg.myType, + ((arg.myType == INT) ? arg.myData.myIntData.myIntType : INT_NOT), + false); + } + + set(arg.myType, + arg.myName.c_str(), + arg.myDescription.c_str()); + + myDisplayName = arg.myDisplayName; + + setExtraExplanation(arg.myExtraExplanation.c_str()); + + myOwnPointedTo = arg.myOwnPointedTo || isDetach; + + switch (arg.myType) { + + case INT: + { + + myData.myIntData.myIntType = arg.myData.myIntData.myIntType; + + switch (myData.myIntData.myIntType) { + case INT_INT: + { + if (myOwnPointedTo && arg.myData.myIntData.myIntPointer != NULL) + { + myData.myIntData.myIntPointer = new int; + *myData.myIntData.myIntPointer = *arg.myData.myIntData.myIntPointer; + } + else + { + myData.myIntData.myIntPointer = arg.myData.myIntData.myIntPointer; + } + } + break; + case INT_SHORT: + { + if (myOwnPointedTo && arg.myData.myIntData.myIntShortPointer != NULL) + { + myData.myIntData.myIntShortPointer = new short; + *myData.myIntData.myIntShortPointer = *arg.myData.myIntData.myIntShortPointer; + } + else + { + myData.myIntData.myIntShortPointer = arg.myData.myIntData.myIntShortPointer; + } + } + break; + case INT_UNSIGNED_SHORT: + { + if (myOwnPointedTo && arg.myData.myIntData.myIntUnsignedShortPointer != NULL) + { + myData.myIntData.myIntUnsignedShortPointer = new unsigned short; + *myData.myIntData.myIntUnsignedShortPointer = *arg.myData.myIntData.myIntUnsignedShortPointer; + } + else + { + myData.myIntData.myIntUnsignedShortPointer = arg.myData.myIntData.myIntUnsignedShortPointer; + } + } + break; + case INT_UNSIGNED_CHAR: + { + if (myOwnPointedTo && arg.myData.myIntData.myIntUnsignedCharPointer != NULL) + { + myData.myIntData.myIntUnsignedCharPointer = new unsigned char; + *myData.myIntData.myIntUnsignedCharPointer = *arg.myData.myIntData.myIntUnsignedCharPointer; + } + else + { + myData.myIntData.myIntUnsignedCharPointer = arg.myData.myIntData.myIntUnsignedCharPointer; + } + } + break; + + case INT_NOT: + { + ArLog::log(ArLog::Normal, "ArConfigArg: Internal warning: ArConfigArg has INT type, but integer subtype is INT_NOT! Can't copy pointer."); + } + break; + + } // end switch int type + + myData.myIntData.myMinInt = arg.myData.myIntData.myMinInt; + myData.myIntData.myMaxInt = arg.myData.myIntData.myMaxInt; + + } + break; + + case DOUBLE: + { + if (myOwnPointedTo && arg.myData.myDoubleData.myDoublePointer != NULL) + { + myData.myDoubleData.myDoublePointer = new double; + *myData.myDoubleData.myDoublePointer = *arg.myData.myDoubleData.myDoublePointer; + } + else + { + myData.myDoubleData.myDoublePointer = arg.myData.myDoubleData.myDoublePointer; + } + myData.myDoubleData.myMinDouble = arg.myData.myDoubleData.myMinDouble; + myData.myDoubleData.myMaxDouble = arg.myData.myDoubleData.myMaxDouble; + myData.myDoubleData.myPrecision = arg.myData.myDoubleData.myPrecision; + } + break; + + case STRING: + case STRING_HOLDER: + { + /** Originally... + myData.myStringData.myStringPointer = arg.myData.myStringData.myStringPointer; + myData.myStringData.myUsingOwnedString = arg.myData.myStringData.myUsingOwnedString; + myData.myStringData.myString = arg.myData.myStringData.myString; + **/ + + // KMC own string change + myOwnPointedTo = arg.myOwnPointedTo; + // myData.myStringData.myUsingOwnedString = arg.myData.myStringData.myUsingOwnedString || isDetach; + //if (myData.myStringData.myUsingOwnedString) { + if (myOwnPointedTo) { + myData.myStringData.myStringPointer = NULL; + //if (!arg.myData.myStringData.myUsingOwnedString && (arg.myData.myStringData.myStringPointer != NULL)) { + if (!arg.myOwnPointedTo && (arg.myData.myStringData.myStringPointer != NULL)) { + + if(myData.myStringData.myString) + delete myData.myStringData.myString; + myData.myStringData.myString = new std::string(arg.myData.myStringData.myStringPointer); + } + else { + + if(myData.myStringData.myString) + delete myData.myStringData.myString; + if (arg.myData.myStringData.myString != NULL) { + myData.myStringData.myString = new std::string(*arg.myData.myStringData.myString); + } + else { + myData.myStringData.myString = NULL; + } + } + } + else { // use shared string pointer + + myData.myStringData.myStringPointer = arg.myData.myStringData.myStringPointer; + + if (myData.myStringData.myString != NULL) + delete myData.myStringData.myString; + if (arg.myData.myStringData.myString != NULL) { + myData.myStringData.myString = new std::string(*arg.myData.myStringData.myString); + } + else { + myData.myStringData.myString = NULL; + } + } // end else use shared string pointer + + myData.myStringData.myMaxStrLen = arg.myData.myStringData.myMaxStrLen; + + } + break; + + case CPPSTRING: + myOwnPointedTo = arg.myOwnPointedTo; + if(myOwnPointedTo) + { + if (myData.myCppStringData.myCppStringPtr) + delete myData.myCppStringData.myCppStringPtr; + if(arg.myData.myCppStringData.myCppStringPtr != NULL) + myData.myCppStringData.myCppStringPtr = new std::string(*(arg.myData.myCppStringData.myCppStringPtr)); + else + myData.myCppStringData.myCppStringPtr = NULL; + } + else + { + myData.myCppStringData.myCppStringPtr = arg.myData.myCppStringData.myCppStringPtr; + } + + break; + + + case BOOL: + { + if (myOwnPointedTo && arg.myData.myBoolData.myBoolPointer != NULL) + { + myData.myBoolData.myBoolPointer = new bool; + *myData.myBoolData.myBoolPointer = *arg.myData.myBoolData.myBoolPointer; + } + else + { + myData.myBoolData.myBoolPointer = arg.myData.myBoolData.myBoolPointer; + } + } + break; + + case FUNCTOR: + { + myData.myFunctorData.mySetFunctor = arg.myData.myFunctorData.mySetFunctor; + myData.myFunctorData.myGetFunctor = arg.myData.myFunctorData.myGetFunctor; + } + break; + + case LIST: + case LIST_HOLDER: + { + myOwnPointedTo = true; + if (arg.myData.myListData.myChildArgList != NULL) { + for (std::list::const_iterator iter = arg.myData.myListData.myChildArgList->begin(); + iter != arg.myData.myListData.myChildArgList->end(); + iter++) { + addArg(*iter); + } + } + } + break; + + case INVALID: + case DESCRIPTION_HOLDER: + case SEPARATOR: + // No value to copy. + break; + + }; // end switch arg type + + + + // KMC 7/9/12 I think that this should change based on the type... i.e. it's not + // necessary to set all of them anymore. + + myConfigPriority = arg.myConfigPriority; + myIgnoreBounds = arg.myIgnoreBounds; + myDisplayHint = arg.myDisplayHint; + myRestartLevel = arg.myRestartLevel; + mySupressChanges = arg.mySupressChanges; + + myValueSet = arg.myValueSet; + myIsTranslated = arg.myIsTranslated; + + // Intentionally not copying the parent (at least currently) + +} // end method copy + + +/** + * The translation data currently consists of the description and the + * extra explanation. +**/ +AREXPORT bool ArConfigArg::copyTranslation(const ArConfigArg &arg) +{ + if (ArUtil::strcasecmp(getName(), arg.getName()) != 0) { + ArLog::log(ArLog::Normal, + "ArConfigArg::copyTranslation() names do not match this = %s arg = %s", + getName(), + arg.getName()); + return false; + } + + setDescription(arg.getDescription()); + setExtraExplanation(arg.getExtraExplanation()); + + if (isListType() && arg.isListType()) { + + for (size_t i = 0; i < getArgCount(); i++) { + ArConfigArg *childArg = getArg(i); + if (childArg == NULL) { + continue; + } + const ArConfigArg *xlateChildArg = arg.findArg(childArg->getName()); + if (xlateChildArg != NULL) { + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfigArg::copyTranslation() found translation for %s child %s", + getName(), childArg->getName())); + childArg->copyTranslation(*xlateChildArg); + } + else { + ArLog::log(ArLog::Normal, + "ArConfigArg::copyTranslation() did not find translation for %s child %s", + getName(), childArg->getName()); + } + } + + } // end if lists + + myIsTranslated = true; + + return true; + +} // end method copyTranslation + + +AREXPORT ArConfigArg::~ArConfigArg() +{ + clear(false, + myType, + ((myType == INT) ? myData.myIntData.myIntType : INT_NOT)); +} + +/** + * @param initial a bool set to true if this is the initial construciton of the + * arg, and member fields need to be initialized + * @param type the Type of the arg + * @param intType the IntType of the arg, applicable only when type is INT + * @param isDelete a bool set to true (the default) if clear should free any + * used memory; false if the fields should merely be initialized. The latter + * is used when the type of an arg needs to be changed (for example, from a + * STRING_HOLDER to a "real" value). +**/ +void ArConfigArg::clear(bool initial, + Type type, + IntType intType, + bool isDelete) +{ + if (initial) + { + myOwnPointedTo = false; + myIsTranslated = false; + + + switch (type) { + case INT: + switch (intType) { + case INT_NOT: + case INT_INT: + myData.myIntData.myIntPointer = NULL; + break; + case INT_SHORT: + myData.myIntData.myIntShortPointer = NULL; + break; + case INT_UNSIGNED_SHORT: + myData.myIntData.myIntUnsignedShortPointer = NULL; + break; + case INT_UNSIGNED_CHAR: + myData.myIntData.myIntUnsignedCharPointer = NULL; + break; + } + break; + case DOUBLE: + myData.myDoubleData.myDoublePointer = NULL; + break; + case STRING: + case STRING_HOLDER: + myData.myStringData.myString = NULL; + break; + case CPPSTRING: + myData.myCppStringData.myCppStringPtr = NULL; + break; + case BOOL: + myData.myBoolData.myBoolPointer = NULL; + break; + case LIST: + case LIST_HOLDER: + myData.myListData.myChildArgList = NULL; + break; + case FUNCTOR: + break; + case DESCRIPTION_HOLDER: + case SEPARATOR: + case INVALID: + break; + } // end switch type + + myParentArg = NULL; + + set(type, "", ""); + + } // end if initial + + set(type, "", ""); + + switch (type) { + case INT: + + myData.myIntData.myIntType = intType; + + switch (myData.myIntData.myIntType) { + case INT_NOT: + case INT_INT: + + if (isDelete && myOwnPointedTo && myData.myIntData.myIntPointer != NULL) + delete myData.myIntData.myIntPointer; + myData.myIntData.myIntPointer = NULL; + break; + + case INT_SHORT: + if (isDelete && myOwnPointedTo && myData.myIntData.myIntShortPointer != NULL) + delete myData.myIntData.myIntShortPointer; + myData.myIntData.myIntShortPointer = NULL; + break; + + case INT_UNSIGNED_SHORT: + if (isDelete && myOwnPointedTo && myData.myIntData.myIntUnsignedShortPointer != NULL) + delete myData.myIntData.myIntUnsignedShortPointer; + myData.myIntData.myIntUnsignedShortPointer = NULL; + break; + + case INT_UNSIGNED_CHAR: + if (isDelete && myOwnPointedTo && myData.myIntData.myIntUnsignedCharPointer != NULL) + delete myData.myIntData.myIntUnsignedCharPointer; + myData.myIntData.myIntUnsignedCharPointer = NULL; + + } break; + + myData.myIntData.myMinInt = INT_MIN; + myData.myIntData.myMaxInt = INT_MAX; + break; + + case DOUBLE: + if (isDelete && myOwnPointedTo && myData.myDoubleData.myDoublePointer != NULL) + delete myData.myDoubleData.myDoublePointer; + + myData.myDoubleData.myDoublePointer = NULL; + myData.myDoubleData.myMinDouble = -HUGE_VAL; + myData.myDoubleData.myMaxDouble = HUGE_VAL; + myData.myDoubleData.myPrecision = DEFAULT_DOUBLE_PRECISION; + break; + + case STRING: + case STRING_HOLDER: + + myData.myStringData.myStringPointer = NULL; + myData.myStringData.myMaxStrLen = 0; + // KMC own string change + // myData.myStringData.myUsingOwnedString = false; + myOwnPointedTo = false; + + if (isDelete && myData.myStringData.myString) { + delete myData.myStringData.myString; + } + myData.myStringData.myString = NULL; + + break; + + case CPPSTRING: + if(isDelete && myOwnPointedTo && myData.myCppStringData.myCppStringPtr) + delete myData.myCppStringData.myCppStringPtr; + myData.myCppStringData.myCppStringPtr = NULL; + myOwnPointedTo = false; + break; + + case BOOL: + if (isDelete && myOwnPointedTo && myData.myBoolData.myBoolPointer != NULL) + delete myData.myBoolData.myBoolPointer; + myData.myBoolData.myBoolPointer = NULL; + break; + case LIST: + case LIST_HOLDER: + // LIST type implies myOwnPointedTo + if (isDelete && myData.myListData.myChildArgList) { + delete myData.myListData.myChildArgList; + } + myData.myListData.myChildArgList = NULL; + break; + case FUNCTOR: + myData.myFunctorData.mySetFunctor = NULL; + myData.myFunctorData.myGetFunctor = NULL; + break; + case DESCRIPTION_HOLDER: + case SEPARATOR: + case INVALID: + break; + } // end switch type + + myConfigPriority = ArPriority::NORMAL; + myIgnoreBounds = false; + myDisplayHint = ""; + myRestartLevel = NO_RESTART; + mySupressChanges = false; + + myValueSet = false; + + myParentArg = NULL; + + myOwnPointedTo = false; + myIsTranslated = false; + +} // end method clear + + + +AREXPORT void ArConfigArg::replaceSpacesInName(void) +{ + int i; + int len = myName.size(); + for (i = 0; i < len; i++) + { + if (isspace(myName[i])) + myName[i] = '_'; + } +} + +void ArConfigArg::set(ArConfigArg::Type type, + const char *name, + const char *description, + IntType intType) +{ + myType = type; + if (myType == INT) { + myData.myIntData.myIntType = intType; + } + myName = name; + myDescription = description; + + myDisplayName = ""; // TODO + +} + + +/** + * @param parentArg the ArConfigArg * to be stored as the parent; + * may be NULL +**/ +void ArConfigArg::setParent(ArConfigArg *parentArg) +{ + myParentArg = parentArg; +} + + +/** + * @return Type the type of this arg, used to determine which + * other attributes are valid +*/ +AREXPORT ArConfigArg::Type ArConfigArg::getType(void) const +{ + return myType; +} + +/** + * @return char *, the name of this arg or "" if none +**/ +AREXPORT const char *ArConfigArg::getName(void) const +{ + return myName.c_str(); +} + +/** + * @return char *, the description of this arg or "" if none +**/ +AREXPORT const char *ArConfigArg::getDescription(void) const +{ + return myDescription.c_str(); +} + + + +AREXPORT void ArConfigArg::setExtraExplanation(const char *extraExplanation) +{ + myExtraExplanation = ((extraExplanation != NULL) ? extraExplanation + : ""); + +} // end method setExtraExplanation + + +AREXPORT const char *ArConfigArg::getExtraExplanation() const +{ + return myExtraExplanation.c_str(); +} + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for INT Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +AREXPORT int ArConfigArg::getInt(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == INT); + } + + if (myType == INT) { + switch (myData.myIntData.myIntType) { + case INT_NOT: + case INT_INT: + // only one of these will be valid + if (myData.myIntData.myIntPointer != NULL) + return *myData.myIntData.myIntPointer; + break; + + case INT_SHORT: + if (myData.myIntData.myIntShortPointer != NULL) + return *myData.myIntData.myIntShortPointer; + break; + + case INT_UNSIGNED_SHORT: + if (myData.myIntData.myIntUnsignedShortPointer != NULL) + return *myData.myIntData.myIntUnsignedShortPointer; + break; + + case INT_UNSIGNED_CHAR: + if (myData.myIntData.myIntUnsignedCharPointer != NULL) + return *myData.myIntData.myIntUnsignedCharPointer; + break; + } + } // end if int + + // Possibly not ok if this point reached? + + return 0; + +} + +/** + * This method is applicable only when getType() returns INT. + * @param ok an optional pointer to a bool that can be set by + * this method to indicate success (true) or failure (false) + * @return int the minimum value of this arg, or INT_MIN if + * none +**/ +AREXPORT int ArConfigArg::getMinInt(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == INT); + } + if (myType == INT) { + return myData.myIntData.myMinInt; + } + + return INT_MIN; +} + +/** + * This method is applicable only when getType() returns INT. + * @param ok an optional pointer to a bool that can be set by + * this method to indicate success (true) or failure (false) + * @return int the maximum value of this arg, or INT_MAX if + * none +**/ +AREXPORT int ArConfigArg::getMaxInt(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == INT); + } + if (myType == INT) { + + return myData.myIntData.myMaxInt; + } + return INT_MAX; +} + +AREXPORT bool ArConfigArg::setInt(int val, char *errorBuffer, + size_t errorBufferLen, bool doNotSet) +{ + if (myType != INT) { + ArLog::log(ArLog::Normal, + "ArConfigArg::setInt() cannot set %s to %d, wrong type (%s)", + getName(), val, toString(myType)); + return false; + } + + // KMC 7/9/12 If the "doNotSet" flag is true, then why is the myValueSet flag + // set to true? + + myValueSet = true; + if (!myIgnoreBounds && val < myData.myIntData.myMinInt) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setInt value %d below range [%d, %d]", getName(), val, myData.myIntData.myMinInt, myData.myIntData.myMaxInt); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s value of %d is below minimum of %d.", getName(), val, myData.myIntData.myMinInt); + return false; + } + if (!myIgnoreBounds && val > myData.myIntData.myMaxInt) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setInt value %d above range [%d, %d]", getName(), val, myData.myIntData.myMinInt, myData.myIntData.myMaxInt); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s value of %d is above maximum of %d.", getName(), val, myData.myIntData.myMaxInt); + return false; + } + if ((myData.myIntData.myIntType == INT_INT && myData.myIntData.myIntPointer == NULL) || + (myData.myIntData.myIntType == INT_SHORT && myData.myIntData.myIntShortPointer == NULL) || + (myData.myIntData.myIntType == INT_UNSIGNED_SHORT && + myData.myIntData.myIntUnsignedShortPointer == NULL) || + (myData.myIntData.myIntType == INT_UNSIGNED_CHAR && myData.myIntData.myIntUnsignedCharPointer == NULL)) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setInt called with NULL int pointer.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s pointer is NULL.", getName()); + return false; + } + + if (!doNotSet) + { + switch (myData.myIntData.myIntType) { + case INT_INT: + *myData.myIntData.myIntPointer = val; + break; + + case INT_SHORT: + *myData.myIntData.myIntShortPointer = val; + break; + + case INT_UNSIGNED_SHORT: + *myData.myIntData.myIntUnsignedShortPointer = val; + break; + + case INT_UNSIGNED_CHAR: + *myData.myIntData.myIntUnsignedCharPointer = val; + break; + + default: + ArLog::log(ArLog::Normal, "ArConfigArg of %s: int is bad type.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s int is bad type (%d).", getName(), myData.myIntData.myIntType); + return false; + } + } + return true; + +} // end method setInt + + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for DOUBLE Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +AREXPORT double ArConfigArg::getDouble(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == DOUBLE); + } + + if (myType == DOUBLE) { + if (myData.myDoubleData.myDoublePointer != NULL) + return *myData.myDoubleData.myDoublePointer; + } + + return 0; +} + +/** + * This method is applicable only when getType() returns DOUBLE. + * @param ok an optional pointer to a bool that can be set by + * this method to indicate success (true) or failure (false) + * @return double the maximum value of this arg, or -HUGE_VAL if + * none +**/ +AREXPORT double ArConfigArg::getMinDouble(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == DOUBLE); + } + if (myType == DOUBLE) { + return myData.myDoubleData.myMinDouble; + } + return -HUGE_VAL; +} + +/** + * This method is applicable only when getType() returns DOUBLE. + * @param ok an optional pointer to a bool that can be set by + * this method to indicate success (true) or failure (false) + * @return double the maximum value of this arg, or HUGE_VAL if + * none +**/ +AREXPORT double ArConfigArg::getMaxDouble(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == DOUBLE); + } + if (myType == DOUBLE) { + return myData.myDoubleData.myMaxDouble; + } + return HUGE_VAL; +} + +AREXPORT int ArConfigArg::getDoublePrecision(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == DOUBLE); + } + if (myType == DOUBLE) { + return myData.myDoubleData.myPrecision; + } + return 0; + +} // end method getDoublePrecision + + +AREXPORT bool ArConfigArg::setDouble(double val, char *errorBuffer, + size_t errorBufferLen, bool doNotSet) +{ + if (myType != DOUBLE) { + ArLog::log(ArLog::Normal, + "ArConfigArg::setDouble() cannot set %s to %g, wrong type (%s)", + getName(), val, toString(myType)); + return false; + } + + myValueSet = true; + if (!myIgnoreBounds && val < myData.myDoubleData.myMinDouble) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setDouble value %g below range [%g, %g]", getName(), val, myData.myDoubleData.myMinDouble, myData.myDoubleData.myMaxDouble); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s value of %g is below minimum of %g.", getName(), val, myData.myDoubleData.myMinDouble); + return false; + } + if (!myIgnoreBounds && val > myData.myDoubleData.myMaxDouble) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setDouble value %g above range [%g, %g]", getName(), val, myData.myDoubleData.myMinDouble, myData.myDoubleData.myMaxDouble); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s value of %g is above maximum of %g.", getName(), val, myData.myDoubleData.myMaxDouble); + return false; + } + if (myData.myDoubleData.myDoublePointer == NULL) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setDouble called with NULL pointer.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s pointer is NULL.", getName()); + return false; + } + // if we got to here we're good + if (!doNotSet) + *myData.myDoubleData.myDoublePointer = val; + return true; +} + + + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for BOOL Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +AREXPORT bool ArConfigArg::getBool(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == BOOL); + } + if (myType == BOOL) { + if (myData.myBoolData.myBoolPointer != NULL) + return *myData.myBoolData.myBoolPointer; + } + return false; +} + +AREXPORT bool ArConfigArg::setBool(bool val, char *errorBuffer, + size_t errorBufferLen, bool doNotSet) +{ + if (myType != BOOL) { + ArLog::log(ArLog::Normal, + "ArConfigArg::setBool() cannot set %s to %i, wrong type (%s)", + getName(), val, toString(myType)); + return false; + } + + myValueSet = true; + if (myData.myBoolData.myBoolPointer == NULL) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setBool called with NULL pointer.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s pointer is NULL.", getName()); + return false; + } + if (!doNotSet) + *myData.myBoolData.myBoolPointer = val; + return true; +} + + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for STRING and STRING_HOLDER Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +AREXPORT const char *ArConfigArg::getString(bool *ok) const +{ + if (ok != NULL) { + *ok = ((myType == STRING) || + (myType == STRING_HOLDER)); + } + + if ((myType == STRING) || (myType == STRING_HOLDER)) { + // KMC own string change + // if (myData.myStringData.myUsingOwnedString) { + if (myOwnPointedTo) { + if (myData.myStringData.myString != NULL) { + return myData.myStringData.myString->c_str(); + } + else { + return ""; + } + } + else if (myData.myStringData.myStringPointer != NULL) + return myData.myStringData.myStringPointer; + } + + // KMC 7/9/12 Are we sure we want to return NULL and not ""? + return NULL; +} + +/** + @warning The value must not contain any characters with + special meaning when saved and loaded from a config file, such as '#', ';', + tab, or newline. +*/ +AREXPORT bool ArConfigArg::setString(const char *str, char *errorBuffer, + size_t errorBufferLen, bool doNotSet) +{ + + if ((myType != STRING) && (myType != STRING_HOLDER)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::setString() cannot set %s to %s, wrong type (%s)", + getName(), str, toString(myType)); + return false; + } + + myValueSet = true; + size_t len; + + // KMC own string change + // if (myData.myStringData.myUsingOwnedString) + if (myOwnPointedTo) + { + if(myData.myStringData.myString) + delete myData.myStringData.myString; + myData.myStringData.myString = new std::string(str); + return true; + } + if (myData.myStringData.myStringPointer == NULL) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setString called with NULL pointer.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s pointer is NULL.", getName()); + return false; + } + // this is >= so that if it wouldn't have room with NULL that's + // taken care of too + if ((len = strlen(str)) >= myData.myStringData.myMaxStrLen) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setString called with argument %d long, when max length is %d.", getName(), len, myData.myStringData.myMaxStrLen); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s string is %d long when max length is %d.", getName(), len, myData.myStringData.myMaxStrLen); + return false; + } + if (!doNotSet) + strcpy(myData.myStringData.myStringPointer, str); + return true; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for CPPSTRING Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +/// Get a copy of the value of the target std::string. (If there is a NULL +/// target, return "" and set @a ok to false if @a ok is not NULL.) +AREXPORT std::string ArConfigArg::getCppString(bool *ok) const +{ + if(myData.myCppStringData.myCppStringPtr == NULL) + { + ArLog::log(ArLog::Verbose, "ArConfigArg::getCppString: internal std::string pointer for argument %s is NULL!", getName()); + if(ok) + *ok = false; + return ""; + } + if(ok) + *ok = true; + return *(myData.myCppStringData.myCppStringPtr); +} + +/// Get the internal pointer to the target std::string. Do not modify. (If there is a NULL +/// target, return NULL and set @a ok to false if @a ok is not NULL.) +AREXPORT const std::string* ArConfigArg::getCppStringPtr(bool *ok) const +{ + if(myData.myCppStringData.myCppStringPtr == NULL) + { + ArLog::log(ArLog::Verbose, "ArConfigArg::getCppString: internal std::string pointer for argument %s is NULL!", getName()); + if(ok) + *ok = false; + return NULL; + } + if(ok) + *ok = true; + return myData.myCppStringData.myCppStringPtr; +} + +AREXPORT bool ArConfigArg::setCppString(const std::string& str, char *errorBuffer, size_t errorBufferLen, bool doNotSet) +{ + if(myType != CPPSTRING) + { + ArLog::log(ArLog::Normal, "ArConfigArg::setCppString() cannot set %s to %s, wrong type (%s)", getName(), str.c_str(), toString(myType)); + return false; + } + + if(myOwnPointedTo && !doNotSet) + { + if(myData.myCppStringData.myCppStringPtr != NULL) + delete myData.myCppStringData.myCppStringPtr; + myData.myCppStringData.myCppStringPtr = new std::string(str); + myValueSet = true; + return true; + } + + if(myData.myCppStringData.myCppStringPtr == NULL) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setCppString called but std::string target pointer is NULL.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s pointer is NULL.", getName()); + return false; + } + + if(!doNotSet) + { + myData.myCppStringData.myCppStringPtr->assign(str); + myValueSet = true; + } + + return true; +} + + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for LIST Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +/** + * If the given child arg is not a separator, then it must have a unique, + * non-empty name. + * + * @param arg the ArConfigArg to be added as a child of this composite arg + * @return bool true if the child arg was successfully added; false if an + * error occurred +**/ +AREXPORT bool ArConfigArg::addArg(const ArConfigArg &arg) +{ + // Children can only be added to LIST or LIST_HOLDER type parameters + if (!isListType()) { + + ArLog::log(ArLog::Normal, + "ArConfigArg::addArg() child %s not added to %s (type %s), type must be %s or %s", + arg.getName(), + getName(), + toString(getType()), + toString(LIST), + toString(LIST_HOLDER)); + return false; + } + + // Children must own their own data. They cannot store pointers to members of other + // objects. + if (arg.hasExternalDataReference()) { + + ArLog::log(ArLog::Normal, + "ArConfigArg::addArg() child %s not added to %s, child must own data", + arg.getName(), + getName()); + return false; + } + + // If the child has a name (i.e. is not a separator), then it must be unique. + if ((!ArUtil::isStrEmpty(arg.getName())) && + (findArg(arg.getName()) != NULL)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::addArg() child %s not added to %s, duplicate exists", + arg.getName(), + getName()); + return false; + } + + // If the member list has not yet been allocated, then create it. + if (myData.myListData.myChildArgList == NULL) { + + myData.myListData.myChildArgList = new std::list(); + + // Check for memory allocation errors. + if (myData.myListData.myChildArgList == NULL) { + ArLog::log(ArLog::Normal, + "ArConfigArg::addArg() memory allocation error"); + return false; + } + + } // end if child list not yet created + + myData.myListData.myChildArgList->push_back(arg); + // Modify the parent of the arg that has actually been stored. + myData.myListData.myChildArgList->back().setParent(this); + + return true; + +} // end method addArg + + +/** + * @return bool set to true if this is a list arg that contains child args; false, otherwise + **/ +AREXPORT bool ArConfigArg::hasArgs() const +{ + // Children can only be added to LIST or LIST_HOLDER type parameters + if ((!isListType()) || + (myData.myListData.myChildArgList == NULL)) { + return 0; + } + return !myData.myListData.myChildArgList->empty(); +} + +/** + * @return int the number of child args in this list arg; or 0 if none. +**/ +AREXPORT size_t ArConfigArg::getArgCount() const +{ + // Children can only be added to LIST or LIST_HOLDER type parameters + if ((!isListType()) || + (myData.myListData.myChildArgList == NULL)) { + return 0; + } + return myData.myListData.myChildArgList->size(); + +} // end method getArgCount + + +/** + * @return std::list a list of all of the child arg (copies) + * in this arg. +**/ +AREXPORT std::list ArConfigArg::getArgs(bool *ok) const +{ + std::list retList; + + if (ok != NULL) { + *ok = isListType(); + } + if ((isListType()) && + (myData.myListData.myChildArgList != NULL)) { + retList = *myData.myListData.myChildArgList; + } + return retList; + +} // end method getArgs + + +/** + * @return std::list a list of all of the child arg (copies) + * in this arg. +**/ +AREXPORT const ArConfigArg *ArConfigArg::getArg(size_t index) const +{ + ArConfigArg *arg = NULL; + if ((isListType()) && + (myData.myListData.myChildArgList != NULL)) { + size_t curIndex = 0; + for (std::list::iterator iter = myData.myListData.myChildArgList->begin(); + iter != myData.myListData.myChildArgList->end(); + iter++, curIndex++) { + if (curIndex == index) { + arg = &(*iter); + break; + } + } + } + + return arg; + +} // end method getArg + +AREXPORT ArConfigArg *ArConfigArg::getArg(size_t index) +{ + ArConfigArg *arg = NULL; + if ((isListType()) && + (myData.myListData.myChildArgList != NULL)) { + size_t curIndex = 0; + for (std::list::iterator iter = myData.myListData.myChildArgList->begin(); + iter != myData.myListData.myChildArgList->end(); + iter++, curIndex++) { + if (curIndex == index) { + arg = &(*iter); + break; + } + } + } + + return arg; + +} // end method getArg + + +/** + * This method performs a case-insensitive search of the child arg names. + * + * @param childParamName the char * name of the child arg to be retrieved; must be + * non-empty + * @return ArConfigArg * a pointer to the requested child arg; or NULL if not + * found. +**/ +AREXPORT const ArConfigArg *ArConfigArg::findArg(const char *childParamName) const +{ + // Cannot look up empty name + if (ArUtil::isStrEmpty(childParamName)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::findArg() cannot find child with empty name in arg %s", + getName()); + return NULL; + } + // Children can only be added to LIST or LIST_HOLDER type parameters + if (!isListType()) { + ArLog::log(ArLog::Normal, + "ArConfigArg::findArg() cannot find child %s in arg %s (type %s), type must be %s or %s", + childParamName, + getName(), + toString(getType()), + toString(LIST), + toString(LIST_HOLDER)); + return NULL; + } + + // If empty list, return NULL + if (myData.myListData.myChildArgList == NULL) { + // This isn't really an error worth logging + return NULL; + } + + ArConfigArg *child = NULL; + + for (std::list::iterator iter = myData.myListData.myChildArgList->begin(); + ((iter != myData.myListData.myChildArgList->end()) && (child == NULL)); + iter++) { + ArConfigArg &curArg = *iter; + if (!ArUtil::isStrEmpty(curArg.getName()) && + (ArUtil::strcasecmp(childParamName, curArg.getName()) == 0)) { + child = &curArg; + } // end if name matches + } + return child; + +} // end method findArg + +/** + * This method performs a case-insensitive search of the child arg names. + * + * @param childParamName the char * name of the child arg to be retrieved; must be + * non-empty + * @return ArConfigArg * a pointer to the requested child arg; or NULL if not + * found. +**/ +AREXPORT ArConfigArg *ArConfigArg::findArg(const char *childParamName) +{ + // Cannot look up empty name + if (ArUtil::isStrEmpty(childParamName)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::findArg() cannot find child with empty name in arg %s", + getName()); + return NULL; + } + // Children can only be added to LIST or LIST_HOLDER type parameters + if (!isListType()) { + ArLog::log(ArLog::Normal, + "ArConfigArg::findArg() cannot find child %s in arg %s (type %s), type must be %s or %s", + childParamName, + getName(), + toString(getType()), + toString(LIST), + toString(LIST_HOLDER)); + return NULL; + } + + // If empty list, return NULL + if (myData.myListData.myChildArgList == NULL) { + // This isn't really an error worth logging + return NULL; + } + + ArConfigArg *child = NULL; + + for (std::list::iterator iter = myData.myListData.myChildArgList->begin(); + ((iter != myData.myListData.myChildArgList->end()) && (child == NULL)); + iter++) { + ArConfigArg &curArg = *iter; + if (!ArUtil::isStrEmpty(curArg.getName()) && + (ArUtil::strcasecmp(childParamName, curArg.getName()) == 0)) { + child = &curArg; + } // end if name matches + } + return child; + +} // end method findArg + + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Methods for FUNCTOR Type +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +AREXPORT const std::list *ArConfigArg::getArgsWithFunctor(bool *ok) const +{ + if (ok != NULL) { + *ok = (myType == FUNCTOR); + } + if (myType == FUNCTOR) { + if (myData.myFunctorData.myGetFunctor != NULL) + return myData.myFunctorData.myGetFunctor->invokeR(); + } + return NULL; +} + +AREXPORT bool ArConfigArg::setArgWithFunctor(ArArgumentBuilder *argument, + char *errorBuffer, + size_t errorBufferLen, + bool doNotSet) +{ + if (myType != FUNCTOR) { + ArLog::log(ArLog::Normal, + "ArConfigArg::setArgWithFunctor() cannot set %s, wrong type (%s)", + getName(), toString(myType)); + return false; + } + + myValueSet = true; + bool ret = true; + if (myData.myFunctorData.mySetFunctor == NULL) + { + ArLog::log(ArLog::Normal, "ArConfigArg of %s: setArgWithFunctor called with NULL pointer.", getName()); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "%s pointer is NULL.", getName()); + return false; + } + if (!doNotSet) + ret = myData.myFunctorData.mySetFunctor->invokeR(argument); + return ret; +} + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// General Methods (for all types) +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +/** + * @return ArConfigArg * the parent arg, if this is a child in a list arg; + * otherwise, NULL +**/ +AREXPORT ArConfigArg *ArConfigArg::getParentArg() const +{ + return myParentArg; + +} // end method getParentArg + +std::string ArConfigArg::getParentPathName(char separator) const +{ + std::string parentPath; + ArConfigArg *curParent = myParentArg; + while (curParent != NULL) { + if (!parentPath.empty()) { + parentPath = separator + parentPath; + } + parentPath = curParent->getName() + parentPath; + + curParent = curParent->getParentArg(); + } + + return parentPath; +} + +AREXPORT std::list ArConfigArg::splitParentPathName(const char *parentPathName, + char separator) +{ + std::list pathList; + if (ArUtil::isStrEmpty(parentPathName)) { + return pathList; + } + + ArArgumentBuilder builder(512, + separator); + builder.add(parentPathName); + + for (int c = 0; c < builder.getArgc(); c++) { + IFDEBUG(ArLog::log(ArLog::Normal, + "ArConfigArg::splitParentPathName() %s - adding %s to list", + parentPathName, builder.getArg(c))); + pathList.push_back(builder.getArg(c)); + } + + return pathList; + +} // end method splitParentPathName + + +/** + * For normal args, this method simply adds the parserCB handler for the keyword + * (i.e. arg name). For list args, this method adds the parserCB handler + * for all child arg names. The list arg itself is handled by ArConfig using + * the special keywords (_beginList and _endList). + * + * @param parser the ArFileParser * to which to add the handler + * @param parserCB the ArFunctor * that will parse the arg when the keyword is + * found + * @param logPrefix the char * prefix to use in debug log messages + * @param isQuiet a bool set to true if minimal log messages should be generated; + * false if verbosity is desired. + * @return bool true if the hanlder was successfully added to the parser; false + * if an error occurred + * +**/ +AREXPORT bool ArConfigArg::addToFileParser(ArFileParser *parser, + ArRetFunctor3C *parserCB, + const char *logPrefix, + bool isQuiet) const +{ + if ((parser == NULL) || (logPrefix == NULL)) { + return false; + } + + bool isSuccess = true; + + if (!isListType()) { + + if (!parser->addHandlerWithError(getName(), parserCB)) { + if (!isQuiet) { + ArLog::log(ArLog::Verbose, + "%sCould not add keyword %s (probably unimportant)", + logPrefix, + getName()); + } + } + } + // Otherwise, it's a list. These are handled in ArConfig by the special + // _beginList and _endList keywords. The list members need to be added to + // the parser however. + else if (myData.myListData.myChildArgList != NULL) { + + for (std::list::const_iterator iter = + myData.myListData.myChildArgList->begin(); + iter != myData.myListData.myChildArgList->end(); + iter++) { + + if (!(*iter).addToFileParser(parser, + parserCB, + logPrefix, + isQuiet)) { + isSuccess = false; + } + } // end for each list member + + } // end else list + + return isSuccess; + +} // end method addToFileParser + + +/** + + @internal + * + * @return bool true if the arg was successfully parsed; false if an + * error occurred +**/ +AREXPORT bool ArConfigArg::parseArgument( + ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen, + const char *logPrefix, + bool isQuiet, + bool *changed) +{ + if ((arg == NULL) || + (logPrefix == NULL) || + ( (errorBuffer != NULL) && (errorBufferLen < 0) )) { + ArLog::log(ArLog::Normal, + "ArConfigArg::parseArgument() invalid input"); + return false; + } + + if ( (arg->getArg(0) == NULL) && + ( (getType() != ArConfigArg::STRING) && + (getType() != ArConfigArg::FUNCTOR) ) ) { + + if (!isQuiet) { + ArLog::log(ArLog::Verbose, "%sparameter '%s' has no argument.", + logPrefix, + getName()); + } + // continue; + return true; + } + + // this controls if we print out what changed + bool printing = false; + bool ok = true; + + switch (getType()) { + + // MPL added the string holder on 2/27 to get rid of the + // unknown type message + case DESCRIPTION_HOLDER: + case SEPARATOR: + case STRING_HOLDER: + // KMC 4/17/13 Not entirely sure about the LIST_HOLDER but it + // seems consistent with the others + case LIST_HOLDER: + { + // There's no need to read anything for these types + } + break; + + case INT: + { + int origInt = getInt(); + int valInt = arg->getArgInt(0, &ok); + if (ok) { + ok = setInt(valInt, errorBuffer, errorBufferLen); + + if (origInt != getInt() && changed != NULL && !mySupressChanges) + { + if (printing) + ArLog::log(ArLog::Normal, "%sParameter %s (int) changed from %d to %d", + logPrefix, getName(), origInt, getInt()); + + *changed = true; + } + + if (ok) { + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sSet parameter '%s' to '%d'", + logPrefix, getName(), valInt)); + } + else { // error setting int + // KMC 7/11/12 Why isn't this condition worthy of the error buffer? + // And should it really be verbose?? Seems like a potential problem. + ArLog::log(ArLog::Verbose, + "%sCould not set parameter '%s' to '%d'", + logPrefix, getName(), valInt); + } + } + else { // error parsing int + if (errorBuffer != NULL) { + snprintf(errorBuffer, errorBufferLen, + "%s is an integer parameter but was given non-integer argument of '%s'", + getName(), arg->getArg(0)); + } + } // end else error parsing int + } + break; + + case DOUBLE: + { + double origDouble = getDouble(); + double valDouble = arg->getArgDouble(0, &ok); + + if (ok) { + ok = setDouble(valDouble, errorBuffer, errorBufferLen); + + if (fabs(origDouble-getDouble()) > ArMath::epsilon() && + changed != NULL && !mySupressChanges) + { + if (printing) + ArLog::log(ArLog::Normal, "%sParameter %s (double) changed from %g to %g", + logPrefix, getName(), origDouble, getDouble()); + + *changed = true; + } + + if (ok) { + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sSet parameter '%s' to '%.10f'", + logPrefix, getName(), valDouble)); + } + else { // error setting double + + ArLog::log(ArLog::Verbose, + "%sCould not set parameter '%s' to '%.10f'", + logPrefix, getName(), valDouble); + } + } + else { // not a double + + ArLog::log(ArLog::Terse, + "%sparameter '%s' is a double parameter but was given non-double argument of '%s'", + logPrefix, getName(), arg->getArg(0)); + + if (errorBuffer != NULL) { + snprintf(errorBuffer, errorBufferLen, + "%s is a double parameter but was given non-double argument of '%s'", + getName(), arg->getArg(0)); + } + } // end else not a double + } + break; + + case BOOL: + { + bool origBool = getBool(); + bool valBool = arg->getArgBool(0, &ok); + if (ok) { + ok = setBool(valBool, errorBuffer, errorBufferLen); + + if (origBool != getBool() && changed != NULL && !mySupressChanges) + { + if (printing) + ArLog::log(ArLog::Normal, "%sParameter %s (bool) changed from %s to %s", + logPrefix, getName(), + ArUtil::convertBool(origBool), ArUtil::convertBool(getBool())); + *changed = true; + } + + if (ok) { + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sSet parameter '%s' to %s", + logPrefix, getName(), valBool ? "true" : "false" )); + } + else { // error setting bool + ArLog::log(ArLog::Verbose, + "%sCould not set parameter '%s' to %s", + logPrefix, getName(), valBool ? "true" : "false" ); + } // end else error setting bool + } + else { // error parsing bool + + ArLog::log(ArLog::Terse, + "%sparameter '%s' is a bool parameter but was given non-bool argument of '%s'", + logPrefix, getName(), arg->getArg(0)); + + if (errorBuffer != NULL) { + snprintf(errorBuffer, errorBufferLen, + "%s is a bool parameter but was given non-bool argument of '%s'", + getName(), arg->getArg(0)); + } + } // end else error parsing bool + } + break; + + case STRING: + { + std::string origString = getString(); + ok = setString(arg->getFullString()); + + if (ArUtil::strcmp(origString, getString()) != 0 && changed != NULL) + { + if (printing) + ArLog::log(ArLog::Normal, "%sParameter %s (string) changed from '%s' to '%s'", + logPrefix, getName(), + origString.c_str(), getString()); + + *changed = true; + } + + + if (ok) { + + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sSet parameter string '%s' to '%s'", + logPrefix, + getName(), getString())); + + } + else { // error setting setring + ArLog::log(ArLog::Verbose, + "%sCould not set string parameter '%s' to '%s'", + logPrefix, + getName(), getString()); + + // KMC 7/11/12 Looks like this intentionally won't overwrite an existing error + // message (but other types do). Why the inconsistency? + if (errorBuffer != NULL && errorBuffer[0] == '\0') + snprintf(errorBuffer, errorBufferLen, + "%s could not be set to '%s'.", + getName(), arg->getFullString()); + + } // end else error setting string + } + break; + + case LIST: + { + ArLog::log(ArLog::Normal, + "%sReceived LIST arg '%s' with '%s'", + logPrefix, getName(), arg->getFullString()); + + // MPL 9/6/12 for KMC The child count doesn't seem to do + // anything here, if it does something elsewhere or it does + // something later please set up something to set the changed + // bool poitner like the other entries in here. + + int childCount = arg->getArgInt(0, &ok); + if (ok) { + + } + else { // error parsing int + if (errorBuffer != NULL) { + snprintf(errorBuffer, errorBufferLen, + "%s is an list parameter but was given non-integer child count argument of '%s'", + getName(), arg->getArg(0)); + } + } // end else error parsing int + } + break; + + case FUNCTOR: + { + ok = setArgWithFunctor(arg); + + // MPL 9/6/12 we can't really tell if functor arguments + // changed but we shouldn't be using them anymore... so just + // assume that it's changed + if (changed != NULL) + { + *changed = true; + ArLog::log(ArLog::Verbose, + "%sAssuming arg '%s' changed because it's a functor ArConfigArg", + logPrefix, getName()); + } + + if (ok) { + IFDEBUG(ArLog::log(ArLog::Verbose, + "%sSet arg '%s' with '%s'", + logPrefix, getName(), arg->getFullString())); + + } + else { // error setting from functor + + ArLog::log(ArLog::Verbose, + "ArConfig: Could not set parameter '%s' to '%s'", + logPrefix, + getName(), arg->getFullString()); + + // KMC 7/11/12: This comment implies that the error buffer is being passed + // to setArgWithFunctor (but this does not seem to be happening). Why? + // + // if it didn't put in an error message make one + if (errorBuffer != NULL && errorBuffer[0] == '\0') { + snprintf(errorBuffer, errorBufferLen, + "%s could not be set to '%s'.", + getName(), arg->getFullString()); + } + } + } + break; + + default: + { + // While this seems like it would be an error condition, the original code + // did not set retFlag to false. + // + ArLog::log(ArLog::Verbose, + // KMC 7/11/12 Is the section information really necessary? + "%sWarning: Don't know the argument type for '%s' in section, got string '%s'", //, in section '%s'.", + logPrefix, arg->getExtraString(), arg->getFullString()); + // , mySection.c_str()); + } + + } // end switch type + + return ok; + +} // end method parseArgument + + +/** + * @param file the FILE * to be written, must be non-NULL + * @param lineBuf a char array to be used as a temporary write buffer, + * must be non-NULL + * @param lineBufSize the int number of chars in lineBuf, must be positive + * @param startCommentColumn the int column index at which to indent + * the arg description / comment + * @param isWriteExtra a bool set to true if the arg priority, display + * hint, restart level and other later extras should also be written + * to the file + * @param logPrefix the char * prefix to use in debug log messages, must be + * non-NULL + * @param indentLevel the int level of indentation for the arg (children + * of lists are indented further); must be non-negative + * @return bool true if the arguments were successfully written; false if an + * error occurred +**/ +AREXPORT bool ArConfigArg::writeArguments(FILE *file, + char *lineBuf, + int lineBufSize, + int startCommentColumn, + bool isWriteExtra, + const char *logPrefix, + int indentLevel) const +{ + if ((file == NULL) || + (lineBuf == NULL) || + (lineBufSize <= 0) || + (logPrefix == NULL) || + (indentLevel < 0)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::writeArguments() invalid input"); + return false; + } + + lineBuf[0] = '\0'; + + //char tempBuf[1024]; + + // holds the fprintf + char startLine[128]; + startLine[0] = '\0'; + + char nameBuf[256]; + nameBuf[0] = '\0'; + + char indentBuf[128]; + indentBuf[0] = '\0'; + snprintf(indentBuf, sizeof(indentBuf), + "%*s", (indentLevel * ourIndentSpaceCount), ""); + + // if the type is a functor then we need to handle all of it up + // here since its a special case both in regards to comments and values + if (getType() == ArConfigArg::FUNCTOR) + { + // put the comments in the file first + int nextChar = snprintf(lineBuf, lineBufSize, "; "); + + if (!ArUtil::isStrEmpty(getDescription())) { + writeMultiLineComment(getDescription(), + file, + lineBuf, + lineBufSize, + startLine); + } // end if description + + std::list::const_iterator argIt; + const std::list *argList = getArgsWithFunctor(); + if (argList != NULL) { + for (argIt = argList->begin(); argIt != argList->end(); argIt++) + { + // if there's a space in the name then quote the param name + if (strchr(getName(), ' ') != NULL || + strchr(getName(), '\t') != NULL) + fprintf(file, "\"%s\" %s\n", getName(), + (*argIt)->getFullString()); + else + fprintf(file, "%s %s\n", getName(), + (*argIt)->getFullString()); + } + } // end if arg list is not null + + return true; + + } // end if special FUNCTOR type param + + // If this code is reached, the param is not a special FUNCTOR type + + //param->writeArguments(lineBuf, lineBufSize, logPrefix); + + + + // ----------------------------- HERE + //// if its a string holder just write the name without quotes + //// (since its the value not really the name) + //if (param->getType() == ArConfigArg::STRING_HOLDER) + //{ + // fprintf(file, "%s %s\n", param->getName(), param->getString()); + + // continue; + //} + + // Write the param name... + + // If there's a space in the name, then surround it by quotes. + // Unless this is a string holder. In that case, "its the value + // not really the name". + writeName(nameBuf, sizeof(nameBuf), + ((!isListType()) ? indentLevel : 0)); + + + // Write the param value... + switch (getType()) { + + case INT: + { + snprintf(lineBuf, lineBufSize, + "%s %d", nameBuf, getInt()); + } + break; + + case DOUBLE: + { + // Easier to debug... + double d = getDouble(); + int p = getDoublePrecision(); + + if (p >= 0) { + snprintf(lineBuf, lineBufSize, + "%s %.*f", nameBuf, p, d); + } + else { // Old-style, inconsistent precision... + snprintf(lineBuf, lineBufSize, + "%s %g", nameBuf, d); + } + } + break; + + case BOOL: + { + snprintf(lineBuf, lineBufSize, + "%s %s", nameBuf, getBool() ? "true" : "false"); + } + break; + + case STRING: + case STRING_HOLDER: + { + snprintf(lineBuf, lineBufSize, + "%s %s", nameBuf, getString()); + } + break; + + case CPPSTRING: + { + snprintf(lineBuf, lineBufSize, + "%s %s", nameBuf, getCppString().c_str()); + } + break; + + case LIST: + case LIST_HOLDER: + { + snprintf(lineBuf, lineBufSize, + "%s%s %s", + indentBuf, LIST_BEGIN_TAG, nameBuf); + + + } + break; + + case DESCRIPTION_HOLDER: + { + //if (strlen(param->getDescription()) == 0) + //{ + // fprintf(file, "\n"); + // continue; + //} + // ???? + } + break; + // KMC 7/11/12: Seems like it must be possible to work this + // into the existing framework, maybe return later + //case FUNCTOR: + // { + // std::list::const_iterator argIt; + // const std::list *argList = param->getArgsWithFunctor(); + // if (argList != NULL) { + // for (argIt = argList->begin(); argIt != argList->end(); argIt++) + // { + // // if there's a space in the name then quote the param name + // if (strchr(param->getName(), ' ') != NULL || + // strchr(param->getName(), '\t') != NULL) + // fprintf(file, "\"%s\" %s\n", param->getName(), + // (*argIt)->getFullString()); + // else + // fprintf(file, "%s %s\n", param->getName(), + // (*argIt)->getFullString()); + // } + // } // end if arg list is not null + // } // + // break; + + default: + { + ArLog::log(ArLog::Terse, "%s in writeArguments(): unhandled argument type %s for config arg %s", logPrefix, toString(getType()), getName()); + } + break; + } // end switch type + + // Make sure there's no overrun + lineBuf[lineBufSize - 1] = '\0'; + + if (getType() == STRING_HOLDER) { + fprintf(file, "%s\n", lineBuf); + return true; + } + + // configure our start of line part + if (getType() == ArConfigArg::DESCRIPTION_HOLDER) { + sprintf(startLine, "; %%s"); + //sprintf(startLine, "; %%s"); + } + else { // KMC if (getType() != ArConfigArg::STRING_HOLDER) + sprintf(startLine, "%%-%ds;", startCommentColumn); + } + + + // KMC 8/3/12 IMPORTANT NOTE: While it would be extremely nice + // to prevent buffer overruns by using snprintf instead of sprintf, + // it is currently ill-advised. On Linux, the two methods behave + // differently when the line buffer is used as both the target buffer + // and as formatting input (as in all the prints below). It yields + // the desired results with sprintf, but substitutes an empty string + // for the formatting input with snprintf. This, in turn, causes + // the output config data to be garbage. (On Windows, there is no + // problem.) + + // if our line is already longer then where we want to go put in + // an extra space + if (strlen(lineBuf) >= startCommentColumn) { + sprintf(lineBuf, "%s ;", lineBuf); + } + // if its not then just put the start in + // KMC 1/22/13 Added the test for isStrEmpty. For unknown reasons, if + // the lineBuf is empty, then the sprintf results in garbage being + // printed. (See Bug 12735). If, however, the empty string is directly + // passed -- as in the else clause below -- then there isn't a problem. + else if (!ArUtil::isStrEmpty(lineBuf)) { + sprintf(lineBuf, startLine, lineBuf); + } + else { + sprintf(lineBuf, startLine, ""); + } + + + // KMC I think that this might be an issue. If the comment + // should appear right after the bounds. Otherwise, + writeBounds(lineBuf, lineBufSize, logPrefix); + + + // if we have a description to put in, put it in with word wrap + if (!ArUtil::isStrEmpty(getDescription())) + { + writeMultiLineComment(getDescription(), + file, + lineBuf, + lineBufSize, + startLine); + } + // else no description, just end the line + else { + fprintf(file, "%s\n", lineBuf); + + } + lineBuf[0] = '\0'; + + // For list types, indent and write their children. This is done + // outside the main switch statement so that the description can + // remain with the list intro. + // + if (isListType()) { + + if (myData.myListData.myChildArgList != NULL) { + for (std::list::const_iterator cIter = myData.myListData.myChildArgList->begin(); + cIter != myData.myListData.myChildArgList->end(); + cIter++) { + + (*cIter).writeArguments(file, + lineBuf, + lineBufSize, + startCommentColumn, + isWriteExtra, + logPrefix, + indentLevel + 1); + + } // end for each child arg + } // end if child arg list + + lineBuf[0] = '\0'; + + writeName(lineBuf, lineBufSize, + ((isListType()) ? indentLevel : 0)); + + snprintf(lineBuf, lineBufSize, + "%s%s %s", + indentBuf, LIST_END_TAG, nameBuf); + + fprintf(file, "%s\n", lineBuf); + lineBuf[0] = '\0'; + + } // end if list + + + + // if they have a config priority put that on its own line + if (isWriteExtra) + { + sprintf(lineBuf, startLine, ""); + fprintf(file, "%s Priority: %s\n", lineBuf, + ArPriority::getPriorityName(getConfigPriority())); + lineBuf[0] = '\0'; + + sprintf(lineBuf, startLine, ""); + fprintf(file, "%s DisplayHint: %s\n", lineBuf, getDisplayHint()); + + lineBuf[0] = '\0'; + + sprintf(lineBuf, startLine, ""); + fprintf(file, "%s RestartLevel: %d\n", lineBuf, getRestartLevel()); + + lineBuf[0] = '\0'; + + } + + return true; + +} // end method writeArguments + + +AREXPORT bool ArConfigArg::parseResource(ArArgumentBuilder *arg, + char *errorBuffer, + size_t errorBufferLen, + const char *logPrefix, + bool isQuiet) +{ + + if (arg == NULL) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResource(), invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return false; + } + + if (arg->getArgc() == 0) { + // Don't log error because this just indicates an empty line + return false; + } + + if (arg->getArgc() <= RESOURCE_INDEX_OF_DESCRIPTION) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResource(), invalid input, too few args (%i)", + ((logPrefix != NULL) ? logPrefix : ""), + arg->getArgc()); + return false; + } + + if (ArUtil::isStrEmpty(arg->getArg(RESOURCE_INDEX_OF_ARG_NAME))) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResource(), empty name", + ((logPrefix != NULL) ? logPrefix : "")); + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (arg->getArgc() > RESOURCE_INDEX_OF_DESCRIPTION) { + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_DESCRIPTION), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + myDescription = buf; + } + } + + if (arg->getArgc() > RESOURCE_INDEX_OF_EXTRA) { + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_EXTRA), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + myExtraExplanation = buf; + } + } + + if (arg->getArgc() > RESOURCE_INDEX_OF_DISPLAY) { + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_DISPLAY), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + myDisplayName = buf; + } + } + + if (arg->getArgc() > RESOURCE_INDEX_OF_NEW) { + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_NEW), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + if (ArUtil::strcasecmp(buf, NEW_RESOURCE_TAG) == 0) { + myIsTranslated = false; + } + else { + myIsTranslated = true; + } + } + } + + return true; + +} // end method parseResource + + +AREXPORT std::string ArConfigArg::parseResourceSectionName(ArArgumentBuilder *arg, + const char *logPrefix) +{ + std::string sectionName; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_SECTION_NAME)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResourceSectionName() invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return sectionName; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_SECTION_NAME), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + sectionName = buf; + } + return sectionName; + +} // end method parseResourceSectionName + +AREXPORT std::string ArConfigArg::parseResourceArgName(ArArgumentBuilder *arg, + const char *logPrefix) +{ + std::string argName; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_ARG_NAME)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResourceArgName() invalid input (%s)", + ((logPrefix != NULL) ? logPrefix : ""), + ((arg != NULL) ? arg->getFullString() : "NULL")); + return argName; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_ARG_NAME), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + argName = buf; + } + return argName; + +} // end method parseResourceArgName + + +AREXPORT ArConfigArg::Type ArConfigArg::parseResourceType(ArArgumentBuilder *arg, + const char *logPrefix) +{ + Type t = INVALID; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_TYPE)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResourceType() invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return t; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_TYPE), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + t = typeFromString(buf); + } + return t; + +} // end method parseResourceType + +AREXPORT bool ArConfigArg::isResourceTopLevel(ArArgumentBuilder *arg, + const char *logPrefix) +{ + bool b = true; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_PARENT_PATH)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::isResourceTopLevel() invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return b; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_PARENT_PATH), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + b = ArUtil::isStrEmpty(buf); + } + return b; + +} // end method isResourceTopLevel + + +AREXPORT std::list ArConfigArg::parseResourceParentPath(ArArgumentBuilder *arg, + char separator, + const char *logPrefix) +{ + std::list path; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_PARENT_PATH)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::isResourceTopLevel() invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return path; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_PARENT_PATH), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + path = splitParentPathName(buf, separator); + } + + return path; + +} // end method parseResourceParentPath + +AREXPORT std::string ArConfigArg::parseResourceDescription(ArArgumentBuilder *arg, + const char *logPrefix) +{ + std::string desc; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_DESCRIPTION)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResourceDescription() invalid input (%s)", + ((logPrefix != NULL) ? logPrefix : ""), + ((arg != NULL) ? arg->getFullString() : "NULL")); + return desc; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_DESCRIPTION), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + desc = buf; + } + return desc; + +} // end method parseResourceDescription + +AREXPORT std::string ArConfigArg::parseResourceExtra(ArArgumentBuilder *arg, + const char *logPrefix) +{ + std::string desc; + + if ((arg == NULL) || + (arg->getArgc() <= RESOURCE_INDEX_OF_EXTRA)) { + + ArLog::log(ArLog::Normal, + "%sArConfigArg::parseResourceExtra() invalid input (%s)", + ((logPrefix != NULL) ? logPrefix : ""), + ((arg != NULL) ? arg->getFullString() : "NULL")); + return desc; + } + + char buf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + if (parseResourceArgText(arg->getArg(RESOURCE_INDEX_OF_EXTRA), + buf, + MAX_RESOURCE_ARG_TEXT_LENGTH)) { + desc = buf; + } + return desc; + +} // end method parseResourceExtra + +AREXPORT bool ArConfigArg::parseResourceArgText(const char *argText, + char *bufOut, + size_t bufLen) +{ + if ((argText == NULL) || (bufOut == NULL) || (bufLen <= 0)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::parseResourceArgText() error, invalid input"); + return false; + } + + char otherBuf[MAX_RESOURCE_ARG_TEXT_LENGTH]; + + strncpy(otherBuf, argText, MAX_RESOURCE_ARG_TEXT_LENGTH); + otherBuf[MAX_RESOURCE_ARG_TEXT_LENGTH - 1] = '\0'; + + int len = strlen(otherBuf); + + for (int j = len - 1; j >= 0; j--) { + if ((otherBuf[j] < 0) || isspace(otherBuf[j])) { + otherBuf[j] = '\0'; + } + else { + break; + } + } + + len = strlen(otherBuf); + + int k = 0; + for (k = 0; k < len; k++) { + if ((otherBuf[k] >= 0) && !isspace(otherBuf[k])) { + break; + } + } + if (k < len) { + bool isStripped = ArUtil::stripQuotes(bufOut, &otherBuf[k], bufLen); + } + else { + bufOut[0] = '\0'; + } + + bool isNullArg = false; + if ((strlen(bufOut) == 0) || + (strcmp(bufOut, NULL_TAG) == 0)) { + isNullArg = true; + } + + if (isNullArg) { + bufOut[0] = '\0'; + } + + return true; + +} // end method parseResourceArgText + + +AREXPORT bool ArConfigArg::writeResource(FILE *file, + char *lineBuf, + int lineBufSize, + char separatorChar, + const char *sectionName, + const char *logPrefix) const +{ + + bool ignoreNormalSpaces = true; + ArArgumentBuilder builder(512, separatorChar, ignoreNormalSpaces); + + if ((file == NULL) || (lineBuf == NULL) || (lineBufSize <= 0)) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::writeCsv() error writing %s, invalid input", + ((logPrefix != NULL) ? logPrefix : ""), + ((getName() != NULL) ? getName() : "")); + return false; + } + + // KMC 5/15/13 Do not write string holders until they are better handled. + if (getType() == STRING_HOLDER) { + return true; + } + + std::string parentPathName = getParentPathName(); + if (parentPathName.empty()) { + parentPathName = NULL_TAG; + } + + builder.addPlain((sectionName != NULL) ? sectionName : NULL_TAG); + builder.addPlain(myName.c_str()); + builder.addPlain(toString(myType)); + builder.addPlain(ArPriority::getPriorityName(myConfigPriority)); + builder.addPlain(toString(myRestartLevel)); + builder.addPlain(parentPathName.c_str()); + builder.addPlain(((!myDescription.empty()) ? myDescription.c_str() : NULL_TAG)); + builder.addPlain(((!myExtraExplanation.empty()) ? myExtraExplanation.c_str() : NULL_TAG)); + + builder.addPlain(((!myDisplayName.empty()) ? myDisplayName.c_str() : NULL_TAG)); + + builder.addPlain(((myIsTranslated) ? NULL_TAG : NEW_RESOURCE_TAG)); + + + fprintf(file, "%s\n", builder.getFullString()); + + if (isListType()) { + for (size_t i = 0; i < getArgCount(); i++) { + const ArConfigArg *childArg = getArg(i); + if (childArg != NULL) { + bool isChildSuccess = childArg->writeResource(file, + lineBuf, + lineBufSize, + separatorChar, + sectionName, + logPrefix); + } + } + } // end if list + + return true; + +} // end method writeResource + + +AREXPORT int ArConfigArg::writeResourceHeader(FILE *file, + char *lineBuf, + int lineBufSize, + char separatorChar, + const char *sectionTitle, + const char *logPrefix) +{ + + if ((file == NULL) || (lineBuf == NULL) || (lineBufSize <= 0)) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::writeResourceHeader() error writing header, invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return false; + } + + + IFDEBUG(ArLog::log(ArLog::Normal, + "%sArConfigArg::writeResourceHeader() writing header with section title = %s", + ((logPrefix != NULL) ? logPrefix : ""), + ((sectionTitle != NULL) ? sectionTitle : "NULL"))); + + snprintf(lineBuf, lineBufSize, + //0 1 2 3 4 5 6 7 8 9 + "%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s", + //"\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"\n", + ((!ArUtil::isStrEmpty(sectionTitle)) ? sectionTitle : "SECTION"), // 0 + separatorChar, + "NAME", // 1 + separatorChar, + "TYPE", // 2 + separatorChar, + "PRIORITY", // 3 + separatorChar, + "RESTART", // 4 + separatorChar, + "PARENT", // 5 + separatorChar, + "DESCRIPTION", // 6 + separatorChar, + "EXTRA", // 7 + separatorChar, + "DISPLAY", // 8 + separatorChar, + "NEW"); // 9 + + fprintf(file, "%s\n", lineBuf); + + const char *roText = "read-only"; + const char *edText = "editable"; + snprintf(lineBuf, lineBufSize, + // 0 1 2 3 4 5 6 7 8 9 + "%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s", + //"\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"%c\"%s\"\n", + roText, // "SECTION", // 0 + separatorChar, + roText, // "NAME", // 1 + separatorChar, + roText, // "TYPE", // 2 + separatorChar, + roText, // "PRIORITY", // 3 + separatorChar, + roText, // "RESTART", // 4 + separatorChar, + roText, // "PARENT", // 5 + separatorChar, + edText, //"DESCRIPTION", // 6 + separatorChar, + edText, // "EXTRA" // 7 + separatorChar, + "future", // "DISPLAY" // 8 + separatorChar, + edText); // "NEW" // 9 + fprintf(file, "%s\n", lineBuf); + + fprintf(file, "\n"); + + return 3; + +} // end method writeResourceHeader + +AREXPORT int ArConfigArg::writeResourceSectionHeader(FILE *file, + char *lineBuf, + int lineBufSize, + char separatorChar, + const char *sectionName, + const char *sectionDesc, + const char *sectionExtra, + const char *sectionDisplayName, + bool isTranslated, + const char *logPrefix) +{ + if ((file == NULL) || (lineBuf == NULL) || (lineBufSize <= 0) || + (ArUtil::isStrEmpty(sectionName))) { + ArLog::log(ArLog::Normal, + "%sArConfigArg::writeResourceSectionHeader() error writing header, invalid input", + ((logPrefix != NULL) ? logPrefix : "")); + return false; + } + + + + snprintf(lineBuf, lineBufSize, + //0 1 2 3 4 5 6 7 8 9 + "%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s%c%s", + sectionName, // 0 + separatorChar, + NULL_TAG, // 1 + separatorChar, + NULL_TAG, // 2 + separatorChar, + NULL_TAG, // 3 + separatorChar, + NULL_TAG, // 4 + separatorChar, + NULL_TAG, // 5 + separatorChar, + ((!ArUtil::isStrEmpty(sectionDesc)) ? sectionDesc : NULL_TAG), // 6 + separatorChar, + ((!ArUtil::isStrEmpty(sectionExtra)) ? sectionExtra : NULL_TAG), // 7 + separatorChar, + ((!ArUtil::isStrEmpty(sectionDisplayName)) ? sectionDisplayName : NULL_TAG), // 8 + separatorChar, + ((isTranslated) ? NULL_TAG : NEW_RESOURCE_TAG)); // TODO Any indication for new sections? + + fprintf(file, "%s\n", lineBuf); + + return true; +} // end method writeResourceSectionHeader + +/** + * @param lineBuf a char array to which to write the name, + * must be non-NULL + * @param lineBufSize the int number of chars in lineBuf, must be positive + * @param indentLevel the int level of indentation for the arg (children + * of lists are indented further); must be non-negative + * @return bool true if the name was successfully written; false if an + * error occurred +**/ +AREXPORT bool ArConfigArg::writeName(char *lineBuf, + int lineBufSize, + int indentLevel) const +{ + if ((lineBuf == NULL) || (lineBufSize <= 0)) { + return false; + } + + snprintf(lineBuf, lineBufSize, + "%*s", (indentLevel * ourIndentSpaceCount), ""); + + if ((getType() != ArConfigArg::STRING_HOLDER) && + ( (strchr(getName(), ' ') != NULL || + strchr(getName(), '\t') != NULL) )) { + + snprintf(lineBuf, lineBufSize, + "%s\"%s\"", lineBuf, getName()); + } + else { + snprintf(lineBuf, lineBufSize, + "%s%s", lineBuf, getName()); + } + return true; + +} // end method writeName + + +/** + * @param comment the char * string to be written to the file, must be + * non-NULL + * @param file the FILE * to be written, must be non-NULL + * @param lineBuf a char array to be used as a temporary write buffer, + * must be non-NULL + * @param lineBufSize the int number of chars in lineBuf, must be positive + * @param startComment the char * text that should prefix the comment + * on the first line + * @return bool true if the comment was successfully written; false if an + * error occurred +**/ +AREXPORT bool ArConfigArg::writeMultiLineComment(const char *comment, + FILE *file, + char *lineBuf, + int lineBufSize, + const char *startComment) +{ + if ((comment == NULL) || + (file == NULL) || + (lineBuf == NULL) || + (lineBufSize <= 0) || + (startComment == NULL)) { + ArLog::log(ArLog::Normal, + "ArConfigArg::writeMultiLineComment() invalid input"); + return false; + } + // KMC 7/11/12 It seems like this could be made more efficient. + // And should also check for bounds on the lineBuf. + // + ArArgumentBuilder descr; + descr.setQuiet(true); // KMC TODO Add flag myIsQuiet); + descr.addPlain(comment); + + for (unsigned int i = 0; i < descr.getArgc(); i++) + { + // KMC 8/3/12 IMPORTANT NOTE: While it would be extremely nice + // to prevent buffer overruns by using snprintf instead of sprintf, + // it is currently ill-advised. On Linux, the two methods behave + // differently when the line buffer is used as both the target buffer + // and as formatting input (as in all the prints below). It yields + // the desired results with sprintf, but substitutes an empty string + // for the formatting input with snprintf. This, in turn, causes + // the output config data to be garbage. (On Windows, there is no + // problem.) + + // see if we're over, if we are write this line out and start + // the next one + if (strlen(lineBuf) + strlen(descr.getArg(i)) > 78) + { + fprintf(file, "%s\n", lineBuf); + + sprintf(lineBuf, startComment, ""); + sprintf(lineBuf, "%s %s", lineBuf, descr.getArg(i)); + } + // if its not the end of the line toss this word in + else { + + sprintf(lineBuf, "%s %s", lineBuf, descr.getArg(i)); + } + } + // put the last line into the file + fprintf(file, "%s\n", lineBuf); + + return true; + +} // end method writeMultiLineComment + + + +/** + * @param line a char array to be used as a temporary write buffer, + * must be non-NULL + * @param lineLen the int number of chars in line, must be positive + * @param logPrefix the char * prefix to use in debug log messages, must be + * non-NULL + * @return bool true if the values were successfully written; false if an + * error occurred +**/ +AREXPORT bool ArConfigArg::writeBounds(char *line, + size_t lineLen, + const char *logPrefix) const +{ + if ((line == NULL) || + (lineLen <= 0) || + (logPrefix == NULL)) { + + ArLog::log(ArLog::Normal, + "ArConfigArg::writeBounds() invalid input"); + return false; + } + + // KMC 8/3/12 IMPORTANT NOTE: While it would be extremely nice + // to prevent buffer overruns by using snprintf instead of sprintf, + // it is currently ill-advised. On Linux, the two methods behave + // differently when the line buffer is used as both the target buffer + // and as formatting input (as in all the prints below). It yields + // the desired results with sprintf, but substitutes an empty string + // for the formatting input with snprintf. This, in turn, causes + // the output config data to be garbage. (On Windows, there is no + // problem.) + + switch (getType()) { + + case INT: + { + if (hasMinBound()) { + + if (hasMaxBound()) { + sprintf(line, + "%s range [%d, %d], ", + line, + getMinInt(), getMaxInt()); + } + else { // no max, just write min + sprintf(line, + // KMC 7/11/12 Corrected misspelling, will this be a problem? + "%s minimum %d, ", + line, + getMinInt()); + } // end else no max, just write min + } + else if (hasMaxBound()) { + sprintf(line, + "%s maximum %d, ", + line, + getMaxInt()); + } + } + break; + + case DOUBLE: + { + if (hasMinBound()) { + + if (hasMaxBound()) { + sprintf(line, + "%s range [%g, %g], ", + line, + getMinDouble(), getMaxDouble()); + } + else { + sprintf(line, + "%s minimum %g, ", + line, + getMinDouble()); + } + } + else if (hasMaxBound()) { + // KMC 7/11/12 Made case consistent, problem? + sprintf(line, + "%s maximum %g, ", + line, + getMaxDouble()); + } + } + break; + + default: + // No other types currently have bounds + break; + } // end switch + + line[lineLen - 1] = '\0'; + + return true; + +} // end method writeBounds + + +AREXPORT void ArConfigArg::log(bool verbose, + int indentCount, + const char *logPrefix) const +{ + std::list::const_iterator it; + const std::list *argList = NULL; + std::string intType; + + // Arbitrarily capping at 11 tabs + char indent[12]; + int i = 0; + for (; ((i < indentCount) && (i < 12 - 1)); i++) { + indent[i] = '\t'; + } // end for each indentation + // At most, i should be 11 here. + indent[i] = '\0'; + + void *intPointer = NULL; + + ArLog::log(ArLog::Terse, "%s%s%s (name)", + ((logPrefix != NULL) ? logPrefix : ""), + indent, + getName()); + + + switch (getType()) + { + case ArConfigArg::INVALID: + ArLog::log(ArLog::Terse, + "\tType: %10s. This argument was not created properly.", + "invalid"); + + case ArConfigArg::INT: + + switch (myData.myIntData.myIntType) { + case INT_NOT: + intType = "Not"; + intPointer = NULL; + break; + case INT_INT: + intType = "Int"; + intPointer = myData.myIntData.myIntPointer; + break; + case INT_SHORT: + intType = "Short"; + intPointer = myData.myIntData.myIntShortPointer; + break; + case INT_UNSIGNED_SHORT: + intType = "Unsigned Short"; + intPointer = myData.myIntData.myIntUnsignedShortPointer; + break; + case INT_UNSIGNED_CHAR: + intType = "Unsigned Short"; + intPointer = myData.myIntData.myIntUnsignedCharPointer; + break; + default: + intType = "Unknown"; + intPointer = NULL; + break; + } + + + ArLog::log(ArLog::Terse, "%s\tValue: %d \tType: %s intType: %s", + indent, + getInt(), "int", intType.c_str()); + if (!myOwnPointedTo) + ArLog::log(ArLog::Terse, "%s\tPointer: %p", + indent, intPointer); + + if (verbose) + ArLog::log(ArLog::Terse, "%s\tMin: %10d Max: %10d", + indent, + myData.myIntData.myMinInt, myData.myIntData.myMaxInt); + break; + + case ArConfigArg::DOUBLE: + ArLog::log(ArLog::Terse, "%s\tValue: %f \tType: %s", + indent, + getDouble(), "double"); + if (!myOwnPointedTo) + ArLog::log(ArLog::Terse, "%s\tPointer: %p", + indent, myData.myDoubleData.myDoublePointer); + if (verbose) + ArLog::log(ArLog::Terse, "%s\tMin: %10g Max: %10g", + indent, + myData.myDoubleData.myMinDouble, myData.myDoubleData.myMaxDouble); + break; + + case ArConfigArg::STRING: + case ArConfigArg::STRING_HOLDER: + + ArLog::log(ArLog::Terse, "%s\tValue: %s \tType: %s", + indent, + getString(), "string"); + if (!myOwnPointedTo) + ArLog::log(ArLog::Terse, "%s\tPointer: %p", + indent, myData.myStringData.myStringPointer); + if (verbose) + ArLog::log(ArLog::Terse, "%s\tLength: %d", + indent, + myData.myStringData.myMaxStrLen); + break; + + case ArConfigArg::CPPSTRING: + ArLog::log(ArLog::Terse, "%s\tValue: %s \tType: %s", + indent, + getString(), "cppstring"); + if (!myOwnPointedTo) + ArLog::log(ArLog::Terse, "%s\tPointer: %p", + indent, myData.myCppStringData.myCppStringPtr); + break; + + case ArConfigArg::BOOL: + + ArLog::log(ArLog::Terse, "%s\tValue: %s \tType: %s", + indent, + ArUtil::convertBool(getBool()), "bool"); + if (!myOwnPointedTo) + ArLog::log(ArLog::Terse, "%s\tPointer: %p", + indent, myData.myBoolData.myBoolPointer); + break; + + + case ArConfigArg::LIST: + case ArConfigArg::LIST_HOLDER: + + ArLog::log(ArLog::Terse, "%sChildren: %d type: %10s", + indent, + getArgCount(), "list"); + + // KMC 7/10/12 Should the children only be logged if verbose is set to true? + + break; + + case ArConfigArg::FUNCTOR: + + ArLog::log(ArLog::Terse, "%sType: %s", + indent, + "functor"); + ArLog::log(ArLog::Terse, "%s\t\t\tValues:", + indent); + + argList = myData.myFunctorData.myGetFunctor->invokeR(); + for (it = argList->begin(); it != argList->end(); it++) + ArLog::log(ArLog::Terse, "%s\t\t%s", indent, (*it)->getFullString()); + break; + + case ArConfigArg::DESCRIPTION_HOLDER: + + ArLog::log(ArLog::Terse, "%sType: %20s Description: %s", + indent, + "description_holder", getDescription()); + + default: + ArLog::log(ArLog::Terse, + "\tType: %10s. This type doesn't have a case in ArConfigArg::log.", + toString(myType)); + break; + } + + ArLog::log(ArLog::Terse, "\t\tPriority: %s", + ArPriority::getPriorityName(myConfigPriority)); + if (strlen(getDescription()) != 0) + ArLog::log(ArLog::Terse, "%s\tDescription: %s", + indent, + getDescription()); + + if ((isListType()) && + (myData.myListData.myChildArgList != NULL)) { + int c = 1; + for (std::list::const_iterator iter = myData.myListData.myChildArgList->begin(); + iter != myData.myListData.myChildArgList->end(); + iter++, c++) { + ArLog::log(ArLog::Terse, + "%sChild Arg #%i:", + indent, + c); + (*iter).log(verbose, indentCount + 1); + } // end for each child arg + } + +} + +/** + The priority of this argument when used in ArConfig. + **/ +AREXPORT ArPriority::Priority ArConfigArg::getConfigPriority(void) const +{ + return myConfigPriority; +} + +/** + The priority of this argument when used in ArConfig. + **/ + +AREXPORT void ArConfigArg::setConfigPriority(ArPriority::Priority priority) +{ + myConfigPriority = priority; +} + + +AREXPORT const char *ArConfigArg::getDisplayHint() const +{ + if (myDisplayHint.length() > 0) { + return myDisplayHint.c_str(); + } + else { + return NULL; + } +} // end method getDisplayHint + + +/** + * The "display hint" is a text string that may be used by the client + * to improve the display of the argument. Multiple, non-confilicting + * display hints may be specified by using the "&&" separator. For example: + * "Choices:High;;Low&&Visible:PinEnabled=true" + * + * The display hints that are currently supported by MobileEyes and + * MobilePlanner are described below. + * + * For all ArConfigArg types: + *
    + * + *
  • + * Visible:OtherParamName=OtherParamValue + *
      + *
    • The current ArConfigArg will be displayed in the configuration editor + * only when the other parameter equals the specified value. This is used + * to vary a set of displayed items based on list choices. The presentation + * will be similar to the current implementation of child objects in the map.
    • + *
    + *
  • + * + *
  • + * Visible:OtherParamName!=OtherParamValue + *
      + *
    • The current ArConfigArg will be displayed in the configuration editor + * only when the other parameter does not equal the specified value. This is used + * to vary a set of displayed items based on list choices. The presentation + * will be similar to the current implementation of child objects in the map.
    • + *
    + *
  • + * + *
  • + * Visible:OtherParamName>OtherParamValue + *
      + *
    • EXPLANATION
    • + *
    + *
  • + * + *
  • + * Visible:false + *
      + *
    • The ArConfigArg is never displayed
    • + *
    + *
  • + * + *
  • + * Editable:OtherParamName=OtherParamValue + *
      + *
    • The current ArConfigArg is read-only unless the other parameter equals + * the specified value. This allows fine-grained dependencies, primarily + * for small “enabled” flags.
    • + *
    + *
  • + * + *
  • + * Editable:OtherParamName!=OtherParamValue + *
      + *
    • The current ArConfigArg is read-only unless the other parameter equals + * the specified value. This allows fine-grained dependencies, primarily + * for small “enabled” flags.
    • + *
    + *
  • + * + *
  • + * Editable:OtherParamName>OtherParamValue + *
      + *
    • The current ArConfigArg is read-only unless the other parameter exceeds + * the specified value. This is provided primarily for consistency with the + Visible case. Its usefulness is questionable.
    • + *
    + *
  • + * + *
  • + * Editable:false + *
      + *
    • The current ArConfigArg is always read-only
    • + *
    + *
  • + *
+ * + * + * For type STRING: + *
    + * + *
  • Choices:choice1(;;choice#i)* + *
      + *
    • For example, "Choices:North;;South;;East;;West"
    • + *
    • To include an empty choice, start the choice list with ;;. + * For example, "Choices:;;FirstNonEmpty;;SecondNonEmpty"
    • + *
    + *
  • + *
  • MapItem:type|(Parent|SubType|SubTypeAndParent|SubTypeGlob)|(Optional|Required) + *
      + *
    • For example, "MapItem:Dock|Parent|Optional"
    • + *
    • If SubTypeGlob is specified, then type may contain + * wildchar characters * and ?
    • + *
    + *
  • + *
  • ChildObject:type|(Parent|SubType|SubTypeAndParent|SubTypeGlob)|(Optional|Required) + *
      + *
    • This value is only supported for parameters that are associated + * with a MapInfo. It allows the application to create a parent/child + * relationship amongst certain map items. Mapper3 automatically manages + * the creation of the child items.
    • + *
    • To specify a default value for the associated parameter, set the + * ArConfigArg's string value to: + * ParentTypeName_\@_ParameterName_\@_DefaultChildTypeName.
    • + *
    + *
  • + *
  • Macro:taskClass1(;;taskClass#i)*|(Optional|Required) + *
    • For example, "Macro:Audio;;Camera;;Video|Optional"
    + *
  • + *
  • Macro + *
    • When used with no qualifiers, there are no task class restrictions and + * the macro is optional
    + *
  • + * + *
  • Time:format + *
      + *
    • The format must conform to Qt's QTime format definition. (Briefly: + * h = hour, m = minute, s = second, z = millisecond, and AP = AM/PM. + * Double characters indicate that a leading 0 should be used to pad.)
    • + *
    • For example, "Time:h:mm AP" or "Time:hh:mm:ss"
    • + *
    • Note that this is a time-of-day, not a duration. Seconds and minutes + * range from 0 to 59, and hour ranges from 0 to 23 (or 1 to 12 with AM/PM).
    • + *
    • AP (i.e. AM/PM) only affects the display of the time; the string that + * is stored in the ArConfigArg should always be converted to 24 hour + * format.
    • + *
    + *
  • + * + *
  • Time + *
    • When there are no qualifiers, the default format "h:mm AP" is used
    + *
  • + * + *
  • RobotFile:fileFilterNames|fileFilters + *
      + *
    • where: + *
        + *
      • fileFilterNames is a string that contains the complete displayable + * names for all of the file filters + * (e.g. Map files (*.map);;World files + * (*.wld)), or, + * empty if no filter needs to be applied, and
      • + *
      • fileFilters is a string that contains just file extensions + * for each of the file filters (e.g. *.map;;*.wld"). + * The number and order of these filters must match + * that of the fileFilterNames parameter.
      • + *
      + *
    • + *
    • For example, "RobotFile:Map Files (*.map);;World Files + * (*.wld)|*.map;;*.wld"
    • + *
    • For further example, "All audio files (*.ogg *.wav);;Ogg Vorbis files (*.ogg);;WAV files (*.wav);;*.ogg *.wav;;*.ogg;;*.wav"
    • + *
    + *
  • + *
+ * + * For type INT: + *
    + *
  • Color
  • + *
+ * + * For type BOOL: + *
    + *
  • Checkbox
  • + *
+ * +**/ +AREXPORT void ArConfigArg::setDisplayHint(const char *hintText) +{ + if (hintText != NULL) { + myDisplayHint = hintText; + } + else { + myDisplayHint = ""; + } +} // end method setDisplayHint + + +AREXPORT ArConfigArg::RestartLevel ArConfigArg::getRestartLevel() const +{ + return myRestartLevel; +} + +AREXPORT void ArConfigArg::setRestartLevel(RestartLevel level) +{ + myRestartLevel = level; +} + + +AREXPORT bool ArConfigArg::getSupressChanges() const +{ + return mySupressChanges; +} + +AREXPORT void ArConfigArg::setSupressChanges(bool supressChanges) +{ + mySupressChanges = supressChanges; +} + + +AREXPORT bool ArConfigArg::hasMinBound() const +{ + bool isMinValid = false; + + switch (getType()) { + + case INT: + isMinValid = myData.myIntData.myMinInt != INT_MIN; + + //switch (myData.myIntData.myIntType) { + //case INT_INT: + // isMinValid = (myData.myIntData.myMinInt != INT_MIN); + // break; + //case INT_SHORT: + // isMinValid = (myData.myIntData.myMinInt != SHRT_MIN); + // break; + //case INT_UNSIGNED_SHORT: + // // KMC 7/13/12 Wondering whether this should just always be true + // // (i.e. always min 0 at least). Same with uchar + // isMinValid = (myData.myIntData.myMinInt != 0); + // break; + //case INT_UNSIGNED_CHAR: + // isMinValid = (myData.myIntData.myMinInt != 0); + // break; + //} // end switch int type + break; + case DOUBLE: + isMinValid = (ArMath::fabs(myData.myDoubleData.myMinDouble + HUGE_VAL) > ArMath::epsilon()); + break; + default: + isMinValid = false; + break; + } // end switch type + + return isMinValid; + +} // end method hasMinBound + + +AREXPORT bool ArConfigArg::hasMaxBound() const +{ + bool isMaxValid = false; + + switch (getType()) { + + case INT: + isMaxValid = (myData.myIntData.myMaxInt != INT_MAX); + + //switch (myData.myIntData.myIntType) { + //case INT_INT: + // isMaxValid = (myData.myIntData.myMaxInt != INT_MAX); + // break; + //case INT_SHORT: + // isMaxValid = (myData.myIntData.myMaxInt != SHRT_MAX); + // break; + //case INT_UNSIGNED_SHORT: + // isMaxValid = (myData.myIntData.myMaxInt != USHRT_MAX); + // break; + //case INT_UNSIGNED_CHAR: + // isMaxValid = (myData.myIntData.myMaxInt != 255); + // break; + //} // end switch int type + break; + case DOUBLE: + isMaxValid = (ArMath::fabs(myData.myDoubleData.myMaxDouble - HUGE_VAL) > ArMath::epsilon()); + break; + default: + isMaxValid = false; + break; + } // end switch type + + return isMaxValid; + +} // end method hasMaxBound + +/** + This is for debugging and will prevent the bounds checking from + happening, you shouldn't normally use it + **/ +AREXPORT void ArConfigArg::setIgnoreBounds(bool ignoreBounds) +{ + myIgnoreBounds = ignoreBounds; +} + +AREXPORT bool ArConfigArg::hasExternalDataReference() const +{ + bool b = false; + + switch (getType()) { + + case INT: + case DOUBLE: + case BOOL: + b = !myOwnPointedTo; + break; + + case STRING: + case STRING_HOLDER: + case CPPSTRING: + // KMC 7/13/12 Not sure why the myOwnPointedTo attribute does + // not apply to strings ?? + // KMC own string change + // b = !myData.myStringData.myUsingOwnedString; + b = !myOwnPointedTo; + break; + + default: + b = false; + break; + } + + return b; + +} // end method hasExternalDataReference + +AREXPORT bool ArConfigArg::isValueEqual(const ArConfigArg &other) const +{ + if (strcmp(getName(), other.getName()) != 0) { + return false; + } + Type t = getType(); + if (t != other.getType()) { + return false; + } + bool isEqual = false; + + switch (t) { + case INVALID: + isEqual = true; // Seems logical that two invalid args are equal... + break; + + case INT: + isEqual = (getInt() == other.getInt()); + break; + + case DOUBLE: + isEqual = (ArMath::fabs(getDouble() - other.getDouble()) < ArMath::epsilon()); + break; + + case STRING: + isEqual = (strcmp(getString(), other.getString()) == 0); + break; + + case CPPSTRING: + isEqual = *(getCppStringPtr()) == *(other.getCppStringPtr()); + break; + + case BOOL: + isEqual = (getBool() == other.getBool()); + break; + + case SEPARATOR: + isEqual = true; + break; + + // Since STRING_HOLDERs do not appear to have equal values, assuming + // the same for LIST_HOLDERs. + case LIST: + { + if ((myData.myListData.myChildArgList != NULL) && + (other.myData.myListData.myChildArgList != NULL)) { + + if (myData.myListData.myChildArgList->size() == + other.myData.myListData.myChildArgList->size()) { + for (std::list::const_iterator + iter1 = myData.myListData.myChildArgList->begin(), + iter2 = other.myData.myListData.myChildArgList->begin(); + ((iter1 != myData.myListData.myChildArgList->end()) && + (iter2 != other.myData.myListData.myChildArgList->end())); + iter1++, iter2++) { + + if (!(*iter1).isValueEqual(*iter2)) { + isEqual = false; + break; + } + } + } + else { // different sizes, not equal + isEqual = false; + } + + } + else { + isEqual = ((myData.myListData.myChildArgList == NULL) && + (other.myData.myListData.myChildArgList == NULL)); + } + + } + break; + + case FUNCTOR: + // Hmmm... Equal if they are the same functors?? Not sure how much + // sense this makes... + isEqual = ((myData.myFunctorData.mySetFunctor == other.myData.myFunctorData.mySetFunctor) && + (myData.myFunctorData.myGetFunctor == other.myData.myFunctorData.myGetFunctor)); + break; + + case DESCRIPTION_HOLDER: + isEqual = (strcmp(getDescription(), other.getDescription()) == 0); + break; + + default: + isEqual = false; + break; + + } // end switch type + + return isEqual; + +} // end method isValueEqual + + +AREXPORT bool ArConfigArg::setValue(const ArConfigArg &source, + bool isVerifyArgNames) +{ + Type t = getType(); + if (t != source.getType()) { + return false; + } + + if (isVerifyArgNames && ArUtil::strcmp(getName(), source.getName()) != 0) { + /** + ArLog::log(ArLog::Verbose, + "ArConfigArg::setValue() unverified names, cannot set %s to %s", + getName(), source.getName()); + **/ + return false; + } + + bool isSuccess = true; + + switch (t) { + case INVALID: + // Nothing to copy with invalid args + break; + + case INT: + isSuccess = setInt(source.getInt()); + break; + + case DOUBLE: + isSuccess = setDouble(source.getDouble()); + break; + + case STRING: + isSuccess = setString(source.getString()); + break; + + case CPPSTRING: + isSuccess = setCppString(source.getCppString()); + break; + + case BOOL: + isSuccess = setBool(source.getBool()); + break; + + case SEPARATOR: + break; + + // Since STRING_HOLDERs are apparently not copied, assuming the + // same for LIST_HOLDERs. + case LIST: + // Not entirely sure about this, but I think it's consistent + if ((myData.myListData.myChildArgList != NULL) && + (source.myData.myListData.myChildArgList != NULL)) { + + if (myData.myListData.myChildArgList->size() == + source.myData.myListData.myChildArgList->size()) { + + std::list::const_iterator iter2 = + source.myData.myListData.myChildArgList->begin(); + + for (std::list::iterator + iter1 = myData.myListData.myChildArgList->begin(); + ((iter1 != myData.myListData.myChildArgList->end()) && + (iter2 != source.myData.myListData.myChildArgList->end())); + iter1++, iter2++) { + + // This has the unfortunate potential to leave a list half-changed. + // It would probably be better to copy the list or something. + // Care would need to be taken for the parent pointer. + if (!((*iter1).setValue(*iter2, isVerifyArgNames))) { + isSuccess = false; + break; + } + } // end for each child arg list + } + else { // different size lists + isSuccess = false; + } + } + else { + isSuccess = ((myData.myListData.myChildArgList != NULL) && + (source.myData.myListData.myChildArgList != NULL)); + } + + break; + + case FUNCTOR: + // Not copying functors right now... + isSuccess = false; + break; + + case DESCRIPTION_HOLDER: + // Not copying description holders either right now... + isSuccess = false; + break; + + default: + isSuccess = false; + break; + + } // end switch type + + return isSuccess; + +} // end method setValue + + +bool ArConfigArg::isTranslated() const +{ + return myIsTranslated; + +} // end method isTranslated + + +void ArConfigArg::setTranslated(bool b) +{ + myIsTranslated = b; + +} // end method setTranslated + + +AREXPORT void ArConfigArg::setDescription(const char *description) +{ + myDescription = description; +} + +bool ArConfigArg::isListType() const +{ + return ((myType == LIST) || (myType == LIST_HOLDER)); +} diff --git a/Legacy/Aria/src/ArConfigGroup.cpp b/Legacy/Aria/src/ArConfigGroup.cpp new file mode 100644 index 0000000..311a61b --- /dev/null +++ b/Legacy/Aria/src/ArConfigGroup.cpp @@ -0,0 +1,130 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArConfigGroup.h" +#include "ArArgumentBuilder.h" +#include "ArLog.h" + +AREXPORT ArConfigGroup::ArConfigGroup(const char *baseDirectory) +{ + if (baseDirectory != NULL) + myBaseDirectory = baseDirectory; + else + myBaseDirectory = ""; +} + +AREXPORT ArConfigGroup::~ArConfigGroup(void) +{ + +} + +AREXPORT void ArConfigGroup::addConfig(ArConfig *config) +{ + myConfigs.push_back(config); +} + +AREXPORT void ArConfigGroup::remConfig(ArConfig *config) +{ + myConfigs.remove(config); +} + +AREXPORT bool ArConfigGroup::parseFile(const char *fileName, + bool continueOnError) +{ + std::list::iterator it; + bool ret = true; + + myLastFile = fileName; + // go through all the configs and set the base directory (we don't + // do it when we're parsing just so that whether it suceeds or fails + // its the same behavior in this base directory regard) + for (it = myConfigs.begin(); it != myConfigs.end(); it++) + { + (*it)->setBaseDirectory(myBaseDirectory.c_str()); + } + // now we go through and parse files... if we get an error we stop + // if we're supposed to + for (it = myConfigs.begin(); it != myConfigs.end(); it++) + { + if (!(*it)->parseFile(fileName, continueOnError)) + { + // if we are continuing on errors we still want to tell them we + // had an error + ret = false; + // if we aren't continuing on error then just return + if (!continueOnError) + return false; + } + } + return ret; +} + +AREXPORT bool ArConfigGroup::reloadFile(bool continueOnError) +{ + return parseFile(myLastFile.c_str(), continueOnError); +} + +AREXPORT bool ArConfigGroup::writeFile(const char *fileName) +{ + std::set alreadyWritten; + std::list::iterator it; + bool ret = true; + bool append = false; + + // go through all the configs and set the base directory (we don't + // do it when we're parsing just so that whether it suceeds or fails + // its the same behavior in this base directory regard) + for (it = myConfigs.begin(); it != myConfigs.end(); it++) + { + (*it)->setBaseDirectory(myBaseDirectory.c_str()); + } + // now we go through and parse files... if we get an error we stop + // if we're supposed to + for (it = myConfigs.begin(); it != myConfigs.end(); it++) + { + ArLog::log(ArLog::Verbose, "Writing config file"); + if (!(*it)->writeFile(fileName, append, &alreadyWritten)) + { + // if we are continuing on errors we still want to tell them we + // had an error + ret = false; + } + append = true; + } + return ret; + +} + +AREXPORT void ArConfigGroup::setBaseDirectory(const char *baseDirectory) +{ + myBaseDirectory = baseDirectory; +} + +AREXPORT const char *ArConfigGroup::getBaseDirectory(void) const +{ + return myBaseDirectory.c_str(); +} diff --git a/Legacy/Aria/src/ArDPPTU.cpp b/Legacy/Aria/src/ArDPPTU.cpp new file mode 100644 index 0000000..8ee889b --- /dev/null +++ b/Legacy/Aria/src/ArDPPTU.cpp @@ -0,0 +1,915 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArDPPTU.h" +#include "ArCommands.h" +#include "ArBasePacket.h" +#include "ariaInternal.h" +#include "ArDeviceConnection.h" + +#define DO_DEBUG(code) {code;} + +//#define DEBUG_CMD DO_DEBUG +//#define DEBUG_TIME DO_DEBUG +//#define DEBUG_POS DO_DEBUG + +#ifndef DEBUG_CMD +#define DEBUG_CMD(code) {} +#endif + +#ifndef DEBUG_TIME +#define DEBUG_TIME(code) {} +#endif + +#ifndef DEBUG_POS +#define DEBUG_POS(code) {} +#endif + +AREXPORT ArDPPTUPacket::ArDPPTUPacket(ArTypes::UByte2 bufferSize) : + ArBasePacket(bufferSize, 0) +{ +} + +AREXPORT ArDPPTUPacket::~ArDPPTUPacket() +{ + +} + +AREXPORT void ArDPPTUPacket::byte2ToBuf(int val) +{ + //ArLog::log(ArLog::Normal, "Putting %d in an DPPTU packet...", val); + int i; + char buf[8]; + if (myLength + 4 > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArDPPTUPacket::byte2ToBuf: Trying to add beyond length of buffer."); + return; + } + + if(val > 9999999 || val < -999999) + ArLog::log(ArLog::Terse, "ArDPPTUPacket::byte2ToBuf: Warning: truncating value %d to 7 digits!", val); + + snprintf(buf, 8, "%d", val); + + for (i=0;i<(int)strlen(buf);i++) + { + myBuf[myLength] = buf[i]; + ++myLength; + } +} + +AREXPORT void ArDPPTUPacket::finalizePacket(void) +{ + ArDPPTUPacket::uByteToBuf(ArDPPTUCommands::DELIM); +} + +/** @a deviceType If a type other than PANTILT_DEFAULT is given, then manually + * selects different parameters for different DPPTU models. It is recommended to + * use PANTILT_DEFAULT (unless your PTU is not responding to resolution + * queries for some reason) + + * @a deviceIndex if you have more than one PTU on a Seekur robot, this + * specifies one device to power on at startup and power off on exit. If -1 + * (default value), then all possible PTU power ports are powered on. + */ +AREXPORT ArDPPTU::ArDPPTU(ArRobot *robot, DeviceType deviceType, int deviceIndex) : + ArPTZ(robot), + myCanGetRealPanTilt(true), + myInit(false), + myQueryCB(this, &ArDPPTU::query), + myGotPanRes(false), + myGotTiltRes(false) +{ + myRobot = robot; + myDeviceType = deviceType; + + switch(myDeviceType) { + case PANTILT_PTUD47: + myPanConvert = 0.0514; + myTiltConvert = 0.0129; + ArPTZ::setLimits(158, -158, 30, -46); + /* + myMaxPan = 158; + myMinPan = -158; + myMaxTilt = 30; + myMinTilt = -46; + */ + myMaxPanSlew = 149; + myMinPanSlew = 2; + myMaxTiltSlew = 149; + myMinTiltSlew = 2; + myMaxPanAccel = 102; + myMinPanAccel = 2; + myMaxTiltAccel = 102; + myMinTiltAccel = 2; + myPanSlew = 40; + myTiltSlew = 40; + break; + case PANTILT_PTUD46: + case PANTILT_DEFAULT: + // if DEFAULT, then in init() we will query the PTU to get the real conversion factors and limits (but start out assuming same as D46) + myPanConvert = 0.0514; + myTiltConvert = 0.0514; + ArPTZ::setLimits(158, -158, 30, -46); + /* + myMaxPan = 158; + myMinPan = -158; + myMaxTilt = 30; + myMinTilt = -46; + */ + myMaxPanSlew = 149; + myMinPanSlew = 2; + myMaxTiltSlew = 149; + myMinTiltSlew = 2; + myMaxPanAccel = 102; + myMinPanAccel = 2; + myMaxTiltAccel = 102; + myMinTiltAccel = 2; + myPanSlew = 40; //Default to 1000 positions/sec + myTiltSlew = 40; //Defaults to 1000 positions/sec + default: + break; + } + + if(deviceIndex == -1) + { + myPowerPorts.push_back(9); + myPowerPorts.push_back(22); + myPowerPorts.push_back(23); + } + else if(deviceIndex == 0) + myPowerPorts.push_back(9); + else if(deviceIndex == 1) + myPowerPorts.push_back(22); + else if(deviceIndex == 2) + myPowerPorts.push_back(23); + else + ArLog::log(ArLog::Terse, "ArDPPTU: Warning: No Seekur power port assignment known for PTU device #%d, won't turn any on."); + + if(myRobot) + { + for(std::vector::const_iterator i = myPowerPorts.begin(); i != myPowerPorts.end(); ++i) + { + myRobot->com2Bytes(116, *i, 1); + } + //myRobot->addDisconnectNormallyCallback(&myShutdownCB); + //myRobot->addDisconnectOnErrorCallback(&myShutdownCB); + //myRobot->addUserTask("ArDPPTU", 65, &myQueryCB); + } + + // Aria::addExitCallback(&myShutdownCB); + +} + +AREXPORT ArDPPTU::~ArDPPTU() +{ + shutdown(); + Aria::remExitCallback(&myShutdownCB); +} + +void ArDPPTU::shutdown() +{ + if(!myInit) return; + haltAll(); + offStatPower(); + lowMotPower(); + if(myRobot) + { + for(std::vector::const_iterator i = myPowerPorts.begin(); i != myPowerPorts.end(); ++i) + { + myRobot->com2Bytes(116, *i, 0); + } + myRobot->remSensorInterpTask(&myQueryCB); + } + myInit = false; +} + +void ArDPPTU::preparePacket(void) +{ + myPacket.empty(); + myPacket.byteToBuf(ArDPPTUCommands::DELIM); +} + +AREXPORT bool ArDPPTU::init(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::INIT); + if (!sendPacket(&myPacket)) + { + ArLog::log(ArLog::Terse, "ArDPPTU: Error sending INIT to PTU! (Write error?)"); + return false; + } + + myPan = -1; //myPan and myTilt set to -1 for initial positioning + myTilt = -1; + + setMovePower(PAN, LOW); + setMovePower(TILT, LOW); + setHoldPower(PAN, OFF); + setHoldPower(PAN, OFF); + + + switch(myDeviceType) { + case PANTILT_PTUD47: + //Assuming default accel and slew rates + myPanSlew = 40; + myBasePanSlew = 40; + myTiltSlew = 40; + myBaseTiltSlew = 40; + myPanAccel = 80; + myTiltAccel = 80; + break; + case PANTILT_PTUD46: + case PANTILT_DEFAULT: + default: + //Assuming default accel and slew rates + myPanSlew = 40; // 1000 positions/sec + myBasePanSlew = 40; // 1000 positions/sec + myTiltSlew = 40; // 1000 positions/sec + myBaseTiltSlew = 40; // 1000 positions/sec + myPanAccel = 80; // 2000 positions/sec^2 + myTiltAccel = 80; // 2000 positions/sec^2 + break; + } + + if(myDeviceType == PANTILT_DEFAULT) + { + // query resolution, conversion factors will be + // set again based on responses (replacing default value set + // in constructor) + preparePacket(); + myPacket.byteToBuf('P'); + myPacket.byteToBuf('R'); + if(!sendPacket(&myPacket)) + ArLog::log(ArLog::Terse, "ArDPPTU: Warning: write error sending pan resolution query"); + // We can't distinguish PR and TR responses based on their content alone, so + // we have to query pan resolution (PR), then after receiving resolution + // response, query TR. (see readPacket() for TR). + ///@todo query the device for pan and tilt limits, and when response is received, call ArPTZ::setLimits() to change. + } + + query(); // do first position query + + if (!panTilt(0,0)) + return false; + + myInit = true; + + return true; +} + +/** A blank packet can be sent to exit monitor mode **/ +AREXPORT bool ArDPPTU::blank(void) +{ + myPacket.empty(); + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::pan_i(double pdeg) +{ + //ArLog::log(ArLog::Normal, "ArDPPTU::panTilt(%f, %f)", pdeg, tdeg); + if (pdeg > getMaxPosPan_i()) + pdeg = getMaxPosPan_i(); + if (pdeg < getMaxNegPan_i()) + pdeg = getMaxNegPan_i(); + + if (pdeg != myPanSent) + { + DEBUG_CMD(ArLog::log(ArLog::Normal, + "ArDPPTU::pan: sending command to pan to %f deg (maxPosPan=%f, minNegPan=%f, myPanSent=%f)", + pdeg, getMaxPosPan_i(), getMaxNegPan_i(), myPanSent); + ) + preparePacket(); + myPacket.byteToBuf('P'); + myPacket.byteToBuf('P'); + myPacket.byte2ToBuf(ArMath::roundInt(pdeg/myPanConvert)); + + myPanSent = pdeg; + if(!myCanGetRealPanTilt) myPan = myPanSent; + if (!sendPacket(&myPacket)) return false; + } +return true; +} + +AREXPORT bool ArDPPTU::tilt_i(double tdeg) +{ + if (tdeg > getMaxPosTilt_i()) + tdeg = getMaxPosTilt_i(); + if (tdeg < getMaxNegTilt_i()) + tdeg = getMaxNegTilt_i(); + + if (tdeg != myTiltSent) + { + DEBUG_CMD(ArLog::log(ArLog::Normal, + "ArDPPTU::tilt: sending command to tilt to %f deg (maxPosTilt=%f, minNegTilt=%f, myTiltSent=%f)", + tdeg, getMaxPosTilt_i(), getMaxNegTilt_i(), myTiltSent) + ); + preparePacket(); + myPacket.byteToBuf('T'); + myPacket.byteToBuf('P'); + myPacket.byte2ToBuf(ArMath::roundInt(tdeg/myTiltConvert)); + + myTiltSent = tdeg; + if(!myCanGetRealPanTilt) myTilt = myTiltSent; + if (!sendPacket(&myPacket)) return false; + } + + return true; +} + +AREXPORT bool ArDPPTU::panSlew(double deg) +{ + if (deg > getMaxPanSlew()) + deg = getMaxPanSlew(); + if (deg < getMinPanSlew()) + deg = getMinPanSlew(); + + myPanSlew = deg; + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + myPacket.byteToBuf(ArDPPTUCommands::SPEED); + + myPacket.byte2ToBuf(ArMath::roundInt(deg/myPanConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::tiltSlew(double deg) +{ + if (deg > getMaxTiltSlew()) + deg = getMaxTiltSlew(); + if (deg < getMinTiltSlew()) + deg = getMinTiltSlew(); + + myTiltSlew = deg; + preparePacket(); + myPacket.byteToBuf('T');// ArDPPTUCommands::TILT); + myPacket.byteToBuf('S');// ArDPPTUCommands::SPEED); + + myPacket.byte2ToBuf(ArMath::roundInt(deg/myTiltConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::resetCalib(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::RESET); + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::disableReset(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::RESET); + myPacket.byteToBuf(ArDPPTUCommands::DISABLE); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::resetTilt(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::RESET); + myPacket.byteToBuf(ArDPPTUCommands::TILT); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::resetPan(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::RESET); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::resetAll(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::RESET); + myPacket.byteToBuf(ArDPPTUCommands::ENABLE); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::saveSet(void) +{ + preparePacket(); + myPacket.byteToBuf('D'); //ArDPPTUCommands::DISABLE); + myPacket.byteToBuf('S'); //ArDPPTUCommands::SPEED); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::restoreSet(void) +{ + preparePacket(); + myPacket.byteToBuf('D'); //ArDPPTUCommands::DISABLE); + myPacket.byteToBuf('R'); //ArDPPTUCommands::RESET); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::factorySet(void) +{ + preparePacket(); + myPacket.byteToBuf('D'); //ArDPPTUCommands::DISABLE); + myPacket.byteToBuf('F'); //ArDPPTUCommands::FACTORY); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::limitEnforce(bool val) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::LIMIT); + + if (val) + myPacket.byteToBuf(ArDPPTUCommands::ENABLE); + else + myPacket.byteToBuf(ArDPPTUCommands::DISABLE); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::immedExec(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::IMMED); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::slaveExec(void) +{ + preparePacket(); + myPacket.byteToBuf('S'); //ArDPPTUCommands::SPEED); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::awaitExec(void) +{ + preparePacket(); + myPacket.byteToBuf('A'); //ArDPPTUCommands::ACCEL); + + return sendPacket(&myPacket); +} + + +AREXPORT bool ArDPPTU::haltAll(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::HALT); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::haltPan(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::HALT); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::haltTilt(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::HALT); + myPacket.byteToBuf(ArDPPTUCommands::TILT); + + return sendPacket(&myPacket); +} + + +AREXPORT bool ArDPPTU::panAccel(double deg) +{ + if (deg > getMaxPanAccel()) + deg = getMaxPanAccel(); + if (deg < getMinPanAccel()) + deg = getMinPanAccel(); + + if (myPanAccel != deg) { + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + myPacket.byteToBuf(ArDPPTUCommands::ACCEL); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myPanConvert)); + + return sendPacket(&myPacket); + } + + return true; +} + +AREXPORT bool ArDPPTU::tiltAccel(double deg) +{ + if (deg > getMaxPanAccel()) + deg = getMaxPanAccel(); + if (deg < getMinPanAccel()) + deg = getMinPanAccel(); + + if (myTiltAccel != deg) { + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::TILT); + myPacket.byteToBuf(ArDPPTUCommands::ACCEL); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myTiltConvert)); + + return sendPacket(&myPacket); + } + + return true; +} + +AREXPORT bool ArDPPTU::basePanSlew(double deg) +{ + myBasePanSlew = deg; + + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + myPacket.byteToBuf(ArDPPTUCommands::BASE); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myPanConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::baseTiltSlew(double deg) +{ + myBaseTiltSlew = deg; + + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::TILT); + myPacket.byteToBuf(ArDPPTUCommands::BASE); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myTiltConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::upperPanSlew(double deg) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + myPacket.byteToBuf(ArDPPTUCommands::UPPER); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myPanConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::lowerPanSlew(double deg) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::PAN); + myPacket.byteToBuf('L'); //ArDPPTUCommands::LIMIT); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myPanConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::upperTiltSlew(double deg) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::TILT); + myPacket.byteToBuf(ArDPPTUCommands::UPPER); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myTiltConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::lowerTiltSlew(double deg) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::TILT); + myPacket.byteToBuf('L'); //ArDPPTUCommands::LIMIT); + myPacket.byte2ToBuf(ArMath::roundInt(deg/myTiltConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::indepMove(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::CONTROL); + myPacket.byteToBuf('I'); //ArDPPTUCommands::IMMED); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::velMove(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::CONTROL); + myPacket.byteToBuf(ArDPPTUCommands::VELOCITY); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::enMon(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::MONITOR); + myPacket.byteToBuf(ArDPPTUCommands::ENABLE); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::disMon(void) +{ + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::MONITOR); + myPacket.byteToBuf(ArDPPTUCommands::DISABLE); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::initMon(double deg1, double deg2, + double deg3, double deg4) +{ + + preparePacket(); + myPacket.byteToBuf(ArDPPTUCommands::MONITOR); + + myPacket.byte2ToBuf(ArMath::roundInt(deg1/myPanConvert)); + myPacket.byteToBuf(','); + myPacket.byte2ToBuf(ArMath::roundInt(deg2/myPanConvert)); + myPacket.byteToBuf(','); + myPacket.byte2ToBuf(ArMath::roundInt(deg3/myTiltConvert)); + myPacket.byteToBuf(','); + myPacket.byte2ToBuf(ArMath::roundInt(deg4/myTiltConvert)); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::setHoldPower(Axis axis, PowerMode mode) +{ + preparePacket(); + myPacket.byteToBuf(axis); + myPacket.byteToBuf('H'); + myPacket.byteToBuf(mode); + return sendPacket(&myPacket); +} + +AREXPORT bool ArDPPTU::setMovePower(Axis axis, PowerMode mode) +{ + preparePacket(); + myPacket.byteToBuf(axis); + myPacket.byteToBuf('M'); + myPacket.byteToBuf(mode); + return sendPacket(&myPacket); +} + + +AREXPORT ArBasePacket *ArDPPTU::readPacket() +{ + if(!myConn) + return NULL; + + // ask for next set of data every robot cycle + query(); + + const int databufsize = 64; + char databuf[databufsize]; + int databufp = 0; + + // state indicates what part of the message we expect + // to see next as we read and scan it. + enum State { + start, + space, + data, + end + } state; + state = start; + bool errormsg = false; + bool gotpan = false; + bool gottilt = false; + + const int maxbytes = 512; + + // bug, this doesn't handle messages broken accross our 512 byte read size. + + int i; + for(i = 0; i < maxbytes; ++i) + { + char c; + if(myConn->read(&c, 1, 1) <= 0) + break; // no data, abort read until next robot cycle + + //printf("ArDPPTU::read[%d]= %c (0x%x)\n", i, c, c); + + if(c == '*') + state = start; // jump into start of new message no matter what the previous state was. (start state will see * again and proceed to state after that) + + switch (state) + { + case start: + //puts("(RE)START PARSE"); + databuf[0] = 0; + databufp = 0; + if(c == '*') + { + state = space; + errormsg = false; + } + else if(c == '!') + { + state = space; + errormsg = true; + } + else // error, restart + { + state = start; + } + break; + + case space: + if(c == ' ') + { + state = data; + } + else // error, restart + { + state = start; + } + break; + + case data: + if(c == '\r') + { + //puts("IN DATA, REACHED END"); + databuf[databufp++] = '\0'; + state = end; + } + else if(!isprint(c)) + { + // error, restart + state = start; + } + else + { + databuf[databufp++] = c; + if(databufp > databufsize) + { + ArLog::log(ArLog::Terse, "ArDPPTU: Internal parse error, data in incoming message is too large for buffer, aborting."); + state = start; + } + } + break; + + case end: + default: + // fall out of switch, end is a special flag state checked outside this switch + // where action is taken based on what data was received from the dpptu, + // then state is reset to start. + break; + } + + if(state == end) + { + + // responses we handle are: + const char *panPosResponse = "Current Pan position is "; + const size_t panPosResponseLen = strlen(panPosResponse); + const char *tiltPosResponse = "Current Tilt position is "; + const size_t tiltPosResponseLen = strlen(tiltPosResponse); + const char *resResponse = " seconds arc per position"; + + //printf("IN PARSE END, DATABUF=%s \n", databuf); + if(strncmp(databuf, panPosResponse, panPosResponseLen) == 0) + { + char *s = databuf + panPosResponseLen; + DEBUG_POS(printf("\npan position: %s\n", s)); + myPan = myPanRecd = atof(s) * myPanConvert; + myCanGetRealPanTilt = true; + gotpan = true; + } + else if(strncmp(databuf, tiltPosResponse, tiltPosResponseLen) == 0) + { + char *s = databuf + tiltPosResponseLen; + DEBUG_POS(printf("\ntilt position: %s\n", s)); + myTilt = myTiltRecd = atof(s) * myTiltConvert; + myCanGetRealPanTilt = true; + gottilt = true; + } +// XXX TODO get pan/tilt and slew limits as well +// conversion factors to ( response / (60.0*60.0) ) (ticks per arcsecond... converting to degrees) + else if(char *s = strstr(databuf, resResponse)) + { + //printf("it's a resolution response. (already got pan? %d; already got tilt? %d)", myGotPanRes, myGotTiltRes); + *s = '\0'; + const float res = atof(databuf); + if(!myGotPanRes) + { + myPanConvert = res / (60.0*60.0); // convert from arcsecond to degr + ArLog::log(ArLog::Normal, "ArDPPTU: Received pan resolution response from PTU: %f deg / %f arcsec. Now requesting tilt resolution...", myPanConvert, res); + + // Now ask for tilt resolution (there is no way to distinguish the + // responses from the PTU so we have to ask for them in sequence.) + myGotPanRes = true; + preparePacket(); + myPacket.byteToBuf('T'); + myPacket.byteToBuf('R'); + sendPacket(&myPacket); + } + else if(!myGotTiltRes) + { + myTiltConvert = res / (60.0*60.0); + ArLog::log(ArLog::Normal, "ArDPPTU: Received tilt resolution response from PTU: %f deg / %f arcsec", myTiltConvert, res); + myGotTiltRes = true; + } + else + { + ArLog::log(ArLog::Normal, "ArDPPTU: Warning: got unexpected resolution response (already received both pan and tilt resolution responses). Ignoring."); + } + } + else + { + // unrecognized message. + ArLog::log(ArLog::Normal, "ArDPPTU: Warning: received unrecognized message from PTU: %s", databuf); + } + + state = start; // start looking for next message + + + } + + + } + + if(gotpan && gottilt) + { + // a message was recognized and handled above. + DEBUG_TIME(ArLog::log(ArLog::Normal, "ArDPPTU recieve interval=%ld", myLastPositionMessageHandled.mSecSince())); + myLastPositionMessageHandled.setToNow(); + myWarnedOldPositionData = false; + + // ask for next position . this times our queries to the actual // + // recieve rate. + // moved to above to always query every loop query(); + } + + if(myLastPositionMessageHandled.mSecSince() > 2000 && !myWarnedOldPositionData) + { + ArLog::log(ArLog::Terse, "ArDPPTU: Warning: Have not received pan and tilt position for more than 2 seconds! Data will be incorrect."); + myWarnedOldPositionData = true; + } + + if(i >= maxbytes) + { + ArLog::log(ArLog::Normal, "ArDPPTU: Warning: parse or communications error: no valid message found in %d bytes read from PTU.", maxbytes); + } + + // next time. + return NULL; +} + + +void ArDPPTU::query() +{ + DEBUG_TIME(ArLog::log(ArLog::Normal, "ArDPPTU query interval=%ld", myLastQuerySent.mSecSince())); + // ask for pan and tilt positions. + if(myConn) + { + if(myConn->write("PP\rTP\r", 2*2+2) <= 0) return; + myLastQuerySent.setToNow(); + } +} + + +ArPTZConnector::GlobalPTZCreateFunc ArDPPTU::ourCreateFunc(&ArDPPTU::create); + +ArPTZ* ArDPPTU::create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot) +{ + return new ArDPPTU(robot); +} + +void ArDPPTU::registerPTZType() +{ + ArPTZConnector::registerPTZType("dpptu", &ourCreateFunc); +} diff --git a/Legacy/Aria/src/ArDataLogger.cpp b/Legacy/Aria/src/ArDataLogger.cpp new file mode 100644 index 0000000..09de2cb --- /dev/null +++ b/Legacy/Aria/src/ArDataLogger.cpp @@ -0,0 +1,688 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArExport.h" +#include "ArRobot.h" +#include "ArConfig.h" +#include "ArDataLogger.h" +#include "ArRobotBatteryPacketReader.h" +#include + +/** + @param robot the robot to log information from + + @param fileName if NULL then the file name is detered by the + config, if not NULL then the file name data is put into, if the + filename is used then the data log file is opened in append mode + not in write mode, so it'll append to whats there (if you want to + separate this by runs you need to do it on your own by removing or + moving the file) + **/ +AREXPORT ArDataLogger::ArDataLogger(ArRobot *robot, const char *fileName) : + myAddStringFunctor(this, &ArDataLogger::addString), + myConnectCB(this, &ArDataLogger::connectCallback), + myProcessFileCB(this, &ArDataLogger::processFile), + myUserTaskCB(this, &ArDataLogger::userTask) +{ + myMutex.setLogName("ArDataLogger::myMutex"); + myRobot = robot; + if (fileName == NULL || fileName[0] == '\0') + myPermanentFileName = ""; + else + myPermanentFileName = fileName; + myRobot->addUserTask("DataLogger", 50, &myUserTaskCB); + myRobot->requestIOPackets(); + myConfig = false; + myAddToConfigAtConnect = false; + myAddedToConfig = false; + myConfigLogging = false; + myConfigLogInterval = 0; + myConfigFileName[0] = '\0'; + myOpenedFileName[0] = '\0'; + myAnalogCount = 0; + myAnalogEnabled = NULL; + myAnalogVoltageCount = 0; + myAnalogVoltageEnabled = NULL; + myDigInCount = 0; + myDigInEnabled = NULL; + myDigOutCount = 0; + myDigOutEnabled = NULL; + myStringsCount = 0; + //myStringsEnabled = NULL; + + myLogVoltage = false; + myLogStateOfCharge = false; + myLogLeftVel = false; + myLogRightVel = false; + myLogTransVel = false; + myLogRotVel = false; + myLogLatVel = false; + myLogLeftStalled = false; + myLogRightStalled = false; + myLogStallBits = false; + myLogFlags = false; + myLogFaultFlags = false; + myLogPose = false; + myLogEncoderPose = false; + myLogCorrectedEncoderPose = false; + myLogEncoders = false; + myLogChargeState = false; + myLogBatteryInfo = false; + + myFile = NULL; +} + +AREXPORT ArDataLogger::~ArDataLogger(void) +{ + +} + +AREXPORT void ArDataLogger::addToConfig(ArConfig *config) +{ + if (config == NULL || myAddedToConfig) + return; + myConfig = config; + if (!myRobot->isConnected()) + { + myAddToConfigAtConnect = true; + myRobot->addConnectCB(&myConnectCB); + return; + } + else + { + connectCallback(); + } + + myAddedToConfig = true; + ArLog::log(ArLog::Verbose, "ArDataLogger::addToConfig"); + std::string section; + char name[512]; + char desc[512]; + int i; + section = "Data logging"; + // add everything to the config + myConfig->addParam( + ArConfigArg("DataLog", &myConfigLogging, "True to log data, false not to"), + section.c_str(), ArPriority::NORMAL); + + myConfig->addParam( + ArConfigArg("DataLogInterval", &myConfigLogInterval, "Seconds between logs", 0), + section.c_str(), ArPriority::NORMAL); + + if (myPermanentFileName.size() == 0) + myConfig->addParam( + ArConfigArg("DataLogFileName", myConfigFileName, + "File to log data into", sizeof(myConfigFileName)), + section.c_str(), ArPriority::NORMAL); + + for (i = 0; i < myStringsCount; i++) + { + snprintf(name, sizeof(name), "DataLog%s", myStrings[i]->getName()); + snprintf(desc, sizeof(desc), "Logs %s", myStrings[i]->getName()); + myConfig->addParam( + ArConfigArg(name, myStringsEnabled[i], desc), + "Custom data logging", ArPriority::NORMAL); + } + + myConfig->addParam( + ArConfigArg("DataLogBatteryVoltage", &myLogVoltage, "True to log battery voltage"), + section.c_str(), ArPriority::DETAILED); + if (myRobot->haveStateOfCharge()) + myConfig->addParam( + ArConfigArg("DataLogStateOfCharge", &myLogStateOfCharge, "True to log state of charge"), + section.c_str(), ArPriority::DETAILED); + + myConfig->addParam( + ArConfigArg("DataLogChargeState", &myLogChargeState, + "True to log charge state"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogBatteryInfo", &myLogBatteryInfo, + "True to log battery info (if available)"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogPose", &myLogPose, "True to log robot's pose"), + section.c_str(), ArPriority::NORMAL); + myConfig->addParam( + ArConfigArg("DataLogEncoderPose", &myLogEncoderPose, "True to log robot's raw encoder pose"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogCorrectedEncoderPose", &myLogCorrectedEncoderPose, "True to log robot's corrected (by gyro, etc) encoder pose"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogEncoders", &myLogEncoders, "True to log the raw encoder readings"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogLeftVel", &myLogLeftVel, "True to log left wheel velocity"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogRightVel", &myLogRightVel, "True to log right wheel velocity"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogTransVel", &myLogTransVel, "True to log translational wheel velocity"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogRotVel", &myLogRotVel, "True to log rotational wheel velocity"), + section.c_str(), ArPriority::DETAILED); + if (myRobot->hasLatVel()) + myConfig->addParam( + ArConfigArg("DataLogLatVel", &myLogRotVel, "True to log lateral wheel velocity"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogLeftStalled", &myLogLeftStalled, "True to log if the left wheel is stalled"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogRightStalled", &myLogRightStalled, "True to log if the right wheel is stalled"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogStallBits", &myLogStallBits, "True to log all the stall bits is stalled"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogFlags", &myLogFlags, "True to log all the flags"), + section.c_str(), ArPriority::DETAILED); + myConfig->addParam( + ArConfigArg("DataLogFaultFlags", &myLogFaultFlags, "True to log all the fault flags"), + section.c_str(), ArPriority::DETAILED); + + for (i = 0; i < myAnalogCount; i++) + { + snprintf(name, sizeof(name), "DataLogAnalog%d", i); + snprintf(desc, sizeof(desc), + "Logs the value of analog %d as a 10 bit (0-1024) value", + i); + myConfig->addParam( + ArConfigArg(name, &myAnalogEnabled[i], desc), + section.c_str(), ArPriority::DETAILED); + } + for (i = 0; i < myAnalogVoltageCount; i++) + { + snprintf(name, sizeof(name), "DataLogAnalogVoltage%d", i); + snprintf(desc, sizeof(desc), + "Logs the value of analog %d as voltage from 0 to 5", + i); + myConfig->addParam( + ArConfigArg(name, &myAnalogVoltageEnabled[i], desc), + section.c_str(), ArPriority::DETAILED); + } + for (i = 0; i < myDigInCount; i++) + { + snprintf(name, sizeof(name), "DataLogDigIn%d", i); + snprintf(desc, sizeof(desc), "Logs digital in %d", i); + myConfig->addParam( + ArConfigArg(name, &myDigInEnabled[i], desc), + section.c_str(), ArPriority::DETAILED); + } + for (i = 0; i < myDigOutCount; i++) + { + snprintf(name, sizeof(name), "DataLogDigOut%d", i); + snprintf(desc, sizeof(desc), "Logs digital out %d", i); + myConfig->addParam( + ArConfigArg(name, &myDigOutEnabled[i], desc), + section.c_str(), ArPriority::DETAILED); + } + myProcessFileCB.setName("ArDataLogger"); + myConfig->addProcessFileWithErrorCB(&myProcessFileCB, 100); +} + +AREXPORT void ArDataLogger::connectCallback(void) +{ + int i; + ArLog::log(ArLog::Verbose, "ArDataLogger::connectCallback"); + // out with the old memory + if (myAnalogEnabled != NULL) + { + delete myAnalogEnabled; + myAnalogEnabled = NULL; + } + if (myAnalogVoltageEnabled != NULL) + { + delete myAnalogVoltageEnabled; + myAnalogVoltageEnabled = NULL; + } + if (myDigInEnabled != NULL) + { + delete myDigInEnabled; + myDigInEnabled = NULL; + } + if (myDigOutEnabled != NULL) + { + delete myDigOutEnabled; + myDigOutEnabled = NULL; + } + /* + if (myStringsEnabled != NULL) + { + delete myStringsEnabled; + myStringsEnabled = NULL; + } + */ + // see how much memory we need + myAnalogCount = myRobot->getIOAnalogSize(); + myAnalogVoltageCount = myRobot->getIOAnalogSize(); + myDigInCount = myRobot->getIODigInSize(); + myDigOutCount = myRobot->getIODigOutSize(); + //myStringsCount = myStrings.size(); + // make and initialize the new memory + if (myAnalogCount > 0) + { + myAnalogEnabled = new bool[myAnalogCount]; + for (i = 0; i < myAnalogCount; i++) + { + myAnalogEnabled[i] = false; + } + } + if (myAnalogVoltageCount > 0) + { + myAnalogVoltageEnabled = new bool[myAnalogVoltageCount]; + for (i = 0; i < myAnalogVoltageCount; i++) + myAnalogVoltageEnabled[i] = false; + } + if (myDigInCount > 0) + { + myDigInEnabled = new bool[myDigInCount]; + for (i = 0; i < myDigInCount; i++) + myDigInEnabled[i] = false; + } + if (myDigOutCount > 0) + { + myDigOutEnabled = new bool[myDigOutCount]; + for (i = 0; i < myDigOutCount; i++) + myDigOutEnabled[i] = false; + } + /* Taking this out since we do it with a map now. + if (myStringsCount > 0) + { + myStringsEnabled = new bool[myStringsCount]; + for (i = 0; i < myStringsCount; i++) + myStringsEnabled[i] = false; + }*/ + if (myAddToConfigAtConnect && !myAddedToConfig) + { + myAddToConfigAtConnect = false; + addToConfig(myConfig); + } +} + +AREXPORT bool ArDataLogger::processFile(char *errorBuffer, + size_t errorBufferLen) +{ + myMutex.lock(); + // if our file name is different and we're not using a permanent + // file name or if we're disabled close the old one + if ((strcmp(myOpenedFileName, myConfigFileName) != 0 && myFile != NULL && + myPermanentFileName.size() == 0) || + (myFile != NULL && !myConfigLogging)) + { + ArLog::log(ArLog::Normal, "Closed data log file '%s'", myOpenedFileName); + fclose(myFile); + myFile = NULL; + } + // try to open the file + if (myConfigLogging && myFile == NULL) + { + if (myPermanentFileName.size() == 0 && strlen(myConfigFileName) == 0) + { + ArLog::log(ArLog::Verbose, "ArDataLogger: no log file to open"); + myMutex.unlock(); + return true; + } + std::string fileName; + if (myPermanentFileName.size() > 0) + { + if ((myFile = ArUtil::fopen(myPermanentFileName.c_str(), "a")) != NULL) + { + ArLog::log(ArLog::Normal, "Opened data log file '%s'", + myPermanentFileName.c_str()); + } + else + { + ArLog::log(ArLog::Normal, "Could not open data log file '%s'", + myPermanentFileName.c_str()); + myMutex.unlock(); + return true; + } + } + else + { + // if we couldn't open it fail + if ((myFile = ArUtil::fopen(myConfigFileName, "w")) != NULL) + { + strcpy(myOpenedFileName, myConfigFileName); + ArLog::log(ArLog::Normal, "Opened data log file '%s'", + myOpenedFileName); + } + else + { + ArLog::log(ArLog::Normal, "Could not open data log file '%s'", + myConfigFileName); + myMutex.unlock(); + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "DataLogFileName of '%s' cannot be opened", myConfigFileName); + return false; + } + } + } + else if (!myConfigLogging) + { + myMutex.unlock(); + return true; + } + int i; + // if we could then dump in the header + fprintf(myFile, ";%12s", "Time"); + std::map::iterator it; + for (i = 0; i < myStringsCount; i++) + { + if (*(myStringsEnabled[i])) + { + char formatBuf[64]; + sprintf(formatBuf, "\t%%0%ds", myStrings[i]->getMaxLength()); + fprintf(myFile, formatBuf, myStrings[i]->getName()); + } + } + if (myLogVoltage) + fprintf(myFile, "\tVolt"); + if (myLogStateOfCharge) + fprintf(myFile, "\tSoC"); + if (myLogChargeState) + fprintf(myFile, "\t%015s\t%5s", "ChargeStateName", "csNum"); + if (myLogBatteryInfo && myRobot->getBatteryPacketReader() != NULL) + { + myRobot->getBatteryPacketReader()->requestContinuousPackets(); + int battery; + for (battery = 1; + battery <= myRobot->getBatteryPacketReader()->getNumBatteries(); + battery++) + { + fprintf(myFile, "\tbat%02dflags1 \tbat%02dflags2 \tbat%02dflags3 \tbat%02drelsoc\tbat%02dabssoc", battery, battery, battery, battery, battery); + } + } + if (myLogPose) + fprintf(myFile, "\t%010s\t%010s\t%010s", "X", "Y", "Th"); + if (myLogEncoderPose) + fprintf(myFile, "\t%010s\t%010s\t%010s", "encX", "encY", "encTh"); + if (myLogCorrectedEncoderPose) + fprintf(myFile, "\t%010s\t%010s\t%010s", + "corrEncX", "corrEncY", "corrEncTh"); + if (myLogEncoders) + { + fprintf(myFile, "\t%010s\t%010s", "encL", "encR"); + myRobot->requestEncoderPackets(); + } + if (myLogLeftVel) + fprintf(myFile, "\tLeftV"); + if (myLogRightVel) + fprintf(myFile, "\tRightV"); + if (myLogTransVel) + fprintf(myFile, "\tTransV"); + if (myLogRotVel) + fprintf(myFile, "\tRotV"); + if (myLogLatVel) + fprintf(myFile, "\tLatV"); + if (myLogLeftStalled) + fprintf(myFile, "\tLStall"); + if (myLogRightStalled) + fprintf(myFile, "\tRStall"); + if (myLogStallBits) + fprintf(myFile, "\tStllBts%16s", ""); + if (myLogFlags) + fprintf(myFile, "\tFlags%16s", ""); + if (myLogFaultFlags) + fprintf(myFile, "\tFault Flags%10s", ""); + for (i = 0; i < myAnalogCount; i++) + { + if (myAnalogEnabled[i]) + fprintf(myFile, "\tAn%d", i); + } + for (i = 0; i < myAnalogVoltageCount; i++) + { + if (myAnalogVoltageEnabled[i]) + fprintf(myFile, "\tAnV%d", i); + } + for (i = 0; i < myDigInCount; i++) + { + if (myDigInEnabled[i]) + fprintf(myFile, "\tDigIn%d%8s", i, ""); + } + for (i = 0; i < myDigOutCount; i++) + { + if (myDigOutEnabled[i]) + fprintf(myFile, "\tDigOut%d%8s", i, ""); + } + + fprintf(myFile, "\n"); + fflush(myFile); + myMutex.unlock(); + return true; +} + +AREXPORT void ArDataLogger::userTask(void) +{ + myMutex.lock(); + // if we don't need to do anything just return + if (myFile == NULL || myLastLogged.secSince() < myConfigLogInterval) + { + myMutex.unlock(); + return; + } + int i; + int j; + int val; + + fprintf(myFile, "%ld", time(NULL)); + + char *buf; + buf = new char[myMaxMaxLength]; + ArStringInfoHolder *infoHolder; + for (i = 0; i < myStringsCount; i++) + { + if (*(myStringsEnabled[i])) + { + char formatBuf[64]; + infoHolder = myStrings[i]; + sprintf(formatBuf, "\t%%0%ds", myStrings[i]->getMaxLength()); + infoHolder->getFunctor()->invoke(buf, infoHolder->getMaxLength()); + /* + ArLog::log(ArLog::Normal, "For '%s' want to log with format '%s' and buf '%s' (max %d) (max max %d)", + infoHolder->getName(), formatBuf, buf, + infoHolder->getMaxLength(), + myMaxMaxLength); + */ + fprintf(myFile, formatBuf, buf); + } + } + delete buf; + + if (myLogVoltage) + fprintf(myFile, "\t%.2f", myRobot->getRealBatteryVoltageNow()); + if (myLogStateOfCharge) + fprintf(myFile, "\t%.0f", myRobot->getStateOfCharge()); + if (myLogChargeState) + { + ArRobot::ChargeState chargeState = myRobot->getChargeState(); + std::string chargeString; + if (chargeState == ArRobot::CHARGING_UNKNOWN) + chargeString = "Unknowable"; + else if (chargeState == ArRobot::CHARGING_NOT) + chargeString = "Not"; + else if (chargeState == ArRobot::CHARGING_BULK) + chargeString = "Bulk"; + else if (chargeState == ArRobot::CHARGING_OVERCHARGE) + chargeString = "Overcharge"; + else if (chargeState == ArRobot::CHARGING_FLOAT) + chargeString = "Float"; + else if (chargeState == ArRobot::CHARGING_BALANCE) + chargeString = "Balance"; + else + chargeString = "Unknown"; + fprintf(myFile, "\t%15s\t%5d", chargeString.c_str(), chargeState); + } + + if (myLogBatteryInfo && myRobot->getBatteryPacketReader() != NULL) + { + int battery; + int flags; + for (battery = 1; + battery <= myRobot->getBatteryPacketReader()->getNumBatteries(); + battery++) + { + fprintf(myFile, "\t"); + flags = myRobot->getBatteryPacketReader()->getFlags1(battery); + for (i = 0, val = 1; i < 8; i++, val *= 2) + fprintf(myFile, "%d", (bool) (flags & val)); + fprintf(myFile, " "); + + fprintf(myFile, "\t"); + flags = myRobot->getBatteryPacketReader()->getFlags2(battery); + for (i = 0, val = 1; i < 8; i++, val *= 2) + fprintf(myFile, "%d", (bool) (flags & val)); + fprintf(myFile, " "); + + fprintf(myFile, "\t"); + flags = myRobot->getBatteryPacketReader()->getFlags3(battery); + for (i = 0, val = 1; i < 8; i++, val *= 2) + fprintf(myFile, "%d", (bool) (flags & val)); + fprintf(myFile, " "); + + fprintf(myFile, "\t%11d\t%11d", + myRobot->getBatteryPacketReader()->getRelSOC(battery), + myRobot->getBatteryPacketReader()->getAbsSOC(battery)); + } + } + + if (myLogPose) + fprintf(myFile, "\t%10.0f\t%10.0f\t%10.0f", myRobot->getX(), + myRobot->getY(), myRobot->getTh()); + if (myLogEncoderPose) + fprintf(myFile, "\t%10.0f\t%10.0f\t%10.0f", + myRobot->getRawEncoderPose().getX(), + myRobot->getRawEncoderPose().getY(), + myRobot->getRawEncoderPose().getTh()); + if (myLogCorrectedEncoderPose) + fprintf(myFile, "\t%10.0f\t%10.0f\t%10.0f", + myRobot->getEncoderPose().getX(), + myRobot->getEncoderPose().getY(), + myRobot->getEncoderPose().getTh()); + if (myLogEncoders) + fprintf(myFile, "\t%10d\t%10d", + myRobot->getLeftEncoder(), myRobot->getRightEncoder()); + if (myLogLeftVel) + fprintf(myFile, "\t%.0f", myRobot->getLeftVel()); + if (myLogRightVel) + fprintf(myFile, "\t%.0f", myRobot->getRightVel()); + if (myLogTransVel) + fprintf(myFile, "\t%.0f", myRobot->getVel()); + if (myLogRotVel) + fprintf(myFile, "\t%.0f", myRobot->getRotVel()); + if (myLogLatVel) + fprintf(myFile, "\t%.0f", myRobot->getLatVel()); + if (myLogLeftStalled) + fprintf(myFile, "\t%d", (bool)myRobot->isLeftMotorStalled()); + if (myLogRightStalled) + fprintf(myFile, "\t%d", (bool)myRobot->isRightMotorStalled()); + if (myLogStallBits) + { + fprintf(myFile, "\t"); + for (i = 0, val = 1; i < 16; i++, val *= 2) + fprintf(myFile, "%d", (bool)(myRobot->getStallValue() & val)); + } + if (myLogFlags) + { + fprintf(myFile, "\t"); + for (i = 0, val = 1; i < 16; i++, val *= 2) + fprintf(myFile, "%d", (bool)(myRobot->getFlags() & val)); + } + if (myLogFaultFlags) + { + fprintf(myFile, "\t"); + for (i = 0, val = 1; i < 16; i++, val *= 2) + fprintf(myFile, "%d", (bool)(myRobot->getFaultFlags() & val)); + } + for (i = 0; i < myAnalogCount; i++) + { + if (myAnalogEnabled[i]) + fprintf(myFile, "\t%d", myRobot->getIOAnalog(i)); + } + for (i = 0; i < myAnalogVoltageCount; i++) + { + if (myAnalogVoltageEnabled[i]) + fprintf(myFile, "\t%.2f", myRobot->getIOAnalogVoltage(i)); + } + for (i = 0; i < myDigInCount; i++) + { + if (myDigInEnabled[i]) + { + fprintf(myFile, "\t"); + for (j = 0, val = 1; j < 8; j++, val *= 2) + fprintf(myFile, "%d", (bool)(myRobot->getIODigIn(i) & val)); + } + } + for (i = 0; i < myDigOutCount; i++) + { + if (myDigOutEnabled[i]) + { + fprintf(myFile, "\t"); + for (j = 0, val = 1; j < 8; j++, val *= 2) + fprintf(myFile, "%d", (bool)(myRobot->getIODigOut(i) & val)); + } + } + + fprintf(myFile, "\n"); + fflush(myFile); + myLastLogged.setToNow(); + myMutex.unlock(); +} + + +AREXPORT void ArDataLogger::addString( + const char *name, ArTypes::UByte2 maxLength, + ArFunctor2 *functor) +{ + ArTypes::UByte2 len; + + myMutex.lock(); + if (maxLength < strlen(name)) + len = strlen(name); + else + len = maxLength; + if (myMaxMaxLength < len) + myMaxMaxLength = len; + + myStrings.push_back(new ArStringInfoHolder(name, len, functor)); + bool *boolPtr; + boolPtr = new bool; + // if we've added to config we default to true + if (myAddedToConfig) + *boolPtr = true; + else + *boolPtr = false; + myStringsEnabled.push_back(boolPtr); + myStringsCount++; + myMutex.unlock(); + if (myAddedToConfig) + processFile(NULL, 0); +} + diff --git a/Legacy/Aria/src/ArDeviceConnection.cpp b/Legacy/Aria/src/ArDeviceConnection.cpp new file mode 100644 index 0000000..2b941e1 --- /dev/null +++ b/Legacy/Aria/src/ArDeviceConnection.cpp @@ -0,0 +1,201 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArDeviceConnection.h" + +bool ArDeviceConnection::ourStrMapInited = false; +ArStrMap ArDeviceConnection::ourStrMap; +bool ArDeviceConnection::ourDCDebugShouldLog = false; +ArTime ArDeviceConnection::ourDCDebugFirstTime; + +/** + Subclasses of this connection type should call setDCPortType in + their constructor, then setDCPortName in their openPort. + + Classes that use a device connection should call setDCDeviceName + with the device the connection is attached too (usually in + setDeviceConnection on the device)... + + Things that read the port should call debugStartPacket whenever + they are starting reading a packet... Then debugBytesRead with the + byte count whenever they read or fail a read (0 if a read is + failed)... Then debugEndPacket with a boolean for if the packet + was a good one or a bad one and an integer that's postive for the + type of packet (if successful) or negative to express why the read + failed (if not successful). For the 'why the read failed' the + values should be negative, and should all be unique (anywhere a + read can return), preferably with a gap between the values, so that + if more debugging is needed there are values in between the ones + already there. Generally this information isn't used or computed, + unless the global member ArDeviceConnection::debugShouldLog is + called to turn it on. +**/ +AREXPORT ArDeviceConnection::ArDeviceConnection() +{ + if (!ourStrMapInited) + { + ourStrMapInited = true; + buildStrMap(); + } + + myDCPortName = "Unknown port name"; + myDCPortType = "Unknown port type"; + myDCDeviceName = "Unknown device type"; + + myDCDebugPacketStarted = false; + myDCDebugBytesRead = 0; + myDCDebugTimesRead = 0; + myDCDebugNumGoodPackets = 0; + myDCDebugNumBadPackets = 0; +} + +AREXPORT ArDeviceConnection::~ArDeviceConnection() +{ + close(); +} + + +void ArDeviceConnection::buildStrMap(void) +{ + ourStrMap[STATUS_NEVER_OPENED] = "never opened"; + ourStrMap[STATUS_OPEN] = "open"; + ourStrMap[STATUS_OPEN_FAILED] = "open failed"; + ourStrMap[STATUS_CLOSED_NORMALLY] = "closed"; + ourStrMap[STATUS_CLOSED_ERROR] = "closed on error"; +} + +AREXPORT const char * ArDeviceConnection::getStatusMessage(int messageNumber) const +{ + ArStrMap::const_iterator it; + if ((it = ourStrMap.find(messageNumber)) != ourStrMap.end()) + return (*it).second.c_str(); + else + return NULL; +} + +AREXPORT void ArDeviceConnection::setPortName(const char *portName) +{ + if (portName != NULL) + myDCPortName = portName; + else + myDCPortName = "Unknown port name"; +} + +AREXPORT const char *ArDeviceConnection::getPortName(void) const +{ + return myDCPortName.c_str(); +} + +AREXPORT void ArDeviceConnection::setPortType(const char *portType) +{ + if (portType != NULL) + myDCPortType = portType; + else + myDCPortType = "Unknown port type"; +} + +AREXPORT const char *ArDeviceConnection::getPortType(void) const +{ + return myDCPortType.c_str(); +} + +AREXPORT void ArDeviceConnection::setDeviceName(const char *deviceName) +{ + if (deviceName != NULL) + myDCDeviceName = deviceName; + else + myDCDeviceName = "Unknown device name"; +} + +AREXPORT const char *ArDeviceConnection::getDeviceName(void) const +{ + return myDCDeviceName.c_str(); +} + +AREXPORT void ArDeviceConnection::debugStartPacket(void) +{ + if (!ourDCDebugShouldLog) + return; + + myDCDebugStartTime.setToNow(); + myDCDebugPacketStarted = true; + myDCDebugBytesRead = 0; + myDCDebugTimesRead = 0; +} + +AREXPORT void ArDeviceConnection::debugBytesRead(int bytesRead) +{ + if (!ourDCDebugShouldLog || !myDCDebugPacketStarted) + return; + + if (bytesRead > 0) + { + if (myDCDebugBytesRead == 0) + myDCDebugFirstByteTime.setToNow(); + myDCDebugLastByteTime.setToNow(); + myDCDebugBytesRead += bytesRead; + } + + myDCDebugTimesRead++; +} + +AREXPORT void ArDeviceConnection::debugEndPacket(bool goodPacket, int type) +{ + if (!ourDCDebugShouldLog || !myDCDebugPacketStarted) + return; + + if (myDCDebugBytesRead == 0) + { + myDCDebugFirstByteTime.setToNow(); + myDCDebugLastByteTime.setToNow(); + } + + if (goodPacket) + myDCDebugNumGoodPackets++; + else + myDCDebugNumBadPackets++; + + long long firstSince = ourDCDebugFirstTime.mSecSinceLL(myDCDebugStartTime); + + ArLog::log(ArLog::Normal, + "DevCon %s %s %s started %lld.%03lld firstByte %lld lastByte %lld bytesRead %d timesRead %d good %d numGood %lld numBad %lld type %d 0x%x", + myDCPortType.c_str(), myDCPortName.c_str(), myDCDeviceName.c_str(), + firstSince / 1000, firstSince % 1000, + myDCDebugStartTime.mSecSinceLL(myDCDebugFirstByteTime), + myDCDebugStartTime.mSecSinceLL(myDCDebugLastByteTime), + myDCDebugBytesRead, myDCDebugTimesRead, goodPacket, + myDCDebugNumGoodPackets, myDCDebugNumBadPackets, + type, type); + + myDCDebugPacketStarted = false; +} + +AREXPORT bool ArDeviceConnection::debugShouldLog(bool shouldLog) +{ + ourDCDebugShouldLog = shouldLog; + return true; +} diff --git a/Legacy/Aria/src/ArFileParser.cpp b/Legacy/Aria/src/ArFileParser.cpp new file mode 100644 index 0000000..d5551fd --- /dev/null +++ b/Legacy/Aria/src/ArFileParser.cpp @@ -0,0 +1,707 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArFileParser.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include + + +/** + * @param baseDirectory the char * name of the base directory; the file name + * is specified relative to this directory + * @param isPreCompressQuotes a bool set to true if the file parser should + * treat strings enclosed in double-quotes as a single argument (such strings + * must be surrounded by spaces). This is roughly equivalent to calling + * ArArgumentBuilder::compressQuoted(false) on the resulting builder, but + * is more efficient and handles embedded spaces better. The default value + * is false and preserves the original behavior where each argument is a + * space-separated alphanumeric string. +**/ +AREXPORT ArFileParser::ArFileParser(const char *baseDirectory, + bool isPreCompressQuotes) : + myCommentDelimiterList(), + myPreParseFunctor(NULL), + myMap(), + myRemainderHandler(NULL), + myIsQuiet(false), + myIsPreCompressQuotes(isPreCompressQuotes), + myIsInterrupted(false), + myInterruptMutex() +{ + setBaseDirectory(baseDirectory); + + std::list defaultDelimiters; + defaultDelimiters.push_back(";"); + defaultDelimiters.push_back("#"); + + setCommentDelimiters(defaultDelimiters); + + resetCounters(); + setMaxNumArguments(); +} + +AREXPORT ArFileParser::~ArFileParser(void) +{ + ArUtil::deleteSetPairs(myMap.begin(), myMap.end()); + myMap.clear(); + + delete myRemainderHandler; + +} + +AREXPORT bool ArFileParser::addHandler( + const char *keyword, ArRetFunctor1 *functor) +{ + std::map::iterator it; + if (keyword == NULL) + { + if (myRemainderHandler != NULL) + { + ArLog::log(ArLog::Verbose, "There is already a functor to handle unhandled lines"); + return false; + } + else + { + delete myRemainderHandler; + myRemainderHandler = new HandlerCBType(functor); + return true; + } + } + + if ((it = myMap.find(keyword)) != myMap.end()) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "There is already a functor to handle keyword '%s'", keyword); + } + return false; + } + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "keyword '%s' handler added", keyword); + } + myMap[keyword] = new HandlerCBType(functor); + return true; +} + +/** + This function has a different name than addProcessFileCB just so + that if you mean to get this function but have the wrong functor + you'll get an error. The rem's are the same though since that + shouldn't matter. +**/ +AREXPORT bool ArFileParser::addHandlerWithError( + const char *keyword, + ArRetFunctor3 *functor) +{ + std::map::iterator it; + if (keyword == NULL) + { + if (myRemainderHandler != NULL) + { + ArLog::log(ArLog::Verbose, "There is already a functor to handle unhandled lines"); + return false; + } + else + { + delete myRemainderHandler; + myRemainderHandler = new HandlerCBType(functor); + return true; + } + } + + if ((it = myMap.find(keyword)) != myMap.end()) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "There is already a functor to handle keyword '%s'", keyword); + } + return false; + } + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "keyword '%s' handler added", keyword); + } + myMap[keyword] = new HandlerCBType(functor); + return true; +} + +AREXPORT bool ArFileParser::remHandler(const char *keyword, + bool logIfCannotFind) +{ + std::map::iterator it; + HandlerCBType *handler; + + if (keyword == NULL) { + + if (myRemainderHandler != NULL) + { + delete myRemainderHandler; + myRemainderHandler = NULL; + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "Functor for remainder handler removed"); + } + return true; + } + else { // no remainder handler to remove + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "No remainder handler to remove for null keyword"); + } + return false; + } // end else no remainder handler to remove + } // end if keyword is null + + + if ((it = myMap.find(keyword)) == myMap.end()) + { + if (logIfCannotFind) + ArLog::log(ArLog::Normal, "There is no keyword '%s' to remove.", + keyword); + return false; + } + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "keyword '%s' removed", keyword); + } + handler = (*it).second; + myMap.erase(it); + delete handler; + remHandler(keyword, false); + return true; + +} + +AREXPORT bool ArFileParser::remHandler( + ArRetFunctor1 *functor) +{ + std::map::iterator it; + HandlerCBType *handler; + + if (myRemainderHandler != NULL && myRemainderHandler->haveFunctor(functor)) + { + delete myRemainderHandler; + myRemainderHandler = NULL; + ArLog::log(ArLog::Verbose, "Functor for remainder handler removed"); + return true; + } + + for (it = myMap.begin(); it != myMap.end(); it++) + { + if ((*it).second->haveFunctor(functor)) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "Functor for keyword '%s' removed.", + (*it).first.c_str()); + } + handler = (*it).second; + myMap.erase(it); + delete handler; + remHandler(functor); + return true; + } + } + return false; + +} + +AREXPORT bool ArFileParser::remHandler( + ArRetFunctor3 *functor) +{ + std::map::iterator it; + HandlerCBType *handler; + + if (myRemainderHandler != NULL && myRemainderHandler->haveFunctor(functor)) + { + delete myRemainderHandler; + myRemainderHandler = NULL; + ArLog::log(ArLog::Verbose, "Functor for remainder handler removed"); + return true; + } + + for (it = myMap.begin(); it != myMap.end(); it++) + { + if ((*it).second->haveFunctor(functor)) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "Functor for keyword '%s' removed.", + (*it).first.c_str()); + } + handler = (*it).second; + myMap.erase(it); + delete handler; + remHandler(functor); + return true; + } + } + return false; + +} + +/* +AREXPORT ArRetFunctor1 *ArFileParser::getHandler(const char *keyword) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + + if ((it = myMap.find(keyword)) == myMap.end()) + { + ArLog::log(ArLog::Normal, "There is no keyword handler for '%s'", keyword); + return NULL; + } + + return (*it).second; +} +*/ +AREXPORT void ArFileParser::setBaseDirectory(const char *baseDirectory) +{ + if (baseDirectory != NULL && strlen(baseDirectory) > 0) + myBaseDir = baseDirectory; + else + myBaseDir = ""; +} + +AREXPORT const char *ArFileParser::getBaseDirectory(void) const +{ + return myBaseDir.c_str(); +} + +/** + * By default, the ";" and "#" strings are used to indicate comments. Call + * this method to override the defaults. + * + * @param delimiters each string represents + * a comment delimiter. The comment delimiter and any following characters in + * the current line will be stripped during parsing of the file +**/ +AREXPORT void ArFileParser::setCommentDelimiters(const std::list &delimiters) +{ + myCommentDelimiterList.clear(); + + int i = 0; + for (std::list::const_iterator iter = delimiters.begin(); + iter != delimiters.end(); + iter++, i++) { + std::string curDelimiter = *iter; + if (!ArUtil::isStrEmpty(curDelimiter.c_str())) { + myCommentDelimiterList.push_back(curDelimiter); + } + else { + ArLog::log(ArLog::Normal, + "ArFileParser::setCommentDelimiters cannot set empty delimiter at position %i", + i); + } + } // end for each given delimiter + +} // end method setCommentDelimiters + +/** + * Call this method to indicate that the file type to be parsed does not contain + * comments. +**/ +AREXPORT void ArFileParser::clearCommentDelimiters() +{ + myCommentDelimiterList.clear(); + +} // end method clearCommentDelimiters + + +AREXPORT void ArFileParser::resetCounters(void) +{ + myLineNumber = 0; +} + +AREXPORT bool ArFileParser::parseLine(char *line, + char *errorBuffer, size_t errorBufferLen) +{ + char keyword[512]; + char *choppingPos; + char *valueStart; + size_t textStart; + size_t len; + size_t i; + bool noArgs; + std::map::iterator it; + HandlerCBType *handler; + + myLineNumber++; + noArgs = false; + + + if (myPreParseFunctor != NULL) { + myPreParseFunctor->invoke(line); + } + + + // chop out the comments + for (std::list::iterator iter = myCommentDelimiterList.begin(); + iter != myCommentDelimiterList.end(); + iter++) { + std::string commentDel = *iter; + if ((choppingPos = strstr(line, commentDel.c_str())) != NULL) { + line[choppingPos-line] = '\0'; + } + } + + int chopCount = 0; + + // chop out the new line if its there + if ((choppingPos = strstr(line, "\n")) != NULL) { + chopCount++; + line[choppingPos-line] = '\0'; + } + // chop out the windows new line if its there + while ((choppingPos = strstr(line, "\r")) != NULL) { + chopCount++; + memmove(choppingPos, choppingPos + 1, strlen(line)); + } + + // see how long the line is + len = strlen(line); + + // find the keyword + // if this is 0 then we have an empty line so we continue + if (len == 0) + { + //ArLog::log(ArLog::Verbose, "line %d: empty line", myLineNumber); + return true; + } + // first find the start of the text + for (i = 0; i < len; i++) + { + // if its not a space we're done + if (!isspace(line[i])) + { + textStart = i; + break; + }; + } + // if we reached the end of the line then continue + if (i == len) + { + if (!myIsQuiet) { + ArLog::log(ArLog::Verbose, "line %d: just white space at start of line", myLineNumber); + } + return true; + } + // now we chisel out the keyword + // adding it so that if the text is quoted it pulls the whole keyword + bool quoted = false; + for (i = textStart; + i < len && i < sizeof(keyword) + textStart - 3; + i++) + { + // if we're on the start and its a quote just note that and continue + if (!quoted && i == textStart && line[i] == '"') + { + // set quoted to true since we're going to move textStart ahead + // and don't want to loop this + quoted = true; + // note that our text starts on the next char really + textStart++; + continue; + } + // if we're not looking for the end quote and its a space we're done + if (!quoted && isspace(line[i])) + { + break; + } + // if we are looking for the end quote and its a quote we're done + // (so put the null terminator in the keyword and advance the line + // iterator beyond the end quote + else if (quoted && line[i] == '"') + { + keyword[i-textStart] = '\0'; + i++; + break; + } + // if not its part of the keyword + else + keyword[i-textStart] = line[i]; + } + + keyword[i-textStart] = '\0'; + //ArLog::log(ArLog::Verbose, "line %d: keyword %s", lineNumber, keyword); + // now find the start of the value (first non whitespace) + for (; i < len; i++) + { + // if its not a space we're done + if (!isspace(line[i])) + { + valueStart = &line[i]; + break; + }; + } + // lower that keyword + ArUtil::lower(keyword, keyword, 512); + + + // a variable for if we're using the remainder handler or not (don't + // do a test just because someone could set the remainder handler to + // some other handler they're using) + bool usingRemainder = false; + // see if we have a handler for the keyword + if ((it = myMap.find(keyword)) != myMap.end()) + { + //printf("have handler for keyword %s\n", keyword); + // we have a handler, so pull that out + handler = (*it).second; + // valueStart was set above but make sure there's an argument + if (i == len) + noArgs = true; + } + // if we don't then check for a remainder handler + else + { + //printf("no handler for keyword %s\n", keyword); + // if we have one set it + if (myRemainderHandler != NULL) + { + usingRemainder = true; + handler = myRemainderHandler; + // reset the value to the start of the text + valueStart = &line[textStart]; + } + // if we don't just keep going + else + { + ArLog::log(ArLog::Verbose, + "line %d: unknown keyword '%s' line '%s', continuing", + myLineNumber, keyword, &line[textStart]); + return true; + } + } + /* + if (noArgs) + ArLog::log(ArLog::Verbose, "line %d: firstword '%s' no argument", + myLineNumber, keyword); + else + ArLog::log(ArLog::Verbose, "line %d: firstword '%s' argument '%s'", + myLineNumber, keyword, valueStart); + */ + // now toss the rest of the argument into an argument builder then + // form it up to send to the functor + + ArArgumentBuilder builder(myMaxNumArguments, + '\0', // no special space character + false, // do not ignore normal spaces + myIsPreCompressQuotes); // whether to pre-compress quotes + // if we have arguments add them + if (!noArgs) + builder.addPlain(valueStart); + // if not we still set the name of whatever we parsed (unless we + // didn't have a param of course) + if (!usingRemainder) + builder.setExtraString(keyword); + + // make sure we don't overwrite any errors + if (errorBuffer != NULL && errorBuffer[0] != '\0') + { + errorBuffer = NULL; + errorBufferLen = 0; + } + + // call the functor and see if there are errors; + // if we had an error and aren't continuing on errors then we keep going + if (!handler->call(&builder, errorBuffer, errorBufferLen)) + { + // put the line number in the error message (this won't overwrite + // anything because of the check above + if (errorBuffer != NULL) + { + std::string errorString = errorBuffer; + snprintf(errorBuffer, errorBufferLen, "Line %d: %s", myLineNumber, + errorString.c_str()); + + } + return false; + } + return true; +} + +AREXPORT void ArFileParser::setPreParseFunctor(ArFunctor1 *functor) +{ + myPreParseFunctor = functor; + +} // end method setPreParseFunctor + + + +/** + @param fileName the file to open + + @param continueOnErrors whether to continue or immediately bail upon an error + + @param noFileNotFoundMessage whether or not to log if we find a + file (we normally want to but for robot param files that'd be too + annoying since we test for a lot of files) + + @param errorBuffer buffer to put errors into if not NULL. Only the + first error is saved, and as soon as this function is called it + immediately empties the errorBuffer + + @param errorBufferLen the length of @a errorBuffer +*/ +AREXPORT bool ArFileParser::parseFile(const char *fileName, + bool continueOnErrors, + bool noFileNotFoundMessage, + char *errorBuffer, + size_t errorBufferLen) +{ + myInterruptMutex.lock(); + myIsInterrupted = false; + myInterruptMutex.unlock(); + + FILE *file = NULL; + + char line[10000]; + bool ret = true; + + if (errorBuffer) + errorBuffer[0] = '\0'; + + std::string realFileName; + if (fileName[0] == '/' || fileName[0] == '\\') + { + realFileName = fileName; + } + else + { + realFileName = myBaseDir; + realFileName += fileName; + } + + ArLog::log(ArLog::Verbose, "Opening file %s from fileName given %s and base directory %s", realFileName.c_str(), fileName, myBaseDir.c_str()); + + //char *buf = new char[4096]; + + if ((file = ArUtil::fopen(realFileName.c_str(), "r")) == NULL) + { + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "cannot open file %s", fileName); + if (!noFileNotFoundMessage) + ArLog::log(ArLog::Terse, "ArFileParser::parseFile: Could not open file %s to parse file.", realFileName.c_str()); + return false; + } +/** + if( setvbuf( file, buf, _IOFBF, sizeof( buf ) ) != 0 ) + printf( "Incorrect type or size of buffer for file\n" ); + //else + // printf( "'file' now has a buffer of 1024 bytes\n" ); +**/ + + resetCounters(); + + // read until the end of the file + while (!isInterrupted() && + (fgets(line, sizeof(line), file) != NULL)) + { + if (!parseLine(line, errorBuffer, errorBufferLen)) + { + ArLog::log(ArLog::Terse, "## Last error on line %d of file '%s'", + myLineNumber, realFileName.c_str()); + ret = false; + if (!continueOnErrors) + break; + } + } + + fclose(file); + return ret; +} + + +bool ArFileParser::isInterrupted() { + + myInterruptMutex.lock(); + bool b = myIsInterrupted; + myInterruptMutex.unlock(); + + return b; + +} // end method isInterrupted + + +AREXPORT void ArFileParser::cancelParsing() +{ + myInterruptMutex.lock(); + myIsInterrupted = true; + myInterruptMutex.unlock(); + +} // end method cancelParsing + + +/** + * @param file File pointer for a file to be parsed. The file must be open for + * reading (e.g. with ArUtil::fopen()) and this pointer must not be NULL. + * @param buffer a non-NULL char array in which to read the file + * @param bufferLength the number of chars in the buffer; must be greater than 0 + * @param continueOnErrors a bool set to true if parsing should continue + * even after an error is detected + * @param errorBuffer buffer to put errors into if not NULL. Only the + * first error is saved, and as soon as this function is called it + * immediately empties the errorBuffer + * @param errorBufferLen the length of @a errorBuffer +*/ +AREXPORT bool ArFileParser::parseFile(FILE *file, + char *buffer, + int bufferLength, + bool continueOnErrors, + char *errorBuffer, + size_t errorBufferLen) +{ + myInterruptMutex.lock(); + myIsInterrupted = false; + myInterruptMutex.unlock(); + + if (errorBuffer) + errorBuffer[0] = '\0'; + + if ((file == NULL) || (buffer == NULL) || (bufferLength <= 0)) + { + if (errorBuffer != NULL) + snprintf(errorBuffer, errorBufferLen, "parseFile: bad setup"); + return false; + } + + bool ret = true; + resetCounters(); + + // read until the end of the file + while (!isInterrupted() && + (fgets(buffer, bufferLength, file) != NULL)) + { + if (!parseLine(buffer, errorBuffer, errorBufferLen)) + { + ret = false; + if (!continueOnErrors) + break; + } + } + return ret; +} + + +void ArFileParser::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; +} + diff --git a/Legacy/Aria/src/ArForbiddenRangeDevice.cpp b/Legacy/Aria/src/ArForbiddenRangeDevice.cpp new file mode 100644 index 0000000..a7739c2 --- /dev/null +++ b/Legacy/Aria/src/ArForbiddenRangeDevice.cpp @@ -0,0 +1,219 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobot.h" +#include "ariaUtil.h" +#include "ArForbiddenRangeDevice.h" + +/** + This will take a map and then convert the forbidden lines into + range device readings every cycle. + + It doesn't add any data for drawing the current range device + readings since the lines themselves show up in the map. + + @param armap the map to use forbidden lines from + @param distanceIncrement how many mm to increment search in sensor readings for forbidden lines + @param maxRange how far out to look total + @param name the name of the device + **/ +AREXPORT ArForbiddenRangeDevice::ArForbiddenRangeDevice( + ArMapInterface *armap, double distanceIncrement, unsigned int maxRange, + const char *name) : + ArRangeDevice(INT_MAX, 0, name, maxRange, 0, 0, 0, true), + myDataMutex(), + myMap(armap), + myDistanceIncrement(distanceIncrement), + mySegments(), + myProcessCB(this, &ArForbiddenRangeDevice::processReadings), + myMapChangedCB(this, &ArForbiddenRangeDevice::processMap) , + myIsEnabled(true), + myEnableCB(this, &ArForbiddenRangeDevice::enable), + myDisableCB(this, &ArForbiddenRangeDevice::disable) +{ + myDataMutex.setLogName("ArForbiddenRangeDevice::myDataMutex"); + + myMapChangedCB.setName("ArForbiddenRangeDevice"); +} + +AREXPORT ArForbiddenRangeDevice::~ArForbiddenRangeDevice() +{ + +} + +AREXPORT void ArForbiddenRangeDevice::processMap(void) +{ + std::list::const_iterator it; + ArMapObject *obj; + + myDataMutex.lock(); + ArUtil::deleteSet(mySegments.begin(), mySegments.end()); + mySegments.clear(); + + for (it = myMap->getMapObjects()->begin(); + it != myMap->getMapObjects()->end(); + it++) + { + obj = (*it); + if (strcmp(obj->getType(), "ForbiddenLine") == 0 && + obj->hasFromTo()) + { + mySegments.push_back(new ArLineSegment(obj->getFromPose(), + obj->getToPose())); + } + if (strcmp(obj->getType(), "ForbiddenArea") == 0 && + obj->hasFromTo()) + { + double angle = obj->getPose().getTh(); + double sa = ArMath::sin(angle); + double ca = ArMath::cos(angle); + double fx = obj->getFromPose().getX(); + double fy = obj->getFromPose().getY(); + double tx = obj->getToPose().getX(); + double ty = obj->getToPose().getY(); + ArPose P0((fx*ca - fy*sa), (fx*sa + fy*ca)); + ArPose P1((tx*ca - fy*sa), (tx*sa + fy*ca)); + ArPose P2((tx*ca - ty*sa), (tx*sa + ty*ca)); + ArPose P3((fx*ca - ty*sa), (fx*sa + ty*ca)); + mySegments.push_back(new ArLineSegment(P0, P1)); + mySegments.push_back(new ArLineSegment(P1, P2)); + mySegments.push_back(new ArLineSegment(P2, P3)); + mySegments.push_back(new ArLineSegment(P3, P0)); + } + } + myDataMutex.unlock(); +} + +AREXPORT void ArForbiddenRangeDevice::processReadings(void) +{ + ArPose intersection; + std::list::iterator it; + + lockDevice(); + myDataMutex.lock(); + + myCurrentBuffer.beginRedoBuffer(); + + if (!myIsEnabled) + { + myCurrentBuffer.endRedoBuffer(); + myDataMutex.unlock(); + unlockDevice(); + return; + } + + ArLineSegment *segment; + ArPose start; + double startX; + double startY; + ArPose end; + double angle; + double length; + double gone; + double sin; + double cos; + double atX; + double atY; + double robotX = myRobot->getX(); + double robotY = myRobot->getY(); + double max = (double) myMaxRange; + double maxSquared = (double) myMaxRange * (double) myMaxRange; + ArTime startingTime; + //startingTime.setToNow(); + // now see if the end points of the segments are too close to us + for (it = mySegments.begin(); it != mySegments.end(); it++) + { + segment = (*it); + // if either end point or some perpindicular point is close to us + // add the line's data + if (ArMath::squaredDistanceBetween( + segment->getX1(), segment->getY1(), + myRobot->getX(), myRobot->getY()) < maxSquared || + ArMath::squaredDistanceBetween( + segment->getX2(), segment->getY2(), + myRobot->getX(), myRobot->getY()) < maxSquared || + segment->getPerpDist(myRobot->getPose()) < max) + { + start.setPose(segment->getX1(), segment->getY1()); + end.setPose(segment->getX2(), segment->getY2()); + angle = start.findAngleTo(end); + cos = ArMath::cos(angle); + sin = ArMath::sin(angle); + startX = start.getX(); + startY = start.getY(); + length = start.findDistanceTo(end); + // first put in the start point if we should + if (ArMath::squaredDistanceBetween( + startX, startY, robotX, robotY) < maxSquared) + myCurrentBuffer.redoReading(start.getX(), start.getY()); + // now walk the length of the line and see if we should put the points in + for (gone = 0; gone < length; gone += myDistanceIncrement) + { + atX = startX + gone * cos; + atY = startY + gone * sin; + if (ArMath::squaredDistanceBetween( + atX, atY, robotX, robotY) < maxSquared) + myCurrentBuffer.redoReading(atX, atY); + } + // now check the end point + if (end.squaredFindDistanceTo(myRobot->getPose()) < maxSquared) + myCurrentBuffer.redoReading(end.getX(), end.getY()); + } + } + myDataMutex.unlock(); + // and we're done + myCurrentBuffer.endRedoBuffer(); + unlockDevice(); + //printf("%d\n", startingTime.mSecSince()); +} + +AREXPORT void ArForbiddenRangeDevice::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask(myName.c_str(), 20, &myProcessCB); + ArRangeDevice::setRobot(robot); + myMap->lock(); + myMap->addMapChangedCB(&myMapChangedCB); + processMap(); + myMap->unlock(); +} + +AREXPORT void ArForbiddenRangeDevice::enable(void) +{ + myDataMutex.lock(); + myIsEnabled = true; + myDataMutex.unlock(); +} + +AREXPORT void ArForbiddenRangeDevice::disable(void) +{ + myDataMutex.lock(); + myIsEnabled = false; + myDataMutex.unlock(); +} diff --git a/Legacy/Aria/src/ArFunctorASyncTask.cpp b/Legacy/Aria/src/ArFunctorASyncTask.cpp new file mode 100644 index 0000000..a78b2e3 --- /dev/null +++ b/Legacy/Aria/src/ArFunctorASyncTask.cpp @@ -0,0 +1,47 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArFunctorASyncTask.h" + +AREXPORT ArFunctorASyncTask::ArFunctorASyncTask(ArRetFunctor1 *functor) +{ + setThreadName(functor->getName()); + myFunc = functor; +} + +AREXPORT ArFunctorASyncTask::~ArFunctorASyncTask() +{ + +} + +AREXPORT void *ArFunctorASyncTask::runThread(void *arg) +{ + threadStarted(); + void *ret = myFunc->invokeR(arg); + threadFinished(); + return ret; +} diff --git a/Legacy/Aria/src/ArGPS.cpp b/Legacy/Aria/src/ArGPS.cpp new file mode 100644 index 0000000..78c1ff0 --- /dev/null +++ b/Legacy/Aria/src/ArGPS.cpp @@ -0,0 +1,837 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArGPS.h" +#include "ArDeviceConnection.h" +#include "ArRobotPacket.h" +#include "ArRobot.h" +#include "ArCommands.h" +#include "ariaInternal.h" + +#include + + +//#define DEBUG_ARGPS 1 +//#define DEBUG_ARGPS_GPRMC + +#ifdef DEBUG_ARGPS +void ArGPS_printBuf(FILE *fp, const char *data, int size){ for(int i = 0; i < size; ++i) { if(data[i] < ' ' || data[i] > '~') { fprintf(fp, "[0x%X]", data[i] & 0xff); } else { fputc(data[i], fp); } }} +#endif + +/* + * How to add support for new message handlers + * ------------------------------------------- + * + * You can do this by modifying this class, or (recommended) creating a + * subclass of ArGPS. + * + * 1. Create a handler method and functor for the NMEA message that provides + * the data. Initialize the functor in the class constructor. + * + * 2. Add the functor using addNMEAHandler() in the constructor. + * + * 3. Implement the handler method to examine the fields and extract the data (don't forget that + * NMEA does not require that all fields be given). + * + * 4. Add the new GPS type to ArGPSConnector. + * + * Some possible new NMEA message types to add are + * PTNLDG (Trimble proprietary + * DGPS status information), and GPZDA (time of day information). + * + * + * + * How to add support for new GPS types: + * ------------------------------------- + * + * If your GPS device uses NMEA and does not require any special initialization + * commands, then it will probably work with ArGPS as a "Standard" GPS if you use the right BAUD rate. See + * above for how to add support for new NMEA messages. + * + * If your GPS device does not support NMEA, or it requires special + * initialization commands to start sending NMEA data etc., then you can + * define a subclass of ArGPS. Override connect(), setDeviceType(), and/or read() to do + * special things. See ArNovatelGPS as an example. Then add support to + * it to ArGPSConnector: add a new member of the GPSType enum, a check for + * it in parseArgs(), mention it in logArgs(), and create your ArGPS subclass + * in createGPS(). + * + * You can find out the NMEA messages ArGPS wants by accessing "myHandlers", + * of type HandlersMap (a std::map). + * + */ + + + +AREXPORT ArGPS::ArGPS() : + + + // objects + myDevice(NULL), + myNMEAParser("GPS"), + + // handler functors + myGPRMCHandler(this, &ArGPS::handleGPRMC), + myGPGGAHandler(this, &ArGPS::handleGPGGA), + myPGRMEHandler(this, &ArGPS::handlePGRME), + myPGRMZHandler(this, &ArGPS::handlePGRMZ), + myHCHDxHandler(this, &ArGPS::handleHCHDx), + myGPGSAHandler(this, &ArGPS::handleGPGSA), + myGPGSVHandler(this, &ArGPS::handleGPGSV), + mySNRSum(0), + mySNRNum(0), + myGPMSSHandler(this, &ArGPS::handleGPMSS), + myGPGSTHandler(this, &ArGPS::handleGPGST) +{ + addNMEAHandler("GPRMC", &myGPRMCHandler); + addNMEAHandler("GPGGA", &myGPGGAHandler); + addNMEAHandler("PGRME", &myPGRMEHandler); + addNMEAHandler("PGRMZ", &myPGRMZHandler); + addNMEAHandler("HCHDG", &myHCHDxHandler); + addNMEAHandler("HCHDM", &myHCHDxHandler); + addNMEAHandler("HCHDT", &myHCHDxHandler); + addNMEAHandler("GPHDG", &myHCHDxHandler); + addNMEAHandler("GPHDM", &myHCHDxHandler); + addNMEAHandler("GPHDT", &myHCHDxHandler); + addNMEAHandler("GPGSA", &myGPGSAHandler); + addNMEAHandler("GPGSV", &myGPGSVHandler); + addNMEAHandler("GPMSS", &myGPMSSHandler); + addNMEAHandler("GPGST", &myGPGSTHandler); + + myMutex.setLogName("ArGPS::myMutex"); +} + + + + +AREXPORT ArGPS::Data::Data() : + latitude(0.0), + longitude(0.0), + havePosition(false), + speed(0.0), + haveSpeed(false), + fixType(NoFix), + numSatellitesTracked(0), + altitude(0.0), + haveAltitude(false), + altimeter(0.0), + haveAltimeter(false), + DGPSStationID(0), + haveDGPSStation(false), + garminPositionError(0.0), + haveGarminPositionError(false), + garminVerticalPositionError(0.0), + haveGarminVerticalPositionError(false), + compassHeadingMag(0.0), + compassHeadingTrue(0.0), + haveCompassHeadingMag(false), + haveCompassHeadingTrue(false), + compassMagCounter(0), + compassTrueCounter(0), + haveHDOP(false), + HDOP(0.0), + haveVDOP(false), + VDOP(0.0), + havePDOP(false), + PDOP(0.0), + qualityFlag(false), + meanSNR(0.0), + haveSNR(false), + beaconSignalStrength(0.0), + beaconSNR(0.0), + beaconFreq(0.0), + beaconBPS(0), + beaconChannel(0), + haveBeaconInfo(false), + inputsRMS(0.0), + haveInputsRMS(false), + haveErrorEllipse(false), + haveLatLonError(false), + altitudeError(0.0), + haveAltitudeError(false) +{} + + + +AREXPORT bool ArGPS::connect(unsigned long connectTimeout) +{ + if (!myDevice) + { + ArLog::log(ArLog::Terse, "GPS Error: Cannot connect, device connection invalid."); + return false; + } + + if (myDevice->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + ArLog::log(ArLog::Terse, "GPS Error: Cannot connect, device connection not open."); + return false; + } + + if (!initDevice()) return false; + + ArLog::log(ArLog::Normal, "ArGPS: Opened connection, waiting for initial data..."); + if(!waitForData(connectTimeout)) + { + ArLog::log(ArLog::Terse, "ArGPS: Error: No response from GPS after %dms.", connectTimeout); + return false; + } + return true; +} + +AREXPORT bool ArGPS::waitForData(unsigned long timeout) +{ + ArTime start; + start.setToNow(); + while ((unsigned long)start.mSecSince() <= timeout) + { + if (read(40) & ReadUpdated) // read until data is sucessfully parsed + return true; + ArUtil::sleep(100); + } + return false; +} + + + +AREXPORT int ArGPS::read(unsigned long maxTime) +{ + if (!myDevice) return ReadError; + ArTime startTime; + startTime.setToNow(); + int result = 0; + while(maxTime == 0 || startTime.mSecSince() < (long)maxTime) + { + result |= myNMEAParser.parse(myDevice); + if(result & ReadError || result & ReadFinished) + { +#ifdef DEBUG_ARGPS + std::cerr << "ArGPS: finished reading all available data (or error reading).\n"; +#endif + return result; + } + } +#ifdef DEBUG_ARGPS + if(maxTime != 0) + fprintf(stderr, "ArGPS::read() reached maxTime %lu (time=%lu), returning.\n", maxTime, startTime.mSecSince()); +#endif + + return result; +} + +// Key navigation data (position, etc.) +void ArGPS::handleGPRMC(ArNMEAParser::Message msg) +{ + parseGPRMC(msg, myData.latitude, myData.longitude, myData.qualityFlag, myData.havePosition, myData.timeGotPosition, myData.GPSPositionTimestamp, myData.haveSpeed, myData.speed); +} + +void ArGPS::parseGPRMC(const ArNMEAParser::Message &msg, double &latitudeResult, double &longitudeResult, bool &qualityFlagResult, bool &gotPositionResult, ArTime &timeGotPositionResult, ArTime &gpsTimestampResult, bool &gotSpeedResult, double &speedResult) +{ + + ArNMEAParser::MessageVector *message = msg.message; +#if defined(DEBUG_ARGPS) || defined(DEBUG_ARGPS_GPRMC) + fprintf(stderr, "XXX GPRMC size=%d, stat=%s latDegMin=%s, latNS=%s, lonDegMin=%s, lonEW=%s\n", message->size(), + (message->size() > 2) ? (*message)[2].c_str() : "(missing)", + (message->size() > 3) ? (*message)[3].c_str() : "(missing)", + (message->size() > 4) ? (*message)[4].c_str() : "(missing)", + (message->size() > 5) ? (*message)[5].c_str() : "(missing)", + (message->size() > 6) ? (*message)[6].c_str() : "(missing)" + ); +#endif + + // Enough data?: + if (message->size() < 3) return; + + // Data quality warning flag. Most GPS's use "V" when there's simply no fix, but + // Trimble uses "V" when there's a GPS fix but num. satellites or DOP are + // below some thresholds. + bool flag = ((*message)[2] == "A"); + + double lat, lon; + + if (!readFloatFromStringVec(message, 3, &lat, &gpsDegminToDegrees)) return; + + if (message->size() < 5) return; + if ((*message)[4] == "S") lat *= -1; + else if((*message)[4] != "N") return; // bad value for field + + if (!readFloatFromStringVec(message, 5, &lon, &gpsDegminToDegrees)) return; + + if (message->size() < 7) return; + if ((*message)[6] == "W") lon *= -1; + else if((*message)[6] != "E") return; // bad value for field + + // Only set data after above stuff was properly parsed + latitudeResult = lat; + longitudeResult = lon; + qualityFlagResult = flag; + gotPositionResult = true; + timeGotPositionResult = msg.timeParseStarted; + + // timestamp + readTimeFromString((*message)[1], &gpsTimestampResult); + + // speed + gotSpeedResult = readFloatFromStringVec(message, 7, &speedResult, &knotsToMPS); + +} + + +// Fix type, number of satellites tracked, DOP and also maybe altitude +void ArGPS::handleGPGGA(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + if (message->size() < 7) return; + switch((*message)[6].c_str()[0]) + { + case '0': + myData.fixType = BadFix; + break; + case '1': + myData.fixType = GPSFix; + break; + case '2': + case '9': // Novatel extension, means using WAAS + myData.fixType = DGPSFix; + break; + case '3': + myData.fixType = PPSFix; + break; + case '4': + myData.fixType = RTKinFix; + break; + case '5': + myData.fixType = FloatRTKinFix; + break; + case '6': + myData.fixType = DeadReckFix; + break; + case '7': + myData.fixType = ManualFix; + break; + case '8': + myData.fixType = SimulatedFix; + break; + default: + myData.fixType = UnknownFixType; + } + + readUShortFromStringVec(message, 7, &(myData.numSatellitesTracked)); + myData.haveHDOP = readFloatFromStringVec(message, 8, &myData.HDOP); // note redundant with GPGSA + myData.haveAltitude = readFloatFromStringVec(message, 9, &myData.altitude); + // TODO get altitude geoidal seperation + myData.haveDGPSStation = readUShortFromStringVec(message, 14, &myData.DGPSStationID); +} + + +// Error estimation in ground distance units (actually a proprietary message) +void ArGPS::handlePGRME(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + myData.haveGarminPositionError = readFloatFromStringVec(message, 1, &myData.garminPositionError); + myData.haveGarminVerticalPositionError = readFloatFromStringVec(message, 3, &myData.garminVerticalPositionError); +} + +// Altitude (actually a Garmin proprietary message) +void ArGPS::handlePGRMZ(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + // This is redundant with GPGGA and often a different value (plus the + // conversion...) Favor this over that one, or separate into two values? + // (this is specifically from an altimeter and the value in GGA is + // from the satellite positions.) + myData.haveAltimeter = readFloatFromStringVec(message, 1, &myData.altimeter); + if (myData.haveAltimeter && message->size() >= 3 && strcasecmp((*message)[2].c_str(), "f") == 0) + myData.altimeter = feetToMeters(myData.altimeter); +} + +// Compass heading messages +void ArGPS::handleHCHDx(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + if((*message)[0] == "HCHDT") // true north + { + myData.haveCompassHeadingTrue = readFloatFromStringVec(message, 1, &myData.compassHeadingTrue); + if(myData.haveCompassHeadingTrue) ++(myData.compassTrueCounter); + } + + if((*message)[0] == "HCHDM" || (*message)[0] == "HCHDG") // magnetic north + { + myData.haveCompassHeadingMag = readFloatFromStringVec(message, 1, &myData.compassHeadingMag); + if(myData.haveCompassHeadingMag) ++(myData.compassMagCounter); + } +} + +// GPS DOP and satellite IDs +void ArGPS::handleGPGSA(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + // This message alse has satellite IDs, not sure if that information is + // useful though. + + myData.havePDOP = readFloatFromStringVec(message, 15, &myData.PDOP); + myData.haveHDOP = readFloatFromStringVec(message, 16, &myData.HDOP); + myData.haveVDOP = readFloatFromStringVec(message, 17, &myData.VDOP); +} + +AREXPORT const char* ArGPS::getFixTypeName() const +{ + return getFixTypeName(getFixType()); +} + +AREXPORT const char* ArGPS::getFixTypeName(FixType type) +{ + switch (type) + { + case NoFix: return "None"; + case BadFix: return "Bad"; + case GPSFix: return "GPS"; + case DGPSFix: return "DGPS"; + case PPSFix: return "PPS"; + case RTKinFix: return "Omnistar/RTK Converged fix"; + case FloatRTKinFix: return "Converging Omnistar/RTK float"; + case DeadReckFix: return "Dead Reckoning"; + case ManualFix: return "Manual"; + case SimulatedFix: return "Simulated"; + default: return "Unknown"; + } +} + +AREXPORT void ArGPS::logData() const +{ + ArLog::log(ArLog::Normal, "GPS Fix=%s Num. Satellites=%d Mean SNR=%.4f", getFixTypeName(), getNumSatellitesTracked(), getMeanSNR()); + + if (havePosition()) + { + ArLog::log(ArLog::Normal, "GPS Latitude=%0.4fdeg Longitude=%0.4fdeg Timestamp=%d", getLatitude(), getLongitude(), getGPSPositionTimestamp().getMSec()); + // for fun... + ArLog::log(ArLog::Normal, "GPS Maps: ", getLatitude(), getLongitude(), getLatitude(), getLongitude()); + } + + if (haveSpeed()) + ArLog::log(ArLog::Normal, "GPS Speed=%0.4fm/s (%0.4fmi/h)", getSpeed(), mpsToMph(getSpeed())); + + if (haveAltitude()) + ArLog::log(ArLog::Normal, "GPS Altitude=%0.4fm (%0.4fft)", getAltitude(), metersToFeet(getAltitude())); + + if (haveCompassHeadingMag()) + ArLog::log(ArLog::Normal, "GPS Compass Heading (Mag)=%0.4fdeg", getCompassHeadingMag()); + + if (haveCompassHeadingTrue()) + ArLog::log(ArLog::Normal, "GPS Compass Heading (True)=%0.4fdeg", getCompassHeadingTrue()); + + if(haveErrorEllipse()) + ArLog::log(ArLog::Normal, "GPS Error Ellipse=%0.4fm X %0.4fm at %0.4fdeg", getErrorEllipse().getY(), getErrorEllipse().getX(), getErrorEllipse().getTh()); + + if(haveLatLonError()) + ArLog::log(ArLog::Normal, "GPS Latitude Error=%0.4fm, Londitude Error=%0.4fm", getLatLonError().getX(), getLatLonError().getY()); + else if (haveGarminPositionError()) + ArLog::log(ArLog::Normal, "GPS Position Error Estimate=%0.4fm", getGarminPositionError()); + + if(haveAltitudeError()) + ArLog::log(ArLog::Normal, "GPS Altitude Erro=%0.4fm", getAltitudeError()); + else if (haveGarminVerticalPositionError()) + ArLog::log(ArLog::Normal, "GPS Vertical Position Error Estimate=%0.4fm", getGarminVerticalPositionError()); + + if (havePDOP()) + ArLog::log(ArLog::Normal, "GPS PDOP=%0.4f", getPDOP()); + if (haveHDOP()) + ArLog::log(ArLog::Normal, "GPS HDOP=%0.4f", getHDOP()); + if (haveVDOP()) + ArLog::log(ArLog::Normal, "GPS VDOP=%0.4f", getVDOP()); + + if (haveDGPSStation()) + ArLog::log(ArLog::Normal, "GPS DGPS Station ID=%d", getDGPSStationID()); + +} + +AREXPORT void ArGPS::printDataLabelsHeader() const +{ + printf("Latitude Longitude Speed Altitude CompassHeadingMag/True NumSatellites AvgSNR Lat.Err Lon.Err Alt.Err HDOP VDOP PDOP Fix GPSTimeSec:MSec\n"); +} + +AREXPORT void ArGPS::printData(bool labels) const +{ + if(labels) printf("GPS: "); + if (!havePosition()) + { + if(labels) printf("Pos:- -"); + else printf("? ?"); + } + else + { + if(labels) printf("Pos:% 2.6f % 2.6f", getLatitude(), getLongitude()); + else printf("%2.10f %2.10f", getLatitude(), getLongitude()); + } + + if (!haveAltitude()) + { + if(labels) printf(" Alt:-"); + else printf(" ?"); + } + else + { + if(labels) printf(" Alt:%4.2fm (%4.2fft)", getAltitude(), metersToFeet(getAltitude())); + else printf(" %4.6f", getAltitude()); + } + + /* + if (!haveCompassHeadingMag() && !haveCompassHeadingTrue()) + { + if(labels) printf(" Compass:-/-"); + else printf(" ?/?"); + } + else + { + if(haveCompassHeadingMag() && !haveCompassHeadingTrue()) + { + if(labels) printf(" Compass:%3.1f/-", getCompassHeadingMag()); + else printf(" %.6f/?", getCompassHeadingMag()); + } + else if(!haveCompassHeadingMag() && haveCompassHeadingTrue()) + { + if(labels) printf(" Compass:-/%3.1f", getCompassHeadingTrue()); + else printf(" ?/%.6f", getCompassHeadingTrue()); + } + else + { + if(labels) printf(" Compass:%3.1f/%3.1f", getCompassHeadingMag(), getCompassHeadingTrue()); + else printf(" %.6f/%.6f", getCompassHeadingMag(), getCompassHeadingTrue()); + } + } + */ + + if(labels) printf(" NSats:%2d", getNumSatellitesTracked()); + else printf(" %2d", getNumSatellitesTracked()); + + if(haveSNR()) + { + if(labels) printf(" AvgSNR:%.4fdB", getMeanSNR()); + else printf(" %.4f", getMeanSNR()); + } + else + { + if(labels) printf(" AvgSNR:-"); + else printf(" ?"); + } + + if (!haveLatLonError()) + { + if(labels) printf(" LatErr:- LonErr:-"); + else printf(" ? ?"); + } + else + { + if(labels) printf(" LatErr:%2.4fm LonErr:%2.4fm", getLatLonError().getX(), getLatLonError().getY()); + else printf(" %.16f %.16f", getLatLonError().getX(), getLatLonError().getY()); + } + + if (haveHDOP()) + { + if (labels) printf(" HDOP:%2.4f", getHDOP()); + else printf(" %2.6f", getHDOP()); + } + else + { + if(labels) printf(" HDOP:-"); + else printf(" ?"); + } + + if (haveVDOP()) + { + if (labels) printf(" VDOP:%2.4f", getVDOP()); + else printf(" %2.6f", getVDOP()); + } + else + { + if(labels) printf(" VDOP:-"); + else printf(" ?"); + } + + if (havePDOP()) + { + if (labels) printf(" PDOP:%2.4f", getPDOP()); + else printf(" %2.6f", getPDOP()); + } + else + { + if(labels) printf(" PDOP:-"); + else printf(" ?"); + } + + if(labels) printf(" Fix:%-10s", getFixTypeName()); + else printf(" %-10s", getFixTypeName()); + + if(labels) printf(" (%lu:%lu)", getGPSPositionTimestamp().getSec(), getGPSPositionTimestamp().getMSec()); + else printf(" %lu:%lu", getGPSPositionTimestamp().getSec(), getGPSPositionTimestamp().getMSec()); +} + + +double ArGPS::gpsDegminToDegrees(double degmin) +{ + double degrees; + double minutes = modf(degmin / (double)100.0, °rees) * (double)100.0; + return degrees + (minutes / (double)60.0); +} + + +double ArGPS::knotsToMPS(double knots) +{ + return(knots * (double)0.514444444); +} + + +bool ArGPS::readFloatFromString(const std::string& str, double* target, double (*convf)(double)) const +{ + if (str.length() == 0) return false; + if (convf) + *target = (*convf)(atof(str.c_str())); + else + *target = atof(str.c_str()); + return true; +} + +bool ArGPS::readUShortFromString(const std::string& str, unsigned short* target, unsigned short (*convf)(unsigned short)) const +{ + if (str.length() == 0) return false; + if (convf) + *target = (*convf)((unsigned short)atoi(str.c_str())); + else + *target = (unsigned short) atoi(str.c_str()); + return true; +} + + +bool ArGPS::readFloatFromStringVec(const std::vector* vec, size_t i, double* target, double (*convf)(double)) const +{ + if (vec->size() < (i+1)) return false; + return readFloatFromString((*vec)[i], target, convf); +} + +bool ArGPS::readUShortFromStringVec(const std::vector* vec, size_t i, unsigned short* target, unsigned short (*convf)(unsigned short)) const +{ + if (vec->size() < (i+1)) return false; + return readUShortFromString((*vec)[i], target, convf); +} + +bool ArGPS::readTimeFromString(const std::string& s, ArTime* time) const +{ + std::string::size_type dotpos = s.find('.'); + time_t timeSec = atoi(s.substr(0, dotpos).c_str()); + time_t timeMSec = 0; + if(dotpos != std::string::npos) + timeMSec = atoi(s.substr(dotpos+1).c_str()) * 100; + time->setSec(timeSec); + time->setMSec(timeMSec); + return true; +} + +void ArGPS::handleGPGSV(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + if(message->size() < 8) return; + unsigned short numMsgs; + unsigned short thisMsg; + if(!readUShortFromStringVec(message, 1, &numMsgs)) return; + if(!readUShortFromStringVec(message, 2, &thisMsg)) return; + for(unsigned short offset = 0; (ArNMEAParser::MessageVector::size_type)(offset + 7) < message->size(); offset+=4) // should be less than 5 sets of data per message though + { + unsigned short snr = 0; + if((*message)[7+offset].length() == 0) continue; // no SNR for this satellite. + if(!readUShortFromStringVec(message, offset+7, &snr)) break; // no more data avail. + mySNRSum += snr; + ++mySNRNum; + } + if(thisMsg == numMsgs) // last message in set + { + myData.meanSNR = (double)mySNRSum / (double)mySNRNum; + myData.haveSNR = true; + mySNRSum = 0; + mySNRNum = 0; + } +} + +void ArGPS::handleGPMSS(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + if(message->size() < 5) return; + if(!readFloatFromStringVec(message, 1, &(myData.beaconSignalStrength))) return; + if(!readFloatFromStringVec(message, 2, &(myData.beaconSNR))) return; + if(!readFloatFromStringVec(message, 3, &(myData.beaconFreq))) return; + if(!readUShortFromStringVec(message, 4, &(myData.beaconBPS))) return; + if(!readUShortFromStringVec(message, 5, &(myData.beaconChannel))) return; + myData.haveBeaconInfo = true; +} + +void ArGPS::handleGPGST(ArNMEAParser::Message msg) +{ + ArNMEAParser::MessageVector *message = msg.message; + // vector is: + // 0, 1, 2, 3, 4, 5, 6, 7, 8 + // "GPGST", time, inputsRMS, ellipse major, ellipse minor, ellipse orient, lat err, lon err, alt err +#ifdef DEBUG_ARGPS + printf("XXX GPGST size=%d\n", message->size()); +#endif + if(message->size() < 3) return; + myData.haveInputsRMS = readFloatFromStringVec(message, 2, &(myData.inputsRMS)); + if(message->size() < 6) return; +#ifdef DEBUG_ARGPS + printf("XXX GPGST inputsRMS=%s, ellipseMajor=%s, ellipseMinor=%s, ellipseOrient=%s\n", + (*message)[2], (*message)[3].c_str(), (*message)[4].c_str(), (*message)[5].c_str()); +#endif + double major, minor, orient; + myData.haveErrorEllipse = ( + readFloatFromStringVec(message, 3, &major) + && + readFloatFromStringVec(message, 4, &minor) + && + readFloatFromStringVec(message, 5, &orient) + ); + if(myData.haveErrorEllipse) myData.errorEllipse.setPose(minor, major, orient); + else myData.errorEllipse.setPose(0,0,0); + if(message->size() < 7) return; +#ifdef DEBUG_ARGPS + printf("XXX GPGST latErr=%s, lonErr=%s\n", + (*message)[6].c_str(), (*message)[7].c_str()); +#endif + double lat, lon; + myData.haveLatLonError = ( + readFloatFromStringVec(message, 6, &lat) + && + readFloatFromStringVec(message, 7, &lon) + ); +//printf("XXX GPGST haveLLE=%d, latErr=%f, lonErr=%f\n", myData.haveLatLonError, lat, lon); + if(myData.haveLatLonError) myData.latLonError.setPose(lat, lon); + else myData.latLonError.setPose(0,0,0); +//printf("XXX GPGST lle.getX=%f, lle.getY=%f\n", myData.latLonError.getX(), myData.latLonError.getY()); + if(message->size() < 9) return; +#ifdef DEBUG_ARGPS + printf("XXX GPGST altErr=%s", (*message)[8].c_str()); +#endif + myData.haveAltitudeError = readFloatFromStringVec(message, 8, &(myData.altitudeError)); +} + +AREXPORT ArSimulatedGPS::ArSimulatedGPS(ArRobot *robot) : + ArGPS(), myHaveDummyPosition(false), mySimStatHandlerCB(this, &ArSimulatedGPS::handleSimStatPacket), + myRobot(robot) + { + myData.havePosition = false; + myData.fixType = NoFix; // need to set a position with setDummyPosition() or get data from MobileSim to get a (simulated) fix + } + +AREXPORT void ArSimulatedGPS::setDummyPosition(ArArgumentBuilder *args) +{ +printf("%s | 0=%f | 1=%f | 2=%f\n", args->getFullString(), +args->getArgDouble(0), args->getArgDouble(1), args->getArgDouble(2)); + double lat = 0; + double lon = 0; + double alt = 0; + bool haveArg = false; + lat = args->getArgDouble(0, &haveArg); + if(!haveArg) { + ArLog::log(ArLog::Terse, "ArSimulatedGPS: Can't set dummy position: No valid double precision numeric value given as first argument for latitude."); + return; + } + lon = args->getArgDouble(1, &haveArg); + if(!haveArg) { + ArLog::log(ArLog::Terse, "ArSimulatedGPS: Can't set dummy position: No valid double precision numeric value given as second argument for longitude."); + return; + } + alt = args->getArgDouble(2, &haveArg); + if(haveArg) { + ArLog::log(ArLog::Normal, "ArSimulatedGPS: Setting dummy position %f, %f, %f", lat, lon, alt); + setDummyPosition(lat, lon, alt); + } else { + ArLog::log(ArLog::Normal, "ArSimulatedGPS: Setting dummy position %f, %f", lat, lon); + setDummyPosition(lat, lon); + } +} + +bool ArSimulatedGPS::handleSimStatPacket(ArRobotPacket *pkt) +{ + if(pkt->getID() != 0x62) return false; + char c = pkt->bufToByte(); // skip + c = pkt->bufToByte(); // skip + ArTypes::UByte4 flags = pkt->bufToUByte4(); + if(flags&ArUtil::BIT1) // bit 1 is set if map has OriginLLA georeference point, and this packet will contain latitude and longitude. + { + myData.timeGotPosition.setToNow(); + myData.fixType = SimulatedFix; + myData.HDOP = myData.VDOP = myData.PDOP = 1.0; + myData.haveHDOP = myData.haveVDOP = myData.havePDOP = true; + //myData.numSatellitesTracked = 6; + myData.numSatellitesTracked = 0; + int x = pkt->bufToUByte2(); // skip simint + x = pkt->bufToUByte2(); // skip realint + x = pkt->bufToUByte2(); // skip lastint + x = pkt->bufToByte4(); // skip truex + x = pkt->bufToByte4(); // skip truey + x = pkt->bufToByte4(); // skip truez + x = pkt->bufToByte4(); // skip trueth + // TODO check if packet is still long enough to contain latitude and longitude. + myData.havePosition = true; + myData.latitude = pkt->bufToByte4() / 10e6; + myData.longitude = pkt->bufToByte4() / 10e6; + myData.GPSPositionTimestamp.setToNow(); + // TODO check if packet is still long enough to contain altitude + myData.haveAltitude = true; + myData.altitude = pkt->bufToByte4() / 100.0; + } + else + { + if(myData.havePosition && !myHaveDummyPosition) + clearPosition(); + } + return true; +} + +AREXPORT ArSimulatedGPS::~ArSimulatedGPS() +{ + if(myRobot) + myRobot->remPacketHandler(&mySimStatHandlerCB); +} + +bool ArSimulatedGPS::connect(unsigned long connectTimeout) +{ + /* + std::list *robots = Aria::getRobotList(); + std::list::const_iterator first = robots->begin(); + if(first != robots->end()) + myRobot = *(first); + */ + if(myRobot) + { + myRobot->addPacketHandler(&mySimStatHandlerCB); + ArLog::log(ArLog::Normal, "ArSimulatedGPS: Will receive data from the simulated robot."); + myRobot->comInt(ArCommands::SIM_STAT, 2); + } + else + { + ArLog::log(ArLog::Normal, "ArSimulatedGPS: Can't receive data from a simulated robot; dummy position must be set manually instead"); + } + return true; +} diff --git a/Legacy/Aria/src/ArGPSConnector.cpp b/Legacy/Aria/src/ArGPSConnector.cpp new file mode 100644 index 0000000..15ff2c4 --- /dev/null +++ b/Legacy/Aria/src/ArGPSConnector.cpp @@ -0,0 +1,231 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArGPSConnector.h" +#include "ArGPS.h" +#include "ArDeviceConnection.h" +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" +#include "ArRobot.h" +#include "ariaInternal.h" + +#include "ArNovatelGPS.h" +#include "ArTrimbleGPS.h" + +#include + + +// default values to use if no value is given in robot parameters or command +// line: +const int ARGPS_DEFAULT_SERIAL_BAUD = 9600; +const char* const ARGPS_DEFAULT_SERIAL_PORT = ArUtil::COM2; +const int ARGPS_DEFAULT_REMOTE_TCP_PORT = 8103; + +AREXPORT ArGPSConnector::ArGPSConnector(ArArgumentParser *argParser) : + myDeviceCon(NULL), + myArgParser(argParser), + myParseArgsCallback(this, &ArGPSConnector::parseArgs), + myLogArgsCallback(this, &ArGPSConnector::logOptions), + myBaud(-1), + myPort(NULL), + myTCPHost(NULL), + myTCPPort(8103), + myDeviceType(Invalid) +{ + myParseArgsCallback.setName("ArGPSConnector"); + myLogArgsCallback.setName("ArGPSConnector"); + Aria::addParseArgsCB(&myParseArgsCallback); + Aria::addLogOptionsCB(&myLogArgsCallback); +} + + +AREXPORT ArGPSConnector::~ArGPSConnector() +{ + if(myDeviceCon) delete myDeviceCon; +} + +// Called by Aria::parseArgs() to set parameter values from command line +// options, if present +AREXPORT bool ArGPSConnector::parseArgs() +{ + if (!myArgParser) return false; + if (!myArgParser->checkParameterArgumentString("-gpsPort", &myPort)) return false; + if (!myArgParser->checkParameterArgumentInteger("-gpsBaud", &myBaud)) return false; + if (!myArgParser->checkParameterArgumentString("-remoteGpsTcpHost", &myTCPHost)) return false; + if (!myArgParser->checkParameterArgumentInteger("-remoteGpsTcpPort", &myTCPPort)) return false; + char *deviceType = myArgParser->checkParameterArgument("-gpsType"); + if (deviceType) // if -gpsType was given + myDeviceType = deviceTypeFromString(deviceType); + return true; +} + +ArGPSConnector::GPSType ArGPSConnector::deviceTypeFromString(const char *str) +{ + if (strcasecmp(str, "novatel") == 0) + { + return Novatel; + } + else if (strcasecmp(str, "trimble") == 0) + { + return Trimble; + } + else if (strcasecmp(str, "standard") == 0) + { + return Standard; + } + else if (strcasecmp(str, "novatelspan") == 0) + { + return NovatelSPAN; + } + else if (strcasecmp(str, "sim") == 0) + { + return Simulator; + } + else + { + ArLog::log(ArLog::Terse, "GPSConnector: Error: unrecognized GPS type."); + return Invalid; + } +} + +void ArGPSConnector::logOptions() +{ + ArLog::log(ArLog::Terse, "GPS options:"); + ArLog::log(ArLog::Terse, "-gpsType \tSelect GPS device type (default: standard)"); + ArLog::log(ArLog::Terse, "-gpsPort \tUse the given serial port (default: %s)", ARGPS_DEFAULT_SERIAL_PORT); + ArLog::log(ArLog::Terse, "-gpsBaud \tUse the given serial Baud rate (default: %d)", ARGPS_DEFAULT_SERIAL_BAUD); + ArLog::log(ArLog::Terse, "-remoteGpsTcpHost \tUse a TCP connection instead of serial, and connect to remote host "); + ArLog::log(ArLog::Terse, "-remoteGpsTcpPort \tUse the given port number for TCP connection, if using TCP. (default %d)", ARGPS_DEFAULT_REMOTE_TCP_PORT); +} + + + +// Create an ArGPS object. If some options were obtained from command-line +// parameters by parseArgs(), use those, otherwise get values from robot +// parameters (the .p file) if we have a valid robot with valid parameters. +AREXPORT ArGPS* ArGPSConnector::createGPS(ArRobot *robot) +{ + // If we have a robot with parameters (i.e. have connected and read the .p + // file), use those values unless already set by parseArgs() from command-line + if(robot && robot->getRobotParams()) + { + if(myPort == NULL) { + myPort = robot->getRobotParams()->getGPSPort(); + if(strcmp(myPort, "COM1") == 0) + myPort = ArUtil::COM1; + if(strcmp(myPort, "COM2") == 0) + myPort = ArUtil::COM2; + if(strcmp(myPort, "COM3") == 0) + myPort = ArUtil::COM3; + if(strcmp(myPort, "COM4") == 0) + myPort = ArUtil::COM4; + } + if(myBaud == -1) { + myBaud = robot->getRobotParams()->getGPSBaud(); + } + if(myDeviceType == Invalid) { + myDeviceType = deviceTypeFromString(robot->getRobotParams()->getGPSType()); + } + } + else + { + if(myPort == NULL) myPort = ARGPS_DEFAULT_SERIAL_PORT; + if(myBaud == -1) myBaud = ARGPS_DEFAULT_SERIAL_BAUD; + if(myDeviceType == Invalid) myDeviceType = Standard; + } + + // If simulator, create simulated GPS and return + if(robot && strcmp(robot->getRobotName(), "MobileSim") == 0) + { + ArLog::log(ArLog::Normal, "ArGPSConnector: Using simulated GPS"); + myDeviceType = Simulator; + return new ArSimulatedGPS(robot); + } + + // Create gps and connect to serial port or tcp port for device data stream: + ArGPS* newGPS = NULL; + switch (myDeviceType) + { + case Novatel: + ArLog::log(ArLog::Normal, "ArGPSConnector: Using Novatel GPS"); + newGPS = new ArNovatelGPS; + break; + case Trimble: + ArLog::log(ArLog::Normal, "ArGPSConnector: Using Trimble GPS"); + newGPS = new ArTrimbleGPS; + break; + case NovatelSPAN: + ArLog::log(ArLog::Normal, "ArGPSConnector: Using Novatel SPAN GPS"); + newGPS = new ArNovatelSPAN; + break; + case Simulator: + ArLog::log(ArLog::Normal, "ArGPSConnector: Using simulated GPS"); + newGPS = new ArSimulatedGPS(robot); + break; + default: + ArLog::log(ArLog::Normal, "ArGPSConnector: Using standard NMEA GPS"); + newGPS = new ArGPS; + break; + } + + if(myDeviceType != Simulator) + { + if (myTCPHost == NULL) + { + // Setup serial connection + ArSerialConnection *serialCon = new ArSerialConnection; + ArLog::log(ArLog::Normal, "ArGPSConnector: Connecting to GPS on port %s at %d baud...", myPort, myBaud); + if (!serialCon->setBaud(myBaud)) { delete serialCon; return false; } + if (serialCon->open(myPort) != 0) { + ArLog::log(ArLog::Terse, "ArGPSConnector: Error: could not open GPS serial port %s.", myPort); + delete serialCon; + return NULL; + } + newGPS->setDeviceConnection(serialCon); + myDeviceCon = serialCon; + } + else + { + // Setup TCP connection + ArTcpConnection *tcpCon = new ArTcpConnection; + ArLog::log(ArLog::Normal, "ArGPSConnector: Opening TCP connection to %s:%d...", myTCPHost, myTCPPort); + int openState = tcpCon->open(myTCPHost, myTCPPort); + if (openState != 0) { + ArLog::log(ArLog::Terse, "ArGPSConnector: Error: could not open TCP connection to %s port %d: %s", tcpCon->getOpenMessage(openState)); + delete tcpCon; + return NULL; + } + newGPS->setDeviceConnection(tcpCon); + myDeviceCon = tcpCon; + } + } + + return newGPS; +} + + diff --git a/Legacy/Aria/src/ArGPSCoords.cpp b/Legacy/Aria/src/ArGPSCoords.cpp new file mode 100644 index 0000000..57164b3 --- /dev/null +++ b/Legacy/Aria/src/ArGPSCoords.cpp @@ -0,0 +1,317 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ariaUtil.h" +#include "ArLog.h" +#include "ArGPSCoords.h" + +#include + +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::mya = 6378137; // meters +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myb = 6356752.3142; // meters +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myep = 8.2094437949696e-2; +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myc = 299792458; // m/sec +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::mye = 8.1819190842622e-2; +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::my1byf = 298.257223563; +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myOmega = 7292115e-11; // rad/sec +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myGM = 3986004.418e8; // m^3/sec^2 +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myg = 9.7976432222; // m/sec^2. Ave g. +AREXPORT ARGPSCOORDS_CONSTANT double ArWGS84::myM = 5.9733328e24; // kg. Mass of earth. + + + +AREXPORT void Ar3DPoint::print(const char *head) +{ + char buffer[2064]; + if(head != NULL) + sprintf(buffer, "%s ", head); + sprintf(buffer, "%s %f %f %f\n", buffer, myX, myY, myZ); + ArLog::log(ArLog::Normal, buffer); +} + +/*! + * Converts Earth Centered Earth Fixed coordinates into Latitude Longitude + * Altitude coordinates. + * + */ +AREXPORT ArLLACoords +ArECEFCoords::ECEF2LLA(void) +{ + // ECEF2LLA - convert earth-centered earth-fixed (ECEF) + // cartesian coordinates to latitude, longitude, + // and altitude + // + // USAGE: + // [lat,lon,alt] = ecef2lla(x,y,z) + // + // lat = geodetic latitude (radians) + // lon = longitude (radians) + // alt = height above WGS84 ellipsoid (m) + // x = ECEF X-coordinate (m) + // y = ECEF Y-coordinate (m) + // z = ECEF Z-coordinate (m) + double x = myX;//(*this)(0); + double y = myY;//(*this)(1); + double z = myZ;//(*this)(2); + // + // Notes: (1) This function assumes the WGS84 model. + // (2) Latitude is customary geodetic (not geocentric). + // (3) Inputs may be scalars, vectors, or matrices of the same + // size and shape. Outputs will have that same size and shape. + // (4) Tested but no warranty; use at your own risk. + // (5) Michael Kleder, April 2006 + + // function [lat,lon,alt] = ecef2lla(x,y,z) + + // WGS84 ellipsoid constants: + const double a = ArWGS84::getA(); + const double e = ArWGS84::getE(); + const double b = ArWGS84::getB(); + const double ep = ArWGS84::getEP(); + // Calculations. + double p = sqrt(x*x + y*y); + double th = atan2(a*z, b*p); + double lon = atan2(y, x); + double lat = atan2((z + ep*ep*b*pow(sin(th), 3)), + (p - e*e*a*pow(cos(th), 3))); + double N = a / sqrt(1 - e*e*pow(sin(lat), 2)); + double alt = p / cos(lat) - N; + + // return lon in range [0,2*pi) + if(lon < -M_PI) + lon += 2*M_PI; + + lat *= 180.0/M_PI; + lon *= 180.0/M_PI; + // correct for numerical instability in altitude near exact poles: + // (after this correction, error is about 2 millimeters, which isabout + // the same as the numerical precision of the overall function) + if(fabs(x) < 1 && fabs(y) < 1) + alt = -b; + + return ArLLACoords(lat, lon, alt); +} +/*! + * Converts Earth Centered Earth Fixed coordinates into the tangential + * East North Up coordinates with ref being the origin. + * + * @param ref: The ECEF coords of the origin. + * + */ +AREXPORT ArENUCoords +ArECEFCoords::ECEF2ENU(ArECEFCoords ref) +{ + // function [e,n,u] = xyz2enuTest(Xr, Yr, Zr, X, Y, Z) + + double Xr = ref.myX;//ref(0); + double Yr = ref.myY;//ref(1); + double Zr = ref.myZ;//ref(2); + double dx = myX - Xr;//(*this)(0) - Xr; + double dy = myY - Yr;//(*this)(1) - Yr; + double dz = myZ - Zr;//(*this)(2) - Zr; + + // convert ECEF coordinates to local east, north, up + + double phiP = atan2(Zr, sqrt(Xr*Xr + Yr*Yr)); + + double lambda = atan2(Yr, Xr); + + double e = -sin(lambda)*(dx) + cos(lambda)*(dy); + + double n = (-sin(phiP)*cos(lambda)*(dx) - + sin(phiP)*sin(lambda)*(dy) + cos(phiP)*(dz)); + + double u = (cos(phiP)*cos(lambda)*(dx) + + cos(phiP)*sin(lambda)*(dy) + sin(phiP)*(dz)); + + // Return in mm. + return ArENUCoords(e*1000.0, n*1000.0, u*1000.0); +} +/*! + * Converts Latitude Longitude Altitude coordinates into Earth Centered + * Earth Fixed coordinates. + * + */ +AREXPORT ArECEFCoords +ArLLACoords::LLA2ECEF(void) +{ + // LLA2ECEF - convert latitude, longitude, and altitude to + // earth-centered, earth-fixed (ECEF) cartesian + // + // USAGE: + // [x,y,z] = lla2ecef(lat,lon,alt) + // + // x = ECEF X-coordinate (m) + // y = ECEF Y-coordinate (m) + // z = ECEF Z-coordinate (m) + // lat = geodetic latitude (radians) + // lon = longitude (radians) + // alt = height above WGS84 ellipsoid (m) + double lat = myX*M_PI/180.0;//(*this)(0)*M_PI/180.0; + double lon = myY*M_PI/180.0;//(*this)(1)*M_PI/180.0; + double alt = myZ;//(*this)(2); + // + // Notes: This function assumes the WGS84 model. + // Latitude is customary geodetic (not geocentric). + // + // Source: "Department of Defense World Geodetic System 1984" + // Page 4-4 + // National Imagery and Mapping Agency + // Last updated June, 2004 + // NIMA TR8350.2 + // + // Michael Kleder, July 2005 + + //function [x,y,z]=lla2ecef(lat,lon,alt) + + // WGS84 ellipsoid constants: + const double a = ArWGS84::getA(); + const double e = ArWGS84::getE(); + + // intermediate calculation + // (prime vertical radius of curvature) + double N = a/ sqrt(1 - e*e * pow(sin(lat),2)); + + // results: + double x = (N + alt) * cos(lat) * cos(lon); + double y = (N + alt) * cos(lat) * sin(lon); + double z = ((1 - e*e) * N + alt) * sin(lat); + + return ArECEFCoords(x, y, z); +} +/*! + * Converts Tangential East North Up coordinates with ref as origin into + * Earth Centered Earth Fixed Coordinates. + * + * @param ref: The coordinates of the origin. + * + */ +AREXPORT ArECEFCoords +ArENUCoords::ENU2ECEF(ArLLACoords ref) +{ + + // function [X, Y, Z] = enu2xyz(refLat, refLong, refH, e, n, u) + + // Convert east, north, up coordinates (labelled e, n, u) to ECEF + + // coordinates. The reference point (phi, lambda, h) must be given. + // All distances are in metres + +// double refLat = ref(0)*M_PI/180.0; +// double refLon = ref(1)*M_PI/180.0; +// double refH = ref(2); + double refLon = ref.getY()*M_PI/180.0; + + ArECEFCoords refECEF = ref.LLA2ECEF(); + double Xr = refECEF.getX();//refECEF(0); + double Yr = refECEF.getY();//refECEF(1); + double Zr = refECEF.getZ();//refECEF(2); + + double phiP = atan2(Zr, sqrt(Xr*Xr + Yr*Yr)); // Geocentric latitude + + double e = myX/1000.0;//(*this)(0)/1000.0; + double n = myY/1000.0;//(*this)(1)/1000.0; + double u = myZ/1000.0;//(*this)(2)/1000.0; + + double X = (-sin(refLon)*e - cos(refLon)*sin(phiP)*n + + cos(refLon)*cos(phiP)*u + Xr); + + double Y = (cos(refLon)*e - sin(refLon)*sin(phiP)*n + + cos(phiP)*sin(refLon)*u + Yr); + + double Z = cos(phiP)*n + sin(phiP)*u + Zr; + + return ArECEFCoords(X, Y, Z); +} + +/*! + * Actual function which does the conversion from LLA to Map Coords. + * + * @param lat: Latitude coords. + * @param lon: Longitude coords. + * @param alt: Altitude coords. + * @param ea: East coords. + * @param no: North coords. + * @param up: Up coords. + * + * @return true if conversion is possible else false. + * + */ +AREXPORT bool +ArMapGPSCoords::convertLLA2MapCoords(const double lat, const double lon, const double alt, + double& ea, double& no, double& up) const +{ + if(!myOriginSet) + return false; + + ArLLACoords lla(lat, lon, alt); + ArECEFCoords ecef = lla.LLA2ECEF(); + ArENUCoords enu = ecef.ECEF2ENU(*myOriginECEF); +// ArLog::log(ArLog::Normal, "GPSLocaLog: convertLLA2MapCoords: ENU %g %g %g", +// enu.getX(), enu.getY(), enu.getZ()); + ea = enu.getX();//enu(0); + no = enu.getY();//enu(1); + up = enu.getZ();//enu(2); +// ArLog::log(ArLog::Normal, +// "GPSLocaLog: convertLLA2MapCoords: ENU + offset %g %g %g", +// ea, no, up); + return true; +} +/*! + * Actual function which does the conversion from ENU coords to LLA coords. + * + * @param ea: East coords. + * @param no: North coords. + * @param up: Up coords. + * @param lat: Latitude coords. + * @param lon: Longitude coords. + * @param alt: Altitude coords. + * + * @return true if conversion is possible else false. + */ +AREXPORT bool +ArMapGPSCoords::convertMap2LLACoords(const double ea, const double no, const double up, + double& lat, double& lon, double& alt) const +{ + if(!myOriginSet) + return false; + + ArENUCoords enu(ea, no, alt); + ArECEFCoords ecef = enu.ENU2ECEF(*myOriginLLA); + ArLLACoords lla = ecef.ECEF2LLA(); + +// ArLog::log(ArLog::Normal, "GPSLocaLog: convertMap2LLACoords: ENU %g %g %g", +// enu.getX(), enu.getY(), enu.getZ()); + lat = lla.getX();//lla(0); + lon = lla.getY();//lla(1); + alt = lla.getZ();//lla(2); + +// ArLog::log(ArLog::Normal, "GPSLocaLog: convertMap2LLACoords: %g %g %g", +// lat, lon, alt); + return true; +} diff --git a/Legacy/Aria/src/ArGripper.cpp b/Legacy/Aria/src/ArGripper.cpp new file mode 100644 index 0000000..8c88519 --- /dev/null +++ b/Legacy/Aria/src/ArGripper.cpp @@ -0,0 +1,544 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArGripper.h" +#include "ArCommands.h" + +/** + @param robot The robot this gripper is attached to + @param gripperType How to communicate with the gripper: see ArGripper::Type. + The default, QUERYTYPE, will work with most robot configurations with + a recent firmware version. +*/ +AREXPORT ArGripper::ArGripper(ArRobot *robot, int gripperType) : + myConnectCB(this, &ArGripper::connectHandler), + myPacketHandlerCB(this, &ArGripper::packetHandler) +{ + myRobot = robot; + myType = gripperType; + if (myRobot != NULL) + { + myRobot->addPacketHandler(&myPacketHandlerCB, ArListPos::FIRST); + myRobot->addConnectCB(&myConnectCB, ArListPos::LAST); + if (myRobot->isConnected() && (myType == GRIPPAC || myType == QUERYTYPE)) + myRobot->comInt(ArCommands::GRIPPERPACREQUEST, 2); + } + myLastDataTime.setToNow(); +} + +AREXPORT ArGripper::~ArGripper() +{ +} + +AREXPORT void ArGripper::connectHandler(void) +{ + if (myRobot != NULL && (myType == GRIPPAC || myType == QUERYTYPE)) + myRobot->comInt(ArCommands::GRIPPERPACREQUEST, 2); +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripOpen(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::GRIP_OPEN); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripClose(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::GRIP_CLOSE); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripStop(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::GRIP_STOP); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::liftUp(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::LIFT_UP); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::liftDown(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::LIFT_DOWN); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::liftStop(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::LIFT_STOP); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripperStore(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::GRIPPER_STORE); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripperDeploy(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::GRIPPER_DEPLOY); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripperHalt(void) +{ + if (myRobot != NULL) + return myRobot->comInt(ArCommands::GRIPPER, + ArGripperCommands::GRIPPER_HALT); + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::gripPressure(int mSecIntervals) +{ + if (myRobot == NULL) + return false; + + if (myRobot->comInt(ArCommands::GRIPPER, ArGripperCommands::GRIP_PRESSURE) && + myRobot->comInt(ArCommands::GRIPPERVAL, mSecIntervals)) + return true; + else + return false; +} + +/** + @return whether the command was sent to the robot or not +*/ +AREXPORT bool ArGripper::liftCarry(int mSecIntervals) +{ + if (myRobot == NULL) + return false; + + if (myRobot->comInt(ArCommands::GRIPPER, ArGripperCommands::LIFT_CARRY) && + myRobot->comInt(ArCommands::GRIPPERVAL, mSecIntervals)) + return true; + else + return false; +} + +/** + @return true if the gripper paddles are moving +*/ +AREXPORT bool ArGripper::isGripMoving(void) const +{ + int d; + + if (myType == NOGRIPPER || myType == QUERYTYPE || myRobot == NULL) + { + return false; + } + else if (myType == GENIO || myType == GRIPPAC || myType == USERIO) + { + if (myType == GENIO || myType == USERIO) + d = myRobot->getAnalogPortSelected() >> 8; + else + d = mySwitches; + + if (myType == USERIO && (d & ArUtil::BIT2)) // moving + return true; + else if (myType != USERIO && (d & ArUtil::BIT7)) // moving + return true; + else // not moving + return false; + } + else + { + ArLog::log(ArLog::Terse, "ArGripper::isGripMoving: Gripper type unknown."); + return false; + } +} + +/** + @return true if the lift is moving +*/ +AREXPORT bool ArGripper::isLiftMoving(void) const +{ + int d; + + if (myType == NOGRIPPER || myType == QUERYTYPE || myRobot == NULL) + { + return false; + } + else if (myType == GENIO || myType == GRIPPAC || myType == USERIO) + { + if (myType == GENIO || myType == USERIO) + d = myRobot->getAnalogPortSelected() >> 8; + else + d = mySwitches; + + if (d & ArUtil::BIT6) // moving + return true; + else // not moving + return false; + } + else + { + ArLog::log(ArLog::Terse, "ArGripper::isLiftMoving: Gripper type unknown."); + return false; + } + +} + +/** + @return 0 if no gripper paddles are triggered, 1 if the left paddle + is triggered, 2 if the right paddle is triggered, 3 if both are + triggered +**/ +AREXPORT int ArGripper::getPaddleState(void) const +{ + int d; + int ret = 0; + + if (myType == NOGRIPPER || myType == QUERYTYPE || myRobot == NULL) + { + return 0; + } + else if (myType == GENIO || myType == GRIPPAC || myType == USERIO) + { + if (myType == GENIO) + d = myRobot->getAnalogPortSelected() >> 8; + else if (myType == USERIO) + d = myRobot->getDigIn(); + else + d = mySwitches; + + if (!(d & ArUtil::BIT4)) + ret += 1; + if (!(d & ArUtil::BIT5)) + ret += 2; + return ret; + } + else + { + ArLog::log(ArLog::Terse, "ArGripper::getPaddleState: Gripper type unknown."); + return 0; + } +} +/** + @return 0 if gripper paddles between open and closed, 1 if gripper paddles + are open, 2 if gripper paddles are closed +*/ +AREXPORT int ArGripper::getGripState(void) const +{ + int d; + + if (myType == NOGRIPPER || myType == QUERYTYPE || myRobot == NULL) + { + return 0; + } + else if (myType == GENIO || myType == GRIPPAC || myType == USERIO) + { + if (myType == GENIO) + d = myRobot->getAnalogPortSelected() >> 8; + else if (myType == USERIO) + d = myRobot->getDigIn(); + else + d = mySwitches; + + if (!(d & ArUtil::BIT4) && !(d & ArUtil::BIT5)) // both + return 2; + else if (!(d & ArUtil::BIT0)) // inner + return 1; + else // between + return 0; + } + else + { + ArLog::log(ArLog::Terse, "ArGripper::getGripState: Gripper type unknown."); + return 0; + } + +} + +/** + @return 0 if no breakbeams broken, 1 if inner breakbeam broken, 2 if + outter breakbeam broken, 3 if both breakbeams broken +*/ +AREXPORT int ArGripper::getBreakBeamState(void) const +{ + int d; + + if (myType == NOGRIPPER || myType == QUERYTYPE || myRobot == NULL) + { + return 0; + } + else if (myType == GENIO || myType == GRIPPAC || myType == USERIO) + { + if (myType == GENIO) + d = myRobot->getAnalogPortSelected() >> 8; + else if (myType == USERIO) + d = myRobot->getDigIn(); + else + d = mySwitches; + + if ((d & ArUtil::BIT2) && (d & ArUtil::BIT3)) // both + return 3; + else if (d & ArUtil::BIT3) // inner + return 1; + else if (d & ArUtil::BIT2) // outter + return 2; + else // neither + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "ArGripper::getBreakBeamState: Gripper type unknown."); + return 0; + } +} + +/** + @return false if lift is between up and down, true is either all the + way up or down +*/ +AREXPORT bool ArGripper::isLiftMaxed(void) const +{ + int d = 0; + + if (myType == NOGRIPPER || myType == QUERYTYPE || myRobot == NULL) + { + return false; + } + else if (myType == GENIO || myType == GRIPPAC || myType == USERIO) + { + if (myType == GENIO) + d = myRobot->getAnalogPortSelected() >> 8; + else if (myType == USERIO) + d = myRobot->getDigIn(); + else + d = mySwitches; + if (!(d & ArUtil::BIT1)) + return true; + else + return false; + } + else + { + ArLog::log(ArLog::Terse, "ArGripper::getLiftState: Gripper type unknown."); + return false; + } +} + + +AREXPORT void ArGripper::logState(void) const +{ + char paddleBuf[128]; + char liftBuf[128]; + char breakBeamBuf[128]; + char buf[1024]; + int state; + + if (myType == NOGRIPPER) + { + ArLog::log(ArLog::Terse, "There is no gripper."); + return; + } + if (myType == QUERYTYPE) + { + ArLog::log(ArLog::Terse, "Querying gripper type."); + return; + } + + if (isLiftMaxed()) + sprintf(liftBuf, "maxed"); + else + sprintf(liftBuf, "between"); + + if (isLiftMoving()) + strcat(liftBuf, "_moving"); + + state = getGripState(); + if (state == 1) + sprintf(paddleBuf, "open"); + else if (state == 2) + sprintf(paddleBuf, "closed"); + else + sprintf(paddleBuf, "between"); + + if (isGripMoving()) + strcat(paddleBuf, "_moving"); + + state = getBreakBeamState(); + if (state == 0) + sprintf(breakBeamBuf, "none"); + else if (state == 1) + sprintf(breakBeamBuf, "inner"); + else if (state == 2) + sprintf(breakBeamBuf, "outter"); + else if (state == 3) + sprintf(breakBeamBuf, "both"); + + sprintf(buf, "Lift: %15s Grip: %15s BreakBeam: %10s", liftBuf, paddleBuf, + breakBeamBuf); + if (myType == GRIPPAC) + sprintf(buf, "%s TimeSince: %ld", buf, getMSecSinceLastPacket()); + ArLog::log(ArLog::Terse, buf); + +} + +AREXPORT bool ArGripper::packetHandler(ArRobotPacket *packet) +{ + int type; + + if (packet->getID() != 0xE0) + return false; + + myLastDataTime.setToNow(); + type = packet->bufToUByte(); + mySwitches = packet->bufToUByte(); + myGraspTime = packet->bufToUByte(); + + if (myType == QUERYTYPE) + { + if (type == 2) + { + ArLog::log(ArLog::Normal, + "Gripper: querried, using General IO."); + myType = GENIO; + } + else if (type == 1) + { + ArLog::log(ArLog::Normal, + "Gripper: querried, using User IO."); + myType = USERIO; + } + else + { + ArLog::log(ArLog::Normal, + "Gripper: querried, the robot has no gripper."); + myType = NOGRIPPER; + } + if (myRobot != NULL) + myRobot->comInt(ArCommands::GRIPPERPACREQUEST, 0); + return true; + } + if (myRobot != NULL && myType != GRIPPAC) + { + ArLog::log(ArLog::Verbose, + "Gripper: got another gripper packet after stop requested."); + myRobot->comInt(ArCommands::GRIPPERPACREQUEST, 0); + } + return true; +} + +/** + @return the gripper type + @see Type +*/ +AREXPORT int ArGripper::getType(void) const +{ + return myType; +} + +/** + @param type the type of gripper to set it to +*/ +AREXPORT void ArGripper::setType(int type) +{ + myType = type; + if (myRobot != NULL && (myType == GRIPPAC || myType == QUERYTYPE)) + myRobot->comInt(ArCommands::GRIPPERPACREQUEST, 2); +} + +/** + @return the number of milliseconds since the last packet +*/ +AREXPORT long ArGripper::getMSecSinceLastPacket(void) const +{ + return myLastDataTime.mSecSince(); +} + +/** + If you are using this as anything other than GRIPPAC and you want to + find out the grasp time again, just do a setType with QUERYTYPE and + it will query the robot again and get the grasp time from the robot. + @return the number of 20 MSec intervals the gripper will continue grasping + for after both paddles are triggered +*/ +AREXPORT int ArGripper::getGraspTime(void) const +{ + return myGraspTime; +} diff --git a/Legacy/Aria/src/ArIRs.cpp b/Legacy/Aria/src/ArIRs.cpp new file mode 100644 index 0000000..a86da05 --- /dev/null +++ b/Legacy/Aria/src/ArIRs.cpp @@ -0,0 +1,169 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobot.h" +#include "ariaUtil.h" +#include "ArIRs.h" + + /** + @param currentBufferSize The number of readings to store in the current Buffer + @param cumulativeBufferSize The number of readings in the cumulative buffer (This currently is not being used) + @param name The name of this range device + @param maxSecondsToKeepCurrent How long to keep readings in the current buffer +*/ + +AREXPORT ArIRs::ArIRs(size_t currentBufferSize, size_t cumulativeBufferSize, + const char *name, int maxSecondsToKeepCurrent) : + ArRangeDevice(currentBufferSize, cumulativeBufferSize, name, 5000, maxSecondsToKeepCurrent), + myProcessCB(this, &ArIRs::processReadings) +{ + setCurrentDrawingData(new ArDrawingData("polyArrows", ArColor(255, 255, 0), + 120, // mm diameter of dots + 80), // layer above sick and sonar below bumpers + true); +} + +AREXPORT ArIRs::~ArIRs() +{ + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&myProcessCB); + myRobot->remRangeDevice(this); + } +} + +AREXPORT void ArIRs::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask(myName.c_str(), 10, &myProcessCB); + ArRangeDevice::setRobot(robot); + + const ArRobotParams *params; + params = myRobot->getRobotParams(); + myParams = *params; + + for(int i = 0; i < myParams.getNumIR(); i++) + cycleCounters.push_back(1); +} + +/** + This function is called every 100 milliseconds. +*/ +AREXPORT void ArIRs::processReadings(void) +{ + ArUtil::BITS bit; + if(myParams.haveTableSensingIR()) + { + for (int i = 0; i < myParams.getNumIR(); ++i) + { + switch(i) + { + case 0: + bit = ArUtil::BIT0; + break; + case 1: + bit = ArUtil::BIT1; + break; + case 2: + bit = ArUtil::BIT2; + break; + case 3: + bit = ArUtil::BIT3; + break; + case 4: + bit = ArUtil::BIT4; + break; + case 5: + bit = ArUtil::BIT5; + break; + case 6: + bit = ArUtil::BIT6; + break; + case 7: + bit = ArUtil::BIT7; + break; + } + + if(myParams.haveNewTableSensingIR() && myRobot->getIODigInSize() > 3) + { + if((myParams.getIRType(i) && !(myRobot->getIODigIn(3) & bit)) || + (!myParams.getIRType(i) && (myRobot->getIODigIn(3) & bit))) + { + if(cycleCounters[i] < myParams.getIRCycles(i)) + { + cycleCounters[i] = cycleCounters[i] + 1; + } + else + { + cycleCounters[i] = 1; + ArPose pose; + pose.setX(myParams.getIRX(i)); + pose.setY(myParams.getIRY(i)); + + ArTransform global = myRobot->getToGlobalTransform(); + pose = global.doTransform(pose); + + myCurrentBuffer.addReading(pose.getX(), pose.getY()); + } + } + else + { + cycleCounters[i] = 1; + } + } + else + { + if(!(myRobot->getDigIn() & bit)) + { + if(cycleCounters[i] < myParams.getIRCycles(i)) + { + cycleCounters[i] = cycleCounters[i] + 1; + } + else + { + cycleCounters[i] = 1; + + ArPose pose; + pose.setX(myParams.getIRX(i)); + pose.setY(myParams.getIRY(i)); + + ArTransform global = myRobot->getToGlobalTransform(); + pose = global.doTransform(pose); + + myCurrentBuffer.addReading(pose.getX(), pose.getY()); + } + } + else + { + cycleCounters[i] = 1; + } + } + } + } +} + diff --git a/Legacy/Aria/src/ArInterpolation.cpp b/Legacy/Aria/src/ArInterpolation.cpp new file mode 100644 index 0000000..8c852a7 --- /dev/null +++ b/Legacy/Aria/src/ArInterpolation.cpp @@ -0,0 +1,325 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArInterpolation.h" + +AREXPORT ArInterpolation::ArInterpolation(size_t numberOfReadings) +{ + mySize = numberOfReadings; + myDataMutex.setLogName("ArInterpolation"); + setAllowedMSForPrediction(); + setAllowedPercentageForPrediction(); + setLogPrediction(); +} + +AREXPORT ArInterpolation::~ArInterpolation() +{ + +} + +AREXPORT bool ArInterpolation::addReading(ArTime timeOfReading, + ArPose position) +{ + myDataMutex.lock(); + if (myTimes.size() >= mySize) + { + myTimes.pop_back(); + myPoses.pop_back(); + } + myTimes.push_front(timeOfReading); + myPoses.push_front(position); + myDataMutex.unlock(); + return true; +} + +/** + @param timeStamp the time we are interested in + @param position the pose to set to the given position + + @param mostRecent the most recent data in the interpolation relevant to this call... for a return of 1 this is the near side it interpolated between, for a return of 0 or 1 this is the most recent data in the interpolation.... this is only useful if the return is 1, 0, or -1, and is mostly for use with ArRobot::applyEncoderOffset + + @return 1 its good interpolation, 0 its predicting, -1 its too far to + predict, -2 its too old, -3 there's not enough data to predict + +**/ + +AREXPORT int ArInterpolation::getPose( + ArTime timeStamp, ArPose *position, ArPoseWithTime *mostRecent) +{ + std::list::iterator tit; + std::list::iterator pit; + + ArPose thisPose; + ArTime thisTime; + ArPose lastPose; + ArTime lastTime; + + // MPL don't use nowtime, use the time stamp that was passed in... + // that was bad + //ArTime nowTime; + long total; + long toStamp; + double percentage; + ArPose retPose; + + myDataMutex.lock(); + // find the time we want + for (tit = myTimes.begin(), pit = myPoses.begin(); + tit != myTimes.end() && pit != myPoses.end(); + ++tit, ++pit) + { + lastTime = thisTime; + lastPose = thisPose; + + thisTime = (*tit); + thisPose = (*pit); + + //printf("## %d %d %d b %d at %d after %d\n", timeStamp.getMSec(), thisTime.getMSec(), timeStamp.mSecSince(thisTime), timeStamp.isBefore(thisTime), timeStamp.isAt(thisTime), timeStamp.isAfter(thisTime)); + //if (timeStamp.isBefore(thisTime) || timeStamp.isAt(thisTime)) + if (!timeStamp.isAfter(thisTime)) + { + //printf("Found one!\n"); + break; + } + + } + + if (mostRecent != NULL) + { + mostRecent->setPose(thisPose); + mostRecent->setTime(thisTime); + } + + + // if we're at the end then it was too long ago + if (tit == myTimes.end() || pit == myPoses.end()) + { + //printf("Too old\n"); + myDataMutex.unlock(); + return -2; + } + + // this is for forecasting (for the brave) + if ((tit == myTimes.begin() || pit == myPoses.begin()) && + !timeStamp.isAt((*tit))) + { + //printf("Too new %d %d\n", tit == myTimes.begin(), pit == myPoses.begin()); + + thisTime = (*tit); + thisPose = (*pit); + tit++; + pit++; + if (tit == myTimes.end() || pit == myPoses.end()) + { + //printf("Not enough data\n"); + myDataMutex.unlock(); + return -3; + } + lastTime = (*tit); + lastPose = (*pit); + + // MPL don't use nowtime, use the time stamp that was passed in... + //nowTime.setToNow(); + total = thisTime.mSecSince(lastTime); + if (total == 0) + total = 100; + // MPL don't use nowtime, use the time stamp that was passed in... + //toStamp = nowTime.mSecSince(thisTime); + toStamp = timeStamp.mSecSince(thisTime); + percentage = (double)toStamp/(double)total; + //if (percentage > 50) + if (myAllowedPercentageForPrediction >= 0 && + percentage * 100 > myAllowedPercentageForPrediction) + { + if (myLogPrediction) + ArLog::log(ArLog::Normal, "%s: returningPercentage Total time %d, to stamp %d, percentage %.2f (allowed %d)", getName(), total, toStamp, percentage * 100, myAllowedPercentageForPrediction); + + myDataMutex.unlock(); + return -1; + } + + if (myAllowedMSForPrediction >= 0 && + abs(toStamp) > myAllowedMSForPrediction) + { + if (myLogPrediction) + ArLog::log(ArLog::Normal, "%s: returningMS Total time %d, to stamp %d, percentage %.2f (allowed %d)", getName(), total, toStamp, percentage * 100, + myAllowedMSForPrediction); + + myDataMutex.unlock(); + return -1; + } + + if (myLogPrediction) + ArLog::log(ArLog::Normal, "%s: Total time %d, to stamp %d, percentage %.2f (allowed %d)", getName(), total, toStamp, percentage * 100, + myAllowedPercentageForPrediction); + + retPose.setX(thisPose.getX() + + (thisPose.getX() - lastPose.getX()) * percentage); + retPose.setY(thisPose.getY() + + (thisPose.getY() - lastPose.getY()) * percentage); + retPose.setTh(ArMath::addAngle(thisPose.getTh(), + ArMath::subAngle(thisPose.getTh(), + lastPose.getTh()) + * percentage)); + + if (retPose.findDistanceTo(thisPose) > 1000) + ArLog::log(ArLog::Normal, "%s: finaldist %.0f thislastdist %.0f Total time %d, to stamp %d, percentage %.2f", getName(), + retPose.findDistanceTo(thisPose), thisPose.findDistanceTo(lastPose), total, toStamp, percentage * 100); + + + *position = retPose; + myDataMutex.unlock(); + return 0; + } + + // this is the actual interpolation + + //printf("Woo hoo!\n"); + + total = thisTime.mSecSince(lastTime); + toStamp = thisTime.mSecSince(timeStamp); + percentage = (double)toStamp/(double)total; + + if (total == 0) + percentage = 0; + + //if (total == 0) + //printf("Total time %d, to stamp %d, percentage %.2f\n", total, toStamp, percentage * 100); + + retPose.setX(thisPose.getX() + + (lastPose.getX() - thisPose.getX()) * percentage); + retPose.setY(thisPose.getY() + + (lastPose.getY() - thisPose.getY()) * percentage); + retPose.setTh(ArMath::addAngle(thisPose.getTh(), + ArMath::subAngle(lastPose.getTh(), + thisPose.getTh()) + * percentage)); +/* + printf("original:"); + thisPose.log(); + printf("After:"); + lastPose.log(); + printf("ret:"); + retPose.log(); +*/ + *position = retPose; + myDataMutex.unlock(); + return 1; + +} + +AREXPORT size_t ArInterpolation::getNumberOfReadings(void) const +{ + return mySize; +} + +AREXPORT void ArInterpolation::setNumberOfReadings(size_t numberOfReadings) +{ + myDataMutex.lock(); + while (myTimes.size() > numberOfReadings) + { + myTimes.pop_back(); + myPoses.pop_back(); + } + mySize = numberOfReadings; + myDataMutex.unlock(); +} + +AREXPORT void ArInterpolation::reset(void) +{ + myDataMutex.lock(); + while (myTimes.size() > 0) + myTimes.pop_back(); + while (myPoses.size() > 0) + myPoses.pop_back(); + myDataMutex.unlock(); +} + +AREXPORT void ArInterpolation::setName(const char *name) +{ + myDataMutex.lock(); + myName = name; + std::string mutexLogName; + mutexLogName = myName; + mutexLogName += "::DataMutex"; + myDataMutex.setLogName(mutexLogName.c_str()); + myDataMutex.unlock(); +} + +AREXPORT const char * ArInterpolation::getName(void) +{ + return myName.c_str(); +} + +AREXPORT void ArInterpolation::setAllowedMSForPrediction(int ms) +{ + myDataMutex.lock(); + myAllowedMSForPrediction = ms; + myDataMutex.unlock(); +} + +AREXPORT int ArInterpolation::getAllowedMSForPrediction(void) +{ + int ret; + myDataMutex.lock(); + ret = myAllowedMSForPrediction; + myDataMutex.unlock(); + return ret; +} + +AREXPORT void ArInterpolation::setAllowedPercentageForPrediction(int percentage) +{ + myDataMutex.lock(); + myAllowedPercentageForPrediction = percentage; + myDataMutex.unlock(); +} + +AREXPORT int ArInterpolation::getAllowedPercentageForPrediction(void) +{ + int ret; + myDataMutex.lock(); + ret = myAllowedPercentageForPrediction; + myDataMutex.unlock(); + return ret; +} + +AREXPORT void ArInterpolation::setLogPrediction(bool logPrediction) +{ + myDataMutex.lock(); + myLogPrediction = logPrediction; + myDataMutex.unlock(); +} + +AREXPORT bool ArInterpolation::getLogPrediction(void) +{ + bool ret; + myDataMutex.lock(); + ret = myLogPrediction; + myDataMutex.unlock(); + return ret; +} + diff --git a/Legacy/Aria/src/ArIrrfDevice.cpp b/Legacy/Aria/src/ArIrrfDevice.cpp new file mode 100644 index 0000000..50d10cb --- /dev/null +++ b/Legacy/Aria/src/ArIrrfDevice.cpp @@ -0,0 +1,183 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" + +#include "ariaOSDef.h" +#include "ArIrrfDevice.h" +#include "ArCommands.h" + +AREXPORT ArIrrfDevice::ArIrrfDevice(size_t currentBufferSize, + size_t cumulativeBufferSize, const char *name) : + ArRangeDevice(currentBufferSize, cumulativeBufferSize, name, 5000), + myPacketHandler(this, &ArIrrfDevice::packetHandler) +{ + int i; + myRobot = NULL; + // These numbers haven't been proven, yet. It will take experimentation to maximize the best results + myCumulativeMaxRange = 10000; + myMaxRange = 5000; + myFilterFarDist = 7000; + myFilterNearDist = 50; + + myPacketHandler.setName("ArIrrfDevice"); + // The 91 readings start at -81 degrees, and move in 1.8 degree steps + myRawReadings = new std::list; + for(i=0;i<91;i++) + myRawReadings->push_back(new ArSensorReading(0, 0, (1.8*i - 81))); +} + +AREXPORT ArIrrfDevice::~ArIrrfDevice() +{ + if (myRobot != NULL) + { + myRobot->remPacketHandler(&myPacketHandler); + myRobot->remRangeDevice(this); + } +} + +AREXPORT void ArIrrfDevice::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addPacketHandler(&myPacketHandler, ArListPos::LAST); +} + +AREXPORT void ArIrrfDevice::processReadings(void) +{ + int i; + double rx, ry, nx, ny, dx, dy, dist; + ArSensorReading *reading; + std::list::iterator rawIt; + std::list *readingList; + std::list::iterator readIt; + lockDevice(); + + rx = myRobot->getX(); + ry = myRobot->getY(); + + i=0; + for (rawIt = myRawReadings->begin();rawIt != myRawReadings->end();rawIt++) + { + reading = (*rawIt); + nx = reading->getX(); + ny = reading->getY(); + dx = nx - rx; + dy = nx - ry; + dist = (dx*dx) + (dy*dy); + if (!reading->isNew(myRobot->getCounter())) + continue; + + if (dist < (myMaxRange * myMaxRange)) + myCurrentBuffer.addReading(nx, ny); + + if (dist < (myCumulativeMaxRange * myCumulativeMaxRange)) + { + myCumulativeBuffer.beginInvalidationSweep(); + readingList = myCumulativeBuffer.getBuffer(); + + if (readingList != NULL) + { + for (readIt = readingList->begin(); + readIt != readingList->end(); + readIt++) + { + dx = (*readIt)->getX() - nx; + dy = (*readIt)->getY() - ny; + if ((dx*dx + dy*dy) < (myFilterNearDist * myFilterNearDist)) + myCumulativeBuffer.invalidateReading(readIt); + } + } + myCumulativeBuffer.endInvalidationSweep(); + myCumulativeBuffer.addReading(nx, ny); + } + } + + readingList = myCumulativeBuffer.getBuffer(); + + rx = myRobot->getX(); + ry = myRobot->getY(); + + myCumulativeBuffer.beginInvalidationSweep(); + if (readingList != NULL) + { + for (readIt = readingList->begin(); readIt != readingList->end();readIt++) + { + dx = (*readIt)->getX() - rx; + dy = (*readIt)->getY() - ry; + if ((dx*dx + dy*dy) > (myFilterFarDist * myFilterFarDist)) + myCumulativeBuffer.invalidateReading(readIt); + } + } + myCumulativeBuffer.endInvalidationSweep(); + + unlockDevice(); +} + +/** + This is the packet handler for the PB9 data, which is sent via the micro + controller, to the client. This will read the data from the packets, + and then call processReadings to filter add the data to the current and + cumulative buffers. +*/ +AREXPORT bool ArIrrfDevice::packetHandler(ArRobotPacket *packet) +{ + int portNum, i, dist, packetCounter; + double conv; + ArTransform packetTrans; + std::list::iterator it; + ArSensorReading *reading; + ArPose pose; + ArTransform encoderTrans; + ArPose encoderPose; + + pose = myRobot->getPose(); + conv = 2.88; + + packetTrans.setTransform(pose); + packetCounter = myRobot->getCounter(); + + if (packet->getID() != 0x10) + return false; + + // Which Aux port the IRRF is connected to + portNum = packet->bufToByte2(); + encoderTrans = myRobot->getEncoderTransform(); + encoderPose = encoderTrans.doInvTransform(pose); + + i = 0; + for (i=0, it = myRawReadings->begin();it != myRawReadings->end();it++, i++) + { + reading = (*it); + dist = (int) ((packet->bufToUByte2()) / conv); + reading->newData(dist, pose, encoderPose, packetTrans, packetCounter, packet->getTimeReceived()); + } + + myLastReading.setToNow(); + + processReadings(); + + return true; +} diff --git a/Legacy/Aria/src/ArJoyHandler.cpp b/Legacy/Aria/src/ArJoyHandler.cpp new file mode 100644 index 0000000..f44eb48 --- /dev/null +++ b/Legacy/Aria/src/ArJoyHandler.cpp @@ -0,0 +1,330 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArExport.h" +#include "ArJoyHandler.h" +#include "ariaUtil.h" + +/** + @param useOSCal if this is set then the joystick will just rely on + the OS to calibrate, otherwise it will keep track of center min and + max and use those values for calibration + + @param useOld use the old linux interface to the joystick +**/ + +AREXPORT ArJoyHandler::ArJoyHandler(bool useOSCal, bool useOld) +{ + myInitialized = false; + myUseOSCal = useOSCal; + myUseOld = useOld; + myHaveZ = false; + myFirstData = true; +} + +AREXPORT ArJoyHandler::~ArJoyHandler() +{ +} + + +/** + @param useOSCal if this is set then the joystick will just rely on + the OS to calibrate, otherwise it will keep track of center min and + max and use those values for calibration +**/ + +AREXPORT void ArJoyHandler::setUseOSCal(bool useOSCal) +{ + myUseOSCal = useOSCal; +} + +/** + @return if useOSCal is set then the joystick will just rely on + the OS to calibrate, otherwise it will keep track of center min and + max and use those values for calibration +**/ + +AREXPORT bool ArJoyHandler::getUseOSCal(void) +{ + return myUseOSCal; +} + +/** + Starts the calibration, which resets all the min and max variables as well + as the center variables. + @see endCal */ +AREXPORT void ArJoyHandler::startCal(void) +{ + int x, y; + getUnfiltered(&x, &y); + myMaxX = x; + myMinX = x; + myMaxY = y; + myMinY = y; + myCenX = x; + myCenY = y; +} + +/** + Ends the calibration, which also sets the center to where the joystick is + when the function is called... the center is never reset except in this + function, whereas the min and maxes are constantly checked + @see startCal +*/ + +AREXPORT void ArJoyHandler::endCal(void) +{ + int x, y; + + getUnfiltered(&x, &y); + myCenX = x; + myCenY = y; +} + +AREXPORT void ArJoyHandler::getStats(int *maxX, int *minX, int *maxY, + int *minY, int *cenX, int *cenY) +{ + *maxX = myMaxX; + *minX = myMinX; + *maxY = myMaxY; + *minY = myMinY; + *cenX = myCenX; + *cenY = myCenY; +} + +AREXPORT void ArJoyHandler::setStats(int maxX, int minX, int maxY, int minY, + int cenX, int cenY) +{ + myMaxX = maxX; + myMinX = minX; + myMaxY = maxY; + myMinY = minY; + myCenX = cenX; + myCenY = cenY; +} + +/** + @swignote Use the version of this method returning ArJoyVec3i +*/ +AREXPORT void ArJoyHandler::getSpeeds(int *x, int *y, int *z) +{ + *x = myTopX; + *y = myTopY; + if (z != NULL) + *z = myTopZ; +} + +/** + if useOSCal is true then this returns the readings as calibrated + from the OS. If useOSCal is false this finds the percentage of the + distance between center and max (or min) then takes this percentage + and multiplies it by the speeds given the class, and returns the + values computed from this. + + @param x pointer to an integer in which to store the x value, which + will be within the range [-1 * x given in setSpeeds(), x given in setSpeeds()] + @param y pointer to an integer in which to store the y value, which + will be within the range [-1 * y given in setSpeeds(), y given in setSpeeds()] + @param z pointer to an integer in which to store the z value, which + will be within the range [-1 * z given in setSpeeds(), z given in setSpeeds()] + @java Use the version of this method returning ArJoyVec3i + @python returns a tuple of (x, y, z) instead +**/ + +AREXPORT void ArJoyHandler::getAdjusted(int *x, int *y, int *z) +{ + int curX, curY, curZ; + + getUnfiltered(&curX, &curY, &curZ); + if (myUseOSCal) + { + *x = ArMath::roundInt(((double)curX) / 128.0 * ((double)myTopX)); + *y = ArMath::roundInt(((double)curY) / 128.0 * ((double)myTopY)); + if (z != NULL) + *z = ArMath::roundInt(((double)curZ) / 128.0 * ((double)myTopZ)); + return; + } + + if (curX > myCenX && myMaxX - myCenX != 0 ) { + *x = (int)((double)(curX - myCenX)/(double)(myMaxX - myCenX)* + (double)myTopX); + } else if (curX <= myCenX && myCenX - myMinX != 0) { + *x = (int)((double)(myCenX - curX)/(double)(myCenX - myMinX)* + (double)-myTopX); + } else + *x = 0; + if (curY > myCenY && myMaxY - myCenY != 0) { + *y = (int)((double)(curY - myCenY)/(double)(myMaxY - myCenY)* + (double)myTopY); + } else if (curY <= myCenY && myCenY - myMinY != 0) { + *y = (int)((double)(myCenY - curY)/(double)(myCenY - myMinY)* + (double)-myTopY); + } else + *y = 0; + if (z != NULL) + *z = ArMath::roundInt(((double)curZ) / 128.0 * ((double)myTopZ)); + +} + +/** + If useOSCal is true then this gets normalized values + (between -1.0 and 1.0) as calibrated + by the OS. In other words, the range [-1.0,1.0] is scaled + to the calibrated range determined by the set maximum. If useOSCal is false this finds the percentage of the + distance between center and max (or min) then takes this percentage + and multiplies it by the speeds given the class, and returns the + values computed from this. + + @param x pointer to an integer in which to store the x value. + Will be within the range [-1.0, 1.0] + @param y pointer to an integer in which to store the y value. + Will be within the range [-1.0, 1.0] + @param z pointer to an integer in which to store the z value. + Will be within the range [-1.0, 1.0] + + @python Returns a tuple of (x, y, z) instead + @java Use the version of this method returning ArJoyVec3f + @python Returns a tuple of (x, y, z) instead +**/ + +AREXPORT void ArJoyHandler::getDoubles(double *x, double *y, double *z) +{ + int curX, curY, curZ; + + getUnfiltered(&curX, &curY, &curZ); + if (myUseOSCal) + { + *x = ((double)curX) / 128.0; + *y = ((double)curY) / 128.0; + if (z != NULL) + *z = ((double)curZ) / 128.0; + return; + } + + if (curX > myCenX && myMaxX - myCenX != 0 ) { + *x = (int)((double)(curX - myCenX)/(double)(myMaxX - myCenX)); + } else if (curX <= myCenX && myCenX - myMinX != 0) { + *x = (int)((double)(myCenX - curX)/(double)(myCenX - myMinX)); + } else + *x = 0; + if (curY > myCenY && myMaxY - myCenY != 0) { + *y = (int)((double)(curY - myCenY)/(double)(myMaxY - myCenY)); + } else if (curY <= myCenY && myCenY - myMinY != 0) { + *y = (int)((double)(myCenY - curY)/(double)(myCenY - myMinY)); + } else + *y = 0; + if (z != NULL) + *z = curZ; +} + +/** + This returns the raw value from the joystick... with X and Y + varying between -128 and 128. This data normally shouldn't be used + except in calibration since it can give very uncentered or inconsistent readings. + For example its not uncommon for a joystick to move 10 to the right + but 50 or 100 to the left, so if you aren't adjusting for this you get + a robot (or whatever) that goes left really fast, but will hardly go right. + Instead you should use getAdjusted() exclusively except for calibration, + or informational purposes. + @param x pointer to an integer in which to store x value + @param y pointer to an integer in which to store y value + @param z pointer to an integer in which to store z value + @java Use the version of this method returning ArJoyVec3i + @python Returns a tuple of (x, y, z) instead +*/ +AREXPORT void ArJoyHandler::getUnfiltered(int *x, int* y, int *z) +{ + getData(); + *x = myAxes[1]; + *y = myAxes[2]; + if (z != NULL) + *z = myAxes[3]; +} + +/** + @param axis axis to get, should range from 1 through getNumAxes() +**/ + +AREXPORT double ArJoyHandler::getAxis(unsigned int axis) +{ + // make sure we have that axis + if (axis < 1 || axis > myAxes.size()) + return 0; + + std::map::iterator iter = myAxes.find(axis); + if (iter != myAxes.end()) { + return (iter->second) / 128.0; + } + else { + return 0; + } + /** + // now make sure its in there + if (myAxes.find(axis) == myAxes.end()) + return 0; + return myAxes[axis]/128.0; + **/ +} + +/** + @param button button to test for pressed, within the range 1 through + getNumButtons() + + @return true if the button is pressed, false otherwise +**/ + +AREXPORT bool ArJoyHandler::getButton(unsigned int button) +{ + getData(); + // make sure we have that axis + if (button < 1 || button > myButtons.size()) + return 0; + + // now make sure its in there + if (myButtons.find(button) == myButtons.end()) + return 0; + + return myButtons[button]; +} + +/** + @return the number of axes (axes are indexed as 1 through this number) +**/ + +AREXPORT unsigned int ArJoyHandler::getNumAxes(void) +{ + return myAxes.size(); +} + +/** + @return the number of buttons (buttons are indexed as 1 through this number) +**/ + +AREXPORT unsigned int ArJoyHandler::getNumButtons(void) +{ + return myButtons.size(); +} + diff --git a/Legacy/Aria/src/ArJoyHandler_LIN.cpp b/Legacy/Aria/src/ArJoyHandler_LIN.cpp new file mode 100644 index 0000000..d02398e --- /dev/null +++ b/Legacy/Aria/src/ArJoyHandler_LIN.cpp @@ -0,0 +1,189 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArJoyHandler.h" +#include "ArLog.h" +#include +#include "ariaUtil.h" + +bool ArJoyHandler::init(void) +{ + int i; + + myLastOpenTry.setToNow(); + myJoyNumber = 0; + + if (myUseOld) + { + myOldJoyDesc = ArUtil::fopen("/dev/js0", "r"); + if(myOldJoyDesc > 0) + ArLog::log(ArLog::Verbose, "ArJoyHandler: Opened /dev/js0 (old Linux device name scheme)"); + } + else + { + for (i = 0; i < 32; i++) + { + sprintf(myJoyNameTemp, "/dev/input/js%d", i); + if ((myJoyDesc = ArUtil::open(myJoyNameTemp, O_RDONLY | O_NONBLOCK)) > 0) + { + ArLog::log(ArLog::Verbose, "ArJoyHandler: Opened %s", myJoyNameTemp); + break; + } + } + } + + if ((myUseOld && myOldJoyDesc != NULL) || (!myUseOld && myJoyDesc > 0)) + { + myPhysMax = 255; + myInitialized = true; + startCal(); + endCal(); + getData(); + return true; + } + else + { + myJoyNumber = -1; + myPhysMax = 255; + myInitialized = false; + getData(); + return false; + } +} + +void ArJoyHandler::getData(void) +{ + if (myUseOld && !myInitialized) + return; + + if (!myFirstData && myLastDataGathered.mSecSince() < 5) + return; + myFirstData = false; + myLastDataGathered.setToNow(); + if (myUseOld) + getOldData(); + else + getNewData(); +} + +void ArJoyHandler::getOldData(void) +{ +#ifdef linux + int x, y; + if (myOldJoyDesc == NULL || !myInitialized || + fread(&myJoyData, 1, JS_RETURN, myOldJoyDesc) != JS_RETURN) + { + myAxes[1] = 0; + myAxes[2] = 0; + myAxes[3] = 0; + myButtons[1] = false; + myButtons[2] = false; + myButtons[3] = false; + myButtons[4] = false; + } + else + { + x = myJoyData.x - 128; + y = - (myJoyData.y - 128); + if (x > myMaxX) + myMaxX = x; + if (x < myMinX) + myMinX = x; + if (y > myMaxY) + myMaxY = y; + if (y < myMinY) + myMinY = y; + myAxes[1] = x; + myAxes[2] = y; + myAxes[3] = 0; + myButtons[1] = myJoyData.buttons & 1; + myButtons[2] = myJoyData.buttons & 2; + myButtons[3] = myJoyData.buttons & 4; + myButtons[4] = myJoyData.buttons & 8; + } +#endif // ifdef linux +} + +/// Handles the reading of the data into the bins +void ArJoyHandler::getNewData(void) +{ +#ifdef linux + if (myLastOpenTry.mSecSince() > 125) + { + int tempDesc; + myLastOpenTry.setToNow(); + sprintf(myJoyNameTemp, "/dev/input/js%d", myJoyNumber + 1); + if ((tempDesc = ArUtil::open(myJoyNameTemp, O_RDWR | O_NONBLOCK)) > 0) + { + ArLog::log(ArLog::Verbose, "ArJoyHandler: Opened next joydev %s", myJoyNameTemp); + close(myJoyDesc); + myInitialized = true; + myJoyDesc = tempDesc; + myJoyNumber++; + } + else if (myJoyNumber > 0) + { + if ((tempDesc = ArUtil::open("/dev/input/js0", O_RDWR | O_NONBLOCK)) > 0) + { + myInitialized = true; + ArLog::log(ArLog::Verbose, "ArJoyHandler: Opened first joydev /dev/input/js0"); + close(myJoyDesc); + myJoyDesc = tempDesc; + myJoyNumber = 0; + } + } + } + + struct js_event e; + while (read (myJoyDesc, &e, sizeof(struct js_event)) > 0) + { + // see if its a button even + if ((e.type & JS_EVENT_BUTTON)) + { + // if its one of the buttons we want set it + myButtons[e.number+1] = (bool)e.value; + } + // see if its an axis + if ((e.type & JS_EVENT_AXIS)) + { + // if its one of the buttons we want set it + if (e.number == 0) + myAxes[e.number+1] = ArMath::roundInt(e.value * 128.0 / 32767.0); + else + myAxes[e.number+1] = ArMath::roundInt(-e.value * 128.0 / 32767.0); + if (e.number == 2) + myHaveZ = true; + } + //printf("%d 0x%x 0x%x\n", e.value, e.type, e.number); + } + if (errno != EAGAIN) + { + //ArLog::log(ArLog::Terse, "ArJoyHandler::getUnfiltered: Trouble reading data."); + } +#endif // ifdef linux +} + diff --git a/Legacy/Aria/src/ArJoyHandler_WIN.cpp b/Legacy/Aria/src/ArJoyHandler_WIN.cpp new file mode 100644 index 0000000..7333e39 --- /dev/null +++ b/Legacy/Aria/src/ArJoyHandler_WIN.cpp @@ -0,0 +1,300 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArJoyHandler.h" + +AREXPORT bool ArJoyHandler::init(void) +{ + + myPhysMax = 1; + myLastZ = 0; + + // first see if we can talk to the first joystick + if (joyGetDevCaps(JOYSTICKID1,&myJoyCaps,sizeof(myJoyCaps)) == + JOYERR_NOERROR && + joyGetPos(JOYSTICKID1,&myJoyInfo) != JOYERR_UNPLUGGED) + { + myJoyID = JOYSTICKID1; + + // So far, it seems that the x range is the same as that of y and + // z, so only one is used + myPhysMax = myJoyCaps.wXmax - myJoyCaps.wXmin; + /* + ArLog::log(ArLog::Normal, "caps 0x%x numAxes %d maxAxes %d %s", + myJoyCaps.wCaps, myJoyCaps.wNumAxes, myJoyCaps.wMaxAxes, myJoyCaps.szPname); + ArLog::log(ArLog::Normal, + "xMin %d xMax %d yMin %d yMax %d zMin %d zMax %d rMin %d rMax %d uMin %d uMax %d", + myJoyCaps.wXmin, myJoyCaps.wXmax, myJoyCaps.wYmin, myJoyCaps.wYmax, + myJoyCaps.wRmin, myJoyCaps.wRmax, myJoyCaps.wZmin, + myJoyCaps.wZmax, myJoyCaps.wUmin, myJoyCaps.wUmax); + */ + myInitialized = true; + startCal(); + endCal(); + return true; + } + // we couldn't talk to the first one so try the second one + else if (joyGetDevCaps(JOYSTICKID2,&myJoyCaps,sizeof(myJoyCaps)) == + JOYERR_NOERROR && + joyGetPos(JOYSTICKID2,&myJoyInfo) != JOYERR_UNPLUGGED) + { + myJoyID = JOYSTICKID2; + + // So far, it seems that the x range is the same as that of y and + // z, so only one is used + myPhysMax = myJoyCaps.wXmax - myJoyCaps.wXmin; + /* + ArLog::log(ArLog::Normal, "2 caps 0x%x numAxes %d maxAxes %d %s", + myJoyCaps.wCaps, myJoyCaps.wNumAxes, myJoyCaps.wMaxAxes, myJoyCaps.szPname); + ArLog::log(ArLog::Normal, + "2 xMin %d xMax %d yMin %d yMax %d zMin %d zMax %d rMin %d rMax %d uMin %d uMax %d", + myJoyCaps.wXmin, myJoyCaps.wXmax, myJoyCaps.wYmin, myJoyCaps.wYmax, + myJoyCaps.wRmin, myJoyCaps.wRmax, myJoyCaps.wZmin, + myJoyCaps.wZmax, myJoyCaps.wUmin, myJoyCaps.wUmax); + */ + myInitialized = true; + startCal(); + endCal(); + return true; + } + // we couldn't talk to either one + else + { + myInitialized = false; + return false; + } + + // Just to prevent any possible divide-by-zeros... + if (myPhysMax == 0) { + myPhysMax = 1; + } + + getData(); +} + + +void ArJoyHandler::getData(void) +{ + int x, y, z, r, u, v; + if (!myFirstData && myLastDataGathered.mSecSince() < 5) + return; + + myLastDataGathered.setToNow(); + JOYINFOEX joyInfoEx; + joyInfoEx.dwFlags = JOY_RETURNALL; + joyInfoEx.dwSize = sizeof(joyInfoEx); + + MMRESULT joyResult = joyGetPosEx(myJoyID,&joyInfoEx); + + std::string axes; + + /* + if (myFirstData) + { + if (joyInfoEx.dwFlags & JOY_RETURNR) + axes += " r "; + if (joyInfoEx.dwFlags & JOY_RETURNU) + axes += " u "; + if (joyInfoEx.dwFlags & JOY_RETURNV) + axes += " v "; + if (joyInfoEx.dwFlags & JOY_RETURNX) + axes += " x "; + if (joyInfoEx.dwFlags & JOY_RETURNY) + axes += " y "; + if (joyInfoEx.dwFlags & JOY_RETURNZ) + axes += " z "; + ArLog::log(ArLog::Normal, "Axes %s\n", axes.c_str()); + } + */ + + myFirstData = false; + + if (joyResult == JOYERR_NOERROR) + { + // KMC: I don't understand this logic... The spec says that + // getAxis returns a number between -1 and 1; the getAxis method + // multiplies the contents of myAxes by 128. The logic below + // however seems to double everything... +/**/ + x = (int)(joyInfoEx.dwXpos*256.0/myPhysMax)-128; + y = (int)-((joyInfoEx.dwYpos*256.0/myPhysMax)-128); + z = (int)-((joyInfoEx.dwZpos*256.0/myPhysMax)-128); + r = (int)-((joyInfoEx.dwRpos*256.0/myPhysMax)-128); + u = (int)-((joyInfoEx.dwUpos*256.0/myPhysMax)-128); + v = (int)-((joyInfoEx.dwVpos*256.0/myPhysMax)-128); + +/***/ +/*** + x = (int) 128 * ((2.0 * (double) myJoyInfo.wXpos / (double) myPhysMax) - 1); + y = (int)-128 * ((2.0 * (double) myJoyInfo.wYpos / (double) myPhysMax) - 1); + z = (int)-128 * ((2.0 * (double) myJoyInfo.wZpos / (double) myPhysMax) - 1); +**/ + + if (myLastZ != z) + myHaveZ = true; + if (x > myMaxX) + myMaxX = x; + if (x < myMinX) + myMinX = x; + if (y > myMaxY) + myMaxY = y; + if (y < myMinY) + myMinY = y; + + myAxes[1] = x; + myAxes[2] = y; + myAxes[3] = z; + myAxes[4] = r; + myAxes[5] = u; + myAxes[6] = v; + + myLastZ = z; + + /* This seems off by one on the dual controller + myButtons[1] = (joyInfoEx.dwButtons & 0x1); + myButtons[2] = (joyInfoEx.dwButtons & 0x2); + myButtons[3] = (joyInfoEx.dwButtons & 0x4); + myButtons[4] = (joyInfoEx.dwButtons & 0x8); + myButtons[5] = (joyInfoEx.dwButtons & 0xf); + myButtons[6] = (joyInfoEx.dwButtons & 0x10); + myButtons[7] = (joyInfoEx.dwButtons & 0x20); + myButtons[8] = (joyInfoEx.dwButtons & 0x40); + myButtons[9] = (joyInfoEx.dwButtons & 0x80); + myButtons[10] = (joyInfoEx.dwButtons & 0xf0); + myButtons[11] = (joyInfoEx.dwButtons & 0x100); + myButtons[12] = (joyInfoEx.dwButtons & 0x200); +*/ + myButtons[1] = (joyInfoEx.dwButtons & JOY_BUTTON1); + myButtons[2] = (joyInfoEx.dwButtons & JOY_BUTTON2); + myButtons[3] = (joyInfoEx.dwButtons & JOY_BUTTON3); + myButtons[4] = (joyInfoEx.dwButtons & JOY_BUTTON4); + myButtons[5] = (joyInfoEx.dwButtons & JOY_BUTTON5); + myButtons[6] = (joyInfoEx.dwButtons & JOY_BUTTON6); + myButtons[7] = (joyInfoEx.dwButtons & JOY_BUTTON7); + myButtons[8] = (joyInfoEx.dwButtons & JOY_BUTTON8); + myButtons[9] = (joyInfoEx.dwButtons & JOY_BUTTON9); + myButtons[10] = (joyInfoEx.dwButtons & JOY_BUTTON10); + myButtons[11] = (joyInfoEx.dwButtons & JOY_BUTTON11); + myButtons[12] = (joyInfoEx.dwButtons & JOY_BUTTON12); + + } + else //(joyResult == JOYERR_UNPLUGGED) + { + myAxes[1] = 0; + myAxes[2] = 0; + myAxes[3] = 0; + myAxes[4] = 0; + myAxes[5] = 0; + myAxes[6] = 0; + myButtons[1] = 0; + myButtons[2] = 0; + myButtons[3] = 0; + myButtons[4] = 0; + myButtons[5] = 0; + myButtons[6] = 0; + myButtons[7] = 0; + myButtons[8] = 0; + myButtons[9] = 0; + myButtons[10] = 0; + myButtons[11] = 0; + myButtons[12] = 0; + + // Reset the initialized flag so that the joystick button in the GUI + // will be disabled. + myInitialized = false; + } +} + +#if 0 + +void ArJoyHandler::getData(void) +{ + int x, y, z; + if (!myFirstData && myLastDataGathered.mSecSince() < 5) + return; + + myFirstData = false; + myLastDataGathered.setToNow(); + MMRESULT joyResult = joyGetPos(myJoyID,&myJoyInfo); + + if (joyResult == JOYERR_NOERROR) + { + // KMC: I don't understand this logic... The spec says that + // getAxis returns a number between -1 and 1; the getAxis method + // multiplies the contents of myAxes by 128. The logic below + // however seems to double everything... +/**/ + x = (int)(myJoyInfo.wXpos*256.0/myPhysMax)-128; + y = (int)-((myJoyInfo.wYpos*256.0/myPhysMax)-128); + z = (int)-((myJoyInfo.wZpos*256.0/myPhysMax)-128); + +/***/ +/*** + x = (int) 128 * ((2.0 * (double) myJoyInfo.wXpos / (double) myPhysMax) - 1); + y = (int)-128 * ((2.0 * (double) myJoyInfo.wYpos / (double) myPhysMax) - 1); + z = (int)-128 * ((2.0 * (double) myJoyInfo.wZpos / (double) myPhysMax) - 1); +**/ + + if (myLastZ != z) + myHaveZ = true; + if (x > myMaxX) + myMaxX = x; + if (x < myMinX) + myMinX = x; + if (y > myMaxY) + myMaxY = y; + if (y < myMinY) + myMinY = y; + + myAxes[1] = x; + myAxes[2] = y; + myAxes[3] = z; + + myLastZ = z; + + myButtons[1] = (myJoyInfo.wButtons & 1); + myButtons[2] = (myJoyInfo.wButtons & 2); + myButtons[3] = (myJoyInfo.wButtons & 4); + myButtons[4] = (myJoyInfo.wButtons & 8); + } + else //(joyResult == JOYERR_UNPLUGGED) + { + myAxes[1] = 0; + myAxes[2] = 0; + myAxes[3] = 0; + myButtons[1] = 0; + myButtons[2] = 0; + myButtons[3] = 0; + myButtons[4] = 0; + + // Reset the initialized flag so that the joystick button in the GUI + // will be disabled. + myInitialized = false; + } +} + +#endif diff --git a/Legacy/Aria/src/ArKeyHandler.cpp b/Legacy/Aria/src/ArKeyHandler.cpp new file mode 100644 index 0000000..af44d88 --- /dev/null +++ b/Legacy/Aria/src/ArKeyHandler.cpp @@ -0,0 +1,468 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArKeyHandler.h" +#include "ArLog.h" + +#ifdef WIN32 +#include +#else // if not win32 +#include +#endif + +#include "ariaInternal.h" + +/** + @param blocking whether or not to block waiting on keys, default is + false, ie not to wait... you probably only want to block if you are + using checkKeys yourself like after you start a robot run or in its + own thread or something along those lines + @param addAriaExitCB true to add an aria exit cb to restore the keys + @param stream the FILE * pointer to use, if this is NULL (the default) + then use stdin, otherwise use this... + @param takeKeysInConstructor whether to take the keys when created or not + (default is true) +**/ +AREXPORT ArKeyHandler::ArKeyHandler(bool blocking, bool addAriaExitCB, + FILE *stream, + bool takeKeysInConstructor) : + myAriaExitCB(this, &ArKeyHandler::restore) +{ + myAriaExitCB.setName("ArKeyHandlerExit"); + if (addAriaExitCB) + Aria::addExitCallback(&myAriaExitCB); + + myStream = stream; + myTookKeys = false; + + if (takeKeysInConstructor) + takeKeys(blocking); +} + +AREXPORT ArKeyHandler::~ArKeyHandler() +{ + restore(); +} + +AREXPORT void ArKeyHandler::takeKeys(bool blocking) +{ + myBlocking = blocking; +#ifndef WIN32 + struct termios newTermios; + + if (myStream == NULL) + { + tcgetattr(fileno(stdin), &myOriginalTermios); + tcgetattr(fileno(stdin), &newTermios); + } + else + { + tcgetattr(fileno(myStream), &myOriginalTermios); + tcgetattr(fileno(myStream), &newTermios); + } + + newTermios.c_cc[VTIME] = 0; + if (myBlocking) + { + newTermios.c_cc[VMIN] = 1; + } + else + { +/* + We need 0 here for linux (otherwise the read blocks) but we need 1 + for mac osx, there's probably better def to check someday. +*/ +#ifdef linux + newTermios.c_cc[VMIN] = 0; +#else + newTermios.c_cc[VMIN] = 1; +#endif + } + newTermios.c_lflag &= (~ECHO & ~ICANON); + + if (myStream == NULL) + tcsetattr(fileno(stdin), TCSANOW, &newTermios); + else + tcsetattr(fileno(myStream), TCSANOW, &newTermios); + +#endif + myRestored = false; + myTookKeys = true; +} + +AREXPORT void ArKeyHandler::restore(void) +{ + if (!myTookKeys) + return; + +#ifndef WIN32 + if (myStream == NULL) + tcsetattr(fileno(stdin), TCSANOW, &myOriginalTermios); + else + tcsetattr(fileno(myStream), TCSANOW, &myOriginalTermios); + +#endif + myRestored = true; + myTookKeys = false; +} + +/** + @param keyToHandle A character value, such as 'a' or '1' + or '[', or a member of the KEY enum. + + @param functor Functor to call when @a keyToHandle is received + + @return true If no previous key handler functor exists for @a keyToHandle and + the handler functor was stored, or false if a handler for that key already + exists. + that key +*/ +AREXPORT bool ArKeyHandler::addKeyHandler(int keyToHandle, ArFunctor *functor) +{ + if (myMap.find(keyToHandle) != myMap.end()) + { + if (keyToHandle >= '!' && keyToHandle <= '~') + ArLog::log(ArLog::Normal, "There is already a key to handle '%c' which is number %d 0x%x", keyToHandle, keyToHandle, keyToHandle); + else + ArLog::log(ArLog::Normal, "There is already a key to handle number %d 0x%x", keyToHandle, keyToHandle); + return false; + } + //ArLog::log(ArLog::Verbose, "keyhandler %p added key '%c' number '%d'", + //this, keyToHandle, keyToHandle); + myMap[keyToHandle] = functor; + + return true; +} + +/** + @param keyToHandle The character value or code to clear the handler for. + + @return true if the remKeyHandler succeeded, which means that a + key handler for @a keyToHandle was found and rmeoved, or false if no + handler for that value was found. + **/ +AREXPORT bool ArKeyHandler::remKeyHandler(int keyToHandle) +{ + if (myMap.find(keyToHandle) == myMap.end()) + { + //ArLog::log(ArLog::Normal, "There is no key to handle '%c' which is number %d 0x%x", keyToHandle, keyToHandle, keyToHandle); + return false; + } + if (keyToHandle >= '!' && keyToHandle <= '~') + ArLog::log(ArLog::Verbose, "keyhandler %p removed key '%c' number '%d'", + this, keyToHandle, keyToHandle); + else + ArLog::log(ArLog::Verbose, "keyhandler %p removed key number '%d'", + this, keyToHandle); + myMap.erase(keyToHandle); + return true; +} + +/** + @param functor the functor of the handler to remove + + @return true if the remKeyHandler succeeded, which means that the + functor was found and removed from the handlers, or false if no + handler with the given functor was found. + **/ +AREXPORT bool ArKeyHandler::remKeyHandler(ArFunctor *functor) +{ + std::map::iterator it; + std::list::iterator> iters; + std::list::iterator>::iterator iterIter; + + for (it = myMap.begin(); it != myMap.end(); ++it) + { + if (it->second == functor) + { + iters.push_front(it); + } + } + if (iters.size() > 0) + { + while((iterIter = iters.begin()) != iters.end()) + { + myMap.erase((*iterIter)); + iters.pop_front(); + } + ArLog::log(ArLog::Verbose, "keyhandler %p removed functor %p", this, + functor); + return true; + } + return false; +} + +AREXPORT void ArKeyHandler::checkKeys(void) +{ + int key; + std::map::iterator it; + + if (myRestored) + return; + + // get keys until they're gone + while (!myRestored && (key = getKey()) != -1) + { + // if there's something to handle it, handle it + if ((it = myMap.find(key)) != myMap.end()) + { + //ArLog::log(ArLog::Verbose, "key '%c' num %d pressed\n", key, key); + it->second->invoke(); + } + } +} + +#ifndef WIN32 + +AREXPORT int ArKeyHandler::getChar(void) +{ + if (myStream == NULL) + return getchar(); + else + return getc(myStream); +} + +AREXPORT int ArKeyHandler::getKey(void) +{ + /* + * What follows is a somewhat poor implementation of getch(), basically, since + * we want to get control keys but don't want to have to use curses. + */ + + int key; + int k[5] = {-1, -1, -1, -1, -1}; // used for escape sequences + + key = getChar(); + switch(key) + { + case -1: + case 0: + return -1; + + //case -1: return ESCAPE; //? + case ' ': return SPACE; + case '\t': return TAB; + case 10: return ENTER; + case 13: return ENTER; + case 8: return BACKSPACE; + case 127: return BACKSPACE; + + case 27: // Escape key, or Begin special control key sequence + key = getChar(); + switch(key) + { + case -1: return ESCAPE; + case 79: // first four F keys + key = getChar(); + switch(key) + { + case 80: return F1; + case 81: return F2; + case 82: return F3; + case 83: return F4; + case 70: return END; + case 72: return HOME; + default: return key; + } + case '[': // keypad keys and extended F-key sequences start with this + // Read in all characters in the special key sequence. -1 is the + // terminator (no more keys). We also check for the beginning of a new special key + // sequence (27) since if the key repeat is high enough, they begin + // overlapping. TODO: check trailing keys for modifiers line shift and set an + // (optional parameter) bitmask. + for(short i = 0; key != -1 && key != 27 && i < 5; i++) + { + k[i] = key = getChar(); + //printf("ArKeyHandler::getKey: read extended key component %d/%d.\n", k[i], key); + } + ungetc(key, stdin); // put last key back. (Esp. important if it was the beginning of a new control sequence (27). + + switch(k[0]) + { + case 65: return UP; + case 66: return DOWN; + case 67: return RIGHT; + case 68: return LEFT; + + case 51: return DEL; + case 53: return PAGEUP; + case 54: return PAGEDOWN; + + case 50: + switch(k[1]) + { + case 126: return INSERT; + case 48: return F9; + case 49: return F10; + case 51: return F11; + case 52: return F12; + } + return k[1]; + + + case 49: + switch(k[1]) + { + case 53: return F5; + case 55: return F6; + case 56: return F7; + case 57: return F8; + } + return k[1]; + default: return -1; + } + default: return -1; + } + + default: return key; + } +} + +#if 0 +/* This is a previous implementation of getKey(), just for reference or + * quick reversion: */ +AREXPORT int ArKeyHandler::getKey(void) +{ + char key; + + key = getChar(); + if (key == -1 || key == 0) + return -1; + + if (key == 27) + { + key = getChar(); + if (key == '[') + { + key = getChar(); + if (key == 'A') + return UP; + else if (key == 'B') + return DOWN; + else if (key == 'C') + return RIGHT; + else if (key == 'D') + return LEFT; + else + return getKey(); + } + else if (key == -1) + return ESCAPE; + else if (key == 79) + { + key = getChar(); + if (key == 'P') + return F1; + else if (key == 'Q') + return F2; + else if (key == 'R') + return F3; + else if (key == 'S') + return F4; + else + return getKey(); + } + } + else if (key == ' ') + return SPACE; + else if (key == '\t') + return TAB; + else if (key == 10) + return ENTER; + else if (key == 8 || key == 127) + return BACKSPACE; + return key; +} +#endif + + +#else // if it is win32 + +AREXPORT int ArKeyHandler::getKey(void) +{ + int key; + + if (!myBlocking && !kbhit()) + return -1; + + key = _getch(); + if (key == 224) + { + key = _getch(); + if (key == 'H') + return UP; + else if (key == 'P') + return DOWN; + else if (key == 'K') + return LEFT; + else if (key == 'M') + return RIGHT; + else + return getKey(); + } + else if (key == 0) + { + key = _getch(); + if (key == ';') + return F1; + else if (key == '<') + return F2; + else if (key == '=') + return F3; + else if (key == '>') + return F4; + else if (key == 'H') + return UP; + else if (key == 'P') + return DOWN; + else if (key == 'K') + return LEFT; + else if (key == 'M') + return RIGHT; + else + return getKey(); + } + else if (key == ' ') + return SPACE; + else if (key == '\t') + return TAB; + else if (key == 10) + return ENTER; + else if (key == 13) + return ENTER; + else if (key == 8) + return BACKSPACE; + else if (key == 27) + return ESCAPE; + + return key; + +} + +#endif // WIN32 + + diff --git a/Legacy/Aria/src/ArLCDConnector.cpp b/Legacy/Aria/src/ArLCDConnector.cpp new file mode 100644 index 0000000..20b7f38 --- /dev/null +++ b/Legacy/Aria/src/ArLCDConnector.cpp @@ -0,0 +1,1185 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLCDConnector.h" +#include "ArRobot.h" +#include "ArLCDMTX.h" +#include "ariaInternal.h" +#include "ArCommands.h" +#include "ArRobotConfigPacketReader.h" + +#include +#include +#include + +/** @warning do not delete @a parser during the lifetime of this + ArLCDConnector, which may need to access its contents later. + @param parser the parser with the arguments to parse + @param robot the robot these lcds are attached to (or NULL for none) + @param robotConnector the connector used for connecting to the robot + (so we can see if it was a sim or not) + @param autoParseArgs if this class should autoparse the args if they + aren't parsed explicitly + @param infoLogLevel The log level for information about creating + lcds and such, this is also passed to all the lcds created as + their infoLogLevel too + */ +AREXPORT ArLCDConnector::ArLCDConnector ( + ArArgumentParser *parser, ArRobot *robot, + ArRobotConnector *robotConnector, bool autoParseArgs, + ArLog::LogLevel infoLogLevel, + ArRetFunctor1 *turnOnPowerOutputCB, + ArRetFunctor1 *turnOffPowerOutputCB) : + myParseArgsCB (this, &ArLCDConnector::parseArgs), + myLogOptionsCB (this, &ArLCDConnector::logOptions), + myTurnOnPowerCB(this, &ArLCDConnector::turnOnPowerCB), + myTurnOffPowerCB(this, &ArLCDConnector::turnOffPowerCB) + +{ + myParser = parser; + myOwnParser = false; + myRobot = robot; + myLCDLogPacketsReceived = false; + myLCDLogPacketsSent = false; + myRobotConnector = robotConnector; + myAutoParseArgs = autoParseArgs; + myParsedArgs = false; + myInfoLogLevel = infoLogLevel; + + myTurnOnPowerOutputCB = turnOnPowerOutputCB; + myTurnOffPowerOutputCB = turnOffPowerOutputCB; + + myParseArgsCB.setName ("ArLCDConnector"); + Aria::addParseArgsCB (&myParseArgsCB, 60); + myLogOptionsCB.setName ("ArLCDConnector"); + Aria::addLogOptionsCB (&myLogOptionsCB, 80); +} +AREXPORT ArLCDConnector::~ArLCDConnector (void) +{ +} +/** + * Parse command line arguments using the ArArgumentParser given in the ArLCDConnector constructor. + * + * See parseArgs(ArArgumentParser*) for details about argument parsing. + * + @return true if the arguments were parsed successfully false if not + **/ +AREXPORT bool ArLCDConnector::parseArgs (void) +{ + return parseArgs (myParser); +} +/** + * Parse command line arguments held by the given ArArgumentParser. + * + @return true if the arguments were parsed successfully false if not + + The following arguments are accepted for lcd connections. A program may request support for more than one lcd + using setMaxNumLCDs(); if multi-lcd support is enabled in this way, then these arguments must have the lcd index + number appended. For example, "-lcdPort" for lcd 1 would instead by "-lcdPort1", and for lcd 2 it would be + "-lcdPort2". +
+
-lcdPort port
+
-lcdp port
+
Use the given port device name when connecting to a lcd. For example, COM2 or on Linux, /dev/ttyS1. + The default lcd port is COM2, which is the typical Pioneer lcd port setup. +
+
-connectLCD
+
-clcd
+
Explicitly request that the client program connect to a lcd, if it does not always do so
+
+ **/ +AREXPORT bool ArLCDConnector::parseArgs (ArArgumentParser *parser) +{ + + + if (myParsedArgs) + return true; + myParsedArgs = true; + bool typeReallySet; + const char *type; + char buf[1024]; + int i; + std::map::iterator it; + LCDData *lcdData; + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue (true); + + for (i = 1; i <= Aria::getMaxNumLCDs(); i++) { + if (i == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", i); + typeReallySet = false; + // see if the lcd is being added from the command line + if (!parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-lcdType%s", buf) || + !parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-lcdt%s", buf)) { + ArLog::log (ArLog::Normal, + "ArLCDConnector: Bad lcd type given for lcd number %d", + i); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + + // if we didn't have an argument then just return + if (!typeReallySet) + continue; + if ( (it = myLCDs.find (i)) != myLCDs.end()) { + ArLog::log (ArLog::Normal, "ArLCDConnector: A lcd already exists for lcd number %d, replacing it with a new one of type %s", + i, type); + lcdData = (*it).second; + delete lcdData; + myLCDs.erase (i); + } + + if (typeReallySet && type != NULL) { + ArLCDMTX *lcd = NULL; + if ( (lcd = Aria::lcdCreate (type, i, "ArLCDConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArLCDConnector: Created %s as lcd %d from arguments", + lcd->getName(), i); + myLCDs[i] = new LCDData (i, lcd); + lcd->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "Unknown lcd type %s for lcd %d, choices are %s", + type, i, Aria::lcdGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } + + if (parser->checkArgument("-lcdLogPacketsReceived") || + parser->checkArgument("-lcdlpr")) + myLCDLogPacketsReceived = true; + + if (parser->checkArgument("-lcdLogPacketsSent") || + parser->checkArgument("-lcdlps")) + myLCDLogPacketsSent = true; + + // go through the robot param list and add the lcds defined + // in the parameter file. + const ArRobotParams *params = NULL; + if (myRobot != NULL) { + params = myRobot->getRobotParams(); + if (params != NULL) { + + + for (i = 1; i <= Aria::getMaxNumLCDs(); i++) { + // if we already have a lcd for this then don't add one from + // the param file, since it was added either explicitly by a + // program or from the command line + if (myLCDs.find (i) != myLCDs.end()) + continue; + type = params->getLCDMTXBoardType (i); + // if we don't have a lcd type for that number continue + if (type == NULL || type[0] == '\0') + continue; + + int baud = params->getLCDMTXBoardBaud(i); + if (baud == 0) + continue; + + ArLCDMTX *lcd = NULL; + if ( (lcd = + Aria::lcdCreate (type, i, "ArLCDConnector: ")) != NULL) { + + ArLog::log (myInfoLogLevel, + "ArLCDConnector::parseArgs() Created %s as lcd %d from parameter file", + lcd->getName(), i); + myLCDs[i] = new LCDData (i, lcd); + lcd->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "ArLCDConnector::parseArgs() Unknown lcd type %s for lcd %d from the .p file, choices are %s", + type, i, Aria::lcdGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } else { + ArLog::log (ArLog::Normal, "ArLCDConnector::parseArgs() Have robot, but robot has NULL params, so cannot configure its lcd"); + } + } + // now go through and parse the args for any lcd that we have + + + for (it = myLCDs.begin(); it != myLCDs.end(); it++) { + lcdData = (*it).second; + if (!parseLCDArgs (parser, lcdData)) { + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return true; + +} // end parseArgs + +AREXPORT bool ArLCDConnector::parseLCDArgs (ArArgumentParser *parser, + LCDData *lcdData) +{ + char buf[512]; + if (lcdData == NULL) { + ArLog::log (ArLog::Terse, "ArLCDConnector::parseLCDArgs() Was given NULL lcd"); + return false; + } + if (lcdData->myLCD == NULL) { + ArLog::log (ArLog::Normal, + "ArLCDConnector::parseLCDArgs() There is no lcd for lcd number %d but there should be", + lcdData->myNumber); + return false; + } + ArLCDMTX *lcd = lcdData->myLCD; + if (lcdData->myNumber == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", lcdData->myNumber); + +#if 0 + // see if we want to connect to the lcd automatically + if (parser->checkArgumentVar ("-connectLCD%s", buf) || + parser->checkArgumentVar ("-clcd%s", buf)) { + lcdData->myConnect = true; + lcdData->myConnectReallySet = true; + } +#endif + + // see if we do not want to connect to the lcd automatically + if (parser->checkArgumentVar ("-doNotConnectLCD%s", buf) || + parser->checkArgumentVar ("-dnclcd%s", buf)) { + lcdData->myConnect = false; + lcdData->myConnectReallySet = true; + } + if (!parser->checkParameterArgumentStringVar (NULL, &lcdData->myPort, + "-lcdPort%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myPort, + "-lcdp%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myPortType, + "-lcdPortType%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myPortType, + "-lcdpt%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myType, + "-lcdType%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myType, + "-lcdt%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myBaud, + "-lcdBaud%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myBaud, + "-lcdb%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myAutoConn, + "-lcdAutoConn%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myAutoConn, + "-lcdac%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myConnFailOption, + "-lcdDisconnectOnConnectFailure%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &lcdData->myConnFailOption, + "-lcddocf%s", buf)) + { + return false; + } + // PS - command line needs to set this to true +#if 0 + if (strcasecmp(lcdData->myAutoConn, "true") == 0) { + lcdData->myConnect = true; + lcdData->myConnectReallySet = true; + } +#endif + return internalConfigureLCD (lcdData); + +} // end parseLCDArgs + + +bool ArLCDConnector::internalConfigureLCD ( + LCDData *lcdData) +{ + ArLCDMTX *lcd = lcdData->myLCD; + if (lcd == NULL) { + ArLog::log (ArLog::Terse, "ArLCDConnector::internalConfigureLCD() No lcd for number %d", + lcdData->myNumber); + return false; + } + // the rest handles all the connection stuff + const ArRobotParams *params; + char portBuf[1024]; + if (lcdData->myLCD == NULL) { + ArLog::log (ArLog::Terse, "ArLCDConnector::internalConfigureLCD() There is no lcd, cannot connect"); + return false; + } + sprintf (portBuf, "%d", lcdData->myLCD->getDefaultTcpPort()); + if (myRobotConnector == NULL) { + ArLog::log (ArLog::Terse, "ArLCDConnector::internalConfigureLCD() No ArRobotConnector is passed in so simulators and remote hosts will not work correctly"); + } + if ( (lcdData->myPort == NULL || strlen (lcdData->myPort) == 0) && + (lcdData->myPortType != NULL && strlen (lcdData->myPortType) > 0)) { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() There is a lcd port type given ('%s') for lcd %d (%s), but no lcd port given, cannot configure lcd", + lcdData->myPortType, lcdData->myNumber, lcd->getName()); + return false; + } + + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() command line lcd #%d type= %s port=%s portType=%s baud=%d autoconnect=%d disconnectonfailure=%d ", + lcdData->myNumber, + lcdData->myType, + lcdData->myPort, + lcdData->myPortType, + lcdData->myBaud, + lcdData->myAutoConn, + lcdData->myConnFailOption); + + + if ( (lcdData->myPort != NULL && strlen (lcdData->myPort) > 0) && + (lcdData->myPortType != NULL && strlen (lcdData->myPortType) > 0)) { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() Connection type and port given for lcd %d (%s), so overriding everything and using that information", + lcdData->myNumber, lcd->getName()); + + if ( (lcdData->myConn = Aria::deviceConnectionCreate ( + lcdData->myPortType, lcdData->myPort, portBuf, + "ArLCDConnector:")) == NULL) { + return false; + } + lcd->setDeviceConnection (lcdData->myConn); + return true; + } + if ( (lcdData->myPort != NULL && strlen (lcdData->myPort) > 0) && + (lcdData->myPortType == NULL || strlen (lcdData->myPortType) == 0)) { + if (myRobot != NULL && (params = myRobot->getRobotParams()) != NULL) { + if (params->getLCDMTXBoardPortType (lcdData->myNumber) != NULL && + params->getLCDMTXBoardPortType (lcdData->myNumber) [0] != '\0') { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() There is a port given, but no port type given so using the robot parameters port type"); + if ( (lcdData->myConn = Aria::deviceConnectionCreate ( + params->getLCDMTXBoardPortType (lcdData->myNumber), + lcdData->myPort, portBuf, + "ArLCDConnector: ")) == NULL) { + return false; + } + } else if (lcd->getDefaultPortType() != NULL && + lcd->getDefaultPortType() [0] != '\0') { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() There is a port given for lcd %d (%s), but no port type given and no robot parameters port type so using the lcd's default port type", lcdData->myNumber, lcd->getName()); + if ( (lcdData->myConn = Aria::deviceConnectionCreate ( + lcd->getDefaultPortType(), + lcdData->myPort, portBuf, + "ArLCDConnector: ")) == NULL) { + return false; + } + } else { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() There is a port given for lcd %d (%s), but no port type given, no robot parameters port type, and no lcd default port type, so using serial", + lcdData->myNumber, lcd->getName()); + if ( (lcdData->myConn = Aria::deviceConnectionCreate ( + "serial", + lcdData->myPort, portBuf, + "ArLCDConnector: ")) == NULL) { + return false; + } + } + lcd->setDeviceConnection (lcdData->myConn); + return true; + } else { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() There is a lcd port given ('%s') for lcd %d (%s), but no lcd port type given and there are no robot params to find the information in, so assuming serial", + lcdData->myPort, lcdData->myNumber, lcd->getName()); + if ( (lcdData->myConn = Aria::deviceConnectionCreate ( + lcdData->myPortType, lcdData->myPort, portBuf, + "ArLCDConnector: ")) == NULL) { + return false; + } + lcd->setDeviceConnection (lcdData->myConn); + return true; + } + } + // if we get down here there was no information provided by the command line or in a lcd connector, so see if we have params... if not then fail, if so then use those + if (myRobot == NULL || (params = myRobot->getRobotParams()) == NULL) { + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() No robot params are available, and no command line information given on how to connect to the lcd %d (%s), so cannot connect", lcdData->myNumber, lcd->getName()); + return false; + } + + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() .p lcd #%d type= %s port=%s portType=%s baud=%d autoconnect=%d disconnectonfailure=%d", + lcdData->myNumber, + params->getLCDMTXBoardType (lcdData->myNumber), + params->getLCDMTXBoardPort (lcdData->myNumber), + params->getLCDMTXBoardPortType (lcdData->myNumber), + params->getLCDMTXBoardBaud (lcdData->myNumber), + params->getLCDMTXBoardAutoConn (lcdData->myNumber), + params->getLCDMTXBoardConnFailOption (lcdData->myNumber)); + + // see if auto connect is on + if (params->getLCDMTXBoardAutoConn (lcdData->myNumber)) { + + lcdData->myConnect = true; + lcdData->myConnectReallySet = true; + } + + ArLog::log (ArLog::Normal, "ArLCDConnector::internalConfigureLCD() Using robot params for connecting to lcd %d (%s)", lcdData->myNumber, lcd->getName()); + + if ( (lcdData->myConn = Aria::deviceConnectionCreate ( + params->getLCDMTXBoardPortType (lcdData->myNumber), + params->getLCDMTXBoardPort (lcdData->myNumber), portBuf, + "ArLCDConnector: ")) == NULL) { + return false; + } + lcd->setDeviceConnection (lcdData->myConn); + return true; +} +AREXPORT void ArLCDConnector::logOptions (void) const +{ + ArLog::log (ArLog::Terse, "Options for ArLCDConnector:"); + ArLog::log(ArLog::Terse, "-lcdLogPacketsReceived"); + ArLog::log(ArLog::Terse, "-lcdlpr"); + ArLog::log(ArLog::Terse, "-lcdLogPacketsSent"); + ArLog::log(ArLog::Terse, "-lcdlps"); + ArLog::log (ArLog::Terse, "\nOptions shown are for currently set up lcds. Activate lcds with -lcdType option"); + ArLog::log (ArLog::Terse, "to see options for that lcd (e.g. \"-help -lcdType1 lcdMTX\")."); + ArLog::log (ArLog::Terse, "Valid lcd types are: %s", Aria::lcdGetTypes()); + ArLog::log (ArLog::Terse, "\nSee docs for details."); + std::map::const_iterator it; + LCDData *lcdData; + for (it = myLCDs.begin(); it != myLCDs.end(); it++) { + lcdData = (*it).second; + logLCDOptions (lcdData); + } +} +AREXPORT void ArLCDConnector::logLCDOptions ( + LCDData *lcdData, bool header, bool metaOpts) const +{ + char buf[512]; + if (lcdData == NULL) { + ArLog::log (ArLog::Normal, + "Tried to log lcd options with NULL lcd data"); + return; + } + if (lcdData->myLCD == NULL) { + ArLog::log (ArLog::Normal, + "ArLCDConnector: There is no lcd for lcd number %d but there should be", + lcdData->myNumber); + return; + } + ArLCDMTX *lcd = lcdData->myLCD; + if (lcdData->myNumber == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", lcdData->myNumber); + if (header) { + ArLog::log (ArLog::Terse, ""); + ArLog::log (ArLog::Terse, "LCD%s: (\"%s\")", buf, lcd->getName()); + } + if (metaOpts) { + ArLog::log (ArLog::Terse, "-lcdType%s <%s>", buf, Aria::lcdGetTypes()); + ArLog::log (ArLog::Terse, "-lcdt%s <%s>", buf, Aria::lcdGetTypes()); + ArLog::log (ArLog::Terse, "-connectLCD%s", buf); + ArLog::log (ArLog::Terse, "-clcd%s", buf); + } + ArLog::log (ArLog::Terse, "-lcdPort%s ", buf); + ArLog::log (ArLog::Terse, "-lcdp%s ", buf); + ArLog::log (ArLog::Terse, "-lcdPortType%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log (ArLog::Terse, "-lcdpt%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log (ArLog::Terse, "-remoteLCDTcpPort%s ", buf); + ArLog::log (ArLog::Terse, "-rbtp%s ", buf); +} +/** + Normally adding lcds is done from the .p file, you can use this + if you want to add them explicitly in a program (which will + override the .p file, and may cause some problems). + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLCDConnector::connectLCDs.() + @internal +**/ +AREXPORT bool ArLCDConnector::addLCD ( + ArLCDMTX *lcd, int lcdNumber) +{ + std::map::iterator it; + LCDData *lcdData = NULL; + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) + lcdData = (*it).second; + if (lcdData != NULL) { + if (lcdData->myLCD != NULL) + ArLog::log (ArLog::Terse, + "ArLCDConnector::addLCD: Already have lcd for number #%d of type %s but a replacement lcd of type %s was passed in", + lcdNumber, lcdData->myLCD->getName(), lcd->getName()); + else + ArLog::log (ArLog::Terse, + "ArLCDConnector::addLCD: Already have lcd for number #%d but a replacement lcd of type %s was passed in", + lcdNumber, lcd->getName()); + delete lcdData; + myLCDs.erase (lcdNumber); + } + myLCDs[lcdNumber] = new LCDData (lcdNumber, lcd); + return true; +} +AREXPORT ArLCDMTX *ArLCDConnector::getLCD (int lcdNumber) +{ + std::map::iterator it; + LCDData *lcdData = NULL; + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) + lcdData = (*it).second; + // if we have no lcd, we can't get it so just return + if (lcdData == NULL) + return NULL; + // otherwise, return the lcd + return lcdData->myLCD; +} +AREXPORT bool ArLCDConnector::replaceLCD ( + ArLCDMTX *lcd, int lcdNumber) +{ + std::map::iterator it; + LCDData *lcdData = NULL; + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) + lcdData = (*it).second; + // if we have no lcd, we can't replace it so just return + if (lcdData == NULL) + return false; + if (lcdData->myLCD != NULL) + ArLog::log (myInfoLogLevel, + "ArLCDConnector::replaceLCD: Already have lcd for number #%d of type %s but a replacement lcd of type %s was passed in", + lcdNumber, lcdData->myLCD->getName(), lcd->getName()); + else + ArLog::log (ArLog::Normal, + "ArLCDConnector::replaceLCD: Replacing a non existant lcd number #%d with a lcd of type %s passed in", + lcdNumber, lcd->getName()); + lcdData->myLCD = lcd; + return true; +} +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLCDConnector::connectLCDs(). + @internal +**/ +AREXPORT bool ArLCDConnector::setupLCD (ArLCDMTX *lcd, + int lcdNumber) +{ + if (myRobot == NULL && myRobotConnector != NULL) + myRobot = myRobotConnector->getRobot(); + std::map::iterator it; + LCDData *lcdData = NULL; + const ArRobotParams *params; + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) + lcdData = (*it).second; + if (lcdData == NULL && lcd == NULL) { + ArLog::log (ArLog::Terse, "ArLCDConnector::setupLCD: Do not have lcd #%d", lcdNumber) ; + return false; + } + if (lcdData != NULL && lcd != NULL && + lcdData->myLCD != lcd) { + if (lcdData->myLCD != NULL) + ArLog::log (ArLog::Terse, "ArLCDConnector::setupLCD: Already have lcd for number #%d (%s) but a replacement lcd (%s) was passed in, this will replace all of the command line arguments for that lcd", + lcdNumber, lcdData->myLCD->getName(), lcd->getName()); + else + ArLog::log (ArLog::Terse, "ArLCDConnector::setupLCD: Already have lcd for number #%d but a replacement lcd (%s) was passed in, this will replace all of the command line arguments for that lcd", + lcdNumber, lcd->getName()); + delete lcdData; + myLCDs.erase (lcdNumber); + myLCDs[lcdNumber] = new LCDData (lcdNumber, lcd); + } + if (lcdData == NULL && lcd != NULL) { + lcdData = new LCDData (lcdNumber, lcd); + myLCDs[lcdNumber] = lcdData; + if (myAutoParseArgs && !parseLCDArgs (myParser, lcdData)) { + ArLog::log (ArLog::Verbose, "ArLCDConnector: Auto parsing args for lcd %s (num %d)", lcdData->myLCD->getName(), lcdNumber); + return false; + } + } + // see if there is no lcd (ie if it was a sick done in the old + // style), or if the lcd passed in doesn't match the one this + // class created (I don't know how it'd happen, but...)... and then + // configure it + if ( (lcdData->myLCD == NULL || lcdData->myLCD != lcd)) { + if (!internalConfigureLCD (lcdData)) + return false; + } + // setupLCD automatically adds this to the robot, since the + // connectlcd stuff is the newer more supported way and is more + // configurable.. it only adds it as a lcd since the legacy code + // won't add it that way, but will add it as a range device + if (myRobot != NULL) { + myRobot->addLCD (lcd, lcdNumber); + //myRobot->addRangeDevice(lcd); + } else { + ArLog::log (ArLog::Normal, "ArLCDConnector::setupLCD: No robot, so lcd cannot be added to robot"); + } + return true; +} +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLCDConnector::connectLCDs(). + @internal +**/ +AREXPORT bool ArLCDConnector::connectLCD (ArLCDMTX *lcd, + int lcdNumber, + bool forceConnection) +{ + std::map::iterator it; + LCDData *lcdData = NULL; + lcd->lockDevice(); + // set up the lcd regardless + if (!setupLCD (lcd, lcdNumber)) { + lcd->unlockDevice(); + return false; + } + lcd->unlockDevice(); + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) + lcdData = (*it).second; + if (lcdData == NULL) { + ArLog::log (ArLog::Normal, "ArLCDConnector::connectLCD: Some horrendous error in connectLCD with lcd number %d", lcdNumber); + return false; + } + // see if we want to connect + if (!forceConnection && !lcdData->myConnect) + return true; + else + return lcd->blockingConnect(myLCDLogPacketsSent, myLCDLogPacketsReceived, lcdData->myNumber, + &myTurnOnPowerCB, &myTurnOffPowerCB); + +} +AREXPORT bool ArLCDConnector::connectLCDs ( + bool continueOnFailedConnect, bool addConnectedLCDsToRobot, + bool addAllLCDsToRobot, bool turnOnLCDs, + bool powerCycleLCDOnFailedConnect) +{ + std::map::iterator it; + LCDData *lcdData = NULL; + ArLog::log (myInfoLogLevel, + "ArLCDConnector::connectLCDs() Connecting lcds"); + if (myAutoParseArgs && !myParsedArgs) { + ArLog::log (ArLog::Verbose, + "ArLCDConnector::connectLCDs() Auto parsing args for lcds"); + if (!parseArgs()) { + return false; + } + } + if (addAllLCDsToRobot) { + + ArLog::log (ArLog::Normal, + "ArLCDConnector::connectLCDs() addAllLCDsToRobot"); + + if (myRobot != NULL) { + + for (it = myLCDs.begin(); it != myLCDs.end(); it++) { + lcdData = (*it).second; + myRobot->addLCD (lcdData->myLCD, lcdData->myNumber); + ArLog::log (ArLog::Verbose, + "ArLCDConnector::connectLCDs: Added %s to robot as lcd %d", + lcdData->myLCD->getName(), lcdData->myNumber); + } + } else { + ArLog::log (ArLog::Normal, "ArLCDConnector::connectLCDs: Supposed to add all lcds to robot, but there is no robot"); + return false; + } + } + for (it = myLCDs.begin(); it != myLCDs.end(); it++) { + + lcdData = (*it).second; + + if (lcdData == NULL) + continue; + + //verifyFirmware(lcdData); + + lcdData->myConn->close(); + + turnOnPower(lcdData); + + if (lcdData->myConnectReallySet && lcdData->myConnect) { + ArLog::log (myInfoLogLevel, + "ArLCDConnector::connectLCDs: Connecting %s", + lcdData->myLCD->getName()); + lcdData->myLCD->setRobot (myRobot); + bool connected = false; + connected = lcdData->myLCD->blockingConnect(myLCDLogPacketsSent, + myLCDLogPacketsReceived, lcdData->myNumber, + &myTurnOnPowerCB, &myTurnOffPowerCB); + if (connected) { + if (!addAllLCDsToRobot && addConnectedLCDsToRobot) { + if (myRobot != NULL) { + myRobot->addLCD (lcdData->myLCD, lcdData->myNumber); + //myRobot->addRangeDevice(lcdData->myLCD); + ArLog::log (ArLog::Verbose, + "ArLCDConnector::connectLCDs: Added %s to robot", + lcdData->myLCD->getName()); + } else { + ArLog::log (ArLog::Normal, + "ArLCDConnector::connectLCDs: Could not add %s to robot, since there is no robot", + lcdData->myLCD->getName()); + } + } else if (addAllLCDsToRobot && myRobot != NULL) { + ArLog::log (ArLog::Verbose, + "ArLCDConnector::connectLCDs: %s already added to robot)", + lcdData->myLCD->getName()); + } else if (myRobot != NULL) { + ArLog::log (ArLog::Verbose, + "ArLCDConnector::connectLCDs: Did not add %s to robot", + lcdData->myLCD->getName()); + } + } else { + if (!continueOnFailedConnect) { + ArLog::log (ArLog::Normal, + "ArLCDConnector::connectLCDs: Could not connect %s, stopping", + lcdData->myLCD->getName()); + return false; + } else + ArLog::log (ArLog::Normal, + "ArLCDConnector::connectLCDs: Could not connect %s, continuing with remainder of lcds", + lcdData->myLCD->getName()); + } + } + } + ArLog::log (myInfoLogLevel, + "ArLCDConnector: Done connecting lcds"); + return true; +} + +AREXPORT bool ArLCDConnector::turnOnPower (LCDData *LCDData) +{ + /// MPL the new way + if (myTurnOnPowerOutputCB != NULL) { + if (myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber) == NULL || + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber) [0] == '\0') { + ArLog::log (ArLog::Normal, + "ArLCDConnector::turnOnPower: LCD %d has no power output set so can't be turned on (things may still work).", + LCDData->myNumber); + return false; + } else { + if (myTurnOnPowerOutputCB->invokeR ( + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber))) { + ArLog::log (myInfoLogLevel, + "ArLCDConnector::turnOnPower: Turned on power output %s for lcd %d", + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber), + LCDData->myNumber); + return true; + } else { + ArLog::log (ArLog::Normal, + "ArLCDConnector::turnOnPower: Could not turn on power output %s for lcd %d (things may still work).", + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber), + LCDData->myNumber); + return false; + } + } + } + return false; +} + +AREXPORT bool ArLCDConnector::turnOffPower (LCDData *LCDData) +{ + /// MPL the new way + if (myTurnOffPowerOutputCB != NULL) { + if (myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber) == NULL || + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber) [0] == '\0') { + ArLog::log (ArLog::Normal, + "ArLCDConnector::turnOffPower: LCD %d has no power output set so can't be turned off (things may still work).", + LCDData->myNumber); + return false; + } else { + if (myTurnOffPowerOutputCB->invokeR ( + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber))) { + ArLog::log (myInfoLogLevel, + "ArLCDConnector::turnOffPower: Turned off power output %s for lcd %d", + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber), + LCDData->myNumber); + return true; + } else { + ArLog::log (ArLog::Normal, + "ArLCDConnector::turnOffPower: Could not turn off power output %s for lcd %d (things may still work).", + myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( + LCDData->myNumber), + LCDData->myNumber); + return false; + } + } + } + return false; +} + +AREXPORT bool ArLCDConnector::verifyFirmware (LCDData *LCDData) + +{ + + + // first we need to turn off the power, then turn it back on + if (!turnOffPower(LCDData)) + return false; + + ArUtil::sleep(3000); + + if (!turnOnPower(LCDData)) + return false; + + + + // now connect to the serial port + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (LCDData->myConn); + if (serConn != NULL) + serConn->setBaud (115200); + if (LCDData->myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !LCDData->myConn->openSimple()) { + ArLog::log ( + ArLog::Normal, + "ArLCDConnector::verifyFirmware: Could not connect (%d) because the connection was not open and could not open it", + LCDData->myNumber); + + return false; + } + + + + // now send hello - and see if we get a response + + unsigned char hello = 0xc1; + + //// ArBasePacket *packet; + // while ((packet = readPacket()) != NULL) + + ArTime timeDone; + + if (!timeDone.addMSec(30 * 1000)) + { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) error adding msecs (30 * 1000)", + LCDData->myNumber); + } + + unsigned char helloResp[4]; + bool gotResponse= false; + int hmiVersion = 0; + int hmiRevision = 0; + + while (timeDone.mSecTo() > 0) { + + if ((LCDData->myConn->write((char *)&hello, 1)) == -1) { + + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Could not send hello to LCD", LCDData->myNumber); + return false; + } + + if ((LCDData->myConn->read((char *) &helloResp[0], 4, 500)) > 0) { + + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) received hello response 0x%02x 0x%02x 0x%02x 0x%02x", + LCDData->myNumber, helloResp[0], helloResp[1], helloResp[2], helloResp[3] ); + + if ((helloResp[0] == 0xc0) && (helloResp[3] == 0x4b)) { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) received hello response", + LCDData->myNumber); + + gotResponse = true; + hmiVersion = helloResp[1]; + hmiRevision = helloResp[2]; + + break; + + } + + } + else { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) read failed", + LCDData->myNumber); + + } + } + + if (!gotResponse) { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Received no hello response", LCDData->myNumber); + return false; + } + + // now make sure we have a file + + std::string hmiFile; + hmiFile.clear(); + + bool foundHmi = false; + char hmiFilePrefix[100]; + hmiFilePrefix[0] = '\0'; + std::string baseDir = "/usr/local/apps/marcDownload/"; + + + sprintf(hmiFilePrefix,"AdeptHmi"); + + + hmiFile = searchForFile(baseDir.c_str(), hmiFilePrefix, ".ds"); + + char hmiFileOut[100]; + hmiFileOut[0] = '\0'; + + if (hmiFile.empty()) { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) can't find hmi file with prefix = %s", + LCDData->myNumber, hmiFilePrefix); + return false; + } + else { + // validate that the file dosn't match the current version + + sprintf(hmiFileOut,"AdeptHmi%02x%02x.ds", + hmiVersion, hmiRevision); + + if (strcmp(hmiFile.c_str(), hmiFileOut) != 0) { + foundHmi = true; + } + else { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) hmi file found but version matches (%s)", + LCDData->myNumber, hmiFileOut); + return false; + } + } + + + + if (!foundHmi) { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Can not find %s.ds file", LCDData->myNumber, hmiFileOut); + return false; + } + + + + + FILE *file; + char line[10000]; + unsigned char c; + + std:: string hmiDirFile = baseDir + hmiFile; + if ( (file = ArUtil::fopen (hmiDirFile.c_str(), "r")) == NULL) { + ArLog::log (ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Could not open file %s for reading errno (%d)", + LCDData->myNumber, hmiDirFile.c_str(), errno); + return false; + } + + line[0] = '\0'; + + while (fgets (line, sizeof (line), file) != NULL) { + + ArArgumentBuilder builder; + builder.add(line); + + int i; + + std::string data; + data.clear(); + + for (i = 0; i < builder.getArgc(); i++) { + + if (!builder.isArgInt(i, true)) { + + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Could not convert file", LCDData->myNumber); + return false; + + } + + char ch = builder.getArgInt(i, NULL, true); + data.push_back(ch); + + + + } // end for + + + //ArLog::log(ArLog::Normal, + // "ArLCDConnector::verifyFirmware(%d) data = %s size = %d", LCDData->myNumber, data.c_str(), data.size()); + + //ArLog::log(ArLog::Normal, + // "ArLCDConnector::verifyFirmware(%d) %d %c 0x%02x", LCDData->myNumber, data, data, data); + if ((LCDData->myConn->write((char *)data.c_str(), data.size())) == -1) { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Could not send data size(%d) to LCD errno (%d)", LCDData->myNumber, sizeof(data), errno); + return false; + } + + + // wait a sec for the response + if ((LCDData->myConn->read((char *) &c, 1, 1000)) > 0) { + + if (c == 0x4b) + continue; + else { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Invalid response %x02%x from LCD to load data", + LCDData->myNumber, c); + return false; + } + + } + else { + ArLog::log(ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) Did not get response from LCD to load data", LCDData->myNumber); + return false; + + } + + } // end while + if (feof(file)) { + // end of file reached + ArLog::log (ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) LCD firmware updated", + LCDData->myNumber); + fclose (file); + + ArUtil::sleep(5000); + return true; + + } + else { + + ArLog::log (ArLog::Normal, + "ArLCDConnector::verifyFirmware(%d) failed updating LCD firmware", + LCDData->myNumber); + fclose (file); + + return false; + + } +} + + +AREXPORT std::string ArLCDConnector::searchForFile( + const char *dirToLookIn, const char *prefix, const char *suffix) +{ + + /*** + ArLog::log(ArLog::Normal, + "ArUtil::matchCase() dirToLookIn = \"%s\" fileName = \"%s\"", + dirToLookIn, + fileName); + ***/ + + DIR *dir; + struct dirent *ent; + + /* + for (it = split.begin(); it != split.end(); it++) + { + printf("@@@@@@@@ %s\n", (*it).c_str()); + } + */ + + // how this works is we start at the base dir then read through + // until we find what the next name we need, if entry is a directory + // and we're not at the end of our string list then we change into + // that dir and the while loop keeps going, if the entry isn't a + // directory and matchs and its the last in our string list we've + // found what we want + if ((dir = opendir(dirToLookIn)) == NULL) + { + ArLog::log(ArLog::Normal, + "AramUtil::findFile: No such directory '%s' for base", + dirToLookIn); + return ""; + } + + while ((ent = readdir(dir)) != NULL) + { + // ignore some of these + if (ent->d_name[0] == '.') + { + //printf("Ignoring %s\n", ent->d_name[0]); + continue; + } + //printf("NAME %s finding %s\n", ent->d_name, finding.c_str()); + + // continue if the prefix should be searched for and doesn't match + if (prefix != NULL && prefix[0] != '\0' && + strncasecmp(ent->d_name, prefix, strlen(prefix)) != 0) + continue; + + // continue if the suffix should be searched for and doesn't match + if (suffix != NULL && suffix[0] != '\0' && + strlen(ent->d_name) > strlen(suffix) + 1 && + strncasecmp(&ent->d_name[strlen(ent->d_name) - strlen(suffix)], + suffix, strlen(suffix)) != 0) + continue; + + std::string ret = ent->d_name; + closedir(dir); + return ret; + } + //printf("!!!!!!!! %s", finding.c_str()); + closedir(dir); + return ""; +} + +AREXPORT void ArLCDConnector::turnOnPowerCB (int lcdNumber) +{ +std::map::iterator it; +LCDData *lcdData; + + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) { + lcdData = (*it).second; + + if (lcdData != NULL) { + turnOnPower(lcdData); + } + } + +} + +AREXPORT void ArLCDConnector::turnOffPowerCB (int lcdNumber) +{ + +std::map::iterator it; +LCDData *lcdData; + + if ( (it = myLCDs.find (lcdNumber)) != myLCDs.end()) { + lcdData = (*it).second; + + if (lcdData != NULL) { + turnOffPower(lcdData); + } + } + +} + +AREXPORT void ArLCDConnector::setIdentifier(const char *identifier) +{ + + // go thru list of lcd's and set the identifiers + + std::map::const_iterator it; + LCDData *lcdData; + for (it = myLCDs.begin(); it != myLCDs.end(); it++) { + lcdData = (*it).second; + lcdData->myLCD->setIdentifier(identifier); + } + +} diff --git a/Legacy/Aria/src/ArLCDMTX.cpp b/Legacy/Aria/src/ArLCDMTX.cpp new file mode 100644 index 0000000..a92137d --- /dev/null +++ b/Legacy/Aria/src/ArLCDMTX.cpp @@ -0,0 +1,2138 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLCDMTX.h" +#include "ArSensorReading.h" +#include "ariaOSDef.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include "ArSystemStatus.h" + +#include +//#include "../ArNetworking/include/ArServerMode.h" + +#include +#include +#include + + +#define ARLCDMTXDEBUG +#if (defined(ARLCDMTXDEBUG)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + + +AREXPORT ArLCDMTX::ArLCDMTX (int lcdBoardNum, const char *name, + ArDeviceConnection *conn, + ArRobot *robot ) : + mySensorInterpTask (this, &ArLCDMTX::sensorInterp), + myConn (conn), + myName (name), + myBoardNum (lcdBoardNum), + myConnFailOption(false), + myFirmwareVersion(""), + myAriaExitCB (this, &ArLCDMTX::disconnect) +{ + + myInfoLogLevel = ArLog::Normal; + clear(); + setRobot (robot); + myRobotIdentifierChanged = false; + myRobotIdentifier[0] = '\0'; + + mySendTracking = false; + myRecvTracking = false; + + // now from the robot params - read each unit + // searching for the units configured for this + // board, then create the unit map + if (robot && robot->getRobotParams()) { + ArLog::log (ArLog::Normal, "%s::ArLCDMTX LCD board %d params", + getName(), myBoardNum); + } + Aria::addExitCallback (&myAriaExitCB, -10); + //myLogLevel = ArLog::Verbose; + //myLogLevel = ArLog::Terse; + myLogLevel = ArLog::Normal; + myRobotRunningAndConnected = false; + +} + + +AREXPORT ArLCDMTX::~ArLCDMTX() +{ + if (myRobot != NULL) { + myRobot->remSensorInterpTask (&myProcessCB); + } +} + + +AREXPORT void ArLCDMTX::setDeviceConnection ( + ArDeviceConnection *conn) +{ + myConn = conn; + myConn->setDeviceName(getName()); +} + +AREXPORT ArDeviceConnection *ArLCDMTX::getDeviceConnection (void) +{ + return myConn; +} + + +AREXPORT void ArLCDMTX::setRobot (ArRobot *robot) +{ + myRobot = robot; + + if ((robot != NULL) && (robot->getRobotParams())) { + + myConnFailOption = robot->getRobotParams()->getLCDMTXBoardConnFailOption (myBoardNum); + } + + // this is the code from the laser, i changed the priority to 20 from 90 + // also it puts in mysensorinterptask instead of myprocesscb + if (myRobot != NULL) { + myRobot->remSensorInterpTask (&mySensorInterpTask); + myRobot->addSensorInterpTask (myName.c_str(), 20, &mySensorInterpTask); + } +} + +void ArLCDMTX::clear (void) +{ + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; +} + +AREXPORT void ArLCDMTX::lcdSetName (const char *name) +{ + myName = name; + myDeviceMutex.setLogNameVar ("%s::myDeviceMutex", getName()); + myPacketsMutex.setLogNameVar ("%s::myPacketsMutex", getName()); + myDataMutex.setLogNameVar ("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar ("%s::exitCallback", getName()); + myDisconnectOnErrorCBList.setNameVar( + "%s::myDisconnectOnErrorCBList", myName.c_str()); + +} + +AREXPORT bool ArLCDMTX::disconnect (void) +{ + if (!isConnected()) + return true; + ArLog::log (ArLog::Normal, "%s: Disconnecting", getName()); + return true; +} + +AREXPORT int ArLCDMTX::getReadingCount() +{ + if (myTimeLastReading == time(NULL)) + return myReadingCount; + if (myTimeLastReading == time(NULL) - 1) + return myReadingCurrentCount; + return 0; +} + +AREXPORT void ArLCDMTX::internalGotReading(void) +{ + if (myTimeLastReading != time(NULL)) + { + myTimeLastReading = time(NULL); + myReadingCount = myReadingCurrentCount; + myReadingCurrentCount = 0; + } + myReadingCurrentCount++; + + myLastReading.setToNow(); + +} + +void ArLCDMTX::failedToConnect (void) +{ + ArLog::log (ArLog::Normal, + "%s:failedToConnect Cound not connect to lcd", + getName()); + myDeviceMutex.lock(); + myTryingToConnect = true; + myDeviceMutex.unlock(); +} + +void ArLCDMTX::sensorInterp (void) +{ + //ArLCDMTXPacket *packet; + ArRobotPacket *packet; + + while (1) { + myPacketsMutex.lock(); + if (myPackets.empty()) { + myPacketsMutex.unlock(); + return; + } + + packet = myPackets.front(); + myPackets.pop_front(); + myPacketsMutex.unlock(); + unsigned char *buf = (unsigned char *) packet->getBuf(); + + if (packet->getID() != KEEP_ALIVE) { + ArLog::log (ArLog::Normal, + "%s:sensorInterp Could not process packet, command invalid 0x%02x of %d length", + getName(), packet->getID() ,packet->getLength()); + + delete packet; + continue; + } + + myLastReading.setToNow(); + internalGotReading(); + + ArTime time = packet->getTimeReceived(); + +#if 0 // for raw trace + + char obuf[256]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength() - 2; i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "%s::sensorInterp() packet = %s",getName(), obuf); +#endif + + myDeviceMutex.lock(); + + myDeviceMutex.unlock(); + delete packet; + + } // end while +} + + +AREXPORT bool ArLCDMTX::blockingConnect (bool sendTracking, bool recvTracking, + int lcdNumber, ArFunctor1 *onCallback, + ArFunctor1 *offCallback) +{ + + mySendTracking = sendTracking; + myRecvTracking = recvTracking; + + + myDeviceMutex.lock(); + if (myConn == NULL) { + ArLog::log (ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getName()); + myDeviceMutex.unlock(); + failedToConnect(); + return false; + } + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (myConn); + if (serConn != NULL) + serConn->setBaud (115200); + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log ( + ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getName()); + myDeviceMutex.unlock(); + failedToConnect(); + return false; + } + +//myRecvTracking = true; +//mySendTracking = true; + myReceiver = new ArRobotPacketReceiver(myConn, true, HEADER1, HEADER2, + myRecvTracking, + "ArLCDMTX"); + + mySender = new ArRobotPacketSender(myConn, HEADER1, HEADER2, + mySendTracking, + "ArLCDMTX"); + + myTryingToConnect = true; + myDeviceMutex.unlock(); + ArTime timeDone; + if (!timeDone.addMSec (30 * 1000)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() error adding msecs (30 * 1000)", + getName()); + } + + bool stopSent = false; + bool versionVerified = false; + bool sysInfoVerified = false; + ArRobotPacket *packet; + + do { + + // first have the lcd stop sending + // ???? not sure if there's a response to this + if ((!stopSent) && (!sendSystemInfo (SYS_INFO_STOP))) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send system info request to LCD", getName()); + failedToConnect(); + return false; + } + + stopSent = true; + + ArUtil::sleep(300); + + if (!versionVerified) { + if (!sendVersion ()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send version request to LCD", getName()); + failedToConnect(); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, "%s::blockingConnect() Did not get response to version request (%d) - resending", + getName(), timeDone.mSecTo()); + continue; + } + + unsigned char *versionBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if (versionBuf[3] != VERSION) { + + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Invalid response from lcd to send version (0x%x)", + getName(), versionBuf[3]); + delete packet; + continue; + } else { + + char tempBuf[256]; + + snprintf(tempBuf, sizeof(tempBuf), "%s", &versionBuf[4]); + myFirmwareVersion = tempBuf; + + ArLog::log (ArLog::Normal, "%s::blockingConnect() LCD firmware version = %s", + getName(), myFirmwareVersion.c_str()); + delete packet; + + } + + // if the version dosn't verify - we'll need to download new firmware + + if (verifyFwVersion()) { + + // power cycle the HMI + + if (offCallback != NULL) + offCallback->invoke(lcdNumber); + + ArUtil::sleep(3000); + + if (onCallback != NULL) + onCallback->invoke(lcdNumber); + + downloadFirmware(); + + } + } + versionVerified = true; + + // send a system info + + if (!sysInfoVerified) { + if (!sendSystemInfo (SYS_INFO_ONCE)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send sys info request to LCD", getName()); + failedToConnect(); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, "%s::blockingConnect() Did not get response to sys info request (%d) - resending", + getName(), timeDone.mSecTo()); + continue; + } + + unsigned char *sysInfoBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if (sysInfoBuf[3] != SYSTEM_INFO) { + + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Invalid response from lcd to send system info (0x%x)", + getName(), sysInfoBuf[3]); + delete packet; + continue; + } else { + + myStatusFlags = sysInfoBuf[4]; + myCurrentScreen = sysInfoBuf[5]; + + ArLog::log (ArLog::Normal, "%s::blockingConnect() LCD status flag = %d current screen = %d", + getName(), myStatusFlags, myCurrentScreen); + delete packet; + + } + } + + sysInfoVerified = true; + + if (!sendKeepAlive ()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send keep alive request to LCD", getName()); + failedToConnect(); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, "%s::blockingConnect() Did not get response to keep alive request (%d) - resending", + getName(), timeDone.mSecTo()); + continue; + } + + unsigned char keepAliveCmd = packet->bufToByte(); + + // verify + if (keepAliveCmd != KEEP_ALIVE) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Invalid response from lcd to send keep alive (0x%x)", + getName(), keepAliveCmd); + delete packet; + continue; + } else { + delete packet; + myIsConnected = true; + myTryingToConnect = false; + ArLog::log (ArLog::Normal, "%s::blockingConnect() Connection successful", + getName()); + + myLastReading.setToNow(); + + runAsync(); + return true; + } + } while (timeDone.mSecTo() >= 0); + + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send keep alive Request to LCD", getName()); + failedToConnect(); + return false; + +} // end blockingConnect + +AREXPORT const char * ArLCDMTX::getName (void) const +{ + return myName.c_str(); +} + +AREXPORT void * ArLCDMTX::runThread (void *arg) +{ + + + ArRobotPacket *packet; + + // initialize the variouse settable values + myScreenNumberChanged = false; + myBootTextChanged = false; + myChangedBootText[0] = '\0'; + myMainScreenStatusChanged = false; + myChangedStatusText[0] = '\0'; + myMainScreenModeChanged = false; + myChangedModeText[0] = '\0'; + myBackLightChanged = false; + myIpAddress = "0.0.0.0"; + + getIpAddress(); + + setRobotIPStatus(myIpAddress.c_str()); + ArUtil::sleep(300); + + /* test code + std::string buf = "going to goal x"; + std::string buf1 = "goal seeking"; + std::string buf2 = "Aram is startup up..."; + + setMTXLCDMainScreenStatus(buf.c_str()); + + setMTXLCDMainScreenMode(buf1.c_str()); + + setMTXLCDBootScreenText(buf2.c_str()); + + setMTXLCDBackLight(true); + + setMTXLCDScreenNumber(1); + */ + +while (getRunning() ) +{ + + if (myRobotIdentifierChanged) { + setRobotIdStatus(myRobotIdentifier.c_str()); + myRobotIdentifierChanged = false; + ArUtil::sleep(300); + } + + if (myScreenNumberChanged) { + setScreenNumber(myChangedScreenNumber); + myScreenNumberChanged = false; + ArUtil::sleep(300); + } + + if (myBackLightChanged) { + setBacklight(myChangedBackLight); + myBackLightChanged = false; + ArUtil::sleep(300); + } + + if (myBootTextChanged) { + setBootStatus(myChangedBootText); + myBootTextChanged = false; + myChangedBootText[0] = '\0'; + ArUtil::sleep(300); + } + + if (myMainScreenStatusChanged) { + setMainStatus(myChangedStatusText); + myMainScreenStatusChanged = false; + myChangedStatusText[0] = '\0'; + ArUtil::sleep(300); + } + + if (myMainScreenModeChanged) { + setTextStatus(myChangedModeText); + myMainScreenModeChanged = false; + myChangedModeText[0] = '\0'; + ArUtil::sleep(300); + } + + + if (!setSystemMeters(getBatteryPercentage(), getWifiPercentage())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setSystemMeters failed", getName())); + } + + ArUtil::sleep(300); + + + if (!sendKeepAlive()) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to sendKeepAlive failed", getName())); + } + + while (getRunning() && myIsConnected && + (packet = myReceiver->receivePacket (500)) != NULL) { + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && checkLostConnection() ) { + ArLog::log (ArLog::Terse, + "%s::runThread() Lost connection to the MTX lcd because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + if (myConnFailOption) + disconnectOnError(); + continue; + } + +} + // if we have a robot but it isn't running yet then don't have a + // connection failure + /* MPL PS TODO This should lose connection if we + haven't heard from it in long enough... but this is + loosing connection anytime we lose one packet + (which'll always happen sometimes on serial). + if (getRunning() && myIsConnected) { + //ArLog::log (ArLog::Normal, + // "%s::runThread() Lost connection to the lcd because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + // myLastReading.mSecSince() / 1000.0, + // getConnectionTimeoutSeconds() ); + ArLog::log (ArLog::Normal, + "%s::runThread() Lost connection to the lcd because of error %d %d", getName(), getRunning(), myIsConnected); + myIsConnected = false; + //laserDisconnectOnError(); + continue; + } + */ + //ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(300); + + return NULL; +} + + +#if 0 // debug runthread code +AREXPORT void * ArLCDMTX::runThread (void *arg) +{ + //ArLCDMTXPacket *packet; + ArRobotPacket *packet; + unsigned char wifi; + unsigned char battery; + bool lightstat = true; + + char text1[10000]; + std::string buf = "going to goal x"; + std::string buf1 = "goal seaking"; + std::string buf2 = "Aram is startup up..."; + std::string buf3 = "Nopey"; + std::string buf4 = "10.0.152.155"; + + + unsigned char screenNum; + unsigned char batt; + unsigned char wi; + + + +ArUtil::sleep(300); + + + if (!setScreenNumber(STATUS_SCREEN)) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setScreenNumber failed", getName())); + } + +ArUtil::sleep(300); + + if (!getScreenNumber(&screenNum)) + ArLog::log (ArLog::Normal, + "%s::runThread() call to getScreenNum failed", getName()); + else + ArLog::log (ArLog::Normal, + "%s::runThread() current screen num = %d", getName(), screenNum); + + + int mod; + int cnt = 0; + + +ArUtil::sleep(300); + + if (!setTextStatus(buf1.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setTextStatus failed", getName())); + } + +ArUtil::sleep(300); + + if (!setMainStatus(buf.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setMainStatus failed", getName())); + } + + +ArUtil::sleep(300); + + if (!setBootStatus(buf2.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setBootStatus failed", getName())); + } + +ArUtil::sleep(300); + + if (!setRobotIdStatus(buf3.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setRobotIdStatus failed", getName())); + } +ArUtil::sleep(300); + + if (!setRobotIPStatus(buf4.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setRobotIPStatus failed", getName())); + } + +ArUtil::sleep(300); + +while (getRunning() ) +{ + +//#if 0 + if (mod++ % 100 == 0) { + +// #if 0 + text1[0] = '\0'; + if (!getBootStatus(&text1[0])) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to getBootStatus failed", getName())); + } + else { + ArLog::log (ArLog::Normal, + "%s::runThread() Boot Status \"%s\" ", getName(), text1); + text1[0] = '\0'; + } + +ArUtil::sleep(300); + + if (!getMainStatus(&text1[0])) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to getMainStatus failed", getName())); + } + else { + ArLog::log (ArLog::Normal, + "%s::runThread() Main Status \"%s\" ", getName(), text1); + text1[0] = '\0'; + } + +ArUtil::sleep(300); + + if (!getTextStatus(&text1[0])) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to getTextStatus failed", getName())); + } + else { + ArLog::log (ArLog::Normal, + "%s::runThread() Text Status \"%s\" ", getName(), text1); + text1[0] = '\0'; + } + +ArUtil::sleep(300); + + +//#endif +/* + if (cnt == 0) { + if (!setTextStatus(buf.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setTextStatus failed", getName())); + } + + if (!getTextStatus(&text1[0])) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to getTextStatus failed", getName())); + } + else { + ArLog::log (ArLog::Normal, + "%s::runThread() Text Status \"%s\" ", getName(), text1); + text1[0] = '\0'; + } + + cnt = 1; + } + else if (cnt == 1) { + + if (!setMainStatus(buf1.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setMainStatus failed", getName())); + } + + if (!getMainStatus(&text1[0])) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to getMainStatus failed", getName())); + } + else { + ArLog::log (ArLog::Normal, + "%s::runThread() Main Status \"%s\" ", getName(), text1); + text1[0] = '\0'; + } + + cnt = 2; + } + else { + + if (!setBootStatus(buf2.c_str())) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setBootStatus failed", getName())); + } + + if (!getBootStatus(&text1[0])) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to getBootStatus failed", getName())); + } + else { + ArLog::log (ArLog::Normal, + "%s::runThread() Boot Status \"%s\" ", getName(), text1); + + text1[0] = '\0'; + } + + cnt = 0; + } +*/ + + if (!getScreenNumber(&screenNum)) + ArLog::log (ArLog::Normal, + "%s::runThread() call to getScreenNum failed", getName()); + else + ArLog::log (ArLog::Normal, + "%s::runThread() current screen num = %d", getName(), screenNum); + + + + +/* +ArUtil::sleep(300); + + if (!setBacklight(lightstat)) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setBacklight failed", getName())); + } + + // just using lightstat here as it's 0 or 1 for the 2 screens + if (!setScreenNumber(lightstat)) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setScreenNumber failed", getName())); + } + + + if (lightstat) + lightstat = false; + else + lightstat = true; + + +ArUtil::sleep(1000); + + unsigned char backlight; + if (!getBacklight(&backlight)) + ArLog::log (ArLog::Normal, + "%s::runThread() call to getBacklight failed", getName()); + else + ArLog::log (ArLog::Normal, + "%s::runThread() current backlight = %d", getName(), backlight); + +ArUtil::sleep(300); +*/ + if (!getSystemMeters(&batt, &wi)) + ArLog::log (ArLog::Normal, + "%s::runThread() call to getSystemMeters failed", getName()); + else + ArLog::log (ArLog::Normal, + "%s::runThread() current battery = %d wifi = %d", getName(), batt, wi); + + wifi = getWifiPercentage(); + battery = getBatteryPercentage(); + +ArUtil::sleep(300); + + if (!setSystemMeters(battery, wifi)) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to setSystemMeters failed", getName())); + } + } +//#endif + + + + + if (!sendKeepAlive()) { + IFDEBUG(ArLog::log (ArLog::Normal, + "%s::runThread() call to sendKeepAlive failed", getName())); + } + + while (getRunning() && myIsConnected && + (packet = myReceiver->receivePacket (500)) != NULL) { + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && checkLostConnection() ) { + ArLog::log (ArLog::Terse, + "%s::runThread() Lost connection to the MTX lcd because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + if (myConnFailOption) + disconnectOnError(); + continue; + } + +} + // if we have a robot but it isn't running yet then don't have a + // connection failure + /* MPL PS TODO This should lose connection if we + haven't heard from it in long enough... but this is + loosing connection anytime we lose one packet + (which'll always happen sometimes on serial). + if (getRunning() && myIsConnected) { + //ArLog::log (ArLog::Normal, + // "%s::runThread() Lost connection to the lcd because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + // myLastReading.mSecSince() / 1000.0, + // getConnectionTimeoutSeconds() ); + ArLog::log (ArLog::Normal, + "%s::runThread() Lost connection to the lcd because of error %d %d", getName(), getRunning(), myIsConnected); + myIsConnected = false; + //laserDisconnectOnError(); + continue; + } + */ + //ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(300); + + return NULL; +} +#endif + +/** + This will check if the lcd has lost connection. If there is no + robot it is a straightforward check of last reading time against + getConnectionTimeoutSeconds. If there is a robot then it will not + start the check until the lcd is running and connected. +**/ +AREXPORT bool ArLCDMTX::checkLostConnection(void) +{ + + if ((myRobot == NULL || myRobotRunningAndConnected) && + getConnectionTimeoutSeconds() > 0 && + myLastReading.mSecSince() > getConnectionTimeoutSeconds() * 1000) + return true; + + if (!myRobotRunningAndConnected && myRobot != NULL && + myRobot->isRunning() && myRobot->isConnected()) + { + myRobotRunningAndConnected = true; + myLastReading.setToNow(); + } + + return false; +} + +AREXPORT void ArLCDMTX::disconnectOnError(void) +{ + ArLog::log(ArLog::Normal, "%s: Disconnected because of error", getName()); + myDisconnectOnErrorCBList.invoke(); +} + +AREXPORT bool ArLCDMTX::sendKeepAlive() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (KEEP_ALIVE); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendKeepAlive() Could not send keep alive request to LCD", getName()); + return false; + } + + //IFDEBUG ( +// + // ArLog::log (ArLog::Normal, + // "%s::sendKeepAlive() keep alive sent to LCD", + // getName()); + + //); // end IFDEBUG + + return true; + +} + +AREXPORT bool ArLCDMTX::sendVersion() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (VERSION); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendVersion() Could not send version request to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendVersion() version sent to LCD", + getName()); + + ); // end IFDEBUG + + return true; + +} + +AREXPORT bool ArLCDMTX::sendSystemInfo(unsigned char command) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SYSTEM_INFO); + sendPacket.byteToBuf(command); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSystemInfo() Could not send sys info request to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSystemInfo() sys info sent to LCD", + getName()); + + ); // end IFDEBUG + + return true; + +} + +AREXPORT bool ArLCDMTX::sendReboot() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (REBOOT); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendReboot() Could not send reboot request to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendReboot() reboot sent to LCD", + getName()); + + ); // end IFDEBUG + + return true; + +} + + +AREXPORT bool ArLCDMTX::getTextField(unsigned char textNumber, char *text) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_TEXT_FIELD); + sendPacket.byteToBuf(textNumber); + + for (int i = 0; i < 5; i++) { + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::getTextField() Could not send get text field request to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::getTextField() get text field sent to LCD", + getName()); + + ); // end IFDEBUG + + ArRobotPacket *packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getTextField() No response to get text field - resending (%d)", + getName(), i); + delete packet; + continue; + } + + unsigned char *textFieldBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if ((textFieldBuf[3] != GET_TEXT_FIELD) || (textFieldBuf[4] != textNumber)) { + ArLog::log (ArLog::Normal, + "%s::getTextField() Invalid response from lcd to get text field status (0x%x) text # %d in text # %d", + getName(), textFieldBuf[3], textFieldBuf[4], textNumber); + continue; + + } else { + + + char tempBuf[256]; + + snprintf(tempBuf, sizeof(tempBuf), "%s", &textFieldBuf[5]); + strcpy(text, tempBuf); + + delete packet; + return true; + } + } // endfor + + return false; + +} + + + +AREXPORT bool ArLCDMTX::getScreenNumber(unsigned char *currentScreenNumber) + +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_CURRENT_SCREEN_NUM); + + for (int i = 0; i < 5; i++) { + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::getScreenNumber() Could not send get screen number to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::getScreenNumber() get screen number sent to LCD", + getName()); + + ); // end IFDEBUG + + + ArRobotPacket *packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getScreenNumber() No response to get screen number - resending (%d)", + getName(), i); + delete packet; + continue; + } + + unsigned char *screenStatusBuf = (unsigned char *) packet->getBuf(); + + // verify get num + if (screenStatusBuf[3] != GET_CURRENT_SCREEN_NUM) { + ArLog::log (ArLog::Normal, + "%s::getScreenNumber() Invalid response from lcd to get screen number (0x%x)", + getName(), screenStatusBuf[3]); + continue; + + } else { + *currentScreenNumber = screenStatusBuf[4]; + delete packet; + return true; + } + } // endfor + + return false; + +} + +AREXPORT bool ArLCDMTX::getBacklight(unsigned char *backlight) + +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_BACKLIGHT); + + for (int i = 0; i < 5; i++) { + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::getBacklight() Could not send get backlight to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::getBacklight() get backlight sent to LCD", + getName()); + + ); // end IFDEBUG + + + ArRobotPacket *packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getBacklight() No response to get backlight - resending (%d)", + getName(), i); + delete packet; + continue; + } + + unsigned char *backlightBuf = (unsigned char *) packet->getBuf(); + + // verify + if (backlightBuf[3] != GET_BACKLIGHT) { + ArLog::log (ArLog::Normal, + "%s::getBacklight() Invalid response from lcd to get backlight (0x%x)", + getName(), backlightBuf[3]); + continue; + + } else { + *backlight = backlightBuf[4]; + delete packet; + return true; + } + } // endfor + + return false; + +} + +AREXPORT bool ArLCDMTX::getSystemMeters(unsigned char *battery, unsigned char *wifi) + +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_SYSTEM_METERS); + + for (int i = 0; i < 5; i++) { + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::getSystemMeters() Could not send get system meters to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::getSystemMeters() get system meters sent to LCD", + getName()); + + ); // end IFDEBUG + + + ArRobotPacket *packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::getSystemMeters() No response to get system meters - resending (%d)", + getName(), i); + delete packet; + continue; + } + + unsigned char *systemMetersBuf = (unsigned char *) packet->getBuf(); + + // verify + if (systemMetersBuf[3] != GET_SYSTEM_METERS) { + ArLog::log (ArLog::Normal, + "%s::getSystemMeters() Invalid response from lcd to get system meters (0x%x)", + getName(), systemMetersBuf[3]); + continue; + + } else { + *battery = systemMetersBuf[4]; + *wifi = systemMetersBuf[5]; + delete packet; + return true; + } + } // endfor + + return false; + +} + +AREXPORT bool ArLCDMTX::setScreenNumber(unsigned char screenNumber) +{ + if ((screenNumber == BOOT_SCREEN) || (screenNumber == STATUS_SCREEN)) { + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_SCREEN_NUM); + sendPacket.byteToBuf(screenNumber); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::setScreenNumber() Could not send set screen number to LCD", getName()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::setScreenNumber() set screen number %d sent to LCD", + getName(), screenNumber); + + ); // end IFDEBUG + + return true; + } + else { // bad screen number + ArLog::log (ArLog::Normal, + "%s::setScreenNumber() Invalid screen number %d", getName(), screenNumber); + return false; + } +} + +AREXPORT bool ArLCDMTX::setTextField(unsigned char textNumber, const char *text) +{ + + + if ((textNumber == BOOT_STATUS_TEXT) || + (textNumber == MAIN_STATUS_TEXT) || + (textNumber == MODE_TEXT) || + (textNumber == ROBOT_ID_TEXT) || + (textNumber == ROBOT_IP_TEXT)) { + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_TEXT_FIELD); + sendPacket.byteToBuf(textNumber); + sendPacket.strToBuf(text); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::setTextField() Could not send mode %d set text field \"%s\" to LCD", + getName(), textNumber, text); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::setTextField() mode %d text \"%s\" field sent to LCD", + getName(), textNumber, text); + + ); // end IFDEBUG + + return true; + } + else { // bad text number + ArLog::log (ArLog::Normal, + "%s::setTextField() Invalid mode %d", getName(), textNumber); + return false; + } +} + +AREXPORT bool ArLCDMTX::setBacklight(bool backlight) +{ + + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_BACKLIGHT); + if (backlight) + sendPacket.byteToBuf(99); + else + sendPacket.byteToBuf(0); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::setBacklight() Could not send set backlight %d to LCD", + getName(), backlight); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::setBacklight() set backlight %d sent to LCD", + getName(), backlight); + + ); // end IFDEBUG + + return true; + +} + + +AREXPORT bool ArLCDMTX::setSystemMeters(unsigned char battery, unsigned char wifi) +{ + + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_BATTERY_WIFI); + sendPacket.byteToBuf(battery); + sendPacket.byteToBuf(wifi); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::setSystemMeters() Could not send set system meters %d %d to LCD", + getName(), battery, wifi); + return false; + } + + /* + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::setSystemMeters() set system meters %d %d sent to LCD", + getName(), battery, wifi); + + ); // end IFDEBUG + */ + + return true; + +} + + +AREXPORT void ArLCDMTX::writeToLCD() +{ + + +#if 0 + // grab the status + ArServerMode *netMode; + if ((netMode = ArServerMode::getActiveMode()) != NULL) + { + ArLog::log (ArLog::Normal, + "%s::writeToLCD status = %s", getName(), netMode->getStatus()); + } + else + { + ArLog::log (ArLog::Normal, + "%s::writeToLCD could not get status"); + + } +#endif +} + +AREXPORT unsigned char ArLCDMTX::getBatteryPercentage() +{ + if (myRobot->haveStateOfCharge()) + return myRobot->getStateOfCharge(); + else { + ArLog::log (ArLog::Normal, + "%s::getBatteryPercentage() State of charge not available setting it to 0", + getName()); + return 0; + } +} + +AREXPORT unsigned char ArLCDMTX::getWifiPercentage() +{ + + return 0; +} + +AREXPORT void ArLCDMTX::getIpAddress() +{ + + char ip[1000]; + sprintf(ip, "%d.%d.%d.%d", + 0, //ArSystemStatus::getMTXWirelessIpAddress1(), + 0, //ArSystemStatus::getMTXWirelessIpAddress2(), + 0, //ArSystemStatus::getMTXWirelessIpAddress3(), + 0 //ArSystemStatus::getMTXWirelessIpAddress4() + ); + + myIpAddress = ip; + +} + +AREXPORT bool ArLCDMTX::setMainStatus(const char *status) +{ +#if 0 + if (!setScreenNumber(STATUS_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::setMainStatus() can not set screen number", + getName()); + return false; + } +#endif + + if (!setTextField(MAIN_STATUS_TEXT, status)) { + ArLog::log (ArLog::Normal, + "%s::setMainStatus() can not set status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::setMainStatus() set status successful = %s", + getName(), status)); + + return true; + + +} + +AREXPORT bool ArLCDMTX::setTextStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(STATUS_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::setTextStatus() can not set screen number", + getName()); + return false; + } +#endif + if (!setTextField(MODE_TEXT, status)) { + ArLog::log (ArLog::Normal, + "%s::setTextStatus() can not set status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::setTextStatus() set status successful = %s", + getName(), status)); + + return true; + +} + + +AREXPORT bool ArLCDMTX::setRobotIdStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(STATUS_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::setRobotIdStatus() can not set screen number", + getName()); + return false; + } +#endif + if (!setTextField(ROBOT_ID_TEXT, status)) { + ArLog::log (ArLog::Normal, + "%s::setRobotIdStatus() can not set status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::setRobotIdStatus() set status successful = %s", + getName(), status)); + + return true; + +} + +AREXPORT bool ArLCDMTX::setRobotIPStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(STATUS_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::setRobotIPStatus() can not set screen number", + getName()); + return false; + } +#endif + if (!setTextField(ROBOT_IP_TEXT, status)) { + ArLog::log (ArLog::Normal, + "%s::setRobotIdStatus() can not set status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::setRobotIPStatus() set status successful = %s", + getName(), status)); + + return true; + +} + + +AREXPORT bool ArLCDMTX::setBootStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(BOOT_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::setBootStatus() can not set screen number", + getName()); + return false; + } +#endif + + ArLog::log(ArLog::Normal, "%s:setBootStatus: (BOOT_STATUS_TEXT) text '%s'", + getName(), status); + + + if (!setTextField(BOOT_STATUS_TEXT, status)) { + ArLog::log (ArLog::Normal, + "%s::setBootStatus() can not set status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::setBootStatus() set status successful = %s", + getName(), status)); + + return true; +} + + +AREXPORT bool ArLCDMTX::getMainStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(STATUS_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::getMainStatus() can not set screen number", + getName()); + return false; + } +#endif + + if (!getTextField(MAIN_STATUS_TEXT, (char *)status)) { + ArLog::log (ArLog::Normal, + "%s::getMainStatus() can not get status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::getMainStatus() get status successful = %s", + getName(), status)); + + return true; + + +} +AREXPORT bool ArLCDMTX::getTextStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(STATUS_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::getTextStatus() can not set screen number", + getName()); + return false; + } +#endif + + + if (!getTextField(MODE_TEXT, (char *)status)) { + ArLog::log (ArLog::Normal, + "%s::getTextStatus() can not get status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::getTextStatus() get status successful = %s", + getName(), status)); + + return true; + +} + +AREXPORT bool ArLCDMTX::getBootStatus(const char *status) +{ + +#if 0 + if (!setScreenNumber(BOOT_SCREEN)) { + ArLog::log (ArLog::Normal, + "%s::getBootStatus() can not set screen number", + getName()); + return false; + } +#endif + + if (!getTextField(BOOT_STATUS_TEXT, (char *)status)) { + ArLog::log (ArLog::Normal, + "%s::getBootStatus() can not get status", + getName()); + return false; + } + + IFDEBUG( ArLog::log (ArLog::Normal, + "%s::getBootStatus() get status successful = %s", + getName(), status)); + + return true; +} + + +AREXPORT bool ArLCDMTX::verifyFwVersion() +{ + + // now make sure we have a file + + std::string hmiFile; + hmiFile.clear(); + + char hmiFilePrefix[100]; + hmiFilePrefix[0] = '\0'; + std::string baseDir = "/usr/local/apps/marcDownload/"; + + sprintf(hmiFilePrefix,"AdeptHmi"); + + hmiFile = searchForFile(baseDir.c_str(), hmiFilePrefix, ".ds"); + + char hmiFileOut[100]; + hmiFileOut[0] = '\0'; + + if (hmiFile.empty()) { + ArLog::log(ArLog::Normal, + "%s::verifyFwVersion() can't find hmi file with prefix = %s", + getName(), hmiFilePrefix); + return false; + } + else { + // validate that the file dosn't match the current version + + sprintf(hmiFileOut,"AdeptHmi_%s.ds", + myFirmwareVersion.c_str()); + + if (strcmp(hmiFile.c_str(), hmiFileOut) != 0) { + myNewFwFile = baseDir + hmiFile; + ArLog::log(ArLog::Normal, + "%s::verifyFwVersion() versions mismatch %s %s", + getName(), hmiFileOut, hmiFile.c_str()); + return true; + } + else { + ArLog::log(ArLog::Normal, + "%s::verifyFwVersion() hmi file found but version matches (%s)", + getName(), hmiFileOut); + return false; + } + } + + return false; +} + + +AREXPORT bool ArLCDMTX::downloadFirmware() +{ + + + + // now connect to the serial port + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (myConn); + if (serConn != NULL) + serConn->setBaud (115200); + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log ( + ArLog::Normal, + "%s::downloadFirmware() Could not connect because the connection was not open and could not open it", + getName()); + + return false; + } + + + + // now send hello - and see if we get a response + + unsigned char hello = 0xc1; + + //// ArBasePacket *packet; + // while ((packet = readPacket()) != NULL) + + ArTime timeDone; + + if (!timeDone.addMSec(30 * 1000)) + { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() error adding msecs (30 * 1000)", + getName()); + } + + unsigned char helloResp[4]; + bool gotResponse= false; + int hmiVersion = 0; + int hmiRevision = 0; + + while (timeDone.mSecTo() > 0) { + + if ((myConn->write((char *)&hello, 1)) == -1) { + + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() Could not send hello to LCD", getName()); + return false; + } + + if ((myConn->read((char *) &helloResp[0], 4, 500)) > 0) { + + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() received hello response 0x%02x 0x%02x 0x%02x 0x%02x", + getName(), helloResp[0], helloResp[1], helloResp[2], helloResp[3] ); + + if ((helloResp[0] == 0xc0) && (helloResp[3] == 0x4b)) { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() received hello response", + getName()); + + gotResponse = true; + hmiVersion = helloResp[1]; + hmiRevision = helloResp[2]; + + break; + + } + + } + else { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() read failed", + getName()); + + } + } + + if (!gotResponse) { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() Received no hello response", getName()); + return false; + } + + + + FILE *file; + char line[10000]; + unsigned char c; + + if ( (file = ArUtil::fopen (myNewFwFile.c_str(), "r")) == NULL) { + ArLog::log (ArLog::Normal, + "%s::downloadFirmware() Could not open file %s for reading errno (%d)", + getName(), myNewFwFile.c_str(), errno); + return false; + } + + line[0] = '\0'; + + ArLog::log (ArLog::Normal, + "%s::downloadFirmware() Updating LCD firmware....", + getName()); + + while (fgets (line, sizeof (line), file) != NULL) { + + ArArgumentBuilder builder; + builder.add(line); + + int i; + + std::string data; + data.clear(); + + for (i = 0; i < builder.getArgc(); i++) { + + if (!builder.isArgInt(i, true)) { + + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() Could not convert file", getName()); + return false; + + } + + char ch = builder.getArgInt(i, NULL, true); + data.push_back(ch); + + + + } // end for + + + //ArLog::log(ArLog::Normal, + // "%s::downloadFirmware() data = %s size = %d", getName(), data.c_str(), data.size()); + + //ArLog::log(ArLog::Normal, + // "%s::downloadFirmware() %d %c 0x%02x", getName(), data, data, data); + if ((myConn->write((char *)data.c_str(), data.size())) == -1) { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() Could not send data size(%d) to LCD errno (%d)", getName(), data.length(), errno); + return false; + } + + + // wait a sec for the response + if ((myConn->read((char *) &c, 1, 1000)) > 0) { + + if (c == 0x4b) + continue; + else { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() Invalid response %x02%x from LCD to load data", + getName(), c); + return false; + } + + } + else { + ArLog::log(ArLog::Normal, + "%s::downloadFirmware() Did not get response from LCD to load data", getName()); + return false; + + } + + } // end while + if (feof(file)) { + // end of file reached + ArLog::log (ArLog::Normal, + "%s::downloadFirmware() LCD firmware updated", + getName()); + fclose (file); + + ArUtil::sleep(5000); + + // now reconnect to the serial port + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (myConn); + if (serConn != NULL) + serConn->setBaud (115200); + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log ( + ArLog::Normal, + "%s::downloadFirmware() Could not connect because the connection was not open and could not open it", + getName()); + + return false; + } + else { + ArLog::log ( + ArLog::Normal, + "%s::downloadFirmware() Reestablished the serial connection", + getName()); + } + // need to go get the latest fw version ?? - probably not - just use the one from the file + + + if (!sendVersion ()) { + ArLog::log (ArLog::Normal, + "%s::downloadFirmware() Could not send version request to LCD", getName()); + return false; + } + + ArRobotPacket *packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, "%s::downloadFirmware() Did not get response to version request (%d) - resending", + getName(), timeDone.mSecTo()); + return false; + } + + unsigned char *versionBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if (versionBuf[3] != VERSION) { + + ArLog::log (ArLog::Normal, + "%s::downloadFirmware() Invalid response from lcd to send version (0x%x)", + getName(), versionBuf[3]); + delete packet; + return false; + } else { + + char tempBuf[256]; + + snprintf(tempBuf, sizeof(tempBuf), "%s", &versionBuf[4]); + myFirmwareVersion = tempBuf; + + ArLog::log (ArLog::Normal, "%s::downloadFirmware() LCD firmware version = %s", + getName(), myFirmwareVersion.c_str()); + delete packet; + + } + + return true; + + } + else { + + ArLog::log (ArLog::Normal, + "%s::downloadFirmware() failed updating LCD firmware", + getName()); + fclose (file); + + return false; + + } +} + + +AREXPORT std::string ArLCDMTX::searchForFile( + const char *dirToLookIn, const char *prefix, const char *suffix) +{ + + /*** + ArLog::log(ArLog::Normal, + "ArUtil::matchCase() dirToLookIn = \"%s\" fileName = \"%s\"", + dirToLookIn, + fileName); + ***/ + + DIR *dir; + struct dirent *ent; + + /* + for (it = split.begin(); it != split.end(); it++) + { + printf("@@@@@@@@ %s\n", (*it).c_str()); + } + */ + + // how this works is we start at the base dir then read through + // until we find what the next name we need, if entry is a directory + // and we're not at the end of our string list then we change into + // that dir and the while loop keeps going, if the entry isn't a + // directory and matchs and its the last in our string list we've + // found what we want + if ((dir = opendir(dirToLookIn)) == NULL) + { + ArLog::log(ArLog::Normal, + "AramUtil::findFile: No such directory '%s' for base", + dirToLookIn); + return ""; + } + + while ((ent = readdir(dir)) != NULL) + { + // ignore some of these + if (ent->d_name[0] == '.') + { + //printf("Ignoring %s\n", ent->d_name[0]); + continue; + } + //printf("NAME %s finding %s\n", ent->d_name, finding.c_str()); + + // continue if the prefix should be searched for and doesn't match + if (prefix != NULL && prefix[0] != '\0' && + strncasecmp(ent->d_name, prefix, strlen(prefix)) != 0) + continue; + + // continue if the suffix should be searched for and doesn't match + if (suffix != NULL && suffix[0] != '\0' && + strlen(ent->d_name) > strlen(suffix) + 1 && + strncasecmp(&ent->d_name[strlen(ent->d_name) - strlen(suffix)], + suffix, strlen(suffix)) != 0) + continue; + + std::string ret = ent->d_name; + closedir(dir); + return ret; + } + //printf("!!!!!!!! %s", finding.c_str()); + closedir(dir); + return ""; +} + +AREXPORT bool ArLCDMTX::setMTXLCDMainScreenText(const char *status) +{ + + if (strlen(status) < 248) { + myMainScreenStatusChanged = true; + strcpy(myChangedStatusText, status); + return true; + } + + ArLog::log (ArLog::Normal, + "%s::setMTXLCDMainScreenMode invalid string length (%d) needs to be < 248", + getName(), strlen(status)); + return false; + + +} + +/* +AREXPORT bool ArLCDMTX::setMTXLCDMainScreenMode(const char *status) +{ + + if (strlen(status) < 248) { + myMainScreenModeChanged = true; + strcpy(myChangedModeText, status); + return true; + } + + ArLog::log (ArLog::Normal, + "%s::setMTXLCDMainScreenMode invalid string length (%d) needs to be < 248", + getName(), strlen(status)); + return false; + +} +*/ + +AREXPORT bool ArLCDMTX::setMTXLCDBootScreenText(const char *status) + +{ + + + if (strlen(status) < 248) { + myBootTextChanged = true; + strcpy(myChangedBootText, status); + return true; + } + + ArLog::log (ArLog::Normal, + "%s::setMTXLCDBootScreenText() invalid string length (%d) needs to be < 248", + getName(), strlen(status)); + return false; + +} + +AREXPORT bool ArLCDMTX::setMTXLCDScreenNumber(unsigned char screenNumber) +{ + + if ((screenNumber == BOOT_SCREEN) || (screenNumber == STATUS_SCREEN)) { + + myScreenNumberChanged = true; + myChangedScreenNumber = screenNumber; + return true; + } + + ArLog::log (ArLog::Normal, + "%s::setMTXLCDScreenNumber() invalid screen number %d", + getName(), screenNumber); + return false; + +} + +AREXPORT bool ArLCDMTX::setMTXLCDBackLight(bool backLight) +{ + + myBackLightChanged = true; + myChangedBackLight = backLight; + return true; + +} + +AREXPORT void ArLCDMTX::setIdentifier(const char *identifier) +{ + myRobotIdentifierChanged = true; + myRobotIdentifier = identifier; + +} + +AREXPORT bool ArLCDMTX::internalMTXLCDOverrideMainScreenText(const char *status) +{ + myMainScreenStatusChanged = false; + return setMainStatus(status); +} + +AREXPORT bool ArLCDMTX::internalMTXLCDOverrideBootScreenText(const char *status) +{ + myBootTextChanged = false; + return setBootStatus(status); +} + +AREXPORT bool ArLCDMTX::internalMTXLCDOverrideBacklight(bool backlight) +{ + myChangedBackLight = false; + return setBacklight(backlight); +} diff --git a/Legacy/Aria/src/ArLMS1XX.cpp b/Legacy/Aria/src/ArLMS1XX.cpp new file mode 100644 index 0000000..ca064b5 --- /dev/null +++ b/Legacy/Aria/src/ArLMS1XX.cpp @@ -0,0 +1,3047 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLMS1XX.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + +//#define TRACE +#if (defined(TRACE)) + #define IFDEBUG(code) {code;} +#else + #define IFDEBUG(code) +#endif + +AREXPORT ArLMS1XXPacket::ArLMS1XXPacket() : +ArBasePacket(10000, 1, NULL, 1) +{ + myFirstAdd = true; + myCommandType[0] = '\0'; + myCommandName[0] = '\0'; +} + +AREXPORT ArLMS1XXPacket::~ArLMS1XXPacket() +{ + +} + +AREXPORT const char *ArLMS1XXPacket::getCommandType(void) +{ + return myCommandType; +} + +AREXPORT const char *ArLMS1XXPacket::getCommandName(void) +{ + return myCommandName; +} + + +AREXPORT void ArLMS1XXPacket::finalizePacket(void) +{ + myBuf[0] = '\002'; + rawCharToBuf('\003'); + myBuf[myLength] = '\0'; +} + +AREXPORT void ArLMS1XXPacket::resetRead(void) +{ + myReadLength = 1; + + myCommandType[0] = '\0'; + myCommandName[0] = '\0'; + + bufToStr(myCommandType, sizeof(myCommandType)); + bufToStr(myCommandName, sizeof(myCommandName)); +} + +AREXPORT ArTime ArLMS1XXPacket::getTimeReceived(void) +{ + return myTimeReceived; +} + +AREXPORT void ArLMS1XXPacket::setTimeReceived(ArTime timeReceived) +{ + myTimeReceived = timeReceived; +} + +AREXPORT void ArLMS1XXPacket::duplicatePacket(ArLMS1XXPacket *packet) +{ + myLength = packet->getLength(); + myReadLength = packet->getReadLength(); + myTimeReceived = packet->getTimeReceived(); + myFirstAdd = packet->myFirstAdd; + strcpy(myCommandType, packet->myCommandType); + strcpy(myCommandName, packet->myCommandName); + memcpy(myBuf, packet->getBuf(), myLength); +} + +AREXPORT void ArLMS1XXPacket::empty(void) +{ + myLength = 0; + myReadLength = 0; + myFirstAdd = false; + myCommandType[0] = '\0'; + myCommandName[0] = '\0'; +} + + +AREXPORT void ArLMS1XXPacket::byteToBuf(ArTypes::Byte val) +{ + char buf[1024]; + if (val > 0) + sprintf(buf, "+%d", val); + else + sprintf(buf, "%d", val); + strToBuf(buf); +} + +AREXPORT void ArLMS1XXPacket::byte2ToBuf(ArTypes::Byte2 val) +{ + char buf[1024]; + if (val > 0) + sprintf(buf, "+%d", val); + else + sprintf(buf, "%d", val); + strToBuf(buf); +} + +AREXPORT void ArLMS1XXPacket::byte4ToBuf(ArTypes::Byte4 val) +{ + char buf[1024]; + if (val > 0) + sprintf(buf, "+%d", val); + else + sprintf(buf, "%d", val); + strToBuf(buf); +} + +AREXPORT void ArLMS1XXPacket::uByteToBuf(ArTypes::UByte val) +{ + char buf[1024]; + sprintf(buf, "%u", val); + strToBuf(buf); +} + +AREXPORT void ArLMS1XXPacket::uByte2ToBuf(ArTypes::UByte2 val) +{ + uByteToBuf(val & 0xff); + uByteToBuf((val >> 8) & 0xff); +} + +AREXPORT void ArLMS1XXPacket::uByte4ToBuf(ArTypes::UByte4 val) +{ + char buf[1024]; + sprintf(buf, "%u", val); + strToBuf(buf); +} + +AREXPORT void ArLMS1XXPacket::strToBuf(const char *str) +{ + if (str == NULL) { + str = ""; + } + + if (!myFirstAdd && hasWriteCapacity(1)) + { + myBuf[myLength] = ' '; + myLength++; + } + + myFirstAdd = false; + + ArTypes::UByte2 tempLen = strlen(str); + + if (!hasWriteCapacity(tempLen)) { + return; + } + + memcpy(myBuf+myLength, str, tempLen); + myLength += tempLen; +} + +AREXPORT ArTypes::Byte ArLMS1XXPacket::bufToByte(void) +{ + ArTypes::Byte ret=0; + + + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + if (!isNextGood(4)) + return 0; + + unsigned char n1, n2; + n2 = deascii(myBuf[myReadLength+6]); + n1 = deascii(myBuf[myReadLength+7]); + ret = n2 << 4 | n1; + + myReadLength += 4; + + return ret; +} + +AREXPORT ArTypes::Byte2 ArLMS1XXPacket::bufToByte2(void) +{ + ArTypes::Byte2 ret=0; + + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + if (!isNextGood(4)) + return 0; + + unsigned char n1, n2, n3, n4; + n4 = deascii(myBuf[myReadLength+4]); + n3 = deascii(myBuf[myReadLength+5]); + n2 = deascii(myBuf[myReadLength+6]); + n1 = deascii(myBuf[myReadLength+7]); + ret = n4 << 12 | n3 << 8 | n2 << 4 | n1; + + myReadLength += 4; + + return ret; +} + +AREXPORT ArTypes::Byte4 ArLMS1XXPacket::bufToByte4(void) +{ + ArTypes::Byte4 ret=0; + + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + if (!isNextGood(8)) + return 0; + + unsigned char n1, n2, n3, n4, n5, n6, n7, n8; + n8 = deascii(myBuf[myReadLength]); + n7 = deascii(myBuf[myReadLength+1]); + n6 = deascii(myBuf[myReadLength+2]); + n5 = deascii(myBuf[myReadLength+3]); + n4 = deascii(myBuf[myReadLength+4]); + n3 = deascii(myBuf[myReadLength+5]); + n2 = deascii(myBuf[myReadLength+6]); + n1 = deascii(myBuf[myReadLength+7]); + ret = n8 << 28 | n7 << 24 | n6 << 20 | n5 << 16 | n4 << 12 | n3 << 8 | n2 << 4 | n1; + + myReadLength += 8; + + return ret; +} + +AREXPORT ArTypes::UByte ArLMS1XXPacket::bufToUByte(void) +{ + ArTypes::UByte ret=0; + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + std::string str; + while (isNextGood(1) && myBuf[myReadLength] != ' ' && + myBuf[myReadLength] != '\003') + { + str += myBuf[myReadLength]; + myReadLength += 1; + } + + ret = strtol(str.c_str(), NULL, 16); + + return ret; +} + +AREXPORT ArTypes::UByte2 ArLMS1XXPacket::bufToUByte2(void) +{ + //printf("@ 1\n"); + + ArTypes::UByte2 ret=0; + + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + //printf("@ 2 '%c' %d %d %d %d\n", myBuf[myReadLength], isNextGood(1), + // myReadLength, myLength, myFooterLength); + std::string str; + while (isNextGood(1) && myBuf[myReadLength] != ' ' && + myBuf[myReadLength] != '\003') + { + //printf("%c\n", myBuf[myReadLength]); + str += myBuf[myReadLength]; + myReadLength += 1; + } + + + ret = strtol(str.c_str(), NULL, 16); + + //printf("@ 3 %d\n", ret); + return ret; +} + +AREXPORT ArTypes::UByte4 ArLMS1XXPacket::bufToUByte4(void) +{ + ArTypes::Byte4 ret=0; + + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + std::string str; + while (isNextGood(1) && myBuf[myReadLength] != ' ' && + myBuf[myReadLength] != '\003') + { + str += myBuf[myReadLength]; + myReadLength += 1; + } + + + ret = strtol(str.c_str(), NULL, 16); + + return ret; +} + +/** +Copy a string from the packet buffer into the given buffer, stopping when +the end of the packet buffer is reached, the given length is reached, +or a NUL character ('\\0') is reached. If the given length is not large +enough, then the remainder of the string is flushed from the packet. +A NUL character ('\\0') is appended to @a buf if there is sufficient room +after copying the sting from the packet, otherwise no NUL is added (i.e. +if @a len bytes are copied). +@param buf Destination buffer +@param len Maximum number of characters to copy into the destination buffer + */ +AREXPORT void ArLMS1XXPacket::bufToStr(char *buf, int len) +{ + if (buf == NULL) + { + ArLog::log(ArLog::Normal, "ArLMS1XXPacket::bufToStr(NULL, %d) cannot write to null address", + len); + return; + } + int i; + + buf[0] = '\0'; + + if (!isNextGood(1)) + return; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + // see if we can read + if (isNextGood(1)) + { + // while we can read copy over those bytes + for (i = 0; + isNextGood(1) && i < (len - 1) && myBuf[myReadLength] != ' ' && + myBuf[myReadLength] != '\003'; + ++myReadLength, ++i) + { + buf[i] = myBuf[myReadLength]; + buf[i+1] = '\0'; + //printf("%d %c %p\n", i); + } + if (i >= (len - 1)) + { + // Otherwise, if we stopped reading because the output buffer was full, + // then attempt to flush the rest of the string from the packet + + // This is a bit redundant with the code below, but wanted to log the + // string for debugging + myBuf[len - 1] = '\0'; + + ArLog::log(ArLog::Normal, "ArLMS1XXPacket::bufToStr(buf, %d) output buf is not large enough for packet string %s", + len, myBuf); + + while (isNextGood(1) && myBuf[myReadLength] != ' ' && + myBuf[myReadLength] != '\003') { + myReadLength++; + } + } // end else if output buffer filled before null-terminator + } // end if something to read + + // Make absolutely sure that the string is null-terminated... + buf[len - 1] = '\0'; +} + +AREXPORT void ArLMS1XXPacket::rawCharToBuf(unsigned char c) +{ + if (!hasWriteCapacity(1)) { + return; + } + myBuf[myLength] = c; + //memcpy(myBuf+myLength, &c, 1); + myLength += 1; +} + +int ArLMS1XXPacket::deascii(char c) +{ + if (c >= '0' && c <= '9') + return c - '0'; + else if (c >= 'a' && c <= 'f') + return 10 + c - 'a'; + else if (c >= 'A' && c <= 'F') + return 10 + c - 'a'; + else + return 0; +} + +AREXPORT ArLMS1XXPacketReceiver::ArLMS1XXPacketReceiver() +{ + myState = STARTING; +} + +AREXPORT ArLMS1XXPacketReceiver::~ArLMS1XXPacketReceiver() +{ + +} + +AREXPORT void ArLMS1XXPacketReceiver::setDeviceConnection(ArDeviceConnection *conn) +{ + myConn = conn; +} + +AREXPORT ArDeviceConnection *ArLMS1XXPacketReceiver::getDeviceConnection(void) +{ + return myConn; +} + + +ArLMS1XXPacket *ArLMS1XXPacketReceiver::receivePacket(unsigned int msWait, + bool scandataShortcut, + bool ignoreRemainders) +{ + ArLMS1XXPacket *packet; + unsigned char c; + long timeToRunFor; + ArTime timeDone; + ArTime lastDataRead; + ArTime packetReceived; + int numRead; + int i; + + //if (myLaserModel == ArLMS1XX::TiM3XX) + // return receiveTiMPacket(msWait, scandataShortcut, ignoreRemainders); + + if (myConn == NULL || + myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + return NULL; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Terse, + "%s::receivePacket() error adding msecs (%i)", + myName,msWait); + } + + do + { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + + //printf("%x\n", c); + if (myState == STARTING) + { + if ((numRead = myConn->read((char *)&c, 1, timeToRunFor)) <= 0) { + + //ArLog::log(ArLog::Terse, + // "%s::receivePacket() Timeout on initial read - read timeout = (%d)", + // myName, timeToRunFor); + return NULL; + + }//printf("%x\n", c); + + if (c == '\002') + { + myState = DATA; + myPacket.empty(); + myPacket.setLength(0); + myPacket.rawCharToBuf(c); + myReadCount = 0; + packetReceived = myConn->getTimeRead(0); + myPacket.setTimeReceived(packetReceived); + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() Received invalid char during STARTING, looking for 0x02 got 0x%02x %c", + myName, c, c); + } + } + else if (myState == DATA) + { + numRead = myConn->read(&myReadBuf[myReadCount], + sizeof(myReadBuf) - myReadCount, myReadTimeout); + + // trap if we failed the read + if (numRead < 0) + { + //printf("read failed \n"); + ArLog::log(ArLog::Normal, + "%s::receivePacket() Failed read (%d)", + myName,numRead); + myState = STARTING; + return NULL; + } + /* + ArLog::log(ArLog::Normal, "%s::receivePacket() Read %d bytes", + myName,numRead); + */ + + IFDEBUG( + + if (numRead != 0) + { + + // print out using logging + int i; + char x[100000]; + x[0] = '\0'; + int idx=0; + strcat(&x[idx],""); + idx = idx+5; + for (i = 0;i < numRead;i++) + { + // + if (myReadBuf[i] == '\002') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else if (myReadBuf[i] == '\003') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else + sprintf(&x[idx++], "%c",(char *)myReadBuf[i]); + } + + ArLog::log(ArLog::Normal, + "%s::receivePacket() Buffer with %d bytes = %s", myName, numRead, x); + } + ); // end IFDEBUG + + // see if we found the end of the packet + for (i = myReadCount; i < myReadCount + numRead; i++) + { + if (myReadBuf[i] == '\002') + { +// ArLog::log(myInfoLogLevel, "%s::receivePacket() Data found start of new packet...", + ArLog::log(myInfoLogLevel, "%s::receivePacket() Data found start of new packet...", + myName); + myPacket.empty(); + myPacket.setLength(0); + memmove(myReadBuf, &myReadBuf[i], myReadCount + numRead - i); + numRead -= (i - myReadCount); + myReadCount -= i; + i = 0; + continue; + } + if (myReadBuf[i] == '\003') + { + + myPacket.dataToBuf(myReadBuf, i + 1); + myPacket.resetRead(); + packet = new ArLMS1XXPacket; + packet->duplicatePacket(&myPacket); + myPacket.empty(); + myPacket.setLength(0); + + // if it's the end of the data just go back to the beginning + //printf("i=%d, myReadCount = %d, numRead = %d\n",i, myReadCount, numRead); + + if (i == myReadCount + numRead - 1) + { + //ArLog::log(myLogLevel1XXPacketReceiver: Starting again"); + myState = STARTING; + } + // if it isn't move the data up and start again + else + { + if (!ignoreRemainders) + { + memmove(myReadBuf, &myReadBuf[i+1], myReadCount + numRead - i - 1); + myReadCount = myReadCount + numRead - i - 1; + myState = REMAINDER; + ArLog::log(myInfoLogLevel, "%s::receivePacket() Got remainder, %d bytes beyond one packet ...", + myName,myReadCount); + } + else + { + myState = STARTING; + ArLog::log(myInfoLogLevel, "%s::receivePacket() Got remainder, %d bytes beyond one packet ... ignoring it", + myName,myReadCount); + } + } + return packet; + } + } + //printf("didn't get enough bytes\n"); + myReadCount += numRead; + if (numRead != 0) + ArLog::log(myInfoLogLevel, "%s::receivePacket() Got %d bytes (but not end char), up to %d", + myName, numRead, myReadCount); + } + else if (myState == REMAINDER) + { + //printf("In remainder ('%c' %d) \n", myReadBuf[0], myReadBuf[0]); + if (myReadBuf[0] != '\002') + { + ArLog::log(myInfoLogLevel, + "%s::receivePacket() Remainder didn't start with \\002, starting over...",myName); + myState = STARTING; + continue; + } + + // PS - 9/1/11 not sure why, but for LMS500 this is off by 1 and it dosn't see the + // and thinks the last + // packet does not have the last byte + // so for the LMS500 - just use one less byte in the for loop + + int loopcount; + + switch (myLaserModel) { + + case ArLMS1XX::LMS1XX: + loopcount = myReadCount - 1; + break; + + case ArLMS1XX::TiM3XX: + case ArLMS1XX::LMS5XX: + loopcount = myReadCount; + break; + + } // end switch laserModel + + +// if (myIsLMS5XX) +// loopcount = myReadCount; +// else +// loopcount = myReadCount - 1; + + for (i = 0; i < loopcount; i++) + //for (i = 0; i < myReadCount - 1; i++) + { + //printf("%03d '%c' %d\n", i, myReadBuf[i], myReadBuf[i]); + if (myReadBuf[i] == '\002' && i != 0) + { + ArLog::log(myInfoLogLevel, "%s::receivePacket() Remainder found start of new packet...", + myName, myReadCount); + myPacket.empty(); + myPacket.setLength(0); + memmove(myReadBuf, &myReadBuf[i], myReadCount + i); + myReadCount -= i; + i = 0; + continue; + } + if (myReadBuf[i] == '\003') + { + myPacket.dataToBuf(myReadBuf, i + 1); + myPacket.resetRead(); + packet = new ArLMS1XXPacket; + packet->duplicatePacket(&myPacket); + myPacket.empty(); + myPacket.setLength(0); + + // if it's the end of the data just go back to the beginning + if (i == myReadCount - 1) + { + myState = STARTING; + ArLog::log(myInfoLogLevel, + "%s::receivePacket() Remainder was one packet...",myName); + } + // if it isn't move the data up and start again + else + { + // PS - took out this printf and replaced with a log + if (myReadCount - i < 50) + //printf("read buf (%d %d) %s\n", myReadCount, i, myReadBuf); + ArLog::log(ArLog::Terse, "%s::receivePacket() read buf (%d %d) %s", + myName, myReadCount, i, myReadBuf); + + memmove(myReadBuf, &myReadBuf[i+1], myReadCount - i); + myReadCount = myReadCount - i - 1; + myState = REMAINDER; + ArLog::log(myInfoLogLevel, + "%s::receivePacket() Remainder was more than one packet... (%d %d)", myName, myReadCount, i); + } + return packet; + } + } + // if we didn't find the end of the packet, then get the rest of the data + myState = DATA; + ArLog::log(myInfoLogLevel, + "%s::receivePacket() Remainder didn't contain a whole packet...",myName); + + continue; + } + else + { + ArLog::log(ArLog::Terse, "%s::receivePacket() Bad state (%d)", + myName,myState); + myState = STARTING; + } + } while (timeDone.mSecTo() >= 0); // || !myStarting) + + return NULL; +} + + +ArLMS1XXPacket *ArLMS1XXPacketReceiver::receiveTiMPacket(unsigned int msWait, + bool scandataShortcut, + bool ignoreRemainders) +{ + ArLMS1XXPacket *packet; + unsigned char c; + long timeToRunFor; + ArTime timeDone; + ArTime lastDataRead; + ArTime packetReceived; + int numRead; + int i; + + if (myConn == NULL || + myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + return NULL; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Terse, + "%s::receiveTiMPacket() error adding msecs (%i)", + myName,msWait); + } + + do + { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + + //printf("%x\n", c); + if (myState == STARTING) + { + if ((numRead = myConn->read((char *)&c, 1, timeToRunFor)) <= 0) { + + return NULL; + + }//printf("%x\n", c); + if (c == '\002') + { + myState = DATA; + myPacket.empty(); + myPacket.setLength(0); + myPacket.rawCharToBuf(c); + myReadCount = 0; + packetReceived = myConn->getTimeRead(0); + myPacket.setTimeReceived(packetReceived); + } + else + { + ArLog::log(ArLog::Terse, + "%s::receiveTiMPacket() Failed single char read (%d) %02x %c", + myName,numRead, c, c); + } + } + else if (myState == DATA) + { + numRead = myConn->read(&myReadBuf[myReadCount], + sizeof(myReadBuf) - myReadCount, myReadTimeout); + + // trap if we failed the read + if (numRead < 0) + { + //printf("read failed \n"); + ArLog::log(ArLog::Normal, + "%s::receivePacket() Failed read (%d)", + myName,numRead); + myState = STARTING; + return NULL; + } + /* + ArLog::log(ArLog::Normal, "%s::receivePacket() Read %d bytes", + myName,numRead); + */ + + IFDEBUG( + + if (numRead != 0) + { + + // print out using logging + int i; + char x[100000]; + x[0] = '\0'; + int idx=0; + strcat(&x[idx],""); + idx = idx+5; + for (i = 0;i < numRead;i++) + { + // + if (myReadBuf[i] == '\002') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else if (myReadBuf[i] == '\003') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else + sprintf(&x[idx++], "%c",(char *)myReadBuf[i]); + } + + ArLog::log(ArLog::Normal, + "%s::receivePacket() Buffer with %d bytes = %s", myName, numRead, x); + } + ); // end IFDEBUG + + // see if we found the end of the packet + for (i = myReadCount; i < myReadCount + numRead; i++) + { + if (myReadBuf[i] == '\002') + { +// ArLog::log(myInfoLogLevel, "%s::receivePacket() Data found start of new packet...", + ArLog::log(myInfoLogLevel, "%s::receivePacket() Data found start of new packet...", + myName); + myPacket.empty(); + myPacket.setLength(0); + memmove(myReadBuf, &myReadBuf[i], myReadCount + numRead - i); + numRead -= (i - myReadCount); + myReadCount -= i; + i = 0; + continue; + } + if (myReadBuf[i] == '\003') + { + + myPacket.dataToBuf(myReadBuf, i + 1); + myPacket.resetRead(); + packet = new ArLMS1XXPacket; + packet->duplicatePacket(&myPacket); + myPacket.empty(); + myPacket.setLength(0); + + // if it's the end of the data just go back to the beginning + //printf("i=%d, myReadCount = %d, numRead = %d\n",i, myReadCount, numRead); + + ArLog::log(myInfoLogLevel, "%s::receiveTiMPacket() i=%d, myReadCount = %d, numRead = %d", + myName, i, myReadCount, numRead); + + if (i == myReadCount + numRead - 1) + { + ArLog::log(myInfoLogLevel, "%s::receiveTiMPacket() Starting again", myName); + myState = STARTING; + } + // if it isn't move the data up and start again + else + { + myState = STARTING; + ArLog::log(myInfoLogLevel, "%s::receivePacket() Got remainder, %d bytes beyond one packet ... ignoring it", + myName,myReadCount); + } + return packet; + } + } + //printf("didn't get enough bytes\n"); + myReadCount += numRead; + if (numRead != 0) + ArLog::log(myInfoLogLevel, "%s::receivePacket() Got %d bytes (but not end char), up to %d", + myName, numRead, myReadCount); + } + else + { + ArLog::log(ArLog::Terse, "%s::receivePacket() Bad state (%d)", + myName,myState); + myState = STARTING; + } + } while (timeDone.mSecTo() >= 0); // || !myStarting) + + return NULL; +} + + +AREXPORT ArLMS1XX::ArLMS1XX(int laserNumber, + const char *name, LaserModel laserModel) : + ArLaser(laserNumber, name, 20000), + mySensorInterpTask(this, &ArLMS1XX::sensorInterp), + myAriaExitCB(this, &ArLMS1XX::disconnect) +{ + + myLaserModel = laserModel; + + clear(); + myRawReadings = new std::list; + + Aria::addExitCallback(&myAriaExitCB, -10); + + setInfoLogLevel(ArLog::Normal); + + laserSetName(getName()); + + laserAllowSetPowerControlled(false); + // MPL 8/8/11 taking this out since you can't actually set the + // degrees on the LMS 100 or LMS 500 (it's always the maximum) + + switch (myLaserModel) { + + // not sure if we need to do this for TiM?? + case ArLMS1XX::LMS1XX: + case ArLMS1XX::TiM3XX: + laserAllowSetDegrees(-135, -135, 135, // default, min, max for start degrees + 135, -135, 135); // default, min, max for end degrees + + break; + + case ArLMS1XX::LMS5XX: + + break; + + } // end switch laserModel + + + //if(!myIsLMS5XX) + //{ + // laserAllowSetDegrees(-135, -135, 135, // default, min, max for start degrees + // 135, -135, 135); // default, min, max for end degrees + //} + + std::map incrementChoices; + + // According to documentation, LMS1xx allows half or quarter degree resolution, and + // LMS5xx allows half, quarter and also one degree resolution. One was the default for the + // LMS2xx, so let's keep that for LMS5xx. Applications can still set it to + // half or quarter instead, same as they used to with the 2xx. + incrementChoices["half"] = .5; + incrementChoices["quarter"] = .25; + + switch (myLaserModel) { + + // not sure if we need to do this for TiM?? + case ArLMS1XX::LMS1XX: + laserAllowIncrementChoices("half", incrementChoices); + break; + + case ArLMS1XX::LMS5XX: + incrementChoices["one"] = 1; + laserAllowIncrementChoices("one", incrementChoices); + break; + + case ArLMS1XX::TiM3XX: + incrementChoices["three"] = 3; + laserAllowIncrementChoices("three", incrementChoices); + break; + } // end switch laser model + + + //if (myIsLMS5XX) + //{ + // incrementChoices["one"] = 1; + // laserAllowIncrementChoices("one", incrementChoices); + //} + //else + //{ + // laserAllowIncrementChoices("half", incrementChoices); + //} + + std::list reflectorBitsChoices; + reflectorBitsChoices.push_back("none"); + reflectorBitsChoices.push_back("8bits"); + // 16 bits isn't implemented yet + //reflectorBitsChoices.push_back("16bits"); + laserAllowReflectorBitsChoices("none", reflectorBitsChoices); + + + std::list baudChoices; + + switch (myLaserModel) { + + // not sure if we need to do this for TiM?? + case ArLMS1XX::TiM3XX: + laserSetDefaultPortType("serial"); + baudChoices.push_back("115200"); + laserAllowStartingBaudChoices("115200", baudChoices); + break; + + case ArLMS1XX::LMS1XX: + case ArLMS1XX::LMS5XX: + laserSetDefaultTcpPort(2111); + laserSetDefaultPortType("tcp"); + break; + + } // end switch laser model + + // PS = add new field for scan freq + myScanFreq = 5; + + myLogLevel = ArLog::Verbose; + //myLogLevel = ArLog::Normal; + + setMinDistBetweenCurrent(0); + setMaxDistToKeepCumulative(4000); + setMinDistBetweenCumulative(200); + setMaxSecondsToKeepCumulative(30); + setMaxInsertDistCumulative(3000); + + setCumulativeCleanDist(75); + setCumulativeCleanInterval(1000); + setCumulativeCleanOffset(600); + + resetLastCumulativeCleanTime(); + + switch (myLaserModel) { + + case ArLMS1XX::TiM3XX: + // need to make new dots for TiM + case ArLMS1XX::LMS1XX: + setCurrentDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0, 255), + 80, // mm diameter of dots + 75), // layer above sonar + true); + + setCumulativeDrawingData( + new ArDrawingData("polyDots", + ArColor(125, 125, 125), + 100, // mm diameter of dots + 60), // layer below current range devices + true); + + break; + + case ArLMS1XX::LMS5XX: + setCurrentDrawingData( + new ArDrawingData("polyDots", + ArColor(255, 20, 147), + 80, // mm diameter of dots + 75), // layer above sonar + true); + + setCumulativeDrawingData( + new ArDrawingData("polyDots", + ArColor(128, 128, 0), + 100, // mm diameter of dots + 60), // layer below current range devices + true); + + break; + + } // end switch laserModel + +} + +AREXPORT ArLMS1XX::~ArLMS1XX() +{ + Aria::remExitCallback(&myAriaExitCB); + if (myRobot != NULL) + { + myRobot->remRangeDevice(this); + myRobot->remLaser(this); + myRobot->remSensorInterpTask(&mySensorInterpTask); + } + if (myRawReadings != NULL) + { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + lockDevice(); + if (isConnected()) + disconnect(); + unlockDevice(); +} + +void ArLMS1XX::clear(void) +{ + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; + + myVersionNumber = 0; + myDeviceNumber = 0; + mySerialNumber = 0; + myDeviceStatus1 = 0; + myDeviceStatus2 = 0; + myMessageCounter = 0; + myScanCounter = 0; + myPowerUpDuration = 0; + myTransmissionDuration = 0; + myInputStatus1 = 0; + myInputStatus2 = 0; + myOutputStatus1 = 0; + myOutputStatus2 = 0; + myReserved = 0; + myScanningFreq = 0; + myMeasurementFreq = 0; + myNumberEncoders = 0; + myNumChans16Bit = 0; + myNumChans8Bit = 0; + myFirstReadings = true; +} + +AREXPORT void ArLMS1XX::laserSetName(const char *name) +{ + myName = name; + + myConnMutex.setLogNameVar("%s::myConnMutex", getName()); + myPacketsMutex.setLogNameVar("%s::myPacketsMutex", getName()); + myDataMutex.setLogNameVar("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar("%s::exitCallback", getName()); + + ArLaser::laserSetName(getName()); +} + +AREXPORT void ArLMS1XX::setRobot(ArRobot *robot) +{ + myRobot = robot; + + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&mySensorInterpTask); + + switch (myLaserModel) { + + case ArLMS1XX::TiM3XX: + myRobot->addSensorInterpTask("tim3xx", 90, &mySensorInterpTask); + break; + + case ArLMS1XX::LMS1XX: + myRobot->addSensorInterpTask("lms1XX", 90, &mySensorInterpTask); + break; + + case ArLMS1XX::LMS5XX: + myRobot->addSensorInterpTask("lms5XX", 90, &mySensorInterpTask); + break; + + } // end switch laserModel + + //if (myIsLMS5XX) + // myRobot->addSensorInterpTask("lms5XX", 90, &mySensorInterpTask); + //else + // myRobot->addSensorInterpTask("lms1XX", 90, &mySensorInterpTask); + } + ArLaser::setRobot(robot); +} + + + +AREXPORT bool ArLMS1XX::asyncConnect(void) +{ + myStartConnect = true; + if (!getRunning()) + runAsync(); + return true; +} + +AREXPORT bool ArLMS1XX::disconnect(void) +{ + if (!isConnected()) + return true; + + ArLog::log(ArLog::Normal, "%s: Disconnecting", getName()); + + laserDisconnectNormally(); + return true; +} + +void ArLMS1XX::failedToConnect(void) +{ + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + laserFailedConnect(); +} + +void ArLMS1XX::sensorInterp (void) +{ + ArLMS1XXPacket *packet; + ArTime startTime; + bool printing = false; + //bool printing = true; + + while (1) { + //ArTime packetMutexTime; + myPacketsMutex.lock(); + //ArLog::log(ArLog::Normal, "%s: lock took = %ld", + //getName(), packetMutexTime.mSecSince()); + + if (myPackets.empty()) { + myPacketsMutex.unlock(); + /* + if (printing) + ArLog::log(ArLog::Normal, "%s: Function took = %ld", + getName(), startTime.mSecSince()); + */ + return; + } + + // save some time by only processing the most recent packet + //packet = myPackets.front(); + //myPackets.pop_front(); + // this'll still process two packets if there's another one while + // the first is processing, but that's fine + packet = myPackets.back(); + myPackets.pop_back(); + ArUtil::deleteSet (myPackets.begin(), myPackets.end()); + myPackets.clear(); + myPacketsMutex.unlock(); + // if its not a reading packet just skip it + + + if (strcasecmp (packet->getCommandName(), "LMDscandata") != 0) { + delete packet; + continue; + } + + //set up the times and poses + ArTime packetRecvTime; + /* + // PS 9/1/11 - put this down below and use received scan freq to caculate + // this value should be found more empirically... but we used 1/75 + //hz for the lms2xx and it was fine, so here we'll use 1/50 hz for now + // MPL 9/26/11 moved the rest of it below since we must correct the time before finding the pose + if (!time.addMSec(-20)) { + ArLog::log(ArLog::Normal, + "%s::sensorInterp() error adding msecs (-20)",getName()); + } + if (myRobot == NULL || !myRobot->isConnected()) + { + pose.setPose(0, 0, 0); + encoderPose.setPose(0, 0, 0); + } + else if ((ret = myRobot->getPoseInterpPosition(time, &pose)) < 0 || + (retEncoder = + myRobot->getEncoderPoseInterpPosition(time, &encoderPose)) < 0) + { + ArLog::log(ArLog::Normal, "%s::sensorInterp() reading too old to process", getName()); + delete packet; + continue; + } + ArTransform transform; + transform.setTransform(pose); + */ + unsigned int counter = 0; + if (myRobot != NULL) + counter = myRobot->getCounter(); + lockDevice(); + myDataMutex.lock(); + int i; + int dist; + int refl; + //int onStep; + ArSensorReading *reading; + // read the extra stuff + myVersionNumber = packet->bufToUByte2(); + myDeviceNumber = packet->bufToUByte2(); + mySerialNumber = packet->bufToUByte4(); + myDeviceStatus1 = packet->bufToUByte(); + myDeviceStatus2 = packet->bufToUByte(); + myMessageCounter = packet->bufToUByte2(); + myScanCounter = packet->bufToUByte2(); + myPowerUpDuration = packet->bufToUByte4(); + myTransmissionDuration = packet->bufToUByte4(); + //printf("time values = %d %d\n",myPowerUpDuration, myTransmissionDuration); + //printf("scan values = %d %d\n",myMessageCounter, myScanCounter); + myInputStatus1 = packet->bufToUByte(); + myInputStatus2 = packet->bufToUByte(); + myOutputStatus1 = packet->bufToUByte(); + myOutputStatus2 = packet->bufToUByte(); + + // myReserved is checksum on TiM3xx + myReserved = packet->bufToUByte2(); + + myScanningFreq = packet->bufToUByte4(); + myMeasurementFreq = packet->bufToUByte4(); + + + if (myDeviceStatus1 != 0 || myDeviceStatus2 != 0) + ArLog::log (myLogLevel, "%s::sensorInterp() DeviceStatus %d %d", + getName(), myDeviceStatus1, myDeviceStatus2); + +//#if 0 + // validate checksum if TiM + if (myLaserModel == ArLMS1XX::TiM3XX) { + + if (validateCheckSum(packet)) { + ArLog::log (ArLog::Normal, "%s::sensorInterp() Bad TiM3XX checksum... skipping this packet", + getName()); + + delete packet; + unlockDevice(); + myDataMutex.unlock(); + + continue; + } + } +//#endif + + ArTime time = packet->getTimeReceived(); + ArPose pose; + int ret; + int retEncoder; + ArPose encoderPose; + + // PS 9/1/11 - cacl freq from input + + // TiM scan freq is 0 in TiM packet - use measurementfreq + + if (myLaserModel == ArLMS1XX::TiM3XX) + myScanningFreq = myMeasurementFreq; + + int freq = 1000/ (myScanningFreq/100); + + //ArLog::log(ArLog::Normal, + // "%s::sensorInterp() freq = %d inputted freq = %d",getName(),freq,myScanningFreq); + + if (!time.addMSec (-freq)) { + ArLog::log (ArLog::Normal, + "%s::sensorInterp() error adding msecs (-%d)",getName(), freq); + } + + if (myRobot == NULL || !myRobot->isConnected()) { + pose.setPose (0, 0, 0); + encoderPose.setPose (0, 0, 0); + } else if ( (ret = myRobot->getPoseInterpPosition (time, &pose)) < 0 || + (retEncoder = + myRobot->getEncoderPoseInterpPosition (time, &encoderPose)) < 0) { + ArLog::log (ArLog::Normal, "%s::sensorInterp() reading too old to process", getName()); + delete packet; + unlockDevice(); + myDataMutex.unlock(); + continue; + } + + ArTransform transform; + transform.setTransform (pose); + /* + printf("Received: %s %s ver %d devNum %d serNum %d scan %d sf %d mf %d\n", + packet->getCommandType(), packet->getCommandName(), + myVersionNumber, myDeviceNumber, + mySerialNumber, myScanCounter, myScanningFreq, myMeasurementFreq); + */ + myNumberEncoders = packet->bufToUByte2(); + //printf("\tencoders %d\n", myNumberEncoders); + + if (myNumberEncoders > 0) + ArLog::log (myLogLevel, "%s::sensorInterp() Encoders %d", getName(), myNumberEncoders); + + for (i = 0; i < myNumberEncoders; i++) { + packet->bufToUByte4(); + packet->bufToUByte2(); + //printf("\t\t%d\t%d %d\n", i, eachEncoderPosition, eachEncoderSpeed); + } + + + myNumChans16Bit = packet->bufToUByte2(); + + // PS - for TiM for what ever reason 2nd byte is num 16 bit chans + if (myLaserModel == ArLMS1XX::TiM3XX) + myNumChans16Bit = packet->bufToUByte2(); + + + if (myNumChans16Bit > 1) + ArLog::log (myLogLevel, "%s::sensorInterp() NumChans16Bit %d", getName(), myNumChans16Bit); + + char eachChanMeasured[1024]; + int eachScalingFactor; + int eachScalingOffset; + double eachStartingAngle; + double eachAngularStepWidth; + int eachNumberData; + std::list::iterator it; + double atDeg; + int onReading; + double start = 0; + double increment = 0; + bool startedProcessing = false; + + for (i = 0; i < myNumChans16Bit; i++) { + bool measuringDistance = false; + bool measuringReflectance = false; + eachChanMeasured[0] = '\0'; + packet->bufToStr (eachChanMeasured, sizeof (eachChanMeasured)); + if (strcasecmp (eachChanMeasured, "DIST1") == 0) + measuringDistance = true; + else if (strcasecmp (eachChanMeasured, "RSSI1") == 0) + measuringReflectance = true; + // if this isn't the data we want then skip it + if (!measuringDistance && !measuringReflectance) { + delete packet; + unlockDevice(); + myDataMutex.unlock(); + ArLog::log (ArLog::Normal, + "%s: Could not process channel %s", + getName(), eachChanMeasured); + continue; + } + if (printing) + ArLog::log (ArLog::Normal, "%s: Processing 16bit %s (%d %d)", + getName(), eachChanMeasured, + measuringDistance, measuringReflectance); + // for LMS5XX Scaling Factor is a real number + + switch (myLaserModel) { + case ArLMS1XX::TiM3XX: + case ArLMS1XX::LMS1XX: + eachScalingFactor = packet->bufToUByte4(); // FIX should be real + break; + case ArLMS1XX::LMS5XX: + eachScalingFactor = packet->bufToByte4(); // FIX should be real + break; + } // end switch laserModel + +// if (myIsLMS5XX) +// eachScalingFactor = packet->bufToByte4(); // FIX should be real +// else +// eachScalingFactor = packet->bufToUByte4(); // FIX should be real + eachScalingOffset = packet->bufToUByte4(); // FIX should be real + eachStartingAngle = packet->bufToByte4() / 10000.0; + eachAngularStepWidth = packet->bufToUByte2() / 10000.0; + eachNumberData = packet->bufToUByte2(); + /* + ArLog::log(ArLog::Terse, "%s: %s start %.1f step %.2f numReadings %d", + getName(), eachChanMeasured, + eachStartingAngle, eachAngularStepWidth, eachNumberData); + */ + /* + printf("\t\t%s\tscl %d %d ang %g %g num %d\n", + eachChanMeasured, + eachScalingFactor, eachScalingOffset, + eachStartingAngle, eachAngularStepWidth, + eachNumberData); + */ + // If we don't have any sensor readings created at all, make 'em all + if (myRawReadings->size() == 0) + for (i = 0; i < eachNumberData; i++) + myRawReadings->push_back (new ArSensorReading); + if (eachNumberData > myRawReadings->size()) { + ArLog::log (ArLog::Terse, "%s::sensorInterp() Bad data, in theory have %d readings but can only have %d... skipping this packet\n", + getName(), myRawReadings->size(), eachNumberData); + //printf("%s\n", packet->getBuf()); + delete packet; + unlockDevice(); + myDataMutex.unlock(); + continue; + } + + if (!startedProcessing) { + if (myFlipped) { + // original from LMS100, but this seems to have some problems + //start = mySensorPose.getTh() + eachStartingAngle - 90.0 + eachAngularStepWidth * eachNumberData; + // so we're trying this new algorithm which should be less dependent on SICK's protocol + start = mySensorPose.getTh() + ( (eachNumberData - 1) * eachAngularStepWidth) / 2.0; + increment = -eachAngularStepWidth; + } else { + // original from LMS100, but this seems to have some problems + //start = mySensorPose.getTh() + eachStartingAngle - 90.0; + // so we're trying this new algorithm which should be less dependent on SICK's protocol + start = mySensorPose.getTh() - ( (eachNumberData - 1) * eachAngularStepWidth) / 2.0; + increment = eachAngularStepWidth; + /* + ArLog::log(ArLog::Normal, + "! start %g sensorPose %g eachstartingangle %g eachangularstepwidth %g eachNumberData %d", + start, mySensorPose.getTh(), eachStartingAngle, eachAngularStepWidth, eachNumberData); + */ + } + } + startedProcessing = true; + bool ignore; + + for (atDeg = start, + it = myRawReadings->begin(), + onReading = 0; + onReading < eachNumberData; + atDeg += increment, + it++, + onReading++) { + ignore = false; + // MPL 8/8/11 taking this out since + // the start and end degrees aren't + // really settable, and it causes + // problems if the laser points + // somwhere other than forwards + // (RH 8-1-12 added back in for lms100 only where we seed to restrict fov on seekurs) + + switch (myLaserModel) { + case ArLMS1XX::TiM3XX: + case ArLMS1XX::LMS1XX: + if (atDeg < getStartDegrees() || atDeg > getEndDegrees()) { + // we configured lms1xx to have restricted fov, so this actually shouldn't happen: + ArLog::log (ArLog::Verbose, "ArLMS1XX: Warning: laser sent reading at %f out of FOV, setting 'ignore' flag on this reading. (LaserStartDegrees=%f, LaserEndDegrees=%f)", atDeg, getStartDegrees(), getEndDegrees()); + ignore = true; + } + break; + case ArLMS1XX::LMS5XX: + break; + } // end switch laserModel + +// if(!myIsLMS5XX) +// { +// if (atDeg < getStartDegrees() || atDeg > getEndDegrees()) +// { + // we configured lms1xx to have restricted fov, so this actually shouldn't happen: +// ArLog::log(ArLog::Verbose, "ArLMS1XX: Warning: laser sent reading at %f out of FOV, setting 'ignore' flag on this reading. (LaserStartDegrees=%f, LaserEndDegrees=%f)", atDeg, getStartDegrees(), getEndDegrees()); +// ignore = true; +// } +// } + reading = (*it); + + if (myFirstReadings) + reading->resetSensorPosition (ArMath::roundInt (mySensorPose.getX()), + ArMath::roundInt (mySensorPose.getY()), + atDeg); + + if (measuringDistance) { + dist = packet->bufToUByte2(); + // this was the original code, that just ignored 0s as a + // reading... however sometimes the sensor reports very close + // distances for rays it gets no return on... Sick wasn't very + // helpful figuring out what values it will report for + // those... so this is changing to a check that is basically + // if it reports as well within the sensor itself it gets + // ignored (the sensor head is 90mm across, but part of that + // slopes in, so this check should be those readings well + // within the sensor). Further note that shiny/black things + // within the minimum range will sometimes report closer than + // they are... 9/21/2010 MPL + //if (dist == 0) + // try not doing this for 500????? + int mindist; + + switch (myLaserModel) { + case ArLMS1XX::TiM3XX: + case ArLMS1XX::LMS1XX: + mindist = 30; + break; + case ArLMS1XX::LMS5XX: + mindist = 15; + break; + } // end switch laserModel + +// if (myIsLMS5XX) +// mindist = 15; +// else +// mindist = 30; + + if (dist < mindist) { + ignore = true; + // set this to greater than max range, so that some ARAM + // features work + dist = getMaxRange() + 1; + } + // on LMS5XX scalling factor = 1 is 65m =2 is 80m + + switch (myLaserModel) { + case ArLMS1XX::TiM3XX: + case ArLMS1XX::LMS1XX: + break; + case ArLMS1XX::LMS5XX: + dist = dist * 2;//eachScalingFactor; + break; + } // end switch laserModel + +// if (myIsLMS5XX) +// { + //????? scaling fact dosn't seem to work + //printf("scalling fac = %d",eachScalingFactor); +// dist = dist * 2;//eachScalingFactor; +// } + /* + else if (!ignore && dist < 150) + { + //ignore = true; + ArLog::log(ArLog::Normal, "%s: Reading at %.1f %s is %d (not ignoring, just warning)", + getName(), atDeg, + eachChanMeasured, dist); + } + */ + reading->newData (dist, pose, encoderPose, transform, counter, + time, ignore, 0); // no reflector yet + } else if (measuringReflectance) { + refl = packet->bufToUByte2(); + if (refl > 254 * 255) { + reading->setExtraInt (refl/255); + ArLog::log (ArLog::Normal, "%s: refl at %g of %d (raw %d)", getName(), atDeg, refl/255, refl); + } + // if the bit is dazzled we could set it to be ignored, but + // that'd be some later day + else if (refl == 255 * 255) { + } + } + } + /* + ArLog::log(ArLog::Normal, + "Received: %s %s scan %d numReadings %d", + packet->getCommandType(), packet->getCommandName(), + myScanCounter, onReading); + */ + } // end for 16bit + + // if we processed the readings and they were our first ones set + // it so it's not our first ones anymore so that we only do the + // sin/cos once + if (startedProcessing && myFirstReadings) + myFirstReadings = false; + // read the 8 bit channels, that's just reflectance for now + myNumChans8Bit = packet->bufToUByte2(); + //myLogLevel, + //ArLog::log(ArLog::Normal, "%s::sensorInterp() NumChans8Bit %d", getName(), myNumChans8Bit); + char eachChanMeasured8Bit[1024]; + + for (i = 0; i < myNumChans8Bit; i++) { + eachChanMeasured8Bit[0] = '\0'; + packet->bufToStr (eachChanMeasured8Bit, sizeof (eachChanMeasured)); + /* + // for LMS5XX Scaling Factor is a real number + if (myIsLMS5XX) + eachScalingFactor = packet->bufToByte4(); // FIX should be real + else + eachScalingFactor = packet->bufToUByte4(); // FIX should be real + eachScalingOffset = packet->bufToUByte4(); // FIX should be real + eachStartingAngle = packet->bufToByte4() / 10000.0; + eachAngularStepWidth = packet->bufToUByte2() / 10000.0; + eachNumberData = packet->bufToUByte2(); + */ + // scaling factor + packet->bufToByte4(); // FIX should be real + // scaling offset + packet->bufToUByte4(); // FIX should be real + // starting angle + packet->bufToByte4(); + // step width + packet->bufToUByte2(); + // number of data (use the one from the first set to make sure + // we stay in bounds, and since it should be the same for both) + packet->bufToUByte2(); + // if this isn't the data we want then skip it + +// PS - need to understand this more + if (myLaserModel != ArLMS1XX::TiM3XX) { + + if (strcasecmp (eachChanMeasured8Bit, "RSSI1") != 0) { + ArLog::log (ArLog::Normal, "%s: Got unprocessable 8bit of %s", getName(), + eachChanMeasured8Bit); + continue; + } + } + + if (printing) + ArLog::log (ArLog::Normal, "%s: Processing 8bit %s", getName(), + eachChanMeasured8Bit); + + for (atDeg = start, + it = myRawReadings->begin(), + onReading = 0; + onReading < eachNumberData; + atDeg += increment, + it++, + onReading++) { + reading = (*it); + refl = packet->bufToUByte(); + if (refl == 254) { + reading->setExtraInt (32); + // ArLog::log(ArLog::Normal, "%s: refl at %g of %d", getName(), atDeg, refl); + } + // if the bit is dazzled we could set it to be ignored, but + // that'd be some later day + else if (refl == 255) { + } + } + } // end for 8bit channel + + // 10/17/11 - PS read the last bytes, the first + // 4 bytes need to be zero, if timestamp is there + // just grap it + int positionData = packet->bufToUByte2(); + if (positionData == 0) { + int deviceName = packet->bufToUByte2(); + if (deviceName == 0) { + int comment = packet->bufToUByte2(); + if (comment == 0) { + int timeStamp = packet->bufToUByte2(); + if (timeStamp != 0) { + /* + myYear = packet->bufToUByte2(); + myMonth = packet->bufToUByte(); + myMonthDay = packet->bufToUByte(); + myHour = packet->bufToUByte(); + myMinute = packet->bufToUByte(); + mySecond = packet->bufToUByte(); + myUSec = packet->bufToUByte4(); + */ + /* + ArLog::log(ArLog::Terse, "%s::sensorInterp() Date= %d/%d/%d %d:%d:%d:%d TranDuration = %d\n", + getName(), myMonth, myMonthDay, myYear, myHour, myMinute, mySecond, myUSec, myTransmissionDuration); + */ + } + } + } + } + myDataMutex.unlock(); + //ArTime test; + laserProcessReadings(); + unlockDevice(); + if (printing) + ArLog::log (ArLog::Normal, "%s: Packet took = %ld", + getName(), packetRecvTime.mSecSince()); + delete packet; + } + /* + if (printing) + ArLog::log(ArLog::Normal, "%s: Function took = %ld", + getName(), startTime.mSecSince()); + */ +} + +AREXPORT ArLMS1XXPacket *ArLMS1XX::sendAndRecv( + ArTime timeout, ArLMS1XXPacket *sendPacket, const char *recvName) +{ + ArLMS1XXPacket *packet; + + + + + IFDEBUG( + + int i; + char x[100000]; + int idx=0; + for (i = 0;i < sendPacket->getLength();i++) + { + if (sendPacket->getBuf()[i] == '\002') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else if (sendPacket->getBuf()[i] == '\003') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else + sprintf(&x[idx++], "%c",(char *)sendPacket->getBuf()[i]); + } + + ArLog::log(ArLog::Terse, + "%s::sendAndRecv() Buffer = %s", getName(), x); + + ); // end IFDEBUG + + + while (timeout.mSecTo() > 0) + { + // just ask for data + if ((myConn->write(sendPacket->getBuf(), sendPacket->getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::sendAndRecv() Could not send %s to laser", getName(), recvName); + return NULL; + } + + while (timeout.mSecTo() > 0 && + (packet = myReceiver.receivePacket(1000)) != NULL) + { + if (strcasecmp(packet->getCommandName(), recvName) == 0) + return packet; + // PS 9/1/11 - need to make sure we have a packet + else if (packet != NULL) + { + ArLog::log(ArLog::Normal, "%s::sendAndRecv() received %s %s, was expecting %s", + getName(), + packet->getCommandType(), + packet->getCommandName(), + recvName); + + delete packet; + packet = NULL; + } + else + { + ArLog::log(ArLog::Normal, "%s::sendAndRecv() call to receivePacket() failed was expecting %s", + getName(), + recvName); + + } + + } + } + + ArLog::log(ArLog::Normal, + "%s::sendAndRecv() Did not get %s ack", + getName(), recvName); + + return NULL; +} + +AREXPORT bool ArLMS1XX::blockingConnect(void) +{ + char buf[1024]; + ArSerialConnection *conn; + + if (!getRunning()) + runAsync(); + + myConnMutex.lock(); + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Could not connect because there is no connection defined", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + if ((conn = dynamic_cast(myConn)) != NULL) + { + conn->setBaud(atoi(getStartingBaudChoice())); + } + } + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN && + !myConn->openSimple()) + { + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Could not connect because the connection was not open and could not open it", getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + // PS - set logging level and laser type in packetreceiver class + myReceiver.setmyInfoLogLevel(myInfoLogLevel); + myReceiver.setLaserModel(myLaserModel); + myReceiver.setmyName(getName()); + + switch (myLaserModel) { + + case ArLMS1XX::LMS1XX: + case ArLMS1XX::LMS5XX: + myReceiver.setReadTimeout(5); + break; + + // for the TiM, we need to put + // in a delay so that if it's + // powered off, we give it time + // to come up + case ArLMS1XX::TiM3XX: + //ArUtil::sleep(10000); + myReceiver.setReadTimeout(50); + break; + + + } // end switch laserModel + + myReceiver.setDeviceConnection(myConn); + myConnMutex.unlock(); + + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + + laserPullUnsetParamsFromRobot(); + laserCheckParams(); + + int size = (270 / .25 + 1); + ArLog::log(myInfoLogLevel, "%s::blockingConnect() Setting current buffer size to %d", + getName(), size); + setCurrentBufferSize(size); + + + switch (myLaserModel) { + + case ArLMS1XX::LMS1XX: + if (lms1xxConnect()) + return true; + break; + + case ArLMS1XX::TiM3XX: + if (tim3xxConnect()) + return true; + break; + + case ArLMS1XX::LMS5XX: + if (lms5xxConnect()) + return true; + break; + + + } // end switch laserModel + + + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Did not get scandata back from laser", getName()); + failedToConnect(); + return false; + +} + +AREXPORT bool ArLMS1XX::lms5xxConnect(void) +{ + + ArTime timeDone; + if (myPowerControlled) { + if (!timeDone.addMSec(60 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() error adding msecs (60 * 1000)"); + } + } + else { + if (!timeDone.addMSec(30 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() error adding msecs (30 * 1000)"); + } + } + + ArLMS1XXPacket *packet; + + ArLMS1XXPacket sendPacket; + + + // 1. Log in + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("SetAccessMode"); + sendPacket.uByteToBuf(0x3); // level + sendPacket.strToBuf("F4724744"); // hashed password + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending SetAccessMode: %s", getName(), + sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "SetAccessMode")) != NULL) + { + + ArLog::log(myLogLevel, "%s::lms5xxConnect() received SetAccessMode answer",getName()); + delete packet; + packet = NULL; + + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecvfor send SetAccessMode failed", getName()); + failedToConnect(); + return false; + } + + + // 2. Set Frequency and Resolution + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("mLMPsetscancfg"); + + + // PS the scanning freq needs to be 5000 for .5 angle resolution and 2500 for angle resolution .25 + // PS 9/1/11 - use strcmp instead of double stuff + if (strcmp(getIncrementChoice(),"quarter") == 0) + //if (getIncrementChoiceDouble() == .25) + sendPacket.byte4ToBuf(2500); // scanning freq + else if (strcmp(getIncrementChoice(),"half") == 0) + sendPacket.byte4ToBuf(5000); // scanning freq + else + sendPacket.byte4ToBuf(7500); // scanning freq + + + sendPacket.byte2ToBuf(1); // number segments + + sendPacket.byte4ToBuf(getIncrementChoiceDouble() * 10000); // angle resolution + //sendPacket.byte4ToBuf(.25 * 10000); // angle resolution + //ArLog::log(ArLog::Normal, + // "%s::lms5xxConnect() increment = %d", getName(), getIncrementChoiceDouble()); + + + sendPacket.byte4ToBuf(-5 * 10000); // can't change starting angle + sendPacket.byte4ToBuf(185 * 10000); // can't change ending angle + + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending setscancfg: %s", getName(), + sendPacket.getBuf()); + + + if ((packet = sendAndRecv(timeDone, &sendPacket, "mLMPsetscancfg")) != NULL) + { + int val; + val = packet->bufToUByte(); + + delete packet; + packet = NULL; + + if (val == 0) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received setscancfg answer (%d)", + getName(), val); + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() received wrong status from setscancfg (%d), needs to be 0", getName(), val); + failedToConnect(); + return false; + } + + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send setscancfg failed", getName()); + failedToConnect(); + return false; + } + + // get frequency and angular resolution + + sendPacket.empty(); + sendPacket.strToBuf("sRN"); + sendPacket.strToBuf("LMPscancfg"); + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending scancfg: %s", getName(), sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "LMPscancfg")) != NULL) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received scancfg answer", getName()); + + delete packet; + packet = NULL; + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send scancfg failed", getName()); + failedToConnect(); + return false; + } + + + // set time + + time_t ltime; + struct tm *Tm; + ltime = time(NULL); + Tm = localtime(<ime); + + + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("LSPsetdatetime"); + sendPacket.byte2ToBuf(Tm->tm_year+1900); + sendPacket.byteToBuf(Tm->tm_mon+1); + sendPacket.byteToBuf(Tm->tm_mday); + sendPacket.byteToBuf(Tm->tm_hour); + sendPacket.byteToBuf(Tm->tm_min); + sendPacket.byteToBuf(Tm->tm_sec); + sendPacket.byteToBuf(0x0); + + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending setdatetime: %s", getName(), sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "LSPsetdatetime")) != NULL) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received setdatetime answer", getName()); + + delete packet; + packet = NULL; + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send setdatetime failed", getName()); + failedToConnect(); + return false; + } + + + // Configure scandata content + sendPacket.empty(); + sendPacket.strToBuf("sWN"); + sendPacket.strToBuf("LMDscandatacfg"); + sendPacket.uByte2ToBuf(0x1); // output channel + // if there's no reflectors do 0 here, otherwise put 1 + if (strcasecmp(getReflectorBitsChoice(), "none") == 0) + sendPacket.uByteToBuf(0x0); // remission (reflectance) + else + sendPacket.uByteToBuf(0x1); // remission (reflectance) + // if we're doing 16 bits set it that way + if (strcasecmp(getReflectorBitsChoice(), "16bits") == 0) + sendPacket.uByteToBuf(0x1); // remission resolution + else + sendPacket.uByteToBuf(0x0); // remission resolution + sendPacket.uByteToBuf(0x0); // unit + sendPacket.uByte2ToBuf(0x0); // encoder + sendPacket.uByteToBuf(0x0); // position + sendPacket.uByteToBuf(0x0); // device name + sendPacket.uByteToBuf(0x0); // comment + + // PS 10/17/11 - per Matt L. request - turn on timeinfo + sendPacket.uByteToBuf(0x1); // time + //sendPacket.uByteToBuf(0x0); // time + + // PS 9/1/11 - based on increment choice set which scan + if (strcmp(getIncrementChoice(),"quarter") == 0) + sendPacket.byteToBuf(2); // which scan + else if (strcmp(getIncrementChoice(),"half") == 0) + sendPacket.byteToBuf(4); // which scan + else + sendPacket.byteToBuf(8); // which scan + + + //sendPacket.byteToBuf(myScanFreq); // which scan + + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending scandatacfg: %s", getName(), sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "LMDscandatacfg")) != NULL) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received scandatacfg answer", getName()); + + delete packet; + packet = NULL; + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send scandatacfg failed", getName()); + failedToConnect(); + return false; + } + + + + // Configure scandata output + sendPacket.empty(); + sendPacket.strToBuf("sWN"); + sendPacket.strToBuf("LMPoutputRange"); + sendPacket.byte2ToBuf(1); // number segments + + sendPacket.byte4ToBuf(getIncrementChoiceDouble() * 10000); // angle resolution + //sendPacket.byte4ToBuf(.25 * 10000); // angle resolution + + sendPacket.byte4ToBuf(-5 * 10000); // can't change starting angle + sendPacket.byte4ToBuf(185 * 10000); // can't change ending angle + + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending outputRange: %s", getName(), + sendPacket.getBuf()); + + + if ((packet = sendAndRecv(timeDone, &sendPacket, "LMPoutputRange")) != NULL) + { + + ArLog::log(myLogLevel, "%s::lms5xxConnect() received outputRange answer", getName()); + delete packet; + packet = NULL; + + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send outputRange failed", getName()); + failedToConnect(); + return false; + } + + + // Configure echo filter to echo first + sendPacket.empty(); + sendPacket.strToBuf("sWN"); + sendPacket.strToBuf("FREchoFilter"); + sendPacket.uByteToBuf(0x0); // 0 = First Echo 1=All Echos 2=Last Echo + + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending Echo Filter: %s", getName(), + sendPacket.getBuf()); + + + if ((packet = sendAndRecv(timeDone, &sendPacket, "FREchoFilter")) != NULL) + { + + ArLog::log(myLogLevel, "%s::lms5xxConnect() received Echo Filter answer", getName()); + delete packet; + packet = NULL; + + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send Echo Filter failed", getName()); + failedToConnect(); + return false; + } + + // Store Paramters + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("mEEwriteall"); + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending writeall: %s", getName(), + sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "mEEwriteall")) != NULL) + { + int val; + val = packet->bufToUByte(); + delete packet; + packet = NULL; + if (val == 1) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received writeall answer (%d)", + getName(), val); + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() received wrong status from writeall (%d), needs to be 1", getName(), val); + failedToConnect(); + return false; + } + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send writeall failed", getName()); + failedToConnect(); + return false; + } + + // PS 8/22/11 - try a sleep per SICK because of issues with extra responses + ArUtil::sleep(3000); + + // Log out + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("Run"); + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending Run: %s", getName(), + sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "Run")) != NULL) + { + int val; + val = packet->bufToUByte(); + delete packet; + packet = NULL; + if (val == 1) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received Run answer (%d)", + getName(), val); + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() received wrong status from Run (%d), needs to be 1", getName(), val); + failedToConnect(); + return false; + } + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send Run failed", getName()); + failedToConnect(); + return false; + } + + + + + + // Check status + // PS 9/27/11 - loop thru for a 30 sec, then exit + //while (1) + + ArTime loopTimeDone; + if (!loopTimeDone.addMSec(30 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() error adding msecs (30 * 1000)"); + } + + while (loopTimeDone.mSecTo() > 0) + { + sendPacket.empty(); + sendPacket.strToBuf("sRN"); + sendPacket.strToBuf("STlms"); + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms5xxConnect() sending STlms: %s", getName(), + sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "STlms")) != NULL) + { + int val; + val = packet->bufToUByte(); + delete packet; + packet = NULL; + if (val == 7) + { + ArLog::log(myLogLevel, "%s::lms5xxConnect() received STlms answer (%d)", + getName(), val); + break; + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() wrong state received from STlms answer = (%d), needs to be 7", getName(), val); + // PS 9/27/11 - took out call to failedToConnect() as this is not necessary as the laser is + // coming up during this loop and we actually are getting messages from the LMS500 + //failedToConnect(); + //return false; + } + } + else + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() ::sendAndRecv for send STlms failed", getName()); + failedToConnect(); + return false; + } + } + + // PS 9/27/11 - fail the connect if we don't get the correct status back in 30 seconds + if (loopTimeDone.mSecTo() <= 0) { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() timeout on STlms state changed never received a 7 status", getName()); + + failedToConnect(); + return false; + } + + sendPacket.empty(); + sendPacket.strToBuf("sEN"); + sendPacket.strToBuf("LMDscandata"); + sendPacket.uByteToBuf(1); + sendPacket.finalizePacket(); + + IFDEBUG( + + int i; + char x[100000]; + int idx=0; + for (i = 0;i < sendPacket.getLength();i++) + { + if (sendPacket.getBuf()[i] == '\002') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else if (sendPacket.getBuf()[i] == '\003') + { + strcat(&x[idx], ""); + idx = idx+5; + } + else + sprintf(&x[idx++], "%c",(char *)sendPacket.getBuf()[i]); + } + + ArLog::log(ArLog::Terse, + "%s::lms5xxConnect() write Buffer = %s", getName(), x); + + ); // end IFDEBUG + + + //printf("(%s)\n", sendPacket.getBuf()); + // just ask for continuous data + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Normal, + "%s::lms5xxConnect() Could not send %s to laser", getName(), "LMDscandata"); + failedToConnect(); + return false; + } + + while (timeDone.mSecTo() > 0) + { + packet = myReceiver.receivePacket(1000); + + // PS 9/1/11 - fix a bug where we were just looking for the sSN LMDscandata + // but actually the LMS sends back a sEA LMDscandata first, so we need to + // put up another read to the the sSN LMDscandata + + if (packet != NULL && + strcasecmp(packet->getCommandType(), "sEA") == 0 && + strcasecmp(packet->getCommandName(), "LMDscandata") == 0) + { + delete packet; + packet = NULL; + packet = myReceiver.receivePacket(1000); + + if (packet != NULL && + strcasecmp(packet->getCommandType(), "sSN") == 0 && + strcasecmp(packet->getCommandName(), "LMDscandata") == 0) + { + delete packet; + packet = NULL; + + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s: Connected to laser", getName()); + laserConnect(); + return true; + } + else + { + + if (packet != NULL) + { + ArLog::log(ArLog::Normal, "%s::lms5xxConnect() received %s %s (%d long) was expecting %s", getName(), + packet->getCommandType(), packet->getCommandName(), + packet->getLength(), + "sSN LMDscandata"); + delete packet; + packet = NULL; + } + else + { + ArLog::log(ArLog::Normal, "%s::lms5xxConnect() call to receivePacket() failed was expecting %s", + getName(), + "sSN LMDscandata"); + } + } + } + else + { + if (packet != NULL) + { + ArLog::log(ArLog::Normal, "%s::lms5xxConnect() received %s %s (%d long) was expecting %s", getName(), + packet->getCommandType(), packet->getCommandName(), + packet->getLength(), + "sEA LMDscandata"); + delete packet; + packet = NULL; + } + else + { + ArLog::log(ArLog::Normal, "%s::lms5xxConnect() call to receivePacket() failed was expecting %s", + getName(), + "sEA LMDscandata"); + } + } + } + + return false; + +} + +AREXPORT bool ArLMS1XX::lms1xxConnect(void) +{ + + ArTime timeDone; + if (myPowerControlled) { + if (!timeDone.addMSec(60 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::lms1xxConnect() error adding msecs (60 * 1000)"); + } + } + else { + if (!timeDone.addMSec(30 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::lms1xxConnect() error adding msecs (30 * 1000)"); + } + } + + ArLMS1XXPacket *packet; + + ArLMS1XXPacket sendPacket; + + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("SetAccessMode"); + sendPacket.uByteToBuf(0x3); // level + sendPacket.strToBuf("F4724744"); // hashed password + sendPacket.finalizePacket(); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "SetAccessMode")) != NULL) + { + int val; + val = packet->bufToUByte(); + + delete packet; + packet = NULL; + + if (val == 1) + { + ArLog::log(myLogLevel, "%s::lms1xxConnect() Changed access mode (%d)", + getName(), val); + } + else + { + ArLog::log(ArLog::Terse, + "%s::lms1xxConnect() Could not change access mode (%d)", getName(), val); + failedToConnect(); + return false; + } + } + else + { + failedToConnect(); + return false; + } + + + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("mLMPsetscancfg"); + sendPacket.byte4ToBuf(5000); // scanning freq + sendPacket.byte2ToBuf(1); // number segments + sendPacket.byte4ToBuf(getIncrementChoiceDouble() * 10000); // angle resolution + sendPacket.byte4ToBuf((getStartDegrees() + 90) * 10000); // starting angle + sendPacket.byte4ToBuf((getEndDegrees() + 90) * 10000); // ending angle + + sendPacket.finalizePacket(); + + ArLog::log(ArLog::Verbose, "%s::lms1xxConnect() mLMPsetscancfg: %s", getName(), + sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "mLMPsetscancfg")) != NULL) + { + int val; + val = packet->bufToUByte(); + + delete packet; + packet = NULL; + + if (val == 0) + { + ArLog::log(myLogLevel, "%s::lms1xxConnect() mLMPsetscancfg succeeded (%d)", + getName(), val); + } + else + { + // See LMS100 operating instruction manual section 10.2.9 for + // mLMPsetscancfg answer packet documentation + if(val == 1) + ArLog::log(ArLog::Terse, + "%s::lms1xxConnect() mLMPsetscancfg failed with error %d: Invalid scanning frequency (%d).", + getName(), val, 5000); + else if(val == 2) + ArLog::log(ArLog::Terse, + "%s::lms1xxConnect() mLMPsetscancfg failed with error %d: Invalid resolution (increment) (%.2f degrees, sent value %d to laser).", + getName(), val, getIncrementChoiceDouble(), (int)(getIncrementChoiceDouble()*10000)); + else if(val == 3) + ArLog::log(ArLog::Terse, + "%s::lms1xxConnect() mLMPsetscancfg failed with error %d: Invalid scanning frequency (%d) AND invalid resolution (increment) (%.2f degrees, sent value %d to laser).", + getName(), val, 5000, getIncrementChoiceDouble(), (int)(getIncrementChoiceDouble()*10000)); + else if(val == 4) + ArLog::log(ArLog::Terse, + "%s:lms1xxConnect() mLMPsetscancfg failed with error %d: Invalid scan area (Sent %d %d to laser)", + getName(), val, -45*10000, 225*10000); + else + ArLog::log(ArLog::Terse, + "%s:lms1xxConnect() mLMPsetscancfg failed with error %d: Unknown error", + getName(), val); + + failedToConnect(); + return false; + } + + } + else + { + failedToConnect(); + return false; + } + + + sendPacket.empty(); + sendPacket.strToBuf("sWN"); + sendPacket.strToBuf("LMDscandatacfg"); + sendPacket.uByte2ToBuf(0x1); // output channel + sendPacket.uByteToBuf(0x0); // remission + sendPacket.uByteToBuf(0x0); // remission resolution + sendPacket.uByteToBuf(0x0); // unit + sendPacket.uByte2ToBuf(0x0); // encoder + sendPacket.uByteToBuf(0x0); // position + sendPacket.uByteToBuf(0x0); // device name + sendPacket.uByteToBuf(0x0); // comment + sendPacket.uByteToBuf(0x0); // time + sendPacket.byteToBuf(5); // which scan + //sendPacket.byteToBuf(1); // which scan + sendPacket.finalizePacket(); + + ArLog::log(myLogLevel, "%s::lms1xxConnect() scandatacfg: %s", getName(), sendPacket.getBuf()); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "LMDscandatacfg")) != NULL) + { + ArLog::log(myLogLevel, "%s::lms1xxConnect() scandatacfg succeeded", getName()); + + delete packet; + packet = NULL; + } + else + { + failedToConnect(); + return false; + } + + sendPacket.empty(); + sendPacket.strToBuf("sMN"); + sendPacket.strToBuf("Run"); + sendPacket.finalizePacket(); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "Run")) != NULL) + { + int val; + val = packet->bufToUByte(); + delete packet; + packet = NULL; + if (val == 1) + { + ArLog::log(myLogLevel, "%s::lms1xxConnect() Run succeeded (%d)", + getName(), val); + } + else + { + ArLog::log(ArLog::Terse, + "%s::lms1xxConnect() Could not run (%d)", getName(), val); + failedToConnect(); + return false; + } + } + else + { + failedToConnect(); + return false; + } + + /* when asking one at a time + sendPacket.empty(); + sendPacket.strToBuf("sRN"); + sendPacket.strToBuf("LMDscandata"); + sendPacket.finalizePacket(); + + if ((packet = sendAndRecv(timeDone, &sendPacket, "LMDscandata")) != NULL) + { + ArLog::log(myLogLevel, "%s: Got %s scan data %d", getName(), + packet->getCommandType(), packet->getLength()); + myPacketsMutex.lock(); + myPackets.push_back(packet); + myPacketsMutex.unlock(); + sensorInterp(); + + ArLog::log(myLogLevel, "%s: Processed scan data", getName()); + + } + else + { + failedToConnect(); + return false; + } + */ + + sendPacket.empty(); + sendPacket.strToBuf("sEN"); + sendPacket.strToBuf("LMDscandata"); + sendPacket.uByteToBuf(1); + sendPacket.finalizePacket(); + + //printf("(%s)\n", sendPacket.getBuf()); + // just ask for continuous data + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::lms1xxConnect() Could not send %s to laser", getName(), "LMDscandata"); + failedToConnect(); + return false; + } + ArTime t; + while (timeDone.mSecTo() > 0) + { + packet = myReceiver.receivePacket(1000); + if (packet != NULL && + strcasecmp(packet->getCommandType(), "sSN") == 0 && + strcasecmp(packet->getCommandName(), "LMDscandata") == 0) + { + ArLog::log(ArLog::Normal, "%s::lms1xxConnect() Took %f sec to get sSN LMDscandata packet from laser.\n", getName(), (double)(t.mSecSince())/1000.0); + delete packet; + packet = NULL; + + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s::lms1xxConnect() Connected to laser", getName()); + laserConnect(); + return true; + } + else if (packet != NULL) + { + ArLog::log(ArLog::Normal, "%s::lms1xxConnect() Got %s %s (%d long) while waiting for sSN LMDscandata", getName(), + packet->getCommandType(), packet->getCommandName(), + packet->getLength()); + delete packet; + packet = NULL; + } + } + return false; + +} + +AREXPORT bool ArLMS1XX::tim3xxConnect(void) +{ + + ArTime timeDone; + if (myPowerControlled) { + if (!timeDone.addMSec(60 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::tim3xxConnect() error adding msecs (60 * 1000)"); + } + } + else { + if (!timeDone.addMSec(30 * 1000)) { + ArLog::log(ArLog::Normal, + "%s::tim3xxConnect() error adding msecs (30 * 1000)"); + } + } + + ArLMS1XXPacket *packet; + + ArLMS1XXPacket sendPacket; + + // first send a stop + + sendPacket.empty(); + sendPacket.strToBuf("sEN"); + sendPacket.strToBuf("LMDscandata"); + sendPacket.uByteToBuf(0); + sendPacket.finalizePacket(); + + //printf("(%s)\n", sendPacket.getBuf()); + // just ask for continuous data + + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Sending (STOP) sEN LMDscandata ", getName()); + + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Could not send sEN LMDscandata to laser", getName()); + failedToConnect(); + return false; + } + + ArUtil::sleep(1000); + + // now look for 1 packet + + sendPacket.empty(); + sendPacket.strToBuf("sRN"); + sendPacket.strToBuf("LMDscandata"); + sendPacket.finalizePacket(); + + //printf("(%s)\n", sendPacket.getBuf()); + // just ask for continuous data + + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Sending (Only one Telegram) sRN LMDscandata ", getName()); + + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Could not send sRN LMDscandata to laser", getName()); + failedToConnect(); + return false; + } + + + // now get the response to the one telegram + ArTime t; + while (timeDone.mSecTo() > 0) + { + + packet = myReceiver.receivePacket(1000); + if (packet != NULL && +// strcasecmp(packet->getCommandType(), "sSN") == 0 && + strcasecmp(packet->getCommandType(), "sRA") == 0 && + strcasecmp(packet->getCommandName(), "LMDscandata") == 0) + { + ArLog::log(ArLog::Normal, "%s::tim3xxConnect() Took %f sec to get sRA LMDscandata packet from laser.", getName(), (double)(t.mSecSince())/1000.0); + delete packet; + packet = NULL; + + // now send data permanent + + sendPacket.empty(); + sendPacket.strToBuf("sEN"); + sendPacket.strToBuf("LMDscandata"); + sendPacket.uByteToBuf(1); + sendPacket.finalizePacket(); + + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Sending (send permanent) sEN LMDscandata ", getName()); + + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Could not send sEN LMDscandata to laser", getName()); + failedToConnect(); + return false; + } + + // grab the response + packet = myReceiver.receivePacket(1000); + if (packet != NULL && + strcasecmp(packet->getCommandType(), "sEA") == 0 && + strcasecmp(packet->getCommandName(), "LMDscandata") == 0) + { + ArLog::log(ArLog::Normal, "%s::tim3xxConnect() Took %f sec to get sEA LMDscandata packet from laser.", getName(), (double)(t.mSecSince())/1000.0); + delete packet; + packet = NULL; + + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s::tim3xxConnect() Connected to laser", getName()); + laserConnect(); + return true; + } + else + { + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Could not get sEA LMDscandata from laser", getName()); + failedToConnect(); + return false; + } + } + else if (packet != NULL) + { + ArLog::log(ArLog::Normal, "%s::tim3xxConnect() Got %s %s (%d long) while waiting for sRA LMDscandata", getName(), + packet->getCommandType(), packet->getCommandName(), + packet->getLength()); + delete packet; + packet = NULL; + + } + else if (packet == NULL) { + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) { + ArLog::log(ArLog::Terse, + "%s::tim3xxConnect() Could not send sRN LMDscandata to laser", getName()); + failedToConnect(); + return false; + } + } + } + ArLog::log(ArLog::Normal, + "%s::tim3xxConnect() Timout waiting for initial packet from TiM - failing connect", getName()); + failedToConnect(); + return false; + +} + +AREXPORT void * ArLMS1XX::runThread(void *arg) +{ + char buf[1024]; + ArLMS1XXPacket *packet; + + /* + ArTime dataRequested; + + ArLMS1XXPacket requestPacket; + requestPacket.strToBuf("sRN"); + requestPacket.strToBuf("LMDscandata"); + requestPacket.finalizePacket(); + */ + + while (getRunning()) + { + lockDevice(); + if (myStartConnect) + { + myStartConnect = false; + myTryingToConnect = true; + unlockDevice(); + + blockingConnect(); + + lockDevice(); + myTryingToConnect = false; + unlockDevice(); + continue; + } + unlockDevice(); + + if (!myIsConnected) + { + ArUtil::sleep(100); + continue; + } + + + /* + dataRequested.setToNow(); + + if (myConn == NULL || !myConn->write(requestPacket.getBuf(), + requestPacket.getLength())) + { + ArLog::log(ArLog::Terse, "Could not send packets request to lms1XX"); + continue; + } + */ + + /// MPL made this 500 since otherwise it will not get a packet + /// sometimes, then go out and have to sleep and come back in and + /// wind up with a remainder that caused the timing problems + while (getRunning() && myIsConnected && + (packet = myReceiver.receivePacket(500, true, true)) != NULL) + { + myPacketsMutex.lock(); + myPackets.push_back(packet); + myPacketsMutex.unlock(); + + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && laserCheckLostConnection()) + { + ArLog::log(ArLog::Terse, + "%s::runThread() Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince()/1000.0, + getConnectionTimeoutSeconds()); + myIsConnected = false; + laserDisconnectOnError(); + continue; + } + + /// MPL no sleep here so it'll get back into that while as soon as it can + + //ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(500); + } + return NULL; +} + + +AREXPORT bool ArLMS1XX::validateCheckSum(ArLMS1XXPacket *packet) + +{ + +unsigned short checksum = 0; +char str[1024]; +char *pch; +unsigned char val; +unsigned char val1; + + strncpy(str, packet->getBuf(), packet->getLength() - 1); + + pch = strtok(&str[17], " "); + while (pch != NULL) { + + if (pch[0] != '0') { + if (strcmp(pch, "DIST1") == 0) { + checksum ^= 0x44; + checksum ^= 0x49; + checksum ^= 0x53; + checksum ^= 0x54; + checksum ^= 0x31; + } + else { + // if it's an odd number - do the 1st byte + if (strlen(pch) & 1) { + + if ((pch[0] >= '0') && (pch[0] <= '9')) { + val = pch[0] - '0'; + } + else if ((pch[0] >= 'A') && (pch[0] <= 'F')) { + val = 10 + pch[0] - 'A'; + } + + checksum ^= val; + + pch = &pch[1]; + + } + + while (strlen(pch) != 0) { + + if ((pch[0] >= '0') && (pch[0] <= '9')) { + val = pch[0] - '0'; + } + else if ((pch[0] >= 'A') && (pch[0] <= 'F')) { + val = 10 + pch[0] - 'A'; + } + + if ((pch[1] >= '0') && (pch[1] <= '9')) { + val1 = pch[1] - '0'; + } + else if ((pch[1] >= 'A') && (pch[1] <= 'F')) { + val1 = 10 + pch[1] - 'A'; + } + checksum ^= (val1 | (val << 4)); // Calculate the checksum... (XOR) + + pch = &pch[2]; + } + } + } + pch = strtok(NULL, " "); + } // end while + + + //if (checksum == 0) + // ArLog::log(ArLog::Normal, + // "%s::validateCheckSum() checksum = %d", getName(), checksum); + + return checksum; + +} \ No newline at end of file diff --git a/Legacy/Aria/src/ArLMS2xx.cpp b/Legacy/Aria/src/ArLMS2xx.cpp new file mode 100644 index 0000000..7669dbd --- /dev/null +++ b/Legacy/Aria/src/ArLMS2xx.cpp @@ -0,0 +1,1695 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLMS2xx.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + +AREXPORT ArLMS2xx::ArLMS2xx( + int laserNumber, const char *name, bool appendLaserNumberToName) : + ArLaser(laserNumber, name, 32000, false, appendLaserNumberToName), + mySimPacketHandler(this, &ArLMS2xx::simPacketHandler), + mySensorInterpCB(this, &ArLMS2xx::sensorInterpCallback), + myLMS2xxPacketReceiver(0, true), + myAriaExitCB(this, &ArLMS2xx::disconnect) +{ + std::string str; + laserSetName(getName()); + laserSetDefaultTcpPort(8102); + laserSetDefaultPortType("serial"); + + Aria::addExitCallback(&myAriaExitCB, -10); + + std::map degreesChoices; + degreesChoices["180"] = 180; + degreesChoices["100"] = 100; + laserAllowDegreesChoices("180", degreesChoices); + + std::map incrementChoices; + incrementChoices["one"] = 1; + incrementChoices["half"] = .5; + laserAllowIncrementChoices("one", incrementChoices); + + std::list unitsChoices; + unitsChoices.push_back("1mm"); + unitsChoices.push_back("1cm"); + unitsChoices.push_back("10cm"); + laserAllowUnitsChoices("1mm", unitsChoices); + + laserAllowSetPowerControlled(false); + + std::list reflectorBitsChoices; + reflectorBitsChoices.push_back("1ref"); + reflectorBitsChoices.push_back("2ref"); + reflectorBitsChoices.push_back("3ref"); + laserAllowReflectorBitsChoices("1ref", reflectorBitsChoices); + + std::list baudChoices; + baudChoices.push_back("9600"); + baudChoices.push_back("19200"); + baudChoices.push_back("38400"); + laserAllowStartingBaudChoices("9600", baudChoices); + + laserAllowAutoBaudChoices("38400", baudChoices); + + + myAssembleReadings = new std::list; + myCurrentReadings = new std::list; + myRawReadings = myCurrentReadings; + myIter = myAssembleReadings->begin(); + myConn = NULL; + myRobot = NULL; + myStartConnect = false; + myRunningOnRobot = false; + switchState(STATE_NONE); + myProcessImmediately = false; + myInterpolation = true; + myUseSim = false; + + setMinDistBetweenCurrent(0); + setMaxDistToKeepCumulative(6000); + setMinDistBetweenCumulative(200); + setMaxSecondsToKeepCumulative(30); + setMaxInsertDistCumulative(3000); + + setCumulativeCleanDist(75); + setCumulativeCleanInterval(1000); + + resetLastCumulativeCleanTime(); + + setCurrentDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0, 255), + 80, // mm diameter of dots + 75), // layer above sonar + true); + + setCumulativeDrawingData( + new ArDrawingData("polyDots", + ArColor(125, 125, 125), + 100, // mm diameter of dots + 60), // layer below current range devices + true); +} + +AREXPORT ArLMS2xx::~ArLMS2xx() +{ + Aria::remExitCallback(&myAriaExitCB); + if (myRobot != NULL) + { + myRobot->remRangeDevice(this); + myRobot->remLaser(this); + myRobot->remPacketHandler(&mySimPacketHandler); + myRobot->remSensorInterpTask(&mySensorInterpCB); + } + lockDevice(); + if (isConnected()) + { + disconnect(); + } + unlockDevice(); +} + + +AREXPORT void ArLMS2xx::laserSetName(const char *name) +{ + myName = name; + + myStateMutex.setLogNameVar("%s::myStateMutex", getName()); + myAriaExitCB.setNameVar("%s::exitCallback", getName()); + mySimPacketHandler.setNameVar("%s::simPacketHandler", getName()); + + ArLaser::laserSetName(getName()); +} + +AREXPORT bool ArLMS2xx::sickGetIsUsingSim(void) +{ + return myUseSim; +} + +AREXPORT void ArLMS2xx::sickSetIsUsingSim(bool usingSim) +{ + myUseSim = usingSim; +} + +AREXPORT void ArLMS2xx::setDeviceConnection(ArDeviceConnection *conn) +{ + myConnMutex.lock(); + myLMS2xxPacketReceiver.setDeviceConnection(conn); + myConnMutex.unlock(); + ArLaser::setDeviceConnection(conn); +} + + + +AREXPORT void ArLMS2xx::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + { + myRobot->addPacketHandler(&mySimPacketHandler, ArListPos::LAST); + myRobot->addSensorInterpTask("sick", 90, &mySensorInterpCB); + } + ArRangeDevice::setRobot(robot); +} + + +/** @internal */ +AREXPORT bool ArLMS2xx::simPacketHandler(ArRobotPacket *packet) +{ + std::list::iterator it; + + unsigned int totalNumReadings; + unsigned int readingNumber; + double atDeg; + unsigned int i; + ArSensorReading *reading; + std::list::iterator tempIt; + unsigned int newReadings; + int range; + int refl = 0; + ArPose encoderPose; + //std::list::iterator ignoreIt; + bool ignore; + + if (packet->getID() != 0x60 && packet->getID() != 0x61) + return false; + + bool isExtendedPacket = (packet->getID() == 0x61); + + // if we got here, its the right type of packet + + //printf("Got in a packet from the simulator\n"); + lockDevice(); + //printf("1\n"); + if (!myUseSim) + { + ArLog::log(ArLog::Terse, + "%s: Got a packet from the simulator with laser information, but the laser is not being simulated, major trouble.", + getName()); + unlockDevice(); + return true; + } + if(!isExtendedPacket) + { + // ignore the positional information + packet->bufToByte2(); + packet->bufToByte2(); + packet->bufToByte2(); + } + totalNumReadings = packet->bufToByte2(); // total for this reading + readingNumber = packet->bufToByte2(); // which one we're on in this packet + newReadings = packet->bufToUByte(); // how many are in this packet + if (readingNumber == 0) + { + mySimPacketStart = myRobot->getPose(); + mySimPacketTrans = myRobot->getToGlobalTransform(); + mySimPacketEncoderTrans = myRobot->getEncoderTransform(); + mySimPacketCounter = myRobot->getCounter(); + } + //printf("ArLMS2xx::simPacketHandler: On reading number %d out of %d, new %d\n", readingNumber, totalNumReadings, newReadings); + // if we have too many readings in our list of raw readings, pop the extras + while (myAssembleReadings->size() > totalNumReadings) + { + ArLog::log(ArLog::Verbose, "ArLMS2xx::simPacketHandler, too many readings, popping one."); + tempIt = myAssembleReadings->begin(); + if (tempIt != myAssembleReadings->end()) + delete (*tempIt); + myAssembleReadings->pop_front(); + } + + // If we don't have any sensor readings created at all, make 'em all now + if (myAssembleReadings->size() == 0) + for (i = 0; i < totalNumReadings; i++) + myAssembleReadings->push_back(new ArSensorReading); + + // Okay, we know where we're at, so get an iterator to the right spot, or + // make sure the one we keep around is in the right spot... if neither of + // these trigger, then the iter should be in the right spot + if ((readingNumber != myWhichReading + 1) || + totalNumReadings != myTotalNumReadings) + { + //printf("2\n"); + myWhichReading = readingNumber; + myTotalNumReadings = totalNumReadings; + for (i = 0, myIter = myAssembleReadings->begin(); i < readingNumber; i++) + { + tempIt = myIter; + tempIt++; + if (tempIt == myAssembleReadings->end() && (i + 1 != myTotalNumReadings)) + myAssembleReadings->push_back(new ArSensorReading); + myIter++; + } + } + else + { + //printf("3\n"); + myWhichReading = readingNumber; + } + + atDeg = (mySensorPose.getTh() - myOffsetAmount + + readingNumber * myIncrementAmount); + //printf("4\n"); + encoderPose = mySimPacketEncoderTrans.doInvTransform(mySimPacketStart); + // while we have in the readings and have stuff left we can read + for (i = 0; + // (myWhichReading < myTotalNumReadings && + // packet->getReadLength() < packet->getLength() - 4); + i < newReadings; + i++, myWhichReading++, atDeg += myIncrementAmount) + { + reading = (*myIter); + range = packet->bufToUByte2(); + if(isExtendedPacket) + { + refl = packet->bufToUByte(); + packet->bufToUByte(); // don't need this byte for anything yet + packet->bufToUByte(); // don't need this byte for anything yet + } + ignore = false; + + /* + for (ignoreIt = myIgnoreReadings.begin(); + ignoreIt != myIgnoreReadings.end(); + ignoreIt++) + { + //if (atDeg == 0) + //printf("Ignoring %.0f\n", (*ignoreIt)); + if (ArMath::fabs(ArMath::subAngle(atDeg, *(ignoreIt))) < 1.0) + { + //printf("Ignoring %.0f\n", (*ignoreIt)); + ignore = true; + break; + } + } + //if (myMinRange != 0 && range < (int)myMinRange) + //ignore = true; + if (myMaxRange != 0 && range > (int)myMaxRange) + ignore = true; + */ + reading->resetSensorPosition(ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), + atDeg); + // printf("dist %d\n", dist); + reading->newData(range, mySimPacketStart, + encoderPose, + mySimPacketTrans, + mySimPacketCounter, packet->getTimeReceived(), ignore, refl); + //printf("%d ", range); + + //addReading(reading->getX(), reading->getY()); + tempIt = myIter; + tempIt++; + if (tempIt == myAssembleReadings->end() && + myWhichReading + 1 != myTotalNumReadings) + { + myAssembleReadings->push_back(new ArSensorReading); + } + myIter++; + } + + // check if the sensor set is complete + //printf("%d %d %d\n", newReadings, readingNumber, totalNumReadings); + if (newReadings + readingNumber >= totalNumReadings) + { + // set ArRangeDevice buffer + myRawReadings = myAssembleReadings; + // switch internal buffers + myAssembleReadings = myCurrentReadings; + myCurrentReadings = myRawReadings; + // We have in all the readings, now sort 'em and update the current ones + //filterReadings(); + laserProcessReadings(); + //printf("\n"); + } + + unlockDevice(); + return true; +} + + +/** @internal */ +AREXPORT void ArLMS2xx::switchState(State state) +{ + myStateMutex.lock(); + myState = state; + myStateStart.setToNow(); + myStateMutex.unlock(); +} + +/** + @internal + @return 0 if its still trying to connect, 1 if it connected, 2 if it failed +**/ +AREXPORT int ArLMS2xx::internalConnectHandler(void) +{ + ArLMS2xxPacket *packet; + ArSerialConnection *conn; + int value, autoBaud; + + switch (myState) + { + case STATE_INIT: + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, have no deviceConnection.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + if ((conn = dynamic_cast(myConn)) != NULL) + { + conn->setBaud(atoi(getStartingBaudChoice())); + } + if (!myConn->openSimple()) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not open port.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + } + if (!getPowerControlled()) + { + /* + myPacket.empty(); + myPacket.uByteToBuf(0x20); + myPacket.uByteToBuf(0x25); + myPacket.finalizePacket(); + myConn->write(myPacket.getBuf(), myPacket.getLength()); + */ + switchState(STATE_CHANGE_BAUD); + return internalConnectHandler(); + } + ArLog::log(ArLog::Terse, "%s: waiting for laser to power on.", + getName()); + myPacket.empty(); + myPacket.uByteToBuf(0x10); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_WAIT_FOR_POWER_ON); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not send init.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_WAIT_FOR_POWER_ON: + while ((packet = myLMS2xxPacketReceiver.receivePacket()) != NULL) + { + if (packet->getID() == 0x90) + { + switchState(STATE_CHANGE_BAUD); + return 0; + } + } + if (myStateStart.secSince() > 65) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, no poweron received.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_CHANGE_BAUD: + // don't autobaud if this isn't a serial device, just move on to the next stage + if ((conn = dynamic_cast(myConn)) == NULL) + { + switchState(STATE_CONFIGURE); + return 0; + } + + myPacket.empty(); + myPacket.byteToBuf(0x20); + autoBaud = atoi(getAutoBaudChoice()); + if (autoBaud == 9600) + myPacket.byteToBuf(0x42); + else if (autoBaud == 19200) + myPacket.byteToBuf(0x41); + else if (autoBaud == 38400) + myPacket.byteToBuf(0x40); + else + { + ArLog::log(ArLog::Terse, "%s: Do not know how to autobaud to %d", + getName(), autoBaud); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + ArUtil::sleep(20); + conn->setBaud(autoBaud); + switchState(STATE_CONFIGURE); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not send baud command.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_CONFIGURE: + // wait a while for the baud to change + if (myStateStart.mSecSince() < 300) + return 0; + myPacket.empty(); + myPacket.byteToBuf(0x3b); + myPacket.uByte2ToBuf(abs(ArMath::roundInt(myOffsetAmount * 2))); + myPacket.uByte2ToBuf(abs(ArMath::roundInt(myIncrementAmount * 100))); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_WAIT_FOR_CONFIGURE_ACK); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not send configure command.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_WAIT_FOR_CONFIGURE_ACK: + while ((packet = myLMS2xxPacketReceiver.receivePacket()) != NULL) + { + if (packet->getID() == 0xbb) + { + value = packet->bufToByte(); + if (value == 0) + { + ArLog::log(ArLog::Terse, + "%s: Could not configure laser, failed connect.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + else if (value == 1) + { + // here + //switchState(STATE_START_READINGS); + switchState(STATE_INSTALL_MODE); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Could not configure laser, failed connect.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + } + else if (packet->getID() == 0xb0) + { + ArLog::log(ArLog::Terse, + "%s: extra data packet while waiting for configure ack", + getName()); + myPacket.empty(); + myPacket.uByteToBuf(0x20); + myPacket.uByteToBuf(0x25); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_CONFIGURE); + return 0; + } + } + else + ArLog::log(ArLog::Terse, "%s: Got a 0x%x", getName(), packet->getID(), + getName()); + } + if (myStateStart.mSecSince() > 10000) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, no configure acknowledgement received.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_INSTALL_MODE: + if (myStateStart.mSecSince() < 200) + return 0; + myPacket.empty(); + myPacket.byteToBuf(0x20); + myPacket.byteToBuf(0x00); + myPacket.strNToBuf("SICK_LMS", strlen("SICK_LMS")); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_WAIT_FOR_INSTALL_MODE_ACK); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not send start command.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_WAIT_FOR_INSTALL_MODE_ACK: + while ((packet = myLMS2xxPacketReceiver.receivePacket()) != NULL) + { + if (packet->getID() == 0xa0) + { + value = packet->bufToByte(); + if (value == 0) + { + //printf("Um, should set mode?\n"); + switchState(STATE_SET_MODE); + return 0; + } + else if (value == 1) + { + ArLog::log(ArLog::Terse, + "%s: Could not start laser, incorrect password.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + else if (value == 2) + { + ArLog::log(ArLog::Terse, + "%s: Could not start laser, LMI fault.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Could not start laser, unknown problem.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + } + else if (packet->getID() == 0xb0) + { + + ArLog::log(ArLog::Terse, "%s: extra data packet", + getName()); + myPacket.empty(); + myPacket.uByteToBuf(0x20); + myPacket.uByteToBuf(0x25); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_INSTALL_MODE); + return 0; + } + } + else + ArLog::log(ArLog::Terse, "%s: bad packet 0x%x", packet->getID(), + getName()); + } + if (myStateStart.mSecSince() > 10000) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, no install mode ack received.", getName()); + switchState(STATE_NONE); + return 2; + } + break; + case STATE_SET_MODE: + if (myStateStart.mSecSince() < 200) + return 0; + myPacket.empty(); + // type of packet + myPacket.byteToBuf(0x77); + // blanking + myPacket.uByte2ToBuf(0); + // peak threshhold, stop threshold + myPacket.uByte2ToBuf(70); + // the old peak threshhold thats probably broken + // myPacket.uByte2ToBuf(0); + // fog correction + myPacket.uByteToBuf(0); + // measurement Mode (fun one) (we can switch this now) + // next line was the previous permanent one + // myPacket.uByteToBuf(6); + // max range stuff was pulled cause its in checkParams now + //int maxRange; + //maxRange = 8; + if (myNumReflectorBits == 1) + { + myPacket.uByteToBuf(5); + //maxRange *= 4; + } + else if (myNumReflectorBits == 2) + { + myPacket.uByteToBuf(3); + //maxRange *= 2; + } + else if (myNumReflectorBits == 3) + { + myPacket.uByteToBuf(1); + //maxRange *= 1; + } + else + { + ArLog::log(ArLog::Terse, "%s: Bits set to unknown value", + getName()); + myPacket.uByteToBuf(5); + //maxRange *= 4; + } + // unit value (fun one), we can swithc this now + // next line was the previous permanent one + //myPacket.uByteToBuf(1); + if (strcmp(getUnitsChoice(), "1mm") == 0) + { + //maxRange *= 1000; + myPacket.uByteToBuf(1); + } + else if (strcmp(getUnitsChoice(), "10cm") == 0) + { + //maxRange = 150000; + myPacket.uByteToBuf(2); + } + else if (strcmp(getUnitsChoice(), "1cm") == 0) + { + //maxRange *= 10000; + myPacket.uByteToBuf(0); + } + else + { + ArLog::log(ArLog::Terse, "%s: Units set to unknown value", getName()); + //maxRange *= 1000; + myPacket.uByteToBuf(1); + } + //setMaxRange(maxRange); + // temporary field set + myPacket.uByteToBuf(0); + // fields A & B as subtractive + myPacket.uByteToBuf(0); + // multiple evaluation + myPacket.uByteToBuf(2); + // restart + myPacket.uByteToBuf(2); + // restart time + myPacket.uByteToBuf(0); + // contour A as reference object size + myPacket.uByteToBuf(0); + // contour A positive range of tolerance + myPacket.uByteToBuf(0); + // contour A negative range of tolerance + myPacket.uByteToBuf(0); + // contour A starting angle + myPacket.uByteToBuf(0); + // contour A stopping angle + myPacket.uByteToBuf(0); + // contour B as reference object size + myPacket.uByteToBuf(0); + // contour B positive range of tolerance + myPacket.uByteToBuf(0); + // contour B negative range of tolerance + myPacket.uByteToBuf(0); + // contour B starting angle + myPacket.uByteToBuf(0); + // contour B stopping angle + myPacket.uByteToBuf(0); + // contour C as reference object size + myPacket.uByteToBuf(0); + // contour C positive range of tolerance + myPacket.uByteToBuf(0); + // contour C negative range of tolerance + myPacket.uByteToBuf(0); + // contour C starting angle + myPacket.uByteToBuf(0); + // contour C stopping angle + myPacket.uByteToBuf(0); + // pixel oriented evaluation + myPacket.uByteToBuf(0); + // mode for single meas value eval + myPacket.uByteToBuf(0); + // restart times for field b and field c + myPacket.byte2ToBuf(0); + // um, an extra one (sick quickstart manual says its 21 not 20 long) + myPacket.uByteToBuf(0); + + myPacket.finalizePacket(); + //myPacket.log(); + //printf("Sending mode!\n"); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + //printf("Set mode!\n"); + switchState(STATE_WAIT_FOR_SET_MODE_ACK); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not send set mode command.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_WAIT_FOR_SET_MODE_ACK: + while ((packet = myLMS2xxPacketReceiver.receivePacket()) != NULL) + { + if (packet->getID() == 0xF7) + { + //value = packet->bufToByte(); + //printf("YAY %d\n", value); + //packet->log(); + switchState(STATE_START_READINGS); + return 0; + } + else if (packet->getID() == 0xb0) + { + + ArLog::log(ArLog::Terse, "%s: extra data packet", + getName()); + myPacket.empty(); + myPacket.uByteToBuf(0x20); + myPacket.uByteToBuf(0x25); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_INSTALL_MODE); + return 0; + } + } + else if (packet->getID() == 0x92) + { + switchState(STATE_INSTALL_MODE); + return 0; + } + else + ArLog::log(ArLog::Terse, "%s: Got a 0x%x", getName(), packet->getID()); + } + if (myStateStart.mSecSince() > 14000) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, no set mode acknowledgement received.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_START_READINGS: + if (myStateStart.mSecSince() < 200) + return 0; + myPacket.empty(); + myPacket.byteToBuf(0x20); + myPacket.byteToBuf(0x24); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + switchState(STATE_WAIT_FOR_START_ACK); + return 0; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, could not send start command.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + case STATE_WAIT_FOR_START_ACK: + while ((packet = myLMS2xxPacketReceiver.receivePacket()) != NULL) + { + if (packet->getID() == 0xa0) + { + value = packet->bufToByte(); + if (value == 0) + { + ArLog::log(ArLog::Terse, "%s: Connected to the laser.", + getName()); + switchState(STATE_CONNECTED); + madeConnection(); + return 1; + } + else if (value == 1) + { + ArLog::log(ArLog::Terse, + "%s: Could not start laser laser, incorrect password.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + else if (value == 2) + { + ArLog::log(ArLog::Terse, + "%s: Could not start laser laser, LMI fault.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + else + { + ArLog::log(ArLog::Terse, + "%s: Could not start laser laser, unknown problem.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + } + } + if (myStateStart.mSecSince() > 1000) + { + ArLog::log(ArLog::Terse, + "%s: Failed to connect to laser, no start acknowledgement received.", + getName()); + switchState(STATE_NONE); + failedConnect(); + return 2; + } + break; + default: + ArLog::log(ArLog::Verbose, "%s: In bad connection state", + getName()); + break; + } + return 0; +} + +/** + Sends the commands to the sim to start up the connection + + @return true if the commands were sent, false otherwise +**/ +AREXPORT bool ArLMS2xx::internalConnectSim(void) +{ + lockDevice(); + double offset = myOffsetAmount; + double increment = myIncrementAmount; + unlockDevice(); + + myRobot->lock(); + // return true if we could send all the commands + if (myRobot->comInt(36, -ArMath::roundInt(offset)) && // Start angle + myRobot->comInt(37, ArMath::roundInt(offset)) && // End angle + myRobot->comInt(38, ArMath::roundInt(increment * 100.0)) && // increment + myRobot->comInt(35, 2)) // Enable sending data, with extended info + ///@todo only choose extended info if reflector bits desired, also shorten range. + { + myRobot->unlock(); + switchState(STATE_CONNECTED); + madeConnection(); + ArLog::log(ArLog::Terse, "%s: Connected to simulated laser.", + getName()); + return true; + } + else + { + switchState(STATE_NONE); + failedConnect(); + ArLog::log(ArLog::Terse, + "%s: Failed to connect to simulated laser.", + getName()); + return false; + } +} + +/** @internal */ +AREXPORT void ArLMS2xx::dropConnection(void) +{ + std::list::iterator it; + + if (myState != STATE_CONNECTED) + return; + + myCurrentBuffer.reset(); + myCumulativeBuffer.reset(); + ArLog::log(ArLog::Terse, + "%s: Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince()/1000.0, + getConnectionTimeoutSeconds()); + switchState(STATE_NONE); + + if (myConn != NULL) + myConn->close(); + + laserDisconnectOnError(); +} + +/** @internal */ +AREXPORT void ArLMS2xx::failedConnect(void) +{ + std::list::iterator it; + + switchState(STATE_NONE); + + if (myConn != NULL) + myConn->close(); + + laserFailedConnect(); +} + +/** @internal */ +AREXPORT void ArLMS2xx::madeConnection(void) +{ + myLastReading.setToNow(); + + laserConnect(); +} + +/** + Disconnects from the laser. You should lockDevice the laser before + calling this function. Also if you are using the simulator it will + lock the robot so it can send the command to the simulator, so you + should make sure the robot is unlocked. + + @return true if it could disconnect from the laser cleanly +**/ +AREXPORT bool ArLMS2xx::disconnect(void) +{ + std::list::iterator it; + bool ret; + ArSerialConnection *conn; + + myStateMutex.lock(); + if (myState == STATE_NONE) + { + myStateMutex.unlock(); + return true; + } + + if (myState != STATE_CONNECTED) + { + lockDevice(); + myConnMutex.lock(); + myState = STATE_NONE; + ret = myConn->close(); + myConnMutex.unlock(); + unlockDevice(); + ArLog::log(ArLog::Terse, "%s: Disconnecting from laser that was not fully connected to... this may cause problems later.", getName()); + myStateMutex.unlock(); + return ret; + } + + myCurrentBuffer.reset(); + myCumulativeBuffer.reset(); + ArLog::log(ArLog::Terse, "%s: Disconnecting from laser.", getName()); + myState = STATE_NONE; + myStateMutex.unlock(); + + + if (myUseSim) + { + if (myRobot == NULL) + { + laserDisconnectNormally(); + return false; + } + // locks are recursive now, so don't have to worry about this + //if (!doNotLockRobotForSim) + myRobot->lock(); + ret = myRobot->comInt(35, 2); // 2=extendend info request + ///@todo only choose extended info if reflector bits desired, also shorten range. + //if (!doNotLockRobotForSim) + myRobot->unlock(); + laserDisconnectNormally(); + return ret; + } + else + { + myConnMutex.lock(); + while (myLMS2xxPacketReceiver.receivePacket() != NULL); + myPacket.empty(); + myPacket.uByteToBuf(0x20); + myPacket.uByteToBuf(0x25); + myPacket.finalizePacket(); + ret = myConn->write(myPacket.getBuf(), myPacket.getLength()); + // put the thing back to 9600 baud + ArUtil::sleep(1000); + myPacket.empty(); + myPacket.byteToBuf(0x20); + myPacket.byteToBuf(0x42); + myPacket.finalizePacket(); + if (myConn->write(myPacket.getBuf(), myPacket.getLength())) + { + ArUtil::sleep(20); + if ((conn = dynamic_cast(myConn))) + conn->setBaud(9600); + } else + ret = false; + ret = ret && myConn->close(); + myConnMutex.unlock(); + ArUtil::sleep(300); + laserDisconnectNormally(); + return ret; + } +} + +bool ArLMS2xx::finishParams(void) +{ + if (!getRunning()) + runAsync(); + + if (!laserPullUnsetParamsFromRobot()) + { + ArLog::log(ArLog::Normal, "%s: Couldn't pull params from robot", + getName()); + return false; + } + + return laserCheckParams(); +} + +AREXPORT bool ArLMS2xx::laserCheckParams(void) +{ + myOffsetAmount = getDegreesChoiceDouble() / 2.0; + if (getFlipped()) + myOffsetAmount *= -1; + + myIncrementAmount = getIncrementChoiceDouble(); + if (getFlipped()) + myIncrementAmount *= -1; + + if (strcasecmp(getReflectorBitsChoice(), "1ref") == 0) + myNumReflectorBits = 1; + else if (strcasecmp(getReflectorBitsChoice(), "2ref") == 0) + myNumReflectorBits = 2; + else if (strcasecmp(getReflectorBitsChoice(), "3ref") == 0) + myNumReflectorBits = 3; + else + { + ArLog::log(ArLog::Normal, + "%s: Bad reflectorBits choice %s, choices are %s", + getName(), getReflectorBitsChoice(), + getReflectorBitsChoicesString()); + return false; + } + + if (strcmp(getIncrementChoice(), "half") == 0) + myInterlaced = true; + else if (strcmp(getIncrementChoice(), "one") == 0) + myInterlaced = false; + else + { + ArLog::log(ArLog::Normal, "%s: Bad increment choice %s, choices are %s", + getName(), getIncrementChoice(), getIncrementChoicesString()); + return false; + } + + + int maxRange; + maxRange = 8; + if (myNumReflectorBits == 1) + maxRange *= 4; + else if (myNumReflectorBits == 2) + maxRange *= 2; + else if (myNumReflectorBits == 3) + myPacket.uByteToBuf(1); + else + { + ArLog::log(ArLog::Terse, "%s: Bits set to unknown value", getName()); + maxRange *= 4; + } + + if (strcmp(getUnitsChoice(), "1mm") == 0) + maxRange *= 1000; + else if (strcmp(getUnitsChoice(), "10cm") == 0) + maxRange = 150000; + else if (strcmp(getUnitsChoice(), "1cm") == 0) + maxRange *= 10000; + else + { + ArLog::log(ArLog::Terse, "%s: Units set to unknown value", getName()); + maxRange *= 1000; + } + + laserSetAbsoluteMaxRange(maxRange); + return true; +} + +/** + Locks this class (using lockDevice()), tries to make a connection, then + unlocks. If connecting to the simulator, + then it will commands to the simulator instead of connecting + over the configured serial port. + + @note If you have previously locked + the laser with lockDevice(), then you must unlock with unlockDevice() + before calling this function. + + @note Since the simulated laser uses the robot connection instead + of a separate, new connection, this ArLMS2xx object @b must have been + added to the robot using ArRobot::addRangeDevice(), and the robot + connection @b must be connected and running (e.g. in a background thread + via ArRobot::runAsync()) for blockingConnect() to be able to successfully + connect to the simulator. + + @return true if a connection was successfully made, false otherwise +**/ + +AREXPORT bool ArLMS2xx::blockingConnect(void) +{ + int ret; + + if (!finishParams()) + return false; + + // if we're using the sim + if (myUseSim) + { + return internalConnectSim(); + } + // if we're talking to a real laser + else + { + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Invalid device connection, cannot connect.", + getName()); + return false; // Nobody ever set the device connection. + } + lockDevice(); + myConnMutex.lock(); + switchState(STATE_INIT); + unlockDevice(); + while (getRunningWithLock() && (ret = internalConnectHandler()) == 0) + ArUtil::sleep(100); + myConnMutex.unlock(); + if (ret == 1) + return true; + else + return false; + } + return false; +} + +/** + This does not lock the laser, but you should lock the + laser before you try to connect. Also note that if you are + connecting to the simulator the laser MUST be unlocked so that this can + lock the laser and send the commands to the sim. To be connected + successfully, either the useSim must be set from configure (and the + laser must be connected to a simulator, or this will return true but + connection will fail), the device must have been run() or runAsync(), or + runOnRobot() used. + + @return true if a connection will be able to be tried, false + otherwise + + @see configure(), ArRangeDeviceThreaded::run(), + ArRangeDeviceThreaded::runAsync(), runOnRobot() +**/ +AREXPORT bool ArLMS2xx::asyncConnect(void) +{ + if (myState == STATE_CONNECTED) + { + ArLog::log(ArLog::Terse, "%s: already connected to laser.", + getName()); + return false; + } + + if (!finishParams()) + return false; + + if (!myUseSim && myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Invalid device connection, cannot connect.", + getName()); + return false; // Nobody ever set the device connection. + } + + myStartConnect = true; + return true; +} + +/** + This alternate method of operation sets up a sensor interpretation task + on the robot object, instead of in a background thread. + Note that the device must have been added to + the robot already so that the device has a pointer to the robot. + You should lock the robot and lockDevice() this laser before calling this if + other things are running already. +**/ +AREXPORT bool ArLMS2xx::internalRunOnRobot(void) +{ + if (myRobot == NULL) + return false; + else + { + myRunningOnRobot = true; + if (getRunning()) + stopRunning(); + return true; + } +} + +/** @internal */ +AREXPORT void ArLMS2xx::processPacket(ArLMS2xxPacket *packet, ArPose pose, + ArPose encoderPose, + unsigned int counter, + bool deinterlace, + ArPose deinterlaceDelta) +{ + std::list::iterator it; + unsigned int rawValue; + unsigned int value; + unsigned int reflector = 0; + unsigned int numReadings; + unsigned int i; + double atDeg; + unsigned int onReading; + ArSensorReading *reading; + int dist; + std::list::iterator tempIt; + int multiplier; + ArTransform transform; + //std::list::iterator ignoreIt; + bool ignore; + + ArTime arTime; + arTime = packet->getTimeReceived(); + if (!arTime.addMSec(-13)) { + ArLog::log(ArLog::Normal, + "ArLMS2xx::processPacket() error adding msecs (-13)"); + } + + ArTime deinterlaceTime; + deinterlaceTime = packet->getTimeReceived(); + if (!deinterlaceTime.addMSec(-27)) { + ArLog::log(ArLog::Normal, + "ArLMS2xx::processPacket() error adding msecs (-27)"); + } + //if (packet->getID() != 0xb0) + //printf("Got in packet of type 0x%x\n", packet->getID()); + if (packet->getID() == 0xb0) + { + value = packet->bufToUByte2(); + numReadings = value & 0x3ff; + //printf("numreadings %d\n", numReadings); + if (!(value & ArUtil::BIT14) && !(value & ArUtil::BIT15)) + multiplier = 10; + else if ((value & ArUtil::BIT14) && !(value & ArUtil::BIT15)) + multiplier = 1; + else if (!(value & ArUtil::BIT14) && (value & ArUtil::BIT15)) + multiplier = 100; + else + { + ArLog::log(ArLog::Terse, + "%s::processPacket: bad distance configuration in packet", + getName()); + multiplier = 0; + } + //printf("%ld ms after last reading.\n", myLastReading.mSecSince()); + /*printf("Reading number %d, complete %d, unit: %d %d:\n", numReadings, + !(bool)(value & ArUtil::BIT13), (bool)(value & ArUtil::BIT14), + (bool)(value & ArUtil::BIT15));*/ + while (myAssembleReadings->size() > numReadings) + { + ArLog::log(ArLog::Verbose, "%s::processPacket, too many readings, popping one.", + getName()); + tempIt = myAssembleReadings->begin(); + if (tempIt != myAssembleReadings->end()) + delete (*tempIt); + myAssembleReadings->pop_front(); + } + + // If we don't have any sensor readings created at all, make 'em all + if (myAssembleReadings->size() == 0) + for (i = 0; i < numReadings; i++) + myAssembleReadings->push_back(new ArSensorReading); + + transform.setTransform(pose); + //deinterlaceDelta = transform.doInvTransform(deinterlacePose); + // printf("usePose2 %d, th1 %.0f th2 %.0f\n", usePose2, pose.getTh(), pose2.getTh()); + for (atDeg = mySensorPose.getTh() - myOffsetAmount, onReading = 0, + myIter = myAssembleReadings->begin(); + (onReading < numReadings && + packet->getReadLength() < packet->getLength() - 4); + myWhichReading++, atDeg += myIncrementAmount, myIter++, onReading++) + { + reading = (*myIter); + //reading->resetSensorPosition(0, 0, 0); + + //value = packet->bufToUByte2() & 0x1fff; + //dist = (value & 0x1fff) * multiplier ; + + rawValue = packet->bufToUByte2(); + if (myNumReflectorBits == 1) + { + dist = (rawValue & 0x7fff) * multiplier; + reflector = ((rawValue & 0x8000) >> 15) << 2; + } + else if (myNumReflectorBits == 2) + { + dist = (rawValue & 0x3fff) * multiplier; + reflector = ((rawValue & 0xc000) >> 14) << 1 ; + } + else if (myNumReflectorBits == 3) + { + dist = (rawValue & 0x1fff) * multiplier; + reflector = ((rawValue & 0xe000) >> 13); + } + // just trap for if we don't know what it is, this shouldn't + // happen though + else + { + dist = (rawValue & 0x7fff) * multiplier; + reflector = 0; + } + // there are 3 reflector bits (its already been normalized above + // to that range) so now we need to shift it another 5 so we get + // 0-255. + reflector = reflector << 5; + + ignore = false; + /* + for (ignoreIt = myIgnoreReadings.begin(); + ignoreIt != myIgnoreReadings.end(); + ignoreIt++) + { + if (ArMath::fabs(ArMath::subAngle(atDeg, *(ignoreIt))) < 1.0) + { + ignore = true; + break; + } + } + //if (myMinRange != 0 && dist < (int)myMinRange) + //ignore = true; + if (myMaxRange != 0 && dist > (int)myMaxRange) + ignore = true; + */ + if (deinterlace && (onReading % 2) == 0) + { + reading->resetSensorPosition( + ArMath::roundInt(mySensorPose.getX() + deinterlaceDelta.getX()), + ArMath::roundInt(mySensorPose.getY() + deinterlaceDelta.getY()), + ArMath::addAngle(atDeg, deinterlaceDelta.getTh())); + reading->newData(dist, pose, encoderPose, transform, counter, + deinterlaceTime, ignore, reflector); + } + else + { + reading->resetSensorPosition(ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), + atDeg); + reading->newData(dist, pose, encoderPose, transform, counter, + arTime, ignore, reflector); + } + /* + reading->newData(onReading, 0, 0, 0, + ArTransform(), counter, + packet->getTimeReceived()); + */ + tempIt = myIter; + tempIt++; + if (tempIt == myAssembleReadings->end() && + onReading + 1 != numReadings) + { + myAssembleReadings->push_back(new ArSensorReading); + } + } + // set ArRangeDevice buffer, switch internal buffers + myRawReadings = myAssembleReadings; + //printf("Readings? 0x%x\n", myRawReadings); + myAssembleReadings = myCurrentReadings; + myCurrentReadings = myRawReadings; + //printf("\n"); + myLastReading.setToNow(); + //filterReadings(); + laserProcessReadings(); + } +} + +/** @internal */ +AREXPORT void ArLMS2xx::runOnce(bool lockRobot) +{ + ArLMS2xxPacket *packet; + unsigned int counter; + int ret; + ArTime time; + ArTime time2; + ArPose pose; + ArPose pose2; + ArPose encoderPose; + + if (myProcessImmediately && myRobot != NULL) + { + if (lockRobot) + myRobot->lock(); + pose = myRobot->getPose(); + counter = myRobot->getCounter(); + if (lockRobot) + myRobot->unlock(); + } + + lockDevice(); + if (myState == STATE_CONNECTED && laserCheckLostConnection()) + { + dropConnection(); + unlockDevice(); + return; + } + if (myUseSim) + { + unlockDevice(); + return; + } + if (myState == STATE_CONNECTED) + { + unlockDevice(); + myConnMutex.lock(); + packet = myLMS2xxPacketReceiver.receivePacket(); + myConnMutex.unlock(); + lockDevice(); + // if we're attached to a robot and have a packet + if (myRobot != NULL && packet != NULL && !myProcessImmediately) + { + myPackets.push_back(packet); + } + else if (myRobot != NULL && packet != NULL && myProcessImmediately) + { + unlockDevice(); + if (lockRobot && myInterpolation) + myRobot->lock(); + // try to get the interpolated position, if we can't, just use + // the robot's pose + if (myInterpolation && (ret = myRobot->getPoseInterpPosition( + packet->getTimeReceived(), &pose)) < 0) + pose = myRobot->getPose(); + // try to get the interpolated encoder position, if we can't, + // just fake it from the robot's pose and the encoder transform + if (myInterpolation && (ret = myRobot->getEncoderPoseInterpPosition( + packet->getTimeReceived(), &encoderPose)) < 0) + encoderPose = myRobot->getEncoderTransform().doInvTransform(pose); + if (lockRobot && myInterpolation) + myRobot->unlock(); + lockDevice(); + processPacket(packet, pose, encoderPose, counter, false, ArPose()); + } + else if (packet != NULL) // if there's no robot + { + processPacket(packet, pose, encoderPose, 0, false, ArPose()); + delete packet; + } + } + unlockDevice(); + return; +} + +/** @internal */ +AREXPORT void ArLMS2xx::sensorInterpCallback(void) +{ + std::list::iterator it; + std::list processed; + ArLMS2xxPacket *packet; + ArTime time; + ArPose pose; + int ret = -999; + int retEncoder = -999; + ArPose encoderPose; + ArPose deinterlaceEncoderPose; + bool deinterlace; + ArTime deinterlaceTime; + ArPose deinterlaceDelta; + + if (myRunningOnRobot) + runOnce(false); + + lockDevice(); + + if (myInterlaced) + adjustRawReadings(true); + else + adjustRawReadings(false); + + for (it = myPackets.begin(); it != myPackets.end(); it++) + { + packet = (*it); + time = packet->getTimeReceived(); + if (!time.addMSec(-13)) { + ArLog::log(ArLog::Normal, + "ArLMS2xx::sensorInterpCallback() error adding msecs (-13)"); + } + if ((ret = myRobot->getPoseInterpPosition(time, &pose)) >= 0 && + (retEncoder = + myRobot->getEncoderPoseInterpPosition(time, &encoderPose)) >= 0) + { + deinterlaceTime = packet->getTimeReceived(); + if (!deinterlaceTime.addMSec(-27)) { + ArLog::log(ArLog::Normal, + "ArLMS2xx::sensorInterpCallback() error adding msecs (-27)"); + } + if (myInterlaced && + (myRobot->getEncoderPoseInterpPosition( + deinterlaceTime, &deinterlaceEncoderPose)) >= 0) + deinterlace = true; + else + deinterlace = false; + + ArTransform deltaTransform; + deltaTransform.setTransform(encoderPose); + deinterlaceDelta = deltaTransform.doInvTransform(deinterlaceEncoderPose); + + processPacket(packet, pose, encoderPose, myRobot->getCounter(), + deinterlace, deinterlaceDelta); + processed.push_back(packet); + } + /// MPL changing this since it seems -1 is left out of everything + //else if (ret < -1 || retEncoder < -1) + else if (ret < 0 || retEncoder < 0) + { + if (myRobot->isConnected()) + { + ArLog::log(ArLog::Normal, + "%s::processPacket: too old to process", + getName()); + } + else + { + processPacket(packet, pose, encoderPose, myRobot->getCounter(), false, + ArPose()); + } + processed.push_back(packet); + } + else + { + //ArLog::log(ArLog::Terse, "%s::processPacket: error %d from interpolation\n", getName(), ret); + //printf("$$$ ret = %d\n", ret); + } + } + while ((it = processed.begin()) != processed.end()) + { + packet = (*it); + myPackets.remove(packet); + processed.pop_front(); + delete packet; + } + unlockDevice(); +} + +/** @internal */ +AREXPORT void *ArLMS2xx::runThread(void *arg) +{ + while (getRunningWithLock()) + { + lockDevice(); + if (myStartConnect) + { + myStartConnect = false; + switchState(STATE_INIT); + if (myUseSim) + { + unlockDevice(); + internalConnectSim(); + } + else + { + unlockDevice(); + while (getRunningWithLock()) + { + lockDevice(); + myConnMutex.lock(); + if (internalConnectHandler() != 0) + { + myConnMutex.unlock(); + unlockDevice(); + break; + } + myConnMutex.unlock(); + unlockDevice(); + ArUtil::sleep(1); + } + } + } else + unlockDevice(); + runOnce(true); + ArUtil::sleep(1); + } + lockDevice(); + if (isConnected()) + { + disconnect(); + } + unlockDevice(); + + return NULL; +} + diff --git a/Legacy/Aria/src/ArLMS2xxPacket.cpp b/Legacy/Aria/src/ArLMS2xxPacket.cpp new file mode 100644 index 0000000..6dfa5a2 --- /dev/null +++ b/Legacy/Aria/src/ArLMS2xxPacket.cpp @@ -0,0 +1,197 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLMS2xxPacket.h" +#include "stdio.h" + +AREXPORT ArLMS2xxPacket::ArLMS2xxPacket(unsigned char sendingAddress) : + ArBasePacket(2048, 4) +{ + mySendingAddress = sendingAddress; +} + +AREXPORT ArLMS2xxPacket::~ArLMS2xxPacket() +{ +} + +/** + This sets the address for use in sending packets, the address + is saved, then when a packet is finalizePacketd for sending, the address + is put into the appropriate spot in the packet. + @param address the address of the laser to be addressed +*/ +AREXPORT void ArLMS2xxPacket::setSendingAddress(unsigned char address) +{ + mySendingAddress = address; +} + +/** + This gets the address for use in sending packets, the address is + what has been saved, then when a packet is finalizePacketd for sending, + the address is put into the appropriate spot in the packet. + @return the address of the laser to be addressed +*/ +AREXPORT unsigned char ArLMS2xxPacket::getSendingAddress(void) +{ + return mySendingAddress; +} + +/** + This gets the address that this packet was received from. Note that + this is only valid if this packet was received from a laser, if you want + to know where a packet was addressed to use getSendingAdress instead. + @return the address a packet was received from +*/ +AREXPORT unsigned char ArLMS2xxPacket::getReceivedAddress(void) +{ + int len = myReadLength; + unsigned char address; + + // toss it into the second byte of the packet + myReadLength = 1; + address = bufToUByte(); + myLength = len; + return address; +} + +AREXPORT ArTypes::UByte ArLMS2xxPacket::getID(void) +{ + if (myLength >= 5) + return myBuf[4]; + else + return 0; +} + +AREXPORT void ArLMS2xxPacket::resetRead(void) +{ + myReadLength = myHeaderLength + 1; +} + +AREXPORT void ArLMS2xxPacket::finalizePacket(void) +{ + int len = myLength; + int chkSum; + + // put in the start of the packet + myLength = 0; + // toss in the header + uByteToBuf(0x02); + // now the laser we want to talk to + uByteToBuf(mySendingAddress); + // dump in the length + uByte2ToBuf(len - myHeaderLength); + myLength = len; + + // that lovely CRC + chkSum = calcCRC(); + byteToBuf(chkSum & 0xff ); + byteToBuf((chkSum >> 8) & 0xff ); + + //printf("Sending "); + //log(); +} + +/** + Copies the given packets buffer into the buffer of this packet, also + sets this length and readlength to what the given packet has + @param packet the packet to duplicate +*/ +AREXPORT void ArLMS2xxPacket::duplicatePacket(ArLMS2xxPacket *packet) +{ + myLength = packet->getLength(); + myReadLength = packet->getReadLength(); + myTimeReceived = packet->getTimeReceived(); + mySendingAddress = packet->getSendingAddress(); + memcpy(myBuf, packet->getBuf(), myLength); + +} + +AREXPORT ArTypes::Byte2 ArLMS2xxPacket::calcCRC(void) +{ + unsigned short uCrc16; + unsigned char abData[2]; + unsigned int uLen = myLength; + unsigned char * commData = (unsigned char *)myBuf; + + uCrc16 = 0; + abData[0] = 0; + while (uLen--) + { + abData[1] = abData[0]; + abData[0] = *commData++; + if (uCrc16 & 0x8000) + { + uCrc16 = (uCrc16 & 0x7fff) << 1; + uCrc16 ^= 0x8005; + } + else + { + uCrc16 <<= 1; + } + uCrc16 ^= ((unsigned short) abData[0] | + ((unsigned short)(abData[1]) << 8)); + } + return uCrc16; +} + +AREXPORT bool ArLMS2xxPacket::verifyCRC(void) +{ + int readLen = myReadLength; + int len = myLength; + ArTypes::Byte2 chksum; + unsigned char c1, c2; + + myReadLength = myLength - 2; + + if (myReadLength < myHeaderLength) + return false; + + c1 = bufToByte(); + c2 = bufToByte(); + myReadLength = readLen; + chksum = (c1 & 0xff) | (c2 << 8); + + myLength = myLength - 2; + if (chksum == calcCRC()) { + myLength = len; + return true; + } else { + myLength = len; + return false; + } + +} + +AREXPORT ArTime ArLMS2xxPacket::getTimeReceived(void) +{ + return myTimeReceived; +} + +AREXPORT void ArLMS2xxPacket::setTimeReceived(ArTime timeReceived) +{ + myTimeReceived = timeReceived; +} diff --git a/Legacy/Aria/src/ArLMS2xxPacketReceiver.cpp b/Legacy/Aria/src/ArLMS2xxPacketReceiver.cpp new file mode 100644 index 0000000..e7220b1 --- /dev/null +++ b/Legacy/Aria/src/ArLMS2xxPacketReceiver.cpp @@ -0,0 +1,273 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLMS2xxPacketReceiver.h" +#include "ArLog.h" +#include "ariaUtil.h" + + +/* + allocatePackets: whether to allocate memory for the packets before + returning them (true) or to just return a pointer to an internal + packet (false)... most everything should use false as this will help prevent + many memory leaks or corruptions +*/ +AREXPORT ArLMS2xxPacketReceiver::ArLMS2xxPacketReceiver( + unsigned char receivingAddress, bool allocatePackets, + bool useBase0Address) +{ + myAllocatePackets = allocatePackets; + myReceivingAddress = receivingAddress; + myDeviceConn = NULL; + myUseBase0Address = useBase0Address; +} + +/* + allocatePackets: whether to allocate memory for the packets before + returning them (true) or to just return a pointer to an internal + packet (false)... most everything should use false as this will help prevent + many memory leaks or corruptions +*/ +AREXPORT ArLMS2xxPacketReceiver::ArLMS2xxPacketReceiver( + ArDeviceConnection *deviceConnection, + unsigned char receivingAddress, bool allocatePackets, + bool useBase0Address) +{ + myDeviceConn = deviceConnection; + myAllocatePackets = allocatePackets; + myReceivingAddress = receivingAddress; + myUseBase0Address = useBase0Address; +} + +AREXPORT ArLMS2xxPacketReceiver::~ArLMS2xxPacketReceiver() +{ + +} + +AREXPORT void ArLMS2xxPacketReceiver::setDeviceConnection( + ArDeviceConnection *deviceConnection) +{ + myDeviceConn = deviceConnection; +} + +AREXPORT ArDeviceConnection *ArLMS2xxPacketReceiver::getDeviceConnection(void) +{ + return myDeviceConn; +} + +/** + @param msWait how long to block for the start of a packet, nonblocking if 0 + @return NULL if there are no packets in alloted time, otherwise a pointer + to the packet received, if allocatePackets is true than the place that + called this function owns the packet and should delete the packet when + done... if allocatePackets is false then nothing must store a pointer to + this packet, the packet must be used and done with by the time this + method is called again +*/ +AREXPORT ArLMS2xxPacket *ArLMS2xxPacketReceiver::receivePacket( + unsigned int msWait) +{ + ArLMS2xxPacket *packet; + unsigned char c; + char buf[2048]; + long count = 0; + // state can be one of the STATE_ enums in the class + int state = STATE_START; + //unsigned int timeDone; + //unsigned int curTime; + long timeToRunFor; + long packetLength; + ArTime timeDone; + ArTime lastDataRead; + ArTime packetReceived; + int numRead; + + + if (myDeviceConn == NULL || + myDeviceConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + myDeviceConn->debugEndPacket(false, -10); + return NULL; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArLMS2xxPacketReceiver::receivePacket() error adding msecs (%i)", + msWait); + } + do + { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + + if (state == STATE_START) + myDeviceConn->debugStartPacket(); + + if (myDeviceConn->read((char *)&c, 1, timeToRunFor) == 0) + { + myDeviceConn->debugBytesRead(0); + if (state == STATE_START) + { + myDeviceConn->debugEndPacket(false, -20); + return NULL; + } + else + { + //ArUtil::sleep(1); + continue; + } + } + + myDeviceConn->debugBytesRead(1); + + //printf("%x\n", c); + switch (state) { + case STATE_START: + if (c == 0x02) // move on, resetting packet + { + //printf("###############\n"); + state = STATE_ADDR; + myPacket.empty(); + myPacket.setLength(0); + myPacket.uByteToBuf(c); + packetReceived = myDeviceConn->getTimeRead(0); + myPacket.setTimeReceived(packetReceived); + } + /*else + { + //printf(" BAD\n"); + }*/ + break; + case STATE_ADDR: + // if this is correct move on, adding this byte... this is taken + // out in favor of a more inclusive approach, if someone ever + // wnats to drive multiple robots off of one serial port just + // put this back in, or I don't know, punt + //if (c == ((unsigned char)0x80 + myReceivingAddress)) + if (!myUseBase0Address && c >= 0x80 && c <= 0x84) + { + state = STATE_START_COUNT; + myPacket.uByteToBuf(c); + } + // c will always be >= 0 since its unsigned + else if (myUseBase0Address && c <= 0x4) + { + state = STATE_START_COUNT; + myPacket.uByteToBuf(c); + } + else // go back to beginning, packet hosed + { + ArLog::log(ArLog::Terse, + "ArLMS2xxPacketReceiver::receivePacket: wrong address (0x%x instead of 0x%x)", c, (unsigned) 0x80 + myReceivingAddress); + state = STATE_START; + } + break; + case STATE_START_COUNT: + packetLength = c; + myPacket.uByteToBuf(c); + state = STATE_ACQUIRE_DATA; + break; + case STATE_ACQUIRE_DATA: + // the character c is high ordre byte of the packet length count + // so we'll just build the length of the packet then get the + //rest of the data + myPacket.uByteToBuf(c); + packetLength = packetLength | (c << 8); + count = 0; + // make sure the length isn't longer than the maximum packet length... + // getting some wierd 25k or 44k long packets (um, no) + if (packetLength > ((long)myPacket.getMaxLength() - + (long)myPacket.getHeaderLength())) + { + ArLog::log(ArLog::Normal, + "ArLMS2xxPacketReceiver::receivePacket: packet too long, it is %d long while the maximum is %d.", packetLength, myPacket.getMaxLength()); + state = STATE_START; + //myPacket.log(); + break; + } + // here we read until we get as much as we want, OR until + // we go 100 ms without data... its arbitrary but it doesn't happen often + // and it'll mean a bad packet anyways + lastDataRead.setToNow(); + while (count < packetLength + 2) + { + numRead = myDeviceConn->read(buf + count, packetLength + 2- count, 1); + if (numRead > 0) + { + myDeviceConn->debugBytesRead(numRead); + lastDataRead.setToNow(); + } + else + { + myDeviceConn->debugBytesRead(0); + } + if (lastDataRead.mSecTo() < -100) + { + myDeviceConn->debugEndPacket(false, -30); + return NULL; + } + count += numRead; + } + myPacket.dataToBuf(buf, packetLength + 2); + if (myPacket.verifyCRC()) + { + myPacket.resetRead(); + myDeviceConn->debugEndPacket(true, myPacket.getID()); + //printf("Received "); + //myPacket.log(); + if (myAllocatePackets) + { + packet = new ArLMS2xxPacket; + packet->duplicatePacket(&myPacket); + return packet; + } + else + return &myPacket; + } + else + { + ArLog::log(ArLog::Normal, + "ArLMS2xxPacketReceiver::receivePacket: bad packet, bad checksum"); + state = STATE_START; + //myPacket.log(); + break; + } + break; + default: + break; + } + } while (timeDone.mSecTo() >= 0 || state != STATE_START); + + myDeviceConn->debugEndPacket(false, -40); + //printf("finished the loop...\n"); + return NULL; + +} + + diff --git a/Legacy/Aria/src/ArLaser.cpp b/Legacy/Aria/src/ArLaser.cpp new file mode 100644 index 0000000..536c6a2 --- /dev/null +++ b/Legacy/Aria/src/ArLaser.cpp @@ -0,0 +1,1401 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLaser.h" +#include "ArRobot.h" +#include "ArDeviceConnection.h" + +bool ArLaser::ourUseSimpleNaming = false; + +AREXPORT ArLaser::ArLaser( + int laserNumber, const char *name, + unsigned int absoluteMaxRange, bool locationDependent, + bool appendLaserNumberToName) : + ArRangeDeviceThreaded( + 361, 200, name, absoluteMaxRange, + 0, 0, 0, locationDependent) +{ + myLaserNumber = laserNumber; + + if (appendLaserNumberToName) + { + char buf[1024]; + snprintf(buf, sizeof(buf) - 20, "%s", name); + sprintf(buf, "%s_%d", buf, myLaserNumber); + myName = buf; + } + else + { + if (laserNumber != 1) + ArLog::log(ArLog::Verbose, "ArLaser::%s: Laser created with number %d, but the number is not appended to the name which may break things (especially since this number is greater than 1_", name, laserNumber); + + myName = name; + } + + + laserSetName(myName.c_str()); + + myAbsoluteMaxRange = absoluteMaxRange; + myMaxRangeSet = false; + + setSensorPosition(0, 0, 0, 0); + myTimeoutSeconds = 8; + + myHaveSensorPose = false; + + myFlipped = false; + myFlippedSet = false; + + myCanSetDegrees = false; + myStartDegreesMin = HUGE_VAL; + myStartDegreesMax = -HUGE_VAL; + myStartDegreesSet = false; + myStartDegrees = 0; + myEndDegreesMin = HUGE_VAL; + myEndDegreesMax = -HUGE_VAL; + myEndDegreesSet = false; + myEndDegrees = 0; + + myCanChooseDegrees = false; + myDegreesChoiceDouble = -HUGE_VAL; + + myCanSetIncrement = 0; + myIncrementMin = HUGE_VAL; + myIncrementMax = -HUGE_VAL; + myIncrementSet = false; + myIncrement = 0; + + myCanChooseIncrement = false; + myIncrementChoiceDouble = -HUGE_VAL; + + myCanChooseUnits = false; + + myCanChooseReflectorBits = false; + + myCanSetPowerControlled = false; + myPowerControlled = true; + myPowerControlledSet = false; + + myCanChooseStartingBaud = false; + + myCanChooseAutoBaud = false; + + myDefaultTcpPort = 8102; + + myInfoLogLevel = ArLog::Verbose; + myRobotRunningAndConnected = false; +} + +AREXPORT ArLaser::~ArLaser() +{ +} + +/** + This can be used to set the name on mutexes and such to match the + laser's new name. +**/ +AREXPORT void ArLaser::laserSetName(const char *name) +{ + if (ourUseSimpleNaming) + { + myName = "Laser_"; + char buf[1024]; + sprintf(buf, "%d", myLaserNumber); + myName += buf; + } + else + { + myName = name; + } + + + myTask.setThreadName(myName.c_str()); + + myConnectCBList.setNameVar("%s::myConnectCBList", myName.c_str()); + myFailedConnectCBList.setNameVar("%s::myFailedConnectCBList", myName.c_str()); + myDisconnectOnErrorCBList.setNameVar( + "%s::myDisconnectOnErrorCBList", myName.c_str()); + myDisconnectNormallyCBList.setNameVar( + "%s::myDisconnectNormallyCBList", myName.c_str()); + myDataCBList.setNameVar("%s::myDataCBList", myName.c_str()); + //myDataCBList.setLogging(false); // supress debug logging since it drowns out all other logging +} + +AREXPORT void ArLaser::setMaxRange(unsigned int maxRange) +{ + if (maxRange > myAbsoluteMaxRange) + { + ArLog::log(ArLog::Terse, "%s::setMaxRange: Tried to set the max range to %u which is above the absoluteMaxRange on the device of %d, capping it", + getName(), maxRange, getAbsoluteMaxRange()); + ArRangeDevice::setMaxRange(myAbsoluteMaxRange); + } + else + ArRangeDevice::setMaxRange(maxRange); + + myMaxRangeSet = true; +} + +AREXPORT void ArLaser::setCumulativeBufferSize(size_t size) +{ + ArRangeDevice::setCumulativeBufferSize(size); + myCumulativeBufferSizeSet = true; +} + + +AREXPORT void ArLaser::laserSetAbsoluteMaxRange(unsigned int absoluteMaxRange) +{ + ArLog::log(myInfoLogLevel, "%s: Setting absolute max range to %u", + getName(), absoluteMaxRange); + myAbsoluteMaxRange = absoluteMaxRange; + setMaxRange(getMaxRange()); +} + +/** + Filter readings, moving them from the raw current buffer to + filtered current buffer (see ArRangeDevice), and then also to the + cumulative buffer. + + This must be called for the laser subclass to work right. + + This also calls the reading callbacks. +**/ + +void ArLaser::laserProcessReadings(void) +{ + // if we have no readings... don't do anything + if (myRawReadings == NULL || myRawReadings->begin() == myRawReadings->end()) + return; + + std::list::iterator sensIt; + ArSensorReading *sReading; + double x, y; + double lastX = 0.0, lastY = 0.0; + //unsigned int i = 0; + ArTime len; + len.setToNow(); + + bool clean; + if (myCumulativeCleanInterval <= 0 || + (myCumulativeLastClean.mSecSince() > + myCumulativeCleanInterval)) + { + myCumulativeLastClean.setToNow(); + clean = true; + } + else + { + clean = false; + } + + myCurrentBuffer.setPoseTaken(myRawReadings->front()->getPoseTaken()); + myCurrentBuffer.setEncoderPoseTaken( + myRawReadings->front()->getEncoderPoseTaken()); + myCurrentBuffer.beginRedoBuffer(); + + // walk the buffer of all the readings and see if we want to add them + for (sensIt = myRawReadings->begin(); + sensIt != myRawReadings->end(); + ++sensIt) + { + sReading = (*sensIt); + + // if we have ignore readings then check them here + if (!myIgnoreReadings.empty() && + (myIgnoreReadings.find( + (int) ceil(sReading->getSensorTh())) != + myIgnoreReadings.end()) || + myIgnoreReadings.find( + (int) floor(sReading->getSensorTh())) != + myIgnoreReadings.end()) + sReading->setIgnoreThisReading(true); + + // see if the reading is valid + if (sReading->getIgnoreThisReading()) + continue; + + // if we have a max range then check it here... + if (myMaxRange != 0 && + sReading->getRange() > myMaxRange) + { + sReading->setIgnoreThisReading(true); + } + + // see if the reading is valid... this is set up this way so that + // max range readings can cancel out other readings, but will + // still be ignored other than that... ones ignored for other + // reasons were skipped above + if (sReading->getIgnoreThisReading()) + { + internalProcessReading(sReading->getX(), sReading->getY(), + sReading->getRange(), clean, true); + continue; + } + + // get our coords + x = sReading->getX(); + y = sReading->getY(); + + // see if we're checking on the filter near dist... if we are + // and the reading is a good one we'll check the cumulative + // buffer + if (myMinDistBetweenCurrentSquared > 0.0000001) + { + // see where the last reading was + //squaredDist = (x-lastX)*(x-lastX) + (y-lastY)*(y-lastY); + // see if the reading is far enough from the last reading + if (ArMath::squaredDistanceBetween(x, y, lastX, lastY) > + myMinDistBetweenCurrentSquared) + { + lastX = x; + lastY = y; + // since it was a good reading, see if we should toss it in + // the cumulative buffer... + internalProcessReading(x, y, sReading->getRange(), clean, false); + + /* we don't do this part anymore since it wound up leaving + // too many things not really tehre... if its outside of our + // sensor angle to use to filter then don't let this one + // clean (ArMath::fabs(sReading->getSensorTh()) > 50) + // filterAddAndCleanCumulative(x, y, false); else*/ + } + // it wasn't far enough, skip this one and go to the next one + else + { + continue; + } + } + // we weren't filtering the readings, but see if it goes in the + // cumulative buffer anyways + else + { + internalProcessReading(x, y, sReading->getRange(), clean, false); + } + // now drop the reading into the current buffer + myCurrentBuffer.redoReading(x, y); + //i++; + } + myCurrentBuffer.endRedoBuffer(); + /* Put this in to see how long the cumulative filtering is taking + if (clean) + printf("### %ld %d\n", len.mSecSince(), myCumulativeBuffer.getBuffer()->size()); + */ + internalGotReading(); +} + + +void ArLaser::internalProcessReading(double x, double y, + unsigned int range, bool clean, + bool onlyClean) +{ + if (myCumulativeBuffer.getSize() == 0) + return; + + // make sure we really want to clean + if (clean && myCumulativeCleanDistSquared < 1) + clean = false; + + + std::list::iterator cit; + bool addReading = true; + + //double squaredDist; + + ArLineSegment line; + double xTaken = myCurrentBuffer.getPoseTaken().getX(); + double yTaken = myCurrentBuffer.getPoseTaken().getY(); + ArPose intersection; + ArPoseWithTime reading(x, y); + + // if we're not cleaning and its further than we're keeping track of + // readings ignore it... replaced with the part thats 'until here' + /* + if (!clean && + myMaxInsertDistCumulative > 1 && + range > myMaxInsertDistCumulative) + return; + */ + + if (onlyClean) + addReading = false; + + if (myMaxInsertDistCumulative > 1 && + range > myMaxInsertDistCumulative) + addReading = false; + + if (!clean && !addReading) + return; + // until here + + // if we're cleaning we start our sweep + if (clean) + myCumulativeBuffer.beginInvalidationSweep(); + // run through all the readings + for (cit = getCumulativeBuffer()->begin(); + cit != getCumulativeBuffer()->end(); + ++cit) + { + // if its closer to a reading than the filter near dist, just return + if (addReading && myMinDistBetweenCumulativeSquared < .0000001 || + (ArMath::squaredDistanceBetween(x, y, (*cit)->getX(), (*cit)->getY()) < + myMinDistBetweenCumulativeSquared)) + { + // if we're not cleaning it and its too close just return, + // otherwise keep going (to clear out invalid readings) + if (!clean) + return; + addReading = false; + } + // see if this reading invalidates some other readings by coming too close + if (clean) + { + // set up our line + line.newEndPoints(x, y, xTaken, yTaken); + // see if the cumulative buffer reading perpindicular intersects + // this line segment, and then see if its too close if it does, + // but if the intersection is very near the endpoint then leave it + if (line.getPerpPoint((*cit), &intersection) && + (intersection.squaredFindDistanceTo(*(*cit)) < + myCumulativeCleanDistSquared) && + (intersection.squaredFindDistanceTo(reading) > + 50 * 50)) + { + //printf("Found one too close to the line\n"); + myCumulativeBuffer.invalidateReading(cit); + } + } + } + // if we're cleaning finish the sweep + if (clean) + myCumulativeBuffer.endInvalidationSweep(); + // toss the reading in + if (addReading) + myCumulativeBuffer.addReading(x, y); + +} + +AREXPORT bool ArLaser::laserPullUnsetParamsFromRobot(void) +{ + if (myRobot == NULL) + { + ArLog::log(ArLog::Normal, "%s: Trying to connect, but have no robot, continuing under the assumption this is intentional", getName()); + return true; + } + + const ArRobotParams *params = myRobot->getRobotParams(); + if (params == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Robot has no params, cannot pull unset params from robot", + getName()); + return false; + } + + const char *paramStr; + char *endPtr; + double paramDouble; + int paramInt; + bool paramBool; + + paramBool = params->getLaserFlipped(getLaserNumber()); + if (!myFlippedSet) + { + if (paramBool) + { + ArLog::log(myInfoLogLevel, + "%s: Setting flipped to true from robot params", + getName()); + setFlipped(true); + } + else if (!paramBool) + { + ArLog::log(myInfoLogLevel, + "%s: Setting flipped to false from robot params", + getName()); + setFlipped(false); + } + } + + paramInt = params->getLaserMaxRange(getLaserNumber()); + if (!myMaxRangeSet) + { + if(paramInt < 0) + { + ArLog::log(ArLog::Terse, "%s: LaserMaxRange in robot param file was negative but shouldn't be (it was '%d'), failing", getName(), paramInt); + return false; + } + if (paramInt > 0) + { + ArLog::log(myInfoLogLevel, + "%s: Setting max range to %d from robot params", + getName(), paramInt); + setMaxRange(paramInt); + } + } + + paramInt = params->getLaserCumulativeBufferSize(getLaserNumber()); + if (!myCumulativeBufferSizeSet) + { + if(paramInt < 0) + { + ArLog::log(ArLog::Terse, "%s: LaserCumulativeBufferSize in robot param file was negative but shouldn't be (it was '%d'), failing", getName(), paramInt); + return false; + } + if (paramInt > 0) + { + ArLog::log(myInfoLogLevel, + "%s: Setting cumulative buffer size to %d from robot params", + getName(), paramInt); + setCumulativeBufferSize(paramInt); + } + } + + paramStr = params->getLaserStartDegrees(getLaserNumber()); + if (canSetDegrees() && !myStartDegreesSet && + paramStr != NULL && paramStr[0] != '\0') + { + paramDouble = strtod(paramStr, &endPtr); + if(endPtr == paramStr) + { + ArLog::log(ArLog::Terse, "%s: LaserStartDegrees in robot param file was not a double (it was '%s'), failing", getName(), paramStr); + return false; + } + ArLog::log(myInfoLogLevel, + "%s: Setting start degrees to %g from robot params", + getName(), paramDouble); + setStartDegrees(paramDouble); + } + + paramStr = params->getLaserEndDegrees(getLaserNumber()); + if (canSetDegrees() && !myEndDegreesSet && + paramStr != NULL && paramStr[0] != '\0') + { + paramDouble = strtod(paramStr, &endPtr); + if(endPtr == paramStr) + { + ArLog::log(ArLog::Terse, + "%s: LaserEndDegrees in robot param file was not a double (it was '%s'), failing", + getName(), paramStr); + return false; + } + ArLog::log(myInfoLogLevel, + "%s: Setting end degrees to %g from robot params", + getName(), paramDouble); + setEndDegrees(paramDouble); + } + + paramStr = params->getLaserDegreesChoice(getLaserNumber()); + if (canChooseDegrees() && !myDegreesChoiceSet && + paramStr != NULL && paramStr[0] != '\0') + { + ArLog::log(myInfoLogLevel, + "%s: Setting degrees choice to %s from robot params", + getName(), paramStr); + chooseDegrees(paramStr); + } + + paramStr = params->getLaserIncrement(getLaserNumber()); + if (canSetDegrees() && !myIncrementSet && + paramStr != NULL && paramStr[0] != '\0') + { + paramDouble = strtod(paramStr, &endPtr); + if(endPtr == paramStr) + { + ArLog::log(ArLog::Terse, + "%s: LaserIncrement in robot param file was not a double (it was '%s'), failing", + getName(), paramStr); + return false; + } + ArLog::log(myInfoLogLevel, + "%s: Setting increment to %g from robot params", + getName(), paramDouble); + setIncrement(paramDouble); + } + + paramStr = params->getLaserIncrementChoice(getLaserNumber()); + if (canChooseIncrement() && !myIncrementChoiceSet && + paramStr != NULL && paramStr[0] != '\0') + { + ArLog::log(myInfoLogLevel, + "%s: Setting increment choice to %s from robot params", + getName(), paramStr); + chooseIncrement(paramStr); + } + + paramStr = params->getLaserUnitsChoice(getLaserNumber()); + if (canChooseUnits() && !myUnitsChoiceSet && + paramStr != NULL && paramStr[0] != '\0') + { + ArLog::log(myInfoLogLevel, + "%s: Setting units choice to %s from robot params", + getName(), paramStr); + chooseUnits(paramStr); + } + + paramStr = params->getLaserReflectorBitsChoice(getLaserNumber()); + if (canChooseReflectorBits() && !myReflectorBitsChoiceSet && + paramStr != NULL && paramStr[0] != '\0') + { + ArLog::log(myInfoLogLevel, + "%s: Setting reflectorBits choice to %s from robot params", + getName(), paramStr); + chooseReflectorBits(paramStr); + } + + paramBool = params->getLaserPowerControlled(getLaserNumber()); + if (canSetPowerControlled() && !myPowerControlledSet) + { + if (paramBool) + { + ArLog::log(myInfoLogLevel, + "%s: Setting powerControlled to true from robot params", + getName()); + setPowerControlled(true); + } + else if (!paramBool) + { + ArLog::log(myInfoLogLevel, + "%s: Setting powerControlled to false from robot params", + getName()); + setPowerControlled(false); + } + } + + paramStr = params->getLaserStartingBaudChoice(getLaserNumber()); + if (canChooseStartingBaud() && !myStartingBaudChoiceSet && + paramStr != NULL && paramStr[0] != '\0') + { + ArLog::log(myInfoLogLevel, + "%s: Setting startingBaud choice to %s from robot params", + getName(), paramStr); + chooseStartingBaud(paramStr); + } + + paramStr = params->getLaserAutoBaudChoice(getLaserNumber()); + if (canChooseAutoBaud() && !myAutoBaudChoiceSet && + paramStr != NULL && paramStr[0] != '\0') + { + ArLog::log(myInfoLogLevel, + "%s: Setting autoBaud choice to %s from robot params", + getName(), paramStr); + chooseAutoBaud(paramStr); + } + + if (!addIgnoreReadings(params->getLaserIgnore(getLaserNumber()))) + return false; + + setSensorPosition(params->getLaserX(getLaserNumber()), + params->getLaserY(getLaserNumber()), + params->getLaserTh(getLaserNumber()), + params->getLaserZ(getLaserNumber())); + + return true; +} + +AREXPORT void ArLaser::setDeviceConnection(ArDeviceConnection *conn) +{ + myConnMutex.lock(); + myConn = conn; + myConn->setDeviceName(getName()); + myConnMutex.unlock(); +} + +AREXPORT ArDeviceConnection *ArLaser::getDeviceConnection(void) +{ + return myConn; +} + +/** + Sets the time to go without a response from the laser + until it is assumed that the connection with the laser has been + broken and the disconnect on error events will happen. + + If there is no robot then there is a straightforward check of last + reading time against this value. If there is a robot then it will + not start the check until the laser is running and connected. + + @param seconds if 0 or less then the connection timeout feature + will be disabled, otherwise disconnect on error will be triggered + after this number of miliseconds... +**/ +AREXPORT void ArLaser::setConnectionTimeoutSeconds(double seconds) +{ + ArLog::log(ArLog::Normal, + "%s::setConnectionTimeoutSeconds: Setting timeout to %g secs", + getName(), seconds); + myLastReading.setToNow(); + + if (seconds > 0) + myTimeoutSeconds = seconds; + else + myTimeoutSeconds = 0; +} + +/** + Gets the time (miliseconds) to go without response from the laser + until it is assumed that the connection with the laser has been + broken and the disconnect on error events will happen. + If 0, then the timeout is disabled. + + If there is no robot then there is a straightforward check of last + reading time against this value. If there is a robot then it will + not start the check until the laser is running and connected. +**/ +double ArLaser::getConnectionTimeoutSeconds(void) +{ + return myTimeoutSeconds; +} + +AREXPORT void ArLaser::laserConnect(void) +{ + // figure out how many readings we can have and set the current + // buffer size to that + double degrees; + + myLastReading.setToNow(); + + if (canSetDegrees()) + { + //degrees = fabs(ArMath::subAngle(getStartDegrees(), getEndDegrees())); + degrees = fabs(getStartDegrees() - getEndDegrees()); + ArLog::log(myInfoLogLevel, + "%s: Using degrees settings of %g to %g for %g degrees", + getName(), getStartDegrees(), getEndDegrees(), + degrees); + } + else if (canChooseDegrees()) + { + degrees = getDegreesChoiceDouble(); + ArLog::log(myInfoLogLevel, "%s: Using choice of %g degrees", + getName(), degrees); + } + else + { + degrees = 360; + ArLog::log(ArLog::Terse, "%s: Don't have any settings for degrees, arbitrarily using 360", getName()); + } + + double increment; + if (canSetIncrement()) + { + increment = getIncrement(); + ArLog::log(myInfoLogLevel, "%s: Using increment setting of %g degrees", + getName(), increment); + } + else if (canChooseIncrement()) + { + increment = getIncrementChoiceDouble(); + ArLog::log(myInfoLogLevel, "%s: Using increment setting of %g degrees", + getName(), increment); + } + else + { + // PS 10/20/11 - This was missing causing buffer size to be very large + // set this to the lowest, note both the SZ and S3 are setting the buffer + // size but it's being overriden by this procedure - do we want to fix + // this or just leave it at the max value 360/.25=1440??? + increment = .25; + ArLog::log(ArLog::Terse, "%s: Don't have any settings for increment, arbitrarily using .25", getName()); + } + + int size = (int)ceil(degrees / increment) + 1; + ArLog::log(myInfoLogLevel, "%s: Setting current buffer size to %d", + getName(), size); + setCurrentBufferSize(size); + + ArLog::log(myInfoLogLevel, "%s: Connected", getName()); + myConnectCBList.invoke(); +} + +AREXPORT void ArLaser::laserFailedConnect(void) +{ + ArLog::log(myInfoLogLevel, "%s: Failed to connect", getName()); + myFailedConnectCBList.invoke(); +} + +AREXPORT void ArLaser::laserDisconnectNormally(void) +{ + ArLog::log(myInfoLogLevel, "%s: Disconnected normally", getName()); + myDisconnectNormallyCBList.invoke(); +} + +AREXPORT void ArLaser::laserDisconnectOnError(void) +{ + ArLog::log(ArLog::Normal, "%s: Disconnected because of error", getName()); + myDisconnectOnErrorCBList.invoke(); +} + +AREXPORT void ArLaser::internalGotReading(void) +{ + if (myTimeLastReading != time(NULL)) + { + myTimeLastReading = time(NULL); + myReadingCount = myReadingCurrentCount; + myReadingCurrentCount = 0; + } + myReadingCurrentCount++; + + myLastReading.setToNow(); + + myDataCBList.invoke(); +} + +AREXPORT int ArLaser::getReadingCount() +{ + if (myTimeLastReading == time(NULL)) + return myReadingCount; + if (myTimeLastReading == time(NULL) - 1) + return myReadingCurrentCount; + return 0; +} + + + + + +AREXPORT void ArLaser::setSensorPosition( + double x, double y, double th, double z) +{ + setSensorPosition(ArPose(x, y, th), z); +} + +AREXPORT void ArLaser::setSensorPosition(ArPose pose, double z) +{ + myHaveSensorPose = true; + mySensorPose.setPose(pose); + mySensorZ = z; +} + +bool ArLaser::internalCheckChoice(const char *check, const char *choice, + std::list *choices, + const char *choicesStr) +{ + if (check == NULL || choices == NULL || choice == NULL || choice[0] == '\0') + { + ArLog::log(ArLog::Terse, "%s::%s: Internal error in setup"); + return false; + } + + std::list::iterator it; + std::string str; + for (it = choices->begin(); it != choices->end(); it++) + { + str = (*it); + if (ArUtil::strcasecmp(choice, str) == 0) + return true; + } + + ArLog::log(ArLog::Terse, "%s::%s: Invalid choice, choices are <%s>.", + myName.c_str(), check, choicesStr); + return false; +} + +bool ArLaser::internalCheckChoice(const char *check, const char *choice, + std::map *choices, + const char *choicesStr, + double *choiceDouble) +{ + if (check == NULL || choices == NULL || choice == NULL || choice[0] == '\0') + { + ArLog::log(ArLog::Terse, "%s::%s: Internal error in setup"); + return false; + } + + std::map::iterator it; + std::string str; + for (it = choices->begin(); it != choices->end(); it++) + { + str = (*it).first; + if (ArUtil::strcasecmp(choice, str) == 0) + { + *choiceDouble = (*it).second; + return true; + } + } + + ArLog::log(ArLog::Terse, "%s::%s: Invalid choice, choices are <%s>.", + myName.c_str(), check, choicesStr); + return false; +} + +void ArLaser::internalBuildChoicesString( + std::list *choices, std::string *str) +{ + std::list::iterator it; + bool first; + std::string choiceStr; + + for (it = choices->begin(), first = true; it != choices->end(); it++) + { + choiceStr = (*it); + if (!first) + (*str) += "|"; + first = false; + (*str) += choiceStr; + } +} + +void ArLaser::internalBuildChoices( + std::map *choices, std::string *str, + std::list *choicesList) +{ + std::map::iterator it; + bool first; + std::string choiceStr; + + for (it = choices->begin(), first = true; it != choices->end(); it++) + { + choiceStr = (*it).first; + choicesList->push_back(choiceStr); + if (!first) + (*str) += "|"; + first = false; + (*str) += choiceStr; + } +} + +/** + This allows the setting of the degrees the laser will use from a + range for both starting and ending degrees. Only one of this and + laserAllowDegreesChoices should be used. + + @param defaultStartDegrees The default start degrees to use, this + default should probably be for the max range. + + @param startDegreesMin The minimum value for start degrees + + @param startDegreesMax The maximum value for start degrees + + @param defaultEndDegrees The default end degrees to use, this + default should probably be for the max range. + + @param endDegreesMin The minimum value for end degrees + + @param endDegreesMax The maximum value for end degrees +**/ +AREXPORT void ArLaser::laserAllowSetDegrees(double defaultStartDegrees, double startDegreesMin, double startDegreesMax, double defaultEndDegrees, double endDegreesMin, double endDegreesMax) +{ + myCanSetDegrees = true; + myStartDegreesMin = startDegreesMin; + myStartDegreesMax = startDegreesMax; + setStartDegrees(defaultStartDegrees); + myStartDegreesSet = false; + + myEndDegreesMin = endDegreesMin; + myEndDegreesMax = endDegreesMax; + setEndDegrees(defaultEndDegrees); + myEndDegreesSet = false; + +} + +AREXPORT bool ArLaser::setStartDegrees(double startDegrees) +{ + if (!myCanSetDegrees) + { + ArLog::log(ArLog::Terse, "%s::setStartDegrees: Cannot set angles on this laser", myName.c_str()); + return false; + } + if (startDegrees < myStartDegreesMin) + { + ArLog::log(ArLog::Terse, "%s::setStartDegrees: Start degrees (%g) tried to be set to less than the minimum (%g))", myName.c_str(), startDegrees, myStartDegreesMin); + return false; + } + if (startDegrees > myStartDegreesMax) + { + ArLog::log(ArLog::Terse, "%s::setStartDegrees: Start degrees (%g) tried to be set to greater than the minimum (%g))", myName.c_str(), startDegrees, myStartDegreesMax); + return false; + } + if (myEndDegreesSet && startDegrees >= myEndDegrees) + { + ArLog::log(ArLog::Terse, "%s::setStartDegrees: Start degrees (%g) tried to be set to greater than or equal to end degrees %g)", myName.c_str(), startDegrees, myEndDegrees); + return false; + } + myStartDegreesSet = true; + myStartDegrees = startDegrees; + return true; +} + +AREXPORT bool ArLaser::setEndDegrees(double endDegrees) +{ + if (!myCanSetDegrees) + { + ArLog::log(ArLog::Terse, "%s::setEndDegrees: Cannot set angles on this laser", myName.c_str()); + return false; + } + if (endDegrees < myEndDegreesMin) + { + ArLog::log(ArLog::Terse, "%s::setEndDegrees: End degrees (%g) tried to be set to less than the minimum (%g))", myName.c_str(), endDegrees, myEndDegreesMin); + return false; + } + if (endDegrees > myEndDegreesMax) + { + ArLog::log(ArLog::Terse, "%s::setEndDegrees: End degrees (%g) tried to be set to greater than the minimum (%g))", myName.c_str(), endDegrees, myEndDegreesMax); + return false; + } + if (myStartDegreesSet && endDegrees <= myStartDegrees) + { + ArLog::log(ArLog::Terse, "%s::setEndDegrees: End degrees (%g) tried to be set to less than or equal to end degrees %g)", myName.c_str(), endDegrees, myStartDegrees); + return false; + } + myEndDegreesSet = true; + myEndDegrees = endDegrees; + return true; +} + +/** + Allows the choice of the laser degrees from one of a number of + choices, only one of this and laserAllowSetDegrees should be used. + + @param defaultDegreesChoice The default degrees, this should be + the largest value. + + @param degreesChoices this is a mapping of std::strings to + doubles, the strings should be the actual available choices, and + the doubles should be the numerical representation... this is so + the simulated laser can behave more easily like the real + lasers... and because the original sick driver used words typed out + (to make problems more obvious). +**/ +AREXPORT void ArLaser::laserAllowDegreesChoices( + const char *defaultDegreesChoice, + std::map degreesChoices) +{ + myCanChooseDegrees = true; + myDegreesChoices = degreesChoices; + internalBuildChoices(&myDegreesChoices, &myDegreesChoicesString, &myDegreesChoicesList); + chooseDegrees(defaultDegreesChoice); + myDegreesChoiceSet = false; +} + +AREXPORT bool ArLaser::chooseDegrees( + const char *degreesChoice) +{ + if (!myCanChooseDegrees) + { + ArLog::log(ArLog::Terse, "%s::chooseDegrees: Cannot choose degrees on this laser", myName.c_str()); + return false; + } + + double degreesChoiceDouble; + if (!internalCheckChoice("chooseDegrees", degreesChoice, &myDegreesChoices, + myDegreesChoicesString.c_str(), °reesChoiceDouble)) + return false; + + myDegreesChoice = degreesChoice; + myDegreesChoiceDouble = degreesChoiceDouble; + return true; +} + +/** + Allows the choice of increment from a range, only one of this and + laserAllowIncrementChoices should be used. + + @param defaultIncrement The default increment to use, this + default should be a reasonable value. + + @param incrementMin The minimum value for the increment + + @param incrementMax The maximum value for the increment +**/ +AREXPORT void ArLaser::laserAllowSetIncrement( + double defaultIncrement, double incrementMin, double incrementMax) +{ + myCanSetIncrement = true; + myIncrementMin = incrementMin; + myIncrementMax = incrementMax; + setIncrement(defaultIncrement); + myIncrementSet = false; + +} + +AREXPORT bool ArLaser::setIncrement(double increment) +{ + if (!myCanSetIncrement) + { + ArLog::log(ArLog::Terse, "%s::setIncrement: Cannot set increment on this laser", myName.c_str()); + return false; + } + + if (increment < myIncrementMin) + { + ArLog::log(ArLog::Terse, "%s::setIncrement: Increment (%g) tried to be set to less than the minimum (%g))", myName.c_str(), increment, myIncrementMin); + return false; + } + if (increment > myIncrementMax) + { + ArLog::log(ArLog::Terse, "%s::setIncrement: End degrees (%g) tried to be set to greater than the maximum (%g))", myName.c_str(), increment, myIncrementMax); + return false; + } + myIncrementSet = true; + myIncrement = increment; + return true; +} + +/** + Allows the choice of increment from a limited set of values, only + one of this and laserAllowSetIncrement should be used. + + @param defaultIncrementChoice The default increment, this should be + a reasonable value. + + @param incrementChoices this is a mapping of std::strings to + doubles, the strings should be the actual available choices, and + the doubles should be the numerical representation... this is so + the simulated laser can behave more easily like the real + lasers... and because the original sick driver used words typed out + (to make problems more obvious). +**/ +AREXPORT void ArLaser::laserAllowIncrementChoices( + const char *defaultIncrementChoice, + std::map incrementChoices) +{ + myCanChooseIncrement = true; + myIncrementChoices = incrementChoices; + internalBuildChoices(&myIncrementChoices, &myIncrementChoicesString, &myIncrementChoicesList); + chooseIncrement(defaultIncrementChoice); + myIncrementChoiceSet = false; +} + +AREXPORT bool ArLaser::chooseIncrement(const char *incrementChoice) +{ + if (!myCanChooseIncrement) + { + ArLog::log(ArLog::Terse, "%s::chooseIncrement: Cannot choose increment on this laser", myName.c_str()); + return false; + } + + double incrementChoiceDouble; + if (!internalCheckChoice("chooseIncrement", incrementChoice, + &myIncrementChoices, myIncrementChoicesString.c_str(), + &incrementChoiceDouble)) + return false; + myIncrementChoice = incrementChoice; + myIncrementChoiceDouble = incrementChoiceDouble; + return true; +} + +/** + @param defaultUnitsChoice This is the default units choice, it + should be a reasonable value. + + @param unitsChoices The possible choices for units. +**/ +AREXPORT void ArLaser::laserAllowUnitsChoices( + const char *defaultUnitsChoice, + std::list unitsChoices) +{ + myCanChooseUnits = true; + myUnitsChoices = unitsChoices; + internalBuildChoicesString(&myUnitsChoices, &myUnitsChoicesString); + chooseUnits(defaultUnitsChoice); + myUnitsChoiceSet = false; + +} + +AREXPORT bool ArLaser::chooseUnits(const char *unitsChoice) +{ + if (!myCanChooseUnits) + { + ArLog::log(ArLog::Terse, "%s::chooseUnits: Cannot choose units on this laser", myName.c_str()); + return false; + } + + if (!internalCheckChoice("chooseUnits", unitsChoice, &myUnitsChoices, + myUnitsChoicesString.c_str())) + return false; + + myUnitsChoice = unitsChoice; + return true; +} + +/** + @param defaultReflectorBitsChoice The default choice for reflector + bits, should be a reasonable value. + + @param reflectorBitsChoices The possible choices for reflector bits +**/ +AREXPORT void ArLaser::laserAllowReflectorBitsChoices( + const char *defaultReflectorBitsChoice, + std::list reflectorBitsChoices) +{ + myCanChooseReflectorBits = true; + myReflectorBitsChoices = reflectorBitsChoices; + internalBuildChoicesString(&myReflectorBitsChoices, &myReflectorBitsChoicesString); + chooseReflectorBits(defaultReflectorBitsChoice); + myReflectorBitsChoiceSet = false; +} + +AREXPORT bool ArLaser::chooseReflectorBits(const char *reflectorBitsChoice) +{ + if (!myCanChooseReflectorBits) + { + ArLog::log(ArLog::Terse, "%s::chooseReflectorBits: Cannot choose reflectorBits on this laser", myName.c_str()); + return false; + } + + if (!internalCheckChoice("chooseReflectorBits", reflectorBitsChoice, + &myReflectorBitsChoices, + myReflectorBitsChoicesString.c_str())) + return false; + + myReflectorBitsChoice = reflectorBitsChoice; + return true; +} + +/** + Allows settings of whether the power can be controlled or not. + This is mostly for devices that respond differently at power up + than they do if they are already on (ie the lms2xx where it doesn't + respond at all while powering up). If the communication is the + same either way, you can just not set this. + + @param defaultPowerControlled The default value for power + controlled. +**/ +AREXPORT void ArLaser::laserAllowSetPowerControlled(bool defaultPowerControlled) +{ + myCanSetPowerControlled = true; + setPowerControlled(defaultPowerControlled); + myPowerControlledSet = false; +} + +AREXPORT bool ArLaser::setPowerControlled( + bool powerControlled) +{ + if (!myCanSetPowerControlled) + { + ArLog::log(ArLog::Terse, "%s::setPowerControlled: Cannot set if the laser power is controlled on this laser", myName.c_str()); + return false; + } + + myPowerControlledSet = true; + myPowerControlled = powerControlled; + return true; +} + +/** + @param defaultStartingBaudChoice Default starting baud choice. + This should probably stay the same as what the sensor ships with. + + @param startingBaudChoices The available choices for starting baud +**/ +AREXPORT void ArLaser::laserAllowStartingBaudChoices( + const char *defaultStartingBaudChoice, + std::list startingBaudChoices) +{ + myCanChooseStartingBaud = true; + myStartingBaudChoices = startingBaudChoices; + internalBuildChoicesString(&myStartingBaudChoices, &myStartingBaudChoicesString); + chooseStartingBaud(defaultStartingBaudChoice); + myStartingBaudChoiceSet = false; +} + +AREXPORT bool ArLaser::chooseStartingBaud(const char *startingBaudChoice) +{ + if (!myCanChooseStartingBaud) + { + ArLog::log(ArLog::Terse, "%s::chooseStartingBaud: Cannot choose startingBaud on this laser", myName.c_str()); + return false; + } + + if (!internalCheckChoice("chooseStartingBaud", startingBaudChoice, + &myStartingBaudChoices, + myStartingBaudChoicesString.c_str())) + return false; + + myStartingBaudChoice = startingBaudChoice; + return true; +} + +/** + @param defaultAutoBaudChoice Default auto baud choice. This should + probably be the maximum reasonable reliable robust rate that the + laser supports. The laser should autobaud up to this choice after + it connects. + + @param autoBaudChoices The available choices for auto baud +**/ +AREXPORT void ArLaser::laserAllowAutoBaudChoices( + const char *defaultAutoBaudChoice, + std::list autoBaudChoices) +{ + myCanChooseAutoBaud = true; + myAutoBaudChoices = autoBaudChoices; + internalBuildChoicesString(&myAutoBaudChoices, &myAutoBaudChoicesString); + chooseAutoBaud(defaultAutoBaudChoice); + myAutoBaudChoiceSet = false; +} + +AREXPORT bool ArLaser::chooseAutoBaud(const char *autoBaudChoice) +{ + if (!myCanChooseAutoBaud) + { + ArLog::log(ArLog::Terse, "%s::chooseAutoBaud: Cannot choose autoBaud on this laser", myName.c_str()); + return false; + } + + if (!internalCheckChoice("chooseAutoBaud", autoBaudChoice, + &myAutoBaudChoices, myAutoBaudChoicesString.c_str())) + return false; + + myAutoBaudChoice = autoBaudChoice; + return true; +} + +AREXPORT void ArLaser::laserSetDefaultTcpPort(int defaultTcpPort) +{ + myDefaultTcpPort = defaultTcpPort; +} + +AREXPORT void ArLaser::laserSetDefaultPortType(const char *defaultPortType) +{ + myDefaultPortType = defaultPortType; +} + +AREXPORT bool ArLaser::addIgnoreReadings(const char *ignoreReadings) +{ + // if we have , then use it as the separator, otherwise use space + // like normal + char separator = ' '; + if (strstr(ignoreReadings, ",") != NULL) + separator = ','; + + ArArgumentBuilder args(1024, separator); + + args.add(ignoreReadings); + if (args.getArgc() == 0) + return true; + + size_t i; + const char *str; + float begin, end; + float ignore; + for (i = 0; i < args.getArgc(); i++) + { + if (args.isArgDouble(i)) + { + ignore = args.getArgDouble(i); + addIgnoreReading(ignore); + ArLog::log(ArLog::Verbose, "%s: Added ignore reading %g", + getName(), ignore); + } + else + { + str = args.getArg(i); + if (sscanf(str, "%f:%f", &begin, &end) == 2 || + sscanf(str, "%f-%f", &begin, &end) == 2) + { + ArLog::log(ArLog::Verbose, "%s: Adding ignore reading from %g to %g", + getName(), begin, end); + // reorder them for easier looping + if (begin > end) + { + ignore = begin; + begin = end; + end = ignore; + } + + ArLog::log(ArLog::Verbose, "%s: Added ignore reading (beginning) %g", + getName(), begin); + addIgnoreReading(begin); + for (ignore = begin; ignore <= end; ignore += 1.0) + { + ArLog::log(ArLog::Verbose, "%s: Added ignore reading %g", + getName(), ignore); + addIgnoreReading(ignore); + } + ArLog::log(ArLog::Verbose, "%s: Added ignore reading (ending) %g", + getName(), end); + addIgnoreReading(end); + } + else + { + ArLog::log(ArLog::Terse, "%s: Bad syntax for ignore readings, had string '%s' as one of the arguments (the values need to either be individual doubles, or begin:end (75:77) or begin-end (75-77))", getName(), str); + return false; + } + } + } + + return true; +} + +/** + Applies a transform to the buffers. this is mostly useful for translating + to/from local/global coordinates, but may have other uses. + This is different from + the class because it also transforms the raw readings. + @param trans the transform to apply to the data + @param doCumulative whether to transform the cumulative buffer or not +*/ +AREXPORT void ArLaser::applyTransform(ArTransform trans, + bool doCumulative) +{ + myCurrentBuffer.applyTransform(trans); + std::list::iterator it; + + for (it = myRawReadings->begin(); it != myRawReadings->end(); ++it) + (*it)->applyTransform(trans); + + if (doCumulative) + myCumulativeBuffer.applyTransform(trans); +} + +/** + This will check if the laser has lost connection. If there is no + robot it is a straightforward check of last reading time against + getConnectionTimeoutSeconds. If there is a robot then it will not + start the check until the laser is running and connected. +**/ +AREXPORT bool ArLaser::laserCheckLostConnection(void) +{ + + if ((myRobot == NULL || myRobotRunningAndConnected) && + getConnectionTimeoutSeconds() > 0 && + myLastReading.mSecSince() > getConnectionTimeoutSeconds() * 1000) + return true; + + if (!myRobotRunningAndConnected && myRobot != NULL && + myRobot->isRunning() && myRobot->isConnected()) + { + myRobotRunningAndConnected = true; + myLastReading.setToNow(); + } + + return false; +} + +AREXPORT void ArLaser::copyReadingCount(const ArLaser* laser) +{ + myTimeLastReading = laser->myTimeLastReading; + myReadingCurrentCount = laser->myReadingCurrentCount; + myReadingCount = laser->myReadingCount; +} + +AREXPORT void ArLaser::useSimpleNamingForAllLasers(void) +{ + ArLog::log(ArLog::Normal, "ArLaser: Will use simple naming for all lasers"); + ourUseSimpleNaming = true; +} diff --git a/Legacy/Aria/src/ArLaserConnector.cpp b/Legacy/Aria/src/ArLaserConnector.cpp new file mode 100644 index 0000000..73d15d1 --- /dev/null +++ b/Legacy/Aria/src/ArLaserConnector.cpp @@ -0,0 +1,1569 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLaserConnector.h" +#include "ArRobot.h" +#include "ArLaser.h" +#include "ariaInternal.h" +#include "ArSick.h" +#include "ArUrg.h" +#include "ArSimulatedLaser.h" +#include "ArCommands.h" +#include "ArRobotConfigPacketReader.h" + +/** @warning do not delete @a parser during the lifetime of this + ArLaserConnector, which may need to access its contents later. + + @param parser the parser with the arguments to parse + + @param robot the robot these lasers are attached to (or NULL for none) + + @param robotConnector the connector used for connecting to the robot + (so we can see if it was a sim or not) + + @param autoParseArgs if this class should autoparse the args if they + aren't parsed explicitly + + @param infoLogLevel The log level for information about creating + lasers and such, this is also passed to all the lasers created as + their infoLogLevel too + */ +AREXPORT ArLaserConnector::ArLaserConnector( + ArArgumentParser *parser, ArRobot *robot, + ArRobotConnector *robotConnector, bool autoParseArgs, + ArLog::LogLevel infoLogLevel, + ArRetFunctor1 *turnOnPowerOutputCB, + ArRetFunctor1 *turnOffPowerOutputCB) : + myParseArgsCB(this, &ArLaserConnector::parseArgs), + myLogOptionsCB(this, &ArLaserConnector::logOptions) +{ + myParser = parser; + myOwnParser = false; + myRobot = robot; + myRobotConnector = robotConnector; + myAutoParseArgs = autoParseArgs; + myParsedArgs = false; + myInfoLogLevel = infoLogLevel; + + myTurnOnPowerOutputCB = turnOnPowerOutputCB; + myTurnOffPowerOutputCB = turnOffPowerOutputCB; + + myParseArgsCB.setName("ArLaserConnector"); + Aria::addParseArgsCB(&myParseArgsCB, 60); + myLogOptionsCB.setName("ArLaserConnector"); + Aria::addLogOptionsCB(&myLogOptionsCB, 80); +} + +AREXPORT ArLaserConnector::~ArLaserConnector(void) +{ + +} + + +/** + * Parse command line arguments using the ArArgumentParser given in the ArLaserConnector constructor. + * + * See parseArgs(ArArgumentParser*) for details about argument parsing. + * + @return true if the arguments were parsed successfully false if not + **/ + +AREXPORT bool ArLaserConnector::parseArgs(void) +{ + return parseArgs(myParser); +} + +/** + * This function parses command line arguments held by the given ArArgumentParser. + * Normally, it is automatically called by ArArgumentParser::parseArgs(). + * + @return true if the arguments were parsed successfully false if not + + The following arguments are accepted for laser connections. A program may + request support for up to a specific number of lasers + using setMaxNumLasers(); if multi-laser support is enabled in this way, then these arguments must have the laser index + number appended. For example, "-laserPort" for laser 1 would instead by "-laserPort1", and for laser 2 it would be + "-laserPort2". + +
+
-laserPort port
+
-lp port
+
Use the given serial port device name when connecting to a laser. For example, COM2 or on Linux, /dev/ttyS1. + The default laser port is COM2, which is the typical Pioneer laser port. +
+ +
-laserFlipped true|false
+
-lf true|false
+
If true, then the laser is mounted upside-down on the robot and the ordering of readings + should be reversed.
+ +
-connectLaser
+
-cl
+
Explicitly request that the client program connect to a laser, if it does not always do so
+ +
-laserPowerControlled true|false
+
-lpc true|false
+
If true, then the laser is powered on when the serial port is initially opened, so enable + certain features when connecting such as a waiting period as the laser initializes.
+ +
-laserDegrees degrees
+
-ld degrees
+
Indicate the size of the laser field of view, either 180 (default) or 100.
+ +
-laserIncrement increment
+
-li increment
+
Configures the laser's angular resolution. If one, then configure the laser to take a reading every degree. + If half, then configure it for a reading every 1/2 degrees.
+ +
-laserUnits units
+
-lu units
+
Configures the laser's range resolution. May be 1mm for one milimiter, 1cm for ten milimeters, or 10cm for one hundred milimeters.
+ +
-laserReflectorBits bits
+
-lrb bits
+
Enables special reflectance detection, and configures the granularity of reflector detection information. Using more bits allows the laser to provide values for several different + reflectance levels, but also may force a reduction in range. (Note, the SICK LMS-200 only detects high reflectance on special reflector material + manufactured by SICK.) +
+
+ + **/ + +AREXPORT bool ArLaserConnector::parseArgs (ArArgumentParser *parser) +{ + if (myParsedArgs) + return true; + myParsedArgs = true; + bool typeReallySet; + const char *type; + char buf[1024]; + int i; + std::map::iterator it; + LaserData *laserData; + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue (true); + for (i = 1; i <= Aria::getMaxNumLasers(); i++) { + if (i == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", i); + typeReallySet = false; + // see if the laser is being added from the command line + if (!parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-laserType%s", buf) || + !parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-lt%s", buf)) { + ArLog::log (ArLog::Normal, + "ArLaserConnector: Bad laser type given for laser number %d", + i); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + // if we didn't have an argument then just return + if (!typeReallySet) + continue; + if ( (it = myLasers.find (i)) != myLasers.end()) { + ArLog::log (ArLog::Normal, "ArLaserConnector: A laser already exists for laser number %d, replacing it with a new one of type %s", + i, type); + laserData = (*it).second; + delete laserData; + myLasers.erase (i); + } + if (typeReallySet && type != NULL) { + ArLaser *laser = NULL; + if ( (laser = Aria::laserCreate (type, i, "ArLaserConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArLaserConnector: Created %s as laser %d from arguments", + laser->getName(), i); + myLasers[i] = new LaserData (i, laser); + laser->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "Unknown laser type %s for laser %d, choices are %s", + type, i, Aria::laserGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } + // go through the robot param list and add the lasers defined + // in the parameter file. + const ArRobotParams *params = NULL; + if (myRobot != NULL) { + params = myRobot->getRobotParams(); + if (params != NULL) { + for (i = 1; i <= Aria::getMaxNumLasers(); i++) { + // if we already have a laser for this then don't add one from + // the param file, since it was added either explicitly by a + // program or from the command line + if (myLasers.find (i) != myLasers.end()) + { + ArLog::log(myInfoLogLevel, "ArLaserConnector: Already a laser %d", i); + continue; + } + type = params->getLaserType (i); + // if we don't have a laser type for that number continue + if (type == NULL || type[0] == '\0') + { + if (params->getConnectLaser(i)) + { + myLasers[i] = new LaserData(i, NULL); + myLasers[i]->myConnect = true; + myLasers[i]->myConnectReallySet = true; + ArLog::log(myInfoLogLevel, + "ArLaserConnector: Will connect a NULL laser %d, since the parameter file wants to connect and it'll be clearer to fail in connectLasers", + i); + } + continue; + } + ArLaser *laser = NULL; + if ( (laser = + Aria::laserCreate (type, i, "ArLaserConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArLaserConnector: Created %s as laser %d from parameter file", + laser->getName(), i); + myLasers[i] = new LaserData (i, laser); + laser->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "Unknown laser type %s for laser %d from the .p file, choices are %s", + type, i, Aria::laserGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + if (params->getConnectLaser(i)) + { + myLasers[i]->myConnect = true; + myLasers[i]->myConnectReallySet = true; + ArLog::log(myInfoLogLevel, + "ArLaserConnector: Will connect %s as laser %d from parameter file", + laser->getName(), i); + + } + + + } + } else { + ArLog::log (ArLog::Normal, "ArLaserConnector: Have robot, but robot has NULL params, so cannot configure its laser %s", i); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + // now go through and parse the args for any laser that we have + for (it = myLasers.begin(); it != myLasers.end(); it++) { + laserData = (*it).second; + if (!parseLaserArgs (parser, laserData)) { + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return true; +} + +AREXPORT bool ArLaserConnector::parseLaserArgs(ArArgumentParser *parser, + LaserData *laserData) +{ + char buf[512]; + + + if (laserData == NULL) + { + ArLog::log(ArLog::Terse, "Was given NULL laser"); + return false; + } + + if (laserData->myLaser == NULL) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector: There is no laser for laser number %d but there should be... this should fail in the connect, so just returning here", + laserData->myNumber); + //return false; + return true; + } + + ArLaser *laser = laserData->myLaser; + + if (laserData->myNumber == 1) + buf[0] = '\0'; + else + sprintf(buf, "%d", laserData->myNumber); + + // see if we want to connect to the laser automatically + if (parser->checkArgumentVar("-connectLaser%s", buf) || + parser->checkArgumentVar("-cl%s", buf)) + { + laserData->myConnect = true; + laserData->myConnectReallySet = true; + } + + // see if we do not want to connect to the laser automatically + if (parser->checkArgumentVar("-doNotConnectLaser%s", buf) || + parser->checkArgumentVar("-dncl%s", buf)) + { + laserData->myConnect = false; + laserData->myConnectReallySet = true; + } + + if (!parser->checkParameterArgumentStringVar(NULL, &laserData->myPort, + "-laserPort%s", buf) || + !parser->checkParameterArgumentStringVar(NULL, &laserData->myPort, + "-lp%s", buf) || + + + !parser->checkParameterArgumentStringVar(NULL, &laserData->myPortType, + "-laserPortType%s", buf) || + !parser->checkParameterArgumentStringVar(NULL, &laserData->myPortType, + "-lpt%s", buf) || + + + + !parser->checkParameterArgumentIntegerVar( + &laserData->myRemoteTcpPortReallySet, + &laserData->myRemoteTcpPort, + "-remoteLaserTcpPort%s", buf) || + !parser->checkParameterArgumentIntegerVar( + &laserData->myRemoteTcpPortReallySet, + &laserData->myRemoteTcpPort, + "-rltp%s", buf) || + + !parser->checkParameterArgumentBoolVar(&laserData->myFlippedReallySet, + &laserData->myFlipped, + "-laserFlipped%s", buf) || + !parser->checkParameterArgumentBoolVar(&laserData->myFlippedReallySet, + &laserData->myFlipped, + "-lf%s", buf) || + + + (!parser->checkParameterArgumentIntegerVar( + &laserData->myMaxRangeReallySet, &laserData->myMaxRange, + "-laserMaxRange%s", buf)) || + (!parser->checkParameterArgumentIntegerVar( + &laserData->myMaxRangeReallySet, &laserData->myMaxRange, + "-lmr%s", buf)) || + + + (laser->canSetDegrees() && + !parser->checkParameterArgumentDoubleVar( + &laserData->myDegreesStartReallySet, &laserData->myDegreesStart, + "-laserDegreesStart%s", buf)) || + (laser->canSetDegrees() && + !parser->checkParameterArgumentDoubleVar( + &laserData->myDegreesStartReallySet, &laserData->myDegreesStart, + "-lds%s", buf)) || + (laser->canSetDegrees() && + !parser->checkParameterArgumentDoubleVar( + &laserData->myDegreesEndReallySet, &laserData->myDegreesEnd, + "-laserDegreesEnd%s", buf)) || + (laser->canSetDegrees() && + !parser->checkParameterArgumentDoubleVar( + &laserData->myDegreesEndReallySet, &laserData->myDegreesEnd, + "-lde%s", buf)) || + + + (laser->canChooseDegrees() && + !parser->checkParameterArgumentStringVar(NULL, &laserData->myDegrees, + "-laserDegrees%s", buf)) || + (laser->canChooseDegrees() && + !parser->checkParameterArgumentStringVar(NULL, &laserData->myDegrees, + "-ld%s", buf)) || + + (laser->canSetIncrement() && + !parser->checkParameterArgumentDoubleVar( + &laserData->myIncrementByDegreesReallySet, + &laserData->myIncrementByDegrees, + "-laserIncrementByDegrees%s", buf)) || + (laser->canSetIncrement() && + !parser->checkParameterArgumentDoubleVar( + &laserData->myIncrementByDegreesReallySet, + &laserData->myIncrementByDegrees, + "-libd%s", buf)) || + + + (laser->canChooseIncrement() && + !parser->checkParameterArgumentStringVar(NULL, &laserData->myIncrement, + "-laserIncrement%s", buf)) || + (laser->canChooseIncrement() && + !parser->checkParameterArgumentStringVar(NULL, &laserData->myIncrement, + "-li%s", buf)) || + + (laser->canChooseUnits() && + !parser->checkParameterArgumentStringVar(NULL, &laserData->myUnits, + "-laserUnits%s", buf)) || + (laser->canChooseUnits() && + !parser->checkParameterArgumentStringVar(NULL, &laserData->myUnits, + "-lu%s", buf)) || + + (laser->canChooseReflectorBits() && + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myReflectorBits, + "-laserReflectorBits%s", buf)) || + (laser->canChooseReflectorBits() && + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myReflectorBits, + "-lrb%s", buf)) || + + (laser->canSetPowerControlled() && + !parser->checkParameterArgumentBoolVar( + &laserData->myPowerControlledReallySet, + &laserData->myPowerControlled, + "-laserPowerControlled%s", buf)) || + (laser->canSetPowerControlled() && + !parser->checkParameterArgumentBoolVar( + &laserData->myPowerControlledReallySet, + &laserData->myPowerControlled, + "-lpc%s", buf)) || + + (laser->canChooseStartingBaud() && + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myStartingBaud, + "-laserStartingBaud%s", buf)) || + (laser->canChooseStartingBaud() && + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myStartingBaud, + "-lsb%s", buf)) || + + (laser->canChooseAutoBaud() && + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myAutoBaud, + "-laserAutoBaud%s", buf)) || + (laser->canChooseAutoBaud() && + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myAutoBaud, + "-lab%s", buf)) || + + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myAdditionalIgnoreReadings, + "-laserAdditionalIgnoreReadings%s", buf) || + !parser->checkParameterArgumentStringVar( + NULL, &laserData->myAdditionalIgnoreReadings, + "-lair%s", buf) + + ) + { + return false; + } + + return internalConfigureLaser(laserData); +} + +bool ArLaserConnector::internalConfigureLaser( + LaserData *laserData) +{ + ArLaser *laser = laserData->myLaser; + + if (laser == NULL) + { + ArLog::log(ArLog::Terse, "ArLaserConnector: No laser for number %d", + laserData->myNumber); + return false; + } + + if (laserData->myMaxRangeReallySet) + laser->setMaxRange(laserData->myMaxRange); + + if (laserData->myFlippedReallySet && + !laser->setFlipped(laserData->myFlipped)) + return false; + + if (laser->canSetDegrees() && + laserData->myDegreesStartReallySet && + !laser->setStartDegrees(laserData->myDegreesStart)) + return false; + + if (laser->canSetDegrees() && + laserData->myDegreesEndReallySet && + !laser->setEndDegrees(laserData->myDegreesEnd)) + return false; + + if (laser->canChooseDegrees() && laserData->myDegrees != NULL && + !laser->chooseDegrees(laserData->myDegrees)) + return false; + + if (laser->canSetIncrement() && + laserData->myIncrementByDegreesReallySet && + !laser->setIncrement(laserData->myIncrementByDegrees)) + return false; + + if (laser->canChooseIncrement() && laserData->myIncrement != NULL && + !laser->chooseIncrement(laserData->myIncrement)) + return false; + + if (laser->canChooseUnits() && laserData->myUnits != NULL && + !laser->chooseUnits(laserData->myUnits)) + return false; + + if (laser->canChooseReflectorBits() && laserData->myReflectorBits != NULL && + !laser->chooseReflectorBits(laserData->myReflectorBits)) + return false; + + if (laser->canSetPowerControlled() && + laserData->myPowerControlledReallySet && + !laser->setPowerControlled(laserData->myPowerControlled)) + return false; + + if (laser->canChooseStartingBaud() && laserData->myStartingBaud != NULL && + !laser->chooseStartingBaud(laserData->myStartingBaud)) + return false; + + if (laser->canChooseAutoBaud() && laserData->myAutoBaud != NULL && + !laser->chooseAutoBaud(laserData->myAutoBaud)) + return false; + + if (laserData->myAdditionalIgnoreReadings != NULL && + !laser->addIgnoreReadings(laserData->myAdditionalIgnoreReadings)) + return false; + + // if this is a placeholder, don't do the device connection stuff since we need to set it on the real laser + if (laserData->myLaserIsPlaceholder) + { + return true; + } + + // the rest handles all the connection stuff + const ArRobotParams *params; + + char portBuf[1024]; + if (laserData->myLaser == NULL) + { + ArLog::log(ArLog::Terse, "ArLaserConnector: There is no laser, cannot connect"); + return false; + } + sprintf(portBuf, "%d", laserData->myLaser->getDefaultTcpPort()); + + if (myRobotConnector == NULL) + { + ArLog::log(ArLog::Terse, "ArLaserConnector: No ArRobotConnector is passed in so simulators and remote hosts will not work correctly"); + } + + /* + if a laser isn't a placeholder and we should be using the sim, then use it + */ + if (!laserData->myLaserIsPlaceholder && + myRobotConnector != NULL && myRobotConnector->getRemoteIsSim()) + { + if (laserData->myNumber != 1) + { + ArLog::log(ArLog::Normal, "Cannot use the simulator with multiple lasers yet, will continue but will be unable to connect laser %s (num %d)", laserData->myLaser->getName(), laserData->myNumber); + return true; + } + ArSick *sick = NULL; + if ((sick = dynamic_cast(laser)) != NULL) + { + ArLog::log(ArLog::Normal, "Using old style sim laser for %s", + laser->getName()); + sick->setIsUsingSim(true); + } + else + { + ArLog::log(ArLog::Normal, "Using new style simulated laser for %s", + laser->getName()); + laserData->myLaser = new ArSimulatedLaser(laser); + laser = laserData->myLaser; + } + // return here, since the rest is just dealing with how to connect + // to the laser, but if its a simulated laser then we don't even + // do that + return true; + } + + + if ((laserData->myPort == NULL || strlen(laserData->myPort) == 0) && + (laserData->myPortType != NULL && strlen(laserData->myPortType) > 0)) + { + ArLog::log(ArLog::Normal, "There is a laser port type given ('%s') for laser %d (%s), but no laser port given, cannot configure laser", + laserData->myPortType, laserData->myNumber, laser->getName()); + return false; + } + + if ((laserData->myPort != NULL && strlen(laserData->myPort) > 0) && + (laserData->myPortType != NULL && strlen(laserData->myPortType) > 0)) + { + ArLog::log(ArLog::Normal, "ArLaserConnector: Connection type and port given for laser %d (%s), so overriding everything and using that information", + laserData->myNumber, laser->getName()); + if ((laserData->myConn = Aria::deviceConnectionCreate( + laserData->myPortType, laserData->myPort, portBuf, + "ArLaserConnector:")) == NULL) + { + return false; + } + laser->setDeviceConnection(laserData->myConn); + return true; + } + + +#if 0 + /* + This code is taken out since it'll break everything with a lms1xx using a remote port + */ + + if (myRobotConnector != NULL && !myRobotConnector->getRemoteIsSim() && + myRobotConnector->getRemoteHost() != NULL && + strlen(myRobotConnector->getRemoteHost()) > 0) + { + ArLog::log(ArLog::Normal, "ArLaserConnector: Remote host is used for robot, so remote host is also being used for laser %d (%s)", + laserData->myNumber, laser->getName()); + // if a port was given for the laser, then use that one... + ArTcpConnection *tcpConn = new ArTcpConnection; + laserData->myConn = tcpConn; + if (laserData->myRemoteTcpPortReallySet) + tcpConn->setPort(myRobotConnector->getRemoteHost(), + laserData->myRemoteTcpPort); + // otherwise use the default for that laser type + else + tcpConn->setPort(myRobotConnector->getRemoteHost(), + laser->getDefaultTcpPort()); + /* + This code is commented out because it created problems with demo + (or any other program that used ArLaserConnector::connectLasers + with addAllLasersToRobot as true) + + // now try and open the port, since if it doesn't open nothing will work + if (!tcpConn->openSimple()) + { + if (laserData->myRemoteTcpPortReallySet) + ArLog::log(ArLog::Terse, + "Could not connect laser to remote host %s with given remote port %d.", + myRobotConnector->getRemoteHost(), + laserData->myRemoteTcpPort); + else + /// TODO is this next line wrong? + ArLog::log(ArLog::Terse, + "Could not connect laser to remote host %s with default remote port %d.", + myRobotConnector->getRemoteHost(), + laserData->myRemoteTcpPort); + delete tcpConn; + return false; + } + */ + // set the laser to use that + laserData->myConn = tcpConn; + laser->setDeviceConnection(laserData->myConn); + return true; + } + +#endif + + if ((laserData->myPort != NULL && strlen(laserData->myPort) > 0) && + (laserData->myPortType == NULL || strlen(laserData->myPortType) == 0)) + { + if (myRobot != NULL && (params = myRobot->getRobotParams()) != NULL) + { + if (params->getLaserPortType(laserData->myNumber) != NULL && + params->getLaserPortType(laserData->myNumber)[0] != '\0') + { + ArLog::log(ArLog::Normal, "ArLaserConnector: There is a port given, but no port type given so using the robot parameters port type"); + if ((laserData->myConn = Aria::deviceConnectionCreate( + params->getLaserPortType(laserData->myNumber), + laserData->myPort, portBuf, + "ArLaserConnector: ")) == NULL) + { + return false; + } + } + else if (laser->getDefaultPortType() != NULL && + laser->getDefaultPortType()[0] != '\0') + { + ArLog::log(ArLog::Normal, "ArLaserConnector: There is a port given for laser %d (%s), but no port type given and no robot parameters port type so using the laser's default port type", laserData->myNumber, laser->getName()); + if ((laserData->myConn = Aria::deviceConnectionCreate( + laser->getDefaultPortType(), + laserData->myPort, portBuf, + "ArLaserConnector: ")) == NULL) + { + return false; + } + } + else + { + ArLog::log(ArLog::Normal, "ArLaserConnector: There is a port given for laser %d (%s), but no port type given, no robot parameters port type, and no laser default port type, so using serial", + laserData->myNumber, laser->getName()); + if ((laserData->myConn = Aria::deviceConnectionCreate( + "serial", + laserData->myPort, portBuf, + "ArLaserConnector: ")) == NULL) + { + return false; + } + } + laser->setDeviceConnection(laserData->myConn); + return true; + } + else + { + ArLog::log(ArLog::Normal, "There is a laser port given ('%s') for laser %d (%s), but no laser port type given and there are no robot params to find the information in, so assuming serial", + laserData->myPort, laserData->myNumber, laser->getName()); + if ((laserData->myConn = Aria::deviceConnectionCreate( + "serial", laserData->myPort, portBuf, + "ArLaserConnector: ")) == NULL) + { + return false; + } + laser->setDeviceConnection(laserData->myConn); + return true; + } + } + + // if we get down here there was no information provided by the command line or in a laser connector, so see if we have params... if not then fail, if so then use those + + if (myRobot == NULL || (params = myRobot->getRobotParams()) == NULL) + { + ArLog::log(ArLog::Normal, "ArLaserConnector: No robot params are available, and no command line information given on how to connect to the laser %d (%s), so cannot connect", laserData->myNumber, laser->getName()); + return false; + } + + ArLog::log(ArLog::Normal, "ArLaserConnector: Using robot params for connecting to laser %d (%s)", laserData->myNumber, laser->getName()); + + if ((laserData->myConn = Aria::deviceConnectionCreate( + params->getLaserPortType(laserData->myNumber), + params->getLaserPort(laserData->myNumber), portBuf, + "ArLaserConnector: ")) == NULL) + { + return false; + } + + laser->setDeviceConnection(laserData->myConn); + return true; +} + +AREXPORT void ArLaserConnector::logOptions(void) const +{ + ArLog::log(ArLog::Terse, "Options for ArLaserConnector:"); + ArLog::log(ArLog::Terse, "\nOptions shown are for currently set up lasers. Activate lasers with -laserType option"); + ArLog::log(ArLog::Terse, "to see options for that laser (e.g. \"-help -laserType1 lms2xx\")."); + ArLog::log(ArLog::Terse, "Valid laser types are: %s", Aria::laserGetTypes()); + ArLog::log(ArLog::Terse, "\nSee docs for details."); + + std::map::const_iterator it; + LaserData *laserData; + + for (it = myLasers.begin(); it != myLasers.end(); it++) + { + laserData = (*it).second; + logLaserOptions(laserData); + } + +} + +AREXPORT void ArLaserConnector::logLaserOptions( + LaserData *laserData, bool header, bool metaOpts) const +{ + char buf[512]; + + if (laserData == NULL) + { + ArLog::log(ArLog::Normal, + "Tried to log laser options with NULL laser data"); + return; + } + + if (laserData->myLaser == NULL) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector: There is no laser for laser number %d but there should be", + laserData->myNumber); + return; + } + + ArLaser *laser = laserData->myLaser; + + if (laserData->myNumber == 1) + buf[0] = '\0'; + else + sprintf(buf, "%d", laserData->myNumber); + + if(header) + { + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "Laser%s: (\"%s\")", buf, laser->getName()); + } + + if (metaOpts) + { + ArLog::log(ArLog::Terse, "-laserType%s <%s>", buf, Aria::laserGetTypes()); + ArLog::log(ArLog::Terse, "-lt%s <%s>", buf, Aria::laserGetTypes()); + + ArLog::log(ArLog::Terse, "-connectLaser%s", buf); + ArLog::log(ArLog::Terse, "-cl%s", buf); + } + + ArLog::log(ArLog::Terse, "-laserPort%s ", buf); + ArLog::log(ArLog::Terse, "-lp%s ", buf); + + ArLog::log(ArLog::Terse, "-laserPortType%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log(ArLog::Terse, "-lpt%s <%s>", buf, Aria::deviceConnectionGetTypes()); + + ArLog::log(ArLog::Terse, "-remoteLaserTcpPort%s ", buf); + ArLog::log(ArLog::Terse, "-rltp%s ", buf); + + ArLog::log(ArLog::Terse, "-laserFlipped%s ", buf); + ArLog::log(ArLog::Terse, "-lf%s ", buf); + + ArLog::log(ArLog::Terse, "-laserMaxRange%s ", buf); + ArLog::log(ArLog::Terse, "-lmr%s ", buf); + ArLog::log(ArLog::Terse, "\t is an unsigned int less than %d", + laser->getAbsoluteMaxRange()); + + + if (laser->canSetDegrees()) + { + ArLog::log(ArLog::Terse, "-laserDegreesStart%s ", buf); + ArLog::log(ArLog::Terse, "-lds%s ", buf); + ArLog::log(ArLog::Terse, "\t is a double between %g and %g", + laser->getStartDegreesMin(), laser->getStartDegreesMax()); + ArLog::log(ArLog::Terse, "-laserDegreesEnd%s ", buf); + ArLog::log(ArLog::Terse, "-lde%s ", buf); + ArLog::log(ArLog::Terse, "\t is a double between %g and %g", + laser->getEndDegreesMin(), laser->getEndDegreesMax()); + + } + + if (laser->canChooseDegrees()) + { + ArLog::log(ArLog::Terse, "-laserDegrees%s <%s>", buf, + laser->getDegreesChoicesString()); + ArLog::log(ArLog::Terse, "-ld%s <%s>", buf, + laser->getDegreesChoicesString()); + } + + if (laser->canSetIncrement()) + { + ArLog::log(ArLog::Terse, "-laserIncrementByDegrees%s ", buf); + ArLog::log(ArLog::Terse, "-libd%s ", buf); + ArLog::log(ArLog::Terse, + "\t is a double between %g and %g", + laser->getIncrementMin(), laser->getIncrementMax()); + + } + + if (laser->canChooseIncrement()) + { + ArLog::log(ArLog::Terse, "-laserIncrement%s <%s>", buf, + laser->getIncrementChoicesString()); + ArLog::log(ArLog::Terse, "-li%s <%s>", buf, + laser->getIncrementChoicesString()); + } + + if (laser->canChooseUnits()) + { + ArLog::log(ArLog::Terse, "-laserUnits%s <%s>", buf, + laser->getUnitsChoicesString()); + ArLog::log(ArLog::Terse, "-lu%s <%s>", buf, + laser->getUnitsChoicesString()); + } + + if (laser->canChooseReflectorBits()) + { + ArLog::log(ArLog::Terse, "-laserReflectorBits%s <%s>", buf, + laser->getReflectorBitsChoicesString()); + ArLog::log(ArLog::Terse, "-lrb%s <%s>", buf, + laser->getReflectorBitsChoicesString()); + } + + if (laser->canSetPowerControlled()) + { + ArLog::log(ArLog::Terse, "-laserPowerControlled%s ", buf); + ArLog::log(ArLog::Terse, "-lpc%s ", buf); + } + + if (laser->canChooseStartingBaud()) + { + ArLog::log(ArLog::Terse, "-laserStartingBaud%s <%s>", buf, + laser->getStartingBaudChoicesString()); + ArLog::log(ArLog::Terse, "-lsb%s <%s>", buf, + laser->getStartingBaudChoicesString()); + } + + if (laser->canChooseAutoBaud()) + { + ArLog::log(ArLog::Terse, "-laserAutoBaud%s <%s>", buf, + laser->getAutoBaudChoicesString()); + ArLog::log(ArLog::Terse, "-lab%s <%s>", buf, + laser->getAutoBaudChoicesString()); + } + + ArLog::log(ArLog::Terse, "-laserAdditionalIgnoreReadings%s ", buf); + ArLog::log(ArLog::Terse, "-lair%s ", buf); + ArLog::log(ArLog::Terse, "\t is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'"); + + +} + +/** + Normally adding lasers is done from the .p file, you can use this + if you want to add them explicitly in a program (which will + override the .p file, and may cause some problems). + + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLaserConnector::connectLasers.() + + @internal +**/ +AREXPORT bool ArLaserConnector::addLaser( + ArLaser *laser, int laserNumber) +{ + std::map::iterator it; + LaserData *laserData = NULL; + + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + laserData = (*it).second; + + if (laserData != NULL) + { + if (laserData->myLaserIsPlaceholder) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::addLaser: Replacing placeholder laser #%d of type %s but a replacement laser of type %s was passed in", + laserNumber, laserData->myLaser->getName(), laser->getName()); + if (laserData->myOwnPlaceholder) + delete laserData->myLaser; + laserData->myLaser = laser; + } + else + { + if (laserData->myLaser != NULL) + ArLog::log(ArLog::Terse, + "ArLaserConnector::addLaser: Already have laser for number #%d of type %s but a replacement laser of type %s was passed in", + laserNumber, laserData->myLaser->getName(), laser->getName()); + else + ArLog::log(ArLog::Terse, + "ArLaserConnector::addLaser: Already have laser for number #%d but a replacement laser of type %s was passed in", + laserNumber, laser->getName()); + delete laserData; + myLasers.erase(laserNumber); + } + } + + myLasers[laserNumber] = new LaserData(laserNumber, laser); + return true; +} + +/** + Normally adding lasers is done from the .p file, you can use this + if you want to add them explicitly in a program (which will + override the .p file, and may cause some problems). + + This is only for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLaserConnector::connectLasers(). + + @internal +**/ + +AREXPORT bool ArLaserConnector::addPlaceholderLaser( + ArLaser *placeholderLaser, + int laserNumber, bool takeOwnershipOfPlaceholder) +{ + std::map::iterator it; + LaserData *laserData = NULL; + + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + laserData = (*it).second; + + if (laserData != NULL) + { + if (laserData->myLaserIsPlaceholder) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::addPlaceholderLaser: Replacing placeholder laser #%d of type %s but a replacement laser of type %s was passed in", + laserNumber, laserData->myLaser->getName(), + placeholderLaser->getName()); + if (laserData->myOwnPlaceholder) + delete laserData->myLaser; + laserData->myLaser = placeholderLaser; + } + else + { + if (laserData->myLaser != NULL) + ArLog::log(ArLog::Terse, + "ArLaserConnector::addPlaceholderLaser: Already have laser for number #%d of type %s but a replacement laser of type %s was passed in", + laserNumber, laserData->myLaser->getName(), placeholderLaser->getName()); + else + ArLog::log(ArLog::Terse, + "ArLaserConnector::addPlaceholderLaser: Already have laser for number #%d but a replacement laser of type %s was passed in", + laserNumber, placeholderLaser->getName()); + delete laserData; + myLasers.erase(laserNumber); + } + } + + myLasers[laserNumber] = new LaserData(laserNumber, placeholderLaser, true, + takeOwnershipOfPlaceholder); + return true; +} + +AREXPORT ArLaser *ArLaserConnector::getLaser(int laserNumber) +{ + std::map::iterator it; + LaserData *laserData = NULL; + + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + laserData = (*it).second; + + // if we have no laser, we can't get it so just return + if (laserData == NULL) + return NULL; + + // otherwise, return the laser + return laserData->myLaser; +} + +AREXPORT bool ArLaserConnector::replaceLaser( + ArLaser *laser, int laserNumber) +{ + std::map::iterator it; + LaserData *laserData = NULL; + + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + laserData = (*it).second; + + // if we have no laser, we can't replace it so just return + if (laserData == NULL) + return false; + + if (laserData->myLaser != NULL) + ArLog::log(myInfoLogLevel, + "ArLaserConnector::replaceLaser: Already have laser for number #%d of type %s but a replacement laser of type %s was passed in", + laserNumber, laserData->myLaser->getName(), laser->getName()); + else + ArLog::log(ArLog::Normal, + "ArLaserConnector::replaceLaser: Replacing a non existant laser number #%d with a laser of type %s passed in", + laserNumber, laser->getName()); + + laserData->myLaser = laser; + return true; +} + + +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLaserConnector::connectLasers(). + + @internal +**/ +AREXPORT bool ArLaserConnector::setupLaser(ArLaser *laser, + int laserNumber) +{ + + if (myRobot == NULL && myRobotConnector != NULL) + myRobot = myRobotConnector->getRobot(); + + std::map::iterator it; + LaserData *laserData = NULL; + const ArRobotParams *params; + + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + laserData = (*it).second; + + if (laserData == NULL && laser == NULL) + { + ArLog::log(ArLog::Terse, "ArLaserConnector::setupLaser: Do not have laser #%d", laserNumber) ; + return false; + } + if (laserData != NULL && laser != NULL && !laserData->myLaserIsPlaceholder && + laserData->myLaser != laser) + { + if (laserData->myLaser != NULL) + ArLog::log(ArLog::Terse, "ArLaserConnector::setupLaser: Already have laser for number #%d (%s) but a replacement laser (%s) was passed in, this will replace all of the command line arguments for that laser", + laserNumber, laserData->myLaser->getName(), laser->getName()); + else + ArLog::log(ArLog::Terse, "ArLaserConnector::setupLaser: Already have laser for number #%d but a replacement laser (%s) was passed in, this will replace all of the command line arguments for that laser", + laserNumber, laser->getName()); + + delete laserData; + myLasers.erase(laserNumber); + myLasers[laserNumber] = new LaserData(laserNumber, laser); + } + + if (laserData == NULL && laser != NULL) + { + laserData = new LaserData(laserNumber, laser); + myLasers[laserNumber] = laserData; + if (myAutoParseArgs && !parseLaserArgs(myParser, laserData)) + { + ArLog::log(ArLog::Normal, "ArLaserConnector: Auto parsing args for laser %s (num %d)", laserData->myLaser->getName(), laserNumber); + return false; + } + } + + + // see if there is no laser (ie if it was a sick done in the old + // style), or if the laser passed in doesn't match the one this + // class created (I don't know how it'd happen, but...)... and then + // configure it + if ((laserData->myLaser == NULL || laserData->myLaser != laser || + laserData->myLaserIsPlaceholder)) + { + if (laserData->myLaserIsPlaceholder) + { + if (laserData->myOwnPlaceholder && laserData->myLaser != NULL) + delete laserData->myLaser; + laserData->myLaser = laser; + laserData->myLaserIsPlaceholder = false; + } + + if (!internalConfigureLaser(laserData)) + return false; + } + + + // setupLaser automatically adds this to the robot, since the + // connectlaser stuff is the newer more supported way and is more + // configurable.. it only adds it as a laser since the legacy code + // won't add it that way, but will add it as a range device + if (myRobot != NULL) + { + myRobot->addLaser(laser, laserNumber); + //myRobot->addRangeDevice(laser); + } + else + { + ArLog::log(ArLog::Normal, "ArLaserConnector::setupLaser: No robot, so laser cannot be added to robot"); + } + return true; +} + +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArLaserConnector::connectLasers(). + + @internal +**/ +AREXPORT bool ArLaserConnector::connectLaser(ArLaser *laser, + int laserNumber, + bool forceConnection) +{ + std::map::iterator it; + LaserData *laserData = NULL; + + laser->lockDevice(); + // set up the laser regardless + if (!setupLaser(laser, laserNumber)) + { + laser->unlockDevice(); + return false; + } + laser->unlockDevice(); + + if ((it = myLasers.find(laserNumber)) != myLasers.end()) + laserData = (*it).second; + + if (laserData == NULL) + { + ArLog::log(ArLog::Normal, "ArLaserConnector::connectLaser: Some horrendous error in connectLaser with laser number %d", laserNumber); + return false; + } + // see if we want to connect + if (!forceConnection && !laserData->myConnect) + return true; + else + return laser->blockingConnect(); +} + +/** + @param continueOnFailedConnect whether to continue on a failed + connection or not + + @param addConnectedLasersToRobot whether to add connected lasers to + the list stored in ArRobot. Normally this should be left as true. + + @param addAllLasersToRobot whether to add all the lasers to the + ArRobot list or not (even if connection was not made to that laser). + + @param turnOnLasers whether to attempt to turn on power to the laser (by + sending commands to the robot microcontroller). + + @param powerCycleLaserOnFailedConnect whether to turn on the laser + (with the microcontroller commands) + + @param failedOnLaser If this pointer is valid then the function + will set the index of the first laser where connection failed, or + -1 if there was an internal failure before attempting to connect + to any lasers (for example, parsing program arguments). + The function will also return false. If NULL, ignored. + + @return true if successful connecting to lasers, false on any errors. +**/ +AREXPORT bool ArLaserConnector::connectLasers( + bool continueOnFailedConnect, bool addConnectedLasersToRobot, + bool addAllLasersToRobot, bool turnOnLasers, + bool powerCycleLaserOnFailedConnect, int *failedOnLaser) +{ + std::map::iterator it; + LaserData *laserData = NULL; + + ArLog::log(myInfoLogLevel, + "ArLaserConnector: Connecting lasers"); + + + if (myAutoParseArgs && !myParsedArgs) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector: Auto parsing args for lasers"); + if (!parseArgs()) + { + if (failedOnLaser != NULL) + *failedOnLaser = -1; + return false; + } + } + + if (addAllLasersToRobot) + { + if (myRobot != NULL) + { + for (it = myLasers.begin(); it != myLasers.end(); it++) + { + laserData = (*it).second; + myRobot->addLaser(laserData->myLaser, laserData->myNumber); + //myRobot->addRangeDevice(laserData->myLaser); + ArLog::log(ArLog::Verbose, + "ArLaserConnector::connectLasers: Added %s to robot as laser %d", + laserData->myLaser->getName(), laserData->myNumber); + } + } + else + { + ArLog::log(ArLog::Normal, "ArLaserConnect::connectLasers: Supposed to add all lasers to robot, but there is no robot"); + if (failedOnLaser != NULL) + *failedOnLaser = -1; + return false; + } + } + + for (it = myLasers.begin(); it != myLasers.end(); it++) + { + laserData = (*it).second; + if (laserData->myLaserIsPlaceholder) + { + ArLog::log(ArLog::Normal, "ArLaserConnector::connectLasers: This function was called to connect laser %s (num %d) but there is a placeholder laser, so things are not configured correctly, you must use setupLaser or connectLaser with a placeholder laser, see the documenation for more details", + laserData->myLaser->getName(), laserData->myNumber); + continue; + } + if (laserData->myConnectReallySet && laserData->myConnect) + { + if (laserData->myLaser == NULL) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not connect to laser %d, no laser defined, stopping", + laserData->myNumber); + if (failedOnLaser != NULL) + *failedOnLaser = laserData->myNumber; + return false; + } + // if we want to turn on the lasers if we can, first see if we + // have functors that'll do it, if so use them... if not then + // see if the firwmare supports the power command for the lasers + // by checking the config (and only LRF and LRF5B2 are specified + // in firmware right now too) + if (turnOnLasers) + { + if (myTurnOnPowerOutputCB != NULL) + { + if (myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber) == NULL || + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber)[0] == '\0') + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Laser %s has no power output set so can't be turned on (things may still work).", + laserData->myLaser->getName()); + } + else + { + if (myTurnOnPowerOutputCB->invokeR( + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber))) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Turned on power output %s for %s", + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber), + laserData->myLaser->getName()); + + } + else + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not turn on power output %s for %s (things may still work).", + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber), + laserData->myLaser->getName()); + } + } + } + else if (laserData->myNumber == 1) + { + // see if the firmware supports the LRF command + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived() && + myRobot->getOrigRobotConfig()->getPowerBits() & ArUtil::BIT1) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Turning on LRF power for %s", + laserData->myLaser->getName()); + myRobot->comInt(ArCommands::POWER_LRF, 1); + ArUtil::sleep(250); + } + else + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Using legacy method to turn on LRF power for %s since firmware or robot doesn't support new way", + laserData->myLaser->getName()); + myRobot->com2Bytes(31, 11, 1); + ArUtil::sleep(250); + } + } + else if (laserData->myNumber == 2) + { + // see if the firmware supports the LRF2 command + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived() && + myRobot->getOrigRobotConfig()->getPowerBits() & ArUtil::BIT9) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Turning on LRF2 power for %s", + laserData->myLaser->getName()); + myRobot->comInt(ArCommands::POWER_LRF2, 1); + ArUtil::sleep(250); + } + else + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Cannot turn on LRF2 power for %s since firmware or robot doesn't support it", + laserData->myLaser->getName()); + ArUtil::sleep(250); + } + } + else + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Cannot turn power on for %s, since it is number %d (higher than 2)", + laserData->myLaser->getName(), + laserData->myLaser->getLaserNumber()); + } + } + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Connecting %s", + laserData->myLaser->getName()); + + laserData->myLaser->setRobot(myRobot); + + bool connected = false; + + connected = laserData->myLaser->blockingConnect(); + + // if we didn't connect and we can power cycle the lasers then + // do that and see if we can connect again + /// TODO see if this firmware can actually do the power cycling + if (!connected && powerCycleLaserOnFailedConnect) + { + if (laserData->myLaser->canSetPowerControlled()) + laserData->myLaser->setPowerControlled(true); + + if (myTurnOnPowerOutputCB != NULL) + { + if (myTurnOffPowerOutputCB != NULL) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Have no way to turn power off, so laser %s can't be power cycled (it's possible things will still work).", + laserData->myLaser->getName()); + } + else if (myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber) == NULL || + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber)[0] == '\0') + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Laser %s has no power output set so can't be power cycled (it's possible things will still work).", + laserData->myLaser->getName()); + } + else + { + if (myTurnOffPowerOutputCB->invokeR( + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber))) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Cycled off power output %s for %s", + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber), + laserData->myLaser->getName()); + } + else + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not cycle off power output %s for %s", + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber), + laserData->myLaser->getName()); + } + ArUtil::sleep(1000); + if (myTurnOnPowerOutputCB->invokeR( + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber))) + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Cycled on power output %s for %s", + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber), + laserData->myLaser->getName()); + } + else + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not cycle on power output %s for %s", + myRobot->getRobotParams()->getLaserPowerOutput( + laserData->myNumber), + laserData->myLaser->getName()); + } + } + ArUtil::sleep(1000); + connected = laserData->myLaser->blockingConnect(); + } + if (laserData->myNumber == 1) + { + // see if the firmware supports the LRF command + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived() && + myRobot->getOrigRobotConfig()->getPowerBits() & ArUtil::BIT1) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Cycling LRF power for %s and trying to connect again", + laserData->myLaser->getName()); + myRobot->comInt(ArCommands::POWER_LRF, 0); + ArUtil::sleep(1000); + myRobot->comInt(ArCommands::POWER_LRF, 1); + ArUtil::sleep(1000); + connected = laserData->myLaser->blockingConnect(); + } + else + { + + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Using legacy method to cycle LRF power for %s since firmware or robot doesn't support new way", + laserData->myLaser->getName()); + myRobot->com2Bytes(31, 11, 0); + ArUtil::sleep(1000); + myRobot->com2Bytes(31, 11, 1); + ArUtil::sleep(1000); + connected = laserData->myLaser->blockingConnect(); + } + } + else if (laserData->myNumber == 2) + { + // see if the firmware supports the LRF2 command + if (myRobot->getOrigRobotConfig() != NULL && + myRobot->getOrigRobotConfig()->hasPacketArrived() && + myRobot->getOrigRobotConfig()->getPowerBits() & ArUtil::BIT9) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Cycling LRF2 power for %s and trying to connect again", + laserData->myLaser->getName()); + + myRobot->comInt(ArCommands::POWER_LRF2, 0); + ArUtil::sleep(1000); + myRobot->comInt(ArCommands::POWER_LRF2, 1); + ArUtil::sleep(1000); + connected = laserData->myLaser->blockingConnect(); + } + else + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Cannot cycle LRF2 power for %s since firmware or robot doesn't support it", + laserData->myLaser->getName()); + ArUtil::sleep(1000); + ArUtil::sleep(1000); + } + } + else + { + ArLog::log(myInfoLogLevel, + "ArLaserConnector::connectLasers: Cannot cycle power for %s, since it is number %d (higher than 2)", + laserData->myLaser->getName(), + laserData->myLaser->getLaserNumber()); + } + } + + if (connected) + { + if (!addAllLasersToRobot && addConnectedLasersToRobot) + { + if (myRobot != NULL) + { + myRobot->addLaser(laserData->myLaser, laserData->myNumber); + //myRobot->addRangeDevice(laserData->myLaser); + ArLog::log(ArLog::Verbose, + "ArLaserConnector::connectLasers: Added %s to robot", + laserData->myLaser->getName()); + } + else + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not add %s to robot, since there is no robot", + laserData->myLaser->getName()); + } + + } + else if (addAllLasersToRobot && myRobot != NULL) + { + ArLog::log(ArLog::Verbose, + "ArLaserConnector::connectLasers: %s already added to robot)", + laserData->myLaser->getName()); + } + else if (myRobot != NULL) + { + ArLog::log(ArLog::Verbose, + "ArLaserConnector::connectLasers: Did not add %s to robot", + laserData->myLaser->getName()); + } + } + else + { + if (!continueOnFailedConnect) + { + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not connect %s, stopping", + laserData->myLaser->getName()); + if (failedOnLaser != NULL) + *failedOnLaser = laserData->myNumber; + return false; + } + else + ArLog::log(ArLog::Normal, + "ArLaserConnector::connectLasers: Could not connect %s, continuing with remainder of lasers", + laserData->myLaser->getName()); + } + } + } + + ArLog::log(myInfoLogLevel, + "ArLaserConnector: Done connecting lasers"); + return true; +} diff --git a/Legacy/Aria/src/ArLaserFilter.cpp b/Legacy/Aria/src/ArLaserFilter.cpp new file mode 100644 index 0000000..de61748 --- /dev/null +++ b/Legacy/Aria/src/ArLaserFilter.cpp @@ -0,0 +1,512 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ArLaserFilter.h" +#include "ArRobot.h" +#include "ArConfig.h" + +//#define DEBUGRANGEFILTER + +AREXPORT ArLaserFilter::ArLaserFilter( + ArLaser *laser, const char *name) : + ArLaser(laser->getLaserNumber(), + name != NULL && name[0] != '\0' ? name : laser->getName(), + laser->getAbsoluteMaxRange(), + laser->isLocationDependent(), + false), + myProcessCB(this, &ArLaserFilter::processReadings) +{ + myLaser = laser; + + if (name == NULL || name[0] == '\0') + { + std::string filteredName; + filteredName = "filtered_"; + filteredName += laser->getName(); + laserSetName(filteredName.c_str()); + } + + myRawReadings = new std::list; + + char buf[1024]; + sprintf(buf, "%sProcessCB", getName()); + myProcessCB.setName(buf); + + myAngleToCheck = 1; + myAnyFactor = -1; + myAllFactor = -1; + myAnyMinRange = -1; + myAnyMinRangeLessThanAngle = -180; + myAnyMinRangeGreaterThanAngle = 180; + + setCurrentDrawingData( + new ArDrawingData(*(myLaser->getCurrentDrawingData())), + true); + + setCumulativeDrawingData( + new ArDrawingData(*(myLaser->getCumulativeDrawingData())), + true); + + // laser parameters + setInfoLogLevel(myLaser->getInfoLogLevel()); + setConnectionTimeoutSeconds(myLaser->getConnectionTimeoutSeconds()); + setCumulativeBufferSize(myLaser->getCumulativeBufferSize()); + setCumulativeCleanDist(myLaser->getCumulativeCleanDist()); + setCumulativeCleanInterval(myLaser->getCumulativeCleanInterval()); + setCumulativeCleanOffset(myLaser->getCumulativeCleanOffset()); + + setSensorPosition(myLaser->getSensorPosition(), + myLaser->getSensorPositionZ()); + laserSetAbsoluteMaxRange(myLaser->getAbsoluteMaxRange()); + // set our max range to the laser we're filtering... then set the + // max range on the laser we're filtering to 0, so that it's over + // max range values don't get set to ignore, since then we can't + // clear cumulatives beyond that value + setMaxRange(myLaser->getMaxRange()); + myLaser->setMaxRange(0); + + // base range device parameters + setMaxSecondsToKeepCurrent(myLaser->getMaxSecondsToKeepCurrent()); + setMinDistBetweenCurrent(getMinDistBetweenCurrent()); + setMaxSecondsToKeepCumulative(myLaser->getMaxSecondsToKeepCumulative()); + setMaxDistToKeepCumulative(myLaser->getMaxDistToKeepCumulative()); + setMinDistBetweenCumulative(myLaser->getMinDistBetweenCumulative()); + setMaxInsertDistCumulative(myLaser->getMaxInsertDistCumulative()); + setCurrentDrawingData(myLaser->getCurrentDrawingData(), false); + setCumulativeDrawingData(myLaser->getCumulativeDrawingData(), false); + + // turn off the cumulative buffer on the original to save CPU + myLaser->setCumulativeBufferSize(0); + + + // now all the specific laser settings (this should already be taken + // care of when this is created, but the code existed for the + // simulated laser so I put it here too) + if (myLaser->canSetDegrees()) + laserAllowSetDegrees( + myLaser->getStartDegrees(), myLaser->getStartDegreesMin(), + myLaser->getStartDegreesMax(), myLaser->getEndDegrees(), + myLaser->getEndDegreesMin(), myLaser->getEndDegreesMax()); + + if (myLaser->canChooseDegrees()) + laserAllowDegreesChoices(myLaser->getDegreesChoice(), + myLaser->getDegreesChoicesMap()); + + if (myLaser->canSetIncrement()) + laserAllowSetIncrement(myLaser->getIncrement(), + myLaser->getIncrementMin(), + myLaser->getIncrementMax()); + + if (myLaser->canChooseIncrement()) + laserAllowIncrementChoices(myLaser->getIncrementChoice(), + myLaser->getIncrementChoicesMap()); + + if (myLaser->canChooseUnits()) + laserAllowUnitsChoices(myLaser->getUnitsChoice(), + myLaser->getUnitsChoices()); + + if (myLaser->canChooseReflectorBits()) + laserAllowReflectorBitsChoices(myLaser->getReflectorBitsChoice(), + myLaser->getReflectorBitsChoices()); + + if (canSetPowerControlled()) + laserAllowSetPowerControlled(myLaser->getPowerControlled()); + + if (myLaser->canChooseStartingBaud()) + laserAllowStartingBaudChoices(myLaser->getStartingBaudChoice(), + myLaser->getStartingBaudChoices()); + + if (myLaser->canChooseAutoBaud()) + laserAllowAutoBaudChoices(myLaser->getAutoBaudChoice(), + myLaser->getAutoBaudChoices()); + + laserSetDefaultTcpPort(myLaser->getDefaultTcpPort()); + laserSetDefaultPortType(myLaser->getDefaultPortType()); + +} + +AREXPORT ArLaserFilter::~ArLaserFilter() +{ + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&myProcessCB); + myRobot->remLaser(this); + } +} + +AREXPORT void ArLaserFilter::addToConfig(ArConfig *config, + const char *sectionName, + const char *prefix) +{ + std::string name; + + config->addSection(ArConfig::CATEGORY_ROBOT_OPERATION, + sectionName, + ""); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), sectionName, + ArPriority::FACTORY); + name = prefix; + name += "AngleSpread"; + config->addParam( + ArConfigArg(name.c_str(), &myAngleToCheck, + "Filter settings. The angle spread to check on either side of each reading", + 0), + sectionName, ArPriority::FACTORY); + + name = prefix; + name += "AnyNeighborFactor"; + config->addParam( + ArConfigArg(name.c_str(), &myAnyFactor, + "Filter settings. If a reading (decided by the anglespread) is further than any of its neighbor reading times this factor, it is ignored... so a value between 0 and 1 will check if they're all closer, a value greater than 1 will see if they're all further, negative values means this factor won't be used", + -1), + sectionName, ArPriority::FACTORY); + + name = prefix; + name += "AllNeighborFactor"; + config->addParam( + ArConfigArg(name.c_str(), &myAllFactor, + "Filter settings. If a reading (decided by the anglespread) is further than all of its neighbor reading times this factor, it is ignored... so a value between 0 and 1 will check if they're all closer, a value greater than 1 will see if they're all further, negative values means this factor won't be used", + -1), + sectionName, ArPriority::FACTORY); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), sectionName, + ArPriority::FACTORY); + + name = prefix; + name += "AnyNeighborMinRange"; + config->addParam( + ArConfigArg(name.c_str(), &myAnyMinRange, + "Filter settings. If a reading itself, or if it has a neighbor (decided by the anglespread) that is closer than this value (in mm) it is ignored... negative values means this factor won't be used", + -1), + sectionName, ArPriority::FACTORY); + + name = prefix; + name += "AnyNeighborMinRangeLessThanAngle"; + config->addParam( + ArConfigArg(name.c_str(), &myAnyMinRangeLessThanAngle, + "Filter settings. The AnyNeighborMinRange will only be applied to angles LESS than this (so the AnyNeighborMinRange filter will only apply angles below this, or above GreatestAngle)"), + sectionName, ArPriority::FACTORY); + + name = prefix; + name += "AnyNeighborMinRangeGreaterThanAngle"; + config->addParam( + ArConfigArg(name.c_str(), &myAnyMinRangeGreaterThanAngle, + "Filter settings. The AnyNeighborMinRange will only be applied to angles GREATER than this (so the AnyNeighborMinRange filter will only apply above this, or below LeastAngle)"), + sectionName, ArPriority::FACTORY); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), sectionName, + ArPriority::FACTORY); + +} + +AREXPORT void ArLaserFilter::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&myProcessCB); + myRobot->addSensorInterpTask(myName.c_str(), 51, &myProcessCB); + } + ArLaser::setRobot(robot); +} + +void ArLaserFilter::processReadings(void) +{ + myLaser->lockDevice(); + selfLockDevice(); + + const std::list *rdRawReadings; + std::list::const_iterator rdIt; + + if ((rdRawReadings = myLaser->getRawReadings()) == NULL) + { + selfUnlockDevice(); + myLaser->unlockDevice(); + return; + } + + size_t rawSize = myRawReadings->size(); + size_t rdRawSize = myLaser->getRawReadings()->size(); + + while (rawSize < rdRawSize) + { + myRawReadings->push_back(new ArSensorReading); + rawSize++; + } + + // set where the pose was taken + myCurrentBuffer.setPoseTaken( + myLaser->getCurrentRangeBuffer()->getPoseTaken()); + myCurrentBuffer.setEncoderPoseTaken( + myLaser->getCurrentRangeBuffer()->getEncoderPoseTaken()); + + + std::list::iterator it; + ArSensorReading *rdReading; + ArSensorReading *reading; + +#ifdef DEBUGRANGEFILTER + FILE *file = NULL; + //file = ArUtil::fopen("/mnt/rdsys/tmp/filter", "w"); + file = ArUtil::fopen("/tmp/filter", "w"); +#endif + + std::map readingMap; + int numReadings = 0; + + // first pass to copy the readings and put them into a map + for (rdIt = rdRawReadings->begin(), it = myRawReadings->begin(); + rdIt != rdRawReadings->end() && it != myRawReadings->end(); + rdIt++, it++) + { + rdReading = (*rdIt); + reading = (*it); + *reading = *rdReading; + + readingMap[numReadings] = reading; + numReadings++; + } + + // if we're not doing any filtering, just short circuit out now + if (myAllFactor <= 0 && myAnyFactor <= 0 && myAnyMinRange <= 0) + { + laserProcessReadings(); + copyReadingCount(myLaser); + + selfUnlockDevice(); + myLaser->unlockDevice(); +#ifdef DEBUGRANGEFILTER + if (file != NULL) + fclose(file); +#endif + return; + } + + char buf[1024]; + int i; + int j; + //ArSensorReading *lastAddedReading = NULL; + + // now walk through the readings to filter them + for (i = 0; i < numReadings; i++) + { + reading = readingMap[i]; + + // if we're ignoring this reading then just get on with life + if (reading->getIgnoreThisReading()) + continue; + + /* Taking this check out since the base class does it now and if + * it gets marked ignore now it won't get used for clearing + * cumulative readings + + if (myMaxRange >= 0 && reading->getRange() > myMaxRange) + { +#ifdef DEBUGRANGEFILTER + if (file != NULL) + fprintf(file, "%.1f beyond max range at %d\n", + reading->getSensorTh(), reading->getRange()); +#endif + reading->setIgnoreThisReading(true); + continue; + } + */ + if (myAnyMinRange >= 0 && reading->getRange() < myAnyMinRange && + (reading->getSensorTh() < myAnyMinRangeLessThanAngle || + reading->getSensorTh() > myAnyMinRangeGreaterThanAngle)) + { +#ifdef DEBUGRANGEFILTER + if (file != NULL) + fprintf(file, "%.1f within min range at %d\n", + reading->getSensorTh(), reading->getRange()); +#endif + reading->setIgnoreThisReading(true); + continue; + } + + /* + if (lastAddedReading != NULL) + { + + if (lastAddedReading->getPose().findDistanceTo(reading->getPose()) < 50) + { +#ifdef DEBUGRANGEFILTER + if (file != NULL) + fprintf(file, "%.1f too close from last %6.0f\n", + reading->getSensorTh(), + lastAddedReading->getPose().findDistanceTo( + reading->getPose())); +#endif + reading->setIgnoreThisReading(true); + continue; + } +#ifdef DEBUGRANGEFILTER + else if (file != NULL) + fprintf(file, "%.1f from last %6.0f\n", + reading->getSensorTh(), + lastAddedReading->getPose().findDistanceTo( + reading->getPose())); +#endif + } + */ + + buf[0] = '\0'; + bool goodAll = true; + bool goodAny = false; + bool goodMinRange = true; + if (myAnyFactor <= 0) + goodAny = true; + for (j = i - 1; + (j >= 0 && //good && + fabs(ArMath::subAngle(readingMap[j]->getSensorTh(), + reading->getSensorTh())) <= myAngleToCheck); + j--) + { + /* You can't skip these, or you get onesided filtering + if (readingMap[j]->getIgnoreThisReading()) + { +#ifdef DEBUGRANGEFILTER + sprintf(buf, "%s %6s", buf, "i"); +#endif + continue; + } + */ +#ifdef DEBUGRANGEFILTER + sprintf(buf, "%s %6d", buf, readingMap[j]->getRange()); +#endif + if (myAllFactor > 0 && + !checkRanges(reading->getRange(), + readingMap[j]->getRange(), myAllFactor)) + goodAll = false; + if (myAnyFactor > 0 && + checkRanges(reading->getRange(), + readingMap[j]->getRange(), myAnyFactor)) + goodAny = true; + if (myAnyMinRange > 0 && + (reading->getSensorTh() < myAnyMinRangeLessThanAngle || + reading->getSensorTh() > myAnyMinRangeGreaterThanAngle) && + readingMap[j]->getRange() <= myAnyMinRange) + goodMinRange = false; + + } +#ifdef DEBUGRANGEFILTER + sprintf(buf, "%s %6d*", buf, reading->getRange()); +#endif + for (j = i + 1; + (j < numReadings && //good && + fabs(ArMath::subAngle(readingMap[j]->getSensorTh(), + reading->getSensorTh())) <= myAngleToCheck); + j++) + { + // you can't ignore these or you get one sided filtering + /* + if (readingMap[j]->getIgnoreThisReading()) + { +#ifdef DEBUGRANGEFILTER + sprintf(buf, "%s %6s", buf, "i"); +#endif + continue; + } + */ +#ifdef DEBUGRANGEFILTER + sprintf(buf, "%s %6d", buf, readingMap[j]->getRange()); +#endif + if (myAllFactor > 0 && + !checkRanges(reading->getRange(), + readingMap[j]->getRange(), myAllFactor)) + goodAll = false; + if (myAnyFactor > 0 && + checkRanges(reading->getRange(), + readingMap[j]->getRange(), myAnyFactor)) + goodAny = true; + if (myAnyMinRange > 0 && + (reading->getSensorTh() < myAnyMinRangeLessThanAngle || + reading->getSensorTh() > myAnyMinRangeGreaterThanAngle) && + readingMap[j]->getRange() <= myAnyMinRange) + goodMinRange = false; + } + + + if (!goodAll || !goodAny || !goodMinRange) + reading->setIgnoreThisReading(true); + /* + else + lastAddedReading = reading; + */ +#ifdef DEBUGRANGEFILTER + if (file != NULL) + fprintf(file, + "%5.1f %6d %c\t%s\n", reading->getSensorTh(), reading->getRange(), + goodAll && goodAny && goodMinRange ? 'g' : 'b', buf); +#endif + + } + + +#ifdef DEBUGRANGEFILTER + if (file != NULL) + fclose(file); +#endif + + laserProcessReadings(); + copyReadingCount(myLaser); + + selfUnlockDevice(); + myLaser->unlockDevice(); +} + +/** + @return Return true if the reading is good, false if the reading is bad +**/ +bool ArLaserFilter::checkRanges(int thisReading, int otherReading, + double factor) +{ + if (thisReading == otherReading || factor <= 0) + return true; + + if ((factor >= 1 && thisReading > otherReading * factor) || + (factor < 1 && thisReading < otherReading * factor)) + return false; + else + return true; +} + + +AREXPORT int ArLaserFilter::selfLockDevice(void) +{ + return lockDevice(); +} + +AREXPORT int ArLaserFilter::selfTryLockDevice(void) +{ + return tryLockDevice(); +} + +AREXPORT int ArLaserFilter::selfUnlockDevice(void) +{ + return unlockDevice(); +} diff --git a/Legacy/Aria/src/ArLaserLogger.cpp b/Legacy/Aria/src/ArLaserLogger.cpp new file mode 100644 index 0000000..2a48562 --- /dev/null +++ b/Legacy/Aria/src/ArLaserLogger.cpp @@ -0,0 +1,872 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLaserLogger.h" +#include "ArRobot.h" +#include "ArLaser.h" +#include "ArJoyHandler.h" +#include "ArRobotJoyHandler.h" +#include "ariaInternal.h" + + +/** @page LaserLogFileFormat Laser Scan Log File Format + * + * A log of raw laser and robot data can be created using an ArLaserLogger + * object and driving the robot manually with a joystick or other means. + * This log file can then be futher processed, for example by loading it into + * Mapper3 or MobilePlanner, which corrects errors and creates a more accurate + * map suitable for navigation and localization. + * Laser log file names conventionally end in ".2d" and are sometimes referred + * to as ".2d files" or "2d files". + * + * The log file is a text file, and can be opened in any text editor. The + * format is as follows. First, general information about the scan appears: + * + * The file starts with the word "LaserOdometryLog", followed on each line by + * either a comment, or a tag and a space separated list of data values. + * The tag that starts a line of data is followed by a colon character + * (:). A comment line + * starts with a # character, and should be ignored. + * A program should also ignore any lines that start with tags not described here. + * + *
+ *  LaserOdometryLog
+ *  \#Created by ARIA's %ArLaserLogger
+ *  version: 3
+ *  useEncoderPose: 1|0
+ *  sick1pose: X Y Theta
+ *  sick1conf: LeftFOV RightFOV Samples 
+ *  locationTypes: robot robotGlobal robotRaw
+ *  
+ * + * If useEncoderPose: is followed by 1, then only the + * robot's encoder-based position was used when scanning. If 0, + * then other sources such as gyroscopic correction may have been used. + * + * sick1Pose: is followed by the position of the laser device in + * the horizontal plane, relative to the center of the robot. This provides an + * offset from laser readings' origin to robot position. X is the + * forward-back position (positive forward, negative backward), Y is the + * left-right position (positive right, negative left), Theta is the + * angle offset (counter-clockwise, usually it is 0). sick1conf: + * is followed by some operating parameters of the laser device itself. Left + * FOV and Right FOV indicate the total field of view or angle of + * sweep of the laser in degrees (typically they are equivalent in magnitude, since the + * field of view of the SICK LMS-200 is always centered). Samples is + * the number of samples taken per sweep within that field of view. The + * locationTypes line, if present, lists what kinds of robot position data will be + * available in the log. Zero or more of the possible types may be listed. + * (If locationTypes is not present, you may assume that + * robot is available, or just check for all types when parsing + * the file.) + * + * If you are generating a laser scan log file with software other than + * ArLaserLogger, then you may replace the message in the comment + * in the second line, for example: \#Created by my custom laser scan + * logger. This comment is for informational purposes only. + * + * It is also possible for other metadata to appear following this initial + * block, with different initial tags. You can ignore these. + * + * + * Then, as a scan is being recorded, the following lines are written + * when triggered by the robot having moved or turned by a certain amount: + * + *
+ *  scan1Id: N
+ *  time: t.tt
+ *  velocities: Vel RotVel LatVel
+ *  robot: X Y Theta
+ *  ...
+ *  scan1: readings...
+ *  
+ * + * Where t.tt is the time in seconds since the start of scanning when + * this block was added to the scan log; + * X, Y and Theta is the position of the robot and + * Vel and RotVel are the velocities when these laser + * readings were taken; + * readings... is a list of space separated + * point pairs, a pair for the last point detected by each reading in the last + * sweep of the laser. Each pair defines a point relative to the robot, + * where a reading detected an obstacle. (Note, In old versions of the log format, + * sick1 was used instead of scan1.) + * + * In addition to robot:, + * additional lines providing other measures of robot position may be present + * (these will be listed in the locationTypes: header.) + * robot: provides the encoder pose, robotGlobal: + * is a corrected global pose, + * + * If use of special SICK laser reflectors is enabled (rare), then the following line + * is written before the scan1: line: + * + *
+ *  reflector1: levels...
+ *  
+ * + * Where levels... is a reflectance value for each reading in the + * scan1: line to follow. + * + * + * If during the run, the 'g' key or the second joystick button is pressed, then the following + * lines are added: + * + *
+ *  time: t.tt
+ *  robot: X Y Theta Vel RotVel
+ *  cairn: GoalWithHeading "" ICON_GOALWITHHEADING "goalN"
+ *  
+ * + * + * Where the values after time:, \#rawRobot: and + * robot: are as above, + * and N is incremented with each goal (i.e. goal0, goal1, goal2, + * etc.). This goal will be added to the final map at the position of the + * robot to define a goal or other point of interest in the map. + * + */ + +/** + @note The @a laser must be + configured, connected and have read at least one set of data from + the laser already (the data received is used to calculate FOV information + saved in the .2d) + + @note A packet handler will be added for a packet with ID 0x96, but will + will not indicate the packet was handled. This will result in warnings + printed to the log unless another packet handler handles this packet. + ArServerHandlerMapping does this, but standalone use, such as in + sickLogger.cpp, does not. This is done so that multiple packet handlers + may receive 0x96. (This packet is used for an advanced feature of + mapping with some MobileRobots products but which isn't usually needed + for must robot maps.) + + @param robot The robot to attach to + + @param laser the laser to log readings from. + + @param distDiff the distance traveled at which to take a new reading + + @param degDiff the degrees turned at which to take a new reading + + @param fileName the file name in which to put the log + + @param addGoals whether to add goals automatically. if true + then ArLaserLogger adds a handler for the 'g' key to any ArKeyHandler + that has been previously created, and will also monitor the robot + joystick for the goal button pressed, and register a handler to + @a joyHandler if provided as well. + + @param joyHandler joystick interface to allow control from a computer +joystick, including placing goals with the second joystick button + @param baseDirectory directory to place the output file @a fileName in + @param useReflectorValues if true, include laser special-reflectance +information + @param robotJoyHandler if given, use this as the interface to the robot's own +joystick + @param extraLocationData if given, place this additional information in the +output log file + @param extraLasers if given, include data from these lasers in the laser log in addition +to the primary laser @a laser. +**/ +AREXPORT ArLaserLogger::ArLaserLogger( + ArRobot *robot, ArLaser *laser, + double distDiff, double degDiff, + const char *fileName, bool addGoals, ArJoyHandler *joyHandler, + const char *baseDirectory, bool useReflectorValues, + ArRobotJoyHandler *robotJoyHandler, + const std::map *, + ArStrCaseCmpOp> *extraLocationData, + std::list *extraLasers) : + mySectors(18), + myTaskCB(this, &ArLaserLogger::robotTask), + myGoalKeyCB(this, &ArLaserLogger::goalKeyCallback), + myLoopPacketHandlerCB(this, &ArLaserLogger::loopPacketHandler) +{ + ArKeyHandler *keyHandler; + + myOldReadings = false; + myNewReadings = true; + myUseReflectorValues = useReflectorValues; + myWrote = false; + myRobot = robot; + myLaser = laser; + if (baseDirectory != NULL && strlen(baseDirectory) > 0) + myBaseDirectory = baseDirectory; + else + myBaseDirectory = ""; + std::string realFileName; + if (fileName[0] == '/' || fileName[0] == '\\') + { + realFileName = fileName; + } + else + { + realFileName = myBaseDirectory; + realFileName += fileName; + } + myFileName = realFileName; + + if (myRobot->getEncoderCorrectionCallback() != NULL) + myIncludeRawEncoderPose = true; + else + myIncludeRawEncoderPose = false; + + if (extraLocationData != NULL) + myExtraLocationData = *extraLocationData; + + + + myFile = ArUtil::fopen(realFileName.c_str(), "w+"); + + if (laser->getLaserNumber() != 1 && + extraLasers != NULL && !extraLasers->empty()) + { + ArLog::log(ArLog::Terse, "ArLaserLogger cannot work because the primary laser has a number other than 1 and there are extra lasers"); + return; + } + + myLasers.push_back(laser); + std::list::iterator laserIt; + for (laserIt = extraLasers->begin(); + laserIt != extraLasers->end(); + laserIt++) + myLasers.push_back((*laserIt)); + + if (myFile != NULL) + { + //const ArRobotParams *params; + //params = robot->getRobotParams(); + fprintf(myFile, "LaserOdometryLog\n"); + fprintf(myFile, "#Created by ArLaserLogger\n"); + fprintf(myFile, "version: 4\n"); + + std::list::iterator laserIt; + for (laserIt = myLasers.begin(); laserIt != myLasers.end(); laserIt++) + { + if ((*laserIt) == myLaser) + internalPrintLaserPoseAndConf((*laserIt), 1); + else + internalPrintLaserPoseAndConf((*laserIt), + (*laserIt)->getLaserNumber()); + } + + std::string available; + available = "robot robotGlobal"; + if (myIncludeRawEncoderPose) + available += " robotRaw"; + + std::map *, ArStrCaseCmpOp>::iterator it; + for (it = myExtraLocationData.begin(); + it != myExtraLocationData.end(); + it++) + available += " " + (*it).first; + + fprintf(myFile, "locationTypes: %s\n", available.c_str()); + } + else + { + ArLog::log(ArLog::Terse, "ArLaserLogger cannot write to file %s", + myFileName.c_str()); + return; + } + + myDistDiff = distDiff; + myDegDiff = degDiff; + myFirstTaken = false; + myScanNumber = 0; + myLastVel = 0; + myStartTime.setToNow(); + myRobot->addUserTask("Sick Logger", 1, &myTaskCB); + + char uCFileName[21]; + snprintf(uCFileName, 18, "map %s", fileName); + uCFileName[18] = '\0'; + myRobot->comStr(94, uCFileName); + + myLoopPacketHandlerCB.setName("ArLaserLogger"); + myRobot->addPacketHandler(&myLoopPacketHandlerCB, ArListPos::FIRST); + + myAddGoals = addGoals; + myJoyHandler = joyHandler; + myRobotJoyHandler = robotJoyHandler; + myTakeReadingExplicit = false; + myAddGoalExplicit = false; + myAddGoalKeyboard = false; + myLastAddGoalKeyboard = false; + myLastJoyButton = false; + myLastRobotJoyButton = false; + myFirstGoalTaken = false; + myNumGoal = 1; + myLastLoops = 0; + // only add goals from the keyboard if there's already a keyboard handler + if (myAddGoals && (keyHandler = Aria::getKeyHandler()) != NULL) + { + // now that we have a key handler, add our keys as callbacks, print out big + // warning messages if they fail + if (!keyHandler->addKeyHandler('g', &myGoalKeyCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for g, sick logger goal handling will not work correctly."); + if (!keyHandler->addKeyHandler('G', &myGoalKeyCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for g, sick logger goal handling will not work correctly."); + } + +} + +AREXPORT ArLaserLogger::~ArLaserLogger() +{ + myRobot->remUserTask(&myTaskCB); + myRobot->remPacketHandler(&myLoopPacketHandlerCB); + myRobot->comStr(94, ""); + if (myFile != NULL) + { + fprintf(myFile, "# End of log\n"); + fclose(myFile); + } +} + +void ArLaserLogger::internalPrintLaserPoseAndConf(ArLaser *laser, int laserNumber) +{ + if (myFile == NULL) + return; + + + const std::list *readings; + + readings = laser->getRawReadings(); + + double firstAngle = 0; + double lastAngle = 0; + + if (!readings->empty()) + { + firstAngle = ArMath::subAngle(readings->front()->getSensorTh(), + laser->getSensorPositionTh()); + lastAngle = ArMath::subAngle(readings->back()->getSensorTh(), + laser->getSensorPositionTh()); + } + else + { + ArLog::log(ArLog::Normal, "ArLaserLogger: Apparently there are no readings for %s...", laser->getName()); + } + + // probably shouldn't have sick1pose and scan1pose, but it's a lot + // easier for now before the other lasers are really supported by + // the map processing software + fprintf(myFile, "sick%dpose: %.0f %.0f %.2f\n", + laserNumber, + laser->getSensorPositionX(), + laser->getSensorPositionY(), + laser->getSensorPositionTh()); + fprintf(myFile, "sick%dconf: %.2f %.2f %d\n", + laserNumber, + firstAngle, + lastAngle, + readings->size()); + fprintf(myFile, "sick%dname: %s\n", + laserNumber, + laser->getName()); + + fprintf(myFile, "scan%dpose: %.0f %.0f %.0f %.2f\n", + laserNumber, + laser->getSensorPositionX(), + laser->getSensorPositionY(), + laser->getSensorPositionZ(), + laser->getSensorPositionTh()); + fprintf(myFile, "scan%dconf: %.2f %.2f %d\n", + laserNumber, + firstAngle, + lastAngle, + readings->size()); + fprintf(myFile, "scan%dname: %s\n", + laserNumber, + laser->getName()); +} + +AREXPORT bool ArLaserLogger::loopPacketHandler(ArRobotPacket *packet) +{ + unsigned char loops; + if (packet->getID() != 0x96) + return false; + loops = packet->bufToUByte(); + unsigned char bit; + int num; + if (loops != myLastLoops) + { + for (bit = 1, num = 1; num <= 8; bit *= 2, num++) + { + if ((loops & bit) && !(myLastLoops & bit)) + { + addTagToLog("loop: start %d", num); + ArLog::log(ArLog::Normal, "Starting loop %d", num); + } + else if (!(loops & bit) && (myLastLoops & bit)) + { + addTagToLog("loop: stop %d", num); + ArLog::log(ArLog::Normal, "Stopping loop %d", num); + } + } + } + myLastLoops = loops; + // we return this as false so multiple sick loggers can snag the + // data... the ArServerHandlerMapping will return true for it so + // that it doesn't get logged + return false; +} + +/** + The robot MUST be locked before you call this function, so that + this function is not adding to a list as the robotTask is using it. + + This function takes the given tag and puts it into the log file + along with a tag as to where the robot was and when in the mapping + it was +**/ +AREXPORT void ArLaserLogger::addTagToLogPlain(const char *str) +{ + myTags.push_back(str); +} + +#ifndef SWIG +/** + The robot MUST be locked before you call this function, so that + this function is not adding to a list as the robotTask is using it. + + This function takes the given tag and puts it into the log file + along with a tag as to where the robot was and when in the mapping + it was + + @swigomit + @sa addTagToLogPlain() +**/ +AREXPORT void ArLaserLogger::addTagToLog(const char *str, ...) +{ + char buf[2048]; + va_list ptr; + va_start(ptr, str); + vsprintf(buf, str, ptr); + addTagToLogPlain(buf); + va_end(ptr); +} +#endif + + +/** + The robot MUST be locked before you call this function, so that + this function is not adding to a list as the robotTask is using it. + + This function takes the given tag and puts it into the log file by + itself +**/ + +AREXPORT void ArLaserLogger::addInfoToLogPlain(const char *str) +{ + myInfos.push_back(str); +} + +/** + The robot MUST be locked before you call this function, so that + this function is not adding to a list as the robotTask is using it. + + This function takes the given tag and puts it into the log file by + itself +**/ +AREXPORT void ArLaserLogger::addInfoToLog(const char *str, ...) +{ + char buf[2048]; + va_list ptr; + va_start(ptr, str); + vsprintf(buf, str, ptr); + addInfoToLogPlain(buf); + va_end(ptr); +} + +void ArLaserLogger::goalKeyCallback(void) +{ + myAddGoalKeyboard = true; +} + +void ArLaserLogger::internalAddGoal(void) +{ + bool joyButton; + bool robotJoyButton; + + // this check is for if we're not adding goals return... but if + // we're not adding goals and one was requested explicitly then add + // that one + if (!myAddGoals && !myAddGoalExplicit) + return; + + if (myJoyHandler != NULL) + joyButton = (myJoyHandler->getButton(2) || + myJoyHandler->getButton(3) || + myJoyHandler->getButton(4)); + else + joyButton = (myRobot->getFlags() & ArUtil::BIT9); + + if (myRobotJoyHandler != NULL) + robotJoyButton = myRobotJoyHandler->getButton2(); + else + robotJoyButton = false; + + // see if we want to add a goal... note that if the button is pushed + // it must have been unpushed at one point to cause the goal to + // trigger + if (myRobot->isConnected() && + (myAddGoalExplicit || + (myAddGoalKeyboard && !myLastAddGoalKeyboard) || + (joyButton && !myLastJoyButton) || + (robotJoyButton && !myLastRobotJoyButton))) + { + myFirstGoalTaken = true; + myAddGoalExplicit = false; + myLastGoalTakenTime.setToNow(); + myLastGoalTakenPose = myRobot->getEncoderPose(); + // call addTagToLog not do it directly so we get additional info + // needed + addTagToLog("cairn: GoalWithHeading \"\" ICON_GOALWITHHEADING \"goal%d\"", myNumGoal); + ArLog::log(ArLog::Normal, "Goal %d taken", myNumGoal); + myNumGoal++; + } + myLastAddGoalKeyboard = myAddGoalKeyboard; + myLastJoyButton = joyButton; + myLastRobotJoyButton = robotJoyButton; + + // reset this here for if they held the key down a little, so it + // gets reset and doesn't hit multiple goals + myAddGoalKeyboard = false; +} + +void ArLaserLogger::internalWriteTags(void) +{ + time_t msec; + + // now put the tags into the file + while (myInfos.size() > 0) + { + if (myFile != NULL) + { + myWrote = true; + fprintf(myFile, "%s\n", (*myInfos.begin()).c_str()); + } + myInfos.pop_front(); + } + + + // now put the tags into the file + while (myTags.size() > 0) + { + if (myFile != NULL) + { + myWrote = true; + msec = myStartTime.mSecSince(); + fprintf(myFile, "time: %ld.%03ld\n", msec / 1000, msec % 1000); + internalPrintPos(myRobot->getEncoderPose(), myRobot->getPose(), + myStartTime); + fprintf(myFile, "%s\n", (*myTags.begin()).c_str()); + } + myTags.pop_front(); + } +} + +void ArLaserLogger::internalTakeReading(void) +{ + time_t msec; + + // we take readings in any of the following cases if we haven't + // taken one yet or if we've been explicitly told to take one or if + // we've gone further than myDistDiff if we've turned more than + // myDegDiff if we've switched sign on velocity and gone more than + // 50 mm (so it doesn't oscilate and cause us to trigger) + + if (myRobot->isConnected() && + (!myFirstTaken || myTakeReadingExplicit || + myLast.findDistanceTo(myRobot->getEncoderPose()) > myDistDiff || + fabs(ArMath::subAngle(myLast.getTh(), + myRobot->getEncoderPose().getTh())) > myDegDiff || + (((myLastVel < 0 && myRobot->getVel() > 0) || + (myLastVel > 0 && myRobot->getVel() < 0)) && + myLast.findDistanceTo(myRobot->getEncoderPose()) > 50))) + { + myWrote = true; + myTakeReadingExplicit = false; + myFirstTaken = true; + myLast = myRobot->getEncoderPose(); + msec = myStartTime.mSecSince(); + fprintf(myFile, "logTime: %ld.%03ld\n", msec / 1000, msec % 1000); + fprintf(myFile, "velocities: %.2f %.2f %.2f\n", + myRobot->getVel(), myRobot->getRotVel(), myRobot->getLatVel()); + + std::list::iterator laserIt; + std::multimap lasersToLog; + std::multimap::reverse_iterator lasersToLogIt; + ArLaser * laser; + + for (laserIt = myLasers.begin(); laserIt != myLasers.end(); laserIt++) + { + laser = (*laserIt); + laser->lockDevice(); + if (laser->getRawReadings() != NULL && + !laser->getRawReadings()->empty()) + lasersToLog.insert( + std::pair( + laser->getRawReadings()->front()->getTimeTaken(), + laser)); + } + + // have to go in reverse for the times to be increasing + for (lasersToLogIt = lasersToLog.rbegin(); + lasersToLogIt != lasersToLog.rend(); + lasersToLogIt++) + { + laser = (*lasersToLogIt).second; + if (laser == myLaser) + internalTakeLaserReading(laser, 1); + else + internalTakeLaserReading(laser, laser->getLaserNumber()); + } + + for (laserIt = myLasers.begin(); laserIt != myLasers.end(); laserIt++) + { + laser = (*laserIt); + laser->unlockDevice(); + } + + } +} + +void ArLaserLogger::internalTakeLaserReading(ArLaser *laser, int laserNumber) +{ + const std::list *readings; + std::list::const_iterator it; + std::list::const_reverse_iterator rit; + ArPose encoderPoseTaken; + ArPose globalPoseTaken; + ArTime timeTaken; + ArSensorReading *reading; + bool usingAdjustedReadings; + + //laser->lockDevice(); + /// use the adjusted raw readings if we can, otherwise just use + /// the raw readings like before + if ((readings = laser->getAdjustedRawReadings()) != NULL) + { + usingAdjustedReadings = true; + } + else + { + usingAdjustedReadings = false; + readings = laser->getRawReadings(); + } + if (readings == NULL || (it = readings->begin()) == readings->end() || + myFile == NULL) + { + //laser->unlockDevice(); + return; + } + if (usingAdjustedReadings) + ArLog::log(ArLog::Normal, + "Taking adjusted readings from the %d laser values", + readings->size()); + else + ArLog::log(ArLog::Normal, + "Taking readings from the %d laser values", + readings->size()); + encoderPoseTaken = (*readings->begin())->getEncoderPoseTaken(); + globalPoseTaken = (*readings->begin())->getPoseTaken(); + timeTaken = (*readings->begin())->getTimeTaken(); + myLastVel = myRobot->getVel(); + fprintf(myFile, "scanId: %d\n", myScanNumber); + myScanNumber++; + internalPrintPos(encoderPoseTaken, globalPoseTaken, timeTaken); + + if (myUseReflectorValues) + { + fprintf(myFile, "reflector%d: ", laserNumber); + + // make sure that the list is in increasing order + for (it = readings->begin(); it != readings->end(); it++) + { + reading = (*it); + if (!reading->getIgnoreThisReading()) + fprintf(myFile, "%d ", reading->getExtraInt()); + else + fprintf(myFile, "0 "); + } + fprintf(myFile, "\n"); + } + + /** + Note that the the sick1: or scan1: must be the last thing in + that timestamp, ie that you should put any other data before + it. + **/ + if (myOldReadings && laserNumber == 1) + { + fprintf(myFile, "sick1: "); + + // 8/21/11 MPL it was this + //if (!myFlipped) //myLaser->isLaserFlipped()) + // but I don't know why, and this should work or the underlying + // reason should be fix + if (!laser->getFlipped()) + { + // make sure that the list is in increasing order + for (it = readings->begin(); it != readings->end(); it++) + { + reading = (*it); + fprintf(myFile, "%d ", reading->getRange()); + } + } + else + { + for (rit = readings->rbegin(); rit != readings->rend(); rit++) + { + reading = (*rit); + fprintf(myFile, "%d ", reading->getRange()); + } + } + fprintf(myFile, "\n"); + } + + if (myNewReadings || laserNumber != 1) + { + fprintf(myFile, "scan%d: ", laserNumber); + + ArTransform sensorTransform; + sensorTransform.setTransform(laser->getSensorPosition(), + ArPose(0, 0, 0)); + ArPose pose; + + for (it = readings->begin(); it != readings->end(); it++) + { + reading = (*it); + if (!reading->getIgnoreThisReading()) + { + pose = sensorTransform.doTransform(reading->getLocalPose()); + fprintf(myFile, "%.0f %.0f ", pose.getX(), pose.getY()); + } + else + fprintf(myFile, "0 0 "); + } + fprintf(myFile, "\n"); + } + +} + +void ArLaserLogger::internalPrintPos(ArPose encoderPoseTaken, + ArPose globalPoseTaken, ArTime timeTaken) +{ + if (myFile == NULL) + return; + + /* + long long msec = myStartTime.mSecSinceLL(timeTaken); + if (msec > 0) + fprintf(myFile, "time: %lld.%03lld\n", msec / 1000, msec % 1000); + else + fprintf(myFile, "time: 0.0\n"); + */ + + fprintf(myFile, "robot: %.0f %.0f %.2f\n", + encoderPoseTaken.getX(), + encoderPoseTaken.getY(), + encoderPoseTaken.getTh()); + + fprintf(myFile, "robotGlobal: %.0f %.0f %.2f\n", + globalPoseTaken.getX(), + globalPoseTaken.getY(), + globalPoseTaken.getTh()); + + if (myIncludeRawEncoderPose) + { + ArPose encoderPose = myRobot->getEncoderPose(); + ArPose rawEncoderPose = myRobot->getRawEncoderPose(); + ArTransform normalToRaw(rawEncoderPose, encoderPose); + + ArPose rawPose; + rawPose = normalToRaw.doInvTransform(encoderPoseTaken); + fprintf(myFile, "robotRaw: %.0f %.0f %.2f\n", + rawPose.getX(), + rawPose.getY(), + rawPose.getTh()); + } + + std::map *, + ArStrCaseCmpOp>::iterator it; + for (it = myExtraLocationData.begin(); it != myExtraLocationData.end(); it++) + { + ArPose pose; + int ret; + ArPoseWithTime mostRecent; + if ((ret = (*it).second->invokeR(timeTaken, &pose, &mostRecent)) >= 0) + { + fprintf(myFile, "%s: %.0f %.0f %.2f\n", + (*it).first.c_str(), + pose.getX(), + pose.getY(), + pose.getTh()); + } + else + { + ArLog::log(ArLog::Verbose, "Could not use %s it returned %d", + (*it).first.c_str(), ret); + fprintf(myFile, "%s: \n", + (*it).first.c_str()); + } + } +} + +AREXPORT void ArLaserLogger::robotTask(void) +{ + + // call our function to check goals + internalAddGoal(); + + // call our function to dump tags + internalWriteTags(); + + // call our function to take a reading + internalTakeReading(); + + // now make sure the files all out to disk + /* actually don't do this, since this can cause things to take long enough to mess up timing + if (myWrote) + { + fflush(myFile); +#ifndef WIN32 + fsync(fileno(myFile)); +#endif + } + */ + myWrote = false; +} + diff --git a/Legacy/Aria/src/ArLaserReflectorDevice.cpp b/Legacy/Aria/src/ArLaserReflectorDevice.cpp new file mode 100644 index 0000000..de03f43 --- /dev/null +++ b/Legacy/Aria/src/ArLaserReflectorDevice.cpp @@ -0,0 +1,119 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSick.h" +#include "ArLaserReflectorDevice.h" +#include "ArRobot.h" + +AREXPORT ArLaserReflectorDevice::ArLaserReflectorDevice(ArRangeDevice *laser, + ArRobot *robot, + const char *name) : + /* + ArRangeDevice(laser->getCurrentRangeBuffer()->getSize(), + laser->getCumulativeRangeBuffer()->getSize(), name, + laser->getMaxRange()), */ + // MPL 12/11/12 this is how it was... but the part I'm putting in was above commented out, so this may go wrong + //ArRangeDevice(361, 361, name, 32000), + ArRangeDevice(laser->getCurrentRangeBuffer()->getSize(), + laser->getCumulativeRangeBuffer()->getSize(), name, + laser->getMaxRange()), + myProcessCB(this, &ArLaserReflectorDevice::processReadings) +{ + myLaser = laser; + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask(myName.c_str(), 10, &myProcessCB); + setCurrentDrawingData(new ArDrawingData("polyDots", + ArColor(0xb0, 0xb0, 0xff), + 60, // mm length of arrow + 77, // above the normal laser + 200, // default refresh + "DefaultOff"), // defaults to off but can be turned on + true); + myReflectanceThreshold = 31; +} + +AREXPORT ArLaserReflectorDevice::~ArLaserReflectorDevice() +{ + if (myRobot != NULL) + myRobot->remSensorInterpTask(&myProcessCB); +} + +AREXPORT void ArLaserReflectorDevice::setRobot(ArRobot *robot) +{ + // specifically do nothing since this is just here for debugging +} + +AREXPORT void ArLaserReflectorDevice::addToConfig(ArConfig *config, + const char *section) +{ + + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section, + "Settings for using the reflector readings from this laser"); + + config->addParam( + ArConfigArg("ReflectanceThreshold", &myReflectanceThreshold, + "The threshold to start showing reflector readings at (normalized from 0 to 255, 31 is the default)", + 0, 255), + section, ArPriority::DETAILED); + +} + +AREXPORT void ArLaserReflectorDevice::processReadings(void) +{ + //int i; + ArSensorReading *reading; + myLaser->lockDevice(); + lockDevice(); + + const std::list *rawReadings; + std::list::const_iterator rawIt; + rawReadings = myLaser->getRawReadings(); + myCurrentBuffer.beginRedoBuffer(); + + if (myReflectanceThreshold < 0 || myReflectanceThreshold > 255) + myReflectanceThreshold = 0; + + if (rawReadings->begin() != rawReadings->end()) + { + for (rawIt = rawReadings->begin(); rawIt != rawReadings->end(); rawIt++) + { + reading = (*rawIt); + if (!reading->getIgnoreThisReading() && + reading->getExtraInt() > myReflectanceThreshold) + myCurrentBuffer.redoReading(reading->getPose().getX(), + reading->getPose().getY()); + } + } + + myCurrentBuffer.endRedoBuffer(); + + unlockDevice(); + myLaser->unlockDevice(); +} + diff --git a/Legacy/Aria/src/ArLineFinder.cpp b/Legacy/Aria/src/ArLineFinder.cpp new file mode 100644 index 0000000..9586f64 --- /dev/null +++ b/Legacy/Aria/src/ArLineFinder.cpp @@ -0,0 +1,730 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" + +#include "ariaOSDef.h" +#include "ArLineFinder.h" +#include "ArConfig.h" + +AREXPORT ArLineFinder::ArLineFinder(ArRangeDevice *rangeDevice) +{ + myRangeDevice = rangeDevice; + myPrinting = false; + myPoints = NULL; + myLines = NULL; + myNonLinePoints = NULL; + myFlippedFound = false; + + mySinMultiplier = (ArMath::sin(1) / ArMath::sin(5)); + + setLineCreationParams(); + setLineCombiningParams(); + setLineFilteringParams(); + setLineValidParams(); + setMaxDistBetweenPoints(); +} + +AREXPORT ArLineFinder::~ArLineFinder() +{ + +} + +AREXPORT std::map *ArLineFinder::getLines(void) +{ + // fill the laser readings into myPoints + fillPointsFromLaser(); + // make lines out of myPoints into myLines + findLines(); + // put the lines from myLines into combined lines + // this will recurse itself until there are no more + combineLines(); + // now filter out the short lines + filterLines(); + // combines the lines again + combineLines(); + return myLines; +} + +AREXPORT std::map *ArLineFinder::getNonLinePoints(void) +{ + std::map::iterator lineIt; + ArLineFinderSegment *segment; + int i; + + getLines(); + + if (myLines == NULL) + return NULL; + + if (myNonLinePoints != NULL) + delete myNonLinePoints; + + myNonLinePoints = new std::map; + + *myNonLinePoints = *myPoints; + + for (lineIt = myLines->begin(); lineIt != myLines->end(); lineIt++) + { + segment = (*lineIt).second; + for (i = segment->getStartPoint(); i <= segment->getEndPoint(); i++) + { + myNonLinePoints->erase(i); + } + } + return myNonLinePoints; +} + + +AREXPORT void ArLineFinder::fillPointsFromLaser(void) +{ + const std::list *readings; + std::list::const_iterator it; + std::list::const_reverse_iterator rit; + ArSensorReading *reading; + int pointCount = 0; + + if (myPoints != NULL) + delete myPoints; + + myPoints = new std::map; + + myRangeDevice->lockDevice(); + readings = myRangeDevice->getRawReadings(); + + if (!myFlippedFound) + { + if (readings->begin() != readings->end()) + { + int size; + size = readings->size(); + it = readings->begin(); + // advance along 10 readings + for (int i = 0; i < 10 && i < size / 2; i++) + it++; + // see if we're flipped + if (ArMath::subAngle((*(readings->begin()))->getSensorTh(), + (*it)->getSensorTh()) > 0) + myFlipped = true; + else + myFlipped = false; + myFlippedFound = true; + //printf("@@@ LINE %d %.0f\n", myFlipped, ArMath::subAngle((*(readings->begin()))->getSensorTh(), (*it)->getSensorTh())); + + + } + } + + + + + if (readings->begin() == readings->end()) + { + myRangeDevice->unlockDevice(); + return; + } + myPoseTaken = (*readings->begin())->getPoseTaken(); + + if (myFlipped) + { + for (rit = readings->rbegin(); rit != readings->rend(); rit++) + { + reading = (*rit); + if (reading->getRange() > 5000 || reading->getIgnoreThisReading()) + continue; + (*myPoints)[pointCount] = reading->getPose(); + pointCount++; + } + } + else + { + for (it = readings->begin(); it != readings->end(); it++) + { + reading = (*it); + if (reading->getRange() > 5000 || reading->getIgnoreThisReading()) + continue; + (*myPoints)[pointCount] = reading->getPose(); + pointCount++; + } + } + myRangeDevice->unlockDevice(); +} + +AREXPORT void ArLineFinder::findLines(void) +{ + int start = 0; + int pointsLen = myPoints->size(); + int end; + + if (myLines != NULL) + { + ArUtil::deleteSetPairs(myLines->begin(), myLines->end()); + delete myLines; + myLines = NULL; + } + myLines = new std::map; + int numLines = 0; + + FILE *lineFile = NULL; + /* + if ((lineFile = ArUtil::fopen("firstLines", "w+")) == NULL) + { + printf("Couldn't open 'lines' for writing\n"); + return; + } + */ + ArLineFinderSegment *newLine; + double totalDistFromLine = 0; + double dist; + int i; + bool maxDistTriggered; + + while (1) + { + maxDistTriggered = false; + // first we try to find the first place we'll check for lines + // move out from the start as far as we should for the first one + for (end = start; ; end++) + { + // if we hit the end stop + if (end >= pointsLen) + break; + // if we've moved at least two spots AND at least 50 mm then go + if (end - start >= myMakingMinPoints && + (*myPoints)[start].findDistanceTo((*myPoints)[end]) > myMakingMinLen) + break; + // if the distance between any of the points is too great than + // break (to try and get rid of spots where a laser spot half + // way between things hurts us) + if (myMaxDistBetweenPoints > 0 && end > start && + ((*myPoints)[end-1].findDistanceTo((*myPoints)[end]) > + myMaxDistBetweenPoints)) + { + maxDistTriggered = true; + break; + } + } + if (end < pointsLen) + { + // if the distance between any of the points is too great don't + // make a line out of it (to try and get rid of spots where a + // laser spot half way between things hurts us) + if (maxDistTriggered) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "too great a distance between some points on the line %d %d", start, end); + } + // see if its too far between these line segments + else if ((*myPoints)[start].findDistanceTo((*myPoints)[end]) < + ((*myPoints)[start].findDistanceTo(myPoseTaken) * mySinMultiplier)) + { + if (lineFile != NULL) + fprintf(lineFile, "%.0f %.0f %.0f %.0f\n", + (*myPoints)[start].getX(), (*myPoints)[start].getY(), + (*myPoints)[end].getX() - (*myPoints)[start].getX(), + (*myPoints)[end].getY() - (*myPoints)[start].getY()); + + newLine = new ArLineFinderSegment( + (*myPoints)[start].getX(), + (*myPoints)[start].getY(), + (*myPoints)[end].getX(), + (*myPoints)[end].getY(), + 1, start, end); + + totalDistFromLine = 0; + // Make sure none of the points are too far away from the new line + for (i = newLine->getStartPoint(); i <= newLine->getEndPoint(); i++) + { + dist = newLine->getDistToLine((*myPoints)[i]); + totalDistFromLine += dist; + } + newLine->setAveDistFromLine(totalDistFromLine / (end - start)); + + (*myLines)[numLines] = newLine; + numLines++; + } + else + { + if (myPrinting) + ArLog::log(ArLog::Normal, "too great a distance between the two line points %d %d", start, end); + } + } + + start += 1; + if (start >= pointsLen) + break; + } + + if (lineFile != NULL) + fclose(lineFile); +} + +AREXPORT bool ArLineFinder::combineLines(void) +{ + int start = 0; + int len = myLines->size(); + // this is the min line distance + std::map *newLines; + int numNewLines = 0; + int numNewMerges = 0; + ArLineFinderSegment *newLine; + + newLines = new std::map; + + if (myPrinting) + ArLog::log(ArLog::Normal, "new iteration\n"); + + bool nextMerged = false; + for (start = 0; start < len; start++) + { + if (nextMerged) + { + nextMerged = false; + continue; + } + + if (start + 1 == len) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "inserted last one %g", + ArPose((*myLines)[start]->getX1(), + (*myLines)[start]->getY1()).findDistanceTo( + ArPose((*myLines)[start]->getX2(), (*myLines)[start]->getY2()))); + (*newLines)[numNewLines] = new ArLineFinderSegment(*((*myLines)[start])); + numNewLines++; + continue; + } + + newLine = averageSegments((*myLines)[start], (*myLines)[start+1]); + if (newLine != NULL) + { + + if (myPrinting) + ArLog::log(ArLog::Normal, "merged %g %g to %g", + (*myLines)[start]->getLength(), + (*myLines)[start+1]->getLength(), + newLine->getLength()); + (*newLines)[numNewLines] = newLine; + numNewLines++; + numNewMerges++; + nextMerged = true; + } + else + { + if (myPrinting) + ArLog::log(ArLog::Normal, "inserted anyways %g", + (*myLines)[start]->getLength()); + (*newLines)[numNewLines] = new ArLineFinderSegment(*((*myLines)[start])); + numNewLines++; + } + + } + + // move the new lines over and delete the old ones + if (myLines != NULL && myLines->begin() != myLines->end()) + { + ArUtil::deleteSetPairs(myLines->begin(), myLines->end()); + delete myLines; + myLines = NULL; + } + else if (myLines != NULL) + { + delete myLines; + myLines = NULL; + } + myLines = newLines; + // if we didn't merge any just return + if (numNewMerges == 0) + return true; + + // otherwise do it again + return combineLines(); +} + +AREXPORT ArLineFinderSegment *ArLineFinder::averageSegments( + ArLineFinderSegment *line1, + ArLineFinderSegment *line2) +{ + + // the angles can be myCombiningAngleTol diff but if its more than myCombiningAngleTol / 2 + // then the resulting line angle should be between the other two + if (myPrinting) + ArLog::log(ArLog::Normal, + "%3.0f %5.0f %3.0f %3.0f (%5.0f %5.0f) <%d %d> (%5.0f %5.0f) <%d %d>", + ArMath::subAngle(line1->getLineAngle(), + line2->getLineAngle()), + line1->getEndPoint2().findDistanceTo(line2->getEndPoint1()), + line1->getLineAngle(), line2->getLineAngle(), + line1->getX2(), line1->getY2(), + line1->getStartPoint(), line1->getEndPoint(), + line2->getX1(), line2->getY1(), + line2->getStartPoint(), line2->getEndPoint()); + + if (myMaxDistBetweenPoints > 0 && + (line1->getEndPoint2().findDistanceTo(line2->getEndPoint1()) > + myMaxDistBetweenPoints)) + { + if (myPrinting) + ArLog::log(ArLog::Normal, + "distance between the two line end points greater than maxDistBetweenPoints"); + return NULL; + } + + // see if its too far between these line segments + if (line1->getEndPoint2().findDistanceTo(line2->getEndPoint1()) > + line1->getEndPoint2().findDistanceTo(myPoseTaken) * mySinMultiplier) + { + if (myPrinting) + ArLog::log(ArLog::Normal, + "too great a distance between the two line points"); + return NULL; + } + // make sure they're pointing in the same direction at least + double angleOff; + if ((angleOff = ArMath::fabs( + ArMath::subAngle(line1->getLineAngle(), + line2->getLineAngle()))) > myCombiningAngleTol) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "greater than angle tolerance"); + return NULL; + } + + ArPose endPose2(line2->getX2(), line2->getY2()); + ArPose intersection1; + ArLine line1Line(*(line1->getLine())); + ArLine perpLine1; + + // make sure that the lines are close to each other + line1Line.makeLinePerp(&endPose2, &perpLine1); + if (!line1Line.intersects(&perpLine1, &intersection1) || + intersection1.findDistanceTo(endPose2) > myCombiningLinesCloseEnough) + { + //printf("e1 %d %.0f\n", line1Line.intersects(&perpLine1, &intersection1), intersection1.findDistanceTo(endPose2)); + + if (myPrinting) + ArLog::log(ArLog::Normal, "endPose2 too far from line1"); + return NULL; + } + + ArPose endPose1(line1->getX1(), line1->getY1()); + ArPose intersection2; + ArLine line2Line(*(line2->getLine())); + ArLine perpLine2; + + + // make sure that the lines are close to each other + line2Line.makeLinePerp(&endPose1, &perpLine2); + if (!line2Line.intersects(&perpLine2, &intersection2) || + intersection2.findDistanceTo(endPose1) > myCombiningLinesCloseEnough) + { + //printf("e2 %d %.0f\n", line2Line.intersects(&perpLine2, &intersection2), intersection2.findDistanceTo(endPose1)); + if (myPrinting) + ArLog::log(ArLog::Normal, "endPose1 too far from line2"); + return NULL; + } + + + + ArLineFinderSegment *newLine; + /* + newLine = new ArLineFinderSegment((endPose1.getX() + intersection2.getX()) / 2, + (endPose1.getY() + intersection2.getY()) / 2, + (endPose2.getX() + intersection1.getX()) / 2, + (endPose2.getY() + intersection1.getY()) / 2, + line1->getCounter() + line2->getCounter()); + */ + // make the new line so that it averages the position based on how + // many points are in each line + int l1C = line1->getNumPoints(); + int l2C = line2->getNumPoints(); + newLine = new ArLineFinderSegment((endPose1.getX() * l1C + + intersection2.getX() * l2C) / (l1C + l2C), + (endPose1.getY() * l1C + + intersection2.getY() * l2C) / (l1C + l2C), + (endPose2.getX() * l2C + + intersection1.getX() * l1C) / (l1C + l2C), + (endPose2.getY() * l2C + + intersection1.getY() * l1C) / (l1C + l2C), + (line1->getNumPoints() + + line2->getNumPoints()), + line1->getStartPoint(), + line2->getEndPoint()); + + //printf("%d %d\n", newLine->getStartPoint(), newLine->getEndPoint()); + double totalDistFromLine = 0; + double dist; + int i; + // Make sure none of the points are too far away from the new line + for (i = newLine->getStartPoint(); i <= newLine->getEndPoint(); i++) + { + if ((dist = newLine->getDistToLine((*myPoints)[i])) > + myValidMaxDistFromLine && + i != newLine->getStartPoint() && + i != newLine->getEndPoint()) + { + if (myPrinting) + ArLog::log(ArLog::Normal, + "Had a point %d that was to far from our line at %.0f (max %d)", + i, dist, myValidMaxDistFromLine); + + delete newLine; + return NULL; + } + //printf("d %.0f\n", dist); + totalDistFromLine += dist; + } + newLine->setAveDistFromLine(totalDistFromLine / (newLine->getEndPoint() - newLine->getStartPoint())); + + //printf("ave dist %.3f\n", newLine->getAveDistFromLine()); + if (newLine->getAveDistFromLine() > myValidMaxAveFromLine) + { + if (myPrinting) + ArLog::log(ArLog::Normal, + "Ave dist from line was too great at %.0f (max %d)", + newLine->getAveDistFromLine(), myValidMaxDistFromLine); + + delete newLine; + return NULL; + } + if (newLine->getAveDistFromLine() > (line1->getAveDistFromLine() + + line2->getAveDistFromLine()) * 1.25) + { + if (myPrinting) + ArLog::log(ArLog::Normal, + "Ave dist from line greater than component lines at %.0f (component lines %.0f %.0f)", + newLine->getAveDistFromLine(), + line1->getAveDistFromLine(), + line2->getAveDistFromLine()); + + delete newLine; + return NULL; + + } + // if we're in myCombiningAngleTol / 2 then its close enough + if (angleOff < myCombiningAngleTol / 2) + return newLine; + + // if the new angle is in between the two lines and within myCombiningAngleTol we're ok + if ((ArMath::subAngle(newLine->getLineAngle(), line2->getLineAngle()) > 0 && + ArMath::subAngle(line1->getLineAngle(), newLine->getLineAngle()) > 0) || + (ArMath::subAngle(newLine->getLineAngle(), line1->getLineAngle()) > 0 && + ArMath::subAngle(line2->getLineAngle(), newLine->getLineAngle()) > 0)) + return newLine; + + //printf("%g\n", newLine->getLineAngle()); + if (myPrinting) + ArLog::log(ArLog::Normal, "angles wonky"); + // if we got down here hte line didn't work + delete newLine; + return NULL; +} + +AREXPORT void ArLineFinder::filterLines(void) +{ + int start = 0; + int len = myLines->size(); + + // this is the min line distance + std::map *newLines; + int numNewLines = 0; + + newLines = new std::map; + + if (myPrinting) + ArLog::log(ArLog::Normal, "filtering lines\n"); + + for (start = 0; start < len; start++) + { + if ((*myLines)[start]->getNumPoints() >= myFilteringMinPointsInLine && + (*myLines)[start]->getEndPoint1().findDistanceTo( + (*myLines)[start]->getEndPoint2()) > myFilteringMinLineLength) + { + if (myPrinting) + ArLog::log(ArLog::Normal, "kept %g (%d points)", + (*myLines)[start]->getLength(), + (*myLines)[start]->getNumPoints()); + (*newLines)[numNewLines] = new ArLineFinderSegment(*((*myLines)[start])); + numNewLines++; + } + else + { + if (myPrinting) + ArLog::log(ArLog::Normal, "Clipped %g (%d points)", + (*myLines)[start]->getLength(), + (*myLines)[start]->getNumPoints()); + } + + } + + // move the new lines over and delete the old ones + if (myLines != NULL && myLines->begin() != myLines->end()) + { + ArUtil::deleteSetPairs(myLines->begin(), myLines->end()); + delete myLines; + myLines = NULL; + } + else if (myLines != NULL) + { + delete myLines; + myLines = NULL; + } + myLines = newLines; + +} + + + +/** + Saves the points in the "points" with all the points file in the + current directory and saves the "lines" file with the final lines + in the current directory. +**/ +AREXPORT void ArLineFinder::saveLast(void) +{ + int len = myPoints->size(); + int i; + + FILE *points; + if ((points = ArUtil::fopen("points", "w+")) == NULL) + { + ArLog::log(ArLog::Terse, "ArLineFinder::log: Could not open 'points' file for output"); + return; + } + for (i = 0; i < len; i++) + { + fprintf(points, "%.0f %.0f\n", + (*myPoints)[i].getX(), (*myPoints)[i].getY()); + } + fclose(points); + + + len = myLines->size(); + + FILE *lines; + if ((lines = ArUtil::fopen("lines", "w+")) == NULL) + { + ArLog::log(ArLog::Terse, "ArLineFinder::log: Could not open 'lines' file for output"); + return; + } + for (i = 0; i < len; i++) + { + fprintf(lines, "%.0f %.0f %.0f %.0f\n", + (*myLines)[i]->getX1(), (*myLines)[i]->getY1(), + (*myLines)[i]->getX2() - (*myLines)[i]->getX1(), + (*myLines)[i]->getY2() - (*myLines)[i]->getY1()); + } + fclose(lines); + + ArLog::log(ArLog::Normal, "Saved points and lines"); +} + +AREXPORT void ArLineFinder::getLinesAndSaveThem(void) +{ + getLines(); + saveLast(); +} + +AREXPORT void ArLineFinder::addToConfig(ArConfig *config, + const char *section) +{ + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("CreatingMinLineLength", &myMakingMinLen, + "The minimum possible line length for creating lines", 0), + section, ArPriority::TRIVIAL); + config->addParam( + ArConfigArg("CreatingMinLinePoints", &myMakingMinPoints, + "The minimum number of points in a line for creating lines", 0), + section, ArPriority::TRIVIAL); + + config->addParam( + ArConfigArg("CreatingMaxDistBetweenPoints", + &myMaxDistBetweenPoints, + "The max dist between points for creating lines", + 0), + section, ArPriority::TRIVIAL); + + + config->addParam( + ArConfigArg("CombiningAngleTol", &myCombiningAngleTol, + "The angle tolerance when combining lines", 0), + section, ArPriority::TRIVIAL); + + config->addParam( + ArConfigArg("CombiningCloseEnough", &myCombiningLinesCloseEnough, + "How far apart lines can be when combining lines", 0), + section, ArPriority::TRIVIAL); + + config->addParam( + ArConfigArg("FilteringMinPointsInLine", &myFilteringMinPointsInLine, + "How many points need to be in a line when filtering", + 0), + section, ArPriority::TRIVIAL); + + config->addParam( + ArConfigArg("FilteringMinLineLength", &myFilteringMinLineLength, + "How many points are needed in a line when filtering", + 0), + section, ArPriority::TRIVIAL); + + config->addParam( + ArConfigArg("ValidMaxDistFromLine", &myValidMaxDistFromLine, + "For the validation phase, the max dist from line", + 0), + section, ArPriority::TRIVIAL); + + config->addParam( + ArConfigArg("ValidMaxAveDistFromLine", &myValidMaxAveFromLine, + "For the validation phase, the max ave dist from line", + 0), + section, ArPriority::TRIVIAL); + +} + +AREXPORT std::set ArLineFinder::getLinesAsSet() +{ + std::map *lines = getLines(); + std::set lineSegPtrs; + for(std::map::const_iterator i = lines->begin(); i != lines->end(); ++i) + { + lineSegPtrs.insert( (*i).second ); + } + return lineSegPtrs; +} + +AREXPORT std::set ArLineFinder::getNonLinePointsAsSet() +{ + std::map *pointsPtr = getNonLinePoints(); + std::set points; + for(std::map::const_iterator i = pointsPtr->begin(); i != pointsPtr->end(); ++i) + { + points.insert( (*i).second ); + } + return points; +} + diff --git a/Legacy/Aria/src/ArLog.cpp b/Legacy/Aria/src/ArLog.cpp new file mode 100644 index 0000000..3f3222d --- /dev/null +++ b/Legacy/Aria/src/ArLog.cpp @@ -0,0 +1,863 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLog.h" +#include "ArConfig.h" +#include +#include +#include +#include "ariaInternal.h" + + +#ifdef WIN32 +#include +#else +#include +#include +#include +#endif + +#if defined(_ATL_VER) || defined(ARIA_MSVC_ATL_VER) +#include +#define HAVEATL 1 +#endif // ifdef _ATL_VER + +ArMutex ArLog::ourMutex; +ArLog::LogType ArLog::ourType=StdOut; +ArLog::LogLevel ArLog::ourLevel=ArLog::Normal; +FILE * ArLog::ourFP=0; +int ArLog::ourCharsLogged = 0; +std::string ArLog::ourFileName; +int ArLog::ourColbertStream = -1; +bool ArLog::ourLoggingTime = false; +bool ArLog::ourAlsoPrint = false; +AREXPORT void (* ArLog::colbertPrint)(int i, const char *str); + +ArLog::LogType ArLog::ourConfigLogType = ArLog::StdOut; +ArLog::LogLevel ArLog::ourConfigLogLevel = ArLog::Normal; +char ArLog::ourConfigFileName[1024] = "log.txt"; +bool ArLog::ourConfigLogTime = false; +bool ArLog::ourConfigAlsoPrint = false; +ArGlobalRetFunctor ArLog::ourConfigProcessFileCB(&ArLog::processFile); + +#ifndef ARINTERFACE +char ArLog::ourAramConfigLogLevel[1024] = "Normal"; +double ArLog::ourAramConfigLogSize = 10; +bool ArLog::ourUseAramBehavior = false; +double ArLog::ourAramLogSize = 0; +ArGlobalRetFunctor ArLog::ourAramConfigProcessFileCB( + &ArLog::aramProcessFile); +std::string ArLog::ourAramPrefix = ""; +#endif +bool ArLog::ourAramDaemonized = false; + +ArFunctor1 *ArLog::ourFunctor; + + +AREXPORT void ArLog::logPlain(LogLevel level, const char *str) +{ + log(level, str); +} + +/** + This function is used like printf(). If the supplied level is less than + or equal to the set level, it will be printed. + @param level level of logging + @param str printf() like formating string +*/ +AREXPORT void ArLog::log(LogLevel level, const char *str, ...) +{ + if (level > ourLevel) + return; + + //printf("logging %s\n", str); + + char buf[10000]; + char *bufPtr; + char *timeStr; + int timeLen = 0; // this is a value based on the standard length of + // ctime return + time_t now; + + + ourMutex.lock(); + // put our time in if we want it + if (ourLoggingTime) + { + now = time(NULL); + timeStr = ctime(&now); + timeLen = 20; + // get take just the portion of the time we want + strncpy(buf, timeStr, timeLen); + buf[timeLen] = '\0'; + bufPtr = &buf[timeLen]; + } + else + bufPtr = buf; + va_list ptr; + va_start(ptr, str); + + vsnprintf(bufPtr, sizeof(buf) - timeLen - 2, str, ptr); + bufPtr[sizeof(buf) - timeLen - 1] = '\0'; + //vsprintf(bufPtr, str, ptr); + // can do whatever you want with the buf now + if (ourType == Colbert) + { + if (colbertPrint) // check if we have a print routine + (*colbertPrint)(ourColbertStream, buf); + } + else if (ourFP) + { + int written; + if ((written = fprintf(ourFP, "%s\n", buf)) > 0) + ourCharsLogged += written; + fflush(ourFP); + checkFileSize(); + } + else if (ourType != None) + { + printf("%s\n", buf); + fflush(stdout); + } + if (ourAlsoPrint) + printf("%s\n", buf); + + invokeFunctor(buf); + +#ifndef ARINTERFACE + // check this down here instead of up in the if ourFP so that the log filled shows up after the printf + if (ourUseAramBehavior && ourFP && ourAramLogSize > 0 && + ourCharsLogged > ourAramLogSize) + { + filledAramLog(); + } +#endif // ARINTERFACE + +// Also send it to the VC++ debug output window... +#ifdef HAVEATL + ATLTRACE2("%s\n", buf); +#endif + + va_end(ptr); + ourMutex.unlock(); +} + +/** + This function appends errorno in linux, or getLastError in windows, + and a string indicating the problem. + + @param level level of logging + @param str printf() like formating string +*/ +AREXPORT void ArLog::logErrorFromOSPlain(LogLevel level, const char *str) +{ + logErrorFromOS(level, str); +} + +/** + This function appends errorno in linux, or getLastError in windows, + and a string indicating the problem. + + @param level level of logging + @param str printf() like formating string +*/ +AREXPORT void ArLog::logErrorFromOS(LogLevel level, const char *str, ...) +{ + if (level > ourLevel) + return; + +#ifndef WIN32 + int err = errno; +#else + DWORD err = GetLastError(); +#endif + + //printf("logging %s\n", str); + + char buf[10000]; + char *bufPtr; + char *timeStr; + int timeLen = 0; // this is a value based on the standard length of + // ctime return + time_t now; + + + ourMutex.lock(); + // put our time in if we want it + if (ourLoggingTime) + { + now = time(NULL); + timeStr = ctime(&now); + timeLen = 20; + // get take just the portion of the time we want + strncpy(buf, timeStr, timeLen); + buf[timeLen] = '\0'; + bufPtr = &buf[timeLen]; + } + else + bufPtr = buf; + va_list ptr; + va_start(ptr, str); + + vsnprintf(bufPtr, sizeof(buf) - timeLen - 2, str, ptr); + bufPtr[sizeof(buf) - timeLen - 1] = '\0'; + + + char bufWithError[10200]; + +#ifndef WIN32 + const char *errorString = NULL; + if (err < sys_nerr - 1) + errorString = sys_errlist[err]; + snprintf(bufWithError, sizeof(bufWithError) - 1, "%s | ErrorFromOSNum: %d ErrorFromOSString: %s", buf, err, errorString); + bufWithError[sizeof(bufWithError) - 1] = '\0'; +#else + LPVOID errorString = NULL; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + err, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &errorString, + 0, NULL); + + snprintf(bufWithError, sizeof(bufWithError) - 1, "%s | ErrorFromOSNum: %d ErrorFromOSString: %s", buf, err, (char*)errorString); + bufWithError[sizeof(bufWithError) - 1] = '\0'; + + LocalFree(errorString); +#endif + + //vsprintf(bufPtr, str, ptr); + // can do whatever you want with the buf now + if (ourType == Colbert) + { + if (colbertPrint) // check if we have a print routine + (*colbertPrint)(ourColbertStream, bufWithError); + } + else if (ourFP) + { + int written; + if ((written = fprintf(ourFP, "%s\n", bufWithError)) > 0) + ourCharsLogged += written; + fflush(ourFP); + checkFileSize(); + } + else if (ourType != None) + { + printf("%s\n", bufWithError); + fflush(stdout); + } + if (ourAlsoPrint) + printf("%s\n", bufWithError); + + invokeFunctor(bufWithError); + +#ifndef ARINTERFACE + // check this down here instead of up in the if ourFP so that the log filled shows up after the printf + if (ourUseAramBehavior && ourFP && ourAramLogSize > 0 && + ourCharsLogged > ourAramLogSize) + { + filledAramLog(); + } +#endif // ARINTERFACE + +// Also send it to the VC++ debug output window... +#ifdef HAVEATL + ATLTRACE2("%s\n", buf); +#endif + + va_end(ptr); + ourMutex.unlock(); +} + + +/** + This function appends errorno in linux, or getLastError in windows, + and a string indicating the problem. + + @param level level of logging + @param str printf() like formating string +*/ +AREXPORT void ArLog::logErrorFromOSPlainNoLock(LogLevel level, const char *str) +{ + logErrorFromOSNoLock(level, str); +} + +/** + This function appends errorno in linux, or getLastError in windows, + and a string indicating the problem. + + @param level level of logging + @param str printf() like formating string +*/ +AREXPORT void ArLog::logErrorFromOSNoLock(LogLevel level, const char *str, ...) +{ + if (level > ourLevel) + return; + +#ifndef WIN32 + int err = errno; +#else + DWORD err = GetLastError(); +#endif + + //printf("logging %s\n", str); + + char buf[10000]; + char *bufPtr; + char *timeStr; + int timeLen = 0; // this is a value based on the standard length of + // ctime return + time_t now; + + + // put our time in if we want it + if (ourLoggingTime) + { + now = time(NULL); + timeStr = ctime(&now); + timeLen = 20; + // get take just the portion of the time we want + strncpy(buf, timeStr, timeLen); + buf[timeLen] = '\0'; + bufPtr = &buf[timeLen]; + } + else + bufPtr = buf; + va_list ptr; + va_start(ptr, str); + + vsnprintf(bufPtr, sizeof(buf) - timeLen - 2, str, ptr); + bufPtr[sizeof(buf) - timeLen - 1] = '\0'; + + + char bufWithError[10200]; + +#ifndef WIN32 + const char *errorString = NULL; + if (err < sys_nerr - 1) + errorString = sys_errlist[err]; + snprintf(bufWithError, sizeof(bufWithError) - 1, "%s | ErrorFromOSNum: %d ErrorFromOSString: %s", buf, err, errorString); + bufWithError[sizeof(bufWithError) - 1] = '\0'; +#else + LPVOID errorString = NULL; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + err, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &errorString, + 0, NULL); + + snprintf(bufWithError, sizeof(bufWithError) - 1, "%s | ErrorFromOSNum: %d ErrorFromOSString: %s", buf, err, errorString); + bufWithError[sizeof(bufWithError) - 1] = '\0'; + + LocalFree(errorString); +#endif + + //vsprintf(bufPtr, str, ptr); + // can do whatever you want with the buf now + if (ourType == Colbert) + { + if (colbertPrint) // check if we have a print routine + (*colbertPrint)(ourColbertStream, bufWithError); + } + else if (ourFP) + { + int written; + if ((written = fprintf(ourFP, "%s\n", bufWithError)) > 0) + ourCharsLogged += written; + fflush(ourFP); + checkFileSize(); + } + else if (ourType != None) + { + printf("%s\n", bufWithError); + fflush(stdout); + } + if (ourAlsoPrint) + printf("%s\n", bufWithError); + + invokeFunctor(bufWithError); + +#ifndef ARINTERFACE + // check this down here instead of up in the if ourFP so that the log filled shows up after the printf + if (ourUseAramBehavior && ourFP && ourAramLogSize > 0 && + ourCharsLogged > ourAramLogSize) + { + filledAramLog(); + } +#endif // ARINTERFACE + +// Also send it to the VC++ debug output window... +#ifdef HAVEATL + ATLTRACE2("%s\n", buf); +#endif + + va_end(ptr); +} + +/** + Initialize the logging utility by supplying the type of logging and the + level of logging. If the type is File, the fileName needs to be supplied. + @param type type of Logging + @param level level of logging + @param fileName the name of the file for File type of logging + @param logTime if this is true then the time a message is given will be logged + @param alsoPrint if this is true then in addition to whatever other logging (to a file for instance) the results will also be printed + @param printThisCall if this is true the new settings will be printed otherwise they won't +*/ +AREXPORT bool ArLog::init(LogType type, LogLevel level, const char *fileName, + bool logTime, bool alsoPrint, bool printThisCall) +{ + ourMutex.setLogName("ArLog::ourMutex"); + + ourMutex.lock(); + + // if we weren't or won't be doing a file then close any old file + if (ourType != File || type != File) + { + close(); + } + + if (type == StdOut) + ourFP=stdout; + else if (type == StdErr) + ourFP=stderr; + else if (type == File) + { + if (fileName != NULL) + { + if (strcmp(ourFileName.c_str(), fileName) == 0) + { + ArLog::logNoLock(ArLog::Terse, "ArLog::init: Continuing to log to the same file."); + } + else + { + close(); + if ((ourFP = ArUtil::fopen(fileName, "w")) == NULL) + { + ArLog::logNoLock(ArLog::Terse, "ArLog::init: Could not open file %s for logging.", fileName); + ourMutex.unlock(); + return(false); + } + ourFileName=fileName; + } + } + } + else if (type == Colbert) + { + colbertPrint = NULL; + ourColbertStream = -1; // use default stream + if (fileName) + { // need to translate fileName to integer index + } + } + else if (type == None) + { + + } + ourType=type; + ourLevel=level; + + // environment variable overrides level + { + char* lev = getenv("ARLOG_LEVEL"); + if(lev) + { + switch(toupper(lev[0])) + { + case 'N': + ourLevel = Normal; + break; + case 'T': + ourLevel = Terse; + break; + case 'V': + ourLevel = Verbose; + break; + } + } + } + + ourLoggingTime = logTime; + ourAlsoPrint = alsoPrint; + + if (printThisCall) + { + printf("ArLog::init: "); + + if (ourType == StdOut) + printf(" StdOut\t"); + else if (ourType == StdErr) + printf(" StdErr\t"); + else if (ourType == File) + printf(" File(%s)\t", ourFileName.c_str()); + else if (ourType == Colbert) + printf(" Colbert\t"); + else if (ourType == None) + printf(" None\t"); + else + printf(" BadType\t"); + + if (ourLevel == Terse) + printf(" Terse\t"); + else if (ourLevel == Normal) + printf(" Normal\t"); + else if (ourLevel == Verbose) + printf(" Verbose\t"); + else + printf(" BadLevel\t"); + + if (ourLoggingTime) + printf(" Logging Time\t"); + else + printf(" Not logging time\t"); + + if (ourAlsoPrint) + printf(" Also printing\n"); + else + printf(" Not also printing\n"); + } + ourMutex.unlock(); + return(true); +} + +AREXPORT void ArLog::close() +{ + if (ourFP && (ourType == File)) + { + fclose(ourFP); + ourFP=0; + ourFileName=""; + } +} + +AREXPORT void ArLog::logNoLock(LogLevel level, const char *str, ...) +{ + if (level > ourLevel) + return; + + char buf[2048]; + char *bufPtr; + char *timeStr; + int timeLen = 20; // this is a value based on the standard length of + // ctime return + time_t now; + + + // put our time in if we want it + if (ourLoggingTime) + { + now = time(NULL); + timeStr = ctime(&now); + // get take just the portion of the time we want + strncpy(buf, timeStr, timeLen); + buf[timeLen] = '\0'; + bufPtr = &buf[timeLen]; + } + else + bufPtr = buf; + va_list ptr; + va_start(ptr, str); + //vsnprintf(bufPtr, sizeof(buf) - timeLen - 1, str, ptr); + vsprintf(bufPtr, str, ptr); + // can do whatever you want with the buf now + if (ourType == Colbert) + { + if (colbertPrint) // check if we have a print routine + (*colbertPrint)(ourColbertStream, buf); + } + else if (ourFP) + { + int written; + if ((written = fprintf(ourFP, "%s\n", buf)) > 0) + ourCharsLogged += written; + fflush(ourFP); + checkFileSize(); + } + else if (ourType != None) + printf("%s\n", buf); + if (ourAlsoPrint) + printf("%s\n", buf); + + invokeFunctor(buf); + + va_end(ptr); +} + +AREXPORT void ArLog::logBacktrace(LogLevel level) +{ +#ifndef WIN32 + int size = 100; + int numEntries; + void *buffer[size]; + char **names; + + numEntries = backtrace(buffer, size); + ArLog::log(ArLog::Normal, "Backtrace %d levels", numEntries); + + names = backtrace_symbols(buffer, numEntries); + if (names == NULL) + return; + + int i; + for (i = 0; i < numEntries; i++) + ArLog::log(ArLog::Normal, "%s", names[i]); + + free(names); +#endif +} + +AREXPORT void ArLog::addToConfig(ArConfig *config) +{ + std::string section = "LogConfig"; + config->addParam( + ArConfigArg("LogType", (int *)&ourConfigLogType, + "The type of log we'll be using, 0 for StdOut, 1 for StdErr, 2 for File (and give it a file name), 3 for colbert (don't use that), and 4 for None", + ArLog::StdOut, ArLog::None), + section.c_str(), ArPriority::TRIVIAL); + config->addParam( + ArConfigArg("LogLevel", (int *)&ourConfigLogLevel, + "The level of logging to do, 0 for Terse, 1 for Normal, and 2 for Verbose", + ArLog::Terse, ArLog::Verbose), + section.c_str(), ArPriority::TRIVIAL); + config->addParam( + ArConfigArg("LogFileName", ourConfigFileName, + "File to log to", sizeof(ourConfigFileName)), + section.c_str(), ArPriority::TRIVIAL); + config->addParam( + ArConfigArg("LogTime", &ourConfigLogTime, + "True to prefix log messages with time and date, false not to"), + section.c_str(), ArPriority::TRIVIAL); + config->addParam( + ArConfigArg("LogAlsoPrint", &ourConfigAlsoPrint, + "True to also printf the message, false not to"), + section.c_str(), ArPriority::TRIVIAL); + ourConfigProcessFileCB.setName("ArLog"); + config->addProcessFileCB(&ourConfigProcessFileCB, 200); +} + +AREXPORT bool ArLog::processFile(void) +{ + if (ourConfigLogType != ourType || ourConfigLogLevel != ourLevel || + strcmp(ourConfigFileName, ourFileName.c_str()) != 0 || + ourConfigLogTime != ourLoggingTime || ourConfigAlsoPrint != ourAlsoPrint) + { + ArLog::logNoLock(ArLog::Normal, "Initializing log from config"); + return ArLog::init(ourConfigLogType, ourConfigLogLevel, ourConfigFileName, + ourConfigLogTime, ourConfigAlsoPrint, true); + } + return true; +} + +#ifndef ARINTERFACE +AREXPORT void ArLog::aramInit(const char *prefix, ArLog::LogLevel defaultLevel, + double defaultSize, bool daemonized) +{ + if (prefix == NULL || prefix[0] == '\0') + ourAramPrefix = ""; + else + { + ourAramPrefix = prefix; + if (prefix[strlen(prefix) - 1] != '/') + ourAramPrefix += "/"; + } + + std::string section = "Log Config"; + Aria::getConfig()->addParam( + ArConfigArg("Level", ourAramConfigLogLevel, + "The level of logging type of log we'll be using", sizeof(ourAramConfigLogLevel)), + section.c_str(), ArPriority::TRIVIAL, + "Choices:Terse;;Normal;;Verbose"); + Aria::getConfig()->addParam( + ArConfigArg("LogFileSize", &ourAramConfigLogSize, + "The maximum size of the log files (6 files are rotated through), 0 means no maximum", 0, 20000), + section.c_str(), ArPriority::TRIVIAL); + + ourUseAramBehavior = true; + ourAramConfigProcessFileCB.setName("ArLogAram"); + Aria::getConfig()->addProcessFileCB(&ourAramConfigProcessFileCB, 210); + + if (defaultLevel == ArLog::Terse) + sprintf(ourAramConfigLogLevel, "Terse"); + else if (defaultLevel == ArLog::Normal) + sprintf(ourAramConfigLogLevel, "Normal"); + if (defaultLevel == ArLog::Verbose) + sprintf(ourAramConfigLogLevel, "Verbose"); + + ourAramDaemonized = daemonized; + + char buf[2048]; + snprintf(buf, sizeof(buf), "%slog1.txt", ourAramPrefix.c_str()); + ArLog::init(ArLog::File, defaultLevel, buf, true, !daemonized, true); + + if (ourAramDaemonized) + { + + if (dup2(fileno(ourFP), fileno(stderr)) < 0) + ArLog::logErrorFromOSNoLock( + ArLog::Normal, "ArLog: Error redirecting stderr to log file."); + + // this is is taken out since if you set this flag, the file gets + //closed twice, then really weird stuff happens after the exec + //ArUtil::setFileCloseOnExec(fileno(stderr), true); + + fprintf(stderr, "Stderr...\n"); + + /* stdout is taken out since we don't necessarily need it and it + * wound up at the end of the file, which got really strange + + if (dup2(fileno(ourFP), fileno(stdout)) < 0) + + ArLog::logErrorFromOSNoLock( + ArLog::Normal, "ArLog: Error redirecting stdout to log file."); + + // this is is taken out since if you set this flag, the file gets + //closed twice, then really weird stuff happens after the exec + ArUtil::setFileCloseOnExec(fileno(stdout), true); + + fprintf(stdout, "Stdout...\n"); + */ + } + + ourAramConfigLogSize = defaultSize; // even megabytes + ourAramLogSize = ArMath::roundInt(ourAramConfigLogSize * 1000000); // even megabytes +} + +AREXPORT bool ArLog::aramProcessFile(void) +{ + ourMutex.lock(); + ourAramLogSize = ArMath::roundInt(ourAramConfigLogSize * 1000000); // even megabytes + if (strcasecmp(ourAramConfigLogLevel, "Terse") == 0) + ourLevel = Terse; + else if (strcasecmp(ourAramConfigLogLevel, "Verbose") == 0) + ourLevel = Verbose; + else if (strcasecmp(ourAramConfigLogLevel, "Normal") == 0) + ourLevel = Normal; + else + { + ArLog::logNoLock(ArLog::Normal, + "ArLog: Bad log level '%s' defaulting to Normal", + ourAramConfigLogLevel); + ourLevel = Normal; + } + ourMutex.unlock(); + return true; +} + +AREXPORT void ArLog::filledAramLog(void) +{ + ArLog::logNoLock(ArLog::Normal, "ArLog: Log filled, starting new file"); + + fclose(ourFP); + + char buf[2048]; + int i; + for (i = 5; i > 0; i--) + { + snprintf(buf, sizeof(buf), "mv %slog%d.txt %slog%d.txt", + ourAramPrefix.c_str(), i, ourAramPrefix.c_str(), i+1); + system(buf); + } + + snprintf(buf, sizeof(buf), "%slog1.txt", ourAramPrefix.c_str()); + if ((ourFP = ArUtil::fopen(ourFileName.c_str(), "w")) == NULL) + { + ourType = StdOut; + ArLog::logNoLock(ArLog::Normal, + "ArLog: Couldn't reopen file '%s', failing back to stdout", + ourFileName.c_str()); + } + ourCharsLogged = 0; + + if (ourAramDaemonized) + { + + if (dup2(fileno(ourFP), fileno(stderr)) < 0) + ArLog::logErrorFromOSNoLock( + ArLog::Normal, "ArLog: Error redirecting stderr to log file."); + + // this is is taken out since if you set this flag, the file gets + //closed twice, then really weird stuff happens after the exec + //ArUtil::setFileCloseOnExec(fileno(stderr), true); + + fprintf(stderr, "Stderr...\n"); + + /* stdout is taken out since we don't necessarily need it and it + * wound up at the end of the file, which got really strange + + if (dup2(fileno(ourFP), fileno(stdout)) < 0) + ArLog::logErrorFromOSNoLock( + ArLog::Normal, "ArLog: Error redirecting stdout to log file."); + + // this is is taken out since if you set this flag, the file gets + //closed twice, then really weird stuff happens after the exec + ArUtil::setFileCloseOnExec(fileno(stdout), true); + + fprintf(stdout, "Stdout...\n"); + */ + } +} + +#endif // ARINTERFACE + +AREXPORT void ArLog::setFunctor(ArFunctor1 *functor) +{ + ourFunctor = functor; +} + +AREXPORT void ArLog::invokeFunctor(const char *message) +{ + ArFunctor1 *functor; + functor = ourFunctor; + if (functor != NULL) + functor->invoke(message); +} + +AREXPORT void ArLog::checkFileSize(void) +{ + if (ourAramDaemonized) + { + long size; + size = ArUtil::sizeFile(ourFileName); + if (size > 0 && size > ourCharsLogged) + { + ourCharsLogged = size; + } + } +} + +AREXPORT void ArLog::internalForceLockup(void) +{ + ArLog::log(ArLog::Terse, "ArLog: forcing internal lockup"); + ourMutex.lock(); +} + diff --git a/Legacy/Aria/src/ArLogFileConnection.cpp b/Legacy/Aria/src/ArLogFileConnection.cpp new file mode 100644 index 0000000..6742e75 --- /dev/null +++ b/Legacy/Aria/src/ArLogFileConnection.cpp @@ -0,0 +1,272 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArLogFileConnection.h" +#include "ArLog.h" +#include "ariaUtil.h" + +AREXPORT ArLogFileConnection::ArLogFileConnection() +{ + myStatus = STATUS_NEVER_OPENED; + myLogFile = NULL; + myFD = NULL; + stopAfter = 1; + strcpy(myName, "random"); + strcpy(myType, "amigo"); + strcpy(mySubtype, "amigo"); +} + +AREXPORT ArLogFileConnection::~ArLogFileConnection() +{ + if (myFD != NULL) + fclose(myFD); +} + + +AREXPORT void ArLogFileConnection::setLogFile(const char *fname) +{ + if (fname == NULL) + myLogFile = "robot.log"; + else + myLogFile = fname; +} + +AREXPORT bool ArLogFileConnection::openSimple(void) +{ + if (internalOpen() == 0) + return true; + else + return false; +} + +/** + @param fname the file to connect to, if NULL (default) then robot.log + @return 0 for success, otherwise one of the open enums + @see getOpenMessage +*/ +AREXPORT int ArLogFileConnection::open(const char *fname) +{ + setLogFile(fname); + return internalOpen(); +} + +AREXPORT int ArLogFileConnection::internalOpen(void) +{ + havePose = false; + myFD = ArUtil::fopen(myLogFile, "r"); + if (myFD == NULL) + { + myStatus = STATUS_OPEN_FAILED; + return OPEN_FILE_NOT_FOUND; + } + + char buf[100]; + if (fgets(buf,100,myFD) != NULL) + { + if (strncmp(buf, "// Saphira log file", 19) != 0) + { + myStatus = STATUS_OPEN_FAILED; + fclose(myFD); + myFD = NULL; + return OPEN_NOT_A_LOG_FILE; + } + } + else + { + myStatus = STATUS_OPEN_FAILED; + fclose(myFD); + myFD = NULL; + return OPEN_NOT_A_LOG_FILE; + } + + // Set the robot pose + if (fgets(buf,100,myFD) != NULL) + { + if (strncmp(buf, "// Robot position", 17) == 0) // have a position! + { + int x,y,th; + fgets(buf,100,myFD); + sscanf(buf, "%d %d %d", &x, &y, &th); + myPose.setX(x); + myPose.setY(y); + myPose.setTh(th); + havePose = true; + } + if (strncmp(buf, "// Robot name", 13) == 0) // have a name! + { + fgets(buf,100,myFD); + sscanf(buf, "%s %s %s", myName, myType, mySubtype); + } + } + + myStatus = STATUS_OPEN; + return 0; +} + +void ArLogFileConnection::buildStrMap(void) +{ + myStrMap[OPEN_FILE_NOT_FOUND] = "File not found."; + myStrMap[OPEN_NOT_A_LOG_FILE] = "File is not a log file."; +} + +AREXPORT const char * ArLogFileConnection::getOpenMessage(int messageNumber) +{ + return myStrMap[messageNumber].c_str(); +} + +AREXPORT bool ArLogFileConnection::close(void) +{ + myStatus = STATUS_CLOSED_NORMALLY; + if (myFD != NULL) + fclose(myFD); + myFD = NULL; + return true; +} + +AREXPORT int ArLogFileConnection::read(const char *data, unsigned int size, + unsigned int msWait) +{ + ArTime timeDone; + unsigned int bytesRead = 0; + int n; + + if (getStatus() != STATUS_OPEN) + { + ArLog::log(ArLog::Terse, + "ArLogFileConnection::read: Attempt to use port that is not open."); + return -1; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArLogFileConnection::read() error adding msecs (%i)", + msWait); + } + + if (stopAfter-- <= 0) + { + stopAfter= 1; + return 0; + } + + if (myFD != NULL) + { + char line[1000]; + if (fgets(line, 1000, myFD) == NULL) // done with file, close + { + close(); + return -1; + } + // parse the line + int i=0; + n = 0; + while (line[i] != 0) + { + if (isdigit(line[i])) + { + if (isdigit(line[i+1])) + { + if (isdigit(line[i+2])) + { + const_cast(data)[n++] = + 100 * (line[i]-'0') + 10*(line[i+1]-'0') + line[i+2]-'0'; + i++; + } + else + const_cast(data)[n++] = 10*(line[i]-'0') + line[i+1]-'0'; + i++; + } + else + const_cast(data)[n++] = line[i]-'0'; + } + i++; + } + } + +#if 0 + if (n > 0) // add in checksum + { + int i; + unsigned char nn; + int c = 0; + + i = 3; + nn = data[2] - 2; + while (nn > 1) + { + c += ((unsigned char)data[i]<<8) | (unsigned char)data[i+1]; + c = c & 0xffff; + nn -= 2; + i += 2; + } + if (nn > 0) + c = c ^ (int)((unsigned char) data[i]); + + const_cast(data)[n++] = (c << 8) & 0xff; + const_cast(data)[n++] = c & 0xff; + } +#endif + + bytesRead = n; + return bytesRead; +} + + + +AREXPORT int ArLogFileConnection::write(const char *data, unsigned int size) +{ + return size; // always write +} + + +/** + @return the name of the log file +*/ +AREXPORT const char *ArLogFileConnection::getLogFile(void) +{ + return myLogFile; +} + +AREXPORT int ArLogFileConnection::getStatus(void) +{ + return myStatus; +} + +AREXPORT bool ArLogFileConnection::isTimeStamping(void) +{ + return false; +} + +AREXPORT ArTime ArLogFileConnection::getTimeRead(int index) +{ + ArTime now; + now.setToNow(); + return now; +} diff --git a/Legacy/Aria/src/ArMD5Calculator.cpp b/Legacy/Aria/src/ArMD5Calculator.cpp new file mode 100644 index 0000000..9f9228a --- /dev/null +++ b/Legacy/Aria/src/ArMD5Calculator.cpp @@ -0,0 +1,190 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ArMD5Calculator.h" + +#include "ariaOSDef.h" +#include "ariaInternal.h" + +#include "ArLog.h" + +AREXPORT ArMD5Calculator::ArMD5Calculator(ArFunctor1 *secondFunctor) : + myFunctor(this, &ArMD5Calculator::append), + mySecondFunctor(secondFunctor), + myState(), + myDigest(), + myIsFinished(false) +{ + myDigest[0] = '\0'; + md5_init(&myState); +} + +AREXPORT ArMD5Calculator::~ArMD5Calculator() +{ +} + +AREXPORT void ArMD5Calculator::reset() +{ + myDigest[0] = '\0'; + md5_init(&myState); + + myIsFinished = false; +} + +AREXPORT ArFunctor1 *ArMD5Calculator::getFunctor() +{ + return &myFunctor; +} + +AREXPORT ArFunctor1 *ArMD5Calculator::getSecondFunctor() +{ + return mySecondFunctor; +} + +AREXPORT void ArMD5Calculator::setSecondFunctor(ArFunctor1 *secondFunctor) +{ + mySecondFunctor = secondFunctor; +} + +AREXPORT unsigned char *ArMD5Calculator::getDigest() +{ + if (!myIsFinished) { + md5_finish(&myState, myDigest); + myIsFinished = true; + } + return myDigest; + +} // end method getDigest + + +AREXPORT void ArMD5Calculator::toDisplay(const unsigned char *digestBuf, + size_t digestLength, + char *displayBuf, + size_t displayLength) +{ + if ((displayBuf == NULL) || (digestBuf == NULL)) { + return; + } + int j = 0; + + memset(displayBuf, 0, displayLength); + + for (int i = 0; + ((i < digestLength) && (j < displayLength - 1)); + i++) { + + j = i * 2; + if (j > displayLength - 3) { + break; + } + // Seems that we need the 3 to account for the end-of-string (because otherwise + // (j + 1) holds the null char) + snprintf(&displayBuf[j], 3, "%02x", digestBuf[i]); + + /*** + ArLog::log(ArLog::Normal, + "ArMD5Calculator::toDisplay() i = %i j = %i, \"%02x\" = \"%x,%x\"", + i, j, digestBuf[i], displayBuf[j], displayBuf[j + 1]); + ***/ + } // end for each char + + displayBuf[displayLength - 1] = '\0'; + + /*** + ArLog::log(ArLog::Normal, + "ArMD5Calculator::toDisplay() returns %s displayLength = %i", + displayBuf, + displayLength); + ***/ + +} // end method toDisplay + +AREXPORT bool ArMD5Calculator::calculateChecksum(const char *fileName, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen) +{ + ArTime calcTime; + + if (ArUtil::isStrEmpty(fileName)) { + // TODO ArLog + return false; + } + FILE *file = fopen(fileName, "r"); + if (file == NULL) { + // TODO ArLog + return false; + } + + ArMD5Calculator calculator; + + // TODO: Make this static and protect w/ mutex? + char line[10000]; + bool ret = true; + + while (fgets(line, sizeof(line), file) != NULL) + { + calculator.append(line); + } + + fclose(file); + + if (md5DigestBuffer != NULL) { + if (md5DigestBufferLen != ArMD5Calculator::DIGEST_LENGTH) { + // log warning + } + memset(md5DigestBuffer, 0, md5DigestBufferLen); + memcpy(md5DigestBuffer, calculator.getDigest(), + ArUtil::findMin(md5DigestBufferLen, ArMD5Calculator::DIGEST_LENGTH)); + } + + int elapsed = calcTime.mSecSince(); + + ArLog::log(ArLog::Normal, + "ArMD5Calculator::calculateChecksum(%s) took %i msecs", + fileName, elapsed); + + return true; + + +} // end method calculateChecksum + + + +AREXPORT void ArMD5Calculator::append(const char *str) +{ + if (str == NULL) { + ArLog::log(ArLog::Terse, + "ArMD5Calculator::append cannot append null string"); + } + // YUCK to the cast! + md5_append(&myState, (unsigned char *) str, strlen(str)); + + if (mySecondFunctor != NULL) { + mySecondFunctor->invoke(str); + } + +} // end method append + diff --git a/Legacy/Aria/src/ArMTXIO.cpp b/Legacy/Aria/src/ArMTXIO.cpp new file mode 100644 index 0000000..6c3aace --- /dev/null +++ b/Legacy/Aria/src/ArMTXIO.cpp @@ -0,0 +1,1491 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArMTXIO.h" +#include "ariaInternal.h" +#include + +#include +#include + +#define MTX_VERSION_REG 0x0000 +#define MTX_VERSION_RR 0x0000 +#define MTX_VERSION_VV 0x0001 +#define MTX_VERSION_CC 0x0002 +#define MTX_VERSION_TT 0x0003 +#define MTX_C2K_SCRATCH 0x0004 +#define MTX_LPC_SCRATCH 0x0005 +#define MTX_LPC_CTRL 0x0006 +#define MTX_XINTF_CTRL 0x0007 +#define MTX_COMMON_STATUS 0x0008 +#define MTX_COMMON_STATUS2 0x0009 +#define MTX_TIMING_CTRL 0x000b +#define MTX_GLOBAL_TIMER 0x000c +#define MTX_GLOBAL_TIMER0 0x000c +#define MTX_GLOBAL_TIMER1 0x000d +#define MTX_GLOBAL_TIMER2 0x000e +#define MTX_GLOBAL_TIMER3 0x000f +#define MTX_LPC_TIMER0 0x0010 +#define MTX_LPC_TIMER1 0x0011 +#define MTX_LPC_TIMER2 0x0012 +#define MTX_LPC_TIMER3 0x0013 +#define MTX_XINTF_TIMER0 0x0014 +#define MTX_XINTF_TIMER1 0x0015 +#define MTX_XINTF_TIMER2 0x0016 +#define MTX_XINTF_TIMER3 0x0017 +#define MTX_SEM1 0x0018 +#define MTX_SEM2 0x0019 +#define MTX_SEM3 0x001a +#define MTX_SEM4 0x001b +#define MTX_DIO_INPUT_MON1 0x0020 +#define MTX_DIO_INPUT_MON2 0x0021 +#define MTX_DIO_OUTPUT_MON1 0x0022 +#define MTX_DIO_OUTPUT_MON2 0x0023 +#define MTX_BUMPER_INPUT_MON 0x0024 +#define MTX_PWR_STATUS1 0x0028 +#define MTX_PWR_STATUS2 0x0029 +#define MTX_LIDAR_STATUS 0x002a +#define MTX_ESTOP_STATUS1 0x002c +#define MTX_ESTOP_STATUS2 0x002d +#define MTX_ESTOP_STATUS3 0x002e +#define MTX_ESTOP_STATUS4 0x002f +#define MTX_DIO_OUTPUT_CTRL1 0x0030 +#define MTX_DIO_OUTPUT_CTRL2 0x0031 +#define MTX_LIGHTPOLE_OUTPUT_CTRL 0x0032 +#define MTX_PERIPH_PWR_CTRL1 0x0034 +#define MTX_PERIPH_PWR_CTRL2 0x0035 +#define MTX_PERIPH_PWR_CTRL3 0x0036 +#define MTX_MOTION_PWR_CTRL 0x0038 +#define MTX_MOTION_PWR_STATUS 0x0039 +#define MTX_LIDAR_CTRL 0x003a + +#define MTX_DPRAM_BLOCK1 0x0040 +#define MTX_DPRAM_BLOCK2 0x0070 +#define MTX_DPRAM_BLOCK3 0x0100 +#define MTX_DPRAM_BLOCK4 0x0500 + +#define MTX_MAGIC 287 +#define MTX_READ_REG _IOR(MTX_MAGIC, 1, MTX_IOREQ *) +#define MTX_WRITE_REG _IOW(MTX_MAGIC, 2, MTX_IOREQ *) +//#define MTX_READ_REG _IOR('m', 1, MTX_IOREQ *) +//#define MTX_WRITE_REG _IOW('m', 2, MTX_IOREQ *) + + +ArMutex ArMTXIO::ourMutex; + +/** Constructor for the ArMTXIO class. This will open the device + * named by @a dev (the default is "/dev/amrio" if the argument is omitted). + It will find the number of digital banks and set the to inputs. It will also + attempt to take an analog reading, which will fail if there is not analog chip + present. If the conversion fails it will disable the analog portion of the + code. + + Check isEnabled() to see if the device was properly opened during construction. +*/ +AREXPORT ArMTXIO::ArMTXIO(const char * dev) : + myDisconnectCB(this, &ArMTXIO::closeIO), + myLPCTimeUSecCB(this, &ArMTXIO::getLPCTimeUSec) +{ + ourMutex.setLogName("ArMTXIO::ourMutex"); + + myFirmwareRevision = 0; + myFirmwareVersion = 0; + myCompatibilityCode = 0; + myFPGAType = 0x20; + + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: opening device %s", dev); + myFD = ArUtil::open(dev, O_RDWR); + + if (myFD == -1) + { + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: open %s failed. Disabling class (errno %d)", dev, errno); + myEnabled = false; + } + else + { + + + // PS 10/30/12 - query the FPGA + + MTX_IOREQ mtxIO; + + mtxIO.myReg = MTX_VERSION_REG; + mtxIO.mySize = sizeof(unsigned int); + + if (ioctl(myFD, MTX_READ_REG, &mtxIO) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: failed to get the Version Registers"); + myEnabled = false; + } + else + { + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: FPGA version registers = 0x%08x", mtxIO.myData.myVal32); + + myFirmwareRevision = (mtxIO.myData.myVal32 & 0x000000ff); + myFirmwareVersion = (mtxIO.myData.myVal32 & 0x0000ff00) >> 8; + myCompatibilityCode = (mtxIO.myData.myVal32 & 0x00ff0000) >> 16; + myFPGAType = (mtxIO.myData.myVal32 & 0xff000000) >> 24; + myEnabled = true; + + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: Firmware Revision = 0x%02x", myFirmwareRevision); + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: Firmware Version = 0x%02x", myFirmwareVersion); + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: Compatibility Code = 0x%02x", myCompatibilityCode); + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: FPGA Type = 0x%02x", myFPGAType); + + Aria::addExitCallback(&myDisconnectCB); + ArLog::log(ArLog::Normal, "ArMTXIO::ArMTXIO: device opened"); + + // there will be be 4 banks for MTX, 2 input consisting of 8 bits each + // and 2 output consisting of 8 bits each + + myNumBanks = 4; + + + } + } +} + +/** Destructor. Attempt to close the device if it was opened + **/ +AREXPORT ArMTXIO::~ArMTXIO(void) +{ + if (myEnabled) + closeIO(); +} + +/** Close the device when Aria exits + **/ +AREXPORT bool ArMTXIO::closeIO(void) +{ + myEnabled = false; + + if (close(myFD) == -1) + { + ArLog::log(ArLog::Normal, "ArMTXIO::~ArMTXIO: close failed on file descriptor!"); + return false; + } + else + { + ArLog::log(ArLog::Normal, "ArMTXIO::~ArMTXIO: closed device"); + return true; + } +} + +/** Returns the state of the bits as they are currently set in the outputs. + @param bank which bank to check + @param val the byte to write the values into + @return true if the request was satisfied, false otherwise + **/ +AREXPORT bool ArMTXIO::getDigitalBankOutputs(int bank, unsigned char *val) +{ + if (!myEnabled) + return false; + + if (bank < 0 || bank > myNumBanks - 1) + return false; + + // should check for input vs. output + switch (bank) + { + case 2: + return getDigitalOutputControl1(val); + break; + case 3: + return getDigitalOutputControl2(val); + break; + default: + return false; + } + + return false; +} + +/** + + @param bank the bank number to use for mtx only 2 & 3 are outputs + @param val the status of the 8-bits in a single byte. + **/ +AREXPORT bool ArMTXIO::setDigitalBankOutputs(int bank, unsigned char val) +{ + if (!myEnabled) + return false; + + if (bank < 0 || bank > myNumBanks - 1) + return false; + + // bitwise negate val because the hardware calls a 'high' off + switch (bank) + { + case 2: + if (!setDigitalOutputControl1(&val)) + return false; + myDigitalBank2 = val; + break; + case 3: + if (!setDigitalOutputControl2(&val)) + return false; + myDigitalBank3 = val; + break; + default: + return false; + } + + return true; +} + +/** Returns the bits of the digital input bank. + + @return true if the ioctl call was succcessfull, false otherwise + **/ +AREXPORT bool ArMTXIO::getDigitalBankInputs(int bank, unsigned char *val) +{ + if (!myEnabled) + return false; + + if (bank < 0 || bank > myNumBanks - 1) + return false; + + unsigned char tmp; + switch (bank) + { + case 0: + return getDigitalIOInputMon1(val); + break; + case 1: + return getDigitalIOInputMon2(val); + break; + default: + return false; + } + + return true; +} + + +AREXPORT ArMTXIO::Direction ArMTXIO::getDigitalBankDirection(int bank) +{ + if (bank == 0 || bank == 1) + return DIGITAL_INPUT; + else if(bank == 2 || bank == 3) + return DIGITAL_OUTPUT; + else + return INVALID; +} + +#if 0 + +/** Returns the raw bit value as read by the chip. + + @param port the port number, between 0 and 7 + @param val the address of the integer to store the reading in + @return true if a reading was acquired. false otherwise + **/ +AREXPORT bool ArMTXIO::getAnalogValueRaw(int port, int *val) +{ + if (!myEnabled || !myAnalogEnabled) + return false; + + unsigned int tmp; + + if (ioctl(myFD, ANALOG_SET_PORT, port) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogValueRaw: failed to set analog port %d", port); + return false; + } + + if (ioctl(myFD, ANALOG_GET_VALUE, &tmp) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogValueRaw: failed to get analog port %d", port); + return false; + } + + *val = (int) tmp; + + return true; +} + +/** Returns an analog value converted from the raw reading to a scale + if 0-5V. + + @param port the port number, between 0 and 7 + @param val the address of the double to store the reading in + @return true if a reading was acquired. false otherwise + **/ +AREXPORT bool ArMTXIO::getAnalogValue(int port, double *val) +{ + int tmp; + + // the reading is 4096 units, for a range of 0-5V + if (getAnalogValueRaw(port, &tmp)) { + *val = 5 * (tmp/4096.0); + return true; + } + else { + return false; + } +} + +#endif + + +AREXPORT bool ArMTXIO::getLightPole(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LIGHTPOLE_OUTPUT_CTRL; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLightPole() failed to get Light Pole Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setLightPole(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LIGHTPOLE_OUTPUT_CTRL; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLightPole() failed to set Light Pole Register"); + return false; + } + + return true; + +} + +/** Returns the bits of the digital IO Input Monitoring 1 + + @return true if the ioctl call was succcessfull, false otherwise + **/ +AREXPORT bool ArMTXIO::getDigitalIOInputMon1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + + req.myReg = MTX_DIO_INPUT_MON1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getDigitalIOInputMon1() failed to get Digital IO Input Montioring 1 Register"); + return false; + } + + *val = req.myData.myVal8; + + ArLog::log(ArLog::Verbose, + "ArMTXIO::getDigitalIOInputMon1: Input register 1 = %d", *val); + + return true; +} + +/** Returns the bits of the digital IO Input Monitoring 1 + + @return true if the ioctl call was succcessfull, false otherwise + **/ +AREXPORT bool ArMTXIO::getDigitalIOInputMon2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + + req.myReg = MTX_DIO_INPUT_MON2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getDigitalIOInputMon2() failed to get Digital IO Input Montioring 2 Register"); + return false; + } + + *val = req.myData.myVal8; + + ArLog::log(ArLog::Verbose, + "ArMTXIO::getDigitalIOInputMon2: Input register 2 = %d", *val); + + return true; +} + + +AREXPORT bool ArMTXIO::getDigitalIOOutputMon1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_DIO_OUTPUT_MON1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getDigitalIOOutputMon1() failed to get Digital IO Output Montioring 1 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + + +AREXPORT bool ArMTXIO::getDigitalIOOutputMon2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_DIO_OUTPUT_MON2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getDigitalIOOutputMon2() failed to get Digital IO Output Montioring 2 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getLPCTimer0(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LPC_TIMER0; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLPCTimer0() failed to get LPC Time 0 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getLPCTimer1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LPC_TIMER1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLPCTimer1() failed to get LPC Time 1 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getLPCTimer2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LPC_TIMER2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLPCTimer2() failed to get LPC Time 2 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getLPCTimer3(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LPC_TIMER3; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLPCTimer3() failed to get LPC Time 3 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getLPCTimeUSec(ArTypes::UByte4 *timeUSec) +{ + MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_TIMING_CTRL; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = 1; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLPCTimeUSec() failed to set TimingControlRegister"); + return false; + } + + unsigned char time0, time1, time2, time3; + if (!getLPCTimer0(&time0) || + !getLPCTimer1(&time1) || + !getLPCTimer2(&time2) || + !getLPCTimer3(&time3)) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLPCTimeUSec() failed to get LPC Time Register"); + return false; + } + + *timeUSec = (time3 << 24) | (time2 << 16) | (time1 << 8) | time0; + + return true; +} + +AREXPORT bool ArMTXIO::getSemaphore1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore1() failed to get Semaphore 1 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setSemaphore1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM1; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore1() failed to set Semaphore 1 Register"); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getSemaphore2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore2() failed to get Semaphore 2 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setSemaphore2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM2; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore2() failed to set Semaphore 2 Register"); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getSemaphore3(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM3; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore3() failed to get Semaphore 3 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setSemaphore3(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM3; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore3() failed to set Semaphore 3 Register"); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getSemaphore4(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM4; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore4() failed to get Semaphore 4 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setSemaphore4(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_SEM4; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getSemaphore4() failed to set Semaphore 4 Register"); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getBumperInput(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_BUMPER_INPUT_MON; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getBumperInput() failed to get Bumper Input Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getPowerStatus1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PWR_STATUS1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getPowerStatus1() failed to get Power Status 1 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getPowerStatus2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PWR_STATUS2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getPowerStatus1() failed to get Power Status 2 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getLIDARSafety(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LIDAR_STATUS; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getLIDARSafety() failed to get LIDAR Safety Status Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getESTOPStatus1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_ESTOP_STATUS1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getESTOPStatus1() failed to get ESTOP Status 1 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getESTOPStatus2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_ESTOP_STATUS1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getESTOPStatus2() failed to get ESTOP Status 2 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getESTOPStatus3(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_ESTOP_STATUS3; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getESTOPStatus3() failed to get ESTOP Status 3 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::getESTOPStatus4(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_ESTOP_STATUS4; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getESTOPStatus4() failed to get ESTOP Status 4 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::compareESTOPStatus4HighNibbleAgainst(int val) +{ + unsigned char rawVal; + + if (!getESTOPStatus4(&rawVal)) + return false; + + // shift to get the high nibble, then compare against the val + if ((rawVal >> 4) == val) + return true; + else + return false; +} + +AREXPORT bool ArMTXIO::getDigitalOutputControl1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_DIO_OUTPUT_CTRL1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getDigitalOutputControl1() failed to get Digital IO Output Control 1 Register"); + return false; + } + + *val = req.myData.myVal8; + + ArLog::log(ArLog::Verbose, + "ArMTXIO::getDigitalOutputControl1: Output register 1 = 0x%02x", *val); + + return true; +} + +AREXPORT bool ArMTXIO::setDigitalOutputControl1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + + ArLog::log(ArLog::Verbose, + "ArMTXIO::setDigitalOutputControl1: Setting Output register 1 = 0x%02x", *val); + + req.myReg = MTX_DIO_OUTPUT_CTRL1; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setDigitalOutputControl1() failed to set Digital IO Output Control 1 Register %d %d %d", + req.myReg, req.mySize, *val); + return false; + } + + return true; + +} + + +AREXPORT bool ArMTXIO::getDigitalOutputControl2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_DIO_OUTPUT_CTRL2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getDigitalOutputControl2() failed to get Digital IO Output Control 2 Register"); + return false; + } + + *val = req.myData.myVal8; + + ArLog::log(ArLog::Verbose, + "ArMTXIO::getDigitalOutputControl2: Output register 2 = 0x%02x", *val); + + return true; +} + +AREXPORT bool ArMTXIO::setDigitalOutputControl2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + ArLog::log(ArLog::Verbose, + "ArMTXIO::setDigitalOutputControl2: Setting Output register 2 = 0x%02x", *val); + + + req.myReg = MTX_DIO_OUTPUT_CTRL2; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setDigitalOutputControl2() failed to set Digital IO Output Control 2 Register"); + return false; + } + + return true; + +} + + +AREXPORT bool ArMTXIO::getPeripheralPower1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PERIPH_PWR_CTRL1; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getPeripheralPower1() failed to get Peripheral Power Control 1 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setPeripheralPower1(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PERIPH_PWR_CTRL1; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setPeripheralPower1() failed to set Peripheral Power Control 1 Register - errno = %d", errno); + return false; + } + + return true; + +} + + +AREXPORT bool ArMTXIO::getPeripheralPower2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PERIPH_PWR_CTRL2; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getPeripheralPower2() failed to get Peripheral Power Control 2 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setPeripheralPower2(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PERIPH_PWR_CTRL2; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setPeripheralPower2() failed to set Peripheral Power Control 2 Register - errno = %d", errno); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getPeripheralPower3(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PERIPH_PWR_CTRL3; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getPeripheralPower3() failed to get Peripheral Power Control 3 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setPeripheralPower3(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_PERIPH_PWR_CTRL3; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setPeripheralPower3() failed to set Peripheral Power 3 Register"); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getMotionPowerStatus(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_MOTION_PWR_STATUS; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getMotionPowerStatus() failed to get Peripheral Power Control 3 Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setPeripheralPowerBankOutputs(int bank, unsigned char val) +{ + if(!myEnabled) + return false; + switch(bank) + { + case 0: + return setPeripheralPower1(&val); + case 1: + return setPeripheralPower2(&val); + case 2: + return setPeripheralPower3(&val); + default: + return false; + } + return false; +} + + +AREXPORT bool ArMTXIO::getPeripheralPowerBankOutputs(int bank, unsigned char *val) +{ + if(!myEnabled) + return false; + switch(bank) + { + case 0: + return getPeripheralPower1(val); + case 1: + return getPeripheralPower2(val); + case 2: + return getPeripheralPower3(val); + default: + return false; + } + return false; +} + +AREXPORT bool ArMTXIO::getLIDARControl(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LIDAR_CTRL; + req.mySize = sizeof(unsigned char); + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::LIDARControl() failed to get LIDAR Control Register"); + return false; + } + + *val = req.myData.myVal8; + return true; +} + +AREXPORT bool ArMTXIO::setLIDARControl(unsigned char *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_LIDAR_CTRL; + req.mySize = sizeof(unsigned char); + req.myData.myVal8 = *val; + + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setLIDARControl() failed to set LIDAR ControlRegister"); + return false; + } + + return true; + +} + +AREXPORT bool ArMTXIO::getAnalogIOBlock1(int analog, unsigned short *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + // we first need to get the semaphore controlling the block + // we do this by writing to it - then reading it to make sure + // we have obtained it + + unsigned char semTmp = 1; + if (!setSemaphore1(&semTmp)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock1() failed to set (%d) Semaphore 1", semTmp); + return false; + } + + unsigned char semVal; + + if (!getSemaphore1(&semVal)) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock1() failed to get Semaphore 1"); + return false; + } + + if (semVal == 0) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock1() Semaphore 1 is busy"); + return false; + } + + req.myReg = MTX_DPRAM_BLOCK1 + analog; + req.mySize =16; + + bool noErr = true; + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock1() failed to get Block 1 (%d)", analog); + noErr = false; + } + + *val = req.myData.myVal16; + + semTmp = 0; + if (!setSemaphore1(&semTmp)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock1() failed to set (%d) Semaphore 1", semTmp); + return false; + } + + if (!getSemaphore1(&semVal)) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock1() failed to get Semaphore 1"); + return false; + } + + if (semVal != 0) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock1() Semaphore 1 is busy"); + return false; + } + + return noErr; +} + + +AREXPORT bool ArMTXIO::getAnalogIOBlock2(int analog, unsigned short *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + // we first need to get the semaphore controlling the block + // we do this by writing to it - then reading it to make sure + // we have obtained it + + unsigned char semTmp = 1; + if (!setSemaphore2(&semTmp)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to set (%d) Semaphore 2", semTmp); + return false; + } + + unsigned char semVal; + + if (!getSemaphore2(&semVal)) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock2() failed to get Semaphore 2"); + return false; + } + + if (semVal == 0) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock2() Semaphore 2 is busy"); + return false; + } + + req.myReg = MTX_DPRAM_BLOCK2 + analog; + req.mySize =16; + + bool noErr = true; + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock2() failed to get Block 2 (%d)", analog); + noErr = false; + } + + *val = req.myData.myVal16; + + // what happens if this fails? + semTmp = 0; + if (!setSemaphore2(&semTmp)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to set (%d) Semaphore 2", semTmp); + return false; + } + + if (!getSemaphore2(&semVal)) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock2() failed to get Semaphore 2"); + return false; + } + + if (semVal != 0) { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogIOBlock2() Semaphore 2 is busy"); + return false; + } + + return noErr; +} + + +AREXPORT bool ArMTXIO::setAnalogIOBlock2(int analog, unsigned short *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + // we first need to get the semaphore controlling the block + // we do this by writing to it - then reading it to make sure + // we have obtained it + + unsigned char semTmp = 1; + if (!setSemaphore2(&semTmp)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to set (%d) Semaphore 2", semTmp); + return false; + } + + unsigned char semVal; + + if (!getSemaphore2(&semVal)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to get Semaphore 2"); + return false; + } + + if (semVal == 0) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() Semaphore 2 is busy"); + return false; + } + + req.myReg = MTX_DPRAM_BLOCK2 + analog; + req.mySize =16; + req.myData.myVal16 = *val; + + bool noErr = true; + if (ioctl(myFD, MTX_WRITE_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to get Block 2 (%d)", analog); + noErr = false; + } + + semTmp = 1; + if (!setSemaphore2(&semTmp)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to set (%d) Semaphore 2", semTmp); + return false; + } + + if (!getSemaphore2(&semVal)) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() failed to get Semaphore 2"); + return false; + } + + if (semVal != 0) { + ArLog::log(ArLog::Normal, "ArMTXIO::setAnalogIOBlock2() Semaphore 2 is busy"); + return false; + } + + + return noErr; +} + +AREXPORT bool ArMTXIO::getAnalogValueRaw(int *val) +{ +MTX_IOREQ req; + + if (!myEnabled) + return false; + + req.myReg = MTX_DPRAM_BLOCK2; + req.mySize =16; + + if (ioctl(myFD, MTX_READ_REG, &req) != 0) + { + ArLog::log(ArLog::Normal, "ArMTXIO::getAnalogValueRaw() failed to get Block 2"); + return false; + } + + *val = req.myData.myVal16; + + return true; +} + +/** Returns an analog value converted from the raw reading to a scale + if 0-5V. + + @param val the address of the double to store the reading in + @return true if a reading was acquired. false otherwise + **/ +AREXPORT bool ArMTXIO::getAnalogValue(double *val) +{ + int tmp; + + // the reading is 4096 units, for a range of 0-5V + if (getAnalogValueRaw(&tmp)) { + *val = 5 * (tmp/4096.0); + return true; + } + else { + return false; + } +} diff --git a/Legacy/Aria/src/ArMap.cpp b/Legacy/Aria/src/ArMap.cpp new file mode 100644 index 0000000..de827d7 --- /dev/null +++ b/Legacy/Aria/src/ArMap.cpp @@ -0,0 +1,1612 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ariaInternal.h" +#include "ArMap.h" + + +#include "ArLog.h" + + +/** +@page MapFileFormat Map File Format + +ARIA's map file format is used to store data that defines a map of a space +in which the robot can operate. A map file can be loaded, accessed, and +saved using an ArMap object. + +The robot map file is in ASCII text, and may be viewed or edited in any +text editor. +Map file names conventionally end in the suffix ".map". + +A map file contains several types of information, including: +
    +
  • Header information which includes the boundaries of the map, various + data counts, and the resolution (in mm) at which the map was made.
  • +
  • Optional metadata that can be used to define custom object types. + (This is explained in greater detail below.)
  • +
  • Map objects, such as goals and forbidden lines.
  • +
  • Map data: lines and points (in mm).
  • +
+ +A formal description of the map syntax +follows in augmented +Backus-Naur Format (ABNF). +All blank lines in the map file should be ignored. As an exception to ABNF, literal +strings given below are case-sensitive. + +

+A map is an introductory line (e.g. "2D-Map") followed by the metadata +section, followed by some number of data sections: +

+
+ARMAP                = (MapIntro NEWLINE) (MetadataSection) (*DataSection)
+MapIntro             = "2D-Map" / "2D-Map-Ex" / "2D-Map-Ex2"
+
+

+Most of the features described below apply to all of the MapIntro values. +Exceptions are noted in the feature descriptions. +

+

+The MetadataSection section provides information about the map data, adds +objects (Cairns) and also provides storage of application-specific/custom +information. +

+
+MetadataSection      = *MetadataLine
+MetadataLine         = MDKey ":" *(WS MDVal) NEWLINE
+MDKey                = StringID
+MDVal                = Integer / Float / StringID / KeyValPair 
+
+ +

+Most metadata lines fall into one of two categories: a simple list of numeric tokens, +or a StringID followed by a list of either numeric tokens or a set of KeyValuePair +tokens. +

+ +

+The DataSections contain data that was recorded with sensors (e.g. a Laser Rangefinder +for the "DATA" section) and which represent more or less permanent, solid objects +detectable by a robot's range sensors. (This data can be used for localization +and path planning, for instance.) The DATA section is a collection of points +detected by a high-resolution sensor like the LRF. LINES abstracts the world into +a set of flat surfaces. +

+
+DataSection          = (LineIntro NEWLINE *LineLine) / (PointIntro NEWLINE *PointLine)
+LineLine             = XPos WS YPos WS XPos WS YPos NEWLINE
+PointLine            = XPos WS YPos NEWLINE
+; If MapIntro is "2D-Map":
+  LineIntro            = "LINES" 
+  PointIntro           = "DATA"
+; If MapIntro is "2D-Map-Ex" or "2D-Map-Ex2":
+  LineIntro            = "LINES" / SensorName "_LINES"
+  PointIntro           = "DATA" / SensorName "_DATA"
+  SensorName           = StringID
+
+ + +

MetadataSection Details

+ +

+"Cairn" is a common instance of MDKey. A "Cairn" metadata entry looks like this: +

+
+MetaDataLine         =/ Cairn  NEWLINE
+Cairn                = "Cairn:" WS CairnType WS XPos WS YPos WS Theta WS InternalName WS IconName WS Label [WS TypeSpecificData]
+CairnType            = StringID
+XPos                 = Integer
+YPos                 = Integer
+Theta                = Integer
+InternalName         = QuotedString
+IconName             = QuotedString
+Label                = QuotedString
+TypeSpecificData     = *(WS MDKey)
+
+ +

+"MapInfo" is another common instance of MDKey. A "MapInfo" entry can describe custom +map object types for your application beyond the usual Cairn types (see above). +

+
+MetaDataLine         =/ MapInfo NEWLINE
+MapInfo              = "MapInfo:" WS MapInfoClass WS *(KeyValuePair)
+MapInfoClass         = StringID
+
+ +

Data types:

+
+KeyValPair           = (StringID "=" MDVal) /  QUOTE ALNUM "=" Text QUOTE
+Integer              = ["-"] *1(DIGIT)
+Float                = ["-"] *1(DIGIT | ".")
+StringID             = *1 ALNUM     ; One or more alphanumeric characters (no whitespace)
+QuotedText           = QUOTE Text QUOTE
+Text                 = *(ALNUM / WS / PUNCTUATION)
+DIGIT                = ("0"-"9")
+ALPHA                = ("a"-"z" / "A"-"Z")
+ALNUM                = ALPHA / DIGIT
+WS                   = *(" ")       ; Any number of ASCII space characters (incl. 0)
+QUOTE                = %d34         ; ASCII double quote mark (")
+NEWLINE              = %d10         ; ASCII newline (\n)
+PUNCTUATION          = %d32-%d47 / %d58-%d64 / %d92-%d96 / %d123-%d126
+ANY                  = %d32-%d126   ; Any ASCII text
+
+ + + +

+ +In addition to Cairn and MapInfo, other Common IDs for MDKey are: +

+
Sources
+ +
If multiple sensors were used to compile the points and lines + in the DataSection, they are listed here. The first sensor is + the default sensor; the data for it are not prefixed (i.e. + plain MinPos, MaxPos, DATA, and LINES). The data for any additional + sensors are prefixed by the sensor name (i.e. +SensorNameMinPos, + SensorNameMaxPos, SensorName_DATA, +SensorName_LINES). + (2D-Map-Ex and 2D-Map-Ex2 feature.) +
+ +
MinPos or SensorNameMinPos
+
"Minimum" value in DATA (defines opposite corner to MaxPos of a bounding box)
+
MaxPos or SensorNameMaxPos
+
"Maximum" value in DATA (defines opposite corner to MinPos of a bounding box)
+
NumPoints or SensorNumPoints
+
Number of entries in the DATA section. (Note, it is recommended that +you do not rely on this value if possible; instead simply count the number of +lines in the DATA section)
+
LineMinPos or SensorNameLineMinPos
+
"Minimum" value in LINES (defines opposite corner to LineMaxPos of a bounding box)
+
LineMaxPos or SensorNameLineMaxPos
+
"Maximum" value in LINES (defines opposite corner to LineMinPos of a bounding box)
+
NumLines or SensorNameNumLines
+
Number of entries in the LINES section. (Note, it is recommended that +you do not rely on this value if possible; instead simply count the number of +lines in the LINES section)
+
Resolution or SensorNameResolution
+
Grid resolution of the DATA points and the LINE endpoint positions.
+
PointsAreSorted or SensorNamePointsAreSorted
+
true if the points DATA are sorted, false if not.
+
LinesAreSorted or SensorNamePointsAreSorted
+
true if the LINES data are sorted, false if not.
+
Display or SensorNameDisplay
+
Text to display in user interface etc. when referring to this sensor +data source.
+
OriginLatLonAlt
+
Latitude, longitude and altitude of the map's center (0, 0) point in +the WGS84 datum. (Only present in "outdoor" maps made for use with MOGS.)
+
Cairn
+
Defines a special object in the map with semantic meaning. See below.
+
MapInfo
+
Describes custom cairn types. See below.
+
CustomInfo
+
Placeholder for custom application data which will be maintained + if the map is edited by Mapper3 or MobilePlanner. (2D-Map-Ex2 feature.)
+
+ New values may be added in the future, or used only by some applications. +

+ + +

+Common CairnType values are: +

+
Goal
+
A named goal. Theta should be ignored. The name of the goal is provided in Label.
+
GoalWithHeading
+
A named goal. Theta indicates a final heading. The name of the goal is provided in Label.
+
RobotHome
+
A possible starting position of a robot.
+
Dock
+
A position and heading at which a docking maneuver may be initiated
+
ForbiddenLine
+
Specifies a line that any automatic navigation procedure should avoid crossing. + This Cairn type has the following TypeSpecificData, which defines the endpoints + of the line: +
+TypeSpecificData     =/ ForbiddenLineData
+ForbiddenLineData    =  XPos WS YPos WS XPos WS YPos
+
+ The normal Cairn pose is not used for ForbiddenLine. +
+
ForbiddenArea
+
Specifies a rectangular area that any automatic navigation procedure should avoid entering. + This Cairn type has the following TypeSpecificData, which defines the upper-left and + lower-right opposing corners of the rectangle: +
+TypeSpecificData     =/ ForbiddenAreaData
+ForbiddenAreaData    =  XPos WS YPos WS XPos WS YPos
+
+ The normal Cairn pose for ForbiddenArea defines an offset of + the geometric center of the area, plus a rotation of the area. + (Typically, XPos and YPos will always be 0 for ForbiddenArea, but Theta may be + used to provide the rotation of the rectangular area). +
+
+ +

+ +

The InternalName and IconName tokens in Cairn data +are not currently used. Typically, InternalName is simply an empty quoted +string ("") and IconName is the placeholder value "ICON". +You should preserve them when reading and writing map files though, as they may +be used in the future. +

+

Note, It is be better to calculate maximum, minimum, and number of +points or lines based on the data in the map, if possible, rather than +relying on the metadata header. +

+

So what the heck is a "cairn"? The word is from the Scottish Gaelic, Old Irish +and Welsh "carn" and Middle English "carne". A cairn is a pile of stones, +placed in the landscape as a memorial, navigation aid, or other marker. So we +use it to indicate a semantically meaningful object placed at some point by the +human mapmaker (rather than something detectable by the robot). +

+

+ Currently used MapInfoClass keywords include: +

+
GoalType
define a custom goal subtype
+
DockType
define a custom dock subtype
+
LocationType
define a custom other generic poses on the map
+
BoundaryType
define a custom line on the map
+
SectorType
defines a custom rectangular area (which may be rotated)
+
+ The following ParamNames are valid for all MapInfoClass keywords: +
+
Name=Text
Name of the type that is being defined. +
Label=Text
Label that is displayed for the type in a GUI, etc.
+
Desc=Text
Longer description of the type that is displayed in a GUI, etc.
+
+For more information about the use of MapInfo metadata, see the discussion above. +

+ +@section MapCustomObjects Defining Custom Map Objects + * + * In addition to the standard map object types, is also possible to define + * additional types of objects in a map file using + * the "MapInfo" metadata section. For example, if you wished to program + * some special behavior that would only occur upon reaching certain goals, + * you could define a new goal type as follows: + *
+ *    MapInfo: GoalType Name=SpecialGoal "Label=Special" "Desc=Doing special stuff" Heading=Required Shape=VBars "Color0=0xff0000"
+ * 
+ * The new goal type will appear be available in Mapper3 and MobilePlanner in + * a drop-down menu. Instances in the map will also be displayed by MobileEyes. + * + * + * Please read the following information carefully if you plan to use this + * feature. + * + * Each MapInfo line is of the format: + *
+ *       MapInfo: Keyword ([ParamName=ParamValue] )*  ; A keyword followed by a space-separated list of Key=Value or "Key=Value" tokens.
+ * 
+ * + *

+ * The following values for Keyword are currently supported: + * - GoalType : defines a goal subtype + * - DockType : defines a dock subtype + * - LocationType : defines another kind of point in the map + * - BoundaryType : defines a line object in the map + * - SectorType : defines a rectangular area of some kind in the map (which may be rotated) + * - ArgDesc: defines a parameter for the preceding type (2D-Map-Ex2 feature) + * . + * + * The available parameters depend on the Keyword. Unless otherwise specified, + * parameters are optional. + * + * If a parameter value contains a space, then both the parameter name and + * value must be enclosed within quotes. For example: + *

+ *      "Label=Normal Goal"
+ * 
+ * Neither the name nor the value can contain the special characters #, + * %, or ". + * + * The following ParamNames are valid for all keywords except + * ArgDesc: + * - Name=String : Text name of the type that is being defined. (Required.) + * - Label=String : Label that is displayed for the type in popup menus, etc. + * - Desc=String : Description of the type that is displayed in tool tips, etc. + * - Vis=[AlwaysOn|DefaultOn|DefaultOff|AlwaysOff] : Specifies the + * visibility of the associated item type. The default is + * DefaultOn. + * (This parameter is currently primarily supported for IsData=1 items only. + * See BoundaryType. In particular, if DefaultOff is specified for a + * non-data-item, there currently is no way in Mapper3, MobilePlanner or MobileEyes to + * subsequently show it.) + * . + * + * For GoalType, DockType, and + * LocationType, the following ParamNames are + * also supported: + *
    + *
  • Shape=[Plain|Cross|HBars|Triangle|T|U|VBars] : Shape of the icon used + * to draw the pose. (The default is Plain.) + *
      + *
    • Plain: The default shape, a filled square + *
    • Cross: A cross shape + *
    • HBars: A square shape containing horizontal bars or stripes + *
    • Label: A location that simply marks a text label expected to be + * used with LocationType and a fixed size font (FtFix, see below) + *
    • Triangle: A Triangle + *
    • T: A "T" shape + *
    • U: A "U" shape + *
    • VBars: A square shape containing vertical bars or stripes + *
    +
  • + *
  • Size=Integer : Width/height of the displayed icon in mm. + *
  • Color0|1|2=ColorVal : Colors with which to draw the icon. + * (In general, Color0 is the primary icon color, Color1 is the heading + * color, and Color2 is the background/outline color.) ColorVal + * is a hexadecimal number starting with 0x, and followed + * by two digits for the red component, two digits for green, and two + * digits for blue. For example, 0xff00ff. + *
  • FtFix=Integer : A boolean. Set to 0 if the label font should be scaled + * when the map is zoomed (the default) set to 1 if the label should remain + * a fixed size. Note that the label font will only be scaled if the platform + * supports it. Also note that if this is set to 1, then the FtSize must + * also be specified. + *
  • FtSize=Integer : Point size of the displayed font. This will vary greatly + * depending on the value of FtFix. If the font is scaled, then + * the point size is expressed in mm and must be a multiple + * of 100. If the font is fixed, then the point size is in pixels. + * (If the font should be scaled, but the platform does not support it, + * then a best guess is made as to the desired size.) + *
+ * + * In addition, the following ParamName is supported only for + * GoalTypes: +
    + *
  • Heading=[Required|Optional|Never] : Whether a heading is required + * to be given with this goal, is optional, or is irrelevant. + *
+ * + * For BoundaryType, the following ParamNames are also supported: + *
    + *
  • NameRequired=0|1 : Whether the item must be named + * (1=true, 0=false) + *
  • Shape=[Plain|Measure|Dash] Shape or decoration of the line. + * (The default is Plain.) + *
  • Color0|1|2=ColorVal: Color with which to draw the line. + *
  • IsData=0|1 : Set to 1 to indicate that the item is inherently + * part of the map data. The default is 0 to indicate user-created + * items. + *
  • FtFix=Integer : A boolean. Set to 0 if the label font should be scaled + * when the map is zoomed (the default) set to 1 if the label should remain + * a fixed size. Note that the label font will only be scaled if the platform + * supports it. Also note that if this is set to 1, then the FtSize must + * also be specified. + *
  • FtSize=Integer : Point size of the displayed font. This will vary greatly + * depending on the value of FtFix. If the font is scaled, then + * the point size is expressed in mm and must be a multiple + * of 100. If the font is fixed, then the point size is in pixels. + * (If the font should be scaled, but the platform does not support it, + * then a best guess is made as to the desired size.) + *
+ * + * For SectorType, the following ParamNames are also supported: + *
    + *
  • NameRequired=0|1 : Whether the item must be named + *
  • Shape=[Plain| + * Arrow|FillArrow|GradArrow| + * Door| + * Elevator| + * Stairs| + * Circle|FillCircle| + * Cross|FillCross| + * Diamond|FillDiamond| + * Octagon|FillOctagon| + * PrefWayDriveOnLeft|FillPrefWayDriveOnLeft|GradPrefWayDriveOnLeft| + * PrefWayDriveOnRight|FillPrefWayDriveOnRight|GradPrefWayDriveOnRight| + * Star|FillStar| + * Triangle|FillTriangle| + * TwoWayDriveOnLeft|FillTwoWayDriveOnLeft|GradTwoWayDriveOnLeft| + * TwoWayDriveOnRight|FillTwoWayDriveOnRight|GradTwoWayDriveOnRight| + * Dash] + * + * Shape of the icon used to draw the rectangle. The default is Plain. + * The Dash shape means that the rectangle is drawn with a dashed outline. + * The Door, Elevator, and Stairs shapes designate + * a special icon to be drawn in the rectangle. All other shapes refer to a repeating + * pattern of geometric shapes. If the Fill prefix is specified, then the + * geometric shape is filled with Color1. If the Grad prefix is specified + * (when available), then the geometric shape is filled with a gradient, shaded pattern + * from Color0 to Color1. + *
  • Color0|1=ColorVal: Colors with which to draw the + * rectangle. (In general, Color0 is the primary rectangle color, + * Color1 is the shape/icon color.) + *
+ * + * + * Important Note: if a map defines special GoalType or + * DockType items, + * then it must define all possible Cairn types, including the + * default "Goal", "GoalWithHeading", and "Dock" types if you want those + * types to remain available. + * + * The MapInfo ArgDesc lines may be used to define one or more configurable + * parameters for a custom map object type. (2D-Map-Ex2 feature.) + * The ArgDesc must appear after its parent type definition and can contain + * the following parameters: + * - Name=String : The text name of the parameter being defined. This + * must be the first item in the line (after ArgDesc) and must be unique + * for the given parent. (Required) + * - Parent=String : The text name of the parent map object type (e.g. + * SpecialGoal, RobotHome, ...). This must be the second item in the line, + * immediately following the Name. (Required) + * - Priority=Important|Normal|Detailed : The priority of the parameter + * (Required) + * - Type=int|double|string|bool : The type of the parameter's value + * (Required) + * - Value=String : An optional initial value for the parameter (as + * appropriate for the type) + * - Min=Number : An optional minimum value for the parameter; valid only + * if Type=int or Type=double + * - Max=Number : An optional maximum value for the parameter; valid only + * if Type=int or Type=double + * - Display=String : An optional display hint that may be used by the + * client to improve display of the parameter. See ArConfigArg::setDisplayHint() + * for a list of the currently supported display hints. + * . + * + * If a cairn instance with parameters is defined in the map file, then the + * parameter values are stored in a special CairnInfo Metadatasection line. + * (2D-Map-Ex2 feature.) + * . +**/ + +AREXPORT ArMap::ArMap(const char *baseDirectory, + bool addToGlobalConfig, + const char *configSection, + const char *configParam, + const char *configDesc, + bool ignoreEmptyFileName, + ArPriority::Priority priority, + const char *tempDirectory, + int configProcessFilePriority) : + + myMutex(), + myBaseDirectory((baseDirectory != NULL) ? baseDirectory : ""), + myFileName(), + myReadFileStat(), + + myConfigParam((configParam != NULL) ? configParam : ""), + myIgnoreEmptyFileName(ignoreEmptyFileName), + myIgnoreCase(false), + + myConfigProcessedBefore(false), + myConfigMapName(), + myForceMapLoad(false), + + myCurrentMap(new ArMapSimple(baseDirectory, tempDirectory)), + myLoadingMap(NULL), + + myIsQuiet(false), + + myProcessFileCB(this, &ArMap::processFile) +{ + myMutex.setLogName("ArMap::myMutex"); + myConfigMapName[0] = '\0'; + myProcessFileCB.setName("ArMap"); + +#ifndef ARINTERFACE + if (addToGlobalConfig) + { + ArLog::log(ArLog::Verbose, + "ArMap: adding parameter \"%s\" to ArConfig section \"%s\"", + configParam, configSection); + + myConfigMapName[0] = '\0'; + myConfigProcessedBefore = false; + myForceMapLoad = false; + const char *displayHint = "RobotFile:Map Files (*.map)|*.map"; + + Aria::getConfig()->addParam(ArConfigArg(configParam, + myConfigMapName, + configDesc, + sizeof(myConfigMapName)), + configSection, + priority, + displayHint); + Aria::getConfig()->addProcessFileWithErrorCB(&myProcessFileCB, + configProcessFilePriority); + } +#endif //ARINTERFACE + +} // end ctor + +AREXPORT ArMap::ArMap(const ArMap &other) : + myMutex(), + myBaseDirectory((other.getBaseDirectory() != NULL) ? other.getBaseDirectory() : ""), + myFileName((other.getFileName() != NULL) ? other.getFileName() : ""), + myReadFileStat(other.getReadFileStat()), + + myConfigParam(""), + myIgnoreEmptyFileName(false), + myIgnoreCase(false), + + // myMapChangedHelper(NULL), + + myConfigProcessedBefore(false), // TODO This is not always init in ArMap + myConfigMapName(), + myForceMapLoad(false), + + + myCurrentMap(new ArMapSimple(*other.myCurrentMap)), + myLoadingMap(NULL), + + myIsQuiet(false), + + //myCurrentMapChangedCB(this, &ArMap::handleCurrentMapChanged), + myProcessFileCB(this, &ArMap::processFile) +{ + myMutex.setLogName("ArMap::myMutex"); + myConfigMapName[0] = '\0'; + myProcessFileCB.setName("ArMap"); + +// myMapChangedHelper = new ArMapChangedHelper(); + +// myCurrentMap->addMapChangedCB(&myCurrentMapChangedCB); + + // Do not add copy to config + +} // end copy ctor + +AREXPORT ArMap &ArMap::operator=(const ArMap &other) +{ + if (this != &other) { + + lock(); + + myBaseDirectory = ((other.getBaseDirectory() != NULL) ? + other.getBaseDirectory() : ""); + myFileName = ((other.getFileName() != NULL) ? + other.getFileName() : ""); + myReadFileStat = other.getReadFileStat(); + + + /** + myConfigParam + myIgnoreEmptyFileName(false), + myIgnoreCase(false), + + myMapChangedHelper(NULL), + + myConfigProcessedBefore(false), // TODO This is not always init in ArMap + myConfigMapName(), + myForceMapLoad(false), + **/ + + *myCurrentMap = *other.myCurrentMap; + + delete myLoadingMap; + myLoadingMap = NULL; + + if (other.myLoadingMap != NULL) { + myLoadingMap = new ArMapSimple(*other.myLoadingMap); + } + + unlock(); + + /** + myIsQuiet(false), + + myCurrentMapChangedCB(this, &ArMap::handleCurrentMapChanged), + myProcessFileCB(this, &ArMap::processFile) + **/ + } + return *this; + +} // end operator= + + +AREXPORT ArMap::~ArMap(void) +{ + delete myLoadingMap; + //myLoadingMap = NULL; + + delete myCurrentMap; + //myCurrentMap = NULL; + +// delete myMapChangedHelper; +// myMapChangedHelper = NULL; + +} // end dtor + + +AREXPORT ArMapInterface *ArMap::clone() +{ + // TODO: There is currently an issue with creating another ArMap (and I + // can't remember exactly what it is). Creating a simple copy appears + // to be sufficient at the moment. + + //ArMap *copy = new ArMap(*this); + ArMapSimple *copy = new ArMapSimple(*myCurrentMap); + + return copy; +} + + +AREXPORT bool ArMap::set(ArMapInterface *other) +{ + if (other == NULL) { + return false; + } + // TODO: What about mapChanged and times? + + bool isSuccess = myCurrentMap->set(other); + return isSuccess; + +} // end method set + + +AREXPORT void ArMap::clear() +{ + myCurrentMap->clear(); +} + + +AREXPORT std::list ArMap::getScanTypes() const +{ + return myCurrentMap->getScanTypes(); +} + +AREXPORT bool ArMap::setScanTypes(const std::list &scanTypeList) +{ + return myCurrentMap->setScanTypes(scanTypeList); +} + + +AREXPORT struct stat ArMap::getReadFileStat() const +{ + return myCurrentMap->getReadFileStat(); +} + +AREXPORT void ArMap::addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position) +{ + myCurrentMap->addPreWriteFileCB(functor, position); + +} // end method addPreWriteFileCB + +AREXPORT void ArMap::remPreWriteFileCB(ArFunctor *functor) +{ + myCurrentMap->remPreWriteFileCB(functor); + +} // end method remPreWriteFileCB + +AREXPORT void ArMap::addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position) +{ + myCurrentMap->addPostWriteFileCB(functor, position); + +} // end method addPostWriteFileCB + +AREXPORT void ArMap::remPostWriteFileCB(ArFunctor *functor) +{ + myCurrentMap->remPostWriteFileCB(functor); + +} // end method remPostWriteFileCB + +AREXPORT bool ArMap::readFile(const char *fileName) { + return readFile(fileName, NULL, 0, NULL, 0); +} + +AREXPORT bool ArMap::readFile(const char *fileName, char *errorBuffer, size_t errorBufferLen) { + return readFile(fileName, errorBuffer, errorBufferLen, NULL, 0); +} + +AREXPORT bool ArMap::readFile(const char *fileName, + char *errorBuffer, + size_t errorBufferLen, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen) +{ + // TODO + ArLog::log(ArLog::Normal, + "ArMap::readFile() %s", + fileName); + + lock(); + + // Little worried that this is not going to work... Might want to do more of a + // copy ctor type of action.... (This would leave the actual memory address intact.) + + if (myLoadingMap != NULL) { + delete myLoadingMap; + myLoadingMap = NULL; + } + myLoadingMap = new ArMapSimple(myBaseDirectory.c_str(), + myCurrentMap->getTempDirectory(), + "ArMapLoading::myMutex"); + myLoadingMap->setQuiet(myIsQuiet); + + std::string realFileName = ArMapInterface::createRealFileName + (myBaseDirectory.c_str(), + fileName, + myIgnoreCase); + myLoadingMap->setSourceFileName(NULL, // TODO + realFileName.c_str()); + + bool isSuccess = myLoadingMap->readFile(fileName, + errorBuffer, + errorBufferLen, + md5DigestBuffer, + md5DigestBufferLen); + + if (isSuccess) { + + ArTime copyTime; + + *myCurrentMap = *myLoadingMap; + //myCurrentMap->set(myLoadingMap); + + int elapsed = copyTime.mSecSince(); + + ArLog::log(ArLog::Normal, + "ArMap::readFile() took %i msecs to copy loading map", + elapsed); + + myFileName = fileName; + myReadFileStat = myCurrentMap->getReadFileStat(); + + delete myLoadingMap; + myLoadingMap = NULL; + } + + ArLog::log(myCurrentMap->getMapChangedLogLevel(), + "ArMap::readFile() Calling mapChanged()"); + mapChanged(); + ArLog::log(myCurrentMap->getMapChangedLogLevel(), + "ArMap::readFile() Finished mapChanged()"); + + unlock(); + return isSuccess; + +} // end method readFile + + +AREXPORT bool ArMap::writeFile(const char *fileName, + bool internalCall, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen, + time_t fileTimestamp) +{ + if (!internalCall) { + ArLog::log(ArLog::Normal, + "ArMap::writeFile(%s) about to lock", + fileName); + lock(); + ArLog::log(ArLog::Normal, + "ArMap::writeFile(%s) locked", + fileName); + + } + + bool isSuccess = myCurrentMap->writeFile(fileName, + true, // ?? TODO + md5DigestBuffer, + md5DigestBufferLen, + fileTimestamp); + + if (isSuccess) { + myReadFileStat = myCurrentMap->getReadFileStat(); + } + + if (!internalCall) + unlock(); + return true; + +} // end method writeFile + + +AREXPORT bool ArMap::calculateChecksum(unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen) +{ + return myCurrentMap->calculateChecksum(md5DigestBuffer, + md5DigestBufferLen); +} + + +AREXPORT const char *ArMap::getBaseDirectory(void) const +{ + return myBaseDirectory.c_str(); + +} // end method getBaseDirectory + + +AREXPORT const char *ArMap::getFileName(void) const +{ + return myFileName.c_str(); + +} // end method getFileName + + +AREXPORT void ArMap::setIgnoreEmptyFileName(bool ignore) +{ + myIgnoreEmptyFileName = ignore; + myCurrentMap->setIgnoreEmptyFileName(ignore); // ?? TODO + +} // end method setIgnoreEmptyFileName + +AREXPORT bool ArMap::getIgnoreEmptyFileName(void) +{ + return myIgnoreEmptyFileName; + +} // end method getIgnoreEmptyFileName + +AREXPORT void ArMap::setIgnoreCase(bool ignoreCase) +{ + myIgnoreCase = ignoreCase; + myCurrentMap->setIgnoreCase(ignoreCase); // ?? TODO + +} // end method setIgnoreCase + +AREXPORT bool ArMap::getIgnoreCase(void) +{ + return myIgnoreCase; + +} // end method getIgnoreCase + + +AREXPORT void ArMap::setBaseDirectory(const char *baseDirectory) +{ + if (baseDirectory != NULL) { + myBaseDirectory = baseDirectory; + } + else { + myBaseDirectory = ""; + } + myCurrentMap->setBaseDirectory(baseDirectory); // ?? TODO + +} // end method setBaseDirectory + + +AREXPORT const char *ArMap::getTempDirectory(void) const +{ + return myCurrentMap->getTempDirectory(); +} + +AREXPORT void ArMap::setTempDirectory(const char *tempDirectory) +{ + myCurrentMap->setTempDirectory(tempDirectory); +} + + +AREXPORT void ArMap::setSourceFileName(const char *sourceName, + const char *fileName, + bool isInternalCall) +{ + if (isInternalCall) { + lock(); + } + myCurrentMap->setSourceFileName(sourceName, fileName, true); + if (isInternalCall) { + unlock(); + } +} + + +AREXPORT bool ArMap::getMapId(ArMapId *mapIdOut, + bool isInternalCall) +{ + if (isInternalCall) { + lock(); + } + bool isSuccess = myCurrentMap->getMapId(mapIdOut, true); + if (isInternalCall) { + unlock(); + } + return isSuccess; +} + + +AREXPORT ArArgumentBuilder *ArMap::findMapObjectParams + (const char *mapObjectName) +{ + return myCurrentMap->findMapObjectParams(mapObjectName); +} + +AREXPORT bool ArMap::setMapObjectParams(const char *mapObjectName, + ArArgumentBuilder *params, + ArMapChangeDetails *changeDetails) +{ + return myCurrentMap->setMapObjectParams(mapObjectName, + params, + changeDetails); +} + + +AREXPORT std::list *ArMap::getRemainder() +{ + return myCurrentMap->getRemainder(); +} + +AREXPORT void ArMap::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; + myCurrentMap->setQuiet(isQuiet); + +} // end method setQuiet + + +AREXPORT void ArMap::mapChanged(void) +{ + myCurrentMap->mapChanged(); + +} // end method mapChanged + + +AREXPORT void ArMap::addMapChangedCB(ArFunctor *functor, + int position) +{ + myCurrentMap->addMapChangedCB(functor, position); + +} // end method addMapChangedCB + +AREXPORT void ArMap::remMapChangedCB(ArFunctor *functor) +{ + myCurrentMap->remMapChangedCB(functor); + +} // end method remMapChangedCB + +AREXPORT void ArMap::addPreMapChangedCB(ArFunctor *functor, + int position) +{ + myCurrentMap->addPreMapChangedCB(functor, position); + +} // end method addPreMapChangedCB + +AREXPORT void ArMap::remPreMapChangedCB(ArFunctor *functor) +{ + myCurrentMap->remPreMapChangedCB(functor); + +} // end method remPreMapChangedCB + + + + +AREXPORT void ArMap::setMapChangedLogLevel(ArLog::LogLevel level) +{ + myCurrentMap->setMapChangedLogLevel(level); + +} // end method setMapChangedLogLevel + +AREXPORT ArLog::LogLevel ArMap::getMapChangedLogLevel(void) +{ + return myCurrentMap->getMapChangedLogLevel(); + +} // end method getMapChangedLogLevel + + +AREXPORT int ArMap::lock() +{ + return myMutex.lock(); + +} // end method lock + +AREXPORT int ArMap::tryLock() +{ + return myMutex.tryLock(); + +} // end method tryLock + +AREXPORT int ArMap::unlock() +{ + return myMutex.unlock(); + +} // end method unlock + +// --------------------------------------------------------------------------- +// ArMapInfoInterface +// --------------------------------------------------------------------------- + +AREXPORT std::list *ArMap::getInfo(const char *infoName) +{ + return myCurrentMap->getInfo(infoName); + +} // end method getInfo + +AREXPORT std::list *ArMap::getInfo(int infoType) +{ + return myCurrentMap->getInfo(infoType); + +} // end method getInfo + +AREXPORT std::list *ArMap::getMapInfo(void) +{ + return myCurrentMap->getInfo(ArMapInfo::MAP_INFO_NAME); + +} // end method getMapInfo + +AREXPORT int ArMap::getInfoCount() const +{ + return myCurrentMap->getInfoCount(); +} + +AREXPORT std::list ArMap::getInfoNames() const +{ + return myCurrentMap->getInfoNames(); +} + +AREXPORT bool ArMap::setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails) +{ + return myCurrentMap->setInfo(infoName, infoList, changeDetails); + +} // end method setInfo + + +AREXPORT bool ArMap::setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails) +{ + return myCurrentMap->setInfo(infoType, infoList, changeDetails); + +} // end method setInfo + +AREXPORT bool ArMap::setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails) +{ + return myCurrentMap->setInfo(ArMapInfo::MAP_INFO_NAME, mapInfo, changeDetails); + +} // end method setMapInfo + + +AREXPORT void ArMap::writeInfoToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) +{ + return myCurrentMap->writeInfoToFunctor(functor, endOfLineChars); + +} // end method writeInfoToFunctor + + +AREXPORT const char *ArMap::getInfoName(int infoType) +{ + return myCurrentMap->getInfoName(infoType); + +} // end method getInfoName + +// --------------------------------------------------------------------------- +// ArMapObjectsInterface +// --------------------------------------------------------------------------- + +AREXPORT ArMapObject *ArMap::findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading) +{ + return myCurrentMap->findFirstMapObject(name, type, isIncludeWithHeading); + +} // end method findFirstMapObject + + +AREXPORT ArMapObject *ArMap::findMapObject(const char *name, + const char *type, + bool isIncludeWithHeading) +{ + return myCurrentMap->findFirstMapObject(name, type, isIncludeWithHeading); + +} // end method findMapObject + +AREXPORT std::list ArMap::findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading) +{ + return myCurrentMap->findMapObjectsOfType(type, isIncludeWithHeading); +} + +AREXPORT std::list *ArMap::getMapObjects(void) +{ + return myCurrentMap->getMapObjects(); + +} // end method getMapObjects + + +AREXPORT void ArMap::setMapObjects + (const std::list *mapObjects, + bool isSortedObjects, + ArMapChangeDetails *changeDetails) +{ + return myCurrentMap->setMapObjects(mapObjects, isSortedObjects, changeDetails); + +} // end method setMapObjects + + +AREXPORT void ArMap::writeObjectsToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + bool isOverrideAsSingleScan, + const char *maxCategory) +{ + myCurrentMap->writeObjectsToFunctor(functor, + endOfLineChars, + isOverrideAsSingleScan, + maxCategory); + +} // end method writeObjectsToFunctor + + +AREXPORT void ArMap::writeObjectListToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) +{ + myCurrentMap->writeObjectListToFunctor(functor, endOfLineChars); + +} // end method writeObjectListToFunctor + +// --------------------------------------------------------------------------- +// ArMapScanInterface +// --------------------------------------------------------------------------- + +AREXPORT bool ArMap::hasOriginLatLongAlt() +{ + return myCurrentMap->hasOriginLatLongAlt(); + +} // end method hasOriginLatLongAlt + +AREXPORT ArPose ArMap::getOriginLatLong() +{ + return myCurrentMap->getOriginLatLong(); + +} // end method getOriginLatLong + +AREXPORT double ArMap::getOriginAltitude() +{ + return myCurrentMap->getOriginAltitude(); + +} // end method getOriginAltitude + +AREXPORT void ArMap::setOriginLatLongAlt(bool hasOriginLatLong, + const ArPose &originLatLong, + double altitude, + ArMapChangeDetails *changeDetails) + +{ + myCurrentMap->setOriginLatLongAlt(hasOriginLatLong, + originLatLong, + altitude, + changeDetails); + +} // end method setOriginLatLongAlt + +AREXPORT void ArMap::writeSupplementToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) +{ + myCurrentMap->writeSupplementToFunctor(functor, endOfLineChars); + +} // end method writeSupplementToFunctor + + +// --------------------------------------------------------------------------- +// ArMapScanInterface +// --------------------------------------------------------------------------- + +AREXPORT const char *ArMap::getDisplayString(const char *scanType) +{ + return myCurrentMap->getDisplayString(scanType); +} + +AREXPORT std::vector *ArMap::getPoints(const char *scanType) +{ + return myCurrentMap->getPoints(scanType); + +} // end method getPoints + +AREXPORT std::vector *ArMap::getLines(const char *scanType) +{ + return myCurrentMap->getLines(scanType); + +} // end method getLines + +AREXPORT ArPose ArMap::getMinPose(const char *scanType) +{ + return myCurrentMap->getMinPose(scanType); + +} // end method getMinPose + +AREXPORT ArPose ArMap::getMaxPose(const char *scanType) +{ + return myCurrentMap->getMaxPose(scanType); + +} // end method getMaxPose + +AREXPORT int ArMap::getNumPoints(const char *scanType) +{ + return myCurrentMap->getNumPoints(scanType); + +} // end method getNumPoints + +AREXPORT ArPose ArMap::getLineMinPose(const char *scanType) +{ + return myCurrentMap->getLineMinPose(scanType); + +} // end method getLineMinPose + +AREXPORT ArPose ArMap::getLineMaxPose(const char *scanType) +{ + return myCurrentMap->getLineMaxPose(scanType); + +} // end method getLineMaxPose + +AREXPORT int ArMap::getNumLines(const char *scanType) +{ + return myCurrentMap->getNumLines(scanType); + +} // end method getNumLines + +AREXPORT int ArMap::getResolution(const char *scanType) +{ + return myCurrentMap->getResolution(scanType); + +} // end method getResolution + + +AREXPORT bool ArMap::isSortedPoints(const char *scanType) const +{ + return myCurrentMap->isSortedPoints(scanType); +} +AREXPORT bool ArMap::isSortedLines(const char *scanType) const +{ + return myCurrentMap->isSortedLines(scanType); +} + +AREXPORT void ArMap::setPoints(const std::vector *points, + const char *scanType, + bool isSorted, + ArMapChangeDetails *changeDetails) +{ + myCurrentMap->setPoints(points, scanType, isSorted, changeDetails); + +} // end method setPoints + +AREXPORT void ArMap::setLines(const std::vector *lines, + const char *scanType, + bool isSorted, + ArMapChangeDetails *changeDetails) +{ + myCurrentMap->setLines(lines, scanType, isSorted, changeDetails); + +} // end method setLines + +AREXPORT void ArMap::setResolution(int resolution, + const char *scanType, + ArMapChangeDetails *changeDetails) +{ + myCurrentMap->setResolution(resolution, scanType, changeDetails); + +} // end method setResolution + + + +AREXPORT void ArMap::writeScanToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType) +{ + myCurrentMap->writeScanToFunctor(functor, endOfLineChars, scanType); + +} // end method writeScanToFunctor + + +AREXPORT void ArMap::writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType, + ArFunctor1 *keywordFunctor) +{ + return myCurrentMap->writePointsToFunctor(functor, scanType, keywordFunctor); + +} // end method writePointsToFunctor + +AREXPORT void ArMap::writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType, + ArFunctor1 *keywordFunctor) +{ + return myCurrentMap->writeLinesToFunctor(functor, scanType, keywordFunctor); + +} // end method writeLinesToFunctor + +AREXPORT void ArMap::writeToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) +{ + return myCurrentMap->writeToFunctor(functor, endOfLineChars); + +} // end method writeToFunctor + +AREXPORT ArMapInfoInterface *ArMap::getInactiveInfo() +{ + return myCurrentMap->getInactiveInfo(); +} + +AREXPORT ArMapObjectsInterface *ArMap::getInactiveObjects() +{ + return myCurrentMap->getInactiveObjects(); +} + +AREXPORT ArMapObjectsInterface *ArMap::getChildObjects() +{ + return myCurrentMap->getChildObjects(); +} + +// TODO ??????????????????????????????????????? + +AREXPORT bool ArMap::readDataPoint( char *line) +{ + if (myLoadingMap) { + return myLoadingMap->readDataPoint(line); + } + return false; + +} // end method readDataPoint + +AREXPORT bool ArMap::readLineSegment( char *line) +{ + if (myLoadingMap) { + return myLoadingMap->readLineSegment(line); + } + return false; + +} // end method readLineSegment + + +AREXPORT void ArMap::loadDataPoint(double x, double y) +{ + if (myLoadingMap) { + return myLoadingMap->loadDataPoint(x, y); + } + // TODO ArLog + return; + +} // end method loadDataPoint + + +AREXPORT void ArMap::loadLineSegment(double x1, double y1, double x2, double y2) +{ + if (myLoadingMap) { + return myLoadingMap->loadLineSegment(x1, y1, x2, y2); + } + // TODO ArLog + return; + +} // end method loadLineSegment + + + +AREXPORT bool ArMap::addToFileParser(ArFileParser *fileParser) +{ + bool isSuccess = false; + + if (myLoadingMap) { + isSuccess = myLoadingMap->addToFileParser(fileParser) && isSuccess; + } + return isSuccess; + +} // end method addToFileParser + + +AREXPORT bool ArMap::remFromFileParser(ArFileParser *fileParser) +{ + if (myLoadingMap) { + return myLoadingMap->remFromFileParser(fileParser); + } + else { + return false; + } +} + + +AREXPORT bool ArMap::parseLine(char *line) +{ + // Normally, myLoadingMap is already constructed (e.g. in readFile). + // The mapClient example simply calls parseLine and parsingComplete, + // thereby bypassing the normal contruction. And so, it has been + // added here. + if (myLoadingMap == NULL) { + + myLoadingMap = new ArMapSimple(myBaseDirectory.c_str(), + myCurrentMap->getTempDirectory(), + "ArMapLoading::myMutex"); + myLoadingMap->setQuiet(myIsQuiet); + } + + if (myLoadingMap) { + return myLoadingMap->parseLine(line); + } + // TODO ArLog + return false; + +} // end method parseLine + + +AREXPORT void ArMap::parsingComplete(void) +{ + lock(); + + if (myLoadingMap == NULL) { + ArLog::log(ArLog::Terse, + "ArMap::parsingComplete() no map is loading"); + unlock(); + return; + } + *myCurrentMap = *myLoadingMap; + + myReadFileStat = myCurrentMap->getReadFileStat(); + + delete myLoadingMap; + myLoadingMap = NULL; + + mapChanged(); + unlock(); + +} // end method parsingComplete + + +AREXPORT bool ArMap::isLoadingDataStarted() +{ + if (myLoadingMap) { + return myLoadingMap->isLoadingDataStarted(); + } + return false; + +} // end method isLoadingDataStarted + + +AREXPORT bool ArMap::isLoadingLinesAndDataStarted() +{ + if (myLoadingMap) { + return myLoadingMap->isLoadingLinesAndDataStarted(); + } + return false; + +} // end method isLoadingLinesAndDataStarted + + + +std::string ArMap::createRealFileName(const char *fileName) +{ + return myCurrentMap->createRealFileName(fileName); + +} // end method createRealFileName + +/*** +void ArMap::handleCurrentMapChanged() +{ + ArLog::log(ArLog::Normal, + "ArMap::handleCurrentMapChanged() invoking callbacks"); + + myMapChangedHelper->invokeMapChangedCallbacks(); + +} // end method handleCurrentMapChanged +***/ + +AREXPORT bool ArMap::refresh() +{ + ArLog::log(ArLog::Normal, "ArMap::refresh()"); + + return processFile(NULL, 0); +} + +bool ArMap::processFile(char *errorBuffer, size_t errorBufferLen) +{ + ArLog::log(ArLog::Normal, "ArMap::processFile() %s", + myConfigMapName); + + ArUtil::fixSlashes(myConfigMapName, MAX_MAP_NAME_LENGTH); + + struct stat mapFileStat; + stat(myConfigMapName, &mapFileStat); + + std::string realFileName = createRealFileName(myConfigMapName); + + struct stat realMapFileStat; + stat(realFileName.c_str(), &realMapFileStat); + + // If file name is empty, clear out all current information + if (myIgnoreEmptyFileName && myConfigMapName[0] == '\0') + { + if (ArUtil::strcmp(myConfigMapName, myFileName.c_str()) == 0) + { + ArLog::log(ArLog::Normal, "Using an empty map since file name is still empty"); + return true; + } + + ArLog::log(ArLog::Normal, "Using an empty map since empty map file name"); + lock(); + + myFileName = ""; + myCurrentMap->clear(); + + // The clear method will cause mapChanged to be called. + // mapChanged(); + unlock(); + return true; + } + + // Reload map if this is the first time, or we need to use a new file, or the + // existing file has changed. + if (!myConfigProcessedBefore || myForceMapLoad || + ArUtil::strcmp(myConfigMapName, myFileName.c_str()) != 0 || + mapFileStat.st_mtime != myReadFileStat.st_mtime) + { + + ArLog::log(myCurrentMap->getMapChangedLogLevel(), + "ArMap::processFile Loading map because configProcessedBefore %d forceMapLoad %d myFileName \"%s\" configFileName \"%s\" mapFileTime %lu readFileTime %lu (Diff %ld)", + myConfigProcessedBefore, myForceMapLoad, + myFileName.c_str(), myConfigMapName, + mapFileStat.st_mtime, myReadFileStat.st_mtime, + mapFileStat.st_mtime - myReadFileStat.st_mtime); + myConfigProcessedBefore = true; + myForceMapLoad = false; + + // If successful, the call to readFile will update the myFileName attribute. + if (readFile(myConfigMapName, errorBuffer, errorBufferLen)) + { + return true; + } + else + { + ArLog::log(ArLog::Terse, "ArMap: failed to read new map file \"%s\": %s.", myConfigMapName, errorBuffer); + // TODO: if !myConfigProcessedBefore then the intial map file name was + // invalid; should we now clear the map file name in ArConfig? + return false; + } + } + + // Otherwise, nothing to do. + return true; + +} // end method processFile + + +AREXPORT bool ArMap::readFileAndChangeConfig(const char *fileName) +{ + std::string beforeFileName = myConfigMapName; + + changeConfigMapName(fileName); + + char buf[1024]; + buf[0] = '\0'; + bool ret = processFile(buf, sizeof(buf)); + + return ret; + +} // end method readFileAndChangeConfig + +AREXPORT void ArMap::changeConfigMapName(const char *fileName) +{ + myConfigMapName[0] = '\0'; + if (fileName != NULL) { + snprintf(myConfigMapName, MAX_MAP_NAME_LENGTH, fileName); + } + +} // end method changeConfigMapName + diff --git a/Legacy/Aria/src/ArMapComponents.cpp b/Legacy/Aria/src/ArMapComponents.cpp new file mode 100644 index 0000000..c9e1c8a --- /dev/null +++ b/Legacy/Aria/src/ArMapComponents.cpp @@ -0,0 +1,6217 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ArMapComponents.h" + +#include +#include +#ifdef WIN32 +#include +#endif +#include + +#include "ArFileParser.h" +#include "ArMapUtils.h" +#include "ArMD5Calculator.h" + +//#define ARDEBUG_MAP_COMPONENTS +#ifdef ARDEBUG_MAP_COMPONENTS +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +// ---------------------------------------------------------------------------- +// ArMapScan +// ---------------------------------------------------------------------------- + +const char *ArMapScan::EOL_CHARS = ""; + +AREXPORT ArMapScan::ArMapScan(const char *scanType) : + + myScanType(!ArUtil::isStrEmpty(scanType) ? scanType : ""), + myIsSummaryScan(isSummaryScanType(scanType)), + myLogPrefix(), + myKeywordPrefix(), + myPointsKeyword(), + myLinesKeyword(), + myTimeChanged(), + myDisplayString(!ArUtil::isStrEmpty(scanType) ? scanType : ""), + myNumPoints(0), + myNumLines(0), + myResolution(0), + myMax(), + myMin(), + myLineMax(), + myLineMin(), + + myIsSortedPoints(false), + myIsSortedLines(false), + + myPoints(), + myLines(), + + myMinPosCB(this, &ArMapScan::handleMinPos), + myMaxPosCB(this, &ArMapScan::handleMaxPos), + myIsSortedPointsCB(this, &ArMapScan::handleIsSortedPoints), + myNumPointsCB(this, &ArMapScan::handleNumPoints), + + myLineMinPosCB(this, &ArMapScan::handleLineMinPos), + myLineMaxPosCB(this, &ArMapScan::handleLineMaxPos), + myIsSortedLinesCB(this, &ArMapScan::handleIsSortedLines), + myNumLinesCB(this, &ArMapScan::handleNumLines), + + myResolutionCB(this, &ArMapScan::handleResolution), + myDisplayStringCB(this, &ArMapScan::handleDisplayString), + //myDataCB(this, &ArMapScan::handleData), + //myLinesCB(this, &ArMapScan::handleLines), + myPointCB(this, &ArMapScan::handlePoint), + myLineCB(this, &ArMapScan::handleLine) +{ + + if (isDefaultScanType(myScanType.c_str()) || + (ArUtil::strcasecmp(myScanType.c_str(), "SickLaser") == 0)) { + myKeywordPrefix = ""; + myPointsKeyword = "DATA"; + myLinesKeyword = "LINES"; + } + else { + myKeywordPrefix = myScanType; + // TODO Any way to do an upper? + myPointsKeyword = myScanType + "_DATA"; + myLinesKeyword = myScanType + "_LINES"; + } + + myLogPrefix = myScanType; + if (!myLogPrefix.empty()) { + myLogPrefix += " "; + } + +} // end constructor + + +AREXPORT ArMapScan::ArMapScan(const ArMapScan &other) : + myScanType(other.myScanType), + myIsSummaryScan(other.myIsSummaryScan), + myLogPrefix(other.myLogPrefix), + myKeywordPrefix(other.myKeywordPrefix), + myPointsKeyword(other.myPointsKeyword), + myLinesKeyword(other.myLinesKeyword), + myTimeChanged(other.myTimeChanged), + myDisplayString(other.myDisplayString), + myNumPoints(0), // Set later + myNumLines(0), // Set later + myResolution(other.myResolution), + myMax(other.myMax), + myMin(other.myMin), + myLineMax(other.myLineMax), + myLineMin(other.myLineMin), + myIsSortedPoints(other.myIsSortedPoints), + myIsSortedLines(other.myIsSortedLines), + myPoints(other.myPoints), + myLines(other.myLines), + + // Not entirely sure what to do with these in a copy ctor situation... + // but this seems safest + myMinPosCB(this, &ArMapScan::handleMinPos), + myMaxPosCB(this, &ArMapScan::handleMaxPos), + myIsSortedPointsCB(this, &ArMapScan::handleIsSortedPoints), + myNumPointsCB(this, &ArMapScan::handleNumPoints), + + myLineMinPosCB(this, &ArMapScan::handleLineMinPos), + myLineMaxPosCB(this, &ArMapScan::handleLineMaxPos), + myIsSortedLinesCB(this, &ArMapScan::handleIsSortedLines), + myNumLinesCB(this, &ArMapScan::handleNumLines), + + myResolutionCB(this, &ArMapScan::handleResolution), + myDisplayStringCB(this, &ArMapScan::handleDisplayString), + //myDataCB(this, &ArMapScan::handleData), + //myLinesCB(this, &ArMapScan::handleLines), + myPointCB(this, &ArMapScan::handlePoint), + myLineCB(this, &ArMapScan::handleLine) +{ + + if (!myIsSummaryScan) { + myNumLines = other.myLines.size(); + } + else { + myNumLines = other.myNumLines; + } + if (myNumLines != other.myNumLines) { + ArLog::log(ArLog::Normal, + "%sArMapScan copy constructor adjusted numLines from %i to %i", + myLogPrefix.c_str(), + other.myNumLines, + myNumLines); + } + + if (!myIsSummaryScan) { + myNumPoints = other.myPoints.size(); + } + else { + myNumPoints = other.myNumPoints; + } + if (myNumPoints != other.myNumPoints) { + ArLog::log(ArLog::Normal, + "%sArMapScan copy constructor adjusted numPoints from %i to %i", + myLogPrefix.c_str(), + other.myNumPoints, + myNumPoints); + } + +} // end copy constructor + + +AREXPORT ArMapScan &ArMapScan::operator=(const ArMapScan &other) +{ + if (&other != this) { + + myScanType = other.myScanType; + myIsSummaryScan = other.myIsSummaryScan; + + myLogPrefix = other.myLogPrefix; + myKeywordPrefix = other.myKeywordPrefix; + myPointsKeyword = other.myPointsKeyword; + myLinesKeyword = other.myLinesKeyword; + + myTimeChanged = other.myTimeChanged; + myDisplayString = other.myDisplayString; + + //myNumPoints = other.myNumPoints; + //myNumLines = other.myNumLines; + if (!myIsSummaryScan) { + myNumLines = other.myLines.size(); + } + else { + myNumLines = other.myNumLines; + } + if (myNumLines != other.myNumLines) { + ArLog::log(ArLog::Normal, + "%sArMapScan operator= adjusted numLines from %i to %i", + myLogPrefix.c_str(), + other.myNumLines, + myNumLines); + } + + if (!myIsSummaryScan) { + myNumPoints = other.myPoints.size(); + } + else { + myNumPoints = other.myNumPoints; + } + if (myNumPoints != other.myNumPoints) { + ArLog::log(ArLog::Normal, + "%sArMapScan operator= adjusted numPoints from %i to %i", + myLogPrefix.c_str(), + other.myNumPoints, + myNumPoints); + } + + myResolution = other.myResolution; + myMax = other.myMax; + myMin = other.myMin; + myLineMax = other.myLineMax; + myLineMin = other.myLineMin; + myIsSortedPoints = other.myIsSortedPoints; + myIsSortedLines = other.myIsSortedLines; + myPoints = other.myPoints; + myLines = other.myLines; + } + return *this; +} + + +AREXPORT ArMapScan::~ArMapScan() +{ +} + +AREXPORT bool ArMapScan::addToFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + if (!addHandlerToFileParser(fileParser, "MinPos:", &myMinPosCB) || + !addHandlerToFileParser(fileParser, "MaxPos:", &myMaxPosCB) || + !addHandlerToFileParser(fileParser, "NumPoints:", &myNumPointsCB) || + !addHandlerToFileParser(fileParser, "PointsAreSorted:", &myIsSortedPointsCB) || + !addHandlerToFileParser(fileParser, "LineMinPos:", &myLineMinPosCB) || + !addHandlerToFileParser(fileParser, "LineMaxPos:", &myLineMaxPosCB) || + !addHandlerToFileParser(fileParser, "NumLines:", &myNumLinesCB) || + !addHandlerToFileParser(fileParser, "LinesAreSorted:", &myIsSortedLinesCB) || + !addHandlerToFileParser(fileParser, "Resolution:", &myResolutionCB) || + !addHandlerToFileParser(fileParser, "Display:", &myDisplayStringCB)) + { + ArLog::log(ArLog::Terse, + "%sArMapScan::addToFileParser: could not add handlers", + myLogPrefix.c_str()); + return false; + } + ArLog::log(ArLog::Verbose, + "%sArMapScan::addToFileParser() successfully added handlers", + myLogPrefix.c_str()); + + return true; + +} // end method addToFileParser + + +AREXPORT bool ArMapScan::remFromFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + fileParser->remHandler(&myMinPosCB); + fileParser->remHandler(&myMaxPosCB); + fileParser->remHandler(&myNumPointsCB); + fileParser->remHandler(&myIsSortedPointsCB); + + fileParser->remHandler(&myLineMinPosCB); + fileParser->remHandler(&myLineMaxPosCB); + fileParser->remHandler(&myNumLinesCB); + fileParser->remHandler(&myIsSortedLinesCB); + + fileParser->remHandler(&myResolutionCB); + fileParser->remHandler(&myDisplayStringCB); + + return true; + +} // end method remFromFileParser + + +AREXPORT bool ArMapScan::addExtraToFileParser(ArFileParser *fileParser, + bool isAddLineHandler) +{ + if (fileParser == NULL) { + return false; + } + if (isAddLineHandler) { + if (!addHandlerToFileParser(fileParser, NULL, &myLineCB)) { + return false; + } + } + else { + if (!addHandlerToFileParser(fileParser, NULL, &myPointCB)) { + return false; + } + } + return true; + +} // end method addExtraToFileParser + + +AREXPORT bool ArMapScan::remExtraFromFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + fileParser->remHandler(&myLineCB); + fileParser->remHandler(&myPointCB); + + return true; + +} // end method remExtraFromFileParser + + + +AREXPORT ArTime ArMapScan::getTimeChanged() const +{ + return myTimeChanged; +} + + +AREXPORT void ArMapScan::clear() +{ + myTimeChanged.setToNow(); + myNumPoints = 0; + myNumLines = 0; + myResolution = 0; + myMax.setPose(0, 0); + myMin.setPose(0, 0); + myLineMax.setPose(0, 0); + myLineMin.setPose(0, 0); + myIsSortedPoints = false; + myIsSortedLines = false; + + myPoints.clear(); + myLines.clear(); + +} // end method clear + +AREXPORT const char *ArMapScan::getDisplayString(const char *scanType) +{ + return myDisplayString.c_str(); +} + +AREXPORT std::vector *ArMapScan::getPoints(const char *scanType) +{ + return &myPoints; +} + +AREXPORT std::vector *ArMapScan::getLines(const char *scanType) +{ + return &myLines; +} + +AREXPORT ArPose ArMapScan::getMinPose(const char *scanType) +{ + return myMin; +} + +AREXPORT ArPose ArMapScan::getMaxPose(const char *scanType) +{ + return myMax; +} + +AREXPORT int ArMapScan::getNumPoints(const char *scanType) +{ + return myNumPoints; +} + +AREXPORT ArPose ArMapScan::getLineMinPose(const char *scanType) +{ + return myLineMin; +} + +AREXPORT ArPose ArMapScan::getLineMaxPose(const char *scanType) +{ + return myLineMax; +} + +AREXPORT int ArMapScan::getNumLines(const char *scanType) +{ + return myNumLines; +} + +AREXPORT int ArMapScan::getResolution(const char *scanType) +{ + return myResolution; +} + +AREXPORT bool ArMapScan::isSortedPoints(const char *scanType) const +{ + return myIsSortedPoints; +} + +AREXPORT bool ArMapScan::isSortedLines(const char *scanType) const +{ + return myIsSortedLines; +} + + +AREXPORT void ArMapScan::setPoints(const std::vector *points, + const char *scanType, + bool isSorted, + ArMapChangeDetails *changeDetails) +{ + if (!myIsSortedPoints) { + std::sort(myPoints.begin(), myPoints.end()); + myIsSortedPoints = true; + } + + const std::vector *newPoints = points; + std::vector *pointsCopy = NULL; + + if (!isSorted && (points != NULL)) { + pointsCopy = new std::vector(*points); + std::sort(pointsCopy->begin(), pointsCopy->end()); + newPoints = pointsCopy; + } + + if (changeDetails != NULL) { + + if (newPoints != NULL) { + + ArTime timeToDiff; + + set_difference(myPoints.begin(), myPoints.end(), + newPoints->begin(), newPoints->end(), + std::inserter(*(changeDetails->getChangedPoints + (ArMapChangeDetails::DELETIONS, scanType)), + changeDetails->getChangedPoints + (ArMapChangeDetails::DELETIONS, scanType)->begin())); + set_difference(newPoints->begin(), newPoints->end(), + myPoints.begin(), myPoints.end(), + std::inserter(*(changeDetails->getChangedPoints + (ArMapChangeDetails::ADDITIONS, scanType)), + changeDetails->getChangedPoints + (ArMapChangeDetails::ADDITIONS, scanType)->begin())); + + ArLog::log(ArLog::Normal, + "%sArMapScan::setPoints() %i points were deleted, %i added", + myLogPrefix.c_str(), + changeDetails->getChangedPoints + (ArMapChangeDetails::DELETIONS, scanType)->size(), + changeDetails->getChangedPoints + (ArMapChangeDetails::ADDITIONS, scanType)->size()); + + long int elapsed = timeToDiff.mSecSince(); + + ArLog::log(ArLog::Normal, + "%sArMapScan::setPoints() took %i msecs to find changes in %i points for %s", + myLogPrefix.c_str(), + elapsed, + myNumPoints, + scanType); + + } + else { // null points means none added and all deleted + + *(changeDetails->getChangedPoints(ArMapChangeDetails::DELETIONS, scanType)) = myPoints; + } + } // end if track changes + + int origNumPoints = myNumPoints; + ArPose origMin = myMin; + ArPose origMax = myMax; + + myTimeChanged.setToNow(); + + if ((newPoints != NULL) && (!newPoints->empty())) { + + ArTime timeToCopy; + + double maxX = INT_MIN; + double maxY = INT_MIN; + double minX = INT_MAX; + double minY = INT_MAX; + + for (std::vector::const_iterator it = newPoints->begin(); + it != newPoints->end(); + it++) + { + const ArPose &pose = (*it); + + if (pose.getX() > maxX) + maxX = pose.getX(); + if (pose.getX() < minX) + minX = pose.getX(); + + if (pose.getY() > maxY) + maxY = pose.getY(); + if (pose.getY() < minY) + minY = pose.getY(); + + } // end for each point + + myPoints = *newPoints; + if (myNumPoints != (int) myPoints.size()) { + + ArLog::log(ArLog::Normal, + "%sArMapScan::setPoints() point count changed from %i to %i", + myLogPrefix.c_str(), + myNumPoints, + myPoints.size()); + + myNumPoints = myPoints.size(); + } + myMax.setPose(maxX, maxY); + myMin.setPose(minX, minY); + + long int elapsed = timeToCopy.mSecSince(); + + ArLog::log(ArLog::Normal, + "%sArMapScan::setPoints() took %i msecs to find min/max of %i points", + myLogPrefix.c_str(), + elapsed, + myNumPoints); + + } // end if new points + else { // no new points + + myPoints.clear(); + myMax.setX(INT_MIN); + myMax.setY(INT_MIN); + myMin.setX(INT_MAX); + myMin.setY(INT_MAX); + myNumPoints = 0; + + } // end else no new points + + + if (changeDetails != NULL) { + + ArMapFileLineSetWriter deletionWriter(changeDetails->getChangedSummaryLines + (ArMapChangeDetails::DELETIONS, scanType)); + ArMapFileLineSetWriter additionWriter(changeDetails->getChangedSummaryLines + (ArMapChangeDetails::ADDITIONS, scanType)); + + if (origNumPoints != myNumPoints) { + ArUtil::functorPrintf(&deletionWriter, "%sNumPoints: %d%s", + getKeywordPrefix(), + origNumPoints, EOL_CHARS); + ArUtil::functorPrintf(&additionWriter, "%sNumPoints: %d%s", + getKeywordPrefix(), + myNumPoints, EOL_CHARS); + } + + if (origMin != myMin) { + if (origNumPoints != 0) { + ArUtil::functorPrintf(&deletionWriter, "%sMinPos: %.0f %.0f%s", + getKeywordPrefix(), + origMin.getX(), origMin.getY(), EOL_CHARS); + } + if (myNumPoints != 0) { + ArUtil::functorPrintf(&additionWriter, "%sMinPos: %.0f %.0f%s", + getKeywordPrefix(), + myMin.getX(), myMin.getY(), EOL_CHARS); + } + } // end if min changed + if (origMax != myMax) { + if (origNumPoints != 0) { + ArUtil::functorPrintf(&deletionWriter, "%sMaxPos: %.0f %.0f%s", + getKeywordPrefix(), + origMax.getX(), origMax.getY(), EOL_CHARS); + } + if (myNumPoints != 0) { + ArUtil::functorPrintf(&additionWriter, "%sMaxPos: %.0f %.0f%s", + getKeywordPrefix(), + myMax.getX(), myMax.getY(), EOL_CHARS); + } + } // end if min changed + + } // end if track changes + + if (pointsCopy != NULL) { + delete pointsCopy; + } + +} // end method setPoints + + +AREXPORT void ArMapScan::setLines(const std::vector *lines, + const char *scanType, + bool isSorted, + ArMapChangeDetails *changeDetails) +{ + if (!myIsSortedLines) { + std::sort(myLines.begin(), myLines.end()); + myIsSortedLines = true; + } + + const std::vector *newLines = lines; + std::vector *linesCopy = NULL; + + if (!isSorted && (lines != NULL)) { + linesCopy = new std::vector(*lines); + std::sort(linesCopy->begin(), linesCopy->end()); + newLines = linesCopy; + } + + + if (changeDetails != NULL) { + + if (newLines != NULL) { + + set_difference(myLines.begin(), myLines.end(), + newLines->begin(), newLines->end(), + std::inserter(*(changeDetails->getChangedLineSegments + (ArMapChangeDetails::DELETIONS, scanType)), + changeDetails->getChangedLineSegments + (ArMapChangeDetails::DELETIONS, scanType)->begin())); + set_difference(newLines->begin(), newLines->end(), + myLines.begin(), myLines.end(), + std::inserter(*(changeDetails->getChangedLineSegments + (ArMapChangeDetails::ADDITIONS, scanType)), + changeDetails->getChangedLineSegments + (ArMapChangeDetails::ADDITIONS, scanType)->begin())); + + ArLog::log(ArLog::Normal, + "%sArMapScan::setLines() %i lines were deleted, %i added", + myLogPrefix.c_str(), + changeDetails->getChangedLineSegments + (ArMapChangeDetails::DELETIONS, scanType)->size(), + changeDetails->getChangedLineSegments + (ArMapChangeDetails::ADDITIONS, scanType)->size()); + + } + else { // null lines means none added and all deleted + + *(changeDetails->getChangedLineSegments(ArMapChangeDetails::DELETIONS, scanType)) + = myLines; + } + } // end if track changes + + + int origNumLines = myNumLines; + ArPose origLineMin = myLineMin; + ArPose origLineMax = myLineMax; + + myTimeChanged.setToNow(); + + if ((newLines != NULL) && (!newLines->empty())) { + + ArTime timeToCopy; + + double maxX = INT_MIN; + double maxY = INT_MIN; + double minX = INT_MAX; + double minY = INT_MAX; + + for (std::vector::const_iterator it = newLines->begin(); + it != newLines->end(); + it++) + { + const ArLineSegment &line = (*it); + + if (line.getX1() > maxX) + maxX = line.getX1(); + if (line.getX1() < minX) + minX = line.getX1(); + + if (line.getY1() > maxY) + maxY = line.getY1(); + if (line.getY1() < minY) + minY = line.getY1(); + + if (line.getX2() > maxX) + maxX = line.getX2(); + if (line.getX2() < minX) + minX = line.getX2(); + + if (line.getY2() > maxY) + maxY = line.getY2(); + if (line.getY2() < minY) + minY = line.getY2(); + + } // end for each line + + myLines = *newLines; + + if (myNumLines != (int) myLines.size()) { + ArLog::log(ArLog::Normal, + "%sArMapScan::setLines() line count changed from %i to %i", + myLogPrefix.c_str(), + myNumLines, + myLines.size()); + myNumLines = myLines.size(); + } + + myLineMax.setPose(maxX, maxY); + myLineMin.setPose(minX, minY); + + long int elapsed = timeToCopy.mSecSince(); + + ArLog::log(ArLog::Normal, + "%sArMapScan::setLines() took %i msecs to find min/max of %i lines", + myLogPrefix.c_str(), + elapsed, + myNumLines); + + } // end if new lines + else { // no new lines + + myLines.clear(); + myLineMax.setX(INT_MIN); + myLineMax.setY(INT_MIN); + myLineMin.setX(INT_MAX); + myLineMin.setY(INT_MAX); + myNumLines = 0; + + } // end else no new lines + + + if (changeDetails != NULL) { + + ArMapFileLineSetWriter deletionWriter(changeDetails->getChangedSummaryLines + (ArMapChangeDetails::DELETIONS, scanType)); + ArMapFileLineSetWriter additionWriter(changeDetails->getChangedSummaryLines + (ArMapChangeDetails::ADDITIONS, scanType)); + + if (origNumLines != myNumLines) { + ArUtil::functorPrintf(&deletionWriter, "%sNumLines: %d%s", + getKeywordPrefix(), + origNumLines, EOL_CHARS); + ArUtil::functorPrintf(&additionWriter, "%sNumLines: %d%s", + getKeywordPrefix(), + myNumLines, EOL_CHARS); + } + + if (origLineMin != myLineMin) { + if (origNumLines != 0) { + ArUtil::functorPrintf(&deletionWriter, "%sLineMinPos: %.0f %.0f%s", + getKeywordPrefix(), + origLineMin.getX(), origLineMin.getY(), EOL_CHARS); + } + if (myNumLines != 0) { + ArUtil::functorPrintf(&additionWriter, "%sLineMinPos: %.0f %.0f%s", + getKeywordPrefix(), + myLineMin.getX(), myLineMin.getY(), EOL_CHARS); + } + } // end if min changed + + if (origLineMax != myLineMax) { + if (origNumLines != 0) { + ArUtil::functorPrintf(&deletionWriter, "%sLineMaxPos: %.0f %.0f%s", + getKeywordPrefix(), + origLineMax.getX(), origLineMax.getY(), EOL_CHARS); + } + if (myNumLines != 0) { + ArUtil::functorPrintf(&additionWriter, "%sLineMaxPos: %.0f %.0f%s", + getKeywordPrefix(), + myLineMax.getX(), myLineMax.getY(), EOL_CHARS); + } + } // end if max changed + + } // end if track changes + + if (linesCopy != NULL) { + delete linesCopy; + } + +} // end method setLines + + +AREXPORT void ArMapScan::setResolution(int resolution, + const char *scanType, + ArMapChangeDetails *changeDetails) +{ + + + if (myResolution == resolution) { + return; + } + + ArMapFileLineSet origLines; + + if (changeDetails != NULL) { + ArMapFileLineSetWriter origWriter(changeDetails->getChangedSummaryLines + (ArMapChangeDetails::DELETIONS, scanType)); + + ArUtil::functorPrintf(&origWriter, "%sResolution: %d%s", myResolution, + getKeywordPrefix(), + EOL_CHARS); + } + myResolution = resolution; + + if (changeDetails != NULL) { + ArMapFileLineSetWriter newWriter(changeDetails->getChangedSummaryLines + (ArMapChangeDetails::ADDITIONS, scanType)); + + ArUtil::functorPrintf(&newWriter, "%sResolution: %d%s", myResolution, + getKeywordPrefix(), + EOL_CHARS); + } +} // end method setResolution + + + + +AREXPORT void ArMapScan::writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType, + ArFunctor1 *keywordFunctor) +{ + + if (keywordFunctor != NULL) { + ArUtil::functorPrintf(keywordFunctor, "%s%s", + getPointsKeyword(), + ""); + } + functor->invoke(myNumPoints, &myPoints); + +} // end method writePointsToFunctor + + +AREXPORT void ArMapScan::writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType, + ArFunctor1 *keywordFunctor) +{ + if (keywordFunctor != NULL) { + ArUtil::functorPrintf(keywordFunctor, "%s%s", + getLinesKeyword(), + ""); + } + functor->invoke(myNumLines, &myLines); +} // end method writeLinesToFunctor + + +AREXPORT void ArMapScan::writeScanToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType) +{ + if (!myDisplayString.empty()) { + + ArUtil::functorPrintf(functor, "%sDisplay: \"%s\"%s", + getKeywordPrefix(), + myDisplayString.c_str(), endOfLineChars); + + } // end if display specified + + if (myNumPoints != 0) + { + ArUtil::functorPrintf(functor, "%sMinPos: %.0f %.0f%s", + getKeywordPrefix(), + myMin.getX(), myMin.getY(), endOfLineChars); + ArUtil::functorPrintf(functor, "%sMaxPos: %.0f %.0f%s", + getKeywordPrefix(), + myMax.getX(), myMax.getY(), endOfLineChars); + ArUtil::functorPrintf(functor, "%sNumPoints: %d%s", + getKeywordPrefix(), + myNumPoints, endOfLineChars); + ArUtil::functorPrintf(functor, "%sPointsAreSorted: %s%s", + getKeywordPrefix(), + (myIsSortedPoints ? "true" : "false"), endOfLineChars); + + } + + if (myResolution != -1) { + ArUtil::functorPrintf(functor, "%sResolution: %d%s", + getKeywordPrefix(), + myResolution, endOfLineChars); + } + + if (myNumLines != 0) + { + ArUtil::functorPrintf(functor, "%sLineMinPos: %.0f %.0f%s", + getKeywordPrefix(), + myLineMin.getX(), myLineMin.getY(), endOfLineChars); + ArUtil::functorPrintf(functor, "%sLineMaxPos: %.0f %.0f%s", + getKeywordPrefix(), + myLineMax.getX(), myLineMax.getY(), endOfLineChars); + ArUtil::functorPrintf(functor, "%sNumLines: %d%s", + getKeywordPrefix(), + myNumLines, endOfLineChars); + ArUtil::functorPrintf(functor, "%sLinesAreSorted: %s%s", + getKeywordPrefix(), + (myIsSortedLines ? "true" : "false"), endOfLineChars); + } + + +} // end method writeScanToFunctor + + +AREXPORT void ArMapScan::writePointsToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType) +{ + ArUtil::functorPrintf(functor, "%s%s", + getPointsKeyword(), + endOfLineChars); + + if (myPoints.empty()) { + return; + } + + bool isFastWrite = + ((strcmp(endOfLineChars, "\n") == 0) && + ((myMin.getX() > INT_MIN) && (myMin.getX() < INT_MAX)) && + ((myMin.getY() > INT_MIN) && (myMin.getY() < INT_MAX)) && + ((myMax.getX() > INT_MIN) && (myMax.getX() < INT_MAX)) && + ((myMax.getY() > INT_MIN) && (myMax.getY() < INT_MAX))); + + if (isFastWrite) { + + // Write the map data points in text format.... + char buf[10000]; + + for (std::vector::const_iterator pointIt = myPoints.begin(); + pointIt != myPoints.end(); + pointIt++) + { + // TODO Test the time of the long indicator... + snprintf(buf, 10000, "%li %li\n", + (long int) (*pointIt).getX(), + (long int) (*pointIt).getY()); + functor->invoke(buf); + } // end for each point + } + else { // not fast write + + for (std::vector::const_iterator pointIt = myPoints.begin(); + pointIt != myPoints.end(); + pointIt++) + { + ArUtil::functorPrintf(functor, "%.0f %.0f%s", + (*pointIt).getX(), + (*pointIt).getY(), + endOfLineChars); + + } + } // end else not fast write + +} // end method writePointsToFunctor + +AREXPORT void ArMapScan::writeLinesToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType) +{ + writeLinesToFunctor(functor, myLines, endOfLineChars, scanType); + +} // end method writeLinesToFunctor + + +AREXPORT void ArMapScan::writeLinesToFunctor + (ArFunctor1 *functor, + const std::vector &lines, + const char *endOfLineChars, + const char *scanType) +{ + if (lines.empty()) { + return; + } + + ArUtil::functorPrintf(functor, "%s%s", + getLinesKeyword(), + endOfLineChars); + + bool isFastWrite = + ((strcmp(endOfLineChars, "\n") == 0) && + ((myLineMin.getX() > INT_MIN) && (myLineMin.getX() < INT_MAX)) && + ((myLineMin.getY() > INT_MIN) && (myLineMin.getY() < INT_MAX)) && + ((myLineMax.getX() > INT_MIN) && (myLineMax.getX() < INT_MAX)) && + ((myLineMax.getY() > INT_MIN) && (myLineMax.getY() < INT_MAX))); + + if (isFastWrite) { + + // Write the map data points in text format.... + char buf[10000]; + + for (std::vector::const_iterator lineIt = lines.begin(); + lineIt != lines.end(); + lineIt++) + { + snprintf(buf, 10000, "%li %li %li %li\n", + (long int) (*lineIt).getX1(), + (long int) (*lineIt).getY1(), + (long int) (*lineIt).getX2(), + (long int) (*lineIt).getY2()); + functor->invoke(buf); + } + } + else { // slow write + + for (std::vector::const_iterator lineIt = lines.begin(); + lineIt != lines.end(); + lineIt++) + { + ArUtil::functorPrintf(functor, "%.0f %.0f %.0f %.0f%s", + (*lineIt).getX1(), + (*lineIt).getY1(), + (*lineIt).getX2(), + (*lineIt).getY2(), + endOfLineChars); + } // end for each line + } // end else slow write + +} // end method writeLinesToFunctor + + +bool ArMapScan::parseNumber(char *line, + size_t lineLen, + size_t *charCountOut, + int *numOut) const +{ + if (line == NULL) { + return false; + } + + bool isSuccess = true; + size_t digitCount = 0; + int num = 0; + + for (size_t i = 0; i < lineLen; i++) + { + if ((isdigit(line[i])) || + ((i == 0) && (line[i] == '-'))) { + digitCount++; + } + else { + break; + } + } // end for each char in line + + // The less-than check should be okay since there should be a null-terminator + if ((digitCount > 0) && (digitCount < (lineLen - 1))) { + char origChar = line[digitCount]; + line[digitCount] = '\0'; + + num = atoi(line); + + line[digitCount] = origChar; + } + else { // no digits found + isSuccess = false; + digitCount = 0; + num = 0; + } // end else no digits found + + if (charCountOut != NULL) { + *charCountOut = digitCount; + } + if (numOut != NULL) { + *numOut = num; + } + + return isSuccess; + +} // end method parseNumber + + +bool ArMapScan::parseWhitespace(char *line, + size_t lineLen, + size_t *charCountOut) const +{ + if (line == NULL) { + return false; + } + + bool isSuccess = true; + size_t wsCount = 0; + + for (size_t i = 0; i < lineLen; i++) + { + if (isspace(line[i]) && (line[i] != '\0')) { + wsCount++; + } + else { + break; + } + } // end for each char in line + + // The less-than check should be okay since there should be a null-terminator + if ((wsCount > 0) && (wsCount < (lineLen - 1))) { + } + else { // no digits found + isSuccess = false; + wsCount = 0; + } // end else no digits found + + if (charCountOut != NULL) { + *charCountOut = wsCount; + } + + return isSuccess; + return false; + +} // end method parseWhitespace + + +AREXPORT bool ArMapScan::readDataPoint( char *line) +{ + if (line == NULL) { + return false; + } + + int x = 0; + int y = 0; + + bool isSuccess = true; + size_t lineLen = strlen(line) + 1; + int startIndex = 0; + size_t parsedCount = 0; + + isSuccess = parseNumber(&line[startIndex], lineLen, &parsedCount, &x); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readDataPoint error parsing x (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseWhitespace(&line[startIndex], lineLen, &parsedCount); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readDataPoint error parsing first whitespace (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseNumber(&line[startIndex], lineLen, &parsedCount, &y); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readDataPoint error parsing y (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + loadDataPoint(x, y); + + return true; + +} // end method readDataPoint + + +AREXPORT bool ArMapScan::readLineSegment( char *line) +{ + if (line == NULL) { + return false; + } + + int x1 = 0; + int y1 = 0; + int x2 = 0; + int y2 = 0; + + bool isSuccess = true; + size_t lineLen = strlen(line) + 1; + int startIndex = 0; + size_t parsedCount = 0; + + isSuccess = parseNumber(&line[startIndex], lineLen, &parsedCount, &x1); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing x1 (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseWhitespace(&line[startIndex], lineLen, &parsedCount); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing first whitespace (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseNumber(&line[startIndex], lineLen, &parsedCount, &y1); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing y1 (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseWhitespace(&line[startIndex], lineLen, &parsedCount); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing second whitespace (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseNumber(&line[startIndex], lineLen, &parsedCount, &x2); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing x2 (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseWhitespace(&line[startIndex], lineLen, &parsedCount); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing third whitespace (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + isSuccess = parseNumber(&line[startIndex], lineLen, &parsedCount, &y2); + + startIndex += parsedCount; + lineLen -= parsedCount; + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "%sArMapScan::readLineSegment error parsing y2 (startIndex = %i, lineLen = %i) in '%s'", + myLogPrefix.c_str(), startIndex, lineLen, line); + return false; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + loadLineSegment(x1, y1, x2, y2); + + return true; + +} // end method readLineSegment + + +AREXPORT void ArMapScan::loadDataPoint(double x, double y) +{ + if (x > myMax.getX()) + myMax.setX(x); + if (y > myMax.getY()) + myMax.setY(y); + + if (x < myMin.getX()) + myMin.setX(x); + if (y < myMin.getY()) + myMin.setY(y); + + myPoints.push_back(ArPose(x, y)); + +} // end method loadDataPoint + + +AREXPORT void ArMapScan::loadLineSegment(double x1, double y1, + double x2, double y2) +{ + if (x1 > myLineMax.getX()) + myLineMax.setX(x1); + if (y1 > myLineMax.getY()) + myLineMax.setY(y1); + + if (x1 < myLineMin.getX()) + myLineMin.setX(x1); + if (y1 < myLineMin.getY()) + myLineMin.setY(y1); + + if (x2 > myLineMax.getX()) + myLineMax.setX(x2); + if (y2 > myLineMax.getY()) + myLineMax.setY(y2); + + if (x2 < myLineMin.getX()) + myLineMin.setX(x2); + if (y2 < myLineMin.getY()) + myLineMin.setY(y2); + + myLines.push_back(ArLineSegment(x1, y1, x2, y2)); + +} // end method loadLineSegment + + +AREXPORT bool ArMapScan::unite(ArMapScan *other, + bool isIncludeDataPointsAndLines) +{ + if (other == NULL) { + return false; + } + + if ((myNumPoints > 0) || (myNumLines > 0)) { + if (other->myTimeChanged.isAfter(myTimeChanged)) { + myTimeChanged = other->myTimeChanged; + } + if (other->myResolution != -1) { + // Not entirely sure whether it makes sense to use the largest + // resolution or the smallest... + if (other->myResolution > myResolution) { + myResolution = other->myResolution; + } + } + } + else { + myTimeChanged = other->myTimeChanged; + myResolution = other->myResolution; + } + + if (myNumPoints > 0) { + + if (other->getMaxPose().getX() > myMax.getX()) { + myMax.setX(other->getMaxPose().getX()); + } + if (other->getMaxPose().getY() > myMax.getY()) { + myMax.setY(other->getMaxPose().getY()); + } + + if (other->getMinPose().getX() < myMin.getX()) { + myMin.setX(other->getMinPose().getX()); + } + if (other->getMinPose().getY() < myMin.getY()) { + myMin.setY(other->getMinPose().getY()); + } + + if (!other->isSortedPoints()) { + myIsSortedPoints = false; + } + } + else { + myMax = other->getMaxPose(); + myMin = other->getMinPose(); + + myIsSortedPoints = other->isSortedPoints(); + } + myNumPoints += other->getNumPoints(); + + if (myNumLines > 0) { + + if (other->getLineMaxPose().getX() > myLineMax.getX()) { + myLineMax.setX(other->getLineMaxPose().getX()); + } + if (other->getLineMaxPose().getY() > myLineMax.getY()) { + myLineMax.setY(other->getLineMaxPose().getY()); + } + + if (other->getLineMinPose().getX() < myLineMin.getX()) { + myLineMin.setX(other->getLineMinPose().getX()); + } + if (other->getLineMinPose().getY() < myLineMin.getY()) { + myLineMin.setY(other->getLineMinPose().getY()); + } + if (!other->isSortedLines()) { + myIsSortedLines = false; + } + } + else { + myLineMax = other->getLineMaxPose(); + myLineMin = other->getLineMinPose(); + + myIsSortedLines = other->isSortedLines(); + } + + myNumLines += other->getNumLines(); + + + if (isIncludeDataPointsAndLines) { + + bool isPointsChanged = false; + bool isLinesChanged = false; + + if (other->getPoints() != NULL) { + myPoints.reserve(myNumPoints); + for (std::vector::iterator iter = other->getPoints()->begin(); + iter != other->getPoints()->end(); + iter++) { + myPoints.push_back(*iter); + isPointsChanged = true; + } // end for each other point + } // end if other scan has points + + if (myIsSortedPoints) { + std::sort(myPoints.begin(), myPoints.end()); + } + + if (other->getLines() != NULL) { + myLines.reserve(myNumLines); + for (std::vector::iterator iter = other->getLines()->begin(); + iter != other->getLines()->end(); + iter++) { + myLines.push_back(*iter); + isLinesChanged = true; + } // end for each other line + } // end if other scan has lines + + if (myIsSortedLines) { + std::sort(myLines.begin(), myLines.end()); + } + + } // end if include points and lines + + return true; + +} // end method unite + + +bool ArMapScan::handleMinPos(ArArgumentBuilder *arg) +{ + return parsePose(arg, "MinPos:", &myMin); + +} // end method handleMinPos + + +bool ArMapScan::handleMaxPos(ArArgumentBuilder *arg) +{ + return parsePose(arg, "MaxPos:", &myMax); +} + +bool ArMapScan::handleNumPoints(ArArgumentBuilder *arg) +{ + if (arg->getArgc() >= 1) { + + bool ok = false; + int numPoints = arg->getArgInt(0, &ok); + + if (ok) { + + myNumPoints = numPoints; + // myNumPoints = 0; + + ArLog::log(ArLog::Normal, + "%sArMapScan::handleNumPoints() set num points to %i", + myLogPrefix.c_str(), + numPoints); + + if (numPoints > 0) { + // myPointText.reserve(myNumPoints); + myPoints.reserve(numPoints); + } + else { // no points + // Reset the min and max poses to have the same values that would result + // from a call to setPoints with no points. This is done primarily so + // that map change processing will behave correctly. + myMax.setX(INT_MIN); + myMax.setY(INT_MIN); + myMin.setX(INT_MAX); + myMin.setY(INT_MAX); + } // end else no points + + return true; + } + } // end if enough args + + // If this is reached, then an error has occurred... + ArLog::log(ArLog::Terse, + "%sArMapScan: '%sNumPoints:' bad argument, should be one integer (number of data points)", + myLogPrefix.c_str(), + myKeywordPrefix.c_str()); + + return false; + +} // end method handleNumPoints + + +bool ArMapScan::handleIsSortedPoints(ArArgumentBuilder *arg) +{ + if (arg->getArgc() >= 1) { + bool ok = true; + bool isSorted = arg->getArgBool(0, &ok); + if (ok) { + myIsSortedPoints = isSorted; + return true; + } + } // end if correct arg count + + ArLog::log(ArLog::Terse, + "ArMapScan: 'PointsAreSorted:' bad arguments, should be a boolean"); + return false; + +} // end method handleIsSortedPoints + + +bool ArMapScan::handleLineMinPos(ArArgumentBuilder *arg) +{ + return parsePose(arg, "LineMinPos:", &myLineMin); +} + +bool ArMapScan::handleLineMaxPos(ArArgumentBuilder *arg) +{ + return parsePose(arg, "LineMaxPos:", &myLineMax); +} + + +bool ArMapScan::parsePose(ArArgumentBuilder *arg, + const char *keyword, + ArPose *poseOut) +{ + if ((arg == NULL) || (keyword == NULL) || (poseOut == NULL)) { + ArLog::log(ArLog::Normal, + "ArMapScan::parsePose() invalid NULL parameters"); + return false; + } + + if (arg->getArgc() == 2) { + + bool xOk = true; + bool yOk = true; + int x = arg->getArgInt(0, &xOk); + int y = arg->getArgInt(1, &yOk); + + if (xOk && yOk) { + poseOut->setPose(x, y); + return true; + } + } // end if correct arg count + + ArLog::log(ArLog::Terse, + "%sArMapScan: '%s%s' bad arguments, should be two integers x y", + myLogPrefix.c_str(), + myKeywordPrefix.c_str(), + keyword); + + return false; + +} // end method parsePose + + +bool ArMapScan::handleNumLines(ArArgumentBuilder *arg) +{ + if (arg->getArgc() >= 1) { + + bool ok = false; + int numLines = arg->getArgInt(0, &ok); + + if (ok) { + + // Reset the myNumLines to 0, it is incremented as the actual lines are added + myNumLines = numLines; + + if (numLines > 0) { + myLines.reserve(numLines); + } + else { // no lines + // Reset the min and max poses to have the same values that would result + // from a call to setLines with no lines. This is done primarily so + // that map change processing will behave correctly. + myLineMax.setX(INT_MIN); + myLineMax.setY(INT_MIN); + myLineMin.setX(INT_MAX); + myLineMin.setY(INT_MAX); + } // end else no lines + + return true; + + } // end if ok + } // end if enough args + + // If this is reached, then an error has occurred... + ArLog::log(ArLog::Terse, + "%sArMapScan: '%sNumLines:' bad argument, should be one integer (number of data points)", + myLogPrefix.c_str(), + myKeywordPrefix.c_str()); + + return false; + +} // end method handleNumLines + + +bool ArMapScan::handleIsSortedLines(ArArgumentBuilder *arg) +{ + if (arg->getArgc() >= 1) { + bool ok = true; + bool isSorted = arg->getArgBool(0, &ok); + if (ok) { + myIsSortedLines = isSorted; + return true; + } + } // end if correct arg count + + ArLog::log(ArLog::Terse, + "%sArMapScan: '%sLinesAreSorted' bad arguments, should be a boolean", + myLogPrefix.c_str(), + myKeywordPrefix.c_str()); + return false; + +} // end method handleIsSortedLines + + + +bool ArMapScan::handleResolution(ArArgumentBuilder *arg) +{ + if (arg->getArgc() == 1) + { + bool ok = true; + int res = arg->getArgInt(0, &ok); + if (ok) { + myResolution = res; + return true; + } + } // end if correct arg count + + ArLog::log(ArLog::Terse, + "ArMapScan: 'Resolution:' bad argument, should be one integer (resolution in mm)"); + return false; + +} // end method handleResolution + + +bool ArMapScan::handleDisplayString(ArArgumentBuilder *arg) +{ + arg->compressQuoted(); + + if (arg->getArgc() >= 1) { + + const char *displayArg = arg->getArg(0); + int displayBufferLen = strlen(displayArg) + 1; + char *displayBuffer = new char[displayBufferLen]; + + if (ArUtil::stripQuotes(displayBuffer, displayArg, displayBufferLen)) + { + myDisplayString = displayBuffer; + + ArLog::log(ArLog::Normal, + "%sArMapScan: '%sDisplay' setting display '%s'", + myLogPrefix.c_str(), + myKeywordPrefix.c_str(), + myDisplayString.c_str()); + } + else { + ArLog::log(ArLog::Terse, + "%sArMapScan: '%sDisplay:' couldn't strip quotes from '%s'", + myLogPrefix.c_str(), + myKeywordPrefix.c_str(), + displayArg); + } // end if error stripping quotes + + delete [] displayBuffer; + + + + return true; + } + else { + ArLog::log(ArLog::Terse, + "%sArMapScan: '%sDisplay:' insufficient args '%s'", + myLogPrefix.c_str(), + myKeywordPrefix.c_str(), + arg->getFullString()); + return false; + + } + +} // end method handleDisplayString + + +bool ArMapScan::handlePoint(ArArgumentBuilder *arg) +{ + if (arg->getArgc() == 2) { + + bool xOk = true; + bool yOk = true; + + int x = arg->getArgInt(0, &xOk); + int y = arg->getArgInt(1, &yOk); + + if (xOk && yOk) { + loadDataPoint(x, y); + return true; + } + } // end if correct arg count + + ArLog::log(ArLog::Terse, + "ArMapScan::handlePoint: map point wrong, should be x and y int coords (in mm) but is %s", + arg->getFullString()); + + return false; + +} // end method handlePoint + + +bool ArMapScan::handleLine(ArArgumentBuilder *arg) +{ + + if (arg->getArgc() == 4) { + + bool x1Ok = true; + bool y1Ok = true; + bool x2Ok = true; + bool y2Ok = true; + + int x1 = arg->getArgInt(0, &x1Ok); + int y1 = arg->getArgInt(1, &y1Ok); + int x2 = arg->getArgInt(2, &x2Ok); + int y2 = arg->getArgInt(3, &y2Ok); + + if (x1Ok && y1Ok && x2Ok && y2Ok) { + loadLineSegment(x1, y1, x2, y2); + return true; + } + } // end if correct arg count + + ArLog::log(ArLog::Verbose, + "ArMapScan::handleLine: line wrong, should be 2 x, y points (in mm) but is %s", + arg->getFullString()); + return false; + +} // end method handleLine + + +bool ArMapScan::addHandlerToFileParser + (ArFileParser *fileParser, + const char *keyword, + ArRetFunctor1 *handler) +{ + if ((fileParser == NULL) || (handler == NULL)) { + return false; + } + bool isAdded = false; + + if (keyword != NULL) { + + std::string fullKeyword = getKeywordPrefix(); + fullKeyword += keyword; + + isAdded = fileParser->addHandler(fullKeyword.c_str(), + handler); + } + else { + isAdded = fileParser->addHandler(NULL, handler); + } + + return isAdded; + +} // end method addHandlerToFileParser + + +AREXPORT const char *ArMapScan::getScanType() const +{ + return myScanType.c_str(); +} + +AREXPORT const char *ArMapScan::getPointsKeyword() const +{ + return myPointsKeyword.c_str(); +} + +AREXPORT const char *ArMapScan::getLinesKeyword() const +{ + return myLinesKeyword.c_str(); +} + +const char *ArMapScan::getKeywordPrefix() const +{ + return myKeywordPrefix.c_str(); +} + + +// ---------------------------------------------------------------------------- +// ArMapObjects +// ---------------------------------------------------------------------------- + + +AREXPORT const char *ArMapObjects::DEFAULT_KEYWORD = "Cairn:"; + + +AREXPORT ArMapObjects::ArMapObjects(const char *keyword) : + myTimeChanged(), + myIsSortedObjects(false), + myKeyword((keyword != NULL) ? keyword : DEFAULT_KEYWORD), + myMapObjects(), + myMapObjectCB(this, &ArMapObjects::handleMapObject) +{ +} + + +AREXPORT ArMapObjects::ArMapObjects(const ArMapObjects &other) : + myTimeChanged(other.myTimeChanged), + myIsSortedObjects(other.myIsSortedObjects), + myKeyword(other.myKeyword), + myMapObjects(), + myMapObjectCB(this, &ArMapObjects::handleMapObject) +{ + for (std::list::const_iterator it = other.myMapObjects.begin(); + it != other.myMapObjects.end(); + it++) + { + myMapObjects.push_back(new ArMapObject(*(*it))); + } + +} // end copy ctor + + +AREXPORT ArMapObjects &ArMapObjects::operator=(const ArMapObjects &other) +{ + if (&other != this) { + + ArUtil::deleteSet(myMapObjects.begin(), myMapObjects.end()); + myMapObjects.clear(); + + myTimeChanged = other.myTimeChanged; + myIsSortedObjects = other.myIsSortedObjects; + + myKeyword = other.myKeyword; + + for (std::list::const_iterator it = other.myMapObjects.begin(); + it != other.myMapObjects.end(); + it++) + { + myMapObjects.push_back(new ArMapObject(*(*it))); + } + } + return *this; + +} // end method operator= + + +AREXPORT ArMapObjects::~ArMapObjects() +{ + ArUtil::deleteSet(myMapObjects.begin(), myMapObjects.end()); + myMapObjects.clear(); +} + + +AREXPORT bool ArMapObjects::addToFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + + // make sure we can add all our handlers + if (!fileParser->addHandler(myKeyword.c_str(), &myMapObjectCB)) + { + ArLog::log(ArLog::Terse, "ArMapObjects::addToFileParser: could not add handlers"); + return false; + } + + return true; + +} // end method addToFileParser + + +AREXPORT bool ArMapObjects::remFromFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + + fileParser->remHandler(&myMapObjectCB); + + return true; + +} // end method remFromFileParser + + +AREXPORT ArTime ArMapObjects::getTimeChanged() const +{ + return myTimeChanged; +} + + +AREXPORT void ArMapObjects::clear() +{ + myTimeChanged.setToNow(); + + ArUtil::deleteSet(myMapObjects.begin(), myMapObjects.end()); + myMapObjects.clear(); + +} // end method clear + + +AREXPORT ArMapObject *ArMapObjects::findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading) +{ + for (std::list::iterator objIt = getMapObjects()->begin(); + objIt != getMapObjects()->end(); + objIt++) + { + ArMapObject* obj = (*objIt); + if(obj == NULL) + return NULL; + // if we're searching any type or its the right type then check the name + if (type == NULL || + (!isIncludeWithHeading && (strcasecmp(obj->getType(), type) == 0)) || + (isIncludeWithHeading && (strcasecmp(obj->getBaseType(), type) == 0))) + { + if(name == NULL || strcasecmp(obj->getName(), name) == 0) + { + return obj; + } + } + } + + // if we get down here we didn't find it + return NULL; +} // end method findFirstMapObject + + +AREXPORT ArMapObject *ArMapObjects::findMapObject(const char *name, + const char *type, + bool isIncludeWithHeading) +{ + std::list::iterator objIt; + ArMapObject* obj = NULL; + + for (objIt = getMapObjects()->begin(); + objIt != getMapObjects()->end(); + objIt++) + { + obj = (*objIt); + if(obj == NULL) + return NULL; + // if we're searching any type or its the right type then check the name + if (type == NULL || + (!isIncludeWithHeading && (strcasecmp(obj->getType(), type) == 0)) || + (isIncludeWithHeading && (strcasecmp(obj->getBaseType(), type) == 0))) + { + if(name == NULL || strcasecmp(obj->getName(), name) == 0) + { + return obj; + } + } + } + + // if we get down here we didn't find it + return NULL; +} // end method findMapObject + + +/** + When the map changes the pointers will no longer be valid... this + doesn't lock the map while finding, so if you are using it from + somewhere other than mapChanged you need to lock it... its probably + easiest to just use it from mapChanged though. + + @return Gets a list of pointers to all the map objects of a given * + type... if none match the list will be empty. + + @param type The type of object to try to find... NULL means find + any type + @param isIncludeWithHeading also match "WithHeading" versions of @a type + ("typeWithHeading") + **/ +AREXPORT std::list ArMapObjects::findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading) +{ + std::list ret; + + for (std::list::iterator objIt = myMapObjects.begin(); + objIt != myMapObjects.end(); + objIt++) + { + ArMapObject* obj = (*objIt); + if (obj == NULL) + continue; + // if we're searching any type or its the right type then add it + if (type == NULL || + (!isIncludeWithHeading && (strcasecmp(obj->getType(), type) == 0)) || + (isIncludeWithHeading && (strcasecmp(obj->getBaseType(), type) == 0))) + { + ret.push_back(obj); + } + } + + return ret; +} // end method findMapObjectsOfType + +AREXPORT std::list *ArMapObjects::getMapObjects(void) +{ + // Think this should be done in getMapObjects.... + if (!myIsSortedObjects) { + sortMapObjects(&myMapObjects); + myIsSortedObjects = true; + } + return &myMapObjects; + +} // end method getMapObjects + + +void ArMapObjects::sortMapObjects(std::list *mapObjects) +{ + ArMapObjectCompare compare; + + std::vector tempObjects; + for (std::list::iterator iter1 = mapObjects->begin(); + iter1 != mapObjects->end(); + iter1++) { + tempObjects.push_back(*iter1); + } + std::sort(tempObjects.begin(), tempObjects.end(), compare); + + mapObjects->clear(); + for (std::vector::iterator iter2 = tempObjects.begin(); + iter2 != tempObjects.end(); + iter2++) { + mapObjects->push_back(*iter2); + } + +} // end method sortMapObjects + + +AREXPORT void ArMapObjects::setMapObjects(const std::list *mapObjects, + bool isSortedObjects, + ArMapChangeDetails *changeDetails) +{ + + myTimeChanged.setToNow(); + + // Think this should be done in getMapObjects.... + if (!myIsSortedObjects) { + sortMapObjects(&myMapObjects); + myIsSortedObjects = true; + } + + const std::list *newMapObjects = mapObjects; + std::list *mapObjectsCopy = NULL; + + if ((mapObjects != NULL) && + (!isSortedObjects || (mapObjects == &myMapObjects))) { + mapObjectsCopy = new std::list(*mapObjects); + sortMapObjects(mapObjectsCopy); + newMapObjects = mapObjectsCopy; + } + + + ArMapFileLineSet origLines; + + if (changeDetails != NULL) { + createMultiSet(&origLines); + } + + + std::list origMapObjects = myMapObjects; + //ArUtil::deleteSet(myMapObjects.begin(), myMapObjects.end()); + myMapObjects.clear(); +// myMapObjectsChanged.setToNow(); + + if (newMapObjects != NULL) { + + for (std::list::const_iterator it = newMapObjects->begin(); + it != newMapObjects->end(); + it++) + { + ArMapObject *obj = *it; + if (obj == NULL) { + continue; + } + myMapObjects.push_back(new ArMapObject(*obj)); + origMapObjects.remove(obj); + } + } + + if (changeDetails != NULL) { + + ArMapFileLineSet newLines; + createMultiSet(&newLines); + + bool isSuccess = ArMapFileLineSet::calculateChanges + (origLines, + newLines, + changeDetails->getChangedObjectLines + (ArMapChangeDetails::DELETIONS), + changeDetails->getChangedObjectLines + (ArMapChangeDetails::ADDITIONS), + false); + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "ArMapObjects::setMapObjects() error calculating changes"); + } + } // end if accumulate changes + + // Anything that is left in the original map objects list was not passed + // in via the given map object list. Delete all of the remaining objects. + // The caller is responsible for deleting the objects in the given list. + ArUtil::deleteSet(origMapObjects.begin(), origMapObjects.end()); + + if (mapObjectsCopy != NULL) { + delete mapObjectsCopy; + } + +} // end method setMapObjects + + +AREXPORT void ArMapObjects::writeObjectListToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) +{ + // TODO: Ideally it would probably be nice to cache this string in the object... + // Is this possible with the two different types of keywords? + + for (std::list::iterator mapObjectIt = myMapObjects.begin(); + mapObjectIt != myMapObjects.end(); + mapObjectIt++) + { + ArMapObject *object = (*mapObjectIt); + + ArUtil::functorPrintf(functor, + "%s %s%s", + myKeyword.c_str(), + object->toString(), + endOfLineChars); + } +} // end method writeObjectListToFunctor + + +bool ArMapObjects::handleMapObject(ArArgumentBuilder *arg) +{ + ArMapObject *object = ArMapObject::createMapObject(arg); + + if (object == NULL) { + return false; + } + myMapObjects.push_back(object); +// object->log(myKeyword.c_str()); + //arg->log(); + return true; + +} // end method handleMapObject + + + + +void ArMapObjects::createMultiSet(ArMapFileLineSet *multiSet) +{ + ArMapFileLineSetWriter origWriter(multiSet); + + writeObjectListToFunctor(&origWriter, "\n"); + +} // end method createMultiSet + +void ArMapObjects::logMultiSet(const char *prefix, + ArMapFileLineSet *multiSet) +{ + if (prefix != NULL) { + ArLog::log(ArLog::Normal, + prefix); + } + if (multiSet == NULL) { + ArLog::log(ArLog::Normal, + "NULL"); + return; + } + + for (ArMapFileLineSet::iterator mIter = multiSet->begin(); + mIter != multiSet->end(); + mIter++) { + ArMapFileLineGroup &fileLine = *mIter; + fileLine.log(); + /** + ArLog::log(ArLog::Normal, + "#%-3i : %s", + fileLine.getLineNum(), + fileLine.getLineText()); + **/ + } +} // end method logMultiSet + + +// ---------------------------------------------------------------------------- +// ArMapInfo +// ---------------------------------------------------------------------------- + + + +void ArMapInfo::setDefaultInfoNames() +{ + myInfoTypeToNameMap[MAP_INFO] = "MapInfo:"; + myInfoTypeToNameMap[META_INFO] = "MetaInfo:"; + myInfoTypeToNameMap[TASK_INFO] = "TaskInfo:"; + myInfoTypeToNameMap[ROUTE_INFO] = "RouteInfo:"; + myInfoTypeToNameMap[SCHED_TASK_INFO] = "SchedTaskInfo:"; + myInfoTypeToNameMap[SCHED_INFO] = "SchedInfo:"; + myInfoTypeToNameMap[CAIRN_INFO] = "CairnInfo:"; + myInfoTypeToNameMap[CUSTOM_INFO] = "CustomInfo:"; + +} // end method setDefaultInfoNames + + + +ArMapInfo::ArMapInfoData::ArMapInfoData(ArMapInfo *parent, + const char *keyword, + int type) : + myParent(parent), + myType(type), + myKeyword((keyword!= NULL) ? keyword : ""), + myInfo(), + myInfoCB(NULL) +{ + if (myParent != NULL) { + myInfoCB = new ArRetFunctor1C + (parent, + &ArMapInfo::handleInfo, + NULL); + } + +} + +ArMapInfo::ArMapInfoData::ArMapInfoData(ArMapInfo *parent, + const ArMapInfoData &other) : + myParent(parent), + myType(other.myType), + myKeyword(other.myKeyword), + myInfo(), + myInfoCB(NULL) // Don't copy callbacks +{ + if (myParent != NULL) { + myInfoCB = new ArRetFunctor1C + (parent, + &ArMapInfo::handleInfo, + NULL); + } + for (std::list::const_iterator iter = other.myInfo.begin(); + iter != other.myInfo.end(); + iter++) { + ArArgumentBuilder *arg = *iter; + if (arg == NULL) { + continue; + } + myInfo.push_back(new ArArgumentBuilder(*arg)); + } +} // end pseudo-copy-constructor + + +ArMapInfo::ArMapInfoData &ArMapInfo::ArMapInfoData::operator=(const ArMapInfoData &other) +{ + if (this != &other) { + // Don't change parents + myType = other.myType; + myKeyword = other.myKeyword; + + ArUtil::deleteSet(myInfo.begin(), myInfo.end()); + myInfo.clear(); + + for (std::list::const_iterator iter = other.myInfo.begin(); + iter != other.myInfo.end(); + iter++) { + ArArgumentBuilder *arg = *iter; + if (arg == NULL) { + continue; + } + myInfo.push_back(new ArArgumentBuilder(*arg)); + } + // myInfoCB = other.myInfoCB; // Don't copy callbacks + } + return *this; +} + +ArMapInfo::ArMapInfoData::~ArMapInfoData() +{ + ArUtil::deleteSet(myInfo.begin(), myInfo.end()); + myInfo.clear(); + + delete myInfoCB; +} + + + + +AREXPORT ArMapInfo::ArMapInfo(const char **infoNameList, + size_t infoNameCount, + const char *keywordPrefix) : + ArMapInfoInterface(), + myTimeChanged(), + myNumInfos(0), + myPrefix((keywordPrefix != NULL) ? keywordPrefix : ""), + myInfoTypeToNameMap(), + myInfoNameToDataMap(), + myKeywordToInfoNameMap() +{ + setDefaultInfoNames(); + + if (infoNameList == NULL) { + + // TODO Someday the int types should disappear and this should just be a list of + // info names + + for (std::map::iterator iter = myInfoTypeToNameMap.begin(); + iter != myInfoTypeToNameMap.end(); + iter++) { + + std::string dataName = myPrefix + iter->second.c_str(); + + ArMapInfoData *data = new ArMapInfoData(this, dataName.c_str(), iter->first); + myInfoNameToDataMap[iter->second] = data; + myKeywordToInfoNameMap[dataName.c_str()] = iter->second; + myNumInfos++; + } + } + else { // info name list + + for (size_t i = 0; i < infoNameCount; i++) { + const char *curName = infoNameList[i]; + if (ArUtil::isStrEmpty(curName)) { + continue; + } + std::string dataName = myPrefix + curName; + + ArMapInfoData *data = new ArMapInfoData(this, dataName.c_str()); + myInfoNameToDataMap[curName] = data; + myKeywordToInfoNameMap[dataName.c_str()] = curName; + myNumInfos++; + } + } // end else info name list + +} // end ctor + + + +AREXPORT ArMapInfo::ArMapInfo(const ArMapInfo &other) : + ArMapInfoInterface(), + myTimeChanged(other.myTimeChanged), + myNumInfos(other.myNumInfos), + myPrefix(other.myPrefix), + myInfoTypeToNameMap(other.myInfoTypeToNameMap), + myInfoNameToDataMap(), + myKeywordToInfoNameMap(other.myKeywordToInfoNameMap) +{ + + for (std::map::const_iterator iter = other.myInfoNameToDataMap.begin(); + iter != other.myInfoNameToDataMap.end(); + iter++) { + const ArMapInfoData *otherData = iter->second; + if (otherData == NULL) { + continue; + } + myInfoNameToDataMap[iter->first] = new ArMapInfoData(this, *otherData); + } + +} // end copy ctor + + +AREXPORT ArMapInfo &ArMapInfo::operator=(const ArMapInfo &other) +{ + if (&other != this) { + + myTimeChanged = other.myTimeChanged; + myNumInfos = other.myNumInfos; + myPrefix = other.myPrefix; + myInfoTypeToNameMap = other.myInfoTypeToNameMap; + + ArUtil::deleteSetPairs(myInfoNameToDataMap.begin(), myInfoNameToDataMap.end()); + myInfoNameToDataMap.clear(); + + for (std::map::const_iterator iter = other.myInfoNameToDataMap.begin(); + iter != other.myInfoNameToDataMap.end(); + iter++) { + const ArMapInfoData *otherData = iter->second; + if (otherData == NULL) { + continue; + } + myInfoNameToDataMap[iter->first] = new ArMapInfoData(this, *otherData); + } + + myKeywordToInfoNameMap = other.myKeywordToInfoNameMap; + + } // end if not this + + return *this; + +} // end operator= + + +AREXPORT ArMapInfo::~ArMapInfo() +{ + ArUtil::deleteSetPairs(myInfoNameToDataMap.begin(), myInfoNameToDataMap.end()); + myInfoNameToDataMap.clear(); + +} // end dtor + + +AREXPORT bool ArMapInfo::addToFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + + for (std::map::iterator iter = myInfoNameToDataMap.begin(); + iter != myInfoNameToDataMap.end(); + iter++) { + + ArMapInfoData *data = iter->second; + if (data == NULL) { + continue; + } + if (!fileParser->addHandler(data->myKeyword.c_str(), + data->myInfoCB)) { + + ArLog::log(ArLog::Terse, + "ArMapInfo::addToFileParser: could not add handler for %s", + data->myKeyword.c_str()); + + return false; + } // end if error adding handlers + } // end for each info + + return true; + +} // end method addToFileParser + + +AREXPORT bool ArMapInfo::remFromFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + + for (std::map::iterator iter = myInfoNameToDataMap.begin(); + iter != myInfoNameToDataMap.end(); + iter++) { + ArMapInfoData *data = iter->second; + if (data == NULL) { + continue; + } + fileParser->remHandler(data->myInfoCB); + } + return true; + +} // end method remFromFileParser + + +AREXPORT ArTime ArMapInfo::getTimeChanged() const +{ + return myTimeChanged; +} + +void ArMapInfo::setChanged() +{ + myTimeChanged.setToNow(); +} + +AREXPORT void ArMapInfo::clear() +{ + myTimeChanged.setToNow(); + + for (std::map::iterator iter = myInfoNameToDataMap.begin(); + iter != myInfoNameToDataMap.end(); + iter++) { + ArMapInfoData *data = iter->second; + if (data == NULL) { + continue; + } + ArUtil::deleteSet(data->myInfo.begin(), data->myInfo.end()); + data->myInfo.clear(); + + } // end for each info + +} // end method clear + + +AREXPORT std::list *ArMapInfo::getInfo(int infoType) +{ + std::string infoName; + std::map::iterator iter1 = myInfoTypeToNameMap.find(infoType); + if (iter1 != myInfoTypeToNameMap.end()) { + infoName = iter1->second; + } + return getInfo(infoName.c_str()); + +} +AREXPORT std::list *ArMapInfo::getInfo(const char *infoName) +{ + ArMapInfoData *data = findData(infoName); + + if (data != NULL) { + return &data->myInfo; + } + else { + return NULL; + } + +} // end method getInfo + + +AREXPORT std::list *ArMapInfo::getMapInfo(void) +{ + return getInfo(MAP_INFO_NAME); +} + +AREXPORT int ArMapInfo::getInfoCount() const +{ + return myNumInfos; +} + +AREXPORT std::list ArMapInfo::getInfoNames() const +{ + std::list infoNames; + for (std::map::const_iterator iter = + myInfoNameToDataMap.begin(); + iter != myInfoNameToDataMap.end(); + iter++) { + + infoNames.push_back(iter->first); + } + return infoNames; +} + + + +void ArMapInfo::createMultiSet(const char *infoName, + ArMapFileLineSet *multiSet, + ArMapChangeDetails *changeDetails) +{ + ArMapFileLineSetWriter origWriter(multiSet); + + ArMapInfoData *data = findData(infoName); + if (data == NULL) { + return; + } + + // TODO Will need to know position in order to propagate changes. ??? + for (std::list::iterator infoIt = data->myInfo.begin(); + infoIt != data->myInfo.end(); + infoIt++) { + + ArArgumentBuilder *arg = *infoIt; + if (arg == NULL) { + continue; + } + bool isAddingChildren = false; + if (changeDetails != NULL) { + isAddingChildren = changeDetails->isChildArg(infoName, arg); + } + origWriter.setAddingChildren(isAddingChildren); + + ArUtil::functorPrintf(&origWriter, "%s %s%s", + data->myKeyword.c_str(), + (*infoIt)->getFullString(), + ""); // TODO: What to do about endOfLineChars + + } // end for each info in list + +} // end method createMultiSet + + +AREXPORT ArMapInfo::ArMapInfoData *ArMapInfo::findData(const char *infoName) +{ + if (ArUtil::isStrEmpty(infoName)) { + return NULL; + } + + ArMapInfoData *data = NULL; + std::map::iterator iter1 = + myInfoNameToDataMap.find(infoName); + + if (iter1 != myInfoNameToDataMap.end()) { + data = iter1->second; + } + + return data; + +} // end method findData + +AREXPORT ArMapInfo::ArMapInfoData *ArMapInfo::findDataByKeyword(const char *keyword) +{ + if (ArUtil::isStrEmpty(keyword)) { + return NULL; + } + std::map::iterator iter = myKeywordToInfoNameMap.find(keyword); + if (iter != myKeywordToInfoNameMap.end()) { + return findData(iter->second.c_str()); + } + return NULL; + +} // end method findDataByKeyword + +AREXPORT bool ArMapInfo::setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails) + +{ + return setInfo(getInfoName(infoType), infoList, changeDetails); +} + + +AREXPORT bool ArMapInfo::setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails) + +{ + ArMapInfoData *data = findData(infoName); + if (data == NULL) { + return false; + } + + + ArMapFileLineSet origLines; + + if (changeDetails != NULL) { + createMultiSet(infoName, &origLines, changeDetails); + } + + // Make sure that the original list is not being passed back into this method. + // TODO Fix this + if (&(data->myInfo) == infoList) { + ArLog::log(ArLog::Terse, + "ArMapInfo::setInfo() cannot set to original list"); + return false; + } + + ArUtil::deleteSet(data->myInfo.begin(), data->myInfo.end()); + data->myInfo.clear(); + +// TODO myInfoChangedArray[infoType].setToNow(); + myTimeChanged.setToNow(); + + if (infoList != NULL) { + + for (std::list::const_iterator it = infoList->begin(); + it != infoList->end(); + it++) + { + data->myInfo.push_back(new ArArgumentBuilder(*(*it))); + } + } + + if (changeDetails != NULL) { + + ArMapFileLineSet newLines; + createMultiSet(infoName, &newLines, changeDetails); + + bool isSuccess = ArMapFileLineSet::calculateChanges + (origLines, + newLines, + changeDetails->getChangedInfoLines + (infoName, + ArMapChangeDetails::DELETIONS), + changeDetails->getChangedInfoLines + (infoName, + ArMapChangeDetails::ADDITIONS)); + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "ArMapInfo::setInfo() error calculating changes"); + } + } // end if changeDetails + + return true; + +} // end method setInfo + + +AREXPORT bool ArMapInfo::setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails) +{ + return setInfo(MAP_INFO_NAME, mapInfo, changeDetails); +} + + +AREXPORT void ArMapInfo::writeInfoToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) +{ + + // TODO: Write the info list? + + for (std::map::iterator iter = myInfoNameToDataMap.begin(); + iter != myInfoNameToDataMap.end(); + iter++) { + ArMapInfoData *data = iter->second; + if (data == NULL) { + continue; + } + for (std::list::iterator infoIt = data->myInfo.begin(); + infoIt != data->myInfo.end(); + infoIt++) { + + ArUtil::functorPrintf(functor, "%s %s%s", + data->myKeyword.c_str(), + (*infoIt)->getFullString(), + endOfLineChars); + + } // end for each info in list + + } // end for each info + +} // end method writeInfoToFunctor + + +AREXPORT const char *ArMapInfo::getInfoName(int infoType) +{ + std::map::iterator iter = myInfoTypeToNameMap.find(infoType); + if (iter != myInfoTypeToNameMap.end()) { + const std::string &name = iter->second; + return name.c_str(); + } + return NULL; + +} // end method getInfoName + + +bool ArMapInfo::handleInfo(ArArgumentBuilder *arg) +{ + arg->compressQuoted(); + + const char *keyword = arg->getExtraString(); + + ArMapInfoData *data = findDataByKeyword(keyword); + + if (data == NULL) { + ArLog::log(ArLog::Normal, + "ArMapInfo::handleInfo cannot process %s", + keyword); + return false; + } + ArArgumentBuilder *infoBuilder = new ArArgumentBuilder(*arg); + data->myInfo.push_back(infoBuilder); + + return true; + +} // end method handleInfo + + +// ----------------------------------------------------------------------------- + +const char *ArMapSupplement::EOL_CHARS = ""; + +AREXPORT ArMapSupplement::ArMapSupplement() : + myTimeChanged(), + myHasOriginLatLongAlt(false), + myOriginLatLong(), + myOriginAltitude(0), + myOriginLatLongAltCB(this, &ArMapSupplement::handleOriginLatLongAlt) +{ +} + +AREXPORT ArMapSupplement::ArMapSupplement(const ArMapSupplement &other) : + myTimeChanged(other.myTimeChanged), + myHasOriginLatLongAlt(other.myHasOriginLatLongAlt), + myOriginLatLong(other.myOriginLatLong), + myOriginAltitude(other.myOriginAltitude), + + myOriginLatLongAltCB(this, &ArMapSupplement::handleOriginLatLongAlt) +{ +} + + +AREXPORT ArMapSupplement &ArMapSupplement::operator=(const ArMapSupplement &other) +{ + if (&other != this) { + myTimeChanged = other.myTimeChanged; + myHasOriginLatLongAlt = other.myHasOriginLatLongAlt; + myOriginLatLong = other.myOriginLatLong; + myOriginAltitude = other.myOriginAltitude; + } + return *this; +} + + +AREXPORT ArMapSupplement::~ArMapSupplement() +{ +} + +AREXPORT bool ArMapSupplement::addToFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + if (!fileParser->addHandler("OriginLatLongAlt:", &myOriginLatLongAltCB)) + { + ArLog::log(ArLog::Terse, + "ArMapSupplement::addToFileParser: could not add handlers"); + return false; + } + ArLog::log(ArLog::Verbose, + "ArMapSupplement::addToFileParser() successfully added handlers"); + + return true; + +} // end method addToFileParser + + +AREXPORT bool ArMapSupplement::remFromFileParser(ArFileParser *fileParser) +{ + if (fileParser == NULL) { + return false; + } + fileParser->remHandler(&myOriginLatLongAltCB); + + return true; + +} // end method remFromFileParser + + +AREXPORT ArTime ArMapSupplement::getTimeChanged() const +{ + return myTimeChanged; +} + + +AREXPORT void ArMapSupplement::clear() +{ + myTimeChanged.setToNow(); + + myHasOriginLatLongAlt = false; + myOriginLatLong.setPose(0, 0); + myOriginAltitude = 0; + +} // end method clear + + +/// Gets if this map has an OriginLatLong or not +AREXPORT bool ArMapSupplement::hasOriginLatLongAlt() +{ + return myHasOriginLatLongAlt; +} + +/// Returns the latitude/longitude origin of the map; valid only if hasOriginLatLongAlt returns true +AREXPORT ArPose ArMapSupplement::getOriginLatLong() +{ + return myOriginLatLong; +} + +/// Returns the altitude of the origin; valid only if hasOriginLatLongAlt returns true +AREXPORT double ArMapSupplement::getOriginAltitude() +{ + return myOriginAltitude; +} + + +AREXPORT void ArMapSupplement::setOriginLatLongAlt(bool hasOriginLatLongAlt, + const ArPose &originLatLong, + double altitude, + ArMapChangeDetails *changeDetails) +{ + + + if ((myHasOriginLatLongAlt == hasOriginLatLongAlt) && + (myOriginLatLong == originLatLong) && + (fabs(myOriginAltitude - altitude) < ArMath::epsilon())) { + return; + } + + ArMapFileLineSet origLines; + + if (changeDetails != NULL) { + ArMapFileLineSetWriter origWriter(changeDetails->getChangedSupplementLines + (ArMapChangeDetails::DELETIONS)); + + if (myHasOriginLatLongAlt) { + ArUtil::functorPrintf(&origWriter, "OriginLatLongAlt: %f %f %f%s", + myOriginLatLong.getX(), myOriginLatLong.getY(), + myOriginAltitude, EOL_CHARS); + } + else { + ArUtil::functorPrintf(&origWriter, "OriginLatLongAlt:%s", + EOL_CHARS); + } + } + myHasOriginLatLongAlt = hasOriginLatLongAlt; + myOriginLatLong = originLatLong; + myOriginAltitude = altitude; + + if (changeDetails != NULL) { + ArMapFileLineSetWriter newWriter(changeDetails->getChangedSupplementLines + (ArMapChangeDetails::ADDITIONS)); + + if (myHasOriginLatLongAlt) { + ArUtil::functorPrintf(&newWriter, "OriginLatLongAlt: %f %f %f%s", + myOriginLatLong.getX(), myOriginLatLong.getY(), + myOriginAltitude, EOL_CHARS); + } + else { + ArUtil::functorPrintf(&newWriter, "OriginLatLongAlt:%s", + EOL_CHARS); + + } + } +} + + +AREXPORT void ArMapSupplement::writeSupplementToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) +{ + + if (myHasOriginLatLongAlt) { + ArUtil::functorPrintf(functor, "OriginLatLongAlt: %f %f %f%s", + myOriginLatLong.getX(), myOriginLatLong.getY(), + myOriginAltitude, endOfLineChars); + } + +} // end method writeSupplementToFunctor + + +bool ArMapSupplement::handleOriginLatLongAlt(ArArgumentBuilder *arg) +{ + if (arg->getArgc() >= 3) { + + bool xOk = true; + bool yOk = true; + bool altOk = true; + + double x = arg->getArgDouble(0, &xOk); + double y = arg->getArgDouble(1, &yOk); + double alt = arg->getArgDouble(2, &altOk); + + if (xOk && yOk && altOk) { + myHasOriginLatLongAlt = true; + myOriginLatLong.setPose(x, y); + myOriginAltitude = alt; + return true; + } + } + else if (arg->getArgc() == 0) { + + // This is to handle the special and unlikely change case above -- where + // the map originally has an origin lat/long, but then is changed to not have + // one + myHasOriginLatLongAlt = false; + myOriginLatLong.setPose(0,0); + myOriginAltitude = 0; + return true; + + } + + ArLog::log(ArLog::Verbose, + "ArMap::handleOriginLatLongAlt: line wrong, should be x, y, altitude point (in lat long altitude) as doulbles but is %s", arg->getFullString()); + + return false; + +} // end method handleOriginLatLongAlt + + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- +// ArMapSimple +// ----------------------------------------------------------------------------- + +// TODO: Should these constants be somewhere else? +/** +const char *ArMapSimple::ourDefaultInactiveInfoNames[INFO_COUNT] = +{ + "_MapInfo:", + "_MetaInfo:", + "_TaskInfo:", + "_RouteInfo:", + "_SchedTaskInfo:", + "_SchedInfo:", + "_CairnInfo:", + "_CustomInfo:" +}; +**/ + +int ArMapSimple::ourTempFileNumber = 0; + +ArMutex ArMapSimple::ourTempFileNumberMutex; + +AREXPORT int ArMapSimple::getNextFileNumber() +{ + ourTempFileNumberMutex.lock(); + ourTempFileNumber++; + int ret = ourTempFileNumber; + ourTempFileNumberMutex.unlock(); + + return ret; + +} // end method getNextFileNumber + +AREXPORT void ArMapSimple::invokeCallbackList(std::list *cbList) +{ + if (cbList == NULL) { + ArLog::log(ArLog::Terse, + "ArMapSimple::invokeCallbackList failed because list is null"); + return; + } + for (std::list::iterator iter = cbList->begin(); + iter != cbList->end(); + iter++) { + ArFunctor *cb = *iter; + if (cb == NULL) { + continue; + } + cb->invoke(); + } +} // end method invokeCallbackList + +AREXPORT void ArMapSimple::addToCallbackList(ArFunctor *functor, + ArListPos::Pos position, + std::list *cbList) +{ + if (functor == NULL) { + ArLog::log(ArLog::Terse, + "ArMapSimple::addToCallbackList cannot add null functor"); + return; + } + if (cbList == NULL) { + ArLog::log(ArLog::Terse, + "ArMapSimple::addToCallbackList cannot add functor to null list"); + return; + } + + switch (position) { + case ArListPos::FIRST: + cbList->push_front(functor); + break; + case ArListPos::LAST: + cbList->push_back(functor); + break; + default: + ArLog::log(ArLog::Terse, + "ArMapSimple::addToCallbackList invalid position (%i)", + position); + } // end switch +} // end method addToCallbackList + +AREXPORT void ArMapSimple::remFromCallbackList(ArFunctor *functor, + std::list *cbList) +{ + if (functor == NULL) { + ArLog::log(ArLog::Terse, + "ArMapSimple::remFromCallbackList cannot remove null functor"); + return; + } + if (cbList == NULL) { + ArLog::log(ArLog::Terse, + "ArMapSimple::addToCallbackList cannot remove functor to null list"); + return; + } + cbList->remove(functor); + +} // end method remFromCallbackList + +AREXPORT ArMapSimple::ArMapSimple(const char *baseDirectory, + const char *tempDirectory, + const char *overrideMutexName) : + myMutex(), + + myMapCategoryList(), + myMapCategory(), + + myChecksumCalculator(new ArMD5Calculator()), + + myBaseDirectory((baseDirectory != NULL) ? baseDirectory : ""), + myFileName(), + myReadFileStat(), + + myPreWriteCBList(), + myPostWriteCBList(), + + myIsWriteToTempFile(tempDirectory != NULL), + myTempDirectory((tempDirectory != NULL) ? tempDirectory : ""), + + myMapId(), + + myLoadingParser(NULL), + + myIgnoreEmptyFileName(false), // ignoreEmptyFileName), + myIgnoreCase(false), + + myMapChangedHelper(new ArMapChangedHelper()), + + myLoadingGotMapCategory(false), + myLoadingDataStarted(false), + myLoadingLinesAndDataStarted(false), + + myMapInfo(new ArMapInfo()), + myMapObjects(new ArMapObjects()), + myMapSupplement(new ArMapSupplement()), + + myScanTypeList(), + myTypeToScanMap(), + mySummaryScan(NULL), + + myLoadingDataTag(), + myLoadingScan(NULL), + + // Use special keywords for the inactive elements. + myInactiveInfo(new ArMapInfo(NULL, 0, "_")), + + myInactiveObjects(new ArMapObjects("_Cairn:")), + + myChildObjects(new ArMapObjects("ChildCairn:")), + + myMapObjectNameToParamsMap(), + myRemainderList(), + + myTimeMapInfoChanged(), + myTimeMapObjectsChanged(), + myTimeMapScanChanged(), + myTimeMapSupplementChanged(), + + myMapCategoryCB(this, &ArMapSimple::handleMapCategory), + mySourcesCB(this, &ArMapSimple::handleSources), + myDataIntroCB(this, &ArMapSimple::handleDataIntro), + myRemCB(this, &ArMapSimple::handleRemainder), + + + myIsQuiet(false), + myIsReadInProgress(false), + myIsCancelRead(false) + +{ + if (overrideMutexName == NULL) { + myMutex.setLogName("ArMapSimple::myMutex"); + } + else { + myMutex.setLogName(overrideMutexName); + //myMutex.setLog(true); + } + + ArUtil::appendSlash(myTempDirectory); + ArUtil::fixSlashes(myTempDirectory); + + + myMapCategoryList.push_back(MAP_CATEGORY_2D); + myMapCategoryList.push_back(MAP_CATEGORY_2D_MULTI_SOURCES); + myMapCategoryList.push_back(MAP_CATEGORY_2D_EXTENDED); + myMapCategoryList.push_back(MAP_CATEGORY_2D_COMPOSITE); + + myMapCategory = MAP_CATEGORY_2D; + + // Create the default scan for the sick laser. + ArMapScan *mapScan = new ArMapScan(ARMAP_DEFAULT_SCAN_TYPE); + // TODO This needs to be a constant!! + myScanTypeList.push_back(ARMAP_DEFAULT_SCAN_TYPE); + myTypeToScanMap[ARMAP_DEFAULT_SCAN_TYPE] = mapScan; + + /*** + std::list inactiveInfoNames = createInactiveInfoNames + (myMapInfo->getInfoNames()); + myInactiveInfo->resetInfoNames(inactiveInfoNames); + ***/ + + reset(); +} + +AREXPORT ArMapSimple::ArMapSimple(const ArMapSimple &other) : + myMutex(), + myMapCategoryList(other.myMapCategoryList), + myMapCategory(other.myMapCategory), + myChecksumCalculator((other.myChecksumCalculator != NULL) ? + new ArMD5Calculator() : + NULL), + + myBaseDirectory(other.myBaseDirectory), + myFileName(other.myFileName), + myReadFileStat(other.myReadFileStat), + + myPreWriteCBList(), // Do not copy the callbacks... + myPostWriteCBList(), + myIsWriteToTempFile(other.myIsWriteToTempFile), + myTempDirectory(other.myTempDirectory), + + myMapId(other.myMapId), + myLoadingParser(NULL), // TODO + + + //myConfigParam(other.myConfigParam), + myIgnoreEmptyFileName(other.myIgnoreEmptyFileName), + myIgnoreCase(other.myIgnoreCase), + + myMapChangedHelper(new ArMapChangedHelper()), // Do not want to copy the other one + + // things for our config + //myConfigProcessedBefore(other.myConfigProcessedBefore), + //myConfigMapName(), + + myLoadingGotMapCategory(other.myLoadingGotMapCategory), + myLoadingDataStarted(other.myLoadingDataStarted), + myLoadingLinesAndDataStarted(other.myLoadingLinesAndDataStarted), + + myMapInfo(new ArMapInfo(*other.myMapInfo)), + myMapObjects(new ArMapObjects(*other.myMapObjects)), + myMapSupplement(new ArMapSupplement(*other.myMapSupplement)), + myScanTypeList(other.myScanTypeList), + myTypeToScanMap(), + mySummaryScan(NULL), + + // TODO Need to set this + myLoadingDataTag(), + myLoadingScan(NULL), + + myInactiveInfo(new ArMapInfo(*other.myInactiveInfo)), + myInactiveObjects(new ArMapObjects(*other.myInactiveObjects)), + + myChildObjects(new ArMapObjects(*other.myChildObjects)), + + myMapObjectNameToParamsMap(), // since this is a cache, ok not to copy + myRemainderList(), + + myTimeMapInfoChanged(other.myTimeMapInfoChanged), // TODO Or now?? + myTimeMapObjectsChanged(other.myTimeMapObjectsChanged), + myTimeMapScanChanged(other.myTimeMapScanChanged), + myTimeMapSupplementChanged(other.myTimeMapSupplementChanged), + + // callbacks + myMapCategoryCB(this, &ArMapSimple::handleMapCategory), + mySourcesCB(this, &ArMapSimple::handleSources), + myDataIntroCB(this, &ArMapSimple::handleDataIntro), + myRemCB(this, &ArMapSimple::handleRemainder), + + myIsQuiet(false), + myIsReadInProgress(false), + myIsCancelRead(false) +{ + myMapId.log("ArMapSimple::copy_ctor"); + + myMutex.setLogName("ArMapSimple::myMutex"); + + + for (ArTypeToScanMap::const_iterator iter = + other.myTypeToScanMap.begin(); + iter != other.myTypeToScanMap.end(); + iter++) { + myTypeToScanMap[iter->first] = new ArMapScan(*(iter->second)); + } + + if (other.mySummaryScan != NULL) { + mySummaryScan = new ArMapScan(*other.mySummaryScan); + } // end if other has summary + + //strncpy(myConfigMapName, other.myConfigMapName, MAX_MAP_NAME_LENGTH); + // myConfigMapName[MAX_MAP_NAME_LENGTH - 1] = '\0'; + + reset(); + +} // end copy ctor + + +AREXPORT ArMapSimple &ArMapSimple::operator=(const ArMapSimple &other) +{ + if (&other != this) { + + // TODO: Change this to figure out deltas if desired... + // (or add another method that would assign with delta compute) + + lock(); + + myMapCategoryList = other.myMapCategoryList; + myMapCategory = other.myMapCategory; + + delete myChecksumCalculator; + myChecksumCalculator = NULL; + if (other.myChecksumCalculator != NULL) { + myChecksumCalculator = new ArMD5Calculator(); + } + + myBaseDirectory = other.myBaseDirectory; + myFileName = other.myFileName; + myReadFileStat = other.myReadFileStat; + + // myPreWriteCBList(), // Do not overwrite the callbacks...? + // myPostWriteCBList(), + + myIsWriteToTempFile = other.myIsWriteToTempFile; + myTempDirectory = other.myTempDirectory; + + myMapId = other.myMapId; + + myMapId.log("ArMapSimple::operator="); + //myLoadingParser = NULL; // TODO + + //myConfigParam = other.myConfigParam; + myIgnoreEmptyFileName = other.myIgnoreEmptyFileName; + myIgnoreCase = other.myIgnoreCase; + + // Do not copy the map changed helper + + // things for our config + //myConfigProcessedBefore = other.myConfigProcessedBefore; + //strncpy(myConfigMapName, other.myConfigMapName, MAX_MAP_NAME_LENGTH); + //myConfigMapName[MAX_MAP_NAME_LENGTH - 1] = '\0'; + + myLoadingGotMapCategory = other.myLoadingGotMapCategory; + myLoadingDataStarted = other.myLoadingDataStarted; + myLoadingLinesAndDataStarted = other.myLoadingLinesAndDataStarted; + + *myMapInfo = *other.myMapInfo; + *myMapObjects = *other.myMapObjects; + *myMapSupplement = *other.myMapSupplement; + + delete mySummaryScan; + mySummaryScan = NULL; + + myScanTypeList = other.myScanTypeList; + + ArUtil::deleteSetPairs(myTypeToScanMap.begin(), myTypeToScanMap.end()); + myTypeToScanMap.clear(); + + for (ArTypeToScanMap::const_iterator iter = + other.myTypeToScanMap.begin(); + iter != other.myTypeToScanMap.end(); + iter++) { + myTypeToScanMap[iter->first] = new ArMapScan(*(iter->second)); + } + if (other.mySummaryScan != NULL) { + mySummaryScan = new ArMapScan(*other.mySummaryScan); + } // end if other has summary + + myLoadingDataTag = other.myLoadingDataTag; + myLoadingScan = NULL; + if (other.myLoadingScan != NULL) { + ArTypeToScanMap::iterator scanIter = + myTypeToScanMap.find(other.myLoadingScan->getScanType()); + if (scanIter != myTypeToScanMap.end()) { + myLoadingScan = scanIter->second; + } + } + + *myInactiveInfo = *other.myInactiveInfo; + *myInactiveObjects = *other.myInactiveObjects; + + *myChildObjects = *other.myChildObjects; + + // Since the myMapObjectNameToParamsMap is a cache, there's no + // real need to copy the other one + ArUtil::deleteSetPairs(myMapObjectNameToParamsMap.begin(), + myMapObjectNameToParamsMap.end()); + myMapObjectNameToParamsMap.clear(); + + ArUtil::deleteSet(myRemainderList.begin(), myRemainderList.end()); + myRemainderList.clear(); + for (std::list::const_iterator remIter = other.myRemainderList.begin(); + remIter != other.myRemainderList.end(); + remIter++) { + ArArgumentBuilder *arg = *remIter; + if (arg == NULL) { + continue; // Should never happen + } + myRemainderList.push_back(new ArArgumentBuilder(*arg)); + } + + // The various time flags represent the last time that mapChanged() + // was invoked. Since it has not yet been run for this instance of + // the map, DO NOT update flags. (Doing so may prevent the updated + // map from being downloaded to client MobileEyes apps.) + // + // myTimeMapInfoChanged = other.myTimeMapInfoChanged; + // myTimeMapObjectsChanged = other.myTimeMapObjectsChanged; + // myTimeMapScanChanged = other.myTimeMapScanChanged; + // myTimeMapSupplementChanged = other.myTimeMapSupplementChanged; + + myIsQuiet = other.myIsQuiet; + myIsReadInProgress = other.myIsReadInProgress; + myIsCancelRead = other.myIsCancelRead; + + // Primarily to get the new base directory into the file parser + reset(); + + // Think its best if the caller invokes mapChanged as necessary. + // mapChanged(); + + unlock(); + + } + + return *this; + +} // end operator= + + +AREXPORT ArMapSimple::~ArMapSimple(void) +{ + + if (myIsReadInProgress) { + + ArLog::log(ArLog::Normal, + "ArMapSimple::dtor() map file is being read"); + myIsCancelRead = true; + if (myLoadingParser != NULL) { + myLoadingParser->cancelParsing(); + } + + // Wait a little while to see if the file read can be cancelled + for (int i = 0; ((i < 20) && (myIsReadInProgress)); i++) { + ArUtil::sleep(5); + } + if (myIsReadInProgress) { + ArLog::log(ArLog::Normal, + "ArMapSimple::dtor() map file is still being read"); + } + + } // end if read in progress + + delete myChecksumCalculator; + myChecksumCalculator = NULL; + + delete myLoadingParser; + myLoadingParser = NULL; + + delete myMapChangedHelper; + myMapChangedHelper = NULL; + + delete myMapInfo; + // const, so don't myMapInfo = NULL; + + delete myMapObjects; + // const, so don't myMapObjects = NULL; + + delete myMapSupplement; + // const, so don't myMapSupplement = NULL; + + myScanTypeList.clear(); + ArUtil::deleteSetPairs(myTypeToScanMap.begin(), + myTypeToScanMap.end()); + myTypeToScanMap.clear(); + + + delete mySummaryScan; + mySummaryScan = NULL; + + // This is a reference to one of the scans deleted above, so just + // clear the pointer. + myLoadingScan = NULL; + + delete myInactiveInfo; + // const, so don't myInactiveInfo = NULL; + + delete myInactiveObjects; + // const, so don't myInactiveObjects = NULL; + + delete myChildObjects; + // const, so don't myChildObjects = NULL; + + ArUtil::deleteSetPairs(myMapObjectNameToParamsMap.begin(), + myMapObjectNameToParamsMap.end()); + myMapObjectNameToParamsMap.clear(); + + ArUtil::deleteSet(myRemainderList.begin(), myRemainderList.end()); + myRemainderList.clear(); + +} // end dtor + + +AREXPORT ArMapInterface *ArMapSimple::clone() +{ + return new ArMapSimple(*this); +} + +AREXPORT bool ArMapSimple::set(ArMapInterface *other) +{ + if (other == NULL) { + return false; + } + if (getInfoCount() != other->getInfoCount()) { + return false; + } + + lock(); + + myBaseDirectory = ((other->getBaseDirectory() != NULL) ? + other->getBaseDirectory() : ""); + + myFileName = ((other->getFileName() != NULL) ? + other->getFileName() : ""); + + myReadFileStat = other->getReadFileStat(); + + myIsWriteToTempFile = (other->getTempDirectory() != NULL); + myTempDirectory = ((other->getTempDirectory() != NULL) ? + other->getTempDirectory() : ""); + + other->getMapId(&myMapId); + + myMapId.log("ArMapSimple::set"); + + myLoadingLinesAndDataStarted = + other->isLoadingLinesAndDataStarted(); + myLoadingDataStarted = + other->isLoadingDataStarted(); + + + std::list otherInfoNames = other->getInfoNames(); + for (std::list::const_iterator infoIter = + otherInfoNames.begin(); + infoIter != otherInfoNames.end(); + infoIter++) { + const char *infoName = (*infoIter).c_str(); + setInfo(infoName, other->getInfo(infoName)); + } + // int infoCount = other->getInfoCount(); + //for (int i = 0; i < infoCount; i++) { + // setInfo(i, other->getInfo(i)); + //} // end for each info type + + setMapObjects(other->getMapObjects()); + + createScans((other->getScanTypes())); + + + for (std::list::iterator tIter1 = myScanTypeList.begin(); + tIter1 != myScanTypeList.end(); + tIter1++) { + const char *scanType = (*tIter1).c_str(); + + setPoints(other->getPoints(scanType), scanType, other->isSortedPoints()); + setLines(other->getLines(scanType), scanType, other->isSortedLines()); + setResolution(other->getResolution(scanType), scanType); + + } // end for each scan type + + setOriginLatLongAlt(other->hasOriginLatLongAlt(), + other->getOriginLatLong(), + other->getOriginAltitude()); + + + // Not sure about the implications of doing this... + for (std::list::const_iterator infoIter2 = + otherInfoNames.begin(); + infoIter2 != otherInfoNames.end(); + infoIter2++) { + const char *infoName = (*infoIter2).c_str(); + setInactiveInfo(infoName, other->getInactiveInfo()->getInfo(infoName)); + } + + setInactiveObjects(other->getInactiveObjects()->getMapObjects()); + + setChildObjects(other->getChildObjects()->getMapObjects()); + + updateSummaryScan(); + + // Since the myMapObjectNameToParamsMap is a cache, there's no + // real need to copy the other one + ArUtil::deleteSetPairs(myMapObjectNameToParamsMap.begin(), + myMapObjectNameToParamsMap.end()); + myMapObjectNameToParamsMap.clear(); + + + ArUtil::deleteSet(myRemainderList.begin(), myRemainderList.end()); + myRemainderList.clear(); + + std::list *otherRemainderList = other->getRemainder(); + + if (otherRemainderList != NULL) { + for (std::list::const_iterator remIter = otherRemainderList->begin(); + remIter != otherRemainderList->end(); + remIter++) { + ArArgumentBuilder *arg = *remIter; + if (arg == NULL) { + continue; // Should never happen + } + myRemainderList.push_back(new ArArgumentBuilder(*arg)); + } // end for each remainder + } // end if remainder list not null + + updateMapCategory(); + + reset(); + + unlock(); + + return true; + +} // end method set + + + +AREXPORT void ArMapSimple::clear() +{ + lock(); // ??? + + myFileName = ""; + myMapId = ArMapId(); + myMapId.log("ArMapSimple::clear"); + + myMapInfo->clear(); + myMapObjects->clear(); + myMapSupplement->clear(); + + for (ArTypeToScanMap::iterator iter = + myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); + iter++) { + ArMapScan *scan = iter->second; + if (scan != NULL) { + scan->clear(); + } + } // end for each scan type + + myInactiveInfo->clear(); + myInactiveObjects->clear(); + myChildObjects->clear(); + + ArUtil::deleteSetPairs(myMapObjectNameToParamsMap.begin(), + myMapObjectNameToParamsMap.end()); + myMapObjectNameToParamsMap.clear(); + + ArUtil::deleteSet(myRemainderList.begin(), myRemainderList.end()); + myRemainderList.clear(); + + reset(); + + mapChanged(); //??? + + unlock(); + +} // end method clear + +AREXPORT std::list ArMapSimple::getScanTypes() const +{ + return myScanTypeList; +} + +AREXPORT bool ArMapSimple::setScanTypes(const std::list &scanTypeList) +{ + return createScans(scanTypeList); + +} // end method setScanTypes + + +AREXPORT struct stat ArMapSimple::getReadFileStat() const +{ + return myReadFileStat; +} + +AREXPORT void ArMapSimple::reset() +{ + + myLoadingGotMapCategory = false; + myLoadingDataStarted = false; + myLoadingLinesAndDataStarted = false; + + /// HERE /// + + if (myLoadingParser != NULL) { + delete myLoadingParser; + myLoadingParser = NULL; + } + myLoadingParser = new ArFileParser("./", // base directory + true); // precompress quotes + + + myLoadingParser->setBaseDirectory(myBaseDirectory.c_str()); + + // The map file cannot contain any comments. + myLoadingParser->clearCommentDelimiters(); + + myLoadingParser->setQuiet(myIsQuiet); + +/// END HERE //// + + for (std::list::iterator iter = myMapCategoryList.begin(); + iter != myMapCategoryList.end(); + iter++) { + + if (!myLoadingParser->addHandler((*iter).c_str(), &myMapCategoryCB)) { + ArLog::log(ArLog::Terse, + "ArMapSimple::reset() could not add map category handler for %s", + (*iter).c_str()); + } + } // end for each map category + +} // end method reset + + +AREXPORT bool ArMapSimple::refresh() +{ + ArLog::log(ArLog::Terse, + "ArMapSimple::refresh() not implemented"); + return true; +} + +AREXPORT void ArMapSimple::updateMapFileInfo(const char *realFileName) +{ + stat(realFileName, &myReadFileStat); + + if (myChecksumCalculator != NULL) { + + myMapId = ArMapId(myMapId.getSourceName(), + myMapId.getFileName(), + myChecksumCalculator->getDigest(), + ArMD5Calculator::DIGEST_LENGTH, + myReadFileStat.st_size, + myReadFileStat.st_mtime); + + // TODO Not entirely sure whether we want to register the entire path name, + // or just the file name...? + + } + else { // checksums turned off + + myMapId = ArMapId(myMapId.getSourceName(), + myMapId.getFileName(), + NULL, + 0, + myReadFileStat.st_size, + myReadFileStat.st_mtime); + + } // end else checksums turned off + + myMapId.log("ArMapSimple::updateMapFileInfo"); + + // TODO ArMapRegistry::getIt()->registerMap(realFileName, myMapId); + +} // end method updateMapFileInfo + +AREXPORT const char *ArMapSimple::getMapCategory() +{ + if (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_MULTI_SOURCES) == 0) { + + if (myScanTypeList.size() == 1) { + + const char *scanType = myScanTypeList.front().c_str(); + + // Override the scan type only if it is the sick laser. Other sensors + // must have their scan type specified in the file. + if (isDefaultScanType(scanType) || + (strcasecmp(scanType, "SickLaser") == 0)) { + myMapCategory = MAP_CATEGORY_2D; + } + } + } + return myMapCategory.c_str(); + +} // end method getMapCategory + + +AREXPORT void ArMapSimple::updateMapCategory(const char *updatedInfoName) +{ + // The isDowngradeCategory flag indicates whether the map category can + // be downgraded (e.g. from 2D-Map-Ex2 to 2D-Map) when the map doesn't + // contain advanced features. This would occur if the advanced feature + // was added on the server and was later removed. + // + // The default behavior of the server deactivates the removed items, + // saving them for later use. If the map downgrades the map category, + // big problems can occur if an old copy of the editor is used to + // modify the downgraded map. If the server later re-activates the + // items, the map will most likely be corrupted. + // + // Hence the flag is set to false. + + bool isDowngradeCategory = false; + + // This is the "top-most" map category.. If it's already been set, then there's + // nothing to do + if (!isDowngradeCategory && + strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_COMPOSITE) == 0) { + return; + } + + // If a GroupType MapInfo has been defined, then it must be the composite + // category. + if ((updatedInfoName == NULL) || + (strcasecmp(updatedInfoName, MAP_INFO_NAME) == 0)) { + + if (mapInfoContains("GroupType")) { + if (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_COMPOSITE) != 0) { + ArLog::log(ArLog::Normal, + "ArMapSimple::updateMapCategory() changing category to %s from %s because %s found", + MAP_CATEGORY_2D_COMPOSITE, + myMapCategory.c_str(), + "GroupType"); + myMapCategory = MAP_CATEGORY_2D_COMPOSITE; + } + return; + } // end if map info contains group type + + } // end if updated info name not specified or is map info + + + // TODO If a parent / child map has been defined, then it must be the composite + // category + + + // If any CairnInfo or CustomInfo have been set, then it must be the extended + // category + const char *extendedInfoNames[2]; + extendedInfoNames[0] = CUSTOM_INFO_NAME; + extendedInfoNames[1] = CAIRN_INFO_NAME; + + for (int i = 0; i < 2; i++) { + if ((updatedInfoName != NULL) && + (strcasecmp(updatedInfoName, extendedInfoNames[i]) != 0)) { + continue; + } + + if ((getInfo(extendedInfoNames[i]) != NULL) && + (!getInfo(extendedInfoNames[i])->empty())) { + if (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_EXTENDED) != 0) { + ArLog::log(ArLog::Normal, + "ArMapSimple::updateMapCategory() changing category to %s from %s because %s found", + MAP_CATEGORY_2D_EXTENDED, + myMapCategory.c_str(), + extendedInfoNames[i]); + myMapCategory = MAP_CATEGORY_2D_EXTENDED; + } + return; + } + } // end for each extended info name + + + // Similarly, if any MapInfo's contain an ArgDesc, then it must be the extended + // category. (It seems alright to check this because there shouldn't be + // thousands of map info lines...) + if ((updatedInfoName == NULL) || + (strcasecmp(updatedInfoName, MAP_INFO_NAME) == 0)) { + + if (mapInfoContains("ArgDesc")) { + if ((strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_COMPOSITE) != 0) && + (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_EXTENDED) != 0)) { + ArLog::log(ArLog::Normal, + "ArMapSimple::updateMapCategory() changing category to %s from %s because %s found", + MAP_CATEGORY_2D_EXTENDED, + myMapCategory.c_str(), + "ArgDesc"); + myMapCategory = MAP_CATEGORY_2D_EXTENDED; + } + return; + } + + } // end if updated info name not specified or is map info + + + // Otherwise, if there is more than one scan type, it must be the multi-source + // category + if (!isDowngradeCategory && + strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_MULTI_SOURCES) == 0) { + return; + } + + std::list scanTypeList = getScanTypes(); + + if (scanTypeList.size() > 1) { + + if (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_MULTI_SOURCES) != 0) { + ArLog::log(ArLog::Normal, + "ArMapSimple::updateMapCategory() changing category to %s from %s because %i scan types", + MAP_CATEGORY_2D_MULTI_SOURCES, + myMapCategory.c_str(), + getScanTypes().size()); + myMapCategory = MAP_CATEGORY_2D_MULTI_SOURCES; + } + return; + + } // end if more than one scan type + + + if (scanTypeList.size() == 1) { + + const char *scanType = scanTypeList.front().c_str(); + + if (!isDefaultScanType(scanType) && + (strcasecmp(scanType, "SickLaser") != 0)) { + if (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D_MULTI_SOURCES) != 0) { + ArLog::log(ArLog::Normal, + "ArMapSimple::updateMapCategory() changing category to %s from %s because scan type is %s", + MAP_CATEGORY_2D_MULTI_SOURCES, + myMapCategory.c_str(), + scanType); + myMapCategory = MAP_CATEGORY_2D_MULTI_SOURCES; + } + return; + } + } + + + if (strcasecmp(myMapCategory.c_str(), MAP_CATEGORY_2D) != 0) { + ArLog::log(ArLog::Normal, + "ArMapSimple::updateMapCategory() changing category to %s from %s because no special cases found", + MAP_CATEGORY_2D, + myMapCategory.c_str()); + myMapCategory = MAP_CATEGORY_2D; + } + + return; + +} // end method updateMapCategory + + +AREXPORT bool ArMapSimple::mapInfoContains(const char *arg0Text) +{ + if (ArUtil::isStrEmpty(arg0Text)) { + return false; + } + + std::list *mapInfoList = getInfo(MAP_INFO_NAME); + if (mapInfoList != NULL) { + + for (std::list::const_iterator iter = mapInfoList->begin(); + iter != mapInfoList->end(); + iter++) { + + ArArgumentBuilder *arg = *iter; + if ((arg == NULL) || (arg->getArgc() < 1) || (arg->getArg(0) == NULL)) { + continue; + } + if (strcasecmp(arg->getArg(0), arg0Text) == 0) { + return true; + } // end if arg desc found + + } // end for each map info line + } // end if non-NULL map info + + return false; + +} // end method mapInfoContains + + +AREXPORT void ArMapSimple::addPreWriteFileCB(ArFunctor *functor, + ArListPos::Pos position) +{ + addToCallbackList(functor, position, &myPreWriteCBList); + +} // end method addPreWriteFileCB + +AREXPORT void ArMapSimple::remPreWriteFileCB(ArFunctor *functor) +{ + remFromCallbackList(functor, &myPreWriteCBList); + +} // end method remPreWriteFileCB + +AREXPORT void ArMapSimple::addPostWriteFileCB(ArFunctor *functor, + ArListPos::Pos position) +{ + addToCallbackList(functor, position, &myPostWriteCBList); + +} // end method addPostWriteFileCB + +AREXPORT void ArMapSimple::remPostWriteFileCB(ArFunctor *functor) +{ + remFromCallbackList(functor, &myPostWriteCBList); + +} // end method remPostWriteFileCB + +AREXPORT bool ArMapSimple::readFile(const char *fileName, + char *errorBuffer, + size_t errorBufferLen, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen) +{ + + if (ArUtil::isStrEmpty(fileName)) { + ArLog::log(ArLog::Normal, + "ArMapSimple::readFile() cannot read empty file name"); + return false; + } + + IFDEBUG( + ArLog::log(ArLog::Normal, + "ArMapSimple::readFile() reading %s", + fileName); + ); + + lock(); + myIsReadInProgress = true; + + if (myMapInfo != NULL) { + myMapInfo->clear(); + } + if (myMapObjects != NULL) { + myMapObjects->clear(); + } + if (myMapSupplement != NULL) { + myMapSupplement->clear(); + } + for (ArTypeToScanMap::iterator iter = + myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); + iter++) { + ArMapScan *scan = iter->second; + if (scan != NULL) { + scan->clear(); + } + } // end for each scan type + + if (myInactiveInfo != NULL) { + myInactiveInfo->clear(); + } + if (myInactiveObjects != NULL) { + myInactiveObjects->clear(); + } + if (myChildObjects != NULL) { + myChildObjects->clear(); + } + + reset(); + + // stat(fileName, &myReadFileStat); + FILE *file = NULL; + + char line[10000]; + + std::string realFileName = createRealFileName(fileName); + + ArLog::log(ArLog::Normal, + "Opening map file %s, given %s", + realFileName.c_str(), fileName); + + + // Open file in binary mode to avoid conversion of CRLF in windows. + // This is necessary so that a consistent checksum value is obtained. + if ((file = ArUtil::fopen(realFileName.c_str(), "rb")) == NULL) + { + ArLog::log(ArLog::Terse, "Cannot open file '%s'", realFileName.c_str()); + // TODO This used to put the config param name into the error buffer + if (errorBuffer != NULL) { + snprintf(errorBuffer, errorBufferLen, + "Map invalid: cannot open file '%s'", + fileName); + } + myIsReadInProgress = false; + unlock(); + return false; + } + + ArFunctor1 *parseFunctor = NULL; + + ArTime parseTime; + parseTime.setToNow(); + + if (myChecksumCalculator != NULL) { + + myChecksumCalculator->reset(); + + parseFunctor = myChecksumCalculator->getFunctor(); + myLoadingParser->setPreParseFunctor(parseFunctor); + } + else { + myLoadingParser->setPreParseFunctor(NULL); + } + + bool isSuccess = true; + + char *localErrorBuffer = NULL; + size_t localErrorBufferLen = 0; + + if ((errorBuffer != NULL) && (errorBufferLen > 0)) { + localErrorBufferLen = errorBufferLen; + localErrorBuffer = new char[localErrorBufferLen]; + localErrorBuffer[0] = '\0'; + } + + if (// TODO !reset() || + !myLoadingParser->parseFile(file, line, 10000, + false, // Do not continue on error + localErrorBuffer, localErrorBufferLen)) + { + // If the error buffer is specified, then just make absolutely sure + // that it is null terminated + if ((localErrorBuffer != NULL) && (localErrorBufferLen > 0)) { + localErrorBuffer[localErrorBufferLen - 1] = '\0'; + } + + if (myLoadingDataTag.empty()) + // if (!myLoadingDataStarted && !myLoadingLinesAndDataStarted) + { + // TODO reset(); + if (errorBuffer != NULL) { + + // TODO This used to put the config param name into the error buffer + snprintf(errorBuffer, errorBufferLen, + "Map invalid: '%s' not a valid map (%s)", + fileName, localErrorBuffer); + errorBuffer[errorBufferLen - 1] = '\0'; + } + //unlock(); + ArLog::log(ArLog::Terse, "Could not load map file '%s'", fileName); + + isSuccess = false; + } + } // end if parse success + + delete [] localErrorBuffer; + + if (!myLoadingGotMapCategory) + { + // TODO reset(); + if (errorBuffer != NULL) { + // TODO This used to put the config param name into the error buffer + snprintf(errorBuffer, errorBufferLen, + "Map invalid, '%s' was not a map file", + fileName); + } + + //unlock(); + ArLog::log(ArLog::Terse, + "Could not load map file '%s' it was not a recognized map format", fileName); + isSuccess = false; + } + + bool isLineDataTag = false; // TODO + bool isEndOfFile = false; + + myLoadingScan = findScanWithDataKeyword(myLoadingDataTag.c_str(), + &isLineDataTag); + + isSuccess = (myLoadingScan != NULL); + + while (isSuccess && !isEndOfFile && !myIsCancelRead) { + + bool isDataTagFound = false; + + while ((fgets(line, sizeof(line), file) != NULL) && !myIsCancelRead) + { + if (parseFunctor != NULL) { + parseFunctor->invoke(line); + } + + if (isDataTag(line)) // strncasecmp(line, "DATA", strlen("DATA")) == 0) + { + //myLoadingDataTag = line; + isDataTagFound = true; + break; + } + if (isLineDataTag && !readLineSegment(line)) + { + ArLog::log(ArLog::Normal, + "ArMapSimple::readFile() error reading line data '%s'", + line); + continue; + } + else if (!isLineDataTag && !readDataPoint(line)) + { + continue; + } + } // end while more lines to read + + if (isDataTagFound) { + + myLoadingScan = findScanWithDataKeyword(myLoadingDataTag.c_str(), + &isLineDataTag); + isSuccess = (myLoadingScan != NULL); + + if (myLoadingScan != NULL) { + + ArLog::log(ArLog::Verbose, + "ArMapSimple::readFile() found scan type %s for data tag %s (is line = %i)", + myLoadingScan->getScanType(), + myLoadingDataTag.c_str(), + isLineDataTag); + } + else { + ArLog::log(ArLog::Normal, + "ArMapSimple::readFile() cannot find scan for data tag %s (is line = %i)", + myLoadingDataTag.c_str(), + isLineDataTag); + } + } + else { // else must be end of file + + isEndOfFile = true; + ArLog::log(ArLog::Verbose, + "ArMapSimple::readFile() end of file found"); + + } // end else end of file + + } // end while no error and not end of file + + + updateSummaryScan(); + + + int elapsed = parseTime.mSecSince(); + + ArLog::log(ArLog::Normal, + "ArMapSimple::readFile() %s took %i msecs to read map of %i points", + realFileName.c_str(), + elapsed, + getNumPoints(ARMAP_SUMMARY_SCAN_TYPE)); + + fclose(file); + + if (!myIsCancelRead) { + updateMapFileInfo(realFileName.c_str()); + + //stat(realFileName.c_str(), &myReadFileStat); + + if (myChecksumCalculator != NULL) { + + if (md5DigestBuffer != NULL) { + memset(md5DigestBuffer, 0, md5DigestBufferLen); + memcpy(md5DigestBuffer, myChecksumCalculator->getDigest(), + ArUtil::findMin(md5DigestBufferLen, ArMD5Calculator::DIGEST_LENGTH)); + } + + myLoadingParser->setPreParseFunctor(NULL); + } + + if (isSuccess) { + // move the stuff over from reading to new + myFileName = fileName; + + ArLog::log(myMapChangedHelper->getMapChangedLogLevel(), + "ArMapSimple:: Calling mapChanged()"); + mapChanged(); + ArLog::log(myMapChangedHelper->getMapChangedLogLevel(), + "ArMapSimple:: Finished mapChanged()"); + + } + } // end if not cancelling + + myIsReadInProgress = false; + + unlock(); + return isSuccess; + +} // end method readFile + + +AREXPORT bool ArMapSimple::isDataTag(const char *line) +{ + // Pre: Line is not null + ArDataTagToScanTypeMap::iterator typeIter = + myDataTagToScanTypeMap.find(line); + + if (typeIter != myDataTagToScanTypeMap.end()) { + myLoadingDataTag = typeIter->first; + return true; + } + return false; + +} // end method isDataTag + + +AREXPORT ArMapScan *ArMapSimple::findScanWithDataKeyword + (const char *loadingDataTag, + bool *isLineDataTagOut) +{ + //ArLog::log(ArLog::Normal, + // "ArMapSimple::findScanWithDataKeyword() looking for scan with tag %s", + // loadingDataTag); + + if (ArUtil::isStrEmpty(loadingDataTag)) { + return NULL; + } + ArDataTagToScanTypeMap::iterator typeIter = + myDataTagToScanTypeMap.find(loadingDataTag); + if (typeIter == myDataTagToScanTypeMap.end()) { + return NULL; + } + + ArTypeToScanMap::iterator scanIter = + myTypeToScanMap.find(typeIter->second); + + if (scanIter == myTypeToScanMap.end()) { + return NULL; + } + + ArMapScan *mapScan = scanIter->second; + if (mapScan == NULL) { + return NULL; + } + + bool isLineDataTag = (ArUtil::strcasecmp(loadingDataTag, + mapScan->getLinesKeyword()) == 0); + + //ArLog::log(ArLog::Normal, + // "ArMapSimple::findScanWithDataKeyword() found scan for tag %s, isLineData = %i", + // loadingDataTag, + // isLineDataTag); + + + if (isLineDataTag) { + myLoadingLinesAndDataStarted = true; + } + else { + myLoadingDataStarted = true; + } + + if (isLineDataTagOut != NULL) { + *isLineDataTagOut = isLineDataTag; + } + + return mapScan; + +} // end method findScanWithDataKeyword + + +AREXPORT bool ArMapSimple::writeFile(const char *fileName, + bool internalCall, + unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen, + time_t fileTimestamp) +{ + FILE *file = NULL; + if (!internalCall) + lock(); + + // Calling updateMapCategory here just in case the file is being + // written because the associated info has changed (as in the case + // of AramMapInfoMinder). + updateMapCategory(); + + invokeCallbackList(&myPreWriteCBList); + + std::string realFileName = createRealFileName(fileName); + std::string writeFileName; + + if (myIsWriteToTempFile) { + + char tempFileName[3200]; + int tempFileNameLen = 3200; + + tempFileName[0] = '\0'; + + int fileNumber = getNextFileNumber(); + +// Hoping that this is highly temporary... +#ifdef WIN32 + snprintf(tempFileName, tempFileNameLen, + "%sArMap.%d.%d", + myTempDirectory.c_str(), _getpid(), fileNumber); +#else // linux + snprintf(tempFileName, tempFileNameLen, + "%sArMap.%d.%d", + myTempDirectory.c_str(), getpid(), fileNumber); +#endif // end else linux + + ArLog::log(ArLog::Normal, + "Writing map %s to temp file %s\n", + fileName, + tempFileName); + + writeFileName = tempFileName; + + } + else { // write to actual file + + writeFileName = realFileName; + + } // end else write to actual file + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + // Open file in binary mode to avoid conversion of CRLF in windows. + // This is necessary so that a consistent checksum value is obtained. + + if ((file = ArUtil::fopen(writeFileName.c_str(), "wb")) == NULL) + { + bool isFileSuccess = false; + + ArLog::log(ArLog::Terse, + "ArMap: Cannot open file '%s' for writing", + writeFileName.c_str()); + + invokeCallbackList(&myPostWriteCBList); + + if (!internalCall) + unlock(); + + return false; + + } // end if error opening file for writing + + + ArTime writeTime; + writeTime.setToNow(); + + ArFunctor1 *writeFunctor = NULL; + + ArGlobalFunctor2 functor(&ArUtil::writeToFile, "", file); + + + if (myChecksumCalculator != NULL) { + ArLog::log(ArLog::Normal, + "ArMapSimple::writeFile() recalculating checksum"); + + myChecksumCalculator->reset(); + + // Note that this is reset to NULL below before it leaves the scope + // of this method. + myChecksumCalculator->setSecondFunctor(&functor); + writeFunctor = myChecksumCalculator->getFunctor(); + } + else { + writeFunctor = &functor; + } + + writeToFunctor(writeFunctor, "\n"); + + int elapsed = writeTime.mSecSince(); + + ArLog::log(ArLog::Normal, + "ArMapSimple::writeFile() took %i msecs to write map of %i points", + elapsed, + getNumPoints()); + + + fclose(file); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + if (myIsWriteToTempFile) { + + char systemBuf[6400]; + int systemBufLen = 6400; + +#ifndef WIN32 + const char *moveCmdName = "mv -f"; +#else + const char *moveCmdName = "move"; +#endif + + int printLen = snprintf(systemBuf, systemBufLen, + "%s \"%s\" \"%s\"", + moveCmdName, + writeFileName.c_str(), + realFileName.c_str()); + systemBuf[systemBufLen - 1] = '\0'; + + int ret = -1; + + if ((printLen >= 0) && (printLen < systemBufLen)) { + + ret = system(systemBuf); + + } // end if success creating command + + if (ret != 0) { + + ArLog::log(ArLog::Terse, + "Error saving map file %s. Temp file cannot be moved. (%s)", + fileName, + systemBuf); + if (!internalCall) + unlock(); + + return false; + + } // end if error moving file + + } // end if write to temp file + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + // The file info needs to be set to the real file name (not the possible temp one) + + if (fileTimestamp != -1) { + + ArLog::log(ArLog::Normal, + "ArMapSimple::writeFile() setting time of %s", + realFileName.c_str()); + bool isTimeChanged = ArUtil::changeFileTimestamp(realFileName.c_str(), + fileTimestamp); + + } + +// KMC TODO Wouldn't it make sense to change the myFileName member? + myFileName = fileName; + + + + updateMapFileInfo(realFileName.c_str()); + + // Reset the file statistics to reflect the newly written file. + stat(realFileName.c_str(), &myReadFileStat); + + if (myChecksumCalculator != NULL) { + + if (md5DigestBuffer != NULL) { + if (md5DigestBufferLen != ArMD5Calculator::DIGEST_LENGTH) { + // log warning + } + memset(md5DigestBuffer, 0, md5DigestBufferLen); + memcpy(md5DigestBuffer, myChecksumCalculator->getDigest(), + ArUtil::findMin(md5DigestBufferLen, ArMD5Calculator::DIGEST_LENGTH)); + } + + // Reset to NULL before the functor leaves the scope of this method. + myChecksumCalculator->setSecondFunctor(NULL); + + } // end if checksum calculated + + invokeCallbackList(&myPostWriteCBList); + + ArLog::log(ArLog::Normal, "Saved map file %s", fileName); + if (!internalCall) + unlock(); + + + return true; + +} // end method writeFile + + +AREXPORT bool ArMapSimple::calculateChecksum(unsigned char *md5DigestBuffer, + size_t md5DigestBufferLen) +{ + + if ((md5DigestBuffer == NULL) || + (md5DigestBufferLen < ArMD5Calculator::DIGEST_LENGTH)) { + return false; + } + + lock(); + + bool isLocalCalculator = false; + ArMD5Calculator *calculator = myChecksumCalculator; + if (calculator == NULL) { + isLocalCalculator = true; + calculator = new ArMD5Calculator(); + } + + memset(md5DigestBuffer, 0, md5DigestBufferLen); + + calculator->reset(); + writeToFunctor(calculator->getFunctor(), "\n"); + + memcpy(md5DigestBuffer, calculator->getDigest(), + ArMD5Calculator::DIGEST_LENGTH); + + if (isLocalCalculator) { + delete calculator; + } + + unlock(); + + return true; + +} // end method calculateChecksum + + +AREXPORT const char *ArMapSimple::getBaseDirectory(void) const +{ + return myBaseDirectory.c_str(); + +} // end method getBaseDirectory + + +AREXPORT const char *ArMapSimple::getFileName(void) const +{ + return myFileName.c_str(); + +} // end method getFileName + + +void ArMapSimple::setIgnoreEmptyFileName(bool ignore) +{ + myIgnoreEmptyFileName = ignore; + +} // end method setIgnoreEmptyFileName + + +bool ArMapSimple::getIgnoreEmptyFileName(void) +{ + return myIgnoreEmptyFileName; + +} // end method getIgnoreEmptyFileName + + +void ArMapSimple::setIgnoreCase(bool ignoreCase) +{ + myIgnoreCase = ignoreCase; + +} // end method setIgnoreCase + + +bool ArMapSimple::getIgnoreCase(void) +{ + return myIgnoreCase; + +} // end method getIgnoreCase + + +AREXPORT void ArMapSimple::setBaseDirectory(const char *baseDirectory) +{ + if (baseDirectory != NULL) { + myBaseDirectory = baseDirectory; + } + else { + myBaseDirectory = ""; + } + +} // end method setBaseDirectory + +AREXPORT const char *ArMapSimple::getTempDirectory(void) const +{ + if (myIsWriteToTempFile) { + return myTempDirectory.c_str(); + } + else { + return NULL; + } +} + +AREXPORT void ArMapSimple::setTempDirectory(const char *tempDirectory) +{ + if (tempDirectory != NULL) { + myIsWriteToTempFile = true; + myTempDirectory = tempDirectory; + } + else { + myIsWriteToTempFile = false; + myTempDirectory = ""; + } +} + + +AREXPORT void ArMapSimple::setSourceFileName(const char *sourceName, + const char *fileName, + bool isInternalCall) +{ + if (!isInternalCall) { + lock(); + } + myMapId.setSourceName(sourceName); + + std::string realFileName = ((fileName != NULL) ? fileName : ""); + + if (!myBaseDirectory.empty()) { + if (realFileName.find(myBaseDirectory) == 0) { + size_t dirLen = myBaseDirectory.length(); + if ((myBaseDirectory[dirLen - 1] == '/') || + (myBaseDirectory[dirLen - 1] == '\\')) { + realFileName = realFileName.substr(dirLen, + realFileName.length() - dirLen); + } + else { + realFileName = realFileName.substr(dirLen + 1, + realFileName.length() - (dirLen + 1)); + } + + ArLog::log(ArLog::Normal, + "ArMapSimple::setSourceFileName(%s, %s) stripped base dir = %s", + sourceName, + fileName, + realFileName.c_str()); + } + + } + + myMapId.setFileName(realFileName.c_str()); + if (!isInternalCall) { + unlock(); + } + +} // end method setSourceFileName + + +AREXPORT bool ArMapSimple::getMapId(ArMapId *mapIdOut, + bool isInternalCall) +{ + if (mapIdOut != NULL) { + if (!isInternalCall) { + lock(); + } + *mapIdOut = myMapId; + if (!isInternalCall) { + unlock(); + } + return true; + } + else { + ArLog::log(ArLog::Normal, + "ArMapSimple::getMapId() null map ID param"); + } + return false; + +} // end method getMapId + + +AREXPORT ArArgumentBuilder *ArMapSimple::findMapObjectParams + (const char *mapObjectName) +{ + if (ArUtil::isStrEmpty(mapObjectName)) { + return NULL; + } + + ArArgumentBuilder *params = NULL; + + std::map::iterator iter = + myMapObjectNameToParamsMap.find(mapObjectName); + + if (iter == myMapObjectNameToParamsMap.end()) { + + std::list *cairnInfoList = getInfo(CAIRN_INFO_NAME); + + if (cairnInfoList != NULL) { + + ArArgumentBuilder *paramInfo = NULL; + std::list::iterator infoIter = + findMapObjectParamInfo(mapObjectName, + *cairnInfoList); + if (infoIter != cairnInfoList->end()) { + paramInfo = *infoIter; + } + if (paramInfo != NULL) { + + params = new ArArgumentBuilder(*paramInfo); + params->compressQuoted(true); + + if (params->getArgc() >= 2) { + params->removeArg(0); // Remove the "Params" field + params->removeArg(0, true); // Remove the map object name + } + myMapObjectNameToParamsMap[mapObjectName] = params; + } + + } // end for each cairn info + } // end if + // if we already have one, juset set that + else + { + params = (*iter).second; + } + + return params; + +} // end method findMapObjectParams + +/** + ArMapObject *obj = myMap->findMapObject(objName); + const ArArgumentBuilder *args = myMap->findMapObjectParams(objName); + + bool ok = true; + int someNum = 0; + + if ((args != NULL) && (args->getArgc() > 0)) { + + someNum = args->getArgInt(0, &ok); + } + + if (ok) { + + ArArgumentBuilder newArgs; + char buf[128] + snprintf(buf, sizeof(buf), "%i", someNum + 1); + newArgs.add(buf); + + // Note that the newArgs will be copied, and that the original args + // pointer (above) will be invalidated by the following call. + myMap->setMapObjectParams(objName, &newArgs); + args = NULL; + } + + + mapObjectList.remove(obj); + myMap->setMapObjectParams(obj->getName(), NULL); + myMap->setMapObjects(mapObjectList); + delete obj; + +**/ + +AREXPORT bool ArMapSimple::setMapObjectParams(const char *mapObjectName, + ArArgumentBuilder *params, + ArMapChangeDetails *changeDetails) +{ + if (ArUtil::isStrEmpty(mapObjectName)) { + return false; + } + + std::list *cairnInfoList = getInfo(CAIRN_INFO_NAME); + if (cairnInfoList == NULL) { + return false; + } + + ArMapFileLineSet origLines; + + if (changeDetails != NULL) { + myMapInfo->createMultiSet(CAIRN_INFO_NAME, &origLines, changeDetails); + } + + std::map::iterator iter = + myMapObjectNameToParamsMap.find(mapObjectName); + + if (iter != myMapObjectNameToParamsMap.end()) { + ArArgumentBuilder *oldParams = iter->second; + myMapObjectNameToParamsMap.erase(iter); + delete oldParams; + } + + if (params != NULL) { + myMapObjectNameToParamsMap[mapObjectName] = new ArArgumentBuilder(*params); + } + + + std::list::iterator infoIter = + findMapObjectParamInfo + (mapObjectName, + *cairnInfoList); + if (infoIter != cairnInfoList->end()) { + ArArgumentBuilder *oldInfo = *infoIter; + cairnInfoList->erase(infoIter); + delete oldInfo; + } + + if (params != NULL) { + + // Any need to make sure that mapObjectName is not started with quotes + // already? + std::string quotedMapObjectName = "\""; + quotedMapObjectName += mapObjectName; + quotedMapObjectName += "\""; + + ArArgumentBuilder *newInfo = new ArArgumentBuilder(); + newInfo->add("Params"); + newInfo->add(quotedMapObjectName.c_str()); + newInfo->add(params->getFullString()); + + // This little alphabetization of the CairnInfo list is done just to + // make the ArMapChangeDetails processing better. (i.e. It's in sync + // with the editor.) + bool isInserted = false; + for (infoIter = cairnInfoList->begin(); + infoIter != cairnInfoList->end(); + infoIter++) { + ArArgumentBuilder *curArg = *infoIter; + + if ((curArg == NULL) || (curArg->getArgc() < 2)) { + continue; + } + + if (ArUtil::strcasequotecmp(mapObjectName, curArg->getArg(1)) <= 0) { + cairnInfoList->insert(infoIter, newInfo); + isInserted = true; + break; + } + } // end for each info item + + if (!isInserted) { + cairnInfoList->push_back(newInfo); + } + + } // end if new params + + myMapInfo->setChanged(); + + if (changeDetails != NULL) { + + ArMapFileLineSet newLines; + myMapInfo->createMultiSet(CAIRN_INFO_NAME, &newLines, changeDetails); + + bool isSuccess = ArMapFileLineSet::calculateChanges + (origLines, + newLines, + changeDetails->getChangedInfoLines + (CAIRN_INFO_NAME, + ArMapChangeDetails::DELETIONS), + changeDetails->getChangedInfoLines + (CAIRN_INFO_NAME, + ArMapChangeDetails::ADDITIONS)); + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "ArMapInfo::setInfo() error calculating changes"); + } + } // end if changeDetails + + return true; + +} // end method setMapObjectParams + + +std::list::iterator ArMapSimple::findMapObjectParamInfo + (const char *mapObjectName, + std::list &cairnInfoList) +{ + // If the map object has parameters, then it must have a name. + if (ArUtil::isStrEmpty(mapObjectName)) { + ArLog::log(ArLog::Normal, + "ArMapSimple::findMapObjectParamInfo() cannot find empty map object name"); + return cairnInfoList.end(); + } + + for (std::list::iterator iter = cairnInfoList.begin(); + iter != cairnInfoList.end(); + iter++) { + + ArArgumentBuilder *arg = *iter; + // The first arg in the CairnInfo line is the type of info (e.g. Params) + // and the second arg name of the map object... + if ((arg == NULL) || + (arg->getArgc() < 2) || + (ArUtil::isStrEmpty(arg->getArg(1)))) { + ArLog::log(ArLog::Normal, + "AramMapInfoMinder::findObjectParams() skipping: %s", + ((arg != NULL) ? arg->getFullString(): "NULL")); + continue; + } + + if (ArUtil::strcasequotecmp(arg->getArg(1), mapObjectName) == 0) { + return iter; + } + } // end for each cairn info list item + + // Not found + return cairnInfoList.end(); + +} // end method findMapObjectParamInfo + + + +AREXPORT std::list *ArMapSimple::getRemainder() +{ + return &myRemainderList; +} + +AREXPORT void ArMapSimple::setQuiet(bool isQuiet) +{ + myIsQuiet = isQuiet; + +} // end method setQuiet + + +AREXPORT void ArMapSimple::mapChanged(void) +{ + ArTime maxScanTimeChanged = findMaxMapScanTimeChanged(); +// ArLog::log(level, "ArMap: Calling mapChanged callbacks"); + if (!myTimeMapInfoChanged.isAt(myMapInfo->getTimeChanged()) || + !myTimeMapObjectsChanged.isAt(myMapObjects->getTimeChanged()) || + !myTimeMapSupplementChanged.isAt(myMapSupplement->getTimeChanged()) || + !myTimeMapScanChanged.isAt(maxScanTimeChanged)) { + + ArLog::log(myMapChangedHelper->getMapChangedLogLevel(), + "ArMapSimple::mapChanged() msecs-objects: %i, msecs-points: %i, msecs-mapInfo: %i msecs-supplement: %i", + myTimeMapObjectsChanged.isAt(myMapObjects->getTimeChanged()), + !myTimeMapScanChanged.isAt(maxScanTimeChanged), + !myTimeMapInfoChanged.isAt(myMapInfo->getTimeChanged()), + !myTimeMapSupplementChanged.isAt( + myMapSupplement->getTimeChanged())); + + + // Since setInfo is not necessarily called, call updateMapCategory just to + // make sure that the category is correctly set based on the contents of the + // map file. + if (!myTimeMapInfoChanged.isAt(myMapInfo->getTimeChanged())) { + updateMapCategory(); + } + + if (!myTimeMapScanChanged.isAt(maxScanTimeChanged)) { + updateSummaryScan(); + } // end if scan was changed + + myMapChangedHelper->invokeMapChangedCallbacks(); + + ArLog::log(myMapChangedHelper->getMapChangedLogLevel(), + "ArMapSimple: Done calling mapChanged callbacks"); + } + else { // nothing changed + + ArLog::log(ArLog::Verbose, + "ArMapSimple::mapChanged(): Map was not changed"); + + } // end else nothing changed + + myTimeMapObjectsChanged = myMapObjects->getTimeChanged(); + myTimeMapSupplementChanged = myMapSupplement->getTimeChanged(); + myTimeMapInfoChanged = myMapInfo->getTimeChanged(); + myTimeMapScanChanged = findMaxMapScanTimeChanged(); + +} // end method mapChanged + + +AREXPORT void ArMapSimple::updateSummaryScan() +{ + if (mySummaryScan != NULL) { + + mySummaryScan->clear(); + + for (ArTypeToScanMap::iterator iter = myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); + iter++) { + mySummaryScan->unite(iter->second); + } + } // end if summary +} + + +AREXPORT ArTime ArMapSimple::findMaxMapScanTimeChanged() +{ + ArTime maxMapScanTimeChanged; + bool isFirst = true; + + for (ArTypeToScanMap::iterator iter = + myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); + iter++) { + ArMapScan *scan = iter->second; + if (scan != NULL) { + if (isFirst || + (scan->getTimeChanged().isAfter(maxMapScanTimeChanged))) { + isFirst = false; + maxMapScanTimeChanged = scan->getTimeChanged(); + } + } + } // end for each scan + + return maxMapScanTimeChanged; + + +} // end method findMaxMapScanTimeChanged + + +AREXPORT void ArMapSimple::addMapChangedCB(ArFunctor *functor, + int position) +{ + myMapChangedHelper->addMapChangedCB(functor, position); + +} // end method addMapChangedCB + + +AREXPORT void ArMapSimple::remMapChangedCB(ArFunctor *functor) +{ + myMapChangedHelper->remMapChangedCB(functor); + +} // end method remMapChangedCB + + +AREXPORT void ArMapSimple::addPreMapChangedCB(ArFunctor *functor, + int position) +{ + myMapChangedHelper->addPreMapChangedCB(functor, position); +} // end method addPreMapChangedCB + + +AREXPORT void ArMapSimple::remPreMapChangedCB(ArFunctor *functor) +{ + myMapChangedHelper->remPreMapChangedCB(functor); + +} // end method remPreMapChangedCB + + +AREXPORT void ArMapSimple::setMapChangedLogLevel(ArLog::LogLevel level) +{ + myMapChangedHelper->setMapChangedLogLevel(level); + +} // end method setMapChangedLogLevel + +AREXPORT ArLog::LogLevel ArMapSimple::getMapChangedLogLevel(void) +{ + return myMapChangedHelper->getMapChangedLogLevel(); + +} // end method getMapChangedLogLevel + + +AREXPORT int ArMapSimple::lock() +{ + return myMutex.lock(); + +} // end method lock + +AREXPORT int ArMapSimple::tryLock() +{ + return myMutex.tryLock(); + +} // end method tryLock + +AREXPORT int ArMapSimple::unlock() +{ + return myMutex.unlock(); + +} // end method unlock + +// --------------------------------------------------------------------------- +// ArMapInfoInterface +// --------------------------------------------------------------------------- + +AREXPORT std::list *ArMapSimple::getInfo(const char *infoName) +{ + return myMapInfo->getInfo(infoName); + +} // end method getInfo + +AREXPORT std::list *ArMapSimple::getInfo(int infoType) +{ + return myMapInfo->getInfo(infoType); + +} // end method getInfo + +AREXPORT std::list *ArMapSimple::getMapInfo(void) +{ + return myMapInfo->getInfo(ArMapInfo::MAP_INFO_NAME); + +} // end method getMapInfo + +AREXPORT int ArMapSimple::getInfoCount() const +{ + return myMapInfo->getInfoCount(); +} + +AREXPORT std::list ArMapSimple::getInfoNames() const +{ + return myMapInfo->getInfoNames(); +} + +AREXPORT bool ArMapSimple::setInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails) +{ + bool b = myMapInfo->setInfo(infoName, infoList, changeDetails); + + // updateMapCategory(infoName); + + return b; + +} // end method setInfo + +AREXPORT bool ArMapSimple::setInfo(int infoType, + const std::list *infoList, + ArMapChangeDetails *changeDetails) +{ + bool b = myMapInfo->setInfo(infoType, infoList, changeDetails); + + // updateMapCategory(NULL); + + return b; + +} // end method setInfo + +AREXPORT bool ArMapSimple::setMapInfo(const std::list *mapInfo, + ArMapChangeDetails *changeDetails) +{ + bool b = myMapInfo->setInfo(ArMapInfo::MAP_INFO_NAME, mapInfo, changeDetails); + + // updateMapCategory(ArMapInfo::MAP_INFO_NAME); + + return b; + +} // end method setMapInfo + + +AREXPORT void ArMapSimple::writeInfoToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) +{ + return myMapInfo->writeInfoToFunctor(functor, endOfLineChars); + +} // end method writeInfoToFunctor + + +AREXPORT const char *ArMapSimple::getInfoName(int infoType) +{ + return myMapInfo->getInfoName(infoType); + +} // end method getInfoName + +// --------------------------------------------------------------------------- +// ArMapObjectsInterface +// --------------------------------------------------------------------------- + +AREXPORT ArMapObject *ArMapSimple::findFirstMapObject(const char *name, + const char *type, + bool isIncludeWithHeading) +{ + return myMapObjects->findFirstMapObject(name, type, isIncludeWithHeading); + +} // end method findFirstMapObject + + +AREXPORT ArMapObject *ArMapSimple::findMapObject(const char *name, + const char *type, + bool isIncludeWithHeading) +{ + return myMapObjects->findMapObject(name, type, isIncludeWithHeading); + +} // end method findMapObject + +AREXPORT std::list ArMapSimple::findMapObjectsOfType + (const char *type, + bool isIncludeWithHeading) +{ + return myMapObjects->findMapObjectsOfType(type, isIncludeWithHeading); +} + + +AREXPORT std::list *ArMapSimple::getMapObjects(void) +{ + return myMapObjects->getMapObjects(); + +} // end method getMapObjects + + +AREXPORT void ArMapSimple::setMapObjects + (const std::list *mapObjects, + bool isSortedObjects, + ArMapChangeDetails *changeDetails) +{ + + myMapObjects->setMapObjects(mapObjects, isSortedObjects, changeDetails); + +} // end method setMapObjects + + +AREXPORT void ArMapSimple::writeObjectsToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + bool isOverrideAsSingleScan, + const char *maxCategory) +{ + std::string category = getMapCategory(); + if (maxCategory != NULL) { + if (strcasecmp(maxCategory, MAP_CATEGORY_2D_COMPOSITE) == 0) { + category = MAP_CATEGORY_2D_COMPOSITE; + } + else if (strcasecmp(maxCategory, MAP_CATEGORY_2D_EXTENDED) == 0) { + category = MAP_CATEGORY_2D_EXTENDED; + } + else if (strcasecmp(maxCategory, MAP_CATEGORY_2D_MULTI_SOURCES) == 0) { + category = MAP_CATEGORY_2D_MULTI_SOURCES; + } + else { + category = MAP_CATEGORY_2D; + isOverrideAsSingleScan = true; + } + } + else if (isOverrideAsSingleScan) { + category = MAP_CATEGORY_2D; + } + + ArUtil::functorPrintf(functor, "%s%s", + category.c_str(), + endOfLineChars); + + if (!isOverrideAsSingleScan) { + writeScanTypesToFunctor(functor, endOfLineChars); + } + + if (!isOverrideAsSingleScan) { + + for (std::list::iterator iter = myScanTypeList.begin(); + iter != myScanTypeList.end(); + iter++) { + const char *scanType = (*iter).c_str(); + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->writeScanToFunctor(functor, endOfLineChars, scanType); + } + } // end for each scan type + } + else { // else send single scan + + ArMapScanInterface *mapScan = getScan(ARMAP_SUMMARY_SCAN_TYPE); + if (mapScan != NULL) { + mapScan->writeScanToFunctor(functor, + endOfLineChars, + ARMAP_SUMMARY_SCAN_TYPE); + } + } // end else just send single scan + + myMapSupplement->writeSupplementToFunctor(functor, endOfLineChars); + + myMapInfo->writeInfoToFunctor(functor, endOfLineChars); + + myMapObjects->writeObjectListToFunctor(functor, endOfLineChars); + +} // end method writeObjectsToFunctor + + +AREXPORT void ArMapSimple::writeObjectListToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) +{ + myMapObjects->writeObjectListToFunctor(functor, endOfLineChars); + +} // end method writeObjectListToFunctor + + + + +// --------------------------------------------------------------------------- +// ArMapScanInterface +// --------------------------------------------------------------------------- + +AREXPORT const char *ArMapSimple::getDisplayString(const char *scanType) +{ + if (isSummaryScanType(scanType)) { + // TODO Could return a special "Summary" string instead... + ArLog::log(ArLog::Terse, + "ArMapSimple::getDisplayString() summary display is not supported"); + return ""; + } + + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getDisplayString(scanType); + } + return ""; + +} // end method getDisplayString + + +AREXPORT std::vector *ArMapSimple::getPoints(const char *scanType) +{ + if (isSummaryScanType(scanType)) { + ArLog::log(ArLog::Terse, + "ArMapSimple::getPoints() summary of points is not supported"); + return NULL; + } + + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getPoints(scanType); + } + return NULL; + +} // end method getPoints + + +AREXPORT std::vector *ArMapSimple::getLines(const char *scanType) +{ + if (isSummaryScanType(scanType)) { + ArLog::log(ArLog::Terse, + "ArMapSimple::getLines() summary of lines is not supported"); + return NULL; + } + + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getLines(scanType); + } + return NULL; + +} // end method getLines + + +AREXPORT ArPose ArMapSimple::getMinPose(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getMinPose(scanType); + } + return ArPose(); + +} // end method getMinPose + +AREXPORT ArPose ArMapSimple::getMaxPose(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getMaxPose(scanType); + } + return ArPose(); + +} // end method getMaxPose + +AREXPORT int ArMapSimple::getNumPoints(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getNumPoints(scanType); + } + return 0; + +} // end method getNumPoints + +AREXPORT ArPose ArMapSimple::getLineMinPose(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getLineMinPose(scanType); + } + return ArPose(); + +} // end method getLineMinPose + +AREXPORT ArPose ArMapSimple::getLineMaxPose(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getLineMaxPose(scanType); + } + return ArPose(); + +} // end method getLineMaxPose + +AREXPORT int ArMapSimple::getNumLines(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getNumLines(scanType); + } + return 0; + +} // end method getNumLines + +AREXPORT int ArMapSimple::getResolution(const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->getResolution(scanType); + } + return 0; + +} // end method getResolution + + + +AREXPORT bool ArMapSimple::isSortedPoints(const char *scanType) const +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->isSortedPoints(scanType); + } + return false; +} + +AREXPORT bool ArMapSimple::isSortedLines(const char *scanType) const +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + return mapScan->isSortedLines(scanType); + } + return false; +} + +AREXPORT void ArMapSimple::setPoints(const std::vector *points, + const char *scanType, + bool isSorted, + ArMapChangeDetails *changeDetails) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->setPoints(points, + scanType, + isSorted, + changeDetails); + } + +} // end method setPoints + +AREXPORT void ArMapSimple::setLines(const std::vector *lines, + const char *scanType, + bool isSorted, + ArMapChangeDetails *changeDetails) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->setLines(lines, + scanType, + isSorted, + changeDetails); + } + +} // end method setLines + +AREXPORT void ArMapSimple::setResolution(int resolution, + const char *scanType, + ArMapChangeDetails *changeDetails) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->setResolution(resolution, + scanType, + changeDetails); + } +} // end method setResolution + + + + +AREXPORT void ArMapSimple::writeScanToFunctor(ArFunctor1 *functor, + const char *endOfLineChars, + const char *scanType) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->writeScanToFunctor(functor, endOfLineChars, scanType); + } + +} // end method writeScanToFunctor + + +AREXPORT void ArMapSimple::writePointsToFunctor + (ArFunctor2 *> *functor, + const char *scanType, + ArFunctor1 *keywordFunctor) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->writePointsToFunctor(functor, scanType, keywordFunctor); + } + +} // end method writePointsToFunctor + +AREXPORT void ArMapSimple::writeLinesToFunctor + (ArFunctor2 *> *functor, + const char *scanType, + ArFunctor1 *keywordFunctor) +{ + ArMapScanInterface *mapScan = getScan(scanType); + if (mapScan != NULL) { + mapScan->writeLinesToFunctor(functor, scanType, keywordFunctor); + } + +} // end method writeLinesToFunctor + + +AREXPORT bool ArMapSimple::readDataPoint( char *line) +{ + // TODO Locking? + if (myLoadingScan != NULL) { + return myLoadingScan->readDataPoint(line); + } + return false; + +} // end method readDataPoint + +AREXPORT bool ArMapSimple::readLineSegment( char *line) +{ + if (myLoadingScan != NULL) { + return myLoadingScan->readLineSegment(line); + } + else { + ArLog::log(ArLog::Normal, + "ArMapSimple::readLineSegment() NULL loading scan for '%s'", + line); + } + return false; + +} // end method readLineSegment + + +AREXPORT void ArMapSimple::loadDataPoint(double x, double y) +{ + if (myLoadingScan != NULL) { + myLoadingScan->loadDataPoint(x, y); + } + +} // end method loadDataPoint + + +AREXPORT void ArMapSimple::loadLineSegment(double x1, double y1, double x2, double y2) +{ + if (myLoadingScan != NULL) { + myLoadingScan->loadLineSegment(x1, y1, x2, y2); + } +} // end method loadLineSegment + + +AREXPORT bool ArMapSimple::addToFileParser(ArFileParser *fileParser) +{ + if (myTypeToScanMap.empty()) { + ArLog::log(ArLog::Normal, + "ArMapSimple::addToFileParser() error: no scans in map"); + return false; + } + bool isAdded = true; + + for (ArTypeToScanMap::iterator iter = myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); iter++) { + ArMapScan *mapScan = iter->second; + if (mapScan != NULL) { + isAdded = mapScan->addToFileParser(fileParser) && isAdded; + } + } + return isAdded; +} + +AREXPORT bool ArMapSimple::remFromFileParser(ArFileParser *fileParser) +{ + if (myTypeToScanMap.empty()) { + return false; + } + bool isRemoved = true; + + for (ArTypeToScanMap::iterator iter = myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); iter++) { + ArMapScan *mapScan = iter->second; + if (mapScan != NULL) { + isRemoved = mapScan->remFromFileParser(fileParser) && isRemoved; + } + } + return isRemoved; +} + + +AREXPORT void ArMapSimple::writeScanTypesToFunctor + (ArFunctor1 *functor, + const char *endOfLineChars) +{ + bool hasSourceList = false; + if (!myScanTypeList.empty()) { + hasSourceList = !ArUtil::isStrEmpty(myScanTypeList.front().c_str()); + } + if (hasSourceList) { + + std::string sourceString = "Sources:"; + + //ArUtil::functorPrintf(functor, "Sources:%s", ""); + + for (std::list::iterator iter = myScanTypeList.begin(); + iter != myScanTypeList.end(); + iter++) { + + const char *scanType = (*iter).c_str(); + sourceString += " "; + sourceString += scanType; + + // ArUtil::functorPrintf(functor, " %s%s", scanType, ""); + + } // end for each scan type + + ArUtil::functorPrintf(functor, "%s%s", sourceString.c_str(), endOfLineChars); + + } // end if source list + +} // end method writeScanTypesToFunctor + + +AREXPORT bool ArMapSimple::hasOriginLatLongAlt() +{ + return myMapSupplement->hasOriginLatLongAlt(); + +} // end method hasOriginLatLongAlt + +AREXPORT ArPose ArMapSimple::getOriginLatLong() +{ + return myMapSupplement->getOriginLatLong(); + +} // end method getOriginLatLong + +AREXPORT double ArMapSimple::getOriginAltitude() +{ + return myMapSupplement->getOriginAltitude(); + +} // end method getOriginAltitude + +AREXPORT void ArMapSimple::setOriginLatLongAlt + (bool hasOriginLatLong, + const ArPose &originLatLong, + double originAltitude, + ArMapChangeDetails *changeDetails) +{ + myMapSupplement->setOriginLatLongAlt(hasOriginLatLong, + originLatLong, + originAltitude, + changeDetails); +} // end method setOriginLatLongAlt + +AREXPORT void ArMapSimple::writeSupplementToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) +{ + myMapSupplement->writeSupplementToFunctor(functor, + endOfLineChars); + + +} // end method writeSupplementToFunctor + + + +// --------------------------------------------------------------------------- + +AREXPORT void ArMapSimple::writeToFunctor(ArFunctor1 *functor, + const char *endOfLineChars) +{ + // Write the header information and Cairn objects... + ArUtil::functorPrintf(functor, "%s%s", + getMapCategory(), + endOfLineChars); + + std::list::iterator iter = myScanTypeList.end(); + + writeScanTypesToFunctor(functor, endOfLineChars); + + for (iter = myScanTypeList.begin(); iter != myScanTypeList.end(); iter++) { + + const char *scanType = (*iter).c_str(); + ArMapScan *mapScan = getScan(scanType); + + if (mapScan != NULL) { + mapScan->writeScanToFunctor(functor, endOfLineChars, scanType); + } + } + + myMapSupplement->writeSupplementToFunctor(functor, endOfLineChars); + + myMapInfo->writeInfoToFunctor(functor, endOfLineChars); + + myMapObjects->writeObjectListToFunctor(functor, endOfLineChars); + + myInactiveInfo->writeInfoToFunctor(functor, endOfLineChars); + + myInactiveObjects->writeObjectListToFunctor(functor, endOfLineChars); + + myChildObjects->writeObjectListToFunctor(functor, endOfLineChars); + + // Write out any unrecognized (remainder) lines -- just to try to prevent them + // from being accidentally lost + + for (std::list::const_iterator remIter = myRemainderList.begin(); + remIter != myRemainderList.end(); + remIter++) { + ArArgumentBuilder *remArg = *remIter; + if (remArg == NULL) { + continue; + } + ArUtil::functorPrintf(functor, "%s%s", + remArg->getFullString(), + endOfLineChars); + + } // end for each remainder line + + + // Write the lines... + for (iter = myScanTypeList.begin(); iter != myScanTypeList.end(); iter++) { + + const char *scanType = (*iter).c_str(); + ArMapScan *mapScan = getScan(scanType); + + if (mapScan != NULL) { + mapScan->writeLinesToFunctor(functor, endOfLineChars, scanType); + } + } + + // Write the points... + for (iter = myScanTypeList.begin(); iter != myScanTypeList.end(); iter++) { + + const char *scanType = (*iter).c_str(); + ArMapScan *mapScan = getScan(scanType); + + if (mapScan != NULL) { + mapScan->writePointsToFunctor(functor, endOfLineChars, scanType); + } + } + +} // end method writeToFunctor + + +AREXPORT ArMapInfoInterface *ArMapSimple::getInactiveInfo() +{ + return myInactiveInfo; +} + +AREXPORT ArMapObjectsInterface *ArMapSimple::getInactiveObjects() +{ + return myInactiveObjects; +} + +AREXPORT ArMapObjectsInterface *ArMapSimple::getChildObjects() +{ + return myChildObjects; +} + +AREXPORT bool ArMapSimple::parseLine(char *line) +{ + return myLoadingParser->parseLine(line); + +} // end method parseLine + +AREXPORT void ArMapSimple::parsingComplete(void) +{ + lock(); + mapChanged(); + unlock(); + +} // end method parsingComplete + + +AREXPORT bool ArMapSimple::isLoadingDataStarted() +{ + return myLoadingDataStarted; + +} // end method isLoadingDataStarted + + +AREXPORT bool ArMapSimple::isLoadingLinesAndDataStarted() +{ + return myLoadingLinesAndDataStarted; + +} // end method isLoadingLinesAndDataStarted + + +std::string ArMapSimple::createRealFileName(const char *fileName) +{ + return ArMapInterface::createRealFileName(myBaseDirectory.c_str(), + fileName, + myIgnoreCase); + +} // end method createRealFileName + +bool ArMapSimple::handleMapCategory(ArArgumentBuilder *arg) +{ + ArLog::log(ArLog::Verbose, + "ArMapSimple::handleMapCategory() read category %s", + arg->getExtraString()); + + + if (!addScansToParser() || + !myLoadingParser->addHandler("Sources:", &mySourcesCB) || + !myMapInfo->addToFileParser(myLoadingParser) || + !myMapSupplement->addToFileParser(myLoadingParser) || + !myMapObjects->addToFileParser(myLoadingParser) || + !myInactiveInfo->addToFileParser(myLoadingParser) || + !myInactiveObjects->addToFileParser(myLoadingParser) || + !myChildObjects->addToFileParser(myLoadingParser) || + // Add a handler for unrecognized lines... + !myLoadingParser->addHandler(NULL, &myRemCB)) + { + ArLog::log(ArLog::Terse, + "ArMapSimple::handleMapCategory: could not add handlers"); + return false; + } + + // If all of the parsers were successfully added, then remove the map + // category handlers and return + + myMapCategory = ""; + for (std::list::iterator iter = myMapCategoryList.begin(); + iter != myMapCategoryList.end(); + iter++) { + if (strncasecmp(arg->getExtraString(), + (*iter).c_str(), + (*iter).length()) == 0) { + myMapCategory = *iter; + } + + myLoadingParser->remHandler((*iter).c_str()); + + } // end for each category + + if (myMapCategory.empty()) { + ArLog::log(ArLog::Normal, + "ArMapSimple::handleMapCategory() error finding category for %s", + arg->getExtraString()); + arg->getExtraString(); + } + + myLoadingGotMapCategory = true; + + return true; + +} // end method handleMapCategory + + +bool ArMapSimple::handleSources(ArArgumentBuilder *arg) +{ + + std::list scanTypeList; + + for (size_t i = 0; i < arg->getArgc(); i++) { + ArLog::log(ArLog::Normal, + "ArMapSimple::handleSources() source #%i = %s", + i, arg->getArg(i)); + scanTypeList.push_back(arg->getArg(i)); + } + + if (scanTypeList.empty()) { + ArLog::log(ArLog::Terse, + "ArMapSimple::handleSources() at least one source must be specified"); + return false; + } + + remScansFromParser(true); + + createScans(scanTypeList); + + addScansToParser(); + + return true; + +} // end method handleSources + + +bool ArMapSimple::createScans(const std::list &scanTypeList) +{ + if (scanTypeList.empty()) { + ArLog::log(ArLog::Normal, + "ArMapSimple::createScans() scan type list must be non-empty"); + + return false; + } + + bool isListValid = true; + + // Perform some simple validations on the scan type list... + if (scanTypeList.size() > 1) { + + std::map typeToExistsMap; + + // Make sure that none of the scan types are empty + for (std::list::const_iterator iter1 = scanTypeList.begin(); + iter1 != scanTypeList.end(); + iter1++) { + const char *scanType = (*iter1).c_str(); + if (ArUtil::isStrEmpty(scanType)) { + isListValid = false; + ArLog::log(ArLog::Normal, + "ArMapSimple::createScans() empty scan name is valid only when there is one scan type"); + break; + } + + // Make sure that there are no duplicates... + std::map::iterator tIter = + typeToExistsMap.find(scanType); + if (tIter != typeToExistsMap.end()) { + isListValid = false; + ArLog::log(ArLog::Normal, + "ArMapSimple::createScans() duplicate scan names are not allowed (%s)", + scanType); + break; + } + + typeToExistsMap[scanType] = true; + + } // end for each scan type + } // end if more than one entry + + if (!isListValid) { + + ArLog::log(ArLog::Terse, + "ArMapSimple error setting up map for multiple scan types"); + return false; + + } + + + delete mySummaryScan; + mySummaryScan = NULL; + + myScanTypeList.clear(); + ArUtil::deleteSetPairs(myTypeToScanMap.begin(), myTypeToScanMap.end()); + myTypeToScanMap.clear(); + + ArMapScan *mapScan = NULL; + + for (std::list::const_iterator iter = scanTypeList.begin(); + iter != scanTypeList.end(); + iter++) { + std::string scanType = *iter; + + mapScan = new ArMapScan(scanType.c_str()); + + myScanTypeList.push_back(scanType); + myTypeToScanMap[scanType] = mapScan; + + } // end for each scan type + + if (myScanTypeList.size() > 1) { + mySummaryScan = new ArMapScan(ARMAP_SUMMARY_SCAN_TYPE); + } + return true; + +} // end method createScans + + +bool ArMapSimple::addScansToParser() +{ + if (myLoadingParser == NULL) { + ArLog::log(ArLog::Normal, + "ArMapSimple::addScansToParser() error, loading parser is null"); + return false; + } + if (myTypeToScanMap.empty()) { + ArLog::log(ArLog::Normal, + "ArMapSimple::addScansToParser() error, no maps scans"); + return false; + } + + bool isLoaded = true; + + for (ArTypeToScanMap::iterator iter = myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); + iter++) { + + ArMapScan *mapScan = iter->second; + if (mapScan == NULL) { + continue; + } + if (!mapScan->addToFileParser(myLoadingParser)) { + ArLog::log(ArLog::Normal, + "ArMapSimple::addScansToParser() error, could not add scan for %s", + iter->first.c_str()); + isLoaded = false; + continue; + } + + ArLog::log(ArLog::Verbose, + "ArMapSimple::addScansToParser() adding for type %s points keyword %s lines keyword %s", + mapScan->getScanType(), + mapScan->getPointsKeyword(), + mapScan->getLinesKeyword()); + + if (!ArUtil::isStrEmpty(mapScan->getPointsKeyword())) { + + myDataTagToScanTypeMap[mapScan->getPointsKeyword()] = iter->first; + if (!myLoadingParser->addHandler(mapScan->getPointsKeyword(), + &myDataIntroCB)) { + ArLog::log(ArLog::Normal, + "ArMapSimple::addScansToParser() error, could not handler for %s", + mapScan->getPointsKeyword()); + isLoaded = false; + } + } + if (!ArUtil::isStrEmpty(mapScan->getLinesKeyword())) { + myDataTagToScanTypeMap[mapScan->getLinesKeyword()] = iter->first; + if (!myLoadingParser->addHandler(mapScan->getLinesKeyword(), + &myDataIntroCB)) { + ArLog::log(ArLog::Normal, + "ArMapSimple::addScansToParser() error, could not handler for %s", + mapScan->getLinesKeyword()); + isLoaded = false; + } + } + } // end for each scan + + return isLoaded; + +} // end method addScansToParser + + +bool ArMapSimple::remScansFromParser(bool isRemovePointsAndLinesKeywords) +{ + if (myLoadingParser == NULL) { + return false; + } + if (myTypeToScanMap.empty()) { + return false; + } + bool isRemoved = true; + + for (ArTypeToScanMap::iterator iter = + myTypeToScanMap.begin(); + iter != myTypeToScanMap.end(); + iter++) { + ArMapScan *mapScan = iter->second; + if (mapScan == NULL) { + continue; + } + if (!mapScan->remFromFileParser(myLoadingParser)) { + isRemoved = false; + continue; + } + + if (isRemovePointsAndLinesKeywords) { + if (!ArUtil::isStrEmpty(mapScan->getPointsKeyword())) { + if (!myLoadingParser->remHandler(mapScan->getPointsKeyword(), + &myDataIntroCB)) { + isRemoved = false; + } + } + if (!ArUtil::isStrEmpty(mapScan->getLinesKeyword())) { + if (!myLoadingParser->remHandler(mapScan->getLinesKeyword(), + &myDataIntroCB)) { + isRemoved = false; + } + } + } // end if remove points and lines keywords + } // end for each scan + + return isRemoved; + +} // end method remScansFromParser + + +bool ArMapSimple::handleDataIntro(ArArgumentBuilder *arg) +{ + remScansFromParser(false); + + myMapSupplement->remFromFileParser(myLoadingParser); + myMapInfo->remFromFileParser(myLoadingParser); + myMapObjects->remFromFileParser(myLoadingParser); + + myInactiveInfo->remFromFileParser(myLoadingParser); + myInactiveObjects->remFromFileParser(myLoadingParser); + myChildObjects->remFromFileParser(myLoadingParser); + + myLoadingParser->remHandler("Sources:"); + + // Remove the remainder handler + myLoadingParser->remHandler((const char *)NULL); + + // All of the info types have been read by now... If there is + // an extended one, then update the map's category. + updateMapCategory(); + + ArLog::log(ArLog::Verbose, + "ArMapSimple::handleDataIntro %s", + arg->getExtraString()); + + // The "extra string" contains the keyword - in all lowercase + if (arg->getExtraString() != NULL) { + myLoadingDataTag = arg->getExtraString(); + } + else { + myLoadingDataTag = ""; + } + + // Need to set the myLoadingScan so that calls from ArQ to loadDataPoint + // and loadDataLine are processed correctly. In addition, the findScan... + // method sets the myLoadingData / myLoadingLinesAndData attributes -- + // which are also needed by ArQ + bool isLineDataTag = false; + + if (myLoadingScan != NULL) { + myLoadingScan->remExtraFromFileParser(myLoadingParser); + } + + myLoadingScan = findScanWithDataKeyword(myLoadingDataTag.c_str(), + &isLineDataTag); + + if (myLoadingScan != NULL) { + myLoadingScan->addExtraToFileParser(myLoadingParser, isLineDataTag); + } + + return false; + +} // end method handleDataIntro + + +bool ArMapSimple::handleRemainder(ArArgumentBuilder *arg) +{ + if (arg != NULL) { + myRemainderList.push_back(new ArArgumentBuilder(*arg)); + } + return true; + +} // end method handleRemainder + + +bool ArMapSimple::setInactiveInfo(const char *infoName, + const std::list *infoList, + ArMapChangeDetails *changeDetails) +{ + return myInactiveInfo->setInfo(infoName, infoList, changeDetails); + +} // end method setInactiveInfo + +void ArMapSimple::setInactiveObjects + (const std::list *mapObjects, + bool isSortedObjects, + ArMapChangeDetails *changeDetails) +{ + myInactiveObjects->setMapObjects(mapObjects, isSortedObjects, changeDetails); + +} // end method setInactiveObjects + + +void ArMapSimple::setChildObjects + (const std::list *mapObjects, + bool isSortedObjects, + ArMapChangeDetails *changeDetails) +{ + myChildObjects->setMapObjects(mapObjects, isSortedObjects, changeDetails); + +} // end method setChildObjects + + + +AREXPORT ArMapScan *ArMapSimple::getScan(const char *scanType) const +{ + // The summary scan type is a special designation that allows the user + // to return the total number of points in the map, the bounding box of + // all the scans, etc. If there are multiple scan types in the map, then + // the mySummaryScan member is created. Otherwise, the summary is the + // same as the single scan. + if (isSummaryScanType(scanType)) { + if (mySummaryScan != NULL) { + return mySummaryScan; + } + else { + scanType = ARMAP_DEFAULT_SCAN_TYPE; + } + } // end if summary scan type + + ArTypeToScanMap::const_iterator iter = myTypeToScanMap.find(scanType); + + // If the specified scan type was not found, then see if the special + // ARMAP_DEFAULT_SCAN_TYPE was specified. If so, this is equivalent to the + // first scan in the scan list. + if ((iter == myTypeToScanMap.end()) && + (isDefaultScanType(scanType)) && + (!myScanTypeList.empty())) { + scanType = myScanTypeList.front().c_str(); + iter = myTypeToScanMap.find(scanType); + } + + if (iter != myTypeToScanMap.end()) { + return iter->second; + } + + return NULL; + +} // end method getScan + + + + diff --git a/Legacy/Aria/src/ArMapInterface.cpp b/Legacy/Aria/src/ArMapInterface.cpp new file mode 100644 index 0000000..2430498 --- /dev/null +++ b/Legacy/Aria/src/ArMapInterface.cpp @@ -0,0 +1,208 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ariaInternal.h" + +#include "ArMapInterface.h" + + +AREXPORT const char *ArMapInfoInterface::MAP_INFO_NAME = "MapInfo:"; +AREXPORT const char *ArMapInfoInterface::META_INFO_NAME = "MetaInfo:"; +AREXPORT const char *ArMapInfoInterface::TASK_INFO_NAME = "TaskInfo:"; +AREXPORT const char *ArMapInfoInterface::ROUTE_INFO_NAME = "RouteInfo:"; +AREXPORT const char *ArMapInfoInterface::SCHED_TASK_INFO_NAME = "SchedTaskInfo:"; +AREXPORT const char *ArMapInfoInterface::SCHED_INFO_NAME = "SchedInfo:"; +AREXPORT const char *ArMapInfoInterface::CAIRN_INFO_NAME = "CairnInfo:"; +AREXPORT const char *ArMapInfoInterface::CUSTOM_INFO_NAME = "CustomInfo:"; + +AREXPORT const char *ArMapInterface::MAP_CATEGORY_2D = "2D-Map"; +AREXPORT const char *ArMapInterface::MAP_CATEGORY_2D_MULTI_SOURCES = "2D-Map-Ex"; +AREXPORT const char *ArMapInterface::MAP_CATEGORY_2D_EXTENDED = "2D-Map-Ex2"; +AREXPORT const char *ArMapInterface::MAP_CATEGORY_2D_COMPOSITE = "2D-Map-Ex3"; + + + +AREXPORT bool ArMapScanInterface::isDefaultScanType(const char *scanType) +{ + bool b = false; + if ((scanType != NULL) && + (ArUtil::isStrEmpty(scanType))) { + b = true; + } + return b; +} + +AREXPORT bool ArMapScanInterface::isSummaryScanType(const char *scanType) +{ + bool b = scanType == NULL; + return b; +} + +// ---------------------------------------------------------------------------- + + +/** + * Determines what system file path to use based on the contents of @a baseDirectory, @a fileName and + * @a isIgnoreCase. If @a fileName is not an absolute path and @a baseDirectory is not null and + * not empty, then it is combined with @a baseDirectory to form a full path. + * An absolute path starts with the '/' or '\' character, or on Windows, with "X:\" where X is any + * upper or lower case alphabetic character A-Z or a-z. + */ +AREXPORT std::string ArMapInterface::createRealFileName(const char *baseDirectory, + const char *fileName, + bool isIgnoreCase) +{ + + if (fileName == NULL) { + return ""; + } + std::string realFileName; + + // If there is no base directory or the filename part is an absolute path, use the filename directly without the base directory + if ((fileName[0] == '/') || + (fileName[0] == '\\') || + (strlen(baseDirectory) == 0) || + (baseDirectory == NULL) +#ifdef WIN32 + || + ( fileName[1] == ':' && (fileName[2] == '\\' || fileName[2] == '/') && isalpha(fileName[0]) ) +#endif + ) + { + realFileName = fileName; + } + else // non-empty base directory and fileName is not an absolute path + { + int totalLen = strlen(baseDirectory) + strlen(fileName) + 10; + char *nameBuf = new char[totalLen]; + nameBuf[0] = '\0'; + + snprintf(nameBuf, totalLen, baseDirectory); + ArUtil::appendSlash(nameBuf, totalLen); + + realFileName = nameBuf; + realFileName += fileName; + + delete [] nameBuf; + + } // end else non empty base directory + + // this isn't needed in windows since it ignores case no matter what +#ifndef WIN32 + if (isIgnoreCase) + { + char directoryRaw[2048]; + directoryRaw[0] = '\0'; + char fileNamePart[2048]; + fileNamePart[0] = '\0'; + if (!ArUtil::getDirectory(realFileName.c_str(), + directoryRaw, sizeof(directoryRaw)) || + !ArUtil::getFileName(realFileName.c_str(), + fileNamePart, sizeof(fileNamePart))) + { + ArLog::log(ArLog::Normal, + "ArMap: Problem with filename '%s'", + realFileName.c_str()); + return ""; + } + + + char directory[2048]; + //printf("DirectoryRaw %s\n", directoryRaw); + if (strlen(directoryRaw) == 0 || strcmp(directoryRaw, ".") == 0) + { + strcpy(directory, "."); + } + else if (directoryRaw[0] == '/') + { + strcpy(directory, directoryRaw); + } + else if (!ArUtil::matchCase(baseDirectory, + directoryRaw, + directory, + sizeof(directory))) + { + ArLog::log(ArLog::Normal, + "ArMap: Bad directory for '%s'", + realFileName.c_str()); + return ""; + } + + char tmpDir[2048]; + tmpDir[0] = '\0'; + //sprintf(tmpDir, "%s", tmpDir, directory); + strcpy(tmpDir, directory); + ArUtil::appendSlash(tmpDir, sizeof(tmpDir)); + char squashedFileName[2048]; + + if (ArUtil::matchCase(tmpDir, fileNamePart, + squashedFileName, + sizeof(squashedFileName))) + { + realFileName = tmpDir; + realFileName += squashedFileName; + //printf("squashed from %s %s\n", tmpDir, squashedFileName); + } + else + { + realFileName = tmpDir; + realFileName += fileNamePart; + //printf("unsquashed from %s %s\n", tmpDir, fileNamePart); + } + + ArLog::log(ArLog::Verbose, + "ArMap: %s is %s", + fileName, realFileName.c_str()); + } +#endif + + return realFileName; + +} // end method createRealFileName + +AREXPORT void ArMapInterface::addMapChangedCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + addMapChangedCB(functor, 75); + else if (position == ArListPos::LAST) + addMapChangedCB(functor, 25); + else + ArLog::log(ArLog::Terse, "ArMapInterface::addPreMapChangedCB: Invalid position."); +} + + +AREXPORT void ArMapInterface::addPreMapChangedCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + addPreMapChangedCB(functor, 75); + else if (position == ArListPos::LAST) + addPreMapChangedCB(functor, 25); + else + ArLog::log(ArLog::Terse, "ArMapInterface::addPreMapChangedCB: Invalid position."); +} diff --git a/Legacy/Aria/src/ArMapObject.cpp b/Legacy/Aria/src/ArMapObject.cpp new file mode 100644 index 0000000..64f5e29 --- /dev/null +++ b/Legacy/Aria/src/ArMapObject.cpp @@ -0,0 +1,588 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ArMapObject.h" + +//#define ARDEBUG_MAP_OBJECT +#ifdef ARDEBUG_MAP_OBJECT +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +AREXPORT ArMapObject *ArMapObject::createMapObject(ArArgumentBuilder *arg) +{ + if (arg->getArgc() < 7) { + ArLog::log(ArLog::Terse, + "ArMapObject: 'Cairn:' insufficient arguments '%s'", + arg->getFullString()); + return NULL; + } // end if enough args + + bool isSuccess = true; + ArMapObject *object = NULL; + + // Strip the quotes out of the name + arg->compressQuoted(); + + bool xOk = false; + bool yOk = false; + bool thOk = false; + + ArPose pose; + ArPose fromPose; + ArPose toPose; + bool hasFromTo = false; + + char *fileBuffer = NULL; + char *nameBuffer = NULL; + + if (arg->getArgc() >= 11) { + + hasFromTo = true; + + double x = arg->getArgDouble(7, &xOk); + double y = arg->getArgDouble(8, &yOk); + if (xOk & yOk) { + fromPose.setPose(x, y); + } + else { + isSuccess = false; + } + + x = arg->getArgDouble(9, &xOk); + y = arg->getArgDouble(10, &yOk); + if (xOk & yOk) { + toPose.setPose(x, y); + } + else { + isSuccess = false; + } + } // end if from to pose + + if (isSuccess) { + + double x = arg->getArgDouble(1, &xOk); + double y = arg->getArgDouble(2, &yOk); + double th = arg->getArgDouble(3, &thOk); + + if (xOk && yOk && thOk) { + pose.setPose(x, y, th); + } + else { + isSuccess = false; + } + } // end if no error has occurred + + if (isSuccess) { + + const char *fileArg = arg->getArg(4); + int fileBufferLen = strlen(fileArg) + 1; + fileBuffer = new char[fileBufferLen]; + + if (!ArUtil::stripQuotes(fileBuffer, fileArg, fileBufferLen)) + { + ArLog::log(ArLog::Terse, + "ArMapObjects: 'Cairn:' couldn't strip quotes from fileName '%s'", + fileArg); + isSuccess = false; + } // end if error stripping quotes + } // end if no error has occurred + + if (isSuccess) { + + const char *nameArg = arg->getArg(6); + int nameBufferLen = strlen(nameArg) + 1; + nameBuffer = new char[nameBufferLen]; + + if (!ArUtil::stripQuotes(nameBuffer, nameArg, nameBufferLen)) + { + ArLog::log(ArLog::Terse, + "ArMapObjects: 'Cairn:' couldn't strip quotes from name '%s'", + nameArg); + isSuccess = false; + } // end if error stripping quotes + + } // end if no error has occurred + + if (isSuccess) { + + object = new ArMapObject(arg->getArg(0), + pose, + fileBuffer, + arg->getArg(5), + nameBuffer, + hasFromTo, + fromPose, + toPose); + + if (!setObjectDescription(object, arg)) { + isSuccess = false; + } + } // end if no error has occurred + + + delete [] fileBuffer; + delete [] nameBuffer; + + if (isSuccess) { + return object; + } + else { + delete object; + return NULL; + } + +} // end method createMapObject + + +bool ArMapObject::setObjectDescription(ArMapObject *object, + ArArgumentBuilder *arg) +{ + if ((object == NULL) || (arg == NULL)) { + return false; + } + unsigned int descArg = 0; + if (object->hasFromTo()) { + descArg = 11; + } + else { + descArg = 7; + } + + if (arg->getArgc() >= (descArg + 1)) { + size_t descLen = strlen(arg->getArg(descArg)) + 1; + char *descBuffer = new char[descLen]; + + if (!ArUtil::stripQuotes(descBuffer, arg->getArg(descArg), descLen)) + { + ArLog::log(ArLog::Terse, + "ArMap: 'Cairn:' couldn't strip quotes from desc '%s'", + arg->getArg(descArg)); + delete [] descBuffer; + return false; + } + object->setDescription(descBuffer); + delete [] descBuffer; + } + return true; + +} // end method setObjectDescription + + +AREXPORT ArMapObject::ArMapObject(const char *type, + ArPose pose, + const char *description, + const char *iconName, + const char *name, + bool hasFromTo, + ArPose fromPose, + ArPose toPose) : + myType((type != NULL) ? type : ""), + myBaseType(), + myName((name != NULL) ? name : "" ), + myDescription((description != NULL) ? description : "" ), + myPose(pose), + myIconName((iconName != NULL) ? iconName : "" ), + myHasFromTo(hasFromTo), + myFromPose(fromPose), + myToPose(toPose), + myFromToSegments(), + myStringRepresentation() +{ + if (myHasFromTo) + { + double angle = myPose.getTh(); + double sa = ArMath::sin(angle); + double ca = ArMath::cos(angle); + double fx = fromPose.getX(); + double fy = fromPose.getY(); + double tx = toPose.getX(); + double ty = toPose.getY(); + ArPose P0((fx*ca - fy*sa), (fx*sa + fy*ca)); + ArPose P1((tx*ca - fy*sa), (tx*sa + fy*ca)); + ArPose P2((tx*ca - ty*sa), (tx*sa + ty*ca)); + ArPose P3((fx*ca - ty*sa), (fx*sa + ty*ca)); + myFromToSegments.push_back(ArLineSegment(P0, P1)); + myFromToSegments.push_back(ArLineSegment(P1, P2)); + myFromToSegments.push_back(ArLineSegment(P2, P3)); + myFromToSegments.push_back(ArLineSegment(P3, P0)); + + myFromToSegment.newEndPoints(fromPose, toPose); + } + else { // pose + size_t whPos = myType.rfind("WithHeading"); + size_t whLen = 11; + if (whPos > 0) { + if (whPos == myType.size() - whLen) { + myBaseType = myType.substr(0, whPos); + } + } + } // end else pose + + IFDEBUG( + ArLog::log(ArLog::Normal, + "ArMapObject::ctor() created %s (%s)", + myName.c_str(), myType.c_str()); + ); + +} // end ctor + +/// Copy constructor +AREXPORT ArMapObject::ArMapObject(const ArMapObject &mapObject) : + myType(mapObject.myType), + myBaseType(mapObject.myBaseType), + myName(mapObject.myName), + myDescription(mapObject.myDescription), + myPose(mapObject.myPose), + myIconName(mapObject.myIconName), + myHasFromTo(mapObject.myHasFromTo), + myFromPose(mapObject.myFromPose), + myToPose(mapObject.myToPose), + myFromToSegments(mapObject.myFromToSegments), + myFromToSegment(mapObject.myFromToSegment), + myStringRepresentation(mapObject.myStringRepresentation) +{ +} + + +AREXPORT ArMapObject &ArMapObject::operator=(const ArMapObject &mapObject) +{ + if (&mapObject != this) { + + myType = mapObject.myType; + myBaseType = mapObject.myBaseType; + myName = mapObject.myName; + myDescription = mapObject.myDescription; + myPose = mapObject.myPose; + myIconName = mapObject.myIconName; + myHasFromTo = mapObject.myHasFromTo; + myFromPose = mapObject.myFromPose; + myToPose = mapObject.myToPose; + myFromToSegments = mapObject.myFromToSegments; + myFromToSegment = mapObject.myFromToSegment; + myStringRepresentation = mapObject.myStringRepresentation; + } + return *this; + +} // end operator= + +/// Destructor +AREXPORT ArMapObject::~ArMapObject() +{ +} + +/// Gets the type of the object +AREXPORT const char *ArMapObject::getType(void) const { return myType.c_str(); } + + +AREXPORT const char *ArMapObject::getBaseType(void) const +{ + if (!myBaseType.empty()) { + return myBaseType.c_str(); + } + else { + return myType.c_str(); + } +} + +/// Gets the pose of the object +AREXPORT ArPose ArMapObject::getPose(void) const { return myPose; } + +/// Gets the fileName of the object (probably never used for maps) +/** +* This method is maintained solely for backwards compatibility. +* It now returns the same value as getDescription (i.e. any file names +* that may have been associated with an object can now be found in the +* description attribute). +* @deprecated +**/ +AREXPORT const char *ArMapObject::getFileName(void) const { return myDescription.c_str(); } + +/// Gets the icon string of the object +AREXPORT const char *ArMapObject::getIconName(void) const { return myIconName.c_str(); } + +/// Returns the numerical identifier of the object, when auto-numbering is on. +AREXPORT int ArMapObject::getId() const +{ + // TODO: If this method is going to be called frequently, then the ID should be cached. + + const char *iconText = myIconName.c_str(); + + // The most common case is the "normal" object that has the initial "ICON" text. + if (strcmp(iconText, "ICON") == 0) { + return 0; + } + if (strstr(iconText, "ID=") == iconText) { + const char *idText = &iconText[3]; + if (!ArUtil::isStrEmpty(idText)) { + return atoi(idText); + } + } + return 0; + +} // end method getId + + +/// Gets the name of the object (if any) +AREXPORT const char *ArMapObject::getName(void) const { return myName.c_str(); } +/// Gets the addition args of the object +AREXPORT bool ArMapObject::hasFromTo(void) const { return myHasFromTo; } +/// Gets the from pose (could be for line or box, depending) +AREXPORT ArPose ArMapObject::getFromPose(void) const { return myFromPose; } +/// Gets the to pose (could be for line or box, depending) +AREXPORT ArPose ArMapObject::getToPose(void) const { return myToPose; } + +AREXPORT double ArMapObject::getFromToRotation(void) const +{ + if (myHasFromTo) { + return myPose.getTh(); + } + else { + return 0; + } +} // end method getFromToRotation + + +AREXPORT const char *ArMapObject::getDescription() const +{ + return myDescription.c_str(); +} + + +AREXPORT void ArMapObject::setDescription(const char *description) +{ + if (description != NULL) { + myDescription = description; + } + else { + myDescription = ""; + } +} + + +AREXPORT void ArMapObject::log(const char *intro) const { + + std::string introString; + if (!ArUtil::isStrEmpty(intro)) { + introString = intro; + introString += " "; + } + introString += "Cairn:"; + + ArLog::log(ArLog::Terse, + "%s%s", + introString.c_str(), + toString()); +} + + +AREXPORT std::list ArMapObject::getFromToSegments(void) +{ + return myFromToSegments; +} + +AREXPORT ArLineSegment ArMapObject::getFromToSegment(void) +{ + return myFromToSegment; +} + +AREXPORT ArPose ArMapObject::findCenter(void) const +{ + if (!myHasFromTo) { + return myPose; + } + else { // rect + + double centerX = (myFromPose.getX() + myToPose.getX()) / 2.0; + double centerY = (myFromPose.getY() + myToPose.getY()) / 2.0; + + double angle = myPose.getTh(); + double sa = ArMath::sin(angle); + double ca = ArMath::cos(angle); + + ArPose centerPose(centerX * ca - centerY * sa, + centerX * sa + centerY * ca); + + return centerPose; + + } // end else a rect + +} // end method findCenter + + + + + +AREXPORT const char *ArMapObject::toString(void) const +{ + // Since the ArMapObject is effectively immutable, this is okay to do... + if (myStringRepresentation.empty()) { + + // The "Cairn" intro is not included in the string representation + // because it may be modified (e.g. for inactive objects). + + char buf[1024]; + myStringRepresentation += getType(); + myStringRepresentation += " "; + + // It's alright to write out the x and y without a fraction, but the + // th value must have a higher precision since it is used to rotate + // rectangles around the global origin. + snprintf(buf, sizeof(buf), + "%.0f %.0f %f", + myPose.getX(), myPose.getY(), myPose.getTh()); + buf[sizeof(buf) - 1] = '\0'; + myStringRepresentation += buf; + + myStringRepresentation += " \""; + myStringRepresentation += getDescription(); + myStringRepresentation += "\" "; + myStringRepresentation += getIconName(); + myStringRepresentation += " \""; + myStringRepresentation += getName(); + myStringRepresentation += "\""; + + if (myHasFromTo) + { + snprintf(buf, sizeof(buf), + " %.0f %.0f %.0f %.0f", + myFromPose.getX(), myFromPose.getY(), + myToPose.getX(), myToPose.getY()); + buf[sizeof(buf) - 1] = '\0'; + myStringRepresentation += buf; + } + } + return myStringRepresentation.c_str(); + +} // end method toString + + +AREXPORT bool ArMapObject::operator<(const ArMapObject& other) const +{ + if (!myHasFromTo) { + + if (!other.myHasFromTo) { + + if (myPose == other.myPose) { + // Fall through to name and type comparisons below + } + else { + return myPose < other.myPose; + } + } + else { // other has from/to poses + + if (myPose == other.myFromPose) { + // If pose equals the from pose, then always put the !hasFromTo object first + return true; + } + else { + return myPose < other.myFromPose; + } + } + } + else { // has from/to poses + if (!other.myHasFromTo) { + + if (myFromPose == other.myPose) { + // This is the inverse of the situation above, always put the !hasFromTo object first + return false; + } + else { + return myFromPose < other.myPose; + } + } + else { // other has from/to poses + + if (myFromPose == other.myFromPose) { + // Fall through to name and type comparisons below + } + else { + return myFromPose < other.myFromPose; + } + } + } // end else has from/to poses + + + + int typeCompare = myType.compare(other.myType); + + if (typeCompare != 0) { + return (typeCompare < 0); + } + + // Equal types, try to compare names + + if (!myName.empty() && !other.myName.empty()) { + + int nameCompare = myName.compare(other.myName); + + if (nameCompare != 0) { + return (nameCompare < 0); + } + + } + else if (myName.empty() && !other.myName.empty()) { + return true; + } + else if (!myName.empty() && other.myName.empty()) { + return false; + } + + // Both names empty, must be hasFromTo + + if (myToPose == other.myToPose) { + // Fall through to name and type comparisons below + } + else { + return myToPose < other.myToPose; + } + + if (!myDescription.empty() || !other.myDescription.empty()) { + return (myDescription.compare(other.myDescription) < 0); + } + + // KMC It might be slightly more efficient to call this at the beginning of the + // method, but I'm trying to minimize the impact of any change. + // If they are the same physical pointers, then they are equal. Neither is + // "less than" the other. + if ((void *) this == (void *) &other) { + return false; + } + + ArLog::log(ArLog::Normal, + "ArMapObject::operator<() two nearly identical objects cannot compare"); + + IFDEBUG(log("this")); + IFDEBUG(log("other")); + + // Using a pointer comparison for lack of any better ideas. + return ((void *) this < (void *) &other); + +} // end operator< + diff --git a/Legacy/Aria/src/ArMapUtils.cpp b/Legacy/Aria/src/ArMapUtils.cpp new file mode 100644 index 0000000..6367352 --- /dev/null +++ b/Legacy/Aria/src/ArMapUtils.cpp @@ -0,0 +1,1240 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" + +#include "ArMapUtils.h" + +#include "ariaUtil.h" +#include "ArBasePacket.h" +#include "ArMapComponents.h" +#include "ArMD5Calculator.h" + +#include + +//#define ARDEBUG_MAPUTILS +#ifdef ARDEBUG_MAPUTILS +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + +// ----------------------------------------------------------------------------- +// ArMapId +// ----------------------------------------------------------------------------- + +AREXPORT ArMapId::ArMapId() : + mySourceName(), + myFileName(), + myChecksum(NULL), + myChecksumLength(0), + myDisplayChecksum(NULL), + myDisplayChecksumLength(0), + mySize(0), + myTimestamp(-1) +{ +} + +AREXPORT ArMapId::ArMapId(const char *sourceName, + const char *fileName, + const unsigned char *checksum, + size_t checksumLength, + long int size, + const time_t timestamp) : + mySourceName((sourceName != NULL) ? sourceName : ""), + myFileName((fileName != NULL) ? fileName : ""), + myChecksum(NULL), + myChecksumLength(0), + myDisplayChecksum(NULL), + myDisplayChecksumLength(0), + mySize(size), + myTimestamp(timestamp) +{ + if (checksumLength > 0) { + setChecksum(checksum, + checksumLength); + } +} + +AREXPORT ArMapId::ArMapId(const ArMapId &other) : + mySourceName(other.mySourceName), + myFileName(other.myFileName), + myChecksum(NULL), + myChecksumLength(0), + myDisplayChecksum(NULL), + myDisplayChecksumLength(0), + mySize(other.mySize), + myTimestamp(other.myTimestamp) +{ + if (other.myChecksumLength > 0) { + setChecksum(other.myChecksum, + other.myChecksumLength); + } +} + +AREXPORT ArMapId &ArMapId::operator=(const ArMapId &other) +{ + if (&other != this) { + + mySourceName = other.mySourceName; + myFileName = other.myFileName; + + delete [] myChecksum; + myChecksum = NULL; + myChecksumLength = 0; + + delete [] myDisplayChecksum; + myDisplayChecksum = NULL; + myDisplayChecksumLength = 0; + + if (other.myChecksumLength > 0) { + setChecksum(other.myChecksum, + other.myChecksumLength); + } + + + mySize = other.mySize; + myTimestamp = other.myTimestamp; + } + return *this; +} + +AREXPORT ArMapId::~ArMapId() +{ + delete [] myChecksum; + myChecksum = NULL; + myChecksumLength = 0; + + delete [] myDisplayChecksum; + myDisplayChecksum = NULL; + myDisplayChecksumLength = 0; +} + +AREXPORT bool ArMapId::isNull() const +{ + // TODO Any need to check others? + bool b = (ArUtil::isStrEmpty(mySourceName.c_str()) && + ArUtil::isStrEmpty(myFileName.c_str())); + + return b; +} + +AREXPORT void ArMapId::clear() +{ + mySourceName = ""; + myFileName = ""; + + delete [] myChecksum; + myChecksum = NULL; + myChecksumLength = 0; + + delete [] myDisplayChecksum; + myDisplayChecksum = NULL; + myDisplayChecksumLength = 0; + + mySize = 0; + myTimestamp = -1; + +} // end method clear + + +AREXPORT const char *ArMapId::getSourceName() const +{ + return mySourceName.c_str(); +} + +AREXPORT const char *ArMapId::getFileName() const +{ + return myFileName.c_str(); +} + +AREXPORT const unsigned char *ArMapId::getChecksum() const +{ + return myChecksum; +} + +AREXPORT size_t ArMapId::getChecksumLength() const +{ + return myChecksumLength; +} + +AREXPORT const char *ArMapId::getDisplayChecksum() const +{ + if ((myDisplayChecksum == NULL) && (myChecksumLength > 0)) { + + myDisplayChecksumLength = ArMD5Calculator::DISPLAY_LENGTH; + myDisplayChecksum = new char[myDisplayChecksumLength]; + + ArMD5Calculator::toDisplay(myChecksum, + myChecksumLength, + myDisplayChecksum, + myDisplayChecksumLength); + + } + + return myDisplayChecksum; +} + +AREXPORT long int ArMapId::getSize() const +{ + return mySize; +} + +AREXPORT time_t ArMapId::getTimestamp() const +{ + return myTimestamp; +} + +AREXPORT bool ArMapId::isSameFile(const ArMapId &other) const +{ + if (ArUtil::strcasecmp(myFileName, other.myFileName) != 0) { + return false; + } + if (mySize != other.mySize) { + return false; + } + + // If both timestamps are specified, then the must be identical... + if ((myTimestamp != other.myTimestamp) && + (isValidTimestamp()) && + (other.isValidTimestamp())) { + return false; + } + + if (myChecksumLength != other.myChecksumLength) { + return false; + } + if ((myChecksum != NULL) && (other.myChecksum != NULL)) { + return (memcmp(myChecksum, other.myChecksum, myChecksumLength) == 0); + } + return true; // ?? +} + + +AREXPORT bool ArMapId::isVersionOfSameFile(const ArMapId &other) const +{ + if ((ArUtil::strcasecmp(mySourceName, other.mySourceName) == 0) && + (ArUtil::strcasecmp(myFileName, other.myFileName) == 0)) { + return true; + } + return false; + +} // end method isVersionOfSameFile + +AREXPORT bool ArMapId::isValidTimestamp() const +{ + bool b = ((myTimestamp != -1) && + (myTimestamp != 0)); + return b; +} + + +AREXPORT void ArMapId::setSourceName(const char *sourceName) +{ + if (sourceName != NULL) { + mySourceName = sourceName; + } + else { + mySourceName = ""; + } +} + +AREXPORT void ArMapId::setFileName(const char *fileName) +{ + if (fileName != NULL) { + myFileName = fileName; + } + else { + myFileName = ""; + } +} + +AREXPORT void ArMapId::setChecksum(const unsigned char *checksum, + size_t checksumLen) +{ + if (checksumLen < 0) { + checksumLen = 0; + } + if (checksumLen != myChecksumLength) { + delete [] myChecksum; + myChecksum = NULL; + myChecksumLength = 0; + } + if (checksumLen > 0) { + myChecksumLength = checksumLen; + myChecksum = new unsigned char[myChecksumLength]; + memcpy(myChecksum, checksum, myChecksumLength); + } + // Clear this so that it is calculated if necessary.... + delete [] myDisplayChecksum; + myDisplayChecksum = NULL; + myDisplayChecksumLength = 0; + + + +} + +AREXPORT void ArMapId::setSize(long int size) +{ + mySize = size; +} + +AREXPORT void ArMapId::setTimestamp(const time_t ×tamp) +{ + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapId::setTimestamp() time = %i", + timestamp)); + + myTimestamp = timestamp; +} + +/// Determines whether two IDs are equal. +AREXPORT bool operator==(const ArMapId & id1, const ArMapId & id2) +{ + // The mirror opposite of operator!= + + // Filename is compared last just because it takes longer + if (id1.mySize != id2.mySize) { + return false; + } + // A null timestamp (-1) can be "equal" to any other timestamp + if ((id1.isValidTimestamp()) && + (id2.isValidTimestamp()) && + (id1.myTimestamp != id2.myTimestamp)) { + return false; + } + if (id1.myChecksumLength != id2.myChecksumLength) { + return false; + } + + // TODO: Compare only if sources are not null (like timestamps)? + if (ArUtil::strcasecmp(id1.mySourceName, id2.mySourceName) != 0) { + return false; + } + if (ArUtil::strcasecmp(id1.myFileName, id2.myFileName) != 0) { + return false; + } + if ((id1.myChecksum != NULL) && (id2.myChecksum != NULL)) { + if (memcmp(id1.myChecksum, id2.myChecksum, id1.myChecksumLength) != 0) { + return false; + } + } + else if (id1.myChecksum != id2.myChecksum) { + // The above says that if one of them is null, then both of them + // must be null. + return false; + } + + return true; + +} // end method operator== + +/// Determines whether two IDs are not equal. +AREXPORT bool operator!=(const ArMapId & id1, const ArMapId & id2) +{ + // The mirror opposite of operator== + + // Filename is compared last just because it takes longer + if (id1.mySize != id2.mySize) { + return true; + } + // A null timestamp (-1) can be "equal" to any other timestamp + if ((id1.isValidTimestamp()) && + (id2.isValidTimestamp()) && + (id1.myTimestamp != id2.myTimestamp)) { + return true; + } + if (id1.myChecksumLength != id2.myChecksumLength) { + return true; + } + + // TODO: Compare only if sources are not null (like timestamps)? + if (ArUtil::strcasecmp(id1.mySourceName, id2.mySourceName) != 0) { + return true; + } + if (ArUtil::strcasecmp(id1.myFileName, id2.myFileName) != 0) { + return true; + } + if ((id1.myChecksum != NULL) && (id2.myChecksum != NULL)) { + if (memcmp(id1.myChecksum, id2.myChecksum, id1.myChecksumLength) != 0) { + return true; + } + } + else if (id1.myChecksum != id2.myChecksum) { + // The above says that if one of them is null, then both of them + // must be null. + return true; + } + + return false; + +} // end method operator!= + + +AREXPORT void ArMapId::log(const char *prefix) const +{ + time_t idTime = getTimestamp(); + + char timeBuf[500]; + + struct tm *idTm = NULL; + + if (idTime != -1) { + idTm = localtime(&idTime); + } + if (idTm != NULL) { + strftime(timeBuf, sizeof(timeBuf), "%c", idTm); + } + else { + snprintf(timeBuf, sizeof(timeBuf), "NULL"); + } + + ArLog::log(ArLog::Normal, + "%s%smap %s %s%s checksum = \"%s\" size = %i time = %s (%i)", + ((prefix != NULL) ? prefix : ""), + ((prefix != NULL) ? " " : ""), + getFileName(), + (!ArUtil::isStrEmpty(getSourceName()) ? "source " : ""), + (!ArUtil::isStrEmpty(getSourceName()) ? getSourceName() : ""), + getDisplayChecksum(), + getSize(), + timeBuf, + idTime); + +} + +AREXPORT bool ArMapId::fromPacket(ArBasePacket *packetIn, + ArMapId *mapIdOut) +{ + if ((packetIn == NULL) || (mapIdOut == NULL)) { + return false; + } + + char sourceBuffer[512]; + packetIn->bufToStr(sourceBuffer, sizeof(sourceBuffer)); + + char fileNameBuffer[512]; + packetIn->bufToStr(fileNameBuffer, sizeof(fileNameBuffer)); + + ArUtil::fixSlashes(fileNameBuffer, sizeof(fileNameBuffer)); + + size_t checksumLength = packetIn->bufToUByte4(); + + unsigned char *checksum = NULL; + if (checksumLength > 0) { + checksum = new unsigned char[checksumLength]; + packetIn->bufToData(checksum, checksumLength); + } + + size_t fileSize = packetIn->bufToUByte4(); + time_t fileTime = packetIn->bufToByte4(); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapId::fromPacket() time = %i", + fileTime)); + + *mapIdOut = ArMapId(sourceBuffer, + fileNameBuffer, + checksum, + checksumLength, + fileSize, + fileTime); + + IFDEBUG(mapIdOut->log("ArMapId::fromPacket()")); + + delete [] checksum; + + return true; + +} // end method fromPacket + + +AREXPORT bool ArMapId::toPacket(const ArMapId &mapId, + ArBasePacket *packetOut) +{ + + IFDEBUG(mapId.log("ArMapId::toPacket()")); + + if (packetOut == NULL) { + return false; + } + + if (!ArUtil::isStrEmpty(mapId.getSourceName())) { + packetOut->strToBuf(mapId.getSourceName()); + } + else { + packetOut->strToBuf(""); + } + + if (!ArUtil::isStrEmpty(mapId.getFileName())) { + packetOut->strToBuf(mapId.getFileName()); + } + else { + packetOut->strToBuf(""); + } + + packetOut->uByte4ToBuf(mapId.getChecksumLength()); + if (mapId.getChecksumLength() > 0) { + packetOut->dataToBuf(mapId.getChecksum(), mapId.getChecksumLength()); + } + packetOut->uByte4ToBuf(mapId.getSize()); + packetOut->byte4ToBuf(mapId.getTimestamp()); + + IFDEBUG(ArLog::log(ArLog::Normal, + "ArMapId::toPacket() time = %i", + mapId.getTimestamp())); + + return true; + +} // end method toPacket + + + +AREXPORT bool ArMapId::create(const char *mapFileName, + ArMapId *mapIdOut) +{ + if (mapIdOut == NULL) { + ArLog::log(ArLog::Normal, + "Cannot create null map ID"); + return false; + } + if (ArUtil::isStrEmpty(mapFileName)) { + ArLog::log(ArLog::Verbose, + "Returning null map ID for null file name"); + mapIdOut->clear(); + return true; + } + + struct stat mapFileStat; + if (stat(mapFileName, &mapFileStat) != 0) + { + ArLog::log(ArLog::Normal, + "Map file %s not not found", mapFileName); + mapIdOut->clear(); + return false; + } + + unsigned char buffer[ArMD5Calculator::DIGEST_LENGTH]; + bool isSuccess = ArMD5Calculator::calculateChecksum(mapFileName, + buffer, + sizeof(buffer)); + + if (!isSuccess) { + ArLog::log(ArLog::Normal, + "Error calculating checksum for map file %s", + mapFileName); + mapIdOut->clear(); + return false; + } + + mapIdOut->setFileName(mapFileName); + mapIdOut->setChecksum(buffer, sizeof(buffer)); + mapIdOut->setSize(mapFileStat.st_size); + mapIdOut->setTimestamp(mapFileStat.st_mtime); + + return true; + +} // end method create + + +// ----------------------------------------------------------------------------- +// ArMapFileLineSet +// ----------------------------------------------------------------------------- + + +// ----------------------------------------------------------------------------- +// ArMapFileLineGroup +// ----------------------------------------------------------------------------- + + +void ArMapFileLineGroup::log() +{ + ArLog::log(ArLog::Normal, + "#%-3i : %s", + myParentLine.getLineNum(), + myParentLine.getLineText()); + for (std::vector::iterator iter = myChildLines.begin(); + iter != myChildLines.end(); + iter++) { + ArMapFileLine &fileLine = *iter; + ArLog::log(ArLog::Normal, + " #%-3i : %s", + fileLine.getLineNum(), + fileLine.getLineText()); + } +} // end method log + + + +void ArMapFileLineSet::log(const char *prefix) +{ + if (prefix != NULL) { + ArLog::log(ArLog::Normal, + prefix); + } + + int i = 0; + ArMapFileLineSet::iterator mIter = begin(); + + for (;((mIter != end()) && (i < 100)); + mIter++, i++) { + ArMapFileLineGroup &group = *mIter; + group.log(); + } + + if (mIter != end()) { + ArLog::log(ArLog::Normal, + "..... (cont.)"); + ArLog::log(ArLog::Normal, + "Size = %i", size()); + + } +} // end method log + + +ArMapFileLineSet::iterator ArMapFileLineSet::find(const ArMapFileLine &groupParent) { + for (iterator iter = begin(); iter != end(); iter++) { + ArMapFileLineGroup &group = *iter; + if ((group.getParentLine()->getLineNum() == groupParent.getLineNum()) && + true) { + + if (strcmp(group.getParentLine()->getLineText(), + groupParent.getLineText()) != 0) { + ArLog::log(ArLog::Normal, + "Line #i text does not match:", + group.getParentLine()->getLineNum()); + ArLog::log(ArLog::Normal, + "\"%s\"", + group.getParentLine()->getLineText()); + ArLog::log(ArLog::Normal, + "\"%s\"", + groupParent.getLineText()); + + } + //(strcmp(group.getParentLine()->getLineText(), + // groupParent.getLineText()) == 0)) { + ArLog::log(ArLog::Normal, + "Found #%i : %s", + groupParent.getLineNum(), + groupParent.getLineText()); + return iter; + } + } + return end(); +} + +bool ArMapFileLineSet::calculateChanges(ArMapFileLineSet &origLines, + ArMapFileLineSet &newLines, + ArMapFileLineSet *deletedLinesOut, + ArMapFileLineSet *addedLinesOut, + bool isCheckChildren) +{ + if ((deletedLinesOut == NULL) || (addedLinesOut == NULL)) { + return false; + } + ArMapFileLineGroupCompare compare; + ArMapFileLineGroupLineNumCompare compareLineNums; + + std::sort(origLines.begin(), origLines.end(), compare); + std::sort(newLines.begin(), newLines.end(), compare); + + set_difference(origLines.begin(), origLines.end(), + newLines.begin(), newLines.end(), + std::inserter(*deletedLinesOut, + deletedLinesOut->begin()), + compare); + + set_difference(newLines.begin(), newLines.end(), + origLines.begin(), origLines.end(), + std::inserter(*addedLinesOut, + addedLinesOut->begin()), + compare); + + if (isCheckChildren) { + + ArMapFileLineSet unchangedOrigLines; + ArMapFileLineSet unchangedNewLines; + + set_difference(origLines.begin(), origLines.end(), + deletedLinesOut->begin(), deletedLinesOut->end(), + std::inserter(unchangedOrigLines, + unchangedOrigLines.begin()), + compare); + + set_difference(newLines.begin(), newLines.end(), + addedLinesOut->begin(), addedLinesOut->end(), + std::inserter(unchangedNewLines, + unchangedNewLines.begin()), + compare); + + ArMapFileLineCompare compareLine; + + for (ArMapFileLineSet::iterator iterO = unchangedOrigLines.begin(), + iterN = unchangedNewLines.begin(); + ( (iterO != unchangedOrigLines.end()) && + (iterN != unchangedNewLines.end()) ); + iterO++, iterN++) { + + ArMapFileLineGroup &origGroup = *iterO; + ArMapFileLineGroup &newGroup = *iterN; + + std::sort(origGroup.getChildLines()->begin(), + origGroup.getChildLines()->end(), + compareLine); + std::sort(newGroup.getChildLines()->begin(), + newGroup.getChildLines()->end(), + compareLine); + + ArMapFileLineSet tempDeletedLines; + ArMapFileLineSet tempAddedLines; + + set_difference(origGroup.getChildLines()->begin(), + origGroup.getChildLines()->end(), + newGroup.getChildLines()->begin(), + newGroup.getChildLines()->end(), + std::inserter(tempDeletedLines, + tempDeletedLines.begin()), + compareLine); + + set_difference(newGroup.getChildLines()->begin(), + newGroup.getChildLines()->end(), + origGroup.getChildLines()->begin(), + origGroup.getChildLines()->end(), + std::inserter(tempAddedLines, + tempAddedLines.begin()), + compareLine); + + // TODO: Right now just sending the entire group -- but someday + // we may just want to send the lines that have changed within + // the group (plus the group heading). + if (!tempDeletedLines.empty() || !tempAddedLines.empty()) { + + deletedLinesOut->push_back(origGroup); + addedLinesOut->push_back(newGroup); + + } // end if child changes + + } // end for each unchanged line + + } // end if check children + + std::sort(deletedLinesOut->begin(), deletedLinesOut->end(), compareLineNums); + std::sort(addedLinesOut->begin(), addedLinesOut->end(), compareLineNums); + + return true; + +} // end method calculateChanges + + +// ----------------------------------------------------------------------------- +// ArMapChangeDetails +// ----------------------------------------------------------------------------- + +void ArMapChangeDetails::createChildArgMap() +{ + myInfoNameToMapOfChildArgsMap["MapInfo:"]["ArgDesc"] = true; + + myInfoNameToMapOfChildArgsMap["TaskInfo:"]["ArgDesc"] = true; + + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["Task"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["GoalTask"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["MacroTask"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["_goto"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["_goalBefore"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["_goalAfter"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["_everyBefore"] = true; + myInfoNameToMapOfChildArgsMap["RouteInfo:"]["_everyAfter"] = true; + + myInfoNameToMapOfChildArgsMap["SchedTaskInfo:"]["ArgDesc"] = true; + + myInfoNameToMapOfChildArgsMap["SchedInfo:"]["Route"] = true; + myInfoNameToMapOfChildArgsMap["SchedInfo:"]["SchedTask"] = true; + +} // end method createChildArgMap + +ArMapChangeDetails::ArMapScanChangeDetails::ArMapScanChangeDetails() : + myChangedPoints(), + myChangedLineSegments(), + myChangedSummaryLines() +{ +} // end constructor + +ArMapChangeDetails::ArMapScanChangeDetails::~ArMapScanChangeDetails() +{ + // TODO + +} // end destructor + +AREXPORT ArMapChangeDetails::ArMapChangeDetails() : + myMutex(), + myOrigMapId(), + myNewMapId(), + myInfoNameToMapOfChildArgsMap(), + myScanTypeList(), + myScanTypeToChangesMap(), + myNullScanTypeChanges(), + myChangedSupplementLines(), + myChangedObjectLines(), + myInfoToChangeMaps() +{ + myMutex.setLogName("ArMapChangeDetails"); + + createChildArgMap(); + +} // end ctor + +AREXPORT ArMapChangeDetails::ArMapChangeDetails + (const ArMapChangeDetails &other) : + myMutex(), + myOrigMapId(other.myOrigMapId), + myNewMapId(other.myNewMapId), + myInfoNameToMapOfChildArgsMap(), + myScanTypeList(other.myScanTypeList), + myScanTypeToChangesMap(), + myNullScanTypeChanges(), + myChangedSupplementLines(), + myChangedObjectLines(), + myInfoToChangeMaps() +{ + myMutex.setLogName("ArMapChangeDetails"); + + createChildArgMap(); + + for (std::map::const_iterator iter = + other.myScanTypeToChangesMap.begin(); + iter != other.myScanTypeToChangesMap.end(); + iter++) { + ArMapScanChangeDetails *otherScan = iter->second; + if (otherScan == NULL) { + continue; + } + myScanTypeToChangesMap[iter->first] = new ArMapScanChangeDetails(*otherScan); + } + + for (int i = 0; i < CHANGE_TYPE_COUNT; i++) { + myChangedSupplementLines[i] = other.myChangedSupplementLines[i]; + myChangedObjectLines[i] = other.myChangedObjectLines[i]; + myInfoToChangeMaps[i] = other.myInfoToChangeMaps[i]; + } + +} // end copy ctor + +AREXPORT ArMapChangeDetails &ArMapChangeDetails::operator= + (const ArMapChangeDetails &other) +{ + if (this != &other) { + + myOrigMapId = other.myOrigMapId; + myNewMapId = other.myNewMapId; + myScanTypeList = other.myScanTypeList; + + ArUtil::deleteSetPairs(myScanTypeToChangesMap.begin(), + myScanTypeToChangesMap.end()); + myScanTypeToChangesMap.clear(); + + for (std::map::const_iterator iter = + other.myScanTypeToChangesMap.begin(); + iter != other.myScanTypeToChangesMap.end(); + iter++) { + ArMapScanChangeDetails *otherScan = iter->second; + if (otherScan == NULL) { + continue; + } + myScanTypeToChangesMap[iter->first] = new ArMapScanChangeDetails(*otherScan); + } + + for (int i = 0; i < CHANGE_TYPE_COUNT; i++) { + myChangedSupplementLines[i] = other.myChangedSupplementLines[i]; + myChangedObjectLines[i] = other.myChangedObjectLines[i]; + myInfoToChangeMaps[i] = other.myInfoToChangeMaps[i]; + } + + } + return *this; + +} // end operator= + + +AREXPORT ArMapChangeDetails::~ArMapChangeDetails() +{ + ArUtil::deleteSetPairs(myScanTypeToChangesMap.begin(), + myScanTypeToChangesMap.end()); +} + + +AREXPORT bool ArMapChangeDetails::getOrigMapId(ArMapId *mapIdOut) +{ + if (mapIdOut == NULL) { + return false; + } + *mapIdOut = myOrigMapId; + return true; +} + +AREXPORT bool ArMapChangeDetails::getNewMapId(ArMapId *mapIdOut) +{ + if (mapIdOut == NULL) { + return false; + } + *mapIdOut = myNewMapId; + return true; +} + +AREXPORT void ArMapChangeDetails::setOrigMapId(const ArMapId &mapId) +{ + myOrigMapId = mapId; + myOrigMapId.log("ArMapChangeDetails::setOrigMapId"); +} + +AREXPORT void ArMapChangeDetails::setNewMapId(const ArMapId &mapId) +{ + myNewMapId = mapId; + myNewMapId.log("ArMapChangeDetails::setNewMapId"); +} + + +AREXPORT std::list *ArMapChangeDetails::getScanTypes() +{ + return &myScanTypeList; +} + +AREXPORT std::vector *ArMapChangeDetails::getChangedPoints + (MapLineChangeType change, + const char *scanType) +{ + ArMapScanChangeDetails *scanChange = getScanChangeDetails(scanType); + return &scanChange->myChangedPoints[change]; + //return &myChangedPoints[change]; +} + +AREXPORT std::vector *ArMapChangeDetails::getChangedLineSegments + (MapLineChangeType change, + const char *scanType) +{ + ArMapScanChangeDetails *scanChange = getScanChangeDetails(scanType); + return &scanChange->myChangedLineSegments[change]; + //return &myChangedLineSegments[change]; +} + +AREXPORT ArMapFileLineSet *ArMapChangeDetails::getChangedSummaryLines + (MapLineChangeType change, + const char *scanType) +{ + ArMapScanChangeDetails *scanChange = getScanChangeDetails(scanType); + return &scanChange->myChangedSummaryLines[change]; + //return &myChangedSummaryLines[change]; +} + +AREXPORT ArMapFileLineSet *ArMapChangeDetails::getChangedSupplementLines + (MapLineChangeType change) +{ + return &myChangedSupplementLines[change]; +} + +AREXPORT ArMapFileLineSet *ArMapChangeDetails::getChangedObjectLines + (MapLineChangeType change) +{ + return &myChangedObjectLines[change]; +} + +AREXPORT ArMapFileLineSet *ArMapChangeDetails::getChangedInfoLines + (const char *infoName, + MapLineChangeType change) +{ + if (ArUtil::isStrEmpty(infoName)) { + ArLog::log(ArLog::Normal, "ArMapChangeDetails::getChangedInfoLines() null info name"); + return NULL; + } + + std::map::iterator iter = myInfoToChangeMaps[change].find(infoName); + if (iter == myInfoToChangeMaps[change].end()) { + myInfoToChangeMaps[change][infoName] = ArMapFileLineSet(); + iter = myInfoToChangeMaps[change].find(infoName); + } + return &(iter->second); +} + + + +AREXPORT bool ArMapChangeDetails::isChildArg(const char *infoName, + ArArgumentBuilder *arg) const +{ + if ((arg == NULL) || + (arg->getArgc() < 1)) { + return false; + } + const char *argText = arg->getArg(0); + + return isChildArg(infoName, argText); +} + + +AREXPORT bool ArMapChangeDetails::isChildArg(const char *infoName, + const char *argText) const +{ + if (ArUtil::isStrEmpty(infoName) || ArUtil::isStrEmpty(argText)) { + return false; + } + std::map >::const_iterator iter1 = + myInfoNameToMapOfChildArgsMap.find(infoName); + if (iter1 == myInfoNameToMapOfChildArgsMap.end()) { + return false; + } + + std::map::const_iterator iter2 = iter1->second.find(argText); + if (iter2 != iter1->second.end()) { + return iter2->second; + } + + return false; + +} // end method isChildArg + +ArMapChangeDetails::ArMapScanChangeDetails *ArMapChangeDetails::getScanChangeDetails + (const char *scanType) +{ + ArMapScanChangeDetails *scanChanges = NULL; + + if (scanType != NULL) { + + std::map::iterator iter = + myScanTypeToChangesMap.find(scanType); + if (iter != myScanTypeToChangesMap.end()) { + scanChanges = iter->second; + } + else { +/** + ArLog::log(ArLog::Normal, + "ArMapChangeDetails::getScanChangeDetails() adding details for scan type %s", + scanType); +**/ + + if (ArUtil::isStrEmpty(scanType)) { + ArLog::log(ArLog::Verbose, + "ArMapChangeDetails::getScanChangeDetails() adding empty scan type%s", + scanType); + } + + scanChanges = new ArMapScanChangeDetails(); + myScanTypeToChangesMap[scanType] = scanChanges; + + myScanTypeList.push_back(scanType); + } + + } // end if scanType not null + + if (scanChanges == NULL) { + scanChanges = &myNullScanTypeChanges; + } + return scanChanges; +} // end method getScanChangeDetails + + +AREXPORT std::list ArMapChangeDetails::findChangedInfoNames() const +{ + std::list changedInfoNames; + std::map infoNameToBoolMap; + + for (int change = 0; change < CHANGE_TYPE_COUNT; change++) { + for (std::map::const_iterator iter = myInfoToChangeMaps[change].begin(); + iter != myInfoToChangeMaps[change].end(); + iter++) { + const ArMapFileLineSet &fileLineSet = iter->second; + if (!fileLineSet.empty()) { + infoNameToBoolMap[iter->first] = true; + } + } + } // end for each change type + + for (std::map::const_iterator iter2 = infoNameToBoolMap.begin(); + iter2 != infoNameToBoolMap.end(); + iter2++) { + changedInfoNames.push_back(iter2->first); + } // end for each info type + + return changedInfoNames; + +} // end method getChangedInfoTypes + + +AREXPORT void ArMapChangeDetails::log() +{ + + ArLog::log(ArLog::Normal, + ""); + + for (int t = 0; t < CHANGE_TYPE_COUNT; t++) { + + MapLineChangeType change = (MapLineChangeType) t; + + switch (t) { + case DELETIONS: + ArLog::log(ArLog::Normal, + "---- DELETED MAP LINES --------------"); + break; + case ADDITIONS: + ArLog::log(ArLog::Normal, + "---- ADDED MAP LINES ----------------"); + break; + + default: + return; + } + + for (std::list::iterator iter2 = myScanTypeList.begin(); + iter2 != myScanTypeList.end(); + iter2++) { + + const char *scanType = (*iter2).c_str(); + + ArLog::log(ArLog::Normal, + "%s Point Count: %i", + scanType, + getChangedPoints(change, scanType)->size()); + ArLog::log(ArLog::Normal, + "%s Line Segment Count: %i", + scanType, + getChangedLineSegments(change, scanType)->size()); + + + ArLog::log(ArLog::Normal, + ""); + + ArMapFileLineSet *changedSummaryLines = getChangedSummaryLines(change, + scanType); + if (!changedSummaryLines->empty()) { + std::string scanTypeSummary = scanType; + scanTypeSummary += " "; + scanTypeSummary += "Summary Lines"; + + changedSummaryLines->log(scanTypeSummary.c_str()); + } + } // end for each scan type + + if (!myChangedSupplementLines[t].empty()) { + myChangedSupplementLines[t].log("Map Supplement Lines"); + } + + if (!myChangedObjectLines[t].empty()) { + myChangedObjectLines[t].log("Map Object Lines"); + } + + for (std::map::iterator iter = myInfoToChangeMaps[t].begin(); + iter != myInfoToChangeMaps[t].end(); + iter++) { + ArMapFileLineSet &fileLineSet = iter->second; + if (!fileLineSet.empty()) { + fileLineSet.log(" "); + } + } + } // end for each change type +} // end method log + +AREXPORT void ArMapChangeDetails::lock() +{ + myMutex.lock(); +} + +AREXPORT void ArMapChangeDetails::unlock() +{ + myMutex.unlock(); +} + +// ------------------------------------------------------------------------------ +// ArMapChangedHelper +// ------------------------------------------------------------------------------ + +AREXPORT ArMapChangedHelper::ArMapChangedHelper() : + myMapChangedLogLevel(ArLog::Verbose), + myMapChangedCBList(), + myPreMapChangedCBList() +{ + myMapChangedCBList.setName("MapChangedHelper"); + myPreMapChangedCBList.setName("PreMapChangedHelper"); +} + +AREXPORT ArMapChangedHelper::~ArMapChangedHelper() +{ +} + +AREXPORT void ArMapChangedHelper::invokeMapChangedCallbacks(void) +{ + ArLog::LogLevel level = myMapChangedLogLevel; + + myPreMapChangedCBList.setLogLevel(level); + myPreMapChangedCBList.invoke(); + + myMapChangedCBList.setLogLevel(level); + myMapChangedCBList.invoke(); + +} // end method invokeMapChangedCallbacks + + +AREXPORT void ArMapChangedHelper::addMapChangedCB(ArFunctor *functor, + int position) +{ + myMapChangedCBList.addCallback(functor, position); +} // end method addMapChangedCB + +AREXPORT void ArMapChangedHelper::remMapChangedCB(ArFunctor *functor) +{ + myMapChangedCBList.remCallback(functor); + +} // end method remMapChangedCB + + +AREXPORT void ArMapChangedHelper::addPreMapChangedCB(ArFunctor *functor, + int position) +{ + myPreMapChangedCBList.addCallback(functor, position); +} // end method addPreMapChangedCB + + +AREXPORT void ArMapChangedHelper::remPreMapChangedCB(ArFunctor *functor) +{ + myPreMapChangedCBList.remCallback(functor); + +} // end method remPreMapChangedCB + + +AREXPORT void ArMapChangedHelper::setMapChangedLogLevel(ArLog::LogLevel level) +{ + myMapChangedLogLevel = level; + +} // end method setMapChangedLogLevel + + +AREXPORT ArLog::LogLevel ArMapChangedHelper::getMapChangedLogLevel(void) +{ + return myMapChangedLogLevel; + +} // end method getMapChangedLogLevel + + + + + + + diff --git a/Legacy/Aria/src/ArMode.cpp b/Legacy/Aria/src/ArMode.cpp new file mode 100644 index 0000000..4f99125 --- /dev/null +++ b/Legacy/Aria/src/ArMode.cpp @@ -0,0 +1,277 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArMode.h" +#include "ArRobot.h" +#include "ariaInternal.h" + +ArMode *ArMode::ourActiveMode = NULL; +ArGlobalFunctor *ArMode::ourHelpCB = NULL; +std::list ArMode::ourModes; + +/** + @param robot the robot we're attaching to + + @param name the name of this mode + + @param key the primary key to switch to this mode on... it can be + '\\0' if you don't want to use this + + @param key2 an alternative key to switch to this mode on... it can be + '\\0' if you don't want a second alternative key +**/ +AREXPORT ArMode::ArMode(ArRobot *robot, const char *name, char key, + char key2) : + myActivateCB(this, &ArMode::activate), + myDeactivateCB(this, &ArMode::deactivate), + myUserTaskCB(this, &ArMode::userTask) +{ + ArKeyHandler *keyHandler; + myName = name; + myRobot = robot; + myKey = key; + myKey2 = key2; + // see if there is already a keyhandler, if not make one for ourselves + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + if (myRobot != NULL) + myRobot->attachKeyHandler(keyHandler); + else + ArLog::log(ArLog::Terse, "ArMode: No robot to attach a keyHandler to, keyHandling won't work... either make your own keyHandler and drive it yourself, make a keyhandler and attach it to a robot, or give this a robot to attach to."); + } + if (ourHelpCB == NULL) + { + ourHelpCB = new ArGlobalFunctor(&ArMode::baseHelp); + if (!keyHandler->addKeyHandler('h', ourHelpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for 'h', ArMode will not be invoked on an 'h' keypress."); + if (!keyHandler->addKeyHandler('H', ourHelpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for 'H', ArMode will not be invoked on an 'H' keypress."); + if (!keyHandler->addKeyHandler('?', ourHelpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for '?', ArMode will not be invoked on an '?' keypress."); + if (!keyHandler->addKeyHandler('/', ourHelpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for '/', ArMode will not be invoked on an '/' keypress."); + + } + + // now that we have one, add our keys as callbacks, print out big + // warning messages if they fail + if (myKey != '\0') + if (!keyHandler->addKeyHandler(myKey, &myActivateCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for '%c', ArMode will not work correctly.", myKey); + if (myKey2 != '\0') + if (!keyHandler->addKeyHandler(myKey2, &myActivateCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for '%c', ArMode will not work correctly.", myKey2); + + // toss this mode into our list of modes + ourModes.push_front(this); +} + +AREXPORT ArMode::~ArMode() +{ + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) != NULL) + { + if (myKey != '\0') + keyHandler->remKeyHandler(myKey); + if (myKey2 != '\0') + keyHandler->remKeyHandler(myKey2); + } + if (myRobot != NULL) + myRobot->remUserTask(&myUserTaskCB); +} + +/** + Inheriting modes must first call this to get their user task called + and to deactivate the active mode.... if it returns false then the + inheriting class must return, as it means that his mode is already + active +**/ +AREXPORT bool ArMode::baseActivate(void) +{ + if (ourActiveMode == this) + return false; + myRobot->deactivateActions(); + if (myRobot != NULL) + { + myRobot->addUserTask(myName.c_str(), 50, &myUserTaskCB); + } + if (ourActiveMode != NULL) + ourActiveMode->deactivate(); + ourActiveMode = this; + if (myRobot != NULL) + { + myRobot->stop(); + myRobot->clearDirectMotion(); + } + + baseHelp(); + return true; +} + +/** + This gets called when the mode is deactivated, it removes the user + task from the robot +**/ +AREXPORT bool ArMode::baseDeactivate(void) +{ + if (myRobot != NULL) + myRobot->remUserTask(&myUserTaskCB); + if (ourActiveMode == this) + { + ourActiveMode = NULL; + return true; + } + return false; +} + +AREXPORT const char *ArMode::getName(void) +{ + return myName.c_str(); +} + +AREXPORT char ArMode::getKey(void) +{ + return myKey; +} + +AREXPORT char ArMode::getKey2(void) +{ + return myKey2; +} + +AREXPORT void ArMode::baseHelp(void) +{ + std::list::iterator it; + ArLog::log(ArLog::Terse, "\n\nYou can do these actions with these keys:\n"); + ArLog::log(ArLog::Terse, "quit: escape"); + ArLog::log(ArLog::Terse, "help: 'h' or 'H' or '?' or '/'"); + ArLog::log(ArLog::Terse, "\nYou can switch to other modes with these keys:"); + for (it = ourModes.begin(); it != ourModes.end(); ++it) + { + ArLog::log(ArLog::Terse, "%30s mode: '%c' or '%c'", (*it)->getName(), + (*it)->getKey(), (*it)->getKey2()); + } + if (ourActiveMode == NULL) + ArLog::log(ArLog::Terse, "You are in no mode currently."); + else + { + ArLog::log(ArLog::Terse, "You are in '%s' mode currently.\n", + ourActiveMode->getName()); + ourActiveMode->help(); + } +} + +AREXPORT void ArMode::addKeyHandler(int keyToHandle, ArFunctor *functor) +{ + ArKeyHandler *keyHandler; + std::string charStr; + + // see if there is already a keyhandler, if not something is wrong + // (since constructor should make one if there isn't one yet + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse,"ArMode '%s'::keyHandler: There should already be a key handler, but there isn't... mode won't work right.", getName()); + return; + } + + if (!keyHandler->addKeyHandler(keyToHandle, functor)) + { + bool specialKey = true; + switch (keyToHandle) { + case ArKeyHandler::UP: + charStr = "Up"; + break; + case ArKeyHandler::DOWN: + charStr = "Down"; + break; + case ArKeyHandler::LEFT: + charStr = "Left"; + break; + case ArKeyHandler::RIGHT: + charStr = "Right"; + break; + case ArKeyHandler::ESCAPE: + charStr = "Escape"; + break; + case ArKeyHandler::F1: + charStr = "F1"; + break; + case ArKeyHandler::F2: + charStr = "F2"; + break; + case ArKeyHandler::F3: + charStr = "F3"; + break; + case ArKeyHandler::F4: + charStr = "F4"; + break; + case ArKeyHandler::SPACE: + charStr = "Space"; + break; + case ArKeyHandler::TAB: + charStr = "Tab"; + break; + case ArKeyHandler::ENTER: + charStr = "Enter"; + break; + case ArKeyHandler::BACKSPACE: + charStr = "Backspace"; + break; + default: + charStr = (char)keyToHandle; + specialKey = false; + break; + } + if (specialKey || (keyToHandle >= '!' && keyToHandle <= '~')) + ArLog::log(ArLog::Terse, + "ArMode '%s': The key handler has a duplicate key for '%s' so the mode may not work right.", getName(), charStr.c_str()); + else + ArLog::log(ArLog::Terse, + "ArMode '%s': The key handler has a duplicate key for number %d so the mode may not work right.", getName(), keyToHandle); + } + +} + +AREXPORT void ArMode::remKeyHandler(ArFunctor *functor) +{ + ArKeyHandler *keyHandler; + std::string charStr; + + // see if there is already a keyhandler, if not something is wrong + // (since constructor should make one if there isn't one yet + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse,"ArMode '%s'::keyHandler: There should already be a key handler, but there isn't... mode won't work right.", getName()); + return; + } + if (!keyHandler->remKeyHandler(functor)) + ArLog::log(ArLog::Terse, + "ArMode '%s': The key handler already didn't have the given functor so the mode may not be working right.", getName()); +} + diff --git a/Legacy/Aria/src/ArModes.cpp b/Legacy/Aria/src/ArModes.cpp new file mode 100644 index 0000000..d972939 --- /dev/null +++ b/Legacy/Aria/src/ArModes.cpp @@ -0,0 +1,2538 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArMode.h" +#include "ArModes.h" +#include "ArKeyHandler.h" +#include "ArSonyPTZ.h" +#include "ArVCC4.h" +#include "ArDPPTU.h" +#include "ArAMPTU.h" +#include "ArRVisionPTZ.h" +#include "ArSick.h" +#include "ArAnalogGyro.h" +#include "ArRobotConfigPacketReader.h" +#include "ariaInternal.h" + +/** + @param robot ArRobot instance to be associate with + @param name name of this mode + @param key keyboard key that activates this mode + @param key2 another keyboard key that activates this mode +*/ +AREXPORT ArModeTeleop::ArModeTeleop(ArRobot *robot, const char *name, char key, char key2): + ArMode(robot, name, key, key2), + myGroup(robot), + myEnableMotorsCB(robot, &ArRobot::enableMotors) +{ + myGroup.deactivate(); +} + +AREXPORT ArModeTeleop::~ArModeTeleop() +{ + +} + +AREXPORT void ArModeTeleop::activate(void) +{ + addKeyHandler('e', &myEnableMotorsCB); + if (!baseActivate()) + return; + myGroup.activateExclusive(); +} + +AREXPORT void ArModeTeleop::deactivate(void) +{ + remKeyHandler(&myEnableMotorsCB); + if (!baseDeactivate()) + return; + myGroup.deactivate(); +} + +AREXPORT void ArModeTeleop::help(void) +{ + ArLog::log(ArLog::Terse, + "Teleop mode will drive under your joystick or keyboard control."); + ArLog::log(ArLog::Terse, + "It will not allow you to drive into obstacles it can see,"); + ArLog::log(ArLog::Terse, + "though if you are presistent you may be able to run into something."); + ArLog::log(ArLog::Terse, "For joystick, hold in the trigger button and then move the joystick to drive."); + ArLog::log(ArLog::Terse, "For keyboard control these are the keys and their actions:"); + ArLog::log(ArLog::Terse, "%13s: speed up if forward or no motion, slow down if going backwards", "up arrow"); + ArLog::log(ArLog::Terse, "%13s: slow down if going forwards, speed up if backward or no motion", "down arrow"); + ArLog::log(ArLog::Terse, "%13s: turn left", "left arrow"); + ArLog::log(ArLog::Terse, "%13s: turn right", "right arrow"); + if (myRobot->hasLatVel()) + { + ArLog::log(ArLog::Terse, "%13s: move left", "z"); + ArLog::log(ArLog::Terse, "%13s: move right", "x"); + } + ArLog::log(ArLog::Terse, "%13s: stop", "space bar"); + ArLog::log(ArLog::Terse, "%13s: (re)enable motors", "e"); + if (!myRobot->hasLatVel()) + printf("%10s %10s %10s %10s %10s %10s", "transVel", "rotVel", "x", "y", "th", "volts"); + else + printf("%10s %10s %10s %10s %10s %10s %10s", "transVel", "rotVel", "latVel", "x", "y", "th", "volts"); + if(myRobot->haveStateOfCharge()) + printf(" %10s", "soc"); + printf(" %10s", ""); //flags + printf("\n"); +} + +AREXPORT void ArModeTeleop::userTask(void) +{ + if (!myRobot->hasLatVel()) + printf("\r%10.0f %10.0f %10.0f %10.0f %10.1f %10.1f", myRobot->getVel(), + myRobot->getRotVel(), myRobot->getX(), myRobot->getY(), + myRobot->getTh(), myRobot->getRealBatteryVoltage()); + else + printf("\r%10.0f %10.0f %10.0f %10.0f %10.0f %10.1f %10.1f", + myRobot->getVel(), myRobot->getRotVel(), myRobot->getLatVel(), + myRobot->getX(), myRobot->getY(), myRobot->getTh(), + myRobot->getRealBatteryVoltage()); + if(myRobot->haveStateOfCharge()) + printf(" %10.1f", myRobot->getStateOfCharge()); + if(myRobot->isEStopPressed()) printf(" [ESTOP PRESSED]"); + if(myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) printf(" [MOTOR STALL] "); + if(!myRobot->areMotorsEnabled()) printf(" [MOTORS DISABLED] "); +} + +AREXPORT ArModeUnguardedTeleop::ArModeUnguardedTeleop(ArRobot *robot, + const char *name, + char key, char key2): + ArMode(robot, name, key, key2), + myGroup(robot), + myEnableMotorsCB(robot, &ArRobot::enableMotors) +{ + myGroup.deactivate(); +} + +AREXPORT ArModeUnguardedTeleop::~ArModeUnguardedTeleop() +{ + +} + +AREXPORT void ArModeUnguardedTeleop::activate(void) +{ + addKeyHandler('e', &myEnableMotorsCB); + if (!baseActivate()) + return; + myGroup.activateExclusive(); +} + +AREXPORT void ArModeUnguardedTeleop::deactivate(void) +{ + remKeyHandler(&myEnableMotorsCB); + if (!baseDeactivate()) + return; + myGroup.deactivate(); +} + +AREXPORT void ArModeUnguardedTeleop::help(void) +{ + ArLog::log(ArLog::Terse, + "Unguarded teleop mode will drive under your joystick or keyboard control."); + ArLog::log(ArLog::Terse, + "\n### THIS MODE IS UNGUARDED AND UNSAFE, BE CAREFUL DRIVING"); + ArLog::log(ArLog::Terse, + "\nAs it will allow you to drive into things or down stairs."); + ArLog::log(ArLog::Terse, "For joystick, hold in the trigger button and then move the joystick to drive."); + ArLog::log(ArLog::Terse, "For keyboard control these are the keys and their actions:"); + ArLog::log(ArLog::Terse, "%13s: speed up if forward or no motion, slow down if going backwards", "up arrow"); + ArLog::log(ArLog::Terse, "%13s: slow down if going forwards, speed up if backward or no motion", "down arrow"); + ArLog::log(ArLog::Terse, "%13s: turn left", "left arrow"); + ArLog::log(ArLog::Terse, "%13s: turn right", "right arrow"); + if (myRobot->hasLatVel()) + { + ArLog::log(ArLog::Terse, "%13s: move left", "z"); + ArLog::log(ArLog::Terse, "%13s: move right", "x"); + } + ArLog::log(ArLog::Terse, "%13s: stop", "space bar"); + ArLog::log(ArLog::Terse, "%13s: (re)enable motors", "e"); + if (!myRobot->hasLatVel()) + printf("%10s %10s %10s %10s %10s %10s", "transVel", "rotVel", "x", "y", "th", "volts"); + else + printf("%10s %10s %10s %10s %10s %10s %10s", "transVel", "rotVel", "latVel", "x", "y", "th", "volts"); + if(myRobot->haveStateOfCharge()) + printf(" %10s", "soc"); + printf(" %10s", ""); //flags + printf("\n"); +} + +AREXPORT void ArModeUnguardedTeleop::userTask(void) +{ + if (!myRobot->hasLatVel()) + printf("\r%10.0f %10.0f %10.0f %10.0f %10.1f %10.1f", myRobot->getVel(), + myRobot->getRotVel(), myRobot->getX(), myRobot->getY(), + myRobot->getTh(), myRobot->getRealBatteryVoltage()); + else + printf("\r%10.0f %10.0f %10.0f %10.0f %10.0f %10.1f %10.1f", + myRobot->getVel(), myRobot->getRotVel(), myRobot->getLatVel(), + myRobot->getX(), myRobot->getY(), myRobot->getTh(), + myRobot->getRealBatteryVoltage()); + if(myRobot->haveStateOfCharge()) + printf(" %10.1f", myRobot->getStateOfCharge()); + if(myRobot->isEStopPressed()) printf(" [ESTOP PRESSED] "); + if(myRobot->isLeftMotorStalled() || myRobot->isRightMotorStalled()) printf(" [MOTOR STALL] "); + if(!myRobot->areMotorsEnabled()) printf(" [MOTORS DISABLED] "); +} + +AREXPORT ArModeWander::ArModeWander(ArRobot *robot, const char *name, char key, char key2): + ArMode(robot, name, key, key2), + myGroup(robot) +{ + myGroup.deactivate(); +} + +AREXPORT ArModeWander::~ArModeWander() +{ + +} + +AREXPORT void ArModeWander::activate(void) +{ + if (!baseActivate()) + return; + myGroup.activateExclusive(); +} + +AREXPORT void ArModeWander::deactivate(void) +{ + if (!baseDeactivate()) + return; + myGroup.deactivate(); +} + +AREXPORT void ArModeWander::help(void) +{ + ArLog::log(ArLog::Terse, "Wander mode will simply drive around forwards until it finds an obstacle,"); + ArLog::log(ArLog::Terse, "then it will turn until its clear, and continue."); + printf("%10s %10s %10s %10s %10s %10s\n", "transVel", "rotVel", "x", "y", "th", "volts"); +} + +AREXPORT void ArModeWander::userTask(void) +{ + printf("\r%10.0f %10.0f %10.0f %10.0f %10.1f %10.1f", myRobot->getVel(), + myRobot->getRotVel(), myRobot->getX(), myRobot->getY(), + myRobot->getTh(), myRobot->getRealBatteryVoltage()); +} + +AREXPORT ArModeGripper::ArModeGripper(ArRobot *robot, const char *name, + char key, char key2): + ArMode(robot, name, key, key2), + myGripper(robot), + myOpenCB(this, &ArModeGripper::open), + myCloseCB(this, &ArModeGripper::close), + myUpCB(this, &ArModeGripper::up), + myDownCB(this, &ArModeGripper::down), + myStopCB(this, &ArModeGripper::stop), + myExerciseCB(this, &ArModeGripper::exercise) +{ + myExercising = false; +} + +AREXPORT ArModeGripper::~ArModeGripper() +{ + +} + +AREXPORT void ArModeGripper::activate(void) +{ + if (!baseActivate()) + return; + + addKeyHandler(ArKeyHandler::UP, &myUpCB); + addKeyHandler(ArKeyHandler::DOWN, &myDownCB); + addKeyHandler(ArKeyHandler::RIGHT, &myOpenCB); + addKeyHandler(ArKeyHandler::LEFT, &myCloseCB); + addKeyHandler(ArKeyHandler::SPACE, &myStopCB); + addKeyHandler('e', &myExerciseCB); + addKeyHandler('E', &myExerciseCB); +} + +AREXPORT void ArModeGripper::deactivate(void) +{ + if (!baseDeactivate()) + return; + + remKeyHandler(&myUpCB); + remKeyHandler(&myDownCB); + remKeyHandler(&myOpenCB); + remKeyHandler(&myCloseCB); + remKeyHandler(&myStopCB); + remKeyHandler(&myExerciseCB); +} + +AREXPORT void ArModeGripper::userTask(void) +{ + int val; + printf("\r"); + if (myGripper.getBreakBeamState() & 2) // outer + printf("%13s", "blocked"); + else + printf("%13s", "clear"); + if (myGripper.getBreakBeamState() & 1) // inner + printf("%13s", "blocked"); + else + printf("%13s", "clear"); + val = myGripper.getGripState(); // gripper portion + if (val == 0) + printf("%13s", "between"); + else if (val == 1) + printf("%13s", "open"); + else if (val == 2) + printf("%13s", "closed"); + if (myGripper.isLiftMaxed()) // lift + printf("%13s", "maxed"); + else + printf("%13s", "clear"); + val = myGripper.getPaddleState(); // paddle section + if (val & 1) // left paddle + printf("%13s", "triggered"); + else + printf("%13s", "clear"); + if (val & 2) // right paddle + printf("%13s", "triggered"); + else + printf("%13s", "clear"); + // exercise the thing + if (myExercising) + { + switch (myExerState) { + case UP_OPEN: + if ((myLastExer.mSecSince() > 3000 && myGripper.isLiftMaxed()) || + myLastExer.mSecSince() > 30000) + { + myGripper.gripClose(); + myExerState = UP_CLOSE; + myLastExer.setToNow(); + if (myLastExer.mSecSince() > 30000) + ArLog::log(ArLog::Terse, "\nLift took more than thirty seconds to raise, there is probably a problem with it.\n"); + } + break; + case UP_CLOSE: + if (myGripper.getGripState() == 2 || myLastExer.mSecSince() > 10000) + { + myGripper.liftDown(); + myExerState = DOWN_CLOSE; + myLastExer.setToNow(); + if (myLastExer.mSecSince() > 10000) + ArLog::log(ArLog::Terse, "\nGripper took more than 10 seconds to close, there is probably a problem with it.\n"); + } + break; + case DOWN_CLOSE: + if ((myLastExer.mSecSince() > 3000 && myGripper.isLiftMaxed()) || + myLastExer.mSecSince() > 30000) + { + myGripper.gripOpen(); + myExerState = DOWN_OPEN; + myLastExer.setToNow(); + if (myLastExer.mSecSince() > 30000) + ArLog::log(ArLog::Terse, "\nLift took more than thirty seconds to raise, there is probably a problem with it.\n"); + } + break; + case DOWN_OPEN: + if (myGripper.getGripState() == 1 || myLastExer.mSecSince() > 10000) + { + myGripper.liftUp(); + myExerState = UP_OPEN; + myLastExer.setToNow(); + if (myLastExer.mSecSince() > 10000) + ArLog::log(ArLog::Terse, "\nGripper took more than 10 seconds to open, there is probably a problem with it.\n"); + } + break; + } + + } +} + +AREXPORT void ArModeGripper::open(void) +{ + if (myExercising == true) + { + myExercising = false; + myGripper.gripperHalt(); + } + myGripper.gripOpen(); +} + +AREXPORT void ArModeGripper::close(void) +{ + if (myExercising == true) + { + myExercising = false; + myGripper.gripperHalt(); + } + myGripper.gripClose(); +} + +AREXPORT void ArModeGripper::up(void) +{ + if (myExercising == true) + { + myExercising = false; + myGripper.gripperHalt(); + } + myGripper.liftUp(); +} + +AREXPORT void ArModeGripper::down(void) +{ + if (myExercising == true) + { + myExercising = false; + myGripper.gripperHalt(); + } + myGripper.liftDown(); +} + +AREXPORT void ArModeGripper::stop(void) +{ + if (myExercising == true) + { + myExercising = false; + myGripper.gripperHalt(); + } + myGripper.gripperHalt(); +} + +AREXPORT void ArModeGripper::exercise(void) +{ + if (myExercising == false) + { + ArLog::log(ArLog::Terse, + "\nGripper will now be exercised until another command is given."); + myExercising = true; + myExerState = UP_OPEN; + myGripper.liftUp(); + myGripper.gripOpen(); + myLastExer.setToNow(); + } +} + +AREXPORT void ArModeGripper::help(void) +{ + ArLog::log(ArLog::Terse, + "Gripper mode will let you control or exercise the gripper."); + ArLog::log(ArLog::Terse, + "If you start exercising the gripper it will stop your other commands."); + ArLog::log(ArLog::Terse, + "If you use other commands it will interrupt the exercising."); + ArLog::log(ArLog::Terse, "%13s: raise lift", "up arrow"); + ArLog::log(ArLog::Terse, "%13s: lower lift", "down arrow"); + ArLog::log(ArLog::Terse, "%13s: close gripper paddles", "left arrow"); + ArLog::log(ArLog::Terse, "%13s: open gripper paddles", "right arrow"); + ArLog::log(ArLog::Terse, "%13s: stop gripper paddles and lift", + "space bar"); + ArLog::log(ArLog::Terse, "%13s: exercise the gripper", "'e' or 'E'"); + ArLog::log(ArLog::Terse, "\nGripper status:"); + ArLog::log(ArLog::Terse, "%13s%13s%13s%13s%13s%13s", "BB outer", "BB inner", + "Paddles", "Lift", "LeftPaddle", "RightPaddle"); + +} + + + +AREXPORT ArModeCamera::ArModeCamera(ArRobot *robot, const char *name, + char key, char key2): + ArMode(robot, name, key, key2), + myUpCB(this, &ArModeCamera::up), + myDownCB(this, &ArModeCamera::down), + myLeftCB(this, &ArModeCamera::left), + myRightCB(this, &ArModeCamera::right), + myCenterCB(this, &ArModeCamera::center), + myZoomInCB(this, &ArModeCamera::zoomIn), + myZoomOutCB(this, &ArModeCamera::zoomOut), + myExerciseCB(this, &ArModeCamera::exercise), + mySonyCB(this, &ArModeCamera::sony), + myCanonCB(this, &ArModeCamera::canon), + myDpptuCB(this, &ArModeCamera::dpptu), + myAmptuCB(this, &ArModeCamera::amptu), + myCanonInvertedCB(this, &ArModeCamera::canonInverted), + mySonySerialCB(this, &ArModeCamera::sonySerial), + myCanonSerialCB(this, &ArModeCamera::canonSerial), + myDpptuSerialCB(this, &ArModeCamera::dpptuSerial), + myAmptuSerialCB(this, &ArModeCamera::amptuSerial), + myCanonInvertedSerialCB(this, &ArModeCamera::canonInvertedSerial), + myRVisionSerialCB(this, &ArModeCamera::rvisionSerial), + myCom1CB(this, &ArModeCamera::com1), + myCom2CB(this, &ArModeCamera::com2), + myCom3CB(this, &ArModeCamera::com3), + myCom4CB(this, &ArModeCamera::com4), + myAux1CB(this, &ArModeCamera::aux1), + myAux2CB(this, &ArModeCamera::aux2), + myPanAmount(5), + myTiltAmount(3) +{ + myState = STATE_CAMERA; + myExercising = false; +} + +AREXPORT ArModeCamera::~ArModeCamera() +{ + +} + +AREXPORT void ArModeCamera::activate(void) +{ + ArKeyHandler *keyHandler; + if (!baseActivate()) + return; + // see if there is already a keyhandler, if not something is wrong + // (since constructor should make one if there isn't one yet + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse,"ArModeCamera::activate: There should already be a key handler, but there isn't... mode won't work"); + return; + } + if (myState == STATE_CAMERA) + takeCameraKeys(); + else if (myState == STATE_PORT) + takePortKeys(); + else if (myState == STATE_MOVEMENT) + takeMovementKeys(); + else + ArLog::log(ArLog::Terse,"ArModeCamera in bad state."); + +} + +AREXPORT void ArModeCamera::deactivate(void) +{ + if (!baseDeactivate()) + return; + if (myState == STATE_CAMERA) + giveUpCameraKeys(); + else if (myState == STATE_PORT) + giveUpPortKeys(); + else if (myState == STATE_MOVEMENT) + giveUpMovementKeys(); + else + ArLog::log(ArLog::Terse,"ArModeCamera in bad state."); +} + +AREXPORT void ArModeCamera::userTask(void) +{ + if (myExercising && myCam != NULL && myLastExer.mSecSince() > 10000) + { + switch (myExerState) { + case CENTER: + myCam->panTilt(myCam->getMaxNegPan(), myCam->getMaxPosTilt()); + myExerState = UP_LEFT; + myLastExer.setToNow(); + break; + case UP_LEFT: + myCam->panTilt(myCam->getMaxPosPan(), myCam->getMaxPosTilt()); + myExerState = UP_RIGHT; + myLastExer.setToNow(); + break; + case UP_RIGHT: + myCam->panTilt(myCam->getMaxPosPan(), myCam->getMaxNegTilt()); + myExerState = DOWN_RIGHT; + myLastExer.setToNow(); + break; + case DOWN_RIGHT: + myCam->panTilt(myCam->getMaxNegPan(), myCam->getMaxNegTilt()); + myExerState = DOWN_LEFT; + myLastExer.setToNow(); + break; + case DOWN_LEFT: + myCam->panTilt(0, 0); + myExerState = CENTER; + myLastExer.setToNow(); + break; + } + } + if (myExercising && myCam != NULL && myCam->canZoom() && + myLastExerZoomed.mSecSince() > 35000) + { + if (myExerZoomedIn) + myCam->zoom(myCam->getMinZoom()); + else + myCam->zoom(myCam->getMaxZoom()); + myLastExerZoomed.setToNow(); + } +} + +AREXPORT void ArModeCamera::left(void) +{ + if (myExercising == true) + myExercising = false; + myCam->panRel(-myPanAmount); +} + +AREXPORT void ArModeCamera::right(void) +{ + if (myExercising == true) + myExercising = false; + myCam->panRel(myPanAmount); +} + +AREXPORT void ArModeCamera::up(void) +{ + if (myExercising == true) + myExercising = false; + myCam->tiltRel(myTiltAmount); +} + +AREXPORT void ArModeCamera::down(void) +{ + if (myExercising == true) + myExercising = false; + myCam->tiltRel(-myTiltAmount); +} + +AREXPORT void ArModeCamera::center(void) +{ + if (myExercising == true) + myExercising = false; + myCam->panTilt(0, 0); + myCam->zoom(myCam->getMinZoom()); +} + +AREXPORT void ArModeCamera::exercise(void) +{ + if (myExercising == false) + { + ArLog::log(ArLog::Terse, + "Camera will now be exercised until another command is given."); + myExercising = true; + myExerState = UP_LEFT; + myLastExer.setToNow(); + myCam->panTilt(myCam->getMaxNegPan(), myCam->getMaxPosTilt()); + myLastExerZoomed.setToNow(); + myExerZoomedIn = true; + if (myCam->canZoom()) + myCam->zoom(myCam->getMaxZoom()); + } +} + +AREXPORT void ArModeCamera::help(void) +{ + ArLog::log(ArLog::Terse, + "Camera mode will let you control or exercise the camera."); + ArLog::log(ArLog::Terse, + "If you start exercising the camera it will stop your other commands."); + if (myState == STATE_CAMERA) + helpCameraKeys(); + else if (myState == STATE_PORT) + helpPortKeys(); + else if (myState == STATE_MOVEMENT) + helpMovementKeys(); + else + ArLog::log(ArLog::Terse, "Something is horribly wrong and mode camera is in no state."); +} + +AREXPORT void ArModeCamera::zoomIn(void) +{ + if (myCam->canZoom()) + { + myCam->zoom(myCam->getZoom() + + ArMath::roundInt((myCam->getMaxZoom() - myCam->getMinZoom()) * .01)); + } +} + +AREXPORT void ArModeCamera::zoomOut(void) +{ + if (myCam->canZoom()) + { + myCam->zoom(myCam->getZoom() - + ArMath::roundInt((myCam->getMaxZoom() - myCam->getMinZoom()) * .01)); + } +} + +AREXPORT void ArModeCamera::sony(void) +{ + myCam = new ArSonyPTZ(myRobot); + ArLog::log(ArLog::Terse, "\nSony selected, now need to select the aux port."); + cameraToAux(); +} + +AREXPORT void ArModeCamera::canon(void) +{ + myCam = new ArVCC4(myRobot); + ArLog::log(ArLog::Terse, "\nCanon selected, now need to select the aux port."); + cameraToAux(); +} + +AREXPORT void ArModeCamera::dpptu(void) +{ + myCam = new ArDPPTU(myRobot); + ArLog::log(ArLog::Terse, "\nDPPTU selected, now need to select the aux port."); + cameraToAux(); +} + +AREXPORT void ArModeCamera::amptu(void) +{ + myCam = new ArAMPTU(myRobot); + ArLog::log(ArLog::Terse, + "\nActivMedia Pan Tilt Unit selected, now need to select the aux port."); + cameraToAux(); +} + +AREXPORT void ArModeCamera::canonInverted(void) +{ + myCam = new ArVCC4(myRobot, true); + ArLog::log(ArLog::Terse, "\nInverted Canon selected, now need to select the aux port."); + cameraToAux(); +} + +AREXPORT void ArModeCamera::sonySerial(void) +{ + myCam = new ArSonyPTZ(myRobot); + ArLog::log(ArLog::Terse, "\nSony selected, now need to select serial port."); + cameraToPort(); +} + +AREXPORT void ArModeCamera::canonSerial(void) +{ + myCam = new ArVCC4(myRobot); + ArLog::log(ArLog::Terse, + "\nCanon VCC4 selected, now need to select serial port."); + cameraToPort(); +} + +AREXPORT void ArModeCamera::dpptuSerial(void) +{ + myCam = new ArDPPTU(myRobot); + ArLog::log(ArLog::Terse, "\nDPPTU selected, now need to select serial port."); + cameraToPort(); +} + +AREXPORT void ArModeCamera::amptuSerial(void) +{ + myCam = new ArAMPTU(myRobot); + ArLog::log(ArLog::Terse, "\nAMPTU selected, now need to select serial port."); + cameraToPort(); +} + +AREXPORT void ArModeCamera::canonInvertedSerial(void) +{ + myCam = new ArVCC4(myRobot, true); + ArLog::log(ArLog::Terse, + "\nInverted Canon VCC4 selected, now need to select serial port."); + cameraToPort(); +} + +AREXPORT void ArModeCamera::rvisionSerial(void) +{ + myCam = new ArRVisionPTZ(myRobot); + ArLog::log(ArLog::Terse, "\nRVision selected, now need to select serial port."); + cameraToPort(); +} + +AREXPORT void ArModeCamera::com1(void) +{ + myConn.setPort(ArUtil::COM1); + portToMovement(); +} + +AREXPORT void ArModeCamera::com2(void) +{ + myConn.setPort(ArUtil::COM2); + portToMovement(); +} + +AREXPORT void ArModeCamera::com3(void) +{ + myConn.setPort(ArUtil::COM3); + portToMovement(); +} + +AREXPORT void ArModeCamera::com4(void) +{ + myConn.setPort(ArUtil::COM4); + portToMovement(); +} + +AREXPORT void ArModeCamera::aux1(void) +{ + myCam->setAuxPort(1); + auxToMovement(); +} +AREXPORT void ArModeCamera::aux2(void) +{ + myCam->setAuxPort(2); + auxToMovement(); +} + +void ArModeCamera::cameraToMovement(void) +{ + myState = STATE_MOVEMENT; + myCam->init(); + myRobot->setPTZ(myCam); + giveUpCameraKeys(); + takeMovementKeys(); + helpMovementKeys(); +} + +void ArModeCamera::cameraToPort(void) +{ + myState = STATE_PORT; + giveUpCameraKeys(); + takePortKeys(); + helpPortKeys(); +} + +void ArModeCamera::cameraToAux(void) +{ + giveUpCameraKeys(); + takeAuxKeys(); + helpAuxKeys(); +} + +void ArModeCamera::portToMovement(void) +{ + if (!myConn.openSimple()) + { + ArLog::log(ArLog::Terse, + "\n\nCould not open camera on that port, try another port.\n"); + helpPortKeys(); + return; + } + myCam->setDeviceConnection(&myConn); + myCam->init(); + myRobot->setPTZ(myCam); + myState = STATE_MOVEMENT; + giveUpPortKeys(); + takeMovementKeys(); + helpMovementKeys(); +} + +void ArModeCamera::auxToMovement(void) +{ + myCam->init(); + myRobot->setPTZ(myCam); + myState = STATE_MOVEMENT; + giveUpAuxKeys(); + takeMovementKeys(); + helpMovementKeys(); +} + +void ArModeCamera::takeCameraKeys(void) +{ + addKeyHandler('1', &mySonyCB); + addKeyHandler('2', &myCanonCB); + addKeyHandler('3', &myDpptuCB); + addKeyHandler('4', &myAmptuCB); + addKeyHandler('5', &myCanonInvertedCB); + addKeyHandler('!', &mySonySerialCB); + addKeyHandler('@', &myCanonSerialCB); + addKeyHandler('#', &myDpptuSerialCB); + addKeyHandler('$', &myAmptuSerialCB); + addKeyHandler('%', &myCanonInvertedSerialCB); + addKeyHandler('^', &myRVisionSerialCB); +} + +void ArModeCamera::giveUpCameraKeys(void) +{ + remKeyHandler(&myCanonCB); + remKeyHandler(&mySonyCB); + remKeyHandler(&myDpptuCB); + remKeyHandler(&myAmptuCB); + remKeyHandler(&myCanonInvertedCB); + remKeyHandler(&mySonySerialCB); + remKeyHandler(&myCanonSerialCB); + remKeyHandler(&myDpptuSerialCB); + remKeyHandler(&myAmptuSerialCB); + remKeyHandler(&myCanonInvertedSerialCB); + remKeyHandler(&myRVisionSerialCB); +} + +void ArModeCamera::helpCameraKeys(void) +{ + ArLog::log(ArLog::Terse, + "You now need to select what type of camera you have."); + ArLog::log(ArLog::Terse, + "%13s: select a SONY PTZ camera attached to the robot", "'1'"); + ArLog::log(ArLog::Terse, + "%13s: select a Canon VCC4 camera attached to the robot", "'2'"); + ArLog::log(ArLog::Terse, + "%13s: select a DPPTU camera attached to the robot", "'3'"); + ArLog::log(ArLog::Terse, + "%13s: select an AMPTU camera attached to the robot", "'4'"); + ArLog::log(ArLog::Terse, + "%13s: select an inverted Canon VCC4 camera attached to the robot", "'5'"); + + ArLog::log(ArLog::Terse, + "%13s: select a SONY PTZ camera attached to a serial port", + "'!'"); + ArLog::log(ArLog::Terse, + "%13s: select a Canon VCC4 camera attached to a serial port", + "'@'"); + ArLog::log(ArLog::Terse, + "%13s: select a DPPTU camera attached to a serial port", + "'#'"); + ArLog::log(ArLog::Terse, + "%13s: select an AMPTU camera attached to a serial port", + "'$'"); + ArLog::log(ArLog::Terse, + "%13s: select an inverted Canon VCC4 camera attached to a serial port", + "'%'"); + ArLog::log(ArLog::Terse, + "%13s: select an RVision camera attached to a serial port", + "'^'"); +} + +void ArModeCamera::takePortKeys(void) +{ + addKeyHandler('1', &myCom1CB); + addKeyHandler('2', &myCom2CB); + addKeyHandler('3', &myCom3CB); + addKeyHandler('4', &myCom4CB); +} + +void ArModeCamera::giveUpPortKeys(void) +{ + remKeyHandler(&myCom1CB); + remKeyHandler(&myCom2CB); + remKeyHandler(&myCom3CB); + remKeyHandler(&myCom4CB); +} + +void ArModeCamera::helpPortKeys(void) +{ + ArLog::log(ArLog::Terse, + "You now need to select what port your camera is on."); + ArLog::log(ArLog::Terse, "%13s: select COM1 or /dev/ttyS0", "'1'"); + ArLog::log(ArLog::Terse, "%13s: select COM2 or /dev/ttyS1", "'2'"); + ArLog::log(ArLog::Terse, "%13s: select COM3 or /dev/ttyS2", "'3'"); + ArLog::log(ArLog::Terse, "%13s: select COM4 or /dev/ttyS3", "'4'"); +} + +void ArModeCamera::takeAuxKeys(void) +{ + addKeyHandler('1', &myAux1CB); + addKeyHandler('2', &myAux2CB); +} + +void ArModeCamera::giveUpAuxKeys(void) +{ + remKeyHandler(&myAux1CB); + remKeyHandler(&myAux2CB); +} + +void ArModeCamera::helpAuxKeys(void) +{ + ArLog::log(ArLog::Terse, + "You now need to select what aux port your camera is on."); + ArLog::log(ArLog::Terse, "%13s: select AUX1", "'1'"); + ArLog::log(ArLog::Terse, "%13s: select AUX2", "'2'"); +} + +void ArModeCamera::takeMovementKeys(void) +{ + addKeyHandler(ArKeyHandler::UP, &myUpCB); + addKeyHandler(ArKeyHandler::DOWN, &myDownCB); + addKeyHandler(ArKeyHandler::LEFT, &myLeftCB); + addKeyHandler(ArKeyHandler::RIGHT, &myRightCB); + addKeyHandler(ArKeyHandler::SPACE, &myCenterCB); + addKeyHandler('e', &myExerciseCB); + addKeyHandler('E', &myExerciseCB); + if (myCam->canZoom()) + { + addKeyHandler('z', &myZoomInCB); + addKeyHandler('Z', &myZoomInCB); + addKeyHandler('x', &myZoomOutCB); + addKeyHandler('X', &myZoomOutCB); + } +} + +void ArModeCamera::giveUpMovementKeys(void) +{ + remKeyHandler(&myUpCB); + remKeyHandler(&myDownCB); + remKeyHandler(&myLeftCB); + remKeyHandler(&myRightCB); + remKeyHandler(&myCenterCB); + remKeyHandler(&myExerciseCB); + if (myCam->canZoom()) + { + remKeyHandler(&myZoomInCB); + remKeyHandler(&myZoomOutCB); + } +} + +void ArModeCamera::helpMovementKeys(void) +{ + ArLog::log(ArLog::Terse, + "Camera mode will now let you move the camera."); + ArLog::log(ArLog::Terse, "%13s: tilt camera up by %d", "up arrow", myTiltAmount); + ArLog::log(ArLog::Terse, "%13s: tilt camera down by %d", "down arrow", myTiltAmount); + ArLog::log(ArLog::Terse, "%13s: pan camera left by %d", "left arrow", myPanAmount); + ArLog::log(ArLog::Terse, "%13s: pan camera right by %d", "right arrow", myPanAmount); + ArLog::log(ArLog::Terse, "%13s: center camera and zoom out", + "space bar"); + ArLog::log(ArLog::Terse, "%13s: exercise the camera", "'e' or 'E'"); + if (myCam->canZoom()) + { + ArLog::log(ArLog::Terse, "%13s: zoom in", "'z' or 'Z'"); + ArLog::log(ArLog::Terse, "%13s: zoom out", "'x' or 'X'"); + } +} + +AREXPORT ArModeSonar::ArModeSonar(ArRobot *robot, const char *name, char key, + char key2) : + ArMode(robot, name, key, key2), + myAllSonarCB(this, &ArModeSonar::allSonar), + myFirstSonarCB(this, &ArModeSonar::firstSonar), + mySecondSonarCB(this, &ArModeSonar::secondSonar), + myThirdSonarCB(this, &ArModeSonar::thirdSonar), + myFourthSonarCB(this, &ArModeSonar::fourthSonar) +{ + myState = STATE_FIRST; +} + +AREXPORT ArModeSonar::~ArModeSonar() +{ + +} + +AREXPORT void ArModeSonar::activate(void) +{ + if (!baseActivate()) + return; + addKeyHandler('1', &myAllSonarCB); + addKeyHandler('2', &myFirstSonarCB); + addKeyHandler('3', &mySecondSonarCB); + addKeyHandler('4', &myThirdSonarCB); + addKeyHandler('5', &myFourthSonarCB); +} + +AREXPORT void ArModeSonar::deactivate(void) +{ + if (!baseDeactivate()) + return; + remKeyHandler(&myAllSonarCB); + remKeyHandler(&myFirstSonarCB); + remKeyHandler(&mySecondSonarCB); + remKeyHandler(&myThirdSonarCB); + remKeyHandler(&myFourthSonarCB); +} + +AREXPORT void ArModeSonar::help(void) +{ + int i; + ArLog::log(ArLog::Terse, "This mode displays different segments of sonar."); + ArLog::log(ArLog::Terse, + "You can use these keys to switch what is displayed:"); + ArLog::log(ArLog::Terse, "%13s: display all sonar", "'1'"); + ArLog::log(ArLog::Terse, "%13s: display sonar 0 - 7", "'2'"); + ArLog::log(ArLog::Terse, "%13s: display sonar 8 - 15", "'3'"); + ArLog::log(ArLog::Terse, "%13s: display sonar 16 - 23", "'4'"); + ArLog::log(ArLog::Terse, "%13s: display sonar 24 - 31", "'5'"); + ArLog::log(ArLog::Terse, "Sonar readings:"); + if (myState == STATE_ALL) + { + ArLog::log(ArLog::Terse, "Displaying all sonar."); + for (i = 0; i < myRobot->getNumSonar(); ++i) + printf("%6d", i); + } + else if (myState == STATE_FIRST) + { + ArLog::log(ArLog::Terse, "Displaying 0-7 sonar."); + for (i = 0; i < myRobot->getNumSonar() && i <= 7; ++i) + printf("%6d", i); + } + else if (myState == STATE_SECOND) + { + ArLog::log(ArLog::Terse, "Displaying 8-15 sonar."); + for (i = 8; i < myRobot->getNumSonar() && i <= 15; ++i) + printf("%6d", i); + } + else if (myState == STATE_THIRD) + { + ArLog::log(ArLog::Terse, "Displaying 16-23 sonar."); + for (i = 16; i < myRobot->getNumSonar() && i <= 23; ++i) + printf("%6d", i); + } + else if (myState == STATE_FOURTH) + { + ArLog::log(ArLog::Terse, "Displaying 24-31 sonar."); + for (i = 24; i < myRobot->getNumSonar() && i <= 31; ++i) + printf("%6d", i); + } + printf("\n"); +} + +AREXPORT void ArModeSonar::userTask(void) +{ + int i; + printf("\r"); + if (myState == STATE_ALL) + { + for (i = 0; i < myRobot->getNumSonar(); ++i) + printf("%6d", myRobot->getSonarRange(i)); + } + else if (myState == STATE_FIRST) + { + for (i = 0; i < myRobot->getNumSonar() && i <= 7; ++i) + printf("%6d", myRobot->getSonarRange(i)); + } + else if (myState == STATE_SECOND) + { + for (i = 8; i < myRobot->getNumSonar() && i <= 15; ++i) + printf("%6d", myRobot->getSonarRange(i)); + } + else if (myState == STATE_THIRD) + { + for (i = 16; i < myRobot->getNumSonar() && i <= 23; ++i) + printf("%6d", myRobot->getSonarRange(i)); + } + else if (myState == STATE_FOURTH) + { + for (i = 24; i < myRobot->getNumSonar() && i <= 31; ++i) + printf("%6d", myRobot->getSonarRange(i)); + } +} + +AREXPORT void ArModeSonar::allSonar(void) +{ + myState = STATE_ALL; + printf("\n"); + help(); +} + +AREXPORT void ArModeSonar::firstSonar(void) +{ + myState = STATE_FIRST; + printf("\n"); + help(); +} + +AREXPORT void ArModeSonar::secondSonar(void) +{ + myState = STATE_SECOND; + printf("\n"); + help(); +} + +AREXPORT void ArModeSonar::thirdSonar(void) +{ + myState = STATE_THIRD; + printf("\n"); + help(); +} + +AREXPORT void ArModeSonar::fourthSonar(void) +{ + myState = STATE_FOURTH; + printf("\n"); + help(); +} + +AREXPORT ArModeBumps::ArModeBumps(ArRobot *robot, const char *name, char key, char key2): + ArMode(robot, name, key, key2) +{ +} + +AREXPORT ArModeBumps::~ArModeBumps() +{ + +} + +AREXPORT void ArModeBumps::activate(void) +{ + if (!baseActivate()) + return; +} + +AREXPORT void ArModeBumps::deactivate(void) +{ + if (!baseDeactivate()) + return; +} + +AREXPORT void ArModeBumps::help(void) +{ + unsigned int i; + ArLog::log(ArLog::Terse, "Bumps mode will display whether bumpers are triggered or not..."); + ArLog::log(ArLog::Terse, "keep in mind it is assuming you have a full bump ring... so you should"); + ArLog::log(ArLog::Terse, "ignore readings for where there aren't bumpers."); + ArLog::log(ArLog::Terse, "Bumper readings:"); + for (i = 0; i < myRobot->getNumFrontBumpers(); i++) + { + printf("%6d", i + 1); + } + printf(" |"); + for (i = 0; i < myRobot->getNumRearBumpers(); i++) + { + printf("%6d", i + 1); + } + printf("\n"); +} + +AREXPORT void ArModeBumps::userTask(void) +{ + unsigned int i; + int val; + int bit; + if (myRobot == NULL) + return; + printf("\r"); + val = ((myRobot->getStallValue() & 0xff00) >> 8); + for (i = 0, bit = 2; i < myRobot->getNumFrontBumpers(); i++, bit *= 2) + { + if (val & bit) + printf("%6s", "trig"); + else + printf("%6s", "clear"); + } + printf(" |"); + val = ((myRobot->getStallValue() & 0xff)); + for (i = 0, bit = 2; i < myRobot->getNumRearBumpers(); i++, bit *= 2) + { + if (val & bit) + printf("%6s", "trig"); + else + printf("%6s", "clear"); + } + +} + +AREXPORT ArModePosition::ArModePosition(ArRobot *robot, const char *name, char key, char key2, ArAnalogGyro *gyro): + ArMode(robot, name, key, key2), + myUpCB(this, &ArModePosition::up), + myDownCB(this, &ArModePosition::down), + myLeftCB(this, &ArModePosition::left), + myRightCB(this, &ArModePosition::right), + myStopCB(this, &ArModePosition::stop), + myResetCB(this, &ArModePosition::reset), + myModeCB(this, &ArModePosition::mode), + myGyroCB(this, &ArModePosition::gyro), + myIncDistCB(this, &ArModePosition::incDistance), + myDecDistCB(this, &ArModePosition::decDistance) +{ + myGyro = gyro; + myMode = MODE_BOTH; + myModeString = "both"; + myInHeadingMode = false; + myDistance = 1000; + + if (myGyro != NULL && !myGyro->hasNoInternalData()) + myGyroZero = myGyro->getHeading(); + myRobotZero = myRobot->getRawEncoderPose().getTh(); + myInHeadingMode = true; + myHeading = myRobot->getTh(); +} + +AREXPORT ArModePosition::~ArModePosition() +{ + +} + +AREXPORT void ArModePosition::activate(void) +{ + if (!baseActivate()) + return; + + addKeyHandler(ArKeyHandler::UP, &myUpCB); + addKeyHandler(ArKeyHandler::DOWN, &myDownCB); + addKeyHandler(ArKeyHandler::LEFT, &myLeftCB); + addKeyHandler(ArKeyHandler::RIGHT, &myRightCB); + addKeyHandler(ArKeyHandler::SPACE, &myStopCB); + addKeyHandler(ArKeyHandler::PAGEUP, &myIncDistCB); + addKeyHandler(ArKeyHandler::PAGEDOWN, &myDecDistCB); + addKeyHandler('r', &myResetCB); + addKeyHandler('R', &myResetCB); + addKeyHandler('x', &myModeCB); + addKeyHandler('X', &myModeCB); + addKeyHandler('z', &myGyroCB); + addKeyHandler('Z', &myGyroCB); +} + +AREXPORT void ArModePosition::deactivate(void) +{ + if (!baseDeactivate()) + return; + + remKeyHandler(&myUpCB); + remKeyHandler(&myDownCB); + remKeyHandler(&myLeftCB); + remKeyHandler(&myRightCB); + remKeyHandler(&myStopCB); + remKeyHandler(&myResetCB); + remKeyHandler(&myModeCB); + remKeyHandler(&myGyroCB); + remKeyHandler(&myIncDistCB); + remKeyHandler(&myDecDistCB); +} + +AREXPORT void ArModePosition::up(void) +{ + myRobot->move(myDistance); + if (myInHeadingMode) + { + myInHeadingMode = false; + myHeading = myRobot->getTh(); + } +} + +AREXPORT void ArModePosition::down(void) +{ + myRobot->move(-myDistance); + if (myInHeadingMode) + { + myInHeadingMode = false; + myHeading = myRobot->getTh(); + } +} + +AREXPORT void ArModePosition::incDistance(void) +{ + myDistance += 500; + puts("\n"); + help(); +} + +AREXPORT void ArModePosition::decDistance(void) +{ + myDistance -= 500; + if(myDistance < 500) myDistance = 500; + puts("\n"); + help(); +} + +AREXPORT void ArModePosition::left(void) +{ + myRobot->setDeltaHeading(90); + myInHeadingMode = true; +} + +AREXPORT void ArModePosition::right(void) +{ + myRobot->setDeltaHeading(-90); + myInHeadingMode = true; +} + +AREXPORT void ArModePosition::stop(void) +{ + myRobot->stop(); + myInHeadingMode = true; +} + +AREXPORT void ArModePosition::reset(void) +{ + myRobot->stop(); + myRobot->moveTo(ArPose(0, 0, 0)); + if (myGyro != NULL && !myGyro->hasNoInternalData()) + myGyroZero = myGyro->getHeading(); + myRobotZero = myRobot->getRawEncoderPose().getTh(); + myInHeadingMode = true; + myHeading = myRobot->getTh(); +} + +AREXPORT void ArModePosition::mode(void) +{ + if (myMode == MODE_BOTH) + { + myMode = MODE_EITHER; + myModeString = "either"; + myInHeadingMode = true; + myRobot->stop(); + } + else if (myMode == MODE_EITHER) + { + myMode = MODE_BOTH; + myModeString = "both"; + } +} + +AREXPORT void ArModePosition::gyro(void) +{ + if (myGyro == NULL || !myGyro->haveGottenData()) + return; + + if (myGyro != NULL && myGyro->isActive()) + myGyro->deactivate(); + else if (myGyro != NULL && !myGyro->isActive() && + myGyro->hasGyroOnlyMode() && !myGyro->isGyroOnlyActive()) + myGyro->activateGyroOnly(); + else if (myGyro != NULL && !myGyro->isActive()) + myGyro->activate(); + + help(); +} + +AREXPORT void ArModePosition::help(void) +{ + ArLog::log(ArLog::Terse, "Mode is one of two values:"); + ArLog::log(ArLog::Terse, "%13s: heading and move can happen simultaneously", + "both"); + ArLog::log(ArLog::Terse, "%13s: only heading or move is active (move holds heading)", "either"); + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "%13s: forward %.1f meter(s)", "up arrow", myDistance/1000.0); + ArLog::log(ArLog::Terse, "%13s: backward %.1f meter(s)", "down arrow", myDistance/1000.0); + ArLog::log(ArLog::Terse, "%13s: increase distance by 1/2 meter", "page up"); + ArLog::log(ArLog::Terse, "%13s: decrease distance by 1/2 meter", "page down"); + ArLog::log(ArLog::Terse, "%13s: turn left 90 degrees", "left arrow"); + ArLog::log(ArLog::Terse, "%13s: turn right 90 degrees", "right arrow"); + ArLog::log(ArLog::Terse, "%13s: stop", "space bar"); + ArLog::log(ArLog::Terse, "%13s: reset ARIA position to (0, 0, 0)", "'r' or 'R'"); + ArLog::log(ArLog::Terse, "%13s: switch heading/velocity mode","'x' or 'X'"); + if (myGyro != NULL && myGyro->haveGottenData() && !myGyro->hasGyroOnlyMode()) + ArLog::log(ArLog::Terse, "%13s: turn gyro on or off (stays this way in other modes)","'z' or 'Z'"); + if (myGyro != NULL && myGyro->haveGottenData() && myGyro->hasGyroOnlyMode()) + ArLog::log(ArLog::Terse, "%13s: turn gyro on or off or gyro only (stays this way in other modes)","'z' or 'Z'"); + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, "Position mode shows the position stats on a robot."); + if (myGyro != NULL && myGyro->haveGottenData() && + !myGyro->hasNoInternalData()) + ArLog::log(ArLog::Terse, "%7s%7s%9s%7s%8s%7s%8s%6s%10s%10s%10s", "x", "y", "th", "comp", "volts", "mpacs", "mode", "gyro", "gyro_th", "robot_th", "raw"); + else if (myGyro != NULL && myGyro->haveGottenData() && + myGyro->hasNoInternalData()) + ArLog::log(ArLog::Terse, "%7s%7s%9s%7s%8s%7s%8s%6s%10s", "x", "y", "th", "comp", "volts", "mpacs", "mode", "gyro", "raw"); + else + ArLog::log(ArLog::Terse, "%7s%7s%9s%7s%8s%7s%8s%10s", "x", "y", "th", "comp", "volts", "mpacs", "mode", "raw"); + + +} + +AREXPORT void ArModePosition::userTask(void) +{ + if (myRobot == NULL) + return; + // if we're in either mode and not in the heading mode try to keep the + // same heading (in heading mode its controlled by those commands) + if (myMode == MODE_EITHER && !myInHeadingMode) + { + myRobot->setHeading(myHeading); + } + double voltage; + if (myRobot->getRealBatteryVoltage() > 0) + voltage = myRobot->getRealBatteryVoltage(); + else + voltage = myRobot->getBatteryVoltage(); + + std::string gyroString; + if (myGyro == NULL) + gyroString = "none"; + else if (myGyro->isActive()) + gyroString = "on"; + else if (myGyro->hasGyroOnlyMode() && myGyro->isGyroOnlyActive()) + gyroString = "only"; + else + gyroString = "off"; + + ArPose raw = myRobot->getRawEncoderPose(); + + if (myGyro != NULL && myGyro->haveGottenData() && + !myGyro->hasNoInternalData()) + printf("\r%7.0f%7.0f%9.2f%7.0f%8.2f%7d%8s%6s%10.2f%10.2f %10.2f,%.2f,%.2f", + myRobot->getX(), myRobot->getY(), myRobot->getTh(), + myRobot->getCompass(), voltage, + myRobot->getMotorPacCount(), + myMode == MODE_BOTH ? "both" : "either", + gyroString.c_str(), + ArMath::subAngle(myGyro->getHeading(), myGyroZero), + ArMath::subAngle(myRobot->getRawEncoderPose().getTh(),myRobotZero), + raw.getX(), raw.getY(), raw.getTh() + ); + else if (myGyro != NULL && myGyro->haveGottenData() && + myGyro->hasNoInternalData()) + printf("\r%7.0f%7.0f%9.2f%7.0f%8.2f%7d%8s%6s%10.2f,%.2f,%.2f", + myRobot->getX(), myRobot->getY(), myRobot->getTh(), + myRobot->getCompass(), voltage, + myRobot->getMotorPacCount(), + myMode == MODE_BOTH ? "both" : "either", + gyroString.c_str(), + raw.getX(), raw.getY(), raw.getTh() + + ); + else + printf("\r%7.0f%7.0f%9.2f%7.0f%8.2f%7d%8s%10.2f,%.2f,%.2f", myRobot->getX(), + myRobot->getY(), myRobot->getTh(), myRobot->getCompass(), + voltage, myRobot->getMotorPacCount(), + myMode == MODE_BOTH ? "both" : "either", + raw.getX(), raw.getY(), raw.getTh() + ); +} + +AREXPORT ArModeIO::ArModeIO(ArRobot *robot, const char *name, char key, char key2): + ArMode(robot, name, key, key2) +{ +} + +AREXPORT ArModeIO::~ArModeIO() +{ + +} + +AREXPORT void ArModeIO::activate(void) +{ + if (!baseActivate()) + return; + if (myRobot == NULL) + return; + myRobot->comInt(ArCommands::IOREQUEST, 2); + myOutput[0] = '\0'; + myLastPacketTime = myRobot->getIOPacketTime(); +} + +AREXPORT void ArModeIO::deactivate(void) +{ + if (!baseDeactivate()) + return; + if (myRobot == NULL) + return; + myRobot->comInt(ArCommands::IOREQUEST, 0); +} + +AREXPORT void ArModeIO::help(void) +{ + ArLog::log(ArLog::Terse, + "IO mode shows the IO (digin, digout, a/d) from the robot."); + myExplanationReady = false; + myExplained = false; +} + +AREXPORT void ArModeIO::userTask(void) +{ + int num; + int i, j; + unsigned int value; + int bit; + char label[256]; + myOutput[0] = '\0'; + + //if (myLastPacketTime.mSecSince(myRobot->getIOPacketTime()) == 0) + // return; + + if (!myExplanationReady) + myExplanation[0] = '\0'; + + value = myRobot->getFlags(); + if (!myExplanationReady) + { + sprintf(label, "flags"); + sprintf(myExplanation, "%s%17s ", myExplanation, label); + } + for (j = 0, bit = 1; j < 16; ++j, bit *= 2) + { + if (j == 8) + sprintf(myOutput, "%s ", myOutput); + if (value & bit) + sprintf(myOutput, "%s%d", myOutput, 1); + else + sprintf(myOutput, "%s%d", myOutput, 0); + } + sprintf(myOutput, "%s ", myOutput); + + if (myRobot->hasFaultFlags()) + { + value = myRobot->getFaultFlags(); + if (!myExplanationReady) + { + sprintf(label, "fault_flags"); + sprintf(myExplanation, "%s%17s ", myExplanation, label); + } + for (j = 0, bit = 1; j < 16; ++j, bit *= 2) + { + if (j == 8) + sprintf(myOutput, "%s ", myOutput); + if (value & bit) + sprintf(myOutput, "%s%d", myOutput, 1); + else + sprintf(myOutput, "%s%d", myOutput, 0); + } + sprintf(myOutput, "%s ", myOutput); + } + + num = myRobot->getIODigInSize(); + for (i = 0; i < num; ++i) + { + value = myRobot->getIODigIn(i); + if (!myExplanationReady) + { + sprintf(label, "digin%d", i); + sprintf(myExplanation, "%s%8s ", myExplanation, label); + } + for (j = 0, bit = 1; j < 8; ++j, bit *= 2) + { + if (value & bit) + sprintf(myOutput, "%s%d", myOutput, 1); + else + sprintf(myOutput, "%s%d", myOutput, 0); + } + sprintf(myOutput, "%s ", myOutput); + } + + num = myRobot->getIODigOutSize(); + for (i = 0; i < num; ++i) + { + value = myRobot->getIODigOut(i); + if (!myExplanationReady) + { + sprintf(label, "digout%d", i); + sprintf(myExplanation, "%s%8s ", myExplanation, label); + } + for (j = 0, bit = 1; j < 8; ++j, bit *= 2) + { + if (value & bit) + sprintf(myOutput, "%s%d", myOutput, 1); + else + sprintf(myOutput, "%s%d", myOutput, 0); + } + sprintf(myOutput, "%s ", myOutput); + } + + num = myRobot->getIOAnalogSize(); + for (i = 0; i < num; ++i) + { + if (!myExplanationReady) + { + sprintf(label, "a/d%d", i); + sprintf(myExplanation, "%s%6s", myExplanation, label); + } + + /* + int ad = myRobot->getIOAnalog(i); + double adVal; + ad &= 0xfff; + adVal = ad * .0048828; + sprintf(myOutput, "%s%6.2f", myOutput,adVal); + */ + sprintf(myOutput, "%s%6.2f", myOutput, myRobot->getIOAnalogVoltage(i)); + + } + + if (!myExplained) + { + printf("\n%s\n", myExplanation); + myExplained = true; + } + + printf("\r%s", myOutput); +} + +AREXPORT ArModeLaser::ArModeLaser(ArRobot *robot, const char *name, + char key, char key2, ArSick *obsolete) : + ArMode(robot, name, key, key2), + myTogMiddleCB(this, &ArModeLaser::togMiddle) +{ + myPrintMiddle = false; + + ArLaser *laser; + int i; + for (i = 1; i <= 10; i++) + { + if ((laser = myRobot->findLaser(i)) != NULL) + { + myLaserCallbacks[i] = new ArFunctor1C(this, &ArModeLaser::switchToLaser, i), + myLasers[i] = laser; + } + } + + myLaser = NULL; + myState = STATE_UNINITED; +} + +AREXPORT ArModeLaser::~ArModeLaser() +{ +} + +AREXPORT void ArModeLaser::activate(void) +{ + // this is here because there needs to be the laser set up for the + // help to work right + std::map::iterator it; + if (myLaser == NULL) + { + if ((it = myLasers.begin()) == myLasers.end()) + { + ArLog::log(ArLog::Normal, "Laser mode tried to activate, but has no lasers"); + } + else + { + myLaser = (*it).second; + myLaserNumber = (*it).first; + } + } + + + bool alreadyActive = false; + + if (ourActiveMode == this) + alreadyActive = true; + + if (!alreadyActive && !baseActivate()) + return; + + if (myRobot == NULL) + { + ArLog::log(ArLog::Verbose, "Laser mode activated but there is no robot."); + return; + } + + if (myLaser == NULL) + { + ArLog::log(ArLog::Verbose, "Laser mode activated but there are no lasers."); + return; + } + + if (!alreadyActive) + { + + addKeyHandler('z', &myTogMiddleCB); + addKeyHandler('Z', &myTogMiddleCB); + + std::map *>::iterator kIt; + for (kIt = myLaserCallbacks.begin(); kIt != myLaserCallbacks.end(); kIt++) + { + if ((*kIt).first >= 1 || (*kIt).first <= 9) + addKeyHandler('0' + (*kIt).first, (*kIt).second); + } + } + + if (myState == STATE_UNINITED) + { + myLaser->lockDevice(); + if (myLaser->isConnected()) + { + ArLog::log(ArLog::Verbose, + "\nArModeLaser using already existing and connected laser."); + myState = STATE_CONNECTED; + } + else if (myLaser->isTryingToConnect()) + { + ArLog::log(ArLog::Terse, "\nArModeLaser already connecting to %s.", + myLaser->getName()); + } + else + { + ArLog::log(ArLog::Terse, + "\nArModeLaser is connecting to %s.", + myLaser->getName()); + myLaser->asyncConnect(); + myState = STATE_CONNECTING; + } + myLaser->unlockDevice(); + } +} + +AREXPORT void ArModeLaser::deactivate(void) +{ + if (!baseDeactivate()) + return; + + remKeyHandler(&myTogMiddleCB); + + std::map *>::iterator it; + for (it = myLaserCallbacks.begin(); it != myLaserCallbacks.end(); it++) + { + remKeyHandler((*it).second); + } +} + +AREXPORT void ArModeLaser::help(void) +{ + if (myLaser == NULL) + { + ArLog::log(ArLog::Terse, + "There are no lasers, this mode cannot do anything"); + return; + } + + ArLog::log(ArLog::Terse, + "Laser mode connects to a laser, or uses a previously established connection."); + ArLog::log(ArLog::Terse, + "Laser mode then displays the closest and furthest reading from the laser."); + ArLog::log(ArLog::Terse, "%13s: toggle between far reading and middle reading with reflectivity", "'z' or 'Z'"); + + std::map *>::iterator it; + for (it = myLaserCallbacks.begin(); it != myLaserCallbacks.end(); it++) + { + ArLog::log(ArLog::Terse, "%13d: %s", (*it).first, + myLasers[(*it).first]->getName()); + } +} + + +AREXPORT void ArModeLaser::userTask(void) +{ + double dist = HUGE_VAL, angle = -1; + int reflec = -1; + double midDist = HUGE_VAL, midAngle = -1; + int midReflec = -1; + double farDist = -HUGE_VAL, farAngle = -1; + + if (myRobot == NULL || myLaser == NULL) + return; + + + if (myState == STATE_CONNECTED && !myPrintMiddle) + { + const std::list *readings; + std::list::const_iterator it; + bool found = false; + + myLaser->lockDevice(); + if (!myLaser->isConnected()) + { + ArLog::log(ArLog::Terse, "\n\nLaser mode lost connection to the laser."); + ArLog::log(ArLog::Terse, "Select that laser or laser mode again to try reconnecting to the laser.\n"); + myState = STATE_UNINITED; + } + dist = myLaser->currentReadingPolar(-90, 90, &angle); + if (dist < myLaser->getMaxRange()) + printf("\rClose: %8.0fmm %5.1f deg ", dist, angle); + else + printf("\rNo close reading. "); + + readings = myLaser->getCurrentBuffer(); + for (it = readings->begin(), found = false; it != readings->end(); it++) + { + dist = myRobot->findDistanceTo(*(*it)); + angle = myRobot->findDeltaHeadingTo(*(*it)); + if (!found || dist > farDist) + { + found = true; + farDist = dist; + farAngle = angle; + } + } + if (found) + printf("Far: %8.0fmm %5.1f deg", + farDist, farAngle); + else + printf("No far reading found"); + printf(" %d readings ", readings->size()); + myLaser->unlockDevice(); + } + else if (myState == STATE_CONNECTED && myPrintMiddle) + { + const std::list *rawReadings; + std::list::const_iterator rawIt; + myLaser->lockDevice(); + if (!myLaser->isConnected()) + { + ArLog::log(ArLog::Terse, "\n\nLaser mode lost connection to the laser."); + ArLog::log(ArLog::Terse, "Switch out of this mode and back if you want to try reconnecting to the laser.\n"); + myState = STATE_UNINITED; + } + rawReadings = myLaser->getRawReadings(); + int middleReading = rawReadings->size() / 2; + if (rawReadings->begin() != rawReadings->end()) + { + int i; + for (rawIt = rawReadings->begin(), i = 0; + rawIt != rawReadings->end(); + rawIt++, i++) + { + if ((*rawIt)->getIgnoreThisReading()) + continue; + if (rawIt == rawReadings->begin() || + (*rawIt)->getRange() < dist) + { + dist = (*rawIt)->getRange(); + angle = (*rawIt)->getSensorTh(); + reflec = (*rawIt)->getExtraInt(); + } + if (i == middleReading) + { + midDist = (*rawIt)->getRange(); + midAngle = (*rawIt)->getSensorTh(); + midReflec = (*rawIt)->getExtraInt(); + } + } + printf( + "\rClose: %8.0fmm %5.1f deg %d refl Middle: %8.0fmm %5.1fdeg, %d refl", + dist, angle, reflec, midDist, midAngle, midReflec); + } + else + printf("\rNo readings"); + myLaser->unlockDevice(); + } + else if (myState == STATE_CONNECTING) + { + myLaser->lockDevice(); + if (myLaser->isConnected()) + { + ArLog::log(ArLog::Terse, "\nLaser mode has connected to the laser.\n"); + myState = STATE_CONNECTED; + } + else if (!myLaser->isTryingToConnect()) + { + ArLog::log(ArLog::Terse, "\nLaser mode failed to connect to the laser.\n"); + ArLog::log(ArLog::Terse, + "Switch out of this mode and back to try reconnecting.\n"); + myState = STATE_UNINITED; + } + myLaser->unlockDevice(); + } +} + + +void ArModeLaser::togMiddle(void) +{ + myPrintMiddle = !myPrintMiddle; +} + +AREXPORT void ArModeLaser::switchToLaser(int laserNumber) +{ + if (laserNumber == myLaserNumber && myLaser->isConnected()) + { + ArLog::log(ArLog::Verbose, + "ArModeLaser::switchToLaser: Already on laser %s", myLaser->getName()); + return; + } + + std::map::iterator it; + if ((it = myLasers.find(laserNumber)) == myLasers.end()) + { + ArLog::log(ArLog::Normal, "ArModeLaser::switchToLaser: told to switch to laser %d but that laser does not exist"); + return; + } + myLaser = (*it).second; + ArLog::log(ArLog::Normal, "\r\n\nSwitching to laser %s\n", + myLaser->getName()); + myState = STATE_UNINITED; + myLaserNumber = laserNumber; + + activate(); +} + +/** + @param robot ArRobot instance to be associate with + @param name name of this mode + @param key keyboard key that activates this mode + @param key2 another keyboard key that activates this mode + @param acts ArACTS_1_2 instance to use. If not given, then an internally +maintained instance is created by ArModeActs. + **/ +AREXPORT ArModeActs::ArModeActs(ArRobot *robot, const char *name, char key, + char key2, ArACTS_1_2 *acts): + ArMode(robot, name, key, key2), + myChannel1CB(this, &ArModeActs::channel1), + myChannel2CB(this, &ArModeActs::channel2), + myChannel3CB(this, &ArModeActs::channel3), + myChannel4CB(this, &ArModeActs::channel4), + myChannel5CB(this, &ArModeActs::channel5), + myChannel6CB(this, &ArModeActs::channel6), + myChannel7CB(this, &ArModeActs::channel7), + myChannel8CB(this, &ArModeActs::channel8), + myStopCB(this, &ArModeActs::stop), + myStartCB(this, &ArModeActs::start), + myToggleAcquireCB(this, &ArModeActs::toggleAcquire) +{ + if (acts != NULL) + myActs = acts; + else + myActs = new ArACTS_1_2; + myRobot = robot; + myActs->openPort(myRobot); + myGroup = new ArActionGroupColorFollow(myRobot, myActs, camera); + myGroup->deactivate(); +} + +// Destructor +AREXPORT ArModeActs::~ArModeActs() +{ + +} + +// Activate the mode +AREXPORT void ArModeActs::activate(void) +{ + // Activate the group + if (!baseActivate()) + return; + myGroup->activateExclusive(); + + // Add key handlers for keyboard input + addKeyHandler(ArKeyHandler::SPACE, &myStopCB); + addKeyHandler('z', &myStartCB); + addKeyHandler('Z', &myStartCB); + addKeyHandler('x', &myToggleAcquireCB); + addKeyHandler('X', &myToggleAcquireCB); + addKeyHandler('1', &myChannel1CB); + addKeyHandler('2', &myChannel2CB); + addKeyHandler('3', &myChannel3CB); + addKeyHandler('4', &myChannel4CB); + addKeyHandler('5', &myChannel5CB); + addKeyHandler('6', &myChannel6CB); + addKeyHandler('7', &myChannel7CB); + addKeyHandler('8', &myChannel8CB); + + // Set the camera + camera = myRobot->getPTZ(); + + // Tell us whether we are connected to ACTS or not + if(myActs->isConnected()) + { + printf("\nConnected to ACTS.\n"); + } + else printf("\nNot connected to ACTS.\n"); + + // Tell us whether a camera is defined or not + if(camera != NULL) + { + printf("\nCamera defined.\n\n"); + myGroup->setCamera(camera); + } + else + { + printf("\nNo camera defined.\n"); + printf("The robot will not tilt its camera up or down until\n"); + printf("a camera has been defined in camera mode ('c' or 'C').\n\n"); + } +} + +// Deactivate the group +AREXPORT void ArModeActs::deactivate(void) +{ + if (!baseDeactivate()) + return; + + // Remove the key handlers + remKeyHandler(&myStopCB); + remKeyHandler(&myStartCB); + remKeyHandler(&myToggleAcquireCB); + remKeyHandler(&myChannel1CB); + remKeyHandler(&myChannel2CB); + remKeyHandler(&myChannel3CB); + remKeyHandler(&myChannel4CB); + remKeyHandler(&myChannel5CB); + remKeyHandler(&myChannel6CB); + remKeyHandler(&myChannel7CB); + remKeyHandler(&myChannel8CB); + + myGroup->deactivate(); +} + +// Display the available commands +AREXPORT void ArModeActs::help(void) +{ + ArLog::log(ArLog::Terse, + "ACTS mode will drive the robot in an attempt to follow a color blob.\n"); + + ArLog::log(ArLog::Terse, "%20s: Pick a channel", "1 - 8 "); + ArLog::log(ArLog::Terse, "%20s: toggle acquire mode", "'x' or 'X'"); + ArLog::log(ArLog::Terse, "%20s: start movement", "'z' or 'Z'"); + ArLog::log(ArLog::Terse, "%20s: stop movement", "space bar"); + ArLog::log(ArLog::Terse, ""); + +} + +// Display data about this mode +AREXPORT void ArModeActs::userTask(void) +{ + int myChannel; + + const char *acquire; + const char *move; + const char *blob; + + myChannel = myGroup->getChannel(); + if(myGroup->getAcquire()) acquire = "actively acquiring"; + else acquire = "passively acquiring"; + + if(myGroup->getMovement()) move = "movement on"; + else move = "movement off"; + + if(myGroup->getBlob()) blob = "blob in sight"; + else blob = "no blob in sight"; + + printf("\r Channel: %d %15s %25s %20s", myChannel, move, acquire, blob); +} + +// The channels +AREXPORT void ArModeActs::channel1(void) +{ + myGroup->setChannel(1); +} + +AREXPORT void ArModeActs::channel2(void) +{ + myGroup->setChannel(2); +} + +AREXPORT void ArModeActs::channel3(void) +{ + myGroup->setChannel(3); +} + +AREXPORT void ArModeActs::channel4(void) +{ + myGroup->setChannel(4); +} + +AREXPORT void ArModeActs::channel5(void) +{ + myGroup->setChannel(5); +} + +AREXPORT void ArModeActs::channel6(void) +{ + myGroup->setChannel(6); +} + +AREXPORT void ArModeActs::channel7(void) +{ + myGroup->setChannel(7); +} + +AREXPORT void ArModeActs::channel8(void) +{ + myGroup->setChannel(8); +} + +// Stop the robot from moving +AREXPORT void ArModeActs::stop(void) +{ + myGroup->stopMovement(); +} + +// Allow the robot to move +AREXPORT void ArModeActs::start(void) +{ + myGroup->startMovement(); +} + +// Toggle whether or not the robot is allowed +// to aquire anything +AREXPORT void ArModeActs::toggleAcquire() +{ + if(myGroup->getAcquire()) + myGroup->setAcquire(false); + else myGroup->setAcquire(true); + +} + +AREXPORT ArModeCommand::ArModeCommand(ArRobot *robot, const char *name, char key, char key2): + ArMode(robot, name, key, key2), + my0CB(this, &ArModeCommand::addChar, '0'), + my1CB(this, &ArModeCommand::addChar, '1'), + my2CB(this, &ArModeCommand::addChar, '2'), + my3CB(this, &ArModeCommand::addChar, '3'), + my4CB(this, &ArModeCommand::addChar, '4'), + my5CB(this, &ArModeCommand::addChar, '5'), + my6CB(this, &ArModeCommand::addChar, '6'), + my7CB(this, &ArModeCommand::addChar, '7'), + my8CB(this, &ArModeCommand::addChar, '8'), + my9CB(this, &ArModeCommand::addChar, '9'), + myMinusCB(this, &ArModeCommand::addChar, '-'), + myBackspaceCB(this, &ArModeCommand::addChar, ArKeyHandler::BACKSPACE), + mySpaceCB(this, &ArModeCommand::addChar, ArKeyHandler::SPACE), + myEnterCB(this, &ArModeCommand::finishParsing) + +{ + reset(false); +} + +AREXPORT ArModeCommand::~ArModeCommand() +{ + +} + +AREXPORT void ArModeCommand::activate(void) +{ + reset(false); + if (!baseActivate()) + return; + myRobot->stopStateReflection(); + takeKeys(); + reset(true); +} + +AREXPORT void ArModeCommand::deactivate(void) +{ + if (!baseDeactivate()) + return; + giveUpKeys(); +} + +AREXPORT void ArModeCommand::help(void) +{ + + ArLog::log(ArLog::Terse, "Command mode has three ways to send commands"); + ArLog::log(ArLog::Terse, "%-30s: Sends com()", ""); + ArLog::log(ArLog::Terse, "%-30s: Sends comInt(, )", " "); + ArLog::log(ArLog::Terse, "%-30s: Sends com2Bytes(, , )", " "); +} + +void ArModeCommand::addChar(int ch) +{ + if (ch < '0' && ch > '9' && ch != '-' && ch != ArKeyHandler::BACKSPACE && + ch != ArKeyHandler::SPACE) + { + ArLog::log(ArLog::Terse, "Something horribly wrong in command mode since number is < 0 || > 9 (it is the value %d)", ch); + return; + } + + size_t size = sizeof(myCommandString); + size_t len = strlen(myCommandString); + + if (ch == ArKeyHandler::BACKSPACE) + { + // don't overrun backwards + if (len < 1) + return; + myCommandString[len-1] = '\0'; + printf("\r> %s \r> %s", myCommandString, myCommandString); + return; + } + if (ch == ArKeyHandler::SPACE) + { + // if we're at the start or have a space or - just return + if (len < 1 || myCommandString[len-1] == ' ' || + myCommandString[len-1] == '-') + return; + myCommandString[len] = ' '; + myCommandString[len+1] = '\0'; + printf(" "); + return; + } + if (ch == '-') + { + // make sure it isn't the command trying to be negated or that its the start of the byte + if (len < 1 || myCommandString[len-1] != ' ') + return; + printf("%c", '-'); + myCommandString[len] = '-'; + myCommandString[len+1] = '\0'; + return; + } + if (len + 1 >= size) + { + printf("\n"); + ArLog::log(ArLog::Terse, "Command is too long, abandoning command"); + reset(); + return; + } + else + { + printf("%c", ch); + myCommandString[len] = ch; + myCommandString[len+1] = '\0'; + return; + } +} + +void ArModeCommand::finishParsing(void) +{ + + ArArgumentBuilder builder; + builder.addPlain(myCommandString); + int command; + int int1; + int int2; + + if (myCommandString[0] == '\0') + return; + + printf("\n"); + if (builder.getArgc() == 0) + { + ArLog::log(ArLog::Terse, "Syntax error, no arguments."); + } + if (builder.getArgc() == 1) + { + command = builder.getArgInt(0); + if (command < 0 || command > 255 || !builder.isArgInt(0)) + { + ArLog::log(ArLog::Terse, + "Invalid command, must be an integer between 0 and 255"); + reset(); + return; + } + else + { + ArLog::log(ArLog::Terse, "com(%d)", command); + myRobot->com(command); + reset(); + return; + } + } + else if (builder.getArgc() == 2) + { + command = builder.getArgInt(0); + int1 = builder.getArgInt(1); + if (command < 0 || command > 255 || !builder.isArgInt(0)) + { + ArLog::log(ArLog::Terse, + "Invalid command, must be an integer between 0 and 255"); + reset(); + return; + } + else if (int1 < -32767 || int1 > 32767 || !builder.isArgInt(1)) + { + ArLog::log(ArLog::Terse, + "Invalid integer, must be an integer between -32767 and 32767"); + reset(); + return; + } + else + { + ArLog::log(ArLog::Terse, "comInt(%d, %d)", command, + int1); + myRobot->comInt(command, int1); + reset(); + return; + } + } + else if (builder.getArgc() == 3) + { + command = builder.getArgInt(0); + int1 = builder.getArgInt(1); + int2 = builder.getArgInt(2); + if (command < 0 || command > 255 || !builder.isArgInt(0)) + { + ArLog::log(ArLog::Terse, + "Invalid command, must be between 0 and 255"); + reset(); + return; + } + else if (int1 < -128 || int1 > 255 || !builder.isArgInt(1)) + { + ArLog::log(ArLog::Terse, + "Invalid byte1, must be an integer between -128 and 127, or between 0 and 255"); + reset(); + return; + } + else if (int2 < -128 || int2 > 255 || !builder.isArgInt(2)) + { + ArLog::log(ArLog::Terse, + "Invalid byte2, must be an integer between -128 and 127, or between 0 and 255"); + reset(); + return; + } + else + { + ArLog::log(ArLog::Terse, + "com2Bytes(%d, %d, %d)", + command, int1, int2); + myRobot->com2Bytes(command, int1, int2); + reset(); + return; + } + } + else + { + ArLog::log(ArLog::Terse, "Syntax error, too many arguments"); + reset(); + return; + } +} + +void ArModeCommand::reset(bool print) +{ + myCommandString[0] = '\0'; + if (print) + { + ArLog::log(ArLog::Terse, ""); + printf("> "); + } +} + +void ArModeCommand::takeKeys(void) +{ + addKeyHandler('0', &my0CB); + addKeyHandler('1', &my1CB); + addKeyHandler('2', &my2CB); + addKeyHandler('3', &my3CB); + addKeyHandler('4', &my4CB); + addKeyHandler('5', &my5CB); + addKeyHandler('6', &my6CB); + addKeyHandler('7', &my7CB); + addKeyHandler('8', &my8CB); + addKeyHandler('9', &my9CB); + addKeyHandler('-', &myMinusCB); + addKeyHandler(ArKeyHandler::BACKSPACE, &myBackspaceCB); + addKeyHandler(ArKeyHandler::ENTER, &myEnterCB); + addKeyHandler(ArKeyHandler::SPACE, &mySpaceCB); +} + +void ArModeCommand::giveUpKeys(void) +{ + remKeyHandler(&my0CB); + remKeyHandler(&my1CB); + remKeyHandler(&my2CB); + remKeyHandler(&my3CB); + remKeyHandler(&my4CB); + remKeyHandler(&my5CB); + remKeyHandler(&my6CB); + remKeyHandler(&my7CB); + remKeyHandler(&my8CB); + remKeyHandler(&my9CB); + remKeyHandler(&myBackspaceCB); + remKeyHandler(&myMinusCB); + remKeyHandler(&myEnterCB); + remKeyHandler(&mySpaceCB); +} + +/** + @param robot ArRobot instance to be associate with + @param name name of this mode + @param key keyboard key that activates this mode + @param key2 another keyboard key that activates this mode + @param tcm2 if a tcm2 class is passed in it'll use that instance + otherwise it'll make its own ArTCMCompassRobot instance. +**/ + +AREXPORT ArModeTCM2::ArModeTCM2(ArRobot *robot, const char *name, char key, char key2, ArTCM2 *tcm2): + ArMode(robot, name, key, key2) +{ + if (tcm2 != NULL) + myTCM2 = tcm2; + else + myTCM2 = new ArTCMCompassRobot(robot); + + myOffCB = new ArFunctorC(myTCM2, &ArTCM2::commandOff); + myCompassCB = new ArFunctorC(myTCM2, &ArTCM2::commandJustCompass); + myOnePacketCB = new ArFunctorC(myTCM2, &ArTCM2::commandOnePacket); + myContinuousPacketsCB = new ArFunctorC( + myTCM2, &ArTCM2::commandContinuousPackets); + myUserCalibrationCB = new ArFunctorC( + myTCM2, &ArTCM2::commandUserCalibration); + myAutoCalibrationCB = new ArFunctorC( + myTCM2, &ArTCM2::commandAutoCalibration); + myStopCalibrationCB = new ArFunctorC( + myTCM2, &ArTCM2::commandStopCalibration); + myResetCB = new ArFunctorC( + myTCM2, &ArTCM2::commandSoftReset); + +} + +AREXPORT ArModeTCM2::~ArModeTCM2() +{ + +} + +AREXPORT void ArModeTCM2::activate(void) +{ + if (!baseActivate()) + return; + myTCM2->commandContinuousPackets(); + addKeyHandler('0', myOffCB); + addKeyHandler('1', myCompassCB); + addKeyHandler('2', myOnePacketCB); + addKeyHandler('3', myContinuousPacketsCB); + addKeyHandler('4', myUserCalibrationCB); + addKeyHandler('5', myAutoCalibrationCB); + addKeyHandler('6', myStopCalibrationCB); + addKeyHandler('7', myResetCB); +} + +AREXPORT void ArModeTCM2::deactivate(void) +{ + if (!baseDeactivate()) + return; + myTCM2->commandJustCompass(); + remKeyHandler(myOffCB); + remKeyHandler(myCompassCB); + remKeyHandler(myOnePacketCB); + remKeyHandler(myContinuousPacketsCB); + remKeyHandler(myUserCalibrationCB); + remKeyHandler(myAutoCalibrationCB); + remKeyHandler(myStopCalibrationCB); + remKeyHandler(myResetCB); +} + +AREXPORT void ArModeTCM2::help(void) +{ + ArLog::log(ArLog::Terse, + "TCM2 mode shows the data from the TCM2 compass and lets you send the TCM2 commands"); + ArLog::log(ArLog::Terse, "%20s: turn TCM2 off", "'0'"); + ArLog::log(ArLog::Terse, "%20s: just get compass readings", "'1'"); + ArLog::log(ArLog::Terse, "%20s: get a single set of TCM2 data", "'2'"); + ArLog::log(ArLog::Terse, "%20s: get continuous TCM2 data", "'3'"); + ArLog::log(ArLog::Terse, "%20s: start user calibration", "'4'"); + ArLog::log(ArLog::Terse, "%20s: start auto calibration", "'5'"); + ArLog::log(ArLog::Terse, "%20s: stop calibration and get a single set of data", "'6'"); + ArLog::log(ArLog::Terse, "%20s: soft reset of compass", "'7'"); + + printf("%6s %5s %5s %6s %6s %6s %6s %10s %4s %4s %6s %3s\n", + "comp", "pitch", "roll", "magX", "magY", "magZ", "temp", "error", + "calH", "calV", "calM", "cnt"); +} + +AREXPORT void ArModeTCM2::userTask(void) +{ + printf("\r%6.1f %5.1f %5.1f %6.2f %6.2f %6.2f %6.1f 0x%08x %4.0f %4.0f %6.2f %3d", + myTCM2->getCompass(), myTCM2->getPitch(), myTCM2->getRoll(), + myTCM2->getXMagnetic(), myTCM2->getYMagnetic(), + myTCM2->getZMagnetic(), + myTCM2->getTemperature(), myTCM2->getError(), + myTCM2->getCalibrationH(), myTCM2->getCalibrationV(), + myTCM2->getCalibrationM(), myTCM2->getPacCount()); + +} + +AREXPORT ArModeConfig::ArModeConfig(ArRobot *robot, const char *name, char key1, char key2) : + ArMode(robot, name, key1, key2), + myRobot(robot), + myConfigPacketReader(robot, false, &myGotConfigPacketCB), + myGotConfigPacketCB(this, &ArModeConfig::gotConfigPacket) +{ +} + +AREXPORT void ArModeConfig::help() +{ + ArLog::log(ArLog::Terse, "Robot Config mode requests a CONFIG packet from the robot and displays the result."); +} + +AREXPORT void ArModeConfig::activate() +{ + baseActivate(); // returns false on double activate, but we want to use this signal to request another config packet, so ignore. + if(!myConfigPacketReader.requestPacket()) + ArLog::log(ArLog::Terse, "ArModeConfig: Warning: config packet reader did not request (another) CONFIG packet."); +} + +AREXPORT void ArModeConfig::deactivate() +{ +} + +void ArModeConfig::gotConfigPacket() +{ + ArLog::log(ArLog::Terse, "\nRobot CONFIG packet received:"); + myConfigPacketReader.log(); + myConfigPacketReader.logMovement(); + ArLog::log(ArLog::Terse, "Additional robot information:"); + ArLog::log(ArLog::Terse, "HasStateOfCharge %d", myRobot->haveStateOfCharge()); + ArLog::log(ArLog::Terse, "StateOfChargeLow %f", myRobot->getStateOfChargeLow()); + ArLog::log(ArLog::Terse, "StateOfChargeShutdown %f", myRobot->getStateOfChargeShutdown()); + ArLog::log(ArLog::Terse, "HasFaultFlags %d", myRobot->hasFaultFlags()); + ArLog::log(ArLog::Terse, "HasTableIR %d", myRobot->hasTableSensingIR()); + ArLog::log(ArLog::Terse, "NumSonar (rec'd) %d", myRobot->getNumSonar()); + ArLog::log(ArLog::Terse, "HasTemperature (rec'd) %d", myRobot->hasTemperature()); + ArLog::log(ArLog::Terse, "HasSettableVelMaxes %d", myRobot->hasSettableVelMaxes()); + ArLog::log(ArLog::Terse, "HasSettableAccsDecs %d", myRobot->hasSettableAccsDecs()); + ArLog::log(ArLog::Terse, "HasLatVel %d", myRobot->hasLatVel()); + ArLog::log(ArLog::Terse, "HasMoveCommand %d", myRobot->getRobotParams()->hasMoveCommand()); + ArLog::log(ArLog::Terse, "Radius %f Width %f Length %f LengthFront %f LengthRear %f Diagonal %f", + myRobot->getRobotRadius(), + myRobot->getRobotWidth(), + myRobot->getRobotLength(), + myRobot->getRobotLengthFront(), + myRobot->getRobotLengthRear(), + myRobot->getRobotDiagonal() + ); +} + diff --git a/Legacy/Aria/src/ArModule.cpp b/Legacy/Aria/src/ArModule.cpp new file mode 100644 index 0000000..fbee9a0 --- /dev/null +++ b/Legacy/Aria/src/ArModule.cpp @@ -0,0 +1,38 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArModule.h" + + +AREXPORT ArModule::ArModule() : + myRobot(0) +{ +} + +AREXPORT ArModule::~ArModule() +{ +} diff --git a/Legacy/Aria/src/ArModuleLoader.cpp b/Legacy/Aria/src/ArModuleLoader.cpp new file mode 100644 index 0000000..8321142 --- /dev/null +++ b/Legacy/Aria/src/ArModuleLoader.cpp @@ -0,0 +1,252 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#ifdef WIN32 +#else +#include +#endif +#include "ArModuleLoader.h" +#include "ArModule.h" +#include "ArLog.h" + + +std::map ArModuleLoader::ourModMap; + + +#ifdef WIN32 + +#define RTLD_NOW 0 +#define RTLD_GLOBAL 0 + +HINSTANCE dlopen(const char *fileName, int flag) +{ + return(LoadLibrary(fileName)); +} + +int dlclose(HINSTANCE handle) +{ + FreeLibrary(handle); + return(0); +} + +void *dlsym(HINSTANCE handle, char *symbol) +{ + return (void*)(GetProcAddress(handle, symbol)); +} + +const char *dlerror(void) +{ + return(0); +} +#endif // WIN32 + + +/** + THIS ONLY LOADS one init on the module right now, if its called + again it'll load the same init over. I'll fix it later... read the + more verbose description in ArModule.h. + + Takes a string name of the module which is just the file name of + the module without the extension (.dll or .so). It will figure out + the correct extension based on wheter its a Linux or Windows + build. It will also uses the standard operating systems ability to + find the library. So the library must be located within the PATH + variable for Windows and the LD_LIBRARY_PATH for Linux. You can + also just give the absolute path to the library, or the relative + path from the directory the program was started in (ie + ./simpleMod). The ArModule will be passed the ArRobot reference + that load() takes. This is the ArRobot that the ArModule will use + for its processing. + + @param modName fileName of the module without the extension (.dll + or .so) + + @param robot ArRobot reference which the module is to use, this can + be NULL + + @param modArgument A void pointer argument to pass to the module, + if its a const value you'll need to cast it to a non-const value to + get it to work (for example if you were using a constant string). + This value defaults to NULL. + + @param quiet whether to print out a message if this fails or not, + defaults to false +**/ +AREXPORT ArModuleLoader::Status ArModuleLoader::load(const char *modName, + ArRobot *robot, + void *modArgument, + bool quiet) +{ + std::string name; + std::map::iterator iter; + DllRef handle; + bool (*func)(ArRobot*,void*); + bool ret; + + name=modName; +#ifdef WIN32 + if (strstr(modName, ".dll") == 0) + name+=".dll"; +#else + if (strstr(modName, ".so") == 0) + name+=".so"; +#endif + + iter=ourModMap.find(name); + if (iter != ourModMap.end()) + return(STATUS_ALREADY_LOADED); + + handle=dlopen(name.c_str(), RTLD_NOW | RTLD_GLOBAL); + + if (!handle || dlerror() != NULL) + { + if (!quiet) + ArLog::log(ArLog::Terse, "Failure to load module '%s': %s", + name.c_str(), dlerror()); + return(STATUS_FAILED_OPEN); + } + + func=(bool(*)(ArRobot*,void*))dlsym(handle, "ariaInitModule"); + if (!func || dlerror() != NULL) + { + if (!quiet) + ArLog::log(ArLog::Terse, "No module initializer for %s.", modName); + ourModMap.insert(std::map::value_type(name, + handle)); + return(STATUS_SUCCESS); + //dlclose(handle); + //return(STATUS_INVALID); + } + ret=(*func)(robot, modArgument); + + if (ret) + { + ourModMap.insert(std::map::value_type(name, + handle)); + return(STATUS_SUCCESS); + } + else + { + if (!quiet) + ArLog::log(ArLog::Terse, "Module '%s' failed its init sequence", + name.c_str()); + dlclose(handle); + return(STATUS_INIT_FAILED); + } +} + + +/** + reload() is similar to load(), except that it will call close() on the + module and then call load(). + @param modName fileName of the module without the extension (.dll or .so) + @param robot ArRobot instance to provide to the module + @param modArgument application-specific data to provide to the module + @param quiet If true, do not log errors. +*/ +AREXPORT ArModuleLoader::Status ArModuleLoader::reload(const char *modName, + ArRobot *robot, + void *modArgument, + bool quiet) +{ + close(modName, quiet); + return(load(modName, robot, modArgument, quiet)); +} + +/** + Calls ArModule::exit() on the module, then closes the library. + @param modName fileName of the module without the extension (.dll or .so) + @param quiet whether to print out a message if this fails or not, + defaults to false +*/ +AREXPORT ArModuleLoader::Status ArModuleLoader::close(const char *modName, + bool quiet) +{ + std::string name; + std::map::iterator iter; + bool (*func)(); + bool funcRet; + DllRef handle; + Status ret=STATUS_SUCCESS; + + name=modName; +#ifdef WIN32 + if (strstr(modName, ".dll") == 0) + name+=".dll"; +#else + if (strstr(modName, ".so") == 0) + name+=".so"; +#endif + + iter=ourModMap.find(name.c_str()); + if (iter == ourModMap.end()) + { + ArLog::log(ArLog::Terse, "Module '%s' could not be found to be closed.", + modName); + return(STATUS_NOT_FOUND); + } + else + { + handle=(*iter).second; + func=(bool(*)())dlsym(handle, "ariaExitModule"); + if (!func) + { + if (!quiet) + ArLog::log(ArLog::Verbose, + "Failure to find module exit function for '%s'", (*iter).first.c_str()); + //ArLog::log(ArLog::Terse, "Failure to find module exit function: '%s'", + //dlerror()); + //ret=STATUS_INVALID; + ourModMap.erase(name); + return STATUS_SUCCESS; + } + funcRet=(*func)(); + if (funcRet) + ret=STATUS_SUCCESS; + else + { + if (!quiet) + ArLog::log(ArLog::Terse, "Module '%s' failed its exit sequence", + modName); + ret=STATUS_INIT_FAILED; + } + dlclose(handle); + ourModMap.erase(name); + } + + return(ret); +} + +AREXPORT void ArModuleLoader::closeAll() +{ + std::map::iterator iter; + + while ((iter = ourModMap.begin()) != ourModMap.end()) + close((*iter).first.c_str()); + //for (iter=ourModMap.begin(); iter != ourModMap.end(); iter=ourModMap.begin()) + +} diff --git a/Legacy/Aria/src/ArMutex.cpp b/Legacy/Aria/src/ArMutex.cpp new file mode 100644 index 0000000..67f425b --- /dev/null +++ b/Legacy/Aria/src/ArMutex.cpp @@ -0,0 +1,117 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ArMutex.h" +#include "ariaOSDef.h" +#include "ariaUtil.h" +#include "ArThread.h" +#include +#include + + +unsigned int ArMutex::ourLockWarningMS = 0; +unsigned int ArMutex::ourUnlockWarningMS = 0; +ArFunctor *ArMutex::ourNonRecursiveDeadlockFunctor = NULL; + + +AREXPORT void ArMutex::setLogNameVar(const char *logName, ...) +{ + char arg[2048]; + va_list ptr; + va_start(ptr, logName); + vsnprintf(arg, sizeof(arg), logName, ptr); + arg[sizeof(arg) - 1] = '\0'; + va_end(ptr); + return setLogName(arg); +} + +void ArMutex::initLockTiming() +{ + myFirstLock = true; + myLockTime = new ArTime; + myLockStarted = new ArTime; +} + +void ArMutex::uninitLockTiming() +{ + delete myLockTime; + myLockTime = 0; + delete myLockStarted; + myLockStarted = 0; +} + + +void ArMutex::startLockTimer() +{ + if(ourLockWarningMS > 0) + myLockStarted->setToNow(); +} + +void ArMutex::checkLockTime() +{ + //printf("ourLockWarningMS=%d, myLockStarted->mSecSince=%d\n", ourLockWarningMS, myLockStarted->mSecSince()); + if (ourLockWarningMS > 0 && myLockStarted && + myLockStarted->mSecSince() >= ourLockWarningMS) + ArLog::logNoLock( + ArLog::Normal, + "LockWarning: locking '%s' from thread '%s' %d pid %d took %.3f sec", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), +#ifdef WIN32 + 0, +#else + getpid(), +#endif + myLockStarted->mSecSince() / 1000.0); + +} + +void ArMutex::startUnlockTimer() +{ + if (ourUnlockWarningMS > 0) + { + myLockTime->setToNow(); + myFirstLock = false; + } +} + +void ArMutex::checkUnlockTime() { + //printf("checking unlock time: warningms=%d, myFirstLock=%d, msecSince=%d\n", ourUnlockWarningMS, myFirstLock, myLockTime->mSecSince()); + if (ourUnlockWarningMS > 0 && !myFirstLock && myLockTime && + myLockTime->mSecSince() >= ourUnlockWarningMS) + ArLog::logNoLock(ArLog::Normal, + "LockWarning: unlocking '%s' from thread ('%s' %d pid %d) was locked for %.3f sec", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), +#ifdef WIN32 + 0, +#else + getpid(), +#endif + myLockTime->mSecSince() / 1000.0); +} diff --git a/Legacy/Aria/src/ArMutex_LIN.cpp b/Legacy/Aria/src/ArMutex_LIN.cpp new file mode 100644 index 0000000..b3f4a77 --- /dev/null +++ b/Legacy/Aria/src/ArMutex_LIN.cpp @@ -0,0 +1,336 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/* Need to define this to get pthread_mutexattr_settype when using GCC 2.96 */ +#define _XOPEN_SOURCE 500 + +#include "ArExport.h" +#include +#include "ariaOSDef.h" +#include "ArMutex.h" +#include "ArLog.h" +#include "ArThread.h" +#include "ariaUtil.h" +#include "ariaInternal.h" +#include "ArFunctor.h" + +#include +#include // for getpid() + + + +/** + +**/ +ArMutex::ArMutex(bool recursive) : + myFailedInit(false), + myMutex() +{ + myLog = false; + initLockTiming(); + + + pthread_mutexattr_t attr; + + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + + if (pthread_mutex_init(&myMutex, &attr) != 0) + { + myFailedInit=true; + ArLog::logNoLock(ArLog::Terse, "ArMutex::ArMutex: Failed to initialize mutex"); + } + // MPL took this out when I made it recursive since otherwise we'd + //get warnings on the unlock + //else + //unlock(); + + pthread_mutexattr_destroy(&attr); + + myNonRecursive = !recursive; + myWasAlreadyLocked = false; + + myStrMap[STATUS_FAILED_INIT]="Failed to initialize"; + myStrMap[STATUS_FAILED]="General failure"; + myStrMap[STATUS_ALREADY_LOCKED]="Mutex already locked"; + + //myStrMap.insert(std::pair(STATUS_FAILED_INIT, "Failed to initialize")); + //myStrMap.insert(std::pair(STATUS_FAILED, "General failure")); + //myStrMap.insert(std::pair(STATUS_ALREADY_LOCKED, "Mutex already locked")); +} + +ArMutex::~ArMutex() +{ + int ret; + if (!myFailedInit && (ret = pthread_mutex_destroy(&myMutex)) != 0) + { + if (ret == EBUSY) + ArLog::logNoLock(ArLog::Verbose, + "ArMutex::~ArMutex: Failed to destroy mutex %s. A thread is currently blocked waiting for this mutex.", + myLogName.c_str()); + else + ArLog::logNoLock(ArLog::Terse, + "ArMutex::~ArMutex: Failed to destroy mutex %s. Unknown error.", + myLogName.c_str()); + } + uninitLockTiming(); +} + +ArMutex::ArMutex(const ArMutex &mutex) +{ + myLog = mutex.myLog; + if (pthread_mutex_init(&myMutex, 0) != 0) + { + myFailedInit=true; + ArLog::logNoLock(ArLog::Terse, "ArMutex::ArMutex: Failed to initialize mutex"); + } + else + unlock(); + + myLogName = mutex.myLogName; + initLockTiming(); + myStrMap[STATUS_FAILED_INIT]="Failed to initialize"; + myStrMap[STATUS_FAILED]="General failure"; + myStrMap[STATUS_ALREADY_LOCKED]="Mutex already locked"; +} + + + +/** + Lock the mutex. This function will block until no other thread has this + mutex locked. If it returns 0, then it obtained the lock and the thread + is free to use the critical section that this mutex protects. Else it + returns an error code. See getError(). +*/ +int ArMutex::lock() +{ + if(ourLockWarningMS > 0) startLockTimer(); + + if (myLog) + ArLog::logNoLock(ArLog::Terse, "Locking '%s' from thread '%s' %d pid %d", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + + if (myFailedInit) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Initialization of mutex '%s' from thread ('%s' %d pid %d) failed, failed lock", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Initialization of mutex failed, failed lock"); + return(STATUS_FAILED_INIT); + } + + int ret; + if ((ret = pthread_mutex_lock(&myMutex)) != 0) + { + if (ret == EDEADLK) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Trying to lock mutex '%s' from thread ('%s' %d pid %d) which is already locked by this thread", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_ALREADY_LOCKED); + } + else + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Failed to lock mutex ('%s') from thread ('%s' %d pid %d) due to an unknown error", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_FAILED); + } + } + + if (myNonRecursive) + { + if (myWasAlreadyLocked) + { + + if (ourNonRecursiveDeadlockFunctor != NULL) + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, from thread '%s' %d pid %d, invoking functor '%s'", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid(), + ourNonRecursiveDeadlockFunctor->getName()); + ArLog::logBacktrace(ArLog::Normal); + ourNonRecursiveDeadlockFunctor->invoke(); + exit(255); + } + else + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, from thread '%s' %d pid %d, calling Aria::shutdown", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + ArLog::logBacktrace(ArLog::Normal); + Aria::shutdown(); + exit(255); + } + + } + myWasAlreadyLocked = true; + } + + if(ourLockWarningMS > 0) checkLockTime(); + if(ourUnlockWarningMS > 0) startUnlockTimer(); + + + return(0); +} + +/** + Try to lock the mutex. This function will not block if another thread has + the mutex locked. It will return instantly if that is the case. It will + return STATUS_ALREADY_LOCKED if another thread has the mutex locked. If it + obtains the lock, it will return 0. +*/ +int ArMutex::tryLock() +{ + if (myFailedInit) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::trylock: Initialization of mutex '%s' from thread ('%s' %d pid %d) failed, failed trylock", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_FAILED_INIT); + } + + if (myLog) + ArLog::logNoLock(ArLog::Terse, "Try locking %s from thread %s %d pid %d", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + + int ret; + if ((ret = pthread_mutex_trylock(&myMutex)) != 0) + { + if (ret == EBUSY) + { + if(myLog) + ArLog::logNoLock(ArLog::Terse, "ArMutex::tryLock: Mutex %s is already locked", myLogName.c_str()); + return(STATUS_ALREADY_LOCKED); + } + else + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::trylock: Failed to trylock a mutex ('%s') from thread ('%s' %d pid %d) due to an unknown error", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_FAILED); + } + } + + if (myNonRecursive) + { + if (myWasAlreadyLocked) + { + + if (ourNonRecursiveDeadlockFunctor != NULL) + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, from thread '%s' %d pid %d, invoking functor '%s'", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid(), + ourNonRecursiveDeadlockFunctor->getName()); + ArLog::logBacktrace(ArLog::Normal); + ourNonRecursiveDeadlockFunctor->invoke(); + exit(255); + } + else + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, from thread '%s' %d pid %d, calling Aria::shutdown", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + ArLog::logBacktrace(ArLog::Normal); + Aria::shutdown(); + exit(255); + } + + } + myWasAlreadyLocked = true; + } + + if (myLog) + ArLog::logNoLock(ArLog::Terse, + "Try locked '%s' from thread '%s' %d pid %d", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + + return(0); +} + +int ArMutex::unlock() +{ + if (myLog) + ArLog::logNoLock(ArLog::Terse, + "Unlocking '%s' from thread '%s' %d pid %d", + myLogName.c_str(), + ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + + if(ourUnlockWarningMS > 0) checkUnlockTime(); + + if (myFailedInit) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::unlock: Initialization of mutex '%s' from thread '%s' %d pid %d failed, failed unlock", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_FAILED_INIT); + } + + int ret; + if ((ret = pthread_mutex_unlock(&myMutex)) != 0) + { + if (ret == EPERM) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::unlock: Trying to unlock a mutex ('%s') which this thread ('%s' %d pid %d) does not own", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_ALREADY_LOCKED); + } + else + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::unlock: Failed to unlock mutex ('%s') from thread ('%s' %d pid %d) due to an unknown error", + myLogName.c_str(), ArThread::getThisThreadName(), + ArThread::getThisThread(), getpid()); + return(STATUS_FAILED); + } + } + if (myNonRecursive) + myWasAlreadyLocked = false; + return(0); +} + +AREXPORT const char *ArMutex::getError(int messageNumber) const +{ + ArStrMap::const_iterator it; + if ((it = myStrMap.find(messageNumber)) != myStrMap.end()) + return (*it).second.c_str(); + else + return NULL; +} diff --git a/Legacy/Aria/src/ArMutex_WIN.cpp b/Legacy/Aria/src/ArMutex_WIN.cpp new file mode 100644 index 0000000..a5dc3e8 --- /dev/null +++ b/Legacy/Aria/src/ArMutex_WIN.cpp @@ -0,0 +1,272 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArMutex.h" +#include "ArLog.h" +#include "ArFunctor.h" +#include "ArThread.h" +#include "ariaInternal.h" +#include "ArThread.h" + +//#include // for getpid() + +ArMutex::ArMutex(bool recursive) : + myFailedInit(false), + myMutex(), + // KMC TESTING myStrMap(), + myLog(false), + myLogName(""), + myNonRecursive(!recursive), + myWasAlreadyLocked(false), + myFirstLock(true), + myLockTime(NULL), + myLockStarted(NULL) +{ + myMutex=CreateMutex(0, true, 0); + if (!myMutex) + { + myFailedInit=true; + ArLog::logNoLock(ArLog::Terse, "ArMutex::ArMutex: Failed to initialize mutex %s", myLogName.c_str()); + } + else + unlock(); + + /** KMC TESTING + myStrMap[STATUS_FAILED_INIT]="Failed to initialize"; + myStrMap[STATUS_FAILED]="General failure"; + myStrMap[STATUS_ALREADY_LOCKED]="Mutex already locked"; + ***/ + + initLockTiming(); +} + +AREXPORT ArMutex::ArMutex(const ArMutex &mutex) : + myFailedInit(false), + myMutex(), + // KMC TESTING myStrMap(), + myLog(mutex.myLog), + myLogName(mutex.myLogName), + myNonRecursive(mutex.myNonRecursive), + myWasAlreadyLocked(false), + myFirstLock(true), + myLockTime(NULL), + myLockStarted(NULL) +{ + myMutex = CreateMutex(0, true, 0); + if(!myMutex) + { + myFailedInit=true; + ArLog::logNoLock(ArLog::Terse, "ArMutex::ArMutex: Failed to initialize mutex in copy of %s", myLogName.c_str()); + } + else + unlock(); + + /*** KMC TESTING + myStrMap[STATUS_FAILED_INIT]="Failed to initialize"; + myStrMap[STATUS_FAILED]="General failure"; + myStrMap[STATUS_ALREADY_LOCKED]="Mutex already locked"; + ***/ + + initLockTiming(); +} + +ArMutex::~ArMutex() +{ + if (!myFailedInit && !CloseHandle(myMutex)) + ArLog::logNoLock(ArLog::Terse, "ArMutex::~ArMutex: Failed to destroy mutex."); + + uninitLockTiming(); +} + +int ArMutex::lock() +{ + DWORD ret; + + if (myLog) + ArLog::log(ArLog::Terse, "Locking %s", myLogName.c_str()); + if (myFailedInit) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Initialization of mutex %s failed, failed lock", myLogName.c_str()); + return(STATUS_FAILED_INIT); + } + + if(ourLockWarningMS > 0) startLockTimer(); + ret=WaitForSingleObject(myMutex, INFINITE); + if (ret == WAIT_ABANDONED) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Tried to lock a mutex %s which was locked by a different thread and never unlocked before that thread exited. This is a recoverable error", myLogName.c_str()); + return(lock()); + } + else if (ret == WAIT_OBJECT_0) + { + // locked + if(ourLockWarningMS > 0) checkLockTime(); + if(ourUnlockWarningMS > 0) startUnlockTimer(); + return(0); + } + else + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Failed to lock %s due to an unknown error", myLogName.c_str()); + return(STATUS_FAILED); + } + + if (myNonRecursive) + { + if (myWasAlreadyLocked) + { + + if (ourNonRecursiveDeadlockFunctor != NULL) + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, thread '%s' %d, invoking functor '%s'", + myLogName.c_str(), + ArThread::getThisThreadName(), ArThread::getThisThread(), + ourNonRecursiveDeadlockFunctor->getName()); + ourNonRecursiveDeadlockFunctor->invoke(); + exit(255); + } + else + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, from thread '%s' %d, calling Aria::shutdown", + myLogName.c_str(), + ArThread::getThisThreadName(), ArThread::getThisThread()); + Aria::shutdown(); + exit(255); + } + + } + myWasAlreadyLocked = true; + } + + if(ourLockWarningMS > 0) checkLockTime(); + if(ourUnlockWarningMS > 0) startUnlockTimer(); + + return(0); +} + +int ArMutex::tryLock() +{ + DWORD ret; + + if (myFailedInit) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Initialization of mutex %s failed, failed lock", myLogName.c_str()); + return(STATUS_FAILED_INIT); + } + + // Attempt to wait as little as posesible + ret=WaitForSingleObject(myMutex, 1); + if (ret == WAIT_ABANDONED) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Tried to lock mutex %s nwhich was locked by a different thread and never unlocked before that thread exited. This is a recoverable error", myLogName.c_str()); + return(lock()); + } + else if (ret == WAIT_TIMEOUT) + { + // we really don't need to log when the reason for this call at all happens + //ArLog::logNoLock(ArLog::Terse, "ArMutex::tryLock: Could not lock mutex %s because it is already locked", myLogName.c_str()); + return(STATUS_ALREADY_LOCKED); + } + else if (ret == WAIT_OBJECT_0) + return(0); + else + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::lock: Failed to lock %s due to an unknown error", myLogName.c_str()); + return(STATUS_FAILED); + } + + + if (myNonRecursive) + { + if (myWasAlreadyLocked) + { + + if (ourNonRecursiveDeadlockFunctor != NULL) + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, thread '%s' %d, invoking functor '%s'", + myLogName.c_str(), + ArThread::getThisThreadName(), ArThread::getThisThread(), + ourNonRecursiveDeadlockFunctor->getName()); + ourNonRecursiveDeadlockFunctor->invoke(); + exit(255); + } + else + { + ArLog::logNoLock(ArLog::Terse, + "ArMutex: '%s' tried to lock recursively even though it is nonrecursive, from thread '%s' %d, calling Aria::shutdown", + myLogName.c_str(), + ArThread::getThisThreadName(), ArThread::getThisThread()); + Aria::shutdown(); + exit(255); + } + + } + myWasAlreadyLocked = true; + } + + + return(0); +} + +int ArMutex::unlock() +{ + if (myLog) + ArLog::log(ArLog::Terse, "Unlocking %s", myLogName.c_str()); + if (myFailedInit) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::unlock: Initialization of mutex %s failed, failed unlock", myLogName.c_str()); + return(STATUS_FAILED_INIT); + } + + if(ourUnlockWarningMS > 0) checkUnlockTime(); + + if (!ReleaseMutex(myMutex)) + { + ArLog::logNoLock(ArLog::Terse, "ArMutex::unlock: Failed to unlock %s due to an unknown error", myLogName.c_str()); + return(STATUS_FAILED); + } + if (myNonRecursive) + myWasAlreadyLocked = false; + return(0); +} + +AREXPORT const char * ArMutex::getError(int messageNumber) const +{ + switch (messageNumber) { + case STATUS_FAILED_INIT: + return "Failed to initialize"; + case STATUS_FAILED: + return "General failure"; + case STATUS_ALREADY_LOCKED: + return "Mutex already locked"; + default: + return NULL; + } + +} diff --git a/Legacy/Aria/src/ArNMEAParser.cpp b/Legacy/Aria/src/ArNMEAParser.cpp new file mode 100644 index 0000000..2a33bb2 --- /dev/null +++ b/Legacy/Aria/src/ArNMEAParser.cpp @@ -0,0 +1,284 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArNMEAParser.h" + +#include + + +//#define DEBUG_ARNMEAPARSER 1 + +#ifdef DEBUG_ARNMEAPARSER +void ArNMEAParser_printBuf(FILE *fp, const char *data, int size){ for(int i = 0; i < size; ++i) { if(data[i] < ' ' || data[i] > '~') { fprintf(fp, "[0x%X]", data[i] & 0xff); } else { fputc(data[i], fp); } }} +#endif + +AREXPORT ArNMEAParser::ArNMEAParser(const char *name) : + myName(name), + MaxNumFields(50), + MaxFieldSize(128), + ignoreChecksum(false), + checksumBufOffset(0), + inChecksum(false), + inMessage(false), + currentChecksum(0), + gotCR(false) +{ + memset(checksumBuf, 0, 3); +} + +AREXPORT void ArNMEAParser::addHandler(const char *message, ArNMEAParser::Handler *handler) +{ + myHandlers[message] = handler; +} + +AREXPORT void ArNMEAParser::removeHandler(const char *message) +{ + HandlerMap::iterator i = myHandlers.find(message); + if(i != myHandlers.end()) myHandlers.erase(i); +} + + +void ArNMEAParser::nextField() +{ + currentMessage.push_back(currentField); + currentField = ""; + if (currentMessage.size() > MaxNumFields) + endMessage(); +} + +void ArNMEAParser::endMessage() +{ + inMessage = false; + inChecksum = false; + currentField = ""; + gotCR = false; + currentMessage.clear(); +} + +void ArNMEAParser::beginChecksum() +{ + checksumBufOffset = 0; + inChecksum = true; +} + +void ArNMEAParser::beginMessage() +{ + currentMessageStarted.setToNow(); + currentMessage.clear(); + inChecksum = false; + inMessage = true; + currentField = ""; + gotCR = false; + currentChecksum = 0; + memset(checksumBuf, 0, sizeof(checksumBuf)); +} + + +AREXPORT int ArNMEAParser::parse(ArDeviceConnection *dev) +{ + int n = dev->read(myReadBuffer, sizeof(myReadBuffer)); +#ifdef DEBUG_ARNMEAPARSER + std::cerr << "\t[ArNMEAParser: read " << n << " bytes of data from device connection:\n\t"; + ArNMEAParser_printBuf(stderr, myReadBuffer, n); +#endif + if(n < 0) return ParseError; + if(n == 0) return ParseFinished; + return parse(myReadBuffer, n); +} + +AREXPORT int ArNMEAParser::parse(const char *buf, int n) +{ + int result = 0; + if (n < 0) + { + return result|ParseError; + } + + if (n == 0) + { + return result|ParseFinished; + } + +#ifdef DEBUG_ARNMEAPARSER + std::cerr << "\t[ArNMEAParser: given " << n << " bytes of data.]\n"; + std::cerr << "\t[ArNMEAParser: parsing chunk \""; + ArNMEAParser_printBuf(stderr, buf, n); + std::cerr << "\"]\n"; +#endif + + + for (int i = 0; i < n; i++) + { + // Check for message start + if (buf[i] == '$') + { + beginMessage(); + continue; + } + + // Otherwise, we must be in a sentece to do anything + if (!inMessage) + continue; + + // Reached the CR at the end? + if (buf[i] == '\r') + { + gotCR = true; + continue; + } + + // Reached the Newline at the end? + if (buf[i] == '\n') + { + if (gotCR) + { + // Got both CR and LF?-- then end of message + + if(!inChecksum) + { + // checksum should have preceded. + ArLog::log(ArLog::Terse, "ArNMEAParser: Missing checksum."); + result |= ParseError; + endMessage(); + continue; + } + + // got CRLF but there was no data. Ignore. + if(currentMessage.size() == 0) + { + endMessage(); + continue; + } + + + // ok: + Message msg; + msg.message = ¤tMessage; + msg.timeParseStarted = currentMessageStarted; + HandlerMap::iterator h = myHandlers.find(currentMessage[0]); + if (h != myHandlers.end()) + { +#ifdef DEBUG_ARNMEAPARSER + fprintf(stderr, "\t[ArNMEAParser: Got complete message, calling handler for %s...]\n", currentMessage[0].c_str()); +#endif + if(h->second) + { + h->second->invoke(msg); + result |= ParseUpdated; + } + else + { + ArLog::log(ArLog::Terse, "ArNMEAParser Internal Error: NULL handler functor for message %s!\n", currentMessage[0].c_str()); + } + } +#ifdef DEBUG_ARNMEAPARSER + else + { + fprintf(stderr, "\t[ArNMEAParser: Have no message handler for %s.]\n", currentMessage[0].c_str()); + } +#endif + } + else + { + ArLog::log(ArLog::Normal, "ArNMEAParser: syntax error, \\n without \\r."); + result |= ParseError; + } + + endMessage(); + continue; + } + + // Are we in the final checksum field? + if (inChecksum) + { + checksumBuf[checksumBufOffset++] = buf[i]; + if (checksumBufOffset > 1) // two bytes of checksum + { + int checksumRec = (int) strtol(checksumBuf, NULL, 16); + if (checksumRec != currentChecksum) + { + ArLog::log(ArLog::Normal, "%s: Warning: Skipping message with incorrect checksum.", myName); + + // reconstruct message to log: + std::string nmeaText = ""; + for(MessageVector::const_iterator i = currentMessage.begin(); i != currentMessage.end(); ++i) + { + if(i != currentMessage.begin()) nmeaText += ","; + nmeaText += *i; + } + ArLog::log(ArLog::Normal, "%s: Message provided checksum \"%s\" = 0x%x (%d). Calculated checksum is 0x%x (%d). NMEA message contents were: \"%s\"", myName, checksumBuf, checksumRec, checksumRec, currentChecksum, currentChecksum, nmeaText.c_str()); + + // abort the message and start looking for the next one. + result |= ParseError; + endMessage(); + } + } + continue; + } + + + // Got to the checksum? + if (buf[i] == '*') + { + nextField(); + if (!ignoreChecksum) + beginChecksum(); + continue; + } + + // Every byte in a message between $ and * XORs to form the + // checksum: + currentChecksum ^= buf[i]; + + // Time to start a new field? + if (buf[i] == ',') + { + nextField(); + continue; + } + + + // Else, we must be in the middle of a field + // TODO we could use strchr to look ahead in the buf + // for the end of the field (',' or '*') or end of the buf, and copy more + // than one byte at a time. + currentField += buf[i]; + if (currentField.size() > MaxFieldSize) + { + endMessage(); + continue; + } + } + + return result; +} + + + diff --git a/Legacy/Aria/src/ArNetServer.cpp b/Legacy/Aria/src/ArNetServer.cpp new file mode 100644 index 0000000..1b1dee4 --- /dev/null +++ b/Legacy/Aria/src/ArNetServer.cpp @@ -0,0 +1,720 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArNetServer.h" +#include "ArRobot.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include "ArSyncTask.h" +#include "ArArgumentBuilder.h" +#include "ariaInternal.h" + + +ArNetServer::ArNetServer(bool addAriaExitCB, bool doNotAddShutdownServer) : + myTaskCB(this, &ArNetServer::runOnce), + myHelpCB(this, &ArNetServer::internalHelp), + myEchoCB(this, &ArNetServer::internalEcho), + myQuitCB(this, &ArNetServer::internalQuit), + myShutdownServerCB(this, &ArNetServer::internalShutdownServer), + myAriaExitCB(this, &ArNetServer::close) +{ + myMutex.setLogName("ArNetServer::myMutex"); + myRobot = NULL; + myPort = 0; + myMultipleClients = false; + myOpened = false; + myWantToClose = false; + myLoggingDataSent = false; + myLoggingDataReceived = false; + mySquelchNormal = false; + addCommand("help", &myHelpCB, "gives the listing of available commands"); + addCommand("echo", &myEchoCB, "with no args gets echo, with args sets echo"); + addCommand("quit", &myQuitCB, "closes this connection to the server"); + // MPL 2013_06_10 letting folks take out shutdownServer since it + // can do no good and much ill + if (!doNotAddShutdownServer) + addCommand("shutdownServer", &myShutdownServerCB, "shuts down the server"); + + myNextCycleSendsMutex.setLogName("ArNetServer::myNextCycleSendsMutex"); + + myAriaExitCB.setName("ArNetServerExit"); + if (addAriaExitCB) + Aria::addExitCallback(&myAriaExitCB, 40); +} + +ArNetServer::~ArNetServer() +{ + ArSyncTask *rootTask = NULL; + ArSyncTask *proc = NULL; + // get rid of us running on the robot task + if (myRobot != NULL && (rootTask = myRobot->getSyncTaskRoot()) != NULL) + { + proc = rootTask->findNonRecursive(&myTaskCB); + if (proc != NULL) + delete proc; + } + close(); +} + +/** + Open the server, if you supply a robot this will run in the robots + attached, if you do not supply a robot then it will be open and + you'll have to call runOnce yourself (this is only recommended for + advanced users) + + @param robot the robot that this should be attached to and run in + the sync task of or NULL not to run in any robot's task + + @param port the port to start up the service on + + @param password the password needed to use the service + + @param multipleClients if false only one client is allowed to connect, + if false multiple clients are allowed to connect or just one + + @param openOnIP If not NULL, restrict server port to the network interface + with this IP address. If NULL, accept connections from any network interface. + + @return true if the server could be started, false otherwise +**/ +AREXPORT bool ArNetServer::open(ArRobot *robot, unsigned int port, + const char *password, bool multipleClients, + const char *openOnIP) +{ + ArSyncTask *rootTask = NULL; + ArSyncTask *proc = NULL; + std::string taskName; + + if (myOpened) + { + ArLog::log(ArLog::Terse, "ArNetServer already inited, cannot reinit"); + return false; + } + + myRobot = robot; + myPort = port; + myPassword = password; + myMultipleClients = multipleClients; + + if (myServerSocket.open(myPort, ArSocket::TCP, openOnIP)) + { + // this can be taken out since the open does this now + //myServerSocket.setLinger(0); + myServerSocket.setNonBlock(); + if (openOnIP != NULL) + ArLog::log(ArLog::Normal, "ArNetServer opened on port %d on ip %s.", + myPort, openOnIP); + else + ArLog::log(ArLog::Normal, "ArNetServer opened on port %d.", myPort); + myOpened = true; + } + else + { + ArLog::log(ArLog::Terse, "ArNetServer failed to open: %s", + myServerSocket.getErrorStr().c_str()); + myOpened = false; + return false; + } + + // add ourselves to the robot if we aren't already there + if (myRobot != NULL && (rootTask = myRobot->getSyncTaskRoot()) != NULL) + { + proc = rootTask->findNonRecursive(&myTaskCB); + if (proc == NULL) + { + // toss in a netserver (it used to say the port name, but did it wrong so put in gibberish) + taskName = "TextServer"; + rootTask->addNewLeaf(taskName.c_str(), 60, &myTaskCB, NULL); + } + } + return true; + +} + +/** + This adds a command to the list, when the command is given the + broken up argv and argc are given along with the socket it came + from (so that acks can occur) +**/ +AREXPORT bool ArNetServer::addCommand(const char *command, + ArFunctor3 *functor, + const char *help) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + + if ((it = myFunctorMap.find(command)) != myFunctorMap.end()) + { + ArLog::log(ArLog::Normal, "ArNetServer::addCommand: Already a command for %s", command); + return false; + } + + myFunctorMap[command] = functor; + myHelpMap[command] = help; + return true; +} + +/** + @param command the command to remove + @return true if the command was there to remove, false otherwise +**/ +AREXPORT bool ArNetServer::remCommand(const char *command) +{ + if (myFunctorMap.find(command) == myFunctorMap.end()) + { + return false; + } + myFunctorMap.erase(command); + myHelpMap.erase(command); + return true; +} + + +AREXPORT void ArNetServer::sendToAllClientsPlain(const char *str) +{ + std::list::iterator it; + + if (myLoggingDataSent) + ArLog::log(ArLog::Terse, "ArNetServer::sendToAllClients: Sending %s", str); + + for (it = myConns.begin(); it != myConns.end(); ++it) + { + (*it)->setLogWriteStrings(false); + (*it)->writeString(str); + (*it)->setLogWriteStrings(myLoggingDataSent); + } +} + + +/** + This sends the given string to all the clients, this string cannot + be more than 2048 number of bytes +**/ +AREXPORT void ArNetServer::sendToAllClients(const char *str, ...) +{ + char buf[40000]; + va_list ptr; + va_start(ptr, str); + vsprintf(buf, str, ptr); + + sendToAllClientsPlain(buf); + + va_end(ptr); +} + + + +AREXPORT void ArNetServer::sendToAllClientsNextCyclePlain(const char *str) +{ + std::list::iterator it; + + if (myLoggingDataSent) + ArLog::log(ArLog::Terse, "ArNetServer::sendToAllClientsNextCycle: Next cycle will send: %s", str); + + myNextCycleSendsMutex.lock(); + myNextCycleSends.push_back(str); + myNextCycleSendsMutex.unlock(); +} + + +/** + This sends the given string to all the clients, this string cannot + be more than 2048 number of bytes +**/ +AREXPORT void ArNetServer::sendToAllClientsNextCycle(const char *str, ...) +{ + char buf[40000]; + va_list ptr; + va_start(ptr, str); + vsprintf(buf, str, ptr); + + sendToAllClientsNextCyclePlain(buf); + + va_end(ptr); +} + + +AREXPORT bool ArNetServer::isOpen(void) +{ + return myOpened; +} + + +/** + @param loggingData if true data will be logged which means that all + data sent out to the all the clients will be logged +**/ +AREXPORT void ArNetServer::setLoggingDataSent(bool loggingData) +{ + myLoggingDataSent = loggingData; + std::list::iterator it; + for (it = myConnectingConns.begin(); it != myConnectingConns.end(); ++it) + (*it)->setLogWriteStrings(loggingData); + for (it = myConns.begin(); it != myConns.end(); ++it) + (*it)->setLogWriteStrings(loggingData); +} + +/** + @return if true data will be logged which means that all data sent + out to the all the clients will be logged +**/ +AREXPORT bool ArNetServer::getLoggingDataSent(void) +{ + return myLoggingDataSent; +} + +/** + @param loggingData if true data will be logged which means that all + commands received from clients are logged +**/ +AREXPORT void ArNetServer::setLoggingDataReceived(bool loggingData) +{ + myLoggingDataReceived = loggingData; +} + +/** + @return if true data will be logged which means that all commands + received from clients are logged +**/ +AREXPORT bool ArNetServer::getLoggingDataReceived(void) +{ + return myLoggingDataReceived; +} + + +/** + Set reverse line ending characters for compatibility with certain old + clients. + @param useWrongEndChars if true the wrong end chars will be sent ('\\n\\r' instead + of '\\r\\n'); a nonstandard, deprecated line ending, but may be required for certain old + clients. +**/ +AREXPORT void ArNetServer::setUseWrongEndChars(bool useWrongEndChars) +{ + myUseWrongEndChars = useWrongEndChars; + std::list::iterator it; + for (it = myConnectingConns.begin(); it != myConnectingConns.end(); ++it) + (*it)->setStringUseWrongEndChars(useWrongEndChars); + for (it = myConns.begin(); it != myConns.end(); ++it) + (*it)->setStringUseWrongEndChars(useWrongEndChars); +} + +/** + @return if true data will be logged which means that all data sent + out to the all the clients will be logged +**/ +AREXPORT bool ArNetServer::getUseWrongEndChars(void) +{ + return myUseWrongEndChars; +} + +AREXPORT void ArNetServer::runOnce(void) +{ + + // ArSocket acceptingSocket; + ArSocket *socket; + char *str; + std::list removeList; + std::list::iterator it; + ArArgumentBuilder *args = NULL; + std::string command; + + if (!myOpened) + { + return; + } + + // copy the strings we want to send next cycle + myNextCycleSendsMutex.lock(); + + std::list nextCycleSends; + std::list::iterator ncsIt;; + + nextCycleSends = myNextCycleSends; + myNextCycleSends.clear(); + + myNextCycleSendsMutex.unlock(); + + + lock(); + // get any new sockets that want to connect + while (myServerSocket.accept(&myAcceptingSocket) && + myAcceptingSocket.getFD() >= 0) + { + //myAcceptingSocket.setNonBlock(); + // see if we want more sockets + if (!myMultipleClients && (myConns.size() > 0 || + myConnectingConns.size() > 0)) + { + // we didn't want it, so politely tell it to go away + myAcceptingSocket.writeString("Conn refused."); + myAcceptingSocket.writeString( + "Only client allowed and it is already connected."); + myAcceptingSocket.close(); + ArLog::log(ArLog::Terse, "ArNetServer not taking multiple clients and another client tried to connect from %s.", myAcceptingSocket.getIPString()); + } + else + { + // we want the client so we put it in our list of connecting + // sockets, which means that it is waiting to give its password + socket = new ArSocket; + socket->setLogWriteStrings(myLoggingDataSent); + socket->setStringUseWrongEndChars(myUseWrongEndChars); + socket->transfer(&myAcceptingSocket); + socket->writeString("Enter password:"); + socket->setNonBlock(); + myConnectingConns.push_front(socket); + ArLog::log(ArLog::Normal, + "Client connecting from %s.", + socket->getIPString()); + } + } + + // now we read in data from our connecting sockets and see if + // they've given us the password + for (it = myConnectingConns.begin(); it != myConnectingConns.end(); ++it) + { + socket = (*it); + // read in what the client has to say + if ((str = socket->readString()) != NULL) + { + if (str[0] == '\0') + continue; + // now see if the word matchs the password + if (myPassword == str) + { + ArLog::log(ArLog::Normal, + "Client from %s gave password and connected.", + socket->getIPString()); + myConns.push_front(socket); + removeList.push_front(socket); + internalGreeting(socket); + } + else + { + socket->close(); + myDeleteList.push_front(socket); + ArLog::log(ArLog::Terse, + "Client from %s gave wrong password and is being disconnected.", + socket->getIPString()); + } + } + // if we couldn't read a string it means we lost a connection + else + { + ArLog::log(ArLog::Normal, + "Connection to %s lost.", socket->getIPString()); + socket->close(); + myDeleteList.push_front(socket); + } + } + // now we clear out the ones we want to remove from our connecting + // clients list + while ((it = removeList.begin()) != removeList.end()) + { + socket = (*it); + myConnectingConns.remove(socket); + removeList.pop_front(); + } + + + + // first send it all the things to be sent the next cycle... this + // could be done in the for loop below this one, but since we want + // to only log once per broadcast it's done here + for (ncsIt = nextCycleSends.begin(); + ncsIt != nextCycleSends.end(); + ncsIt++) + { + + // now we read in data from our connected sockets + for (it = myConns.begin(); it != myConns.end() && myOpened; ++it) + { + socket = (*it); + + socket->setLogWriteStrings(false); + + if (myLoggingDataSent) + ArLog::log(ArLog::Terse, "ArNetServer::sendToAllClientsNextCycle: Sending: %s", (*ncsIt).c_str()); + socket->writeString((*ncsIt).c_str()); + + socket->setLogWriteStrings(myLoggingDataSent); + } + } + + // now we read in data from our connected sockets + for (it = myConns.begin(); it != myConns.end() && myOpened; ++it) + { + socket = (*it); + + // read in what the client has to say + while ((str = socket->readString()) != NULL) + { + // if this is null then there wasn't anything said + if (str[0] == '\0') + break; + // make sure we read something + // set up the arguments and then call the function for the + // argument + args = new ArArgumentBuilder; + args->addPlain(str); + //args->log(); + parseCommandOnSocket(args, socket); + delete args; + args = NULL; + } + // if str was NULL we lost connection + if (str == NULL) + { + ArLog::log(ArLog::Normal, + "Connection to %s lost.", socket->getIPString()); + socket->close(); + myDeleteList.push_front(socket); + } + } + + // now we delete the ones we want to delete (we could do this above + // but then it wouldn't be symetrical with above) + while ((it = myDeleteList.begin()) != myDeleteList.end()) + { + socket = (*it); + myConnectingConns.remove(socket); + myConns.remove(socket); + // remove this instead of the old pop since there could be two of + // the same in the list if it lost connection exactly when it + // parsed the quit + myDeleteList.remove(socket); + socket->close(); + delete socket; + } + + if (myWantToClose) + { + close(); + } + unlock(); +} + +AREXPORT void ArNetServer::close(void) +{ + std::list::iterator it; + ArSocket *socket; + + if (!myOpened) + return; + myWantToClose = false; + ArLog::log(ArLog::Normal, "ArNetServer shutting down server."); + sendToAllClients("Shutting down server"); + for (it = myConnectingConns.begin(); it != myConnectingConns.end(); ++it) + { + (*it)->writeString("Shutting down server"); + } + myOpened = false; + + while ((it = myConnectingConns.begin())!= myConnectingConns.end()) + { + socket = (*it); + myConnectingConns.pop_front(); + socket->close(); + delete socket; + } + while ((it = myConns.begin()) != myConns.end()) + { + socket = (*it); + myConns.pop_front(); + socket->close(); + delete socket; + } + myServerSocket.close(); +} + +AREXPORT void ArNetServer::internalGreeting(ArSocket *socket) +{ + if (mySquelchNormal) + return; + socket->writeString("Welcome to the server."); + socket->writeString("You can type 'help' at any time for the following help list."); + internalHelp(socket); +} + +AREXPORT void ArNetServer::internalHelp(ArSocket *socket) +{ + std::map::iterator it; + + socket->writeString("Commands:"); + for (it = myHelpMap.begin(); it != myHelpMap.end(); ++it) + socket->writeString("%15s%10s%s", it->first.c_str(), "", + it->second.c_str()); + socket->writeString("End of commands"); +} + +AREXPORT void ArNetServer::internalHelp(char **argv, int argc, + ArSocket *socket) +{ + internalHelp(socket); +} + + +AREXPORT void ArNetServer::internalEcho(char **argv, int argc, + ArSocket *socket) +{ + // if they just typed it we tell them if its on or off + if (argc == 1) + { + if (socket->getEcho()) + socket->writeString("Echo is on."); + else + socket->writeString("Echo is off."); + } + // if the have two words see if they have the right args + else if (argc == 2 && strcasecmp(argv[1], "on") == 0) + { + socket->writeString("Echo turned on."); + socket->setEcho(true); + } + else if (argc == 2 && strcasecmp(argv[1], "off") == 0) + { + socket->writeString("Echo turned off."); + socket->setEcho(false); + } + else + { + socket->writeString("usage: echo "); + } +} + +AREXPORT void ArNetServer::internalQuit(char **argv, int argc, + ArSocket *socket) +{ + socket->writeString("Closing connection"); + + myDeleteList.push_front(socket); + ArLog::log(ArLog::Normal, "Client from %s quit.", socket->getIPString()); +} + +AREXPORT void ArNetServer::internalShutdownServer(char **argv, int argc, + ArSocket *socket) +{ + sendToAllClients("Shutting down server"); + myWantToClose = true; + if (myRobot != NULL) + myRobot->stopRunning(); + +} + +AREXPORT void ArNetServer::parseCommandOnSocket(ArArgumentBuilder *args, + ArSocket *socket, bool allowLog) +{ + + std::map *, ArStrCaseCmpOp>::iterator fIt; + char **argv; + int argc; + + if (myLoggingDataReceived && !mySquelchNormal && allowLog) + ArLog::log(ArLog::Normal, "Command received from %s: %s", + socket->getIPString(), args->getFullString()); + else if (myLoggingDataReceived && mySquelchNormal && allowLog) + ArLog::log(ArLog::Normal, "%s: %s", + socket->getIPString(), args->getFullString()); + argv = args->getArgv(); + argc = args->getArgc(); + // if we have some command see if it has a functor + if (argc >= 1 && + (fIt = myFunctorMap.find(argv[0])) != myFunctorMap.end()) + { + fIt->second->invoke(argv, argc, socket); + } + // it didn't have a functor so we don't know it as a command + else if (argc >= 1) + { + if (!mySquelchNormal) + socket->writeString("Unknown command %s", argv[0]); + } +} + +AREXPORT void ArNetServer::internalAddSocketToList(ArSocket *socket) +{ + if (socket != NULL) + { + socket->setNonBlock(); + socket->setStringUseWrongEndChars(myUseWrongEndChars); + } + myConns.push_front(socket); +} + + +AREXPORT void ArNetServer::internalAddSocketToDeleteList(ArSocket *socket) +{ + myDeleteList.push_front(socket); +} + +AREXPORT void ArNetServer::squelchNormal(void) +{ + mySquelchNormal = true; + remCommand("help"); + remCommand("echo"); + remCommand("quit"); + remCommand("shutdownServer"); + +} + +AREXPORT void ArNetServer::sendToClientPlain( + ArSocket *socket, const char *ipString, const char *str) +{ + std::list::iterator it; + + for (it = myConns.begin(); it != myConns.end(); ++it) + { + if ((*it) == socket && strcmp((*it)->getIPString(), ipString) == 0) + { + if (myLoggingDataSent) + ArLog::log(ArLog::Terse, + "ArNetServer::sendToClient: Sending '%s' to %s", str, + ipString); + (*it)->setLogWriteStrings(false); + (*it)->writeString(str); + (*it)->setLogWriteStrings(myLoggingDataSent); + } + } +} + +/** + This sends the given string to all the clients, this string cannot + be more than 2048 number of bytes +**/ +AREXPORT void ArNetServer::sendToClient(ArSocket *socket, const char *ipString, + const char *str, ...) +{ + char buf[2049]; + va_list ptr; + va_start(ptr, str); + vsprintf(buf, str, ptr); + + sendToClientPlain(socket, ipString, buf); + + va_end(ptr); +} diff --git a/Legacy/Aria/src/ArNovatelGPS.cpp b/Legacy/Aria/src/ArNovatelGPS.cpp new file mode 100644 index 0000000..b362f5e --- /dev/null +++ b/Legacy/Aria/src/ArNovatelGPS.cpp @@ -0,0 +1,158 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArNovatelGPS.h" +#include "ArDeviceConnection.h" + + +AREXPORT ArNovatelGPS::ArNovatelGPS() : + ArGPS(), + myNovatelGPGGAHandler(this, &ArNovatelGPS::handleNovatelGPGGA) +{ + // override normal GPGGA handler: + addNMEAHandler("GPGGA", &myNovatelGPGGAHandler); +} + +AREXPORT bool ArNovatelGPS::initDevice() +{ + if (!ArGPS::initDevice()) return false; + + char cmd[32]; + memset(cmd, 0, 32); + + myDevice->write("\r\n", 2); // prod the connection and end any previous commands it was waiting for, errors OK + + // Enable WAAS/EGNOS/MSAS/etc satellite-based correction: + const char* const sbasCmd = "sbascontrol enable auto 0 zerototwo\r\n"; + if (myDevice->write(sbasCmd, strlen(sbasCmd)) < (int) strlen(sbasCmd)) + return false; + + // Send a command to start sending data for each message type in the ArGPS + // handlers map: + const ArNMEAParser::HandlerMap& handlers = myNMEAParser.getHandlersRef(); + for(ArNMEAParser::HandlerMap::const_iterator i = handlers.begin(); i != handlers.end(); ++i) + { + float interval = 1; + if( (*i).first == "GPRMC") interval = 0.25; //special case, make this come faster + snprintf(cmd, 32, "log thisport %s ontime %g\r\n", (*i).first.c_str(), interval); + //ArLog::log(ArLog::Verbose, "ArNovatelGPS: sending command: %s", cmd); + if (myDevice->write(cmd, strlen(cmd)) != (int) strlen(cmd)) return false; + } + + return true; +} + + +AREXPORT ArNovatelGPS::~ArNovatelGPS() { + if(!myDevice) return; + myDevice->write("unlogall\r\n", strlen("unlogall\r\n")); // don't worry about errors +} + + +void ArNovatelGPS::handleNovatelGPGGA(ArNMEAParser::Message msg) +{ + // call base handler + ArGPS::handleGPGGA(msg); + + // Some of Novatel's values are different from the standard: + // (see + // http://na1.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D300000000T86&id=501300000008RAN&retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DGPGGA%26cid%3D000000000000000%26orgId%3D00D300000000T86%26t%3D4&ps=1 or search Novatel's Knowlege Base for "GPGGA") + + ArNMEAParser::MessageVector *message = msg.message; + if(message->size() < 7) return; + switch((*message)[6].c_str()[0]) + { + case '2': + myData.fixType = OmnistarConverging; + break; + case '5': + myData.fixType = OmnistarConverged; + break; + case '9': + myData.fixType = DGPSFix; + break; + } +} + +AREXPORT ArNovatelSPAN::ArNovatelSPAN() : + ArNovatelGPS(), + myGPRMCHandler(this, &ArNovatelSPAN::handleGPRMC), + myINGLLHandler(this, &ArNovatelSPAN::handleINGLL), + GPSLatitude(0), GPSLongitude(0), haveGPSPosition(false), GPSValidFlag(false) +{ + replaceNMEAHandler("GPRMC", &myGPRMCHandler); + + // NOTE if the SPAN provides an "INRMC" that has the same format as GPRMC, + // then this class could be simplified by supplying ArGPS::myGPRMCHandler as + // the handler for INRMC, instead of implementing a new INGLL handler here. + addNMEAHandler("INGLL", &myINGLLHandler); +} + +AREXPORT ArNovatelSPAN::~ArNovatelSPAN() +{ +} + +void ArNovatelSPAN::handleGPRMC(ArNMEAParser::Message msg) +{ + parseGPRMC(msg, GPSLatitude, GPSLongitude, GPSValidFlag, haveGPSPosition, timeGotGPSPosition, GPSTimestamp, myData.haveSpeed, myData.speed); +} + +void ArNovatelSPAN::handleINGLL(ArNMEAParser::Message msg) +{ + const ArNMEAParser::MessageVector *mv = msg.message; + + if(mv->size() < 5) return; + double lat, lon; + if(!readFloatFromStringVec(mv, 1, &lat, &gpsDegminToDegrees)) return; + if((*mv)[2] == "S") lat *= -1; + else if((*mv)[2] != "N") return; + if(!readFloatFromStringVec(mv, 3, &lon, &gpsDegminToDegrees)) return; + if((*mv)[4] == "W") lon *= -1; + else if((*mv)[4] != "E") return; + myData.latitude = lat; + myData.longitude = lon; + myData.havePosition = true; + + if(mv->size() < 6) return; + if(!readTimeFromString((*mv)[5], &(myData.GPSPositionTimestamp))) return; + + if(mv->size() < 7) return; + myData.qualityFlag = ((*mv)[6] != "V" && (*mv)[6] != "N"); +} + +AREXPORT bool ArNovatelSPAN::initDevice() +{ + if(!ArNovatelGPS::initDevice()) return false; + ArLog::log(ArLog::Normal, "ArNovatelSPAN: will request INS-corrected latitude and longitude to use as GPS position."); + + // Actually request a faster rate for INGLL than ArNovatelGPS::initDevice() did: + const char *cmd = "log thisport INGLL ontime 0.25\r\n"; + myDevice->write(cmd, strlen(cmd)); + + return true; +} diff --git a/Legacy/Aria/src/ArP2Arm.cpp b/Legacy/Aria/src/ArP2Arm.cpp new file mode 100644 index 0000000..3d86b93 --- /dev/null +++ b/Legacy/Aria/src/ArP2Arm.cpp @@ -0,0 +1,784 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArP2Arm.h" +#include "ariaUtil.h" +#include "ArLog.h" +#include "ariaInternal.h" + +int ArP2Arm::NumJoints=6; +const unsigned int ArP2Arm::ARMpac=0xa0; +const unsigned int ArP2Arm::ARMINFOpac=0xa1; +const unsigned char ArP2Arm::ComArmInfo=70; +const unsigned char ArP2Arm::ComArmStats=71; +const unsigned char ArP2Arm::ComArmInit=72; +const unsigned char ArP2Arm::ComArmCheckArm=73; +const unsigned char ArP2Arm::ComArmPower=74; +const unsigned char ArP2Arm::ComArmHome=75; +const unsigned char ArP2Arm::ComArmPark=76; +const unsigned char ArP2Arm::ComArmPos=77; +const unsigned char ArP2Arm::ComArmSpeed=78; +const unsigned char ArP2Arm::ComArmStop=79; +const unsigned char ArP2Arm::ComArmAutoPark=80; +const unsigned char ArP2Arm::ComArmGripperPark=81; +const int ArP2Arm::ArmJoint1=0x1; +const int ArP2Arm::ArmJoint2=0x2; +const int ArP2Arm::ArmJoint3=0x4; +const int ArP2Arm::ArmJoint4=0x8; +const int ArP2Arm::ArmJoint5=0x10; +const int ArP2Arm::ArmJoint6=0x20; +const int ArP2Arm::ArmGood=0x100; +const int ArP2Arm::ArmInited=0x200; +const int ArP2Arm::ArmPower=0x400; +const int ArP2Arm::ArmHoming=0x800; + + +AREXPORT ArP2Arm::ArP2Arm() : + myInited(false), + myRobot(0), + // myModel(), + myLastStatusTime(), + myLastInfoTime(), + myVersion(), + myStatusRequest(ArP2Arm::StatusOff), + myLastStatus(0), + myStatus(0), + myCon(), + myAriaUninitCB(this, &ArP2Arm::uninit), + myArmPacketHandler(this, &ArP2Arm::armPacketHandler), + myPacketCB(0), + myStoppedCB(0) +{ + myArmPacketHandler.setName("ArP2Arm"); +} + +AREXPORT ArP2Arm::~ArP2Arm() +{ + //uninit(); + if (myRobot != NULL) + myRobot->remPacketHandler(&myArmPacketHandler); +} + +/** + Initialize the P2 Arm class. This must be called before anything else. The + setRobot() must be called to let ArP2Arm know what instance of an ArRobot + to use. It talks to the robot and makes sure that there is an arm on it + and it is in a good condition. The AROS/P2OS arm servers take care of AUX + port serial communications with the P2 Arm controller. +*/ +AREXPORT ArP2Arm::State ArP2Arm::init() +{ + ArLog::log(ArLog::Normal, "Initializing the arm."); + + ArTime now; + + if (myInited) + return(ALREADY_INITED); + + if (!myRobot || !myRobot->isRunning() || !myRobot->isConnected()) + return(ROBOT_NOT_SETUP); + + Aria::addUninitCallBack(&myAriaUninitCB, ArListPos::FIRST); + ArLog::log(ArLog::Verbose, "Adding the P2 Arm packet handler."); + myRobot->addPacketHandler(&myArmPacketHandler, ArListPos::FIRST); + now.setToNow(); + if (!comArmStats(StatusSingle)) + return(COMM_FAILED); + ArUtil::sleep(100); + if (!comArmInfo()) + return(COMM_FAILED); + ArUtil::sleep(300); + + if (!now.isAfter(myLastStatusTime) || !now.isAfter(myLastInfoTime)) + return(COMM_FAILED); + + if (!(myStatus & ArmGood)) + return(NO_ARM_FOUND); + + myInited=true; + + return(SUCCESS); +} + +/** + Uninitialize the arm class. This simply asks the arm to park itself + and cleans up its internal state. To completely uninitialize the P2 Arm + itself have the ArRobot disconnect from P2OS. +*/ +AREXPORT ArP2Arm::State ArP2Arm::uninit() +{ + bool ret; + + if (!myInited) + return(NOT_INITED); + + ret=comArmPark(); + + myInited=false; + myVersion=""; + myStatusRequest=ArP2Arm::StatusOff; + myLastStatus=0; + myStatus=0; + if (ret) + return(SUCCESS); + else + return(COMM_FAILED); +} + +/** + Powers on the arm. The arm will shake for up to 2 seconds after powering + on. If the arm is told to move before it stops shaking, that vibration + can be amplified by moving. The default is to wait the 2 seconds for the + arm to settle down. + @param doSleep if true, sleeps 2 seconds to wait for the arm to stop shaking +*/ +AREXPORT ArP2Arm::State ArP2Arm::powerOn(bool doSleep) +{ + if (isGood()) + { + ArLog::log(ArLog::Normal, "ArP2Arm::powerOn: Powering arm."); + if (!comArmPower(true)) + return(COMM_FAILED); + // Sleep for 2 seconds to wait for the arm to stop shaking from the + // effort of turning on + if (doSleep) + ArUtil::sleep(2000); + return(SUCCESS); + } + else + return(NOT_CONNECTED); +} + +/** + Powers off the arm. This should only be called when the arm is in a good + position to power off. Due to the design, it will go limp when the power + is turned off. A more safe way to power off the arm is to use the + ArP2Arm::park() function. Which will home the arm, then power if off. + @see park +*/ +AREXPORT ArP2Arm::State ArP2Arm::powerOff() +{ + if (isGood()) + { + ArLog::log(ArLog::Normal, "ArP2Arm::powerOff: Powering off arm."); + if (comArmPower(false)) + return(SUCCESS); + else + return(COMM_FAILED); + } + else + return(NOT_CONNECTED); +} + +/** + Requests the arm info packet from P2OS and immediately returns. This packet + will be sent during the next 100ms cycle of P2OS. Since there is a very + noticable time delay, the user should use the ArP2Arm::setPacketCB() to set + a callback so the user knows when the packet has been received. + @see setPacketCB +*/ +AREXPORT ArP2Arm::State ArP2Arm::requestInfo() +{ + if (isGood()) + { + if (comArmInfo()) + return(SUCCESS); + else + return(COMM_FAILED); + } + else + return(NOT_CONNECTED); +} + +/** + Requests the arm status packet from P2OS and immediately returns. This + packet will be sent during the next 100ms cycle of P2OS. Since there is a + very noticable time delay, the user should use the ArP2Arm::setPacketCB() to + set a callback so the user knows when the packet has been received. + @see setPacketCB +*/ +AREXPORT ArP2Arm::State ArP2Arm::requestStatus(StatusType status) +{ + if (isGood()) + { + if (comArmStats(status)) + return(SUCCESS); + else + return(COMM_FAILED); + } + else + return(NOT_CONNECTED); +} + +/** + Requests that P2OS initialize the arm and immediately returns. The arm + initialization procedure takes about 700ms to complete and a little more + time for the status information to be relayed back to the client. Since + there is a very noticable time delay, the user should use the + ArP2Arm::setPacketCB() to set a callback so the user knows when the arm info + packet has been received. Then wait about 800ms, and send a + ArP2Arm::requestStatus() to get the results of the init request. While the + init is proceding, P2OS will ignore all arm related commands except + requests for arm status and arm info packets. + + ArP2Arm::checkArm() can be used to periodicly check to make sure that the + arm controller is still alive and responding. + + @see checkArm + @see setPacketCB +*/ +AREXPORT ArP2Arm::State ArP2Arm::requestInit() +{ + if (isGood()) + { + if (comArmInit()) + return(SUCCESS); + else + return(COMM_FAILED); + } + else + return(NOT_CONNECTED); +} + +/** + Requests that P2OS checks to see if the arm is still alive and immediately + exits. This is not a full init and differs that P2OS will still accept + arm commands and the arm will not be parked. If P2OS fails to find the arm + it will change the status byte accordingly and stop accepting arm related + commands except for init commands. If the parameter waitForResponse is true + then checkArm() will wait the appropriate amoutn of time and check the + status of the arm. If you wish to do the waiting else where the arm check + sequence takes about 200ms, so the user should wait 300ms then send a + ArP2Arm::requestStatus() to get the results of the check arm request. Since + there is a very noticable time delay, the user should use the + ArP2Arm::setPacketCB() to set a callback so the user knows when the packet + has been received. + + This can be usefull for telling if the arm is still alive. The arm + controller can be powered on/off separately from the robot. + + @param waitForResponse cause the function to block until their is a response + @see requestInit + @see setPacketCB +*/ +AREXPORT ArP2Arm::State ArP2Arm::checkArm(bool waitForResponse) +{ + ArTime now; + + if (isGood()) + { + now.setToNow(); + if (!comArmInfo()) + return(COMM_FAILED); + if (waitForResponse) + { + ArUtil::sleep(300); + if (!myLastInfoTime.isAfter(now)) + return(COMM_FAILED); + if (isGood()) + return(SUCCESS); + else + return(NO_ARM_FOUND); + } + else + return(SUCCESS); + } + else + return(NOT_CONNECTED); +} + +/** + Tells the arm to go to the home position. While the arm is homing, the + status byte will reflect it with the ArP2Arm::ArmHoming flag. If joint is set + to -1, then all the joints will be homed at a safe speed. If a single joint + is specified, that joint will be told to go to its home position at the + current speed its set at. + + @param joint home only that joint +*/ +AREXPORT ArP2Arm::State ArP2Arm::home(int joint) +{ + if (!isGood()) + return(NOT_INITED); + + if ((joint < 0) && !comArmHome(0xff)) + return(COMM_FAILED); + else if ((joint > 0) && (joint <= NumJoints) && !comArmHome(joint)) + return(COMM_FAILED); + else + return(INVALID_JOINT); + + return(SUCCESS); +} + +/** + Move the joint to the position at the given speed. If vel is 0, then the + currently set speed will be used. The position is in degrees. Each joint + has about a +-90 degree range, but they all differ due to the design. + + See ArP2Arm::moveToTicks() for a description of how positions are defined. + See ArP2Arm::moveVel() for a description of how speeds are defined. + + @param joint the joint to move + @param pos the position in degrees to move to + @param vel the speed at which to move. 0 will use the currently set speed + @see moveToTicks + @see moveVel +*/ + +AREXPORT ArP2Arm::State ArP2Arm::moveTo(int joint, float pos, unsigned char vel) +{ + unsigned char ticks; + + if (!isGood()) + return(NOT_INITED); + else if ((joint <= 0) || (joint > NumJoints)) + return(INVALID_JOINT); + + // if ((vel < 0) && !comArmSpeed(joint, 0-vel)) + // return(COMM_FAILED); + else if ((vel > 0) && !comArmSpeed(joint, vel)) + return(COMM_FAILED); + + if (!convertDegToTicks(joint, pos, &ticks)) + return(INVALID_POSITION); + + return(moveToTicks(joint, ticks)); +} + +/** + Move the joint to the given position in ticks. A tick is the arbitrary + position value that the arm controller uses. The arm controller uses a + single unsigned byte to represent all the possible positions in the range + of the servo for each joint. So the range of ticks is 0-255 which is + mapped to the physical range of the servo. Due to the design of the arm, + certain joints range are limited by the arm itself. P2OS will bound the + position to physical range of each joint. This is a lower level of + controlling the arm position than using ArP2Arm::moveTo(). ArP2Arm::moveTo() + uses a conversion factor which converts degrees to ticks. + + @param joint the joint to move + @param pos the position, in ticks, to move to + @see moveTo +*/ +AREXPORT ArP2Arm::State ArP2Arm::moveToTicks(int joint, unsigned char pos) +{ + if (!isGood()) + return(NOT_INITED); + else if ((joint <= 0) || (joint > NumJoints)) + return(INVALID_JOINT); + + if (!comArmPos(joint, pos)) + return(COMM_FAILED); + + return(SUCCESS); +} + +/** + Step the joint pos degrees from its current position at the given speed. + If vel is 0, then the currently set speed will be used. + + See ArP2Arm::moveToTicks() for a description of how positions are defined. + See ArP2Arm::moveVel() for a description of how speeds are defined. + + @param joint the joint to move + @param pos the position in degrees to step + @param vel the speed at which to move. 0 will use the currently set speed + @see moveTo + @see moveVel +*/ +AREXPORT ArP2Arm::State ArP2Arm::moveStep(int joint, float pos, unsigned char vel) +{ + unsigned char ticks; + + if (!isGood()) + return(NOT_INITED); + else if ((joint <= 0) || (joint > NumJoints)) + return(INVALID_JOINT); + + // if ((vel < 0) && !comArmSpeed(joint, 0-vel)) + // return(COMM_FAILED); + else if ((vel > 0) && !comArmSpeed(joint, vel)) + return(COMM_FAILED); + + if (!convertDegToTicks(joint, pos, &ticks)) + return(INVALID_POSITION); + + return(moveStepTicks(joint, ticks)); +} + +/** + Move the joint pos ticks from its current position. A tick is the arbitrary + position value that the arm controller uses. The arm controller uses a + single unsigned byte to represent all the possible positions in the range + of the servo for each joint. So the range of ticks is 0-255 which is + mapped to the physical range of the servo. Due to the design of the arm, + certain joints range are limited by the arm itself. P2OS will bound the + position to physical range of each joint. This is a lower level of + controlling the arm position than using ArP2Arm::moveTo(). ArP2Arm::moveStep() + uses a conversion factor which converts degrees to ticks. + + @param joint the joint to move + @param pos the position, in ticks, to move to + @see moveStep +*/ +AREXPORT ArP2Arm::State ArP2Arm::moveStepTicks(int joint, signed char pos) +{ + if (!isGood()) + return(NOT_INITED); + else if ((joint <= 0) || (joint > NumJoints)) + return(INVALID_JOINT); + + if (!comArmPos(joint, getJoint(joint)->myPos + pos)) + return(COMM_FAILED); + + return(SUCCESS); +} + +/** + Set the joints velocity. The arm controller has no way of controlling the + speed of the servos in the arm. So to control the speed of the arm, P2OS + will incrementaly send a string of position commands to the arm controller + to get the joint to move to its destination. To vary the speed, the amount + of time to wait between each point in the path is varied. The velocity + parameter is simply the number of milliseconds to wait between each point + in the path. 0 is the fastest and 255 is the slowest. A reasonable range + is around 10-40. + @param joint the joint to move + @param vel the velocity to move at +*/ +AREXPORT ArP2Arm::State ArP2Arm::moveVel(int joint, int vel) +{ + if (!isGood()) + return(NOT_INITED); + else if ((joint <= 0) || (joint > NumJoints)) + return(INVALID_JOINT); + + if ((vel < 0) && (!comArmSpeed(joint, 0-vel) || !comArmPos(joint, 0))) + return(COMM_FAILED); + else if ((vel > 0) && (!comArmSpeed(joint, vel) || !comArmPos(joint, 255))) + return(COMM_FAILED); + + return(SUCCESS); +} + +/** + Stop the arm from moving. This overrides all other actions except for the + arms initilization sequence. +*/ +AREXPORT ArP2Arm::State ArP2Arm::stop() +{ + if (!isGood()) + return(NOT_INITED); + + if (!comArmStop()) + return(COMM_FAILED); + + return(SUCCESS); +} + +AREXPORT float ArP2Arm::getJointPos(int joint) +{ + float val; + + if (isGood() && (joint > 0) && (joint <= NumJoints) && + convertTicksToDeg(joint, getJoint(joint)->myPos, &val)) + return(val); + else + return(0.0); +} + +AREXPORT unsigned char ArP2Arm::getJointPosTicks(int joint) +{ + if (isGood() && (joint > 0) && (joint <= NumJoints)) + return(getJoint(joint)->myPos); + else + return(0); +} + +AREXPORT P2ArmJoint * ArP2Arm::getJoint(int joint) +{ + if ((joint > 0) && (joint <= NumJoints)) + return(&myJoints[joint-1]); + else + return(0); +} + +bool ArP2Arm::armPacketHandler(ArRobotPacket *packet) +{ + bool doWake; + int i; + + if (packet->getID() == ARMpac) + { + myLastStatusTime.setToNow(); + myLastStatus=myStatus; + myStatus=packet->bufToUByte2(); + for (i=1; i<=NumJoints; ++i) + getJoint(i)->myPos=packet->bufToUByte(); + + // Wake up all threads waiting for the arm to stop moving + for (doWake=false, i=0; i<8; ++i) + { + if (((myLastStatus & (1 << i)) != (myStatus & (1 << i))) && + (myStatus & (1 << i))) + doWake=true; + } + if (doWake && myStoppedCB) + myStoppedCB->invoke(); + if (myPacketCB) + myPacketCB->invoke(StatusPacket); + return(true); + } + else if (packet->getID() == ARMINFOpac) + { + char version[512]; + myLastInfoTime.setToNow(); + packet->bufToStr(version, 512); + myVersion=version; + NumJoints=packet->bufToUByte(); + for (i=1; i<=NumJoints; ++i) + { + getJoint(i)->myVel=packet->bufToUByte(); + getJoint(i)->myHome=packet->bufToUByte(); + getJoint(i)->myMin=packet->bufToUByte(); + getJoint(i)->myCenter=packet->bufToUByte(); + getJoint(i)->myMax=packet->bufToUByte(); + getJoint(i)->myTicksPer90=packet->bufToUByte(); + } + if (myPacketCB) + myPacketCB->invoke(InfoPacket); + return(true); + } + else + return(false); +} + +bool ArP2Arm::comArmInfo() +{ + return(myRobot->com(ComArmInfo)); +} + +bool ArP2Arm::comArmStats(StatusType stats) +{ + return(myRobot->comInt(ComArmStats, (int)stats)); +} + +bool ArP2Arm::comArmInit() +{ + return(myRobot->com(ComArmInit)); +} + +bool ArP2Arm::comArmCheckArm() +{ + return(myRobot->com(ComArmCheckArm)); +} + +bool ArP2Arm::comArmPower(bool on) +{ + if (on) + return(myRobot->comInt(ComArmPower, 1)); + else + return(myRobot->comInt(ComArmPower, 0)); +} + +bool ArP2Arm::comArmHome(unsigned char joint) +{ + return(myRobot->comInt(ComArmHome, joint)); +} + +bool ArP2Arm::comArmPos(unsigned char joint, unsigned char pos) +{ + return(myRobot->com2Bytes(ComArmPos, joint, pos)); +} + +bool ArP2Arm::comArmSpeed(unsigned char joint, unsigned char speed) +{ + return(myRobot->com2Bytes(ComArmSpeed, joint, speed)); +} + +bool ArP2Arm::comArmStop(unsigned char joint) +{ + return(myRobot->comInt(ComArmStop, joint)); +} + +bool ArP2Arm::comArmPark() +{ + return(myRobot->com(ComArmPark)); +} + +bool ArP2Arm::comArmAutoPark(int waitSecs) +{ + return(myRobot->comInt(ComArmAutoPark, waitSecs)); +} + +bool ArP2Arm::comArmGripperPark(int waitSecs) +{ + return(myRobot->comInt(ComArmGripperPark, waitSecs)); +} + +AREXPORT bool ArP2Arm::getMoving(int joint) +{ + if ((joint < 0) && (myStatus & 0xf)) + return(true); + else if (myStatus & (1 << joint)) + return(true); + else + return(false); +} + +AREXPORT bool ArP2Arm::isPowered() +{ + if (myStatus & ArmPower) + return(true); + else + return(false); +} + +AREXPORT bool ArP2Arm::isGood() +{ + if (myRobot && myRobot->isRunning() && myRobot->isConnected() && + myInited && (myStatus & ArmGood) && (myStatus & ArmInited)) + return(true); + else + return(false); +} + +AREXPORT ArP2Arm::State ArP2Arm::park() +{ + if (!isGood()) + return(NOT_INITED); + + if (comArmPark()) + return(SUCCESS); + else + return(COMM_FAILED); +} + +/** + P2OS will automaticly park the arm if it gets no arm related packets after + waitSecs. This is to help protect the arm when the program looses + connection with P2OS. Set the value to 0 to disable this timer. Default + wait is 10 minutes. + + @param waitSecs seconds to wait till parking the arm when idle +*/ +AREXPORT ArP2Arm::State ArP2Arm::setAutoParkTimer(int waitSecs) +{ + if (!isGood()) + return(NOT_INITED); + + if (comArmAutoPark(waitSecs)) + return(SUCCESS); + else + return(COMM_FAILED); +} + +/** + P2OS/AROS automatically park the gripper after its been closed for more than + waitSecs. The gripper servo can overheat and burnout if it is holding + something for more than 10 minutes. Care must be taken to ensure that this + does not happen. If you wish to manage the gripper yourself, you can + disable this timer by setting it to 0. + + @param waitSecs seconds to wait till parking the gripper once it has begun to grip something +*/ +AREXPORT ArP2Arm::State ArP2Arm::setGripperParkTimer(int waitSecs) +{ + if (!isGood()) + return(NOT_INITED); + + if (comArmGripperPark(waitSecs)) + return(SUCCESS); + else + return(COMM_FAILED); +} + +AREXPORT bool ArP2Arm::convertDegToTicks(int joint, float pos, + unsigned char *ticks) +{ + long val; + + if ((joint <= 0) || (joint > NumJoints)) + return(false); + + if (joint == 6) + *ticks=(unsigned char)pos; + else + { + val=ArMath::roundInt(getJoint(joint)->myTicksPer90*(pos/90.0)); + if ((joint >= 1) && (joint <= 3)) + val=-val; + val+=getJoint(joint)->myCenter; + if (val < getJoint(joint)->myMin) + *ticks=getJoint(joint)->myMin; + else if (val > getJoint(joint)->myMax) + *ticks=getJoint(joint)->myMax; + else + *ticks=val; + } + + return(true); +} + +AREXPORT bool ArP2Arm::convertTicksToDeg(int joint, unsigned char pos, + float *degrees) +{ + long val; + + if ((joint <= 0) || (joint > NumJoints)) + return(false); + + if (joint == 6) + *degrees=pos; + else + { + val=ArMath::roundInt(90.0/getJoint(joint)->myTicksPer90* + (pos-getJoint(joint)->myCenter)); + if ((joint >= 1) && (joint <= 3)) + val=-val; + *degrees=val; + } + + return(true); +} + +AREXPORT P2ArmJoint::P2ArmJoint() : + myPos(0), + myVel(0), + myHome(0), + myMin(0), + myCenter(0), + myMax(0), + myTicksPer90(0) +{ +} + +AREXPORT P2ArmJoint::~P2ArmJoint() +{ +} + diff --git a/Legacy/Aria/src/ArPTZ.cpp b/Legacy/Aria/src/ArPTZ.cpp new file mode 100644 index 0000000..f7338ee --- /dev/null +++ b/Legacy/Aria/src/ArPTZ.cpp @@ -0,0 +1,183 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArPTZ.h" +#include "ArRobot.h" +#include "ArRobotPacket.h" +#include "ArCommands.h" +#include "ArDeviceConnection.h" + +/** + @param robot The robot this camera is attached to, can be NULL +**/ +AREXPORT ArPTZ::ArPTZ(ArRobot *robot) : + myRobot(robot), + myConn(NULL), + myConnectCB(this, &ArPTZ::connectHandler), + mySensorInterpCB(this, &ArPTZ::sensorInterpHandler), + myAuxPort(1), + myAuxTxCmd(ArCommands::TTY2), + myAuxRxCmd(ArCommands::GETAUX), + myRobotPacketHandlerCB(this, &ArPTZ::robotPacketHandler), + myInverted(false), + myMaxPosPan(90), + myMaxNegPan(-90), + myMaxPosTilt(90), + myMaxNegTilt(0), + myMaxZoom(100), + myMinZoom(0) +{ + myRobotPacketHandlerCB.setName("ArPTZ"); + if (myRobot != NULL) + { + myRobot->addConnectCB(&myConnectCB, ArListPos::LAST); + myRobot->addPacketHandler(&myRobotPacketHandlerCB, ArListPos::FIRST); + } +} + +AREXPORT ArPTZ::~ArPTZ() +{ + if (myRobot != NULL) + { + myRobot->remConnectCB(&myConnectCB); + myRobot->remPacketHandler(&myRobotPacketHandlerCB); + myRobot->remSensorInterpTask(&mySensorInterpCB); + } + +} + +/** + @param packet the packet to send + @return true if the packet could be sent, false otherwise +**/ + +AREXPORT bool ArPTZ::sendPacket(ArBasePacket *packet) +{ + packet->finalizePacket(); + if (myConn != NULL) + return myConn->write(packet->getBuf(), packet->getLength()); + else if (myRobot != NULL) + return myRobot->comStrN(myAuxTxCmd, packet->getBuf(), + packet->getLength()); + else + return false; +} + +AREXPORT bool ArPTZ::robotPacketHandler(ArRobotPacket *packet) +{ + //printf("%x\n", packet->getID()); + if ((packet->getID() == 0xb0 && myAuxPort == 1) || + (packet->getID() == 0xb8 && myAuxPort == 2) || + (packet->getID() == 200 && myAuxPort == 3) + ) + return packetHandler(packet); + else + return false; +} + +AREXPORT void ArPTZ::connectHandler(void) +{ + init(); +} + +AREXPORT void ArPTZ::sensorInterpHandler(void) +{ + ArBasePacket *packet; + while ((packet = readPacket()) != NULL) + packetHandler(packet); +} + +/** + @param connection the device connection the camera is connected to, + normally a serial port + + @param driveFromRobotLoop if this is true then a sensor interp + callback wil be set and that callback will read packets and call + the packet handler on them + + @return true if the serial port is opened or can be opened, false + otherwise +**/ +AREXPORT bool ArPTZ::setDeviceConnection(ArDeviceConnection *connection, + bool driveFromRobotLoop) +{ + if (myRobot != NULL) + { + myRobot->remPacketHandler(&myRobotPacketHandlerCB); + myRobot->remSensorInterpTask(&mySensorInterpCB); + } + if (myRobot == NULL) + return false; + myConn = connection; + if (driveFromRobotLoop && myRobot != NULL && myConn != NULL) + myRobot->addSensorInterpTask("ptz", 50, &mySensorInterpCB); + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + return myConn->openSimple(); + else + return true; +} + +AREXPORT ArDeviceConnection *ArPTZ::getDeviceConnection(void) +{ + return myConn; +} + + +/** + @param auxPort Which auxilliary serial port on the robot's microcontroller that the device + is connected to. (The C166 controller only has one port; the H8 has two; the SH has three.) + + @return true if @a auxPort was valid (1, 2 or 3). False otherwise. If @a auxPort was an invalid number, the previous setting will be retained. + +**/ +AREXPORT bool ArPTZ::setAuxPort(int auxPort) +{ + if (auxPort == 1) + { + myAuxTxCmd = ArCommands::TTY2; + myAuxRxCmd = ArCommands::GETAUX; + myAuxPort = 1; + return true; + } + else if (auxPort == 2) + { + myAuxTxCmd = ArCommands::TTY3; + myAuxRxCmd = ArCommands::GETAUX2; + myAuxPort = 2; + return true; + } + else if(auxPort == 3) + { + myAuxTxCmd = ArCommands::TTY4; + myAuxRxCmd = ArCommands::GETAUX3; + myAuxPort = 3; + return true; + } + else + return false; +} + diff --git a/Legacy/Aria/src/ArPTZConnector.cpp b/Legacy/Aria/src/ArPTZConnector.cpp new file mode 100644 index 0000000..fce9683 --- /dev/null +++ b/Legacy/Aria/src/ArPTZConnector.cpp @@ -0,0 +1,316 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include +#include +#include + +#include "ArExport.h" +#include "ariaUtil.h" +#include "ariaInternal.h" +#include "ArLog.h" +#include "ArFunctor.h" +#include "ArPTZ.h" +#include "ArPTZConnector.h" +#include "ArConfig.h" +#include "ArRobot.h" +#include "ArRobotParams.h" + +std::map ArPTZConnector::ourPTZCreateFuncs; + + +AREXPORT ArPTZConnector::ArPTZConnector(ArArgumentParser* argParser, ArRobot *robot) : + myArgParser(argParser), + myRobot(robot), + myParseArgsCallback(this, &ArPTZConnector::parseArgs), + myLogOptionsCallback(this, &ArPTZConnector::logOptions) + //myPopulateRobotParamsCB(this, &ArPTZConnector::populateRobotParams) +{ + myParseArgsCallback.setName("ArPTZConnector parse args callback"); + myLogOptionsCallback.setName("ArPTZConnector log options callback"); + Aria::addParseArgsCB(&myParseArgsCallback); + Aria::addLogOptionsCB(&myLogOptionsCallback); + //ArRobotParams::addPopulateParamsCB(&myPopulateRobotParamsCB); +} + + +AREXPORT ArPTZConnector::~ArPTZConnector() +{ + ///@todo not in Aria but should be: Aria::remParseArgsCB(&myParseArgsCallback); + ///@todo not in Aria but should be: Aria::remLogOptionsCB(&myLogOptionsCallback); + ///@todo delete objects from myConnectedPTZs + ///@todo depopulate parameter slots from any ArRobotParams object that called our populate callback. +// ArRobotParams::remPopulateParamsCB(&myPopulateRobotParamsCB); +} + +AREXPORT bool ArPTZConnector::connect() +{ + // Copy ArRobot's parameters: + myParams.resize(Aria::getMaxNumPTZs()); + if(myRobot) + { + if(myRobot->getRobotParams()) + myParams = myRobot->getRobotParams()->getPTZParams(); + else + ArLog::log(ArLog::Normal, "ArPTZConnector: Warning: no robot parameters, cannot set defaults for the robot type or loaded from parameter file. (To do so, connect to robot before connecting to PTZs.)"); + } + else + { + ArLog::log(ArLog::Normal, "ArPTZConnector: Warning: cannot use defaults for specific robot type or get configuration from robot parameter file, no robot connection."); + } + + // "arguments" are from program command line. "parameters"/"params" are from + // robot parameter file(s) or ARIA's internal defaults (ArRobotTypes.cpp) + myConnectedPTZs.reserve(myParams.size()); // index in myConnectedPTZs corresponds to index from parameters and command line options, but the ArPTZ* may be NULL if not connected. + size_t i = 0; + size_t picount = 0; + //assert(myArguments.size() >= myParams.size()); + for(std::vector::iterator pi = myParams.begin(); + pi != myParams.end(); + ++pi, ++i, ++picount) + { + //printf("]] merging myArguments[%d] into myParams[%d]\n", i, picount); + pi->merge(myArguments[i]); + if(pi->type == "" || pi->type == "none" || pi->connect == false) // this ptz # was not specified in any parameters, or it was but with false connect flag + { + //puts("null type or false connect flag, not creating or connecting."); + //myConnectedPTZs.push_back(NULL); + continue; + } + ArLog::log(ArLog::Normal, "ArPTZConnector: Connecting to PTZ #%d (type %s)...", i+1, pi->type.c_str()); + if(ourPTZCreateFuncs.find(pi->type) == ourPTZCreateFuncs.end()) + { + ArLog::log(ArLog::Terse, "ArPTZConnector: Error: unrecognized PTZ type \"%s\" for PTZ #%d", pi->type.c_str(), i+1); + //myConnectedPTZs.push_back(NULL); + return false; + } + PTZCreateFunc *func = ourPTZCreateFuncs[pi->type]; + ArPTZ *ptz = func->invokeR(i, *pi, myArgParser, myRobot); + if(!ptz) + { + ArLog::log(ArLog::Terse, "ArPTZConnector: Error connecting to PTZ #%d (type %s).", i+1, pi->type.c_str()); + ArLog::log(ArLog::Normal, "ArPTZConnector: Try specifying -ptzType (and -ptzSerialPort, -ptzRobotAuxSerialPort or -ptzAddress) program arguments, or set type and connection options in your robot's parameter file. Run with -help for all connection program options."); + //myConnectedPTZs.push_back(NULL); + return false; + } + if(pi->serialPort != "" && pi->serialPort != "none") + { + // memory leak? who is responsible for destroying serial connection, do we + // need to store it and destroy it in our destructor or a disconnectAll + // function? + std::string logname = pi->type; + logname += " "; + logname += i; + logname += " control serial connection on "; + logname += pi->serialPort; + ArDeviceConnection *serCon = ArDeviceConnectionCreatorHelper::createSerialConnection(pi->serialPort.c_str(), NULL, logname.c_str()); + ptz->setDeviceConnection(serCon); + } + else if(pi->robotAuxPort != -1) + { + ptz->setAuxPort(pi->robotAuxPort); + } + + ptz->setInverted(pi->inverted); + + if(ptz->init()) + ArLog::log(ArLog::Verbose, "ArPTZConnector: Sucessfully initialized %s PTZ #%d ", ptz->getTypeName(), i+1); + else + ArLog::log(ArLog::Normal, "ArPTZConnector: Warning: Error initializing PTZ #%d (%s)", i+1, ptz->getTypeName()); + + // Resize ConnectedPTZs vector so that we can place this framegrabber at its correct index, even if any previous + // PTZs were not stored because of errors creating them or they are not present in parameters or program options. + // Any new elements created here are set to NULL. + myConnectedPTZs.resize(i+1, NULL); + + // Add this PTZ to the connected list at its proper index (matching its index in parameters or program options) + myConnectedPTZs[i] = ptz; + + } + return true; +} + +bool ArPTZConnector::parseArgs() +{ + if(!myArgParser) return false; + return parseArgs(myArgParser); +} + +bool ArPTZConnector::parseArgs(ArArgumentParser *parser) +{ + //puts("]]] ArPTZConnector::parseArgs"); + if(!parser) return false; + // -1 checks for argument with no PTZ index given (same as 0), then 0..(ourMaxNumPTZs-1) checks + // for arguments -ptz1..., -ptz2..., -ptz3... etc. + for(int i = -1; i < (int)getMaxNumPTZs(); ++i) + { + //printf("parse args for %d\n", i); + if(!parseArgsFor(parser, i)) + return false; + } + return true; +} + +bool ArPTZConnector::parseArgsFor(ArArgumentParser *parser, int which) +{ + ArPTZParams params; + const char *type = NULL; + const char *serialPort = NULL; + int auxPort = -1; + const char *address = NULL; + int tcpPort = -1; + bool inverted = false; + + std::stringstream prefixconcat; + prefixconcat << "-ptz"; + + // If which is -1 then we check for just -ptz... with no number, but it is + // same as first ptz ("-ptz1...") + if(which >= 0) + prefixconcat << which+1; + if(which < 0) + which = 0; + + std::string prefix = prefixconcat.str(); + //printf("checking for arguments for PTZ #%lu with prefix %s (e.g. %s)\n", which, prefix.c_str(), (prefix+"Type").c_str()); + + if(parser->checkParameterArgumentString( (prefix+"Type").c_str(), &type) && type != NULL) + { + if(ourPTZCreateFuncs.find(type) == ourPTZCreateFuncs.end()) + { + ArLog::log(ArLog::Terse, "ArPTZConnector: Error parsing arguments: unrecognized PTZ type \"%s\" given with %sType.", type, prefix.c_str()); + return false; + } + params.type = type; + params.connect = true; + params.connectSet = true; + } + + size_t nConOpt = 0; + + if(parser->checkParameterArgumentString( (prefix+"SerialPort").c_str(), &serialPort) && serialPort != NULL) + { + ++nConOpt; + params.serialPort = serialPort; + //printf("got serial port %s\n", serialPort); + } + + if(parser->checkParameterArgumentInteger( (prefix+"RobotAuxSerialPort").c_str(), &auxPort) && auxPort != -1) + { + ++nConOpt; + params.robotAuxPort = auxPort; + //printf("got aux port %d\n", auxPort); + } + + if(parser->checkParameterArgumentString( (prefix+"Address").c_str(), &address) && address != NULL) + { + ++nConOpt; + params.address = address; + //printf("got address %s\n", address); + } + + // only one of serial port, aux port or address can be given + if(nConOpt > 1) + { + ArLog::log(ArLog::Terse, "ArPTZConnector: Error: Only one of %sSerialPort, %sRobotAuxSerialPort or %sAddress may be given to select connection.", + prefix.c_str(), + prefix.c_str(), + prefix.c_str() + ); + return false; + } + + if(parser->checkParameterArgumentInteger( (prefix+"TCPPort").c_str(), &tcpPort) && tcpPort != -1) + { + params.tcpPort = tcpPort; + params.tcpPortSet = true; + //printf("got tcp port %d\n", tcpPort); + } + + bool wasSet = false; + if(parser->checkArgument((prefix+"Inverted").c_str())) + { + params.inverted = true; + params.invertedSet = true; + //printf("got inverted %d\n", inverted); + } + if(parser->checkParameterArgumentBool( (prefix+"Inverted").c_str(), &inverted, &wasSet) && wasSet) + { + params.inverted = inverted; + params.invertedSet = true; + //printf("got inverted %d\n", inverted); + } + + + if(which < myArguments.size()) + { + //printf("merging these new params into existing myArguments[%d].\n", which); + myArguments[which].merge(params); + } + else + { + // try not to assume we will be called with regular increasing which parameters, + // (though we probably will be) so resize and set rather than use push_back: + //printf("setting new, resized myArguments[%d] to these new params.\n", which); + myArguments.resize(which+1); + myArguments[which] = params; + } + + return true; +} + +AREXPORT void ArPTZConnector::logOptions() const +{ + ArLog::log(ArLog::Terse, "Common PTU and Camera PTZ options:\n"); + ArLog::log(ArLog::Terse, "\t-ptzType \tSelect PTZ/PTU type. Required. Available types are:"); + for(std::map::const_iterator i = ourPTZCreateFuncs.begin(); + i != ourPTZCreateFuncs.end(); + ++i) + { + ArLog::log(ArLog::Terse, "\t\t%s", (*i).first.c_str()); + } + ArLog::log(ArLog::Terse, "\t-ptzInverted \tIf true, reverse tilt and pan axes for cameras mounted upside down."); + ArLog::log(ArLog::Terse, "\nOnly one of the following sets of connection parameters may be given:"); + ArLog::log(ArLog::Terse, "\nFor computer serial port connections:"); + ArLog::log(ArLog::Terse, "\t-ptzSerialPort \tSerial port name."); + ArLog::log(ArLog::Terse, "\nFor Pioneer robot auxilliary serial port connections:"); + ArLog::log(ArLog::Terse, "\t-ptzRobotAuxSerialPort <1|2|3>\tUse specified Pioneer robot auxilliary serial port."); + ArLog::log(ArLog::Terse, "\nFor network connections:"); + ArLog::log(ArLog::Terse, "\t-ptzAddress
\tNetwork address or hostname for network connection."); + ArLog::log(ArLog::Terse, "\t-ptzTcpPort \tTCP port number for network connections."); + ArLog::log(ArLog::Terse, "\nParameters for multiple cameras/units may be given like: -ptz1Type, -ptz2Type, -ptz3Type, etc."); + ArLog::log(ArLog::Terse, "Some PTZ/PTU types may accept additional type-specific options. Refer to option documentation text specific to those types."); +} + + + + + + + AREXPORT void ArPTZConnector::registerPTZType(const std::string& typeName, ArPTZConnector::PTZCreateFunc* func) + { + ourPTZCreateFuncs[typeName] = func; + } diff --git a/Legacy/Aria/src/ArPriorityResolver.cpp b/Legacy/Aria/src/ArPriorityResolver.cpp new file mode 100644 index 0000000..e794151 --- /dev/null +++ b/Legacy/Aria/src/ArPriorityResolver.cpp @@ -0,0 +1,107 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArPriorityResolver.h" +#include "ArAction.h" +#include "ArRobot.h" + +AREXPORT ArPriorityResolver::ArPriorityResolver() : + ArResolver("ArPriorityResolver", "Resolves strictly by using priority, the highest priority action to act is the one that gets to go. Does no mixing of any variety.") +{ +} + + +AREXPORT ArPriorityResolver::~ArPriorityResolver() +{ +} + +AREXPORT ArActionDesired *ArPriorityResolver::resolve( + ArResolver::ActionMap *actions, ArRobot *robot, bool logActions) +{ + ArResolver::ActionMap::reverse_iterator it; + ArAction *action; + ArActionDesired *act; + ArActionDesired averaging; + bool first = true; + int lastPriority; + bool printedFirst = true; + int printedLast; + + if (actions == NULL) + return NULL; + + myActionDesired.reset(); + averaging.reset(); + averaging.startAverage(); + for (it = actions->rbegin(); it != actions->rend(); ++it) + { + action = (*it).second; + if (action != NULL && action->isActive()) + { + /// MPL jan 7 '12 moved this next code block up 'from here' + if (first || (*it).first != lastPriority) + { + averaging.endAverage(); + myActionDesired.merge(&averaging); + + averaging.reset(); + averaging.startAverage(); + first = false; + lastPriority = (*it).first; + } + act = action->fire(myActionDesired); + if (robot != NULL && act != NULL) + act->accountForRobotHeading(robot->getTh()); + if (act != NULL) + act->sanityCheck(action->getName()); + // from here + averaging.addAverage(act); + if (logActions && act != NULL && act->isAnythingDesired()) + { + if (printedFirst || printedLast != (*it).first) + { + ArLog::log(ArLog::Terse, "Priority %d:", (*it).first); + printedLast = (*it).first; + printedFirst = false; + } + ArLog::log(ArLog::Terse, "Action: %s", action->getName()); + act->log(); + } + + + } + } + averaging.endAverage(); + myActionDesired.merge(&averaging); + /* + printf( + "desired delta %.0f strength %.3f, desired speed %.0f strength %.3f\n", + myActionDesired.getDeltaHeading(), myActionDesired.getHeadingStrength(), + myActionDesired.getVel(), myActionDesired.getVelStrength()); + */ + return &myActionDesired; +} diff --git a/Legacy/Aria/src/ArRVisionPTZ.cpp b/Legacy/Aria/src/ArRVisionPTZ.cpp new file mode 100644 index 0000000..8dba19b --- /dev/null +++ b/Legacy/Aria/src/ArRVisionPTZ.cpp @@ -0,0 +1,341 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRVisionPTZ.h" +#include "ArRobot.h" +#include "ArCommands.h" + +AREXPORT ArRVisionPacket::ArRVisionPacket(ArTypes::UByte2 bufferSize) : + ArBasePacket(bufferSize) +{ + +} + +AREXPORT ArRVisionPacket::~ArRVisionPacket() +{ + +} + +AREXPORT void ArRVisionPacket::uByteToBuf(ArTypes::UByte val) +{ + if (myLength + 1 > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArRVisionPacket::uByteToBuf: Trying to add beyond length of buffer."); + return; + } + myBuf[myLength] = val; + ++myLength; +} + +AREXPORT void ArRVisionPacket::byte2ToBuf(ArTypes::Byte2 val) +{ + if ((myLength + 4) > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArRVisionPacket::Byte2ToBuf: Trying to add beyond length of buffer."); + return; + } + myBuf[myLength] = (val & 0xf000) >> 12; + ++myLength; + myBuf[myLength] = (val & 0x0f00) >> 8; + ++myLength; + myBuf[myLength] = (val & 0x00f0) >> 4; + ++myLength; + myBuf[myLength] = (val & 0x000f) >> 0; + ++myLength; +} + +/** + This function is my concession to not rebuilding a packet from scratch + for every command, basicaly this is to not lose all speed over just using + a character array. This is used by the default rvision commands, unless + you have a deep understanding of how the packets are working and what + the packet structure looks like you should not play with this function, + it also isn't worth it unless you'll be sending commands frequently. + @param val the Byte2 to put into the packet + @param pose the position in the packets array to put the value +*/ +AREXPORT void ArRVisionPacket::byte2ToBufAtPos(ArTypes::Byte2 val, + ArTypes::UByte2 pose) +{ + ArTypes::Byte2 prevLength = myLength; + + if ((pose + 4) > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArRVisionPacket::Byte2ToBuf: Trying to add beyond length of buffer."); + return; + } + myLength = pose; + byte2ToBuf(val); + myLength = prevLength; +} + + +AREXPORT ArRVisionPTZ::ArRVisionPTZ(ArRobot *robot) : + ArPTZ(NULL), + myPacket(255), + myZoomPacket(9), + mySerialPort(ArUtil::COM3) +{ + //myRobot = robot; + initializePackets(); + + // these ticks were derived emperically. Ticks / real_degrees + myDegToTilt = 2880 / 180; + myDegToPan = 960 / 60; + + myTiltOffsetInDegrees = TILT_OFFSET_IN_DEGREES; + myPanOffsetInDegrees = PAN_OFFSET_IN_DEGREES; + + myConn = NULL; + + ArPTZ::setLimits(MAX_PAN, MIN_PAN, MAX_TILT, MIN_TILT, MAX_ZOOM, MIN_ZOOM); + /* + AREXPORT virtual double getMaxPosPan(void) const { return MAX_PAN; } + AREXPORT virtual double getMaxNegPan(void) const { return MIN_PAN; } + AREXPORT virtual double getMaxPosTilt(void) const { return MAX_TILT; } + AREXPORT virtual double getMaxNegTilt(void) const { return MIN_TILT; } + AREXPORT virtual int getMaxZoom(void) const { return MAX_ZOOM; } + AREXPORT virtual int getMinZoom(void) const { return MIN_ZOOM; } + */ + +} + +AREXPORT ArRVisionPTZ::~ArRVisionPTZ() +{ +} + +void ArRVisionPTZ::initializePackets(void) +{ + myZoomPacket.empty(); + myZoomPacket.uByteToBuf(0x81); + myZoomPacket.uByteToBuf(0x01); + myZoomPacket.uByteToBuf(0x04); + myZoomPacket.uByteToBuf(0x47); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0xff); + + myPanTiltPacket.empty(); + myPanTiltPacket.uByteToBuf(0x81); + myPanTiltPacket.uByteToBuf(0x01); + myPanTiltPacket.uByteToBuf(0x06); + myPanTiltPacket.uByteToBuf(0x02); + myPanTiltPacket.uByteToBuf(0x18); + myPanTiltPacket.uByteToBuf(0x14); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0xff); +} + + +AREXPORT bool ArRVisionPTZ::init(void) +{ + // send command to power on camera on seekur + if(myRobot) + { + ArLog::log(ArLog::Normal, "ArRVisionPTZ: turning camer power on ..."); + myRobot->com2Bytes(116, 12, 1); + } + + myConn = getDeviceConnection(); + if(!myConn) + { + ArLog::log(ArLog::Normal, "ArRVisionPTZ: opening connection to camera on COM3..."); + ArSerialConnection *ser = new ArSerialConnection(); + if(ser->open(mySerialPort) != 0) + { + ArLog::log(ArLog::Terse, "ArRVisionPTZ: error opening %s for camera PTZ control, initialization failed.", mySerialPort); + myConn = NULL; + return false; + } + myConn = ser; + } + + myPacket.empty(); + myPacket.uByteToBuf(0x88); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0x00); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0xff); + myPacket.uByteToBuf(0x88); + myPacket.uByteToBuf(0x30); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0xff); + + if (!sendPacket(&myPacket)) + { + ArLog::log(ArLog::Terse, "ArRVisionPTZ: Error sending initialization packet to RVision camera!"); + return false; + } + if (!panTilt(0, 0)) + return false; + if (!zoom(0)) + return false; + return true; +} + +AREXPORT bool ArRVisionPTZ::panTilt_i(double degreesPan, double degreesTilt) +{ + if (degreesPan > MAX_PAN) + degreesPan = MAX_PAN; + if (degreesPan < MIN_PAN) + degreesPan = MIN_PAN; + myPan = degreesPan; + + if (degreesTilt > MAX_TILT) + degreesTilt = MAX_TILT; + if (degreesTilt < MIN_TILT) + degreesTilt = MIN_TILT; + myTilt = degreesTilt; + + myPanTiltPacket.byte2ToBufAtPos(ArMath::roundInt((myPan+myPanOffsetInDegrees) * myDegToPan), 6); + myPanTiltPacket.byte2ToBufAtPos(ArMath::roundInt((myTilt+myTiltOffsetInDegrees) * myDegToTilt), 10); + return sendPacket(&myPanTiltPacket); +} + +AREXPORT bool ArRVisionPTZ::panTiltRel_i(double degreesPan, double degreesTilt) +{ + return panTilt_i(myPan + degreesPan, myTilt + degreesTilt); +} + +AREXPORT bool ArRVisionPTZ::pan_i(double degrees) +{ + return panTilt_i(degrees, myTilt); +} + +AREXPORT bool ArRVisionPTZ::panRel_i(double degrees) +{ + return panTiltRel_i(degrees, 0); +} + +AREXPORT bool ArRVisionPTZ::tilt_i(double degrees) +{ + return panTilt_i(myPan, degrees); +} + +AREXPORT bool ArRVisionPTZ::tiltRel_i(double degrees) +{ + return panTiltRel_i(0, degrees); +} + +AREXPORT bool ArRVisionPTZ::zoom(int zoomValue) +{ + //printf("ArRVision::zoom(%d)\n", zoomValue); + if (zoomValue > MAX_ZOOM) + zoomValue = MAX_ZOOM; + if (zoomValue < MIN_ZOOM) + zoomValue = MIN_ZOOM; + myZoom = zoomValue; + + myZoomPacket.byte2ToBufAtPos(ArMath::roundInt(myZoom), 4); + return sendPacket(&myZoomPacket); +} + +AREXPORT bool ArRVisionPTZ::zoomRel(int zoomValue) +{ + return zoom(myZoom + zoomValue); +} + +/* +AREXPORT bool ArRVisionPTZ::packetHandler(ArRobotPacket *packet) +{ + if (packet->getID() != 0xE0) + return false; + + return true; +} +*/ + +#define ARRVISION_MAX_RESPONSE_BYTES 16 +//AREXPORT bool ArRVisionPTZ::packetHandler(ArBasePacket *packet) +ArBasePacket * ArRVisionPTZ::readPacket(void) +{ + unsigned char data[ARRVISION_MAX_RESPONSE_BYTES]; + unsigned char byte; + int num; + memset(data, ARRVISION_MAX_RESPONSE_BYTES, 0); + for (num=0; num <= ARRVISION_MAX_RESPONSE_BYTES+1; num++) { + if (myConn->read((char *) &byte, 1,1) <= 0 || + num == ARRVISION_MAX_RESPONSE_BYTES+1) { + return NULL; + } + else if (byte == 0x90) { + data[0] = byte; + //printf("ArRVisionPTZ::packetHandler: got 0x%x, expecting packet\n", byte); + break; + } + else { + //printf("ArRVisionPTZ::packetHandler: got 0x%x, skipping\n", byte); + } + } + // we got the header + for (num=1; num <= ARRVISION_MAX_RESPONSE_BYTES; num++) { + if (myConn->read((char *) &byte, 1, 1) <= 0) { + // there are no more bytes, so check the last byte for the footer + if (data[num-1] != 0xFF) { + //printf("ArRVisionPTZ::packetHandler: should have gotten 0xFF, got 0x%x\n", data[num-1]); + return NULL; + } + else { + break; + } + } + else { + // add the byte to the array + data[num] = byte; + } + } + // print the data for now + //printf("ArRVisionPTZ::packetHandler: got packet!\n"); + //for (int i=0; i <= num; i++) { + //printf("\t[%d]: 0x%x\n", i, data[i]); + //} + return NULL; +} + +ArPTZConnector::GlobalPTZCreateFunc ArRVisionPTZ::ourCreateFunc(&ArRVisionPTZ::create); + +ArPTZ* ArRVisionPTZ::create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot) +{ + ArRVisionPTZ *ptz = new ArRVisionPTZ(robot); + if(params.serialPort != "" && params.serialPort != "none") + ptz->setPort(params.serialPort.c_str()); + return ptz; +} + +void ArRVisionPTZ::registerPTZType() +{ + ArPTZConnector::registerPTZType("rvision", &ourCreateFunc); +} diff --git a/Legacy/Aria/src/ArRangeBuffer.cpp b/Legacy/Aria/src/ArRangeBuffer.cpp new file mode 100644 index 0000000..2959069 --- /dev/null +++ b/Legacy/Aria/src/ArRangeBuffer.cpp @@ -0,0 +1,543 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRangeBuffer.h" +#include "ArLog.h" + +/** @param size The size of the buffer, in number of readings */ +AREXPORT ArRangeBuffer::ArRangeBuffer(int size) +{ + mySize = size; +} + +AREXPORT ArRangeBuffer::~ArRangeBuffer() +{ + ArUtil::deleteSet(myBuffer.begin(), myBuffer.end()); + ArUtil::deleteSet(myInvalidBuffer.begin(), myInvalidBuffer.end()); +} + +AREXPORT size_t ArRangeBuffer::getSize(void) const +{ + return mySize; +} + +AREXPORT ArPose ArRangeBuffer::getPoseTaken() const +{ + return myBufferPose; +} + +AREXPORT void ArRangeBuffer::setPoseTaken(ArPose p) +{ + myBufferPose = p; +} + +AREXPORT ArPose ArRangeBuffer::getEncoderPoseTaken() const +{ + return myEncoderBufferPose; +} + +AREXPORT void ArRangeBuffer::setEncoderPoseTaken(ArPose p) +{ + myEncoderBufferPose = p; +} + +/** + If the new size is smaller than the current buffer it chops off the + readings that are excess from the oldest readings... if the new size + is larger then it just leaves room for the buffer to grow + @param size number of readings to set the buffer to +*/ +AREXPORT void ArRangeBuffer::setSize(size_t size) +{ + mySize = size; + // if its smaller then chop the lists down to size + while (myInvalidBuffer.size() + myBuffer.size() > mySize) + { + if ((myRevIterator = myInvalidBuffer.rbegin()) != myInvalidBuffer.rend()) + { + myReading = (*myRevIterator); + myInvalidBuffer.pop_back(); + delete myReading; + } + else if ((myRevIterator = myBuffer.rbegin()) != myBuffer.rend()) + { + myReading = (*myRevIterator); + myBuffer.pop_back(); + delete myReading; + } + } +} + +/** + This function returns a pointer to a list that has all of the readings + in it. This list is mostly for reference, ie for finding some + particular value or for using the readings to draw them. Don't do + any modification at all to the list unless you really know what you're + doing... and if you do you'd better lock the rangeDevice this came from + so nothing messes with the list while you are doing so. + @return the list of positions this range buffer has +*/ +AREXPORT const std::list *ArRangeBuffer::getBuffer(void) const +{ + return &myBuffer; +} + +/** + This function returns a pointer to a list that has all of the readings + in it. This list is mostly for reference, ie for finding some + particular value or for using the readings to draw them. Don't do + any modification at all to the list unless you really know what you're + doing... and if you do you'd better lock the rangeDevice this came from + so nothing messes with the list while you are doing so. + @return the list of positions this range buffer has +*/ +AREXPORT std::list *ArRangeBuffer::getBuffer(void) +{ + return &myBuffer; +} + + +/** + Gets the closest reading in a region defined by startAngle going to + endAngle... going counterclockwise (neg degrees to poseitive... with + how the robot is set up, thats counterclockwise)... from -180 to 180... + this means if you want the slice between 0 and 10 degrees, + you must enter it as 0, 10, if you do 10, 0 you'll get the 350 degrees + between 10 and 0... be especially careful with negative... for example + -30 to -60 is everything from -30, around through 0, 90, and 180 back to + -60... since -60 is actually to clockwise of -30 + @param startAngle where to start the slice + @param endAngle where to end the slice, going clockwise from startAngle + @param startPos the position to find the closest reading to (usually + the robots position) + @param maxRange the maximum range to return (and what to return if nothing + found) + @param angle a pointer return of the angle to the found reading + @return if the return is >= 0 and <= maxRange then this is the distance + to the closest reading, if it is >= maxRange, then there was no reading + in the given section +*/ +AREXPORT double ArRangeBuffer::getClosestPolar(double startAngle, + double endAngle, + ArPose startPos, + unsigned int maxRange, + double *angle) const +{ + return getClosestPolarInList(startAngle, endAngle, + startPos, maxRange, angle, &myBuffer); +} + +AREXPORT double ArRangeBuffer::getClosestPolarInList( + double startAngle, double endAngle, ArPose startPos, + unsigned int maxRange, double *angle, + const std::list *buffer) +{ + double closest; + bool foundOne = false; + std::list::const_iterator it; + ArPoseWithTime *reading; + double th; + double closeTh; + double dist; + double angle1, angle2; + + startAngle = ArMath::fixAngle(startAngle); + endAngle = ArMath::fixAngle(endAngle); + + for (it = buffer->begin(); it != buffer->end(); ++it) + { + reading = (*it); + + angle1=startPos.findAngleTo(*reading); + angle2=startPos.getTh(); + th = ArMath::subAngle(angle1, angle2); + if (ArMath::angleBetween(th, startAngle, endAngle)) + { + if (!foundOne || (dist = reading->findDistanceTo(startPos)) < closest) + { + closeTh = th; + if (!foundOne) + closest = reading->findDistanceTo(startPos); + else + closest = dist; + foundOne = true; + } + } + } + if (!foundOne) + return maxRange; + if (angle != NULL) + *angle = closeTh; + if (closest > maxRange) + return maxRange; + else + return closest; +} + +/** + Gets the closest reading in a region defined by two points (opposeite points + of a rectangle). + @param x1 the x coordinate of one of the rectangle points + @param y1 the y coordinate of one of the rectangle points + @param x2 the x coordinate of the other rectangle point + @param y2 the y coordinate of the other rectangle point + @param startPos the position to find the closest reading to (usually + the robots position) + @param maxRange the maximum range to return (and what to return if nothing + found) + @param readingPos a pointer to a position in which to store the location of + the closest position + @param targetPose the origin of the local coords for the definition of the + coordinates, e.g. ArRobot::getPosition() to center the box on the robot + @return if the return is >= 0 and <= maxRange then this is the distance + to the closest reading, if it is >= maxRange, then there was no reading + in the given section +*/ +AREXPORT double ArRangeBuffer::getClosestBox(double x1, double y1, double x2, + double y2, ArPose startPos, + unsigned int maxRange, + ArPose *readingPos, + ArPose targetPose) const +{ + return getClosestBoxInList(x1, y1, x2, y2, startPos, maxRange, readingPos, + targetPose, &myBuffer); +} + +/** + Get closest reading in a region defined by two points (opposeite points + of a rectangle) from a given list readings (rather than the readings + stored in an ArRangeBuffer) + + @param x1 the x coordinate of one of the rectangle points + @param y1 the y coordinate of one of the rectangle points + @param x2 the x coordinate of the other rectangle point + @param y2 the y coordinate of the other rectangle point + @param startPos the position to find the closest reading to (usually + the robots position) + @param maxRange the maximum range to return (and what to return if nothing + found) + @param readingPos a pointer to a position in which to store the location of + the closest position + @param targetPose the origin of the local coords for the definition of the + coordinates, normally just ArRobot::getPosition() + @param buffer Use the reading positions from this list + @param targetPose the pose to see if we're closest too (in local coordinates), this should nearly always be the default of 0 0 0 + @return if the return is >= 0 and <= maxRange then this is the distance + to the closest reading, if it is >= maxRange, then there was no reading + in the given section +*/ +AREXPORT double ArRangeBuffer::getClosestBoxInList( + double x1, double y1, double x2, double y2, ArPose startPos, + unsigned int maxRange, ArPose *readingPos, ArPose targetPose, + const std::list *buffer) + +{ + double closest = maxRange; + double dist; + ArPose closestPos; + std::list::const_iterator it; + ArTransform trans; + ArPoseWithTime pose; + ArPose zeroPos; + + double temp; + + zeroPos.setPose(0, 0, 0); + trans.setTransform(startPos, zeroPos); + + if (x1 >= x2) + { + temp = x1, + x1 = x2; + x2 = temp; + } + if (y1 >= y2) + { + temp = y1, + y1 = y2; + y2 = temp; + } + + for (it = buffer->begin(); it != buffer->end(); ++it) + { + pose = trans.doTransform(*(*it)); + + // see if its in the box + if (pose.getX() >= x1 && pose.getX() <= x2 && + pose.getY() >= y1 && pose.getY() <= y2) + { + dist = pose.findDistanceTo(targetPose); + //pose.log(); + if (dist < closest) + { + closest = dist; + closestPos = pose; + } + } + } + + if (readingPos != NULL) + *readingPos = closestPos; + if (closest > maxRange) + return maxRange; + else + return closest; +} + +/** + Applies a transform to the buffers.. this is mostly useful for translating + to/from local/global coords, but may have other uses + @param trans the transform to apply to the data +*/ +AREXPORT void ArRangeBuffer::applyTransform(ArTransform trans) +{ + trans.doTransform(&myBuffer); +} + +AREXPORT void ArRangeBuffer::clear(void) +{ + beginRedoBuffer(); + endRedoBuffer(); +} + +AREXPORT void ArRangeBuffer::reset(void) +{ + clear(); +} + +AREXPORT void ArRangeBuffer::clearOlderThan(int milliSeconds) +{ + std::list::iterator it; + + beginInvalidationSweep(); + for (it = myBuffer.begin(); it != myBuffer.end(); ++it) + { + if ((*it)->getTime().mSecSince() > milliSeconds) + invalidateReading(it); + } + endInvalidationSweep(); +} + +AREXPORT void ArRangeBuffer::clearOlderThanSeconds(int seconds) +{ + clearOlderThan(seconds*1000); +} + +/** + To redo the buffer means that you want to replace all + of the readings in the buffer with new pose values, and get rid of the + readings that you didn't update with new values (invalidate them). + The three functions beginRedoBuffer(), + redoReading(), and endRedoBuffer() are all made to enable you to do this. + First call beginRedoBuffer(). Then for each reading you want + to update in the buffer, call redoReading(double x, double y), then + when you are done, call endRedoBuffer(). +**/ +AREXPORT void ArRangeBuffer::beginRedoBuffer(void) +{ + myRedoIt = myBuffer.begin(); + myHitEnd = false; + myNumRedone = 0; +} + +/** + For a description of how to use this, see beginRedoBuffer() + @param x the x param of the coord to add to the buffer + @param y the x param of the coord to add to the buffer +*/ +AREXPORT void ArRangeBuffer::redoReading(double x, double y) +{ + if (myRedoIt != myBuffer.end() && !myHitEnd) + { + (*myRedoIt)->setPose(x, y); + myRedoIt++; + } + // if we don't, add more (its just moving from buffers here, + //but let the class for this do the work + else + { + addReading(x,y); + myHitEnd = true; + } + myNumRedone++; +} + +/** + For a description of how to use this, see beginRedoBuffer() +**/ +AREXPORT void ArRangeBuffer::endRedoBuffer(void) +{ + if (!myHitEnd) + { + // now we get rid of the extra readings on the end + beginInvalidationSweep(); + while (myRedoIt != myBuffer.end()) + { + invalidateReading(myRedoIt); + myRedoIt++; + } + endInvalidationSweep(); + } +} + +/** + @param x the x position of the reading + @param y the y position of the reading + + @param closeDistSquared if the new reading is within + closeDistSquared distanceSquared of an old point the old point is + just updated for time + + @param wasAdded pointed to set to true if the reading was added, or false if not +*/ +AREXPORT void ArRangeBuffer::addReadingConditional( + double x, double y, double closeDistSquared, bool *wasAdded) +{ + if (closeDistSquared >= 0) + { + std::list::iterator it; + ArPoseWithTime *pose; + for (it = myBuffer.begin(); it != myBuffer.end(); ++it) + { + pose = (*it); + if (ArMath::squaredDistanceBetween(pose->getX(), pose->getY(), + x, y) < closeDistSquared) + { + pose->setTimeToNow(); + if (wasAdded != NULL) + *wasAdded = false; + return; + } + } + } + + if (wasAdded != NULL) + *wasAdded = true; + addReading(x, y); +} + +/** + @param x the x position of the reading + @param y the y position of the reading +*/ +AREXPORT void ArRangeBuffer::addReading(double x, double y) +{ + if (myBuffer.size() < mySize) + { + if ((myIterator = myInvalidBuffer.begin()) != myInvalidBuffer.end()) + { + myReading = (*myIterator); + myReading->setPose(x, y); + myReading->setTimeToNow(); + myBuffer.push_front(myReading); + myInvalidBuffer.pop_front(); + } + else + myBuffer.push_front(new ArPoseWithTime(x, y)); + } + else if ((myRevIterator = myBuffer.rbegin()) != myBuffer.rend()) + { + myReading = (*myRevIterator); + myReading->setPose(x, y); + myReading->setTimeToNow(); + myBuffer.pop_back(); + myBuffer.push_front(myReading); + } +} + +/** + This is a set of funkiness used to invalid readings in the buffer. + It is fairly complicated. But what you need to do, is set up the invalid + sweeping with beginInvalidationSweep, then walk through the list of + readings, and pass the iterator to a reading you want to invalidate to + invalidateReading, then after you are all through walking the list call + endInvalidationSweep. Look at the description of getBuffer for additional + warnings. + @see invalidateReading + @see endInvalidationSweep +*/ +void ArRangeBuffer::beginInvalidationSweep(void) +{ + myInvalidSweepList.clear(); +} + +/** + See the description of beginInvalidationSweep, it describes how to use + this function. + @param readingIt the ITERATOR to the reading you want to get rid of + @see beginInvaladationSweep + @see endInvalidationSweep +*/ +AREXPORT void ArRangeBuffer::invalidateReading( + std::list::iterator readingIt) +{ + myInvalidSweepList.push_front(readingIt); +} + +/** + See the description of beginInvalidationSweep, it describes how to use + this function. + @see beginInvalidationSweep + @see invalidateReading +*/ +void ArRangeBuffer::endInvalidationSweep(void) +{ + while ((myInvalidIt = myInvalidSweepList.begin()) != + myInvalidSweepList.end()) + { + //printf("nuked one before %d %d\n", myBuffer.size(), myInvalidBuffer.size()); + myReading = (*(*myInvalidIt)); + myInvalidBuffer.push_front(myReading); + myBuffer.erase((*myInvalidIt)); + myInvalidSweepList.pop_front(); + //printf("after %d %d\n", myBuffer.size(), myInvalidBuffer.size()); + } +} + +/** + Copy the readings from this buffer to a vector stored within + this object, and return a pointer to that vector. + Note that the actual vector object is stored within ArRangeBuffer, + be careful if accessing it from multiple threads. + @return Pointer to reading vector. +*/ +AREXPORT std::vector *ArRangeBuffer::getBufferAsVector(void) +{ + std::list::iterator it; + + myVector.reserve(myBuffer.size()); + myVector.clear(); + // start filling the array with the buffer until we run out of + // readings or its full + for (it = myBuffer.begin(); it != myBuffer.end(); it++) + { + myVector.insert(myVector.begin(), *(*it)); + } + return &myVector; +} + + diff --git a/Legacy/Aria/src/ArRangeDevice.cpp b/Legacy/Aria/src/ArRangeDevice.cpp new file mode 100644 index 0000000..504b686 --- /dev/null +++ b/Legacy/Aria/src/ArRangeDevice.cpp @@ -0,0 +1,629 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRangeDevice.h" +#include "ArRobot.h" + +/** + @param currentBufferSize number of readings to store in the current + buffer + + @param cumulativeBufferSize number of readings to store in the + cumulative buffer + + @param name the name of this device + + @param maxRange the maximum range of this device. If the device + can't find a reading in a specified section, it returns this + maxRange + + @param maxSecondsToKeepCurrent this is the number of seconds to + keep current readings in the current buffer. If less than 0, then + readings are not automatically removed based on time (but can be + replaced or removed for other reasons). If 0, readings are removed + immediately when a new set of readings is received and placed in the current buffer. + + @param maxSecondsToKeepCumulative this is the number of seconds to + keep cumulative readings in the cumulative buffer. If less than 0 + then readings are not automatically based on time (but can be + replaced or removed for other reasons). + + @param maxDistToKeepCumulative if cumulative readings are further + than this distance from the current robot pose, then they are + removed. If this is less than 0 they are not removed because of + this + + @param locationDependent if the data in this range device is + dependent on the robot's location or not... For instance, a laser + would not be dependent on location, because it'll be correct in a + relative manner, whereas forbidden lines are dependent on location, + because if the robot isn't where it thinks it is then the forbidden + lines will be avoided in the wrong spots... this is mainly just a + flag for other things to use when deciding what range devices to + avoid + +**/ +AREXPORT ArRangeDevice::ArRangeDevice(size_t currentBufferSize, + size_t cumulativeBufferSize, + const char *name, + unsigned int maxRange, + int maxSecondsToKeepCurrent, + int maxSecondsToKeepCumulative, + double maxDistToKeepCumulative, + bool locationDependent) : + myCurrentBuffer(currentBufferSize), + myCumulativeBuffer(cumulativeBufferSize), + myFilterCB(this, &ArRangeDevice::filterCallback) +{ + myDeviceMutex.setLogName("ArRangeDevice::myDeviceMutex"); + myRobot = NULL; + myName = name; + myMaxRange = maxRange; + myRawReadings = NULL; + myAdjustedRawReadings = NULL; + + // take out any spaces in the name since that'll break things + int i; + int len = myName.size(); + for (i = 0; i < len; i++) + { + if (isspace(myName[i])) + myName[i] = '_'; + } + + setMaxSecondsToKeepCurrent(maxSecondsToKeepCurrent); + setMinDistBetweenCurrent(0); + setMaxSecondsToKeepCumulative(maxSecondsToKeepCumulative); + setMaxDistToKeepCumulative(maxDistToKeepCumulative); + setMinDistBetweenCumulative(0); + setMaxInsertDistCumulative(0); + + myCurrentDrawingData = NULL; + myOwnCurrentDrawingData = false; + myCumulativeDrawingData = NULL; + myOwnCumulativeDrawingData = false; + myIsLocationDependent = locationDependent; + + //setMinDistBetweenCurrent(); + //setMinDistBetweenCumulative(); +} + +AREXPORT ArRangeDevice::~ArRangeDevice() +{ + if (myRobot != NULL) + myRobot->remSensorInterpTask(&myFilterCB); + + if (myCurrentDrawingData != NULL && myOwnCurrentDrawingData) + { + delete myCurrentDrawingData; + myCurrentDrawingData = NULL; + myOwnCurrentDrawingData = false; + } + if (myCumulativeDrawingData != NULL && myOwnCumulativeDrawingData) + { + delete myCumulativeDrawingData; + myCumulativeDrawingData = NULL; + myOwnCumulativeDrawingData = false; + } +} + + +AREXPORT const char * ArRangeDevice::getName(void) const +{ + return myName.c_str(); +} + +AREXPORT void ArRangeDevice::setRobot(ArRobot *robot) +{ + char buf[512]; + sprintf(buf, "filter %s", getName()); + + if (myRobot != NULL) + myRobot->remSensorInterpTask(&myFilterCB); + + myRobot = robot; + + if (myRobot != NULL) + myRobot->addSensorInterpTask(buf, 100, &myFilterCB); +} + +AREXPORT ArRobot *ArRangeDevice::getRobot(void) +{ + return myRobot; +} + +AREXPORT void ArRangeDevice::filterCallback(void) +{ + std::list::iterator it; + lockDevice(); + + myMaxInsertDistCumulativePose = myRobot->getPose(); + + // first filter the current readings based on time + if (myMaxSecondsToKeepCurrent > 0 && + myCurrentBuffer.getSize() > 0) + { + // just walk through and make sure nothings too far away + myCurrentBuffer.beginInvalidationSweep(); + for (it = getCurrentBuffer()->begin(); + it != getCurrentBuffer()->end(); + ++it) + { + if ((*it)->getTime().secSince() >= myMaxSecondsToKeepCurrent) + myCurrentBuffer.invalidateReading(it); + } + myCurrentBuffer.endInvalidationSweep(); + } + + if (myCumulativeBuffer.getSize() == 0) + { + unlockDevice(); + return; + } + + // okay done with current, now do the cumulative + bool doingDist = true; + bool doingAge = true; + + if (myMaxDistToKeepCumulativeSquared < 1) + doingDist = false; + if (myMaxSecondsToKeepCumulative <= 0) + doingAge = false; + + if (!doingDist && !doingAge) + { + unlockDevice(); + return; + } + + // just walk through and make sure nothings too far away + myCumulativeBuffer.beginInvalidationSweep(); + for (it = getCumulativeBuffer()->begin(); + it != getCumulativeBuffer()->end(); + ++it) + { + // if its closer to a reading than the filter near dist, just return + if (doingDist && + (myRobot->getPose().squaredFindDistanceTo(*(*it)) > + myMaxDistToKeepCumulativeSquared)) + myCumulativeBuffer.invalidateReading(it); + else if (doingAge && + (*it)->getTime().secSince() >= myMaxSecondsToKeepCumulative) + myCumulativeBuffer.invalidateReading(it); + } + myCumulativeBuffer.endInvalidationSweep(); + unlockDevice(); +} + +/** + If the @a size is smaller than the current buffer size, then + the oldest readings are discarded, leaving only @a size + newest readings. If @a size is larger than the current size, + then the buffer size will be allowed to grow to that size as new readings + are added. + @param size number of readings to set the buffer's maximum size to +*/ +AREXPORT void ArRangeDevice::setCurrentBufferSize(size_t size) +{ + myCurrentBuffer.setSize(size); +} + +AREXPORT size_t ArRangeDevice::getCurrentBufferSize(void) const +{ + return myCurrentBuffer.getSize(); +} + +/** + If the @a size is smaller than the cumulative buffer size, then + the oldest readings are discarded, leaving only @a size + newest readings. If @a size is larger than the cumulative buffer size, + then the buffer size will be allowed to grow to that size as new readings + are added. + @param size number of readings to set the buffer to +*/ +AREXPORT void ArRangeDevice::setCumulativeBufferSize(size_t size) +{ + myCumulativeBuffer.setSize(size); +} + + +AREXPORT size_t ArRangeDevice::getCumulativeBufferSize(void) const +{ + return myCumulativeBuffer.getSize(); +} + +AREXPORT void ArRangeDevice::addReading(double x, double y, bool *wasAdded) +{ + myCurrentBuffer.addReadingConditional(x, y, + myMinDistBetweenCurrentSquared, + wasAdded); + + // make sure we have a cumulative buffer + if (myCumulativeBuffer.getSize() == 0) + return; + + // see if we're doing a max distance + if (myRobot != NULL && myMaxInsertDistCumulativeSquared > 0 && + ArMath::squaredDistanceBetween( + myMaxInsertDistCumulativePose.getX(), + myMaxInsertDistCumulativePose.getY(), + x, y) > myMaxInsertDistCumulativeSquared) + return; + + myCumulativeBuffer.addReadingConditional( + x, y, myMinDistBetweenCumulativeSquared); +} + +/** + * The closest reading within a polar region or "slice" defined by the given + * angle range is returned. Optionally, the specific angle of the found may be + * placed in @a angle, if not NULL. + * The region searched is the region between @a startAngle, sweeping + * counter-clockwise to @a endAngle (0 is straight ahead of the device, + * -90 to the right, 90 to the left). Note that therefore there is a difference between + * e.g. the regions (0, 10) and (10, 0). (0, 10) is a 10-degree span near the front + * of the device, while (10, 0) is a 350 degree span covering the sides and + * rear. Similarly, (-60, -30) covers 30 degrees on the right hand side, while + * (-30, -60) covers 330 degrees. (-90, 90) is 180 degrees in front. (-180, + * 180) covers all sides of the robot. + * In other words, if you want the smallest + * section between the two angles, ensure that @a startAngle < @a endAngle. + * + @param startAngle where to start the slice + @param endAngle where to end the slice, going counterclockwise from startAngle + @param angle if given, a pointer to a value in which to put the specific angle to the found reading + @return the range to the obstacle (a value >= the maximum range indicates that no reading was detected in the specified region) + + Example: + @image html ArRangeDevice_currentReadingPolar.png This figure illustrates an example range device and the meanings of arguments and return value. +*/ +AREXPORT double ArRangeDevice::currentReadingPolar(double startAngle, + double endAngle, + double *angle) const +{ + ArPose pose; + if (myRobot != NULL) + pose = myRobot->getPose(); + else + { + ArLog::log(ArLog::Normal, "ArRangeDevice %s: NULL robot, won't get polar reading correctly", getName()); + pose.setPose(0, 0); + } + return myCurrentBuffer.getClosestPolar(startAngle, endAngle, + pose, + myMaxRange, + angle); +} + +/** + * The closest reading in this range device's cumulative buffer + * within a polar region or "slice" defined by the given + * angle range is returned. Optionally return the specific angle of the found reading as + * well. The region searched is the region between a starting angle, sweeping + * counter-clockwise to the ending angle (0 is straight ahead of the device, + * -90 to the right, 90 to the left). Note that there is a difference between + * the region (0, 10) and (10, 0). (0, 10) is a 10-degree span near the front + * of the device, while (10, 0) is a 350 degree span covering the sides and + * rear. Similarly, (-60, -30) covers 30 degrees on the right hand side, while + * (-30, -60) covers 330 degrees. + * In other words, if you want the smallest + * section between the two angles, ensure than startAngle < endAngle. + @param startAngle where to start the slice + @param endAngle where to end the slice, going counterclockwise from startAngle + @param angle if given, a pointer to a value in which to put the specific angle to the found reading + @return the range to the obstacle (a value >= the maximum range indicates that no reading was detected in the specified region) + + Example: + @image html ArRangeDevice_currentReadingPolar.png This figure illustrates an example range device and the meanings of arguments and return value. +*/ +AREXPORT double ArRangeDevice::cumulativeReadingPolar(double startAngle, + double endAngle, + double *angle) const +{ + ArPose pose; + if (myRobot != NULL) + pose = myRobot->getPose(); + else + { + ArLog::log(ArLog::Normal, "ArRangeDevice %s: NULL robot, won't get polar reading correctly", getName()); + pose.setPose(0, 0); + } + return myCumulativeBuffer.getClosestPolar(startAngle, endAngle, + pose, + myMaxRange, + angle); +} + +/** + Get the closest reading in the current buffer within a rectangular region + defined by two points (opposite corners of the rectangle). + @param x1 the x coordinate of one of the rectangle points + @param y1 the y coordinate of one of the rectangle points + @param x2 the x coordinate of the other rectangle point + @param y2 the y coordinate of the other rectangle point + @param pose a pointer to an ArPose object in which to store the location of + the closest position + @return The range to the reading from the device, or a value >= maxRange if + no reading was found in the box. +*/ +AREXPORT double ArRangeDevice::currentReadingBox(double x1, double y1, + double x2, double y2, + ArPose *pose) const +{ + ArPose robotPose; + if (myRobot != NULL) + robotPose = myRobot->getPose(); + else + { + ArLog::log(ArLog::Normal, "ArRangeDevice %s: NULL robot, won't get reading box correctly", getName()); + robotPose.setPose(0, 0); + } + return myCurrentBuffer.getClosestBox(x1, y1, x2, y2, robotPose, + myMaxRange, pose); +} + +/** + Get the closest reading in the cumulative buffer within a rectangular region + around the range device, defined by two points (opposeite points + of a rectangle). + @param x1 the x coordinate of one of the rectangle points + @param y1 the y coordinate of one of the rectangle points + @param x2 the x coordinate of the other rectangle point + @param y2 the y coordinate of the other rectangle point + @param pose a pointer to an ArPose object in which to store the location of + the closest position + @return The range to the reading from the device, or a value >= maxRange if + no reading was found in the box. +*/ +AREXPORT double ArRangeDevice::cumulativeReadingBox(double x1, double y1, + double x2, double y2, + ArPose *pose) const +{ + ArPose robotPose; + if (myRobot != NULL) + robotPose = myRobot->getPose(); + else + { + ArLog::log(ArLog::Normal, "ArRangeDevice %s: NULL robot, won't get reading box correctly", getName()); + robotPose.setPose(0, 0); + } + return myCumulativeBuffer.getClosestBox(x1, y1, x2, y2, + robotPose, + myMaxRange, pose); +} + +/** + Applies a coordinate transformation to some or all buffers. + This is mostly useful for translating + to/from local/global coordinate systems, but may have other uses. + @param trans the transform to apply to the data + @param doCumulative whether to transform the cumulative buffer or not +*/ +AREXPORT void ArRangeDevice::applyTransform(ArTransform trans, + bool doCumulative) +{ + myCurrentBuffer.applyTransform(trans); + if (doCumulative) + myCumulativeBuffer.applyTransform(trans); +} + +/** Copies the list into a vector. + * @swignote The return type will be named ArSensorReadingVector instead + * of the std::vector template type. + */ +AREXPORT std::vector *ArRangeDevice::getRawReadingsAsVector(void) +{ + + std::list::const_iterator it; + myRawReadingsVector.clear(); + // if we don't have any return an empty list + if (myRawReadings == NULL) + return &myRawReadingsVector; + myRawReadingsVector.reserve(myRawReadings->size()); + for (it = myRawReadings->begin(); it != myRawReadings->end(); it++) + myRawReadingsVector.insert(myRawReadingsVector.begin(), *(*it)); + return &myRawReadingsVector; +} + +/** Copies the list into a vector. + * @swignote The return type will be named ArSensorReadingVector instead + * of the std::vector template type. + */ +AREXPORT std::vector *ArRangeDevice::getAdjustedRawReadingsAsVector(void) +{ + + std::list::const_iterator it; + myAdjustedRawReadingsVector.clear(); + // if we don't have any return an empty list + if (myAdjustedRawReadings == NULL) + return &myRawReadingsVector; + myAdjustedRawReadingsVector.reserve(myRawReadings->size()); + for (it = myAdjustedRawReadings->begin(); + it != myAdjustedRawReadings->end(); + it++) + myAdjustedRawReadingsVector.insert(myAdjustedRawReadingsVector.begin(), + *(*it)); + return &myAdjustedRawReadingsVector; +} + + +AREXPORT void ArRangeDevice::setCurrentDrawingData(ArDrawingData *data, + bool takeOwnershipOfData) +{ + if (myCurrentDrawingData != NULL && myOwnCurrentDrawingData) + { + delete myCurrentDrawingData; + myCurrentDrawingData = NULL; + myOwnCurrentDrawingData = false; + } + myCurrentDrawingData = data; + myOwnCurrentDrawingData = takeOwnershipOfData; +} + +AREXPORT void ArRangeDevice::setCumulativeDrawingData( + ArDrawingData *data, + bool takeOwnershipOfData) +{ + if (myCumulativeDrawingData != NULL && myOwnCumulativeDrawingData) + { + delete myCumulativeDrawingData; + myCumulativeDrawingData = NULL; + myOwnCumulativeDrawingData = false; + } + myCumulativeDrawingData = data; + myOwnCumulativeDrawingData = takeOwnershipOfData; +} + +AREXPORT void ArRangeDevice::adjustRawReadings(bool interlaced) +{ + std::list::iterator rawIt; + + // make sure we have raw readings and a robot, and a delay to + // correct for (note that if we don't have a delay to correct for + // but have already been adjusting (ie someone changed the delay) + // we'll just keep adjusting) + if (myRawReadings == NULL || myRobot == NULL || + (myAdjustedRawReadings == NULL && myRobot->getOdometryDelay() == 0)) + return; + + + // if we don't already have a list then make one + if (myAdjustedRawReadings == NULL) + myAdjustedRawReadings = new std::list; + + // if we've already adjusted these readings then don't do it again + if (myRawReadings->begin() != myRawReadings->end() && + myRawReadings->front()->getAdjusted()) + return; + + std::list::iterator adjIt; + ArSensorReading *adjReading; + ArSensorReading *rawReading; + + ArTransform trans; + ArTransform encTrans; + ArTransform interlacedTrans; + ArTransform interlacedEncTrans; + + bool first = true; + bool second = true; + + int onReading; + for (rawIt = myRawReadings->begin(), adjIt = myAdjustedRawReadings->begin(), + onReading = 0; + rawIt != myRawReadings->end(); + rawIt++, onReading++) + { + rawReading = (*rawIt); + if (adjIt != myAdjustedRawReadings->end()) + { + adjReading = (*adjIt); + adjIt++; + } + else + { + adjReading = new ArSensorReading; + myAdjustedRawReadings->push_back(adjReading); + } + (*adjReading) = (*rawReading); + if (first || (interlaced && second)) + { + ArPose origPose; + ArPose corPose; + ArPose origEncPose; + ArPose corEncPose; + ArTime corTime; + + + corTime = rawReading->getTimeTaken(); + //corTime.addMSec(-myRobot->getOdometryDelay()); + if (myRobot->getPoseInterpPosition(corTime, + &corPose) == 1 && + myRobot->getEncoderPoseInterpPosition(corTime, + &corEncPose) == 1) + { + origPose = rawReading->getPoseTaken(); + origEncPose = rawReading->getEncoderPoseTaken(); + /* + printf("Difference was %g %g %g (rotVel %.0f, rotvel/40 %g)\n", + origEncPose.getX() - corEncPose.getX(), + origEncPose.getY() - corEncPose.getY(), + origEncPose.getTh() - corEncPose.getTh(), + myRobot->getRotVel(), myRobot->getRotVel() / 40); + */ + if (first) + { + trans.setTransform(origPose, corPose); + encTrans.setTransform(origEncPose, corEncPose); + } + else if (interlaced && second) + { + interlacedTrans.setTransform(origPose, corPose); + interlacedEncTrans.setTransform(origEncPose, corEncPose); + } + } + else + { + //printf("Couldn't correct\n"); + } + + if (first) + first = false; + else if (interlaced && second) + second = false; + + } + if (!interlaced && (onReading % 2) == 0) + { + adjReading->applyTransform(trans); + adjReading->applyEncoderTransform(encTrans); + } + else + { + adjReading->applyTransform(interlacedTrans); + adjReading->applyEncoderTransform(interlacedEncTrans); + } + /* + if (fabs(adjReading->getEncoderPoseTaken().getX() - + corEncPose.getX()) > 1 || + fabs(adjReading->getEncoderPoseTaken().getY() - + corEncPose.getY()) > 1 || + fabs(ArMath::subAngle(adjReading->getEncoderPoseTaken().getTh(), + corEncPose.getTh())) > .2) + printf("(%.0f %.0f %.0f) should be (%.0f %.0f %.0f)\n", + adjReading->getEncoderPoseTaken().getX(), + adjReading->getEncoderPoseTaken().getY(), + adjReading->getEncoderPoseTaken().getTh(), + corEncPose.getX(), corEncPose.getY(), corEncPose.getTh()); + */ + adjReading->setAdjusted(true); + rawReading->setAdjusted(true); + } +} + + + diff --git a/Legacy/Aria/src/ArRangeDeviceThreaded.cpp b/Legacy/Aria/src/ArRangeDeviceThreaded.cpp new file mode 100644 index 0000000..23a1aae --- /dev/null +++ b/Legacy/Aria/src/ArRangeDeviceThreaded.cpp @@ -0,0 +1,46 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRangeDeviceThreaded.h" + +AREXPORT ArRangeDeviceThreaded::ArRangeDeviceThreaded( + size_t currentBufferSize, size_t cumulativeBufferSize, + const char *name, unsigned int maxRange, + int maxSecondsToKeepCurrent, int maxSecondsToKeepCumulative, + double maxDistToKeepCumulative, bool locationDependent) : + ArRangeDevice(currentBufferSize, cumulativeBufferSize, name, maxRange, + maxSecondsToKeepCurrent, maxSecondsToKeepCumulative, + maxDistToKeepCumulative, locationDependent), + myRunThreadCB(this, &ArRangeDeviceThreaded::runThread), + myTask(&myRunThreadCB) +{ + myTask.setThreadName(name); +} + +AREXPORT ArRangeDeviceThreaded::~ArRangeDeviceThreaded() +{ +} diff --git a/Legacy/Aria/src/ArRatioInputJoydrive.cpp b/Legacy/Aria/src/ArRatioInputJoydrive.cpp new file mode 100644 index 0000000..d460c8c --- /dev/null +++ b/Legacy/Aria/src/ArRatioInputJoydrive.cpp @@ -0,0 +1,153 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRatioInputJoydrive.h" +#include "ArRobot.h" +#include "ariaInternal.h" + +/** + @param robot robot + @param input Action to attach to and use to drive the robot. + @param priority Priority of this joystick input handler with respect to other input + objects attached to the @a input action object. + @param stopIfNoButtonPressed if this is true and there is a + joystick and no button is pressed, we cause the action to stop the robot. + .. otherwise it'll do nothing (letting lower priority actions + fire) + + @param useOSCalForJoystick if this is true we'll use the OS + calibration, if false we'll do our own. See also ArJoyHandler::setUseOSCal() +**/ + +AREXPORT ArRatioInputJoydrive::ArRatioInputJoydrive( + ArRobot *robot, + ArActionRatioInput *input, + int priority, + bool stopIfNoButtonPressed, + bool useOSCalForJoystick) : + myFireCB(this, &ArRatioInputJoydrive::fireCallback) +{ + myRobot = robot; + myInput = input; + myInput->addFireCallback(priority, &myFireCB); + myFireCB.setName("Joydrive"); + if ((myJoyHandler = Aria::getJoyHandler()) == NULL) + { + myJoyHandler = new ArJoyHandler; + myJoyHandler->init(); + Aria::setJoyHandler(myJoyHandler); + } + + myUseOSCal = useOSCalForJoystick; + myPreviousUseOSCal = myUseOSCal; + myStopIfNoButtonPressed = stopIfNoButtonPressed; + myFiredLast = false; + myPrinting = false; +} + +AREXPORT ArRatioInputJoydrive::~ArRatioInputJoydrive() +{ + myInput->remFireCallback(&myFireCB); +} + +AREXPORT void ArRatioInputJoydrive::setStopIfNoButtonPressed( + bool stopIfNoButtonPressed) +{ + myStopIfNoButtonPressed = stopIfNoButtonPressed; +} + +AREXPORT bool ArRatioInputJoydrive::getStopIfNoButtonPressed(void) +{ + return myStopIfNoButtonPressed; +} + +AREXPORT bool ArRatioInputJoydrive::joystickInited(void) +{ + return myJoyHandler->haveJoystick(); +} + +/** + @see ArJoyHandler::setUseOSCal +**/ +AREXPORT void ArRatioInputJoydrive::setUseOSCal(bool useOSCal) +{ + myUseOSCal = useOSCal; + myPreviousUseOSCal = useOSCal; + myJoyHandler->setUseOSCal(useOSCal); +} + +/** + @see ArJoyHandler::getUseOSCal +**/ +AREXPORT bool ArRatioInputJoydrive::getUseOSCal(void) +{ + return myUseOSCal; +} + + +void ArRatioInputJoydrive::fireCallback(void) +{ + double rot, trans, throttle; + + if (myPreviousUseOSCal != myUseOSCal) + { + myJoyHandler->setUseOSCal(myUseOSCal); + myPreviousUseOSCal = myUseOSCal; + } + + if (myJoyHandler->haveJoystick() && myJoyHandler->getButton(1)) + { + // get the readings from the joystick + myJoyHandler->getDoubles(&rot, &trans); + + if (!myJoyHandler->haveZAxis()) + { + throttle = 1; + } + // if we are using the throttle, interpolate its position between + // low and high throttle values + else + { + throttle = myJoyHandler->getAxis(3); + throttle += 1.0; + throttle /= 2.0; + } + myInput->setRatios(trans * 100, -rot * 100, throttle * 100); + myFiredLast = true; + if (myPrinting) + printf("joy %g %g %g\n", trans * 100, -rot * 100, throttle * 100); + } + else if (myJoyHandler->haveJoystick() && (myStopIfNoButtonPressed || + myFiredLast)) + { + if (myPrinting) + printf("joy nothing\n"); + myFiredLast = false; + myInput->setRatios(0, 0, myInput->getThrottleRatio()); + } + +} diff --git a/Legacy/Aria/src/ArRatioInputKeydrive.cpp b/Legacy/Aria/src/ArRatioInputKeydrive.cpp new file mode 100644 index 0000000..e8c1cde --- /dev/null +++ b/Legacy/Aria/src/ArRatioInputKeydrive.cpp @@ -0,0 +1,247 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRatioInputKeydrive.h" +#include "ArRobot.h" +#include "ariaInternal.h" +#include "ArKeyHandler.h" + +AREXPORT ArRatioInputKeydrive::ArRatioInputKeydrive(ArRobot *robot, + ArActionRatioInput *input, + int priority, + double velIncrement) : + myUpCB(this, &ArRatioInputKeydrive::up), + myDownCB(this, &ArRatioInputKeydrive::down), + myLeftCB(this, &ArRatioInputKeydrive::left), + myRightCB(this, &ArRatioInputKeydrive::right), + myZCB(this, &ArRatioInputKeydrive::z), + myXCB(this, &ArRatioInputKeydrive::x), + mySpaceCB(this, &ArRatioInputKeydrive::space), + myFireCB(this, &ArRatioInputKeydrive::fireCallback), + myActivateCB(this, &ArRatioInputKeydrive::activate), + myDeactivateCB(this, &ArRatioInputKeydrive::deactivate) +{ + myRobot = robot; + myInput = input; + myInput->addFireCallback(priority, &myFireCB); + myInput->addActivateCallback(&myActivateCB); + myInput->addDeactivateCallback(&myDeactivateCB); + myFireCB.setName("Keydrive"); + myVelIncrement = velIncrement; + myLatVelIncrement = velIncrement; + myHaveKeys = false; + myTransRatio = 0; + myRotRatio = 0; + myLatRatio = 0; + myThrottle = 100; + myPrinting = false; +} + +AREXPORT ArRatioInputKeydrive::~ArRatioInputKeydrive() +{ + myInput->remFireCallback(&myFireCB); + myInput->remActivateCallback(&myActivateCB); +} + + +AREXPORT void ArRatioInputKeydrive::takeKeys(void) +{ + myHaveKeys = true; + ArKeyHandler *keyHandler; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive::takeKeys: There is no key handler, keydrive will not work."); + } + // now that we have one, add our keys as callbacks, print out big + // warning messages if they fail + if (!keyHandler->addKeyHandler(ArKeyHandler::UP, &myUpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for up, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::DOWN, &myDownCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for down, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::LEFT, &myLeftCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for left, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::RIGHT, &myRightCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for right, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::SPACE, &mySpaceCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for space, keydrive will not work correctly."); + if (myRobot != NULL && myRobot->hasLatVel()) + { + if (!keyHandler->addKeyHandler('z', &myZCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for z, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('Z', &myZCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for Z, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('x', &myXCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for x, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('X', &myXCB)) + ArLog::log(ArLog::Terse, + "The key handler already has a key for x, keydrive will not work correctly."); + } +} + +AREXPORT void ArRatioInputKeydrive::giveUpKeys(void) +{ + ArKeyHandler *keyHandler; + myHaveKeys = false; + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive::giveUpKeys: There is no key handler, something is probably horribly wrong ."); + } + // now that we have one, add our keys as callbacks, print out big + // warning messages if they fail + if (!keyHandler->remKeyHandler(&myUpCB)) + ArLog::log(ArLog::Terse, "ArRatioInputKeydrive: The key handler already didn't have a key for up, something is wrong."); + if (!keyHandler->remKeyHandler(&myDownCB)) + ArLog::log(ArLog::Terse, "ArRatioInputKeydrive: The key handler already didn't have a key for down, something is wrong."); + if (!keyHandler->remKeyHandler(&myLeftCB)) + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive: The key handler already didn't have a key for left, something is wrong."); + if (!keyHandler->remKeyHandler(&myRightCB)) + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive: The key handler already didn't have a key for right, something is wrong."); + if (!keyHandler->remKeyHandler(&mySpaceCB)) + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive: The key handler didn't have a key for space, something is wrong."); + if (myRobot != NULL && myRobot->hasLatVel()) + { + if (!keyHandler->remKeyHandler(&myZCB)) + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive: The key handler didn't have a key for z, something is wrong."); + if (!keyHandler->remKeyHandler(&myXCB)) + ArLog::log(ArLog::Terse, + "ArRatioInputKeydrive: The key handler didn't have a key for x, something is wrong."); + } + +} + + +AREXPORT void ArRatioInputKeydrive::up(void) +{ + if (myPrinting) + printf("up\n"); + myTransRatio += myVelIncrement; + if (myTransRatio > 100) + myTransRatio = 100; +} + +AREXPORT void ArRatioInputKeydrive::down(void) +{ + if (myPrinting) + printf("down\n"); + myTransRatio -= myVelIncrement; + if (myTransRatio < -100) + myTransRatio = -100; +} + +AREXPORT void ArRatioInputKeydrive::left(void) +{ + if (myPrinting) + printf("left\n"); + myRotRatio = 100; +} + +AREXPORT void ArRatioInputKeydrive::right(void) +{ + if (myPrinting) + printf("right\n"); + myRotRatio = -100; +} + +AREXPORT void ArRatioInputKeydrive::space(void) +{ + if (myPrinting) + printf("stop\n"); + myTransRatio = 0; + myRotRatio = 0; + myLatRatio = 0; +} + +AREXPORT void ArRatioInputKeydrive::z(void) +{ + if (myPrinting) + printf("up\n"); + myLatRatio += myLatVelIncrement; + if (myLatRatio > 100) + myLatRatio = 100; +} + +AREXPORT void ArRatioInputKeydrive::x(void) +{ + if (myPrinting) + printf("down\n"); + myLatRatio -= myLatVelIncrement; + if (myLatRatio < -100) + myLatRatio = -100; +} + +AREXPORT void ArRatioInputKeydrive::activate(void) +{ + // set things so we'll stop + myTransRatio = 0; + myRotRatio = 0; + myLatRatio = 0; + if (myHaveKeys) + takeKeys(); +} + +AREXPORT void ArRatioInputKeydrive::deactivate(void) +{ + if (myHaveKeys) + giveUpKeys(); +} + +AREXPORT void ArRatioInputKeydrive::fireCallback(void) +{ + // set what we want to do + myInput->setTransRatio(myTransRatio); + myInput->setRotRatio(myRotRatio); + myInput->setLatRatio(myLatRatio); + myInput->setThrottleRatio(myThrottle); + + // reset us to going straight (if they're holding the key we'll keep turning) + myRotRatio = 0; + + if (myHaveKeys) + return; + ArKeyHandler *keyHandler; + + // see if there is already a keyhandler, if not make one for ourselves + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + myRobot->attachKeyHandler(keyHandler); + } + takeKeys(); +} diff --git a/Legacy/Aria/src/ArRatioInputRobotJoydrive.cpp b/Legacy/Aria/src/ArRatioInputRobotJoydrive.cpp new file mode 100644 index 0000000..2204581 --- /dev/null +++ b/Legacy/Aria/src/ArRatioInputRobotJoydrive.cpp @@ -0,0 +1,139 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRatioInputRobotJoydrive.h" +#include "ArRobot.h" +#include "ArRobotJoyHandler.h" +#include "ariaInternal.h" +#include "ArCommands.h" + +/** + @param robot robot + @param input Action to attach to and use to drive the robot. + @param priority Priority of this joystick input handler with respect to other input + objects attached to the @a input action object. + @param requireDeadmanPushed if this is true the joystick "dead man" button must be + pushed for us to drive. If this is false we'll follow the + joystick input no matter what +**/ + +AREXPORT ArRatioInputRobotJoydrive::ArRatioInputRobotJoydrive( + ArRobot *robot, ArActionRatioInput *input, + int priority, bool requireDeadmanPushed) : + myFireCB(this, &ArRatioInputRobotJoydrive::fireCallback) +{ + myRobot = robot; + myInput = input; + myRequireDeadmanPushed = requireDeadmanPushed; + myDeadZoneLast = false; + + if ((myRobotJoyHandler = Aria::getRobotJoyHandler()) == NULL) + { + myRobotJoyHandler = new ArRobotJoyHandler(robot); + Aria::setRobotJoyHandler(myRobotJoyHandler); + } + + myFireCB.setName("RobotJoydrive"); + myInput->addFireCallback(priority, &myFireCB); + +} + +AREXPORT ArRatioInputRobotJoydrive::~ArRatioInputRobotJoydrive() +{ + +} + +AREXPORT void ArRatioInputRobotJoydrive::fireCallback(void) +{ + bool printing = false; + + bool button1 = myRobotJoyHandler->getButton1(); + // if we need the deadman to activate and it isn't pushed just bail + if (myRequireDeadmanPushed && !button1) + { + if (printing) + printf("Nothing\n"); + myDeadZoneLast = false; + return; + } + + double rotRatio; + double transRatio; + double throttleRatio; + + myRobotJoyHandler->getDoubles(&rotRatio, &transRatio, &throttleRatio); + + rotRatio *= 100.0; + transRatio *= 100.0; + throttleRatio *= 100.0; + + bool doTrans = true; + bool doRot = true; + + + if (!myRequireDeadmanPushed) + { + doTrans = ArMath::fabs(transRatio) > 33; + doRot = ArMath::fabs(rotRatio) > 33; + } + + if (!doTrans && !doRot) + { + // if the joystick is in the center, we don't need the deadman, + // and we were stopped lasttime, then just let other stuff go + if (myDeadZoneLast && !myRequireDeadmanPushed) + { + if (printing) + printf("deadzone Nothing\n"); + return; + } + // if the deadman doesn't need to be pushed let something else happen here + if (printing) + printf("deadzone\n"); + //myInput->setRatios(transRatio, rotRatio, throttleRatio); + myInput->setRatios(0, 0, throttleRatio); + myDeadZoneLast = true; + return; + } + + myDeadZoneLast = false; + if (!doRot) + rotRatio = 0; + if (!doTrans) + transRatio = 0; + + if (printing) + printf("%.0f %.0f %.0f\n", transRatio, rotRatio, throttleRatio); + + if (printing) + printf("(%ld ms ago) we got %d %d %.2f %.2f %.2f (speed %.0f %.0f)\n", + myRobotJoyHandler->getDataReceivedTime().mSecSince(), + button1, myRobotJoyHandler->getButton2(), transRatio, rotRatio, + throttleRatio, myRobot->getVel(), myRobot->getRotVel()); + + myInput->setRatios(transRatio, rotRatio, throttleRatio); +} diff --git a/Legacy/Aria/src/ArRecurrentTask.cpp b/Legacy/Aria/src/ArRecurrentTask.cpp new file mode 100644 index 0000000..84d36ba --- /dev/null +++ b/Legacy/Aria/src/ArRecurrentTask.cpp @@ -0,0 +1,153 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +// Recurrent task class +#ifndef WIN32 +#include +#include +#endif +#include "ariaOSDef.h" +#include "ArASyncTask.h" +#include "ArLog.h" +#include "ArRecurrentTask.h" + +// +// Async recurrent tasks +// +// This class must be subclassed with the particular Task that will +// be run +// + +// constructor: start up thread, leave it ready for go() + +AREXPORT +ArRecurrentTask::ArRecurrentTask() +{ + setThreadName("ArRecurrentTask"); + running = go_req = killed = false; + create(); // create the thread +} + + +AREXPORT +ArRecurrentTask::~ArRecurrentTask() +{ + kill(); +} + +// Entry to the thread's main process +// Here we check if a Go request has been made, and +// if so, we run Task() +// When done, set running to false, and wait for +// the next request + +AREXPORT void * +ArRecurrentTask::runThread(void *ptr) +{ + threadStarted(); +#ifndef WIN32 + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); +#endif + while (myRunning) + { + bool doit; + + while (myRunning) + { + lock(); + doit = go_req; + unlock(); + if (doit) + break; +// yield(); // don't hog resources +#ifndef WIN32 + usleep(10000); +#else + Sleep(10); +#endif + } + if (!myRunning) + break; + lock(); + go_req = false; + running = true; // we've been requested to go + unlock(); + task(); // do what we've got to do... + lock(); + running = false; // say we're done + unlock(); + } + + threadFinished(); + return NULL; +} + +AREXPORT void ArRecurrentTask::go() +{ + lock(); + go_req = true; + running = true; + killed = false; + unlock(); +} + +AREXPORT int ArRecurrentTask::done() +{ + lock(); + bool is_running = running; + bool is_killed = killed; + unlock(); + if (is_running) return 0; + if (is_killed) return 2; // we didn't complete, were killed + else return 1; +} + +AREXPORT void ArRecurrentTask::reset() +{ + lock(); + go_req = false; + if (running) // async task is going, kill and restart + { + killed = true; + running = false; + unlock(); + cancel(); + create(); + } + else + unlock(); +} + +AREXPORT void ArRecurrentTask::kill() +{ + lock(); + go_req = false; + killed = true; + running = false; + unlock(); + cancel(); +} diff --git a/Legacy/Aria/src/ArRobot.cpp b/Legacy/Aria/src/ArRobot.cpp new file mode 100644 index 0000000..5c2c81e --- /dev/null +++ b/Legacy/Aria/src/ArRobot.cpp @@ -0,0 +1,7458 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include +#include + +#include "ArRobot.h" +#include "ArLog.h" +#include "ArDeviceConnection.h" +#include "ArTcpConnection.h" +#include "ArSerialConnection.h" +#include "ArLogFileConnection.h" +#include "ariaUtil.h" +#include "ArSocket.h" +#include "ArCommands.h" +#include "ArRobotTypes.h" +#include "ArSignalHandler.h" +#include "ArPriorityResolver.h" +#include "ArAction.h" +#include "ArRangeDevice.h" +#include "ArRobotConfigPacketReader.h" +#include "ArRobotBatteryPacketReader.h" +#include "ariaInternal.h" +#include "ArLaser.h" +#include "ArBatteryMTX.h" +#include "ArSonarMTX.h" +#include "ArLCDMTX.h" + + +/** + * The parameters only rarely need to be specified. + * + * @param name A name for this robot, useful if a program has more than one + * ArRobot object + + + @param obsolete This parameter is ignored. + (It used to turn off state reflection if false, but that + is no longer possible.) + + @param doSigHandle do normal signal handling and have this robot + instance stopRunning() when the program is signaled + + @param normalInit whether the robot should initializes its + structures or the calling program will take care of it. No one + will probalby ever use this value, since if they are doing that + then overriding will probably be more useful, but there it is. + + @param addAriaExitCallback If true (default), add callback to global Aria class + to stop running the processing loop and disconnect from robot + when Aria::exit() is called. If false, do not disconnect on Aria::exit() + +**/ + +AREXPORT ArRobot::ArRobot(const char *name, bool obsolete, + bool doSigHandle, bool normalInit, + bool addAriaExitCallback) : + myMotorPacketCB(this, &ArRobot::processMotorPacket), + myEncoderPacketCB(this, &ArRobot::processEncoderPacket), + myIOPacketCB(this, &ArRobot::processIOPacket), + myPacketHandlerCB(this, &ArRobot::packetHandler), + myActionHandlerCB(this, &ArRobot::actionHandler), + myStateReflectorCB(this, &ArRobot::stateReflector), + myRobotLockerCB(this, &ArRobot::robotLocker), + myRobotUnlockerCB(this, &ArRobot::robotUnlocker), + myKeyHandlerExitCB(this, &ArRobot::keyHandlerExit), + myGetCycleWarningTimeCB(this, &ArRobot::getCycleWarningTime), + myGetNoTimeWarningThisCycleCB(this, &ArRobot::getNoTimeWarningThisCycle), + myBatteryAverager(20), + myRealBatteryAverager(20), + myAriaExitCB(this, &ArRobot::ariaExitCallback), + myPoseInterpPositionCB(this, &ArRobot::getPoseInterpPosition), + myEncoderPoseInterpPositionCB(this, &ArRobot::getEncoderPoseInterpPosition) +{ + myMutex.setLogName("ArRobot::myMutex"); + myPacketMutex.setLogName("ArRobot::myPacketMutex"); + setName(name); + myAriaExitCB.setName("ArRobotExit"); + myNoTimeWarningThisCycle = false; + myGlobalPose.setPose(0, 0, 0); + mySetEncoderTransformCBList.setName("SetEncoderTransformCBList"); + + myParams = new ArRobotGeneric(""); + processParamFile(); + + /// MPL 20130509 making this default to true, so that things that + /// use loopOnce and not one of the run calls can work (the run + /// calls set this to whatever it should be anyway) + myRunningNonThreaded = true; + + myMotorPacketCB.setName("ArRobot::motorPacket"); + myEncoderPacketCB.setName("ArRobot::encoderPacket"); + myIOPacketCB.setName("ArRobot::IOPacket"); + + myInterpolation.setName("ArRobot::Interpolation"); + myEncoderInterpolation.setName("ArRobot::EncoderInterpolation"); + + myPtz = NULL; + myKeyHandler = NULL; + myKeyHandlerCB = NULL; + myMTXTimeUSecCB = NULL; + + myConn = NULL; + + myOwnTheResolver = false; + + myBlockingConnectRun = false; + myAsyncConnectFlag = false; + + myRequireConfigPacket = false; + + myLogMovementSent = false; + myLogMovementReceived = false; + myLogVelocitiesReceived = false; + myLogActions = false; + myLastVel = 0; + myLastRotVel = 0; + myLastHeading = 0; + myLastCalculatedRotVel = 0; + + myKeepControlRaw = false; + + myPacketsSentTracking = false; + myPacketsReceivedTracking = false; + myPacketsReceivedTrackingCount = false; + myPacketsReceivedTrackingStarted.setToNow(); + + myLogSIPContents = false; + + myCycleTime = 100; + myCycleWarningTime = 250; + myConnectionCycleMultiplier = 2; + myTimeoutTime = 8000; + myStabilizingTime = 0; + myCounter = 1; + myResolver = NULL; + myNumSonar = 0; + + myRequestedIOPackets = false; + myRequestedEncoderPackets = false; + myEncoderCorrectionCB = NULL; + + myCycleChained = true; + + myMoveDoneDist = 40; + myHeadingDoneDiff = 3; + + myOrigRobotConfig = NULL; + myBatteryPacketReader = NULL; + + reset(); + if (normalInit) + init(); + + mySyncLoop.setRobot(this); + myPacketReader.setRobot(this); + + if (doSigHandle) + Aria::addRobot(this); + if (addAriaExitCallback) + { + Aria::addExitCallback(&myAriaExitCB, 0); + myAddedAriaExitCB = true; + } + else + { + myAddedAriaExitCB = false; + } + + myConnectWithNoParams = false; + myDoNotSwitchBaud = false; + + myPacketReceivedCondition.setLogName("ArRobot::myPacketReceivedCondition"); + myConnectCond.setLogName("ArRobot::myConnectCond"); + myConnOrFailCond.setLogName("ArRobot::myConnOrFailCond"); + myRunExitCond.setLogName("ArRobot::myRunExitCond"); +} + + + +AREXPORT ArRobot::~ArRobot() +{ + ArResolver::ActionMap::iterator it; + + stopRunning(); + delete mySyncTaskRoot; + ArUtil::deleteSetPairs(mySonars.begin(), mySonars.end()); + Aria::delRobot(this); + + if (myKeyHandlerCB != NULL) + delete myKeyHandlerCB; + + for (it = myActions.begin(); it != myActions.end(); ++it) + { + (*it).second->setRobot(NULL); + } +} + + +/** + Sets up the packet handlers, sets up the sync list and makes the default + priority resolver. +**/ +AREXPORT void ArRobot::init(void) +{ + setUpPacketHandlers(); + setUpSyncList(); + myOwnTheResolver = true; + myResolver = new ArPriorityResolver; +} + +/** + This starts the ongoing main loop, which invokes robot tasks until + stopped. + This function does not return until the loop is stopped by a call to stopRunning(), + or if 'true' is given for @a stopRunIfNotConnected, and the robot connection + is closed or fails. + + @param stopRunIfNotConnected if true, the run will return if there + is no connection to the robot at any given point, this is good for + one-shot programs... if it is false the run won't return unless + stop is called on the instance + + @param runNonThreaded if true, the robot won't make the usual + thread that it makes for reading the packets...you generally + shouldn't use this, but it's provided in case folks are using + programs without threading + + @sa stopRunning() +**/ +AREXPORT void ArRobot::run(bool stopRunIfNotConnected, bool runNonThreaded) +{ + if (mySyncLoop.getRunning()) + { + ArLog::log(ArLog::Terse, + "The robot is already running, cannot run it again."); + return; + } + mySyncLoop.setRunning(true); + mySyncLoop.stopRunIfNotConnected(stopRunIfNotConnected); + mySyncLoop.runInThisThread(); + + myRunningNonThreaded = runNonThreaded; + if (!myRunningNonThreaded) + // Joinable, but do NOT lower priority. The robot packet reader + // thread is the most important one around, since all the timing is + // based off that one. + myPacketReader.create(true, false); +} + +/** + @return true if the robot is currently running in a run or runAsync, + otherwise false +**/ + +AREXPORT bool ArRobot::isRunning(void) const +{ + return (mySyncLoop.getRunning() && + (myRunningNonThreaded || myPacketReader.getRunning())); +} + +/** + This starts a new thread then has runs through the tasks until stopped. + This function doesn't return until something calls stop on this instance. + This function returns immediately + @param stopRunIfNotConnected if true, the run will stop if there is no + connection to the robot at any given point, this is good for one-shot + programs. If false then the thread will continue until stopRunning() is called. + @param runNonThreadedPacketReader selects whether the packet reader object +(receives and parses packets from the robot) should run in its own internal +asychronous thread. Mostly for internal use. + @sa stopRunning() + @sa waitForRunExit() + @sa lock() + @sa unlock() +**/ +AREXPORT void ArRobot::runAsync(bool stopRunIfNotConnected, bool runNonThreadedPacketReader) +{ + if (mySyncLoop.getRunning()) + { + ArLog::log(ArLog::Terse, + "The robot is already running, cannot run it again."); + return; + } + if (runNonThreadedPacketReader) + { + mySyncLoop.stopRunIfNotConnected(stopRunIfNotConnected); + // Joinable, but do NOT lower priority. The robot thread is the most + // important one around. (this isn't true anymore, since the robot + // packet reading one is more important for timing) + mySyncLoop.create(true, false); + myRunningNonThreaded = true; + } + else + { + myRunningNonThreaded = false; + // Joinable, but do NOT lower priority. The robot thread is the most + // important one around. (this isn't true anymore, since the robot + // packet reading one is more important for timing) + mySyncLoop.create(true, true); + // Joinable, but do NOT lower priority. The robot packet reader + // thread is the most important one around, since all the timing is + // based off that one. + myPacketReader.create(true, false); + } +} + +/** + This stops this robot's processing cycle. If it is running + in a background thread (from runAsync()), it will cause that thread + to exit. If it is running synchronously (from run()), then run() will + return. + @param doDisconnect If true, also disconnect from the robot connection (default is true). + @sa isRunning +**/ +AREXPORT void ArRobot::stopRunning(bool doDisconnect) +{ + if (myKeyHandler != NULL) + myKeyHandler->restore(); + mySyncLoop.stopRunning(); + myBlockingConnectRun = false; + if (doDisconnect && (isConnected() || myIsStabilizing)) + { + waitForRunExit(); + disconnect(); + } + wakeAllWaitingThreads(); +} + +AREXPORT void ArRobot::setUpSyncList(void) +{ + mySyncTaskRoot = new ArSyncTask("SyncTasks"); + mySyncTaskRoot->setWarningTimeCB(&myGetCycleWarningTimeCB); + mySyncTaskRoot->setNoTimeWarningCB(&myGetNoTimeWarningThisCycleCB); + mySyncTaskRoot->addNewLeaf("Packet Handler", 85, &myPacketHandlerCB); + mySyncTaskRoot->addNewLeaf("Robot Locker", 70, &myRobotLockerCB); + mySyncTaskRoot->addNewBranch("Sensor Interp", 65); + mySyncTaskRoot->addNewLeaf("Action Handler", 55, &myActionHandlerCB); + mySyncTaskRoot->addNewLeaf("State Reflector", 45, &myStateReflectorCB); + mySyncTaskRoot->addNewBranch("User Tasks", 25); + mySyncTaskRoot->addNewLeaf("Robot Unlocker", 20, &myRobotUnlockerCB); +} + + +AREXPORT void ArRobot::setUpPacketHandlers(void) +{ + addPacketHandler(&myMotorPacketCB, ArListPos::FIRST); + addPacketHandler(&myEncoderPacketCB, ArListPos::LAST); + addPacketHandler(&myIOPacketCB, ArListPos::LAST); +} + +void ArRobot::reset(void) +{ + resetTripOdometer(); + + myOdometerDistance = 0; + myOdometerDegrees = 0; + myOdometerStart.setToNow(); + + myIgnoreMicroControllerBatteryInfo = false; + + myHaveStateOfCharge = false; + myStateOfCharge = 0; + myStateOfChargeLow = 0; + myStateOfChargeShutdown = 0; + myInterpolation.reset(); + myEncoderInterpolation.reset(); + + if (myOrigRobotConfig != NULL) + delete myOrigRobotConfig; + myOrigRobotConfig = new ArRobotConfigPacketReader(this, true); + if (myBatteryPacketReader != NULL) + delete myBatteryPacketReader; + myBatteryPacketReader = new ArRobotBatteryPacketReader(this); + + myFirstEncoderPose = true; + myFakeFirstEncoderPose = false; + myIgnoreNextPacket = false; + //myEncoderPose.setPose(0, 0, 0); + //myEncoderPoseTaken.setToNow(); + //myRawEncoderPose.setPose(0, 0, 0); + //myGlobalPose.setPose(0, 0, 0); + //myEncoderTransform.setTransform(myEncoderPose, myGlobalPose); + myTransVelMax = 0; + myTransNegVelMax = 0; + myTransAccel = 0; + myTransDecel = 0; + myRotVelMax = 0; + myRotAccel = 0; + myRotDecel = 0; + myLatVelMax = 0; + myLatAccel = 0; + myLatDecel = 0; + + myAbsoluteMaxTransVel = 0; + myAbsoluteMaxTransNegVel = 0; + myAbsoluteMaxTransAccel = 0; + myAbsoluteMaxTransDecel = 0; + myAbsoluteMaxRotVel = 0; + myAbsoluteMaxRotAccel = 0; + myAbsoluteMaxRotDecel = 0; + myAbsoluteMaxLatVel = 0; + myAbsoluteMaxLatAccel = 0; + myAbsoluteMaxLatDecel = 0; + + + myLeftVel = 0; + myRightVel = 0; + myBatteryVoltage = 13; + myRealBatteryVoltage = 13; + myBatteryAverager.clear(); + myBatteryAverager.add(myBatteryVoltage); + + + myStallValue = 0; + myControl = 0; + myFlags = 0; + myFaultFlags = 0; + myHasFaultFlags = 0; + myCompass = 0; + myAnalogPortSelected = 0; + myAnalog = 0; + myDigIn = 0; + myDigOut = 0; + myIOAnalogSize = 0; + myIODigInSize = 0; + myIODigOutSize = 0; + myLastIOPacketReceivedTime.setSec(0); + myLastIOPacketReceivedTime.setMSec(0); + myVel = 0; + myRotVel = 0; + myLatVel = 0; + myOverriddenChargeState = false; + myChargeState = CHARGING_UNKNOWN; + myOverriddenIsChargerPowerGood = false; + + + myLastX = 0; + myLastY = 0; + myLastTh = 0; + mySentPulse = false; + myIsConnected = false; + myIsStabilizing = false; + + myTransVal = 0; + myTransVal2 = 0; + myTransType = TRANS_NONE; + myLastTransVal = 0; + myLastTransVal2 = 0; + myLastTransType = TRANS_NONE; + myLastTransSent.setToNow(); + myActionTransSet = false; + + myLastActionRotStopped = false; + myLastActionRotHeading = false; + myRotVal = 0; + myLastRotVal = 0; + myRotType = ROT_NONE; + myLastRotType = ROT_NONE; + myLastRotSent.setToNow(); + myActionRotSet = false; + + myLatVal = 0; + myLatType = LAT_NONE; + myLastLatVal = 0; + myLastLatType = LAT_NONE; + myLastLatSent.setToNow(); + myActionLatSet = false; + + myLastSentTransVelMax = 0; + myLastSentTransAccel = 0; + myLastSentTransDecel = 0; + myLastSentRotVelMax = 0; + myLastSentRotVelPosMax = 0; + myLastSentRotVelNegMax = 0; + myLastSentRotAccel = 0; + myLastSentRotDecel = 0; + myLastSentLatVelMax = 0; + myLastSentLatAccel = 0; + myLastSentLatDecel = 0; + + myLastPulseSent.setToNow(); + + myDirectPrecedenceTime = 0; + myStateReflectionRefreshTime = 500; + + myActionDesired.reset(); + + myMotorPacCurrentCount = 0; + myMotorPacCount = 0; + myTimeLastMotorPacket = 0; + + mySonarPacCurrentCount = 0; + mySonarPacCount = 0; + myTimeLastSonarPacket = 0; + + myLeftEncoder = 0; + myRightEncoder = 0; + + myWarnedAboutExtraSonar = false; + myOdometryDelay = 0; + + myTemperature = -128; + + myConnectionOpenedTime.setSecLL(0); + myConnectionOpenedTime.setMSecLL(0); + + mySonarEnabled = true; + myAutonomousDrivingSonarEnabled = false; +} + +AREXPORT void ArRobot::setTransVelMax(double vel) +{ + if (vel <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransVelMax of %g is below 0, ignoring it", vel); + return; + } + + if (vel > myAbsoluteMaxTransVel) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransVelMax of %g is over the absolute max vel of %g, capping it", vel, myAbsoluteMaxTransVel); + vel = myAbsoluteMaxTransVel; + } + myTransVelMax = vel; +} + +AREXPORT void ArRobot::setTransNegVelMax(double negVel) +{ + if (negVel >= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransNegVelMax of %g is below 0, ignoring it", negVel); + return; + } + + if (negVel < myAbsoluteMaxTransNegVel) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransNegVelMax of %g is over the absolute max vel of %g, capping it", negVel, myAbsoluteMaxTransNegVel); + negVel = myAbsoluteMaxTransNegVel; + } + myTransNegVelMax = negVel; +} + +AREXPORT void ArRobot::setTransAccel(double acc) +{ + if (acc <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransAccel of %g is below 0, ignoring it", acc); + return; + } + + if (acc > myAbsoluteMaxTransAccel) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransAccel of %g is over the absolute max of %g, capping it", acc, myAbsoluteMaxTransAccel); + acc = myAbsoluteMaxTransAccel; + } + myTransAccel = acc; +} + +AREXPORT void ArRobot::setTransDecel(double decel) +{ + if (decel <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransDecel of %g is below 0, ignoring it", decel); + return; + } + + if (fabs(decel) > myAbsoluteMaxTransDecel) + { + ArLog::log(ArLog::Terse, "ArRobot: setTransDecel of %g is over the absolute max of %g, capping it", decel, myAbsoluteMaxTransDecel); + decel = myAbsoluteMaxTransDecel; + } + myTransDecel = ArMath::fabs(decel); +} + +AREXPORT void ArRobot::setRotVelMax(double vel) +{ + if (vel <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setRotVelMax of %g is below 0, ignoring it", vel); + return; + } + + if (vel > myAbsoluteMaxRotVel) + { + ArLog::log(ArLog::Terse, "ArRobot: rotVelMax of %g is over the absolute max of %g, capping it", vel, myAbsoluteMaxRotVel); + vel = myAbsoluteMaxRotVel; + } + myRotVelMax = vel; +} + +AREXPORT void ArRobot::setRotAccel(double acc) +{ + if (acc <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setRotAccel of %g is below 0, ignoring it", acc); + return; + } + + if (acc > myAbsoluteMaxRotAccel) + { + ArLog::log(ArLog::Terse, "ArRobot: setRotAccel of %g is over the absolute max of %g, capping it", acc, myAbsoluteMaxRotAccel); + acc = myAbsoluteMaxRotAccel; + } + myRotAccel = acc; +} + +AREXPORT void ArRobot::setRotDecel(double decel) +{ + if (decel <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setRotDecel of %g is below 0, ignoring it", decel); + return; + } + + if (fabs(decel) > myAbsoluteMaxRotDecel) + { + ArLog::log(ArLog::Terse, "ArRobot: setRotDecel of %g is over the absolute max of %g, capping it", decel, myAbsoluteMaxRotDecel); + decel = myAbsoluteMaxRotDecel; + } + myRotDecel = ArMath::fabs(decel); +} + +/** @since 2.6.0 */ +AREXPORT void ArRobot::setLatVelMax(double vel) +{ + if (vel <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setLatVelMax of %g is below 0, ignoring it", vel); + return; + } + + if (vel > myAbsoluteMaxLatVel) + { + ArLog::log(ArLog::Terse, "ArRobot: setLatVelMax of %g is over the absolute max of %g, capping it", vel, myAbsoluteMaxLatVel); + vel = myAbsoluteMaxLatVel; + } + myLatVelMax = vel; +} + +/** @since 2.6.0 */ +AREXPORT void ArRobot::setLatAccel(double acc) +{ + if (acc <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setLatAccel of %g is below 0, ignoring it", acc); + return; + } + + if (acc > myAbsoluteMaxLatAccel) + { + ArLog::log(ArLog::Terse, "ArRobot: setLatAccel of %g is over the absolute max of %g, capping it", acc, myAbsoluteMaxLatAccel); + acc = myAbsoluteMaxLatAccel; + } + myLatAccel = acc; +} + +/** @since 2.6.0 */ +AREXPORT void ArRobot::setLatDecel(double decel) +{ + if (decel <= 0) + { + ArLog::log(ArLog::Terse, "ArRobot: setLatDecel of %g is below 0, ignoring it", decel); + return; + } + + if (fabs(decel) > myAbsoluteMaxLatDecel) + { + ArLog::log(ArLog::Terse, "ArRobot: setLatDecel of %g is over the absolute max of %g, capping it", decel, myAbsoluteMaxLatDecel); + decel = myAbsoluteMaxLatDecel; + } + myLatDecel = ArMath::fabs(decel); +} + + +AREXPORT double ArRobot::getTransVelMax(void) const +{ + return myTransVelMax; +} + +AREXPORT double ArRobot::getTransNegVelMax(void) const +{ + return myTransNegVelMax; +} + +AREXPORT double ArRobot::getTransAccel(void) const +{ + return myTransAccel; +} + +AREXPORT double ArRobot::getTransDecel(void) const +{ + return myTransDecel; +} + +AREXPORT double ArRobot::getRotVelMax(void) const +{ + return myRotVelMax; +} + +AREXPORT double ArRobot::getRotAccel(void) const +{ + return myRotAccel; +} + +AREXPORT double ArRobot::getRotDecel(void) const +{ + return myRotDecel; +} + +/** @since 2.6.0 */ +AREXPORT double ArRobot::getLatVelMax(void) const +{ + return myLatVelMax; +} + +/** @since 2.6.0 */ +AREXPORT double ArRobot::getLatAccel(void) const +{ + return myLatAccel; +} + +/** @since 2.6.0 */ +AREXPORT double ArRobot::getLatDecel(void) const +{ + return myLatDecel; +} + +/** + Sets the connection this instance uses to the actual robot. This is where + commands will be sent and packets will be received from + + @param connection The deviceConnection to use for this robot + + @see ArDeviceConnection, ArSerialConnection, ArTcpConnection +**/ +AREXPORT void ArRobot::setDeviceConnection(ArDeviceConnection *connection) +{ + myConn = connection; + myConn->setDeviceName("uC"); + mySender.setDeviceConnection(myConn); + myReceiver.setDeviceConnection(myConn); +} + +/** + Gets the connection this instance uses to the actual robot. This is where + commands will be sent and packets will be received from + @return the deviceConnection used for this robot + @see ArDeviceConnection + @see ArSerialConnection + @see ArTcpConnection +**/ +AREXPORT ArDeviceConnection *ArRobot::getDeviceConnection(void) const +{ + return myConn; +} + +/** + Sets the number of milliseconds to go without a response from the robot + until it is assumed that the connection with the robot has been + broken and the disconnect on error events will happen. Note that + this will only happen with the default packet handler. + + @param mSecs if seconds is 0 then the connection timeout feature + will be disabled, otherwise disconnect on error will be triggered + after this number of seconds... +**/ +AREXPORT void ArRobot::setConnectionTimeoutTime(int mSecs) +{ + ArLog::log(ArLog::Normal, + "ArRobot::setConnectionTimeoutTime: Setting timeout to %d mSecs", + mSecs); + + myLastOdometryReceivedTime.setToNow(); + myLastPacketReceivedTime.setToNow(); + + if (mSecs > 0) + myTimeoutTime = mSecs; + else + myTimeoutTime = 0; +} + +/** + Gets the number of seconds to go without response from the robot + until it is assumed tha tthe connection with the robot has been + broken and the disconnect on error events will happen. + +**/ +AREXPORT int ArRobot::getConnectionTimeoutTime(void) const +{ + return myTimeoutTime; +} + +/** + Get the time at which the most recent packet of any type was received + This timestamp is updated whenever any packet is received from the robot. + @sa getLastOdometryTime + + @return the time the last packet was received +**/ +AREXPORT ArTime ArRobot::getLastPacketTime(void) const +{ + return myLastPacketReceivedTime; +} + + +/** + Get the time at which thet most recent SIP packet was received. + Whenever a SIP packet (aka "motor" packet) is received, this time is set to the receiption + time minus the robot's reported internal odometry delay. The SIP provides + robot position (see getPose()) and some other information (see robot + manual for details). + + @return the time the last SIP was received +**/ +AREXPORT ArTime ArRobot::getLastOdometryTime(void) const +{ + return myLastOdometryReceivedTime; +} + + +/** + Sets up the robot to connect, then returns, but the robot must be + running (ie from runAsync) before you do this. + + Most programs should use ArRobotConnector to perform the connection + rather than using thin method directly. + + This function will + fail if the robot is already connected. If you want to know what + happened because of the connect then look at the callbacks. NOTE, + this will not lock robot before setting values, so you MUST lock + the robot before you call this function and unlock the robot after + you call this function. If you fail to lock the robot, you'll may + wind up with wierd behavior. Other than the aspect of blocking or + not the only difference between async and blocking connects (other + than the blocking) is that async is run every robot cycle, whereas + blocking runs as fast as it can... also blocking will try to + reconnect a radio modem if it looks like it didn't get connected + in the first place, so blocking can wind up taking 10 or 12 + seconds to decide it can't connect, whereas async doesn't try hard + at all to reconnect the radio modem (beyond its first try) (under + the assumption the async connect is user driven, so they'll just + try again, and so that it won't mess up the sync loop by blocking + for so long). + + @return true if the robot is running and the robot will try to + connect, false if the robot isn't running so won't try to connect + or if the robot is already connected + + @see addConnectCB + + @see addFailedConnectCB + + @see runAsync +**/ + +AREXPORT bool ArRobot::asyncConnect(void) +{ + if (!mySyncLoop.getRunning() || isConnected()) + return false; + + myAsyncConnectFlag = true; + myBlockingConnectRun = false; + myAsyncConnectState = -1; + return true; +} + +/** + Connects to the robot, returning only when a connection has been + made or it has been established a connection can't be made. + + Most programs should use an ArRobotConnector object to perform + the connection rather than using this method directly. + + This + connection usually is fast, but can take up to 30 seconds if the + robot is in a wierd state (this is not often). If the robot is + connected via ArSerialConnection then the connect will also + connect the radio modems. Upon a successful connection all of the + Connection Callback Functors that have been registered will be + called. NOTE, this will lock the robot before setting values, so + you MUST not have the robot locked from where you call this + function. If you do, you'll wind up in a deadlock. This behavior + is there because otherwise you'd have to lock the robot before + calling this function, and normally blockingConnect will be called + from a separate thread, and that thread won't be doing anything + else with the robot at that time. Other than the aspect of + blocking or not the only difference between async and blocking + connects (other than the blocking) is that async is run every + robot cycle, whereas blocking runs as fast as it can... also + blocking will try to reconnect a radio modem if it looks like it + didn't get connected in the first place, so blocking can wind up + taking 10 or 12 seconds to decide it can't connect, whereas async + doesn't try hard at all to reconnect the radio modem (under the + assumption the async connect is user driven, so they'll just try + again, and so that it won't mess up the sync loop by blocking for + so long). + + @return true if a connection could be made, false otherwise + +**/ + +AREXPORT bool ArRobot::blockingConnect(void) +{ + int ret = 0; + + lock(); + if (myIsConnected) + disconnect(); + myBlockingConnectRun = true; + myAsyncConnectState = -1; + while ((ret = asyncConnectHandler(true)) == 0 && myBlockingConnectRun) + ArUtil::sleep(ArMath::roundInt(getCycleTime() * .80)); + unlock(); + if (ret == 1) + return true; + else + return false; +} + +/** + This is an internal function that is used both for async connects and + blocking connects use to connect. It does about the same thing for both, + and it should only be used by asyncConnect and blockingConnect really. + But here it is. The only difference between when its being used + by blocking/async connect is that in blocking mode if it thinks there + may be problems with the radio modem it pauses for two seconds trying + to deal with this... whereas in async mode it tries to deal with this in a + simpler way. + @param tryHarderToConnect if this is true, then if the radio modems look + like they aren't working, it'll take about 2 seconds to try and connect + them, whereas if its false, it'll do a little try, but won't try very hard + @return 0 if its still trying to connect, 1 if it connected, 2 if it failed +**/ + +AREXPORT int ArRobot::asyncConnectHandler(bool tryHarderToConnect) +{ + int ret = 0; + ArRobotPacket *packet; + ArRobotPacket *tempPacket = NULL; + char robotSubType[255]; + int i; + int len; + std::string str; + ArTime endTime; + int timeToWait; + ArSerialConnection *serConn; + + endTime.setToNow(); + endTime.addMSec(getCycleTime()*myConnectionCycleMultiplier); + + myNoTimeWarningThisCycle = true; + + // if this is -1, then we're doing initialization stuff, then returning + if (myAsyncConnectState == -1) + { + myAsyncConnectSentChangeBaud = false; + myAsyncConnectNoPacketCount = 0; + myAsyncConnectTimesTried = 0; + reset(); + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, "Cannot connect, no connection has been set."); + failedConnect(); + return 2; + } + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + if (!myConn->openSimple()) + { + /*str = myConn->getStatusMessage(myConn->getStatus()); + ArLog::log(ArLog::Terse, "Trying to connect to robot but connection not opened, it is %s", str.c_str());*/ + ArLog::log(ArLog::Terse, + "Could not connect, because open on the device connection failed."); + failedConnect(); + return 2; + } + } + + // check for log file connection: just return success + if (dynamic_cast(myConn)) + { + ArLogFileConnection *con = dynamic_cast(myConn); + myRobotName = con->myName; + myRobotType = con->myType; + myRobotSubType = con->mySubtype; + if (con->havePose) // we know where to move + moveTo(con->myPose); + setCycleChained(false); // don't process packets all at once + madeConnection(); + finishedConnection(); + return 1; + } + + + // needed for the old infowave radio modem: + if (dynamic_cast(myConn)) + { + myConn->write("WMS2\15", strlen("WMS2\15")); + } + + // here we're flushing out all previously received packets + while ( endTime.mSecTo() > 0 && myReceiver.receivePacket(0) != NULL); + + myAsyncConnectState = 0; + return 0; + } + + if (myAsyncConnectState >= 3) + { + bool handled; + std::list *>::iterator it; + while ((packet = myReceiver.receivePacket(0)) != NULL) + { + //printf("0x%x\n", packet->getID()); + for (handled = false, it = myPacketHandlerList.begin(); + it != myPacketHandlerList.end() && handled == false; + it++) + { + if ((*it) != NULL && (*it)->invokeR(packet)) + handled = true; + else + packet->resetRead(); + } + } + } + + if (myAsyncConnectState == 3) + { + //if (!myOrigRobotConfig->hasPacketBeenRequested()) + if (!myOrigRobotConfig->hasPacketArrived()) + { + myOrigRobotConfig->requestPacket(); + } + // if we've gotten our config packet or if we've timed out then + // set our vel and acc/decel params and skip to the next part + if (myOrigRobotConfig->hasPacketArrived() || + myAsyncStartedConnection.mSecSince() > 1000) + { + bool gotConfig; + // if we have data from the robot use that + if (myOrigRobotConfig->hasPacketArrived()) + { + gotConfig = true; + setAbsoluteMaxTransVel(myOrigRobotConfig->getTransVelTop()); + setAbsoluteMaxTransNegVel(-myOrigRobotConfig->getTransVelTop()); + setAbsoluteMaxTransAccel(myOrigRobotConfig->getTransAccelTop()); + setAbsoluteMaxTransDecel(myOrigRobotConfig->getTransAccelTop()); + setAbsoluteMaxRotVel(myOrigRobotConfig->getRotVelTop()); + setAbsoluteMaxRotAccel(myOrigRobotConfig->getRotAccelTop()); + setAbsoluteMaxRotDecel(myOrigRobotConfig->getRotAccelTop()); + setTransVelMax(myOrigRobotConfig->getTransVelMax()); + setTransNegVelMax(-myOrigRobotConfig->getTransVelMax()); + setTransAccel(myOrigRobotConfig->getTransAccel()); + setTransDecel(myOrigRobotConfig->getTransDecel()); + setRotVelMax(myOrigRobotConfig->getRotVelMax()); + setRotAccel(myOrigRobotConfig->getRotAccel()); + setRotDecel(myOrigRobotConfig->getRotDecel()); + if (hasLatVel()) + { + setAbsoluteMaxLatVel(myOrigRobotConfig->getLatVelTop()); + setAbsoluteMaxLatAccel(myOrigRobotConfig->getLatAccelTop()); + setAbsoluteMaxLatDecel(myOrigRobotConfig->getLatAccelTop()); + setLatVelMax(myOrigRobotConfig->getLatVelMax()); + setLatAccel(myOrigRobotConfig->getLatAccel()); + setLatDecel(myOrigRobotConfig->getLatDecel()); + } + if (myOrigRobotConfig->getKinematicsDelay() != 0) + setOdometryDelay(myOrigRobotConfig->getKinematicsDelay()); + if (myOrigRobotConfig->getStateOfChargeLow() > 0) + setStateOfChargeLow(myOrigRobotConfig->getStateOfChargeLow()); + if (myOrigRobotConfig->getStateOfChargeShutdown() > 0) + setStateOfChargeShutdown( + myOrigRobotConfig->getStateOfChargeShutdown()); + } + else if (myRequireConfigPacket) + { + ArLog::log(ArLog::Terse, "Could not connect, config packet required and no config packet received."); + failedConnect(); + return 2; + } + // if our absolute maximums weren't set then set them + else + { + gotConfig = false; + setAbsoluteMaxTransVel(myParams->getAbsoluteMaxVelocity()); + setAbsoluteMaxTransAccel(1000); + setAbsoluteMaxTransDecel(1000); + setAbsoluteMaxRotVel(myParams->getAbsoluteMaxRotVelocity()); + setAbsoluteMaxRotAccel(100); + setAbsoluteMaxRotDecel(100); + setAbsoluteMaxLatVel(myParams->getAbsoluteMaxLatVelocity()); + setAbsoluteMaxLatAccel(1000); + setAbsoluteMaxLatDecel(1000); + } + // okay we got in that data, now put over it any of the things + // that we got from the robot parameter file... if we don't have + // max vels from above or the parameters then use the absolutes + // which we do have for everything + if (ArMath::fabs(myParams->getTransVelMax()) > 1) + setTransVelMax(myParams->getTransVelMax()); + else if (!gotConfig) + setTransVelMax(myParams->getAbsoluteMaxVelocity()); + if (ArMath::fabs(myParams->getTransVelMax()) > 1) + setTransNegVelMax(-myParams->getTransVelMax()); + else if (!gotConfig) + setTransNegVelMax(-myParams->getAbsoluteMaxVelocity()); + if (ArMath::fabs(myParams->getRotVelMax()) > 1) + setRotVelMax(myParams->getRotVelMax()); + else if (!gotConfig) + setRotVelMax(myParams->getAbsoluteMaxRotVelocity()); + if (ArMath::fabs(myParams->getTransAccel()) > 1) + setTransAccel(myParams->getTransAccel()); + if (ArMath::fabs(myParams->getTransDecel()) > 1) + setTransDecel(myParams->getTransDecel()); + if (ArMath::fabs(myParams->getRotAccel()) > 1) + setRotAccel(myParams->getRotAccel()); + if (ArMath::fabs(myParams->getRotDecel()) > 1) + setRotDecel(myParams->getRotDecel()); + + if (ArMath::fabs(myParams->getLatVelMax()) > 1) + setLatVelMax(myParams->getLatVelMax()); + else if (!gotConfig) + setLatVelMax(myParams->getAbsoluteMaxLatVelocity()); + if (ArMath::fabs(myParams->getLatAccel()) > 1) + setLatAccel(myParams->getLatAccel()); + if (ArMath::fabs(myParams->getLatDecel()) > 1) + setLatDecel(myParams->getLatDecel()); + myAsyncConnectState = 4; + } + else + return 0; + } + // we want to see if we should switch baud + if (myAsyncConnectState == 4) + { + serConn = dynamic_cast(myConn); + // if we didn't get a config packet or we can't change the baud or + // we shouldn't change the baud or if we'd change it to a slower + // baud rate or we aren't using a serial port then don't switch + // the baud + if (!myOrigRobotConfig->hasPacketArrived() || + !myOrigRobotConfig->getResetBaud() || + serConn == NULL || + myParams->getSwitchToBaudRate() == 0 || + (serConn != NULL && + serConn->getBaud() >= myParams->getSwitchToBaudRate()) || + myDoNotSwitchBaud) + { + // if we're using a serial connection store our baud rate + if (serConn != NULL) + myAsyncConnectStartBaud = serConn->getBaud(); + myAsyncConnectState = 5; + } + // if we did get a packet and can change baud send the command + else if (!myAsyncConnectSentChangeBaud) + { + // if we're using a serial connection store our baud rate + if (serConn != NULL) + myAsyncConnectStartBaud = serConn->getBaud(); + + int baudNum = -1; + + // first suck up all the packets we have now + while ((packet = myReceiver.receivePacket(0)) != NULL); + if (myParams->getSwitchToBaudRate() == 9600) + baudNum = 0; + else if (myParams->getSwitchToBaudRate() == 19200) + baudNum = 1; + else if (myParams->getSwitchToBaudRate() == 38400) + baudNum = 2; + else if (myParams->getSwitchToBaudRate() == 57600) + baudNum = 3; + else if (myParams->getSwitchToBaudRate() == 115200) + baudNum = 4; + else + { + ArLog::log(ArLog::Normal, "Warning: SwitchToBaud is set to %d baud, ignoring.", + myParams->getSwitchToBaudRate()); + ArLog::log(ArLog::Normal, "\tGood bauds are 9600 19200 38400 56800 115200."); + myAsyncConnectState = 5; + baudNum = -1; + return 0; + } + if (baudNum != -1) + { + // now switch it over + comInt(ArCommands::HOSTBAUD, baudNum); + ArUtil::sleep(10); + myAsyncConnectSentChangeBaud = true; + myAsyncConnectStartedChangeBaud.setToNow(); + serConn->setBaud(myParams->getSwitchToBaudRate()); + //serConn->setBaud(19200); + ArUtil::sleep(10); + com(0); + return 0; + } + } + // if we did send the command then wait and see if we get any packets back + else + { + packet = myReceiver.receivePacket(100); + com(0); + // if we got any packet we're good + if (packet != NULL) + { + myAsyncConnectState = 5; + } + // if we didn't get it and its been 500 ms then fail + else if (myAsyncConnectStartedChangeBaud.mSecSince() > 900) + { + ArLog::log(ArLog::Normal, "Controller did not switch to baud, reset to %d baud.", myAsyncConnectStartBaud); + serConn->setBaud(myAsyncConnectStartBaud); + myAsyncConnectState = 5; + } + else + return 0; + } + } + + if (myAsyncConnectState == 5) + { + if (!myIsStabilizing) + startStabilization(); + if (myStabilizingTime == 0 || + myStartedStabilizing.mSecSince() > myStabilizingTime) + { + finishedConnection(); + return 1; + } + else + return 0; + } + + // here we've gone beyond the initialization, so read set a time limit, + // read in one packet, then if its a bad packet type, read in all the + // packets there are to read... if its a good packet, continue with sequence + myAsyncConnectTimesTried++; + ArLog::log(ArLog::Normal, "Syncing %d", myAsyncConnectState); + mySender.com(myAsyncConnectState); + // packet = myReceiver.receivePacket(endTime.mSecTo()); + packet = myReceiver.receivePacket(1000); + + if (packet != NULL) + { + ret = packet->getID(); + + //printf("Got a packet %d\n", ret); + + if (ret == 50) + { + ArLog::log(ArLog::Normal, "Attempting to close previous connection."); + comInt(ArCommands::CLOSE,1); + while (endTime.mSecTo() > 0) + { + timeToWait = endTime.mSecTo(); + if (timeToWait < 0) + timeToWait = 0; + tempPacket = myReceiver.receivePacket(timeToWait); + if (tempPacket != NULL) + ArLog::log(ArLog::Verbose, "Got in another packet!"); + if (tempPacket != NULL && tempPacket->getID() == 50) + comInt(ArCommands::CLOSE,1); + } + myAsyncConnectState = 0; + } + else if (ret == 255) + { + ArLog::log(ArLog::Normal, "Attempting to correct syncCount"); + /* + while (endTime.mSecTo() > 0) + { + timeToWait = endTime.mSecTo(); + if (timeToWait < 0) + timeToWait = 0; + tempPacket = myReceiver.receivePacket(timeToWait); + if (tempPacket != NULL) + ArLog::log(ArLog::Verbose, "Got in another packet!"); + } + */ + while ((tempPacket = myReceiver.receivePacket(0)) != NULL); + + if (tempPacket != NULL && tempPacket->getID() == 0) + myAsyncConnectState = 1; + else + myAsyncConnectState = 0; + return 0; + } + else if (ret != myAsyncConnectState++) + { + myAsyncConnectState = 0; + } + } + else + { + ArLog::log(ArLog::Normal, "No packet."); + myAsyncConnectNoPacketCount++; + if ((myAsyncConnectNoPacketCount > 5 + && myAsyncConnectNoPacketCount >= myAsyncConnectTimesTried) + || (myAsyncConnectNoPacketCount > 10)) + { + ArLog::log(ArLog::Terse, "Could not connect, no robot responding."); + failedConnect(); + return 2; + } + + /* This code to connect the radio modems should never really be needed + so is being removed for now + if (myAsyncConnectNoPacketCount >= 4) + { + + if (tryHarderToConnect && dynamic_cast(myConn)) + { + ArLog::log(ArLog::Normal, + "Radio modem may not connected, trying to connect it."); + ArUtil::sleep(1000); + myConn->write("|||\15", strlen("!!!\15")); + ArUtil::sleep(60); + myConn->write("WMN\15", strlen("WMN\15")); + ArUtil::sleep(60); + myConn->write("WMS2\15", strlen("WMS2\15")); + ArUtil::sleep(1000); + } + else if (dynamic_cast(myConn)) + { + ArLog::log(ArLog::Normal, + "Radio modem may not connected, trying to connect it."); + myConn->write("WMS2\15", strlen("WMS2\15")); + ArUtil::sleep(60); + } + } + */ + + // If we get no response first we dump close commands at the thing + // in different bauds (if its a serial connection) + if (myAsyncConnectNoPacketCount == 2 && + myAsyncConnectNoPacketCount >= myAsyncConnectTimesTried && + (serConn = dynamic_cast(myConn)) != NULL) + { + int origBaud; + ArLog::log(ArLog::Normal, "Trying to close possible old connection"); + origBaud = serConn->getBaud(); + serConn->setBaud(9600); + comInt(ArCommands::CLOSE,1); + ArUtil::sleep(3); + serConn->setBaud(38400); + comInt(ArCommands::CLOSE,1); + ArUtil::sleep(3); + serConn->setBaud(115200); + comInt(ArCommands::CLOSE,1); + ArUtil::sleep(3); + serConn->setBaud(19200); + comInt(ArCommands::CLOSE,1); + ArUtil::sleep(3); + serConn->setBaud(57600); + comInt(ArCommands::CLOSE,1); + ArUtil::sleep(3); + serConn->setBaud(origBaud); + } + + if (myAsyncConnectNoPacketCount > 3) + { + ArLog::log(ArLog::Normal, + " Robot may be connected but not open, trying to dislodge."); + mySender.comInt(ArCommands::OPEN,1); + } + + myAsyncConnectState = 0; + } + // if we've connected and have a packet get the connection + // information from it + if (myAsyncConnectState == 3 && packet != NULL) + { + char nameBuf[512]; + ArLog::log(ArLog::Terse, "Connected to robot."); + packet->bufToStr(nameBuf, 512); + myRobotName = nameBuf; + ArLog::log(ArLog::Normal, "Name: %s", myRobotName.c_str()); + packet->bufToStr(nameBuf, 512); + myRobotType = nameBuf; + ArLog::log(ArLog::Normal, "Type: %s", myRobotType.c_str()); + packet->bufToStr(nameBuf, 512); + myRobotSubType = nameBuf; + strcpy(robotSubType, myRobotSubType.c_str()); + len = strlen(robotSubType); + for (i = 0; i < len; i++) + robotSubType[i] = tolower(robotSubType[i]); + myRobotSubType = robotSubType; + ArLog::log(ArLog::Normal, "Subtype: %s", myRobotSubType.c_str()); + ArUtil::sleep(getCycleTime()); + mySender.comInt(ArCommands::OPEN,1); + if (!madeConnection()) + { + mySender.comInt(ArCommands::CLOSE,1); + failedConnect(); + return 2; + } + + // now we return off so we can handle the rest of connecting, if + // you're just using this for your own connections you can skip + // this part because its really connected now + myAsyncStartedConnection.setToNow(); + return asyncConnectHandler(tryHarderToConnect); + } + if (myAsyncConnectTimesTried > 50) + { + failedConnect(); + return 2; + } + return 0; +} + +/** + @return true if the file could be loaded, false otherwise + **/ +AREXPORT bool ArRobot::loadParamFile(const char *file) +{ + if (myParams != NULL) + delete myParams; + + myParams = new ArRobotGeneric(""); + if (!myParams->parseFile(file, false, true)) + { + ArLog::log(ArLog::Normal, "ArRobot::loadParamFile: Could not find file '%s' to load.", file); + return false; + } + processParamFile(); + ArLog::log(ArLog::Normal, "Loaded robot parameters from %s.", file); + return true; +} + +/** + This function will take over ownership of the passed in params + **/ +AREXPORT void ArRobot::setRobotParams(ArRobotParams *params) +{ + if (myParams != NULL) + delete myParams; + + myParams = params; + processParamFile(); + ArLog::log(ArLog::Verbose, "Took new passed in robot params."); +} + + +AREXPORT void ArRobot::processParamFile(void) +{ + + + // PS 9/10/12 - added units to get MTX working but it + // broke old sonar - so now trying the old way + //for (int i = 0; i < myParams->getNumSonarUnits(); ++i) + for (int i = 0; i < myParams->getNumSonar(); ++i) + { + //printf("sonar %d %d %d %d\n", i, myParams->getSonarX(i), + //myParams->getSonarY(i), myParams->getSonarTh(i)); + if (mySonars.find(i) == mySonars.end()) + { + ArLog::log(ArLog::Verbose,"ArRobot::processParamFile creating new sonar %d %d %d %d", i, myParams->getSonarX(i), + myParams->getSonarY(i), myParams->getSonarTh(i)); + mySonars[i] = new ArSensorReading(myParams->getSonarX(i), + myParams->getSonarY(i), + myParams->getSonarTh(i)); + mySonars[i]->setIgnoreThisReading(true); + } + else + { + ArLog::log(ArLog::Verbose,"ArRobot::processParamFile resetting sonar %d %d %d %d", i, myParams->getSonarX(i), + myParams->getSonarY(i), myParams->getSonarTh(i)); + mySonars[i]->resetSensorPosition(myParams->getSonarX(i), + myParams->getSonarY(i), + myParams->getSonarTh(i)); + mySonars[i]->setIgnoreThisReading(true); + } + if ((i + 1) > myNumSonar) + myNumSonar = i + 1; + } + + //myRobotType = myParams->getClassName(); + //myRobotSubType = myParams->getSubClassName(); + + // MPL 20130407 made this so that it'd only happen if we are using + // the .p file, since otherwise it just sets things back to 0 and + // causes problems... and made it use the set function to make it + // easier to track down any problems it causes + if (!ArRobotParams::internalGetUseDefaultBehavior()) + { + setAbsoluteMaxTransVel(myParams->getAbsoluteMaxVelocity()); + setAbsoluteMaxTransNegVel(myParams->getAbsoluteMaxVelocity()); + setAbsoluteMaxRotVel(myParams->getAbsoluteMaxRotVelocity()); + setAbsoluteMaxLatVel(myParams->getAbsoluteMaxLatVelocity()); + } + + if (myParams->getRobotLengthFront() == 0) + myRobotLengthFront = myParams->getRobotLength() / 2.0; + else + myRobotLengthFront = myParams->getRobotLengthFront(); + + if (myParams->getRobotLengthRear() == 0) + myRobotLengthRear = myParams->getRobotLength() / 2.0; + else + myRobotLengthRear = myParams->getRobotLengthRear(); +} + + +AREXPORT bool ArRobot::madeConnection(bool resetConnectionTime) +{ + if (resetConnectionTime) + myConnectionOpenedTime.setToNow(); + + if (!ArRobotParams::internalGetUseDefaultBehavior()) + { + ArLog::log(ArLog::Normal, "Explicitly not loading ARIA Pioneer robot parameter files"); + myRobotType = myParams->getClassName(); + myRobotSubType = myParams->getSubClassName(); + processParamFile(); + return true; + } + + std::string subTypeParamName; + std::string paramFileName; + bool loadedSubTypeParam; + bool loadedNameParam; + bool hadDefault = true; + + if (myParams != NULL) + delete myParams; + + // Find the robot parameters to load and get them into the structure we have + if (ArUtil::strcasecmp(myRobotSubType, "p2dx") == 0) + myParams = new ArRobotP2DX; + else if (ArUtil::strcasecmp(myRobotSubType, "p2ce") == 0) + myParams = new ArRobotP2CE; + else if (ArUtil::strcasecmp(myRobotSubType, "p2de") == 0) + myParams = new ArRobotP2DXe; + else if (ArUtil::strcasecmp(myRobotSubType, "p2df") == 0) + myParams = new ArRobotP2DF; + else if (ArUtil::strcasecmp(myRobotSubType, "p2d8") == 0) + myParams = new ArRobotP2D8; + else if (ArUtil::strcasecmp(myRobotSubType, "amigo") == 0) + myParams = new ArRobotAmigo; + else if (ArUtil::strcasecmp(myRobotSubType, "amigo-sh") == 0) + myParams = new ArRobotAmigoSh; + else if (ArUtil::strcasecmp(myRobotSubType, "p2at") == 0) + myParams = new ArRobotP2AT; + else if (ArUtil::strcasecmp(myRobotSubType, "p2at8") == 0) + myParams = new ArRobotP2AT8; + else if (ArUtil::strcasecmp(myRobotSubType, "p2it") == 0) + myParams = new ArRobotP2IT; + else if (ArUtil::strcasecmp(myRobotSubType, "p2pb") == 0) + myParams = new ArRobotP2PB; + else if (ArUtil::strcasecmp(myRobotSubType, "p2pp") == 0) + myParams = new ArRobotP2PP; + else if (ArUtil::strcasecmp(myRobotSubType, "p3at") == 0) + myParams = new ArRobotP3AT; + else if (ArUtil::strcasecmp(myRobotSubType, "p3dx") == 0) + myParams = new ArRobotP3DX; + else if (ArUtil::strcasecmp(myRobotSubType, "perfpb") == 0) + myParams = new ArRobotPerfPB; + else if (ArUtil::strcasecmp(myRobotSubType, "pion1m") == 0) + myParams = new ArRobotPion1M; + else if (ArUtil::strcasecmp(myRobotSubType, "pion1x") == 0) + myParams = new ArRobotPion1X; + else if (ArUtil::strcasecmp(myRobotSubType, "psos1m") == 0) + myParams = new ArRobotPsos1M; + else if (ArUtil::strcasecmp(myRobotSubType, "psos43m") == 0) + myParams = new ArRobotPsos43M; + else if (ArUtil::strcasecmp(myRobotSubType, "psos1x") == 0) + myParams = new ArRobotPsos1X; + else if (ArUtil::strcasecmp(myRobotSubType, "pionat") == 0) + myParams = new ArRobotPionAT; + else if (ArUtil::strcasecmp(myRobotSubType, "mappr") == 0) + myParams = new ArRobotMapper; + else if (ArUtil::strcasecmp(myRobotSubType, "powerbot") == 0) + myParams = new ArRobotPowerBot; + else if (ArUtil::strcasecmp(myRobotSubType, "p2d8+") == 0) + myParams = new ArRobotP2D8Plus; + else if (ArUtil::strcasecmp(myRobotSubType, "p2at8+") == 0) + myParams = new ArRobotP2AT8Plus; + else if (ArUtil::strcasecmp(myRobotSubType, "perfpb+") == 0) + myParams = new ArRobotPerfPBPlus; + else if (ArUtil::strcasecmp(myRobotSubType, "p3dx-sh") == 0) + myParams = new ArRobotP3DXSH; + else if (ArUtil::strcasecmp(myRobotSubType, "p3at-sh") == 0) + myParams = new ArRobotP3ATSH; + else if (ArUtil::strcasecmp(myRobotSubType, "p3atiw-sh") == 0) + myParams = new ArRobotP3ATIWSH; + else if (ArUtil::strcasecmp(myRobotSubType, "patrolbot-sh") == 0) + myParams = new ArRobotPatrolBotSH; + else if (ArUtil::strcasecmp(myRobotSubType, "peoplebot-sh") == 0) + myParams = new ArRobotPeopleBotSH; + else if (ArUtil::strcasecmp(myRobotSubType, "powerbot-sh") == 0) + myParams = new ArRobotPowerBotSH; + else if (ArUtil::strcasecmp(myRobotSubType, "wheelchair-sh") == 0) + myParams = new ArRobotWheelchairSH; + else if (ArUtil::strcasecmp(myRobotSubType, "seekur") == 0) + myParams = new ArRobotSeekur; + else if (ArUtil::strcasecmp(myRobotSubType, "powerbot-sh-uarcs") == 0) + myParams = new ArRobotPowerBotSHuARCS; + else if (ArUtil::strcasecmp(myRobotSubType, "mt400") == 0) + myParams = new ArRobotMT400; + else if (ArUtil::strcasecmp(myRobotSubType, "researchPB") == 0) + myParams = new ArRobotResearchPB; + else if (ArUtil::strcasecmp(myRobotSubType, "seekurjr") == 0) + myParams = new ArRobotSeekurJr; + else if(ArUtil::strcasecmp(myRobotSubType, "p3dx-sh-lms1xx") == 0) + myParams = new ArRobotP3DXSH_lms1xx; + else if(ArUtil::strcasecmp(myRobotSubType, "p3at-sh-lms1xx") == 0) + myParams = new ArRobotP3ATSH_lms1xx; + else if(ArUtil::strcasecmp(myRobotSubType, "peoplebot-sh-lms1xx") == 0) + myParams = new ArRobotPeopleBotSH_lms1xx; + else if(ArUtil::strcasecmp(myRobotSubType, "p3dx-sh-lms500") == 0) + myParams = new ArRobotP3DXSH_lms500; + else if(ArUtil::strcasecmp(myRobotSubType, "p3at-sh-lms500") == 0) + myParams = new ArRobotP3ATSH_lms500; + else if(ArUtil::strcasecmp(myRobotSubType, "peoplebot-sh-lms500") == 0) + myParams = new ArRobotPeopleBotSH_lms500; + else if(ArUtil::strcasecmp(myRobotSubType, "powerbot-sh-lms500") == 0) + myParams = new ArRobotPowerBotSH_lms500; + else if(ArUtil::strcasecmp(myRobotSubType, "researchPB-lms500") == 0) + myParams = new ArRobotResearchPB_lms500; + else if(ArUtil::strcasecmp(myRobotSubType, "pioneer-lx") == 0 || + ArUtil::strcasecmp(myRobotSubType, "lx") == 0 || // subtype used in MobileSim 0.7.2 + ArUtil::strcasecmp(myRobotSubType, "marc_devel") == 0 || // subtype used in early versions of MARCOS firmware + ArUtil::strcasecmp(myRobotSubType, "lynx") == 0 + ) + myParams = new ArRobotPioneerLX; + else + { + hadDefault = false; + myParams = new ArRobotGeneric(myRobotName.c_str()); + } + + // load up the param file for the subtype + paramFileName = Aria::getDirectory(); + paramFileName += "params/"; + + // "marc_devel" is subtype given by early MTX core firmware, + // but it ought to be pioneer-lx for research pioneer lx. + if(ArUtil::strcasecmp(myRobotSubType, "marc_devel") == 0) + { + ArLog::log(ArLog::Verbose, "Note, Using pioneer-lx.p as parameter file for marc_devel robot subtype."); + paramFileName += "pioneer-lx"; + } + else + { + paramFileName += myRobotSubType; + } + + paramFileName += ".p"; + if ((loadedSubTypeParam = myParams->parseFile(paramFileName.c_str(), true, true))) + ArLog::log(ArLog::Normal, + "Loaded robot parameters from %s.p", + myRobotSubType.c_str()); + /* If the above line was replaced with this one line + paramFile->load(); + then the sonartest (and lots of other stuff probably) would break + */ + // then the one for the particular name, if we can + paramFileName = Aria::getDirectory(); + paramFileName += "params/"; + paramFileName += myRobotName; + paramFileName += ".p"; + if ((loadedNameParam = myParams->parseFile(paramFileName.c_str(), + true, true))) + { + if (loadedSubTypeParam) + ArLog::log(ArLog::Normal, + "Loaded robot parameters from %s.p on top of %s.p robot parameters", + myRobotName.c_str(), myRobotSubType.c_str()); + else + ArLog::log(ArLog::Normal, "Loaded robot parameters from %s.p", + myRobotName.c_str()); + } + + if (!loadedSubTypeParam && !loadedNameParam) + { + if (hadDefault) + ArLog::log(ArLog::Normal, "Using default parameters for a %s robot", + myRobotSubType.c_str()); + else + { + ArLog::log(ArLog::Terse, "Error: Have no parameters for this robot, bad configuration or out of date Aria"); + // in the default state (not connecting if we don't have params) + // we will return false... if we can connect without params then + // we'll keep going (this really shouldn't be used except by + // downloaders and such) + if (!myConnectWithNoParams) + return false; + } + } + + processParamFile(); + + if (myParams->getRequestIOPackets() || myRequestedIOPackets) + { + myRequestedIOPackets = true; + comInt(ArCommands::IOREQUEST, 2); + } + + if(myParams->getRequestEncoderPackets() || myRequestedEncoderPackets) + { + myRequestedEncoderPackets = true; + comInt(ArCommands::ENCODER, 2); + } + + return true; +} + +/** Encoder packet data is stored by ArRobot and can be read using + * getLeftEncoder() and getRightEncoder(). + * + * Encoder packets may be stopped with stopEncoderPackets(). + * + * Encoder packets are sent after the main SIP (motor packet) by ARCOS. If you want to + * handle encoder packets immediately upon reception, add a general robot packet handler to + * ArRobot with addPacketHandler(), and check the packet for the encoder packet ID + * 0x90. See addPacketHandler() for details on how to write a general packet + * handler. + */ +AREXPORT void ArRobot::requestEncoderPackets(void) +{ + comInt(ArCommands::ENCODER, 2); + myRequestedEncoderPackets = true; +} + +/** + @see requestIOPackets() +*/ +AREXPORT void ArRobot::requestIOPackets(void) +{ + comInt(ArCommands::IOREQUEST, 2); + myRequestedIOPackets = true; +} + +/** + @see requestEncoderPackets() +*/ +AREXPORT void ArRobot::stopEncoderPackets(void) +{ + comInt(ArCommands::ENCODER, 0); + myRequestedEncoderPackets = false; +} + +AREXPORT void ArRobot::stopIOPackets(void) +{ + comInt(ArCommands::IOREQUEST, 0); + myRequestedIOPackets = false; +} + + +AREXPORT bool ArRobot::haveRequestedEncoderPackets(void) +{ + return myRequestedEncoderPackets; +} + +AREXPORT bool ArRobot::haveRequestedIOPackets(void) +{ + return myRequestedIOPackets; +} + +AREXPORT void ArRobot::startStabilization(void) +{ + std::list::iterator it; + myIsStabilizing = true; + myStartedStabilizing.setToNow(); + + for (it = myStabilizingCBList.begin(); + it != myStabilizingCBList.end(); + it++) + (*it)->invoke(); + +} + +AREXPORT void ArRobot::finishedConnection(void) +{ + std::list::iterator it; + + myIsStabilizing = false; + myIsConnected = true; + myAsyncConnectFlag = false; + myBlockingConnectRun = false; + resetTripOdometer(); + + for (it = myConnectCBList.begin(); it != myConnectCBList.end(); it++) + (*it)->invoke(); + myLastPacketReceivedTime.setToNow(); + myLastOdometryReceivedTime.setToNow(); + + wakeAllConnWaitingThreads(); +} + +AREXPORT void ArRobot::failedConnect(void) +{ + std::list::iterator it; + + myAsyncConnectFlag = false; + myBlockingConnectRun = false; + ArLog::log(ArLog::Terse, "Failed to connect to robot."); + myIsConnected = false; + for (it = myFailedConnectCBList.begin(); + it != myFailedConnectCBList.end(); + it++) + (*it)->invoke(); + + if (myConn != NULL) + myConn->close(); + wakeAllConnOrFailWaitingThreads(); +} + +/** + Disconnects from a robot. This also calls of the DisconnectNormally + Callback Functors if the robot was actually connected to a robot when + this member was called. Then it disables the robot motors, sends CLOSE + command to robot, waits one seconds, and closes the communications connection. + This disconnection normally happens automatically when the program exits + by calling Aria::exit(), or if communication to the robot fails during + the run cycle, and this method does not need to be explicitly called. + @return true if not connected to a robot (so no disconnect can happen, but + it didn't failed either), also true if the command could be sent to the + robot (ie connection hasn't failed) + **/ + +AREXPORT bool ArRobot::disconnect(void) +{ + std::list::iterator it; + bool ret; + ArSerialConnection *serConn; + + if (!myIsConnected && !myIsStabilizing) + return true; + + ArLog::log(ArLog::Terse, "Disconnecting from robot."); + myNoTimeWarningThisCycle = true; + myIsConnected = false; + myIsStabilizing = false; + if (myIsConnected) + { + for (it = myDisconnectNormallyCBList.begin(); + it != myDisconnectNormallyCBList.end(); + it++) + (*it)->invoke(); + } + mySender.comInt(ArCommands::ENABLE, 0); + ArUtil::sleep(100); + ret = mySender.comInt(ArCommands::CLOSE, 1); + ArUtil::sleep(1000); + if (ret == true) + { + if (myConn != NULL) + { + ret = myConn->close(); + if ((serConn = dynamic_cast(myConn)) != NULL) + serConn->setBaud(myAsyncConnectStartBaud); + } + else + ret = false; + } + else if (myConn != NULL) + myConn->close(); + + return ret; +} + +AREXPORT void ArRobot::dropConnection(const char *reason) +{ + std::list::iterator it; + + if (!myIsConnected) + return; + + if (reason != NULL) + myDropConnectionReason = reason; + else + myDropConnectionReason = "Lost connection to the robot because of unknown error."; + + ArLog::log(ArLog::Terse, myDropConnectionReason.c_str()); + myIsConnected = false; + for (it = myDisconnectOnErrorCBList.begin(); + it != myDisconnectOnErrorCBList.end(); + it++) + (*it)->invoke(); + + if (myConn != NULL) + myConn->close(); + return; +} + +AREXPORT void ArRobot::cancelConnection(void) +{ + //std::list::iterator it; + + ArLog::log(ArLog::Verbose, "Cancelled connection to the robot because of command."); + myIsConnected = false; + myNoTimeWarningThisCycle = true; + myIsStabilizing = false; + return; +} + +/** + Stops the robot, by telling it to have a translational velocity and + rotational velocity of 0. Also note that if you are using actions, this + will cause the actions to be ignored until the direct motion precedence + timeout has been exceeded or clearDirectMotion is called. + @see setDirectMotionPrecedenceTime + @see getDirectMotionPrecedenceTime + @see clearDirectMotion + **/ +AREXPORT void ArRobot::stop(void) +{ + comInt(ArCommands::VEL, 0); + comInt(ArCommands::RVEL, 0); + if (hasLatVel()) + comInt(ArCommands::LATVEL, 0); + setVel(0); + setRotVel(0); + setLatVel(0); + myLastActionTransVal = 0; + myLastActionRotStopped = true; + myLastActionRotHeading = false; + myLastActionLatVal = 0; +} + +/** + Sets the desired translational velocity of the robot. + ArRobot caches this value, and sends it with a VEL command during the next cycle. + + @param velocity the desired translational velocity of the robot (mm/sec) + **/ +AREXPORT void ArRobot::setVel(double velocity) +{ + myTransType = TRANS_VEL; + myTransVal = velocity; + myTransVal2 = 0; + myTransSetTime.setToNow(); +} + +/** + Sets the desired lateral (sideways on local Y axis) translational velocity of the robot. + ArRobot caches this value, and sends it with a LATVEL command during the next cycle. + (Only has effect on robots that are capable of translating laterally, i.e. + Seekur. Other robots will ignore the command.) + + @param latVelocity the desired translational velocity of the robot (mm/sec) + **/ +AREXPORT void ArRobot::setLatVel(double latVelocity) +{ + myLatType = LAT_VEL; + myLatVal = latVelocity; + myLatSetTime.setToNow(); +} + +/** + Sets the velocity of each of the wheels on the robot + independently. ArRobot caches these values, and sends them with + a VEL2 command during the next + cycle. Note that this cancels both translational velocity AND + rotational velocity, and is canceled by any of the other direct + motion commands. + @sa setVel + @sa setRotVel + @sa clearDirectMotion + + @param leftVelocity the desired velocity of the left wheel + @param rightVelocity the desired velocity of the right wheel + **/ +AREXPORT void ArRobot::setVel2(double leftVelocity, double rightVelocity) +{ + myTransType = TRANS_VEL2; + myTransVal = leftVelocity; + myTransVal2 = rightVelocity; + myRotType = ROT_IGNORE; + myRotVal = 0; + myTransSetTime.setToNow(); +} + +/** + Tells the robot to begin moving the specified distance forward/backwards. + ArRobot caches this value, and sends it during the next cycle (with a MOVE + or VEL command, depending on the robot). + + @param distance the distance for the robot to move (millimeters). Note, + due to the implementation of the MOVE command on some robots, it is best to + restrict the distance to the range (5000mm, 5000mm] if possible. Not all + robots have this restriction, however. + **/ +AREXPORT void ArRobot::move(double distance) +{ + myTransType = TRANS_DIST_NEW; + myTransDistStart = getPose(); + myTransVal = distance; + myTransVal2 = 0; + myTransSetTime.setToNow(); +} + +/** + Determines if a move command is finished, to within a small + distance threshold, "delta". If delta = 0 (default), the delta distance + set with setMoveDoneDist() will be used. + + @param delta how close to the goal distance the robot must be, or 0 for previously set default + + @return true if the robot has finished the distance given in a move + command or if the robot is no longer in a move mode (because its + now running off of actions, or setVel() or setVel2() was called). + + @sa setMoveDoneDist + @sa getMoveDoneDist + **/ +AREXPORT bool ArRobot::isMoveDone(double delta) +{ + if (fabs(delta) < 0.001) + delta = myMoveDoneDist; + if (myTransType != TRANS_DIST && myTransType != TRANS_DIST_NEW) + return true; // no distance command operative + if (myTransDistStart.findDistanceTo(getPose()) < + fabs(myTransVal) - delta) + return false; + return true; +} + + +/** + Determines if a setHeading() command is finished, to within a small + distance. If delta = 0 (default), the delta distance used is that which was + set with setHeadingDoneDiff() (you can get that distnace value with + getHeadingDoneDiff(), the default is 3). + + @param delta how close to the goal distance the robot must be + + @return true if the robot has achieved the heading given in a move + command or if the robot is no longer in heading mode mode (because + its now running off of actions, setDHeading(), or setRotVel() was called). + **/ +AREXPORT bool ArRobot::isHeadingDone(double delta) const +{ + if (fabs(delta) < 0.001) + delta = myHeadingDoneDiff; + if (myRotType != ROT_HEADING) + return true; // no heading command operative + if(fabs(ArMath::subAngle(getTh(), myRotVal)) > delta) + return false; + return true; +} + + + +/** + Sets the heading of the robot, it caches this value, and sends it + during the next cycle. + + @param heading the desired heading of the robot (degrees) + **/ +AREXPORT void ArRobot::setHeading(double heading) +{ + myRotVal = heading; + myRotType = ROT_HEADING; + myRotSetTime.setToNow(); + if (myTransType == TRANS_VEL2) + { + myTransType = TRANS_IGNORE; + myTransVal = 0; + myTransVal2 = 0; + } +} + +/** + Sets the rotational velocity of the robot, it caches this value, + and sends it during the next cycle. + + @param velocity the desired rotational velocity of the robot (deg/sec) + **/ +AREXPORT void ArRobot::setRotVel(double velocity) +{ + myRotVal = velocity; + myRotType = ROT_VEL; + myRotSetTime.setToNow(); + if (myTransType == TRANS_VEL2) + { + myTransType = TRANS_IGNORE; + myTransVal = 0; + myTransVal2 = 0; + } +} + +/** + Sets a delta heading to the robot, it caches this value, and sends + it during the next cycle. + + @param deltaHeading the desired amount to change the heading of the robot by + **/ +AREXPORT void ArRobot::setDeltaHeading(double deltaHeading) +{ + myRotVal = ArMath::addAngle(getTh(), deltaHeading); + myRotType = ROT_HEADING; + myRotSetTime.setToNow(); + if (myTransType == TRANS_VEL2) + { + myTransType = TRANS_IGNORE; + myTransVal = 0; + myTransVal2 = 0; + } +} + +/** + This sets the absolute maximum velocity the robot will go... the + maximum velocity can also be set by the actions and by + setTransVelMax, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setTransVelMax. + + @param maxVel the maximum velocity to be set, it must be a non-zero + number and is in mm/sec + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxTransVel(double maxVel) +{ + if (maxVel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransVel: given a value <= 0 (%g) and will not set it", maxVel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxVel > myOrigRobotConfig->getTransVelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransVel: given a value (%g) over TransVelTop (%g) and will cap it", maxVel, myOrigRobotConfig->getTransVelTop()); + maxVel = myOrigRobotConfig->getTransVelTop(); + } + + if (fabs(maxVel - myAbsoluteMaxTransVel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, "ArRobot::setAbsoluteMaxTransVel: Setting to %g", + maxVel); + + myAbsoluteMaxTransVel = maxVel; + if (getTransVelMax() > myAbsoluteMaxTransVel) + setTransVelMax(myAbsoluteMaxTransVel); + return true; +} + +/** + This sets the absolute maximum velocity the robot will go... the + maximum velocity can also be set by the actions and by + setTransVelMax, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setTransVelMax. + + @param maxVel the maximum velocity to be set, it must be a non-zero + number and is in -mm/sec (use negative values) + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxTransNegVel(double maxNegVel) +{ + if (maxNegVel >= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransNegVel: given a value >= 0 (%g) and will not set it", maxNegVel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxNegVel < -myOrigRobotConfig->getTransVelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransNegVel: given a value (%g) below TransVelTop (-%g) and will cap it", maxNegVel, myOrigRobotConfig->getTransVelTop()); + maxNegVel = -myOrigRobotConfig->getTransVelTop(); + } + + if (fabs(maxNegVel - myAbsoluteMaxTransNegVel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, + "ArRobot::setAbsoluteMaxTransNegVel: Setting to %g", + maxNegVel); + + myAbsoluteMaxTransNegVel = maxNegVel; + if (getTransNegVelMax() < myAbsoluteMaxTransNegVel) + setTransNegVelMax(myAbsoluteMaxTransNegVel); + return true; +} + +/** + This sets the absolute maximum translational acceleration the robot + will do... the acceleration can also be set by the actions and by + setTransAccel, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setTransAccel. + + @param maxAccel the maximum acceleration to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxTransAccel(double maxAccel) +{ + if (maxAccel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransAccel: given a value <= 0 (%g) and will not set it", maxAccel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxAccel > myOrigRobotConfig->getTransAccelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransAccel: given a value (%g) over TransAccelTop (%g) and will cap it", maxAccel, myOrigRobotConfig->getTransAccelTop()); + maxAccel = myOrigRobotConfig->getTransAccelTop(); + } + + if (fabs(maxAccel - myAbsoluteMaxTransAccel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, + "ArRobot::setAbsoluteMaxTransAccel: Setting to %g", + maxAccel); + + myAbsoluteMaxTransAccel = maxAccel; + if (getTransAccel() > myAbsoluteMaxTransAccel) + setTransAccel(myAbsoluteMaxTransAccel); + return true; +} + +/** + This sets the absolute maximum translational deceleration the robot + will do... the deceleration can also be set by the actions and by + setTransDecel, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setTransDecel. + + @param maxDecel the maximum deceleration to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxTransDecel(double maxDecel) +{ + if (maxDecel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransDecel: given a value <= 0 (%g) and will not set it", maxDecel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxDecel > myOrigRobotConfig->getTransAccelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxTransDecel: given a value (%g) over TransAccelTop (%g) and will cap it", maxDecel, myOrigRobotConfig->getTransAccelTop()); + maxDecel = myOrigRobotConfig->getTransAccelTop(); + } + + if (fabs(maxDecel - myAbsoluteMaxTransDecel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, + "ArRobot::setAbsoluteMaxTransDecel: Setting to %g", + maxDecel); + + myAbsoluteMaxTransDecel = maxDecel; + if (getTransDecel() > myAbsoluteMaxTransDecel) + setTransDecel(myAbsoluteMaxTransDecel); + return true; +} + +/** + This sets the absolute maximum velocity the robot will go... the + maximum velocity can also be set by the actions and by + setRotVelMax, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setRotVelMax. + + @param maxVel the maximum velocity to be set, it must be a non-zero number + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxRotVel(double maxVel) +{ + if (maxVel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxRotVel: given a value <= 0 (%g) and will not use it", maxVel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxVel > myOrigRobotConfig->getRotVelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxRotVel: given a value (%g) over RotVelTop (%g) and will cap it", maxVel, myOrigRobotConfig->getRotVelTop()); + maxVel = myOrigRobotConfig->getRotVelTop(); + } + + if (fabs(maxVel - myAbsoluteMaxRotVel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, + "ArRobot::setAbsoluteMaxRotVel: Setting to %g", + maxVel); + + myAbsoluteMaxRotVel = maxVel; + if (getRotVelMax() > myAbsoluteMaxRotVel) + setRotVelMax(myAbsoluteMaxRotVel); + return true; +} + +/** + This sets the absolute maximum rotational acceleration the robot + will do... the acceleration can also be set by the actions and by + setRotAccel, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setRotAccel. + + @param maxAccel the maximum acceleration to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxRotAccel(double maxAccel) +{ + if (maxAccel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxRotAccel: given a value <= 0 (%g) and will not use it", maxAccel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxAccel > myOrigRobotConfig->getRotAccelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxRotAccel: given a value (%g) over RotAccelTop (%g) and will cap it", maxAccel, myOrigRobotConfig->getRotAccelTop()); + maxAccel = myOrigRobotConfig->getRotAccelTop(); + } + + if (fabs(maxAccel - myAbsoluteMaxRotAccel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, + "ArRobot::setAbsoluteMaxRotAccel: Setting to %g", + maxAccel); + + myAbsoluteMaxRotAccel = maxAccel; + if (getRotAccel() > myAbsoluteMaxRotAccel) + setRotAccel(myAbsoluteMaxRotAccel); + return true; +} + +/** + This sets the absolute maximum rotational deceleration the robot + will do... the deceleration can also be set by the actions and by + setRotDecel, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setRotDecel. + + @param maxDecel the maximum deceleration to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxRotDecel(double maxDecel) +{ + if (maxDecel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxRotDecel: given a value <= 0 (%g) and will not use it", maxDecel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxDecel > myOrigRobotConfig->getRotAccelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxRotDecel: given a value (%g) over RotAccelTop (%g) and will cap it", maxDecel, myOrigRobotConfig->getRotAccelTop()); + maxDecel = myOrigRobotConfig->getRotAccelTop(); + } + + if (fabs(maxDecel - myAbsoluteMaxRotDecel) > ArMath::epsilon()) + ArLog::log(ArLog::Verbose, + "ArRobot::setAbsoluteMaxRotDecel: Setting to %g", + maxDecel); + + myAbsoluteMaxRotDecel = maxDecel; + if (getRotDecel() > myAbsoluteMaxRotDecel) + setRotDecel(myAbsoluteMaxRotDecel); + return true; +} + +/** + This sets the absolute maximum lateral velocity the robot will + go... the maximum velocity can also be set by the actions and by + setLatVelMax, but it will not be allowed to go higher than this + + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setLatVelMax. + + @param maxLatVel the maximum velocity to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxLatVel(double maxLatVel) +{ + if (maxLatVel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxLatVel: given a value <= 0 (%g) and will not use it", maxLatVel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxLatVel > myOrigRobotConfig->getLatVelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxLatVel: given a value (%g) over LatVelTop (%g) and will cap it", + maxLatVel, myOrigRobotConfig->getLatVelTop()); + maxLatVel = myOrigRobotConfig->getLatVelTop(); + } + + if (fabs(maxLatVel - myAbsoluteMaxLatVel) > ArMath::epsilon()) + ArLog::log(ArLog::Normal, + "ArRobot::setAbsoluteMaxLatVel: Setting to %g", + maxLatVel); + + myAbsoluteMaxLatVel = maxLatVel; + if (getLatVelMax() > myAbsoluteMaxLatVel) + setLatVelMax(myAbsoluteMaxLatVel); + return true; +} + +/** + This sets the absolute maximum lateral acceleration the robot + will do... the acceleration can also be set by the actions and by + setLatAccel, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setLatAccel. + + @param maxAccel the maximum acceleration to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxLatAccel(double maxAccel) +{ + if (maxAccel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxLatAccel: given a value <= 0 (%g) and will not use it", maxAccel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxAccel > myOrigRobotConfig->getLatAccelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxLatAccel: given a value (%g) over LatAccelTop (%g) and will cap it", + maxAccel, myOrigRobotConfig->getLatAccelTop()); + maxAccel = myOrigRobotConfig->getLatAccelTop(); + } + + if (fabs(maxAccel - myAbsoluteMaxLatAccel) > ArMath::epsilon()) + ArLog::log(ArLog::Normal, + "ArRobot::setAbsoluteMaxLatAccel: Setting to %g", + maxAccel); + + myAbsoluteMaxLatAccel = maxAccel; + if (getLatAccel() > myAbsoluteMaxLatAccel) + setLatAccel(myAbsoluteMaxLatAccel); + return true; +} + +/** + This sets the absolute maximum lateral deceleration the robot + will do... the deceleration can also be set by the actions and by + setLatDecel, but it will not be allowed to go higher than this + value. You should not set this very often, if you want to + manipulate this value you should use the actions or setLatDecel. + + @param maxDecel the maximum deceleration to be set, it must be a non-zero + number + + @return true if the value is good, false othrewise + **/ + +AREXPORT bool ArRobot::setAbsoluteMaxLatDecel(double maxDecel) +{ + if (maxDecel <= 0) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxLatDecel: given a value <= 0 (%g) and will not use it", maxDecel); + return false; + } + + if (myOrigRobotConfig->hasPacketArrived() && + maxDecel > myOrigRobotConfig->getLatAccelTop()) + { + ArLog::log(ArLog::Normal, "ArRobot::setAbsoluteMaxLatDecel: given a value (%g) over LatAccelTop (%g) and will cap it", + maxDecel, myOrigRobotConfig->getLatAccelTop()); + maxDecel = myOrigRobotConfig->getLatAccelTop(); + } + + if (fabs(maxDecel - myAbsoluteMaxLatDecel) > ArMath::epsilon()) + ArLog::log(ArLog::Normal, + "ArRobot::setAbsoluteMaxLatDecel: Setting to %g", + maxDecel); + + myAbsoluteMaxLatDecel = maxDecel; + if (getLatDecel() > myAbsoluteMaxLatDecel) + setLatDecel(myAbsoluteMaxLatDecel); + return true; +} + +/** + This gets the raw IO Analog value, which is a number between 0 and + 1024 (2^10). + + @see requestIOPackets() + **/ +AREXPORT int ArRobot::getIOAnalog(int num) const +{ + if (num <= getIOAnalogSize()) + return myIOAnalog[num]; + else + return 0; +} + +/** + This gets the IO Analog value converted to a voltage between 0 and 5 voltes. + @see requestIOPackets() + **/ +AREXPORT double ArRobot::getIOAnalogVoltage(int num) const +{ + if (num <= getIOAnalogSize()) + { + return (myIOAnalog[num] & 0xfff) * .0048828; + } + else + return 0; +} + +/** + @see requestIOPackets() + */ +AREXPORT unsigned char ArRobot::getIODigIn(int num) const +{ + if (num <= getIODigInSize()) + return myIODigIn[num]; + else + return (unsigned char) 0; +} + +/** + @see requestIOPackets() + */ +AREXPORT unsigned char ArRobot::getIODigOut(int num) const +{ + if (num <= getIODigOutSize()) + return myIODigOut[num]; + else + return (unsigned char) 0; +} + +/** + @return the ArRobotParams instance the robot is using for its parameters + **/ +AREXPORT const ArRobotParams *ArRobot::getRobotParams(void) const +{ + return myParams; +} + +/** + @return the ArRobotParams instance the robot is using for its parameters + **/ +AREXPORT ArRobotParams *ArRobot::getRobotParamsInternal(void) +{ + return myParams; +} + +/** + @return the ArRobotConfigPacketReader taken when this instance got + connected to the robot +**/ +AREXPORT const ArRobotConfigPacketReader *ArRobot::getOrigRobotConfig(void) const +{ + return myOrigRobotConfig; +} + +/** + Adds a packet handler. A packet handler is an ArRetFunctor1, + (e.g. created as an instance of ArRetFunctor1C. The return is a boolean, while the functor + takes an ArRobotPacket pointer as the argument. This functor is placed in + a list of functors to call when a packet arrives. This list is processed + in order until one of the handlers returns true. Your packet handler + function may be invoked for any packet, so it should test the packet type + ID (see ArRobotPacket::getID()). If you handler gets data from the packet + (it "handles" it) it should return true, to prevent ArRobot from invoking + other handlers with the packet (with data removed). If you hander + cannot interpret the packet, it should leave it unmodified and return + false to allow other handlers a chance to receive it. + @param functor the functor to call when the packet comes in + @param position whether to place the functor first or last + @see remPacketHandler +**/ +AREXPORT void ArRobot::addPacketHandler( + ArRetFunctor1 *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myPacketHandlerList.push_front(functor); + else if (position == ArListPos::LAST) + myPacketHandlerList.push_back(functor); + else + ArLog::log(ArLog::Terse, "ArRobot::addPacketHandler: Invalid position."); + +} + +/** + @param functor the functor to remove from the list of packet handlers + @see addPacketHandler +**/ +AREXPORT void ArRobot::remPacketHandler( + ArRetFunctor1 *functor) +{ + myPacketHandlerList.remove(functor); +} + +/** + Adds a connect callback, which is an ArFunctor, (created as an ArFunctorC). + The entire list of connect callbacks is called when a connection is made + with the robot. If you have some sort of module that adds a callback, + that module must remove the callback when the module is removed. + @param functor A functor (created from ArFunctorC) which refers to the + function to call. + @param position whether to place the functor first or last + @see remConnectCB +**/ +AREXPORT void ArRobot::addConnectCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myConnectCBList.push_front(functor); + else if (position == ArListPos::LAST) + myConnectCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArRobot::addConnectCallback: Invalid position."); +} + +/** + @param functor the functor to remove from the list of connect callbacks + @see addConnectCB +**/ +AREXPORT void ArRobot::remConnectCB(ArFunctor *functor) +{ + myConnectCBList.remove(functor); +} + + +/** Adds a failed connect callback,which is an ArFunctor, created as an + ArFunctorC. This whole list of failed connect callbacks is called when + an attempt is made to connect to the robot, but fails. The usual reason + for this failure is either that there is no robot/sim where the connection + was tried to be made, the robot wasn't given a connection, or the radio + modems that communicate with the robot aren't on. If you have some sort + of module that adds a callback, that module must remove the callback + when the module removed. + @param functor functor created from ArFunctorC which refers to the + function to call. + @param position whether to place the functor first or last + @see remFailedConnectCB +**/ +AREXPORT void ArRobot::addFailedConnectCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myFailedConnectCBList.push_front(functor); + else if (position == ArListPos::LAST) + myFailedConnectCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArRobot::addFailedCallback: Invalid position."); +} + +/** + @param functor the functor to remove from the list of connect callbacks + @see addFailedConnectCB +**/ +AREXPORT void ArRobot::remFailedConnectCB(ArFunctor *functor) +{ + myFailedConnectCBList.remove(functor); +} + +/** Adds a disconnect normally callback,which is an ArFunctor, created as an + ArFunctorC. This whole list of disconnect normally callbacks is called + when something calls disconnect if the instance isConnected. If there is + no connection and disconnect is called nothing is done. If you have some + sort of module that adds a callback, that module must remove the callback + when the module is removed. + @param functor functor created from ArFunctorC which refers to the + function to call. + @param position whether to place the functor first or last + @see remFailedConnectCB +**/ +AREXPORT void ArRobot::addDisconnectNormallyCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myDisconnectNormallyCBList.push_front(functor); + else if (position == ArListPos::LAST) + myDisconnectNormallyCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArRobot::addDisconnectNormallyCB: Invalid position."); +} + +/** + @param functor the functor to remove from the list of connect callbacks + @see addDisconnectNormallyCB +**/ +AREXPORT void ArRobot::remDisconnectNormallyCB(ArFunctor *functor) +{ + myDisconnectNormallyCBList.remove(functor); +} + +/** Adds a disconnect on error callback, which is an ArFunctor, created as an + ArFunctorC. This whole list of disconnect on error callbacks is called + when ARIA loses connection to a robot because of an error. This can occur + if the physical connection (ie serial cable) between the robot and the + computer is severed/disconnected, if one of a pair of radio modems that + connect the robot and computer are disconnected, if someone presses the + reset button on the robot, or if the simulator is closed while ARIA + is connected to it. Note that if the link between the two is lost the + ARIA assumes it is temporary until it reaches a timeout value set with + setConnectionTimeoutTime. If you have some sort of module that adds a + callback, that module must remove the callback when the module removed. + @param functor functor created from ArFunctorC which refers to the + function to call. + @param position whether to place the functor first or last + @see remDisconnectOnErrorCB +**/ +AREXPORT void ArRobot::addDisconnectOnErrorCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myDisconnectOnErrorCBList.push_front(functor); + else if (position == ArListPos::LAST) + myDisconnectOnErrorCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArRobot::addDisconnectOnErrorCB: Invalid position"); +} + +/** + @param functor the functor to remove from the list of connect callbacks + @see addDisconnectOnErrorCB +**/ +AREXPORT void ArRobot::remDisconnectOnErrorCB(ArFunctor *functor) +{ + myDisconnectOnErrorCBList.remove(functor); +} + +/** + Adds a callback that is called when the run loop exits. The functor is + which is an ArFunctor, created as an ArFunctorC. The whole list of + functors is called when the run loop exits. This is most usefull for + threaded programs that run the robot using ArRobot::runAsync. This will + allow user threads to know when the robot loop has exited. + @param functor functor created from ArFunctorC which refers to the + function to call. + @param position whether to place the functor first or last + @see remRunExitCB +**/ +AREXPORT void ArRobot::addRunExitCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myRunExitCBList.push_front(functor); + else if (position == ArListPos::LAST) + myRunExitCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, "ArRobot::addRunExitCB: Invalid position"); +} + +/** + @param functor The functor to remove from the list of run exit callbacks + @see addRunExitCB +**/ +AREXPORT void ArRobot::remRunExitCB(ArFunctor *functor) +{ + myRunExitCBList.remove(functor); +} + +/** + Adds a stablizing callback, which is an ArFunctor, created as an + ArFunctorC. The entire list of connect callbacks is called just + before the connection is called done to the robot. This time can + be used to calibtrate readings (on things like gyros). + + @param functor The functor to call (e.g. ArFunctorC) + + @param position whether to place the functor first or last + + @see remConnectCB +**/ +AREXPORT void ArRobot::addStabilizingCB(ArFunctor *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myStabilizingCBList.push_front(functor); + else if (position == ArListPos::LAST) + myStabilizingCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArRobot::addConnectCallback: Invalid position."); +} + +/** + @param functor the functor to remove from the list of stabilizing callbacks + @see addConnectCB +**/ +AREXPORT void ArRobot::remStabilizingCB(ArFunctor *functor) +{ + myStabilizingCBList.remove(functor); +} + + +AREXPORT std::list * ArRobot::getRunExitListCopy() +{ + return(new std::list(myRunExitCBList)); +} + +/** + This will suspend the calling thread until the ArRobot's run loop has + managed to connect with the robot. There is an optional paramater of + milliseconds to wait for the ArRobot to connect. If msecs is set to 0, + it will wait until the ArRobot connects. This function will never + return if the robot can not be connected with. If you want to be able + to handle that case within the calling thread, you must call + waitForConnectOrConnFail(). + @param msecs milliseconds in which to wait for the ArRobot to connect + @return WAIT_CONNECTED for success + @see waitForConnectOrConnFail + @see wakeAllWaitingThreads + @see wakeAllConnWaitingThreads + @see wakeAllRunExitWaitingThreads +**/ +AREXPORT ArRobot::WaitState ArRobot::waitForConnect(unsigned int msecs) +{ + int ret; + + if (isConnected()) + return(WAIT_CONNECTED); + + if (msecs == 0) + ret=myConnectCond.wait(); + else + ret=myConnectCond.timedWait(msecs); + + if (ret == ArCondition::STATUS_WAIT_INTR) + return(WAIT_INTR); + else if (ret == ArCondition::STATUS_WAIT_TIMEDOUT) + return(WAIT_TIMEDOUT); + else if (ret == 0) + return(WAIT_CONNECTED); + else + return(WAIT_FAIL); +} + +/** + This will suspend the calling thread until the ArRobot's run loop has + managed to connect with the robot or fails to connect with the robot. + There is an optional paramater of milliseconds to wait for the ArRobot + to connect. If msecs is set to 0, it will wait until the ArRobot connects. + @param msecs milliseconds in which to wait for the ArRobot to connect + @return WAIT_CONNECTED for success + @see waitForConnect +**/ +AREXPORT ArRobot::WaitState +ArRobot::waitForConnectOrConnFail(unsigned int msecs) +{ + int ret; + + if (isConnected()) + return(WAIT_CONNECTED); + + if (msecs == 0) + ret=myConnOrFailCond.wait(); + else + ret=myConnOrFailCond.timedWait(msecs); + + if (ret == ArCondition::STATUS_WAIT_INTR) + return(WAIT_INTR); + else if (ret == ArCondition::STATUS_WAIT_TIMEDOUT) + return(WAIT_TIMEDOUT); + else if (ret == 0) + { + if (isConnected()) + return(WAIT_CONNECTED); + else + return(WAIT_FAILED_CONN); + } + else + return(WAIT_FAIL); +} + +/** + This will suspend the calling thread until the ArRobot's run loop has + exited. There is an optional paramater of milliseconds to wait for the + ArRobot run loop to exit . If msecs is set to 0, it will wait until + the ArRrobot run loop exits. + @param msecs milliseconds in which to wait for the robot to connect + @return WAIT_RUN_EXIT for success +**/ +AREXPORT ArRobot::WaitState ArRobot::waitForRunExit(unsigned int msecs) +{ + int ret; + + if (!isRunning()) + return(WAIT_RUN_EXIT); + + if (msecs == 0) + ret=myRunExitCond.wait(); + else + ret=myRunExitCond.timedWait(msecs); + + if (ret == ArCondition::STATUS_WAIT_INTR) + return(WAIT_INTR); + else if (ret == ArCondition::STATUS_WAIT_TIMEDOUT) + return(WAIT_TIMEDOUT); + else if (ret == 0) + return(WAIT_RUN_EXIT); + else + return(WAIT_FAIL); +} + +/** + This will wake all the threads waiting for various major state changes + in this particular ArRobot. This includes all threads waiting for the + robot to be connected and all threads waiting for the run loop to exit. + @see wakeAllConnWaitingThreads + @see wakeAllRunExitWaitingThreads +**/ +AREXPORT void ArRobot::wakeAllWaitingThreads() +{ + wakeAllConnWaitingThreads(); + wakeAllRunExitWaitingThreads(); +} + +/** + This will wake all the threads waiting for the robot to be connected. + @see wakeAllWaitingThreads + @see wakeAllRunExitWaitingThreads +**/ +AREXPORT void ArRobot::wakeAllConnWaitingThreads() +{ + myConnectCond.broadcast(); + myConnOrFailCond.broadcast(); +} + +/** + This will wake all the threads waiting for the robot to be connected or + waiting for the robot to fail to connect. + @see wakeAllWaitingThreads + @see wakeAllRunExitWaitingThreads +**/ +AREXPORT void ArRobot::wakeAllConnOrFailWaitingThreads() +{ + myConnOrFailCond.broadcast(); +} + +/** + This will wake all the threads waiting for the run loop to exit. + @see wakeAllWaitingThreads + @see wakeAllConnWaitingThreads +**/ +AREXPORT void ArRobot::wakeAllRunExitWaitingThreads() +{ + myRunExitCond.broadcast(); +} + +/** + This gets the root of the synchronous task tree, so that someone can add + their own new types of tasks, or find out more information about + each task... only serious developers should use this. + @return the root of the sycnhronous task tree + @see ArSyncTask +**/ +AREXPORT ArSyncTask *ArRobot::getSyncTaskRoot(void) +{ + return mySyncTaskRoot; +} + +/** + The synchronous tasks get called every robot cycle (every 100 ms by + default). + + @param name the name to give to the task, should be unique + + @param position the place in the list of user tasks to place this + task, this can be any integer, though by convention 0 to 100 is + used. The tasks are called in order of highest number to lowest + position number. + + @param functor functor created from ArFunctorC which refers to the + function to call. + + @param state Optional pointer to external ArSyncTask state variable; normally not needed + and may be NULL or omitted. + + @see remUserTask +**/ +AREXPORT bool ArRobot::addUserTask(const char *name, int position, + ArFunctor *functor, + ArTaskState::State *state) +{ + ArSyncTask *proc; + if (mySyncTaskRoot == NULL) + return false; + + proc = mySyncTaskRoot->findNonRecursive("User Tasks"); + if (proc == NULL) + return false; + + proc->addNewLeaf(name, position, functor, state); + return true; +} + +/** + @see addUserTask + @see remUserTask(ArFunctor *functor) +**/ +AREXPORT void ArRobot::remUserTask(const char *name) +{ + ArSyncTask *proc; + ArSyncTask *userProc; + + if (mySyncTaskRoot == NULL) + return; + + proc = mySyncTaskRoot->findNonRecursive("User Tasks"); + if (proc == NULL) + return; + + userProc = proc->findNonRecursive(name); + if (userProc == NULL) + return; + + + delete userProc; + +} + +/** + @see addUserTask + @see remUserTask(std::string name) +**/ +AREXPORT void ArRobot::remUserTask(ArFunctor *functor) +{ + ArSyncTask *proc; + ArSyncTask *userProc; + + if (mySyncTaskRoot == NULL) + return; + + proc = mySyncTaskRoot->findNonRecursive("User Tasks"); + if (proc == NULL) + return; + + + userProc = proc->findNonRecursive(functor); + if (userProc == NULL) + return; + + + delete userProc; + +} + +/** + The synchronous tasks get called every robot cycle (every 100 ms by + default). + @param name the name to give to the task, should be unique + @param position the place in the list of user tasks to place this + task, this can be any integer, though by convention 0 to 100 is used. + The tasks are called in order of highest number to lowest number. + @param functor functor created from ArFunctorC which refers to the + function to call. + @param state Optional pointer to external ArSyncTask state variable; normally not needed + and may be NULL or omitted. + @see remSensorInterpTask +**/ +AREXPORT bool ArRobot::addSensorInterpTask(const char *name, int position, + ArFunctor *functor, + ArTaskState::State *state) +{ + ArSyncTask *proc; + if (mySyncTaskRoot == NULL) + return false; + + proc = mySyncTaskRoot->findNonRecursive("Sensor Interp"); + if (proc == NULL) + return false; + + proc->addNewLeaf(name, position, functor, state); + return true; +} + +/** + @see addSensorInterpTask + @see remSensorInterpTask(ArFunctor *functor) +**/ +AREXPORT void ArRobot::remSensorInterpTask(const char *name) +{ + ArSyncTask *proc; + ArSyncTask *sensorInterpProc; + + if (mySyncTaskRoot == NULL) + return; + + proc = mySyncTaskRoot->findNonRecursive("Sensor Interp"); + if (proc == NULL) + return; + + sensorInterpProc = proc->findNonRecursive(name); + if (sensorInterpProc == NULL) + return; + + + delete sensorInterpProc; + +} + +/** + @see addSensorInterpTask + @see remSensorInterpTask(std::string name) +**/ +AREXPORT void ArRobot::remSensorInterpTask(ArFunctor *functor) +{ + ArSyncTask *proc; + ArSyncTask *sensorInterpProc; + + if (mySyncTaskRoot == NULL) + return; + + proc = mySyncTaskRoot->findNonRecursive("Sensor Interp"); + if (proc == NULL) + return; + + + sensorInterpProc = proc->findNonRecursive(functor); + if (sensorInterpProc == NULL) + return; + + + delete sensorInterpProc; + +} + +/** + @see ArLog +**/ +AREXPORT void ArRobot::logUserTasks(void) const +{ + ArSyncTask *proc; + if (mySyncTaskRoot == NULL) + return; + + proc = mySyncTaskRoot->findNonRecursive("User Tasks"); + if (proc == NULL) + return; + + proc->log(); +} + +/** + @see ArLog +**/ +AREXPORT void ArRobot::logAllTasks(void) const +{ + if (mySyncTaskRoot != NULL) + mySyncTaskRoot->log(); +} + +/** + Finds a user task by its name, searching the entire space of tasks + @return NULL if no user task of that name found, otherwise a pointer to + the ArSyncTask for the first task found with that name +**/ +AREXPORT ArSyncTask *ArRobot::findUserTask(const char *name) +{ + ArSyncTask *proc; + if (mySyncTaskRoot == NULL) + return NULL; + + proc = mySyncTaskRoot->findNonRecursive("User Tasks"); + if (proc == NULL) + return NULL; + + return proc->find(name); +} + +/** + Finds a user task by its functor, searching the entire space of tasks + @return NULL if no user task with that functor found, otherwise a pointer + to the ArSyncTask for the first task found with that functor +**/ +AREXPORT ArSyncTask *ArRobot::findUserTask(ArFunctor *functor) +{ + ArSyncTask *proc; + if (mySyncTaskRoot == NULL) + return NULL; + + proc = mySyncTaskRoot->findNonRecursive("User Tasks"); + if (proc == NULL) + return NULL; + + return proc->find(functor); +} + +/** + Finds a task by its name, searching the entire space of tasks + @return NULL if no task of that name found, otherwise a pointer to the + ArSyncTask for the first task found with that name +**/ +AREXPORT ArSyncTask *ArRobot::findTask(const char *name) +{ + if (mySyncTaskRoot != NULL) + return mySyncTaskRoot->find(name); + else + return NULL; + +} + +/** + Finds a task by its functor, searching the entire space of tasks + @return NULL if no task with that functor found, otherwise a pointer + to the ArSyncTask for the first task found with that functor +**/ +AREXPORT ArSyncTask *ArRobot::findTask(ArFunctor *functor) +{ + if (mySyncTaskRoot != NULL) + return mySyncTaskRoot->find(functor); + else + return NULL; + +} + +/** + Adds an action to the list of actions with the given priority. In + the case of two (or more) actions with the same priority, the + default resolver (ArPriorityResolver) averages the the multiple + readings. The priority can be any integer, but as a convention 0 + to 100 is used, with 100 being the highest priority. The default + resolver (ArPriorityResolver) resolves the actions in order of descending + priority. For example, an action with priority 100 is evaluated before + one with priority 99, followed by 50, etc. This means that an action with + a higher priority may be able to supercede a lower-priority action's + desired value for a certain output to a lesser or greater degree, depending + on how high a "strength" value it sets. See the overview of ARIA in this + reference manual for more discussion on Actions. + + @param action the action to add + @param priority what importance to give the action; how to order the actions. High priority actions are evaluated by the action resolvel before lower priority actions. + @return true if the action was successfully added, false on error (e.g. the action was NULL) + @sa remAction(ArAction*) + @sa remAction(const char*) + @sa findAction(const char*) +*/ +AREXPORT bool ArRobot::addAction(ArAction *action, int priority) +{ + if (action == NULL) + { + ArLog::log(ArLog::Terse, + "ArRobot::addAction: an attempt was made to add a NULL action pointer"); + return false; + } + + action->setRobot(this); + myActions.insert(std::pair(priority, action)); + return true; +} + +/** + Finds the action with the given name and removes it from the actions... + if more than one action has that name it find the one with the lowest + priority + @param actionName the name of the action we want to find + @return whether remAction found anything with that action to remove or not + @sa addAction() + @sa remAction(ArAction*) + @sa findAction(const char*) +**/ +AREXPORT bool ArRobot::remAction(const char *actionName) +{ + ArResolver::ActionMap::iterator it; + ArAction *act; + + for (it = myActions.begin(); it != myActions.end(); ++it) + { + act = (*it).second; + if (strcmp(actionName, act->getName()) == 0) + break; + } + if (it != myActions.end()) + { + myActions.erase(it); + return true; + } + return false; + +} + +/** + Finds the action with the given pointer and removes it from the actions... + if more than one action has that pointer it find the one with the lowest + priority + @param action the action we want to remove + @return whether remAction found anything with that action to remove or not + * @sa addAction + * @sa remAction(const char*) + * @sa findAction(const char*) +**/ +AREXPORT bool ArRobot::remAction(ArAction *action) +{ + ArResolver::ActionMap::iterator it; + ArAction *act; + + for (it = myActions.begin(); it != myActions.end(); ++it) + { + act = (*it).second; + if (act == action) + break; + } + if (it != myActions.end()) + { + myActions.erase(it); + return true; + } + return false; + +} + + +/** + Finds the action with the given name... if more than one action + has that name it find the one with the highest priority + @param actionName the name of the action we want to find + @return the action, if found. If not found, NULL + @sa addAction + @sa remAction(ArAction*) + @sa remAction(const char*) +**/ +AREXPORT ArAction *ArRobot::findAction(const char *actionName) +{ + ArResolver::ActionMap::reverse_iterator it; + ArAction *act; + + for (it = myActions.rbegin(); it != myActions.rend(); ++it) + { + act = (*it).second; + if (strcmp(actionName, act->getName()) == 0) + return act; + } + return NULL; +} + +/** + * @internal + This returns the actionMap the robot has... do not mess with this + list except by using ArRobot::addAction() and ArRobot::remAction()... + This is jsut for the things like ArActionGroup that want to + deactivate or activate all the actions (well, only deactivating + everything makes sense). + @return the actions the robot is using +**/ + +AREXPORT ArResolver::ActionMap *ArRobot::getActionMap(void) +{ + return &myActions; +} + +AREXPORT void ArRobot::deactivateActions(void) +{ + ArResolver::ActionMap *am; + ArResolver::ActionMap::iterator amit; + + am = getActionMap(); + if (am == NULL) + { + ArLog::log(ArLog::Terse, + "ArRobot::deactivateActions: NULL action map... failed."); + return; + } + for (amit = am->begin(); amit != am->end(); amit++) + (*amit).second->deactivate(); + + +} + + +AREXPORT void ArRobot::logActions(bool logDeactivated) const +{ + ArResolver::ActionMap::const_reverse_iterator it; + int lastPriority; + bool first = true; + const ArAction *action; + + if (logDeactivated) + ArLog::log(ArLog::Terse, "The action list (%d total):", + myActions.size()); + else + ArLog::log(ArLog::Terse, "The active action list:"); + + for (it = myActions.rbegin(); it != myActions.rend(); ++it) + { + action = (*it).second; + if ((logDeactivated || action->isActive()) && + (first || lastPriority != (*it).first)) + { + ArLog::log(ArLog::Terse, "Priority %d:", (*it).first); + first = false; + lastPriority = (*it).first; + } + if (logDeactivated || action->isActive()) + action->log(false); + } +} + +AREXPORT ArResolver *ArRobot::getResolver(void) +{ + return myResolver; +} + +AREXPORT void ArRobot::setResolver(ArResolver *resolver) +{ + if (myOwnTheResolver) + { + delete myResolver; + myResolver = NULL; + } + + myResolver = resolver; +} + +/** + * @internal + * + If state reflecting (really direct motion command reflecting) was + enabled in the constructor (ArRobot::ArRobot) then this will see if + there are any direct motion commands to send, and if not then send + the command given by the actions. If state reflection is disabled + this will send a pulse to the robot every state reflection refresh + time (setStateReflectionRefreshTime), if you don't wish this to happen + simply set this to a very large value. +**/ +AREXPORT void ArRobot::stateReflector(void) +{ + short transVal; + short transVal2; + short maxVel; + short maxNegVel; + double maxTransVel; + double maxNegTransVel; + double transAccel; + double transDecel; + + double maxRotVel = -1; + double maxRotVelPos = -1; + double maxRotVelNeg = -1; + short rotVal = 0; + double rotAccel; + double rotDecel; + bool rotStopped = false; + bool rotHeading = false; + double encTh; + double rawTh; + + short latVal; + short maxLatVel; + double maxLeftLatVel; + double maxRightLatVel; + double latAccel; + double latDecel; + + if (!myIsConnected) + return; + + myTryingToMove = false; + + // if this is true actions can't go + if ((myTransType != TRANS_NONE && myDirectPrecedenceTime == 0) || + (myTransType != TRANS_NONE && myDirectPrecedenceTime != 0 && + myTransSetTime.mSecSince() < myDirectPrecedenceTime)) + { + myActionTransSet = false; + transVal = ArMath::roundShort(myTransVal); + transVal2 = 0; + + if (hasSettableVelMaxes() && + ArMath::fabs(myLastSentTransVelMax - myTransVelMax) >= 1) + { + comInt(ArCommands::SETV, + ArMath::roundShort(myTransVelMax)); + myLastSentTransVelMax = myTransVelMax; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action trans max vel of %d", + ArMath::roundShort(myTransVelMax)); + } + + if (hasSettableAccsDecs() && ArMath::fabs(myTransAccel) > 1 && + ArMath::fabs(myLastSentTransAccel - myTransAccel) >= 1) + { + comInt(ArCommands::SETA, + ArMath::roundShort(myTransAccel)); + myLastSentTransAccel = myTransAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action trans accel of %d", + ArMath::roundShort(myTransAccel)); + } + + if (hasSettableAccsDecs() && ArMath::fabs(myTransDecel) > 1 && + ArMath::fabs(myLastSentTransDecel - myTransDecel) >= 1) + { + comInt(ArCommands::SETA, + -ArMath::roundShort(myTransDecel)); + myLastSentTransDecel = myTransDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action trans decel of %d", + -ArMath::roundShort(myTransDecel)); + } + + if (myTransType == TRANS_VEL) + { + maxVel = ArMath::roundShort(myTransVelMax); + maxNegVel = ArMath::roundShort(myTransNegVelMax); + if (transVal > maxVel) + transVal = maxVel; + if (transVal < maxNegVel) + transVal = maxNegVel; + if (myLastTransVal != transVal || myLastTransType != myTransType || + (myLastTransSent.mSecSince() >= myStateReflectionRefreshTime)) + { + comInt(ArCommands::VEL, ArMath::roundShort(transVal)); + myLastTransSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action trans vel of %d", + ArMath::roundShort(transVal)); + //printf("Sent command vel!\n"); + } + if (fabs((double)transVal) > (double).5) + myTryingToMove = true; + } + else if (myTransType == TRANS_VEL2) + { + if (ArMath::roundShort(myTransVal/myParams->getVel2Divisor()) > 128) + transVal = 128; + else if (ArMath::roundShort(myTransVal/myParams->getVel2Divisor()) < -128) + transVal = -128; + else + transVal = ArMath::roundShort(myTransVal/myParams->getVel2Divisor()); + if (ArMath::roundShort(myTransVal2/myParams->getVel2Divisor()) > 128) + transVal2 = 128; + else if (ArMath::roundShort(myTransVal2/myParams->getVel2Divisor()) < -128) + transVal2 = -128; + else + transVal2 = ArMath::roundShort(myTransVal2/myParams->getVel2Divisor()); + if (myLastTransVal != transVal || myLastTransVal2 != transVal2 || + myLastTransType != myTransType || + (myLastTransSent.mSecSince() >= myStateReflectionRefreshTime)) + { + com2Bytes(ArCommands::VEL2, transVal, transVal2); + myLastTransSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action vel2 of %d %d", + transVal, transVal2); + //printf("Sent command vel2!\n"); + } + if (fabs((double)transVal) > (double).5 || fabs((double)transVal2) > (double).5) + myTryingToMove = true; + } + else if (myTransType == TRANS_DIST_NEW || myTransType == TRANS_DIST) + { + // if the robot doesn't have its own distance command + if (!myParams->hasMoveCommand()) + { + double distGone; + double distToGo; + double vel; + + myTransType = TRANS_DIST; + distGone = myTransDistStart.findDistanceTo(getPose()); + distToGo = fabs(fabs(myTransVal) - distGone); + if (distGone > fabs(myTransVal) || + (distToGo < 10 && fabs(getVel()) < 30)) + { + comInt(ArCommands::VEL, 0); + myTransType = TRANS_VEL; + myTransVal = 0; + } + else + myTryingToMove = true; + vel = sqrt(distToGo * 200 * 2); + if (vel > getTransVelMax()) + vel = getTransVelMax(); + if (myTransVal < 0) + vel *= -1; + comInt(ArCommands::VEL, ArMath::roundShort(vel)); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action move-helper of %d", + ArMath::roundShort(vel)); + } + else if (myParams->hasMoveCommand() && myTransType == TRANS_DIST_NEW) + { + comInt(ArCommands::MOVE, transVal); + myLastTransSent.setToNow(); + myTransType = TRANS_DIST; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action move of %d", + transVal); + myTryingToMove = true; + } + else if (myTransType == TRANS_DIST && + (myLastTransSent.mSecSince() >= myStateReflectionRefreshTime)) + { + com(0); + myLastPulseSent.setToNow(); + myLastTransSent.setToNow(); + //printf("Sent pulse for dist!\n"); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action pulse for dist"); + } + //printf("Sent command move!\n"); + } + else if (myTransType == TRANS_IGNORE) + { + //printf("No trans command sent\n"); + } + else + ArLog::log(ArLog::Terse, + "ArRobot::stateReflector: Invalid translational type %d.", + myTransType); + myLastTransVal = transVal; + myLastTransVal2 = transVal2; + myLastTransType = myTransType; + } + else // if actions can go + { + if (hasSettableVelMaxes() && + ArMath::fabs(myLastSentTransVelMax - myTransVelMax) >= 1) + { + comInt(ArCommands::SETV, + ArMath::roundShort(myTransVelMax)); + myLastSentTransVelMax = myTransVelMax; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Action-but-robot trans max vel of %d", + ArMath::roundShort(myTransVelMax)); + } + + // first we'll handle all of the accel decel things + if (myActionDesired.getTransAccelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + transAccel = ArMath::roundShort(myActionDesired.getTransAccel()); + if (hasSettableAccsDecs() && ArMath::fabs(transAccel) > 1 && + ArMath::fabs(myLastSentTransAccel - transAccel) >= 1) + { + comInt(ArCommands::SETA, + ArMath::roundShort(transAccel)); + myLastSentTransAccel = transAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Action trans accel of %d", + ArMath::roundShort(transAccel)); + } + } + else if (hasSettableAccsDecs() && ArMath::fabs(myTransAccel) > 1 && + ArMath::fabs(myLastSentTransAccel - myTransAccel) >= 1) + { + comInt(ArCommands::SETA, + ArMath::roundShort(myTransAccel)); + myLastSentTransAccel = myTransAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Action-but-robot trans accel of %d", + ArMath::roundShort(myTransAccel)); + } + + if (myActionDesired.getTransDecelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + transDecel = ArMath::roundShort(myActionDesired.getTransDecel()); + if (hasSettableAccsDecs() && ArMath::fabs(transDecel) > 1 && + ArMath::fabs(myLastSentTransDecel - transDecel) >= 1) + { + comInt(ArCommands::SETA, + -ArMath::roundShort(transDecel)); + myLastSentTransDecel = transDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Action trans decel of %d", + -ArMath::roundShort(transDecel)); + } + } + else if (hasSettableAccsDecs() && ArMath::fabs(myTransDecel) > 1 && + ArMath::fabs(myLastSentTransDecel - myTransDecel) >= 1) + { + comInt(ArCommands::SETA, + -ArMath::roundShort(myTransDecel)); + myLastSentTransDecel = myTransDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Action-but-robot trans decel of %d", + -ArMath::roundShort(myTransDecel)); + } + + if (myActionDesired.getMaxVelStrength() >= ArActionDesired::MIN_STRENGTH) + { + maxTransVel = myActionDesired.getMaxVel(); + if (maxTransVel > myTransVelMax) + maxTransVel = myTransVelMax; + } + else + maxTransVel = myTransVelMax; + + if (myActionDesired.getMaxNegVelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + maxNegTransVel = -ArMath::fabs(myActionDesired.getMaxNegVel()); + if (maxNegTransVel < myTransNegVelMax) + maxNegTransVel = myTransNegVelMax; + } + else + maxNegTransVel = myTransNegVelMax; + + if (myActionDesired.getVelStrength() >= ArActionDesired::MIN_STRENGTH) + { + transVal = ArMath::roundShort(myActionDesired.getVel()); + myActionTransSet = true; + } + else + { + // MPL commenting out these lines so that if nothing is set + // it'll just stop + + //transVal = myLastActionTransVal; + transVal = 0; + } + + if (fabs((double)transVal) > (double).5) + myTryingToMove = true; + + maxVel = ArMath::roundShort(maxTransVel); + maxNegVel = ArMath::roundShort(maxNegTransVel); + if (transVal > maxVel) + transVal = maxVel; + if (transVal < maxNegVel) + transVal = maxNegVel; + + if (myActionTransSet && + (myLastTransSent.mSecSince() >= myStateReflectionRefreshTime || + transVal != myLastActionTransVal)) + { + comInt(ArCommands::VEL, ArMath::roundShort(transVal)); + myLastTransSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Action trans vel of %d", + ArMath::roundShort(transVal)); + } + myLastActionTransVal = transVal; + } + + // if this is true actions can't go + if ((myRotType != ROT_NONE && myDirectPrecedenceTime == 0) || + (myRotType != ROT_NONE && myDirectPrecedenceTime != 0 && + myRotSetTime.mSecSince() < myDirectPrecedenceTime)) + { + if (hasSettableVelMaxes() && + ArMath::fabs(myLastSentRotVelMax - myRotVelMax) >= 1) + { + //comInt(ArCommands::SETRVDIR, 0); + comInt(ArCommands::SETRV, + ArMath::roundShort(myRotVelMax)); + + myLastSentRotVelMax = myRotVelMax; + myLastSentRotVelPosMax = -1; + myLastSentRotVelNegMax = -1; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sNon-action rot vel max of %d", "", + ArMath::roundShort(myRotVelMax)); + + } + if (hasSettableAccsDecs() && ArMath::fabs(myRotAccel) > 1 && + ArMath::fabs(myLastSentRotAccel - myRotAccel) >= 1) + { + comInt(ArCommands::SETRA, + ArMath::roundShort(myRotAccel)); + myLastSentRotAccel = myRotAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sNon-action rot accel of %d", "", + ArMath::roundShort(myRotAccel)); + } + if (hasSettableAccsDecs() && ArMath::fabs(myRotDecel) > 1 && + ArMath::fabs(myLastSentRotDecel - myRotDecel) >= 1) + { + comInt(ArCommands::SETRA, + -ArMath::roundShort(myRotDecel)); + myLastSentRotDecel = myRotDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sNon-action rot decel of %d", "", + -ArMath::roundShort(myRotDecel)); + } + + myActionRotSet = false; + rotVal = ArMath::roundShort(myRotVal); + if (myRotType == ROT_HEADING) + { + encTh = ArMath::subAngle(myRotVal, myEncoderTransform.getTh()); + rawTh = ArMath::addAngle(encTh, + ArMath::subAngle(myRawEncoderPose.getTh(), + myEncoderPose.getTh())); + rotVal = ArMath::roundShort(rawTh); + + // if we were using a different heading type, a different heading + // our heading doesn't match what we want it to be, or its been a while + // since we sent the heading, send it again + if (myLastRotVal != rotVal || myLastRotType != myRotType || + fabs(ArMath::subAngle(rotVal, getTh())) > 1 || + (myLastRotSent.mSecSince() >= myStateReflectionRefreshTime)) + { + comInt(ArCommands::HEAD, rotVal); + myLastRotSent.setToNow(); + //printf("sent command, heading\n"); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, + "%25sNon-action rot heading of %d (encoder %d, raw %d)", + "", + ArMath::roundShort(myRotVal), + ArMath::roundShort(encTh), + ArMath::roundShort(rotVal)); + } + if (fabs(ArMath::subAngle(rotVal, getTh())) > 1) + myTryingToMove = true; + } + else if (myRotType == ROT_VEL) + { + if (myLastRotVal != rotVal || myLastRotType != myRotType || + (myLastRotSent.mSecSince() >= myStateReflectionRefreshTime)) + { + comInt(ArCommands::RVEL, rotVal); + myLastRotSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sNon-action rot vel of %d", "", + rotVal); + //printf("sent command, rot vel\n"); + if (fabs((double)rotVal) > (double).5) + myTryingToMove = true; + } + } + else if (myRotType == ROT_IGNORE) + { + //printf("Not sending any command, rot is set to ignore"); + } + else + ArLog::log(ArLog::Terse, + "ArRobot::stateReflector: Invalid rotation type %d.", + myRotType); + myLastRotVal = rotVal; + myLastRotType = myRotType; + } + else // if the action can fire + { + // first we'll handle all of the accel decel things + // if ONLY rot vel is sent handle it the way we always have + if (myActionDesired.getMaxRotVelStrength() >= + ArActionDesired::MIN_STRENGTH && + myActionDesired.getMaxRotVelPosStrength() < + ArActionDesired::MIN_STRENGTH && + myActionDesired.getMaxRotVelNegStrength() < + ArActionDesired::MIN_STRENGTH) + { + maxRotVel = myActionDesired.getMaxRotVel(); + if (maxRotVel > myAbsoluteMaxRotVel) + maxRotVel = myAbsoluteMaxRotVel; + maxRotVel = ArMath::roundShort(maxRotVel); + if (ArMath::fabs(myLastSentRotVelMax - maxRotVel) >= 1) + { + myLastSentRotVelMax = maxRotVel; + myLastSentRotVelPosMax = -1; + myLastSentRotVelNegMax = -1; + //comInt(ArCommands::SETRVDIR, 0); + comInt(ArCommands::SETRV, + ArMath::roundShort(maxRotVel)); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sAction rot vel max of %d", "", + ArMath::roundShort(maxRotVel)); + } + } + // if a max pos or neg rot vel is set then use that + else if (myActionDesired.getMaxRotVelPosStrength() >= + ArActionDesired::MIN_STRENGTH || + myActionDesired.getMaxRotVelNegStrength() >= + ArActionDesired::MIN_STRENGTH) + { + if (myActionDesired.getMaxRotVelStrength() >= + ArActionDesired::MIN_STRENGTH) + maxRotVel = myActionDesired.getMaxRotVel(); + else + maxRotVel = myRotVelMax; + + if (maxRotVel > myAbsoluteMaxRotVel) + maxRotVel = myAbsoluteMaxRotVel; + + if (myActionDesired.getMaxRotVelPosStrength() >= + ArActionDesired::MIN_STRENGTH) + maxRotVelPos = ArUtil::findMin(maxRotVel, + myActionDesired.getMaxRotVelPos()); + else + maxRotVelPos = maxRotVel; + + // 1 here actually means 0 (since there's no -0 and its not + // worth two commands) + if (maxRotVelPos < .5) + maxRotVelPos = 1; + + if (myActionDesired.getMaxRotVelNegStrength() >= + ArActionDesired::MIN_STRENGTH) + maxRotVelNeg = ArUtil::findMin(maxRotVel, + myActionDesired.getMaxRotVelNeg()); + else + maxRotVelNeg = maxRotVel; + + // 1 here actually means 0 (since there's no -0 and its not + // worth two commands) + if (maxRotVelNeg < .5) + maxRotVelNeg = 1; + + if (ArMath::fabs(myLastSentRotVelPosMax - maxRotVelPos) >= 1 || + ArMath::fabs(myLastSentRotVelNegMax - maxRotVelNeg) >= 1) + { + myLastSentRotVelMax = -1; + myLastSentRotVelPosMax = maxRotVelPos; + myLastSentRotVelNegMax = maxRotVelNeg; + + // this command doesn't exist just yet... + comInt(ArCommands::SETRVDIR, + ArMath::roundShort(maxRotVelPos)); + comInt(ArCommands::SETRVDIR, + ArMath::roundShort(-maxRotVelNeg)); + if (myLogMovementSent) + { + ArLog::log(ArLog::Normal, "%25sAction rot vel pos max of %d", "", + ArMath::roundShort(maxRotVelPos)); + ArLog::log(ArLog::Normal, "%25sAction rot vel neg max of %d", "", + ArMath::roundShort(-maxRotVelNeg)); + } + } + } + else if (hasSettableVelMaxes() && + ArMath::fabs(myLastSentRotVelMax - myRotVelMax) >= 1) + { + //comInt(ArCommands::SETRVDIR, 0); + comInt(ArCommands::SETRV, + ArMath::roundShort(myRotVelMax)); + myLastSentRotVelMax = myRotVelMax; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, + "%25sAction-but-robot rot vel max of %d", + "", ArMath::roundShort(myRotVelMax)); + } + + if (myActionDesired.getRotAccelStrength() >= ArActionDesired::MIN_STRENGTH) + { + rotAccel = ArMath::roundShort(myActionDesired.getRotAccel()); + if (ArMath::fabs(myLastSentRotAccel - rotAccel) >= 1) + { + comInt(ArCommands::SETRA, + ArMath::roundShort(rotAccel)); + myLastSentRotAccel = rotAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sAction rot accel of %d", "", + ArMath::roundShort(rotAccel)); + } + } + else if (hasSettableAccsDecs() && ArMath::fabs(myRotAccel) > 1 && + ArMath::fabs(myLastSentRotAccel - myRotAccel) >= 1) + { + comInt(ArCommands::SETRA, + ArMath::roundShort(myRotAccel)); + myLastSentRotAccel = myRotAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sAction-but-robot rot accel of %d", + "", ArMath::roundShort(myRotAccel)); + } + + if (myActionDesired.getRotDecelStrength() >= ArActionDesired::MIN_STRENGTH) + { + rotDecel = ArMath::roundShort(myActionDesired.getRotDecel()); + if (ArMath::fabs(myLastSentRotDecel - rotDecel) >= 1) + { + comInt(ArCommands::SETRA, + -ArMath::roundShort(rotDecel)); + myLastSentRotDecel = rotDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sAction rot decel of %d", "", + -ArMath::roundShort(rotDecel)); + } + } + else if (hasSettableAccsDecs() && ArMath::fabs(myRotDecel) > 1 && + ArMath::fabs(myLastSentRotDecel - myRotDecel) >= 1) + { + comInt(ArCommands::SETRA, + -ArMath::roundShort(myRotDecel)); + myLastSentRotDecel = myRotDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sAction-but-robot rot decel of %d", + "", -ArMath::roundShort(myRotDecel)); + } + + + + if (myActionDesired.getDeltaHeadingStrength() >= + ArActionDesired::MIN_STRENGTH) + { + if (ArMath::roundShort(myActionDesired.getDeltaHeading()) == 0) + { + rotStopped = true; + rotVal = 0; + rotHeading = false; + } + else + { + //printf("delta %.0f\n", myActionDesired.getDeltaHeading()); + //encTh = ArMath::subAngle(myRotVal, myEncoderTransform.getTh()); + encTh = ArMath::subAngle( + ArMath::addAngle(myActionDesired.getDeltaHeading(), + getTh()), + myEncoderTransform.getTh()); + //printf("final th %.0f\n", th); + rawTh = ArMath::addAngle(encTh, + ArMath::subAngle(myRawEncoderPose.getTh(), + myEncoderPose.getTh())); + rotVal = ArMath::roundShort(rawTh); + rotStopped = false; + rotHeading = true; + myTryingToMove = true; + } + myActionRotSet = true; + } + else if (myActionDesired.getRotVelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + if (ArMath::roundShort(myActionDesired.getRotVel()) == 0) + { + rotStopped = true; + rotVal = 0; + rotHeading = false; + } + else + { + double rotVelocity = ArMath::roundShort(myActionDesired.getRotVel()); + if (maxRotVelPos > -.5 && rotVelocity > 0) + { + if (maxRotVelPos < 1.1) + { + rotVelocity = 0; + rotStopped = false; + rotVal = 0; + rotHeading = false; + } + else + { + rotVelocity = ArUtil::findMin(rotVelocity, maxRotVelPos); + rotStopped = false; + rotVal = ArMath::roundShort(rotVelocity); + rotHeading = false; + } + } + else if (maxRotVelNeg > -.5 && rotVelocity < 0) + { + if (maxRotVelNeg < 1.1) + { + rotVelocity = 0; + rotStopped = false; + rotVal = 0; + rotHeading = false; + } + else + { + rotVelocity = ArUtil::findMax(rotVelocity, -maxRotVelNeg); + rotStopped = false; + rotVal = ArMath::roundShort(rotVelocity); + rotHeading = false; + } + } + else + { + rotStopped = false; + rotVal = ArMath::roundShort(myActionDesired.getRotVel()); + rotHeading = false; + } + myTryingToMove = true; + } + myActionRotSet = true; + } + else + { + /// MPL commenting out these lines, and making it so that if + /// nothing is set it'll just stop + + //rotStopped = myLastActionRotStopped; + //rotVal = myLastActionRotVal; + //rotHeading = myLastActionRotHeading; + rotStopped = true; + } + + if (myActionRotSet && + (myLastRotSent.mSecSince() > myStateReflectionRefreshTime || + rotStopped != myLastActionRotStopped || + rotVal != myLastActionRotVal || + rotHeading != myLastActionRotHeading)) + { + if (rotStopped) + { + comInt(ArCommands::RVEL, 0); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, + "%25sAction rot vel of 0 (rotStopped)", + ""); + } + else if (rotHeading) + { + comInt(ArCommands::HEAD, rotVal); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, + "%25sAction rot heading of %d (encoder %d, raw %d)", + "", + ArMath::roundShort(ArMath::addAngle( + myActionDesired.getDeltaHeading(), + getTh())), + ArMath::roundShort(encTh), + ArMath::roundShort(rotVal)); + } + else + { + comInt(ArCommands::RVEL, rotVal); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%25sAction rot vel of %d", "", + rotVal); + } + myLastRotSent.setToNow(); + } + + myLastActionRotVal = rotVal; + myLastActionRotStopped = rotStopped; + myLastActionRotHeading = rotHeading; + } + + // start lat + + // if we don't have lat vel then don't do any of this + if (!hasLatVel()) + { + } + // if this is true actions can't go + else if ((myLatType != LAT_NONE && myDirectPrecedenceTime == 0) || + (myLatType != LAT_NONE && myDirectPrecedenceTime != 0 && + myLatSetTime.mSecSince() < myDirectPrecedenceTime)) + { + myActionLatSet = false; + latVal = ArMath::roundShort(myLatVal); + + if (ArMath::fabs(myLastSentLatVelMax - myLatVelMax) >= 1) + { + comInt(ArCommands::SETLATV, + ArMath::roundShort(myLatVelMax)); + myLastSentLatVelMax = myLatVelMax; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sNon-action lat max vel of %d", "", + ArMath::roundShort(myLatVelMax)); + } + + if (ArMath::fabs(myLatAccel) > 1 && + ArMath::fabs(myLastSentLatAccel - myLatAccel) >= 1) + { + comInt(ArCommands::LATACCEL, + ArMath::roundShort(myLatAccel)); + myLastSentLatAccel = myLatAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sNon-action lat accel of %d", "", + ArMath::roundShort(myLatAccel)); + } + + if (ArMath::fabs(myLatDecel) > 1 && + ArMath::fabs(myLastSentLatDecel - myLatDecel) >= 1) + { + comInt(ArCommands::LATACCEL, + -ArMath::roundShort(myLatDecel)); + myLastSentLatDecel = myLatDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sNon-action lat decel of %d", "", + -ArMath::roundShort(myLatDecel)); + } + + if (myLatType == LAT_VEL) + { + maxLatVel = ArMath::roundShort(myLatVelMax); + if (latVal > maxLatVel) + latVal = maxLatVel; + if (latVal < -maxLatVel) + latVal = -maxLatVel; + if (myLastLatVal != latVal || myLastLatType != myLatType || + (myLastLatSent.mSecSince() >= myStateReflectionRefreshTime)) + { + comInt(ArCommands::LATVEL, ArMath::roundShort(latVal)); + myLastLatSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sNon-action lat vel of %d", "", + ArMath::roundShort(latVal)); + //printf("Sent command vel!\n"); + } + if (fabs((double)latVal) > (double).5) + myTryingToMove = true; + } + /* + else if (myLatType == LAT_DIST_NEW || myLatType == LAT_DIST) + { + // if the robot doesn't have its own distance command + if (!myParams->hasMoveCommand()) + { + double distGone; + double distToGo; + double vel; + + myLatType = LAT_DIST; + distGone = myLatDistStart.findDistanceTo(getPose()); + distToGo = fabs(fabs(myLatVal) - distGone); + if (distGone > fabs(myLatVal) || + (distToGo < 10 && fabs(getVel()) < 30)) + { + comInt(ArCommands::VEL, 0); + myLatType = LAT_VEL; + myLatVal = 0; + } + else + myTryingToMove = true; + vel = sqrt(distToGo * 200 * 2); + if (vel > getLatVelMax()) + vel = getLatVelMax(); + if (myLatVal < 0) + vel *= -1; + comInt(ArCommands::VEL, ArMath::roundShort(vel)); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action move-helper of %d", + ArMath::roundShort(vel)); + } + else if (myParams->hasMoveCommand() && myLatType == LAT_DIST_NEW) + { + comInt(ArCommands::MOVE, latVal); + myLastLatSent.setToNow(); + myLatType = LAT_DIST; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action move of %d", + latVal); + myTryingToMove = true; + } + else if (myLatType == LAT_DIST && + (myLastLatSent.mSecSince() >= myStateReflectionRefreshTime)) + { + com(0); + myLastPulseSent.setToNow(); + myLastLatSent.setToNow(); + //printf("Sent pulse for dist!\n"); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Non-action pulse for dist"); + } + //printf("Sent command move!\n"); + } + */ + else if (myLatType == LAT_IGNORE) + { + //printf("No lat command sent\n"); + } + else + ArLog::log(ArLog::Terse, + "ArRobot::stateReflector: Invalid lat type %d.", + myLatType); + + myLastLatVal = latVal; + myLastLatType = myLatType; + } + else // if actions can go + { + if (ArMath::fabs(myLastSentLatVelMax - myLatVelMax) >= 1) + { + comInt(ArCommands::SETLATV, + ArMath::roundShort(myLatVelMax)); + myLastSentLatVelMax = myLatVelMax; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sAction-but-robot lat max vel of %d", "", + ArMath::roundShort(myLatVelMax)); + } + + // first we'll handle all of the accel decel things + if (myActionDesired.getLatAccelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + latAccel = ArMath::roundShort(myActionDesired.getLatAccel()); + if (ArMath::fabs(latAccel) > 1 && + ArMath::fabs(myLastSentLatAccel - latAccel) >= 1) + { + comInt(ArCommands::LATACCEL, + ArMath::roundShort(latAccel)); + myLastSentLatAccel = latAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sAction lat accel of %d", "", + ArMath::roundShort(latAccel)); + } + } + else if (ArMath::fabs(myLatAccel) > 1 && + ArMath::fabs(myLastSentLatAccel - myLatAccel) >= 1) + { + comInt(ArCommands::LATACCEL, + ArMath::roundShort(myLatAccel)); + myLastSentLatAccel = myLatAccel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sAction-but-robot lat accel of %d", "", + ArMath::roundShort(myLatAccel)); + } + + if (myActionDesired.getLatDecelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + latDecel = ArMath::roundShort(myActionDesired.getLatDecel()); + if (ArMath::fabs(latDecel) > 1 && + ArMath::fabs(myLastSentLatDecel - latDecel) >= 1) + { + comInt(ArCommands::LATACCEL, + -ArMath::roundShort(latDecel)); + myLastSentLatDecel = latDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sAction lat decel of %d", "", + -ArMath::roundShort(latDecel)); + } + } + else if (ArMath::fabs(myLatDecel) > 1 && + ArMath::fabs(myLastSentLatDecel - myLatDecel) >= 1) + { + comInt(ArCommands::LATACCEL, + -ArMath::roundShort(myLatDecel)); + myLastSentLatDecel = myLatDecel; + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sAction-but-robot lat decel of %d", "", + -ArMath::roundShort(myLatDecel)); + } + + if (myActionDesired.getMaxLeftLatVelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + maxLeftLatVel = myActionDesired.getMaxLeftLatVel(); + if (maxLeftLatVel > myLatVelMax) + maxLeftLatVel = myLatVelMax; + } + else + maxLeftLatVel = myLatVelMax; + + if (myActionDesired.getMaxRightLatVelStrength() >= + ArActionDesired::MIN_STRENGTH) + { + maxRightLatVel = myActionDesired.getMaxRightLatVel(); + if (maxRightLatVel > myLatVelMax) + maxRightLatVel = myLatVelMax; + } + else + maxRightLatVel = myLatVelMax; + + if (myActionDesired.getLatVelStrength() >= ArActionDesired::MIN_STRENGTH) + { + latVal = ArMath::roundShort(myActionDesired.getLatVel()); + myActionLatSet = true; + } + else + { + // MPL commenting out these lines so that if nothing is set + // it'll just stop + + //latVal = myLastActionLatVal; + latVal = 0; + } + + if (fabs((double)latVal) > (double).5) + myTryingToMove = true; + + //maxLatVel = ArMath::roundShort(maxLatVel); + if (latVal > 0 && latVal > maxLeftLatVel) + latVal = maxLeftLatVel; + if (latVal < 0 && latVal < -maxRightLatVel) + latVal = -maxRightLatVel; + + if (myActionLatSet && + (myLastLatSent.mSecSince() >= myStateReflectionRefreshTime || + latVal != myLastActionLatVal)) + { + comInt(ArCommands::LATVEL, ArMath::roundShort(latVal)); + myLastLatSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "%12sAction lat vel of %d", "", + ArMath::roundShort(latVal)); + } + myLastActionLatVal = latVal; + } + // end lat + + if (myLastRotSent.mSecSince() > myStateReflectionRefreshTime && + myLastTransSent.mSecSince() > myStateReflectionRefreshTime && + myLastPulseSent.mSecSince() > myStateReflectionRefreshTime && + (!hasLatVel() || + (hasLatVel() && + myLastLatSent.mSecSince() > myStateReflectionRefreshTime))) + { + com(ArCommands::PULSE); + myLastPulseSent.setToNow(); + if (myLogMovementSent) + ArLog::log(ArLog::Normal, "Pulse"); + + } +} + +AREXPORT bool ArRobot::handlePacket(ArRobotPacket *packet) +{ + std::list *>::iterator it; + bool handled; + + lock(); + + if (myIgnoreNextPacket) + { + if ((packet->getID() == 0x32 || packet->getID() == 0x33)) + { + ArLog::log(ArLog::Normal, "ArRobot: Ignoring motor packet of type 0x%x", + packet->getID()); + myIgnoreNextPacket = false; + } + else + { + ArLog::log(ArLog::Normal, "ArRobot: Ignoring packet of type 0x%x", packet->getID()); + } + unlock(); + return false; + } + + //printf("ms since last packet %ld this type 0x%x\n", myLastPacketReceivedTime.mSecSince(packet->getTimeReceived()), packet->getID()); + myLastPacketReceivedTime = packet->getTimeReceived(); + + if (packet->getID() == 0xff) + { + dropConnection("Losing connection because microcontroller reset."); + unlock(); + return false; + } + + if (packet->getID() == 0xfe) + { + char buf[100000]; + sprintf(buf, "Losing connection because microcontroller reset with reset data"); + + while (packet->getDataLength() - packet->getDataReadLength() > 0) + sprintf(buf, "%s 0x%x", buf, packet->bufToUByte()); + + dropConnection(buf); + unlock(); + return false; + } + + for (handled = false, it = myPacketHandlerList.begin(); + it != myPacketHandlerList.end() && handled == false; + it++) + { + if ((*it) != NULL && (*it)->invokeR(packet)) + { + if (myPacketsReceivedTracking) + ArLog::log(ArLog::Normal, "Handled by %s", + (*it)->getName()); + handled = true; + } + else + { + packet->resetRead(); + } + } + if (!handled) + ArLog::log(ArLog::Normal, + "No packet handler wanted packet with ID: 0x%x", + packet->getID()); + unlock(); + return handled; +} + + +/** @note You must first start the encoder packet stream by calling + * requestEncoderPackets() before this function will return encoder values. + */ +AREXPORT long int ArRobot::getLeftEncoder() +{ + return myLeftEncoder; +} + +/** @note You must first start the encoder packet stream by calling + * requestEncoderPackets() before this function will return encoder values. + */ +AREXPORT long int ArRobot::getRightEncoder() +{ + return myRightEncoder; +} + + +/** + * @internal + This just locks the robot, so that its locked for all the user tasks +**/ +AREXPORT void ArRobot::robotLocker(void) +{ + lock(); +} + +/** + * @internal + This just unlocks the robot +**/ +AREXPORT void ArRobot::robotUnlocker(void) +{ + unlock(); +} + + + +AREXPORT void ArRobot::packetHandler(void) +{ + if (myRunningNonThreaded) + packetHandlerNonThreaded(); + else + packetHandlerThreadedProcessor(); +} + + +/** + This is here for use if the robot is running without threading + (some customers may use it that way, though we generally don't) + + Reads in all of the packets that are available to read in, then runs through + the list of packet handlers and tries to get each packet handled. + @see addPacketHandler + @see remPacketHandler +**/ +AREXPORT void ArRobot::packetHandlerNonThreaded(void) +{ + ArRobotPacket *packet; + int timeToWait; + ArTime start; + bool sipHandled = false; + + if (myAsyncConnectFlag) + { + lock(); + asyncConnectHandler(false); + unlock(); + return; + } + + if (!isConnected()) + return; + + start.setToNow(); + /* + The basic idea is that if we're chained to the sip we run through + and see if we have any packets available now (like if we got + backed up), we only check this for half the cycle time + though... if we know the cycle time of the robot (from config) + then we go for half that, if we don't know the cycle time of the + robot (from config) then we go for half of whatever our cycle time + is set to + + if we don't have any packets waiting then we chill and wait for + it, if we got one, just get on with it + **/ + packet = NULL; + // read all the packets that are available + while ((packet = myReceiver.receivePacket(0)) != NULL) + { + if (myPacketsReceivedTracking) + { + ArLog::log(ArLog::Normal, + "Rcvd: prePacket (%ld) 0x%x at %ld (%ld)", + myPacketsReceivedTrackingCount, + packet->getID(), start.mSecSince(), + myPacketsReceivedTrackingStarted.mSecSince()); + myPacketsReceivedTrackingCount++; + } + + handlePacket(packet); + if ((packet->getID() & 0xf0) == 0x30) + sipHandled = true; + packet = NULL; + + // if we've taken too long here then break + if ((getOrigRobotConfig()->hasPacketArrived() && + start.mSecSince() > getOrigRobotConfig()->getSipCycleTime() / 2) || + (!getOrigRobotConfig()->hasPacketArrived() && + (unsigned int) start.mSecSince() > myCycleTime / 2)) + { + break; + } + } + + if (isCycleChained()) + timeToWait = getCycleTime() * 2 - start.mSecSince(); + + // if we didn't get a sip and we're chained to the sip, wait for the sip + while (isCycleChained() && !sipHandled && isRunning() && + (packet = myReceiver.receivePacket(timeToWait)) != NULL) + { + if (myPacketsReceivedTracking) + { + ArLog::log(ArLog::Normal, "Rcvd: Packet (%ld) 0x%x at %ld (%ld)", + myPacketsReceivedTrackingCount, + packet->getID(), start.mSecSince(), + myPacketsReceivedTrackingStarted.mSecSince()); + myPacketsReceivedTrackingCount++; + } + + handlePacket(packet); + if ((packet->getID() & 0xf0) == 0x30) + break; + timeToWait = getCycleTime() * 2 - start.mSecSince(); + if (timeToWait < 0) + timeToWait = 0; + } + + if (myTimeoutTime > 0 && + ((-myLastOdometryReceivedTime.mSecTo()) > myTimeoutTime)) + { + char buf[10000]; + sprintf(buf, + "Losing connection because no odometry received from robot in %d milliseconds (greater than the timeout of %d).", + (-myLastOdometryReceivedTime.mSecTo()), + myTimeoutTime); + dropConnection(buf); + } + + if (myTimeoutTime > 0 && + ((-myLastPacketReceivedTime.mSecTo()) > myTimeoutTime)) + { + char buf[10000]; + sprintf(buf, "Losing connection because nothing received from robot in %d milliseconds (greater than the timeout of %d).", + (-myLastPacketReceivedTime.mSecTo()), + myTimeoutTime); + dropConnection(buf); + } + + if (myPacketsReceivedTracking) + ArLog::log(ArLog::Normal, "Rcvd(nt): time taken %ld", start.mSecSince()); + +} + +AREXPORT void ArRobot::packetHandlerThreadedProcessor(void) +{ + ArRobotPacket *packet; + int timeToWait; + ArTime start; + bool sipHandled = false; + bool anotherSip = false; + std::list::iterator it; + + if (myAsyncConnectFlag) + { + lock(); + asyncConnectHandler(false); + unlock(); + return; + } + + if (!isConnected()) + return; + + //ArLog::log(ArLog::Normal, "Rcvd: start %ld", myPacketsReceivedTrackingStarted.mSecSince()); + + start.setToNow(); + + // read all the packets that are available in our time window (twice + // packet cycle), if we get the sip we stop... + while (!sipHandled && isRunning()) + { + packet = NULL; + anotherSip = false; + myPacketMutex.lock(); + if (!myPacketList.empty()) + { + packet = myPacketList.front(); + myPacketList.pop_front(); + // see if there are more sips, since if so we'll keep chugging + // through the list + for (it = myPacketList.begin(); + !anotherSip && it != myPacketList.end(); + it++) + { + if (((*it)->getID() & 0xf0) == 0x30) + anotherSip = true; + } + myPacketMutex.unlock(); + } + else + { + myPacketMutex.unlock(); + } + + if (packet == NULL) + { + if (isCycleChained()) + timeToWait = getCycleTime() * 2 - start.mSecSince(); + else + timeToWait = getCycleTime() - start.mSecSince(); + + int ret = 0; + + if (timeToWait <= 0 || + (ret = myPacketReceivedCondition.timedWait(timeToWait)) != 0) + { + if (myCycleWarningTime != 0) + ArLog::log(ArLog::Normal, "ArRobot::myPacketReader: Timed out (%d) at %d (%d into cycle after sleeping %d)", + ret, myPacketsReceivedTrackingStarted.mSecSince(), + start.mSecSince(), timeToWait); + break; + } + else + { + continue; + } + } + + handlePacket(packet); + if ((packet->getID() & 0xf0) == 0x30) + { + // only mark the sip handled if it was the only one in the buffer + if (!anotherSip) + sipHandled = true; + + if (myPacketsReceivedTracking) + { + ArLog::log(ArLog::Normal, "Rcvd: Packet (%ld) 0x%x at %ld (%ld)", + myPacketsReceivedTrackingCount, + packet->getID(), start.mSecSince(), + myPacketsReceivedTrackingStarted.mSecSince()); + myPacketsReceivedTrackingCount++; + } + } + else + { + if (myPacketsReceivedTracking) + { + ArLog::log(ArLog::Normal, + "Rcvd: prePacket (%ld) 0x%x at %ld (%ld)", + myPacketsReceivedTrackingCount, + packet->getID(), start.mSecSince(), + myPacketsReceivedTrackingStarted.mSecSince()); + myPacketsReceivedTrackingCount++; + } + } + + delete packet; + packet = NULL; + } + + if (myTimeoutTime > 0 && + ((-myLastOdometryReceivedTime.mSecTo()) > myTimeoutTime)) + { + char buf[10000]; + sprintf(buf, + "Losing connection because no odometry received from robot in %d milliseconds (greater than the timeout of %d).", + (-myLastOdometryReceivedTime.mSecTo()), + myTimeoutTime); + dropConnection(buf); + } + + if (myTimeoutTime > 0 && + ((-myLastPacketReceivedTime.mSecTo()) > myTimeoutTime)) + { + char buf[10000]; + sprintf(buf, "Losing connection because nothing received from robot in %d milliseconds (greater than the timeout of %d).", + (-myLastPacketReceivedTime.mSecTo()), + myTimeoutTime); + dropConnection(buf); + } + + if (myPacketsReceivedTracking) + ArLog::log(ArLog::Normal, "Rcvd(t): time taken %ld %d", start.mSecSince(), + myPacketsReceivedTrackingStarted.mSecSince()); + +} + + +/// This function gets called from the ArRobotPacketReaderThread, and +/// does the actual reading of packets... so that it their timing +/// isn't affected by the rest of the sync loop +AREXPORT void ArRobot::packetHandlerThreadedReader(void) +{ + bool isAllocatingPackets = myReceiver.isAllocatingPackets(); + myReceiver.setAllocatingPackets(true); + + ArTime lastPacketReceived; + + ArRobotPacket *packet = NULL; + + while (isRunning()) + { + if (myConn == NULL || + myConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + ArUtil::sleep(1); + continue; + } + if ((packet = myReceiver.receivePacket(1000)) != NULL) + { + + lastPacketReceived.setToNow(); + myPacketMutex.lock(); + myPacketList.push_back(packet); + /* + ArLog::log(ArLog::Normal, "HTR: %x at %d (%x)", + packet->getID(), + myPacketsReceivedTrackingStarted.mSecSince(), + packet->getID() & 0xf0); + */ + packet = NULL; + myPacketMutex.unlock(); + myPacketReceivedCondition.broadcast(); + } + /* this is taken out for now since it'd spam in cases when the receiver returns instantly and fill the log file + else + { + if (lastPacketReceived.mSecSince() > 1000) + { + ArLog::log(ArLog::Normal, + "ArRobot::packetReader: Took longer than 1000 mSec for packet (last packet %d mSec ago)", + lastPacketReceived.mSecSince()); + lastPacketReceived.setToNow(); + } + } + */ + } + + myReceiver.setAllocatingPackets(isAllocatingPackets); +} + +/** + Runs the resolver on the actions, it just saves these values for + use by the stateReflector, otherwise it sends these values straight + down to the robot. + @see addAction + @see remAction +**/ +AREXPORT void ArRobot::actionHandler(void) +{ + ArActionDesired *actDesired; + + if (myResolver == NULL || myActions.size() == 0 || !isConnected()) + return; + + actDesired = myResolver->resolve(&myActions, this, myLogActions); + + myActionDesired.reset(); + + if (actDesired == NULL) + return; + + myActionDesired.merge(actDesired); + + if (myLogActions) + { + ArLog::log(ArLog::Normal, "Final resolved desired:"); + myActionDesired.log(); + } +} + +/** + Sets a time such that if the number of milliseconds between cycles + goes over this then there will be an ArLog::log(ArLog::Normal) + warning. + + @param ms the number of milliseconds between cycles to warn over, 0 + turns warning off + **/ +AREXPORT void ArRobot::setCycleWarningTime(unsigned int ms) +{ + myCycleWarningTime = ms; + // we don't have to send it down because the functor gets it each cycle +} + +/** + Sets a time such that if the number of milliseconds between cycles + goes over this then there will be an ArLog::log(ArLog::Normal) + warning. + + @return the number of milliseconds between cycles to warn over, 0 + means warning is off +**/ +AREXPORT unsigned int ArRobot::getCycleWarningTime(void) const +{ + return myCycleWarningTime; +} + +/** + Sets a time such that if the number of milliseconds between cycles + goes over this then there will be an ArLog::log(ArLog::Normal) + warning. + + @return the number of milliseconds between cycles to warn over, 0 + means warning is off +**/ +AREXPORT unsigned int ArRobot::getCycleWarningTime(void) +{ + return myCycleWarningTime; +} + +/** + Sets the number of milliseconds between cycles, at each cycle is + when all packets are processed, all sensors are interpretted, all + actions are called, and all user tasks are serviced. Be warned, + if you set this too small you could overflow your serial connection. + @param ms the number of milliseconds between cycles + **/ +AREXPORT void ArRobot::setCycleTime(unsigned int ms) +{ + myCycleTime = ms; +} + +/** + This is the amount of time the robot will stabilize for after it + has connected to the robot (it won't report it is connected until + after this time is over). By convention you should never set this + lower than what you find the value at (though it will let you) this + is so that everything can get itself stabilized before we let + things drive. + + @param mSecs the amount of time to stabilize for (0 disables) + + @see addStabilizingCB +**/ +AREXPORT void ArRobot::setStabilizingTime(int mSecs) +{ + if (mSecs > 0) + myStabilizingTime = mSecs; + else + myStabilizingTime = 0; +} + +/** + This is the amount of time the robot will stabilize for after it + has connected to the robot (it won't report it is connected until + after this time is over). +**/ +AREXPORT int ArRobot::getStabilizingTime(void) const +{ + return myStabilizingTime; +} + +/** + Finds the number of milliseconds between cycles, at each cycle is + when all packets are processed, all sensors are interpretted, all + actions are called, and all user tasks are serviced. Be warned, + if you set this too small you could overflow your serial connection. + @return the number of milliseconds between cycles +**/ +AREXPORT unsigned int ArRobot::getCycleTime(void) const +{ + return myCycleTime; +} + + + +/** + @param multiplier when the ArRobot is waiting for a connection + packet back from a robot, it waits for this multiplier times the + cycle time for the packet to come back before it gives up on it... + This should be small for normal connections but if doing something + over a slow network then you may want to make it larger + + **/ +AREXPORT void ArRobot::setConnectionCycleMultiplier(unsigned int multiplier) +{ + myConnectionCycleMultiplier = multiplier; +} + +/** + @return when the ArRobot is waiting for a connection packet back + from a robot, it waits for this multiplier times the cycle time for + the packet to come back before it gives up on it... This should be + small for normal connections but if doing something over a slow + network then you may want to make it larger +**/ +AREXPORT unsigned int ArRobot::getConnectionCycleMultiplier(void) const +{ + return myConnectionCycleMultiplier; +} + + +/** + This function is only for serious developers, it basically runs the + loop once. You would use this function if you were wanting to use robot + control in some other monolithic program, so you could work within its + framework, rather than trying to get it to work in ARIA. +**/ +AREXPORT void ArRobot::loopOnce(void) +{ + if (mySyncTaskRoot != NULL) + mySyncTaskRoot->run(); + + incCounter(); +} + + +// DigIn IR logic is reverse. 0 means broken, 1 means not broken + +AREXPORT bool ArRobot::isLeftTableSensingIRTriggered(void) const +{ + if (myParams->haveTableSensingIR()) + { + if (myParams->haveNewTableSensingIR() && myIODigInSize > 3) + return !(getIODigIn(3) & ArUtil::BIT1); + else + return !(getDigIn() & ArUtil::BIT0); + } + return 0; +} + +AREXPORT bool ArRobot::isRightTableSensingIRTriggered(void) const +{ + if (myParams->haveTableSensingIR()) + { + if (myParams->haveNewTableSensingIR() && myIODigInSize > 3) + return !(getIODigIn(3) & ArUtil::BIT0); + else + return !(getDigIn() & ArUtil::BIT1); + } + return 0; +} + +AREXPORT bool ArRobot::isLeftBreakBeamTriggered(void) const +{ + if (myParams->haveTableSensingIR()) + { + if (myParams->haveNewTableSensingIR() && myIODigInSize > 3) + return !(getIODigIn(3) & ArUtil::BIT2); + else + return !(getDigIn() & ArUtil::BIT3); + } + return 0; +} + +AREXPORT bool ArRobot::isRightBreakBeamTriggered(void) const +{ + if (myParams->haveTableSensingIR()) + { + if (myParams->haveNewTableSensingIR() && myIODigInSize > 3) + return !(getIODigIn(3) & ArUtil::BIT3); + else + return !(getDigIn() & ArUtil::BIT2); + } + return 0; +} + +AREXPORT int ArRobot::getMotorPacCount(void) const +{ + if (myTimeLastMotorPacket == time(NULL)) + return myMotorPacCount; + if (myTimeLastMotorPacket == time(NULL) - 1) + return myMotorPacCurrentCount; + return 0; +} + +AREXPORT int ArRobot::getSonarPacCount(void) const +{ + if (myTimeLastSonarPacket == time(NULL)) + return mySonarPacCount; + if (myTimeLastSonarPacket == time(NULL) - 1) + return mySonarPacCurrentCount; + return 0; +} + + +AREXPORT bool ArRobot::processMotorPacket(ArRobotPacket *packet) +{ + int x, y, th, qx, qy, qth; + double deltaX, deltaY, deltaTh; + + int numReadings; + int sonarNum; + int sonarRange; + + if (packet->getID() != 0x32 && packet->getID() != 0x33) + return false; + + // upkeep the counting variable + if (myTimeLastMotorPacket != time(NULL)) + { + myTimeLastMotorPacket = time(NULL); + myMotorPacCount = myMotorPacCurrentCount; + myMotorPacCurrentCount = 0; + } + myMotorPacCurrentCount++; + + x = (packet->bufToUByte2() & 0x7fff); + y = (packet->bufToUByte2() & 0x7fff); + th = packet->bufToByte2(); + + if (myFakeFirstEncoderPose) + { + myLastX = x; + myLastY = y; + myLastTh = th; + myFakeFirstEncoderPose = false; + } + + if (myFirstEncoderPose) + { + qx = 0; + qy = 0; + qth = 0; + myFirstEncoderPose = false; + myRawEncoderPose.setPose( + myParams->getDistConvFactor() * x, + myParams->getDistConvFactor() * y, + ArMath::radToDeg(myParams->getAngleConvFactor() * (double)th)); + myEncoderPose = myRawEncoderPose; + myEncoderTransform.setTransform(myEncoderPose, myGlobalPose); + } + else + { + qx = x - myLastX; + qy = y - myLastY; + qth = th - myLastTh; + } + + + //ArLog::log(ArLog::Terse, "qx %d qy %d, x %d y %d, lastx %d lasty %d", qx, qy, x, y, myLastX, myLastY); + myLastX = x; + myLastY = y; + myLastTh = th; + + if (qx > 0x1000) + qx -= 0x8000; + if (qx < -0x1000) + qx += 0x8000; + + if (qy > 0x1000) + qy -= 0x8000; + if (qy < -0x1000) + qy += 0x8000; + + deltaX = myParams->getDistConvFactor() * (double)qx; + deltaY = myParams->getDistConvFactor() * (double)qy; + deltaTh = ArMath::radToDeg(myParams->getAngleConvFactor() * (double)qth); + //encoderTh = ArMath::radToDeg(myParams->getAngleConvFactor() * (double)(th)); + + + // encoder stuff was here + + + + myLeftVel = myParams->getVelConvFactor() * packet->bufToByte2(); + myRightVel = myParams->getVelConvFactor() * packet->bufToByte2(); + myVel = (myLeftVel + myRightVel)/2.0; + + double batteryVoltage; + batteryVoltage = packet->bufToUByte() * .1; + if (!myIgnoreMicroControllerBatteryInfo) + { + myBatteryVoltage = batteryVoltage; + myBatteryAverager.add(myBatteryVoltage); + } + + myStallValue = packet->bufToByte2(); + + //ArLog::log("x %.1f y %.1f th %.1f vel %.1f voltage %.1f", myX, myY, myTh, + //myVel, myBatteryVoltage); + if (!myKeepControlRaw) + myControl = ArMath::fixAngle(ArMath::radToDeg( + myParams->getAngleConvFactor() * + (packet->bufToByte2() - th))); + else + myControl = packet->bufToByte2(); + + myFlags = packet->bufToUByte2(); + myCompass = 2*packet->bufToUByte(); + + for (numReadings = packet->bufToByte(); numReadings > 0; numReadings--) + { + sonarNum = packet->bufToByte(); + sonarRange = ArMath::roundInt( + (double)packet->bufToUByte2() * myParams->getRangeConvFactor()); + processNewSonar(sonarNum, sonarRange, packet->getTimeReceived()); + } + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + myAnalogPortSelected = packet->bufToUByte2(); + myAnalog = packet->bufToByte(); + myDigIn = packet->bufToByte(); + myDigOut = packet->bufToByte(); + } + + double realBatteryVoltage; + if (packet->getDataLength() - packet->getDataReadLength() > 0) + realBatteryVoltage = packet->bufToUByte2() * .1; + else + realBatteryVoltage = myBatteryVoltage; + if (!myIgnoreMicroControllerBatteryInfo) + { + myRealBatteryVoltage = realBatteryVoltage; + myRealBatteryAverager.add(myRealBatteryVoltage); + } + + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + if (!myOverriddenChargeState) + myChargeState = (ChargeState) packet->bufToUByte(); + else + packet->bufToUByte(); + } + else if (!myOverriddenChargeState) + myChargeState = CHARGING_UNKNOWN; + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + myRotVel = (double)packet->bufToByte2() / 10.0; + else + myRotVel = ArMath::radToDeg((myRightVel - myLeftVel) / 2.0 * + myParams->getDiffConvFactor()); + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + myHasFaultFlags = true; + myFaultFlags = packet->bufToUByte2(); + } + else + { + myHasFaultFlags = false; + myFaultFlags = 0; //packet->bufToUByte2(); + } + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + myLatVel = packet->bufToByte2(); + } + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + myTemperature = packet->bufToByte(); + } + + double stateOfCharge; + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + stateOfCharge = packet->bufToByte(); + if (!myIgnoreMicroControllerBatteryInfo) + { + myStateOfCharge = stateOfCharge; + if (!myHaveStateOfCharge && myStateOfCharge > 0) + myHaveStateOfCharge = true; + myStateOfChargeSetTime.setToNow(); + } + } + + + if (packet->getDataLength() - packet->getDataReadLength() > 0) + { + ArTypes::UByte4 uCUSec = 0; + ArTypes::UByte4 lpcUSec = 0; + + uCUSec = packet->bufToUByte4(); + // make sure we get a good value + if (myPacketsReceivedTracking && + myMTXTimeUSecCB != NULL && myMTXTimeUSecCB->invokeR(&lpcUSec)) + { + ArTime now; + long long mSecSince = packet->getTimeReceived().mSecSinceLL(now); + ArLog::log(ArLog::Normal, "MotorPacketTiming: commDiff %lld fpgaDiff %2d.%03d bytes %d\nFPGA:uC %6u.%03u.%.03u\nFPGA:lpc %6u.%03u.%.03u\nArTime:1stByte %6lld.%.03lld\nArTime:now %6lld.%.03lld", + mSecSince, + ((lpcUSec - uCUSec) % 1000000) / 1000, (lpcUSec - uCUSec) % 1000, + packet->getLength(), + + uCUSec / 1000000, (uCUSec % 1000000) / 1000, uCUSec % 1000, + lpcUSec / 1000000, (lpcUSec % 1000000) / 1000, lpcUSec % 1000, + packet->getTimeReceived().getSecLL(), + packet->getTimeReceived().getMSecLL(), + now.getSecLL(), now.getMSecLL()); + + } + } + + if(myLogSIPContents) + { + ArLog::log(ArLog::Normal, "SIP Contents:\n\tx=%d, y=%d, th=%d, lvel=%.2f, rvel=%.2f, battery=%.1f, stallval=0x%x, control=%d, compass=%d", + x, y, th, myLeftVel, myRightVel, myBatteryVoltage, myStallValue, myControl, myCompass); + ArLog::log(ArLog::Normal, "\tnumSonar=%d, gripstate=%d, anport=%d, analog=%d, digin=0x%x, digout=0x%x, batteryX10=%d, chargestage=%d rotvel=%.2f", + numReadings, (char)myAnalogPortSelected, (char)(myAnalogPortSelected>>8), myAnalog, myDigIn, myDigOut, myRealBatteryVoltage, (int)myChargeState, myRotVel); + if(myHasFaultFlags) + ArLog::log(ArLog::Normal, "\tfaultflags=0x%x", myFaultFlags); + else + ArLog::log(ArLog::Normal, "\tno faultflags"); + ArLog::log(ArLog::Normal, "\tlatvel=%.2f temperature=%d", myLatVel, myTemperature); + if(myHaveStateOfCharge) + ArLog::log(ArLog::Normal, "\tsoc=0x%x", myStateOfCharge); + else + ArLog::log(ArLog::Normal, "\tno soc"); + } + + /* + Okay how this works is like so. + + We keep around the raw encoder position, because we must use this + to find differences between last position and this position. + + We find the difference in x and y positions (deltaX and deltaY) + and keep these around for later use, but we also add these to our + raw encoder readings for X and Y. We also find the change in + angle (deltaTh), which is used for inertial corrections, and added + to the raw encoder heading to find which the current raw encoder + heading. + + + From here there are two paths: + + Path 1) Have a callback. If we have a callback it means that we + have an inertial nav device of some kind. If this is the case, + then we pass the callback the delta between last position and + current position, along with the time of the current position, + then the callback gives us back a new delta theta (deltaTh). We + then need to rotate the deltaX and deltaY into our corrected + encoder space. We do this by making a transform that takes the + raw encoder heading and transforms it to what our new heading is + (adding deltaTh to our current encoder th), and then applying that + transform, taking the results as our new deltaX and deltaY. + + Path 2) We have no callback, we just use the heading that came + back from the robot as our delta theta (deltaTh); + + From here the two paths unify again. deltaX and deltaY are added + to the encoder pose (this is the corrected encoder pose), and the + encoder heading is set to the newTh. + + Note that this leaves a difference between rawEncoder heading and + our heading, which is fine, BUT if you are sending heading + commands to the robot you need to compenstate for the difference + between these. + + Note above that we return deltaTh instead of just heading so that + we can turn inertial on and off without losing track of where + we're at... since we're just adding in deltas from the heading it + doesn't matter how we switch around the callback. + + **/ + + myRawEncoderPose.setX(myRawEncoderPose.getX() + deltaX); + myRawEncoderPose.setY(myRawEncoderPose.getY() + deltaY); + myRawEncoderPose.setTh(myRawEncoderPose.getTh() + deltaTh); + + // check if there is a correction callback, if there is get the new + // heading out of it instead of using the raw encoder heading + if (myEncoderCorrectionCB != NULL) + { + ArPoseWithTime deltaPose(deltaX, deltaY, deltaTh, + packet->getTimeReceived()); + deltaTh = myEncoderCorrectionCB->invokeR(deltaPose); + ArTransform trans(ArPose(0, 0, myRawEncoderPose.getTh()), + ArPose(0, 0, + ArMath::addAngle(myEncoderPose.getTh(), + deltaTh))); + + ArPose rotatedDelta = trans.doTransform(ArPose(deltaX, deltaY, 0)); + + deltaX = rotatedDelta.getX(); + deltaY = rotatedDelta.getY(); + } + + myEncoderPose.setTime(packet->getTimeReceived()); + myEncoderPose.setX(myEncoderPose.getX() + deltaX); + myEncoderPose.setY(myEncoderPose.getY() + deltaY); + myEncoderPose.setTh(ArMath::addAngle(myEncoderPose.getTh(), deltaTh)); + + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + + double degreesTravelled = fabs(deltaTh); + double distTravelled = sqrt(fabs(deltaX * deltaX + deltaY * deltaY)); + + myOdometerDegrees += degreesTravelled; + myOdometerDistance += distTravelled; + + myTripOdometerDegrees += degreesTravelled; + myTripOdometerDistance += distTravelled; + + /* + if (myLogMovementReceived) + ArLog::log(ArLog::Normal, + "Global (%5.0f %5.0f %5.0f) Encoder (%5.0f %5.0f %5.0f) Raw (%5.0f %5.0f %5.0f) Rawest (%5d %5d %5d) Delta (%5.0f %5.0f %5.0f) Conv %5.2f", + myGlobalPose.getX(), myGlobalPose.getY(), + myGlobalPose.getTh(), + myEncoderPose.getX(), myEncoderPose.getY(), + myEncoderPose.getTh(), + myRawEncoderPose.getX(), myRawEncoderPose.getY(), + myRawEncoderPose.getTh(), x, y, th, deltaX, deltaY, deltaTh, + myParams->getDistConvFactor()); + */ + if (myLogMovementReceived && + (fabs(deltaX) > .0001 || fabs(deltaY) > .0001 || fabs(deltaTh) > .0001)) + ArLog::log(ArLog::Normal, + "Global (%5.0f %5.0f %7.1f) Encoder (%5.0f %5.0f %7.1f) EncDelta (%5.0f %5.0f %7.1f) Rawest (%5d %5d %5d) Conv %5.2f", + myGlobalPose.getX(), myGlobalPose.getY(), + myGlobalPose.getTh(), + myEncoderPose.getX(), myEncoderPose.getY(), + myEncoderPose.getTh(), + deltaX, deltaY, deltaTh, x, y, th, + myParams->getDistConvFactor()); + + if (myLogMovementReceived && sqrt(deltaX*deltaX + deltaY*deltaY) > 1000) + { + ArLog::log(ArLog::Normal, + "ArRobot: Travelled over 1000 in a cycle, which is unlikely"); + ArLog::logBacktrace(ArLog::Normal); + } + + if (myLogVelocitiesReceived) + { + if (!hasLatVel()) + ArLog::log(ArLog::Normal, + " TransVel: %4.0f RotVel: %4.0f(%4.0f) Heading %4.0f TransAcc %4.0f RotAcc %4.0f(%4.0f)", + myVel, myRotVel, myLastHeading - getTh(), getTh(), + myVel - myLastVel, myRotVel - myLastRotVel, + myLastCalculatedRotVel - (myLastHeading - getTh())); + else + ArLog::log(ArLog::Normal, + " TransVel: %4.0f RotVel: %4.0f(%4.0f) Heading %4.0f DTrans %4.0f DRot %4.0f(%4.0f) LatVel: %4.0f DLat %4.0f", + myVel, myRotVel, myLastHeading - getTh(), getTh(), + myVel - myLastVel, myRotVel - myLastRotVel, + myLastCalculatedRotVel - (myLastHeading - getTh()), + myLatVel, myLatVel - myLastLatVel); + } + myLastVel = myVel; + myLastRotVel = myRotVel; + myLastLatVel = myLatVel; + myLastHeading = getTh(); + myLastCalculatedRotVel = myLastHeading - getTh(); + + //ArLog::log(ArLog::Terse, "(%.0f %.0f) (%.0f %.0f)", deltaX, deltaY, myGlobalPose.getX(), myGlobalPose.getY()); + + ArTime packetTime = packet->getTimeReceived(); + /// MPL adding this so that each place the pose interpolation is + /// used it doesn't have to account for the odometry delay + packetTime.addMSec(-myOdometryDelay); + + // MPL this had come in handy while debugging the intermittent lost + // issue that looked like timing + //ArLog::log(ArLog::Normal, "Robot packet %lld mSec old", packetTime.mSecSince()); + + myLastOdometryReceivedTime = packetTime; + + myInterpolation.addReading(packetTime, myGlobalPose); + myEncoderInterpolation.addReading(packetTime, myEncoderPose); + + return true; +} + +AREXPORT void ArRobot::processNewSonar(char number, int range, + ArTime timeReceived) +{ + /** + This function used to just create more sonar readings if it + didn't have the sonar number that was given (only the case if + that sonar didn't have an entry in the param file), this caused + some silent bugs in other peoples code and so was + removed... especially since we don't know where the sonar are at + if they weren't in the parameter file anyways. + **/ + std::map::iterator it; + ArSensorReading *sonar; + ArTransform encoderTrans; + ArPose encoderPose; + + if ((it = mySonars.find(number)) != mySonars.end()) + { + sonar = (*it).second; + sonar->newData(range, getPose(), getEncoderPose(), getToGlobalTransform(), + getCounter(), timeReceived); + + if (myTimeLastSonarPacket != time(NULL)) + { + myTimeLastSonarPacket = time(NULL); + mySonarPacCount = mySonarPacCurrentCount; + mySonarPacCurrentCount = 0; + } + mySonarPacCurrentCount++; + } + else if (!myWarnedAboutExtraSonar) + { + ArLog::log(ArLog::Normal, "Robot gave back extra sonar reading! Either the parameter file for the robot or the firmware needs updating."); + myWarnedAboutExtraSonar = true; + } +} + + + +AREXPORT bool ArRobot::processEncoderPacket(ArRobotPacket *packet) +{ + if (packet->getID() != 0x90) + return false; + myLeftEncoder = packet->bufToByte4(); + myRightEncoder = packet->bufToByte4(); + return true; +} + +AREXPORT bool ArRobot::processIOPacket(ArRobotPacket *packet) +{ + int i, num; + + if (packet->getID() != 0xf0) + return false; + + myLastIOPacketReceivedTime = packet->getTimeReceived(); + + // number of DigIn bytes + num = packet->bufToUByte(); + for (i = 0; i < num; ++i) + myIODigIn[i] = packet->bufToUByte(); + myIODigInSize = num; + + // number of DigOut bytes + num = packet->bufToUByte(); + for (i = 0; i < num; ++i) + myIODigOut[i] = packet->bufToUByte(); + myIODigOutSize = num; + + // number of A/D bytes + num = packet->bufToUByte(); + for (i = 0; i < num; ++i) + myIOAnalog[i] = packet->bufToUByte2(); + myIOAnalogSize = num; + + return true; +} + +/** + @param num the sonar number to check, should be between 0 and the number of + sonar, the function won't fail if a bad number is given, will just return + -1 + @return -1 if the sonar has never returned a reading, otherwise the sonar + range, which is the distance from the physical sonar disc to where the sonar + bounced back + @see getNumSonar +**/ +AREXPORT int ArRobot::getSonarRange(int num) const +{ + std::map::const_iterator it; + + if ((it = mySonars.find(num)) != mySonars.end()) + return (*it).second->getRange(); + else + return -1; +} + +/** + @param num the sonar number to check, should be between 0 and the number of + sonar, the function won't fail if a bad number is given, will just return + false + @return false if the sonar reading is old, or if there was no reading from + that sonar, in the current SIP cycle. + For best results, use this function in sync with the SIP cycle, for example, + from a Sensor Interpretation Task Callback (see addSensorInterpTask). +**/ + +AREXPORT bool ArRobot::isSonarNew(int num) const +{ + std::map::const_iterator it; + + if ((it = mySonars.find(num)) != mySonars.end()) + return (*it).second->isNew(getCounter()); + else + return false; +} + +/** + @param num the sonar number to check, should be between 0 and the number of + sonar, the function won't fail if a bad number is given, will just return + false + @return NULL if there is no sonar defined for the given number, otherwise + it returns a pointer to an instance of the ArSensorReading, note that this + class retains ownership, so the instance pointed to should not be deleted + and no pointers to it should be stored. Note that often there will be sonar + defined but no readings for it (since the readings may be created by the + parameter reader), if there has never been a reading from the sonar then + the range of that sonar will be -1 and its counterTaken value will be 0 +**/ +AREXPORT ArSensorReading *ArRobot::getSonarReading(int num) const +{ + std::map::const_iterator it; + + if ((it = mySonars.find(num)) != mySonars.end()) + return (*it).second; + else + return NULL; +} + + +/** + @param command the command number to send + @return whether the command could be sent or not + @sa ArCommands +**/ +AREXPORT bool ArRobot::com(unsigned char command) +{ + if (myPacketsSentTracking) + ArLog::log(ArLog::Normal, "Sent: com(%d)", command); + return mySender.com(command); +} + +/** + @param command the command number to send + @param argument the integer argument to send with the command + @return whether the command could be sent or not + @sa ArCommands +**/ +AREXPORT bool ArRobot::comInt(unsigned char command, short int argument) +{ + if (myPacketsSentTracking) + ArLog::log(ArLog::Normal, "Sent: comInt(%d, %d)", command, argument); + return mySender.comInt(command, argument); +} + +/** + @param command the command number to send + @param high the high byte to send with the command + @param low the low byte to send with the command + @return whether the command could be sent or not + @sa ArCommands +**/ +AREXPORT bool ArRobot::com2Bytes(unsigned char command, char high, char low) +{ + if (myPacketsSentTracking) + ArLog::log(ArLog::Normal, "Sent: com2Bytes(%d, %d, %d)", command, + high, low); + return mySender.com2Bytes(command, high, low); +} + +/** + @param command the command number to send + @param argument NULL-terminated string to get data from to send with the command; length to send with packet is determined by strlen + @return whether the command could be sent or not + @sa ArCommands +**/ +AREXPORT bool ArRobot::comStr(unsigned char command, const char *argument) +{ + if (myPacketsSentTracking) + ArLog::log(ArLog::Normal, "Sent: comStr(%d, '%s')", command, + argument); + return mySender.comStr(command, argument); +} + +/** + * Sends a length-prefixed string command to the robot, copying 'size' + * bytes of data from 'str' into the packet. + @param command the command number to send + @param str copy data to send from this character array + @param size length of the string to send; copy this many bytes from 'str'; use this value as the length prefix byte before the sent string. This length must be less than the maximum packet size of 200. + @return whether the command could be sent or not + @sa ArCommands +**/ +AREXPORT bool ArRobot::comStrN(unsigned char command, const char *str, + int size) +{ + if (myPacketsSentTracking) + { + char strBuf[512]; + strncpy(strBuf, str, size); + strBuf[size] = '\0'; + ArLog::log(ArLog::Normal, "Sent: comStrN(%d, '%s') (size %d)", + command, strBuf, size); + } + return mySender.comStrN(command, str, size); +} + +AREXPORT bool ArRobot::comDataN(unsigned char command, const char* data, int size) +{ + if(myPacketsSentTracking) + { + ArLog::log(ArLog::Normal, "Sent: comDataN(%d, ) (size %d)", command, size); + } + return mySender.comDataN(command, data, size); +} + + +AREXPORT int ArRobot::getClosestSonarRange(double startAngle, double endAngle) const +{ + int num; + num = getClosestSonarNumber(startAngle, endAngle); + if (num == -1) + return -1; + else + return getSonarRange(num); +} + +AREXPORT int ArRobot::getClosestSonarNumber(double startAngle, double endAngle) const +{ + int i; + ArSensorReading *sonar; + int closestReading; + int closestSonar; + bool noReadings = true; + + for (i = 0; i < getNumSonar(); i++) + { + sonar = getSonarReading(i); + if (sonar == NULL) + { + ArLog::log(ArLog::Terse, "Have an empty sonar at number %d, there should be %d sonar.", i, getNumSonar()); + continue; + } + if (ArMath::angleBetween(sonar->getSensorTh(), startAngle, endAngle)) + { + if (noReadings) + { + closestReading = sonar->getRange(); + closestSonar = i; + noReadings = false; + } + else if (sonar->getRange() < closestReading) + { + closestReading = sonar->getRange(); + closestSonar = i; + } + } + } + + if (noReadings) + return -1; + else + return closestSonar; +} + +/** + @note It is not neccesary to call this method directly to add a laser (ArLaser + subclass or ArSick object) if using ArLaserConnector or ArSimpleConnector, those + classes automatically add the laser(s). (But you may call this method with e.g. + ArSonarDevice, ArIRs, ArBumpers, etc.) +*/ +AREXPORT void ArRobot::addRangeDevice(ArRangeDevice *device) +{ + device->setRobot(this); + myRangeDeviceList.push_front(device); +} + +/** + @param name remove the first device with this name +**/ +AREXPORT void ArRobot::remRangeDevice(const char *name) +{ + std::list::iterator it; + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + if (strcmp(name, (*it)->getName()) == 0) + { + myRangeDeviceList.erase(it); + return; + } + } +} + +/** + @param device remove the first device with this pointer value +**/ +AREXPORT void ArRobot::remRangeDevice(ArRangeDevice *device) +{ + std::list::iterator it; + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + if ((*it) == device) + { + myRangeDeviceList.erase(it); + return; + } + } +} + +/** + @param name return the first device with this name + @param ignoreCase true to ignore case, false to pay attention to it + @return if found, a range device with the given name, if not found NULL +**/ +AREXPORT ArRangeDevice *ArRobot::findRangeDevice(const char *name, + bool ignoreCase) +{ + std::list::iterator it; + ArRangeDevice *device; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + device = (*it); + if ((ignoreCase && strcasecmp(name, device->getName()) == 0) || + (!ignoreCase && strcmp(name, device->getName()) == 0)) + { + return device; + } + } + return NULL; +} + +/** + @param name return the first device with this name + @param ignoreCase true to ignore case, false to pay attention to it + @return if found, a range device with the given name, if not found NULL +**/ +AREXPORT const ArRangeDevice *ArRobot::findRangeDevice(const char *name, + bool ignoreCase) const +{ + std::list::const_iterator it; + ArRangeDevice *device; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + device = (*it); + if ((ignoreCase && strcasecmp(name, device->getName()) == 0) || + (!ignoreCase && strcmp(name, device->getName()) == 0)) + { + return device; + } + } + return NULL; +} + +/** + This gets the list of range devices attached to this robot, do NOT + manipulate this list directly. If you want to manipulate use the + appropriate addRangeDevice, or remRangeDevice + @return the list of range dvices attached to this robot +**/ +AREXPORT std::list *ArRobot::getRangeDeviceList(void) +{ + return &myRangeDeviceList; +} + +/** + @param device the device to check for +**/ +AREXPORT bool ArRobot::hasRangeDevice(ArRangeDevice *device) const +{ + std::list::const_iterator it; + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + if ((*it) == device) + return true; + } + return false; +} + +/** + * Find the closest reading from any range device's set of current readings + * within a polar region or "slice" defined by the given angle range. + * This function iterates through each registered range device (see + * addRangeDevice()), calls ArRangeDevice::lockDevice(), uses + * ArRangeDevice::currentReadingPolar() to find a reading, then calls + * ArRangeDevice::unlockDevice(). + * + * @copydoc ArRangeDevice::currentReadingPolar() + * @param rangeDevice If not null, then a pointer to the ArRangeDevice + * that provided the returned reading is placed in this variable. + @param useLocationDependentDevices If false, ignore sensor devices that are "location dependent". If true, include them in this check. + * +**/ + +AREXPORT double ArRobot::checkRangeDevicesCurrentPolar( + double startAngle, double endAngle, double *angle, + const ArRangeDevice **rangeDevice, + bool useLocationDependentDevices) const +{ + double closest = 32000; + double closeAngle, tempDist, tempAngle; + std::list::const_iterator it; + ArRangeDevice *device; + bool foundOne = false; + const ArRangeDevice *closestRangeDevice = NULL; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + device = (*it); + device->lockDevice(); + if (!useLocationDependentDevices && device->isLocationDependent()) + { + device->unlockDevice(); + continue; + } + if (!foundOne || + (tempDist = device->currentReadingPolar(startAngle, endAngle, + &tempAngle)) < closest) + { + if (!foundOne) + { + closest = device->currentReadingPolar(startAngle, endAngle, + &closeAngle); + closestRangeDevice = device; + } + else + { + closest = tempDist; + closeAngle = tempAngle; + closestRangeDevice = device; + } + foundOne = true; + } + device->unlockDevice(); + } + if (!foundOne) + return -1; + if (angle != NULL) + *angle = closeAngle; + if (rangeDevice != NULL) + *rangeDevice = closestRangeDevice; + return closest; + +} + + +/** + * Find the closest reading from any range device's set of cumulative readings + * within a polar region or "slice" defined by the given angle range. + * This function iterates through each registered range device (see + * addRangeDevice()), calls ArRangeDevice::lockDevice(), uses + * ArRangeDevice::cumulativeReadingPolar() to find a reading, then calls + * ArRangeDevice::unlockDevice(). + * + * @copydoc ArRangeDevice::cumulativeReadingPolar() + * @param rangeDevice If not null, then a pointer to the ArRangeDevice + * that provided the returned reading is placed in this variable. + @param useLocationDependentDevices If false, ignore sensor devices that are "location dependent". If true, include them in this check. +**/ +AREXPORT double ArRobot::checkRangeDevicesCumulativePolar( + double startAngle, double endAngle, double *angle, + const ArRangeDevice **rangeDevice, + bool useLocationDependentDevices) const +{ + double closest = 32000; + double closeAngle, tempDist, tempAngle; + std::list::const_iterator it; + ArRangeDevice *device; + bool foundOne = false; + const ArRangeDevice *closestRangeDevice = NULL; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + device = (*it); + device->lockDevice(); + if (!useLocationDependentDevices && device->isLocationDependent()) + { + device->unlockDevice(); + continue; + } + if (!foundOne || + (tempDist = device->cumulativeReadingPolar(startAngle, endAngle, + &tempAngle)) < closest) + { + if (!foundOne) + { + closest = device->cumulativeReadingPolar(startAngle, endAngle, + &closeAngle); + closestRangeDevice = device; + } + else + { + closest = tempDist; + closeAngle = tempAngle; + closestRangeDevice = device; + } + foundOne = true; + } + device->unlockDevice(); + } + if (!foundOne) + return -1; + if (angle != NULL) + *angle = closeAngle; + if (rangeDevice != NULL) + *rangeDevice = closestRangeDevice; + return closest; + +} + +/** + Gets the closest reading in a region defined by the two points of a + rectangle. + This goes through all of the registered range devices and locks each, + calls currentReadingBox on it, and then unlocks it. + + @param x1 the x coordinate of one of the rectangle points + @param y1 the y coordinate of one of the rectangle points + @param x2 the x coordinate of the other rectangle point + @param y2 the y coordinate of the other rectangle point + @param readingPos a pointer to a position in which to store the location of + @param rangeDevice If not null, then a pointer to the ArRangeDevice + that provided the returned reading is placed in this variable. + the closest position + @param useLocationDependentDevices If false, ignore sensor devices that are "location dependent". If true, include them in this check. + @return If >= 0 then this is the distance to the closest + reading. If < 0 then there were no readings in the given region +**/ + +AREXPORT double ArRobot::checkRangeDevicesCurrentBox( + double x1, double y1, double x2, double y2, ArPose *readingPos, + const ArRangeDevice **rangeDevice, + bool useLocationDependentDevices) const +{ + + double closest = 32000; + double tempDist; + ArPose closestPos, tempPos; + std::list::const_iterator it; + ArRangeDevice *device; + bool foundOne = false; + const ArRangeDevice *closestRangeDevice = NULL; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + device = (*it); + device->lockDevice(); + if (!useLocationDependentDevices && device->isLocationDependent()) + { + device->unlockDevice(); + continue; + } + if (!foundOne || + (tempDist = device->currentReadingBox(x1, y1, x2, y2, &tempPos)) < closest) + { + if (!foundOne) + { + closest = device->currentReadingBox(x1, y1, x2, y2, &closestPos); + closestRangeDevice = device; + } + else + { + closest = tempDist; + closestPos = tempPos; + closestRangeDevice = device; + } + foundOne = true; + } + device->unlockDevice(); + } + if (!foundOne) + return -1; + if (readingPos != NULL) + *readingPos = closestPos; + if (rangeDevice != NULL) + *rangeDevice = closestRangeDevice; + return closest; +} + +/** + Gets the closest reading in a region defined by the two points of a + rectangle. + This goes through all of the registered range devices and locks each, + calls cumulativeReadingBox() on it, and then unlocks it. If a reading was + found in the box, returns with results. + + @param x1 the x coordinate of one of the rectangle points + @param y1 the y coordinate of one of the rectangle points + @param x2 the x coordinate of the other rectangle point + @param y2 the y coordinate of the other rectangle point + @param readingPos If not NULL, a pointer to a position in which to store the location of + the closest position + @param rangeDevice If not NULL, a pointer in which to store a pointer to the range device + that provided the closest reading in the box. + @param useLocationDependentDevices If false, ignore sensor devices that are "location dependent". If true, include them in this check. + @return If >= 0 then this is the distance to the closest + reading. If < 0 then there were no readings in the given region +**/ + +AREXPORT double ArRobot::checkRangeDevicesCumulativeBox( + double x1, double y1, double x2, double y2, ArPose *readingPos, + const ArRangeDevice **rangeDevice, + bool useLocationDependentDevices) const +{ + + double closest = 32000; + double tempDist; + ArPose closestPos, tempPos; + std::list::const_iterator it; + ArRangeDevice *device; + bool foundOne = false; + const ArRangeDevice *closestRangeDevice = NULL; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it) + { + device = (*it); + device->lockDevice(); + if (!useLocationDependentDevices && device->isLocationDependent()) + { + device->unlockDevice(); + continue; + } + if (!foundOne || + (tempDist = device->cumulativeReadingBox(x1, y1, x2, y2, &tempPos)) < closest) + { + if (!foundOne) + { + closest = device->cumulativeReadingBox(x1, y1, x2, y2, &closestPos); + closestRangeDevice = device; + } + else + { + closest = tempDist; + closestPos = tempPos; + closestRangeDevice = device; + } + foundOne = true; + } + device->unlockDevice(); + } + if (!foundOne) + return -1; + if (readingPos != NULL) + *readingPos = closestPos; + if (rangeDevice != NULL) + *rangeDevice = closestRangeDevice; + return closest; +} + +/** + * + * The robot-relative positions of the readings of attached range + * devices, plus sonar readings stored in this object, will also be updated. + * + * @note This simply changes our stored pose value, it does not cause the robot + * to drive. Use setVel(), setRotVel(), move(), setHeading(), setDeltaHeading(), + * or the actions system. + * + @param pose New pose to set (in absolute world coordinates) + @param doCumulative whether to update the cumulative buffers of range devices +**/ +AREXPORT void ArRobot::moveTo(ArPose pose, bool doCumulative) +{ + std::list::iterator it; + ArSensorReading *son; + int i; + + // we need to get this one now because changing the encoder + // transform and global pose will change the local transform + ArTransform localTransform; + localTransform = getToLocalTransform(); + + myEncoderTransform.setTransform(myEncoderPose, pose); + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + mySetEncoderTransformCBList.invoke(); + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); it++) + { + (*it)->lockDevice(); + (*it)->applyTransform(localTransform, doCumulative); + (*it)->applyTransform(getToGlobalTransform(), doCumulative); + (*it)->unlockDevice(); + } + + for (i = 0; i < getNumSonar(); i++) + { + son = getSonarReading(i); + if (son != NULL) + { + son->applyTransform(localTransform); + son->applyTransform(getToGlobalTransform()); + } + } + + //ArLog::log(ArLog::Normal, "Robot moved to %.0f %.0f %.1f", getX(), getY(), getTh()); +} + +/** + * The robot-relative positions of the readings of attached range + * devices, plus sonar readings stored in this object, will also be updated. + * This variant allows you to manually specify a pose to use as the robot's + * old pose when updating range device readings (rather than ArRobot's + * currently stored pose). + * + * @note This simply changes our stored pose value, it does not cause the robot + * to drive. Use setVel(), setRotVel(), move(), setHeading(), setDeltaHeading(), + * or the actions system. + * + @param poseTo the new absolute real world position + @param poseFrom the original absolute real world position + @param doCumulative whether to update the cumulative buffers of range devices +**/ +AREXPORT void ArRobot::moveTo(ArPose poseTo, ArPose poseFrom, + bool doCumulative) +{ + std::list::iterator it; + ArSensorReading *son; + int i; + + ArPose result = myEncoderTransform.doInvTransform(poseFrom); + + // we need to get this one now because changing the encoder + // transform and global pose will change the local transform + ArTransform localTransform; + localTransform = getToLocalTransform(); + + myEncoderTransform.setTransform(result, poseTo); + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + mySetEncoderTransformCBList.invoke(); + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); it++) + { + (*it)->lockDevice(); + (*it)->applyTransform(localTransform, doCumulative); + (*it)->applyTransform(getToGlobalTransform(), doCumulative); + (*it)->unlockDevice(); + } + + for (i = 0; i < getNumSonar(); i++) + { + son = getSonarReading(i); + if (son != NULL) + { + son->applyTransform(localTransform); + son->applyTransform(getToGlobalTransform()); + } + } + + //ArLog::log(ArLog::Normal, "Robot moved to %.0f %.0f %.1f", getX(), getY(), getTh()); +} + +/** + * This transform is applied to all odometric/encoder poses received. + * If you simply want to transform the robot's final reported pose (as returned + * by getPose()) to match an external coordinate system, use moveTo() instead. + * @sa moveTo() + @param deadReconPos the dead recon position to transform from + @param globalPos the real world global position to transform to +**/ +AREXPORT void ArRobot::setEncoderTransform(ArPose deadReconPos, + ArPose globalPos) +{ + myEncoderTransform.setTransform(deadReconPos, globalPos); + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + mySetEncoderTransformCBList.invoke(); +} + +/** + * This transform is applied to all odometric/encoder poses received. + * If you simply want to transform the robot's final reported pose (as returned + * by getPose()) to match an external coordinate system, use moveTo() instead. + * @sa moveTo() + @param transformPos the position to transform to +**/ +AREXPORT void ArRobot::setEncoderTransform(ArPose transformPos) +{ + myEncoderTransform.setTransform(transformPos); + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + mySetEncoderTransformCBList.invoke(); +} + +/* + * This transform is applied to all odometric/encoder poses received. + * If you simply want to transform the robot's final reported pose (as returned + * by getPose()) to match an external coordinate system, use moveTo() instead. + * @sa moveTo() + @param transformPos the position to transform to +*/ +AREXPORT void ArRobot::setEncoderTransform(ArTransform transform) +{ + myEncoderTransform = transform; + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + mySetEncoderTransformCBList.invoke(); +} + +/** + @return the transform from encoder to global coords +**/ +AREXPORT ArTransform ArRobot::getEncoderTransform(void) const +{ + return myEncoderTransform; +} + +/** + @param pose the position to set the dead recon position to +**/ +AREXPORT void ArRobot::setDeadReconPose(ArPose pose) +{ + myEncoderPose.setPose(pose); + myEncoderTransform.setTransform(myEncoderPose, myGlobalPose); + myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); + mySetEncoderTransformCBList.invoke(); +} + + +/** + @return an ArTransform which can be used for transforming a position + in local coordinates to one in global coordinates +**/ +AREXPORT ArTransform ArRobot::getToGlobalTransform(void) const +{ + ArTransform trans; + ArPose origin(0, 0, 0); + ArPose pose = getPose(); + + trans.setTransform(origin, pose); + return trans; +} + +/** + @return an ArTransform which can be used for transforming a position + in global coordinates to one in local coordinates +**/ +AREXPORT ArTransform ArRobot::getToLocalTransform(void) const +{ + ArTransform trans; + ArPose origin(0, 0, 0); + ArPose pose = getPose(); + + trans.setTransform(pose, origin); + return trans; +} + +/** + Applies a transform to the range devices and sonar... + this is mostly useful for + translating to/from local/global coords, but may have other uses + @param trans the transform to apply + @param doCumulative whether to transform the cumulative buffers or not +**/ +AREXPORT void ArRobot::applyTransform(ArTransform trans, bool doCumulative) +{ + std::list::iterator it; + ArSensorReading *son; + int i; + + for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); it++) + { + (*it)->lockDevice(); + (*it)->applyTransform(trans, doCumulative); + (*it)->unlockDevice(); + } + + for (i = 0; i < getNumSonar(); i++) + { + son = getSonarReading(i); + if (son != NULL) + son->applyTransform(trans); + } +} + +AREXPORT const char *ArRobot::getName(void) const +{ + return myName.c_str(); +} + +AREXPORT void ArRobot::setName(const char * name) +{ + std::list *robotList; + std::list::iterator it; + int i; + char buf[1024]; + + if (name != NULL) + { + myName = name; + } + else + { + + + + robotList = Aria::getRobotList(); + for (i = 1, it = robotList->begin(); it != robotList->end(); it++, i++) + { + if (this == (*it)) + { + if (i == 1) + myName = "robot"; + else + { + sprintf(buf, "robot%d", i); + myName = buf; + } + return; + } + } + sprintf(buf, "robot%lu", robotList->size()); + myName = buf; + } +} + +/** + This sets the encoderCorrectionCB, this callback returns the robots + change in heading, it takes in the change in heading, x, and y, + between the previous and current readings. + + @param functor an ArRetFunctor1 created as an ArRetFunctor1C, that + will be the callback... call this function NULL to clear the + callback @see getEncoderCorrectionCallback +**/ + +AREXPORT void ArRobot::setEncoderCorrectionCallback( + ArRetFunctor1 *functor) +{ + myEncoderCorrectionCB = functor; +} +/** + This gets the encoderCorrectionCB, see setEncoderCorrectionCallback + for details. + + @return the callback, or NULL if there isn't one +**/ +AREXPORT ArRetFunctor1 * +ArRobot::getEncoderCorrectionCallback(void) const +{ + return myEncoderCorrectionCB; +} + +/** + The direct motion precedence time determines how long actions will be + ignored after a direct motion command is given. If the direct motion + precedence time is 0, then direct motion will take precedence over actions + until a clearDirectMotion command is issued. This value defaults to 0. + @param mSec the number of milliseconds direct movement should trump actions, + if a negative number is given, then the value will be 0 + @see setDirectMotionPrecedenceTime + @see clearDirectMotion +**/ +AREXPORT void ArRobot::setDirectMotionPrecedenceTime(int mSec) +{ + if (mSec < 0) + myDirectPrecedenceTime = 0; + else + myDirectPrecedenceTime = mSec; +} + +/** + The direct motion precedence time determines how long actions will be + ignored after a direct motion command is given. If the direct motion + precedence time is 0, then direct motion will take precedence over actions + until a clearDirectMotion command is issued. This value defaults to 0. + @return the number of milliseconds direct movement will trump actions + @see setDirectMotionPrecedenceTime + @see clearDirectMotion +**/ +AREXPORT unsigned int ArRobot::getDirectMotionPrecedenceTime(void) const +{ + return myDirectPrecedenceTime; +} + + +/** + This clears the direct motion commands so that actions will be allowed to + control the robot again. + @see setDirectMotionPrecedenceTime + @see getDirectMotionPrecedenceTime +**/ +AREXPORT void ArRobot::clearDirectMotion(void) +{ + myTransType = TRANS_NONE; + myLastTransType = TRANS_NONE; + myRotType = ROT_NONE; + myLastRotType = ROT_NONE; + myLatType = LAT_NONE; + myLastLatType = LAT_NONE; + myLastActionTransVal = 0; + myLastActionRotStopped = true; + myLastActionRotHeading = false; + myLastActionLatVal = 0; +} + +/** + This stops the state reflection task from sending any motion + commands to the robot (it still receives data from the robot, and it + will still send the PULSE command). If you later call clearDirectMotion(), + then state reflection will be re-enabled, but the velocity values are reset + to 0. Similarly, if you later use direct motion commands, + state reflection for those commands will then become active and those + commands will be sent each cycle; other commands will remain disabled. + For example, if you call stopStateReflection(), then later use setTransVel(), + then translation velocity commands will be re-enabled and used in state + reflection, but rotational velocity will remain disabled until you + call setRotVel(), or call clearDirectMotion(). + **/ +AREXPORT void ArRobot::stopStateReflection(void) +{ + myTransType = TRANS_IGNORE; + myLastTransType = TRANS_IGNORE; + myRotType = ROT_IGNORE; + myLastRotType = ROT_IGNORE; + myLatType = LAT_IGNORE; + myLastLatType = LAT_IGNORE; +} + +/** + Returns the state of direct motion commands: whether actions are allowed or not + @see clearDirectMotion +**/ +AREXPORT bool ArRobot::isDirectMotion(void) const +{ + if (myTransType == TRANS_NONE && myLastTransType == TRANS_NONE && + myRotType == ROT_NONE && myLastRotType == ROT_NONE && + (!hasLatVel() || + (hasLatVel() && myLatType == LAT_NONE && myLastLatType == LAT_NONE))) + return false; + else + return true; +} + + +/** + This command enables the motors on the robot, if it is connected. +**/ +AREXPORT void ArRobot::enableMotors() +{ + comInt(ArCommands::ENABLE, 1); +} + +/** + This command disables the motors on the robot, if it is connected. +**/ +AREXPORT void ArRobot::disableMotors() +{ + comInt(ArCommands::ENABLE, 0); +} + +/** + This command enables the sonars on the robot, if it is connected. +**/ +AREXPORT void ArRobot::enableSonar() +{ + mySonarEnabled = true; + myAutonomousDrivingSonarEnabled = false; + comInt(ArCommands::SONAR, 1); + + int ii; + for (ii = 1; ii <= Aria::getMaxNumSonarBoards(); ii++) + { + ArSonarMTX *sonarMTX = findSonar(ii); + + if (sonarMTX == NULL) + continue; + + sonarMTX->turnOnTransducers(); + } +} + +/** + This command enables the sonars on the robot, if it is connected. +**/ +AREXPORT void ArRobot::enableAutonomousDrivingSonar() +{ + mySonarEnabled = false; + myAutonomousDrivingSonarEnabled = true; + comInt(ArCommands::SONAR, 1); + + int ii; + for (ii = 1; ii <= Aria::getMaxNumSonarBoards(); ii++) + { + ArSonarMTX *sonarMTX = findSonar(ii); + + if (sonarMTX == NULL) + continue; + + sonarMTX->disableForAutonomousDriving(); + } +} + +/** + This command disables the sonars on the robot, if it is connected. +**/ +AREXPORT void ArRobot::disableSonar() +{ + mySonarEnabled = false; + myAutonomousDrivingSonarEnabled = false; + comInt(ArCommands::SONAR, 0); + + int ii; + for (ii = 1; ii <= Aria::getMaxNumSonarBoards(); ii++) + { + ArSonarMTX *sonarMTX = findSonar(ii); + + if (sonarMTX == NULL) + continue; + + sonarMTX->turnOffTransducers(); + } +} + + +/** + The state reflection refresh time is the number of milliseconds between + when the state reflector will refresh the robot, if the command hasn't + changed. The default is 500 milliseconds. If this number is less than + the cyle time, it'll simply happen every cycle. + @param mSec the refresh time, in milliseconds, non-negative, if negative is + given, then the value will be 0 +**/ +AREXPORT void ArRobot::setStateReflectionRefreshTime(int mSec) +{ + if (mSec < 0) + myStateReflectionRefreshTime = 0; + else + myStateReflectionRefreshTime = mSec; +} + +/** + The state reflection refresh time is the number of milliseconds between + when the state reflector will refresh the robot, if the command hasn't + changed. The default is 500 milliseconds. If this number is less than + the cyle time, it'll simply happen every cycle. + @return the state reflection refresh time +**/ +AREXPORT int ArRobot::getStateReflectionRefreshTime(void) const +{ + return myStateReflectionRefreshTime; +} + +/** + This will attach a key handler to a robot, by putting it into the + robots sensor interp task list (a keyboards a sensor of users will, + right?). By default exitOnEscape is true, which will cause this + function to add an escape key handler to the key handler, this will + make the program exit when escape is pressed... if you don't like + this you can pass exitOnEscape in as false. + + @param keyHandler the key handler to attach + + @param exitOnEscape whether to exit when escape is pressed or not + + @param useExitNotShutdown if true then Aria::exit will be called + instead of Aria::shutdown if it tries to exit +**/ +AREXPORT void ArRobot::attachKeyHandler(ArKeyHandler *keyHandler, + bool exitOnEscape, + bool useExitNotShutdown) +{ + if (myKeyHandlerCB != NULL) + delete myKeyHandlerCB; + myKeyHandlerCB = new ArFunctorC(keyHandler, + &ArKeyHandler::checkKeys); + addSensorInterpTask("Key Handler", 50, myKeyHandlerCB); + + myKeyHandler = keyHandler; + myKeyHandlerUseExitNotShutdown = useExitNotShutdown; + if (exitOnEscape) + keyHandler->addKeyHandler(ArKeyHandler::ESCAPE, &myKeyHandlerExitCB); +} + +AREXPORT ArKeyHandler *ArRobot::getKeyHandler(void) const +{ + return myKeyHandler; +} + +AREXPORT void ArRobot::keyHandlerExit(void) +{ + ArLog::log(ArLog::Terse, "Escape was pressed, program is exiting."); + // if we're using exit not the keyhandler then call Aria::exit + // instead of shutdown, this call never returns + if (myKeyHandlerUseExitNotShutdown) + Aria::exit(); + stopRunning(); + unlock(); + Aria::shutdown(); +} + +AREXPORT void ArRobot::setPacketsReceivedTracking(bool packetsReceivedTracking) +{ + if (packetsReceivedTracking) + ArLog::log(ArLog::Normal, "ArRobot: tracking packets received"); + else + ArLog::log(ArLog::Normal, "ArRobot: not tracking packets received"); + + myPacketsReceivedTracking = packetsReceivedTracking; + myReceiver.setTracking(myPacketsReceivedTracking); + myReceiver.setTrackingLogName("MicroController"); + myPacketsReceivedTrackingCount = 0; + myPacketsReceivedTrackingStarted.setToNow(); +} + +AREXPORT void ArRobot::ariaExitCallback(void) +{ + mySyncLoop.stopRunIfNotConnected(false); + disconnect(); +} + +/** + @note only available on robots with an firwmare + operating system (ARCOS or uARCS) thats at least newer than July of + 2005. It'll just be CHARGING_UNKNOWN on everything else always. + + @note Some robots don't actively manage their own charge state (Pioneer 3, Amigo), + instead this is done by the external charger hardware. ChargeState is most + revelant on uARCS systems (i.e. PatrolBot). + If the firmware for the Pioneer based robots is newer and supports charge state, + charge state will just always be CHARGING_NOT. If the firmware on these robots is + older and does not support, it, this function will return CHARGING_UNKNOWN. + (on these robots, you might be able to guess what the charger is doing based on + reported battery voltage, but this is not a direct measure.) + **/ +AREXPORT ArRobot::ChargeState ArRobot::getChargeState(void) const +{ + return myChargeState; +} + +/** + + **/ +AREXPORT void ArRobot::setChargeState(ArRobot::ChargeState chargeState) +{ + myOverriddenChargeState = true; + myChargeState = chargeState; +} + +AREXPORT bool ArRobot::isChargerPowerGood(void) const +{ + if (myOverriddenIsChargerPowerGood) + return myIsChargerPowerGood; + else + return (getFlags() & ArUtil::BIT10); +} + +AREXPORT void ArRobot::setIsChargerPowerGood(bool isChargerPowerGood) +{ + myOverriddenIsChargerPowerGood = true; + myIsChargerPowerGood = isChargerPowerGood; +} + +AREXPORT void ArRobot::resetTripOdometer(void) +{ + myTripOdometerDistance = 0; + myTripOdometerDegrees = 0; + myTripOdometerStart.setToNow(); +} + +AREXPORT void ArRobot::setStateOfCharge(double stateOfCharge) +{ + myHaveStateOfCharge = true; + myStateOfCharge = stateOfCharge; + myStateOfChargeSetTime.setToNow(); +} + +AREXPORT void ArRobot::setIgnoreMicroControllerBatteryInfo( + bool ignoreMicroControllerBatteryInfo) +{ + if (myIgnoreMicroControllerBatteryInfo != ignoreMicroControllerBatteryInfo) + { + if (ignoreMicroControllerBatteryInfo) + ArLog::log(ArLog::Normal, "Ignoring battery info from the microcontroller"); + else + ArLog::log(ArLog::Normal, "Not ignoring battery info from the microcontroller"); + } + myIgnoreMicroControllerBatteryInfo = ignoreMicroControllerBatteryInfo; +} + +AREXPORT void ArRobot::setBatteryInfo(double realBatteryVoltage, + double normalizedBatteryVoltage, + bool haveStateOfCharge, + double stateOfCharge) +{ + myRealBatteryVoltage = realBatteryVoltage; + myRealBatteryAverager.add(myRealBatteryVoltage); + + myBatteryVoltage = normalizedBatteryVoltage; + myBatteryAverager.add(myBatteryVoltage); + + if (!myHaveStateOfCharge && haveStateOfCharge) + myHaveStateOfCharge = true; + if (haveStateOfCharge) + { + myStateOfCharge = stateOfCharge; + myStateOfChargeSetTime.setToNow(); + } +} + + +/** @since 2.7.0 + @note Do not call this method directly + if using ArLaserConnector, it will automatically add laser(s). + @internal +*/ +AREXPORT bool ArRobot::addLaser(ArLaser *laser, int laserNumber, + bool addAsRangeDevice) +{ + std::map::iterator it; + if (laser == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::addLaser: Tried to add NULL laser as laser number %d", + laserNumber); + return false; + } + if ((it = myLaserMap.find(laserNumber)) != myLaserMap.end()) + { + if ((*it).second == laser) + { + ArLog::log(ArLog::Verbose, + "Tried to add laser %s as number %d (and as a range device) but already have that laser, doing nothing", + laser->getName(), laserNumber); + return true; + } + ArLog::log(ArLog::Normal, "ArRobot::addLaser: Tried to add laser %s as laser number %d but there is already a laser of that number (called %s)", + laser->getName(), laserNumber, + (*it).second->getName()); + return false; + } + myLaserMap[laserNumber] = laser; + if (addAsRangeDevice) + { + ArLog::log(ArLog::Verbose, + "Added laser %s as number %d (and as a range device)", + laser->getName(), laserNumber); + remRangeDevice(laser); + addRangeDevice(laser); + } + else + { + ArLog::log(ArLog::Verbose, + "Added laser %s as number %d (but not a range device)", + laser->getName(), laserNumber); + } + return true; +} + + + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remLaser(ArLaser *laser, bool removeAsRangeDevice) +{ + if (laser == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Passed NULL laser to remove"); + return false; + } + std::map::iterator it; + for (it = myLaserMap.begin(); it != myLaserMap.end(); ++it) + { + if ((*it).second == laser) + { + if (removeAsRangeDevice) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Removing laser %s (num %d) (and removing as range device)", + laser->getName(), (*it).first); + remRangeDevice((*it).second); + } + else + { + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Removing laser %s (num %d) (will not remove as range device)", + laser->getName(), (*it).first); + } + myLaserMap.erase(it); + return true; + } + } + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Could not find laser %s to remove", + laser->getName()); + return false; +} + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remLaser(int laserNumber, bool removeAsRangeDevice) +{ + std::map::iterator it; + if ((it = myLaserMap.find(laserNumber)) == myLaserMap.end()) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Could not find laser %d to remove", + laserNumber); + return false; + + } + + if (removeAsRangeDevice) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Removing laser %s (num %d) (and removing as range device)", + (*it).second->getName(), (*it).first); + remRangeDevice((*it).second); + } + else + { + ArLog::log(ArLog::Normal, + "ArRobot::remLaser: Removing laser %s (num %d) (will not remove as range device)", + (*it).second->getName(), (*it).first); + } + + myLaserMap.erase(it); + return true; +} + +/** @since 2.7.0 + @see ArLaserConnector +*/ +AREXPORT const ArLaser *ArRobot::findLaser(int laserNumber) const +{ + std::map::const_iterator it; + if ((it = myLaserMap.find(laserNumber)) == myLaserMap.end()) + return NULL; + else + return (*it).second; +} + +/** @since 2.7.0 + @see ArLaserConnector +*/ +AREXPORT ArLaser *ArRobot::findLaser(int laserNumber) +{ + if (myLaserMap.find(laserNumber) == myLaserMap.end()) + return NULL; + else + return myLaserMap[laserNumber]; +} + +/** @since 2.7.0 + @see ArLaserConnector +*/ +AREXPORT const std::map *ArRobot::getLaserMap(void) const +{ + return &myLaserMap; +} + + +/** @since 2.7.0 + @see ArLaserConnector +*/ +AREXPORT std::map *ArRobot::getLaserMap(void) +{ + return &myLaserMap; +} + +/** @since 2.7.0 + @see ArLaserConnector +*/ +AREXPORT bool ArRobot::hasLaser(ArLaser *device) const +{ + for(std::map::const_iterator i = myLaserMap.begin(); + i != myLaserMap.end(); ++i) + { + if( (*i).second == device ) return true; + } + return false; +} + + +/** @since 2.7.0 + @note Do not call this method directly + if using ArBatteryConnector, it will automatically add battery(s). + @internal +*/ +AREXPORT bool ArRobot::addBattery(ArBatteryMTX *battery, int batteryNumber) +{ + std::map::iterator it; + if (battery == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::addBattery: Tried to add NULL battery as battery number %d", + batteryNumber); + return false; + } + if ((it = myBatteryMap.find(batteryNumber)) != myBatteryMap.end()) + { + if ((*it).second == battery) + { + ArLog::log(ArLog::Verbose, + "Tried to add battery %s as number %d but already have that battery, doing nothing", + battery->getName(), batteryNumber); + return true; + } + ArLog::log(ArLog::Normal, "ArRobot::addBattery: Tried to add battery %s as battery number %d but there is already a battery of that number (called %s)", + battery->getName(), batteryNumber, + (*it).second->getName()); + return false; + } + myBatteryMap[batteryNumber] = battery; + ArLog::log(ArLog::Verbose, + "Added battery %s as number %d", + battery->getName(), batteryNumber); + return true; +} + + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remBattery(ArBatteryMTX *battery) +{ + if (battery == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::remBattery: Passed NULL battery to remove"); + return false; + } + std::map::iterator it; + for (it = myBatteryMap.begin(); it != myBatteryMap.end(); ++it) + { + if ((*it).second == battery) + { + ArLog::log(ArLog::Normal, + "ArRobot::remBattery: Removing battery %s (num %d)", + battery->getName(), (*it).first); + myBatteryMap.erase(it); + return true; + } + } + ArLog::log(ArLog::Normal, + "ArRobot::remBattery: Could not find battery %s to remove", + battery->getName()); + return false; +} + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remBattery(int batteryNumber) +{ + std::map::iterator it; + if ((it = myBatteryMap.find(batteryNumber)) == myBatteryMap.end()) + { + ArLog::log(ArLog::Normal, + "ArRobot::remBattery: Could not find battery %d to remove", + batteryNumber); + return false; + + } + + ArLog::log(ArLog::Normal, + "ArRobot::remBattery: Removing battery %s (num %d) ", + (*it).second->getName(), (*it).first); + + myBatteryMap.erase(it); + return true; +} + +/** @since 2.7.0 + @see ArBatteryConnector +*/ +AREXPORT const ArBatteryMTX *ArRobot::findBattery(int batteryNumber) const +{ + std::map::const_iterator it; + if ((it = myBatteryMap.find(batteryNumber)) == myBatteryMap.end()) + return NULL; + else + return (*it).second; +} + +/** @since 2.7.0 + @see ArBatteryConnector +*/ +AREXPORT ArBatteryMTX *ArRobot::findBattery(int batteryNumber) +{ + if (myBatteryMap.find(batteryNumber) == myBatteryMap.end()) + return NULL; + else + return myBatteryMap[batteryNumber]; +} + +/** @since 2.7.0 + @see ArBatteryConnector +*/ +AREXPORT const std::map *ArRobot::getBatteryMap(void) const +{ + return &myBatteryMap; +} + + +/** @since 2.7.0 + @see ArBatteryConnector +*/ +AREXPORT std::map *ArRobot::getBatteryMap(void) +{ + return &myBatteryMap; +} + +/** @since 2.7.0 + @see ArBatteryConnector +*/ +AREXPORT bool ArRobot::hasBattery(ArBatteryMTX *device) const +{ + for(std::map::const_iterator i = myBatteryMap.begin(); + i != myBatteryMap.end(); ++i) + { + if( (*i).second == device ) return true; + } + return false; +} + + +/** @since 2.7.0 + @note Do not call this method directly + if using ArLCDConnector, it will automatically add lcd(s). + @internal +*/ +AREXPORT bool ArRobot::addLCD(ArLCDMTX *lcd, int lcdNumber) +{ + std::map::iterator it; + if (lcd == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::addLCD: Tried to add NULL lcd as lcd number %d", + lcdNumber); + return false; + } + if ((it = myLCDMap.find(lcdNumber)) != myLCDMap.end()) + { + if ((*it).second == lcd) + { + ArLog::log(ArLog::Verbose, + "Tried to add lcd %s as number %d but already have that lcd, doing nothing", + lcd->getName(), lcdNumber); + return true; + } + ArLog::log(ArLog::Normal, "ArRobot::addLCD: Tried to add lcd %s as lcd number %d but there is already a lcd of that number (called %s)", + lcd->getName(), lcdNumber, + (*it).second->getName()); + return false; + } + myLCDMap[lcdNumber] = lcd; + ArLog::log(ArLog::Verbose, + "Added lcd %s as number %d", + lcd->getName(), lcdNumber); + return true; +} + + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remLCD(ArLCDMTX *lcd) +{ + if (lcd == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLCD: Passed NULL lcd to remove"); + return false; + } + std::map::iterator it; + for (it = myLCDMap.begin(); it != myLCDMap.end(); ++it) + { + if ((*it).second == lcd) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLCD: Removing lcd %s (num %d)", + lcd->getName(), (*it).first); + myLCDMap.erase(it); + return true; + } + } + ArLog::log(ArLog::Normal, + "ArRobot::remLCD: Could not find lcd %s to remove", + lcd->getName()); + return false; +} + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remLCD(int lcdNumber) +{ + std::map::iterator it; + if ((it = myLCDMap.find(lcdNumber)) == myLCDMap.end()) + { + ArLog::log(ArLog::Normal, + "ArRobot::remLCD: Could not find lcd %d to remove", + lcdNumber); + return false; + + } + + ArLog::log(ArLog::Normal, + "ArRobot::remLCD: Removing lcd %s (num %d) ", + (*it).second->getName(), (*it).first); + + myLCDMap.erase(it); + return true; +} + +/** @since 2.7.0 + @see ArLCDConnector +*/ +AREXPORT const ArLCDMTX *ArRobot::findLCD(int lcdNumber) const +{ + std::map::const_iterator it; + if ((it = myLCDMap.find(lcdNumber)) == myLCDMap.end()) + return NULL; + else + return (*it).second; +} + +/** @since 2.7.0 + @see ArLCDConnector +*/ +AREXPORT ArLCDMTX *ArRobot::findLCD(int lcdNumber) +{ + if (myLCDMap.find(lcdNumber) == myLCDMap.end()) + return NULL; + else + return myLCDMap[lcdNumber]; +} + +/** @since 2.7.0 + @see ArLCDConnector +*/ +AREXPORT const std::map *ArRobot::getLCDMap(void) const +{ + return &myLCDMap; +} + + +/** @since 2.7.0 + @see ArLCDConnector +*/ +AREXPORT std::map *ArRobot::getLCDMap(void) +{ + return &myLCDMap; +} + +/** @since 2.7.0 + @see ArLCDConnector +*/ +AREXPORT bool ArRobot::hasLCD(ArLCDMTX *device) const +{ + for(std::map::const_iterator i = myLCDMap.begin(); + i != myLCDMap.end(); ++i) + { + if( (*i).second == device ) return true; + } + return false; +} + +/** @since 2.7.0 + @note Do not call this method directly + if using ArBatteryConnector, it will automatically add battery(s). + @internal +*/ +AREXPORT bool ArRobot::addSonar(ArSonarMTX *sonar, int sonarNumber) +{ + std::map::iterator it; + if (sonar == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::addSonar: Tried to add NULL sonar board as sonar number %d", + sonarNumber); + return false; + } + if ((it = mySonarMap.find(sonarNumber)) != mySonarMap.end()) + { + if ((*it).second == sonar) + { + ArLog::log(ArLog::Verbose, + "Tried to add sonar board %s as number %d but already have that sonar, doing nothing", + sonar->getName(), sonarNumber); + return true; + } + ArLog::log(ArLog::Normal, "ArRobot::addSonar: Tried to add sonar board %s as sonar number %d but there is already a sonar of that number (called %s)", + sonar->getName(), sonarNumber, + (*it).second->getName()); + return false; + } + mySonarMap[sonarNumber] = sonar; + ArLog::log(ArLog::Verbose, + "Added sonar board %s as number %d", + sonar->getName(), sonarNumber); + return true; +} + + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remSonar(ArSonarMTX *sonar) +{ + if (sonar == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobot::remSonar: Passed NULL sonar board to remove"); + return false; + } + std::map::iterator it; + for (it = mySonarMap.begin(); it != mySonarMap.end(); ++it) + { + if ((*it).second == sonar) + { + ArLog::log(ArLog::Normal, + "ArRobot::remSonar: Removing sonar board %s (num %d)", + sonar->getName(), (*it).first); + mySonarMap.erase(it); + return true; + } + } + ArLog::log(ArLog::Normal, + "ArRobot::remSonar: Could not find sonar board %s to remove", + sonar->getName()); + return false; +} + +/** @since 2.7.0 + @internal +*/ +AREXPORT bool ArRobot::remSonar(int sonarNumber) +{ + std::map::iterator it; + if ((it = mySonarMap.find(sonarNumber)) == mySonarMap.end()) + { + ArLog::log(ArLog::Normal, + "ArRobot::remSonar: Could not find sonar board %d to remove", + sonarNumber); + return false; + + } + + ArLog::log(ArLog::Normal, + "ArRobot::remSonar: Removing sonar board %s (num %d) ", + (*it).second->getName(), (*it).first); + + mySonarMap.erase(it); + return true; +} + +/** @since 2.7.0 + @see ArSonarConnector +*/ +AREXPORT const ArSonarMTX *ArRobot::findSonar(int sonarNumber) const +{ + std::map::const_iterator it; + if ((it = mySonarMap.find(sonarNumber)) == mySonarMap.end()) + return NULL; + else + return (*it).second; +} + +/** @since 2.7.0 + @see ArSonarConnector +*/ +AREXPORT ArSonarMTX *ArRobot::findSonar(int sonarNumber) +{ + if (mySonarMap.find(sonarNumber) == mySonarMap.end()) + return NULL; + else + return mySonarMap[sonarNumber]; +} + +/** @since 2.7.0 + @see ArSonarConnector +*/ +AREXPORT const std::map *ArRobot::getSonarMap(void) const +{ + return &mySonarMap; +} + + +/** @since 2.7.0 + @see ArSonarConnector +*/ +AREXPORT std::map *ArRobot::getSonarMap(void) +{ + return &mySonarMap; +} + +/** @since 2.7.0 + @see ArSonarConnector +*/ +AREXPORT bool ArRobot::hasSonar(ArSonarMTX *device) const +{ + for(std::map::const_iterator i = mySonarMap.begin(); + i != mySonarMap.end(); ++i) + { + if( (*i).second == device ) return true; + } + return false; +} + + + +/** + @param from the pose with time to apply the offset from... it applies the encoder mostion from the time on this to the to param + + @param to the time to find the offset to + + @param result the pose to put the result in + + @return This returns the same way that ArInterpolation::getPose does... +@see ArInterpolation::getPose +*/ +AREXPORT int ArRobot::applyEncoderOffset(ArPoseWithTime from, ArTime to, + ArPose *result) +{ + + ArPose encoderPoseFrom; + ArPose globalPoseFrom; + + ArPose encoderPoseTo; + ArPose globalPoseTo; + + int retFrom; + int retTo; + if ((retFrom = getEncoderPoseInterpPosition(from.getTime(), + &encoderPoseFrom)) >= 0) + { + if ((retTo = getEncoderPoseInterpPosition(to, &encoderPoseTo)) >= 0) + { + globalPoseFrom = myEncoderTransform.doTransform(encoderPoseFrom); + globalPoseTo = myEncoderTransform.doTransform(encoderPoseTo); + ArPose offset = globalPoseTo - globalPoseFrom; + ArPose retPose; + retPose = from + offset; + /* + ArLog::log(ArLog::Normal, + "%.0f %.0f %.1f + %.0f %.0f %.1f = %.0f %.0f %.1f (from %d to %d)", + from.getX(), from.getY(), from.getTh(), + offset.getX(), offset.getY(), offset.getTh(), + retPose.getX(), retPose.getY(), retPose.getTh(), + retFrom, retTo); + */ + if (result != NULL) + *result = retPose; + return retTo; + } + else + { + ArLog::log(ArLog::Verbose, + "ArRobot::applyEncoderOffset: Can't find to offset, ret %d", + retTo); + return retTo; + } + } + else + { + ArLog::log(ArLog::Verbose, + "ArRobot::applyEncoderOffset: Can't find from (%d ms ago) offset, ret %d", + retFrom, from.getTime().mSecSince()); + return retFrom; + } + + return -3; +} + +AREXPORT void ArRobot::internalIgnoreNextPacket(void) +{ + myIgnoreNextPacket = true; + myPacketMutex.lock(); + myPacketList.clear(); + myPacketMutex.unlock(); +} diff --git a/Legacy/Aria/src/ArRobotBatteryPacketReader.cpp b/Legacy/Aria/src/ArRobotBatteryPacketReader.cpp new file mode 100644 index 0000000..ebba0fd --- /dev/null +++ b/Legacy/Aria/src/ArRobotBatteryPacketReader.cpp @@ -0,0 +1,122 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArExport.h" +#include "ArRobotBatteryPacketReader.h" +#include "ArRobot.h" +#include "ArRobotPacket.h" +#include "ArCommands.h" + +AREXPORT ArRobotBatteryPacketReader::ArRobotBatteryPacketReader( + ArRobot *robot) : + myPacketHandlerCB(this, &ArRobotBatteryPacketReader::packetHandler), + myConnectCB(this, &ArRobotBatteryPacketReader::connectCallback) +{ + myRobot = robot; + myPacketArrived = false; + myNumBatteries = 0; + myNumBytesPerBattery = 0; + myRequestedBatteryPackets = false; + myPacketHandlerCB.setName("ArRobotBatteryPacketReader"); + myConnectCB.setName("ArRobotBatteryPacketReader"); + myRobot->addPacketHandler(&myPacketHandlerCB); + myRobot->addConnectCB(&myConnectCB); +} + +AREXPORT ArRobotBatteryPacketReader::~ArRobotBatteryPacketReader(void) +{ + myRobot->remPacketHandler(&myPacketHandlerCB); + myRobot->remConnectCB(&myConnectCB); +} + +AREXPORT void ArRobotBatteryPacketReader::connectCallback(void) +{ + requestSinglePacket(); +} + +AREXPORT void ArRobotBatteryPacketReader::requestSinglePacket(void) +{ + myRobot->comInt(ArCommands::BATTERYINFO, 1); + myRequestedBatteryPackets = false; +} + +AREXPORT void ArRobotBatteryPacketReader::requestContinuousPackets(void) +{ + myRobot->comInt(ArCommands::BATTERYINFO, 2); + myRequestedBatteryPackets = true; +} + +AREXPORT void ArRobotBatteryPacketReader::stopPackets(void) +{ + myRobot->comInt(ArCommands::BATTERYINFO, 0); + myRequestedBatteryPackets = false; +} + +AREXPORT bool ArRobotBatteryPacketReader::haveRequestedPackets(void) +{ + return myRequestedBatteryPackets; +} + +AREXPORT bool ArRobotBatteryPacketReader::packetHandler(ArRobotPacket *packet) +{ + char buf[256]; + + if (packet->getID() != 0xfa) + return false; + + myFlags1.clear(); + myFlags2.clear(); + myFlags3.clear(); + myRelSOC.clear(); + myAbsSOC.clear(); + + myNumBatteries = packet->bufToUByte(); + myNumBytesPerBattery = packet->bufToUByte(); + + int battery; + int byte; + int val; + + for (battery = 1; battery <= myNumBatteries; battery++) + { + for (byte = 1; byte <= myNumBytesPerBattery; byte++) + { + val = packet->bufToUByte(); + if (byte == 1) + myFlags1[battery] = val; + else if (byte == 2) + myFlags2[battery] = val; + else if (byte == 3) + myFlags3[battery] = val; + else if (byte == 4) + myRelSOC[battery] = val; + else if (byte == 5) + myAbsSOC[battery] = val; + } + } + myPacketArrived = true; + return true; +} diff --git a/Legacy/Aria/src/ArRobotConfig.cpp b/Legacy/Aria/src/ArRobotConfig.cpp new file mode 100644 index 0000000..54755af --- /dev/null +++ b/Legacy/Aria/src/ArRobotConfig.cpp @@ -0,0 +1,193 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArExport.h" +#include "ArConfig.h" +#include "ArRobotConfig.h" +#include "ArRobot.h" +#include "ArAnalogGyro.h" +#include "ariaInternal.h" + +AREXPORT ArRobotConfig::ArRobotConfig(ArRobot *robot) : + myConnectCB(this, &ArRobotConfig::connectCallback), + myProcessFileCB(this, &ArRobotConfig::processFile) +{ + myRobot = robot; + + myAddedMovementParams = false; + myTransVelMax = 0; + myTransAccel = 0; + myTransDecel = 0; + myRotVelMax = 0; + myRotAccel= 0; + myRotDecel = 0; + + mySavedOriginalMovementParameters = false; + myOriginalTransVelMax = 0; + myOriginalTransAccel = 0; + myOriginalTransDecel = 0; + myOriginalRotVelMax = 0; + myOriginalRotAccel= 0; + myOriginalRotDecel = 0; + + + myAnalogGyro = NULL; + myUseGyro = true; + myAddedGyro = false; + + myConnectCB.setName("ArRobotConfig"); + myProcessFileCB.setName("ArRobotConfig"); + + myRobot->addConnectCB(&myConnectCB, ArListPos::FIRST); + Aria::getConfig()->addProcessFileCB(&myProcessFileCB, 98); + + if (myRobot->isConnected()) + connectCallback(); +} + +AREXPORT ArRobotConfig::~ArRobotConfig() +{ +} + +AREXPORT bool ArRobotConfig::processFile(void) +{ + if (myTransVelMax != 0) + myRobot->setTransVelMax(myTransVelMax); + else + myRobot->setTransVelMax(myOriginalTransVelMax); + + if (myTransAccel != 0) + myRobot->setTransAccel(myTransAccel); + else + myRobot->setTransAccel(myOriginalTransAccel); + + if (myTransDecel != 0) + myRobot->setTransDecel(myTransDecel); + else + myRobot->setTransDecel(myOriginalTransDecel); + + if (myRotVelMax != 0) + myRobot->setRotVelMax(myRotVelMax); + else + myRobot->setRotVelMax(myOriginalRotVelMax); + + if (myRotAccel!= 0) + myRobot->setRotAccel(myRotAccel); + else + myRobot->setRotAccel(myOriginalRotAccel); + + if (myRotDecel != 0) + myRobot->setRotDecel(myRotDecel); + else + myRobot->setRotDecel(myOriginalRotDecel); + + if (myAnalogGyro != NULL && myAddedGyro) + { + if (myUseGyro && !myAnalogGyro->isActive()) + { + ArLog::log(ArLog::Normal, "Gyro(analog) activated"); + myAnalogGyro->activate(); + } + else if (!myUseGyro && myAnalogGyro->isActive()) + { + ArLog::log(ArLog::Normal, "Gyro(analog) deactivated"); + myAnalogGyro->deactivate(); + } + } + + return true; +} + +AREXPORT void ArRobotConfig::addAnalogGyro(ArAnalogGyro *gyro) +{ + myAnalogGyro = gyro; + if (myRobot->isConnected()) + connectCallback(); +} + +AREXPORT void ArRobotConfig::connectCallback(void) +{ + std::string section; + section = "Robot config"; + + if (!mySavedOriginalMovementParameters) + { + mySavedOriginalMovementParameters = true; + myOriginalTransVelMax = ArMath::roundInt(myRobot->getTransVelMax()); + myOriginalTransAccel = ArMath::roundInt(myRobot->getTransAccel()); + myOriginalTransDecel = ArMath::roundInt(myRobot->getTransDecel()); + myOriginalRotVelMax = ArMath::roundInt(myRobot->getRotVelMax()); + myOriginalRotAccel = ArMath::roundInt(myRobot->getRotAccel()); + myOriginalRotDecel = ArMath::roundInt(myRobot->getRotDecel()); + } + + if (!myAddedMovementParams) + { + myAddedMovementParams = true; + Aria::getConfig()->addParam( + ArConfigArg("TransVelMax", &myTransVelMax, + "maximum translational speed (mm/sec) (0 means use original value)", + 0, (int)myRobot->getAbsoluteMaxTransVel()), + section.c_str(), ArPriority::TRIVIAL); + Aria::getConfig()->addParam( + ArConfigArg("TransAccel", &myTransAccel, + "translational acceleration (mm/sec/sec) (0 means use original value)", + 0, (int)myRobot->getAbsoluteMaxTransAccel()), + section.c_str(), ArPriority::TRIVIAL); + Aria::getConfig()->addParam( + ArConfigArg("TransDecel", &myTransDecel, + "translational deceleration (mm/sec/sec) (0 means use original value)", + 0, (int)myRobot->getAbsoluteMaxTransDecel()), + section.c_str(), ArPriority::TRIVIAL); + Aria::getConfig()->addParam( + ArConfigArg("RotVelMax", &myRotVelMax, + "maximum rotational speed (deg/sec) (0 means use original value)", + 0, (int)myRobot->getAbsoluteMaxRotVel()), + section.c_str(), ArPriority::TRIVIAL); + Aria::getConfig()->addParam( + ArConfigArg("RotAccel", &myRotAccel, + "rotational acceleration (deg/sec/sec) (0 means use original value)", + 0, (int)myRobot->getAbsoluteMaxRotAccel()), + section.c_str(), ArPriority::TRIVIAL); + Aria::getConfig()->addParam( + ArConfigArg("RotDecel", &myRotDecel, + "rotational deceleration (deg/sec/sec) (0 means use original value)", + 0, (int)myRobot->getAbsoluteMaxRotDecel()), + section.c_str(), ArPriority::TRIVIAL); + } + + if (myAnalogGyro != NULL && !myAddedGyro && + myAnalogGyro->haveGottenData()) + { + myAddedGyro = true; + Aria::getConfig()->addParam( + ArConfigArg("UseGyro", &myUseGyro, + "True to use the gyro, false not to"), + section.c_str(), ArPriority::TRIVIAL); + + } + +} diff --git a/Legacy/Aria/src/ArRobotConfigPacketReader.cpp b/Legacy/Aria/src/ArRobotConfigPacketReader.cpp new file mode 100644 index 0000000..9a06414 --- /dev/null +++ b/Legacy/Aria/src/ArRobotConfigPacketReader.cpp @@ -0,0 +1,361 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArExport.h" +#include "ArRobotConfigPacketReader.h" +#include "ArRobot.h" +#include "ArRobotPacket.h" +#include "ArCommands.h" + +/** + @param robot is the robot to connect this to + + @param onlyOneRequest if this is true then only one request for a + packet will ever be honored (so that you can save the settings from + one point in time) + + @param packetArrivedCB a functor to call when the packet comes in, + note the robot is locked during this callback + **/ +AREXPORT ArRobotConfigPacketReader::ArRobotConfigPacketReader( + ArRobot *robot, bool onlyOneRequest, ArFunctor *packetArrivedCB) : + myPacketHandlerCB(this, &ArRobotConfigPacketReader::packetHandler), + myConnectedCB(this, &ArRobotConfigPacketReader::connected) +{ + myRobot = robot; + myPacketHandlerCB.setName("ArRobotConfigPacketReader"); + myRobot->addPacketHandler(&myPacketHandlerCB); + myRobot->addConnectCB(&myConnectedCB); + myOnlyOneRequest = onlyOneRequest; + myPacketRequested = false; + myPacketArrived = false; + myPacketArrivedCB = packetArrivedCB; +} + +AREXPORT ArRobotConfigPacketReader::~ArRobotConfigPacketReader(void) +{ + myRobot->remPacketHandler(&myPacketHandlerCB); + myRobot->remConnectCB(&myConnectedCB); +} + +AREXPORT bool ArRobotConfigPacketReader::requestPacket(void) +{ + // make sure we haven't already gotten one + if (myOnlyOneRequest && myPacketArrived) + return false; + + if (myPacketRequested && myLastPacketRequest.mSecSince() < 200) + return true; + + myPacketArrived = false; + myPacketRequested = true; + myLastPacketRequest.setToNow(); + myRobot->comInt(ArCommands::CONFIG, 1); + return true; +} + +AREXPORT void ArRobotConfigPacketReader::connected(void) +{ + if (myPacketRequested) + myRobot->comInt(ArCommands::CONFIG, 1); +} + +AREXPORT bool ArRobotConfigPacketReader::packetHandler(ArRobotPacket *packet) +{ + char buf[256]; + + // if this isn't the right packet ignore it + if (packet->getID() != 0x20) + return false; + // if we've already gotten our one request ignore it + if (myPacketArrived) + return false; + // if we haven't requested a packet ignore it + if (!myPacketRequested) + return false; + + myPacketRequested = false; + myPacketArrived = true; + + //make a copy of all the packet + myPacket = (*packet); + + // read in all the data + packet->bufToStr(buf, sizeof(buf)); + myType = buf; + packet->bufToStr(buf, sizeof(buf)); + mySubType = buf; + packet->bufToStr(buf, sizeof(buf)); + mySerialNumber = buf; + packet->bufToUByte(); + myRotVelTop = packet->bufToUByte2(); + myTransVelTop = packet->bufToUByte2(); + myRotAccelTop = packet->bufToUByte2(); + myTransAccelTop = packet->bufToUByte2(); + myPwmMax = packet->bufToUByte2(); + packet->bufToStr(buf, sizeof(buf)); + myName = buf; + mySipCycleTime = packet->bufToUByte(); + myHostBaud = packet->bufToUByte(); + myAux1Baud = packet->bufToUByte(); + myHasGripper = (bool)packet->bufToUByte2(); + myFrontSonar = (bool) packet->bufToUByte2(); + myRearSonar = (bool) packet->bufToUByte(); + myLowBattery = packet->bufToUByte2(); + myRevCount = packet->bufToUByte2(); + myWatchdog = packet->bufToUByte2(); + myNormalMPacs = (bool) packet->bufToUByte(); + myStallVal = packet->bufToUByte2(); + myStallCount = packet->bufToUByte2(); + myJoyVel = packet->bufToUByte2(); + myJoyRotVel = packet->bufToUByte2(); + myRotVelMax = packet->bufToUByte2(); + myTransVelMax = packet->bufToUByte2(); + myRotAccel = packet->bufToUByte2(); + myRotDecel = packet->bufToUByte2(); + myRotKP = packet->bufToUByte2(); + myRotKV = packet->bufToUByte2(); + myRotKI = packet->bufToUByte2(); + myTransAccel = packet->bufToUByte2(); + myTransDecel = packet->bufToUByte2(); + myTransKP = packet->bufToUByte2(); + myTransKV = packet->bufToUByte2(); + myTransKI = packet->bufToUByte2(); + myFrontBumps = packet->bufToUByte(); + myRearBumps = packet->bufToUByte(); + myHasCharger = packet->bufToUByte(); + mySonarCycle = packet->bufToUByte(); + if (packet->bufToUByte() == 2) + myResetBaud = true; + else + myResetBaud = false; + myGyroType = packet->bufToUByte(); + if (myGyroType == 1) + myHasGyro = true; + else + myHasGyro = false; + myDriftFactor = packet->bufToByte2(); + myAux2Baud = packet->bufToUByte(); + myAux3Baud = packet->bufToUByte(); + myTicksMM = packet->bufToUByte2(); + myShutdownVoltage = packet->bufToUByte2(); + + packet->bufToStr(buf, sizeof(buf)); + myFirmwareVersion = buf; + myGyroCW = packet->bufToUByte2(); + myGyroCCW = packet->bufToUByte2(); + + myKinematicsDelay = packet->bufToUByte(); + myLatVelTop = packet->bufToUByte2(); + myLatAccelTop = packet->bufToUByte2(); + myLatVelMax = packet->bufToUByte2(); + myLatAccel = packet->bufToUByte2(); + myLatDecel = packet->bufToUByte2(); + myPowerbotChargeThreshold = packet->bufToUByte2(); + myPDBPort = packet->bufToUByte(); + myGyroRateLimit = packet->bufToUByte2(); + if (packet->getDataLength() - packet->getDataReadLength() > 0) + myHighTemperatureShutdown = packet->bufToByte(); + else + myHighTemperatureShutdown = -128; + myPowerBits = packet->bufToUByte2(); + myBatteryType = packet->bufToUByte(); + myStateOfChargeLow = packet->bufToUByte2(); + myStateOfChargeShutdown = packet->bufToUByte2(); + + if (myPacketArrivedCB != NULL) + { + myPacketArrivedCB->invoke(); + } + return true; +} + +AREXPORT void ArRobotConfigPacketReader::log(void) const +{ + std::string str; + str = buildString(); + ArLog::log(ArLog::Terse, str.c_str()); +} + +AREXPORT void ArRobotConfigPacketReader::logMovement(void) const +{ + std::string str; + str = buildStringMovement(); + ArLog::log(ArLog::Terse, str.c_str()); +} + +/** + Like most memory stuff this won't work across DLL's in windows, + it should work fine in linux or with static library files in windows. +**/ +AREXPORT std::string ArRobotConfigPacketReader::buildString(void) const +{ + std::string ret; + + char line[32000]; + sprintf(line, "General information:\n"); + ret += line; + sprintf(line, "Robot is type '%s' subtype '%s'\n", + getType(), getSubType()); + ret += line; + sprintf(line, "serial number '%s' name '%s'\n", + getSerialNumber(), getName()); + ret += line; + sprintf(line, "firmware version '%s'\n", + getFirmwareVersion()); + ret += line; + sprintf(line, "Intrinsic properties and unsettable maxes:\n"); + ret += line; + sprintf(line, "TransVelTop %d TransAccelTop %d\n", + getTransVelTop(), getTransAccelTop()); + ret += line; + sprintf(line, "RotVelTop %d RotAccelTop %d\n", + getRotVelTop(), getRotAccelTop()); + ret += line; + if (myRobot->hasLatVel()) + { + sprintf(line, "LatVelTop %d LatAccelTop %d\n", + getLatVelTop(), getLatAccelTop()); + ret += line; + } + sprintf(line, "PWMMax %d ResetBaud %s\n", getPwmMax(), + ArUtil::convertBool(getResetBaud())); + ret += line; + sprintf(line, "Current values:\n"); + ret += line; + sprintf(line, "TransVelMax %d TransAccel %d TransDecel %d\n", + getTransVelMax(), getTransAccel(), getTransDecel()); + ret += line; + sprintf(line, "RotVelMax %d RotAccel %d RotDecel %d\n", + getRotVelMax(), getRotAccel(), getRotDecel()); + ret += line; + if (myRobot->hasLatVel()) + { + sprintf(line, "LatVelMax %d LatAccel %d LatDecel %d\n", + getLatVelMax(), getLatAccel(), getLatDecel()); + ret += line; + } + sprintf(line, "Accessories:\n"); + ret += line; + sprintf(line, + "Gripper %s FrontSonar %s RearSonar %s Charger %d GyroType %d\n", + ArUtil::convertBool(getHasGripper()), + ArUtil::convertBool(getFrontSonar()), + ArUtil::convertBool(getRearSonar()), + getHasCharger(), + getGyroType()); + ret += line; + sprintf(line, "FrontBumps %d RearBumps %d\n", + getFrontBumps(), getRearBumps()); + ret += line; + sprintf(line, "Settings:\n"); + ret += line; + sprintf(line, "SipCycle %d SonarCycle %d HostBaud %d Aux1Baud %d\n", getSipCycleTime(), getSonarCycle(), getHostBaud(), getAux1Baud()); + ret += line; + sprintf(line, "StallVal %d StallCount %d RevCount %d Watchdog %d\n", + getStallVal(), getStallCount(), getRevCount(), getWatchdog()); + ret += line; + sprintf(line, "GyroRateLimit %d\n", + getGyroRateLimit()); + ret += line; + sprintf(line, "JoyVel %d JoyRVel %d NormalMotorPackets %s\n", getJoyVel(), getJoyRotVel(), ArUtil::convertBool(getNormalMPacs())); + ret += line; + sprintf(line, "PID Settings:\n"); + ret += line; + sprintf(line, "Trans kp %d kv %d ki %d\n", getTransKP(), + getTransKV(), getTransKI()); + ret += line; + sprintf(line, "Rot kp %d kv %d ki %d\n", getRotKP(), getRotKV(), + getRotKI()); + ret += line; + sprintf(line, "Other:\n"); + ret += line; + sprintf(line, "DriftFactor %d KinematicsDelay %d\n", getDriftFactor(), + getKinematicsDelay()); + ret += line; + sprintf(line, "Aux2Baud setting %d Aux3Baud setting %d\n", getAux2Baud(), getAux3Baud()); + ret += line; + sprintf(line, "PDBPort setting %d BatteryType %d\n", getPDBPort(), + getBatteryType()); + ret += line; + sprintf(line, "TicksMM %d GyroCW %d GyroCCW %d\n", getTicksMM(), + getGyroCW(), getGyroCCW()); + ret += line; + sprintf(line, + "LowBattery %d ShutdownVoltage %d PowerbotChargeThreshold %d\n", + getLowBattery(), getShutdownVoltage(), getPowerbotChargeThreshold()); + ret += line; + sprintf(line, + "LowStateOfCharge %d ShutdownStateOfCharge %d\n", + getStateOfChargeLow(), getStateOfChargeShutdown()); + ret += line; + + char buf[128]; + int i, j; + unsigned int value = getPowerBits(); + int bit; + buf[0] = '\0'; + for (j = 0, bit = 1; j < 16; ++j, bit *= 2) + { + if (j == 8) + sprintf(buf, "%s ", buf); + if (value & bit) + sprintf(buf, "%s%d", buf, 1); + else + sprintf(buf, "%s%d", buf, 0); + } + + sprintf(line, "HighTempShutdown %d PowerBits %s\n", + getHighTemperatureShutdown(), buf); + ret += line; + + return ret; +} + + +/** + Like most memory stuff this won't work across DLL's in windows, + it should work fine in linux or with static library files in windows. +**/ +AREXPORT std::string ArRobotConfigPacketReader::buildStringMovement(void) const +{ + std::string ret; + + char line[32000]; + sprintf(line, "TransVelMax %d TransAccel %d TransDecel %d\n", + getTransVelMax(), getTransAccel(), getTransDecel()); + ret += line; + sprintf(line, "RotVelMax %d RotAccel %d RotDecel %d\n", + getRotVelMax(), getRotAccel(), getRotDecel()); + ret += line; + if (myRobot->hasLatVel()) + { + sprintf(line, "LatVelMax %d LatAccel %d LatDecel %d\n", + getLatVelMax(), getLatAccel(), getLatDecel()); + ret += line; + } + return ret; +} diff --git a/Legacy/Aria/src/ArRobotConnector.cpp b/Legacy/Aria/src/ArRobotConnector.cpp new file mode 100644 index 0000000..aeb59c5 --- /dev/null +++ b/Legacy/Aria/src/ArRobotConnector.cpp @@ -0,0 +1,508 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobotConnector.h" +#include "ArRobot.h" +#include "ArSick.h" +#include "ariaInternal.h" +#include "ArCommands.h" +#include "ArSonarConnector.h" +#include "ArBatteryConnector.h" +//#include "ArLCDConnector.h" + + +/** @warning do not delete @a parser during the lifetime of this + * ArRobotConnector, which may need to access its contents later. + + * @param parser argument parser object (see parseArgs() for list of command + * line arguments recognized) + * @param robot ArRobot object to connect to the robot + * @param autoParseArgs if true (default), trigger argument parsing before + * connection if not already done. (normally, a program will call + * Aria::parseArgs() to trigger argument parsing for all created objects. + * @param connectAllComponents if true (default), then connect to all robot + * components. If false, then your program may need to create additional + * connector objects for + * components such as sonar and battery. (MTX-series robots have separate + * connections to components such as battery, sonar, etc. Other robots do + * not require this.) + */ +AREXPORT ArRobotConnector::ArRobotConnector( + ArArgumentParser *parser, ArRobot *robot, bool autoParseArgs, bool +connectAllComponents) : + myParseArgsCB(this, &ArRobotConnector::parseArgs), + myLogOptionsCB(this, &ArRobotConnector::logOptions), + myBatteryConnector(NULL), +// myLCDConnector(NULL), + mySonarConnector(NULL) +{ + myParser = parser; + myOwnParser = false; + myRobot = robot; + myAutoParseArgs = autoParseArgs; + myHaveParsedArgs = false; + myConnectAllComponents = connectAllComponents; + + myParseArgsCB.setName("ArRobotConnector"); + Aria::addParseArgsCB(&myParseArgsCB, 75); + myLogOptionsCB.setName("ArRobotConnector"); + Aria::addLogOptionsCB(&myLogOptionsCB, 90); + + myRemoteHost = NULL; + myRobotPort = NULL; + myRemoteRobotTcpPort = 8101; + myRobotBaud = 9600; + myRemoteIsSim = false; + myRemoteIsNotSim = false; + myRobotLogPacketsReceived = false; + myRobotLogPacketsSent = false; + myRobotLogMovementReceived = false; + myRobotLogMovementSent = false; + myRobotLogVelocitiesReceived = false; + myRobotLogActions = false; + + if(myConnectAllComponents) + { + myBatteryConnector = new ArBatteryConnector(myParser, myRobot, this); +// myLCDConnector = new ArLCDConnector(myParser, myRobot, this); + mySonarConnector = new ArSonarConnector(myParser, myRobot, this); + } +} + +AREXPORT ArRobotConnector::~ArRobotConnector(void) +{ + if(myBatteryConnector) + delete myBatteryConnector; +// if(myLCDConnector) +// delete myLCDConnector; + if(mySonarConnector) + delete mySonarConnector; +} + +/** + * Parse command line arguments using the ArArgumentParser given in the ArRobotConnector constructor. + * + * See parseArgs(ArArgumentParser*) for details about argument parsing. + * + @return true if the arguments were parsed successfully false if not + **/ + +AREXPORT bool ArRobotConnector::parseArgs(void) +{ + return parseArgs(myParser); +} + +/** + * Parse command line arguments for ArRobotConnector held by the given ArArgumentParser. + * Normally called via global Aria::parseArgs() method. + * + @return true if the arguments were parsed successfully false if not + + The following arguments are used for the robot connection: + +
+
-robotPort port
+
-rp port
+
Use the given serial port device name for a serial port connection (e.g. COM1, or /dev/ttyS0 if on Linux.) + The default is the first serial port, or COM1, which is the typical Pioneer setup. +
+ +
-remoteHost hostname
+
-rh hostname
+
Use a TCP connection to a remote computer with the given network host name instead of a serial port connection
+ +
-remoteRobotTcpPort port
+
-rrtp port
+
Use the given TCP port number if connecting to a remote robot using TCP due to -remoteHost having been given.
+ +
-remoteIsSim
+
-ris
+
The remote TCP robot given by -remoteHost or -rh is actually a simulator. Use any alternative + behavior intended for the simulator (e.g. tell the laser device object to request laser data from the simulator rather + than trying to connect to a real laser device on the local computer)
+ +
-remoteIsNotSim
+
-rins
+
The remote TCP robot given by -remoteHost or + -rh (or their defaults) is actually a simulator but + DO NOT treat it like one. Use any the default robot behavior, instead of the simulator behavior (ie open a real laser device for the laser type given and try and talk to it over it's actual local port or remote port if given)
+ +
-robotBaud baudrate
+
-rb baudrate
+
Use the given baud rate when connecting over a serial port, instead of trying to use the normal rate.
+
+ + **/ + +AREXPORT bool ArRobotConnector::parseArgs(ArArgumentParser *parser) +{ + myHaveParsedArgs = true; + + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue(true); + + if (parser->checkArgument("-remoteIsSim") || + parser->checkArgument("-ris")) + myRemoteIsSim = true; + + if (parser->checkArgument("-remoteIsNotSim") || + parser->checkArgument("-rins")) + myRemoteIsNotSim = true; + + if (parser->checkArgument("-robotLogPacketsReceived") || + parser->checkArgument("-rlpr")) + + myRobotLogPacketsReceived = true; + + if (parser->checkArgument("-robotLogPacketsSent") || + parser->checkArgument("-rlps")) + myRobotLogPacketsSent = true; + + if (parser->checkArgument("-robotLogMovementReceived") || + parser->checkArgument("-rlmr")) + myRobotLogMovementReceived = true; + + if (parser->checkArgument("-robotLogMovementSent") || + parser->checkArgument("-rlms")) + + myRobotLogMovementSent = true; + + if (parser->checkArgument("-robotLogVelocitiesReceived") || + parser->checkArgument("-rlvr")) + + myRobotLogVelocitiesReceived = true; + + if (parser->checkArgument("-robotLogActions") || + parser->checkArgument("-rla")) + myRobotLogActions = true; + + if (!parser->checkParameterArgumentString("-remoteHost", + &myRemoteHost) || + !parser->checkParameterArgumentString("-rh", + &myRemoteHost) || + + !parser->checkParameterArgumentString("-robotPort", + &myRobotPort) || + !parser->checkParameterArgumentString("-rp", + &myRobotPort) || + + !parser->checkParameterArgumentInteger("-remoteRobotTcpPort", + &myRemoteRobotTcpPort) || + !parser->checkParameterArgumentInteger("-rrtp", + &myRemoteRobotTcpPort) || + + !parser->checkParameterArgumentInteger("-robotBaud", + &myRobotBaud) || + !parser->checkParameterArgumentInteger("-rb", + &myRobotBaud)) + { + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return false; + } + + parser->setWasReallySetOnlyTrue(wasReallySetOnlyTrue); + return true; +} + +/** Normally called by Aria::logOptions(). */ +AREXPORT void ArRobotConnector::logOptions(void) const +{ + ArLog::log(ArLog::Terse, "Options for ArRobotConnector (see docs for more details):"); + ArLog::log(ArLog::Terse, ""); + + ArLog::log(ArLog::Terse, "Robot options:"); + ArLog::log(ArLog::Terse, "-remoteHost "); + ArLog::log(ArLog::Terse, "-rh "); + ArLog::log(ArLog::Terse, "-robotPort "); + ArLog::log(ArLog::Terse, "-rp "); + ArLog::log(ArLog::Terse, "-robotBaud "); + ArLog::log(ArLog::Terse, "-rb "); + ArLog::log(ArLog::Terse, "-remoteRobotTcpPort "); + ArLog::log(ArLog::Terse, "-rrtp "); + ArLog::log(ArLog::Terse, "-remoteIsSim"); + ArLog::log(ArLog::Terse, "-ris"); + ArLog::log(ArLog::Terse, "-remoteIsNotSim"); + ArLog::log(ArLog::Terse, "-rins"); + ArLog::log(ArLog::Terse, "-robotLogPacketsReceived"); + ArLog::log(ArLog::Terse, "-rlpr"); + ArLog::log(ArLog::Terse, "-robotLogPacketsSent"); + ArLog::log(ArLog::Terse, "-rlps"); + ArLog::log(ArLog::Terse, "-robotLogMovementReceived"); + ArLog::log(ArLog::Terse, "-rlmr"); + ArLog::log(ArLog::Terse, "-robotLogMovementSent"); + ArLog::log(ArLog::Terse, "-rlms"); + ArLog::log(ArLog::Terse, "-robotLogVelocitiesReceived"); + ArLog::log(ArLog::Terse, "-rlvr"); + ArLog::log(ArLog::Terse, "-robotLogActions"); + ArLog::log(ArLog::Terse, "-rla"); +} + +/** + * This method is normally used internally by connectRobot(), but you may + * use it if you wish. + * + * If -remoteHost was given, then open that TCP port. If it was not given, + * then try to open a TCP port to the simulator on localhost. + * If that fails, then use a local serial port connection. + * Sets the given ArRobot's device connection pointer to this object. + * Sets up internal settings determined by command line arguments such + * as serial port and baud rate, etc. + * + * After calling this function (and it returns true), then you may connect + * ArRobot to the robot using ArRobot::blockingConnect() (or similar). + * + * @return false if -remoteHost was given and there was an error connecting to + * the remote host, true otherwise. + **/ +AREXPORT bool ArRobotConnector::setupRobot(void) +{ + return setupRobot(myRobot); +} + +/** + * @deprecated + * + * This method is normally used internally by connectRobot(), but you may + * use it if you wish. + * + * If -remoteHost was given, then open that TCP port. If it was not given, + * then try to open a TCP port to the simulator on localhost. + * If that fails, then use a local serial port connection. + * Sets the given ArRobot's device connection pointer to this object. + * Sets up internal settings determined by command line arguments such + * as serial port and baud rate, etc. + * + * After calling this function (and it returns true), then you may connect + * ArRobot to the robot using ArRobot::blockingConnect() (or similar). + * + * @return false if -remoteHost was given and there was an error connecting to + * the remote host, true otherwise. + **/ +AREXPORT bool ArRobotConnector::setupRobot(ArRobot *robot) +{ + if (myRobot == NULL) + myRobot = robot; + + if (myRobot == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobotConnector::setupRobot: NULL robot, cannot setup robot"); + return false; + } + + if (myAutoParseArgs) + { + parseArgs(); + } + else if (!myHaveParsedArgs) + { + ArLog::log(ArLog::Normal, "ArRobotConnector: Args not parsed and are not autoparsed, so connection may fail and command line arguments won't be used"); + } + + // set up all that logging + if (myRobotLogPacketsReceived) + robot->setPacketsReceivedTracking(true); + if (myRobotLogPacketsSent) + robot->setPacketsSentTracking(true); + if (myRobotLogMovementReceived) + robot->setLogMovementReceived(true); + if (myRobotLogMovementSent) + robot->setLogMovementSent(true); + if (myRobotLogVelocitiesReceived) + robot->setLogVelocitiesReceived(true); + if (myRobotLogActions) + robot->setLogActions(true); + + if (myRobot->getDeviceConnection() != NULL) + { + ArLog::log(ArLog::Normal, + "ArRobotConnector::setupRobot: robot already has device connection, will not setup robot"); + return true; + } + + // We see if we can open the tcp connection, if we can we'll assume + // we're connecting to the sim, and just go on... if we can't open + // the tcp it means the sim isn't there, so just try the robot + + // see if we're doing remote host or not + if (myRemoteHost != NULL) + myRobotTcpConn.setPort(myRemoteHost, myRemoteRobotTcpPort); + else + myRobotTcpConn.setPort("localhost", myRemoteRobotTcpPort); + + // see if we can get to the simulator (true is success) + if (myRobotTcpConn.openSimple()) + { + robot->setDeviceConnection(&myRobotTcpConn); + // we could get to the sim, so set the robots device connection to the sim + if (myRemoteHost != NULL) + { + ArLog::log(ArLog::Normal, "Connected to remote host %s through tcp.\n", + myRemoteHost); + if (myRemoteIsSim) + myUsingSim = true; + else + myUsingSim = false; + } + else + { + ArLog::log(ArLog::Normal, "Connecting to simulator through tcp.\n"); + myUsingSim = true; + } + } + else + { + // if we were trying for a remote host and it failed, just exit + if (myRemoteHost != NULL) + { + ArLog::log(ArLog::Terse, "Could not connect robot to remote host %s, port %d.\n", myRemoteHost, myRemoteRobotTcpPort); + return false; + } + // we couldn't get to the sim, so set the port on the serial + // connection and then set the serial connection as the robots + // device + + myRobotSerConn.setPort(myRobotPort); + myRobotSerConn.setBaud(myRobotBaud); + ArLog::log(ArLog::Normal, + "Could not connect to simulator, connecting to robot through serial port %s.", + myRobotSerConn.getPort()); + robot->setDeviceConnection(&myRobotSerConn); + myUsingSim = false; + } + return true; +} + +/** Prepares the given ArRobot object for connection, then begins + * a blocking connection attempt. + * If you wish to simply prepare the ArRobot object, but not begin + * the connection, then use setupRobot(). + */ +AREXPORT bool ArRobotConnector::connectRobot(void) +{ + if(! connectRobot(myRobot) ) + return false; + + myRobot->comInt(ArCommands::JOYINFO, 0); // make sure we start with Joystick packets disabled (Pioneer starts with them disabled, but MTX starts with them enabled, even if program doesn't request them) + + if(myConnectAllComponents) + { + if(getRemoteIsSim() ) + { + ArLog::log(ArLog::Normal, "ArRobotConnector: Connected to simulator, not connecting to additional hardware components."); + } + else + { + + if(myBatteryConnector) + { + ArLog::log(ArLog::Normal, "ArRobotConnector: Connecting to MTX batteries (if neccesary)..."); + if(!myBatteryConnector->connectBatteries()) + { + ArLog::log(ArLog::Terse, "ArRobotConnector: Error: Could not connect to robot batteries."); + return false; + } + } + +/* + if(myLCDConnector) + { + ArLog::log(ArLog::Normal, "ArRobotConnector: Connecting to MTX LCD (if neccesary)..."); + if(!myLCDConnector->connectLCDs()) + { + ArLog::log(ArLog::Terse, "ArRobotConnector: Error: Could not connect to robot LCD interface."); + return false; + } + } +*/ + + if(mySonarConnector) + { + ArLog::log(ArLog::Normal, "ArRobotConnector: Connecting to MTX sonar (if neccesary)..."); + if(!mySonarConnector->connectSonars()) + { + ArLog::log(ArLog::Terse, "ArRobotConnector: Error: Could not connect to sonar(s)."); + return false; + } + + } + } + } + + return true; +} + +/** Prepares the given ArRobot object for connection, then begins + * a blocking connection attempt. + * If you wish to simply prepare the ArRobot object, but not begin + * the connection, then use setupRobot(). + */ +AREXPORT bool ArRobotConnector::connectRobot(ArRobot *robot) +{ + if (!setupRobot(robot)) + return false; + else + return robot->blockingConnect(); +} + +AREXPORT const char *ArRobotConnector::getRemoteHost(void) const +{ + return myRemoteHost; +} + + +AREXPORT bool ArRobotConnector::getRemoteIsSim(void) const +{ + if (myRemoteIsSim) + return true; + else if (myRemoteIsNotSim) + return false; + else if (myRobot != NULL && + strcasecmp(myRobot->getRobotName(), "MobileSim") == 0) + return true; + else + return false; +} + +AREXPORT void ArRobotConnector::setRemoteIsSim(bool remoteIsSim) +{ + if (remoteIsSim) + { + myRemoteIsSim = true; + myRemoteIsNotSim = false; + } + else + { + myRemoteIsSim = false; + myRemoteIsNotSim = true; + } +} + +AREXPORT ArRobot *ArRobotConnector::getRobot(void) +{ + return myRobot; +} diff --git a/Legacy/Aria/src/ArRobotJoyHandler.cpp b/Legacy/Aria/src/ArRobotJoyHandler.cpp new file mode 100644 index 0000000..727385c --- /dev/null +++ b/Legacy/Aria/src/ArRobotJoyHandler.cpp @@ -0,0 +1,172 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobotJoyHandler.h" +#include "ArRobot.h" +#include "ArCommands.h" + +AREXPORT ArRobotJoyHandler::ArRobotJoyHandler(ArRobot *robot) : + myHandleJoystickPacketCB(this, &ArRobotJoyHandler::handleJoystickPacket), + myConnectCB(this, &ArRobotJoyHandler::connectCallback) +{ + myRobot = robot; + + myHandleJoystickPacketCB.setName("ArRobotJoyHandler"); + myRobot->addConnectCB(&myConnectCB); + myRobot->addPacketHandler(&myHandleJoystickPacketCB, ArListPos::FIRST); + if (myRobot->isConnected()) + connectCallback(); + + myStarted.setToNow(); + myButton1 = 0; + myButton2 = 0; + myJoyX = 0; + myJoyY = 0; + + myJoyXCenter = 512.0; + myJoyYCenter = 512.0; + + myRawX = -1; + myRawX = -1; + myRawX = -1; + + myThrottle = 1; + myGotData = false; +} + +AREXPORT ArRobotJoyHandler::~ArRobotJoyHandler() +{ + myRobot->remConnectCB(&myConnectCB); + myRobot->remPacketHandler(&myHandleJoystickPacketCB); +} + + +AREXPORT void ArRobotJoyHandler::connectCallback(void) +{ + myRobot->comInt(ArCommands::JOYINFO, 2); +} + +AREXPORT bool ArRobotJoyHandler::handleJoystickPacket(ArRobotPacket *packet) +{ + + if (packet->getID() != 0xF8) + return false; + + myDataReceived.setToNow(); + + if (packet->bufToUByte() != 0) + myButton1 = true; + else + myButton1 = false; + + if (packet->bufToUByte() != 0) + myButton2 = true; + else + myButton2 = false; + + myRawX = packet->bufToUByte2(); + myRawY = packet->bufToUByte2(); + myRawThrottle = packet->bufToUByte2(); + + // these should vary between 1 and -1 + if (myJoyXCenter > 511.9 && myJoyXCenter < 512.1) + { + myJoyX = -((double)myRawX - 512.0) / 512.0; + } + else + { + if (myRawX > myJoyXCenter) + { + myJoyX = -(myRawX - myJoyXCenter) / (double)(1024 - myJoyXCenter); + } + else if (myRawX < myJoyXCenter) + { + myJoyX = -(myRawX - myJoyXCenter) / (double)(myJoyXCenter); + } + } + + if (myJoyYCenter > 511.9 && myJoyYCenter < 512.1) + { + myJoyY = ((double)myRawY - 512.0) / 512.0; + } + else + { + if (myRawY > myJoyYCenter) + { + myJoyY = (myRawY - myJoyYCenter) / (double)(1024 - myJoyYCenter); + } + else if (myRawY < myJoyYCenter) + { + myJoyY = (myRawY - myJoyYCenter) / (double)(myJoyYCenter); + } + } + + // these should vary between 1 and 0 + myThrottle = (double)myRawThrottle / 1024.0; + + //%10d.%03d ago + //myStarted.secSince(), myStarted.mSecSince() % 1000, + /* + ArLog::log(ArLog::Normal, + "%6.3f %6.3f %5.3f %d %d raw %4d %4d %4d center %4d %4d", + myJoyX, myJoyY, myThrottle, myButton1, myButton2, + myRawX, myRawY, myRawThrottle, myJoyXCenter, myJoyYCenter); + */ + // printf("%d %d %g %g %g\n", myButton1, myButton2, myJoyX, myJoyY, myThrottle); + if (!myGotData) + { + ArLog::log(ArLog::Verbose, "Received joystick information from the robot"); + myGotData = true; + } + return true; +} + +AREXPORT void ArRobotJoyHandler::getDoubles(double *x, double *y, double *z) +{ + if (x != NULL) + *x = myJoyX; + if (y != NULL) + *y = myJoyY; + if (z != NULL) + *z = myThrottle; +} + +AREXPORT void ArRobotJoyHandler::addToConfig(ArConfig *config, + const char *section) +{ + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); + config->addParam( + ArConfigArg("JoyXCenter", &myJoyXCenter, + "The X center", 0.0, 1024.0), + section, ArPriority::NORMAL); + + config->addParam( + ArConfigArg("JoyYCenter", &myJoyYCenter, + "The Y center", 0.0, 1024.0), + section, ArPriority::NORMAL); + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), section, ArPriority::NORMAL); +} diff --git a/Legacy/Aria/src/ArRobotPacket.cpp b/Legacy/Aria/src/ArRobotPacket.cpp new file mode 100644 index 0000000..202392a --- /dev/null +++ b/Legacy/Aria/src/ArRobotPacket.cpp @@ -0,0 +1,184 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobotPacket.h" +#include "stdio.h" + +/** + @param sync1 first byte of the header of this packet, this should be left as + the default in nearly all cases, ie don't mess with it + @param sync2 second byte of the header of this packet, this should be left + as the default in nearly all cases, ie don't mess with it + */ +AREXPORT ArRobotPacket::ArRobotPacket(unsigned char sync1, + unsigned char sync2) : + ArBasePacket(265, 4, NULL, 2) +{ + mySync1 = sync1; + mySync2 = sync2; +} + +AREXPORT ArRobotPacket::~ArRobotPacket() +{ +} + +AREXPORT ArRobotPacket &ArRobotPacket::operator=(const ArRobotPacket &other) +{ + if (this != &other) { + + myHeaderLength = other.myHeaderLength; + myFooterLength = other.myFooterLength; + myReadLength = other.myReadLength; + myLength = other.myLength; + mySync1 = other.mySync1; + mySync2 = other.mySync2; + myTimeReceived = other.myTimeReceived; + + if (myMaxLength != other.myMaxLength) { + if (myOwnMyBuf && myBuf != NULL) + delete [] myBuf; + myOwnMyBuf = true; + myBuf = NULL; + if (other.myMaxLength > 0) { + myBuf = new char[other.myMaxLength]; + } + myMaxLength = other.myMaxLength; + } + + if ((myBuf != NULL) && (other.myBuf != NULL)) { + memcpy(myBuf, other.myBuf, myMaxLength); + } + + myIsValid = other.myIsValid; + } + return *this; +} + +AREXPORT ArTypes::UByte ArRobotPacket::getID(void) +{ + if (myLength >= 4) + return myBuf[3]; + else + return 0; +} + +AREXPORT void ArRobotPacket::setID(ArTypes::UByte id) +{ + myBuf[3] = id; +} + +AREXPORT void ArRobotPacket::finalizePacket(void) +{ + int len = myLength; + int chkSum; + + myLength = 0; + uByteToBuf(mySync1); + uByteToBuf(mySync2); + uByteToBuf(len - getHeaderLength() + 3); + myLength = len; + + chkSum = calcCheckSum(); + byteToBuf((chkSum >> 8) & 0xff ); + byteToBuf(chkSum & 0xff ); + /* Put this in if you want to see the packets being outputted + printf("Output(%3d) ", getID()); + printHex(); + */ + // or put this in if you just want to see the type + //printf("Output %d\n", getID()); +} + +AREXPORT ArTypes::Byte2 ArRobotPacket::calcCheckSum(void) +{ + int i; + unsigned char n; + int c = 0; + + i = 3; + n = myBuf[2] - 2; + while (n > 1) { + c += ((unsigned char)myBuf[i]<<8) | (unsigned char)myBuf[i+1]; + c = c & 0xffff; + n -= 2; + i += 2; + } + if (n > 0) + c = c ^ (int)((unsigned char) myBuf[i]); + return c; +} + +AREXPORT bool ArRobotPacket::verifyCheckSum(void) +{ + ArTypes::Byte2 chksum; + unsigned char c1, c2; + + if (myLength - 2 < myHeaderLength) + return false; + + c2 = myBuf[myLength - 2]; + c1 = myBuf[myLength - 1]; + chksum = (c1 & 0xff) | (c2 << 8); + + if (chksum == calcCheckSum()) { + return true; + } else { + return false; + } + +} + +AREXPORT ArTime ArRobotPacket::getTimeReceived(void) +{ + return myTimeReceived; +} + +AREXPORT void ArRobotPacket::setTimeReceived(ArTime timeReceived) +{ + myTimeReceived = timeReceived; +} + +AREXPORT void ArRobotPacket::log() +{ + int i; + ArLog::log(ArLog::Normal, "Robot Packet: (length = %i)", myLength); + for (i = 0; i < myLength; i++) + ArLog::log(ArLog::Terse, " [%03i] % 5d\t0x%x\t%c\t%s", i, + (unsigned char) myBuf[i], + (unsigned char) myBuf[i], + (myBuf[i] >= ' ' && myBuf[i] <= '~') ? (unsigned char) myBuf[i] : ' ', + i == 0 ? "[header0]" : + i == 1 ? "[header1]" : + i == 2 ? "[packet data length]" : + i == 3 ? "[packet id]" : + i == (myLength - 2) ? "[first checksum byte]" : + i == (myLength - 1) ? "[second checksum byte]" : + "" + ); + ArLog::log(ArLog::Terse, "\n"); +} + diff --git a/Legacy/Aria/src/ArRobotPacketReaderThread.cpp b/Legacy/Aria/src/ArRobotPacketReaderThread.cpp new file mode 100644 index 0000000..2ba80f4 --- /dev/null +++ b/Legacy/Aria/src/ArRobotPacketReaderThread.cpp @@ -0,0 +1,89 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobotPacketReaderThread.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include "ArRobot.h" + + +AREXPORT ArRobotPacketReaderThread::ArRobotPacketReaderThread() : + ArASyncTask(), + myStopRunIfNotConnected(false), + myRobot(0) +{ + setThreadName("ArRobotPacketReader"); + myInRun = false; +} + +AREXPORT ArRobotPacketReaderThread::~ArRobotPacketReaderThread() +{ +} + +AREXPORT void ArRobotPacketReaderThread::setRobot(ArRobot *robot) +{ + myRobot=robot; +} + +AREXPORT void ArRobotPacketReaderThread::stopRunIfNotConnected(bool stopRun) +{ + myStopRunIfNotConnected = stopRun; +} + +AREXPORT void * ArRobotPacketReaderThread::runThread(void *arg) +{ + threadStarted(); + + if (!myRobot) + { + ArLog::log(ArLog::Terse, "ArRobotPacketReaderThread::runThread: Trying to run the robot packet reader without a robot."); + return(0); + } + + // this skips the normal one, since the function will exit when the robot run stops + myRobot->packetHandlerThreadedReader(); + + /* + while (myRunning) + { + myInRun = true; + myRobot->packetHandlerThreadedReader(); + myInRun = false; + } + */ + + threadFinished(); + return(0); +} + +AREXPORT const char *ArRobotPacketReaderThread::getThreadActivity(void) +{ + if (myRunning) + return "Unknown running"; + else + return "Unknown"; +} diff --git a/Legacy/Aria/src/ArRobotPacketReceiver.cpp b/Legacy/Aria/src/ArRobotPacketReceiver.cpp new file mode 100644 index 0000000..588314b --- /dev/null +++ b/Legacy/Aria/src/ArRobotPacketReceiver.cpp @@ -0,0 +1,393 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArDeviceConnection.h" +#include "ArRobotPacketReceiver.h" +#include "ArLogFileConnection.h" +#include "ArLog.h" +#include "ariaUtil.h" + + +/** + @param allocatePackets whether to allocate memory for the packets before + returning them (true) or to just return a pointer to an internal + packet (false)... most everything should use false as this will help prevent + many memory leaks or corruptions + @param sync1 first byte of the header this receiver will receive, this + should be left as the default in nearly all cases, ie don't mess with it + @param sync2 second byte of the header this receiver will receive, this + should be left as the default in nearly all cases, ie don't mess with it +*/ +AREXPORT ArRobotPacketReceiver::ArRobotPacketReceiver(bool allocatePackets, + unsigned char sync1, + unsigned char sync2) : + myPacket(sync1, sync2) +{ + myAllocatePackets = allocatePackets; + myTracking = false; + myTrackingLogName.clear(); + myDeviceConn = NULL; + mySync1 = sync1; + mySync2 = sync2; + myPacketReceivedCallback = NULL; +} + +/** + @param deviceConnection the connection which the receiver will use + @param allocatePackets whether to allocate memory for the packets before + returning them (true) or to just return a pointer to an internal + packet (false)... most everything should use false as this will help prevent + many memory leaks or corruptions + @param sync1 first byte of the header this receiver will receive, this + should be left as the default in nearly all cases, ie don't mess with it + @param sync2 second byte of the header this receiver will receive, this + should be left as the default in nearly all cases, ie don't mess with it +*/ +AREXPORT ArRobotPacketReceiver::ArRobotPacketReceiver( + ArDeviceConnection *deviceConnection, bool allocatePackets, + unsigned char sync1, unsigned char sync2) : + myPacket(sync1, sync2) +{ + myDeviceConn = deviceConnection; + myTracking = false; + myTrackingLogName.clear(); + myAllocatePackets = allocatePackets; + mySync1 = sync1; + mySync2 = sync2; + myPacketReceivedCallback = NULL; +} + +/** + @param deviceConnection the connection which the receiver will use + @param allocatePackets whether to allocate memory for the packets before + returning them (true) or to just return a pointer to an internal + packet (false)... most everything should use false as this will help prevent + many memory leaks or corruptions + @param sync1 first byte of the header this receiver will receive, this + should be left as the default in nearly all cases, ie don't mess with it + @param sync2 second byte of the header this receiver will receive, this + should be left as the default in nearly all cases, ie don't mess with it + @param tracking if true write log messages for packets received + @param trackingLogName name to include for packets with tracking log messages +*/ +AREXPORT ArRobotPacketReceiver::ArRobotPacketReceiver( + ArDeviceConnection *deviceConnection, bool allocatePackets, + unsigned char sync1, unsigned char sync2, bool tracking, + const char *trackingLogName) : + myPacket(sync1, sync2), + myTracking(tracking), + myTrackingLogName(trackingLogName) +{ + myDeviceConn = deviceConnection; + myAllocatePackets = allocatePackets; + mySync1 = sync1; + mySync2 = sync2; + myPacketReceivedCallback = NULL; +} + +AREXPORT ArRobotPacketReceiver::~ArRobotPacketReceiver() +{ + +} + +AREXPORT void ArRobotPacketReceiver::setDeviceConnection( + ArDeviceConnection *deviceConnection) +{ + myDeviceConn = deviceConnection; +} + +AREXPORT ArDeviceConnection *ArRobotPacketReceiver::getDeviceConnection(void) +{ + return myDeviceConn; +} + +/** + @param msWait how long to block for the start of a packet, nonblocking if 0 + @return NULL if there are no packets in alloted time, otherwise a pointer + to the packet received, if allocatePackets is true than the place that + called this function owns the packet and should delete the packet when + done... if allocatePackets is false then nothing must store a pointer to + this packet, the packet must be used and done with by the time this + method is called again +*/ +AREXPORT ArRobotPacket *ArRobotPacketReceiver::receivePacket( + unsigned int msWait) +{ + ArRobotPacket *packet; + unsigned char c; + char buf[256]; + int count = 0; + // state can be one of the STATE_ enums in the class + int state = STATE_SYNC1; + //unsigned int timeDone; + //unsigned int curTime; + long timeToRunFor; + ArTime timeDone; + ArTime lastDataRead; + ArTime packetReceived; + int numRead; + + if (myAllocatePackets) + packet = new ArRobotPacket(mySync1, mySync2); + else + packet = &myPacket; + + if (packet == NULL || myDeviceConn == NULL || + myDeviceConn->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + myDeviceConn->debugEndPacket(false, -10); + if (myAllocatePackets) + delete packet; + return NULL; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArRobotPacketReceiver::receivePacket() error adding msecs (%i)", + msWait); + } + + // check for log file connection, return assembled packet + if (dynamic_cast(myDeviceConn)) + { + packet->empty(); + packet->setLength(0); + packetReceived = myDeviceConn->getTimeRead(0); + packet->setTimeReceived(packetReceived); + numRead = myDeviceConn->read(buf, 255, 0); + if (numRead > 0) + { + packet->dataToBuf(buf, numRead); + packet->resetRead(); + myDeviceConn->debugEndPacket(true, packet->getID()); + if (myPacketReceivedCallback != NULL) + myPacketReceivedCallback->invoke(packet); + + // if tracking is on - log packet - also make sure + // buffer length is in range + + if ((myTracking) && (packet->getLength() < 10000)) { + + unsigned char *buf = (unsigned char *) packet->getBuf(); + + char obuf[10000]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength(); i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "Recv Packet: %s packet = %s", + myTrackingLogName.c_str(), obuf); + + + } // end tracking + + return packet; + } + else + { + myDeviceConn->debugEndPacket(false, -20); + if (myAllocatePackets) + delete packet; + return NULL; + } + } + + + do + { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + + if (state == STATE_SYNC1) + myDeviceConn->debugStartPacket(); + + if (myDeviceConn->read((char *)&c, 1, timeToRunFor) == 0) + { + myDeviceConn->debugBytesRead(0); + if (state == STATE_SYNC1) + { + myDeviceConn->debugEndPacket(false, -30); + if (myAllocatePackets) + delete packet; + return NULL; + } + else + { + //ArUtil::sleep(1); + continue; + } + } + + myDeviceConn->debugBytesRead(1); + + switch (state) { + case STATE_SYNC1: + + + if (c == mySync1) // move on, resetting packet + { + state = STATE_SYNC2; + packet->empty(); + packet->setLength(0); + packet->uByteToBuf(c); + packetReceived = myDeviceConn->getTimeRead(0); + packet->setTimeReceived(packetReceived); + } + else + { + //printf("Bad sync1 %d\n", c); + } + break; + case STATE_SYNC2: + + if (c == mySync2) // move on, adding this byte + { + state = STATE_ACQUIRE_DATA; + packet->uByteToBuf(c); + } + else // go back to beginning, packet hosed + { + //printf("Bad sync2 %d\n", c); + state = STATE_SYNC1; + } + break; + case STATE_ACQUIRE_DATA: + + // the character c is the count of the packets remianing at this point + // so we'll just put it into the packet then get the rest of the data + packet->uByteToBuf(c); + // if c > 200 than there is a problem, spec says packet max size is 200 + count = 0; + /** this case can't happen since c can't be over that so taking it out + if (c > 255) + { + ArLog::log(ArLog::Normal, "ArRobotPacketReceiver::receivePacket: bad packet, more than 255 bytes"); + state = STATE_SYNC1; + break; + } + */ + // here we read until we get as much as we want, OR until + // we go 100 ms without data... its arbitrary but it doesn't happen often + // and it'll mean a bad packet anyways + lastDataRead.setToNow(); + while (count < c) + { + numRead = myDeviceConn->read(buf + count, c - count, 1); + if (numRead > 0) + { + myDeviceConn->debugBytesRead(numRead); + lastDataRead.setToNow(); + } + else + { + myDeviceConn->debugBytesRead(0); + } + if (lastDataRead.mSecTo() < -100) + { + myDeviceConn->debugEndPacket(false, -40); + if (myAllocatePackets) + delete packet; + //printf("Bad time taken reading\n"); + return NULL; + } + count += numRead; + } + packet->dataToBuf(buf, c); + if (packet->verifyCheckSum()) + { + + packet->resetRead(); + /* put this in if you want to see the packets received + printf("Input "); + packet->printHex(); + */ + + // you can also do this next line if you only care about type + //printf("Input %x\n", packet->getID()); + myDeviceConn->debugEndPacket(true, packet->getID()); + if (myPacketReceivedCallback != NULL) + myPacketReceivedCallback->invoke(packet); + + // if tracking is on - log packet - also make sure + // buffer length is in range + + if ((myTracking) && (packet->getLength() < 10000)) { + + unsigned char *buf = (unsigned char *) packet->getBuf(); + + char obuf[10000]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength(); i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "Recv Packet: %s packet = %s", + myTrackingLogName.c_str(), obuf); + + + } // end tracking + + return packet; + } + else + { + /* put this in if you want to see bad checksum packets + printf("Bad Input "); + packet->printHex(); + */ + ArLog::log(ArLog::Normal, + "ArRobotPacketReceiver::receivePacket: bad packet, bad checksum"); + state = STATE_SYNC1; + myDeviceConn->debugEndPacket(false, -50); + break; + } + break; + default: + break; + } + } while (timeDone.mSecTo() >= 0 || state != STATE_SYNC1); + + myDeviceConn->debugEndPacket(false, -60); + //printf("finished the loop...\n"); + if (myAllocatePackets) + delete packet; + return NULL; + +} + +AREXPORT void ArRobotPacketReceiver::setPacketReceivedCallback( + ArFunctor1 *functor) +{ + myPacketReceivedCallback = functor; +} diff --git a/Legacy/Aria/src/ArRobotPacketSender.cpp b/Legacy/Aria/src/ArRobotPacketSender.cpp new file mode 100644 index 0000000..9ff27d5 --- /dev/null +++ b/Legacy/Aria/src/ArRobotPacketSender.cpp @@ -0,0 +1,369 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArDeviceConnection.h" +#include "ArRobotPacketSender.h" + +/** + Use setDeviceConnection() to set the device connection before use. + @param sync1 first byte of the header this sender will send, this + should be left as the default in nearly all cases, or it won't work with any + production robot. ie don't mess with it + @param sync2 second byte of the header this sender will send, this + should be left as the default in nearly all cases, or it won't work with any + production robot. ie don't mess with it +*/ +AREXPORT ArRobotPacketSender::ArRobotPacketSender(unsigned char sync1, + unsigned char sync2) : + myPacket(sync1, sync2) +{ + myDeviceConn = NULL; + myTracking = false; + myTrackingLogName.clear(); + mySendingMutex.setLogName("ArRobotPacketSender"); + myPacketSentCallback = NULL; +} + +/** + @param deviceConnection device connection to send packets to + @param sync1 first byte of the header this sender will send, this + should be left as the default in nearly all cases, or it won't work with any + production robot. ie don't mess with it + @param sync2 second byte of the header this sender will send, this + should be left as the default in nearly all cases, or it won't work with any + production robot. ie don't mess with it +*/ +AREXPORT ArRobotPacketSender::ArRobotPacketSender( + ArDeviceConnection *deviceConnection, + unsigned char sync1, + unsigned char sync2) : + myPacket(sync1, sync2) +{ + myDeviceConn = deviceConnection; + myTracking = false; + myTrackingLogName.clear(); + mySendingMutex.setLogName("ArRobotPacketSender"); + myPacketSentCallback = NULL; +} + +/** + @param deviceConnection device connection to send packets to + @param sync1 first byte of the header this sender will send, this + should be left as the default in nearly all cases, or it won't work with any + production robot. ie don't mess with it + @param sync2 second byte of the header this sender will send, this + should be left as the default in nearly all cases, or it won't work with any + production robot. ie don't mess with it + @param tracking if true write packet-tracking log messages for each packet sent. + @param trackingLogName name (packet type) to include in packet-tracking log messages + +*/ +AREXPORT ArRobotPacketSender::ArRobotPacketSender( + ArDeviceConnection *deviceConnection, + unsigned char sync1, + unsigned char sync2, + bool tracking, + const char *trackingLogName) : + myPacket(sync1, sync2), + myTracking(tracking), + myTrackingLogName(trackingLogName) +{ + myDeviceConn = deviceConnection; + mySendingMutex.setLogName("ArRobotPacketSender"); + myPacketSentCallback = NULL; +} + +AREXPORT ArRobotPacketSender::~ArRobotPacketSender() +{ + +} + +AREXPORT void ArRobotPacketSender::setDeviceConnection( + ArDeviceConnection *deviceConnection) +{ + myDeviceConn = deviceConnection; +} + +AREXPORT ArDeviceConnection *ArRobotPacketSender::getDeviceConnection(void) +{ + return myDeviceConn; +} + +bool ArRobotPacketSender::connValid(void) +{ + return (myDeviceConn != NULL && + myDeviceConn->getStatus() == ArDeviceConnection::STATUS_OPEN); +} + +/** + @param command the command number to send + @return whether the command could be sent or not +*/ +AREXPORT bool ArRobotPacketSender::com(unsigned char command) +{ + if (!connValid()) + return false; + + bool ret; + + mySendingMutex.lock(); + + myPacket.empty(); + myPacket.setID(command); + + myPacket.finalizePacket(); + + // the old one seems wrong... (next line) + // ret = myDeviceConn->write(myPacket.getBuf(), myPacket.getLength()); + ret = (myDeviceConn->write(myPacket.getBuf(), myPacket.getLength()) >= 0); + + if (myPacketSentCallback != NULL) + myPacketSentCallback->invoke(&myPacket); + + mySendingMutex.unlock(); + + return ret; +} + +/** + @param command the command number to send + @param argument the integer argument to send with the command + @return whether the command could be sent or not +*/ +AREXPORT bool ArRobotPacketSender::comInt(unsigned char command, + short int argument) +{ + + if (!connValid()) + return false; + + bool ret = true; + + mySendingMutex.lock(); + + myPacket.empty(); + myPacket.setID(command); + if (argument >= 0) + { + myPacket.uByteToBuf(INTARG); + } + else + { + myPacket.uByteToBuf(NINTARG); + argument = -argument; + } + myPacket.uByte2ToBuf(argument); + + myPacket.finalizePacket(); + + ret = (myDeviceConn->write(myPacket.getBuf(), myPacket.getLength()) >= 0); + + if (myPacketSentCallback != NULL) + myPacketSentCallback->invoke(&myPacket); + + mySendingMutex.unlock(); + + return ret; +} + +/** + @param command the command number to send + @param high the high byte to send with the command + @param low the low byte to send with the command + @return whether the command could be sent or not +*/ +AREXPORT bool ArRobotPacketSender::com2Bytes(unsigned char command, char high, + char low) +{ + return comInt(command, ((high & 0xff)<<8) + (low & 0xff)); +} + +/** + * Sends a length-prefixed string command. + @param command the command number to send + @param argument NULL-terminated string to send with the command + @return whether the command could be sent or not +*/ +AREXPORT bool ArRobotPacketSender::comStr(unsigned char command, + const char *argument) +{ + size_t size; + if (!connValid()) + return false; + size = strlen(argument); + if (size > 199) // 200 - 1 byte for length + return false; + + bool ret = true; + + mySendingMutex.lock(); + + myPacket.empty(); + + myPacket.setID(command); + myPacket.uByteToBuf(STRARG); + myPacket.uByteToBuf(size); + myPacket.strToBuf(argument); + + myPacket.finalizePacket(); + + //myPacket.log(); + + ret = (myDeviceConn->write(myPacket.getBuf(), myPacket.getLength()) >= 0); + + if (myPacketSentCallback != NULL) + myPacketSentCallback->invoke(&myPacket); + + mySendingMutex.unlock(); + + return ret; +} + +/** + * Sends a packet containing the given command, and a length-prefixed string + * containing the specified number of bytes copied from the given source string. + @param command the command number to send + @param str the character array containing data to send with the command + @param size number of bytes from the array to send; prefix the string with a byte containing this value as well. this size must be less than the maximum packet size of 200 + @return whether the command could be sent or not +*/ +AREXPORT bool ArRobotPacketSender::comStrN(unsigned char command, + const char *str, int size) +{ + if (!connValid()) + return false; + + if(size > 199) return false; // 200 - 1 byte for length + + bool ret = true; + + mySendingMutex.lock(); + + myPacket.empty(); + + myPacket.setID(command); + myPacket.uByteToBuf(STRARG); + + myPacket.uByteToBuf(size); + myPacket.strNToBuf(str, size); + + myPacket.finalizePacket(); + + //myPacket.log(); + + ret = (myDeviceConn->write(myPacket.getBuf(), myPacket.getLength()) >= 0); + + if (myPacketSentCallback != NULL) + myPacketSentCallback->invoke(&myPacket); + + mySendingMutex.unlock(); + + return false; + +} + + +/** + * Sends an ArRobotPacket + @param packet ArRobotPacket + @return whether the command could be sent or not +*/ +AREXPORT bool ArRobotPacketSender::sendPacket(ArRobotPacket *packet) +{ + if (!connValid()) + return false; + + //if(size > 199) return false; // 200 - 1 byte for length + + bool ret = true; + + mySendingMutex.lock(); + + packet->finalizePacket(); + + // if tracking is on - log packet - also make sure + // buffer length is in range + if ((myTracking) && (packet->getLength() < 10000)) { + + unsigned char *buf = (unsigned char *) packet->getBuf(); + + char obuf[10000]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength(); i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "Send Packet: %s packet = %s", + myTrackingLogName.c_str(), obuf); + + + } + + //packet->log(); + ret = (myDeviceConn->write(packet->getBuf(), packet->getLength()) >= 0); + + if (myPacketSentCallback != NULL) + myPacketSentCallback->invoke(packet); + + mySendingMutex.unlock(); + + return ret; + +} + +AREXPORT bool ArRobotPacketSender::comDataN(unsigned char command, const char* data, int size) +{ + if(!connValid()) return false; + if(size > 200) return false; + + bool ret = true; + + mySendingMutex.lock(); + + myPacket.empty(); + myPacket.setID(command); + myPacket.uByteToBuf(STRARG); + myPacket.strNToBuf(data, size); + myPacket.finalizePacket(); + + ret = (myDeviceConn->write(myPacket.getBuf(), myPacket.getLength()) >= 0); + + if (myPacketSentCallback != NULL) + myPacketSentCallback->invoke(&myPacket); + + mySendingMutex.unlock(); + + return ret; +} + +AREXPORT void ArRobotPacketSender::setPacketSentCallback( + ArFunctor1 *functor) +{ + myPacketSentCallback = functor; +} diff --git a/Legacy/Aria/src/ArRobotParams.cpp b/Legacy/Aria/src/ArRobotParams.cpp new file mode 100644 index 0000000..338a35d --- /dev/null +++ b/Legacy/Aria/src/ArRobotParams.cpp @@ -0,0 +1,1662 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" + + +#include "ariaOSDef.h" +#include "ArRobotParams.h" +#include "ariaInternal.h" +#include + +bool ArRobotParams::ourUseDefaultBehavior = true; +std::string ourPowerOutputDisplayHint; + +void ArRobotParams::internalSetUseDefaultBehavior(bool useDefaultBehavior, + const char *powerOutputDisplayHint) +{ + ourUseDefaultBehavior = useDefaultBehavior; + ourPowerOutputDisplayHint = powerOutputDisplayHint; + + ArLog::log(ArLog::Normal, + "ArRobotParams: Setting use default behavior to %s, with power output display hint '%s'", + ArUtil::convertBool(ourUseDefaultBehavior), + ourPowerOutputDisplayHint.c_str()); +} + +bool ArRobotParams::internalGetUseDefaultBehavior(void) +{ + return ourUseDefaultBehavior; +} + +AREXPORT ArRobotParams::ArRobotParams() : + ArConfig(NULL, true), + mySonarUnitGetFunctor(this, &ArRobotParams::getSonarUnits), + mySonarUnitSetFunctor(this, &ArRobotParams::parseSonarUnit), + myIRUnitGetFunctor(this, &ArRobotParams::getIRUnits), + myIRUnitSetFunctor(this, &ArRobotParams::parseIRUnit), + myCommercialProcessFileCB(this, &ArRobotParams::commercialProcessFile) +{ + myCommercialConfig = NULL; + + sprintf(myClass, "Pioneer"); + mySubClass[0] = '\0'; + myRobotRadius = 250; + myRobotDiagonal = 120; + myRobotWidth = 400; + myRobotLength = 500; + myRobotLengthFront = 0; + myRobotLengthRear = 0; + myHolonomic = true; + myAbsoluteMaxVelocity = 0; + myAbsoluteMaxRVelocity = 0; + myHaveMoveCommand = true; + myAngleConvFactor = 0.001534; + myDistConvFactor = 1.0; + myVelConvFactor = 1.0; + myRangeConvFactor = 1.0; + myVel2Divisor = 20; + myNumSonar = 0; + myGyroScaler = 1.626; + myTableSensingIR = false; + myNewTableSensingIR = false; + myFrontBumpers = false; + myNumFrontBumpers = 5; + myRearBumpers = false; + myNumRearBumpers = 5; + myNumSonarUnits = 0; + // MPL TODO why do we need these counts? + mySonarBoardCount = 0; + myBatteryMTXBoardCount = 0; + myLCDMTXBoardCount = 0; + mySonarMTXBoardCount = 0; + + mySonarMap.clear(); + + myNumIR = 0; + myIRMap.clear(); + + + myRequestIOPackets = false; + myRequestEncoderPackets = false; + mySwitchToBaudRate = 38400; + + mySettableVelMaxes = true; + myTransVelMax = 0; + myRotVelMax = 0; + + mySettableAccsDecs = true; + myTransAccel = 0; + myTransDecel = 0; + myRotAccel = 0; + myRotDecel = 0; + + myHasLatVel = false; + myLatVelMax = 0; + myLatAccel = 0; + myLatDecel = 0; + myAbsoluteMaxLatVelocity = 0; + + myGPSX = 0; + myGPSY = 0; + strcpy(myGPSPort, "COM2"); + strcpy(myGPSType, "standard"); + myGPSBaud = 9600; + + //strcpy(mySonarPort, "COM2"); + //strcpy(mySonarType, "standard"); + //mySonarBaud = 115200; + + //strcpy(myBatteryMTXBoardPort, "COM1"); + //strcpy(myBatteryMTXBoardType, "mtxbatteryv1"); + //myBatteryMTXBoardBaud = 115200; + + strcpy(myCompassType, "robot"); + strcpy(myCompassPort, ""); + + if (ourUseDefaultBehavior) + internalAddToConfigDefault(); +} + +AREXPORT ArRobotParams::~ArRobotParams() +{ + +} + + +AREXPORT void ArRobotParams::internalAddToConfigDefault(void) +{ + addComment("Robot parameter file"); +// addComment(""); + //addComment("General settings"); + std::string section; + section = "General settings"; + addParam(ArConfigArg("Class", myClass, "general type of robot", + sizeof(myClass)), section.c_str(), ArPriority::TRIVIAL); + addParam(ArConfigArg("Subclass", mySubClass, "specific type of robot", + sizeof(mySubClass)), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("RobotRadius", &myRobotRadius, "radius in mm"), + section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("RobotDiagonal", &myRobotDiagonal, + "half-height to diagonal of octagon"), "General settings", + ArPriority::TRIVIAL); + addParam(ArConfigArg("RobotWidth", &myRobotWidth, "width in mm"), + section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("RobotLength", &myRobotLength, "length in mm of the whole robot"), + section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("RobotLengthFront", &myRobotLengthFront, "length in mm to the front of the robot (if this is 0 (or non existent) this value will be set to half of RobotLength)"), + section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("RobotLengthRear", &myRobotLengthRear, "length in mm to the rear of the robot (if this is 0 (or non existent) this value will be set to half of RobotLength)"), + section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("Holonomic", &myHolonomic, "turns in own radius"), + section.c_str(), ArPriority::TRIVIAL); + addParam(ArConfigArg("MaxRVelocity", &myAbsoluteMaxRVelocity, + "absolute maximum degrees / sec"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("MaxVelocity", &myAbsoluteMaxVelocity, + "absolute maximum mm / sec"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("MaxLatVelocity", &myAbsoluteMaxLatVelocity, + "absolute lateral maximum mm / sec"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("HasMoveCommand", &myHaveMoveCommand, + "has built in move command"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("RequestIOPackets", &myRequestIOPackets, + "automatically request IO packets"), section.c_str(), + ArPriority::NORMAL); + addParam(ArConfigArg("RequestEncoderPackets", &myRequestEncoderPackets, + "automatically request encoder packets"), + section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("SwitchToBaudRate", &mySwitchToBaudRate, + "switch to this baud if non-0 and supported on robot"), + section.c_str(), ArPriority::IMPORTANT); + + section = "Conversion factors"; + addParam(ArConfigArg("AngleConvFactor", &myAngleConvFactor, + "radians per angular unit (2PI/4096)"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("DistConvFactor", &myDistConvFactor, + "multiplier to mm from robot units"), section.c_str(), + ArPriority::IMPORTANT); + addParam(ArConfigArg("VelConvFactor", &myVelConvFactor, + "multiplier to mm/sec from robot units"), + section.c_str(), + ArPriority::NORMAL); + addParam(ArConfigArg("RangeConvFactor", &myRangeConvFactor, + "multiplier to mm from sonar units"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("DiffConvFactor", &myDiffConvFactor, + "ratio of angular velocity to wheel velocity (unused in newer firmware that calculates and returns this)"), + section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("Vel2Divisor", &myVel2Divisor, + "divisor for VEL2 commands"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("GyroScaler", &myGyroScaler, + "Scaling factor for gyro readings"), section.c_str(), + ArPriority::IMPORTANT); + + section = "Accessories the robot has"; + addParam(ArConfigArg("TableSensingIR", &myTableSensingIR, + "if robot has upwards facing table sensing IR"), + section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("NewTableSensingIR", &myNewTableSensingIR, + "if table sensing IR are sent in IO packet"), + section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("FrontBumpers", &myFrontBumpers, + "if robot has a front bump ring"), section.c_str(), + ArPriority::IMPORTANT); + addParam(ArConfigArg("NumFrontBumpers", &myNumFrontBumpers, + "number of front bumpers on the robot"), + section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("RearBumpers", &myRearBumpers, + "if the robot has a rear bump ring"), section.c_str(), + ArPriority::IMPORTANT); + addParam(ArConfigArg("NumRearBumpers", &myNumRearBumpers, + "number of rear bumpers on the robot"), section.c_str(), + ArPriority::TRIVIAL); + + section = "IR parameters"; + addParam(ArConfigArg("IRNum", &myNumIR, "number of IRs on the robot"), section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("IRUnit", &myIRUnitSetFunctor, &myIRUnitGetFunctor, + "IRUnit "), + section.c_str(), ArPriority::TRIVIAL); + + + + section = "Movement control parameters"; + setSectionComment(section.c_str(), "if these are 0 the parameters from robot flash will be used, otherwise these values will be used"); + addParam(ArConfigArg("SettableVelMaxes", &mySettableVelMaxes, "if TransVelMax and RotVelMax can be set"), section.c_str(), + ArPriority::TRIVIAL); + addParam(ArConfigArg("TransVelMax", &myTransVelMax, "maximum desired translational velocity for the robot"), section.c_str(), + ArPriority::IMPORTANT); + addParam(ArConfigArg("RotVelMax", &myRotVelMax, "maximum desired rotational velocity for the robot"), section.c_str(), + ArPriority::IMPORTANT); + addParam(ArConfigArg("SettableAccsDecs", &mySettableAccsDecs, "if the accel and decel parameters can be set"), section.c_str(), ArPriority::TRIVIAL); + addParam(ArConfigArg("TransAccel", &myTransAccel, "translational acceleration"), + section.c_str(), ArPriority::IMPORTANT); + addParam(ArConfigArg("TransDecel", &myTransDecel, "translational deceleration"), + section.c_str(), ArPriority::IMPORTANT); + addParam(ArConfigArg("RotAccel", &myRotAccel, "rotational acceleration"), + section.c_str()); + addParam(ArConfigArg("RotDecel", &myRotDecel, "rotational deceleration"), + section.c_str(), ArPriority::IMPORTANT); + + addParam(ArConfigArg("HasLatVel", &myHasLatVel, "if the robot has lateral velocity"), section.c_str(), ArPriority::TRIVIAL); + + addParam(ArConfigArg("LatVelMax", &myLatVelMax, "maximum desired lateral velocity for the robot"), section.c_str(), + ArPriority::IMPORTANT); + addParam(ArConfigArg("LatAccel", &myLatAccel, "lateral acceleration"), + section.c_str(), ArPriority::IMPORTANT); + addParam(ArConfigArg("LatDecel", &myLatDecel, "lateral deceleration"), + section.c_str(), ArPriority::IMPORTANT); + + section = "GPS parameters"; + // Yes, there is a "P" in the middle of the position parameters. Don't remove it if + // you think it's irrelevant, it will break all robot parameter files. + addParam(ArConfigArg("GPSPX", &myGPSX, "x location of gps receiver antenna on robot, mm"), section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("GPSPY", &myGPSY, "y location of gps receiver antenna on robot, mm"), section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("GPSType", myGPSType, "type of gps receiver (trimble, novatel, standard)", sizeof(myGPSType)), section.c_str(), ArPriority::IMPORTANT); + addParam(ArConfigArg("GPSPort", myGPSPort, "port the gps is on", sizeof(myGPSPort)), section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("GPSBaud", &myGPSBaud, "gps baud rate (9600, 19200, 38400, etc.)"), section.c_str(), ArPriority::NORMAL); + + section = "Compass parameters"; + addParam(ArConfigArg("CompassType", myCompassType, "type of compass: robot (typical configuration), or serialTCM (computer serial port)", sizeof(myCompassType)), section.c_str(), ArPriority::NORMAL); + addParam(ArConfigArg("CompassPort", myCompassPort, "serial port name, if CompassType is serialTCM", sizeof(myCompassPort)), section.c_str(), ArPriority::NORMAL); + + section = "Sonar parameters"; + addParam(ArConfigArg("SonarNum", &myNumSonar, + "Number of sonars on the robot."), section.c_str(), + ArPriority::NORMAL); + addParam(ArConfigArg("SonarUnit", &mySonarUnitSetFunctor, &mySonarUnitGetFunctor, + "SonarUnit (for MTX sonar there is also )"), section.c_str(), ArPriority::TRIVIAL); + + int i; + for (i = 1; i <= Aria::getMaxNumSonarBoards(); i++) + addSonarBoardToConfig(i, this, ourUseDefaultBehavior); + + for (i = 1; i <= Aria::getMaxNumLasers(); i++) + { + if (i == 1) + { + section = "Laser parameters"; + } + else + { + char buf[1024]; + sprintf(buf, "Laser %d parameters", i); + section = buf; + } + + addLaserToConfig(i, this, ourUseDefaultBehavior, section.c_str()); + } + + for (i = 1; i <= Aria::getMaxNumBatteries(); i++) + addBatteryToConfig(i, this, ourUseDefaultBehavior); + + for (i = 1; i <= Aria::getMaxNumLCDs(); i++) + addLCDToConfig(i, this, ourUseDefaultBehavior); + + /** PTZ parameters here too */ + myPTZParams.resize(Aria::getMaxNumPTZs()); + for(size_t i = 0; i < Aria::getMaxNumPTZs(); ++i) + addPTZToConfig(i, this); + + /* Parameters used by ArVideo library */ + myVideoParams.resize(Aria::getMaxNumVideoDevices()); + for(size_t i = 0; i < Aria::getMaxNumVideoDevices(); ++i) + addVideoToConfig(i, this); +} + + + +AREXPORT void ArRobotParams::addLaserToConfig( + int laserNumber, ArConfig* config, bool useDefaultBehavior, + const char *section) +{ + ArConfigArg::RestartLevel restartLevel; + // if we're using default behavior set it to none, since we can't + // change it + if (useDefaultBehavior) + restartLevel = ArConfigArg::NO_RESTART; + // otherwise make it restart the software + else + restartLevel = ArConfigArg::RESTART_SOFTWARE; + + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section, + "Information about the connection to this laser and its position on the vehicle."); + + LaserData *laserData = new LaserData; + myLasers[laserNumber] = laserData; + + strcpy(laserData->mySection, section); + + std::string displayHintPlain = "Visible:LaserAutoConnect=true"; + std::string displayHintCheckbox = displayHintPlain + "&&Checkbox"; + + std::string displayHintCustom; + + char tempDescBuf[512]; + snprintf(tempDescBuf, sizeof(tempDescBuf), + "Laser_%d exists and should be automatically connected at startup.", + laserNumber); + + displayHintCustom = "Checkbox"; + + config->addParam( + ArConfigArg("LaserAutoConnect", &laserData->myLaserAutoConnect, + tempDescBuf), + section, ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section, ArPriority::FACTORY); + + config->addParam( + ArConfigArg("LaserX", &laserData->myLaserX, + "Location (in mm) of the laser in X (+ front, - back) relative to the robot's idealized center of rotation."), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + config->addParam( + ArConfigArg("LaserY", &laserData->myLaserY, + "Location (in mm) of the laser in Y (+ left, - right) relative to the robot's idealized center of rotation."), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + config->addParam( + ArConfigArg("LaserTh", &laserData->myLaserTh, + "Rotation (in deg) of the laser (+ counterclockwise, - clockwise).", -180.0, 180.0), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + config->addParam( + ArConfigArg("LaserZ", &laserData->myLaserZ, + "Height (in mm) of the laser from the ground. 0 means unknown.", 0), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + config->addParam( + ArConfigArg("LaserIgnore", laserData->myLaserIgnore, + "Angles (in deg) at which to ignore readings, +/1 one degree. Angles are entered as strings, separated by a space.", + sizeof(laserData->myLaserIgnore)), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + snprintf(tempDescBuf, sizeof(tempDescBuf), + "Laser_%i is upside-down.", + laserNumber); + + config->addParam( + ArConfigArg("LaserFlipped", &laserData->myLaserFlipped, + tempDescBuf), + section, ArPriority::FACTORY, + displayHintCheckbox.c_str(), restartLevel); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section, ArPriority::FACTORY); + + displayHintCustom = displayHintPlain + "&&" + Aria::laserGetChoices(); + config->addParam( + ArConfigArg("LaserType", laserData->myLaserType, + "Type of laser.", + sizeof(laserData->myLaserType)), + section,ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + displayHintCustom = (displayHintPlain + "&&" + + Aria::deviceConnectionGetChoices()); + config->addParam( + ArConfigArg("LaserPortType", laserData->myLaserPortType, + "Type of port the laser is on.", + sizeof(laserData->myLaserPortType)), + + section, ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("LaserPort", laserData->myLaserPort, + "Port the laser is on.", + sizeof(laserData->myLaserPort)), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + if (!ourPowerOutputDisplayHint.empty()) + displayHintCustom = displayHintPlain + "&&" + ourPowerOutputDisplayHint; + else + displayHintCustom = displayHintPlain; + + + config->addParam( + ArConfigArg("LaserPowerOutput", + laserData->myLaserPowerOutput, + "Power output that controls this laser's power.", + sizeof(laserData->myLaserPowerOutput)), + section, ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("LaserStartingBaudChoice", + laserData->myLaserStartingBaudChoice, + "StartingBaud for this laser. Leave blank to use the default.", + sizeof(laserData->myLaserStartingBaudChoice)), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + config->addParam( + ArConfigArg("LaserAutoBaudChoice", + laserData->myLaserAutoBaudChoice, + "AutoBaud for this laser. Leave blank to use the default.", + sizeof(laserData->myLaserAutoBaudChoice)), + section, ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section, ArPriority::FACTORY); + + if (!useDefaultBehavior) + return; + + config->addParam( + ArConfigArg("LaserPowerControlled", + &laserData->myLaserPowerControlled, + "When enabled (true), this indicates that the power to the laser is controlled by the serial port line."), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserMaxRange", (int *)&laserData->myLaserMaxRange, + "Maximum range (in mm) to use for the laser. This should be specified only when the range needs to be shortened. 0 to use the default range."), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserCumulativeBufferSize", + (int *)&laserData->myLaserCumulativeBufferSize, + "Cumulative buffer size to use for the laser. 0 to use the default."), + section, + ArPriority::NORMAL); + + config->addParam( + ArConfigArg("LaserStartDegrees", laserData->myLaserStartDegrees, + "Start angle (in deg) for the laser. This may be used to constrain the angle. Fractional degrees are permitted. Leave blank to use the default.", + sizeof(laserData->myLaserStartDegrees)), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserEndDegrees", laserData->myLaserEndDegrees, + "End angle (in deg) for the laser. This may be used to constrain the angle. Fractional degreees are permitted. Leave blank to use the default.", + sizeof(laserData->myLaserEndDegrees)), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserDegreesChoice", laserData->myLaserDegreesChoice, + "Degrees choice for the laser. This may be used to constrain the range. Leave blank to use the default.", + sizeof(laserData->myLaserDegreesChoice)), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserIncrement", laserData->myLaserIncrement, + "Increment (in deg) for the laser. Fractional degrees are permitted. Leave blank to use the default.", + sizeof(laserData->myLaserIncrement)), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserIncrementChoice", laserData->myLaserIncrementChoice, + "Increment choice for the laser. This may be used to increase the increment. Leave blank to use the default.", + sizeof(laserData->myLaserIncrementChoice)), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserUnitsChoice", laserData->myLaserUnitsChoice, + "Units for the laser. This may be used to increase the size of the units. Leave blank to use the default.", + sizeof(laserData->myLaserUnitsChoice)), + section, + ArPriority::NORMAL); + config->addParam( + ArConfigArg("LaserReflectorBitsChoice", + laserData->myLaserReflectorBitsChoice, + "ReflectorBits for the laser. Leave blank to use the default.", + sizeof(laserData->myLaserReflectorBitsChoice)), + section, + ArPriority::NORMAL); + +} + +AREXPORT void ArRobotParams::addBatteryToConfig( + int batteryNumber, ArConfig* config, bool useDefaultBehavior) +{ + ArConfigArg::RestartLevel restartLevel; + // if we're using default behavior set it to none, since we can't + // change it + if (useDefaultBehavior) + restartLevel = ArConfigArg::NO_RESTART; + // otherwise make it restart the software + else + restartLevel = ArConfigArg::RESTART_SOFTWARE; + + char buf[1024]; + sprintf(buf, "Battery_%d", batteryNumber); + std::string section = buf; + std::string batteryName = buf; + + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section.c_str(), + "Information about the connection to this battery."); + + BatteryMTXBoardData *batteryMTXBoardData = new BatteryMTXBoardData; + myBatteryMTXBoards[batteryNumber] = batteryMTXBoardData; + + myBatteryMTXBoardCount++; + + std::string displayHintPlain = "Visible:BatteryAutoConnect=true"; + + std::string displayHintCustom; + + displayHintCustom = "Checkbox&&Visible:Generation!=Legacy"; + + char tempDescBuf[512]; + snprintf(tempDescBuf, sizeof(tempDescBuf), + "%s exists and should be automatically connected at startup.", + batteryName.c_str()); + + config->addParam( + ArConfigArg("BatteryAutoConnect", + &batteryMTXBoardData->myBatteryMTXBoardAutoConn, + tempDescBuf), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + displayHintCustom = displayHintPlain + "&&" + Aria::batteryGetChoices(); + config->addParam( + ArConfigArg("BatteryType", + batteryMTXBoardData->myBatteryMTXBoardType, + "Type of battery.", + sizeof(batteryMTXBoardData->myBatteryMTXBoardType)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + displayHintCustom = (displayHintPlain + "&&" + + Aria::deviceConnectionGetChoices()); + config->addParam( + ArConfigArg("BatteryPortType", + batteryMTXBoardData->myBatteryMTXBoardPortType, + "Port type that the battery is on.", + sizeof(batteryMTXBoardData->myBatteryMTXBoardPortType)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("BatteryPort", + batteryMTXBoardData->myBatteryMTXBoardPort, + "Port the battery is on.", + sizeof(batteryMTXBoardData->myBatteryMTXBoardPort)), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + config->addParam( + ArConfigArg("BatteryBaud", + &batteryMTXBoardData->myBatteryMTXBoardBaud, + "Baud rate to use for battery communication (9600, 19200, 38400, etc.)."), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + // MPL TODO remove this since it's redundant (it's set in the constructor) + //batteryMTXBoardData->myBatteryMTXBoardAutoConn = false; + +} + +AREXPORT void ArRobotParams::addLCDToConfig( + int lcdNumber, ArConfig* config, bool useDefaultBehavior) +{ + ArConfigArg::RestartLevel restartLevel; + // if we're using default behavior set it to none, since we can't + // change it + if (useDefaultBehavior) + restartLevel = ArConfigArg::NO_RESTART; + // otherwise make it restart the software + else + restartLevel = ArConfigArg::RESTART_SOFTWARE; + + char buf[1024]; + sprintf(buf, "LCD_%d", lcdNumber); + std::string section = buf; + std::string lcdName = buf; + + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section.c_str(), + "The physical definition of this LCD."); + + LCDMTXBoardData *lcdMTXBoardData = new LCDMTXBoardData; + myLCDMTXBoards[lcdNumber] = lcdMTXBoardData; + + /// MPL TODO what's this for? + myLCDMTXBoardCount++; + + std::string displayHintPlain = "Visible:LCDAutoConnect=true"; + std::string displayHintCheckbox = displayHintPlain + "&&Checkbox"; + + std::string displayHintCustom; + + /// MPL TODO remove, this is already set in the constructor + //lcdMTXBoardData->myLCDMTXBoardAutoConn = false; + displayHintCustom = "Checkbox&&Visible:Generation!=Legacy"; + + char tempDescBuf[512]; + snprintf(tempDescBuf, sizeof(tempDescBuf), + "%s exists and should automatically be connected at startup.", + lcdName.c_str()); + + config->addParam( + ArConfigArg("LCDAutoConnect", + &lcdMTXBoardData->myLCDMTXBoardAutoConn, + tempDescBuf), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + /// MPL TODO remove, this is already set in the constructor + //lcdMTXBoardData->myLCDMTXBoardConnFailOption = false + + config->addParam( + ArConfigArg("LCDDisconnectOnConnectFailure", + &lcdMTXBoardData->myLCDMTXBoardConnFailOption, + "The LCD is a key component and is required for operation. If this is enabled and there is a failure in the LCD communications, then the robot will restart."), + section.c_str(), ArPriority::FACTORY, + displayHintCheckbox.c_str(), restartLevel); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + displayHintCustom = displayHintPlain + "&&" + Aria::lcdGetChoices(); + config->addParam( + ArConfigArg("LCDType", + lcdMTXBoardData->myLCDMTXBoardType, + "Type of LCD.", + sizeof(lcdMTXBoardData->myLCDMTXBoardType)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + displayHintCustom = (displayHintPlain + "&&" + + Aria::deviceConnectionGetChoices()); + config->addParam( + ArConfigArg("LCDPortType", + lcdMTXBoardData->myLCDMTXBoardPortType, + "Port type that the LCD is on.", + sizeof(lcdMTXBoardData->myLCDMTXBoardPortType)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("LCDPort", + lcdMTXBoardData->myLCDMTXBoardPort, + "Port that the LCD is on.", + sizeof(lcdMTXBoardData->myLCDMTXBoardPort)), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + if (!ourPowerOutputDisplayHint.empty()) + displayHintCustom = displayHintPlain + "&&" + ourPowerOutputDisplayHint; + else + displayHintCustom = displayHintPlain; + config->addParam( + ArConfigArg("LCDPowerOutput", + lcdMTXBoardData->myLCDMTXBoardPowerOutput, + "Power output that controls this LCD's power.", + sizeof(lcdMTXBoardData->myLCDMTXBoardPowerOutput)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("LCDBaud", + &lcdMTXBoardData->myLCDMTXBoardBaud, + "Baud rate for the LCD communication (9600, 19200, 38400, etc.)."), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); +} + +AREXPORT void ArRobotParams::addSonarBoardToConfig( + int sonarBoardNumber, ArConfig* config, bool useDefaultBehavior) +{ + ArConfigArg::RestartLevel restartLevel; + // if we're using default behavior set it to none, since we can't + // change it + if (useDefaultBehavior) + restartLevel = ArConfigArg::NO_RESTART; + // otherwise make it restart the software + else + restartLevel = ArConfigArg::RESTART_SOFTWARE; + + char buf[1024]; + sprintf(buf, "SonarBoard_%d", sonarBoardNumber); + std::string section = buf; + std::string sonarBoardName = buf; + + std::string displayHintPlain = "Visible:SonarAutoConnect=true"; + + std::string displayHintCustom; + + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section.c_str(), + "Information about the connection to this Sonar Board."); + + SonarMTXBoardData *sonarMTXBoardData = new SonarMTXBoardData; + mySonarMTXBoards[sonarBoardNumber] = sonarMTXBoardData; + + /// MPL TODO what's this do? + mySonarMTXBoardCount++; + + /// MPL TODO remove this next line (it's in the constructor + //sonarMTXBoardData->mySonarMTXBoardAutoConn = false; + displayHintCustom = "Checkbox&&Visible:Generation!=Legacy"; + + char tempDescBuf[512]; + snprintf(tempDescBuf, sizeof(tempDescBuf), + "%s exists and should be automatically connected at startup.", + sonarBoardName.c_str()); + + config->addParam( + ArConfigArg("SonarAutoConnect", + &sonarMTXBoardData->mySonarMTXBoardAutoConn, + tempDescBuf), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + displayHintCustom = displayHintPlain + "&&" + Aria::sonarGetChoices(); + config->addParam( + ArConfigArg("SonarBoardType", + sonarMTXBoardData->mySonarMTXBoardType, + "Type of the sonar board.", + sizeof(sonarMTXBoardData->mySonarMTXBoardType)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + displayHintCustom = (displayHintPlain + "&&" + + Aria::deviceConnectionGetChoices()); + config->addParam( + ArConfigArg("SonarBoardPortType", + sonarMTXBoardData->mySonarMTXBoardPortType, + "Port type that the sonar is on.", + sizeof(sonarMTXBoardData->mySonarMTXBoardPortType)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("SonarBoardPort", + sonarMTXBoardData->mySonarMTXBoardPort, + "Port the sonar is on.", + sizeof(sonarMTXBoardData->mySonarMTXBoardPort)), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + if (!ourPowerOutputDisplayHint.empty()) + displayHintCustom = displayHintPlain + "&&" + ourPowerOutputDisplayHint; + else + displayHintCustom = displayHintPlain; + config->addParam( + ArConfigArg("SonarBoardPowerOutput", + sonarMTXBoardData->mySonarMTXBoardPowerOutput, + "Power output that controls this Sonar Board's power.", + sizeof(sonarMTXBoardData->mySonarMTXBoardPowerOutput)), + section.c_str(), ArPriority::FACTORY, + displayHintCustom.c_str(), restartLevel); + + config->addParam( + ArConfigArg("SonarBaud", + &sonarMTXBoardData->mySonarMTXBoardBaud, + "Baud rate for the sonar board communication. (9600, 19200, 38400, etc.)."), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + /// MPL Remove this, it's in the constructor + // sonarMTXBoardData->mySonarDelay = 1; + config->addParam( + ArConfigArg("SonarDelay", + &sonarMTXBoardData->mySonarDelay, + "Sonar delay (in ms).", 0, 10), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + /// MPL Remove this sonar gain, it's in the constructor + //sonarMTXBoardData->mySonarGain = 5; + config->addParam( + ArConfigArg("SonarGain", + &sonarMTXBoardData->mySonarGain, + "Default sonar gain for the board, range 0-31.", 0, 31), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + // MPL TODO remove (moved this to constructor) + //strcpy(&sonarMTXBoardData->mySonarThreshold[0],"3000|1500|2000"); + config->addParam( + ArConfigArg("SonarDetectionThreshold", + &sonarMTXBoardData->mySonarDetectionThreshold, + "Default sonar detection threshold for the board.", + 0, 65535), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + /* + config->addParam( + ArConfigArg("SonarNoiseDelta", + &sonarMTXBoardData->mySonarNoiseDelta, + "Default sonar noise delta for the board.", + 0, 65535), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + */ + + config->addParam( + ArConfigArg("SonarMaxRange", + &sonarMTXBoardData->mySonarMaxRange, + "Default maximum sonar range for the board.", + 0, 255*17), + section.c_str(), ArPriority::FACTORY, + displayHintPlain.c_str(), restartLevel); + + +/* + ArLog::log(ArLog::Normal, "ArRobotParams: added sonar board %d with params %s %s %s %d %d %d", + i, &sonarMTXBoardData->mySonarMTXBoardType[0], sonarMTXBoardData->mySonarMTXBoardPortType, + sonarMTXBoardData->mySonarMTXBoardPort, sonarMTXBoardData->mySonarMTXBoardBaud, + sonarMTXBoardData->mySonarMTXBoardAutoConn, + sonarMTXBoardData->mySonarDelay"); +*/ + +} + +void ArRobotParams::addPTZToConfig(int i, ArConfig *config) +{ + std::stringstream sectionStream; + sectionStream << "PTZ " << i+1 << " parameters"; + std::string section = sectionStream.str(); + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, section.c_str(), "Information about the connection to a pan/tilt unit (PTU) or pan/tilt/zoom control (PTZ) of a camera"); + config->addParam(ArConfigArg("PTZAutoConnect", &(myPTZParams[i].connect), "If true, connect to this PTZ by default."), section.c_str()); + config->addParam(ArConfigArg("PTZType", &(myPTZParams[i].type), "PTZ or PTU type"), section.c_str()); + config->addParam(ArConfigArg("PTZInverted", &(myPTZParams[i].inverted), "If unit is mounted inverted (upside-down)"), section.c_str()); + config->addParam(ArConfigArg("PTZSerialPort", &(myPTZParams[i].serialPort), "serial port, or none if not using serial port communication"), section.c_str()); + config->addParam(ArConfigArg("PTZRobotAuxSerialPort", &(myPTZParams[i].robotAuxPort), "Pioneer aux. serial port, or -1 if not using aux. serial port for communication."), section.c_str()); + config->addParam(ArConfigArg("PTZAddress", &(myPTZParams[i].address), "IP address or hostname, or none if not using network communication."), section.c_str()); + config->addParam(ArConfigArg("PTZTCPPort", &(myPTZParams[i].tcpPort), "TCP Port to use for HTTP network connection"), section.c_str()); +} + + +void ArRobotParams::addVideoToConfig(int i, ArConfig *config) +{ + std::stringstream sectionStream; + sectionStream << "Video " << i+1 << " parameters"; + std::string section = sectionStream.str(); + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, section.c_str(), "Information about the connection to a video acquisition device, framegrabber, or camera"); + config->addParam(ArConfigArg("VideoAutoConnect", &(myVideoParams[i].connect), "If true, connect to this device by default."), section.c_str()); + config->addParam(ArConfigArg("VideoType", &(myVideoParams[i].type), "Device type"), section.c_str()); + //if (i == 0) + // printf("XXX added VideoType param for Video 1, its target is 0x%x, initial value is %s\n", &(myVideoParams[i].type), myVideoParams[i].type.c_str()); + config->addParam(ArConfigArg("VideoInverted", &(myVideoParams[i].inverted), "If image should be flipped (for cameras mounted inverted/upside-down)"), section.c_str()); + config->addParam(ArConfigArg("VideoWidth", &(myVideoParams[i].imageWidth), "Desired width of image"), section.c_str()); + addParam(ArConfigArg("VideoHeight", &(myVideoParams[i].imageHeight), "Desired height of image"), section.c_str()); + addParam(ArConfigArg("VideoDeviceIndex", &(myVideoParams[i].deviceIndex), "Device index"), section.c_str()); + config->addParam(ArConfigArg("VideoDeviceName", &(myVideoParams[i].deviceName), "Device name (overrides VideoDeviceIndex)"), section.c_str()); + config->addParam(ArConfigArg("VideoChannel", &(myVideoParams[i].channel), "Input channel"), section.c_str()); + addParam(ArConfigArg("VideoAnalogSignalFormat", &(myVideoParams[i].analogSignalFormat), "NTSC or PAL"), section.c_str(), ArPriority::NORMAL, "Choices:NTSC;;PAL"); + config->addParam(ArConfigArg("VideoAddress", &(myVideoParams[i].address), "IP address or hostname, or none if not using network communication."), section.c_str()); + config->addParam(ArConfigArg("VideoTCPPort", &(myVideoParams[i].tcpPort), "TCP Port to use for HTTP network connection"), section.c_str()); +} + + +AREXPORT bool ArRobotParams::parseSonarUnit (ArArgumentBuilder *builder) +{ + // PS 9/5/12 - we need to support the old way, ie 4 parameters and the + // new way - so test the size first + if (builder->getArgc() == 4) { + if (builder->getArgc() != 4 || !builder->isArgInt (0) || + !builder->isArgInt (1) || !builder->isArgInt (2) || + !builder->isArgInt (3)) { + ArLog::log (ArLog::Terse, "ArRobotParams: SonarUnit parameters invalid"); + return false; + } + mySonarMap[builder->getArgInt (0)][SONAR_X] = builder->getArgInt (1); + mySonarMap[builder->getArgInt (0)][SONAR_Y] = builder->getArgInt (2); + mySonarMap[builder->getArgInt (0)][SONAR_TH] = builder->getArgInt (3); + + ArLog::log(ArLog::Terse, "ArRobotParams::parseSonarUnit done parsing"); + + return true; + } else { + return parseMTXSonarUnit (builder); + } +} + +#if 0 +AREXPORT const std::list *ArRobotParams::getSonarUnits(void) +{ + std::map >::iterator it; + int num, x, y, th; + ArArgumentBuilder *builder; + + for (it = mySonarMap.begin(); it != mySonarMap.end(); it++) + { + num = (*it).first; + x = (*it).second[SONAR_X]; + y = (*it).second[SONAR_Y]; + th = (*it).second[SONAR_TH]; + builder = new ArArgumentBuilder; + builder->add("%d %d %d %d", num, x, y, th); + myGetSonarUnitList.push_back(builder); + } + return &myGetSonarUnitList; +} +#endif + +AREXPORT bool ArRobotParams::parseMTXSonarUnit(ArArgumentBuilder *builder) +{ + // there has to be at least 5 arguments, 1st 5 are ints + // fix for bug 1959 + //if (5 < builder->getArgc() > 10 || !builder->isArgInt(0) || + if (builder->getArgc() < 5 /*|| builder->getArgc() > 8*/ || !builder->isArgInt(0) || + !builder->isArgInt(1) || !builder->isArgInt(2) || + !builder->isArgInt(3) || !builder->isArgInt(4) || + !builder->isArgInt(5)) + { + ArLog::log(ArLog::Normal, "ArRobotParams: SonarUnit parameters invalid, must include at least 5 integer values (MTX-style SonarUnit).", + builder->getArgc()); + return false; + } + + myNumSonarUnits++; + + mySonarMap[builder->getArgInt(0)][SONAR_X] = builder->getArgInt(1); + mySonarMap[builder->getArgInt(0)][SONAR_Y] = builder->getArgInt(2); + mySonarMap[builder->getArgInt(0)][SONAR_TH] = builder->getArgInt(3); + mySonarMap[builder->getArgInt(0)][SONAR_BOARD] = builder->getArgInt(4); + mySonarMap[builder->getArgInt(0)][SONAR_BOARDUNITPOSITION] = builder->getArgInt(5); + SonarMTXBoardData *sonarMTXBoardData = getSonarMTXBoardData(builder->getArgInt(4)); + if(sonarMTXBoardData) + sonarMTXBoardData->myNumSonarTransducers++; + + // prob should get these defaults from board + mySonarMap[builder->getArgInt(0)][SONAR_GAIN] = 0;//SONAR_DEFAULT_GAIN; + /* + mySonarMap[builder->getArgInt(0)][SONAR_NOISE_DELTA] = 0; + */ + mySonarMap[builder->getArgInt(0)][SONAR_DETECTION_THRESHOLD] = 0; + mySonarMap[builder->getArgInt(0)][SONAR_MAX_RANGE] = 0; + mySonarMap[builder->getArgInt(0)][SONAR_USE_FOR_AUTONOMOUS_DRIVING] = true; + + if (builder->getArgc() > 6) { + // gain arg will either be an int or "default" + if (builder->isArgInt(6)) { + mySonarMap[builder->getArgInt(0)][SONAR_GAIN] = builder->getArgInt(6); + } + else + { + ArLog::log(ArLog::Terse, "ArRobotParams: SonarUnit parameters invalid, 7th value (gain) must be an integer value."); + return false; + } + } + + if (builder->getArgc() > 7) { + // gain arg will either be an int or "default" + if (builder->isArgInt(7)) { + mySonarMap[builder->getArgInt(0)][SONAR_DETECTION_THRESHOLD] = builder->getArgInt(7); + } + else + { + ArLog::log(ArLog::Terse, "ArRobotParams: SonarUnit parameters invalid, 8th value (detect. thresh.) must be an integer value."); + return false; + } + } + if (builder->getArgc() > 8) { + // gain arg will either be an int or "default" + if (builder->isArgInt(8)) { + mySonarMap[builder->getArgInt(0)][SONAR_MAX_RANGE] = builder->getArgInt(8); + } + else + { + ArLog::log(ArLog::Terse, "ArRobotParams: SonarUnit parameters invalid, 9th value (max range) must be an integer value."); + return false; + } + } + if (builder->getArgc() > 9) { + // + if (builder->isArgBool(9)) { + mySonarMap[builder->getArgBool(0)][SONAR_USE_FOR_AUTONOMOUS_DRIVING] = builder->getArgBool(9); + } + else + { + ArLog::log(ArLog::Terse, "ArRobotParams: SonarUnit parameters invalid, 10th value (use for autonomous) must be a boolean value."); + + return false; + } + } + +/* +if (builder->getArgc() > 10) { + // gain arg will either be an int or "default" + if (builder->isArgInt(10)) { + mySonarMap[builder->getArgInt(0)][SONAR_NOISE_FLOOR] = builder->getArgInt(9); + } + else + { + ArLog::log(ArLog::Terse, "ArRobotParams: SonarUnit parameters invalid, 11th value (noise floor) must be an integer value."); + return false; + } + } +*/ + + ArLog::log(ArLog::Verbose, "ArRobotParams::parseSonarUnit() parsed unit %d %d %d ", myNumSonarUnits, + mySonarMap[builder->getArgInt(0)][SONAR_BOARD], + mySonarMap[builder->getArgInt(0)][SONAR_BOARDUNITPOSITION]); + + + + // PS 9/5/12 - make numsonar = noumsonarunits + myNumSonar = myNumSonarUnits; + + return true; +} + +AREXPORT const std::list *ArRobotParams::getSonarUnits(void) +//AREXPORT const std::list *ArRobotParams::getMTXSonarUnits(void) +{ +// ArLog::log(ArLog::Normal, "Saving sonar units?"); + + std::map >::iterator it; + int unitNum, x, y, th, boardNum, boardUnitPosition, gain, noiseDelta, detectionThreshold, numEchoSamples; + bool useForAutonomousDriving; + ArArgumentBuilder *builder; + + for (it = mySonarMap.begin(); it != mySonarMap.end(); it++) + { + unitNum = (*it).first; + x = (*it).second[SONAR_X]; + y = (*it).second[SONAR_Y]; + th = (*it).second[SONAR_TH]; + boardNum = (*it).second[SONAR_BOARD]; + boardUnitPosition = (*it).second[SONAR_BOARDUNITPOSITION]; + gain = (*it).second[SONAR_GAIN]; + /* + noiseDelta = (*it).second[SONAR_NOISE_DELTA]; + */ + detectionThreshold = (*it).second[SONAR_DETECTION_THRESHOLD]; + numEchoSamples = (*it).second[SONAR_MAX_RANGE]; + useForAutonomousDriving = (*it).second[SONAR_USE_FOR_AUTONOMOUS_DRIVING]; + builder = new ArArgumentBuilder; + + /* for noiseDelta + builder->add("%d %d %d %d %d %d %d %d %d %d", + unitNum, x, y, th, boardNum, boardUnitPosition, gain, noiseDelta, detectionThreshold, numEchoSamples); + */ + builder->add("%d %d %d %d %d %d %d %d %d %d", + unitNum, x, y, th, boardNum, boardUnitPosition, gain, detectionThreshold, numEchoSamples, useForAutonomousDriving); + + myGetSonarUnitList.push_back(builder); + } + return &myGetSonarUnitList; +} + +AREXPORT void ArRobotParams::internalSetSonar(int num, int x, + int y, int th) +{ + mySonarMap[num][SONAR_X] = x; + mySonarMap[num][SONAR_Y] = y; + mySonarMap[num][SONAR_TH] = th; +} + +AREXPORT bool ArRobotParams::parseIRUnit(ArArgumentBuilder *builder) +{ + if (builder->getArgc() != 5 || !builder->isArgInt(0) || + !builder->isArgInt(1) || !builder->isArgInt(2) || + !builder->isArgInt(3) || !builder->isArgInt(4)) + { + ArLog::log(ArLog::Terse, "ArRobotParams: IRUnit parameters invalid"); + return false; + } + myIRMap[builder->getArgInt(0)][IR_TYPE] = builder->getArgInt(1); + myIRMap[builder->getArgInt(0)][IR_CYCLES] = builder->getArgInt(2); + myIRMap[builder->getArgInt(0)][IR_X] = builder->getArgInt(3); + myIRMap[builder->getArgInt(0)][IR_Y] = builder->getArgInt(4); + return true; +} + +AREXPORT const std::list *ArRobotParams::getIRUnits(void) +{ + std::map >::iterator it; + int num, type, cycles, x, y; + ArArgumentBuilder *builder; + + for (it = myIRMap.begin(); it != myIRMap.end(); it++) + { + num = (*it).first; + type = (*it).second[IR_TYPE]; + cycles = (*it).second[IR_CYCLES]; + x = (*it).second[IR_X]; + y = (*it).second[IR_Y]; + builder = new ArArgumentBuilder; + builder->add("%d %d %d %d %d", num, type, cycles, x, y); + myGetIRUnitList.push_back(builder); + } + return &myGetIRUnitList; +} + +AREXPORT void ArRobotParams::internalSetIR(int num, int type, int cycles, int x, int y) +{ + myIRMap[num][IR_TYPE] = type; + myIRMap[num][IR_CYCLES] = cycles; + myIRMap[num][IR_X] = x; + myIRMap[num][IR_Y] = y; +} + +AREXPORT bool ArRobotParams::save(void) +{ + char buf[10000]; + sprintf(buf, "%sparams/", Aria::getDirectory()); + setBaseDirectory(buf); + sprintf(buf, "%s.p", getSubClassName()); + return writeFile(buf, false, NULL, false); +} + +AREXPORT void ArRobotParams::internalAddToConfigCommercial( + ArConfig *config) +{ + ArLog::log(ArLog::Normal, "ArRobotParams: Adding to config"); + + // initialize some values + myCommercialConfig = config; + myCommercialAddedConnectables = false; + myCommercialProcessedSonar = false; + myCommercialNumSonar = 16; + myCommercialMaxNumberOfLasers = 4; + myCommercialMaxNumberOfBatteries = 1; + myCommercialMaxNumberOfLCDs = 1; + myCommercialMaxNumberOfSonarBoards = 2; + + // add the callback + myCommercialConfig->addProcessFileCB(&myCommercialProcessFileCB, 90); + + /// reset some values from their default + sprintf(myClass, "MTX"); + /// these probably aren't actually used anywhere, but just in case + myFrontBumpers = true; + myRearBumpers = true; + myRobotRadius = 255; + myRobotWidth = 400; + myRobotLengthFront = 255; + myRobotLengthRear = 255; + + // now add the normal config + std::string section = "General"; + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section.c_str(), + "The general definition of this vehicle"); + + ArConfigArg generationArg( + "Generation", myClass, + "The generation of technology this is. The MT400 and Motivity Core this should be Legacy. Everything else is MTX.", + sizeof(myClass)); + generationArg.setExtraExplanation("This main external thing this affects is that for a Legacy lasers are named by type (for backwards compatibility with existing config files), whereas for MTX they are named by their number (for easier future compatibility)."); + + myCommercialConfig->addParam( + generationArg, + section.c_str(), ArPriority::FACTORY, "Choices:Legacy;;MTX", + ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam( + ArConfigArg("Model", mySubClass, + "The model name. This should be human readable and is only for human consumption.", + sizeof(mySubClass)), + section.c_str(), ArPriority::FACTORY, "", + ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + myCommercialConfig->addParam( + ArConfigArg("Radius", + &myRobotRadius, + "The radius in mm that is needed to turn in place safely. (mm)", + 1), + section.c_str(), ArPriority::FACTORY, "", + ArConfigArg::RESTART_SOFTWARE); + myCommercialConfig->addParam( + ArConfigArg("Width", + &myRobotWidth, + "Width in mm (mm)", + 1), + section.c_str(), ArPriority::FACTORY, "", + ArConfigArg::RESTART_SOFTWARE); + myCommercialConfig->addParam( + ArConfigArg("LengthFront", + &myRobotLengthFront, + "Length in mm from the idealized center of rotation to the front (mm)", + 1), + section.c_str(), ArPriority::FACTORY, "", + ArConfigArg::RESTART_SOFTWARE); + myCommercialConfig->addParam( + ArConfigArg("LengthRear", + &myRobotLengthRear, + "Length in mm from the idealized center of rotation to the rear (mm)", + 1), + section.c_str(), ArPriority::FACTORY, + "", ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + + myCommercialConfig->addParam( + ArConfigArg("DistanceCalibrationFactor", + &myDistConvFactor, "The per-vehicle calibration factor for distance errors. A perfect vehicle would have a value of 1. Travelled distances are multiplied by this, so if the vehicle drove 1% to far you'd make this value .99. This is to account for differences within a model that ideally (ideally there wouldn't be any). (multiplier)", 0), + section.c_str(), ArPriority::CALIBRATION, + "", ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + myCommercialConfig->addParam( + ArConfigArg("NumberOfFrontBumpers", &myNumFrontBumpers, + "Number of front bumpers", 0, 7), + section.c_str(), ArPriority::FACTORY, + "SpinBox", ArConfigArg::RESTART_SOFTWARE); + myCommercialConfig->addParam( + ArConfigArg("NumberOfRearBumpers", &myNumRearBumpers, + "Number of rear bumpers", 0, 7), + section.c_str(), ArPriority::FACTORY, + "SpinBox", ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam( + ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + + myCommercialConfig->addParam( + ArConfigArg("MaxNumberOfLasers", + &myCommercialMaxNumberOfLasers, + "Max number of lasers", 1, 9), + section.c_str(), ArPriority::FACTORY, + "SpinBox", ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam( + ArConfigArg("MaxNumberOfBatteries", + &myCommercialMaxNumberOfBatteries, + "Max number of Batteries", 0, 9), + section.c_str(), ArPriority::FACTORY, + "SpinBox&&Visible:Generation!=Legacy", + ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam( + ArConfigArg("MaxNumberOfLCDs", + &myCommercialMaxNumberOfLCDs, + "Max number of LCDs", 0, 9), + section.c_str(), ArPriority::FACTORY, + "SpinBox&&Visible:Generation!=Legacy", + ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam( + ArConfigArg("MaxNumberOfSonarBoards", + &myCommercialMaxNumberOfSonarBoards, + "Max number of Sonar Boards", 0, 9), + section.c_str(), ArPriority::FACTORY, + "SpinBox&&Visible:Generation!=Legacy", + ArConfigArg::RESTART_SOFTWARE); + + myCommercialConfig->addParam(ArConfigArg(ArConfigArg::SEPARATOR), + section.c_str(), ArPriority::FACTORY); + +} + +AREXPORT bool ArRobotParams::commercialProcessFile(void) +{ + myRobotLength = myRobotLengthFront + myRobotLengthRear; + + // MPL CONFIG TODO process the sonar + + if (myCommercialAddedConnectables && !myCommercialProcessedSonar) + { + processSonarCommercial(myCommercialConfig); + myCommercialProcessedSonar = true; + } + + if (!myCommercialAddedConnectables) + { + ArLog::log(ArLog::Normal, "ArRobotParams: Adding connectables"); + + myCommercialAddedConnectables = true; + Aria::setMaxNumLasers(myCommercialMaxNumberOfLasers); + + // if it's an MTX set the types + if (ArUtil::strcasecmp(myClass, "Legacy") != 0) + { + Aria::setMaxNumBatteries(myCommercialMaxNumberOfBatteries); + Aria::setMaxNumLCDs(myCommercialMaxNumberOfLCDs); + Aria::setMaxNumSonarBoards(myCommercialMaxNumberOfSonarBoards); + addSonarToConfigCommercial(myCommercialConfig, true); + } + else + { + Aria::setMaxNumBatteries(0); + Aria::setMaxNumLCDs(0); + Aria::setMaxNumSonarBoards(0); + addSonarToConfigCommercial(myCommercialConfig, false); + } + + int i; + for (i = 1; i <= Aria::getMaxNumSonarBoards(); i++) + addSonarBoardToConfig(i, myCommercialConfig, ourUseDefaultBehavior); + + for (i = 1; i <= Aria::getMaxNumLasers(); i++) + { + char buf[1024]; + sprintf(buf, "Laser_%d", i); + + addLaserToConfig(i, myCommercialConfig, ourUseDefaultBehavior, buf); + } + + for (i = 1; i <= Aria::getMaxNumBatteries(); i++) + addBatteryToConfig(i, myCommercialConfig, ourUseDefaultBehavior); + + for (i = 1; i <= Aria::getMaxNumLCDs(); i++) + addLCDToConfig(i, myCommercialConfig, ourUseDefaultBehavior); + } + + + return true; +} + + +void ArRobotParams::addSonarToConfigCommercial(ArConfig *config, + bool isMTXSonar) +{ + std::string section = "Sonar"; + + int maxSonar = 64; + + config->addSection(ArConfig::CATEGORY_ROBOT_PHYSICAL, + section.c_str(), + "Definition of the sonar on this vehicle."); + + config->addParam(ArConfigArg("NumSonar", myCommercialNumSonar, "Number of sonars on this robot.", 0, maxSonar), + section.c_str(), ArPriority::FACTORY, + "SpinBox", ArConfigArg::RESTART_SOFTWARE); + + ArConfigArg sonar(ArConfigArg::LIST, "Sonar", "Definition of this single sonar transducer."); + sonar.setConfigPriority(ArPriority::FACTORY); + sonar.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + + ArConfigArg sonarX("X", 0, + "Location (in mm) of this sonar transducer in X (+ front, - back) relative to the robot's idealized center of rotation."); + sonarX.setConfigPriority(ArPriority::FACTORY); + sonarX.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_X; + sonar.addArg(sonarX); + + ArConfigArg sonarY("Y", 0, + "Location (in mm) of this sonar transducer in Y (+ left, - right) relative to the robot's idealized center of rotation."); + sonarY.setConfigPriority(ArPriority::FACTORY); + sonarY.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_Y; + sonar.addArg(sonarY); + + ArConfigArg sonarTh("Th", 0, + "Rotation (in deg) of this sonar transducer (+ counterclockwise, - clockwise).", + -180, 180); + sonarTh.setConfigPriority(ArPriority::FACTORY); + sonarTh.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_TH; + sonar.addArg(sonarTh); + + if (isMTXSonar) + { + ArConfigArg sonarBoard("SonarBoard", 0, + "Sonar board that is used by this transducer. 0 means that it is not yet configured.", + 0, Aria::getMaxNumSonarBoards()); + sonarBoard.setConfigPriority(ArPriority::FACTORY); + sonarBoard.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_BOARD; + sonar.addArg(sonarBoard); + + ArConfigArg sonarBoardUnitPosition("SonarBoardUnitPosition", 0, + "Position of the transducer on the sonar board. 0 means that it is not yet configured.", + 0, 8); + sonarBoardUnitPosition.setConfigPriority(ArPriority::FACTORY); + sonarBoardUnitPosition.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_BOARDUNITPOSITION; + sonar.addArg(sonarBoardUnitPosition); + + ArConfigArg sonarGain("Gain", 0, + "Sonar gain to be used by this transducer. 0 to use the board default.", 0, 31); + + sonarGain.setConfigPriority(ArPriority::FACTORY); + sonarGain.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_GAIN; + sonar.addArg(sonarGain); + + /* + ArConfigArg sonarNoiseDelta("NoiseDelta", 0, + "Sonar noise delta to be used by this transducer. 0 to use the board default.", 0, 65535); + sonarNoiseDelta.setConfigPriority(ArPriority::FACTORY); + sonarNoiseDelta.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_NOISE_DELTA; + sonar.addArg(sonarNoiseDelta); + */ + + ArConfigArg sonarDetectionThreshold("DetectionThreshold", 0, + "Sonar detection threshold to be used by this transducer. 0 to use the board default.", 0, 65535); + sonarDetectionThreshold.setConfigPriority(ArPriority::FACTORY); + sonarDetectionThreshold.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_DETECTION_THRESHOLD; + sonar.addArg(sonarDetectionThreshold); + + ArConfigArg sonarMaxRange("MaxRange", 0, + "Maximum range for this transducer. 0 to use the board default.", 0, 17*255); + sonarMaxRange.setConfigPriority(ArPriority::FACTORY); + sonarMaxRange.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_MAX_RANGE; + sonar.addArg(sonarMaxRange); + + ArConfigArg sonarUseForAutonomousDriving("UseForAutonomousDriving", true, + "Checked means use for Autonomous Driving (aka Path Planning) as well as all other driving. Not checked means use the sonar will still be used by all other driving."); + sonarUseForAutonomousDriving.setConfigPriority(ArPriority::FACTORY); + sonarUseForAutonomousDriving.setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + sonarUseForAutonomousDriving.setDisplayHint("Checkbox"); + myCommercialSonarFieldMap[sonar.getArgCount()] = SONAR_USE_FOR_AUTONOMOUS_DRIVING; + sonar.addArg(sonarUseForAutonomousDriving); + } + + char displayHintBuf[1024]; + char nameBuf[1024]; + + for (int ii = 0; ii < maxSonar; ii++) + { + snprintf(nameBuf, sizeof(nameBuf), + "Sonar_%d", + ii+1); + + snprintf(displayHintBuf, sizeof(displayHintBuf), + "Visible:NumSonar>%d", + ii); + + ArConfigArg *arg = new ArConfigArg( + nameBuf, sonar); + + config->addParam(*arg, section.c_str(), ArPriority::FACTORY, + displayHintBuf, ArConfigArg::RESTART_SOFTWARE); + } + + +} + +void ArRobotParams::processSonarCommercial(ArConfig *config) +{ + int ii; + + + std::string configSection = "Sonar"; + + ArConfigSection *section = NULL; + if ((section = Aria::getConfig()->findSection(configSection.c_str())) == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobotParams:processSonarCommercial: Can't find section '%s'", + configSection.c_str()); + return; + } + + char nameBuf[1024]; + + myNumSonarUnits = myCommercialNumSonar; + myNumSonar = myCommercialNumSonar; + + for (ii = 0; ii < myCommercialNumSonar; ii++) + { + snprintf(nameBuf, sizeof(nameBuf), + "Sonar_%d", + ii+1); + + ArConfigArg *argFromConfig = NULL; + if ((argFromConfig = section->findParam(nameBuf)) == NULL) + { + ArLog::log(ArLog::Normal, + "ArRobotParams:processSonarCommercial: Can't find parameter '%s' in section '%s'", + nameBuf, configSection.c_str()); + continue; + } + + for (int jj = 0; jj < argFromConfig->getArgCount(); jj++) + { + // this sets the sonar number ii field jj (mapped when added) to + // the value of the integer, doing the same thing normally done + // with the SonarInfo enum, but automatically instead of relying + // on pesky humans typing + if (argFromConfig->getArg(jj)->getType() == ArConfigArg::INT) + mySonarMap[ii][jj] = argFromConfig->getArg(jj)->getInt(); + else if (argFromConfig->getArg(jj)->getType() == ArConfigArg::BOOL) + mySonarMap[ii][jj] = argFromConfig->getArg(jj)->getBool(); + } + } + + + +} + + +AREXPORT void ArVideoParams::merge(const ArVideoParams& other) +{ + //printf("merge: other.type=%s, this.type=%s.\n", other.type.c_str(), type.c_str()); + if(other.type != "unknown" && other.type != "none" && other.type != "") + { + //printf("merge: replacing this type %s with other %s\n", type.c_str(), other.type.c_str()); + type = other.type; + } + if(other.connectSet) + { + //printf("merge: replacing this connect %d with other %d\n", connect, other.connect); + connect = other.connect; + connectSet = true; + } + if(other.imageWidth != -1) + { + imageWidth = other.imageWidth; + } + if(other.imageHeight != -1) + { + imageHeight = other.imageHeight; + } + if(other.deviceIndex != -1) + { + deviceIndex = other.deviceIndex; + } + if(other.deviceName != "none" && other.deviceName != "") + { + deviceName = other.deviceName; + } + if(other.channel != -1) + { + channel = other.channel; + } + if(other.analogSignalFormat != "none" && other.analogSignalFormat != "") + { + analogSignalFormat = other.analogSignalFormat; + } + if(other.address != "none" && other.address != "") + { + //printf("merge: replacing this address %s with other %s\n", address.c_str(), other.address.c_str()); + address = other.address; + } + if(other.tcpPortSet) + { + tcpPort = other.tcpPort; + tcpPortSet = true; + } + if(other.invertedSet) + { + //printf("merge: replacing this inverted %d with other %d\n", inverted, other.inverted); + inverted = other.inverted; + invertedSet = true; + } +} + +void ArPTZParams::merge(const ArPTZParams& other) +{ + if(other.type != "unknown" && other.type != "none" && other.type != "") + { + //printf("merge: replacing this type %s with other %s\n", type.c_str(), other.type.c_str()); + type = other.type; + } + if(other.connectSet) + { + //printf("merge: replacing this connect %d with other %d\n", connect, other.connect); + connect = other.connect; + connectSet = true; + } + if(other.serialPort != "none" && other.serialPort != "") + { + //printf("merge: replacing this serialPort %s with other %s\n", serialPort.c_str(), other.serialPort.c_str()); + serialPort = other.serialPort; + } + if(other.robotAuxPort != -1) + { + //printf("merge: replacing this robotAuxPort %d with other %d\n", robotAuxPort, other.robotAuxPort); + robotAuxPort = other.robotAuxPort; + } + if(other.address != "none") + { + //printf("merge: replacing this address %s with other %s\n", address.c_str(), other.address.c_str()); + address = other.address; + } + if(other.tcpPortSet) + { + //printf("merge: replacing this tcpPort %d with other %d\n", tcpPort, other.tcpPort); + tcpPort = other.tcpPort; + tcpPortSet = true; + } + if(other.invertedSet) + { + //printf("merge: replacing this inverted %d with other %d\n", inverted, other.inverted); + inverted = other.inverted; + invertedSet = true; + } +} + diff --git a/Legacy/Aria/src/ArRobotTypes.cpp b/Legacy/Aria/src/ArRobotTypes.cpp new file mode 100644 index 0000000..8f03453 --- /dev/null +++ b/Legacy/Aria/src/ArRobotTypes.cpp @@ -0,0 +1,2449 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArRobotTypes.h" +#include "ArLog.h" + +/** @cond INCLUDE_INTERNAL_ROBOT_PARAM_CLASSES */ + +// Generic robot class + +AREXPORT ArRobotGeneric::ArRobotGeneric(const char *dir) +{ +} + +// AmigoBot robot class + +AREXPORT ArRobotAmigo::ArRobotAmigo(const char *dir) +{ + sprintf(mySubClass, "amigo"); + myRobotRadius = 180; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1000; + myDistConvFactor = 0.5083; + myVelConvFactor = 0.6154; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.011; + myVel2Divisor = 20; + myRobotWidth = 279; + myRobotLength = 330; + myRobotLengthFront = 160; + myRobotLengthRear = 170; + + myNumSonar = 8; + internalSetSonar(0, 76, 100, 90); + internalSetSonar(1, 125, 75, 41); + internalSetSonar(2, 150, 30, 15); + internalSetSonar(3, 150, -30, -15); + internalSetSonar(4, 125, -75, -41); + internalSetSonar(5, 76, -100, -90); + internalSetSonar(6, -140, -58, -145); + internalSetSonar(7, -140, 58, 145); +} + +// AmigoBot robot class + +AREXPORT ArRobotAmigoSh::ArRobotAmigoSh(const char *dir) +{ + sprintf(mySubClass, "amigo-sh"); + myRobotRadius = 180; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1000; + myDistConvFactor = 1; + myVelConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.011; + myVel2Divisor = 20; + myRobotWidth = 279; + myRobotLength = 330; + myRobotLengthFront = 160; + myRobotLengthRear = 170; + + myNumSonar = 8; + internalSetSonar(0, 70, 100, 90); + internalSetSonar(1, 125, 75, 41); + internalSetSonar(2, 144, 30, 15); + internalSetSonar(3, 144, -30, -15); + internalSetSonar(4, 120, -75, -41); + internalSetSonar(5, 70, -100, -90); + internalSetSonar(6, -146, -58, -145); + internalSetSonar(7, -146, 58, 145); +} + +// P2AT robot class + +AREXPORT ArRobotP2AT::ArRobotP2AT(const char *dir) +{ + sprintf(mySubClass, "p2at"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 1.32; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0034; + myRobotWidth = 505; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 160; + getLaserData(1)->myLaserY = 7; + } + + + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +// P2AT8 robot class + +AREXPORT ArRobotP2AT8::ArRobotP2AT8(const char *dir) +{ + sprintf(mySubClass, "p2at8"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 1.32; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0034; + myRobotWidth = 505; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 160; + getLaserData(1)->myLaserY = 7; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +// P2IT robot class + +AREXPORT ArRobotP2IT::ArRobotP2IT(const char *dir) +{ + sprintf(mySubClass, "p2it"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 1.136; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0032; + myRobotWidth = 505; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 160; + getLaserData(1)->myLaserY = 7; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +// P2DX robot class + +AREXPORT ArRobotP2DX::ArRobotP2DX(const char *dir) +{ + sprintf(mySubClass, "p2dx"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.84; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 17; + getLaserData(1)->myLaserY = 8; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +// P2DXe robot class + +AREXPORT ArRobotP2DXe::ArRobotP2DXe(const char *dir) +{ + sprintf(mySubClass, "p2de"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.969; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 17; + getLaserData(1)->myLaserY = 8; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +// P2DF robot class + +AREXPORT ArRobotP2DF::ArRobotP2DF(const char *dir) +{ + sprintf(mySubClass, "p2df"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.485; + myRangeConvFactor = 0.268; + myDiffConvFactor = .0060; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 17; + getLaserData(1)->myLaserY = 8; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +// P2D8 robot class + +AREXPORT ArRobotP2D8::ArRobotP2D8(const char *dir) +{ + sprintf(mySubClass, "p2d8"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.485; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 18; + getLaserData(1)->myLaserY = 0; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + + +// P2CE robot class + +AREXPORT ArRobotP2CE::ArRobotP2CE(const char *dir) +{ + sprintf(mySubClass, "p2ce"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.826; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0057; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +// P2PP robot class + +AREXPORT ArRobotP2PP::ArRobotP2PP(const char *dir) +{ + sprintf(mySubClass, "p2pp"); + myRobotRadius = 300; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.485; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0060; + myRobotWidth = 425; + myRobotLength = 513; + + myTableSensingIR = true; + myNewTableSensingIR = false; + myFrontBumpers = true; + myRearBumpers = true; + + myNumSonar = 24; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -20, 136, 90); + internalSetSonar(9, 24, 119, 50); + internalSetSonar(10, 58, 78, 30); + internalSetSonar(11, 77, 27, 10); + internalSetSonar(12, 77, -27, -10); + internalSetSonar(13, 58, -78, -30); + internalSetSonar(14, 24, -119, -50); + internalSetSonar(15, -20, -136, -90); + + internalSetSonar(16, -157, -136, -90); + internalSetSonar(17, -203, -119, -130); + internalSetSonar(18, -237, -78, -150); + internalSetSonar(19, -255, -27, -170); + internalSetSonar(20, -255, 27, 170); + internalSetSonar(21, -237, 78, 150); + internalSetSonar(22, -203, 119, 130); + internalSetSonar(23, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 16; + getLaserData(1)->myLaserY = 1; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +// P2PB robot class + +AREXPORT ArRobotP2PB::ArRobotP2PB(const char *dir) +{ + sprintf(mySubClass, "p2pb"); + myRobotRadius = 300; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.424; + myRangeConvFactor = 0.268; + myDiffConvFactor = 0.0056; + myFrontBumpers = true; + myRearBumpers = true; + myRobotWidth = 425; + myRobotLength = 513; + + myNumSonar = 24; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -20, 136, 90); + internalSetSonar(9, 24, 119, 50); + internalSetSonar(10, 58, 78, 30); + internalSetSonar(11, 77, 27, 10); + internalSetSonar(12, 77, -27, -10); + internalSetSonar(13, 58, -78, -30); + internalSetSonar(14, 24, -119, -50); + internalSetSonar(15, -20, -136, -90); + + internalSetSonar(16, -157, -136, -90); + internalSetSonar(17, -203, -119, -130); + internalSetSonar(18, -237, -78, -150); + internalSetSonar(19, -255, -27, -170); + internalSetSonar(20, -255, 27, 170); + internalSetSonar(21, -237, 78, 150); + internalSetSonar(22, -203, 119, 130); + internalSetSonar(23, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 17; + getLaserData(1)->myLaserY = 8; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +// PerfPB robot class + +AREXPORT ArRobotPerfPB::ArRobotPerfPB(const char *dir) +{ + sprintf(mySubClass, "perfpb"); + myRobotRadius = 340; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.485; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.006; + + myRequestIOPackets = true; + myTableSensingIR = true; + myNewTableSensingIR = true; + myFrontBumpers = true; + myRearBumpers = true; + myRobotWidth = 425; + myRobotLength = 513; + + myNumIR = 4; + internalSetIR(0, 1, 2, 333, -233); + internalSetIR(1, 1, 2, 333, 233); + internalSetIR(2, 1, 2, -2, -116); + internalSetIR(3, 1, 2, -2, 116); + + myNumSonar = 32; + + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -20, 136, 90); + internalSetSonar(9, 24, 119, 50); + internalSetSonar(10, 58, 78, 30); + internalSetSonar(11, 77, 27, 10); + internalSetSonar(12, 77, -27, -10); + internalSetSonar(13, 58, -78, -30); + internalSetSonar(14, 24, -119, -50); + internalSetSonar(15, -20, -136, -90); + + internalSetSonar(16, -157, -136, -90); + internalSetSonar(17, -203, -119, -130); + internalSetSonar(18, -237, -78, -150); + internalSetSonar(19, -255, -27, -170); + internalSetSonar(20, -255, 27, 170); + internalSetSonar(21, -237, 78, 150); + internalSetSonar(22, -203, 119, 130); + internalSetSonar(23, -157, 136, 90); + + internalSetSonar(24, -191, -136, -90); + internalSetSonar(25, -237, -119, -130); + internalSetSonar(26, -271, -78, -150); + internalSetSonar(27, -290, -27, -170); + internalSetSonar(28, -290, 27, 170); + internalSetSonar(29, -271, 78, 150); + internalSetSonar(30, -237, 119, 130); + internalSetSonar(31, -191, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 21; + getLaserData(1)->myLaserY = 0; + } + + + + + myPTZParams[0].setType("sony"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("pxc"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + + +AREXPORT ArRobotPion1M::ArRobotPion1M(const char *dir) +{ + sprintf(mySubClass, "pion1m"); + myRobotRadius = 220; + myRobotDiagonal = 90; + myAbsoluteMaxRVelocity = 100; + myAbsoluteMaxVelocity = 400; + myHaveMoveCommand = 0; + mySwitchToBaudRate = 0; + + myAngleConvFactor = 0.0061359; + myDistConvFactor = 0.05066; + myVelConvFactor = 2.5332; + myRangeConvFactor = 0.1734; + myDiffConvFactor = 1.0/300.0; + myVel2Divisor = 4; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + myNumSonar = 7; + internalSetSonar(0, 100, 100, 90); + internalSetSonar(1, 120, 80, 30); + internalSetSonar(2, 130, 40, 15); + internalSetSonar(3, 130, 0, 0); + internalSetSonar(4, 130, -40, -15); + internalSetSonar(5, 120, -80, -30); + internalSetSonar(6, 100, -100, -90); + + myTransVelMax = 400; + myRotVelMax = 100; + mySettableAccsDecs = false; +} + +AREXPORT ArRobotPsos1M::ArRobotPsos1M(const char *dir) +{ + sprintf(mySubClass, "psos1m"); + myRobotRadius = 220; + myRobotDiagonal = 90; + myAbsoluteMaxRVelocity = 100; + myAbsoluteMaxVelocity = 400; + myHaveMoveCommand = 0; + mySwitchToBaudRate = 0; + + myAngleConvFactor = 0.0061359; + myDistConvFactor = 0.05066; + myVelConvFactor = 2.5332; + myRangeConvFactor = 0.1734; + myDiffConvFactor = 1.0/300.0; + myVel2Divisor = 4; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + myNumSonar = 7; + internalSetSonar(0, 100, 100, 90); + internalSetSonar(1, 120, 80, 30); + internalSetSonar(2, 130, 40, 15); + internalSetSonar(3, 130, 0, 0); + internalSetSonar(4, 130, -40, -15); + internalSetSonar(5, 120, -80, -30); + internalSetSonar(6, 100, -100, -90); + + myTransVelMax = 400; + myRotVelMax = 100; + mySettableAccsDecs = false; +} + +AREXPORT ArRobotPsos43M::ArRobotPsos43M(const char *dir) +{ + sprintf(mySubClass, "psos43m"); + myRobotRadius = 220; + myRobotDiagonal = 90; + myAbsoluteMaxRVelocity = 100; + myAbsoluteMaxVelocity = 400; + myHaveMoveCommand = 0; + mySwitchToBaudRate = 0; + + myAngleConvFactor = 0.0061359; + myDistConvFactor = 0.05066; + myVelConvFactor = 2.5332; + myRangeConvFactor = 0.1734; + myDiffConvFactor = 1.0/300.0; + myVel2Divisor = 4; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + myNumSonar = 7; + internalSetSonar(0, 100, 100, 90); + internalSetSonar(1, 120, 80, 30); + internalSetSonar(2, 130, 40, 15); + internalSetSonar(3, 130, 0, 0); + internalSetSonar(4, 130, -40, -15); + internalSetSonar(5, 120, -80, -30); + internalSetSonar(6, 100, -100, -90); + + myTransVelMax = 400; + myRotVelMax = 100; + mySettableAccsDecs = false; +} + + +// PionAT robot class + +AREXPORT ArRobotPionAT::ArRobotPionAT(const char *dir) +{ + sprintf(mySubClass, "pionat"); + myRobotRadius = 330; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 100; + myAbsoluteMaxVelocity = 500; + myHaveMoveCommand = 0; + mySwitchToBaudRate = 0; + + myAngleConvFactor = 0.0061359; + myDistConvFactor = 0.07; + myVelConvFactor = 2.5332; + myRangeConvFactor = 0.1734; + myDiffConvFactor = 1.0/300.0; + myVel2Divisor = 4; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + myNumSonar = 7; + internalSetSonar(0, 100, 100, 90); + internalSetSonar(1, 120, 80, 30); + internalSetSonar(2, 130, 40, 15); + internalSetSonar(3, 130, 0, 0); + internalSetSonar(4, 130, -40, -15); + internalSetSonar(5, 120, -80, -30); + internalSetSonar(6, 100, -100, -90); + + myTransVelMax = 400; + myRotVelMax = 100; + mySettableAccsDecs = false; +} + + +AREXPORT ArRobotPion1X::ArRobotPion1X(const char *dir) +{ + sprintf(mySubClass, "pion1x"); + myRobotRadius = 220; + myRobotDiagonal = 90; + myAbsoluteMaxRVelocity = 100; + myAbsoluteMaxVelocity = 400; + myHaveMoveCommand = 0; + mySwitchToBaudRate = 0; + + myAngleConvFactor = 0.0061359; + myDistConvFactor = 0.05066; + myVelConvFactor = 2.5332; + myRangeConvFactor = 0.1734; + myDiffConvFactor = 1.0/300.0; + myVel2Divisor = 4; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + myNumSonar = 7; + internalSetSonar(0, 100, 100, 90); + internalSetSonar(1, 120, 80, 30); + internalSetSonar(2, 130, 40, 15); + internalSetSonar(3, 130, 0, 0); + internalSetSonar(4, 130, -40, -15); + internalSetSonar(5, 120, -80, -30); + internalSetSonar(6, 100, -100, -90); + + myTransVelMax = 400; + myRotVelMax = 100; + mySettableAccsDecs = false; +} + +AREXPORT ArRobotPsos1X::ArRobotPsos1X(const char *dir) +{ + sprintf(mySubClass, "psos1x"); + myRobotRadius = 220; + myRobotDiagonal = 90; + myAbsoluteMaxRVelocity = 100; + myAbsoluteMaxVelocity = 400; + myHaveMoveCommand = 0; + mySwitchToBaudRate = 0; + + myAngleConvFactor = 0.0061359; + myDistConvFactor = 0.05066; + myVelConvFactor = 2.5332; + myRangeConvFactor = 0.1734; + myDiffConvFactor = 1.0/300.0; + myVel2Divisor = 4; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + myNumSonar = 7; + internalSetSonar(0, 100, 100, 90); + internalSetSonar(1, 120, 80, 30); + internalSetSonar(2, 130, 40, 15); + internalSetSonar(3, 130, 0, 0); + internalSetSonar(4, 130, -40, -15); + internalSetSonar(5, 120, -80, -30); + internalSetSonar(6, 100, -100, -90); + + myTransVelMax = 400; + myRotVelMax = 100; + mySettableAccsDecs = false; +} + + +AREXPORT ArRobotMapper::ArRobotMapper(const char *dir) +{ + sprintf(mySubClass, "mappr"); + myRobotRadius = 180; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 0; + myAbsoluteMaxVelocity = 0; + myHaveMoveCommand = false; + myDistConvFactor = 1.00; + //myDistConvFactor = 6.77; // solid foam tires + // myDistConvFactor = 7.39; // pneumatic tires at 40 psi + myRangeConvFactor = 1.0; + myDiffConvFactor = .011; + myGyroScaler = 1.626; // the default used on Pioneers + myVelConvFactor = 0.615400; + mySwitchToBaudRate = 0; + mySettableAccsDecs = false; + mySettableVelMaxes = false; + + myNumFrontBumpers = 0; + myNumRearBumpers = 0; + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 312; // the normal laser low position + //getLaserData(1)->myLaserX = 237; // the high laser position + getLaserData(1)->myLaserY = 0; + + getLaserData(1)->myLaserFlipped = false; // the normal configuration + //getLaserData(1)->myLaserFlipped = true; // for low-inverted and high configurations + getLaserData(1)->myLaserPowerControlled = false; + } +} + +// PowerBot robot class + +AREXPORT ArRobotPowerBot::ArRobotPowerBot(const char *dir) +{ + + sprintf(mySubClass, "powerbot"); + myRobotRadius = 550; + myRobotDiagonal = 240; + myAbsoluteMaxRVelocity = 360; + myAbsoluteMaxVelocity = 2000; + myDistConvFactor = 0.5813; + myRangeConvFactor = 1.0; + myDiffConvFactor = .00373; + myRobotWidth = 680; + myRobotLength = 911; + myRobotLengthFront = 369; + myRobotLengthRear = 542; + + myFrontBumpers = true; + myNumFrontBumpers = 7; + myRearBumpers = true; + myNumRearBumpers = 5; + myNumSonar = 32; + internalSetSonar(0, 152, 278, 90); + internalSetSonar(1, 200, 267, 65); + internalSetSonar(2, 241, 238, 45); + internalSetSonar(3, 274, 200, 35); + internalSetSonar(4, 300, 153, 25); + internalSetSonar(5, 320, 96, 15); + internalSetSonar(6, 332, 33, 5); + internalSetSonar(7, 0, 0, -180); + + internalSetSonar(8, 332, -33, -5); + internalSetSonar(9, 320, -96, -15); + internalSetSonar(10, 300, -153, -25); + internalSetSonar(11, 274, -200, -35); + internalSetSonar(12, 241, -238, -45); + internalSetSonar(13, 200, -267, -65); + internalSetSonar(14, 152, -278, -90); + internalSetSonar(15, 0, 0, -180); + + internalSetSonar(16, -298, -278, -90); + internalSetSonar(17, -347, -267, -115); + internalSetSonar(18, -388, -238, -135); + internalSetSonar(19, -420, -200, -145); + internalSetSonar(20, -447, -153, -155); + internalSetSonar(21, -467, -96, -165); + internalSetSonar(22, -478, -33, -175); + internalSetSonar(23, 0, 0, -180); + + internalSetSonar(24, -478, 33, 175); + internalSetSonar(25, -467, 96, 165); + internalSetSonar(26, -447, 153, 155); + internalSetSonar(27, -420, 200, 145); + internalSetSonar(28, -388, 238, 135); + internalSetSonar(29, -347, 267, 115); + internalSetSonar(30, -298, 278, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM2"); + getLaserData(1)->myLaserX = 251; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + } + + sprintf(myGPSPort, "COM3"); // swap laser and hypothetical gps + + + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("vfw"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +AREXPORT ArRobotP2D8Plus::ArRobotP2D8Plus(const char *dir) +{ + sprintf(mySubClass, "p2d8+"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.485; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0056; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 18; + getLaserData(1)->myLaserY = 0; + } + + + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotP2AT8Plus::ArRobotP2AT8Plus(const char *dir) +{ + sprintf(mySubClass, "p2at8+"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 0.465; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0034; + myRobotWidth = 505; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 160; + getLaserData(1)->myLaserY = 7; + } + + + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +AREXPORT ArRobotP3AT::ArRobotP3AT(const char *dir) +{ + sprintf(mySubClass, "p3at"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 0.465; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0034; + myRobotWidth = 505; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 160; + getLaserData(1)->myLaserY = 0; + } + + myGPSX = -160; + myGPSY = 120; + sprintf(myGPSType, "novatel"); + + + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotP3DX::ArRobotP3DX(const char *dir) +{ + sprintf(mySubClass, "p3dx"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 0.485; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 18; + getLaserData(1)->myLaserY = 0; + } + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); + +} + + + +AREXPORT ArRobotPerfPBPlus::ArRobotPerfPBPlus(const char *dir) +{ + sprintf(mySubClass, "perfpb+"); + myRobotRadius = 340; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myRequestIOPackets = true; + myDistConvFactor = 0.485; + myRangeConvFactor = 1.0; + myDiffConvFactor = .006; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myRequestIOPackets = true; + myTableSensingIR = true; + myNewTableSensingIR = true; + myFrontBumpers = true; + myRearBumpers = true; + + myNumIR = 4; + internalSetIR(0, 1, 2, 333, -233); + internalSetIR(1, 1, 2, 333, 233); + internalSetIR(2, 1, 2, -2, -116); + internalSetIR(3, 1, 2, -2, 116); + + myNumSonar = 32; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -20, 136, 90); + internalSetSonar(9, 24, 119, 50); + internalSetSonar(10, 58, 78, 30); + internalSetSonar(11, 77, 27, 10); + internalSetSonar(12, 77, -27, -10); + internalSetSonar(13, 58, -78, -30); + internalSetSonar(14, 24, -119, -50); + internalSetSonar(15, -20, -136, -90); + + internalSetSonar(16, -157, -136, -90); + internalSetSonar(17, -203, -119, -130); + internalSetSonar(18, -237, -78, -150); + internalSetSonar(19, -255, -27, -170); + internalSetSonar(20, -255, 27, 170); + internalSetSonar(21, -237, 78, 150); + internalSetSonar(22, -203, 119, 130); + internalSetSonar(23, -157, 136, 90); + + internalSetSonar(24, -191, -136, -90); + internalSetSonar(25, -237, -119, -130); + internalSetSonar(26, -271, -78, -150); + internalSetSonar(27, -290, -27, -170); + internalSetSonar(28, -290, 27, 170); + internalSetSonar(29, -271, 78, 150); + internalSetSonar(30, -237, 119, 130); + internalSetSonar(31, -191, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 21; + getLaserData(1)->myLaserY = 0; + } + + + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setRobotAuxPort(1); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotP3DXSH::ArRobotP3DXSH(const char *dir) +{ + sprintf(mySubClass, "p3dx-sh"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 511; + myRobotLengthFront = 210; + myRobotLengthRear = 301; + + myNumSonar = 16; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 21; + getLaserData(1)->myLaserY = 0; + } + + myGPSX = -160; + myGPSY = 120; + sprintf(myGPSType, "novatel"); + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotP3ATSH::ArRobotP3ATSH(const char *dir) +{ + sprintf(mySubClass, "p3at-sh"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0034; + myRobotWidth = 505; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 125; + getLaserData(1)->myLaserY = 0; + } + myGPSX = -160; + myGPSY = 120; + sprintf(myGPSType, "novatel"); + + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotP3ATIWSH::ArRobotP3ATIWSH(const char *dir) +{ + sprintf(mySubClass, "p3atiw-sh"); + myRobotRadius = 500; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 300; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0034; + myRobotWidth = 490; + myRobotLength = 626; + myRobotLengthFront = 313; + myRobotLengthRear = 313; + + myNumSonar = 16; + internalSetSonar(0, 147, 136, 90); + internalSetSonar(1, 193, 119, 50); + internalSetSonar(2, 227, 79, 30); + internalSetSonar(3, 245, 27, 10); + internalSetSonar(4, 245, -27, -10); + internalSetSonar(5, 227, -79, -30); + internalSetSonar(6, 193, -119, -50); + internalSetSonar(7, 147, -136, -90); + + internalSetSonar(8, -144, -136, -90); + internalSetSonar(9, -189, -119, -130); + internalSetSonar(10, -223, -79, -150); + internalSetSonar(11, -241, -27, -170); + internalSetSonar(12, -241, 27, 170); + internalSetSonar(13, -223, 79, 150); + internalSetSonar(14, -189, 119, 130); + internalSetSonar(15, -144, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 125; + getLaserData(1)->myLaserY = 0; + } + + myGPSX = -160; + myGPSY = 120; + sprintf(myGPSType, "novatel"); + + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotPatrolBotSH::ArRobotPatrolBotSH(const char *dir) +{ + sprintf(mySubClass, "patrolbot-sh"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 510; + myRobotLengthFront = 255; + myRobotLengthRear = 255; + + myFrontBumpers = true; + myNumFrontBumpers = 6; + myRearBumpers = true; + myNumRearBumpers = 6; + + myNumSonar = 16; + internalSetSonar(0, 83, 229, 90); + internalSetSonar(1, 169, 202, 55); + internalSetSonar(2, 232, 134, 30); + internalSetSonar(3, 263, 46, 10); + internalSetSonar(4, 263, -46, -10); + internalSetSonar(5, 232, -134, -30); + internalSetSonar(6, 169, -202, -55); + internalSetSonar(7, 83, -229, -90); + + internalSetSonar(8, -83, -229, -90); + internalSetSonar(9, -169, -202, -125); + internalSetSonar(10, -232, -134, -150); + internalSetSonar(11, -263, -46, -170); + internalSetSonar(12, -263, 46, 170); + internalSetSonar(13, -232, 134, 150); + internalSetSonar(14, -169, 202, 125); + internalSetSonar(15, -83, 229, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 37; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + getLaserData(1)->myLaserPowerControlled = false; + strcpy(getLaserData(1)->myLaserIgnore, + "-76--72 72-76"); + } + + if (getLaserData(2) != NULL) + { + sprintf(getLaserData(2)->myLaserType, "urg"); + sprintf(getLaserData(2)->myLaserPortType, "serial"); + sprintf(getLaserData(2)->myLaserPort, "COM5"); + getLaserData(2)->myLaserX = 200; + getLaserData(2)->myLaserY = 0; + getLaserData(2)->myLaserFlipped = true; + sprintf(getLaserData(2)->myLaserStartDegrees, "-55"); + sprintf(getLaserData(2)->myLaserEndDegrees, "55"); + sprintf(getLaserData(2)->myLaserIncrement, "1.0"); + } + + + myRequestIOPackets = true; + + + + + myPTZParams[0].setType("vcc4"); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotPeopleBotSH::ArRobotPeopleBotSH(const char *dir) +{ + sprintf(mySubClass, "peoplebot-sh"); + myRobotRadius = 340; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myRequestIOPackets = true; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .006; + myRobotWidth = 425; + myRobotLength = 513; + + myRequestIOPackets = true; + myTableSensingIR = true; + myNewTableSensingIR = true; + myFrontBumpers = true; + myRearBumpers = true; + + myNumIR = 4; + internalSetIR(0, 1, 2, 333, -233); + internalSetIR(1, 1, 2, 333, 233); + internalSetIR(2, 1, 2, -2, -116); + internalSetIR(3, 1, 2, -2, 116); + + myNumSonar = 32; + internalSetSonar(0, 69, 136, 90); + internalSetSonar(1, 114, 119, 50); + internalSetSonar(2, 148, 78, 30); + internalSetSonar(3, 166, 27, 10); + internalSetSonar(4, 166, -27, -10); + internalSetSonar(5, 148, -78, -30); + internalSetSonar(6, 114, -119, -50); + internalSetSonar(7, 69, -136, -90); + + internalSetSonar(8, -157, -136, -90); + internalSetSonar(9, -203, -119, -130); + internalSetSonar(10, -237, -78, -150); + internalSetSonar(11, -255, -27, -170); + internalSetSonar(12, -255, 27, 170); + internalSetSonar(13, -237, 78, 150); + internalSetSonar(14, -203, 119, 130); + internalSetSonar(15, -157, 136, 90); + + internalSetSonar(16, -20, 136, 90); + internalSetSonar(17, 24, 119, 50); + internalSetSonar(18, 58, 78, 30); + internalSetSonar(19, 77, 27, 10); + internalSetSonar(20, 77, -27, -10); + internalSetSonar(21, 58, -78, -30); + internalSetSonar(22, 24, -119, -50); + internalSetSonar(23, -20, -136, -90); + + internalSetSonar(24, -191, -136, -90); + internalSetSonar(25, -237, -119, -130); + internalSetSonar(26, -271, -78, -150); + internalSetSonar(27, -290, -27, -170); + internalSetSonar(28, -290, 27, 170); + internalSetSonar(29, -271, 78, 150); + internalSetSonar(30, -237, 119, 130); + internalSetSonar(31, -191, 136, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 21; + getLaserData(1)->myLaserY = 0; + } + + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setInverted(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); + myVideoParams[0].setInverted(true); +} + + +AREXPORT ArRobotPowerBotSH::ArRobotPowerBotSH(const char *dir) +{ + + sprintf(mySubClass, "powerbot-sh"); + myRobotRadius = 550; + myRobotDiagonal = 240; + myAbsoluteMaxRVelocity = 360; + myAbsoluteMaxVelocity = 2000; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .00373; + myRobotWidth = 680; + myRobotLength = 911; + myRobotLengthFront = 369; + myRobotLengthRear = 542; + + myFrontBumpers = true; + myNumFrontBumpers = 7; + myRearBumpers = true; + myNumRearBumpers = 5; + myNumSonar = 32; + internalSetSonar(0, 152, 278, 90); + internalSetSonar(1, 200, 267, 65); + internalSetSonar(2, 241, 238, 45); + internalSetSonar(3, 274, 200, 35); + internalSetSonar(4, 300, 153, 25); + internalSetSonar(5, 320, 96, 15); + internalSetSonar(6, 332, 33, 5); + internalSetSonar(7, 0, 0, -180); + + internalSetSonar(8, 332, -33, -5); + internalSetSonar(9, 320, -96, -15); + internalSetSonar(10, 300, -153, -25); + internalSetSonar(11, 274, -200, -35); + internalSetSonar(12, 241, -238, -45); + internalSetSonar(13, 200, -267, -65); + internalSetSonar(14, 152, -278, -90); + internalSetSonar(15, 0, 0, -180); + + internalSetSonar(16, -298, -278, -90); + internalSetSonar(17, -347, -267, -115); + internalSetSonar(18, -388, -238, -135); + internalSetSonar(19, -420, -200, -145); + internalSetSonar(20, -447, -153, -155); + internalSetSonar(21, -467, -96, -165); + internalSetSonar(22, -478, -33, -175); + internalSetSonar(23, 0, 0, -180); + + internalSetSonar(24, -478, 33, 175); + internalSetSonar(25, -467, 96, 165); + internalSetSonar(26, -447, 153, 155); + internalSetSonar(27, -420, 200, 145); + internalSetSonar(28, -388, 238, 135); + internalSetSonar(29, -347, 267, 115); + internalSetSonar(30, -298, 278, 90); + internalSetSonar(31, 0, 0, -180); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM2"); + getLaserData(1)->myLaserX = 251; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + } + + sprintf(myGPSPort, "COM3"); // swap laser and hypothetical GPS + + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + + +AREXPORT ArRobotPowerBotSHuARCS::ArRobotPowerBotSHuARCS(const char *dir) +{ + + sprintf(mySubClass, "powerbot-sh-uarcs"); + myRobotRadius = 550; + myRobotDiagonal = 240; + myAbsoluteMaxRVelocity = 360; + myAbsoluteMaxVelocity = 2000; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .00373; + myRobotWidth = 680; + myRobotLength = 911; + myRobotLengthFront = 369; + myRobotLengthRear = 542; + + myFrontBumpers = true; + myNumFrontBumpers = 7; + myRearBumpers = true; + myNumRearBumpers = 5; + myNumSonar = 16; + + internalSetSonar(0, -298, -278, -90); + internalSetSonar(1, -347, -267, -115); + internalSetSonar(2, -388, -238, -135); + internalSetSonar(3, -420, -200, -145); + internalSetSonar(4, -447, -153, -155); + internalSetSonar(5, -467, -96, -165); + internalSetSonar(6, -478, -33, -175); + internalSetSonar(7, 0, 0, -180); + + internalSetSonar(8, -478, 33, 175); + internalSetSonar(9, -467, 96, 165); + internalSetSonar(10, -447, 153, 155); + internalSetSonar(11, -420, 200, 145); + internalSetSonar(12, -388, 238, 135); + internalSetSonar(13, -347, 267, 115); + internalSetSonar(14, -298, 278, 90); + internalSetSonar(15, 0, 0, -180); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM2"); + getLaserData(1)->myLaserX = 251; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + } + + sprintf(myGPSPort, "COM3"); // swap laser and hypothetical GPS +} + +AREXPORT ArRobotWheelchairSH::ArRobotWheelchairSH(const char *dir) +{ + sprintf(mySubClass, "wheelchair-sh"); + myRobotRadius = 550; + myRobotDiagonal = 300; + myAbsoluteMaxRVelocity = 360; + myAbsoluteMaxVelocity = 2000; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .00373; + myRobotWidth = 680; + myRobotLength = 1340; + + myFrontBumpers = true; + myNumFrontBumpers = 4; + myRearBumpers = true; + myNumRearBumpers = 3; + myNumSonar = 0; + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM2"); + getLaserData(1)->myLaserX = -418; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + getLaserData(1)->myLaserPowerControlled = true; + } + + mySettableAccsDecs = true; + mySettableVelMaxes = false; + myTransVelMax = 0; + myRotVelMax = 0; + myTransAccel = 0; + myTransDecel = 0; + myRotAccel = 0; + myRotDecel = 0; + + sprintf(myGPSPort, "COM3"); // swap laser and hypothetical GPS +} + +AREXPORT ArRobotSeekur::ArRobotSeekur(const char *dir) +{ + sprintf(mySubClass, "seekur"); + myRobotRadius = 833; + myRobotDiagonal = 400; + myAbsoluteMaxRVelocity = 190; + myAbsoluteMaxVelocity = 2200; + myAbsoluteMaxLatVelocity = 2200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0056; + myRobotWidth = 1270; + myRobotLength = 1410; + + myHaveMoveCommand = 0; + myFrontBumpers = true; + myNumFrontBumpers = 5; + myRearBumpers = true; + myNumRearBumpers = 3; + myNumSonar = 0; + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 690; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = false; + getLaserData(1)->myLaserPowerControlled = true; + + } + + mySettableAccsDecs = true; + myTransVelMax = 0; + myRotVelMax = 0; + myTransAccel = 0; + myTransDecel = 0; + myRotAccel = 0; + myRotDecel = 0; + + myHasLatVel = true; + + myGPSX = -200; + myGPSY = 0; + sprintf(myGPSPort, "COM2"); + sprintf(myGPSType, "trimble"); + myGPSBaud = 38400; + + + + + myPTZParams[0].setType("rvision"); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +AREXPORT ArRobotMT400::ArRobotMT400(const char *dir) +{ + sprintf(mySubClass, "mt400"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 510; + myRobotLengthFront = 255; + myRobotLengthRear = 255; + + myFrontBumpers = true; + myNumFrontBumpers = 6; + myRearBumpers = true; + myNumRearBumpers = 6; + + myNumSonar = 16; + internalSetSonar(0, 83, 229, 90); + internalSetSonar(1, 169, 202, 55); + internalSetSonar(2, 232, 134, 30); + internalSetSonar(3, 263, 46, 10); + internalSetSonar(4, 263, -46, -10); + internalSetSonar(5, 232, -134, -30); + internalSetSonar(6, 169, -202, -55); + internalSetSonar(7, 83, -229, -90); + + internalSetSonar(8, -83, -229, -90); + internalSetSonar(9, -169, -202, -125); + internalSetSonar(10, -232, -134, -150); + internalSetSonar(11, -263, -46, -170); + internalSetSonar(12, -263, 46, 170); + internalSetSonar(13, -232, 134, 150); + internalSetSonar(14, -169, 202, 125); + internalSetSonar(15, -83, 229, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 37; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + getLaserData(1)->myLaserPowerControlled = false; + strcpy(getLaserData(1)->myLaserIgnore, + "-76--72 72-76"); + } + + if (getLaserData(2) != NULL) + { + sprintf(getLaserData(2)->myLaserType, "urg"); + sprintf(getLaserData(2)->myLaserPortType, "serial"); + sprintf(getLaserData(2)->myLaserPort, "COM5"); + getLaserData(2)->myLaserX = 200; + getLaserData(2)->myLaserY = 0; + getLaserData(2)->myLaserFlipped = true; + sprintf(getLaserData(2)->myLaserStartDegrees, "-120"); + sprintf(getLaserData(2)->myLaserEndDegrees, "120"); + sprintf(getLaserData(2)->myLaserIncrement, "1.0"); + } + + + myRequestIOPackets = true; + + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + +AREXPORT ArRobotResearchPB::ArRobotResearchPB(const char *dir) +{ + sprintf(mySubClass, "researchPB"); + myRobotRadius = 250; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 500; + myAbsoluteMaxVelocity = 2200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myRobotWidth = 425; + myRobotLength = 510; + myRobotLengthFront = 255; + myRobotLengthRear = 255; + + myFrontBumpers = true; + myNumFrontBumpers = 6; + myRearBumpers = true; + myNumRearBumpers = 6; + + myNumSonar = 16; + internalSetSonar(0, 83, 229, 90); + internalSetSonar(1, 169, 202, 55); + internalSetSonar(2, 232, 134, 30); + internalSetSonar(3, 263, 46, 10); + internalSetSonar(4, 263, -46, -10); + internalSetSonar(5, 232, -134, -30); + internalSetSonar(6, 169, -202, -55); + internalSetSonar(7, 83, -229, -90); + + internalSetSonar(8, -83, -229, -90); + internalSetSonar(9, -169, -202, -125); + internalSetSonar(10, -232, -134, -150); + internalSetSonar(11, -263, -46, -170); + internalSetSonar(12, -263, 46, 170); + internalSetSonar(13, -232, 134, 150); + internalSetSonar(14, -169, 202, 125); + internalSetSonar(15, -83, 229, 90); + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms2xx"); + sprintf(getLaserData(1)->myLaserPortType, "serial"); + sprintf(getLaserData(1)->myLaserPort, "COM3"); + getLaserData(1)->myLaserX = 37; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = true; + getLaserData(1)->myLaserPowerControlled = false; + strcpy(getLaserData(1)->myLaserIgnore, + "-76--72 72-76"); + } + + if (getLaserData(2) != NULL) + { + sprintf(getLaserData(2)->myLaserType, "urg"); + sprintf(getLaserData(2)->myLaserPortType, "serial"); + sprintf(getLaserData(2)->myLaserPort, "COM5"); + getLaserData(2)->myLaserX = 200; + getLaserData(2)->myLaserY = 0; + getLaserData(2)->myLaserFlipped = true; + sprintf(getLaserData(2)->myLaserStartDegrees, "-55"); + sprintf(getLaserData(2)->myLaserEndDegrees, "55"); + sprintf(getLaserData(2)->myLaserIncrement, "1.0"); + } + + + myRequestIOPackets = true; + + + + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + +AREXPORT ArRobotSeekurJr::ArRobotSeekurJr(const char *dir) +{ + sprintf(mySubClass, "seekurjr"); + myRobotRadius = 600; + myRobotDiagonal = 600; + myAbsoluteMaxRVelocity = 80; + myAbsoluteMaxVelocity = 1200; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = .0056; + myRobotWidth = 830; + myRobotLength = 1200; + + myHaveMoveCommand = 0; + myFrontBumpers = true; + myNumFrontBumpers = 4; + myRearBumpers = true; + myNumRearBumpers = 4; + myNumSonar = 0; + + if (getLaserData(1) != NULL) + { + sprintf(getLaserData(1)->myLaserType, "lms1XX"); + sprintf(getLaserData(1)->myLaserPortType, "tcp"); + sprintf(getLaserData(1)->myLaserPort, "192.168.0.1"); + getLaserData(1)->myLaserX = 527; + getLaserData(1)->myLaserY = 0; + getLaserData(1)->myLaserFlipped = false; + getLaserData(1)->myLaserPowerControlled = false; + sprintf(getLaserData(1)->myLaserStartDegrees, "-117"); + sprintf(getLaserData(1)->myLaserEndDegrees, "117"); + } + + if (getLaserData(2) != NULL) + { + sprintf(getLaserData(2)->myLaserType, "lms1XX"); + sprintf(getLaserData(2)->myLaserPortType, "tcp"); + sprintf(getLaserData(2)->myLaserPort, "192.168.0.2"); + getLaserData(2)->myLaserX = -527; + getLaserData(2)->myLaserY = 0; + getLaserData(2)->myLaserFlipped = false; + getLaserData(2)->myLaserPowerControlled = false; + sprintf(getLaserData(2)->myLaserStartDegrees, "-117"); + sprintf(getLaserData(2)->myLaserEndDegrees, "117"); + } + + mySettableAccsDecs = true; + myTransVelMax = 0; + myRotVelMax = 0; + myTransAccel = 0; + myTransDecel = 0; + myRotAccel = 0; + myRotDecel = 0; + + myGPSX = 0; + myGPSY = 0; + sprintf(myGPSPort, "COM2"); + sprintf(myGPSType, "trimble"); + myGPSBaud = 38400; + + myPTZParams[0].setType("rvision"); + myPTZParams[0].setConnect(true); +#ifdef WIN32 + myVideoParams[0].setType("sx11"); +#else + myVideoParams[0].setType("v4l"); +#endif + myVideoParams[0].setConnect(true); +} + +AREXPORT ArRobotP3DXSH_lms1xx::ArRobotP3DXSH_lms1xx(const char *dir) : + ArRobotP3DXSH(dir) +{ + sprintf(mySubClass, "p3dx-sh-lms1xx"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms1XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 55; + } +} + +AREXPORT ArRobotP3ATSH_lms1xx::ArRobotP3ATSH_lms1xx(const char *dir) : + ArRobotP3ATSH(dir) +{ + sprintf(mySubClass, "p3at-sh-lms1xx"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms1XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 197; + } +} + +AREXPORT ArRobotPeopleBotSH_lms1xx::ArRobotPeopleBotSH_lms1xx(const char *dir) : + ArRobotPeopleBotSH(dir) +{ + sprintf(mySubClass, "peoplebot-sh-lms1xx"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms1XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 55; + } +} + +AREXPORT ArRobotP3DXSH_lms500::ArRobotP3DXSH_lms500(const char *dir) : + ArRobotP3DXSH(dir) +{ + sprintf(mySubClass, "p3dx-sh-lms500"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms5XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 21; + } +} + +AREXPORT ArRobotP3ATSH_lms500::ArRobotP3ATSH_lms500(const char *dir) : + ArRobotP3ATSH(dir) +{ + sprintf(mySubClass, "p3at-sh-lms500"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms5XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 125; + } +} + +AREXPORT ArRobotPeopleBotSH_lms500::ArRobotPeopleBotSH_lms500(const char *dir) : + ArRobotPeopleBotSH(dir) +{ + sprintf(mySubClass, "peoplebot-sh-lms500"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms5XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 21; + } +} + +AREXPORT ArRobotPowerBotSH_lms500::ArRobotPowerBotSH_lms500(const char *dir) : + ArRobotPowerBotSH(dir) +{ + sprintf(mySubClass, "powerbot-sh-lms500"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms5XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 251; + } +} + +AREXPORT ArRobotResearchPB_lms500::ArRobotResearchPB_lms500(const char *dir) : + ArRobotResearchPB(dir) +{ + sprintf(mySubClass, "researchPB-lms500"); + if(LaserData* ld = getLaserData(1)) + { + sprintf(ld->myLaserType, "lms5XX"); + sprintf(ld->myLaserPortType, "tcp"); + sprintf(ld->myLaserPort, "192.168.0.1"); + ld->myLaserX = 37; + } +} + +AREXPORT ArRobotPioneerLX::ArRobotPioneerLX(const char *dir) +{ + sprintf(myClass, "MTX"); + sprintf(mySubClass, "pioneer-lx"); + myRobotRadius = 348; + myRobotDiagonal = 120; + myAbsoluteMaxRVelocity = 180; + myAbsoluteMaxVelocity = 2500; + myDistConvFactor = 1.0; + myRangeConvFactor = 1.0; + myDiffConvFactor = 0.0056; + myVelConvFactor = 1.0; + myRobotWidth = 500; + myRobotLength = 696; + myRobotLengthFront = 348; + myRobotLengthRear = 348; + + myFrontBumpers = true; + myNumFrontBumpers = 4; + myRearBumpers = false; + myNumRearBumpers = 0; + + LaserData *laser = NULL; + if ( (laser = getLaserData(1)) != NULL) + { + sprintf(laser->myLaserType, "s3series"); + sprintf(laser->myLaserPortType, "serial422"); + sprintf(laser->myLaserPort, "/dev/ttyUSB4"); + sprintf(laser->myLaserStartingBaudChoice, "230400"); + laser->myLaserX = 267; + laser->myLaserY = 0; + laser->myLaserZ = 190; + laser->myLaserFlipped = true; + laser->myLaserPowerControlled = false; + strcpy(laser->myLaserIgnore, + "-135--120 120-135"); + laser->myLaserAutoConnect = true; + } + + if(LCDMTXBoardData *lcd = getLCDMTXBoardData(1)) + { + sprintf(lcd->myLCDMTXBoardType, "mtx"); + sprintf(lcd->myLCDMTXBoardPortType, "serial422"); + sprintf(lcd->myLCDMTXBoardPort, "/dev/ttyUSB8"); + lcd->myLCDMTXBoardBaud = 115200; + lcd->myLCDMTXBoardAutoConn = true; + } + + if(SonarMTXBoardData *sonar = getSonarMTXBoardData(1)) + { + sprintf(sonar->mySonarMTXBoardType, "mtx"); + sprintf(sonar->mySonarMTXBoardPortType, "serial422"); + sprintf(sonar->mySonarMTXBoardPort, "/dev/ttyUSB2"); + sonar->mySonarMTXBoardBaud = 115200; + sonar->mySonarMTXBoardAutoConn = true; + sonar->myNumSonarTransducers = 8; + } + + /* + if(SonarMTXBoardData *sonar = getSonarMTXBoardData(2)) + { + sprintf(sonar->mySonarMTXBoardType, "mtx"); + sprintf(sonar->mySonarMTXBoardPortType, "serial422"); + //sprintf(sonar->mySonarMTXBoardPort, "/dev/ttyUSB2"); // <- what is the usb port? + sonar->mySonarMTXBoardBaud = 115200; + sonar->mySonarMTXBoardAutoConn = false; + sonar->myNumSonarTransducers = 8; + } + */ + + myNumSonar = 8; + // # x y th + internalSetSonar(0, 324, 90, 16); + internalSetSonar(1, 331, 607, 10); + internalSetSonar(2, 331, -607, -10); + internalSetSonar(3, 324, -90, -16); + internalSetSonar(4, -316, -90, -164); + internalSetSonar(5, -325, -30, -175); + internalSetSonar(6, -325, 30, 175); + internalSetSonar(7, -316, 90, 164); + + if(BatteryMTXBoardData *bat = getBatteryMTXBoardData(1)) + { + sprintf(bat->myBatteryMTXBoardType, "mtx"); + sprintf(bat->myBatteryMTXBoardPortType, "serial"); + sprintf(bat->myBatteryMTXBoardPort, "/dev/ttyUSB1"); + bat->myBatteryMTXBoardBaud = 115200; + bat->myBatteryMTXBoardAutoConn = true; + } + + myRequestIOPackets = true; + + myPTZParams[0].setType("vapix"); + myPTZParams[0].setConnect(true); + myVideoParams[0].setType("vapix"); + myVideoParams[0].setConnect(true); +} + +/** @endcond INCLUDE_INTERNAL_ROBOT_PARAM_CLASSES */ diff --git a/Legacy/Aria/src/ArS3Series.cpp b/Legacy/Aria/src/ArS3Series.cpp new file mode 100644 index 0000000..7d01018 --- /dev/null +++ b/Legacy/Aria/src/ArS3Series.cpp @@ -0,0 +1,1456 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArS3Series.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + +AREXPORT ArS3SeriesPacket::ArS3SeriesPacket() : +ArBasePacket(10000, 1, NULL, 1) { + +} + +AREXPORT ArS3SeriesPacket::~ArS3SeriesPacket() { + +} + +AREXPORT ArTime ArS3SeriesPacket::getTimeReceived(void) { + return myTimeReceived; +} + +AREXPORT void ArS3SeriesPacket::setTimeReceived(ArTime timeReceived) { + myTimeReceived = timeReceived; +} + +AREXPORT void ArS3SeriesPacket::duplicatePacket(ArS3SeriesPacket *packet) { + myLength = packet->getLength(); + myReadLength = packet->getReadLength(); + myTimeReceived = packet->getTimeReceived(); + myDataLength = packet->myDataLength; + myNumReadings = packet->myNumReadings; + myStatusByte = packet->myStatusByte; + myTimeStampByte1 = packet->myTimeStampByte1; + myTimeStampByte2 = packet->myTimeStampByte2; + myTimeStampByte3 = packet->myTimeStampByte3; + myTimeStampByte4 = packet->myTimeStampByte4; + myTelegramNumByte1 = packet->myTelegramNumByte1; + myTelegramNumByte2 = packet->myTelegramNumByte2; + myCrcByte1 = packet->myCrcByte1; + myCrcByte2 = packet->myCrcByte2; + myMonitoringDataByte1 = packet->myMonitoringDataByte1; + myMonitoringDataByte2 = packet->myMonitoringDataByte2; + myMonitoringDataAvailable = packet->myMonitoringDataAvailable; + myProtocolVersionByte1 = packet->myProtocolVersionByte1; + myProtocolVersionByte2 = packet->myProtocolVersionByte2; + + memcpy(myBuf, packet->getBuf(), myLength); +} + +AREXPORT void ArS3SeriesPacket::empty(void) { + myLength = 0; + myReadLength = 0; +} + +AREXPORT ArS3SeriesPacketReceiver::ArS3SeriesPacketReceiver() { + +} + +AREXPORT ArS3SeriesPacketReceiver::~ArS3SeriesPacketReceiver() { + +} + +AREXPORT void ArS3SeriesPacketReceiver::setDeviceConnection( + ArDeviceConnection *conn) { + myConn = conn; +} + +AREXPORT ArDeviceConnection *ArS3SeriesPacketReceiver::getDeviceConnection(void) { + return myConn; +} + +ArS3SeriesPacket *ArS3SeriesPacketReceiver::receivePacket(unsigned int msWait, + bool startMode) { + + ArS3SeriesPacket *packet; + unsigned char c; + long timeToRunFor; + ArTime timeDone; + ArTime lastDataRead; + ArTime packetReceived; + int i; + + if (myConn == NULL || myConn->getStatus() + != ArDeviceConnection::STATUS_OPEN) { + return NULL; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Verbose, "%s::receivePacket() error adding msecs (%i)", + myName, msWait); + } + msWait = 10; + + do { + myConn->debugStartPacket(); + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + /* + ArLog::log(ArLog::Terse, + "%s::receivePacket() timeToRunFor = %d", + myName, timeToRunFor); + */ + + myPacket.empty(); + myPacket.setLength(0); + myReadCount = 0; + + unsigned char firstbytelen; + unsigned char secondbytelen; + unsigned char temp[4]; + + unsigned char crcbuf[10000]; + int n = 0; + + // look for initial sequence 0x00 0x00 0x00 0x00 + for (i = 0; i < 4; i++) { + if ((myConn->read((char *) &c, 1, 200)) > 0) { + if (c != 0x00) { + //ArLog::log(ArLog::Terse, + // "ArS3Series::receivePacket() error reading first 4 bytes of header"); + break; + } + if (i == 0) { + + packetReceived = myConn->getTimeRead(0); + myPacket.setTimeReceived(packetReceived); + } + myConn->debugBytesRead(1); + } else { + /* don't log this if we are in starting mode, means laser is not connecting */ + if (startMode) + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (header)", + myName); + myConn->debugEndPacket(false, -10); + return NULL; + } + } // end for + + if (c != 0x00) + { + myConn->debugEndPacket(false, -11); + continue; + } + + // next 2 bytes = 0x00 0x00 - data block number + for (i = 0; i < 2; i++) { + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + myConn->debugBytesRead(1); + if (c != 0x00) { + //ArLog::log(ArLog::Terse, + // "ArS3Series::receivePacket() error data block number in header"); + break; + } + } else { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (data block number)", + myName); + myConn->debugEndPacket(false, -20); + return NULL; + } + } // end for + + if (c != 0x00) + { + myConn->debugEndPacket(false, -21); + continue; + } + + crcbuf[n++] = 0; + crcbuf[n++] = 0; + + // next 2 bytes are length, i think they are swapped so we need to mess with them + + for (i = 0; i < 2; i++) { + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + myConn->debugBytesRead(1); + temp[i] = c; + crcbuf[n++] = c; + } else { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (length)", + myName); + myConn->debugEndPacket(false, -30); + return NULL; + } + } // end for + + firstbytelen = temp[0]; + secondbytelen = temp[1]; + + // do we need to validate byte length + int datalen = secondbytelen | (firstbytelen << 8); + + // double it as this is 2 byte pairs of readings + // and take off the header of 17 bytes + myPacket.setDataLength((datalen * 2) - 17); + //printf("datalength = %d \n",myPacket.getDataLength()); + + // the number of reading is going to be 4 bytes less as there's + // a bb bb and 11 11 (which are ID for measurement data and ID + // for measured values from angular range 1 + myPacket.setNumReadings(((myPacket.getDataLength() - 5) / 2) - 1); + + if (myPacket.getNumReadings() < 0) { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (header - bad number of readings) %d %d", + myName, firstbytelen, secondbytelen); + myConn->debugEndPacket(false, -40); + return NULL; + } + + /* + //ArLog::Terse, + ArLog::log(ArLog::Normal, + "%s::receivePacket() Number of readings = %d %d %d", myName, myPacket.getNumReadings(), firstbytelen, secondbytelen); + */ + + // next 2 bytes need to be 0xff & 0x07 + for (i = 0; i < 2; i++) { + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + myConn->debugBytesRead(1); + temp[i] = c; + crcbuf[n++] = c; + } else { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (coordination flag and device code)", + myName); + myConn->debugEndPacket(false, -50); + return NULL; + } + } // end for + + if (temp[0] != 0xff || temp[1] != 0x07) + { + /* + ArLog::Terse, + ArLog::log(ArLog::Normal, + "ArS3Series::receivePacket() co-oridination flag and device code error"); + */ + myConn->debugEndPacket(false, -51); + continue; + } + + // next 2 bytes are protocol version to be 0x02 & 0x01 + + for (i = 0; i < 2; i++) { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + myConn->debugBytesRead(1); + temp[i] = c; + crcbuf[n++] = c; + } + else + { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (protocol version?)", + myName); + myConn->debugEndPacket(false, -55); + return NULL; + } + } // end for + + // we have an old S3000 who's protocol is 00 01, later versions are 02 01 + // PS 6/11/13 - for Expert CMS protocol version is 03 01 + if ((temp[0] == 0x00 || temp[1] == 0x01) || + (temp[0] == 0x02 || temp[1] == 0x01) || + (temp[0] == 0x03 || temp[1] == 0x01)) + { + myPacket.setProtocolVersionByte1(temp[0]); + myPacket.setProtocolVersionByte2(temp[1]); + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() protocol version error (0x%02x 0x%02x)", + myName, temp[0], temp[1]); + myConn->debugEndPacket(false, -56); + continue; + } + + // next 1 byte is status flag + + for (i = 0; i < 1; i++) + { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + myConn->debugBytesRead(1); + temp[i] = c; + crcbuf[n++] = c; + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (status flag?)", + myName); + myConn->debugEndPacket(false, -60); + return NULL; + } + } // end for + + myPacket.setStatusByte(temp[0]); + + // next 4 bytes are timestamp + + for (i = 0; i < 4; i++) + { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + myConn->debugBytesRead(1); + temp[i] = c; + crcbuf[n++] = c; + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (time stamp)", + myName); + myConn->debugEndPacket(false, -70); + return NULL; + } + } // end for + + myPacket.setTimeStampByte1(temp[0]); + myPacket.setTimeStampByte2(temp[1]); + myPacket.setTimeStampByte3(temp[2]); + myPacket.setTimeStampByte4(temp[3]); + + /* + ArLog::log( + ArLog::Terse, + "%s::receivePacket() Time stamp = %x %x %x %x ", + myName, temp[0],temp[1],temp[2],temp[3]); + */ + + // next 2 bytes are telegram number + + for (i = 0; i < 2; i++) + { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + myConn->debugBytesRead(1); + temp[i] = c; + crcbuf[n++] = c; + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (telegram number)", + myName); + myConn->debugEndPacket(false, -80); + return NULL; + } + } // end for + + myPacket.setTelegramNumByte1(temp[0]); + myPacket.setTelegramNumByte2(temp[1]); + + /* + ArLog::log( + ArLog::Terse, + "%s::receivePacket() Telegram number = %d ", + myName, myPacket.getTelegramNumByte2()); + */ + /// MPL this timeout was 5000, but I've made it 200 + /// since the number of readings could be bogus and we + /// don't want to go 5 seconds with no readings + int numRead = myConn->read((char *) &myReadBuf[0], + // PS 12/10/12 - change to 400 + myPacket.getDataLength(), 400); + //myPacket.getDataLength(), 200); + + // trap if we failed the read + if (numRead < 0) { + ArLog::log(ArLog::Terse, "%s::receivePacket() Failed read (%d)", + myName, numRead); + myConn->debugEndPacket(false, -90); + return NULL; + } + myConn->debugBytesRead(numRead); + /* + ArLog::log(ArLog::Terse, + "%s::receivePacket() Number of bytes read = %d", myName, + numRead); + */ + +#if 0 // for raw trace + char obuf[10000]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < myPacket.getDataLength() - 2; i++) { + sprintf (&obuf[j], "_%02x", myReadBuf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "%s::receivePacket() packet = %s ",myName, obuf); +#endif + + //printf("\nhere's the data from packetrecieve\n "); + //for (i = 0; i < myPacket.getDataLength(); i++) { + //strip out first 3 bytes + //if ((i > 5) && ((i % 2 == 0))) + //myReadBuf[i] = myReadBuf[i] && 0x1f; + + //printf("%x ", myReadBuf[i]); + //} + + //printf("\n"); + // and finally the crc + + // start after the 00 bb bb 11 11 and put the + // raw readings into myReadBuf + //printf("\nhere's the raw readings\n "); + //for (i=5; i<(myNumReadings * 2); i+2) + // { + // // this my be backwards + // myReadBuf[i] = myReadBuf[i] && 0x1f; + // printf("%x %x",myReadBuf[i],myReadBuf[i+1]); + // } + + for (i = 0; i < 2; i++) + { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + myConn->debugBytesRead(1); + temp[i] = c; + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (crc)", myName); + myConn->debugEndPacket(false, -100); + return NULL; + } + } // end for + myPacket.setCrcByte1(temp[0]); + myPacket.setCrcByte2(temp[1]); + +#if 0 + // Matt put this check in to look for 0's in the data - not sure why + int numZeros = 0; + for (i = 5; i < myPacket.getDataLength(); i++) { + if (myReadBuf[i] == 0) + numZeros++; + else + numZeros = 0; + + if (numZeros >= 4) { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (got 4 zeros in data)", + myName); + myConn->debugEndPacket(false, -110); + return NULL; + } + } +#endif + + memcpy(&crcbuf[n], &myReadBuf[0], myPacket.getDataLength()); + +#if 0 // for raw trace + char obuf[10000]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < myPacket.getDataLength() + n; i++) { +// to show header + data uncomment out below +// sprintf (&obuf[j], "_%02x", myReadBuf[i]); + sprintf (&obuf[j], "_%02x", crcbuf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "%s::receivePacket() packet = %s ",myName, obuf); +#endif + + // now go validate the crc + + unsigned short crc = CRC16(crcbuf, myPacket.getDataLength() + n); + + unsigned short incrc = (temp[1] << 8) | temp[0]; + + if (incrc != crc) + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() CRC error (in = 0x%02x calculated = 0x%02x) ", + myName, incrc, crc); + myConn->debugEndPacket(false, -120); + return NULL; + } + + // PS 7/5/11 - there are 5 bytes of 00 bb bb 11 11 at the start of + // the buffer - which is the ID for measured data from measuring + // range 1, so skip over those so that we have the begining of + // the readings - note if Range 2-5 are configured, then the id's + // for those would be 22 22, 33 33, etc - we only support range 1 (ie 11 11) + + myPacket.setMonitoringDataAvailable(false); + if ((myReadBuf[1] == 0xaa) && (myReadBuf[2] == 0xaa)) { + + //ArLog::log(ArLog::Normal, "%s::receivePacket() measured data = %02x %02x", + // myName, myReadBuf[3], myReadBuf[4]); + + myPacket.setDataLength((datalen * 2) - 21); + myPacket.setNumReadings(((myPacket.getDataLength() - 5) / 2) - 1); + + myPacket.setMonitoringDataAvailable(true); + myPacket.setMonitoringDataByte1(myReadBuf[3]); + myPacket.setMonitoringDataByte2(myReadBuf[4]); + + myPacket.dataToBuf(&myReadBuf[9], myPacket.getNumReadings() * 2); + } + else + myPacket.dataToBuf(&myReadBuf[5], myPacket.getNumReadings() * 2); + + myPacket.resetRead(); + packet = new ArS3SeriesPacket; + packet->duplicatePacket(&myPacket); + myConn->debugEndPacket(true, 1); + /* + ArLog::log(ArLog::Normal, + "%s::receivePacket() returning packet %d %d", myName, packet->getNumReadings(), myPacket.getNumReadings()); + */ + + myPacket.empty(); + + return packet; + + } while (timeDone.mSecTo() >= 0); // || !myStarting) + + ArLog::log(ArLog::Terse, "%s::receivePacket() Timeout on read", myName); + myConn->debugEndPacket(false, -130); + return NULL; +} + +AREXPORT ArS3Series::ArS3Series(int laserNumber, const char *name) : + ArLaser(laserNumber, name, 20000), + mySensorInterpTask(this, &ArS3Series::sensorInterp), + myAriaExitCB(this, &ArS3Series::disconnect) { + + //ArLog::log(ArLog::Normal, "%s: Sucessfully created", getName()); + + clear(); + myRawReadings = new std::list; + + myIsMonitoringDataAvailable = false; + + Aria::addExitCallback(&myAriaExitCB, -10); + + setInfoLogLevel(ArLog::Normal); + //setInfoLogLevel(ArLog::Terse); + + laserSetName( getName()); + + laserAllowSetPowerControlled(false); + + /* taking this out for now - PS 6/29/11 + laserAllowSetDegrees(-135, -135, 135, // start degrees + 135, -135, 135); // end degrees + + std::map incrementChoices; + incrementChoices["half"] = .5; + incrementChoices["quarter"] = .25; + laserAllowIncrementChoices("half", incrementChoices); + + laserSetDefaultTcpPort(2111); + + */ + // rh adding back in ... + laserAllowSetDegrees(-135, -135, -135, 135, 135, 135); + std::map incrementChoices; + incrementChoices["half"] = 0.5; + laserAllowIncrementChoices("half", incrementChoices); + + // PS 6/29/11 - changing to serial laserSetDefaultPortType("tcp"); + laserSetDefaultPortType("serial422"); + + // PS 6/29/11 - added baud + std::list < std::string > baudChoices; + + baudChoices.push_back("9600"); + baudChoices.push_back("19200"); + baudChoices.push_back("38400"); + baudChoices.push_back("57600"); + baudChoices.push_back("115200"); + //baudChoices.push_back("125000"); + baudChoices.push_back("230400"); + baudChoices.push_back("460800"); + + laserAllowStartingBaudChoices("38400", baudChoices); + + // PS 7/1/11 + //laserAllowAutoBaudChoices("38400", baudChoices); + + //myLogLevel = ArLog::Verbose; + //myLogLevel = ArLog::Terse; + myLogLevel = ArLog::Normal; + + setMinDistBetweenCurrent(0); + setMaxDistToKeepCumulative(4000); + setMinDistBetweenCumulative(200); + setMaxSecondsToKeepCumulative(30); + setMaxInsertDistCumulative(3000); + + setCumulativeCleanDist(75); + setCumulativeCleanInterval(1000); + setCumulativeCleanOffset(600); + + resetLastCumulativeCleanTime(); + +#if 0 + setCurrentDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0, 255), + 80, // mm diameter of dots + 75), // layer above sonar + true); + + setCumulativeDrawingData( + new ArDrawingData("polyDots", + ArColor(125, 125, 125), + 100, // mm diameter of dots + 60), // layer below current range devices + true); + +#endif + // PS make theses a different color, etc + setCurrentDrawingData( + new ArDrawingData("polyDots", ArColor(223, 223, 0), 75, // mm diameter of dots + 76), // layer above sonar + true); + + setCumulativeDrawingData( + new ArDrawingData("polyDots", ArColor(128, 128, 0), 95, // mm diameter of dots + 61), // layer below current range devices + true); + +} + +AREXPORT ArS3Series::~ArS3Series() { + Aria::remExitCallback(&myAriaExitCB); + if (myRobot != NULL) { + myRobot->remRangeDevice(this); + myRobot->remLaser(this); + myRobot->remSensorInterpTask(&mySensorInterpTask); + } + if (myRawReadings != NULL) { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + lockDevice(); + if (isConnected()) + disconnect(); + unlockDevice(); +} + +void ArS3Series::clear(void) { + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; + + myNumChans = 0; +} + +AREXPORT void ArS3Series::laserSetName(const char *name) { + myName = name; + + myConnMutex.setLogNameVar("%s::myConnMutex", getName()); + myPacketsMutex.setLogNameVar("%s::myPacketsMutex", getName()); + myDataMutex.setLogNameVar("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar("%s::exitCallback", getName()); + + ArLaser::laserSetName( getName()); +} + +AREXPORT void ArS3Series::setRobot(ArRobot *robot) { + myRobot = robot; + + if (myRobot != NULL) { + myRobot->remSensorInterpTask(&mySensorInterpTask); + myRobot->addSensorInterpTask("S3Series", 90, &mySensorInterpTask); + } + ArLaser::setRobot(robot); +} + +AREXPORT bool ArS3Series::asyncConnect(void) { + myStartConnect = true; + if (!getRunning()) + runAsync(); + return true; +} + +AREXPORT bool ArS3Series::disconnect(void) { + if (!isConnected()) + return true; + + ArLog::log(ArLog::Normal, "%s: Disconnecting", getName()); + + laserDisconnectNormally(); + return true; +} + +void ArS3Series::failedToConnect(void) { + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + laserFailedConnect(); +} + +void ArS3Series::sensorInterp(void) { + ArS3SeriesPacket *packet; + + /// MPL 2013_07_24 testing (added) + lockDevice(); + + /// MPL 2013_07_24 testing (added) + adjustRawReadings(false); + + while (1) { + myPacketsMutex.lock(); + if (myPackets.empty()) { + myPacketsMutex.unlock(); + /// MPL 2013_07_24 testing (added) + unlockDevice(); + return; + } + packet = myPackets.front(); + myPackets.pop_front(); + // MPL this was some code to only use the latest laser + // packet, but that leaked memory because the + // deleteSet wasn't there, just reverting to the old + // way (the two lines above this comment) + //packet = myPackets.back(); + //myPackets.clear(); + //ArUtil::deleteSet(myPackets.begin(), myPackets.end()); + myPacketsMutex.unlock(); + + //set up the times and poses + + ArTime time = packet->getTimeReceived(); + ArTime timeEnd = packet->getTimeReceived(); + ArPose pose; + ArPose poseEnd; + int ret; + int retEncoder; + ArPose encoderPose; + ArPose encoderPoseEnd; + int dist; + int j; + + // Packet will already be offset by 5 bytes to the start + // of the readings - for S3000 there should be 381 readings (190 degrees) + // for S300 541 readings (270 degrees) + unsigned char *buf = (unsigned char *) packet->getBuf(); + +#if 0 // tracing code + char obuf[10000]; + obuf[0] = '\0'; + int z = 0; + for (int i = 0; i < packet->getDataLength(); i++) { + sprintf (&obuf[z], "_%02x", buf[i]); + z= z+3; + } + ArLog::log (ArLog::Normal, + "%s::sensorInterp() packet = %s ", getName(), obuf); +#endif + + /* MPL 2013_07_19 moving this into the part that gets a packet so that it's not subjected to the normal cycle time + // if the monitoring data is available - send it down the firmware + + if (packet->getMonitoringDataAvailable()) { + + myIsMonitoringDataAvailable = true; + myMonitoringData = packet->getMonitoringDataByte1(); + + myRobot->comInt(217, packet->getMonitoringDataByte1()); + + } + else { + myIsMonitoringDataAvailable = false; + } + */ + + // this value should be found more empirically... but we used 1/75 + // hz for the lms2xx and it was fine, so here we'll use 1/50 hz for now + // PS 7/9/11 - not sure what this is doing???? + + // MPL 2013_06_03 - the S300 and the S3000 work + // differently for timing... on the S300 the data is + // supposed to be real time (SICK seems to disagree + // with themselves on this point), so assume no delay + // (don't change the receive time)... but on the S3000 + // there's a delay of one scan (30ms) so add that if + // the number of readings means it's an S3000 + + bool interpolateReadings = false; + if (packet->getNumReadings() == 381) /// S3000 + { + interpolateReadings = false; + if (!time.addMSec(-30)) { + ArLog::log(ArLog::Normal, + "%s::sensorInterp() error adding msecs (-30)", getName()); + } + } + else if (packet->getNumReadings() == 540) // S300 + { + // for the S300 we're going to try and compensate + //for the robot's movement while it's turning + // just not right now + //interpolateReadings = true; + // don't touch time + if (!timeEnd.addMSec(30)) + { + ArLog::log(ArLog::Normal, + "%s::sensorInterp() error adding end msecs (30)", getName()); + } + } + + // MPL this was from debugging the intermittent lost + // issue thatl ooked like a timing problem + //ArLog::log(ArLog::Normal, "%s packet %lld mSec old", getName(), time.mSecSince()); + + if (myRobot == NULL || !myRobot->isConnected()) + { + pose.setPose(0, 0, 0); + encoderPose.setPose(0, 0, 0); + } + else if ((ret = myRobot->getPoseInterpPosition(time, &pose)) < 0 + || (retEncoder = myRobot->getEncoderPoseInterpPosition(time, + &encoderPose)) < 0) + { + ArLog::log(ArLog::Normal, + "%s::sensorInterp(): Warning: reading too old to process", getName()); + delete packet; + continue; + } + + if (interpolateReadings && + ((ret = myRobot->getPoseInterpPosition(timeEnd, + &poseEnd)) < 0 + || (retEncoder = myRobot->getEncoderPoseInterpPosition( + timeEnd, &encoderPoseEnd)) < 0)) + { + ArLog::log(ArLog::Normal, + "%s::sensorInterp(): Warning: reading too old to process end", getName()); + delete packet; + continue; + } + + ArTransform transform; + transform.setTransform(pose); + + unsigned int counter = 0; + if (myRobot != NULL) + counter = myRobot->getCounter(); + + /// MPL 2013_07_24 testing (commented out) + //lockDevice(); + myDataMutex.lock(); + + //std::list::reverse_iterator it; + ArSensorReading *reading; + + myNumChans = packet->getNumReadings(); + + double eachAngularStepWidth; + int eachNumberData; + + // PS - test for both S3000 (190 degrees) and S300 (270 degrees) + if ((packet->getNumReadings() == 381) || + (packet->getNumReadings() == 540)) + { + // PS 7/5/11 - grab the number of raw readings from the receive packet + eachNumberData = packet->getNumReadings(); + } + else + { + ArLog::log(ArLog::Normal, + "%s::sensorInterp(): Warning: The number of readings is not correct = %d", + getName(), myNumChans); + + // PS 12/6/12 - need to unlock + myDataMutex.unlock(); + /// MPL 2013_07_24 testing (commented out) + //unlockDevice(); + + delete packet; + continue; + } + + // If we don't have any sensor readings created at all, make 'em all + if (myRawReadings->size() == 0) + for (j = 0; j < eachNumberData; j++) + myRawReadings->push_back(new ArSensorReading); + + if (eachNumberData > myRawReadings->size()) + { + ArLog::log(ArLog::Terse, + "%s::sensorInterp() Bad data, in theory have %d readings but can only have 541... skipping this packet", + getName(), eachNumberData); + + // PS 12/6/12 - need to unlock and delete packet + myDataMutex.unlock(); + /// MPL 2013_07_24 testing (commented out) + //unlockDevice(); + delete packet; + + continue; + } + + std::list::iterator it; + double atDeg; + int onReading; + + double start; + double increment; + + //eachStartingAngle = -5; + eachAngularStepWidth = .5; + + // from the number of readings, calculate the start + + if (myFlipped) { + //start = mySensorPose.getTh() + eachStartingAngle - 90.0 + eachAngularStepWidth * eachNumberData; + start = mySensorPose.getTh() + (packet->getNumReadings() / 4); + increment = -eachAngularStepWidth; + } else { + //start = mySensorPose.getTh() + eachStartingAngle - 90.0; + start = -(mySensorPose.getTh() + (packet->getNumReadings() / 4)); + increment = eachAngularStepWidth; + } + + int readingIndex; + bool ignore = false; + + + // The MonitoringData - 2 bytes + + // bits 0-3 Active Monitoring Case + // bits 4-7 - not used + // bits 8-10 Monitoring Area + // bits 11-15 - not used + + // ???? - so we need to grab bits 0-3, but i'm not sure if they are in + // byte 1 or byte 2 and then pass them to something + + // On page 41 of the S300 telegram manual it defines the scan data block. + // There is a 4-bit field within RI_SCAN_STATUS called “monitoring caseâ€. + // We will need to relay this 4-bit value back to the C2K periodically (say with the normal motion commands every XXms). + // This will be used by the C2K as part of the diagnostic checks of the safety system hardware. + // The C2K will need to check that the SICK reported state matches the safety HW state. + // + + if (packet->getMonitoringDataAvailable()) { + + // I'm not sure if theses are swapped ie lsb first, but i think they are + // as the distances are that way + + unsigned char activeMonitoringCase = packet->getMonitoringDataByte2() & 0x0f; + //unsigned char activeMonitoringCase = packet->getMonitoringDataByte1() & 0x0f; + + //myRobot->processActiveMonitoringCase(activeMonitoringCase); + } + + double incrX = 0; + double incrY = 0; + double incrTh = 0; + ArPose interpolateDelta(0, 0, 0); + if (interpolateReadings) + { + incrX = ((encoderPoseEnd.getX() - encoderPose.getX()) / + packet->getNumReadings()); + incrY = ((encoderPoseEnd.getY() - encoderPose.getY()) / + packet->getNumReadings()); + incrTh = (ArMath::subAngle(encoderPoseEnd.getTh(), + encoderPose.getTh()) / + packet->getNumReadings()); + + /* + incrX = ((encoderPose.getX() - encoderPoseEnd.getX()) / + packet->getNumReadings()); + incrY = ((encoderPose.getY() - encoderPoseEnd.getY()) / + packet->getNumReadings()); + incrTh = (ArMath::subAngle(encoderPose.getTh(), + encoderPoseEnd.getTh()) / + packet->getNumReadings()); + */ + + ArLog::log(ArLog::Normal, + "%s:InterpolateReadings: diffAll of %d mSec, x %g y %g th %g (incr x %g y %g th %g) start x %g y %g th %g end x %g y %g th %g", + getName(), + timeEnd.mSecSince(time), + encoderPoseEnd.getX() - encoderPose.getX(), + encoderPoseEnd.getY() - encoderPose.getY(), + ArMath::subAngle(encoderPoseEnd.getTh(), + encoderPose.getTh()), + incrX, incrY, incrTh, + encoderPose.getX(), encoderPose.getY(), + encoderPose.getTh(), + encoderPoseEnd.getX(), encoderPoseEnd.getY(), + encoderPoseEnd.getTh()); + + + ArLog::log(ArLog::Normal, + "%s:InterpolateReadings: diffTh of %d mSec, th %g (%g) start th %g end th %g", + getName(), + timeEnd.mSecSince(time), + ArMath::subAngle(encoderPoseEnd.getTh(), + encoderPose.getTh()), + incrTh, + encoderPose.getTh(), + encoderPoseEnd.getTh()); + + } + + for (atDeg = start, + it = myRawReadings->begin(), + readingIndex = 0, + onReading = 0; + + onReading < eachNumberData; + + atDeg += increment, + it++, + readingIndex++, + onReading++) + { + + + reading = (*it); + + dist = ((buf[(readingIndex * 2) + 1] & 0x8f) << 8) + | buf[readingIndex * 2]; + dist = dist * 10; // convert to mm + + if (interpolateReadings) + { + interpolateDelta.setX( + interpolateDelta.getX() + incrX); + interpolateDelta.setY( + interpolateDelta.getY() + incrY); + interpolateDelta.setTh( + ArMath::addAngle(interpolateDelta.getTh(), + incrTh)); + + /* + ArLog::log(ArLog::Normal, "%d %g %g %g", + onReading, + interpolateDelta.getX(), + interpolateDelta.getY(), + interpolateDelta.getTh()); + */ + + reading->resetSensorPosition( + ArMath::roundInt(mySensorPose.getX() + + interpolateDelta.getX()), + ArMath::roundInt(mySensorPose.getY() + + interpolateDelta.getY()), + ArMath::addAngle(atDeg, + interpolateDelta.getTh())); + } + else + { + reading->resetSensorPosition( + ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), + atDeg); + } + reading->newData(dist, pose, encoderPose, transform, counter, time, + ignore, 0); // no reflector yet + + //printf("dist = %d, pose = %d, encoderPose = %d, transform = %d, counter = %d, time = %d, igore = %d", + // dist, pose, encoderPose, transform, counter, + // time, ignore); + } + /* + ArLog::log(ArLog::Normal, + "Received: %s %s scan %d numReadings %d", + packet->getCommandType(), packet->getCommandName(), + myScanCounter, onReading); + */ + + myDataMutex.unlock(); + + /* + ArLog::log( + ArLog::Terse, + "%s::sensorInterp() Telegram number = %d ", + getName(), packet->getTelegramNumByte2()); + */ + + laserProcessReadings(); + /// MPL 2013_07_24 testing (commented out) + //unlockDevice(); + delete packet; + } + /// MPL 2013_07_24 testing (added) + unlockDevice(); +} + +AREXPORT bool ArS3Series::blockingConnect(void) { + long timeToRunFor; + + if (!getRunning()) + runAsync(); + + myConnMutex.lock(); + if (myConn == NULL) { + ArLog::log(ArLog::Terse, + "%s: Error: Could not connect because there is no connection defined", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + // PS 9/9/11 - moved this here to fix issue with setting baud in mt400.p + laserPullUnsetParamsFromRobot(); + laserCheckParams(); + + // PS 9/9/11 - add setting baud + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + if (serConn != NULL) + serConn->setBaud(atoi(getStartingBaudChoice())); + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log( + ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + // PS - set logging level and laser type in packet receiver class + myReceiver.setInfoLogLevel(myInfoLogLevel); + myReceiver.setName(getName()); + + myReceiver.setDeviceConnection(myConn); + myConnMutex.unlock(); + + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + + // PS 9/9/11 - moved up top + //laserPullUnsetParamsFromRobot(); + //laserCheckParams(); + + int size = ArMath::roundInt((270 / .25) + 1); + ArLog::log(myInfoLogLevel, + "%s::blockingConnect() Setting current buffer size to %d", + getName(), size); + setCurrentBufferSize(size); + + ArTime timeDone; + if (myPowerControlled) + { + // MPL 11/28/2012 making this timeout shorter + //if (!timeDone.addMSec(60 * 1000)) + if (!timeDone.addMSec(5 * 1000)) + { + ArLog::log(ArLog::Verbose, + "%s::blockingConnect() error adding msecs (60 * 1000)", + getName()); + } + } + else + { + // MPL 11/28/2012 making this timeout shorter + //if (!timeDone.addMSec(30 * 1000)) + if (!timeDone.addMSec(5 * 1000)) + { + ArLog::log(ArLog::Verbose, + "%s::blockingConnect() error adding msecs (30 * 1000)", + getName()); + } + } + + ArS3SeriesPacket *packet; + + bool startMode = true; + do + { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + + if ((packet = myReceiver.receivePacket(1000, startMode)) != NULL) + { + ArLog::log(ArLog::Verbose, "%s: got packet", getName()); + // PS 10/17/12 - verify number of readings + // PS - test for both S3000 (190 degrees) and S300 (270 degrees) + if (packet->getNumReadings() != 381) { + if (packet->getNumReadings() != 540) { + ArLog::log(ArLog::Normal, "%s:blockingConnect - number of readings is invalid %d", getName(), packet->getNumReadings()); + delete packet; + packet = NULL; + continue; + } + } + + if (packet->getMonitoringDataAvailable()) { + ArLog::log(ArLog::Normal, "%s: Monitoring data is available (0x%02x 0x%02x)", getName(), + packet->getMonitoringDataByte1(), packet->getMonitoringDataByte2()); + } + else { + ArLog::log(ArLog::Normal, "%s: Monitoring data is not available", getName()); + + } + + ArLog::log(ArLog::Normal, "%s: Protocol version (0x%02x 0x%02x)", getName(), + packet->getProtocolVersionByte1(), packet->getProtocolVersionByte2()); + + + delete packet; + packet = NULL; + + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s: Connected to laser", getName()); + laserConnect(); + return true; + } + else + { + packet = NULL; + ArLog::log(ArLog::Verbose, "%s: MS left = %d", getName(), timeDone.mSecTo()); + } + // this is only used for logging in receivePacket + startMode = false; + } while (timeDone.mSecTo() >= 0); // || !myStarting) + + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Did not get scan data back from laser", + getName()); + failedToConnect(); + return false; + +} + +AREXPORT void * ArS3Series::runThread(void *arg) { + //char buf[1024]; + ArS3SeriesPacket *packet; + +while (getRunning() ) +{ + lockDevice(); + + if (myStartConnect) { + myStartConnect = false; + myTryingToConnect = true; + unlockDevice(); + + blockingConnect(); + + lockDevice(); + myTryingToConnect = false; + unlockDevice(); + continue; + } + + unlockDevice(); + + if (!myIsConnected) { + ArUtil::sleep (100); + continue; + } + + + while (getRunning() && myIsConnected && + (packet = myReceiver.receivePacket (500, false) ) != NULL) { + + // MPL 2013_07_09 moved this from the process packet + // so that we don't trigger a safety warning if the + // cycle takes too long... it's possible there should + // be some mutex around this monitoring data but it's + // chars/bools so hopefully it'll be OK TODO verify + + // if the monitoring data is available - send it down to + // the firmware + + if (packet->getMonitoringDataAvailable()) { + + myIsMonitoringDataAvailable = true; + myMonitoringData = packet->getMonitoringDataByte1(); + myRobot->lock(); + myRobot->comInt(217, packet->getMonitoringDataByte1()); + + /* + ArLog::log(ArLog::Normal, "%s monitoring case of = %d seq = %d %d time = %d %d %d %d", + getName(), packet->getMonitoringDataByte1(), packet->getTelegramNumByte1(), packet->getTelegramNumByte2(), + packet->getTimeStampByte1(), packet->getTimeStampByte2(), packet->getTimeStampByte3(), + packet->getTimeStampByte4()); + ArLog::log(ArLog::Normal, "%s: Sent monitoring case of %d", + getName(), packet->getMonitoringDataByte1()); + */ + myRobot->unlock(); + } + else { + myIsMonitoringDataAvailable = false; + } + + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && laserCheckLostConnection() ) { + ArLog::log (ArLog::Terse, + "%s::runThread() Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + laserDisconnectOnError(); + continue; + } + + /// MPL no sleep here so it'll get back into that while as soon as it can + + //ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(500); + +#if 0 // PS 10/12/11 - fixing disconnects + + + // PS 7/5/11 - change msWait from 50 to 5000 + + // MPL 7/12/11 Changed mswait to 500 (which is bad enough, + // especially since receive packet doesn't use it quite right at + // this time) + while (getRunning() && myIsConnected && (packet + = myReceiver.receivePacket (500, false) ) != NULL) { + + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + + //ArLog::log(ArLog::Terse, "myRobot = %s",myRobot); + + //if (myRobot == NULL) + //sensorInterp(); + + /// MPL TODO see if this gets called if the laser goes + /// away... it looks like it may not (since the receivePacket may just return nothing) + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (laserCheckLostConnection() ) { + ArLog::log (ArLog::Terse, + "%s: Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", + getName(), myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + + laserDisconnectOnError(); + continue; + } + } + + ArUtil::sleep (1); + //ArUtil::sleep(2000); + //ArUtil::sleep(500); + +#endif // end PS 10/12/11 + +} + return NULL; +} + +static const unsigned short +crc_table[256] = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, + 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, + 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, + 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, + 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, + 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, + 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, + 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, + 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, + 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, + 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, + 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, + 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, + 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, + 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, + 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, + 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, + 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, + 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, + 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, + 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, + 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, + 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, + 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, + 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, + 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, + 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, + 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, + 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, + 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, + 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, + 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, + 0x0ed1, 0x1ef0 }; + +unsigned short ArS3SeriesPacketReceiver::CRC16(unsigned char *Data, int length) { + unsigned short CRC_16 = 0xFFFF; + int i; + for (i = 0; i < length; i++) + { + CRC_16 = (CRC_16 << 8) ^ (crc_table[(CRC_16 >> 8) ^ (Data[i])]); + } + return CRC_16; +} + diff --git a/Legacy/Aria/src/ArSZSeries.cpp b/Legacy/Aria/src/ArSZSeries.cpp new file mode 100644 index 0000000..84f33b3 --- /dev/null +++ b/Legacy/Aria/src/ArSZSeries.cpp @@ -0,0 +1,1178 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSZSeries.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + +//#define TRACE +#if (defined(TRACE)) + #define IFDEBUG(code) {code;} +#else + #define IFDEBUG(code) +#endif + +AREXPORT ArSZSeriesPacket::ArSZSeriesPacket() : +ArBasePacket(10000, 1, NULL, 1) { + +} + +AREXPORT ArSZSeriesPacket::~ArSZSeriesPacket() { + +} + +AREXPORT ArTime ArSZSeriesPacket::getTimeReceived(void) { + return myTimeReceived; +} + +AREXPORT void ArSZSeriesPacket::setTimeReceived(ArTime timeReceived) { + myTimeReceived = timeReceived; +} + +AREXPORT void ArSZSeriesPacket::duplicatePacket(ArSZSeriesPacket *packet) { + myLength = packet->getLength(); + myReadLength = packet->getReadLength(); + myTimeReceived = packet->getTimeReceived(); + myDataLength = packet->myDataLength; + myNumReadings = packet->myNumReadings; + myScanFrequency = packet->myScanFrequency; + myCrcByte1 = packet->myCrcByte1; + myCrcByte2 = packet->myCrcByte2; + + memcpy(myBuf, packet->getBuf(), myLength); +} + +AREXPORT void ArSZSeriesPacket::empty(void) { + myLength = 0; + myReadLength = 0; +} + +#if 0 +AREXPORT void ArSZSeriesPacket::uByteToBuf(ArTypes::UByte val) +{ + char buf[1024]; + sprintf(buf, "%u", val); + strToBuf(buf); +} +#endif + +AREXPORT void ArSZSeriesPacket::byteToBuf(ArTypes::Byte val) +{ + char buf[1024]; + if (val > 0) + sprintf(buf, "+%d", val); + else + sprintf(buf, "%d", val); + strToBuf(buf); +} + + +AREXPORT ArTypes::Byte ArSZSeriesPacket::bufToByte(void) +{ + ArTypes::Byte ret=0; + + + if (!isNextGood(1)) + return 0; + + if (myBuf[myReadLength] == ' ') + myReadLength++; + + if (!isNextGood(4)) + return 0; + + unsigned char n1, n2; + n2 = deascii(myBuf[myReadLength+6]); + n1 = deascii(myBuf[myReadLength+7]); + ret = n2 << 4 | n1; + + myReadLength += 4; + + return ret; +} + +int ArSZSeriesPacket::deascii(char c) +{ + if (c >= '0' && c <= '9') + return c - '0'; + else if (c >= 'a' && c <= 'f') + return 10 + c - 'a'; + else if (c >= 'A' && c <= 'F') + return 10 + c - 'a'; + else + return 0; +} + +AREXPORT ArSZSeriesPacketReceiver::ArSZSeriesPacketReceiver() { + +} + +AREXPORT ArSZSeriesPacketReceiver::~ArSZSeriesPacketReceiver() { + +} + +AREXPORT void ArSZSeriesPacketReceiver::setDeviceConnection( + ArDeviceConnection *conn) { + myConn = conn; +} + +AREXPORT ArDeviceConnection *ArSZSeriesPacketReceiver::getDeviceConnection(void) { + return myConn; +} + +ArSZSeriesPacket *ArSZSeriesPacketReceiver::receivePacket(unsigned int msWait, + bool startMode) { + + ArSZSeriesPacket *packet; + unsigned char c; + long timeToRunFor; + ArTime timeDone; + ArTime lastDataRead; + ArTime packetReceived; + int i; + + if (myConn == NULL || myConn->getStatus() + != ArDeviceConnection::STATUS_OPEN) { + return NULL; + } + + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Terse, "%s::receivePacket() error adding msecs (%i)", + myName, msWait); + } + //msWait = 100; + + do { + timeToRunFor = timeDone.mSecTo(); + if (timeToRunFor < 0) + timeToRunFor = 0; + /* + ArLog::log(ArLog::Terse, + "%s::receivePacket() timeToRunFor = %d", + myName, timeToRunFor); + */ + + myPacket.empty(); + myPacket.setLength(0); + myReadCount = 0; + + unsigned char firstbytelen; + unsigned char secondbytelen; + unsigned char temp[4]; + + unsigned char crcbuf[10000]; + memset(crcbuf, 0, 10000); + memset(myReadBuf, 0, 100000); + int n = 0; +#if 0 + bool nonzero = true; + int zerocnt = 0; + char prev_c = 0x30; + while (nonzero) + { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + if (((c == 0x00) && (zerocnt == 0)) || ((c == 0x00) && (prev_c == 0x00))) + { + zerocnt++; + prev_c = c; + if (zerocnt == 4) + nonzero = false; + } + else + { + zerocnt = 0; + prev_c = 0x30; + } + } + } // endwhile + + //printf("WE FOUND A 4 ZERO's\n"); + packetReceived = myConn->getTimeRead(0); + myPacket.setTimeReceived(packetReceived); +#endif +//#if 0 + // look for initial sequence 0x00 0x00 0x00 0x00 + for (i = 0; i < 4; i++) { + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + if (c != 0x00) { + //printf("char = %x\n",c); + //ArLog::log(ArLog::Terse, + // "ArSZSeries::receivePacket() error reading first 4 bytes of header"); + break; + } + if (i == 0) { + packetReceived = myConn->getTimeRead(0); + //ArTime previousTime = myPacket.getTimeReceived(); + myPacket.setTimeReceived(packetReceived); + //ArLog::log(ArLog::Normal, + // "ms since = %d", + // packetReceived.mSecSince(previousTime)); + } + } else { + /* don't log this if we are in starting mode, means laser is not connecting */ + if (startMode) + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (header)", + myName); + return NULL; + } + } // end for + + if (c != 0x00) + continue; + +//#endif + + // next byte = 0x91 - command number + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + if (c != 0x91) { + //ArLog::log(ArLog::Terse, + // "ArSZSeries::receivePacket() error data block number in header"); + break; + } + } else { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (data block number)", + myName); + return NULL; + } + + if (c != 0x91) + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() Invalid command ID (must be 0x91) = 0x%x", + myName, c); + continue; + } + + for (n=0; n < 4; n++ ) + crcbuf[n] = 0; + crcbuf[n++] = 0x91; + + // next byte = 0x00 - Communication ID + // note we are assuming this needs to be 0 + // as set in the Configurator + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + if (c != 0x00) { + //ArLog::log(ArLog::Terse, + // "ArSZSeries::receivePacket() error data block number in header"); + break; + } + } else { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (data block number)", + myName); + return NULL; + } + + + if (c != 0x00) + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() Communication ID error = %d", + myName, c); + continue; + } + + crcbuf[n++] = 0; + + // next 2 bytes are length, + + for (i = 0; i < 2; i++) { + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + temp[i] = c; + crcbuf[n++] = c; + } else { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (length)", + myName); + return NULL; + } + } // end for + + firstbytelen = temp[0]; + secondbytelen = temp[1]; + //crcbuf[n++] = temp[0]; + //crcbuf[n++] = temp[1]; + + // do we need to validate byte length = 1505 + int datalen = secondbytelen | (firstbytelen << 8); + + // data length is 1 less as it includes the scan freq byte + myPacket.setDataLength(datalen - 1); + + /* + ArLog::Terse( + "%s::receivePacket() Data Length = %d", myName, myPacket.getDataLength()); + */ + + myPacket.setNumReadings(myPacket.getDataLength() / 2); + + /* + ArLog::Terse( + "%s::receivePacket() Number of readings = %d", myName, myPacket.getNumReadings()); + */ + + // next scan frequency + + if ((myConn->read((char *) &c, 1, msWait)) > 0) { + myPacket.setScanFrequency(c); + } else { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (data block number)", + myName); + return NULL; + } + + crcbuf[n++] = c; + + // now read all the readings + // PS 12/6/12 - change timeout from 5000 to 200 + int numRead = myConn->read((char *) &myReadBuf[0], + myPacket.getDataLength(), 200); + + // trap if we failed the read + if (numRead < 0) { + ArLog::log(ArLog::Terse, "%s::receivePacket() Failed read (%d)", + myName, numRead); + return NULL; + } + + /* + ArLog::log(ArLog::Terse, + "%s::receivePacket() Number of bytes read = %d, asked for = %d", myName, + numRead, myPacket.getDataLength()); + */ + + // finally get the crc + for (i = 0; i < 2; i++) + { + if ((myConn->read((char *) &c, 1, msWait)) > 0) + { + temp[i] = c; + } + else + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() myConn->read error (crc)", myName); + return NULL; + } + } // end for + myPacket.setCrcByte1(temp[0]); + myPacket.setCrcByte2(temp[1]); + +#if 0 + // Matt put this check in to look for 0's in the data - not sure why + int numZeros = 0; + for (i = 5; i < myPacket.getDataLength(); i++) { + if (myReadBuf[i] == 0) + numZeros++; + else + numZeros = 0; + + if (numZeros >= 4) { + ArLog::log( + ArLog::Terse, + "%s::receivePacket() myConn->read error (got 4 zeros in data)", + myName); + return NULL; + } + } +#endif + + memcpy(&crcbuf[n], &myReadBuf[0], myPacket.getDataLength()); + + /*code to trace + char buf[100000]; + int x = 0; + + int t = myPacket.getDataLength() + n + 1; + + ArLog::log(ArLog::Normal, + "%s::receivePacket() DATA LEN = %d CRC byte1 = %x CRC byte2 = %x", myName, t, temp[0], temp[1]); + int y = n; + for (y = 0;y < t; y++) { + sprintf(&buf[x++], "%02x", (char *)crcbuf[y] ); + + } + + sprintf(&buf[x++], "%02x", (char *)temp[0]); + + sprintf(&buf[x], "%02x", (char *)temp[1]); + + + ArLog::log(ArLog::Normal, + "%s::receivePacket() packet = %s", myName, buf); + */ + + + // now go validate the crc + + unsigned short crc = CRC16(crcbuf, myPacket.getDataLength() + n); + + unsigned short incrc = (temp[0] << 8) | temp[1]; + + + if (myPrevCrc == crc) { + + ArLog::log(ArLog::Verbose, + "CRC MATCH, current scan freq = %d, prev scan freq = %d", + myPacket.getScanFrequency(), + myPacket.getPrevScanFrequency()); + + myPrevCrc = crc; + myPacket.setPrevScanFrequency(myPacket.getScanFrequency()); + return NULL; + } + + myPacket.setPrevScanFrequency(myPacket.getScanFrequency()); + myPrevCrc = crc; + + if (incrc != crc) + { + ArLog::log(ArLog::Terse, + "%s::receivePacket() CRC error (in = 0x%02x calculated = 0x%02x) ", + myName, incrc, crc); + return NULL; + } + + + myPacket.dataToBuf(&myReadBuf[0], myPacket.getNumReadings() * 2); + myPacket.resetRead(); + packet = new ArSZSeriesPacket; + packet->duplicatePacket(&myPacket); + + /* + ArLog::log(ArLog::Normal, + "%s::receivePacket() returning packet %d %d", myName, packet->getNumReadings(), myPacket.getNumReadings()); + */ + + myPacket.empty(); + + return packet; + + } while (timeDone.mSecTo() >= 0); // || !myStarting) + + ArLog::log(ArLog::Terse, "%s::receivePacket() Timeout on read", myName); + return NULL; +} + +AREXPORT ArSZSeries::ArSZSeries(int laserNumber, const char *name) : + ArLaser(laserNumber, name, 16382), + mySensorInterpTask(this, &ArSZSeries::sensorInterp), + myAriaExitCB(this, &ArSZSeries::disconnect) { + + //ArLog::log(ArLog::Normal, "%s: Sucessfully created", getName()); + + clear(); + myRawReadings = new std::list; + + Aria::addExitCallback(&myAriaExitCB, -10); + + setInfoLogLevel(ArLog::Normal); + //setInfoLogLevel(ArLog::Terse); + + laserSetName( getName()); + + laserAllowSetPowerControlled(false); + + laserSetDefaultPortType("serial422"); + + std::list < std::string > baudChoices; + + baudChoices.push_back("9600"); + baudChoices.push_back("19200"); + baudChoices.push_back("38400"); + baudChoices.push_back("57600"); + baudChoices.push_back("115200"); + //baudChoices.push_back("125000"); + baudChoices.push_back("230400"); + baudChoices.push_back("460800"); + + //laserAllowStartingBaudChoices("9600", baudChoices); + laserAllowStartingBaudChoices("38400", baudChoices); + + // PS 9/9/11 - don't allow auto baud for his laser + //laserAllowAutoBaudChoices("57600", baudChoices); + + laserAllowSetDegrees(-135, -135, -135, 135, 135, 135); + laserAllowSetIncrement(0.5, 0.5, 0.5); + + //myLogLevel = ArLog::Verbose; + //myLogLevel = ArLog::Terse; + myLogLevel = ArLog::Normal; + + setMinDistBetweenCurrent(0); + setMaxDistToKeepCumulative(4000); + setMinDistBetweenCumulative(200); + setMaxSecondsToKeepCumulative(30); + setMaxInsertDistCumulative(3000); + + setCumulativeCleanDist(75); + setCumulativeCleanInterval(1000); + setCumulativeCleanOffset(600); + + resetLastCumulativeCleanTime(); + + setCurrentDrawingData( + //new ArDrawingData("polyDots", ArColor(255, 204, 153), 75, // mm diameter of dots + new ArDrawingData("polyDots", ArColor(255,102,0), 75, // mm diameter of dots + 76), // layer above sonar + true); + + setCumulativeDrawingData( + new ArDrawingData("polyDots", ArColor(255,153,0), 95, // mm diameter of dots + 61), // layer below current range devices + true); + +} + +AREXPORT ArSZSeries::~ArSZSeries() { + Aria::remExitCallback(&myAriaExitCB); + if (myRobot != NULL) { + myRobot->remRangeDevice(this); + myRobot->remLaser(this); + myRobot->remSensorInterpTask(&mySensorInterpTask); + } + if (myRawReadings != NULL) { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + lockDevice(); + if (isConnected()) + disconnect(); + unlockDevice(); +} + +void ArSZSeries::clear(void) { + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; + + myNumChans = 0; +} + +AREXPORT void ArSZSeries::laserSetName(const char *name) { + myName = name; + + myConnMutex.setLogNameVar("%s::myConnMutex", getName()); + myPacketsMutex.setLogNameVar("%s::myPacketsMutex", getName()); + myDataMutex.setLogNameVar("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar("%s::exitCallback", getName()); + + ArLaser::laserSetName( getName()); +} + +AREXPORT void ArSZSeries::setRobot(ArRobot *robot) { + myRobot = robot; + + if (myRobot != NULL) { + myRobot->remSensorInterpTask(&mySensorInterpTask); + myRobot->addSensorInterpTask("SZSeries", 90, &mySensorInterpTask); + } + ArLaser::setRobot(robot); +} + +AREXPORT bool ArSZSeries::asyncConnect(void) { + myStartConnect = true; + if (!getRunning()) + runAsync(); + return true; +} + +AREXPORT bool ArSZSeries::disconnect(void) { + if (!isConnected()) + return true; + + ArLog::log(ArLog::Normal, "%s: Disconnecting", getName()); + + laserDisconnectNormally(); + return true; +} + +void ArSZSeries::failedToConnect(void) { + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + laserFailedConnect(); +} + +void ArSZSeries::sensorInterp(void) { + ArSZSeriesPacket *packet; + + while (1) { + myPacketsMutex.lock(); + if (myPackets.empty()) { + myPacketsMutex.unlock(); + return; + } + packet = myPackets.front(); + myPackets.pop_front(); + myPacketsMutex.unlock(); + + //set up the times and poses + + ArTime time = packet->getTimeReceived(); + + ArPose pose; + int ret; + int retEncoder; + ArPose encoderPose; + int dist; + int j; + + unsigned char *buf = (unsigned char *) packet->getBuf(); + + // this value should be found more empirically... but we used 1/75 + // hz for the lms2xx and it was fine, so here we'll use 1/50 hz for now + if (!time.addMSec(-30)) { + ArLog::log(ArLog::Normal, + "%s::sensorInterp() error adding msecs (-30)", getName()); + } + + if (myRobot == NULL || !myRobot->isConnected()) + { + pose.setPose(0, 0, 0); + encoderPose.setPose(0, 0, 0); + } + else if ((ret = myRobot->getPoseInterpPosition(time, &pose)) < 0 + || (retEncoder = myRobot->getEncoderPoseInterpPosition(time, + &encoderPose)) < 0) + { + ArLog::log(ArLog::Normal, + "%s::sensorInterp() reading too old to process", getName()); + delete packet; + continue; + } + + ArTransform transform; + transform.setTransform(pose); + + unsigned int counter = 0; + if (myRobot != NULL) + counter = myRobot->getCounter(); + + lockDevice(); + myDataMutex.lock(); + + //std::list::reverse_iterator it; + ArSensorReading *reading; + + myNumChans = packet->getNumReadings(); + + double eachAngularStepWidth; + int eachNumberData; + + // PS - test for SZ-16D, each reading is .36 degrees for 270 degrees + + if (packet->getNumReadings() == 751) + { + eachNumberData = packet->getNumReadings(); + } + else + { + ArLog::log(ArLog::Normal, + "%s::sensorInterp() The number of readings is not correct = %d", + getName(), myNumChans); + + // PS 12/6/12 - unlock before continuing + + delete packet; + myDataMutex.unlock(); + unlockDevice(); + continue; + } + + // If we don't have any sensor readings created at all, make 'em all + if (myRawReadings->size() == 0) { + for (j = 0; j < eachNumberData; j++) { + myRawReadings->push_back(new ArSensorReading); + } + } + + if (eachNumberData > myRawReadings->size()) + { + ArLog::log(ArLog::Terse, + "%s::sensorInterp() Bad data, in theory have %d readings but can only have 751... skipping this packet", + getName(), eachNumberData); + + // PS 12/6/12 - unlock and delete before continuing + + delete packet; + myDataMutex.unlock(); + unlockDevice(); + continue; + } + + std::list::iterator it; + double atDeg; + int onReading; + + double start; + double increment; + + eachAngularStepWidth = .36; + + if (myFlipped) { + start = mySensorPose.getTh() + 135; + increment = -eachAngularStepWidth; + } else { + start = -(mySensorPose.getTh() + 135); + increment = eachAngularStepWidth; + } + + int readingIndex; + bool ignore = false; + + for (atDeg = start, + it = myRawReadings->begin(), + readingIndex = 0, + onReading = 0; + + onReading < eachNumberData; + + atDeg += increment, + it++, + readingIndex++, + onReading++) + { + + + reading = (*it); + + dist = (((buf[readingIndex * 2] & 0x3f)<< 8) | (buf[(readingIndex * 2) + 1])); + + // note max distance is 16383 mm, if the measurement + // object is not there, distance will still be 16383 + /* + ArLog::log(ArLog::Normal, + "reading %d first half = 0x%x, second half = 0x%x dist = %d", + readingIndex, buf[(readingIndex *2)+1], buf[readingIndex], dist); + */ + + reading->resetSensorPosition(ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), atDeg); + reading->newData(dist, pose, encoderPose, transform, counter, time, + ignore, 0); // no reflector yet + + //printf("dist = %d, pose = %d, encoderPose = %d, transform = %d, counter = %d, time = %d, igore = %d", + // dist, pose, encoderPose, transform, counter, + // time, ignore); + } +/* + ArLog::log(ArLog::Normal, + "Received: %s %s scan %d numReadings %d", + packet->getCommandType(), packet->getCommandName(), + myScanCounter, onReading); +*/ + + myDataMutex.unlock(); + + /* + ArLog::log( + ArLog::Terse, + "%s::sensorInterp() Telegram number = %d ", + getName(), packet->getTelegramNumByte2()); + */ + + laserProcessReadings(); + unlockDevice(); + delete packet; + } +} + +AREXPORT bool ArSZSeries::blockingConnect(void) { + + if (!getRunning()) + runAsync(); + + myConnMutex.lock(); + if (myConn == NULL) { + ArLog::log(ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + + // myPrevSensorIntTime = myConn->getTimeRead(0); + + // PS 9/9/11 - moved this here to fix issue with setting baud in mt400.p + laserPullUnsetParamsFromRobot(); + laserCheckParams(); + + // PS 9/9/11 - add setting baud + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + if (serConn != NULL) + serConn->setBaud(atoi(getStartingBaudChoice())); + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log( + ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + // PS - set logging level and laser type in packet receiver class + myReceiver.setmyInfoLogLevel(myInfoLogLevel); + myReceiver.setmyName(getName()); + + myReceiver.setDeviceConnection(myConn); + myConnMutex.unlock(); + + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + + // PS 9/9/11 - moved up top + //laserPullUnsetParamsFromRobot(); + //laserCheckParams(); + + int size = ArMath::roundInt((270/.3) + 1); + ArLog::log(myInfoLogLevel, + "%s::blockingConnect() Setting current buffer size to %d", + getName(), size); + setCurrentBufferSize(size); + + ArTime timeDone; + if (myPowerControlled) + { + if (!timeDone.addMSec(60 * 1000)) + { + ArLog::log(ArLog::Normal, + "%s::blockingConnect() error adding msecs (60 * 1000)", + getName()); + } + } + else + { + if (!timeDone.addMSec(30 * 1000)) + { + ArLog::log(ArLog::Normal, + "%s::blockingConnect() error adding msecs (30 * 1000)", + getName()); + } + } + + + ArSZSeriesPacket *packet; + + ArSZSeriesPacket sendPacket; + +#if 0 + sendPacket.empty(); + sendPacket.uByteToBuf(0xA0); // stop continous sending + sendPacket.uByteToBuf(0x00); + sendPacket.uByteToBuf(0x1D); + sendPacket.uByteToBuf(0x7E); + + sendPacket.finalizePacket(); + + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Could not send Stop Continuous mode to laser", getName()); + failedToConnect(); + return false; + } +#endif + + + // Build the Start Continuous sending packet and set it + // once we get a response, then we are connected, note + // the response needs to be a real reading + + sendPacket.empty(); + // command id = 0x91 + //sendPacket.uByteToBuf(145); + sendPacket.uByteToBuf(0x91); + // note communication ID default is 0 + // this value is set via the SZ Configurator + // ???? not sure what to do if it fails + // and put in CRC - from manual, this is + // specific to the communication ID = 0 + sendPacket.uByteToBuf(0); + sendPacket.uByteToBuf(43); + sendPacket.uByteToBuf(218); + + unsigned short crc = myReceiver.CRC16((unsigned char *)sendPacket.getBuf(), 2); + + + +#if 0 + // other communications IDs and CRC + // communication ID =1 + sendPacket.uByteToBuf(1); + sendPacket.uByteToBuf(59); + sendPacket.uByteToBuf(251); + // communication ID =2 + sendPacket.uByteToBuf(2); + sendPacket.uByteToBuf(11); + sendPacket.uByteToBuf(152); + // communication ID =3 + sendPacket.uByteToBuf(3); + sendPacket.uByteToBuf(27); + sendPacket.uByteToBuf(185); +#endif + + sendPacket.finalizePacket(); + + IFDEBUG( + + int i; + char x[100000]; + printf("buffer with len = %d: ",sendPacket.getLength()); + for (i = 0;i < sendPacket.getLength();i++) + { + printf("0x%x ",sendPacket.getBuf()[i] & 0xff); + //sprintf(&x[i], "%2x", (char *)sendPacket.getBuf()[i]); + + } + printf("\n"); + + //ArLog::log(ArLog::Terse, + // "%s::blockingConnect() write Buffer = %s", getName(), x); + + ); // end IFDEBUG + + if ((myConn->write(sendPacket.getBuf(), sendPacket.getLength())) == -1) + { + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Could not send Start Continuous mode to laser", getName()); + failedToConnect(); + return false; + } + while (timeDone.mSecTo() > 0) + { + // PS 9/7/11 - just go read 1 byte + packet = myReceiver.receivePacket(1000); + //char c; + //if ((myConn->read((char *) &c, 1, 1000)) > 0) + + if (packet != NULL) + { + delete packet; + packet = NULL; + + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s::blockingConnect() Connected to laser", getName()); + laserConnect(); + return true; + } + else + { + ArLog::log(ArLog::Normal, "%s::blockingConnect() Did not get response to Start Continuous request", + getName()); + delete packet; + packet = NULL; + } + + } + + + + ArLog::log(ArLog::Terse, + "%s::blockingConnect() Did not get scan data back from laser", + getName()); + failedToConnect(); + return false; + +} + +AREXPORT void * ArSZSeries::runThread(void *arg) { + //char buf[1024]; + ArSZSeriesPacket *packet; + + while (getRunning()) + { + lockDevice(); + if (myStartConnect) + { + myStartConnect = false; + myTryingToConnect = true; + unlockDevice(); + + blockingConnect(); + + lockDevice(); + myTryingToConnect = false; + unlockDevice(); + continue; + } + unlockDevice(); + + if (!myIsConnected) + { + ArUtil::sleep(100); + continue; + } + + + // PS 10/20/11 - code to fix disconnect issues + + while (getRunning() && myIsConnected && + (packet = myReceiver.receivePacket (500, false) ) != NULL) { + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && laserCheckLostConnection() ) { + ArLog::log (ArLog::Normal, + "%s::runThread() Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + laserDisconnectOnError(); + continue; + } + + //ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(500); + +#if 0 // PS 10/20/11 - using code above to fix disconnect issues + + // PS 7/5/11 - change msWait from 50 to 5000 + + // MPL 7/12/11 Changed mswait to 500 (which is bad enough, + // especially since receive packet doesn't use it quite right at + // this time) + while (getRunning() && myIsConnected && (packet + = myReceiver.receivePacket(500, false)) != NULL) + { + + myPacketsMutex.lock(); + myPackets.push_back(packet); + myPacketsMutex.unlock(); + + //ArLog::log(ArLog::Terse, "myRobot = %s",myRobot); + + //if (myRobot == NULL) + //sensorInterp(); + + /// MPL TODO see if this gets called if the laser goes + /// away... it looks like it may not (since the receivePacket may just return nothing) + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (laserCheckLostConnection()) + { + ArLog::log(ArLog::Terse, + "%s: Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", + getName(), myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds()); + myIsConnected = false; + + laserDisconnectOnError(); + continue; + } + } + + ArUtil::sleep(1); + //ArUtil::sleep(2000); + //ArUtil::sleep(500); + +#endif + + } + return NULL; +} + + +static const unsigned short +crc_table[256] = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, + 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, + 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, + 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, + 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, + 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, + 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, + 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, + 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, + 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, + 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, + 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, + 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, + 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, + 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, + 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, + 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, + 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, + 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, + 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, + 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, + 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, + 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, + 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, + 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, + 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, + 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, + 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, + 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, + 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, + 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, + 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, + 0x0ed1, 0x1ef0 }; + +unsigned short ArSZSeriesPacketReceiver::CRC16(unsigned char *Data, int length) { + unsigned short CRC_16 = 0x0000; + int i; + + for (i = 0; i < length; i++) + { + CRC_16 = (CRC_16 << 8) ^ (crc_table[(CRC_16 >> 8) ^ (Data[i])] ); +//printf("CRC_16=0x%x\n",CRC_16); + } + + return CRC_16; +} + diff --git a/Legacy/Aria/src/ArSensorReading.cpp b/Legacy/Aria/src/ArSensorReading.cpp new file mode 100644 index 0000000..867fb78 --- /dev/null +++ b/Legacy/Aria/src/ArSensorReading.cpp @@ -0,0 +1,203 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSensorReading.h" +#include "ariaUtil.h" + +/** + @param xPos the x position of the sensor on the robot (mm) + @param yPos the y position of the sensor on the robot (mm) + @param thPos the heading of the sensor on the robot (deg) +*/ +ArSensorReading::ArSensorReading(double xPos, double yPos, double thPos) +{ + myRange = 5000; + myCounterTaken = 0; + myReading.setPose(-1, -1); + myReadingTaken.setPose(-1, -1, -1); + resetSensorPosition(xPos, yPos, thPos, true); + myExtraInt = 0; + myAdjusted = false; +} + +AREXPORT ArSensorReading::ArSensorReading(const ArSensorReading & reading) +{ + myCounterTaken = reading.myCounterTaken; + myReading = reading.myReading; + myLocalReading = reading.myLocalReading; + myReadingTaken = reading.myReadingTaken; + myEncoderPoseTaken = reading.myEncoderPoseTaken; + mySensorPos = reading.mySensorPos; + mySensorCos = reading.mySensorCos; + mySensorSin = reading.mySensorSin; + myDistToCenter = reading.myDistToCenter; + myAngleToCenter = reading.myAngleToCenter; + myRange = reading.myRange; + myTimeTaken = reading.myTimeTaken; + myIgnoreThisReading = reading.myIgnoreThisReading; + myExtraInt = reading.myExtraInt; + myAdjusted = reading.myAdjusted; +} + +AREXPORT ArSensorReading &ArSensorReading::operator=( + const ArSensorReading &reading) +{ + if (this != &reading) + { + myCounterTaken = reading.myCounterTaken; + myReading = reading.myReading; + myLocalReading = reading.myLocalReading; + myReadingTaken = reading.myReadingTaken; + myEncoderPoseTaken = reading.myEncoderPoseTaken; + mySensorPos = reading.mySensorPos; + mySensorCos = reading.mySensorCos; + mySensorSin = reading.mySensorSin; + myDistToCenter = reading.myDistToCenter; + myAngleToCenter = reading.myAngleToCenter; + myRange = reading.myRange; + myTimeTaken = reading.myTimeTaken; + myIgnoreThisReading = reading.myIgnoreThisReading; + myExtraInt = reading.myExtraInt; + myAdjusted = reading.myAdjusted; + } + return *this; +} + + + +ArSensorReading::~ArSensorReading() +{ +} + + +/** + @param range the distance from the sensor to the sensor return (mm) + @param robotPose the robot's pose when the reading was taken + @param encoderPose the robot's encoder pose when the reading was taken + @param trans the transform from local coords to global coords + @param counter the counter from the robot when the sensor reading was taken + @param timeTaken the time the reading was taken + @param ignoreThisReading if this reading should be ignored or not + @param extraInt extra laser device-specific value associated with this + reading (e.g. SICK LMS-200 reflectance) +*/ +AREXPORT void ArSensorReading::newData(int range, ArPose robotPose, + ArPose encoderPose, ArTransform trans, + unsigned int counter, + ArTime timeTaken, + bool ignoreThisReading, int extraInt) +{ + // TODO calculate the x and y position of the sensor + double rx, ry; + myRange = range; + myCounterTaken = counter; + myReadingTaken = robotPose; + myEncoderPoseTaken = encoderPose; + rx = getSensorX() + myRange * mySensorCos; + ry = getSensorY() + myRange * mySensorSin; + myLocalReading.setPose(rx, ry); + myReading = trans.doTransform(myLocalReading); + myTimeTaken = timeTaken; + myIgnoreThisReading = ignoreThisReading; + myExtraInt = extraInt; + myAdjusted = false; +} + +/** + @param sx the coords of the sensor return relative to sensor (mm) + @param sy the coords of the sensor return relative to sensor (mm) + @param robotPose the robot's pose when the reading was taken + @param encoderPose the robot's encoder pose when the reading was taken + @param trans transform of reading from local to global position + @param counter the counter from the robot when the sensor reading was taken + @param timeTaken the time the reading was taken + @param ignoreThisReading if this reading should be ignored or not + @param extraInt extra laser device-specific value associated with this + reading (e.g. SICK LMS-200 reflectance) +*/ +AREXPORT void ArSensorReading::newData(int sx, int sy, ArPose robotPose, + ArPose encoderPose, ArTransform trans, + unsigned int counter, ArTime timeTaken, + bool ignoreThisReading, int extraInt) +{ + // TODO calculate the x and y position of the sensor + double rx, ry; + myRange = (int)sqrt((double)(sx*sx + sy*sy)); + myCounterTaken = counter; + myReadingTaken = robotPose; + myEncoderPoseTaken = encoderPose; + rx = getSensorX() + sx; + ry = getSensorY() + sy; + myLocalReading.setPose(rx, ry); + myReading = trans.doTransform(myLocalReading); + myTimeTaken = timeTaken; + myIgnoreThisReading = ignoreThisReading; + myExtraInt = extraInt; + myAdjusted = false; +} + + +/** + @param xPos the x position of the sensor on the robot (mm) + @param yPos the y position of the sensor on the robot (mm) + @param thPos the heading of the sensor on the robot (deg) + @param forceComputation recompute position even if new position is the same as current +*/ +AREXPORT void ArSensorReading::resetSensorPosition(double xPos, double yPos, + double thPos, + bool forceComputation) +{ + // if its the same position and we're not forcing, just bail + if (!forceComputation && fabs(thPos - mySensorPos.getTh()) < .00001 && + xPos == mySensorPos.getX() && yPos == mySensorPos.getY()) + return; + + mySensorPos.setPose(xPos, yPos, thPos); + myDistToCenter = sqrt(xPos * xPos + yPos * yPos); + myAngleToCenter = ArMath::atan2(yPos, xPos); + mySensorCos = ArMath::cos(thPos); + mySensorSin = ArMath::sin(thPos); + //printf("xpose %d ypose %d thpose %d disttoC %.1f angletoC %.1f\n", + //xPos, yPos, thPos, myDistToCenter, myAngleToCenter); +} + +/** + @param trans the transform to apply to the reading and where the reading was taken +*/ +AREXPORT void ArSensorReading::applyTransform(ArTransform trans) +{ + myReading = trans.doTransform(myReading); + myReadingTaken = trans.doTransform(myReadingTaken); +} + +/** + @param trans the transform to apply to the encoder pose taken +*/ +AREXPORT void ArSensorReading::applyEncoderTransform(ArTransform trans) +{ + myEncoderPoseTaken = trans.doTransform(myEncoderPoseTaken); +} diff --git a/Legacy/Aria/src/ArSerialConnection_LIN.cpp b/Legacy/Aria/src/ArSerialConnection_LIN.cpp new file mode 100644 index 0000000..c4f2fe2 --- /dev/null +++ b/Legacy/Aria/src/ArSerialConnection_LIN.cpp @@ -0,0 +1,639 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ArSerialConnection.h" +#include "ArLog.h" +#include "ariaUtil.h" + + +#define TIOGETTIMESTAMP 0x5480 +#define TIOSTARTTIMESTAMP 0x5481 + +AREXPORT ArSerialConnection::ArSerialConnection(bool is422) +{ + myPort = -1; + myPortName = "none"; + myBaudRate = 9600; + myHardwareControl = false; + myStatus = STATUS_NEVER_OPENED; + myTakingTimeStamps = false; + myIs422 = is422; + if (myIs422) + setPortType("serial422"); + else + setPortType("serial"); + buildStrMap(); +} + +AREXPORT ArSerialConnection::~ArSerialConnection() +{ + if (myPort != -1) + close(); +} + +void ArSerialConnection::buildStrMap(void) +{ + myStrMap[OPEN_COULD_NOT_OPEN_PORT] = "Could not open serial port."; + myStrMap[OPEN_COULD_NOT_SET_UP_PORT] = "Could not set up serial port."; + myStrMap[OPEN_INVALID_BAUD_RATE] = "Baud rate invalid, could not set baud on serial port."; + myStrMap[OPEN_COULD_NOT_SET_BAUD] = "Could not set baud rate on serial port."; + myStrMap[OPEN_ALREADY_OPEN] = "Serial port already open."; +} + +AREXPORT const char * ArSerialConnection::getOpenMessage(int messageNumber) +{ + return myStrMap[messageNumber].c_str(); +} + +AREXPORT int ArSerialConnection::internalOpen(void) +{ + struct termios tio; + + if (myStatus == STATUS_OPEN) + { + ArLog::log(ArLog::Terse, "ArSerialConnection::internalOpen: Serial port already open"); + return OPEN_ALREADY_OPEN; + } + + if (myIs422) + ArLog::log(ArLog::Verbose, "ArSerialConnection::internalOpen: Connecting to serial422 port '%s'", myPortName.c_str()); + else + ArLog::log(ArLog::Verbose, "ArSerialConnection::internalOpen: Connecting to serial port '%s'", myPortName.c_str()); + + /* open the port */ + if (!myIs422) + { + if ((myPort = ArUtil::open(myPortName.c_str(),O_RDWR | O_NDELAY)) < 0) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::open: Could not open serial port '%s'", myPortName.c_str()); + return OPEN_COULD_NOT_OPEN_PORT; + } + } + else + { + // PS 9/9/11 - the RDONLY worked for the s3series as it did not + // do any writes, but the sZseries needs to do writes, so changed the + // flag to RDWR + // if ((myPort = ArUtil::open(myPortName.c_str(),O_RDONLY | O_NOCTTY)) < 0) + if ((myPort = ArUtil::open(myPortName.c_str(),O_RDWR | O_NOCTTY)) < 0) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::open: Could not open serial port '%s'", myPortName.c_str()); + return OPEN_COULD_NOT_OPEN_PORT; + } + } + + + /* set the tty baud, buffering and modes */ + if (tcgetattr(myPort, &tio) != 0) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::open: Could not get port data to set up port"); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } + + /* turn off echo, canonical mode, extended processing, signals */ + tio.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); + + /* turn off break sig, cr->nl, parity off, 8 bit strip, flow control */ + tio.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); + + /* clear size, turn off parity bit */ + tio.c_cflag &= ~(CSIZE | PARENB); + + /* set size to 8 bits */ + tio.c_cflag |= CS8; + + /* turn output processing off */ + tio.c_oflag &= ~(OPOST); + + /* Set time and bytes to read at once */ + tio.c_cc[VTIME] = 0; + tio.c_cc[VMIN] = 0; + + // PS 7/3/11 - check if dev is RS422, if so then the cflags need + // to be set different, for now test for dev/ttyS3, later we need to input that + // the device is RS422 + + // PS 9/9/11 - taking out the B38500, we now set the baud below + if (myIs422) + tio.c_cflag = CS8 | CLOCAL | CREAD |IGNPAR; + //tio.c_cflag = B57600 | CS8 | CLOCAL | CREAD |IGNPAR; + + if (tcflush(myPort,TCIFLUSH) == -1) + { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::open: Could not set up port tcflush failed"); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } + + if (tcsetattr(myPort,TCSAFLUSH,&tio) == -1) + { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::open: Could not set up port"); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } + + myStatus = STATUS_OPEN; + + // PS 7/3/11 - only set the baud and hw control if RS232 + // for now test for dev/ttyS3, later we need to input that + // the device is RS422 + + if (!myIs422) + { + if (myBaudRate != 0 && rateToBaud(myBaudRate) == -1) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::open: Invalid baud rate."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_INVALID_BAUD_RATE; + } + + //printf("my baud rate = %d\n",myBaudRate); + if (myBaudRate != 0 && !setBaud(myBaudRate)) + { + ArLog::log(ArLog::Terse, + "ArSerialConnection::open: Could not set baud rate."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_BAUD; + } + + if (!setHardwareControl(myHardwareControl)) + { + ArLog::log(ArLog::Terse, + "ArSerialConnection::open: Could not set hardware control."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } + } + // PS 9/9/11 - added else for SZ + else + { + if (myBaudRate != 0 && rateToBaud(myBaudRate) == -1) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::open: Invalid baud rate."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_INVALID_BAUD_RATE; + } + + //printf("my baud rate = %d\n",myBaudRate); + if (myBaudRate != 0 && !setBaud(myBaudRate)) + { + ArLog::log(ArLog::Terse, + "ArSerialConnection::open: Could not set baud rate."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_BAUD; + } + } + + ArLog::log(ArLog::Verbose, "ArSerialConnection::open: Successfully opened and configured serial port '%s'.", myPortName.c_str()); + return 0; +} + +AREXPORT bool ArSerialConnection::openSimple(void) +{ + if (internalOpen() == 0) + return true; + else + return false; +} + +/** + @param port The serial port to connect to, or NULL which defaults to + COM1 for windows and /dev/ttyS0 for linux + @see getOpenMessage +*/ +AREXPORT void ArSerialConnection::setPort(const char *port) +{ + if (port == NULL) + myPortName = "/dev/ttyS0"; + else + myPortName = port; + setPortName(myPortName.c_str()); +} + +/** + @return The serial port to connect to +**/ +AREXPORT const char * ArSerialConnection::getPort(void) +{ + return myPortName.c_str(); +} + +/** + @param port The serial port to connect to, or NULL which defaults to + COM1 for windows and /dev/ttyS0 for linux + @return 0 for success, otherwise one of the open enums + @see getOpenMessage +*/ +AREXPORT int ArSerialConnection::open(const char *port) +{ + setPort(port); + return internalOpen(); +} + +AREXPORT bool ArSerialConnection::close(void) +{ + int ret; + + myStatus = STATUS_CLOSED_NORMALLY; + if (myPort == -1) + return true; + + + ret = ::close(myPort); + + if (ret == 0) + ArLog::log(ArLog::Verbose, + "ArSerialConnection::close: Successfully closed serial port."); + else + ArLog::logErrorFromOS(ArLog::Verbose, + "ArSerialConnection::close: Unsuccessfully closed serial port."); + + myPort = -1; + if (ret == 0) + return true; + else + return false; +} + +AREXPORT bool ArSerialConnection::setBaud(int rate) +{ + struct termios tio; + int baud; + + myBaudRate = rate; + + if (getStatus() != STATUS_OPEN) + return true; + + if (myBaudRate == 0) + return true; + + if ((baud = rateToBaud(myBaudRate)) == -1) + return false; + + if (tcgetattr(myPort, &tio) != 0) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setBaud: Could not get port data."); + return false; + } + + if (cfsetospeed(&tio, baud)) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setBaud: Could not set output baud rate on termios struct."); + return false; + } + + if (cfsetispeed(&tio, baud)) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setBaud: Could not set input baud rate on termios struct."); + return false; + } + + if(tcsetattr(myPort,TCSAFLUSH,&tio) < 0) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setBaud: Could not set baud rate."); + return false; + } + + startTimeStamping(); + + return true; +} + +AREXPORT void ArSerialConnection::startTimeStamping(void) +{ + long baud; + baud = myBaudRate; + if (ioctl(myPort, TIOSTARTTIMESTAMP, &baud) != 0) + myTakingTimeStamps = false; + else + myTakingTimeStamps = true; +} + +/** + @return the current baud rate of the connection +*/ + +AREXPORT int ArSerialConnection::getBaud(void) +{ + return myBaudRate; +} + +int ArSerialConnection::rateToBaud(int rate) +{ + switch (rate) { + case 300: return B300; + case 1200: return B1200; + case 1800: return B1800; + case 2400: return B2400; + case 4800: return B4800; + case 9600: return B9600; + case 19200: return B19200; + case 38400: return B38400; + case 57600: return B57600; + case 115200: return B115200; + case 230400: return B230400; + case 460800: return B460800; + default: + ArLog::log(ArLog::Terse, "ArSerialConnection::rateToBaud: Did not know baud for rate %d.", rate); + return -1; + } +} + +int ArSerialConnection::baudToRate(int baud) +{ + switch (baud) { + case B300: return 300; + case B1200: return 1200; + case B1800: return 1800; + case B2400: return 2400; + case B4800: return 4800; + case B9600: return 9600; + case B19200: return 19200; + case B38400: return 38400; + case B57600: return 57600; + case B115200: return 115200; + case B230400: return 230400; + case B460800: return 460800; + default: + ArLog::log(ArLog::Terse, "ArSerialConnection:baudToRate: Did not know rate for baud."); + return -1; + } + +} + +/** + @param hardwareControl true to enable hardware control of lines + @return true if the set succeeded +*/ + +AREXPORT bool ArSerialConnection::setHardwareControl(bool hardwareControl) +{ + struct termios tio; + + myHardwareControl = hardwareControl; + + if (getStatus() != STATUS_OPEN) + return true; + + //tcgetattr(myPort, &tio); + + if (tcgetattr(myPort, &tio) != 0) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setHardwareControl: Could not get port data."); + return false; + } + + + /* check for hardware flow control */ + if (myHardwareControl) + tio.c_cflag |= CRTSCTS; + else + tio.c_cflag &= ~CRTSCTS; + + if(tcsetattr(myPort,TCSAFLUSH,&tio) < 0) { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setHardwareControl: Could not set hardware control."); + return false; + } + + return true; +} + +/** + @return true if hardware control of lines is enabled, false otherwise +*/ +AREXPORT bool ArSerialConnection::getHardwareControl(void) +{ + return myHardwareControl; +} + +AREXPORT int ArSerialConnection::write(const char *data, unsigned int size) +{ + int n; + /* + printf("SERIAL_WRITE(%3d): ", size); + for (int i = 0; i < size; i++) + printf("0x%x %c", data[i], data[i]); + printf("\n"); + */ + + /* + char buf[10000]; + sprintf(buf, "SERIAL_WRITE(%3d bytes %d): ", size, myPort); + for (int i = 0; i < size; i++) + sprintf(buf, "%s %02x", buf, (unsigned char)data[i]); + ArLog::log(ArLog::Normal, buf); + */ + + if (myPort >= 0) + { + n = ::write(myPort, data, size); + if (n == -1) + { +#if 0 + if (errno == EAGAIN) /* try it again, for USB/serial */ + { + usleep(10); + n = ::write(myPort, data, size); + if (n >= 0) + return n; + } +#endif + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::write: Error on writing."); + } + return n; + } + ArLog::log(ArLog::Terse, "ArSerialConnection::write: Connection invalid."); + return -1; +} + +AREXPORT int ArSerialConnection::read(const char *data, unsigned int size, + unsigned int msWait) +{ + struct timeval tp; /* time interval structure for timeout */ + fd_set fdset; /* fd set ??? */ + int n; + long timeLeft; + unsigned int bytesRead = 0; + ArTime timeDone; + + if (myPort >= 0) + { + if (msWait >= 0) + { + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArSerialConnection::read() error adding msecs (%i)", + msWait); + } + while ((timeLeft = timeDone.mSecTo()) >= 0) + { + tp.tv_sec = (timeLeft) / 1000; /* we're polling */ + tp.tv_usec = (timeLeft % 1000) * 1000; + FD_ZERO(&fdset); + FD_SET(myPort,&fdset); + if (select(myPort+1,&fdset,NULL,NULL,&tp) <= 0) + return bytesRead; + if ((n = ::read(myPort, const_cast(data)+bytesRead, + size-bytesRead)) == -1) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::read: Blocking read failed."); + return bytesRead; + } + bytesRead += n; + if (bytesRead >= size) + return bytesRead; + } + return bytesRead; + } + else + { + n = ::read(myPort, const_cast(data), size); + if (n == -1) + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::read: Non-Blocking read failed."); + return n; + } + } + ArLog::log(ArLog::Normal, "ArSerialConnection::read: Connection invalid."); + return -1; +} + +AREXPORT int ArSerialConnection::getStatus(void) +{ + return myStatus; +} + +AREXPORT ArTime ArSerialConnection::getTimeRead(int index) +{ + ArTime ret; + struct timeval timeStamp; + if (myPort <= 0) + { + ret.setToNow(); + return ret; + } + + if (myTakingTimeStamps) + { + timeStamp.tv_sec = index; + if (ioctl(myPort, TIOGETTIMESTAMP, &timeStamp) == 0) + { + ret.setSec(timeStamp.tv_sec); + ret.setMSec(timeStamp.tv_usec / 1000); + } + else + ret.setToNow(); + } + else + ret.setToNow(); + + return ret; +} + +AREXPORT bool ArSerialConnection::isTimeStamping(void) +{ + return myTakingTimeStamps; +} + + +AREXPORT bool ArSerialConnection::getCTS(void) +{ + unsigned int value; + if (ioctl(myPort, TIOCMGET, &value) == 0) + { + return (bool) (value & TIOCM_CTS); + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSerialConnection::getCTS: ioctl(TIOCMGET)"); + return false; + } +} + +AREXPORT bool ArSerialConnection::getDSR(void) +{ + unsigned int value; + if (ioctl(myPort, TIOCMGET, &value) == 0) + { + return (bool) (value & TIOCM_DSR); + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSerialConnection::getDSR: ioctl(TIOCMGET)"); + return false; + } +} + +AREXPORT bool ArSerialConnection::getDCD(void) +{ + unsigned int value; + if (ioctl(myPort, TIOCMGET, &value) == 0) + { + return (bool) (value & TIOCM_CAR); + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSerialConnection::getDCD: ioctl(TIOCMGET)"); + return false; + } +} + +AREXPORT bool ArSerialConnection::getRing(void) +{ + unsigned int value; + if (ioctl(myPort, TIOCMGET, &value) == 0) + { + return (bool) (value & TIOCM_RI); + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSerialConnection::getRing: ioctl(TIOCMGET)"); + return false; + } +} diff --git a/Legacy/Aria/src/ArSerialConnection_WIN.cpp b/Legacy/Aria/src/ArSerialConnection_WIN.cpp new file mode 100644 index 0000000..b47f021 --- /dev/null +++ b/Legacy/Aria/src/ArSerialConnection_WIN.cpp @@ -0,0 +1,459 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSerialConnection.h" +#include "ArLog.h" +#include "ariaUtil.h" + + +// PS 7/11/11 - nothing is done different for windows for 422 +AREXPORT ArSerialConnection::ArSerialConnection(bool is422) +{ + myPort = INVALID_HANDLE_VALUE; + myBaudRate = 9600; + myStatus = STATUS_NEVER_OPENED; + myHardwareControl = false; + buildStrMap(); + if (is422) + setPortType("serial422"); + else + setPortType("serial"); +} + +AREXPORT ArSerialConnection::~ArSerialConnection() +{ + if (myPort != INVALID_HANDLE_VALUE) + close(); +} + +void ArSerialConnection::buildStrMap(void) +{ + myStrMap[OPEN_COULD_NOT_OPEN_PORT] = "Could not open serial port."; + myStrMap[OPEN_COULD_NOT_SET_UP_PORT] = "Could not set up serial port."; + myStrMap[OPEN_INVALID_BAUD_RATE] = "Baud rate invalid, could not set baud on serial port."; + myStrMap[OPEN_COULD_NOT_SET_BAUD] = "Could not set baud rate on serial port."; + myStrMap[OPEN_ALREADY_OPEN] = "Serial port already open."; +} + +AREXPORT const char * ArSerialConnection::getOpenMessage(int messageNumber) +{ + return myStrMap[messageNumber].c_str(); +} + +AREXPORT bool ArSerialConnection::openSimple(void) +{ + if (internalOpen() == 0) + return true; + else + return false; +} + +/** + @param port The serial port to connect to, or NULL which defaults to + COM1 for windows and /dev/ttyS0 for linux + @return 0 for success, otherwise one of the open enums + @see getOpenMessage +*/ +AREXPORT void ArSerialConnection::setPort(const char *port) +{ + if (port == NULL) + myPortName = "COM1"; + else + myPortName = port; + setPortName(myPortName.c_str()); +} + +/** + @return The seiral port to connect to +**/ +AREXPORT const char * ArSerialConnection::getPort(void) +{ + return myPortName.c_str(); +} + +/** + @param port The serial port to connect to, or NULL which defaults to + COM1 for windows and /dev/ttyS0 for linux + @return 0 for success, otherwise one of the open enums + @see getOpenMessage +*/ +AREXPORT int ArSerialConnection::open(const char *port) +{ + setPort(port); + return internalOpen(); +} + + + +AREXPORT int ArSerialConnection::internalOpen(void) +{ + DCB dcb; + + + if (myStatus == STATUS_OPEN) + { + ArLog::log(ArLog::Terse, + "ArSerialConnection::open: Serial port already open"); + return OPEN_ALREADY_OPEN; + } + + ArLog::log(ArLog::Verbose, "ArSerialConnection::internalOpen: Connecting to serial port '%s'", myPortName.c_str()); + + + myPort = CreateFile(myPortName.c_str(), + GENERIC_READ | GENERIC_WRITE, + 0, /* exclusive access */ + NULL, /* no security attrs */ + OPEN_EXISTING, + 0, + NULL ); + + if (myPort == INVALID_HANDLE_VALUE) { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::open: Could not open serial port '%s'", + myPortName.c_str()); + return OPEN_COULD_NOT_OPEN_PORT; + } + + if ( !GetCommState(myPort, &dcb) ) + { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::open: Could not get port data to set up port"); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } + + dcb.ByteSize = 8; + dcb.Parity = NOPARITY; + dcb.StopBits = ONESTOPBIT; + dcb.fOutxCtsFlow = FALSE; + dcb.fOutxDsrFlow = 0; + dcb.fBinary = TRUE; + dcb.fParity = FALSE; + dcb.fNull = FALSE; + dcb.fOutX = FALSE; + dcb.fInX = FALSE; + + // set these explicitly and here now, instead of before when + // we used to set these after we did the first SetCommState... + // This is this way since a Japanese windows xp user had some problems with + // changing baud rates after this first set + if (myBaudRate > 0) + dcb.BaudRate = myBaudRate; + if (myHardwareControl == 0) + { + dcb.fRtsControl = RTS_CONTROL_ENABLE; + dcb.fDtrControl = DTR_CONTROL_ENABLE; + } + else + { + dcb.fRtsControl = RTS_CONTROL_DISABLE; + dcb.fDtrControl = DTR_CONTROL_DISABLE; + } + + if ( !SetCommState(myPort, &dcb) ) + { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::open: Could not set up port"); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } + + myStatus = STATUS_OPEN; + + /* these are now set above, see the comments there for why + if (!setBaud(myBaudRate)) + { + ArLog::log(ArLog::Terse, + "ArSerialConnection::open: Could not set baud rate."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_BAUD; + } + + if (!setHardwareControl(myHardwareControl)) + { + ArLog::log(ArLog::Terse, + "ArSerialConnection::open: Could not set hardware control."); + close(); + myStatus = STATUS_OPEN_FAILED; + return OPEN_COULD_NOT_SET_UP_PORT; + } +*/ + ArLog::log(ArLog::Verbose, + "ArSerialConnection::open: Successfully opened and configured serial port."); + return 0; +} + + + +AREXPORT bool ArSerialConnection::close(void) +{ + bool ret; + + if (myPort == INVALID_HANDLE_VALUE) + return true; + + /* disable event notification */ + SetCommMask( myPort, 0 ) ; + /* drop DTR */ + EscapeCommFunction( myPort, CLRDTR ) ; + /* purge any outstanding reads/writes and close device handle */ + PurgeComm( myPort, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR ); + + myStatus = STATUS_CLOSED_NORMALLY; + + ret = CloseHandle( myPort ) ; + if (ret) + ArLog::log(ArLog::Verbose, + "ArSerialConnection::close: Successfully closed serial port."); + else + ArLog::logErrorFromOS(ArLog::Verbose, + "ArSerialConnection::close: Unsuccessfully closed serial port."); + myPort = (HANDLE) INVALID_HANDLE_VALUE; + return ret; +} + +AREXPORT int ArSerialConnection::getBaud(void) +{ + return myBaudRate; +} + +AREXPORT bool ArSerialConnection::setBaud(int baud) +{ + DCB dcb; + + myBaudRate = baud; + + if (getStatus() != STATUS_OPEN) + return true; + + if (baud == 0) + return true; + + if ( !GetCommState(myPort, &dcb) ) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setBaud: Could not get port data."); + return false; + } + + dcb.BaudRate = myBaudRate; + + if ( !SetCommState(myPort, &dcb) ) + { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::setBaud: Could not set port data (trying baud %d).", myBaudRate); + return false; + } + + return true; +} + +AREXPORT bool ArSerialConnection::getHardwareControl(void) +{ + return myHardwareControl; +} + +AREXPORT bool ArSerialConnection::setHardwareControl(bool hardwareControl) +{ + DCB dcb; + + myHardwareControl = hardwareControl; + + if (getStatus() != STATUS_OPEN) + return true; + + if ( !GetCommState(myPort, &dcb) ) + { + ArLog::logErrorFromOS(ArLog::Terse, + "ArSerialConnection::setBaud: Could not get port Data."); + return false; + } + + if (myHardwareControl == 0) /* set control lines */ + { + dcb.fRtsControl = RTS_CONTROL_ENABLE; + dcb.fDtrControl = DTR_CONTROL_ENABLE; + } + else + { + dcb.fRtsControl = RTS_CONTROL_DISABLE; + dcb.fDtrControl = DTR_CONTROL_DISABLE; + } + + if ( !SetCommState(myPort, &dcb) ) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::setBaud: Could not set port Data."); + return false; + } + + return true; +} + +AREXPORT int ArSerialConnection::write(const char *data, unsigned int size) +{ + unsigned long ret; + + if (myPort != INVALID_HANDLE_VALUE && myStatus == STATUS_OPEN) + { + if (!WriteFile(myPort, data, size, &ret, NULL)) + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::write: Error on writing."); + return -1; + } + return ret; + } + ArLog::log(ArLog::Terse, "ArSerialConnection::write: Connection invalid."); + return -1; +} + +AREXPORT int ArSerialConnection::read(const char *data, unsigned int size, + unsigned int msWait) +{ + COMSTAT stat; + unsigned long ret; + unsigned int numToRead; + ArTime timeDone; + + if (myPort != INVALID_HANDLE_VALUE && myStatus == STATUS_OPEN) + { + if (msWait > 0) + { + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArSerialConnection::read() error adding msecs (%i)", + msWait); + } + while (timeDone.mSecTo() >= 0) + { + if (!ClearCommError(myPort, &ret, &stat)) + return -1; + if (stat.cbInQue < size) + ArUtil::sleep(2); + else + break; + } + } + if (!ClearCommError(myPort, &ret, &stat)) + return -1; + if (stat.cbInQue == 0) + return 0; + if (stat.cbInQue > size) + numToRead = size; + else + numToRead = stat.cbInQue; + if (ReadFile( myPort, (void *)data, numToRead, &ret, NULL)) + { + return (int)ret; + } + else + { + ArLog::logErrorFromOS(ArLog::Terse, "ArSerialConnection::read: Read failed."); + return -1; + } + } + ArLog::log(ArLog::Terse, "ArSerialConnection::read: Connection invalid."); + return -1; +} + + +AREXPORT int ArSerialConnection::getStatus(void) +{ + return myStatus; +} + +AREXPORT bool ArSerialConnection::isTimeStamping(void) +{ + return false; +} + +AREXPORT ArTime ArSerialConnection::getTimeRead(int index) +{ + ArTime now; + now.setToNow(); + return now; +} + +AREXPORT bool ArSerialConnection::getCTS(void) +{ + DWORD modemStat; + if (GetCommModemStatus(myPort, &modemStat)) + { + return (bool) (modemStat & MS_CTS_ON); + } + else + { + fprintf(stderr, "problem with GetCommModemStatus\n"); + return false; + } +} + +AREXPORT bool ArSerialConnection::getDSR(void) +{ + DWORD modemStat; + if (GetCommModemStatus(myPort, &modemStat)) + { + return (bool) (modemStat & MS_DSR_ON); + } + else + { + fprintf(stderr, "problem with GetCommModemStatus\n"); + return false; + } +} + +AREXPORT bool ArSerialConnection::getDCD(void) +{ + DWORD modemStat; + if (GetCommModemStatus(myPort, &modemStat)) + { + return (bool) (modemStat & MS_RLSD_ON); + } + else + { + fprintf(stderr, "problem with GetCommModemStatus\n"); + return false; + } +} + +AREXPORT bool ArSerialConnection::getRing(void) +{ + DWORD modemStat; + if (GetCommModemStatus(myPort, &modemStat)) + { + return (bool) (modemStat & MS_RING_ON); + } + else + { + fprintf(stderr, "problem with GetCommModemStatus\n"); + return false; + } +} + diff --git a/Legacy/Aria/src/ArSick.cpp b/Legacy/Aria/src/ArSick.cpp new file mode 100644 index 0000000..b251576 --- /dev/null +++ b/Legacy/Aria/src/ArSick.cpp @@ -0,0 +1,226 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSick.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + + +AREXPORT ArSick::ArSick( + size_t currentBufferSize, size_t cumulativeBufferSize, + const char *name, bool addAriaExitCB, bool isSecondLaser) : + ArLMS2xx(!isSecondLaser ? 1 : 2, name, !isSecondLaser ? false : true) +{ + setCurrentBufferSize(currentBufferSize); + setCumulativeBufferSize(cumulativeBufferSize); +} + +AREXPORT ArSick::~ArSick() +{ + +} + + +/** + * Manually set laser configuration options for connection. This must be called + * only before connecting to the laser (not while the laser is connected). + * This configuration is automatically performed if you are using + * ArSimpleConnector to connect to the laser based on command line parameters, + * so calling this function is only neccesary if you are not using + * ArSimpleConnector, or you wish to always override ArSimpleConnector's + * configuration. + * + * (Don't forget, you must lock ArLMS2xx with lockDevice() if multiple threads + * are accessing the ArLMS2xx, e.g. if you used runAsync().) +**/ +AREXPORT void ArSick::configure(bool useSim, bool powerControl, + bool laserFlipped, BaudRate baud, + Degrees deg, Increment incr) +{ + configureShort(useSim, baud, deg, incr); + + setPowerControlled(powerControl); + setFlipped(laserFlipped); +} + +/** + * @copydoc configure() +**/ +AREXPORT void ArSick::configureShort(bool useSim, BaudRate baud, + Degrees deg, Increment incr) +{ + myUseSim = useSim; + + setPowerControlled(true); + setFlipped(false); + + if (baud == BAUD9600) + chooseAutoBaud("9600"); + else if (baud == BAUD19200) + chooseAutoBaud("19200"); + else if (baud == BAUD38400) + chooseAutoBaud("38400"); + else + ArLog::log(ArLog::Normal, "%s: Bad baud choice", getName()); + + if (deg == DEGREES180) + chooseDegrees("180"); + else if (deg == DEGREES100) + chooseDegrees("100"); + else + ArLog::log(ArLog::Normal, "%s: Bad degrees choice", getName()); + + + if (incr == INCREMENT_ONE) + chooseIncrement("one"); + else if (incr == INCREMENT_HALF) + chooseIncrement("half"); + else + ArLog::log(ArLog::Normal, "%s: Bad increment choice", getName()); + +} + +/** + Sets the range/bit information. The old immutable combination is + (in effect) the same as the new default. If you look at the enums + for these units you can see the effect this has on range. +**/ +AREXPORT void ArSick::setRangeInformation(Bits bits, Units units) +{ + if (bits == BITS_1REFLECTOR) + chooseReflectorBits("1ref"); + else if (bits == BITS_2REFLECTOR) + chooseReflectorBits("2ref"); + else if (bits == BITS_3REFLECTOR) + chooseReflectorBits("3ref"); + else + ArLog::log(ArLog::Normal, "%s: Bad reflectorBits choice", getName()); + + if (units == UNITS_1MM) + chooseUnits("1mm"); + else if (units == UNITS_1MM) + chooseUnits("1cm"); + else if (units == UNITS_10CM) + chooseUnits("10cm"); + else + ArLog::log(ArLog::Normal, "%s: Bad units choice", getName()); +} + + + +AREXPORT bool ArSick::isControllingPower(void) +{ + return getPowerControlled(); +} + +AREXPORT bool ArSick::isLaserFlipped(void) +{ + return getFlipped(); +} + +AREXPORT ArSick::Degrees ArSick::getDegrees(void) +{ + if (strcasecmp(getDegreesChoice(), "180") == 0) + return DEGREES180; + else if (strcasecmp(getDegreesChoice(), "100") == 0) + return DEGREES100; + else + { + ArLog::log(ArLog::Normal, "ArSick::getDegrees: Invalid degrees %s", + getDegreesChoice()); + return DEGREES_INVALID; + } +} + +AREXPORT ArSick::Increment ArSick::getIncrement(void) +{ + if (strcasecmp(getIncrementChoice(), "one") == 0) + return INCREMENT_ONE; + else if (strcasecmp(getIncrementChoice(), "half") == 0) + return INCREMENT_HALF; + else + { + ArLog::log(ArLog::Normal, "ArSick::getIncrement: Invalid increment %s", + getIncrementChoice()); + return INCREMENT_INVALID; + } +} + +AREXPORT ArSick::Bits ArSick::getBits(void) +{ + if (strcasecmp(getReflectorBitsChoice(), "1ref") == 0) + return BITS_1REFLECTOR; + else if (strcasecmp(getReflectorBitsChoice(), "2ref") == 0) + return BITS_2REFLECTOR; + else if (strcasecmp(getReflectorBitsChoice(), "3ref") == 0) + return BITS_3REFLECTOR; + else + { + ArLog::log(ArLog::Normal, "ArSick::getReflectorBits: Invalid ReflectorBits %s", + getReflectorBitsChoice()); + return BITS_INVALID; + } +} + +AREXPORT ArSick::Units ArSick::getUnits(void) +{ + if (strcasecmp(getUnitsChoice(), "1mm") == 0) + return UNITS_1MM; + else if (strcasecmp(getUnitsChoice(), "1cm") == 0) + return UNITS_1CM; + else if (strcasecmp(getUnitsChoice(), "10cm") == 0) + return UNITS_10CM; + else + { + ArLog::log(ArLog::Normal, "ArSick::getUnits: Invalid units %s", + getUnitsChoice()); + return UNITS_INVALID; + } +} + +AREXPORT void ArSick::setIsControllingPower(bool controlPower) +{ + setPowerControlled(controlPower); +} + +AREXPORT void ArSick::setIsLaserFlipped(bool laserFlipped) +{ + setFlipped(laserFlipped); +} + + +AREXPORT bool ArSick::isUsingSim(void) +{ + return sickGetIsUsingSim(); +} + +AREXPORT void ArSick::setIsUsingSim(bool usingSim) +{ + return sickSetIsUsingSim(usingSim); +} diff --git a/Legacy/Aria/src/ArSignalHandler_LIN.cpp b/Legacy/Aria/src/ArSignalHandler_LIN.cpp new file mode 100644 index 0000000..56f83a7 --- /dev/null +++ b/Legacy/Aria/src/ArSignalHandler_LIN.cpp @@ -0,0 +1,342 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ArSignalHandler.h" +#include "ArLog.h" +#include "ariaInternal.h" + +ArSignalHandler *ArSignalHandler::ourSignalHandler=0; +ArStrMap ArSignalHandler::ourSigMap; +sigset_t ArSignalHandler::ourBlockSigSet; +sigset_t ArSignalHandler::ourHandleSigSet; +std::list*> ArSignalHandler::ourHandlerList; + + +void ArSignalHandler::signalCB(int sig) +{ + std::list*>::iterator iter; + + ArLog::log(ArLog::Verbose, + "ArSignalHandler::runThread: Received signal '%s' Number %d ", + ourSigMap[sig].c_str(), sig); + for (iter=ourHandlerList.begin(); iter != ourHandlerList.end(); ++iter) + (*iter)->invoke(sig); + if (ourHandlerList.begin() == ourHandlerList.end()) + ArLog::log(ArLog::Terse, + "ArSignalHandler::runThread: No handler function. Unhandled signal '%s' Number %d", + ourSigMap[sig].c_str(), sig); +} + +/** + Sets up the signal handling for a non-threaded program. When the program + This uses the system call signal(2). This should not be used if you have + a threaded program. + @see createHandlerThreaded +*/ +AREXPORT void ArSignalHandler::createHandlerNonThreaded() +{ + int i; + initSigMap(); + signal(SigSEGV, &signalCB); + signal(SigFPE, &signalCB); + for (i=1; i <= SigPWR; ++i) + { + if (sigismember(&ourBlockSigSet, i)) + signal(i, SIG_IGN); + if (sigismember(&ourHandleSigSet, i)) + signal(i, &signalCB); + } + +} + +/** + Sets up the signal handling for a threaded program. This call is + only useful for Linux. This will create a dedicated thread in which + to handle signals. The thread calls sigwait(3) and waits for a + signal to be sent. By default all ArThread instances block all + signals. Thus the signal is sent to the signal handler thread. This + will allow the other threads to continue uninterrupted and not skew + their timing loops. + @see createHandlerNonThreaded +**/ +AREXPORT void ArSignalHandler::createHandlerThreaded() +{ + signal(SigSEGV, &signalCB); + signal(SigFPE, &signalCB); + getHandler()->create(false); +} + +/** + Sets the signal handler to block all the common signals. The + 'common' signals are SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGSEGV, and + SIGPIPE. Call this before calling createHandlerNonThreaded or + createHandlerThreaded. +**/ +AREXPORT void ArSignalHandler::blockCommon() +{ + unblockAll(); + block(SigHUP); + block(SigPIPE); + block(SigINT); + block(SigQUIT); + block(SigTERM); +} + +/** + Unblock all the signals. Call this before calling createHandlerNonThreaded + or createHandlerThreaded. +*/ +AREXPORT void ArSignalHandler::unblockAll() +{ + sigemptyset(&ourBlockSigSet); +} + +/** + Block the given signal. Call this before calling createHandlerNonThreaded + or createHandlerThreaded. + @param sig the number of the signal +*/ +AREXPORT void ArSignalHandler::block(Signal sig) +{ + sigaddset(&ourBlockSigSet, sig); +} + +/** + Unblock the given signal. Call this before calling createHandlerNonThreaded + or createHandlerThreaded. + @param sig the number of the signal +*/ +AREXPORT void ArSignalHandler::unblock(Signal sig) +{ + sigdelset(&ourBlockSigSet, sig); +} + +/** + Handle the given signal. All the handler callbacks will be called with this + signal when it is received. Call this before calling + createHandlerNonThreaded or createHandlerThreaded. + @param sig the number of the signal +*/ +AREXPORT void ArSignalHandler::handle(Signal sig) +{ + unblock(sig); + sigaddset(&ourHandleSigSet, sig); +} + +/** + Do not handle the given signal. Call this before calling + createHandlerNonThreaded or createHandlerThreaded. + @param sig the number of the signal +*/ +AREXPORT void ArSignalHandler::unhandle(Signal sig) +{ + sigdelset(&ourHandleSigSet, sig); +} + +/** + Add a handler callback to the list of callbacks. When there is a signal + sent to the process, the list of callbacks are invoked and passed the signal + number. + @param func functor created from ArFunctorC1 which refers to the + function to call. + @param position whether to place the functor first or last +*/ +AREXPORT void ArSignalHandler::addHandlerCB(ArFunctor1 *func, + ArListPos::Pos position) +{ + + if (position == ArListPos::FIRST) + ourHandlerList.push_front(func); + else if (position == ArListPos::LAST) + ourHandlerList.push_back(func); + else + ArLog::log(ArLog::Terse, + "ArSignalHandler::addHandler: Invalid position."); +} + +/** + Remove a handler callback from the list of callbacks. + @param func functor created from ArFunctorC1 which refers to the + function to call. +*/ +AREXPORT void ArSignalHandler::delHandlerCB(ArFunctor1 *func) +{ + ourHandlerList.remove(func); +} + +/** + Removes all of the signal handler callback from the list of callbacks. +**/ +AREXPORT void ArSignalHandler::delAllHandlerCBs(void) +{ + ourHandlerList.clear(); +} + +/** + Get a pointer to the single instance of the ArSignalHandler. The signal + handler uses the singleton model, which means there can only be one + instance of ArSignalHandler. If the single instance of ArSignalHandler + has not been created, getHandler will create it. This is how the handler + should be created. + @return returns a pointer to the instance of the signal handler +*/ +AREXPORT ArSignalHandler * ArSignalHandler::getHandler() +{ + if (!ourSignalHandler) + ourSignalHandler=new ArSignalHandler; + + return(ourSignalHandler); +} + +/** + Block all the common signals for the calling thread. The calling thread + will never receive the common signals which are SIGHUP, SIGINT, SIGQUIT, + and SIGTERM. This function can be called at any time. +*/ +AREXPORT void ArSignalHandler::blockCommonThisThread() +{ + sigset_t commonSet; + sigemptyset(&commonSet); + sigaddset(&commonSet, SigHUP); + sigaddset(&commonSet, SigPIPE); + sigaddset(&commonSet, SigINT); + sigaddset(&commonSet, SigQUIT); + sigaddset(&commonSet, SigTERM); + //sigaddset(&commonSet, SigSEGV); + pthread_sigmask(SIG_SETMASK, &commonSet, 0); +} + +AREXPORT void ArSignalHandler::blockAllThisThread() +{ + sigset_t fullSet; + sigfillset(&fullSet); + pthread_sigmask(SIG_SETMASK, &fullSet, 0); +} + + +ArSignalHandler::ArSignalHandler() : + ourIgnoreQUIT(false) +{ + setThreadName("ArSignalHandler"); + initSigMap(); +} + +ArSignalHandler::~ArSignalHandler() +{ +} + +AREXPORT void * ArSignalHandler::runThread(void *arg) +{ + setThreadName("ArSignalHandler"); + threadStarted(); + + // I think the old code was broken in that it didn't block all the + // signals it wanted to wait for, which sigwait is supposed to + // do... it also didn't check the return... for some reason system + // on a debian box (at least a newer one) causes sigwait to return + // with an error state (return of 4)... the old sigwait from rh 7.x + // said it never returned an error... I don't entirely understand + // it, and thats why both blocks of code are here + + // old code + /* + int sig; + + pthread_sigmask(SIG_SETMASK, &ourBlockSigSet, 0); + + while (myRunning) + { + sigwait(&ourHandleSigSet, &sig); + signalCB(sig); + } + + return(0); +*/ + // new code + int sig = 0; + + while (myRunning) + { + pthread_sigmask(SIG_SETMASK, &ourBlockSigSet, 0); + pthread_sigmask(SIG_BLOCK, &ourHandleSigSet, 0); + + if (sigwait(&ourHandleSigSet, &sig) == 0) + signalCB(sig); + } + return(0); +} + +AREXPORT void ArSignalHandler::initSigMap() +{ + ourSigMap[SIGHUP]="SIGHUP"; + ourSigMap[SIGINT]="SIGINT"; + ourSigMap[SIGQUIT]="SIGQUIT"; + ourSigMap[SIGILL]="SIGILL"; + ourSigMap[SIGTRAP]="SIGTRAP"; + ourSigMap[SIGABRT]="SIGABRT"; +#ifdef linux + ourSigMap[SIGIOT]="SIGIOT"; +#endif + ourSigMap[SIGBUS]="SIGBUS"; + ourSigMap[SIGFPE]="SIGFPE"; + ourSigMap[SIGKILL]="SIGKILL"; + ourSigMap[SIGUSR1]="SIGUSR1"; + ourSigMap[SIGSEGV]="SIGSEGV"; + ourSigMap[SIGUSR2]="SIGUSR2"; + ourSigMap[SIGPIPE]="SIGPIPE"; + ourSigMap[SIGALRM]="SIGALRM"; + ourSigMap[SIGTERM]="SIGTERM"; + //ourSigMap[SIGSTKFLT]="SIGSTKFLT"; + ourSigMap[SIGCHLD]="SIGCHLD"; + ourSigMap[SIGCONT]="SIGCONT"; + ourSigMap[SIGSTOP]="SIGSTOP"; + ourSigMap[SIGTSTP]="SIGTSTP"; + ourSigMap[SIGTTIN]="SIGTTIN"; + ourSigMap[SIGTTOU]="SIGTTOU"; + ourSigMap[SIGURG]="SIGURG"; + ourSigMap[SIGXCPU]="SIGXCPU"; + ourSigMap[SIGXFSZ]="SIGXFSZ"; + ourSigMap[SIGVTALRM]="SIGVTALRM"; + ourSigMap[SIGPROF]="SIGPROF"; + ourSigMap[SIGWINCH]="SIGWINCH"; + ourSigMap[SIGIO]="SIGIO"; +#ifdef linux + ourSigMap[SIGPWR]="SIGPWR"; +#endif +} + +AREXPORT const char *ArSignalHandler::nameSignal(int sig) +{ + return(ourSigMap[sig].c_str()); +} + +AREXPORT void ArSignalHandler::logThread(void) +{ + if (ourSignalHandler != NULL) + ourSignalHandler->logThreadInfo(); + else + ArLog::log(ArLog::Normal, "No signal handler thread running"); +} diff --git a/Legacy/Aria/src/ArSignalHandler_WIN.cpp b/Legacy/Aria/src/ArSignalHandler_WIN.cpp new file mode 100644 index 0000000..681742b --- /dev/null +++ b/Legacy/Aria/src/ArSignalHandler_WIN.cpp @@ -0,0 +1,186 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSignalHandler.h" +#include "ArLog.h" + + +ArSignalHandler *ArSignalHandler::ourSignalHandler=0; +ArStrMap ArSignalHandler::ourSigMap; +std::list*> ArSignalHandler::ourHandlerList; + + +AREXPORT void ArSignalHandler::signalCB(int sig) +{ + std::list*>::iterator iter; + + for (iter=ourHandlerList.begin(); iter != ourHandlerList.end(); ++iter) + (*iter)->invoke(sig); + if (ourHandlerList.begin() == ourHandlerList.end()) + ArLog::log(ArLog::Terse, "ArSignalHandler::runThread: No handler function. Unhandled signal '%s'", ourSigMap[sig].c_str()); +} + +AREXPORT void ArSignalHandler::createHandlerNonThreaded() +{ +} + +AREXPORT void ArSignalHandler::createHandlerThreaded() +{ + getHandler()->create(false); +} + +AREXPORT void ArSignalHandler::blockCommon() +{ +} + +AREXPORT void ArSignalHandler::unblockAll() +{ +} + +AREXPORT void ArSignalHandler::block(Signal sig) +{ +} + +AREXPORT void ArSignalHandler::unblock(Signal sig) +{ +} + +AREXPORT void ArSignalHandler::handle(Signal sig) +{ +} + +AREXPORT void ArSignalHandler::unhandle(Signal sig) +{ +} + +AREXPORT void ArSignalHandler::addHandlerCB(ArFunctor1 *func, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + ourHandlerList.push_front(func); + else if (position == ArListPos::LAST) + ourHandlerList.push_back(func); + else + ArLog::log(ArLog::Terse, + "ArSignalHandler::addHandler: Invalid position."); +} + +AREXPORT void ArSignalHandler::delHandlerCB(ArFunctor1 *func) +{ + ourHandlerList.remove(func); +} + +/** + Removes all of the signal handler callback from the list of callbacks. +**/ +AREXPORT void ArSignalHandler::delAllHandlerCBs(void) +{ + ourHandlerList.clear(); +} + + +AREXPORT ArSignalHandler * ArSignalHandler::getHandler() +{ + if (!ourSignalHandler) + ourSignalHandler=new ArSignalHandler; + + return(ourSignalHandler); +} + +AREXPORT void ArSignalHandler::blockCommonThisThread() +{ +} + +AREXPORT void ArSignalHandler::blockAllThisThread() +{ +} + +ArSignalHandler::ArSignalHandler() +{ + setThreadName("ArSignalHandler"); + initSigMap(); +} + +ArSignalHandler::~ArSignalHandler() +{ +} + +AREXPORT void * ArSignalHandler::runThread(void *arg) +{ + threadStarted(); + threadFinished(); // ?? + return(0); +} + +void ArSignalHandler::initSigMap() +{ + ourSigMap[SigHUP]="SIGHUP"; + ourSigMap[SigINT]="SIGINT"; + ourSigMap[SigQUIT]="SIGQUIT"; + ourSigMap[SigILL]="SIGILL"; + ourSigMap[SigTRAP]="SIGTRAP"; + ourSigMap[SigABRT]="SIGABRT"; + //ourSigMap[SigIOT]="SIGIOT"; + ourSigMap[SigBUS]="SIGBUS"; + ourSigMap[SigFPE]="SIGFPE"; + ourSigMap[SigKILL]="SIGKILL"; + ourSigMap[SigUSR1]="SIGUSR1"; + ourSigMap[SigSEGV]="SIGSEGV"; + ourSigMap[SigUSR2]="SIGUSR2"; + ourSigMap[SigPIPE]="SIGPIPE"; + ourSigMap[SigALRM]="SIGALRM"; + ourSigMap[SigTERM]="SIGTERM"; + //ourSigMap[SigSTKFLT]="SIGSTKFLT"; + ourSigMap[SigCHLD]="SIGCHLD"; + ourSigMap[SigCONT]="SIGCONT"; + ourSigMap[SigSTOP]="SIGSTOP"; + ourSigMap[SigTSTP]="SIGTSTP"; + ourSigMap[SigTTIN]="SIGTTIN"; + ourSigMap[SigTTOU]="SIGTTOU"; + ourSigMap[SigURG]="SIGURG"; + ourSigMap[SigXCPU]="SIGXCPU"; + ourSigMap[SigXFSZ]="SIGXFSZ"; + ourSigMap[SigVTALRM]="SIGVTALRM"; + ourSigMap[SigPROF]="SIGPROF"; + ourSigMap[SigWINCH]="SIGWINCH"; + ourSigMap[SigIO]="SIGIO"; + ourSigMap[SigPWR]="SIGPWR"; +} + +AREXPORT const char * ArSignalHandler::nameSignal(int sig) +{ + return(ourSigMap[sig].c_str()); +} + +AREXPORT void ArSignalHandler::logThread(void) +{ + if (ourSignalHandler != NULL) + ourSignalHandler->logThreadInfo(); + else + ArLog::log(ArLog::Normal, "No signal handler thread running"); +} diff --git a/Legacy/Aria/src/ArSimpleConnector.cpp b/Legacy/Aria/src/ArSimpleConnector.cpp new file mode 100644 index 0000000..7f34b7b --- /dev/null +++ b/Legacy/Aria/src/ArSimpleConnector.cpp @@ -0,0 +1,274 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSimpleConnector.h" +#include "ArRobot.h" +#include "ArLaser.h" +#include "ArSick.h" +#include "ariaInternal.h" + +AREXPORT ArSimpleConnector::ArSimpleConnector(int *argc, char **argv) +{ + myParser = new ArArgumentParser(argc, argv); + myOwnParser = true; + finishConstructor(); +} + +/** @warning do not delete @a builder during the lifetime of this + * ArSimpleConnector, which may need to access its contents later. + */ +AREXPORT ArSimpleConnector::ArSimpleConnector(ArArgumentBuilder *builder) +{ + myParser = new ArArgumentParser(builder); + myOwnParser = true; + finishConstructor(); +} + +/** @warning do not delete @a parser during the lifetime of this + * ArSimpleConnector, which may need to access its contents later. + */ +AREXPORT ArSimpleConnector::ArSimpleConnector(ArArgumentParser *parser) +{ + myParser = parser; + myOwnParser = false; + finishConstructor(); +} + +AREXPORT ArSimpleConnector::~ArSimpleConnector(void) +{ + +} + + +void ArSimpleConnector::finishConstructor(void) +{ + myRobotConnector = new ArRobotConnector(myParser, NULL); + myLaserConnector = new ArLaserConnector(myParser, NULL, myRobotConnector); + setMaxNumLasers(); + //myLaserConnector->addLaser +} + +AREXPORT void ArSimpleConnector::setMaxNumLasers(int maxNumLasers) +{ + int i; + for (i = 1; i <= maxNumLasers; i++) + myLaserConnector->addPlaceholderLaser(new ArSick, i, true); + +} + +AREXPORT bool ArSimpleConnector::parseArgs(void) +{ + return parseArgs(myParser); +} + +/** + * Parse command line arguments held by the given ArArgumentParser. + * + @return true if the arguments were parsed successfully false if not + + The following arguments are used for the robot connection: + +
+
-robotPort port
+
-rp port
+
Use the given serial port device name for a serial port connection (e.g. COM1, or /dev/ttyS0 if on Linux.) + The default is the first serial port, or COM1, which is the typical Pioneer setup. +
+ +
-remoteHost hostname
+
-rh hostname
+
Use a TCP connection to a remote computer with the given network host name instead of a serial port connection
+ +
-remoteRobotTcpPort port
+
-rrtp port
+
Use the given TCP port number if connecting to a remote robot using TCP due to -remoteHost having been given.
+ +
-remoteIsSim
+
-ris
+
The remote TCP robot given by -remoteHost or -rh is actually a simulator. Use any alternative + behavior intended for the simulator (e.g. tell the laser device object to request laser data from the simulator rather + than trying to connect to a real laser device on the local computer)
+ +
-robotBaud baudrate
+
-rb baudrate
+
Use the given baud rate when connecting over a serial port, instead of trying to use the normal rate.
+
+ + The following arguments are accepted for laser connections. A program may request support for more than one laser + using setMaxNumLasers(); if multi-laser support is enabled in this way, then these arguments must have the laser index + number appended. For example, "-laserPort" for laser 1 would instead by "-laserPort1", and for laser 2 it would be + "-laserPort2". + +
+
-laserPort port
+
-lp port
+
Use the given port device name when connecting to a laser. For example, COM2 or on Linux, /dev/ttyS1. + The default laser port is COM2, which is the typical Pioneer laser port setup. +
+ +
-laserFlipped true|false
+
-lf true|false
+
If true, then the laser is mounted upside-down on the robot and the ordering of readings + should be reversed.
+ +
-connectLaser
+
-cl
+
Explicitly request that the client program connect to a laser, if it does not always do so
+ +
-laserPowerControlled true|false
+
-lpc true|false
+
If true, then the laser is powered on when the serial port is initially opened, so enable + certain features when connecting such as a waiting period as the laser initializes.
+ +
-laserDegrees degrees
+
-ld degrees
+
Indicate the size of the laser field of view, either 180 (default) or 100.
+ +
-laserIncrement increment
+
-li increment
+
Configures the laser's angular resolution. If one, then configure the laser to take a reading every degree. + If half, then configure it for a reading every 1/2 degrees.
+ +
-laserUnits units
+
-lu units
+
Configures the laser's range resolution. May be 1mm for one milimiter, 1cm for ten milimeters, or 10cm for one hundred milimeters.
+ +
-laserReflectorBits bits
+
-lrb bits
+
Enables special reflectance detection, and configures the granularity of reflector detection information. Using more bits allows the laser to provide values for several different + reflectance levels, but also may force a reduction in range. (Note, the SICK LMS-200 only detects high reflectance on special reflector material + manufactured by SICK.) +
+
+ + **/ + +AREXPORT bool ArSimpleConnector::parseArgs(ArArgumentParser *parser) +{ + return myRobotConnector->parseArgs() && myLaserConnector->parseArgs(); +} + +AREXPORT void ArSimpleConnector::logOptions(void) const +{ + myRobotConnector->logOptions(); + myLaserConnector->logOptions(); +} + + +/** + * This method is normally used internally by connectRobot(), but you may + * use it if you wish. + * + * If -remoteHost was given, then open that TCP port. If it was not given, + * then try to open a TCP port to the simulator on localhost. + * If that fails, then use a local serial port connection. + * Sets the given ArRobot's device connection pointer to this object. + * Sets up internal settings determined by command line arguments such + * as serial port and baud rate, etc. + * + * After calling this function (and it returns true), then you may connect + * ArRobot to the robot using ArRobot::blockingConnect() (or similar). + * + * @return false if -remoteHost was given and there was an error connecting to + * the remote host, true otherwise. + **/ +AREXPORT bool ArSimpleConnector::setupRobot(ArRobot *robot) +{ + return myRobotConnector->setupRobot(robot); +} + +/** Prepares the given ArRobot object for connection, then begins + * a blocking connection attempt. + * If you wish to simply prepare the ArRobot object, but not begin + * the connection, then use setupRobot(). + */ +AREXPORT bool ArSimpleConnector::connectRobot(ArRobot *robot) +{ + return myRobotConnector->connectRobot(robot); +} + +/** + Description of the logic for connection to the laser: If + --remoteHost then the laser will a tcp connection will be opened to + that remoteHost at port 8102 or --remoteLaserTcpPort if that + argument is given, if this connection fails then the setup fails. + If --remoteHost wasn't provided and the robot connected to a + simulator as described elsewhere then the laser is just configured + to be simulated, if the robot isn't connected to a simulator it + tries to open a serial connection to ArUtil::COM3 or --laserPort if + that argument is given. +**/ + +AREXPORT bool ArSimpleConnector::setupLaser(ArSick *laser) +{ + return myLaserConnector->setupLaser(laser, 1); +} + +/** + Description of the logic for connecting to a second laser: Given + the fact that there are no parameters for the location of a second + laser, the laser's port must be passed in to ArSimpleConnector from + the main or from ArArgumentBuilder. Similarly, a tcp connection must + be explicitly defined with the --remoteLaserTcpPort2 argument. +**/ +AREXPORT bool ArSimpleConnector::setupSecondLaser(ArSick *laser) +{ + return myLaserConnector->setupLaser(laser, 2); +} + +AREXPORT bool ArSimpleConnector::setupLaserArbitrary(ArSick *laser, + int laserNumber) +{ + return myLaserConnector->setupLaser(laser, laserNumber); +} + +/** + This will setup and connect the laser if the command line switch + was given to do so or simply return true if no connection was + wanted. +**/ + +AREXPORT bool ArSimpleConnector::connectLaser(ArSick *laser) +{ + return myLaserConnector->connectLaser(laser, 1, false); +} + +/** + This will setup and connect the laser if the command line switch + was given to do so or simply return true if no connection was + requested. +**/ +AREXPORT bool ArSimpleConnector::connectSecondLaser(ArSick *laser) +{ + return myLaserConnector->connectLaser(laser, 1, false); +} + +AREXPORT bool ArSimpleConnector::connectLaserArbitrary( + ArSick *laser, int laserNumber) +{ + return myLaserConnector->connectLaser(laser, laserNumber, false); +} diff --git a/Legacy/Aria/src/ArSimulatedLaser.cpp b/Legacy/Aria/src/ArSimulatedLaser.cpp new file mode 100644 index 0000000..d8a6a8d --- /dev/null +++ b/Legacy/Aria/src/ArSimulatedLaser.cpp @@ -0,0 +1,567 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSimulatedLaser.h" +#include "ArRobot.h" + + +AREXPORT ArSimulatedLaser::ArSimulatedLaser(ArLaser *laser) : + ArLaser(laser->getLaserNumber(), + laser->getName(), + laser->getAbsoluteMaxRange(), + laser->isLocationDependent(), + false), + mySimPacketHandler(this, &ArSimulatedLaser::simPacketHandler) +{ + myLaser = laser; + + std::string name; + name = "sim_"; + name += getName(); + laserSetName(name.c_str()); + + /* + printf("@@@@@@ %d %d @ %d %d\n", + laser->getCurrentRangeBuffer()->getSize(), + laser->getCumulativeRangeBuffer()->getSize(), + getCurrentRangeBuffer()->getSize(), + getCumulativeRangeBuffer()->getSize()); + */ + + // laser parameters + setInfoLogLevel(myLaser->getInfoLogLevel()); + setConnectionTimeoutSeconds(myLaser->getConnectionTimeoutSeconds()); + setCumulativeCleanDist(myLaser->getCumulativeCleanDist()); + setCumulativeCleanInterval(myLaser->getCumulativeCleanInterval()); + setCumulativeCleanOffset(myLaser->getCumulativeCleanOffset()); + + setSensorPosition(myLaser->getSensorPosition()); + laserSetAbsoluteMaxRange(myLaser->getAbsoluteMaxRange()); + setMaxRange(myLaser->getMaxRange()); + + // base range device parameters + setMaxSecondsToKeepCurrent(myLaser->getMaxSecondsToKeepCurrent()); + setMinDistBetweenCurrent(getMinDistBetweenCurrent()); + setMaxSecondsToKeepCumulative(myLaser->getMaxSecondsToKeepCumulative()); + setMaxDistToKeepCumulative(myLaser->getMaxDistToKeepCumulative()); + setMinDistBetweenCumulative(myLaser->getMinDistBetweenCumulative()); + setMaxInsertDistCumulative(myLaser->getMaxInsertDistCumulative()); + setCurrentDrawingData(myLaser->getCurrentDrawingData(), false); + setCumulativeDrawingData(myLaser->getCumulativeDrawingData(), false); + + // now all the specific laser settings + if (myLaser->canSetDegrees()) + laserAllowSetDegrees( + myLaser->getStartDegrees(), myLaser->getStartDegreesMin(), + myLaser->getStartDegreesMax(), myLaser->getEndDegrees(), + myLaser->getEndDegreesMin(), myLaser->getEndDegreesMax()); + + if (myLaser->canChooseDegrees()) + laserAllowDegreesChoices(myLaser->getDegreesChoice(), + myLaser->getDegreesChoicesMap()); + + if (myLaser->canSetIncrement()) + laserAllowSetIncrement(myLaser->getIncrement(), + myLaser->getIncrementMin(), + myLaser->getIncrementMax()); + + if (myLaser->canChooseIncrement()) + laserAllowIncrementChoices(myLaser->getIncrementChoice(), + myLaser->getIncrementChoicesMap()); + + if (myLaser->canChooseUnits()) + laserAllowUnitsChoices(myLaser->getUnitsChoice(), + myLaser->getUnitsChoices()); + + if (myLaser->canChooseReflectorBits()) + laserAllowReflectorBitsChoices(myLaser->getReflectorBitsChoice(), + myLaser->getReflectorBitsChoices()); + + if (canSetPowerControlled()) + laserAllowSetPowerControlled(myLaser->getPowerControlled()); + + if (myLaser->canChooseStartingBaud()) + laserAllowStartingBaudChoices(myLaser->getStartingBaudChoice(), + myLaser->getStartingBaudChoices()); + + if (myLaser->canChooseAutoBaud()) + laserAllowAutoBaudChoices(myLaser->getAutoBaudChoice(), + myLaser->getAutoBaudChoices()); + + laserSetDefaultTcpPort(myLaser->getDefaultTcpPort()); + laserSetDefaultPortType(myLaser->getDefaultPortType()); + + // actual stuff for the sim + myStartConnect = false; + myIsConnected = false; + myTryingToConnect = false; + myAssembleReadings = new std::list; + myCurrentReadings = new std::list; + myRawReadings = myCurrentReadings; + myIter = myAssembleReadings->begin(); + + myReceivedData = false; +} + +AREXPORT ArSimulatedLaser::~ArSimulatedLaser() +{ + +} + +AREXPORT bool ArSimulatedLaser::blockingConnect(void) +{ + if (myLaserNumber != 1) + { + ArLog::log(ArLog::Normal, "%s: Cannot use the simulator with multiple lasers yet", getName()); + laserFailedConnect(); + return false; + } + + if (!finishParams()) + { + laserFailedConnect(); + return false; + } + + if (myRobot == NULL) + { + ArLog::log(ArLog::Normal, + "%s: Cannot connect to simulated laser because it has no robot", + getName()); + laserFailedConnect(); + return false; + } + + lockDevice(); + + if (canSetDegrees()) + { + mySimBegin = ArUtil::findMin(getStartDegrees(), getEndDegrees()); + mySimEnd = ArUtil::findMax(getStartDegrees(), getEndDegrees()); + } + else if (canChooseDegrees()) + { + mySimBegin = -getDegreesChoiceDouble() / 2.0; + mySimEnd = getDegreesChoiceDouble() / 2.0; + } + else + { + ArLog::log(ArLog::Normal, + "%s: This laser type does not have field of view (start/end degrees) parameters configured, and does not have any defaults, cannot configure the simulated laser. Failing connection", + getName()); + unlockDevice(); + laserFailedConnect(); + return false; + } + + if (canSetIncrement()) + { + mySimIncrement = fabs(getIncrement()); + } + else if (canChooseIncrement()) + { + mySimIncrement = fabs(getIncrementChoiceDouble()); + } + else + { + ArLog::log(ArLog::Normal, + "%s: This laser type does not have increment (resolution) parameter configured, and does not have a default, cannot configure the simulated laser. Failing connection", + getName()); + unlockDevice(); + laserFailedConnect(); + return false; + } + unlockDevice(); + + myRobot->lock(); + + mySimPacketHandler.setName(getName()); + myRobot->remPacketHandler(&mySimPacketHandler); + myRobot->addPacketHandler(&mySimPacketHandler, ArListPos::LAST); + + bool failed = false; + bool robotIsRunning = myRobot->isRunning(); + + // return true if we could send all the commands + if (!failed && !myRobot->comInt(36, ArMath::roundInt(mySimBegin))) + failed = true; + if (!failed && !myRobot->comInt(37, ArMath::roundInt(mySimEnd))) + failed = true; + if (!failed && !myRobot->comInt(38, + ArMath::roundInt(mySimIncrement * 100.0))) + failed = true; + // Enable sending data, with extended info + ///@todo only choose extended info if reflector bits desired, also shorten range. + if (!failed && !myRobot->comInt(35, 2)) + failed = true; + + myRobot->unlock(); + + if (robotIsRunning) + { + ArTime startWait; + while (!failed && !myReceivedData) + { + if (startWait.secSince() >= 30) + failed = true; + } + if (!failed && myReceivedData) + { + ArLog::log(ArLog::Verbose, "%s::blockingConnect: Got data back", + getName()); + } + } + else + { + ArLog::log(ArLog::Normal, "%s::blockingConnect: Robot isn't running so can't wait for data", getName()); + } + + + if (!failed && (!robotIsRunning || (robotIsRunning && myReceivedData))) + { + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + //madeConnection(); + ArLog::log(ArLog::Terse, "%s: Connected to simulated laser.", + getName()); + unlockDevice(); + laserConnect(); + return true; + } + else + { + //failedConnect(); + lockDevice(); + myIsConnected = false; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Terse, + "%s: Failed to connect to simulated laser.", + getName()); + laserFailedConnect(); + return false; + } +} + +AREXPORT bool ArSimulatedLaser::asyncConnect(void) +{ + if (myLaserNumber != 1) + { + ArLog::log(ArLog::Normal, "%s: Cannot use the simulator with multiple lasers yet", getName()); + return false; + } + + if (!finishParams()) + return false; + + myStartConnect = true; + return true; +} + +AREXPORT bool ArSimulatedLaser::disconnect(void) +{ + laserDisconnectNormally(); + return true; +} + +AREXPORT bool ArSimulatedLaser::finishParams(void) +{ + if (!getRunning()) + runAsync(); + + if (!laserPullUnsetParamsFromRobot()) + { + ArLog::log(ArLog::Normal, "%s: Couldn't pull params from robot", + getName()); + return false; + } + + return laserCheckParams(); +} + +AREXPORT bool ArSimulatedLaser::laserCheckParams(void) +{ + if (canSetDegrees() && (!myLaser->setStartDegrees(getStartDegrees()) || + !myLaser->setEndDegrees(getEndDegrees()))) + return false; + + if (canChooseDegrees() && !myLaser->chooseDegrees(getDegreesChoice())) + return false; + + if (canSetIncrement() && !myLaser->setIncrement(getIncrement())) + return false; + + if (canChooseIncrement() && !myLaser->chooseIncrement(getIncrementChoice())) + return false; + + if (canChooseUnits() && !myLaser->chooseUnits(getUnitsChoice())) + return false; + + if (canChooseReflectorBits() && + !myLaser->chooseReflectorBits(getReflectorBitsChoice())) + return false; + + if (canSetPowerControlled() && + !myLaser->setPowerControlled(getPowerControlled())) + return false; + + if (canChooseStartingBaud() && + !myLaser->chooseStartingBaud(getStartingBaudChoice())) + return false; + + if (canChooseAutoBaud() && + !myLaser->chooseAutoBaud(getAutoBaudChoice())) + return false; + + if (!myLaser->laserCheckParams()) + return false; + + laserSetAbsoluteMaxRange(myLaser->getAbsoluteMaxRange()); + + return true; +} + +AREXPORT void *ArSimulatedLaser::runThread(void *arg) +{ + + while (getRunning()) + { + lockDevice(); + if (myStartConnect) + { + myStartConnect = false; + myTryingToConnect = true; + unlockDevice(); + + blockingConnect(); + + lockDevice(); + myTryingToConnect = false; + unlockDevice(); + ArUtil::sleep(100); + continue; + } + unlockDevice(); + + if (!myIsConnected) + { + ArUtil::sleep(100); + continue; + } + + if (getConnectionTimeoutSeconds() > 0 && + getLastReadingTime().secSince() > getConnectionTimeoutSeconds()) + { + ArLog::log(ArLog::Terse, + "%s: Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince()/1000.0, + getConnectionTimeoutSeconds()); + myIsConnected = false; + laserDisconnectOnError(); + continue; + } + + ArUtil::sleep(100); + continue; + } + + return NULL; +} + +/** @internal */ +AREXPORT bool ArSimulatedLaser::simPacketHandler(ArRobotPacket *packet) +{ + std::list::iterator it; + + unsigned int totalNumReadings; + unsigned int readingNumber; + double atDeg; + unsigned int i; + ArSensorReading *reading; + std::list::iterator tempIt; + unsigned int newReadings; + int range; + int refl = 0; + ArPose encoderPose; + //std::list::iterator ignoreIt; + bool ignore; + + if (packet->getID() != 0x60 && packet->getID() != 0x61) + return false; + + myReceivedData = true; + + bool isExtendedPacket = (packet->getID() == 0x61); + + // if we got here, its the right type of packet + + //printf("Got in a packet from the simulator\n"); + lockDevice(); + + if(!isExtendedPacket) + { + // ignore the positional information + packet->bufToByte2(); + packet->bufToByte2(); + packet->bufToByte2(); + } + totalNumReadings = packet->bufToByte2(); // total for this reading + readingNumber = packet->bufToByte2(); // which one we're on in this packet + newReadings = packet->bufToUByte(); // how many are in this packet + if (readingNumber == 0) + { + mySimPacketStart = myRobot->getPose(); + mySimPacketTrans = myRobot->getToGlobalTransform(); + mySimPacketEncoderTrans = myRobot->getEncoderTransform(); + mySimPacketCounter = myRobot->getCounter(); + } + //printf("ArSimulatedLaser::simPacketHandler: On reading number %d out of %d, new %d\n", readingNumber, totalNumReadings, newReadings); + // if we have too many readings in our list of raw readings, pop the extras + while (myAssembleReadings->size() > totalNumReadings) + { + ArLog::log(ArLog::Terse, "ArSimulatedLaser::simPacketHandler, too many readings, popping one."); + tempIt = myAssembleReadings->begin(); + if (tempIt != myAssembleReadings->end()) + delete (*tempIt); + myAssembleReadings->pop_front(); + } + + // If we don't have any sensor readings created at all, make 'em all now + if (myAssembleReadings->size() == 0) + for (i = 0; i < totalNumReadings; i++) + myAssembleReadings->push_back(new ArSensorReading); + + // Okay, we know where we're at, so get an iterator to the right spot, or + // make sure the one we keep around is in the right spot... if neither of + // these trigger, then the iter should be in the right spot + if ((readingNumber != myWhichReading + 1) || + totalNumReadings != myTotalNumReadings) + { + //printf("2\n"); + myWhichReading = readingNumber; + myTotalNumReadings = totalNumReadings; + for (i = 0, myIter = myAssembleReadings->begin(); i < readingNumber; i++) + { + tempIt = myIter; + tempIt++; + if (tempIt == myAssembleReadings->end() && (i + 1 != myTotalNumReadings)) + { + myAssembleReadings->push_back(new ArSensorReading); + printf("@\n"); + } + myIter++; + } + } + else + { + //printf("3\n"); + myWhichReading = readingNumber; + } + + //atDeg = (mySensorPose.getTh() - myOffsetAmount + + //readingNumber * myIncrementAmount); + atDeg = (mySensorPose.getTh() + mySimBegin + + readingNumber * mySimIncrement); + //printf("4\n"); + encoderPose = mySimPacketEncoderTrans.doInvTransform(mySimPacketStart); + // while we have in the readings and have stuff left we can read + for (i = 0; + // (myWhichReading < myTotalNumReadings && + // packet->getReadLength() < packet->getLength() - 4); + i < newReadings; + i++, myWhichReading++, atDeg += mySimIncrement) + //i++, myWhichReading++, atDeg += myIncrementAmount) + { + reading = (*myIter); + range = packet->bufToUByte2(); + if(isExtendedPacket) + { + refl = packet->bufToUByte(); + packet->bufToUByte(); // don't need this byte for anything yet + packet->bufToUByte(); // don't need this byte for anything yet + } + ignore = false; + + /* + for (ignoreIt = myIgnoreReadings.begin(); + ignoreIt != myIgnoreReadings.end(); + ignoreIt++) + { + //if (atDeg == 0) + //printf("Ignoring %.0f\n", (*ignoreIt)); + if (ArMath::fabs(ArMath::subAngle(atDeg, *(ignoreIt))) < 1.0) + { + //printf("Ignoring %.0f\n", (*ignoreIt)); + ignore = true; + break; + } + } + //if (myMinRange != 0 && range < (int)myMinRange) + //ignore = true; + if (myMaxRange != 0 && range > (int)myMaxRange) + ignore = true; + */ + reading->resetSensorPosition(ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), + atDeg); + //printf("dist %d\n", dist); + reading->newData(range, mySimPacketStart, + encoderPose, + mySimPacketTrans, + mySimPacketCounter, packet->getTimeReceived(), ignore, refl); + + //addReading(reading->getX(), reading->getY()); + tempIt = myIter; + tempIt++; + if (tempIt == myAssembleReadings->end() && + myWhichReading + 1 != myTotalNumReadings) + { + printf("!\n"); + myAssembleReadings->push_back(new ArSensorReading); + } + myIter++; + } + + // check if the sensor set is complete + //printf("%d %d %d\n", newReadings, readingNumber, totalNumReadings); + if (newReadings + readingNumber >= totalNumReadings) + { + //printf("Got all readings...\n"); + // set ArRangeDevice buffer + myRawReadings = myAssembleReadings; + // switch internal buffers + myAssembleReadings = myCurrentReadings; + myCurrentReadings = myRawReadings; + // We have in all the readings, now sort 'em and update the current ones + //filterReadings(); + laserProcessReadings(); + } + + unlockDevice(); + return true; +} diff --git a/Legacy/Aria/src/ArSocket.cpp b/Legacy/Aria/src/ArSocket.cpp new file mode 100644 index 0000000..3fc7fe7 --- /dev/null +++ b/Legacy/Aria/src/ArSocket.cpp @@ -0,0 +1,555 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSocket.h" +#include "ArLog.h" + +AREXPORT const char *ArSocket::toString(Type t) +{ + switch (t) { + case TCP: + return "TCP"; + case UDP: + return "UDP"; + default: + return "Unknown"; + } + return "Unknown"; + +} // end method toString + +void ArSocket::internalInit(void) +{ + myReadStringMutex.setLogName("ArMutex::myReadStringMutex"); + myWriteStringMutex.setLogName("ArMutex::myWriteStringMutex"); + myCloseFunctor = NULL; + myStringAutoEcho = true; + myStringEcho = false; + myStringPosLast = 0; + myStringPos = 0; + myStringGotComplete = false; + myStringBufEmpty[0] = '\0'; + myStringGotEscapeChars = false; + myStringHaveEchoed = false; + myLastStringReadTime.setToNow(); + myLogWriteStrings = false; + sprintf(myRawIPString, "none"); + myIPString = ""; + myBadWrite = false; + myBadRead = false; + myStringIgnoreReturn = false; + myStringWrongEndChars = false; + myErrorTracking = false; + resetTracking(); +} + +/// Normally, write() should be used instead. This is a wrapper around the sendto() system call. +AREXPORT int ArSocket::sendTo(const void *msg, int len) +{ + int ret; + ret = ::sendto(myFD, (char*)msg, len, 0, (struct sockaddr*)&mySin, + sizeof(mySin)); + if (ret > 0) + { + mySends++; + myBytesSent += ret; + } + return ret; +} + +/// Normally, write() should be used instead. This is a wrapper around the sendto() system call. +AREXPORT int ArSocket::sendTo(const void *msg, int len, + struct sockaddr_in *sin) +{ + int ret; + ret = ::sendto(myFD, (char*)msg, len, 0, (struct sockaddr*)sin, + sizeof(struct sockaddr_in)); + if (ret > 0) + { + mySends++; + myBytesSent += ret; + } + return ret; +} + + +/// Normally, read() should be used instead. This is a wrapper around the recvfrom() system call. +AREXPORT int ArSocket::recvFrom(void *msg, int len, sockaddr_in *sin) +{ + +#ifdef WIN32 + int i=sizeof(sockaddr_in); +#else + socklen_t i=sizeof(sockaddr_in); +#endif + int ret; + ret = ::recvfrom(myFD, (char*)msg, len, 0, (struct sockaddr*)sin, &i); + if (ret > 0) + { + myRecvs++; + myBytesRecvd += ret; + } + return ret; +} + +/** + @param buff buffer to write from + @param len how many bytes to write + @return number of bytes written +**/ +AREXPORT int ArSocket::write(const void *buff, size_t len) +{ + if (myFD < 0) + { + ArLog::log(ArLog::Terse, "ArSocket::write: called after socket closed"); + return 0; + } + + struct timeval tval; + fd_set fdSet; + tval.tv_sec = 0; + tval.tv_usec = 0; + FD_ZERO(&fdSet); + FD_SET(myFD, &fdSet); + +#ifdef WIN32 + if (select(0, NULL, &fdSet, NULL, &tval) <= 0) // fd count is ignored on windows (fd_set is an array) +#else + if (select(myFD + 1, NULL, &fdSet, NULL, &tval) <= 0) +#endif + return 0; + + int ret; +#ifdef WIN32 + ret = ::send(myFD, (char*)buff, len, 0); +#else + ret = ::write(myFD, (char*)buff, len); +#endif + + if (ret > 0) + { + mySends++; + myBytesSent += ret; + } + if (myErrorTracking && ret < 0) + { + if (myNonBlocking) + { +#ifdef WIN32 + if (WSAGetLastError() != WSAEWOULDBLOCK) + myBadWrite = true; +#endif +#ifndef WIN32 + if (errno != EAGAIN) + myBadWrite = true; +#endif + } + else + myBadWrite = true; + } + + + return ret; +} + +/** + @param buff buffer to read into + @param len how many bytes to read + @param msWait if 0, don't block, if > 0 wait this long for data + @return number of bytes read +*/ +AREXPORT int ArSocket::read(void *buff, size_t len, unsigned int msWait) +{ + if (myFD < 0) + { + ArLog::log(ArLog::Terse, "ArSocket::read: called after socket closed"); + return 0; + } + + int ret; + if (msWait != 0) + { + struct timeval tval; + fd_set fdSet; + tval.tv_sec = msWait / 1000; + tval.tv_usec = (msWait % 1000) * 1000; + FD_ZERO(&fdSet); + FD_SET(myFD, &fdSet); + +#ifdef WIN32 + if (select(0, &fdSet, NULL, NULL, &tval) <= 0) + return 0; +#else + if (select(myFD + 1, &fdSet, NULL, NULL, &tval) <= 0) + return 0; +#endif + } + ret = ::recv(myFD, (char*)buff, len, 0); + if (ret > 0) + { + myRecvs++; + myBytesRecvd += ret; + } + if (myErrorTracking && ret < 0) + { + if (myNonBlocking) + { +#ifdef WIN32 + if (WSAGetLastError() != WSAEWOULDBLOCK) + myBadRead = true; +#endif +#ifndef WIN32 + if (errno != EAGAIN) + myBadRead = true; +#endif + } + else + myBadRead = true; + } + + return ret; +} + + +#ifndef SWIG +/* + This cannot write more than 512 number of bytes + @param str the string to write to the socket + @return number of bytes written +**/ +AREXPORT int ArSocket::writeString(const char *str, ...) +{ + char buf[10000]; + int len; + int ret; + myWriteStringMutex.lock(); + va_list ptr; + va_start(ptr, str); + vsnprintf(buf, sizeof(buf) - 3, str, ptr); + va_end(ptr); + len = strlen(buf); + if (myStringWrongEndChars) + { + buf[len] = '\n'; + len++; + buf[len] = '\r'; + len++; + } + else + { + buf[len] = '\r'; + len++; + buf[len] = '\n'; + len++; + } + ret = write(buf, len); + // this is after the write since we don't send NULLs out the write, + // but we need them on the log messages or it'll crash + buf[len] = '\0'; + len++; + if (ret <= 0) + { + if (ret < 0) + ArLog::log(ArLog::Normal, "Problem sending (ret %d errno %d) to %s: %s", + ret, errno, getIPString(), buf); + else + ArLog::log(ArLog::Normal, "Problem sending (backed up) to %s: %s", + getIPString(), buf); + } + else if (myLogWriteStrings) + ArLog::log(ArLog::Normal, "Sent to %s: %s", getIPString(), buf); + + myWriteStringMutex.unlock(); + return ret; +} +#endif + +void ArSocket::setRawIPString(void) +{ + unsigned char *bytes; + bytes = (unsigned char *)inAddr(); + if (bytes != NULL) + sprintf(myRawIPString, "%d.%d.%d.%d", + bytes[0], bytes[1], bytes[2], bytes[3]); + myIPString = myRawIPString; +} + + + /** + @note This function can only read strings less than 512 characters + long as it reads the characters into its own internal buffer (to + compensate for some of the things the DOS telnet does). + + @param msWait if 0, don't block, if > 0 wait this long for data + + @return Data read, or an empty string (first character will be '\\0') + if no data was read. If there was an error reading from the socket, + NULL is returned. + **/ + +AREXPORT char *ArSocket::readString(unsigned int msWait) +{ + size_t i; + int n; + + bool printing = false; + + myReadStringMutex.lock(); + myStringBufEmpty[0] = '\0'; + + // read one byte at a time + for (i = myStringPos; i < sizeof(myStringBuf); i++) + { + n = read(&myStringBuf[i], 1, msWait); + if (n > 0) + { + if (i == 0 && myStringBuf[i] < 0) + { + myStringGotEscapeChars = true; + } + if (myStringIgnoreReturn && myStringBuf[i] == '\r') + { + i--; + continue; + } + + if (myStringBuf[i] == '\n' || myStringBuf[i] == '\r') + { + // if we aren't at the start, it's a complete string + if (i != 0) + { + myStringGotComplete = true; + } + // if it is at the start, we should read basically ignore this + // character since otherwise when we get a \n\r we're + // returning an empty string (which is what is returned when + // there is nothing to read, so causes problems)... so here + // it's just calling itself and returning that since it + // changes the logic the least + else + { + myLastStringReadTime.setToNow(); + if (printing) + ArLog::log(ArLog::Normal, + "ArSocket::ReadString: calling readstring again since got \\n or \\r as the first char", + myStringBuf, strlen(myStringBuf)); + myReadStringMutex.unlock(); + return readString(msWait); + } + myStringBuf[i] = '\0'; + myStringPos = 0; + myStringPosLast = 0; + // if we have leading escape characters get rid of them + if (myStringBuf[0] < 0) + { + int ei; + myStringGotEscapeChars = true; + // increment out the escape chars + for (ei = 0; + myStringBuf[ei] < 0 || (ei > 0 && myStringBuf[ei - 1] < 0); + ei++); + // okay now return the good stuff + doStringEcho(); + myLastStringReadTime.setToNow(); + if (printing) + ArLog::log(ArLog::Normal, + "ArSocket::ReadString: '%s' (%d) (got \\n or \\r)", + &myStringBuf[ei], strlen(&myStringBuf[ei])); + myReadStringMutex.unlock(); + return &myStringBuf[ei]; + } + // if we don't return what we got + doStringEcho(); + myLastStringReadTime.setToNow(); + if (printing) + ArLog::log(ArLog::Normal, + "ArSocket::ReadString: '%s' (%d) (got \\n or \\r)", + myStringBuf, strlen(myStringBuf)); + myReadStringMutex.unlock(); + return myStringBuf; + } + // if its not an ending character but was good keep going + else + continue; + } + // failed + else if (n == 0) + { + myStringPos = i; + myStringBuf[myStringPos] = '\0'; + if (printing) + ArLog::log(ArLog::Normal, "ArSocket::ReadString: NULL (0) (got 0 bytes, means connection closed"); + myReadStringMutex.unlock(); + return NULL; + } + else // which means (n < 0) + { +#ifdef WIN32 + if (WSAGetLastError() == WSAEWOULDBLOCK) + { + myStringPos = i; + doStringEcho(); + if (printing) + ArLog::log(ArLog::Normal, "ArSocket::ReadString: '%s' (%d) (got WSAEWOULDBLOCK)", + myStringBufEmpty, strlen(myStringBufEmpty)); + myReadStringMutex.unlock(); + return myStringBufEmpty; + } +#endif +#ifndef WIN32 + if (errno == EAGAIN) + { + myStringPos = i; + doStringEcho(); + if (printing) + ArLog::log(ArLog::Normal, + "ArSocket::ReadString: '%s' (%d) (got EAGAIN)", + myStringBufEmpty, strlen(myStringBufEmpty)); + myReadStringMutex.unlock(); + return myStringBufEmpty; + } +#endif + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::readString: Error in reading from network"); + if (printing) + ArLog::log(ArLog::Normal, "ArSocket::ReadString: NULL (0) (got 0 bytes, error reading network)"); + myReadStringMutex.unlock(); + return NULL; + } + } + // if they want a 0 length string + ArLog::log(ArLog::Normal, "Some trouble in ArSocket::readString to %s (cannot fit string into buffer?)", getIPString()); + writeString("String too long"); + if (printing) + ArLog::log(ArLog::Normal, "ArSocket::ReadString: NULL (0) (string too long?)"); + + myReadStringMutex.unlock(); + return NULL; +} + +AREXPORT void ArSocket::clearPartialReadString(void) +{ + myReadStringMutex.lock(); + myStringBuf[0] = '\0'; + myStringPos = 0; + myReadStringMutex.unlock(); +} + +AREXPORT int ArSocket::comparePartialReadString(const char *partialString) +{ + int ret; + myReadStringMutex.lock(); + ret = strncmp(partialString, myStringBuf, strlen(partialString)); + myReadStringMutex.unlock(); + return ret; +} + +void ArSocket::doStringEcho(void) +{ + size_t to; + + if (!myStringAutoEcho && !myStringEcho) + return; + + // if we're echoing complete thel ines + if (myStringHaveEchoed && myStringGotComplete) + { + write("\n\r", 2); + myStringGotComplete = false; + } + + // if there's nothing to send we don't need to send it + if (myStringPosLast == myStringPos) + return; + + // we probably don't need it if its doing escape chars + if (myStringAutoEcho && myStringGotEscapeChars) + return; + + myStringHaveEchoed = true; + to = strchr(myStringBuf, '\0') - myStringBuf; + write(&myStringBuf[myStringPosLast], myStringPos - myStringPosLast); + myStringPosLast = myStringPos; +} + +void ArSocket::separateHost(const char *rawHost, int rawPort, char *useHost, + size_t useHostSize, int *port) +{ + if (useHost == NULL) + { + ArLog::log(ArLog::Normal, "ArSocket: useHost was NULL"); + return; + } + if (port == NULL) + { + ArLog::log(ArLog::Normal, "ArSocket: port was NULL"); + return; + } + + useHost[0] = '\0'; + + if (rawHost == NULL || rawHost[0] == '\0') + { + ArLog::log(ArLog::Normal, "ArSocket: rawHost was NULL or empty"); + return; + } + + ArArgumentBuilder separator(512, ':'); + separator.add(rawHost); + + if (separator.getArgc() <= 0) + { + ArLog::log(ArLog::Normal, "ArSocket: rawHost was empty"); + return; + } + if (separator.getArgc() == 1) + { + snprintf(useHost, useHostSize, separator.getArg(0)); + *port = rawPort; + return; + } + if (separator.getArgc() == 2) + { + if (separator.isArgInt(1)) + { + snprintf(useHost, useHostSize, separator.getArg(0)); + *port = separator.getArgInt(1); + return; + } + else + { + ArLog::log(ArLog::Normal, "ArSocket: port given in hostname was not an integer it was %s", separator.getArg(1)); + return; + } + } + + // if we get down here there's too many args + ArLog::log(ArLog::Normal, "ArSocket: too many arguments in hostname %s", separator.getFullString()); + return; +} + + + diff --git a/Legacy/Aria/src/ArSocket_LIN.cpp b/Legacy/Aria/src/ArSocket_LIN.cpp new file mode 100644 index 0000000..fff175e --- /dev/null +++ b/Legacy/Aria/src/ArSocket_LIN.cpp @@ -0,0 +1,723 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSocket.h" +#include "ArLog.h" +#include +#include +#include +#include +#include "ArFunctor.h" +#include +#include +#include + +/// We're always initialized in Linux +bool ArSocket::ourInitialized=true; + + +/** + In Windows, the networking subsystem needs to be initialized and shutdown + individyaly by each program. So when a program starts they will need to + call the static function ArSocket::init() and call ArSocket::shutdown() + when it exits. For programs that use Aria::init() and Aria::uninit() + calling the ArSocket::init() and ArSocket::shutdown() is unnecessary. The + Aria initialization functions take care of this. These functions do nothing + in Linux. +*/ +bool ArSocket::init() +{ + return(true); +} + +/** + In Windows, the networking subsystem needs to be initialized and shutdown + individyaly by each program. So when a program starts they will need to + call the static function ArSocket::init() and call ArSocket::shutdown() + when it exits. For programs that use Aria::init() and Aria::uninit() + calling the ArSocket::init() and ArSocket::shutdown() is unnecessary. The + Aria initialization functions take care of this. These functions do nothing + in Linux. +*/ +void ArSocket::shutdown() +{ +} + +ArSocket::ArSocket() : + myType(Unknown), + myError(NoErr), + myErrorStr(), + myDoClose(true), + myFD(-1), + myNonBlocking(false), + mySin() +{ + internalInit(); +} + +/** + Constructs the socket and connects it to the given host. + @param host hostname of the server to connect to + @param port port number of the server to connect to + @param type protocol type to use +*/ +ArSocket::ArSocket(const char *host, int port, Type type) : + myType(type), + myError(NoErr), + myErrorStr(), + myDoClose(true), + myFD(-1), + myNonBlocking(false), + mySin() +{ + internalInit(); + connect(host, port, type); +} + +ArSocket::ArSocket(int port, bool doClose, Type type) : + myType(type), + myError(NoErr), + myErrorStr(), + myDoClose(doClose), + myFD(-1), + myNonBlocking(false), + mySin() +{ + internalInit(); + open(port, type); +} + +ArSocket::~ArSocket() +{ + close(); +} + +bool ArSocket::hostAddr(const char *host, struct in_addr &addr) +{ + struct hostent *hp; + if (!(hp=gethostbyname(host))) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::hostAddr: gethostbyname failed"); + memset(&addr, 0, sizeof(in_addr)); + return(false); + } + else + { + bcopy(hp->h_addr, &addr, hp->h_length); + return(true); + } +} + +bool ArSocket::addrHost(struct in_addr &addr, char *host) +{ + struct hostent *hp; + + hp=gethostbyaddr((char*)&addr.s_addr, sizeof(addr.s_addr), AF_INET); + if (hp) + strcpy(host, hp->h_name); + else + strcpy(host, inet_ntoa(addr)); + + return(true); +} + +std::string ArSocket::getHostName() +{ + char localhost[maxHostNameLen()]; + + if (gethostname(localhost, sizeof(localhost)) == 1) + return(""); + else + return(localhost); +} + +/** @return false and set error code and description string on failure */ +bool ArSocket::connect(const char *host, int port, Type type, + const char *openOnIP) +{ + char localhost[maxHostNameLen()]; + myError=NoErr; + myErrorStr.clear(); + if (!host) + { + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myError=ConBadHost; + myErrorStr="Failure to locate host '"; + myErrorStr+=localhost; + myErrorStr+="'"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: gethostname failed"); + return(false); + } + host=localhost; + } + + bzero(&mySin, sizeof(mySin)); + // MPL taking out this next code line from the if since it makes + // everything we can't resolve try to connect to localhost + // && !hostAddr("localhost", mySin.sin_addr)) + + char useHost[1024]; + int usePort; + separateHost(host, port, useHost, sizeof(useHost), &usePort); + + if (!hostAddr(useHost, mySin.sin_addr)) + return(false); + setRawIPString(); + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(usePort); + + if ((type == TCP) && ((myFD=socket(AF_INET, SOCK_STREAM, 0)) < 0)) + { + myError=NetFail; + myErrorStr="Failure to make TCP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: could not make tcp socket"); + return(false); + } + else if ((type == UDP) && ((myFD=socket(AF_INET, SOCK_DGRAM, 0)) < 0)) + { + myError=NetFail; + myErrorStr="Failure to make UDP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: could not make udp socket"); + return(false); + } + + ArUtil::setFileCloseOnExec(myFD); + + if (openOnIP != NULL) + { + struct sockaddr_in outSin; + if (!hostAddr(openOnIP, outSin.sin_addr)) + { + myError = NameLookup; + myErrorStr = "Name lookup failed"; + ArLog::log(ArLog::Normal, "Couldn't find ip of %s to open on", openOnIP); + return(false); + } + outSin.sin_family=AF_INET; + outSin.sin_port=hostToNetOrder(0); + if (bind(myFD, (struct sockaddr *)&outSin, sizeof(outSin)) < 0) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: Failure to bind socket to port %d", 0); + return(false); + } + } + + myType=type; + + if (::connect(myFD, (struct sockaddr *)&mySin, + sizeof(struct sockaddr_in)) < 0) + { + myErrorStr="Failure to connect socket"; + switch (errno) + { + case ECONNREFUSED: + myError=ConRefused; + myErrorStr+="; Connection refused"; + break; + case ENETUNREACH: + myError=ConNoRoute; + myErrorStr+="; No route to host"; + break; + default: + myError=NetFail; + break; + } + ArLog::logErrorFromOS(ArLog::Verbose, "ArSocket::connect: could not connect"); + + ::close(myFD); + myFD = -1; + return(false); + } + + return(true); +} + +/** @return false and set error code and description string on failure */ +bool ArSocket::open(int port, Type type, const char *openOnIP) +{ + int ret; + char localhost[maxHostNameLen()]; + + myError=NoErr; + myErrorStr.clear(); + if ((type == TCP) && ((myFD=socket(AF_INET, SOCK_STREAM, 0)) < 0)) + { + myErrorStr="Failure to make TCP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not create tcp socket"); + return(false); + } + else if ((type == UDP) && ((myFD=socket(AF_INET, SOCK_DGRAM, 0)) < 0)) + { + myErrorStr="Failure to make UDP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not create udp socket"); + return(false); + } + + ArUtil::setFileCloseOnExec(myFD); + + setLinger(0); + setReuseAddress(); + + myType=type; + + /* MPL removed this since with what I Took out down below months ago + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myErrorStr="Failure to locate localhost"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: gethostname failed"); + return(false); + } + */ + bzero(&mySin, sizeof(mySin)); + /* MPL took this out since it was just overriding it with the + INADDR_ANY anyways and it could cause slowdowns if a machine wasn't + configured so lookups are quick + if (!hostAddr(localhost, mySin.sin_addr) && + !hostAddr("localhost", mySin.sin_addr)) + return(false); */ + + if (openOnIP != NULL) + { + + if (!hostAddr(openOnIP, mySin.sin_addr)) + { + ArLog::log(ArLog::Normal, "Couldn't find ip of %s to open on", openOnIP); + myError = NameLookup; + myErrorStr = "Name lookup failed"; + ::close(myFD); + myFD = -1; + return(false); + } + else + { + //printf("Opening on %s\n", openOnIP); + } + } + else + { + mySin.sin_addr.s_addr=htonl(INADDR_ANY); + } + + setRawIPString(); + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(port); + + if ((ret=bind(myFD, (struct sockaddr *)&mySin, sizeof(mySin))) < 0) + { + myError = NetFail; + myErrorStr="Failure to bind socket to port "; + sprintf(localhost, "%d", port); + myErrorStr+=localhost; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not bind"); + ::close(myFD); + myFD = -1; + return(false); + } + + if ((type == TCP) && (listen(myFD, 5) < 0)) + { + myError = NetFail; + myErrorStr="Failure to listen on socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not listen"); + ::close(myFD); + myFD = -1; + return(false); + } + + return(true); +} + +/** @return false and set error code and description string on failure */ +bool ArSocket::create(Type type) +{ + myError = NoErr; + myErrorStr.clear(); + + if ((type == TCP) && ((myFD=socket(AF_INET, SOCK_STREAM, 0)) < 0)) + { + myError = NetFail; + myErrorStr="Failure to make TCP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::create: could not create tcp socket"); + return(false); + } + else if ((type == UDP) && ((myFD=socket(AF_INET, SOCK_DGRAM, 0)) < 0)) + { + myError = NetFail; + myErrorStr="Failure to make UDP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::create: could not create udp socket"); + return(false); + } + + ArUtil::setFileCloseOnExec(myFD); + + myType=type; + + if (getSockName()) + return(true); + else + return(false); +} + +/** @return false on error */ +bool ArSocket::findValidPort(int startPort, const char *openOnIP) +{ + //char localhost[maxHostNameLen()]; + + /* + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myErrorStr="Failure to locate localhost"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::findValidPort: gethostname failed"); + return(false); + } + */ + + for (int i=0; i+startPort < 65000; ++i) + { + bzero(&mySin, sizeof(mySin)); + /* + if (!hostAddr(localhost, mySin.sin_addr) && + !hostAddr("localhost", mySin.sin_addr)) + return(false); + */ + setRawIPString(); + + if (openOnIP != NULL) + { + + if (!hostAddr(openOnIP, mySin.sin_addr)) + { + ArLog::log(ArLog::Normal, "Couldn't find ip of %s to open udp on", openOnIP); + return(false); + } + else + { + //printf("Opening on %s\n", openOnIP); + } + } + else + { + mySin.sin_addr.s_addr=htonl(INADDR_ANY); + } + + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(startPort+i); + + if (bind(myFD, (struct sockaddr *)&mySin, sizeof(mySin)) == 0) + break; + } + + return(true); +} + +/** @return false and set error code and description string on failure */ +bool ArSocket::connectTo(const char *host, int port) +{ + char localhost[maxHostNameLen()]; + myError = NoErr; + myErrorStr.clear(); + if (myFD < 0) + return(false); + + if (!host) + { + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myErrorStr="Failure to locate host '"; + myErrorStr+=localhost; + myErrorStr+="'"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connectTo: gethostname failed"); + return(false); + } + host=localhost; + } + + char useHost[1024]; + int usePort; + separateHost(host, port, useHost, sizeof(useHost), &usePort); + + bzero(&mySin, sizeof(mySin)); + if (!hostAddr(useHost, mySin.sin_addr)) + return(false); + setRawIPString(); + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(usePort); + + return(connectTo(&mySin)); +} + +/** @return false and set error code and description string on failure */ +bool ArSocket::connectTo(struct sockaddr_in *sin) +{ + myError = NoErr; + myErrorStr.clear(); + if (::connect(myFD, (struct sockaddr *)sin, + sizeof(struct sockaddr_in)) < 0) + { + myErrorStr="Failure to connect socket"; + myError = ConRefused; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::connectTo: connect failed"); + return(0); + } + + return(1); +} + + +bool ArSocket::close() +{ + if (myFD == -1) + return true; + ArLog::log(ArLog::Verbose, "Closing socket"); + if (myCloseFunctor != NULL) + myCloseFunctor->invoke(); + if (myDoClose && ::close(myFD)) + { + myFD=-1; + return(false); + } + else + { + myFD=-1; + return(true); + } +} + +/** @return false and set error code and description string on failure. */ +bool ArSocket::setLinger(int time) +{ + struct linger lin; + myError = NoErr; + myErrorStr.clear(); + + if (time) + { + lin.l_onoff=1; + lin.l_linger=time; + } + else + { + lin.l_onoff=0; + lin.l_linger=time; + } + + if (setsockopt(myFD, SOL_SOCKET, SO_LINGER, &lin, sizeof(lin)) != 0) + { + myErrorStr="Failure to setsockopt LINGER"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setLinger: setsockopt failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure. */ +bool ArSocket::setBroadcast() +{ + myError = NoErr; + myErrorStr.clear(); + if (setsockopt(myFD, SOL_SOCKET, SO_BROADCAST, NULL, 0) != 0) + { + myErrorStr="Failure to setsockopt BROADCAST"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setBroadcast: setsockopt failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure. + @internal + @note ArSocket always sets the reuse-address option in open(), so calling this function is normally unneccesary. + (This apparently needs to be done after the socket is created before + the socket is bound.) +*/ +bool ArSocket::setReuseAddress() +{ + int opt=1; + myError = NoErr; + myErrorStr.clear(); + if (setsockopt(myFD, SOL_SOCKET, SO_REUSEADDR, + (char*)&opt, sizeof(opt)) != 0) + { + myErrorStr="Failure to setsockopt REUSEADDR"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setReuseAddress: setsockopt failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure. */ +bool ArSocket::setNonBlock() +{ + myError = NoErr; + myErrorStr.clear(); + if (fcntl(myFD, F_SETFL, O_NONBLOCK) != 0) + { + myErrorStr="Failure to fcntl O_NONBLOCK"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setNonBlock: fcntl failed"); + return(false); + } + else + { + myNonBlocking = true; + return(true); + } +} + +/** + Copy socket structures. Copy from one Socket to another will still have + the first socket close the file descripter when it is destructed. + @return false and set error code and description string on failure. +*/ +bool ArSocket::copy(int fd, bool doclose) +{ + socklen_t len; + + myFD=fd; + myDoClose=doclose; + myType=Unknown; + + len=sizeof(struct sockaddr_in); + if (getsockname(myFD, (struct sockaddr*)&mySin, &len)) + { + myErrorStr="Failed to getsockname on fd "; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::copy: getsockname failed"); + return(false); + } + else + return(true); +} + +/** + @return true if there are no errors, false if there are + errors... not that if you're in non-blocking mode and there is no + socket to connect that is NOT an error, you'll want to check the + getFD on the sock you pass in to see if it is actually a valid + socket. + **/ +bool ArSocket::accept(ArSocket *sock) +{ + socklen_t len; + //unsigned char *bytes; + + myError = NoErr; + myErrorStr.clear(); + + len=sizeof(struct sockaddr_in); + sock->myFD=::accept(myFD, (struct sockaddr*)&(sock->mySin), &len); + sock->myType=myType; + sock->setRawIPString(); + /* + bytes = (unsigned char *)sock->inAddr(); + sprintf(sock->myIPString, "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], + + bytes[3]); + */ + if ((sock->myFD < 0 && !myNonBlocking) || + (sock->myFD < 0 && errno != EWOULDBLOCK && myNonBlocking)) + { + myErrorStr="Failed to accept on socket"; + myError = ConRefused; + ArLog::logErrorFromOS(ArLog::Terse, + "ArSocket::accept: accept failed"); + return(false); + } + + return(true); +} + +void ArSocket::inToA(struct in_addr *addr, char *buff) +{ + strcpy(buff, inet_ntoa(*addr)); +} + +bool ArSocket::getSockName() +{ + socklen_t size; + myError = NoErr; + myErrorStr.clear(); + if (myFD < 0) + { + myErrorStr="Trying to get socket name on an unopened socket"; + myError = NetFail; + printf(myErrorStr.c_str()); + return(false); + } + + size=sizeof(mySin); + if (getsockname(myFD, (struct sockaddr *)&mySin, &size) != 0) + { + myErrorStr="Error getting socket name"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::getSockName: getSockName failed"); + return(false); + } + + return(true); +} + +unsigned int ArSocket::hostToNetOrder(int i) +{ + return(htons(i)); +} + +unsigned int ArSocket::netToHostOrder(int i) +{ + return(ntohs(i)); +} + +/** If this socket is a TCP socket, then set the TCP_NODELAY flag, + * to disable the use of the Nagle algorithm (which waits until enough + * data is ready to send to fill a TCP frame, rather then sending the + * packet immediately). + * @param flag true to turn on NoDelay, false to turn it off. + * @return true of the flag was successfully set, false if there was an + * error or this socket is not a TCP socket. + */ +bool ArSocket::setNoDelay(bool flag) +{ + if(myType != TCP) return false; + int f = flag?1:0; + int r = setsockopt(myFD, IPPROTO_TCP, TCP_NODELAY, (char*)&f, sizeof(f)); + return (r != -1); +} + diff --git a/Legacy/Aria/src/ArSocket_WIN.cpp b/Legacy/Aria/src/ArSocket_WIN.cpp new file mode 100644 index 0000000..e1502c8 --- /dev/null +++ b/Legacy/Aria/src/ArSocket_WIN.cpp @@ -0,0 +1,813 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSocket.h" +#include "ArLog.h" +#include +#include +#include "ArFunctor.h" + +/* +#include +#include +#include +*/ + +bool ArSocket::ourInitialized=false; + + +AREXPORT ArSocket::ArSocket() : + myType(Unknown), + myError(NoErr), + myErrorStr(), + myDoClose(true), + myFD(INVALID_SOCKET), + myHost(), + myPort(-1), + myNonBlocking(false), + mySin() +{ + internalInit(); +} + +AREXPORT ArSocket::ArSocket(const char *host, int port, Type type) : + myType(type), + myError(NoErr), + myErrorStr(), + myDoClose(true), + myFD(INVALID_SOCKET), + myHost(), + myPort(-1), + myNonBlocking(false), + mySin() +{ + internalInit(); + connect(host, port, type); +} + +AREXPORT ArSocket::ArSocket(int port, bool doClose, Type type) : + myType(type), + myError(NoErr), + myErrorStr(), + myDoClose(doClose), + myFD(INVALID_SOCKET), + myHost(), + myPort(-1), + myNonBlocking(false), + mySin() +{ + internalInit(); + open(port, type); +} + +AREXPORT ArSocket::~ArSocket() +{ + close(); +} + +/** @return false failure. */ +AREXPORT bool ArSocket::init() +{ + WORD wVersionRequested; + WSADATA wsaData; + +// if (!ourInitialized) + //{ + wVersionRequested=MAKEWORD( 2, 2 ); + + if (WSAStartup(wVersionRequested, &wsaData) != 0) + { + ourInitialized=false; + return(false); + } + + ourInitialized=true; + //} + + return(true); +} + +AREXPORT void ArSocket::shutdown() +{ + if (ourInitialized) + { + ArLog::log(ArLog::Verbose, "ArSocket::shutdown calling WSACleanup"); + WSACleanup(); + ourInitialized=false; + } +} + +/** @return false on failure */ +AREXPORT bool ArSocket::hostAddr(const char *host, struct in_addr &addr) +{ + struct hostent *hp; + + if (!(hp=gethostbyname(host))) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::hostAddr: gethostbyname failed"); + memset(&addr, 0, sizeof(in_addr)); + return(false); + } + else + { + memcpy(&addr, hp->h_addr, hp->h_length); + return(true); + } +} + +/** @return false on failure */ +AREXPORT bool ArSocket::addrHost(struct in_addr &addr, char *host) +{ + struct hostent *hp; + + hp=gethostbyaddr((char*)&addr.s_addr, sizeof(addr.s_addr), AF_INET); + if (hp) + strcpy(host, hp->h_name); + else + strcpy(host, inet_ntoa(addr)); + + return(true); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::connect(const char *host, int port, Type type, + const char *openOnIP) +{ + char localhost[MAXGETHOSTSTRUCT]; + myError = NoErr; + myErrorStr.clear(); + + init(); + + if (!host) + { + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myError=ConBadHost; + myErrorStr="Failure to locate host '"; + myErrorStr+=localhost; + myErrorStr+="'"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: gethostname failed"); + return(false); + } + host=localhost; + } + + char useHost[1024]; + int usePort; + separateHost(host, port, useHost, sizeof(useHost), &usePort); + + memset(&mySin, 0, sizeof(mySin)); + if ((mySin.sin_addr.s_addr = inet_addr(useHost)) == INADDR_NONE) + { + if (!hostAddr(host, mySin.sin_addr)) + { + setRawIPString(); + myError = ConBadHost; + myErrorStr = "Could not find the address of '"; + myErrorStr += host; + myErrorStr += "'"; + return(false); + } + } + + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(usePort); + + // WSA_FLAG_OVERLAPPED allows concurrent calls to select, read and send on the same socket, + // which could happen occasionally. If OVERLAPPED is not enabled in this situation, calls can + // hang mysteriously. + // This flag is also required for all non-blocking sockets on Windows NT 4.0 (according to MS + // Knowlege Base article Q179942) + if ((type == TCP) && ((myFD=WSASocket(AF_INET, SOCK_STREAM, 0, NULL, 0, WSA_FLAG_OVERLAPPED)) < 0)) + { + myError=NetFail; + myErrorStr="Failure to make TCP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: could not make tcp socket"); + return(false); + } + else if ((type == UDP) && ((myFD=WSASocket(AF_INET, SOCK_DGRAM, 0, NULL, 0, WSA_FLAG_OVERLAPPED)) < 0)) + { + myError=NetFail; + myErrorStr="Failure to make UDP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connect: could not make udp socket"); + return(0); + } + + myType = type; + myHost = ((host != NULL) ? host : ""); + myPort = port; + + if (::connect(myFD, (struct sockaddr *)&mySin, + sizeof(struct sockaddr_in)) < 0) + { + char buff[10]; + int err=WSAGetLastError(); + sprintf(buff, "%d", err); + myErrorStr="Failure to connect socket"; + myErrorStr+=buff; + switch (err) + { + case WSAEADDRNOTAVAIL: + myError=ConBadHost; + break; + case WSAECONNREFUSED: + myError=ConRefused; + break; + case WSAENETUNREACH: + myError=ConNoRoute; + break; + default: + myError=NetFail; + break; + } + ArLog::logErrorFromOS(ArLog::Verbose, + "ArSocket::connect: Failure to connect"); + ::shutdown(myFD, SD_BOTH); + closesocket(myFD); + myFD = INVALID_SOCKET; + return(0); + } + + return(1); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::open(int port, Type type, const char *openOnIP) +{ + int ret; + char localhost[MAXGETHOSTSTRUCT]; + myError = NoErr; + myErrorStr.clear(); + + if ((type == TCP) && ((myFD=socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)) + { + //ret=WSAGetLastError(); + myError = NetFail; + myErrorStr="Failure to make TCP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not create tcp socket"); + return(false); + } + else if ((type == UDP) && ((myFD=socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET)) + { + myError = NetFail; + myErrorStr="Failure to make UDP socket"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not create udp socket"); + return(false); + } + + setLinger(0); + setReuseAddress(); + + /* MPL this is useless withw hat I Took out below + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myErrorStr="Failure to locate localhost"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: gethostname failed"); + return(false); + } + */ + + memset(&mySin, 0, sizeof(mySin)); + /* MPL took this out since it was just overriding it with the + INADDR_ANY anyways and it could cause slowdowns if a machine wasn't + configured so lookups are quick + if (!hostAddr(localhost, mySin.sin_addr)) + return(false); + */ + setRawIPString(); + if (openOnIP != NULL) + { + + if (!hostAddr(openOnIP, mySin.sin_addr)) + { + myError = NameLookup; + myErrorStr = "Name lookup failed"; + ArLog::log(ArLog::Normal, "Couldn't find ip of %s to open on", openOnIP); + ::shutdown(myFD, SD_BOTH); + myFD = INVALID_SOCKET; + return(false); + } + else + { + //printf("Opening on %s\n", openOnIP); + } + } + else + { + mySin.sin_addr.s_addr=htonl(INADDR_ANY); + } + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(port); + + myType=type; + + if ((ret=bind(myFD, (struct sockaddr *)&mySin, sizeof(mySin))) < 0) + { + myErrorStr="Failure to bind socket to port "; + sprintf(localhost, "%d", port); + myErrorStr+=localhost; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not bind"); + ::shutdown(myFD, SD_BOTH); + myFD = INVALID_SOCKET; + return(false); + } + + if ((type == TCP) && (listen(myFD, 5) < 0)) + { + myErrorStr="Failure to listen on socket"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::open: could not listen"); + ::shutdown(myFD, SD_BOTH); + myFD = INVALID_SOCKET; + return(false); + } + + return(true); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::create(Type type) +{ + myError = NoErr; + myErrorStr.clear(); + //if ((type == TCP) && ((myFD=socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)) + if ((type == TCP) && ((myFD=WSASocket(AF_INET, SOCK_STREAM, 0, NULL, 0, 0)) == INVALID_SOCKET)) + { + myErrorStr="Failure to make TCP socket"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::create: could not create tcp socket"); + return(false); + } + //else if ((type == UDP) && ((myFD=socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET)) + else if ((type == UDP) && ((myFD=WSASocket(AF_INET, SOCK_DGRAM, 0, NULL, 0, 0)) == INVALID_SOCKET)) + { + myErrorStr="Failure to make UDP socket"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::create: could not create udp socket"); + return(false); + } + + // KMC Reinserted + myType = type; + + + +/* + int zero = 0; + if (setsockopt(myFD, SOL_SOCKET, SO_SNDBUF, (char *)&zero, sizeof(zero)) != 0) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::create: setsockopt failed on SNDBUF"); + return(false); + } + + if (setsockopt(myFD, SOL_SOCKET, SO_RCVBUF, (char *)&zero, sizeof(zero)) != 0) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::create: setsockopt failed on RCVVBUF"); + return(false); + } + + myType=type; +*/ + /*if (getSockName()) + return(true); + else + return(false);*/ + return(true); +} + +/** @return false on failure */ +AREXPORT bool ArSocket::findValidPort(int startPort, const char *openOnIP) +{ + + /* + char localhost[MAXGETHOSTSTRUCT]; + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myErrorStr="Failure to locate localhost"; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::findValidPort: gethostname failed"); + return(false); + } + */ + for (int i=0; i+startPort < 65000; ++i) + { + memset(&mySin, 0, sizeof(mySin)); + /* + if (!hostAddr(localhost, mySin.sin_addr)) + return(false); + */ + setRawIPString(); + if (openOnIP != NULL) + { + if (!hostAddr(openOnIP, mySin.sin_addr)) + { + ArLog::log(ArLog::Normal, "Couldn't find ip of %s to open on", openOnIP); + return(false); + } + else + { + //printf("Opening on %s\n", openOnIP); + } + } + else + { + mySin.sin_addr.s_addr=htonl(INADDR_ANY); + } + + mySin.sin_family=AF_INET; + //mySin.sin_addr.s_addr=htonl(INADDR_ANY); + mySin.sin_port=hostToNetOrder(startPort+i); + + if (bind(myFD, (struct sockaddr *)&mySin, sizeof(mySin)) == 0) + break; + } + + return(true); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::connectTo(const char *host, int port) +{ + + char localhost[MAXGETHOSTSTRUCT]; + myError = NoErr; + myErrorStr.clear(); + + if (myFD == INVALID_SOCKET) + return(false); + + if (!host) + { + if (gethostname(localhost, sizeof(localhost)) == 1) + { + myErrorStr="Failure to locate host '"; + myErrorStr+=localhost; + myErrorStr+="'"; + myError = ConBadHost; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connectTo: gethostname failed"); + return(false); + } + host=localhost; + } + + + char useHost[1024]; + int usePort; + separateHost(host, port, useHost, sizeof(useHost), &usePort); + + //myHost = ((host != NULL) ? host : ""); + //myPort = port; + myHost = useHost; + myPort = usePort; + + memset(&mySin, 0, sizeof(mySin)); + if (!hostAddr(useHost, mySin.sin_addr)) + { + myError = ConBadHost; + return(false); + } + setRawIPString(); + mySin.sin_family=AF_INET; + mySin.sin_port=hostToNetOrder(usePort); + + return(connectTo(&mySin)); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::connectTo(struct sockaddr_in *sin) +{ + myError = NoErr; + myErrorStr.clear(); + if (::connect(myFD, (struct sockaddr *)sin, + sizeof(struct sockaddr_in)) < 0) + { + myErrorStr="Failure to connect socket"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, "ArSocket::connectTo: gethostname failed"); + return(0); + } + + return(1); +} + + + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::close() +{ + myError = NoErr; + myErrorStr.clear(); + + if (myFD != INVALID_SOCKET) { + if (!myHost.empty() && (myPort != -1)) { + ArLog::log(ArLog::Verbose, "Closing %s socket %s:%i (0x%p)", + toString(myType), + myHost.c_str(), + myPort, + myFD); + } + else { + ArLog::log(ArLog::Verbose, "Closing %s socket (0x%p)", + toString(myType), + myFD); + } + } + + if (myCloseFunctor != NULL) + myCloseFunctor->invoke(); + + if (myDoClose && (myFD != INVALID_SOCKET)) + { + int shutdownRet = ::shutdown(myFD, SD_BOTH); + if (shutdownRet != 0) { + int error = WSAGetLastError(); + ArLog::log(ArLog::Normal, "Shutdown %s socket (0x%p) returns %i (error = %i)", + toString(myType), + myFD, + shutdownRet, + error); + } + + // ?? Should we do this only if shutdown return successful? + // ?? In theory, I think that we're supposed to wait for the shutdown to complete. + // ?? Could this be causing the intermittent hang? + + int closeRet = closesocket(myFD); + if (closeRet != 0) { + int error = WSAGetLastError(); + ArLog::log(ArLog::Normal, "Close %s socket (0x%p) returns %i (error = %i)", + toString(myType), + myHost.c_str(), + closeRet, + error); + } + + myFD = INVALID_SOCKET; + + if (!myHost.empty() && (myPort != -1)) { + ArLog::log(ArLog::Verbose, "%s socket %s:%i closed", + toString(myType), + myHost.c_str(), + myPort); + } + else { + ArLog::log(ArLog::Verbose, "%s socket closed", + toString(myType)); + } + + return(true); + } + + ArLog::log(ArLog::Verbose, "Close %s socket requires no action", + toString(myType)); + + + return(false); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::setLinger(int time) +{ + struct linger lin; + myError = NoErr; + myErrorStr.clear(); + + if (time) + { + lin.l_onoff=1; + lin.l_linger=time; + } + else + { + lin.l_onoff=0; + lin.l_linger=time; + } + + if (setsockopt(myFD, SOL_SOCKET, SO_LINGER, (char*)&lin, sizeof(lin)) != 0) + { + myErrorStr="Failure to setsockopt LINGER"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setLinger: setsockopt failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::setBroadcast() +{ + myError = NoErr; + myErrorStr.clear(); + if (setsockopt(myFD, SOL_SOCKET, SO_BROADCAST, NULL, 0) != 0) + { + myError = NetFail; + myErrorStr="Failure to setsockopt BROADCAST"; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setBroadcast: setsockopt failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure + @internal + @note ArSocket always sets the reuse-address option in open(), so calling this function is normally unneccesary. + (This apparently needs to be done after the socket is created before + the socket is bound.) +*/ +AREXPORT bool ArSocket::setReuseAddress() +{ + int opt=1; + myError = NoErr; + myErrorStr.clear(); + if (setsockopt(myFD, SOL_SOCKET, SO_REUSEADDR, + (char*)&opt, sizeof(opt)) != 0) + { + myErrorStr="Failure to setsockopt REUSEADDR"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setReuseAddress: setsockopt failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::setNonBlock() +{ + u_long arg=1; + myError = NoErr; + myErrorStr.clear(); + if (ioctlsocket(myFD, FIONBIO, &arg) != 0) + { + myErrorStr="Failure to fcntl O_NONBLOCK"; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::setNonBlock: fcntl failed"); + return(false); + } + else + { + myNonBlocking = true; + return(true); + } +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::copy(int fd, bool doclose) +{ + int len; + + myFD=fd; + myDoClose=doclose; + myError = NoErr; + myErrorStr.clear(); + + len=sizeof(struct sockaddr_in); + if (getsockname(myFD, (struct sockaddr*)&mySin, &len)) + { + myErrorStr="Failed to getsockname on fd "; + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::copy: getsockname failed"); + return(false); + } + else + return(true); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::accept(ArSocket *sock) +{ + int len; + //unsigned char *bytes; + myError = NoErr; + myErrorStr.clear(); + len=sizeof(struct sockaddr_in); + sock->myFD=::accept(myFD, (struct sockaddr*)&(sock->mySin), &len); + sock->myType=myType; + sock->setRawIPString(); + /* + bytes = (unsigned char *)sock->inAddr(); + sprintf(sock->myIPString, "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], + bytes[3]); + */ + if ((sock->myFD < 0 && !myNonBlocking) || + (sock->myFD < 0 && WSAGetLastError() != WSAEWOULDBLOCK && myNonBlocking)) + { + myErrorStr="Failed to accept on socket"; + myError = ConRefused; + ArLog::logErrorFromOS(ArLog::Terse, + "ArSocket::accept: accept failed"); + return(false); + } + + return(true); +} + +AREXPORT void ArSocket::inToA(struct in_addr *addr, char *buff) +{ + strcpy(buff, inet_ntoa(*addr)); +} + +/** @return false and set error code and description string on failure */ +AREXPORT bool ArSocket::getSockName() +{ + int size; + + myError = NoErr; + myErrorStr.clear(); + if (myFD == INVALID_SOCKET) + { + myErrorStr="Trying to get socket name on an unopened socket"; + myError = NetFail; + printf(myErrorStr.c_str()); + return(false); + } + + size=sizeof(mySin); + if (getsockname(myFD, (struct sockaddr *)&mySin, &size) != 0) + { + myErrorStr="Error getting socket name"; + switch (WSAGetLastError()) + { + case WSAEINVAL: + myErrorStr+=": inval"; + break; + case WSANOTINITIALISED: + myErrorStr+=": not init"; + break; + } + myError = NetFail; + ArLog::logErrorFromOS(ArLog::Normal, + "ArSocket::getSockName: getSockName failed"); + return(false); + } + + return(true); +} + +AREXPORT unsigned int ArSocket::hostToNetOrder(int i) +{ + return(htons(i)); +} + +AREXPORT unsigned int ArSocket::netToHostOrder(int i) +{ + return(ntohs(i)); +} + +AREXPORT std::string ArSocket::getHostName() +{ + char localhost[MAXGETHOSTSTRUCT]; + + if (gethostname(localhost, sizeof(localhost)) == 1) + return(""); + else + return(localhost); +} + +/** If this socket is a TCP socket, then set the TCP_NODELAY flag to 1, + * to disable the use of the Nagle algorithm (which waits until enough + * data is ready to send to fill a TCP frame, rather then sending the + * packet immediately). + * @return true of the flag was successfully set, false if there was an + * error or this socket is not a TCP socket. + */ +AREXPORT bool ArSocket::setNoDelay(bool flag) +{ + if(myType != TCP) return false; + int f = flag?1:0; + int r = setsockopt(myFD, IPPROTO_TCP, TCP_NODELAY, (char*)&f, sizeof(f)); + return (r != -1); +} + diff --git a/Legacy/Aria/src/ArSonarAutoDisabler.cpp b/Legacy/Aria/src/ArSonarAutoDisabler.cpp new file mode 100644 index 0000000..d6b8962 --- /dev/null +++ b/Legacy/Aria/src/ArSonarAutoDisabler.cpp @@ -0,0 +1,128 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArCommands.h" +#include "ArExport.h" +#include "ArSonarAutoDisabler.h" +#include "ArRobot.h" + +AREXPORT ArSonarAutoDisabler::ArSonarAutoDisabler(ArRobot *robot) : + myUserTaskCB(this, &ArSonarAutoDisabler::userTask), + mySupressCB(this, &ArSonarAutoDisabler::supress), + myUnsupressCB(this, &ArSonarAutoDisabler::unsupress), + mySetAutonomousDrivingCB(this, &ArSonarAutoDisabler::setAutonomousDriving), + myClearAutonomousDrivingCB(this, &ArSonarAutoDisabler::clearAutonomousDriving) +{ + myRobot = robot; + myLastMoved.setToNow(); + mySupressed = false; + myAutonomousDriving = false; + + if (!myRobot->isConnected() || myRobot->getNumSonar() > 0) + { + myUserTaskCB.setName("SonarAutoDisabler"); + myRobot->addUserTask("SonarAutoDisabler", -50, &myUserTaskCB); + } + else + { + ArLog::log(ArLog::Normal, "ArSonarAutoDisabler not active since there are no sonar"); + } +} + +AREXPORT ArSonarAutoDisabler::~ArSonarAutoDisabler() +{ + myRobot->remUserTask("SonarAutoDisabler"); +} + +AREXPORT void ArSonarAutoDisabler::userTask(void) +{ + if (mySupressed && myRobot->areSonarsEnabled()) + { + ArLog::log(ArLog::Normal, "SonarAutoDisabler: Supression turning off sonar"); + myRobot->disableSonar(); + } + + if (mySupressed) + { + myLastSupressed.setToNow(); + return; + } + + /* + // if it was supressed in the last few cycles, then don't turn the + // sonar back on yet... this isn't perfect, but looks like it works + if ((myLastSupressed.mSecSince() < 175 && fabs(myRobot->getVel()) < 200 && + fabs(myRobot->getRotVel()) < 25) || + (myLastSupressed.mSecSince() < 500 && fabs(myRobot->getVel()) < 50 && + fabs(myRobot->getRotVel()) < 5)) + { + return; + } + */ + + // see if we moved + if (myRobot->isTryingToMove() || fabs(myRobot->getVel()) > 10 || + fabs(myRobot->getRotVel()) > 5 || + (myRobot->hasLatVel() && fabs(myRobot->getLatVel()) > 10)) + { + myLastMoved.setToNow(); + // if our sonar are disabled and we moved and our motors are + // enabled then turn 'em on + if (!myAutonomousDriving && !myRobot->areSonarsEnabled() && + myRobot->areMotorsEnabled()) + { + ArLog::log(ArLog::Normal, + "SonarAutoDisabler: Turning on all sonar (%d %.0f %.0f)", + myRobot->isTryingToMove(), fabs(myRobot->getVel()), + fabs(myRobot->getRotVel())); + myRobot->enableSonar(); + } + // if our sonar are disabled and we moved and our motors are + // enabled then turn 'em on + if (myAutonomousDriving && + !myRobot->areAutonomousDrivingSonarsEnabled() && + myRobot->areMotorsEnabled()) + { + ArLog::log(ArLog::Normal, + "SonarAutoDisabler: Turning on sonar for autonomous driving (%d %.0f %.0f)", + myRobot->isTryingToMove(), fabs(myRobot->getVel()), + fabs(myRobot->getRotVel())); + myRobot->enableAutonomousDrivingSonar(); + } + } + else + { + // if the sonar are on and we haven't moved in a while then turn + // 'em off + if ((myRobot->areSonarsEnabled() || + myRobot->areAutonomousDrivingSonarsEnabled()) && + myLastMoved.mSecSince() > 1000) + { + ArLog::log(ArLog::Normal, "SonarAutoDisabler: Turning off sonar"); + myRobot->disableSonar(); + } + } +} diff --git a/Legacy/Aria/src/ArSonarConnector.cpp b/Legacy/Aria/src/ArSonarConnector.cpp new file mode 100644 index 0000000..9eb45aa --- /dev/null +++ b/Legacy/Aria/src/ArSonarConnector.cpp @@ -0,0 +1,860 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSonarConnector.h" +#include "ArRobot.h" +#include "ArSonarMTX.h" +#include "ariaInternal.h" +#include "ArCommands.h" +#include "ArRobotConfigPacketReader.h" +/** @warning do not delete @a parser during the lifetime of this + ArSonarConnector, which may need to access its contents later. + @param parser the parser with the arguments to parse + @param robot the robot these sonars are attached to (or NULL for none) + @param robotConnector the connector used for connecting to the robot + (so we can see if it was a sim or not) + @param autoParseArgs if this class should autoparse the args if they + aren't parsed explicitly + @param infoLogLevel The log level for information about creating + sonars and such, this is also passed to all the sonars created as + their infoLogLevel too + */ +AREXPORT ArSonarConnector::ArSonarConnector ( + ArArgumentParser *parser, ArRobot *robot, + ArRobotConnector *robotConnector, bool autoParseArgs, + ArLog::LogLevel infoLogLevel, + ArRetFunctor1 *turnOnPowerOutputCB, + ArRetFunctor1 *turnOffPowerOutputCB) : + myParseArgsCB (this, &ArSonarConnector::parseArgs), + myLogOptionsCB (this, &ArSonarConnector::logOptions) +{ + myParser = parser; + myOwnParser = false; + myRobot = robot; + mySonarLogPacketsReceived = false; + mySonarLogPacketsSent = false; + myRobotConnector = robotConnector; + myAutoParseArgs = autoParseArgs; + myParsedArgs = false; + myInfoLogLevel = infoLogLevel; + + myTurnOnPowerOutputCB = turnOnPowerOutputCB; + myTurnOffPowerOutputCB = turnOffPowerOutputCB; + + myParseArgsCB.setName ("ArSonarConnector"); + Aria::addParseArgsCB (&myParseArgsCB, 60); + myLogOptionsCB.setName ("ArSonarConnector"); + Aria::addLogOptionsCB (&myLogOptionsCB, 80); +} +AREXPORT ArSonarConnector::~ArSonarConnector (void) +{ +} +/** + * Parse command line arguments using the ArArgumentParser given in the ArSonarConnector constructor. + * + * See parseArgs(ArArgumentParser*) for details about argument parsing. + * + @return true if the arguments were parsed successfully false if not + **/ +AREXPORT bool ArSonarConnector::parseArgs (void) +{ + return parseArgs (myParser); +} +/** + * Parse command line arguments held by the given ArArgumentParser. + * + @return true if the arguments were parsed successfully false if not + + The following arguments are accepted for sonar connections. A program may request support for more than one sonar + using setMaxNumSonarBoards(); if multi-sonar support is enabled in this way, then these arguments must have the sonar index + number appended. For example, "-sonarPort" for sonar 1 would instead by "-sonarPort1", and for sonar 2 it would be + "-sonarPort2". +
+
-sonarPort port
+
-sp port
+
Use the given port device name when connecting to a sonar. For example, COM2 or on Linux, /dev/ttyS1. + The default sonar port is COM2, which is the typical Pioneer sonar port setup. +
+
-connectSonar
+
-sl
+
Explicitly request that the client program connect to a sonar, if it does not always do so
+
+ **/ +AREXPORT bool ArSonarConnector::parseArgs (ArArgumentParser *parser) +{ + + if (myParsedArgs) + return true; + myParsedArgs = true; + bool typeReallySet; + const char *type; + char buf[1024]; + int i; + std::map::iterator it; + SonarData *sonarData; + bool wasReallySetOnlyTrue = parser->getWasReallySetOnlyTrue(); + parser->setWasReallySetOnlyTrue (true); + + for (i = 1; i <= Aria::getMaxNumSonarBoards(); i++) { + if (i == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", i); + typeReallySet = false; + // see if the sonar is being added from the command line + if (!parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-sonarType%s", buf) || + !parser->checkParameterArgumentStringVar (&typeReallySet, &type, + "-st%s", buf)) { + ArLog::log (ArLog::Normal, + "ArSonarConnector: Bad sonar type given for sonar number %d", + i); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + // if we didn't have an argument then just return + if (!typeReallySet) + continue; + if ( (it = mySonars.find (i)) != mySonars.end()) { + ArLog::log (ArLog::Normal, "ArSonarConnector: A sonar already exists for sonar number %d, replacing it with a new one of type %s", + i, type); + sonarData = (*it).second; + delete sonarData; + mySonars.erase (i); + } + if (typeReallySet && type != NULL) { + ArSonarMTX *sonar = NULL; + if ( (sonar = Aria::sonarCreate (type, i, "ArSonarConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArSonarConnector: Created %s as sonar %d from arguments", + sonar->getName(), i); + mySonars[i] = new SonarData (i, sonar); + sonar->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "Unknown sonar type %s for sonar %d, choices are %s", + type, i, Aria::sonarGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } + + if (parser->checkArgument("-sonarLogPacketsReceived") || + parser->checkArgument("-slpr")) + mySonarLogPacketsReceived = true; + + if (parser->checkArgument("-sonarLogPacketsSent") || + parser->checkArgument("-slps")) + mySonarLogPacketsSent = true; + + + // go through the robot param list and add the sonars defined + // in the parameter file. + const ArRobotParams *params = NULL; + if (myRobot != NULL) { + params = myRobot->getRobotParams(); + if (params != NULL) { + + + for (i = 1; i <= Aria::getMaxNumSonarBoards(); i++) { + // if we already have a sonar for this then don't add one from + // the param file, since it was added either explicitly by a + // program or from the command line + if (mySonars.find (i) != mySonars.end()) + continue; + type = params->getSonarMTXBoardType (i); + // if we don't have a sonar type for that number continue + if (type == NULL || type[0] == '\0') + continue; + + int baud = params->getSonarMTXBoardBaud(i); + if (baud == 0) + continue; + + ArSonarMTX *sonar = NULL; + if ( (sonar = + Aria::sonarCreate (type, i, "ArSonarConnector: ")) != NULL) { + ArLog::log (myInfoLogLevel, + "ArSonarConnector::parseArgs() Created %s as sonar %d from parameter file", + sonar->getName(), i); + mySonars[i] = new SonarData (i, sonar); + sonar->setInfoLogLevel (myInfoLogLevel); + } else { + ArLog::log (ArLog::Normal, + "ArSonarConnector::parseArgs() Unknown sonar type %s for sonar %d from the .p file, choices are %s", + type, i, Aria::sonarGetTypes()); + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + } else { + ArLog::log (ArLog::Normal, "ArSonarConnector::parseArgs() Have robot, but robot has NULL params, so cannot configure its sonar"); + } + } + // now go through and parse the args for any sonar that we have + + + for (it = mySonars.begin(); it != mySonars.end(); it++) { + sonarData = (*it).second; + if (!parseSonarArgs (parser, sonarData)) { + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return false; + } + } + parser->setWasReallySetOnlyTrue (wasReallySetOnlyTrue); + return true; + +} // end parseArgs + +AREXPORT bool ArSonarConnector::parseSonarArgs (ArArgumentParser *parser, + SonarData *sonarData) +{ + char buf[512]; + if (sonarData == NULL) { + ArLog::log (ArLog::Terse, "ArSonarConnector::parseSonarArgs() Was given NULL sonar"); + return false; + } + if (sonarData->mySonar == NULL) { + ArLog::log (ArLog::Normal, + "ArSonarConnector::parseSonarArgs() There is no sonar for sonar number %d but there should be", + sonarData->myNumber); + return false; + } + ArSonarMTX *sonar = sonarData->mySonar; + if (sonarData->myNumber == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", sonarData->myNumber); + +#if 0 + // see if we want to connect to the sonar automatically + if (parser->checkArgumentVar ("-connectSonar%s", buf) || + parser->checkArgumentVar ("-cb%s", buf)) { + sonarData->myConnect = true; + sonarData->myConnectReallySet = true; + } +#endif + + // see if we do not want to connect to the sonar automatically + if (parser->checkArgumentVar ("-doNotConnectSonar%s", buf) || + parser->checkArgumentVar ("-dncs%s", buf)) { + sonarData->myConnect = false; + sonarData->myConnectReallySet = true; + } + if (!parser->checkParameterArgumentStringVar (NULL, &sonarData->myPort, + "-sonarPort%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myPort, + "-sp%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myPortType, + "-sonarPortType%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myPortType, + "-spt%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myType, + "-sonarType%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myType, + "-st%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myBaud, + "-sonarBaud%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myBaud, + "-sb%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myAutoConn, + "-sonarAutoConn%s", buf) || + !parser->checkParameterArgumentStringVar (NULL, &sonarData->myAutoConn, + "-sac%s", buf)) + { + return false; + } + // PS - command line needs to set this to true +#if 0 + if (strcasecmp(sonarData->myAutoConn, "true") == 0) { + sonarData->myConnect = true; + sonarData->myConnectReallySet = true; + } +#endif + return internalConfigureSonar (sonarData); + +} // end parseSonarArgs + + +bool ArSonarConnector::internalConfigureSonar ( + SonarData *sonarData) +{ + ArSonarMTX *sonar = sonarData->mySonar; + if (sonar == NULL) { + ArLog::log (ArLog::Terse, "ArSonarConnector::internalConfigureSonar() No sonar for number %d", + sonarData->myNumber); + return false; + } + // the rest handles all the connection stuff + const ArRobotParams *params; + char portBuf[1024]; + if (sonarData->mySonar == NULL) { + ArLog::log (ArLog::Terse, "ArSonarConnector::internalConfigureSonar() There is no sonar, cannot connect"); + return false; + } + sprintf (portBuf, "%d", sonarData->mySonar->getDefaultTcpPort()); + if (myRobotConnector == NULL) { + ArLog::log (ArLog::Terse, "ArSonarConnector::internalConfigureSonar() No ArRobotConnector is passed in so simulators and remote hosts will not work correctly"); + } + if ( (sonarData->myPort == NULL || strlen (sonarData->myPort) == 0) && + (sonarData->myPortType != NULL && strlen (sonarData->myPortType) > 0)) { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() There is a sonar port type given ('%s') for sonar %d (%s), but no sonar port given, cannot configure sonar", + sonarData->myPortType, sonarData->myNumber, sonar->getName()); + return false; + } + + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() command line sonar #%d type= %s port=%s portType=%s baud=%d autoconnect=%d ", + sonarData->myNumber, + sonarData->myType, + sonarData->myPort, + sonarData->myPortType, + sonarData->myBaud, + sonarData->myAutoConn); + + + if ( (sonarData->myPort != NULL && strlen (sonarData->myPort) > 0) && + (sonarData->myPortType != NULL && strlen (sonarData->myPortType) > 0)) { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() Connection type and port given for sonar %d (%s), so overriding everything and using that information", + sonarData->myNumber, sonar->getName()); + + if ( (sonarData->myConn = Aria::deviceConnectionCreate ( + sonarData->myPortType, sonarData->myPort, portBuf, + "ArSonarConnector:")) == NULL) { + return false; + } + sonar->setDeviceConnection (sonarData->myConn); + return true; + } + + if ( (sonarData->myPort != NULL && strlen (sonarData->myPort) > 0) && + (sonarData->myPortType == NULL || strlen (sonarData->myPortType) == 0)) { + if (myRobot != NULL && (params = myRobot->getRobotParams()) != NULL) { + if (params->getSonarMTXBoardPortType (sonarData->myNumber) != NULL && + params->getSonarMTXBoardPortType (sonarData->myNumber) [0] != '\0') { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() There is a port given, but no port type given so using the robot parameters port type"); + if ( (sonarData->myConn = Aria::deviceConnectionCreate ( + params->getSonarMTXBoardPortType (sonarData->myNumber), + sonarData->myPort, portBuf, + "ArSonarConnector: ")) == NULL) { + return false; + } + } else if (sonar->getDefaultPortType() != NULL && + sonar->getDefaultPortType() [0] != '\0') { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() There is a port given for sonar %d (%s), but no port type given and no robot parameters port type so using the sonar's default port type", sonarData->myNumber, sonar->getName()); + if ( (sonarData->myConn = Aria::deviceConnectionCreate ( + sonar->getDefaultPortType(), + sonarData->myPort, portBuf, + "ArSonarConnector: ")) == NULL) { + return false; + } + } else { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() There is a port given for sonar %d (%s), but no port type given, no robot parameters port type, and no sonar default port type, so using serial", + sonarData->myNumber, sonar->getName()); + if ( (sonarData->myConn = Aria::deviceConnectionCreate ( + "serial", + sonarData->myPort, portBuf, + "ArSonarConnector: ")) == NULL) { + return false; + } + } + sonar->setDeviceConnection (sonarData->myConn); + return true; + } else { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() There is a sonar port given ('%s') for sonar %d (%s), but no sonar port type given and there are no robot params to find the information in, so assuming serial", + sonarData->myPort, sonarData->myNumber, sonar->getName()); + if ( (sonarData->myConn = Aria::deviceConnectionCreate ( + sonarData->myPortType, sonarData->myPort, portBuf, + "ArSonarConnector: ")) == NULL) { + return false; + } + sonar->setDeviceConnection (sonarData->myConn); + return true; + } + } + + + // if we get down here there was no information provided by the command line or in a sonar connector, so see if we have params... if not then fail, if so then use those + if (myRobot == NULL || (params = myRobot->getRobotParams()) == NULL) { + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() No robot params are available, and no command line information given on how to connect to the sonar %d (%s), so cannot connect", sonarData->myNumber, sonar->getName()); + return false; + } + + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() .p sonar #%d type= %s port=%s portType=%s baud=%d autoconnect=%d ", + sonarData->myNumber, + params->getSonarMTXBoardType (sonarData->myNumber), + params->getSonarMTXBoardPort (sonarData->myNumber), + params->getSonarMTXBoardPortType (sonarData->myNumber), + params->getSonarMTXBoardBaud (sonarData->myNumber), + params->getSonarMTXBoardAutoConn (sonarData->myNumber)); + + // see if auto connect is on + if (params->getSonarMTXBoardAutoConn (sonarData->myNumber)) { + + sonarData->myConnect = true; + sonarData->myConnectReallySet = true; + } + + ArLog::log (ArLog::Normal, "ArSonarConnector::internalConfigureSonar() Using robot params for connecting to sonar %d (%s)", sonarData->myNumber, sonar->getName()); + + if ( (sonarData->myConn = Aria::deviceConnectionCreate ( + params->getSonarMTXBoardPortType (sonarData->myNumber), + params->getSonarMTXBoardPort (sonarData->myNumber), portBuf, + "ArSonarConnector: ")) == NULL) { + return false; + } + + sonar->setDeviceConnection (sonarData->myConn); + return true; +} +AREXPORT void ArSonarConnector::logOptions (void) const +{ + ArLog::log (ArLog::Terse, "Options for ArSonarConnector:"); + ArLog::log(ArLog::Terse, "-sonarLogPacketsReceived"); + ArLog::log(ArLog::Terse, "-slpr"); + ArLog::log(ArLog::Terse, "-sonarLogPacketsSent"); + ArLog::log(ArLog::Terse, "-slps"); + ArLog::log (ArLog::Terse, "\nOptions shown are for currently set up sonars. Activate sonars with -sonarType option"); + ArLog::log (ArLog::Terse, "to see options for that sonar (e.g. \"-help -sonarType1 sonarMTX\")."); + ArLog::log (ArLog::Terse, "Valid sonar types are: %s", Aria::sonarGetTypes()); + ArLog::log (ArLog::Terse, "\nSee docs for details."); + std::map::const_iterator it; + SonarData *sonarData; + for (it = mySonars.begin(); it != mySonars.end(); it++) { + sonarData = (*it).second; + logSonarOptions (sonarData); + } +} +AREXPORT void ArSonarConnector::logSonarOptions ( + SonarData *sonarData, bool header, bool metaOpts) const +{ + char buf[512]; + if (sonarData == NULL) { + ArLog::log (ArLog::Normal, + "Tried to log sonar options with NULL sonar data"); + return; + } + if (sonarData->mySonar == NULL) { + ArLog::log (ArLog::Normal, + "ArSonarConnector: There is no sonar for sonar number %d but there should be", + sonarData->myNumber); + return; + } + ArSonarMTX *sonar = sonarData->mySonar; + if (sonarData->myNumber == 1) + buf[0] = '\0'; + else + sprintf (buf, "%d", sonarData->myNumber); + if (header) { + ArLog::log (ArLog::Terse, ""); + ArLog::log (ArLog::Terse, "Sonar%s: (\"%s\")", buf, sonar->getName()); + } + if (metaOpts) { + ArLog::log (ArLog::Terse, "-sonarType%s <%s>", buf, Aria::sonarGetTypes()); + ArLog::log (ArLog::Terse, "-st%s <%s>", buf, Aria::sonarGetTypes()); + ArLog::log (ArLog::Terse, "-connectSonar%s", buf); + ArLog::log (ArLog::Terse, "-cs%s", buf); + } + ArLog::log (ArLog::Terse, "-sonarPort%s ", buf); + ArLog::log (ArLog::Terse, "-sp%s ", buf); + ArLog::log (ArLog::Terse, "-sonarPortType%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log (ArLog::Terse, "-spt%s <%s>", buf, Aria::deviceConnectionGetTypes()); + ArLog::log (ArLog::Terse, "-remoteSonarTcpPort%s ", buf); + ArLog::log (ArLog::Terse, "-rstp%s ", buf); +} +/** + Normally adding sonars is done from the .p file, you can use this + if you want to add them explicitly in a program (which will + override the .p file, and may cause some problems). + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArSonarConnector::connectSonars.() + @internal +**/ +AREXPORT bool ArSonarConnector::addSonar ( + ArSonarMTX *sonar, int sonarNumber) +{ + std::map::iterator it; + SonarData *sonarData = NULL; + if ( (it = mySonars.find (sonarNumber)) != mySonars.end()) + sonarData = (*it).second; + if (sonarData != NULL) { + if (sonarData->mySonar != NULL) + ArLog::log (ArLog::Terse, + "ArSonarConnector::addSonar: Already have sonar for number #%d of type %s but a replacement sonar of type %s was passed in", + sonarNumber, sonarData->mySonar->getName(), sonar->getName()); + else + ArLog::log (ArLog::Terse, + "ArSonarConnector::addSonar: Already have sonar for number #%d but a replacement sonar of type %s was passed in", + sonarNumber, sonar->getName()); + delete sonarData; + mySonars.erase (sonarNumber); + } + mySonars[sonarNumber] = new SonarData (sonarNumber, sonar); + return true; +} +AREXPORT ArSonarMTX *ArSonarConnector::getSonar (int sonarNumber) +{ + std::map::iterator it; + SonarData *sonarData = NULL; + if ( (it = mySonars.find (sonarNumber)) != mySonars.end()) + sonarData = (*it).second; + // if we have no sonar, we can't get it so just return + if (sonarData == NULL) + return NULL; + // otherwise, return the sonar + return sonarData->mySonar; +} +AREXPORT bool ArSonarConnector::replaceSonar ( + ArSonarMTX *sonar, int sonarNumber) +{ + std::map::iterator it; + SonarData *sonarData = NULL; + if ( (it = mySonars.find (sonarNumber)) != mySonars.end()) + sonarData = (*it).second; + // if we have no sonar, we can't replace it so just return + if (sonarData == NULL) + return false; + if (sonarData->mySonar != NULL) + ArLog::log (myInfoLogLevel, + "ArSonarConnector::replaceSonar: Already have sonar for number #%d of type %s but a replacement sonar of type %s was passed in", + sonarNumber, sonarData->mySonar->getName(), sonar->getName()); + else + ArLog::log (ArLog::Normal, + "ArSonarConnector::replaceSonar: Replacing a non existant sonar number #%d with a sonar of type %s passed in", + sonarNumber, sonar->getName()); + sonarData->mySonar = sonar; + return true; +} +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArSonarConnector::connectSonars(). + @internal +**/ +AREXPORT bool ArSonarConnector::setupSonar (ArSonarMTX *sonar, + int sonarNumber) +{ + if (myRobot == NULL && myRobotConnector != NULL) + myRobot = myRobotConnector->getRobot(); + std::map::iterator it; + SonarData *sonarData = NULL; + const ArRobotParams *params; + if ( (it = mySonars.find (sonarNumber)) != mySonars.end()) + sonarData = (*it).second; + if (sonarData == NULL && sonar == NULL) { + ArLog::log (ArLog::Terse, "ArSonarConnector::setupSonar: Do not have sonar #%d", sonarNumber) ; + return false; + } + if (sonarData != NULL && sonar != NULL && + sonarData->mySonar != sonar) { + if (sonarData->mySonar != NULL) + ArLog::log (ArLog::Terse, "ArSonarConnector::setupSonar: Already have sonar for number #%d (%s) but a replacement sonar (%s) was passed in, this will replace all of the command line arguments for that sonar", + sonarNumber, sonarData->mySonar->getName(), sonar->getName()); + else + ArLog::log (ArLog::Terse, "ArSonarConnector::setupSonar: Already have sonar for number #%d but a replacement sonar (%s) was passed in, this will replace all of the command line arguments for that sonar", + sonarNumber, sonar->getName()); + delete sonarData; + mySonars.erase (sonarNumber); + mySonars[sonarNumber] = new SonarData (sonarNumber, sonar); + } + if (sonarData == NULL && sonar != NULL) { + sonarData = new SonarData (sonarNumber, sonar); + mySonars[sonarNumber] = sonarData; + if (myAutoParseArgs && !parseSonarArgs (myParser, sonarData)) { + ArLog::log (ArLog::Verbose, "ArSonarConnector: Auto parsing args for sonar %s (num %d)", sonarData->mySonar->getName(), sonarNumber); + return false; + } + } + // see if there is no sonar (ie if it was a sick done in the old + // style), or if the sonar passed in doesn't match the one this + // class created (I don't know how it'd happen, but...)... and then + // configure it + if ( (sonarData->mySonar == NULL || sonarData->mySonar != sonar)) { + if (!internalConfigureSonar (sonarData)) + return false; + } + // setupSonar automatically adds this to the robot, since the + // connectsonar stuff is the newer more supported way and is more + // configurable.. it only adds it as a sonar since the legacy code + // won't add it that way, but will add it as a range device + if (myRobot != NULL) { + myRobot->addSonar (sonar, sonarNumber); + //myRobot->addRangeDevice(sonar); + } else { + ArLog::log (ArLog::Normal, "ArSonarConnector::setupSonar: No robot, so sonar cannot be added to robot"); + } + return true; +} +/** + This is mainly for backwards compatibility (ie used for + ArSimpleConnector). If you're using this class you should probably + use the new functionality which is just ArSonarConnector::connectSonars(). + @internal +**/ +AREXPORT bool ArSonarConnector::connectSonar (ArSonarMTX *sonar, + int sonarNumber, + bool forceConnection) +{ + std::map::iterator it; + SonarData *sonarData = NULL; + sonar->lockDevice(); + // set up the sonar regardless + if (!setupSonar (sonar, sonarNumber)) { + sonar->unlockDevice(); + return false; + } + sonar->unlockDevice(); + if ( (it = mySonars.find (sonarNumber)) != mySonars.end()) + sonarData = (*it).second; + if (sonarData == NULL) { + ArLog::log (ArLog::Normal, "ArSonarConnector::connectSonar: Some horrendous error in connectSonar with sonar number %d", sonarNumber); + return false; + } + // see if we want to connect + if (!forceConnection && !sonarData->myConnect) + return true; + else + return sonar->blockingConnect(mySonarLogPacketsSent, mySonarLogPacketsReceived); +} + + +AREXPORT bool ArSonarConnector::connectSonars ( + bool continueOnFailedConnect, bool addConnectedSonarsToRobot, + bool addAllSonarsToRobot, bool turnOnSonars, + bool powerCycleSonarOnFailedConnect) +{ + std::map::iterator it; + SonarData *sonarData = NULL; + ArLog::log (myInfoLogLevel, + "ArSonarConnector::connectSonars() Connecting sonars %d %d", myAutoParseArgs, myParsedArgs); + + if (myAutoParseArgs && !myParsedArgs) { + ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectSonars() Auto parsing args for sonars"); + if (!parseArgs()) { + return false; + } + } + + if (addAllSonarsToRobot) { + ArLog::log (ArLog::Normal, + "ArSonarConnector::connectSonars() addAllSonarsToRobot"); + if (myRobot != NULL) { + for (it = mySonars.begin(); it != mySonars.end(); it++) { + sonarData = (*it).second; + myRobot->addSonar (sonarData->mySonar, sonarData->myNumber); + ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectSonars: Added %s to robot as sonar %d", + sonarData->mySonar->getName(), sonarData->myNumber); + } + } else { + ArLog::log (ArLog::Normal, "ArSonarConnector::connectSonars: Supposed to add all sonars to robot, but there is no robot"); + return false; + } + } + + for (it = mySonars.begin(); it != mySonars.end(); it++) { + sonarData = (*it).second; + if ( (sonarData == NULL) || (myRobot == NULL)) + continue; +// if ( (sonarData->myPort == NULL || strlen (sonarData->myPort) == 0) && +// (sonarData->myPortType != NULL && strlen (sonarData->myPortType) > 0)) { + + ArLog::log (ArLog::Normal, "ArSonarConnector::connectSonars() sonar #%d type= %s port=%s portType=%s baud=%d autoconnect=%d ", + sonarData->myNumber, + sonarData->myType, + sonarData->myPort, + sonarData->myPortType, + sonarData->myBaud, + sonarData->myAutoConn); +//} + + bool connected = false; + + if (sonarData->myConnectReallySet && sonarData->myConnect) { + // MPL we may as well try to connect if we + // can't power it on, so commenting out the + // next two lines and adding the one after + // if (!turnOnPower(sonarData)) + // continue; + turnOnPower (sonarData); + ArLog::log (myInfoLogLevel, + "ArSonarConnector::connectSonars() Connecting %s", + sonarData->mySonar->getName()); + sonarData->mySonar->setRobot (myRobot); + // to turn on packet tracing - uncomment + //connected = sonarData->mySonar->blockingConnect(true, true); + connected = sonarData->mySonar->blockingConnect (mySonarLogPacketsSent, mySonarLogPacketsReceived); + + + if (connected) { + if (!addAllSonarsToRobot && addConnectedSonarsToRobot) { + if (myRobot != NULL) { + myRobot->addSonar (sonarData->mySonar, sonarData->myNumber); + //myRobot->addRangeDevice(sonarData->mySonar); + ArLog::log (ArLog::Normal, + //ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectSonars() Added %s to robot", + sonarData->mySonar->getName()); + } else { + ArLog::log (ArLog::Normal, + "ArSonarConnector::connectSonars() Could not add %s to robot, since there is no robot", + sonarData->mySonar->getName()); + } + } else if (addAllSonarsToRobot && myRobot != NULL) { + ArLog::log (ArLog::Normal, +// ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectSonars() %s already added to robot)", + sonarData->mySonar->getName()); + } else if (myRobot != NULL) { + ArLog::log (ArLog::Normal, +// ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectSonars() Did not add %s to robot", + sonarData->mySonar->getName()); + } + } else { + if (!continueOnFailedConnect) { + ArLog::log (ArLog::Normal, + "ArSonarConnector::connectSonars() Could not connect %s, stopping", + sonarData->mySonar->getName()); + return false; + } else + ArLog::log (ArLog::Normal, + "ArSonarConnector::connectSonars() Could not connect %s, continuing with remainder of sonars", + sonarData->mySonar->getName()); + } + } + } + + ArLog::log (myInfoLogLevel, + "ArSonarConnector() Done connecting sonars"); + return true; +} + +AREXPORT bool ArSonarConnector::turnOnPower(SonarData *sonarData) + +{ + /// MPL the new way + if (myTurnOnPowerOutputCB != NULL) + { + if (myRobot->getRobotParams()->getSonarMTXBoardPowerOutput( + sonarData->myNumber) == NULL || + myRobot->getRobotParams()->getSonarMTXBoardPowerOutput( + sonarData->myNumber)[0] == '\0') + { + ArLog::log(ArLog::Normal, + "ArSonarConnector::connectSonars: Sonar %d has no power output set so can't be turned on (things may still work).", + sonarData->myNumber); + return false; + } + else + { + if (myTurnOnPowerOutputCB->invokeR( + myRobot->getRobotParams()->getSonarMTXBoardPowerOutput( + sonarData->myNumber))) + { + ArLog::log(myInfoLogLevel, + "ArSonarConnector::connectSonars: Turned on power output %s for sonar %d", + + myRobot->getRobotParams()->getSonarMTXBoardPowerOutput( + sonarData->myNumber), + sonarData->myNumber); + return true; + } + else + { + ArLog::log(ArLog::Normal, + "ArSonarConnector::connectSonars: Could not turn on power output %s for sonar %d (things may still work).", + myRobot->getRobotParams()->getSonarMTXBoardPowerOutput( + sonarData->myNumber), + sonarData->myNumber); + return false; + } + } + } + + return false; +} + +AREXPORT bool ArSonarConnector::connectReplaySonars( + bool continueOnFailedConnect, bool addConnectedSonarsToRobot, + bool addAllSonarsToRobot, bool turnOnSonars, + bool powerCycleSonarOnFailedConnect) + +{ + std::map::iterator it; + SonarData *sonarData = NULL; + ArLog::log (myInfoLogLevel, + "ArSonarConnector::connectReplaySonars() Connecting sonars %d %d", myAutoParseArgs, myParsedArgs); + if (myAutoParseArgs && !myParsedArgs) { + ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectReplaySonars() Auto parsing args for sonars"); + if (!parseArgs()) { + return false; + } + } + + if (addAllSonarsToRobot) { + ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectReplaySonars() addAllSonarsToRobot"); + + if (myRobot != NULL) { + + for (it = mySonars.begin(); it != mySonars.end(); it++) { + sonarData = (*it).second; + myRobot->addSonar (sonarData->mySonar, sonarData->myNumber); + ArLog::log (ArLog::Verbose, + "ArSonarConnector::connectReplaySonars: Added %s to robot as sonar %d", + sonarData->mySonar->getName(), sonarData->myNumber); + } + } else { + ArLog::log (ArLog::Normal, "ArSonarConnector::connectReplaySonars: Supposed to add all sonars to robot, but there is no robot"); + return false; + } + } + for (it = mySonars.begin(); it != mySonars.end(); it++) { + + sonarData = (*it).second; + + if ((sonarData == NULL) || (myRobot == NULL)) + continue; + + ArLog::log (ArLog::Normal, "ArSonarConnector::connectReplaySonars() sonar #%d type= %s port=%s portType=%s baud=%d autoconnect=%d ", + sonarData->myNumber, + sonarData->myType, + sonarData->myPort, + sonarData->myPortType, + sonarData->myBaud, + sonarData->myAutoConn); + + sonarData->mySonar->setRobot (myRobot); + + return sonarData->mySonar->fakeConnect(); + } + +} diff --git a/Legacy/Aria/src/ArSonarDevice.cpp b/Legacy/Aria/src/ArSonarDevice.cpp new file mode 100644 index 0000000..99927f0 --- /dev/null +++ b/Legacy/Aria/src/ArSonarDevice.cpp @@ -0,0 +1,162 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSonarDevice.h" +#include "ArSensorReading.h" +#include "ArRobot.h" + +AREXPORT ArSonarDevice::ArSonarDevice(size_t currentBufferSize, + size_t cumulativeBufferSize, const char *name) : + ArRangeDevice(currentBufferSize, cumulativeBufferSize, name, 5000), + myProcessCB(this, &ArSonarDevice::processReadings), + myIgnoreReadingCB(NULL) +{ + setMaxDistToKeepCumulative(3000); + myFilterNearDist = 50; // 50 mm between cumulative readings, at least + myFilterFarDist = 3000; // throw out cumulative readings this far + // from robot + setMaxSecondsToKeepCurrent(5); + setMaxSecondsToKeepCumulative(15); + setCurrentDrawingData(new ArDrawingData("polyArrows", + ArColor(0x33, 0xCC, 0xFF), + 200, // mm length of arrow + 70), // first sensor layer + true); +} + +AREXPORT ArSonarDevice::~ArSonarDevice() +{ + if (myRobot != NULL) + { + myRobot->remSensorInterpTask(&myProcessCB); + myRobot->remRangeDevice(this); + } +} + +AREXPORT void ArSonarDevice::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask(myName.c_str(), 10, &myProcessCB); + ArRangeDevice::setRobot(robot); +} + +AREXPORT void ArSonarDevice::processReadings(void) +{ + int i; + ArSensorReading *reading; + lockDevice(); + + for (i = 0; i < myRobot->getNumSonar(); i++) + { + reading = myRobot->getSonarReading(i); + if (reading == NULL || !reading->isNew(myRobot->getCounter())) + continue; + // make sure we don't want to ignore the reading + if (myIgnoreReadingCB == NULL || + !myIgnoreReadingCB->invokeR(reading->getPose())) + addReading(reading->getX(), reading->getY()); + } + + // delete too-far readings + std::list *readingList; + std::list::iterator it; + double dx, dy, rx, ry; + + myCumulativeBuffer.beginInvalidationSweep(); + readingList = myCumulativeBuffer.getBuffer(); + rx = myRobot->getX(); + ry = myRobot->getY(); + // walk through the list and see if this makes any old readings bad + if (readingList != NULL) + { + for (it = readingList->begin(); it != readingList->end(); ++it) + { + dx = (*it)->getX() - rx; + dy = (*it)->getY() - ry; + if ((dx*dx + dy*dy) > (myFilterFarDist * myFilterFarDist)) + myCumulativeBuffer.invalidateReading(it); + } + } + myCumulativeBuffer.endInvalidationSweep(); + // leave this unlock here or the world WILL end + unlockDevice(); +} + +/** + Adds a sonar reading with the global coordinates x,y. Makes sure the + reading is within the proper distance to the robot, for + both current and cumulative buffers. Filters buffer points + Note: please lock the device using lockDevice() / unlockDevice() if + calling this from outside process(). + @param x the global x coordinate of the reading + @param y the global y coordinate of the reading +*/ +AREXPORT void ArSonarDevice::addReading(double x, double y) +{ + double rx = myRobot->getX(); + double ry = myRobot->getY(); + double dx = x - rx; + double dy = y - ry; + double dist2 = dx*dx + dy*dy; + + if (dist2 < myMaxRange*myMaxRange) + myCurrentBuffer.addReading(x,y); + + if (dist2 < myMaxDistToKeepCumulative * myMaxDistToKeepCumulative) + { + std::list *readingList; + std::list::iterator it; + + myCumulativeBuffer.beginInvalidationSweep(); + + readingList = myCumulativeBuffer.getBuffer(); + // walk through the list and see if this makes any old readings bad + if (readingList != NULL) + { + for (it = readingList->begin(); it != readingList->end(); ++it) + { + dx = (*it)->getX() - x; + dy = (*it)->getY() - y; + if ((dx*dx + dy*dy) < (myFilterNearDist * myFilterNearDist)) + myCumulativeBuffer.invalidateReading(it); + } + } + myCumulativeBuffer.endInvalidationSweep(); + + myCumulativeBuffer.addReading(x,y); + } +} + + +AREXPORT void ArSonarDevice::setIgnoreReadingCB( + ArRetFunctor1 *ignoreReadingCB) +{ + lockDevice(); + myIgnoreReadingCB = ignoreReadingCB; + unlockDevice(); +} diff --git a/Legacy/Aria/src/ArSonarMTX.cpp b/Legacy/Aria/src/ArSonarMTX.cpp new file mode 100644 index 0000000..2a0fcba --- /dev/null +++ b/Legacy/Aria/src/ArSonarMTX.cpp @@ -0,0 +1,2083 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSonarMTX.h" +#include "ArSensorReading.h" +//#include "ArRobot.h" + +#include "ariaOSDef.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" +#include + +//#define HEADER1 0xfa +//#define HEADER2 0xfb + +#define TRACE +#if (defined(TRACE)) +#define IFDEBUG(code) {code;} +#else +#define IFDEBUG(code) +#endif + + +AREXPORT ArSonarMTX::ArSonarMTX (int sonarBoardNum, + const char *name, ArDeviceConnection *conn, + ArRobot *robot) : + mySensorInterpTask (this, &ArSonarMTX::sensorInterp), + myConn (conn), + myName (name), + myBoardNum (sonarBoardNum), + myWarnedAboutExtraSonar(false), + myFirmwareVersion(0), + myAriaExitCB (this, &ArSonarMTX::disconnect) +{ + + mySonarMap.clear(); + + myInfoLogLevel = ArLog::Normal; + + clear(); + + setRobot (robot); + + mySendTracking = false; + myRecvTracking = false; + + sonarSetName(name); + + sprintf(myNameWithBoard, "%s%d", name, sonarBoardNum); + + ArLog::log (ArLog::Normal, "%s::ArSonarMTX initializing", + getNameWithBoard()); + + + Aria::addExitCallback (&myAriaExitCB, -10); + + //myLogLevel = ArLog::Verbose; + //myLogLevel = ArLog::Terse; + myLogLevel = ArLog::Normal; + +} + +AREXPORT ArSonarMTX::~ArSonarMTX() +{ + if (myRobot != NULL) { + myRobot->remSensorInterpTask (&myProcessCB); + } +} + + +AREXPORT void ArSonarMTX::setDeviceConnection ( + ArDeviceConnection *conn) +{ + myConn = conn; + myConn->setDeviceName(getName()); +} + + +AREXPORT ArDeviceConnection *ArSonarMTX::getDeviceConnection (void) +{ + return myConn; +} + +AREXPORT void ArSonarMTX::setRobot (ArRobot *robot) +{ + int i, j; + + myRobot = robot; + + + // this is the code from the laser, i changed the priority to 92 from 90 + // also it puts in mysensorinterptask instead of myprocesscb + if (myRobot != NULL) { + myRobot->remSensorInterpTask (&mySensorInterpTask); + myRobot->addSensorInterpTask (myName.c_str(), 92, &mySensorInterpTask); + } + + if ((robot != NULL) && (robot->getRobotParams())) { + + myBoardDelay = robot->getRobotParams()->getSonarMTXBoardDelay (myBoardNum); + + // The following params can be overridden if they are configured in the units + myBoardGain = robot->getRobotParams()->getSonarMTXBoardGain (myBoardNum); + + myBoardDetectionThreshold = robot->getRobotParams()->getSonarMTXBoardDetectionThreshold (myBoardNum); + +/* - no longer supported + myBoardNoiseDelta = robot->getRobotParams()->getSonarMTXBoardNoiseDelta (myBoardNum); +*/ + + myBoardMaxRange = robot->getRobotParams()->getSonarMTXBoardMaxRange (myBoardNum); + myBoardMaxRange = myBoardMaxRange/17; + + myBoardUseForAutonomousDriving = robot->getRobotParams()->getSonarMTXBoardUseForAutonomousDriving (myBoardNum); + + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d delay %d", + getNameWithBoard(), myBoardNum, myBoardDelay); + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d gain %d", + getNameWithBoard(), myBoardNum, myBoardGain); + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d detection threshold %d", + getNameWithBoard(), myBoardNum, myBoardDetectionThreshold); +/* - no longer supported + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d noise delta %d", + getNameWithBoard(), myBoardNum, myBoardNoiseDelta); +*/ + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d max range %d (note it's value is divided by 17 from config page)", + getNameWithBoard(), myBoardNum, myBoardMaxRange); + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d use for autonomous driving %d", + getNameWithBoard(), myBoardNum, myBoardUseForAutonomousDriving); + + // go thru each configure sonarunit, see if it's for this board, if + // so then load the config values into our map + + myNumConfiguredTransducers = 0; + int t; + + myTransducerMaskLSB = 0; + myTransducerMaskMSB = 0; + myAutonomousDrivingTransducerMaskLSB = 0; + myAutonomousDrivingTransducerMaskMSB = 0; + myTransducersAreOn = false; + +//* MPL for PS TODO + + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar board %d can have a max %d sonar units", + getNameWithBoard(), myBoardNum, robot->getRobotParams()->getNumSonarUnits()); + + for (i = 0; i < robot->getRobotParams()->getNumSonarUnits(); ++i) { + + //if (mySonars.find(i) == mySonars.end()) { + + + t = robot->getRobotParams()->getSonarMTXBoardUnitPosition (i); + + // PS 1/24/13 - decrement t by 1 as on the board itself the + // units are numbered 1-8, but the protocol uses 0-7 + + if (t == 0) { + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar_%d has SonarBoardUnitPosition of 0 - ignoring", + getNameWithBoard(), i+1); + + continue; + } + t = t-1; + + + // end PS + + mySonarMap[t][SONAR_IS_CONFIGURED] = false; + + if (robot->getRobotParams()->getSonarMTXBoard (i) != myBoardNum) { + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar_%d has a mismatched SonarBoard number %d - ignoring", + getNameWithBoard(), i+1, myBoardNum); + continue; + } + + if (t > 7) + myTransducerMaskMSB = (1 << t) | myTransducerMaskMSB; + else + myTransducerMaskLSB = (1 << t) | myTransducerMaskLSB; + + mySonarMap[t][SONAR_IS_CONFIGURED] = true; + mySonarMap[t][SONAR_MAPPING] = i; + mySonarMap[t][SONAR_X] = robot->getRobotParams()->getSonarX (i); + mySonarMap[t][SONAR_Y] = robot->getRobotParams()->getSonarY (i); + mySonarMap[t][SONAR_TH] = robot->getRobotParams()->getSonarTh (i); + mySonarMap[t][SONAR_GAIN] = robot->getRobotParams()->getSonarGain (i); + mySonarMap[t][SONAR_DETECTION_THRES] = robot->getRobotParams()->getSonarDetectionThreshold (i); +/* - no longer supported + mySonarMap[t][SONAR_NOISE_DELTA] = robot->getRobotParams()->getSonarNoiseDelta (i); +*/ + mySonarMap[t][SONAR_MAX_RANGE] = robot->getRobotParams()->getSonarMaxRange (i)/17; + mySonarMap[t][SONAR_USE_FOR_AUTONOMOUS_DRIVING] = robot->getRobotParams()->getSonarUseForAutonomousDriving (i); + + myNumConfiguredTransducers++; + + if (mySonarMap[t][SONAR_GAIN] == 0) + mySonarMap[t][SONAR_GAIN] = myBoardGain; + + if (mySonarMap[t][SONAR_DETECTION_THRES] == 0) + mySonarMap[t][SONAR_DETECTION_THRES] = myBoardDetectionThreshold; + + + if (mySonarMap[t][SONAR_USE_FOR_AUTONOMOUS_DRIVING]) { + if (t > 7) + myAutonomousDrivingTransducerMaskMSB = (1 << t) | myAutonomousDrivingTransducerMaskMSB; + else + myAutonomousDrivingTransducerMaskLSB = (1 << t) | myAutonomousDrivingTransducerMaskLSB; + } + +/* - no longer supported + if (mySonarMap[t][SONAR_NOISE_DELTA] == 0) + mySonarMap[t][SONAR_NOISE_DELTA] = myBoardNoiseDelta; +*/ + + if (mySonarMap[t][SONAR_MAX_RANGE] == 0) + mySonarMap[t][SONAR_MAX_RANGE] = myBoardMaxRange; + + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar_%d params %d %d %d %d %d %d %d %d", + getNameWithBoard(), i+1, mySonarMap[t][SONAR_MAPPING]+1, + mySonarMap[t][SONAR_X], + mySonarMap[t][SONAR_Y], + mySonarMap[t][SONAR_TH], + mySonarMap[t][SONAR_GAIN], + /* + mySonarMap[t][SONAR_NOISE_DELTA], + */ + mySonarMap[t][SONAR_DETECTION_THRES], + mySonarMap[t][SONAR_MAX_RANGE], + mySonarMap[t][SONAR_USE_FOR_AUTONOMOUS_DRIVING]); + + } // end for + + ArLog::log (ArLog::Normal, "%s::setRobot() Number of configured sonar units = %d", + getNameWithBoard(), myNumConfiguredTransducers); + + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar mask MSB (0x%x) LSB (0x%x)", + getNameWithBoard(), myTransducerMaskMSB, myTransducerMaskLSB); + + ArLog::log (ArLog::Normal, "%s::setRobot() Sonar use for autonomous driving mask MSB (0x%x) LSB (0x%x)", + getNameWithBoard(), myAutonomousDrivingTransducerMaskMSB, myAutonomousDrivingTransducerMaskLSB); + + } + +} + + +void ArSonarMTX::clear (void) +{ + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; + +} + +AREXPORT void ArSonarMTX::sonarSetName (const char *name) +{ + myName = name; + myDeviceMutex.setLogNameVar ("%s::myDeviceMutex", getNameWithBoard()); + myPacketsMutex.setLogNameVar ("%s::myPacketsMutex", getNameWithBoard()); + myDataMutex.setLogNameVar ("%s::myDataMutex", getNameWithBoard()); + myAriaExitCB.setNameVar ("%s::exitCallback", getNameWithBoard()); + myDisconnectOnErrorCBList.setNameVar( + "%s::myDisconnectOnErrorCBList", myName.c_str()); + + +} + + +AREXPORT int ArSonarMTX::getReadingCount() +{ + if (myTimeLastReading == time(NULL)) + return myReadingCount; + if (myTimeLastReading == time(NULL) - 1) + return myReadingCurrentCount; + return 0; +} + +AREXPORT void ArSonarMTX::internalGotReading(void) +{ + if (myTimeLastReading != time(NULL)) + { + myTimeLastReading = time(NULL); + myReadingCount = myReadingCurrentCount; + myReadingCurrentCount = 0; + } + myReadingCurrentCount++; + + myLastReading.setToNow(); + +} + +AREXPORT bool ArSonarMTX::disconnect (void) +{ + if (!isConnected()) + return true; + + ArLog::log (ArLog::Normal, "%s: Disconnecting", getNameWithBoard()); + + return true; +} + +void ArSonarMTX::failedToConnect (void) +{ + + ArLog::log (ArLog::Normal, + "%s:failedToConnect Cound not connect to sonar", + getNameWithBoard()); + + myDeviceMutex.lock(); + myTryingToConnect = true; + myDeviceMutex.unlock(); +} + +void ArSonarMTX::sensorInterp (void) +{ + //ArSonarMTXPacket *packet; + ArRobotPacket *packet; + + int sonarNum; + int sonarRange; + int sonarRangeConverted; + + while (1) { + myPacketsMutex.lock(); + + if (myPackets.empty()) { + myPacketsMutex.unlock(); + return; + } + + myLastReading.setToNow(); + internalGotReading(); + + packet = myPackets.front(); + myPackets.pop_front(); + myPacketsMutex.unlock(); + + unsigned char *buf = (unsigned char *) packet->getBuf(); + + // make sure its a data packet with 7 bytes +//packet->getLength() + if ( (packet->getID() != START_SCAN) || (packet->getLength() != 10)) { + ArLog::log (ArLog::Normal, + "%s:sensorInterp Could not process packet, command or packet length is invalid %02x %02x %02x %02x %02x %02x %02x %02x %d", + getNameWithBoard(), buf[0], buf[1], buf[2], buf[3],buf[4], buf[5], buf[6],packet->getLength()); + + delete packet; + continue; + } + + ArTime time = packet->getTimeReceived(); + + sonarNum = (buf[5] << 8) | (buf[4]); + + // make sure the sonar number is in range + +#if 0 // for raw trace + char obuf[256]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength() - 2; i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "%s::sensorInterp() packet = %s",getNameWithBoard(), obuf); +#endif + + if (sonarNum > myNumTransducers) { + ArLog::log (ArLog::Normal, + "%s:sensorInterp Could not process packet, transducer number is invalid %d %d", + getNameWithBoard(), sonarNum, myNumTransducers); + delete packet; + continue; + } + + + // map the sonar num to the configured sonar num + + std::map >::iterator iter2 = + mySonarMap.find(sonarNum); + + if (iter2 == mySonarMap.end()) { + if (!myWarnedAboutExtraSonar) { + ArLog::log(ArLog::Normal, "Robot gave back extra sonar reading! Either the parameter file for the robot or the firmware needs updating."); + myWarnedAboutExtraSonar = true; + } + + delete packet; + continue; + } + + // ignore any readings from unconfigured transducers + if (mySonarMap[sonarNum][SONAR_IS_CONFIGURED] == false) + { + delete packet; + continue; + } + + int mappedSonarNum = mySonarMap[sonarNum][SONAR_MAPPING]; + +#if 0 + if ( (buf[7] == 0xff) && (buf[6] == 0xff)) { + ArLog::log(ArLog::Normal, + "%s:sensorInterp Could not process packet, range is invalid for %d", + getNameWithBoard(), sonarNum); + delete packet; + continue; + } +#endif + + + sonarRange = (buf[7] << 8) | (buf[6]); + + sonarRangeConverted = ArMath::roundInt ( + sonarRange * myRobot->getRobotParams()->getRangeConvFactor()); + + + //ArLog::log(ArLog::Normal, + // "%s:sensorInterp range is valid = %d for transducer %d mapped sonar = %d", + // getNameWithBoard(), sonarRangeConverted, sonarNum, mappedSonarNum); + + myDeviceMutex.lock(); + + if (sonarRangeConverted == 0) { + // make range max range 0xffff + 1 + sonarRangeConverted = 65536; + } +#if 0 // for raw trace + if (sonarRangeConverted == 0) { + char obuf[256]; + obuf[0] = '\0'; + int j = 0; + for (int i = 0; i < packet->getLength() - 2; i++) { + sprintf (&obuf[j], "_%02x", buf[i]); + j= j+3; + } + ArLog::log (ArLog::Normal, + "%s::sensorInterp() packet = %s num = %d mapped = %d range = %d",getNameWithBoard(), obuf, sonarNum, mappedSonarNum, sonarRangeConverted); +} +#endif + + mySonarMap[sonarNum][SONAR_LAST_READING] = sonarRangeConverted; + + //char charSonarNum = (char)sonarNum; + //sprintf(charSonarNum, "%d", sonarNum); + myRobot->processNewSonar (mappedSonarNum, sonarRangeConverted, time); + + myDeviceMutex.unlock(); + + delete packet; + + } // end while +} + +AREXPORT bool ArSonarMTX::blockingConnect (bool sendTracking, bool recvTracking ) +{ + + mySendTracking = sendTracking; + myRecvTracking = recvTracking; + + myDeviceMutex.lock(); + + if (myConn == NULL) { + ArLog::log (ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getNameWithBoard()); + myDeviceMutex.unlock(); + failedToConnect(); + return false; + } + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (myConn); + + if (serConn != NULL) + serConn->setBaud (115200); + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log ( + ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getNameWithBoard()); + myDeviceMutex.unlock(); + failedToConnect(); + return false; + } + + // PS - set logging level and laser type in packet receiver class + + myReceiver = new ArRobotPacketReceiver(myConn, true, HEADER1, HEADER2, + myRecvTracking, + "ArSonarMTX"); + + mySender = new ArRobotPacketSender(myConn, HEADER1, HEADER2, + mySendTracking, + "ArSonarMTX"); + + //myReceiver->setMyInfoLogLevel (myInfoLogLevel); + //myReceiver->setMyName (getNameWithBoard()); + /// MPL added these lines to help someone debug sonar ESD stuff + //myReceiver->setTracking(true); + //myReceiver->setTrackingLogName(getName()); + + +// myReceiver->setDeviceConnection (myConn); + myDeviceMutex.unlock(); + + myDeviceMutex.lock(); + myTryingToConnect = true; + myDeviceMutex.unlock(); + + + ArTime timeDone; + + if (!timeDone.addMSec (30 * 1000)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() error adding msecs (30 * 1000)", + getNameWithBoard()); + } + + //ArSonarMTXPacket *packet; + ArRobotPacket *packet; + + if (!sendAlive()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send Alive to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + + do { + //ArLog::log(ArLog::Normal, + // "%s::blockingConnect() calling receive packet", getNameWithBoard()); + + packet = myReceiver->receivePacket (1000); + + if (packet != NULL) { + // verify alive received + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Response to Alive received from Sonar", getNameWithBoard()); + //unsigned char command = packet->bufToUByte(); + if (packet->getID() == ALIVE) { + delete packet; + packet = NULL; + myDeviceMutex.lock(); + myIsConnected = true; + myTryingToConnect = false; + myDeviceMutex.unlock(); + ArLog::log (ArLog::Normal, "%s::blockingConnect() Alive message received from sonar", getNameWithBoard()); + + ArUtil::sleep(100); + + // send a stop + if (!sendStop()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send stop to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + + ArUtil::sleep(100); + + if (!queryFirmwareVersion()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not get firmware version", getNameWithBoard()); + failedToConnect(); + return false; + } + + ArUtil::sleep(100); + + if (!validateTransducers()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate transducers", getNameWithBoard()); + failedToConnect(); + return false; + } + + ArUtil::sleep(100); + +//#if 0 // temp for adam + + if (!validateDelay()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate delay", getNameWithBoard()); + failedToConnect(); + return false; + } +//#endif // tem for adam + ArUtil::sleep(100); + + if (!validateGain()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate gain", getNameWithBoard()); + failedToConnect(); + return false; + } + + ArUtil::sleep(100); + +#if 0 + if (!validateNumThresholdRanges()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate num threshold ranges", getNameWithBoard()); + failedToConnect(); + return false; + } +#endif + + if (!validateThresholds()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate thresholds", getNameWithBoard()); + failedToConnect(); + return false; + } + +/* this is no longer supported - + + ArUtil::sleep(100); + + if (!validateNoiseDelta()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate noise delta", getNameWithBoard()); + failedToConnect(); + return false; + } +*/ + ArUtil::sleep(100); + +//#if 0 // temp for adam + + if (!validateMaxRange()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not validate max range", getNameWithBoard()); + failedToConnect(); + return false; + } + +//#endif // end temp for adam +#if 0 + unsigned char bitMask[8] = {0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff}; + unsigned char lsb, msb; + + if (myNumTransducers < 9) { + lsb = bitMask[myNumTransducers - 1]; + msb = 0; + } + else { + lsb = 0xff; + msb = bitMask[myNumTransducers - 8]; + } + + ArUtil::sleep(100); +#endif + + + if (!sendSetMask (myTransducerMaskLSB, myTransducerMaskMSB)) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send set mask to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + + ArUtil::sleep(100); + + + if (!sendGetMask()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send getmask to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Receive of transducer mask failed", getNameWithBoard()); + failedToConnect(); + return false; + } + + unsigned char *maskBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if ( maskBuf[3] != GET_TRANSDUCER_MASK) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Receive invalid response to get transducer mask", getNameWithBoard()); + failedToConnect(); + return false; + + } + + + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Transducer mask LSB (0x%02x) MSB (0x%02x)", + getNameWithBoard(), maskBuf[5], maskBuf[4]); + + + myTransducersAreOn = true; + + // send start + if (!sendStart()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send start scan to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + +#if 0 + int j = 3; + int t; + + for (t = 0; t < j; t++) { + packet = myReceiver->receivePacket (1000); + + + if (packet != NULL) { + int i; + unsigned char *buf1 = (unsigned char *) packet->getBuf(); + + for (i = 0; i < packet->getDataLength() - 2; i++) { + printf ("_0x%x",buf1[i]); + } + + printf ("\n\n"); + //ArLog::log(ArLog::Normal, + // "%s::blockingConnect() packet received - command = %d length = %d", getNameWithBoard(), packet->getCommand(), packet->getDataLength() ); + delete packet; + packet = NULL; + + } else { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() No packet received", getNameWithBoard()); + } + } + +#endif + //sendStop(); + //packet = myReceiver->receivePacket (1000); + + // connect worked - return success + + myIsConnected = true; + myTryingToConnect = false; + + ArLog::log (ArLog::Normal, "%s::blockingConnect() Connection successful", + getNameWithBoard()); + + myLastReading.setToNow(); + + runAsync(); + + return true; + + } else { + ArLog::log (ArLog::Normal, "%s::blockingConnect() Wrong command recieved from Alive request = 0x%x - resending", + getNameWithBoard(), packet->getID()); + delete packet; + packet = NULL; + + if (!sendAlive()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send Alive to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + } + + } else { + ArLog::log (ArLog::Normal, "%s::blockingConnect() Did not get response to Alive request (%d) - resending", + getNameWithBoard(), timeDone.mSecTo()); + + + if (!sendAlive()) { + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Could not send Alive to Sonar", getNameWithBoard()); + failedToConnect(); + return false; + } + } + } while (timeDone.mSecTo() >= 0); + + ArLog::log (ArLog::Normal, + "%s::blockingConnect() Connection to sonar failed", + getNameWithBoard()); + failedToConnect(); + return false; + +} + + + +AREXPORT bool ArSonarMTX::fakeConnect () +{ + + if (myConn == NULL) { + ArLog::log (ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getNameWithBoard()); + failedToConnect(); + return false; + } + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast (myConn); + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN + && !myConn->openSimple()) { + ArLog::log ( + ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getNameWithBoard()); + failedToConnect(); + return false; + } + + + myReceiver = new ArRobotPacketReceiver(myConn, true, HEADER1, HEADER2, + myRecvTracking, + "ArSonarMTX"); + + mySender = new ArRobotPacketSender(myConn, HEADER1, HEADER2, + mySendTracking, + "ArSonarMTX"); + + + myNumTransducers = 8; + + myIsConnected = true; + myTryingToConnect = false; + + ArLog::log (ArLog::Normal, "%s::fakeConnect() Connection successful", + getNameWithBoard()); + + myLastReading.setToNow(); + + runAsync(); + + return true; + +} + +AREXPORT const char * ArSonarMTX::getName (void) const +{ + return myName.c_str(); +} + +AREXPORT const char * ArSonarMTX::getNameWithBoard (void) const +{ + return myNameWithBoard; +} + +AREXPORT void * ArSonarMTX::runThread (void *arg) +{ + //char buf[1024]; + + //ArSonarMTXPacket *packet; + ArRobotPacket *packet; + + ArLog::log (ArLog::Terse, + "%s::runThread()", getNameWithBoard()); + +while (getRunning() ) +{ + + + while (getRunning() && myIsConnected && + ((packet = myReceiver->receivePacket (500)) != NULL)) { + myPacketsMutex.lock(); + myPackets.push_back (packet); + myPacketsMutex.unlock(); + if (myRobot == NULL) + sensorInterp(); + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (getRunning() && myIsConnected && checkLostConnection()) { + + // only disconnect if transducers are on - if they are off we'll get no packets + if (myTransducersAreOn) { + + ArLog::log (ArLog::Terse, + "%s::runThread() Lost connection to the MTX sonar because of error. Nothing received for %g seconds (greater than the timeout of %g).", getNameWithBoard(), + myLastReading.mSecSince() / 1000.0, + getConnectionTimeoutSeconds() ); + myIsConnected = false; + disconnectOnError(); + continue; + } + } + +} + + ArLog::log (ArLog::Terse, + "%s::runThread() getRunning is false", getNameWithBoard()); + + return NULL; +} + +/** + This will check if the sonar has lost connection. If there is no + robot it is a straightforward check of last reading time against + getConnectionTimeoutSeconds. If there is a robot then it will not + start the check until the sonar is running and connected. +**/ +AREXPORT bool ArSonarMTX::checkLostConnection(void) +{ + + if ((myRobot == NULL || myRobotRunningAndConnected) && + getConnectionTimeoutSeconds() > 0 && + myLastReading.mSecSince() > getConnectionTimeoutSeconds() * 1000) + return true; + + if (!myRobotRunningAndConnected && myRobot != NULL && + myRobot->isRunning() && myRobot->isConnected()) + { + myRobotRunningAndConnected = true; + myLastReading.setToNow(); + } + + return false; +} + +AREXPORT void ArSonarMTX::disconnectOnError(void) +{ + ArLog::log(ArLog::Normal, "%s: Disconnected because of error", getNameWithBoard()); + myDisconnectOnErrorCBList.invoke(); +} + +AREXPORT bool ArSonarMTX::sendAlive() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID(ALIVE); + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendAlive() sending alive sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendAlive() Could not send alive request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendAlive() alive sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + + + +AREXPORT bool ArSonarMTX::sendReset() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (RESET); // reset message + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendReset() Could not send reset request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendReset() sending reset to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendReset() reset sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendStart() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (START_SCAN); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendStart() Could not send start request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendStart() start sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + + +AREXPORT bool ArSonarMTX::sendStop() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (STOP_SCAN); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendStop() Could not send stop request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendStop() stop sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArSonarMTX::sendGetTransducerCount() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_NUM_TRANDUCERS); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetTransducerCount() Could not send get trasnsducer count request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetTransducerCount() get number of transducers sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + return true; +} + +AREXPORT bool ArSonarMTX::sendGetGain (unsigned char transducerNumber) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_GAIN); + sendPacket.uByteToBuf (transducerNumber); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetGain() Could not send get gain request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetGain() get gain sent to Sonar 0x%x", + getNameWithBoard(), transducerNumber); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendGetMaxRange (unsigned char transducerNumber) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_ECHO_SAMPLE_SIZE); + sendPacket.uByteToBuf (transducerNumber); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetMaxRange() Could not send get max range (echosamplesize) to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetMaxRange() get maxrange (echosamplesize) sent to Sonar 0x%x", + getNameWithBoard(), transducerNumber); + + ); // end IFDEBUG + + + return true; +} + + +AREXPORT bool ArSonarMTX::sendGetDelay() +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_SONAR_DELAY); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetDelay() Could not send get delay request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetDelay() get delay sent to Sonar", + getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendSetGain (unsigned char transducerNumber, + unsigned char gain) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_GAIN); + sendPacket.uByteToBuf (transducerNumber); + sendPacket.uByteToBuf (gain); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetGain() Could not send set gain request to Sonar", getNameWithBoard()); + return false; + } + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSetGain() set gain sent to Sonar 0x%x 0x%x", + getNameWithBoard(), transducerNumber, gain); + + ); // end IFDEBUG + return true; +} + + + +AREXPORT bool ArSonarMTX::requestFirmwareVersion () +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (GET_VERSION); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::requestFirmwareVersion() Could not send get version request to Sonar", getNameWithBoard()); + return false; + } + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::requestFirmwareVersion() set get version to sonar", + getNameWithBoard()); + + ); // end IFDEBUG + return true; +} + + +AREXPORT bool ArSonarMTX::sendSetMaxRange (unsigned char transducerNumber, + int echoSampleSize) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_ECHO_SAMPLE_SIZE); + sendPacket.uByteToBuf (transducerNumber); + + sendPacket.uByteToBuf (echoSampleSize & 0xff); + sendPacket.uByteToBuf (echoSampleSize >> 8); + + if (!mySender->sendPacket(&sendPacket)) { + + ArLog::log (ArLog::Terse, + "%s::sendSetMaxRange() Could not send set MaxRange (echosamplesize) to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSetMaxRange() set MaxRange (echosamplesize) sent to Sonar 0x%x 0x%x", + getNameWithBoard(), transducerNumber, echoSampleSize); + + ); // end IFDEBUG + + return true; +} + + +AREXPORT bool ArSonarMTX::sendSetDelay (unsigned char delay) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_SONAR_DELAY); // set delay + sendPacket.uByteToBuf (delay); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendASetDelay() Could not send set delay request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSetDelay() set delay sent to Sonar 0x%x", + getNameWithBoard(), delay); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendSetMask (unsigned char maskLsb, unsigned char maskMsb) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + sendPacket.setID (SET_TRANSDUCER_MASK); // set mask + sendPacket.uByteToBuf (maskLsb); + sendPacket.uByteToBuf (maskMsb); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetMask() Could not send set mask request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSetMask() set mask sent to Sonar", getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::validateTransducers() +{ + + ArRobotPacket *packet; + + // send get transducer count + bool gotTransducerCount = false; + unsigned char *transBuf; + + for (int i = 0; i < 10; i++) { + if (!sendGetTransducerCount()) { + ArLog::log (ArLog::Normal, + "%s::validateTransducers() Could not send gettransducercount to Sonar", getNameWithBoard()); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateTransducers() No response to get transducer count", getNameWithBoard()); + continue; + } + + transBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if ( (transBuf[3] != GET_NUM_TRANDUCERS) || (transBuf[4] == 0)) { + ArLog::log (ArLog::Normal, + "%s::validateTransducers() Invalid response from sonar to gettransducercount (0x%x 0x%x)", + getNameWithBoard(), transBuf[3], transBuf[4]); + continue; + + } else { + gotTransducerCount = true; + break; + } + } // endfor + + if (!gotTransducerCount) { + ArLog::log (ArLog::Normal, + "%s::validateTransducers() Cannot get transducer count - exiting", + getNameWithBoard()); + return false; + } + + gotTransducerCount = false; + myNumTransducers = transBuf[4]; + ArLog::log (ArLog::Normal, + "%s::validateTransducers() Sonar has %d transducers", getNameWithBoard(), myNumTransducers); + + if (myNumTransducers < myNumConfiguredTransducers) { + ArLog::log (ArLog::Normal, + "%s::validateTransducers() there are more transducers configured %d then there are on the board %d", + getNameWithBoard(), myNumConfiguredTransducers, myNumTransducers); + return false; + } + + delete packet; + return true; +} + + +AREXPORT bool ArSonarMTX::validateGain() +{ + ArRobotPacket *packet; + // send get gain + bool gotGain = false; + unsigned char *gainBuf; + + for (int j = 0; j < myNumTransducers; j++) { + + // ignore any transducers that are not configured + if (mySonarMap[j][SONAR_IS_CONFIGURED] == false) + continue; + + for (int i = 0; i < 10; i++) { + if (!sendGetGain (j)) { + ArLog::log (ArLog::Normal, + "%s::validateGain() Could not send get gain to Sonar", getNameWithBoard()); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateGain() No response to get gain - resending", getNameWithBoard()); + continue; + } + + gainBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if ( (gainBuf[3] != GET_GAIN) || (gainBuf[4] != j)) { + ArLog::log (ArLog::Normal, + "%s::validateGain() Invalid response from Sonar_%d to get gain (0x%x 0x%x)", + getNameWithBoard(), j+1, gainBuf[3], gainBuf[4]); + continue; + + } else { + gotGain = true; + break; + } + } // endfor + + if (!gotGain) { + ArLog::log (ArLog::Normal, + "%s::validateGain() Cannot get gain for Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + + gotGain = false; + + unsigned char gain = gainBuf[5]; + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateGain() Sonar_%d has gain of %d", getNameWithBoard(), j+1, gain)); + + if (mySonarMap[j][SONAR_GAIN] != gain) { + ArLog::log (ArLog::Normal, + "%s::validateGain() Sonar_%d gain %d does not match configured gain %d, setting new gain", + getNameWithBoard(), j+1, gain, mySonarMap[j][SONAR_GAIN]); + + if (!sendSetGain (j, mySonarMap[j][SONAR_GAIN])) { + ArLog::log (ArLog::Normal, + "%s::validateGain() Could not send set gain to Sonar_%d", getNameWithBoard(), j+1); + return false; + } + } + + delete packet; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateGain() Gain valid", getNameWithBoard())); + return true; +} + +AREXPORT bool ArSonarMTX::validateDelay() +{ + ArRobotPacket *packet; + // send get delay + bool gotDelay = false; + unsigned char *delayBuf; + + for (int i = 0; i < 10; i++) { + if (!sendGetDelay ()) { + ArLog::log (ArLog::Normal, + "%s::validateDelay() Could not send get delay to Sonar", getNameWithBoard()); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateDelay() No response to get delay - resending (%d)", + getNameWithBoard(), i); + continue; + } + + delayBuf = (unsigned char *) packet->getBuf(); + + // verify get num trans received + if ( (delayBuf[3] != GET_SONAR_DELAY) || (delayBuf[4] == 0)) { + ArLog::log (ArLog::Normal, + "%s::validateDelay() Invalid response from sonar to get delay (0x%x 0x%x)", + getNameWithBoard(), delayBuf[3], delayBuf[4]); + continue; + + } else { + gotDelay = true; + break; + } + } // endfor + + if (!gotDelay) { + ArLog::log (ArLog::Normal, + "%s::validateDelay() Cannot get delay - exiting", + getNameWithBoard()); + return false; + } + + gotDelay = false; + + unsigned char delay = delayBuf[4]; + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateDelay() Sonar has delay of %d", getNameWithBoard(), delay)); + + if (myBoardDelay != delay) { + ArLog::log (ArLog::Normal, + "%s::validateDelay() delay %d does not match configured delay %d, setting new delay", + getNameWithBoard(), delay, myBoardDelay); + + if (!sendSetDelay (myBoardDelay)) { + ArLog::log (ArLog::Normal, + "%s::validateDelay() Could not send set delay to Sonar", getNameWithBoard()); + return false; + } + } + + delete packet; + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateDelay() Delay valid", getNameWithBoard())); + return true; +} + +AREXPORT bool ArSonarMTX::validateNumThresholdRanges() +{ + ArRobotPacket *packet; + bool gotNumThres = false; + unsigned char *numBuf; + + for (int i = 0; i < 10; i++) { + if (!sendGetNumThresholdRanges ()) { + ArLog::log (ArLog::Normal, + "%s::validateNumThresholdRanges() Could not send get num threshold ranges to Sonar", getNameWithBoard()); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateNumThresholdRanges() No response to get num threshold ranges - resending (%d)", + getNameWithBoard(), i); + continue; + } + + numBuf = (unsigned char *) packet->getBuf(); + gotNumThres = true; + break; + } + + if (!gotNumThres) { + ArLog::log (ArLog::Normal, + "%s::validateNumThresholdRanges() Cannot get num threshold ranges - exiting", + getNameWithBoard()); + return false; + } + + unsigned char numThres = numBuf[4]; + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateNumThresholdRanges() Sonar has num of threshold ranges of %d", getNameWithBoard(), numThres)); + + delete packet; + return true; +} + + +AREXPORT bool ArSonarMTX::queryFirmwareVersion() +{ + ArRobotPacket *packet; + // send get delay + bool gotVersion = false; + unsigned char *versionBuf; + + for (int i = 0; i < 10; i++) { + if (!requestFirmwareVersion ()) { + ArLog::log (ArLog::Normal, + "%s::queryFirmwareVersion() Could not send get version to Sonar", getNameWithBoard()); + return false; + } + + for (int z = 0; z < 10; z++) { + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::queryFirmwareVersion() No response to get version - resending (%d)", + getNameWithBoard(), i); + continue; + } + + versionBuf = (unsigned char *) packet->getBuf(); + + if ( (versionBuf[3] != GET_VERSION) || (versionBuf[4] == 0)) { + ArLog::log (ArLog::Normal, + "%s::queryFirmwareVersion() Invalid response from sonar to get version (0x%x 0x%x)", + getNameWithBoard(), versionBuf[3], versionBuf[4]); + continue; + + } else { + gotVersion = true; + break; + } + } + if (gotVersion) + break; + } // endfor + + if (!gotVersion) { + ArLog::log (ArLog::Normal, + "%s::queryFirmwareVersion() Cannot get version - exiting", + getNameWithBoard()); + return false; + } + + myFirmwareVersion = versionBuf[4]; + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::queryFirmwareVersion() Sonar has firmware version of %d", getNameWithBoard(), myFirmwareVersion)); + + delete packet; + return true; +} + + + +AREXPORT bool ArSonarMTX::validateMaxRange() +{ + ArRobotPacket *packet; + + // send get echosamplesize + bool gotEchoSampleSize = false; + unsigned char *echosamplesizeBuf; + + for (int j = 0; j < myNumTransducers; j++) { + + // ignore any transducers that are not configured + if (mySonarMap[j][SONAR_IS_CONFIGURED] == false) + continue; + + for (int i = 0; i < 10; i++) { + if (!sendGetMaxRange (j)) { + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() Could not send get maxrange echosamplesize to Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() No response to get maxrange - echosamplesize - resending", getNameWithBoard()); + continue; + } + + echosamplesizeBuf = (unsigned char *) packet->getBuf(); + + // verify get num max range received + if ( (echosamplesizeBuf[3] != GET_ECHO_SAMPLE_SIZE) || (echosamplesizeBuf[4] != j)) { + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() Invalid response from Sonar_%d to get maxange echosamplesize (0x%x 0x%x)", + getNameWithBoard(), j+1, echosamplesizeBuf[3], echosamplesizeBuf[4]); + delete packet; + continue; + + } else { + gotEchoSampleSize = true; + break; + } + + delete packet; + + } // endfor + + if (!gotEchoSampleSize) { + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() Cannot get maxrange echosamplesize from Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + gotEchoSampleSize = false; + //unsigned char echosamplesize = echosamplesizeBuf[4]; + + int echoSampleSize = (echosamplesizeBuf[6] << 8) | (echosamplesizeBuf[5]); + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() Sonar_%d has maxrange echosamplesize of %d", getNameWithBoard(), j+1, echoSampleSize)); + + if (mySonarMap[j][SONAR_MAX_RANGE] != echoSampleSize) { + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() Sonar_%d maxrange echosamplesize %d does not match configured maxrange echosamplesize %d, setting new maxrange echosamplesize", + getNameWithBoard(), j+1, echoSampleSize, mySonarMap[j][SONAR_MAX_RANGE]); + + if (!sendSetMaxRange (j, mySonarMap[j][SONAR_MAX_RANGE])) { + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() Could not send set maxrange echosamplesize to Sonar_%d", getNameWithBoard(), j+1); + return false; + } + } + + delete packet; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateMaxRange() EchoSampleSize valid", getNameWithBoard())); + return true; +} + + +AREXPORT bool ArSonarMTX::validateThresholds() +{ + ArRobotPacket *packet; + + // send get threshold + bool gotThresholds = false; + unsigned char *thresholdBuf; + + for (int j = 0; j < myNumTransducers; j++) { +// for (int j = 1; j < 2; j++) { + + // ignore any transducers that are not configured + if (mySonarMap[j][SONAR_IS_CONFIGURED] == false) + continue; + + for (int i = 0; i < 10; i++) { + if (!sendGetThresholds (j)) { + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Could not send get threshold to Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateThresholds() No response to get threshold - resending", getNameWithBoard()); + continue; + } + + thresholdBuf = (unsigned char *) packet->getBuf(); + + // verify get + if ( (thresholdBuf[3] != GET_THRESHOLDS) || (thresholdBuf[4] != j)) { + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Invalid response from Sonar_%d to get threshold (0x%x 0x%x)", + getNameWithBoard(), j+1, thresholdBuf[3], thresholdBuf[4]); + delete packet; + continue; + + } else { + gotThresholds = true; + break; + } + } // endfor + + if (!gotThresholds) { + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Cannot get threshold from Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + + gotThresholds = false; + + int thres = (thresholdBuf[6] << 8) | (thresholdBuf[5]); + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Sonar_%d has threshold of %d", getNameWithBoard(), j+1, thres)); + + if (mySonarMap[j][SONAR_DETECTION_THRES] != thres) { + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Sonar_%d has detection threshold %d, it does not match configured threshold %d, setting new threshold", + getNameWithBoard(), j+1, thres, + mySonarMap[j][SONAR_DETECTION_THRES]); + + if (!sendSetThresholds (j, mySonarMap[j][SONAR_DETECTION_THRES])) { + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Could not send set threshold to Sonar_%d", getNameWithBoard(), j+1); + return false; + } + } + delete packet; + + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateThresholds() Thresholds valid", getNameWithBoard())); + return true; +} + +AREXPORT bool ArSonarMTX::sendGetThresholds (unsigned char transducerNumber) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (GET_THRESHOLDS); // get thresholds + sendPacket.uByteToBuf (transducerNumber); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetThresholds() Could not send get thresholds request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetThresholds() get thresholds sent to Sonar 0x%x", + getNameWithBoard(), transducerNumber); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendGetMask () +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (GET_TRANSDUCER_MASK); // get transducer mask + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetMask() Could not send get transducer mask request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetMask() get transducer mask sent to Sonar", + getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendGetNumThresholdRanges () +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (NUM_THRESHOLD_RANGES); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendGetNumThresholdRanges() Could not send get number threshold ranges request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetNumThresholdRanges() get number threshold ranges sent to Sonar", + getNameWithBoard()); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendSetThresholds (unsigned char transducerNumber, + int thres) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (SET_THRESHOLDS); // set thresholds + sendPacket.uByteToBuf (transducerNumber); + sendPacket.uByteToBuf (thres & 0xff); + sendPacket.uByteToBuf (thres >> 8); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetThresholds() Could not send set thresholds request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSetThresholds() set thresholds sent to Sonar 0x%x 0x%x", + getNameWithBoard(), transducerNumber, thres); + + ); // end IFDEBUG + + return true; +} +/* +AREXPORT bool ArSonarMTX::validateNoiseDelta() +{ + ArRobotPacket *packet; + + // send get noiseDelta + bool gotNoiseDelta = false; + unsigned char *noiseDeltaBuf; + + for (int j = 0; j < myNumTransducers; j++) { + + // ignore any transducers that are not configured + if (mySonarMap[j][SONAR_IS_CONFIGURED] == false) + continue; + + for (int i = 0; i < 10; i++) { + if (!sendGetNoiseDelta (j)) { + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() Could not send get noiseDelta to Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + + packet = myReceiver->receivePacket (1000); + + if (packet == NULL) { + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() No response to get noiseDelta - resending", getNameWithBoard()); + continue; + } + + noiseDeltaBuf = (unsigned char *) packet->getBuf(); + + // verify get + if ( (noiseDeltaBuf[3] != GET_NOISE_DELTA) || (noiseDeltaBuf[4] != j)) { + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() Invalid response from Sonar_%d to get noiseDelta (0x%x 0x%x)", + getNameWithBoard(), j+1, noiseDeltaBuf[3], noiseDeltaBuf[4]); + delete packet; + continue; + + } else { + gotNoiseDelta = true; + break; + } + } // endfor + + if (!gotNoiseDelta) { + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() Cannot get noiseDelta from Sonar_%d", + getNameWithBoard(), j+1); + return false; + } + + gotNoiseDelta = false; + int noiseDelta = (noiseDeltaBuf[6] << 8) | (noiseDeltaBuf[5]); + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() Sonar_%d has noiseDelta of %d", getNameWithBoard(), j+1, noiseDelta)); + + if (mySonarMap[j][SONAR_NOISE_DELTA] != noiseDelta) { + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() Sonar_%d has detection noiseDelta %d, it does not match configured noiseDelta %d, setting new noiseDelta", + getNameWithBoard(), j+1, noiseDelta, + mySonarMap[j][SONAR_NOISE_DELTA]); + + if (!sendSetNoiseDelta (j, mySonarMap[j][SONAR_NOISE_DELTA])) { + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() Could not send set noiseDelta to Sonar_%d", getNameWithBoard(), j+1); + return false; + } + } + + delete packet; + } + + IFDEBUG ( + ArLog::log (ArLog::Normal, + "%s::validateNoiseDelta() NoiseDelta valid", getNameWithBoard())); + return true; +} + +AREXPORT bool ArSonarMTX::sendGetNoiseDelta (unsigned char transducerNumber) +{ + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (GET_NOISE_DELTA); // get noiseDelta + sendPacket.uByteToBuf (transducerNumber); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendNoiseDelta() Could not send get noisedelta request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendGetNoiseDelta() get noisedelta sent to Sonar 0x%x", + getNameWithBoard(), transducerNumber); + + ); // end IFDEBUG + + + return true; +} + +AREXPORT bool ArSonarMTX::sendSetNoiseDelta (unsigned char transducerNumber, + int noiseDelta) +{ + + ArRobotPacket sendPacket(HEADER1, HEADER2); + + sendPacket.setID (SET_NOISE_DELTA); // set noiseDelta + sendPacket.uByteToBuf (transducerNumber); + sendPacket.uByteToBuf (noiseDelta & 0xff); + sendPacket.uByteToBuf (noiseDelta >> 8); + + if (!mySender->sendPacket(&sendPacket)) { + ArLog::log (ArLog::Terse, + "%s::sendSetNoiseDelta() Could not send set noise delta request to Sonar", getNameWithBoard()); + return false; + } + + IFDEBUG ( + + ArLog::log (ArLog::Normal, + "%s::sendSetNoiseDelta() set noise delta sent to Sonar 0x%x 0x%x", + getNameWithBoard(), transducerNumber, noiseDelta); + + ); // end IFDEBUG + + return true; +} +*/ + +AREXPORT bool ArSonarMTX::turnOnTransducers() +{ + + + if (sendSetMask(myTransducerMaskLSB, myTransducerMaskMSB)) { + ArLog::log (ArLog::Normal, + "%s::turnOnTransducers() turning ON transducers", + getNameWithBoard()); + myTransducersAreOn = true; + myLastReading.setToNow(); + return true; + + } + else { + ArLog::log (ArLog::Normal, + "%s::turnOnTransducers() failed turning ON transducers", + getNameWithBoard()); + return false; + + } + +} + +AREXPORT bool ArSonarMTX::turnOffTransducers() +{ + + if (sendSetMask(0, 0)) { + ArLog::log (ArLog::Normal, + "%s::turnOffTransducers() turning OFF transducers", + getNameWithBoard()); + myTransducersAreOn = false; + return true; + + } + else { + ArLog::log (ArLog::Normal, + "%s::turnOnTransducers() failed turning OFF transducers", + getNameWithBoard()); + return false; + + } + +} + +AREXPORT bool ArSonarMTX::disableForAutonomousDriving() +{ + + + + if (sendSetMask(myAutonomousDrivingTransducerMaskLSB, myAutonomousDrivingTransducerMaskMSB)) { + ArLog::log (ArLog::Normal, + "%s::disableForAutonomousDriving() turning OFF all non autonomous driving transducers", + getNameWithBoard()); + myTransducersAreOn = false; + return true; + + } + else { + ArLog::log (ArLog::Normal, + "%s::disableForAutonomousDriving() failed turning OFF non autonomous driving transducers", + getNameWithBoard()); + return false; + + } + + +} + diff --git a/Legacy/Aria/src/ArSonyPTZ.cpp b/Legacy/Aria/src/ArSonyPTZ.cpp new file mode 100644 index 0000000..a92173b --- /dev/null +++ b/Legacy/Aria/src/ArSonyPTZ.cpp @@ -0,0 +1,285 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSonyPTZ.h" +#include "ArRobot.h" +#include "ArCommands.h" + +AREXPORT ArSonyPacket::ArSonyPacket(ArTypes::UByte2 bufferSize) : + ArBasePacket(bufferSize) +{ + +} + +AREXPORT ArSonyPacket::~ArSonyPacket() +{ + +} + +AREXPORT void ArSonyPacket::uByteToBuf(ArTypes::UByte val) +{ + if (myLength + 1 > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArSonyPacket::uByteToBuf: Trying to add beyond length of buffer."); + return; + } + myBuf[myLength] = val; + ++myLength; +} + +AREXPORT void ArSonyPacket::byte2ToBuf(ArTypes::Byte2 val) +{ + if ((myLength + 4) > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArSonyPacket::Byte2ToBuf: Trying to add beyond length of buffer."); + return; + } + myBuf[myLength] = (val & 0xf000) >> 12; + ++myLength; + myBuf[myLength] = (val & 0x0f00) >> 8; + ++myLength; + myBuf[myLength] = (val & 0x00f0) >> 4; + ++myLength; + myBuf[myLength] = (val & 0x000f) >> 0; + ++myLength; +} + +/** + This function is my concession to not rebuilding a packet from scratch + for every command, basicaly this is to not lose all speed over just using + a character array. This is used by the default sony commands, unless + you have a deep understanding of how the packets are working and what + the packet structure looks like you should not play with this function, + it also isn't worth it unless you'll be sending commands frequently. + @param val the Byte2 to put into the packet + @param pose the position in the packets array to put the value +*/ +AREXPORT void ArSonyPacket::byte2ToBufAtPos(ArTypes::Byte2 val, + ArTypes::UByte2 pose) +{ + ArTypes::Byte2 prevLength = myLength; + + if ((pose + 4) > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArSonyPacket::Byte2ToBuf: Trying to add beyond length of buffer."); + return; + } + myLength = pose; + byte2ToBuf(val); + myLength = prevLength; +} + + +AREXPORT ArSonyPTZ::ArSonyPTZ(ArRobot *robot) : + ArPTZ(robot), + myPacket(255), + myZoomPacket(9) +{ + myRobot = robot; + initializePackets(); + + setLimits(90, -90, 30, -30, 1024, 0); + /* + AREXPORT virtual double getMaxPosPan(void) const { return 90; } + AREXPORT virtual double getMaxNegPan(void) const { return -90; } + AREXPORT virtual double getMaxPosTilt(void) const { return 30; } + AREXPORT virtual double getMaxNegTilt(void) const { return -30; } + AREXPORT virtual int getMaxZoom(void) const { return 1024; } + AREXPORT virtual int getMinZoom(void) const { return 0; } + */ + + myDegToTilt = 0x12c / ((double) getMaxTilt() /*MAX_TILT*/ ); + myDegToPan = 0x370 / ((double) getMaxPan() /*MAX_PAN*/ ); +} + +AREXPORT ArSonyPTZ::~ArSonyPTZ() +{ +} + +void ArSonyPTZ::initializePackets(void) +{ + myZoomPacket.empty(); + myZoomPacket.uByteToBuf(0x81); + myZoomPacket.uByteToBuf(0x01); + myZoomPacket.uByteToBuf(0x04); + myZoomPacket.uByteToBuf(0x47); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0x00); + myZoomPacket.uByteToBuf(0xff); + + myPanTiltPacket.empty(); + myPanTiltPacket.uByteToBuf(0x81); + myPanTiltPacket.uByteToBuf(0x01); + myPanTiltPacket.uByteToBuf(0x06); + myPanTiltPacket.uByteToBuf(0x02); + myPanTiltPacket.uByteToBuf(0x18); + myPanTiltPacket.uByteToBuf(0x14); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0x00); + myPanTiltPacket.uByteToBuf(0xff); +} + + +AREXPORT bool ArSonyPTZ::init(void) +{ + myPacket.empty(); + myPacket.uByteToBuf(0x88); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0x00); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0xff); + myPacket.uByteToBuf(0x88); + myPacket.uByteToBuf(0x30); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0xff); + + if (!sendPacket(&myPacket)) + return false; + if (!panTilt(0, 0)) + return false; + if (!zoom(0)) + return false; + return true; +} + +AREXPORT bool ArSonyPTZ::backLightingOn(void) +{ + myPacket.empty(); + myPacket.uByteToBuf(0x81); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0x04); + myPacket.uByteToBuf(0x33); + myPacket.uByteToBuf(0x02); + myPacket.uByteToBuf(0xff); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArSonyPTZ::backLightingOff(void) +{ + myPacket.empty(); + myPacket.uByteToBuf(0x81); + myPacket.uByteToBuf(0x01); + myPacket.uByteToBuf(0x04); + myPacket.uByteToBuf(0x33); + myPacket.uByteToBuf(0x03); + myPacket.uByteToBuf(0xff); + + return sendPacket(&myPacket); +} + +AREXPORT bool ArSonyPTZ::panTilt_i(double degreesPan, double degreesTilt) +{ + if (degreesPan > getMaxPan()) + degreesPan = getMaxPan(); + if (degreesPan < getMinPan()) + degreesPan = getMinPan(); + myPan = degreesPan; + + if (degreesTilt > getMaxTilt()) + degreesTilt = getMaxTilt(); + if (degreesTilt < getMinTilt()) + degreesTilt = getMinTilt(); + myTilt = degreesTilt; + + myPanTiltPacket.byte2ToBufAtPos(ArMath::roundInt(myPan * myDegToPan), 6); + myPanTiltPacket.byte2ToBufAtPos(ArMath::roundInt(myTilt * myDegToTilt), 10); + return sendPacket(&myPanTiltPacket); +} + +AREXPORT bool ArSonyPTZ::panTiltRel_i(double degreesPan, double degreesTilt) +{ + return panTilt(myPan + degreesPan, myTilt + degreesTilt); +} + +AREXPORT bool ArSonyPTZ::pan_i(double degrees) +{ + return panTilt(degrees, myTilt); +} + +AREXPORT bool ArSonyPTZ::panRel_i(double degrees) +{ + return panTiltRel(degrees, 0); +} + +AREXPORT bool ArSonyPTZ::tilt_i(double degrees) +{ + return panTilt(myPan, degrees); +} + +AREXPORT bool ArSonyPTZ::tiltRel_i(double degrees) +{ + return panTiltRel(0, degrees); +} + +AREXPORT bool ArSonyPTZ::zoom(int zoomValue) +{ + if (zoomValue > getMaxZoom()) + zoomValue = getMaxZoom(); + if (zoomValue < getMinZoom()) + zoomValue = getMinZoom(); + myZoom = zoomValue; + + myZoomPacket.byte2ToBufAtPos(ArMath::roundInt(myZoom), 4); + return sendPacket(&myZoomPacket); +} + +AREXPORT bool ArSonyPTZ::zoomRel(int zoomValue) +{ + return zoom(myZoom + zoomValue); +} + + +/* +AREXPORT bool ArSonyPTZ::packetHandler(ArRobotPacket *packet) +{ + if (packet->getID() != 0xE0) + return false; + + return true; +} +*/ + +ArPTZConnector::GlobalPTZCreateFunc ArSonyPTZ::ourCreateFunc(&ArSonyPTZ::create); + +ArPTZ* ArSonyPTZ::create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot) +{ + return new ArSonyPTZ(robot); +} + +void ArSonyPTZ::registerPTZType() +{ + ArPTZConnector::registerPTZType("sony", &ourCreateFunc); +} diff --git a/Legacy/Aria/src/ArSoundPlayer.cpp b/Legacy/Aria/src/ArSoundPlayer.cpp new file mode 100644 index 0000000..5aeee36 --- /dev/null +++ b/Legacy/Aria/src/ArSoundPlayer.cpp @@ -0,0 +1,311 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ArSoundPlayer.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include +#include + +int ArSoundPlayer::ourPlayChildPID = -1; +ArGlobalRetFunctor2 ArSoundPlayer::ourPlayWavFileCB(&ArSoundPlayer::playWavFile); +ArGlobalFunctor ArSoundPlayer::ourStopPlayingCB(&ArSoundPlayer::stopPlaying); +double ArSoundPlayer::ourVolume = 1.0; + +AREXPORT ArRetFunctor2* ArSoundPlayer::getPlayWavFileCallback() +{ + return &ourPlayWavFileCB; +} + + +AREXPORT ArFunctor* ArSoundPlayer::getStopPlayingCallback() +{ + return &ourStopPlayingCB; +} + + +#ifdef WIN32 + + /* Windows: */ + +#include + +AREXPORT bool ArSoundPlayer::playWavFile(const char* filename, const char* params) +{ + return (PlaySound(filename, NULL, SND_FILENAME) == TRUE); +} + +AREXPORT bool ArSoundPlayer::playNativeFile(const char* filename, const char* params) +{ + /* WAV is the Windows native format */ + return playWavFile(filename, 0); +} + +AREXPORT void ArSoundPlayer::stopPlaying() +{ + PlaySound(NULL, NULL, NULL); +} + + +AREXPORT bool ArSoundPlayer::playSoundPCM16(char* data, int numSamples) +{ + ArLog::log(ArLog::Terse, "INTERNAL ERROR: ArSoundPlayer::playSoundPCM16() is not implemented for Windows yet! Bug reed@activmedia.com about it!"); + assert(false); + + return false; +} + +#else + + /* Linux: */ + +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include + + + +bool ArSoundPlayer::playNativeFile(const char* filename, const char* params) +{ + int snd_fd = ArUtil::open("/dev/dsp", O_WRONLY); // | O_NONBLOCK); + if(snd_fd < 0) { + return false; + } + int file_fd = ArUtil::open(filename, O_RDONLY); + if(file_fd < 0) + { + ArLog::logErrorFromOS(ArLog::Normal, + "ArSoundPlayer::playNativeFile: open failed"); + return false; + } + int len; + const int buflen = 512; + char buf[buflen]; + while((len = read(file_fd, buf, buflen)) > 0) + { + if (write(snd_fd, buf, len) != len) { + ArLog::logErrorFromOS(ArLog::Normal, + "ArSoundPlayer::playNativeFile: write failed"); + } + } + close(file_fd); + close(snd_fd); + return true; +} + +bool ArSoundPlayer::playWavFile(const char* filename, const char* params) +{ + ArArgumentBuilder builder; + //builder.addPlain("sleep .35; play"); + builder.addPlain("play"); + builder.add("-v %.2f", ourVolume); + builder.addPlain(filename); + builder.addPlain(params); + ArLog::log(ArLog::Normal, "ArSoundPlayer: Playing file \"%s\" with \"%s\"", + filename, builder.getFullString()); + + int ret; + if ((ret = system(builder.getFullString())) != -1) + { + ArLog::log(ArLog::Normal, "ArSoundPlayer: Played file \"%s\" with \"%s\" (got %d)", + filename, builder.getFullString(), ret); + return true; + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, + "ArSoundPlayer::playWaveFile: system call failed"); + return false; + } + + + /* + This was an old mechanism for doing a fork then exec in order to + mimic a system call, so that it could have the child PID for + killing... however in our embedded linux killing the play command + doesn't also kill the sox command, so the kill doesn't work at + all... and the fork() would also reserve a lot of memory for the new process + ... + so it was replaced with the above system call + + const char* prog = NULL; + prog = getenv("PLAY_WAV"); + if(prog == NULL) + prog = "play"; + char volstr[4]; + if(strcmp(prog, "play") == 0) + { + snprintf(volstr, 4, "%f", ourVolume); + } + + ArLog::log(ArLog::Normal, "ArSoundPlayer: Playing file \"%s\" using playback program \"%s\" with argument: -v %s", filename, prog, volstr); + ourPlayChildPID = fork(); + + //ourPlayChildPID = vfork(); // XXX rh experimental, avoids the memory copy cost of fork() + // NOTE: after vfork() you can ONLY safely use an exec function or _exit() in the + // child process. Any other call, if it modifies memory still shared by the + // parent, will result in problems. + if(ourPlayChildPID == -1) + { + ArLog::log(ArLog::Terse, "ArSoundPlayer: error forking! (%d: %s)", errno, + (errno == EAGAIN) ? "EAGAIN reached process limit, or insufficient memory to copy page tables" : + ( (errno == ENOMEM) ? "ENOMEM out of kernel memory" : "unknown error" ) ); + + ArLog::logErrorFromOS(ArLog::Normal, + "ArSoundPlayer::playWaveFile: fork failed"); + return false; + } + if(ourPlayChildPID == 0) + { + // child process: execute sox + int r = -1; + r = execlp(prog, prog, "-v", volstr, filename, (char*)0); + if(r < 0) + { + int err = errno; + const char *errstr = strerror(err); + printf("ArSoundPlayer (child process): Error executing Wav file playback program \"%s %s\" (%d: %s)\n", prog, filename, err, errstr); + //_exit(-1); // need to use _exit with vfork + exit(-1); + } + } + // parent process: wait for child to finish + ArLog::log(ArLog::Verbose, "ArSoundPlayer: created child process %d to play wav file \"%s\".", + ourPlayChildPID, filename); + int status; + waitpid(ourPlayChildPID, &status, 0); + if(WEXITSTATUS(status) != 0) { + ArLog::log(ArLog::Terse, "ArSoundPlayer: Error: Wav file playback program \"%s\" with file \"%s\" exited with error code %d.", prog, filename, WEXITSTATUS(status)); + ourPlayChildPID = -1; + return false; + } + ArLog::log(ArLog::Verbose, "ArSoundPlayer: child process %d finished.", ourPlayChildPID); + ourPlayChildPID = -1; + return true; + */ +} + + + +void ArSoundPlayer::stopPlaying() +{ + + ArLog::log(ArLog::Normal, + "ArSoundPlayer::stopPlaying: killing play and sox"); + + // so if the system call below is "killall -9 play; killall -9 sox" + // then on linux 2.4 kernels a sound played immediately afterwards + // will simply not play and return (cause that's what play does if + // it can't play) + int ret; + + if ((ret = system("killall play; killall -9 sox")) != -1) + { + ArLog::log(ArLog::Normal, + "ArSoundPlayer::stopPlaying: killed play and sox (got %d)", + ret); + return; + } + else + { + ArLog::logErrorFromOS(ArLog::Normal, + "ArSoundPlayer::stopPlaying: system call failed"); + return; + } + + + /* This was for old mechanism in playWavFile but since it doesn't + * work, it was replaced with the above + + // Kill a child processes (created by playWavFile) if it exists. + if(ourPlayChildPID > 0) + { + ArLog::log(ArLog::Verbose, "ArSoundPlayer: Sending SIGTERM to child process %d.", ourPlayChildPID); + kill(ourPlayChildPID, SIGTERM); + } + */ +} + + +bool ArSoundPlayer::playSoundPCM16(char* data, int numSamples) +{ + //ArLog::log(ArLog::Normal, "ArSoundPlayer::playSoundPCM16[linux]: opening sound device."); + int fd = ArUtil::open("/dev/dsp", O_WRONLY); // | O_NONBLOCK); + if(fd < 0) + return false; + int arg = AFMT_S16_LE; + if(ioctl(fd, SNDCTL_DSP_SETFMT, &arg) != 0) + { + close(fd); + return false; + } + arg = 0; + if(ioctl(fd, SNDCTL_DSP_STEREO, &arg) != 0) + { + close(fd); + return false; + } + arg = 16000; + if(ioctl(fd, SNDCTL_DSP_SPEED, &arg) != 0) + { + close(fd); + return false; + } + //ArLog::log(ArLog::Normal, "ArSoundPlayer::playSoundPCM16[linux]: writing %d bytes to sound device.", 2*numSamples); + int r; + if((r = write(fd, data, 2*numSamples) < 0)) + { + close(fd); + return false; + } + close(fd); + ArLog::log(ArLog::Verbose, "ArSoundPlayer::playSoundPCM16[linux]: finished playing sound. (wrote %d bytes of 16-bit monaural signed sound data to /dev/dsp)", r); + return true; +} + + + +#endif // ifdef WIN32 + +AREXPORT void ArSoundPlayer::setVolumePercent(double pct) +{ + setVolume(1.0 + (pct / 100.0)); +} + +AREXPORT void ArSoundPlayer::setVolume(double v) +{ + if(v < 0) ourVolume = 0; + else ourVolume = v; +} + diff --git a/Legacy/Aria/src/ArSoundsQueue.cpp b/Legacy/Aria/src/ArSoundsQueue.cpp new file mode 100644 index 0000000..1f8edb6 --- /dev/null +++ b/Legacy/Aria/src/ArSoundsQueue.cpp @@ -0,0 +1,759 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include "ArSoundsQueue.h" +#include "ArSoundPlayer.h" +#include + + +// For debugging: +//#define ARSOUNDSQUEUE_DEBUG 1 + + +#ifdef ARSOUNDSQUEUE_DEBUG +#ifndef __PRETTY_FUNCTION__ +#define __PRETTY_FUNCTION__ __FUNCTION__ +#endif +#define debuglog(msg) ArLog::log(ArLog::Verbose, "%s: %s", __PRETTY_FUNCTION__, (msg)); +#else +#define debuglog(msg) {} +#endif + + +using namespace std; + + +AREXPORT ArSoundsQueue::Item::Item() : + data(""), type(OTHER), params(""), priority(0) +{ +} + +AREXPORT ArSoundsQueue::Item::Item(std::string _data, ItemType _type, std::string _params, int _priority, std::list _callbacks) : + data(_data), type(_type), params(_params), priority(_priority), playCallbacks(_callbacks) +{ +} + +AREXPORT ArSoundsQueue::Item::Item(std::string _data, ItemType _type, std::string _params, int _priority) : + data(_data), type(_type), params(_params), priority(_priority) +{ +} + +AREXPORT ArSoundsQueue::Item::Item(const ArSoundsQueue::Item& toCopy) +{ + data = toCopy.data; + type = toCopy.type; + params = toCopy.params; + priority = toCopy.priority; + playCallbacks = toCopy.playCallbacks; + interruptCallbacks = toCopy.interruptCallbacks; + doneCallbacks = toCopy.doneCallbacks; + playbackConditionCallbacks = toCopy.playbackConditionCallbacks; +} + +void ArSoundsQueue::Item::play() +{ + for(std::list::const_iterator i = playCallbacks.begin(); i != playCallbacks.end(); i++) + { + if(*i) { + (*i)->invokeR(data.c_str(), params.c_str()); + } + } +} + +void ArSoundsQueue::Item::interrupt() +{ + for(std::list::const_iterator i = interruptCallbacks.begin(); i != interruptCallbacks.end(); i++) + if(*i) (*i)->invoke(); +} + + +void ArSoundsQueue::Item::done() +{ + for(std::list::const_iterator i = doneCallbacks.begin(); i != doneCallbacks.end(); i++) + if(*i) { + (*i)->invoke(); + } +} + +/** @cond INTERNAL_CLASSES */ + +/** STL list comparator function object base class + * @internal + */ +class ItemComparator { +protected: + ArSoundsQueue::Item myItem; +public: + ItemComparator(string data = "", ArSoundsQueue::ItemType type = ArSoundsQueue::OTHER, string params = "", int priority = 0) : + myItem(data, type, params, priority) + {} + virtual ~ItemComparator() {} + virtual bool operator()(const ArSoundsQueue::Item& other) + { + return (other == myItem && other.priority == myItem.priority); + } +}; + +/** Function object which compares the data portion of list items + * @internal + */ +class ItemComparator_OnlyData : public virtual ItemComparator { +public: + ItemComparator_OnlyData(string data) : + ItemComparator(data) + {} + virtual bool operator()(const ArSoundsQueue::Item& other) + { + return(other.data == myItem.data); + } +}; + +/** Function object which compares the data and type fields of list items + * @internal + */ +class ItemComparator_TypeAndData : public virtual ItemComparator { +public: + ItemComparator_TypeAndData(string data, ArSoundsQueue::ItemType type) : + ItemComparator(data, type) + {} + virtual bool operator()(const ArSoundsQueue::Item& other) + { + return(other.type == myItem.type && other.data == myItem.data); + } +}; + +/** Function object which compares the priority fields of list items + * @internal + */ +class ItemComparator_PriorityLessThan : public virtual ItemComparator { + int myPriority; +public: + ItemComparator_PriorityLessThan(int priority) : myPriority(priority) + {} + virtual bool operator()(const ArSoundsQueue::Item& other) + { + return(other.priority < myPriority); + } +}; + +/** Function object which compares the priority fields of list items + * @internal + */ +class ItemComparator_WithTypePriorityLessThan : public virtual ItemComparator { + ArSoundsQueue::ItemType myType; + int myPriority; +public: + ItemComparator_WithTypePriorityLessThan(ArSoundsQueue::ItemType type, int priority) : myType(type), myPriority(priority) + {} + virtual bool operator()(const ArSoundsQueue::Item& other) + { + return(other.type == myType && other.priority < myPriority); + } +}; + +/** Function object which compares the type field of list items to a supplied + * type + * @internal + */ +class ItemComparator_WithType : public virtual ItemComparator { + ArSoundsQueue::ItemType myType; +public: + ItemComparator_WithType(ArSoundsQueue::ItemType type) : myType(type) + {} + virtual bool operator()(const ArSoundsQueue::Item& other) + { + return(other.type == myType); + } +}; + +/** @endcond INTERNAL_CLASSES */ + + +AREXPORT ArSoundsQueue::ArSoundsQueue() : + myInitialized(false), + myPlayingSomething(false), + myDefaultSpeakCB(0), myDefaultInterruptSpeechCB(0), + myDefaultPlayFileCB(0), myDefaultInterruptFileCB(0), + myPauseRequestCount(0), + myDefaultPlayConditionCB(0) +{ + setThreadName("ArSoundsQueue"); + myQueueMutex.setLogName("ArSoundsQueue::myQueueMutex"); +} + +AREXPORT ArSoundsQueue::ArSoundsQueue(ArRetFunctor *speakInitCB, + PlayItemFunctor *speakCB, + InterruptItemFunctor *interruptSpeechCB, + ArRetFunctor *playInitCB, + PlayItemFunctor *playCB, + InterruptItemFunctor *interruptFileCB) : + myInitialized(false), myPlayingSomething(false), + myDefaultSpeakCB(speakCB), myDefaultInterruptSpeechCB(interruptSpeechCB), + myDefaultPlayFileCB(playCB), myDefaultInterruptFileCB(interruptFileCB), + myPauseRequestCount(0), + myDefaultPlayConditionCB(0) +{ + setThreadName("ArSoundsQueue"); + if(speakInitCB) + myInitCallbacks.push_back(speakInitCB); + if(playInitCB) + myInitCallbacks.push_back(playInitCB); + if(playCB == 0) + myDefaultPlayFileCB = ArSoundPlayer::getPlayWavFileCallback(); + if(interruptFileCB == 0) + myDefaultInterruptFileCB = ArSoundPlayer::getStopPlayingCallback(); +} + +AREXPORT ArSoundsQueue::ArSoundsQueue(ArSpeechSynth* speechSynth, + ArRetFunctor *playInitCB, + PlayItemFunctor *playFileCB, + InterruptItemFunctor *interruptFileCB) + : myInitialized(false), myPlayingSomething(false), + myDefaultSpeakCB(0), myDefaultInterruptSpeechCB(0), + myDefaultPlayFileCB(playFileCB), myDefaultInterruptFileCB(interruptFileCB), + myPauseRequestCount(0), + myDefaultPlayConditionCB(0) +{ + setThreadName("ArSoundsQueue"); + if(playInitCB) + myInitCallbacks.push_back(playInitCB); + if(speechSynth) + { + myInitCallbacks.push_back(speechSynth->getInitCallback()); + myDefaultSpeakCB = speechSynth->getSpeakCallback(); + myDefaultInterruptSpeechCB = speechSynth->getInterruptCallback(); + } +} + +AREXPORT ArSoundsQueue::~ArSoundsQueue() +{ + +} + + +void ArSoundsQueue::invokeCallbacks(const std::list& lst) +{ + for(std::list::const_iterator i = lst.begin(); i != lst.end(); i++) + { + if(*i) (*i)->invoke(); + else ArLog::log(ArLog::Verbose, "ArSoundsQueue: warning: skipped NULL callback (simple functor)."); + } +} + +void ArSoundsQueue::invokeCallbacks(const std::list*>& lst) +{ + for(std::list*>::const_iterator i = lst.begin(); i != lst.end(); i++) + { + if(*i) (*i)->invokeR(); + else ArLog::log(ArLog::Verbose, "ArSoundsQueue: warning: skipped NULL callback (bool ret. funct.)."); + } +} + + +// This is the public method, but all we have to do is call the private push +// method. +AREXPORT void ArSoundsQueue::addItem(ItemType type, const char* data, std::list callbacks, int priority, const char* params) +{ + assert(data); + pushQueueItem(Item(data, type, params?params:"", priority, callbacks)); +} + +// This is the public method, but all we have to do is call the private push +// method. +AREXPORT void ArSoundsQueue::addItem(ArSoundsQueue::Item item) +{ + pushQueueItem(item); +} + +// Class-protected version. +void ArSoundsQueue::pushQueueItem(ArSoundsQueue::Item item) +{ + lock(); + pushQueueItem_NoLock(item); + unlock(); +} + +// Class-protected version that does not lock (so caller can do it manually as +// needed) +void ArSoundsQueue::pushQueueItem_NoLock(ArSoundsQueue::Item item) +{ + ArLog::log(ArLog::Verbose, "ArSoundsQueue: pushing \"%s\" with type=%d, priority=%d, params=\"%s\".", item.data.c_str(), item.type, item.priority, item.params.c_str()); + myQueue.push_back(item); +} + +ArSoundsQueue::Item ArSoundsQueue::popQueueItem() +{ + lock(); + ArSoundsQueue::Item item = *(myQueue.begin()); + myQueue.pop_front(); + unlock(); + return item; +} + +ArSoundsQueue::Item ArSoundsQueue::popQueueItem_NoLock() +{ + ArSoundsQueue::Item item = *(myQueue.begin()); + myQueue.pop_front(); + return item; +} + +AREXPORT ArSoundsQueue::Item ArSoundsQueue::createDefaultSpeechItem(const char* speech) +{ + Item item; + item.type = SPEECH; + if(myDefaultSpeakCB) + item.playCallbacks.push_back(myDefaultSpeakCB); + if(myDefaultInterruptSpeechCB) + item.interruptCallbacks.push_back(myDefaultInterruptSpeechCB); + if(speech) + item.data = speech; // copy char* contents into std::string + if(myDefaultPlayConditionCB) + item.playbackConditionCallbacks.push_back(myDefaultPlayConditionCB); + return item; +} + +AREXPORT void ArSoundsQueue::speak(const char *str) +{ + if(myQueue.size() == 0) + invokeCallbacks(myQueueNonemptyCallbacks); + Item item = createDefaultSpeechItem(); + item.data = str; + pushQueueItem(item); +} + +AREXPORT void ArSoundsQueue::play(const char *str) +{ + if(myQueue.size() == 0) + invokeCallbacks(myQueueNonemptyCallbacks); + Item item = createDefaultFileItem(); + item.data = str; + pushQueueItem(item); +} + +#if !(defined(WIN32) && defined(_MANAGED)) // MS Managed C++ does not allow varargs + +AREXPORT void ArSoundsQueue::speakf(const char *str, ...) +{ + if(myQueue.size() == 0) + invokeCallbacks(myQueueNonemptyCallbacks); + + char *buf; + size_t buflen = (strlen(str) + 1000 * 2); + buf = new char[buflen]; + + Item item = createDefaultSpeechItem(); + + lock(); // need to lock out here to protect the un-threadsafe va_list functions + va_list ptr; + va_start(ptr, str); + vsnprintf(buf, buflen, str, ptr); + item.data = buf; // std::string constructor will duplicate char* contents + pushQueueItem_NoLock(item); // must use NoLock, since we lock() and unlock() in this function + va_end(ptr); + delete[] buf; + unlock(); +} + + +AREXPORT void ArSoundsQueue::speakWithVoice(const char* voice, const char* str, ...) +{ + if(myQueue.size() == 0) + invokeCallbacks(myQueueNonemptyCallbacks); + + char *buf; + size_t buflen = (strlen(str) + 1000 * 2); + buf = new char[buflen]; + + Item item = createDefaultSpeechItem(); + string params = "name="; + params += voice; + item.params = params; + + lock(); // need to lock out here to protect the un-threadsafe va_list functions + va_list ptr; + va_start(ptr, str); + vsnprintf(buf, buflen, str, ptr); + item.data = buf;// std::string constructor will duplicate char* contents + pushQueueItem_NoLock(item); + va_end(ptr); + delete[] buf; + unlock(); +} + +AREXPORT void ArSoundsQueue::speakWithPriority(int priority, const char* str, ...) +{ + if(myQueue.size() == 0) + invokeCallbacks(myQueueNonemptyCallbacks); + + char *buf; + size_t buflen = (strlen(str) + 1000 * 2); + buf = new char[buflen]; + + Item item = createDefaultSpeechItem(); + item.priority = priority; + + lock(); // need to lock out here to protect the un-threadsafe va_list functions + va_list ptr; + va_start(ptr, str); + vsnprintf(buf, buflen, str, ptr); + item.data = buf;// std::string constructor will duplicate char* contents + pushQueueItem_NoLock(item); + va_end(ptr); + delete[] buf; + unlock(); +} + + +AREXPORT void ArSoundsQueue::playf(const char *str, ...) +{ + if(myQueue.size() == 0) + invokeCallbacks(myQueueNonemptyCallbacks); + + char buf[2048]; + Item item = createDefaultFileItem(); + + lock(); // va_list is not threadsafe + va_list ptr; + va_start(ptr, str); + vsnprintf(buf, 2048, str, ptr); + item.data = buf; // std::string constructor will duplicate char* contents + va_end(ptr); + unlock(); + + pushQueueItem(item); +} + +#endif // MS Managed C++ + +AREXPORT ArSoundsQueue::Item ArSoundsQueue::createDefaultFileItem(const char* filename) +{ + Item item; + item.type = SOUND_FILE; + if(myDefaultPlayFileCB) + item.playCallbacks.push_back(myDefaultPlayFileCB); + else + ArLog::log(ArLog::Normal, "ArSoundsQueue: Internal Warning: no default PlayFile callback."); + if(myDefaultInterruptFileCB) + item.interruptCallbacks.push_back(myDefaultInterruptFileCB); + if(filename) + item.data = filename; // copy into std::string + if(myDefaultPlayConditionCB) + item.playbackConditionCallbacks.push_back(myDefaultPlayConditionCB); + return item; +} + + + +AREXPORT void *ArSoundsQueue::runThread(void *arg) +{ + threadStarted(); + invokeCallbacks(myInitCallbacks); + debuglog("the init callbacks were called."); + myInitialized = true; + + while (getRunning()) + { + lock(); + if(myPauseRequestCount > 0) + { + unlock(); + myPausedCondition.wait(); + lock(); + } + if (myQueue.size() > 0) + { + myLastItem = popQueueItem_NoLock(); + +#ifdef DEBUG + ArLog::log(ArLog::Normal, "* DEBUG * ArSoundsQueue: Popped an item from the queue. There are %d condition callbacks for this item.", myLastItem.playbackConditionCallbacks.size()); +#endif + + // Call some callbacks to tell them that play is about to begin + invokeCallbacks(myStartPlaybackCBList); + std::list *>::iterator lIt; + for (lIt = myStartItemPlaybackCBList.begin(); + lIt != myStartItemPlaybackCBList.end(); + lIt++) + { + (*lIt)->invoke(myLastItem); + } + + + // Abort if any conditions return false + bool doPlayback = true; + for(std::list::const_iterator i = myLastItem.playbackConditionCallbacks.begin(); + i != myLastItem.playbackConditionCallbacks.end(); i++) + { + if( (*i) && (*i)->invokeR() == false) { + if( (*i)->getName() && strlen((*i)->getName()) > 0 ) + ArLog::log(ArLog::Normal, "ArSoundsQueue: the \"%s\" condition is preventing this item from playing. Skipping this item.", (*i)->getName()); + else + ArLog::log(ArLog::Normal, "ArSoundsQueue: an unnamed condition is preventing this item from playing. Skipping this item."); + doPlayback = false; + break; + } +#ifdef DEBUG + else { + ArLog::log(ArLog::Normal, "* DEBUG * ArSoundsQueue: Condition callback returned true."); + } +#endif + } + + if(doPlayback) + { + + myPlayingSomething = true; + unlock(); + + // Play the item. +#ifdef DEBUG + ArLog::log(ArLog::Normal, "* DEBUG* Acting on item. type=%d", myLastItem.type); +#endif + myLastItem.play(); + + // Sleep a bit for some "recover" time (especially for sound playback + // processing) + ArUtil::sleep(200); + + lock(); + myPlayingSomething = false; + } + + + // Call some more callbacks to tell them that play ended. + debuglog("Finished acting on item. Invoking endPlayback callbacks..."); + unlock(); + myLastItem.done(); + invokeCallbacks(myEndPlaybackCBList); + for (lIt = myEndItemPlaybackCBList.begin(); + lIt != myEndItemPlaybackCBList.end(); + lIt++) + { + (*lIt)->invoke(myLastItem); + } + lock(); + + if(myQueue.size() == 0) + { + debuglog("invoking queue-empty callbacks!"); + unlock(); + invokeCallbacks(myQueueEmptyCallbacks); + } + else + { + unlock(); + } + + } + else + { + unlock(); + ArUtil::sleep(20); + } + } + threadFinished(); + return NULL; +} + + +AREXPORT void ArSoundsQueue::pause() +{ + lock(); + myPauseRequestCount++; + unlock(); +} + +AREXPORT void ArSoundsQueue::resume() +{ + ArLog::log(ArLog::Verbose, "ArSoundsQueue::resume: requested."); + lock(); + if(--myPauseRequestCount <= 0) + { + myPauseRequestCount = 0; + ArLog::log(ArLog::Verbose, "ArSoundsQueue::resume: unpausing."); + unlock(); + myPausedCondition.signal(); + } else { + unlock(); + } +} + +AREXPORT void ArSoundsQueue::stop() +{ + stopRunning(); +} + +AREXPORT bool ArSoundsQueue::isPaused() +{ + return (myPauseRequestCount > 0); +} + +AREXPORT void ArSoundsQueue::interrupt() +{ + lock(); + // Don't try to interrupt the last item removed from the queue if + // it's not currently being played. + //printf("interrupt: myPlayingSomething=%d\n", myPlayingSomething); + if(myPlayingSomething) + myLastItem.interrupt(); + myPlayingSomething = false; + unlock(); +} + +AREXPORT void ArSoundsQueue::clearQueue() +{ + lock(); + myQueue.clear(); + unlock(); + invokeCallbacks(myQueueEmptyCallbacks); +} + +AREXPORT set ArSoundsQueue::findPendingItems(const char* item) +{ + lock(); + set found; + int pos = 0; + for(list::const_iterator i = myQueue.begin(); i != myQueue.end(); i++) + { + if((*i).data == item) + found.insert(pos); + pos++; + } + unlock(); + return found; +} + +AREXPORT void ArSoundsQueue::removePendingItems(const char* item, ItemType type) +{ + lock(); + myQueue.remove_if(ItemComparator_TypeAndData(item, type)); + unlock(); +} + + +AREXPORT void ArSoundsQueue::removePendingItems(const char* data) +{ + lock(); + myQueue.remove_if(ItemComparator_OnlyData(data)); + unlock(); +} + +AREXPORT void ArSoundsQueue::removePendingItems(int priority) +{ + lock(); + myQueue.remove_if(ItemComparator_PriorityLessThan(priority)); + unlock(); +} + +AREXPORT void ArSoundsQueue::removePendingItems(int priority, ItemType type) +{ + lock(); + myQueue.remove_if(ItemComparator_WithTypePriorityLessThan(type, priority)); + unlock(); +} + +AREXPORT void ArSoundsQueue::removePendingItems(ItemType type) +{ + lock(); + myQueue.remove_if(ItemComparator_WithType(type)); + unlock(); +} + +AREXPORT void ArSoundsQueue::removeItems(int priority) +{ + + lock(); + removePendingItems(priority); + if (myPlayingSomething && myLastItem.priority < priority) + { + interrupt(); + } + unlock(); +} + + +AREXPORT void ArSoundsQueue::removeItems(Item item) +{ + + lock(); + removePendingItems(item.data.c_str(), item.type); + if (myPlayingSomething && myLastItem.type == item.type && + myLastItem.data == item.data) + { + interrupt(); + } + unlock(); +} + + +AREXPORT string ArSoundsQueue::nextItem(ItemType type) +{ + lock(); + for(list::const_iterator i = myQueue.begin(); i != myQueue.end(); i++) + { + if(type == (*i).type) { + string found = (*i).data; + unlock(); + return found; + } + } + unlock(); + return ""; +} + +AREXPORT string ArSoundsQueue::nextItem(int priority) +{ + lock(); + for(list::const_iterator i = myQueue.begin(); i != myQueue.end(); i++) + { + if((*i).priority >= priority) { + string found = (*i).data; + unlock(); + return found; + } + } + unlock(); + return ""; +} + +AREXPORT string ArSoundsQueue::nextItem(ItemType type, int priority) +{ + lock(); + for(list::const_iterator i = myQueue.begin(); i != myQueue.end(); i++) + { + if(type == (*i).type && (*i).priority >= priority) { + string found = (*i).data; + unlock(); + return found; + } + } + unlock(); + return ""; +} + + diff --git a/Legacy/Aria/src/ArSpeech.cpp b/Legacy/Aria/src/ArSpeech.cpp new file mode 100644 index 0000000..300373d --- /dev/null +++ b/Legacy/Aria/src/ArSpeech.cpp @@ -0,0 +1,123 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#include "ArExport.h" +#include "ArSpeech.h" +#include "ArConfig.h" +#include "ariaInternal.h" + + +AREXPORT ArSpeechSynth::ArSpeechSynth() : + mySpeakCB(this, &ArSpeechSynth::speak), + myInitCB(this, &ArSpeechSynth::init), + myInterruptCB(this, &ArSpeechSynth::interrupt), + myAudioPlaybackCB(0), + myProcessConfigCB(this, &ArSpeechSynth::processConfig) +{ + myProcessConfigCB.setName("ArSpeechSynth"); +} + + +AREXPORT bool ArSpeechSynth::init() +{ + return true; +} + +AREXPORT void ArSpeechSynth::addToConfig(ArConfig *config) +{ + addVoiceConfigParam(config); + config->addProcessFileCB(&myProcessConfigCB, 100); +} + +AREXPORT ArSpeechSynth::~ArSpeechSynth() +{ +} + +AREXPORT ArRetFunctorC* ArSpeechSynth::getInitCallback(void) +{ + return &myInitCB; +} + +AREXPORT ArRetFunctor2C* ArSpeechSynth::getSpeakCallback(void) +{ + return &mySpeakCB; +} + + +AREXPORT ArFunctorC* ArSpeechSynth::getInterruptCallback() +{ + return &myInterruptCB; +} + +AREXPORT void ArSpeechSynth::setAudioCallback(ArRetFunctor2* cb) +{ + myAudioPlaybackCB = cb; +} + + +AREXPORT bool ArSpeechSynth::speak(const char* text, const char* voiceParams) { + return speak(text, voiceParams, NULL, 0); +} + + + +bool ArSpeechSynth::processConfig() +{ + setVoice(myConfigVoice); + return true; +} + +void ArSpeechSynth::addVoiceConfigParam(ArConfig *config) +{ + const char *current = getCurrentVoiceName(); + if(current) + { + strncpy(myConfigVoice, current, sizeof(myConfigVoice)); + } + else + { + myConfigVoice[0] = 0; + } + std::string displayHint; + std::list voices = getVoiceNames(); + for(std::list::const_iterator i = voices.begin(); i != voices.end(); i++) + { + if(i == voices.begin()) + displayHint = "Choices:"; + else + displayHint += ";;"; + displayHint += *i; + } + config->addParam( + ArConfigArg("Voice", myConfigVoice, "Name of voice to use for speech synthesis", sizeof(myConfigVoice)), + "Speech Synthesis", + ArPriority::NORMAL, + displayHint.c_str() + ); +} + + diff --git a/Legacy/Aria/src/ArStringInfoGroup.cpp b/Legacy/Aria/src/ArStringInfoGroup.cpp new file mode 100644 index 0000000..4613583 --- /dev/null +++ b/Legacy/Aria/src/ArStringInfoGroup.cpp @@ -0,0 +1,160 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArStringInfoGroup.h" + +/* + TODO the stringInt functions and such'll leak memory on a failed attempt +*/ + +AREXPORT ArStringInfoGroup::ArStringInfoGroup() +{ + myDataMutex.setLogName("ArStringInfoGroup::myDataMutex"); +} + +AREXPORT ArStringInfoGroup::~ArStringInfoGroup() +{ + +} + +/** + @note It is recommended that you avoid characters in a string name or value + which may have special meaning in contexts like ArConfig files, such as + '#', ';', tabs and newlines. +*/ +AREXPORT bool ArStringInfoGroup::addString( + const char *name, ArTypes::UByte2 maxLength, + ArFunctor2 *functor) +{ + myDataMutex.lock(); + if (myAddedStrings.find(name) != myAddedStrings.end()) + { + ArLog::log(ArLog::Normal, "ArStringInfoGroups: Cannot add info '%s', duplicate", name); + myDataMutex.unlock(); + return false; + } + + std::list *> *>::iterator it; + ArLog::log(ArLog::Verbose, "ArStringInfoGroups: Adding info '%s'", name); + myAddedStrings.insert(name); + for (it = myAddStringCBList.begin(); it != myAddStringCBList.end(); it++) + { + (*it)->invoke(name, maxLength, functor); + } + ArLog::log(ArLog::Verbose, "ArStringInfoGroups: Added info '%s'", name); + myDataMutex.unlock(); + return true; +} + +AREXPORT bool ArStringInfoGroup::addStringInt( + const char *name, ArTypes::UByte2 maxLength, + ArRetFunctor *functor, const char *format) +{ + return addString(name, maxLength, + (new ArGlobalFunctor4 *, + const char *>(&ArStringInfoHolderFunctions::intWrapper, + (char *)NULL, (ArTypes::UByte2) 0, + functor, format))); +} + +AREXPORT bool ArStringInfoGroup::addStringDouble( + const char *name, ArTypes::UByte2 maxLength, + ArRetFunctor *functor, const char *format) +{ + return addString(name, maxLength, + (new ArGlobalFunctor4 *, + const char *>(&ArStringInfoHolderFunctions::doubleWrapper, + (char *)NULL, (ArTypes::UByte2) 0, + functor, format))); +} + + +AREXPORT bool ArStringInfoGroup::addStringBool( + const char *name, ArTypes::UByte2 maxLength, + ArRetFunctor *functor, const char *format) +{ + return addString(name, maxLength, + (new ArGlobalFunctor4 *, + const char *>(&ArStringInfoHolderFunctions::boolWrapper, + (char *)NULL, (ArTypes::UByte2) 0, + functor, format))); +} + +AREXPORT bool ArStringInfoGroup::addStringString( + const char *name, ArTypes::UByte2 maxLength, + ArRetFunctor *functor, const char *format) +{ + return addString(name, maxLength, + (new ArGlobalFunctor4 *, + const char *>(&ArStringInfoHolderFunctions::stringWrapper, + (char *)NULL, (ArTypes::UByte2) 0, + functor, format))); +} + +AREXPORT bool ArStringInfoGroup::addStringUnsignedLong( + const char *name, ArTypes::UByte2 maxLength, + ArRetFunctor *functor, const char *format) +{ + return addString(name, maxLength, + (new ArGlobalFunctor4 *, + const char *>(&ArStringInfoHolderFunctions::unsignedLongWrapper, + (char *)NULL, (ArTypes::UByte2) 0, + functor, format))); +} + +AREXPORT bool ArStringInfoGroup::addStringLong( + const char *name, ArTypes::UByte2 maxLength, + ArRetFunctor *functor, const char *format) +{ + return addString(name, maxLength, + (new ArGlobalFunctor4 *, + const char *>(&ArStringInfoHolderFunctions::longWrapper, + (char *)NULL, (ArTypes::UByte2) 0, + functor, format))); +} + + +AREXPORT void ArStringInfoGroup::addAddStringCallback( + ArFunctor3 *> *functor, + ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myAddStringCBList.push_front(functor); + else if (position == ArListPos::LAST) + myAddStringCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, + "ArStringInfoGroup::addAddStringCallback: Invalid position."); +} diff --git a/Legacy/Aria/src/ArSyncLoop.cpp b/Legacy/Aria/src/ArSyncLoop.cpp new file mode 100644 index 0000000..ef514f2 --- /dev/null +++ b/Legacy/Aria/src/ArSyncLoop.cpp @@ -0,0 +1,173 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArSyncLoop.h" +#include "ArLog.h" +#include "ariaUtil.h" +#include "ArRobot.h" + + +AREXPORT ArSyncLoop::ArSyncLoop() : + ArASyncTask(), + myStopRunIfNotConnected(false), + myRobot(0) +{ + setThreadName("ArRobotSyncLoop"); + myInRun = false; +} + +AREXPORT ArSyncLoop::~ArSyncLoop() +{ +} + +AREXPORT void ArSyncLoop::setRobot(ArRobot *robot) +{ + myRobot=robot; +} + +AREXPORT void ArSyncLoop::stopRunIfNotConnected(bool stopRun) +{ + myStopRunIfNotConnected = stopRun; +} + +AREXPORT void * ArSyncLoop::runThread(void *arg) +{ + threadStarted(); + + long timeToSleep; + ArTime loopEndTime; + std::list *runList; + std::list::iterator iter; + ArTime lastLoop; + bool firstLoop = true; + bool warned = false; + + if (!myRobot) + { + ArLog::log(ArLog::Terse, "ArSyncLoop::runThread: Trying to run the synchronous loop without a robot."); + return(0); + } + + if (!myRobot->getSyncTaskRoot()) + { + ArLog::log(ArLog::Terse, "ArSyncLoop::runThread: Can not run the synchronous loop without a task tree"); + return(0); + } + + while (myRunning) + { + + myRobot->lock(); + if (!firstLoop && !warned && !myRobot->getNoTimeWarningThisCycle() && + myRobot->getCycleWarningTime() != 0 && + myRobot->getCycleWarningTime() > 0 && + lastLoop.mSecSince() > (signed int) myRobot->getCycleWarningTime()) + { + ArLog::log(ArLog::Normal, + "Warning: ArRobot cycle took too long because the loop was waiting for lock."); + ArLog::log(ArLog::Normal, + "\tThe cycle took %u ms, (%u ms normal %u ms warning)", + lastLoop.mSecSince(), myRobot->getCycleTime(), + myRobot->getCycleWarningTime()); + } + myRobot->setNoTimeWarningThisCycle(false); + firstLoop = false; + warned = false; + lastLoop.setToNow(); + + loopEndTime.setToNow(); + if (!loopEndTime.addMSec(myRobot->getCycleTime())) { + ArLog::log(ArLog::Normal, + "ArSyncLoop::runThread() error adding msecs (%i)", + myRobot->getCycleTime()); + } + myRobot->incCounter(); + myRobot->unlock(); + + // note that all the stuff beyond here should maybe have a lock + // but it should be okay because its just getting data + myInRun = true; + myRobot->getSyncTaskRoot()->run(); + myInRun = false; + if (myStopRunIfNotConnected && !myRobot->isConnected()) + { + if (myRunning) + ArLog::log(ArLog::Normal, "Exiting robot run because of lost connection."); + break; + } + timeToSleep = loopEndTime.mSecTo(); + // if the cycles chained and we're connected the packet handler will be + // doing the timing for us + if (myRobot->isCycleChained() && myRobot->isConnected()) + timeToSleep = 0; + + if (!myRobot->getNoTimeWarningThisCycle() && + myRobot->getCycleWarningTime() != 0 && + myRobot->getCycleWarningTime() > 0 && + lastLoop.mSecSince() > (signed int) myRobot->getCycleWarningTime()) + { + ArLog::log(ArLog::Normal, + "Warning: ArRobot sync tasks too long at %u ms, (%u ms normal %u ms warning)", + lastLoop.mSecSince(), myRobot->getCycleTime(), + myRobot->getCycleWarningTime()); + warned = true; + } + + + if (timeToSleep > 0) + ArUtil::sleep(timeToSleep); + } + myRobot->lock(); + myRobot->wakeAllRunExitWaitingThreads(); + myRobot->unlock(); + + myRobot->lock(); + runList=myRobot->getRunExitListCopy(); + myRobot->unlock(); + for (iter=runList->begin(); + iter != runList->end(); ++iter) + (*iter)->invoke(); + delete runList; + + threadFinished(); + return(0); +} + +AREXPORT const char *ArSyncLoop::getThreadActivity(void) +{ + if (myRunning) + { + ArSyncTask *syncTask; + syncTask = myRobot->getSyncTaskRoot()->getRunning(); + if (syncTask != NULL) + return syncTask->getName().c_str(); + else + return "Unknown running"; + } + else + return "Unknown"; +} diff --git a/Legacy/Aria/src/ArSyncTask.cpp b/Legacy/Aria/src/ArSyncTask.cpp new file mode 100644 index 0000000..ff8b87c --- /dev/null +++ b/Legacy/Aria/src/ArSyncTask.cpp @@ -0,0 +1,398 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ariaUtil.h" +#include "ArSyncTask.h" +#include "ArLog.h" + +/** + New should never be called to create an ArSyncTask except to create the + root node. Read the detailed documentation of the class for details. +*/ +AREXPORT ArSyncTask::ArSyncTask(const char *name, ArFunctor *functor, + ArTaskState::State *state, ArSyncTask *parent) +{ + myName = name; + myStatePointer = state; + myFunctor = functor; + myParent = parent; + myIsDeleting = false; + setState(ArTaskState::INIT); + if (myParent != NULL) + { + setWarningTimeCB(parent->getWarningTimeCB()); + setNoTimeWarningCB(parent->getNoTimeWarningCB()); + } + else + { + setWarningTimeCB(NULL); + setNoTimeWarningCB(NULL); + } +} + +/** + If you delete the task it deletes everything in its list, so to + delete the whole tree just delete the top one... also note that if you + delete a node, it will remove itself from its parents list. +*/ +AREXPORT ArSyncTask::~ArSyncTask() +{ + myIsDeleting = true; + if (myParent != NULL && !myParent->isDeleting()) + myParent->remove(this); + + ArUtil::deleteSetPairs(myMultiMap.begin(), myMultiMap.end()); + myMultiMap.clear(); +} + +AREXPORT ArTaskState::State ArSyncTask::getState(void) +{ + if (myStatePointer != NULL) + return *myStatePointer; + else + return myState; +} + +AREXPORT void ArSyncTask::setState(ArTaskState::State state) +{ + if (myStatePointer != NULL) + *myStatePointer = state; + else + myState = state; +} + +AREXPORT std::string ArSyncTask::getName(void) +{ + return myName; +} + + +/** + Finds a node below (or at) this level in the tree with the given functor + @param functor The task functor pointer to search for. Must not be NULL. + @return The task, if found. If not found, NULL. +*/ +AREXPORT ArSyncTask *ArSyncTask::find(ArFunctor *functor) +{ + ArSyncTask *proc; + std::multimap::iterator it; + + if (myFunctor == functor) + return this; + + for (it = myMultiMap.begin(); it != myMultiMap.end(); ++it) + { + proc = (*it).second; + if (proc->find(functor) != NULL) + return proc; + } + return NULL; + +} + +/** + Finds a node below (or at) this level in the tree with the given name + @param name The name of the child we are interested in finding + @return The task, if found. If not found, NULL. +*/ +AREXPORT ArSyncTask *ArSyncTask::find(const char *name) +{ + ArSyncTask *proc; + std::multimap::iterator it; + + if (strcmp(myName.c_str(), name) == 0) + return this; + + for (it = myMultiMap.begin(); it != myMultiMap.end(); ++it) + { + proc = (*it).second; + if (proc->find(name) != NULL) + return proc; + } + return NULL; + +} + +/** + Finds a child of this node with the given name + @param name The name of the child we are interested in finding + @return The task, if found. If not found, NULL. +*/ +AREXPORT ArSyncTask *ArSyncTask::findNonRecursive(const char * name) +{ + ArSyncTask *proc; + std::multimap::iterator it; + + for (it = myMultiMap.begin(); it != myMultiMap.end(); ++it) + { + proc = (*it).second; + if (strcmp(proc->getName().c_str(), name) == 0) + return proc; + } + return NULL; +} + +/** + Finds a child of this node with the given functor + @param functor the functor we are interested in finding + @return The task, if found. If not found, NULL. +*/ +AREXPORT ArSyncTask *ArSyncTask::findNonRecursive(ArFunctor *functor) +{ + ArSyncTask *proc; + std::multimap::iterator it; + + for (it = myMultiMap.begin(); it != myMultiMap.end(); ++it) + { + proc = (*it).second; + if (proc->getFunctor() == functor) + return proc; + } + return NULL; +} + +/** + Creates a new task with the given name and puts the task into its + own iternal list at the given position. + @param nameOfNew Name to give to the new task. + @param position place in list to put the branch, things are run/printed in + the order of highest number to lowest number, no limit on numbers (other + than that it is an int). ARIA uses 0 to 100 just as a convention. + @param state Pointer to external variable to store task state in, or NULL to use a new + internal variable instead. +*/ +AREXPORT void ArSyncTask::addNewBranch(const char *nameOfNew, int position, + ArTaskState::State *state) +{ + ArSyncTask *proc = new ArSyncTask(nameOfNew, NULL, state, this); + myMultiMap.insert(std::pair(position, proc)); +} + +/** + Creates a new task with the given name and puts the task into its + own iternal list at the given position. Sets the nodes functor so that + it will call the functor when run is called. + @param nameOfNew Name to give to the new task. + @param position place in list to put the branch, things are run/printed in + the order of highest number to lowest number, no limit on numbers (other + than that it is an int). ARIA uses 0 to 100 just as a convention. + @param functor ArFunctor which contains the functor to invoke when run is + called. + @param state Pointer to external variable to store task state in, or NULL to + use an internal variable instead. +*/ +AREXPORT void ArSyncTask::addNewLeaf(const char *nameOfNew, int position, + ArFunctor *functor, + ArTaskState::State *state) +{ + ArSyncTask *proc = new ArSyncTask(nameOfNew, functor, state, this); + myMultiMap.insert(std::pair(position, proc)); +} + +AREXPORT void ArSyncTask::remove(ArSyncTask *proc) +{ + std::multimap::iterator it; + + for (it = myMultiMap.begin(); it != myMultiMap.end(); it++) + { + if ((*it).second == proc) + { + myMultiMap.erase(it); + return; + } + } +} + +AREXPORT bool ArSyncTask::isDeleting(void) +{ + return myIsDeleting; +} + +AREXPORT ArFunctor *ArSyncTask::getFunctor(void) +{ + return myFunctor; +} + +/** + If this node is a leaf it calls the functor for the node, if it is + a branch it goes through all of the children in the order of + highest position to lowest position and calls run on them. +**/ +AREXPORT void ArSyncTask::run(void) +{ + myRunning = true; + + std::multimap::reverse_iterator it; + ArTaskState::State state; + ArTime runTime; + int took; + + state = getState(); + switch (state) + { + case ArTaskState::SUSPEND: + case ArTaskState::SUCCESS: + case ArTaskState::FAILURE: + // The task isn't running so just return + myRunning = true; + return; + case ArTaskState::INIT: + case ArTaskState::RESUME: + case ArTaskState::ACTIVE: + default: + break; + } + + runTime.setToNow(); + if (myFunctor != NULL) + myFunctor->invoke(); + + if (myNoTimeWarningCB != NULL && !myNoTimeWarningCB->invokeR() && + myFunctor != NULL && myWarningTimeCB != NULL && + myWarningTimeCB->invokeR() > 0 && + (took = runTime.mSecSince()) > (signed int)myWarningTimeCB->invokeR()) + ArLog::log(ArLog::Normal, + "Warning: Task '%s' took %d ms to run (longer than the %d warning time)", + myName.c_str(), took, (signed int)myWarningTimeCB->invokeR()); + + + for (it = myMultiMap.rbegin(); it != myMultiMap.rend(); it++) + { + myInvokingOtherFunctor = (*it).second; + myInvokingOtherFunctor->run(); + } + myInvokingOtherFunctor = NULL; +} + +/** + This sets a functor which will be called to find the time on the + task such that if it takes longer than this number of ms to run a + warning message will be issued, sets this on the children too. +**/ +AREXPORT void ArSyncTask::setWarningTimeCB(ArRetFunctor *functor) +{ + std::multimap::reverse_iterator it; + myWarningTimeCB = functor; + for (it = myMultiMap.rbegin(); it != myMultiMap.rend(); it++) + (*it).second->setWarningTimeCB(functor); +} + +/** + This gets a functor which will be called to find the time on the + task such that if it takes longer than this number of ms to run a + warning message will be issued, sets this on the children too. +**/ +AREXPORT ArRetFunctor *ArSyncTask::getWarningTimeCB(void) +{ + return myWarningTimeCB; +} + +/** + This sets a functor which will be called to see if we should warn + this time through or not. +**/ +AREXPORT void ArSyncTask::setNoTimeWarningCB(ArRetFunctor *functor) +{ + std::multimap::reverse_iterator it; + myNoTimeWarningCB = functor; + for (it = myMultiMap.rbegin(); it != myMultiMap.rend(); it++) + (*it).second->setNoTimeWarningCB(functor); +} + +/** + This sets a functor which will be called to see if we should warn + this time through or not. +**/ +AREXPORT ArRetFunctor *ArSyncTask::getNoTimeWarningCB(void) +{ + return myNoTimeWarningCB; +} + + +/** + Prints the node... the defaulted depth parameter controls how far over to + print the data (how many tabs)... it recurses down all its children. +*/ +AREXPORT void ArSyncTask::log(int depth) +{ + int i; + std::multimap::reverse_iterator it; + std::string str = ""; + ArTaskState::State state; + + for (i = 0; i < depth; i++) + str += "\t"; + str += myName.c_str(); + str += " ("; + state = getState(); + switch (state) + { + case ArTaskState::INIT: + str += "INIT, running)"; + break; + case ArTaskState::RESUME: + str += "RESUME, running)"; + break; + case ArTaskState::ACTIVE: + str += "ACTIVE, running)"; + break; + case ArTaskState::SUSPEND: + str += "SUSPEND, NOT running)"; + break; + case ArTaskState::SUCCESS: + str += "SUCCESS, NOT running)"; + break; + case ArTaskState::FAILURE: + str += "FAILURE, NOT running)"; + break; + default: + str += state; + str += ", running)"; + break; + } + ArLog::log(ArLog::Terse, const_cast(str.c_str())); + for (it = myMultiMap.rbegin(); it != myMultiMap.rend(); it++) + (*it).second->log(depth + 1); + +} + + +/// Returns what this is running, if anything (recurses) +AREXPORT ArSyncTask *ArSyncTask::getRunning(void) +{ + if (!myRunning) + return NULL; + else if (myInvokingOtherFunctor != NULL) + return myInvokingOtherFunctor->getRunning(); + else if (myFunctor) + return this; + else + { + ArLog::log(ArLog::Normal, "ArSyncTask::getRunning: Tried to get running, but apparently nothing was running"); + return NULL; + } +} diff --git a/Legacy/Aria/src/ArSystemStatus.cpp b/Legacy/Aria/src/ArSystemStatus.cpp new file mode 100644 index 0000000..99af9aa --- /dev/null +++ b/Legacy/Aria/src/ArSystemStatus.cpp @@ -0,0 +1,362 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaInternal.h" +#include "ariaOSDef.h" +#include "ariaUtil.h" +#include "ArSystemStatus.h" +#include "ArASyncTask.h" +#include + + +double ArSystemStatus::ourCPU = -1.0; +unsigned long ArSystemStatus::ourUptime = 0; +unsigned long ArSystemStatus::ourFirstUptime = 0; +unsigned long ArSystemStatus::ourLastCPUTime = 0; +ArTime ArSystemStatus::ourLastCPURefreshTime; +ArGlobalRetFunctor ArSystemStatus::ourGetCPUPercentCallback(&ArSystemStatus::getCPUPercent); +ArGlobalRetFunctor ArSystemStatus::ourGetUptimeHoursCallback(&ArSystemStatus::getUptimeHours); +ArGlobalRetFunctor ArSystemStatus::ourGetUptimeCallback(&ArSystemStatus::getUptime); +ArGlobalRetFunctor ArSystemStatus::ourGetProgramUptimeCallback(&ArSystemStatus::getProgramUptime); + +int ArSystemStatus::ourLinkQuality = -1; +int ArSystemStatus::ourLinkSignal = -1; +int ArSystemStatus::ourLinkNoise = -1; +int ArSystemStatus::ourDiscardedTotal = -1; +int ArSystemStatus::ourDiscardedConflict = -1; +int ArSystemStatus::ourDiscardedDecrypt = -1; +ArMutex ArSystemStatus::ourCPUMutex; +ArMutex ArSystemStatus::ourWirelessMutex; +ArGlobalRetFunctor ArSystemStatus::ourGetWirelessLinkQualityCallback(&ArSystemStatus::getWirelessLinkQuality); +ArGlobalRetFunctor ArSystemStatus::ourGetWirelessLinkNoiseCallback(&ArSystemStatus::getWirelessLinkNoise); +ArGlobalRetFunctor ArSystemStatus::ourGetWirelessLinkSignalCallback(&ArSystemStatus::getWirelessLinkSignal); +ArSystemStatusRefreshThread* ArSystemStatus::ourPeriodicUpdateThread = 0; +bool ArSystemStatus::ourShouldRefreshWireless = true; +bool ArSystemStatus::ourShouldRefreshCPU = true; + + +class ArScopedLock { +private: + ArMutex& mtx; +public: + ArScopedLock(ArMutex& m) : mtx(m) { + mtx.lock(); + } + ~ArScopedLock() { + mtx.unlock(); + } +}; + + +void ArSystemStatus::refreshCPU() +{ +#ifndef WIN32 + if(ourPeriodicUpdateThread && !ourShouldRefreshCPU) return; + unsigned long interval = ourLastCPURefreshTime.mSecSince(); + FILE* statfp = ArUtil::fopen("/proc/stat", "r"); + FILE* uptimefp = ArUtil::fopen("/proc/uptime", "r"); + if(!statfp) { + ArLog::log(ArLog::Terse, "ArSystemStatus: Error: Failed to open /proc/stat!"); + } + if(!uptimefp) { + ArLog::log(ArLog::Terse, "ArSystemStatus: Error: Failed to open /proc/uptime!"); + } + if(!statfp || !uptimefp) + { + ourCPU = -1.0; + ourLastCPUTime = ourUptime = 0; + ourShouldRefreshCPU = false; + if (statfp) + fclose(statfp); + if (uptimefp) + fclose(uptimefp); + return; + } + //char line[512]; + //fgets(line, 512, uptimefp); + //printf("read uptime file: %s\n", line); + //double uptime = 0, idle_uptime = 0; + //fscanf(uptimefp, "%lf %lf", &uptime, &idle_uptime); + //ourUptime = (unsigned long)uptime; + unsigned long uptime; + fscanf(uptimefp, "%ld", &uptime); + ourUptime = uptime; + fclose(uptimefp); + + if (ourFirstUptime == 0) + ourFirstUptime = ourUptime; + + unsigned long user, nice, sys, idle, total; + char tag[32]; + fscanf(statfp, "%s %lu %lu %lu %lu", tag, &user, &nice, &sys, &idle); + fclose(statfp); + total = user+nice+sys; // total non-idle cpu time in 100ths of a sec + if(ourLastCPUTime == 0 || interval == 0) + { + // no time has past since last refresh + ourLastCPUTime = total; + ourShouldRefreshCPU = false; + return; + } + ourCPU = (double)(total - ourLastCPUTime) / ((double)interval/10.0); // convert 'interval' to 1/100 sec units + ourLastCPUTime = total; + ourLastCPURefreshTime.setToNow(); + ourShouldRefreshCPU = false; +#endif // WIN32 +} + + + +/** @cond INTERNAL_CLASSES */ +class ArSystemStatusRefreshThread : public virtual ArASyncTask { +public: + ArSystemStatusRefreshThread(int refreshFrequency) : + myRefreshFrequency(refreshFrequency) + { + setThreadName("ArSystemStatusRefreshThread"); + } + void runAsync() { create(false); } + void setRefreshFreq(int freq) { myRefreshFrequency = freq; } +private: + int myRefreshFrequency; + virtual void* runThread(void* arg) + { + threadStarted(); + while(Aria::getRunning() && getRunning()) + { + ArSystemStatus::invalidate(); + ArUtil::sleep(myRefreshFrequency); + } + threadFinished(); + return NULL; + } +}; +/** @endcond INTERNAL_CLASSES */ + + +AREXPORT void ArSystemStatus::startPeriodicUpdate(int refreshFrequency, ArLog::LogLevel logLevel) +{ + ourCPUMutex.setLogName("ArSystemStatusRefreshThread::ourCPUMutex"); + ourWirelessMutex.setLogName("ArSystemStatusRefreshThread::ourWirelessMutex"); + + if(ourPeriodicUpdateThread) { + // If we already have a thread, just change its refresh frequency + ourPeriodicUpdateThread->setRefreshFreq(refreshFrequency); + ourPeriodicUpdateThread->setLogLevel(logLevel); + return; + } + // Otherwise, start a new thread, with the desired refresh frequency + ourPeriodicUpdateThread = new ArSystemStatusRefreshThread(refreshFrequency); + ourPeriodicUpdateThread->setLogLevel(logLevel); + ourPeriodicUpdateThread->runAsync(); +} + +AREXPORT void ArSystemStatus::stopPeriodicUpdate() +{ + if(!ourPeriodicUpdateThread) return; + ourPeriodicUpdateThread->stopRunning(); + delete ourPeriodicUpdateThread; + ourPeriodicUpdateThread = 0; +} + + + +AREXPORT double ArSystemStatus::getCPU() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + return ourCPU; +} + +AREXPORT double ArSystemStatus::getCPUPercent() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + if(ourCPU < 0) + { + return ourCPU; // invalid value indicator + } + return ourCPU * 100.0; +} + +// Get CPU percentage in a string +AREXPORT std::string ArSystemStatus::getCPUPercentAsString() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + if(ourCPU < 0) + { + return std::string("n/a"); + } + char tmp[32]; + snprintf(tmp, 31, "%.2f", getCPUPercent()); + return std::string(tmp); +} + +// Get total system uptime (seconds) +AREXPORT unsigned long ArSystemStatus::getUptime() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + return ourUptime; +} + +// Get total system uptime (hours) +AREXPORT double ArSystemStatus::getUptimeHours() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + return ourUptime / 3600.0; +} + +// Get total system uptime (seconds) +AREXPORT unsigned long ArSystemStatus::getProgramUptime() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + return ourUptime - ourFirstUptime; +} + +// Get total system uptime in a string (hours) +AREXPORT std::string ArSystemStatus::getUptimeHoursAsString() { + ArScopedLock lock(ourCPUMutex); + refreshCPU(); + char tmp[32]; + snprintf(tmp, 31, "%.2f", getUptimeHours()); + return std::string(tmp); +} + +// return Pointer to a functor which can be used to retrieve the current CPU percentage +AREXPORT ArRetFunctor* ArSystemStatus::getCPUPercentFunctor() { + return &ourGetCPUPercentCallback; +} + +// return Pointer to a functor which can be used to retrieve the current uptime (hours) +AREXPORT ArRetFunctor* ArSystemStatus::getUptimeHoursFunctor() { + return &ourGetUptimeHoursCallback; +} + +// return Pointer to a functor which can be used to retrieve the current uptime (seconds) +AREXPORT ArRetFunctor* ArSystemStatus::getUptimeFunctor() { + return &ourGetUptimeCallback; +} + +// return Pointer to a functor which can be used to retrieve the current program uptime (seconds) +AREXPORT ArRetFunctor* ArSystemStatus::getProgramUptimeFunctor() { + return &ourGetProgramUptimeCallback; +} + +AREXPORT ArRetFunctor* ArSystemStatus::getWirelessLinkQualityFunctor() { + return &ourGetWirelessLinkQualityCallback; +} +AREXPORT ArRetFunctor* ArSystemStatus::getWirelessLinkNoiseFunctor() { + return &ourGetWirelessLinkNoiseCallback; +} +AREXPORT ArRetFunctor* ArSystemStatus::getWirelessLinkSignalFunctor() { + return &ourGetWirelessLinkSignalCallback; +} + +// Get wireless stats from /proc/net/wireless: + +void ArSystemStatus::refreshWireless() +{ +#ifndef WIN32 + if(ourPeriodicUpdateThread && !ourShouldRefreshWireless) return; + FILE* fp = ArUtil::fopen("/proc/net/wireless", "r"); + if(!fp) + { + ArLog::log(ArLog::Terse, "ArSystemStatus: Error: Failed to open /proc/net/wireless!"); + ourShouldRefreshWireless = false; + return; + } + + // first two lines are header info + char line[256]; + if(! (fgets(line, 256, fp) && fgets(line, 256, fp)) ) + { + fclose(fp); + ourLinkQuality = ourLinkSignal = ourLinkNoise = + ourDiscardedTotal = ourDiscardedDecrypt = -1; + ourShouldRefreshWireless = false; + return; + } + + + // next line is info for first device + char id[32]; + unsigned int stat; + int disc_frag, disc_retry, disc_misc, missed; + disc_frag = disc_retry = disc_misc = missed = 0; + int r = fscanf(fp, "%31s %x %d. %d. %d. %d %d %d %d %d %d", + id, &stat, + &ourLinkQuality, &ourLinkSignal, &ourLinkNoise, + &ourDiscardedConflict, &ourDiscardedDecrypt, + &disc_frag, &disc_retry, &disc_misc, &missed) ; + fclose(fp); + if(r < 11) + ArLog::log(ArLog::Verbose, "ArSystemStatus: Warning: Failed to parse /proc/net/wireless (only %d out of 11 values parsed).", r); + if(ourDiscardedConflict == -1 || ourDiscardedDecrypt == -1) + ourDiscardedTotal = -1; + else + ourDiscardedTotal = ourDiscardedConflict + ourDiscardedDecrypt + + disc_frag + disc_retry + disc_misc; + ourShouldRefreshWireless = false; +#endif // WIN32 +} + + +AREXPORT int ArSystemStatus::getWirelessLinkQuality() { + ArScopedLock lock(ourWirelessMutex); + refreshWireless(); + return ourLinkQuality; +} + +AREXPORT int ArSystemStatus::getWirelessLinkSignal() { + ArScopedLock lock(ourWirelessMutex); + refreshWireless(); + return ourLinkSignal; +} + +AREXPORT int ArSystemStatus::getWirelessLinkNoise() { + ArScopedLock lock(ourWirelessMutex); + refreshWireless(); + return ourLinkNoise; +} + +AREXPORT int ArSystemStatus::getWirelessDiscardedPackets() { + ArScopedLock lock(ourWirelessMutex); + refreshWireless(); + return ourDiscardedTotal; +} + +AREXPORT int ArSystemStatus::getWirelessDiscardedPacketsBecauseNetConflict() { + ArScopedLock lock(ourWirelessMutex); + refreshWireless(); + return ourDiscardedConflict; +} + +AREXPORT void ArSystemStatus::invalidate() +{ + ArScopedLock lockc(ourCPUMutex); + ArScopedLock lockw(ourWirelessMutex); + ourShouldRefreshCPU = true; + ourShouldRefreshWireless = true; +} + diff --git a/Legacy/Aria/src/ArTCM2.cpp b/Legacy/Aria/src/ArTCM2.cpp new file mode 100644 index 0000000..1ba2e09 --- /dev/null +++ b/Legacy/Aria/src/ArTCM2.cpp @@ -0,0 +1,181 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ariaInternal.h" +#include "ariaUtil.h" +#include "ArTCM2.h" +#include "ArTCMCompassDirect.h" +#include "ArTCMCompassRobot.h" + +AREXPORT ArTCM2::ArTCM2() : + myHeading(0.0), + myPitch(0.0), + myRoll(0.0), + myXMag(0.0), + myYMag(0.0), + myZMag(0.0), + myTemperature(0.0), + myError(0), + myCalibrationH(0.0), + myCalibrationV(0.0), + myCalibrationM(0.0), + myHaveHeading(false), + myHavePitch(false), + myHaveRoll(false), + myHaveXMag(false), + myHaveYMag(false), + myHaveZMag(false), + myHaveTemperature(false), + myHaveCalibrationH(false), + myHaveCalibrationV(false), + myHaveCalibrationM(false), + myTimeLastPacket(0), + myPacCurrentCount(0), + myPacCount(0) +{ +} + +AREXPORT bool ArTCM2::connect() { return true; } +AREXPORT bool ArTCM2::blockingConnect(unsigned long) { return true; } + +AREXPORT ArCompassConnector::ArCompassConnector(ArArgumentParser *argParser) : + myArgParser(argParser), + myParseArgsCallback(this, &ArCompassConnector::parseArgs), + myLogArgsCallback(this, &ArCompassConnector::logOptions), + myDeviceType(None), + mySerialPort(ARTCM2_DEFAULT_SERIAL_PORT), + mySerialTCMReadFunctor(NULL), + myRobot(NULL) +{ + myParseArgsCallback.setName("ArCompassConnector"); + myLogArgsCallback.setName("ArCompassConnector"); + Aria::addParseArgsCB(&myParseArgsCallback); + Aria::addLogOptionsCB(&myLogArgsCallback); +} + +AREXPORT ArCompassConnector::~ArCompassConnector() { + if(mySerialTCMReadFunctor && myRobot) + { + myRobot->lock(); + myRobot->remSensorInterpTask(mySerialTCMReadFunctor); + delete mySerialTCMReadFunctor; + myRobot->unlock(); + } +} + +bool ArCompassConnector::parseArgs() +{ + if(!myArgParser) return false; + if(!myArgParser->checkParameterArgumentString("-compassPort", &mySerialPort)) return false; + char *deviceType = myArgParser->checkParameterArgument("-compassType"); + if(deviceType) + { + if(strcasecmp(deviceType, "robot") == 0) + myDeviceType = Robot; + else if(strcasecmp(deviceType, "serialtcm") == 0) + myDeviceType = SerialTCM; + else if(strcasecmp(deviceType, "tcm") == 0) + myDeviceType = SerialTCM; + else + { + ArLog::log(ArLog::Terse, "ArCompassConnector: Error: unrecognized -compassType option: %s. Valid values are robot and serialTCM.", deviceType); + return false; + } + } + return true; +} + +void ArCompassConnector::logOptions() +{ + ArLog::log(ArLog::Terse, "Compass options:"); + ArLog::log(ArLog::Terse, "-compassType \tSelect compass device type (default: robot)"); + ArLog::log(ArLog::Terse, "-compassPort \tSerial port for \"serialTCM\" type compass. (default: %s)", ARTCM2_DEFAULT_SERIAL_PORT); +} + +AREXPORT ArTCM2 *ArCompassConnector::create(ArRobot *robot) +{ + if(myDeviceType == None) + { + if(robot && robot->getRobotParams()) + { + const char *type = robot->getRobotParams()->getCompassType(); + if(type == NULL || strlen(type) == 0 || strcmp(type, "robot") == 0) + { + myDeviceType = Robot; + } + else if(strcmp(type, "serialTCM") == 0) + { + myDeviceType = SerialTCM; + const char *port = robot->getRobotParams()->getCompassPort(); + if(port == NULL || strlen(port) == 0) + mySerialPort = ARTCM2_DEFAULT_SERIAL_PORT; + else + mySerialPort = port; + } + else + { + ArLog::log(ArLog::Terse, "ArCompassConnector: Error: invalid compass type \"%s\" in robot parameters.", type); + return NULL; + } + } + else + { + myDeviceType = Robot; + } + } + + switch(myDeviceType) + { + case Robot: + ArLog::log(ArLog::Verbose, "ArCompassConnector: Using robot compass"); + return new ArTCMCompassRobot(robot); + case SerialTCM: + { + ArLog::log(ArLog::Verbose, "ArCompassConnector: Using TCM2 compass on serial port %s", mySerialPort); + ArTCMCompassDirect *newDirectTCM = new ArTCMCompassDirect(mySerialPort); + mySerialTCMReadFunctor = new ArRetFunctor1C(newDirectTCM, &ArTCMCompassDirect::read, 1); + robot->lock(); + robot->addSensorInterpTask("ArTCMCompassDirect read", 200, mySerialTCMReadFunctor); + myRobot = robot; + robot->unlock(); + return newDirectTCM; + } + case None: + default: + // break out of switch and print warning there + break; + } + ArLog::log(ArLog::Terse, "ArCompassConnector: Error: No compass type selected."); + return NULL; +} + +AREXPORT bool ArCompassConnector::connect(ArTCM2 *compass) const +{ + return compass->blockingConnect(); +} + diff --git a/Legacy/Aria/src/ArTCMCompassDirect.cpp b/Legacy/Aria/src/ArTCMCompassDirect.cpp new file mode 100644 index 0000000..3e38c82 --- /dev/null +++ b/Legacy/Aria/src/ArTCMCompassDirect.cpp @@ -0,0 +1,170 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArTCMCompassDirect.h" +#include "ArDeviceConnection.h" +#include "ArSerialConnection.h" +#include "ariaUtil.h" + +//#define DEBUG_ARTCMCOMPASSDIRECT 1 +//#define DEBUG_ARTCMCOMPASSDIRECT_STATS 1 + +#if defined(DEBUG_ARTCMCOMPASSDIRECT) || defined(DEBUG_ARTCMCOMPASSDIRECT_STATS) +void ArTCMCompassDirect_printTransUnprintable( const char *data, int size){ for(int i = 0; i < size; ++i) { if(data[i] < ' ' || data[i] > '~') { printf("[0x%X]", data[i] & 0xff); } else { putchar(data[i]); } }} +#endif + +AREXPORT ArTCMCompassDirect::ArTCMCompassDirect(ArDeviceConnection *devCon) : + myDeviceConnection(devCon), myCreatedOwnDeviceConnection(false), + myNMEAParser("ArTCMCompassDirect"), + myHCHDMHandler(this, &ArTCMCompassDirect::handleHCHDM) +{ + myNMEAParser.addHandler("HCHDM", &myHCHDMHandler); +} + +AREXPORT ArTCMCompassDirect::ArTCMCompassDirect(const char *serialPortName) : + myCreatedOwnDeviceConnection(true), + myNMEAParser("ArTCMCompassDirect"), + myHCHDMHandler(this, &ArTCMCompassDirect::handleHCHDM) +{ + ArSerialConnection *newSerialCon = new ArSerialConnection(); + newSerialCon->setPort(serialPortName); + newSerialCon->setBaud(9600); + myDeviceConnection = newSerialCon; + myNMEAParser.addHandler("HCHDM", &myHCHDMHandler); +} + + +AREXPORT ArTCMCompassDirect::~ArTCMCompassDirect() { + if(myCreatedOwnDeviceConnection && myDeviceConnection) + delete myDeviceConnection; +} + +bool ArTCMCompassDirect::sendTCMCommand(const char *fmt, ...) +{ + if(!myDeviceConnection) return false; + if(myDeviceConnection->getStatus() != ArDeviceConnection::STATUS_OPEN) return false; + va_list args; + va_start(args, fmt); + char buf[32]; + vsnprintf(buf, sizeof(buf)-1, fmt, args); + buf[sizeof(buf)-1] = 0; + return myDeviceConnection->write(buf, strlen(buf)); +} + +AREXPORT bool ArTCMCompassDirect::blockingConnect(unsigned long connectTimeout) +{ + ArTime start; + start.setToNow(); + if(!connect()) return false; + ArLog::log(ArLog::Normal, "ArTCMCompassDirect: Opened connection, waiting for initial data..."); + while((unsigned long)start.mSecSince() <= connectTimeout) + { + if(read(0) > 0) + return true; + ArUtil::sleep(100); + } + ArLog::log(ArLog::Terse, "ArTCMCompassDirect: Error: No response from compass after %dms.", connectTimeout); + return false; +} + + +AREXPORT bool ArTCMCompassDirect::connect() +{ + if(!myDeviceConnection) return false; + if(myDeviceConnection->getStatus() != ArDeviceConnection::STATUS_OPEN) + { + if(!myDeviceConnection->openSimple()) return false; + } + + if(!sendTCMCommand("h\r")) + return false; + + + // sp= is sampling/send rate, maximum of 8hz. sdo is output format (t for cm + // protocol or n for nmea). + if(!sendTCMCommand("h\rsp=8\rsn=m\rsdo=n\rgo\r")) + return false; + +#ifdef DEBUG_ARTCMCOMPASSDIRECT + char buf[640]; + memset(buf, 0, 640); + myDeviceConnection->read(buf, 640, 2000); + printf("Compass responded to init commands with: %s\n", buf); +#endif + + return true; +} + + + +AREXPORT void ArTCMCompassDirect::commandUserCalibration() +{ + sendTCMCommand("cc\rmpcal=e\rgo\r"); +} + +AREXPORT void ArTCMCompassDirect::commandStopCalibration() +{ + sendTCMCommand("h\rmpcal=d\rautocal=d\r"); +} + +AREXPORT void ArTCMCompassDirect::commandContinuousPackets() +{ + sendTCMCommand("go\r"); +} + +AREXPORT void ArTCMCompassDirect::commandOff() +{ + sendTCMCommand("h\r"); +} + +AREXPORT void ArTCMCompassDirect::commandOnePacket() +{ + sendTCMCommand("c?\r"); +} + +AREXPORT void ArTCMCompassDirect::commandAutoCalibration() +{ + sendTCMCommand("h\rcc\rautocal=e\r"); +} + +AREXPORT int ArTCMCompassDirect::read(unsigned int msWait) +{ + return myNMEAParser.parse(myDeviceConnection); +} + +void ArTCMCompassDirect::handleHCHDM(ArNMEAParser::Message m) +{ + myHeading = ArMath::fixAngle(atof((*m.message)[1].c_str())); +#ifdef DEBUG_ARTCMCOMPASSDIRECT + printf("XXX ArTCMCompassDirect: recieved HCHDM message with compass heading %f.\n", myHeading); +#endif + myHaveHeading = true; + incrementPacketCount(); + invokeHeadingDataCallbacks(myHeading); +} + diff --git a/Legacy/Aria/src/ArTCMCompassRobot.cpp b/Legacy/Aria/src/ArTCMCompassRobot.cpp new file mode 100644 index 0000000..67777d0 --- /dev/null +++ b/Legacy/Aria/src/ArTCMCompassRobot.cpp @@ -0,0 +1,80 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include "ArExport.h" +#include "ArCommands.h" +#include "ArRobot.h" +#include "ArTCMCompassRobot.h" + +AREXPORT ArTCMCompassRobot::ArTCMCompassRobot(ArRobot *robot) : + myPacketHandlerCB(this, &ArTCMCompassRobot::packetHandler) +{ + myRobot = robot; + myPacketHandlerCB.setName("ArTCMCompassRobot"); + if (myRobot != NULL) + myRobot->addPacketHandler(&myPacketHandlerCB); +} + +AREXPORT ArTCMCompassRobot::~ArTCMCompassRobot() +{ + if (myRobot != NULL) + myRobot->remPacketHandler(&myPacketHandlerCB); +} + +bool ArTCMCompassRobot::packetHandler(ArRobotPacket *packet) +{ + if (packet->getID() != 0xC0) + return false; + + myHeading = ArMath::fixAngle(packet->bufToByte2() / 10.0); + myPitch = ArMath::fixAngle(packet->bufToByte2() / 10.0); + myRoll = ArMath::fixAngle(packet->bufToByte2() / 10.0); + myXMag = packet->bufToByte2() / 100.0; + myYMag = packet->bufToByte2() / 100.0; + myZMag = packet->bufToByte2() / 100.0; + myTemperature = packet->bufToByte2() / 10.0; + myError = packet->bufToByte2(); + myCalibrationH = packet->bufToByte(); + myCalibrationV = packet->bufToByte(); + myCalibrationM = packet->bufToByte2() / 100.0; + + myHaveHeading = + myHavePitch = + myHaveRoll = + myHaveXMag = + myHaveYMag = + myHaveZMag = + myHaveTemperature = + myHaveCalibrationH = + myHaveCalibrationV = + myHaveCalibrationM = true; + + incrementPacketCount(); + + invokeHeadingDataCallbacks(myHeading); + return true; +} + diff --git a/Legacy/Aria/src/ArTcpConnection.cpp b/Legacy/Aria/src/ArTcpConnection.cpp new file mode 100644 index 0000000..52b634b --- /dev/null +++ b/Legacy/Aria/src/ArTcpConnection.cpp @@ -0,0 +1,274 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArTcpConnection.h" +#include "ArLog.h" +#include "ariaUtil.h" + +AREXPORT ArTcpConnection::ArTcpConnection() +{ + myStatus = STATUS_NEVER_OPENED; + buildStrMap(); + myOwnSocket = true; + mySocket = new ArSocket(); + setPortType("tcp"); +} + +AREXPORT ArTcpConnection::~ArTcpConnection() +{ + if (myOwnSocket) + delete mySocket; +} + +/** + This will make the connection use this socket, its useful for doing + funkier things with sockets but still being able to use a device + connection. + @param socket the socket to use +**/ +AREXPORT void ArTcpConnection::setSocket(ArSocket *socket) +{ + if (myOwnSocket) + { + delete mySocket; + myOwnSocket = false; + } + mySocket = socket; +} + +AREXPORT ArSocket *ArTcpConnection::getSocket(void) +{ + return mySocket; +} + +AREXPORT void ArTcpConnection::setStatus(int status) +{ + myStatus = status; +} + +AREXPORT void ArTcpConnection::setPort(const char *host, int port) +{ + myPortNum = port; + + if (host == NULL) + myHostName = "localhost"; + else + myHostName = host; + + char portBuf[1024]; + sprintf(portBuf, "%d", port); + + std::string portName; + portName = myHostName; + portName += ":"; + portName += portBuf; + setPortName(portName.c_str()); +} + +AREXPORT bool ArTcpConnection::openSimple(void) +{ + if (internalOpen() == 0) + return true; + else + return false; +} + +/** + @param host the hostname or IP address to connect to, if NULL (default) then localhost + @param port the port to connect to. (the default port, 8101, is the TCP port +number used by the wireless bridge device and by the simulator for robot +connection) + @return 0 for success, otherwise one of the open enums + @see getOpenMessage +*/ +AREXPORT int ArTcpConnection::open(const char *host, int port) +{ + setPort(host, port); + return internalOpen(); +} + +AREXPORT int ArTcpConnection::internalOpen(void) +{ + mySocket->init(); + + ArLog::log(ArLog::Verbose, "ArTcpConnection::internalOpen: Connecting to %s %d", myHostName.c_str(), myPortNum); + + if (mySocket->connect(const_cast(myHostName.c_str()), myPortNum, + ArSocket::TCP)) + { + myStatus = STATUS_OPEN; + mySocket->setNonBlock(); + mySocket->setNoDelay(true); + return 0; + } + + myStatus = STATUS_OPEN_FAILED; + switch(mySocket->getError()) + { + case ArSocket::NetFail: + return OPEN_NET_FAIL; + case ArSocket::ConBadHost: + return OPEN_BAD_HOST; + case ArSocket::ConNoRoute: + return OPEN_NO_ROUTE; + case ArSocket::ConRefused: + return OPEN_CON_REFUSED; + case ArSocket::NoErr: + ArLog::log(ArLog::Terse, "ArTcpConnection::open: No error!\n"); + default: + return -1; + } + +} + +void ArTcpConnection::buildStrMap(void) +{ + myStrMap[OPEN_NET_FAIL] = "Network failed."; + myStrMap[OPEN_BAD_HOST] = "Could not find host."; + myStrMap[OPEN_NO_ROUTE] = "No route to host."; + myStrMap[OPEN_CON_REFUSED] = "Connection refused."; +} + +AREXPORT const char *ArTcpConnection::getOpenMessage(int messageNumber) +{ + return myStrMap[messageNumber].c_str(); +} + +AREXPORT bool ArTcpConnection::close(void) +{ + myStatus = STATUS_CLOSED_NORMALLY; + return mySocket->close(); +} + +AREXPORT int ArTcpConnection::read(const char *data, unsigned int size, + unsigned int msWait) +{ + ArTime timeDone; + unsigned int bytesRead = 0; + int n; + + if (getStatus() != STATUS_OPEN) + { + ArLog::log(ArLog::Terse, + "ArTcpConnection::read: Attempt to use port that is not open."); + return -1; + } + + + int timeToWait; + timeDone.setToNow(); + if (!timeDone.addMSec(msWait)) { + ArLog::log(ArLog::Normal, + "ArTcpConnection::read() error adding msecs (%i)", + msWait); + } + + do + { + timeToWait = timeDone.mSecTo(); + if (timeToWait < 0) + timeToWait = 0; + // if the sockets empty don't read it, but pause some + if (mySocket->getFD() < 0) + { + ArLog::log(ArLog::Terse, + "ArTcpConnection::read: Attempt to read port that already closed. (%d)", timeToWait); + if (timeToWait > 0) + ArUtil::sleep(timeToWait); + return -1; + } + + n = mySocket->read(const_cast(data) + bytesRead, size - bytesRead, + timeToWait); + /*if (n == -1) + { + ArLog::log("ArTcpConnection::read: read failed."); + return -1; + } */ + //printf("%ld %d %d\n", timeDone.mSecTo(), n, size); + if (n != -1) + bytesRead += n; + if (bytesRead >= size) + return bytesRead; + } while (timeDone.mSecTo() >= 0); + + return bytesRead; +} + +AREXPORT int ArTcpConnection::write(const char *data, unsigned int size) +{ + int ret; + + if (getStatus() != STATUS_OPEN) + { + ArLog::log(ArLog::Terse, + "ArTcpConnection::write: Attempt to use port that is not open."); + return -1; + } + if ((ret = mySocket->write(data, size)) != -1) + return ret; + + ArLog::log(ArLog::Terse, "ArTcpConnection::write: Write failed, closing connection."); + close(); + return -1; +} + + +/** + @return the name of the host connected to + @see getPort +*/ +AREXPORT std::string ArTcpConnection::getHost(void) +{ + return myHostName; +} + +/** + @return the number of the port connected to + @see getHost +*/ +AREXPORT int ArTcpConnection::getPort(void) +{ + return myPortNum; +} + +AREXPORT int ArTcpConnection::getStatus(void) +{ + return myStatus; +} + +AREXPORT bool ArTcpConnection::isTimeStamping(void) +{ + return false; +} + +AREXPORT ArTime ArTcpConnection::getTimeRead(int index) +{ + ArTime now; + now.setToNow(); + return now; +} diff --git a/Legacy/Aria/src/ArThread.cpp b/Legacy/Aria/src/ArThread.cpp new file mode 100644 index 0000000..7d5e3db --- /dev/null +++ b/Legacy/Aria/src/ArThread.cpp @@ -0,0 +1,291 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +// ArThread.cc -- Thread classes + + +#include "ariaOSDef.h" +#include +#include +#include "ArThread.h" +#include "ArLog.h" + + +ArMutex ArThread::ourThreadsMutex; +ArThread::MapType ArThread::ourThreads; +#if defined(WIN32) && !defined(MINGW) +std::map ArThread::ourThreadHandles; +#endif +AREXPORT ArLog::LogLevel ArThread::ourLogLevel = ArLog::Verbose; // todo, instead of AREXPORT move accessors into .cpp? +std::string ArThread::ourUnknownThreadName = "unknown"; + +AREXPORT void ArThread::stopAll() +{ + MapType::iterator iter; + + ourThreadsMutex.lock(); + for (iter=ourThreads.begin(); iter != ourThreads.end(); ++iter) + (*iter).second->stopRunning(); + ourThreadsMutex.unlock(); +} + +AREXPORT void ArThread::joinAll() +{ + MapType::iterator iter; + ArThread *thread = self(); + ourThreadsMutex.lock(); + for (iter=ourThreads.begin(); iter != ourThreads.end(); ++iter) + { + if ((*iter).second->getJoinable() && thread && (thread != (*iter).second)) + { + (*iter).second->doJoin(); + } + } + ourThreads.clear(); + + // KMC I think that the insert was there because "thread" still exists + // but the entire map was cleared. + + // MPL BUG I'm not to sure why this insert was here, as far as I can + // tell all it would do is make it so you could join the threads + // then start them all up again, but I don't see much utility in + // that so I'm not going to worry about it now + + if (thread != NULL) { + addThreadToMap(thread->myThread, thread); // Note: Recursive lock of ourThreadsMutex! + //ourThreads.insert(MapType::value_type(thread->myThread, thread)); + } + ourThreadsMutex.unlock(); +} + +AREXPORT ArThread::ArThread(bool blockAllSignals) : + myRunning(false), + myJoinable(false), + myBlockAllSignals(blockAllSignals), + myStarted(false), + myFinished(false), + myStrMap(), + myFunc(0), + myThread(), +#if defined(WIN32) && !defined(MINGW) + myThreadHandle(0) +#else + myPID(0) +#endif + +{ +} + +AREXPORT ArThread::ArThread(ThreadType thread, bool joinable, + bool blockAllSignals) : + myRunning(false), + myJoinable(joinable), + myBlockAllSignals(blockAllSignals), + myStarted(false), + myFinished(false), + myStrMap(), + myFunc(0), + myThread(thread), +#if defined(WIN32) && !defined(MINGW) + myThreadHandle(0) +#else + myPID(0) +#endif +{ +} + +AREXPORT ArThread::ArThread(ArFunctor *func, bool joinable, + bool blockAllSignals) : + myRunning(false), + myJoinable(false), + myBlockAllSignals(blockAllSignals), + myStarted(false), + myFinished(false), + myStrMap(), + myFunc(func), + myThread(), +#if defined(WIN32) && !defined(MINGW) + myThreadHandle(0) +#else + myPID(0) +#endif +{ + create(func, joinable); +} + +#if !defined(WIN32) || defined(MINGW) +AREXPORT ArThread::~ArThread() +{ + // Just make sure the thread is no longer in the map. + removeThreadFromMap(myThread); + /* + ourThreadsMutex.lock(); + MapType::iterator iter = ourThreads.find(myThread); + if (iter != ourThreads.end()) { + ourThreads.erase(iter); + } + ourThreadsMutex.unlock(); + */ +} +#endif + +AREXPORT int ArThread::join(void **iret) +{ + int ret; + ret=doJoin(iret); + if (ret) + return(ret); + + removeThreadFromMap(myThread); + /* + ourThreadsMutex.lock(); + ourThreads.erase(myThread); + ourThreadsMutex.unlock(); + */ + + return(0); +} + +AREXPORT void ArThread::setThreadName(const char *name) +{ + myName = name; + std::string mutexLogName; + mutexLogName = name; + mutexLogName += "ThreadMutex"; + myMutex.setLogName(mutexLogName.c_str()); +} + +AREXPORT bool ArThread::isThreadStarted() const +{ + return myStarted; +} + +AREXPORT bool ArThread::isThreadFinished() const +{ + return myFinished; +} + +AREXPORT const char *ArThread::getThisThreadName(void) +{ + ArThread *self; + if ((self = ArThread::self()) != NULL) + return self->getThreadName(); + else + return ourUnknownThreadName.c_str(); +} + +AREXPORT const ArThread::ThreadType * ArThread::getThisThread(void) +{ + ArThread *self; + if ((self = ArThread::self()) != NULL) + return self->getThread(); + else + return NULL; +} + +AREXPORT ArThread::ThreadType ArThread::getThisOSThread(void) +{ + ArThread *self; + if ((self = ArThread::self()) != NULL) + return self->getOSThread(); + else +#ifdef MINGW + return {NULL, 0}; +#else + return 0; +#endif +} + + +// ourThreads is a vector on MINGW and a map on Linux and Windows (where native ThreadType just happens to be a scalar and usable as a key in a map) + +#ifdef MINGW + +ArThread* ArThread::findThreadInMap(ThreadType t) +{ + ourThreadsMutex.lock(); + for(MapType::iterator i = ourThreads.begin(); i != ourThreads.end(); ++i) + { + if(pthread_equal(t, (*i).first)) + { + ourThreadsMutex.unlock(); + return (*i).second; + } + } + ourThreadsMutex.unlock(); + return NULL; +} + +void ArThread::removeThreadFromMap(ThreadType t) +{ + ourThreadsMutex.lock(); + MapType::iterator found = ourThreads.end(); + for(MapType::iterator i = ourThreads.begin(); i != ourThreads.end(); ++i) + if(pthread_equal(t, (*i).first)) + found = i; + if(found != ourThreads.end()) + ourThreads.erase(found); + ourThreadsMutex.unlock(); +} + +void ArThread::addThreadToMap(ThreadType pt, ArThread *at) +{ + ourThreadsMutex.lock(); + ourThreads.push_back(std::pair(pt, at)); + ourThreadsMutex.unlock(); +} + +#else + +ArThread* ArThread::findThreadInMap(ThreadType pt) +{ + ourThreadsMutex.lock(); + MapType::iterator iter = ourThreads.find(pt); + ArThread *r = NULL; + if (iter != ourThreads.end()) + r = (*iter).second; + ourThreadsMutex.unlock(); + return r; +} + +void ArThread::removeThreadFromMap(ThreadType t) +{ + ourThreadsMutex.lock(); + MapType::iterator iter = ourThreads.find(t); + if (iter != ourThreads.end()) { + ourThreads.erase(iter); + } + ourThreadsMutex.unlock(); +} + +void ArThread::addThreadToMap(ThreadType pt, ArThread *at) +{ + ourThreadsMutex.lock(); + ourThreads[pt] = at; + ourThreadsMutex.unlock(); +} + +#endif \ No newline at end of file diff --git a/Legacy/Aria/src/ArThread_LIN.cpp b/Legacy/Aria/src/ArThread_LIN.cpp new file mode 100644 index 0000000..1946620 --- /dev/null +++ b/Legacy/Aria/src/ArThread_LIN.cpp @@ -0,0 +1,348 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +// ArThread.cc -- Thread classes + + +#include +#include +#include +#include +#include +#include "ariaOSDef.h" +#include "ArThread.h" +#include "ArLog.h" +#include "ArSignalHandler.h" + +#ifndef MINGW +#include +#endif + +static void * run(void *arg) +{ + ArThread *t=(ArThread*)arg; + void *ret=NULL; + + if (t->getBlockAllSignals()) + ArSignalHandler::blockCommonThisThread(); + + if (dynamic_cast*>(t->getFunc())) + ret=((ArRetFunctor*)t->getFunc())->invokeR(); + else + t->getFunc()->invoke(); + + return(ret); +} + + +/** + Initializes the internal structures which keep track of what thread is + what. This is called by Aria::init(), so the user will not normaly need + to call this function themselves. This funtion *must* be called from the + main thread of the application. In otherwords, it should be called by + main(). +*/ +void ArThread::init() +{ + ArThread *main; + ThreadType pt; + + pt=pthread_self(); + + ourThreadsMutex.setLogName("ArThread::ourThreadsMutex"); + + ourThreadsMutex.lock(); + if (ourThreads.size()) + { + ourThreadsMutex.unlock(); + return; + } + main=new ArThread; + main->myJoinable=true; + main->myRunning=true; + main->myThread=pt; + addThreadToMap(pt, main); // Recursive lock! + //ourThreads.insert(MapType::value_type(pt, main)); + ourThreadsMutex.unlock(); +} + + +AREXPORT void ArThread::shutdown() +{ + /*** This is the _WIN code. Something similar (or identical?) should + *** probably be implemented here. + + ourThreadsMutex.lock(); + + // At this point, the ourThreads map should only contain the main thread + // that was created in init (presuming that joinAll was called, from + // the main thread). + // + // Do not use deleteSetPairs because this causes the ourThreads map + // to be updated recursively (because the destructor updates the map). + // + std::list threadList; + + for (MapType::iterator mapIter = ourThreads.begin(); + mapIter != ourThreads.end(); + mapIter++) { + if (mapIter->second != NULL) { + threadList.push_back(mapIter->second); + } + } + for (std::list::iterator listIter = threadList.begin(); + listIter != threadList.end(); + listIter++) { + delete (*listIter); + } + if (!ourThreads.empty()) { + ArLog::log(ArLog::Normal, + "ArThread::shutdown() unexpected thread leftover"); + } + ourThreadsMutex.unlock(); + + ***/ + +} // end method shutdown + +/** + If a newly created thread calls self() on itself too soon, this will return + NULL. This is due to the fact that the thread is first created and started. + Then the operating system returns the thread ID and thread that called + create() then updates the list of threads with the new thread ID. There + is just not much that can be done about that. The use should be aware of + this caveat. + + Note that this does a lookup on the thread map, so it might be a + little slow, if you need to use this a lot you should probably use + osSelf instead. +*/ +ArThread * ArThread::self() +{ + return findThreadInMap(pthread_self()); + /* + ThreadType pt; + MapType::iterator iter; + + ourThreadsMutex.lock(); + pt=pthread_self(); + iter=ourThreads.find(pt); + ourThreadsMutex.unlock(); + + if (iter != ourThreads.end()) + return((*iter).second); + else + return(NULL); +*/ +} + +/** + This returns the OS thread, and should be used in place of self if + its being used a lot. +**/ +ArThread::ThreadType ArThread::osSelf() +{ + return pthread_self(); +} + +void ArThread::cancelAll() +{ + MapType::iterator iter; + + ourThreadsMutex.lock(); + for (iter=ourThreads.begin(); iter != ourThreads.end(); ++iter) + { + pthread_cancel((*iter).first); + (*iter).second->stopRunning(); + } + ourThreads.clear(); + ourThreadsMutex.unlock(); +} + +int ArThread::create(ArFunctor *func, bool joinable, bool lowerPriority) +{ + int ret; + pthread_attr_t attr; + + pthread_attr_init(&attr); + if (joinable) + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + else + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + myJoinable=joinable; + myFunc=func; + myRunning=true; + if (myBlockAllSignals) + { + ArSignalHandler::blockCommonThisThread(); + } + if ((ret=pthread_create(&myThread, &attr, &run, this)) != 0) + { + pthread_attr_destroy(&attr); + if (ret == EAGAIN) + { + ArLog::log(ArLog::Terse, "ArThread::create: Error in create, not enough system resources in pthread_create() (EAGAIN)"); + return(STATUS_NORESOURCE); + } + else if(ret == ENOMEM) + { + ArLog::log(ArLog::Terse, "ArThread::create: Error in create, not enough system resources in pthread_create() (ENOMEM)"); + return(STATUS_NORESOURCE); + } + else + { + ArLog::log(ArLog::Terse, "ArThread::create: Unknown error in create."); + return(STATUS_FAILED); + } + } + else + { + if (myName.size() == 0) + { + ArLog::log(ourLogLevel, "Created anonymous thread with ID %d", + myThread); + //ArLog::logBacktrace(ArLog::Normal); + } + else + { + ArLog::log(ourLogLevel, "Created %s thread with ID %d", myName.c_str(), + myThread); + } + addThreadToMap(myThread, this); + /* + ourThreadsMutex.lock(); + ourThreads.insert(MapType::value_type(myThread, this)); + ourThreadsMutex.unlock(); + */ + pthread_attr_destroy(&attr); + return(0); + } +} + +int ArThread::doJoin(void **iret) +{ + int ret; + if ((ret=pthread_join(myThread, iret)) != 0) + { + if (ret == ESRCH) + { + ArLog::log(ArLog::Terse, "ArThread::join: Error in join: No such thread found"); + return(STATUS_NO_SUCH_THREAD); + } + else if (ret == EINVAL) + { + ArLog::log(ArLog::Terse, "ArThread::join: Error in join: Thread is detached or another thread is waiting"); + return(STATUS_INVALID); + } + else if (ret == EDEADLK) + { + ArLog::log(ArLog::Terse, "ArThread::join: Error in join: Trying to join on self"); + return(STATUS_JOIN_SELF); + } + } + + return(0); +} + +int ArThread::detach() +{ + int ret; + + if ((ret=pthread_detach(myThread)) != 0) + { + if (ret == ESRCH) + { + ArLog::log(ArLog::Terse, "ArThread::detach: Error in detach: No such thread found"); + return(STATUS_NO_SUCH_THREAD); + } + else if (ret == EINVAL) + { + ArLog::log(ArLog::Terse, "ArThread::detach: Error in detach: ArThread is already detached"); + return(STATUS_ALREADY_DETATCHED); + } + } + + myJoinable=false; + return(0); +} + +void ArThread::cancel() +{ + removeThreadFromMap(myThread); + /* + ourThreadsMutex.lock(); + ourThreads.erase(myThread); + ourThreadsMutex.unlock(); + */ + pthread_cancel(myThread); +} + +void ArThread::yieldProcessor() +{ + sched_yield(); +} + +AREXPORT void ArThread::threadStarted(void) +{ + myStarted = true; + myPID = getpid(); + // MPL 12/3/2012 gettid isn't implemented, but there's a hack with syscall + //myTID = gettid(); +#ifdef MINGW + myTID = -1; +#else + myTID = (pid_t) syscall(SYS_gettid); +#endif + if (myName.size() == 0) + ArLog::log(ourLogLevel, "Anonymous thread (%d) is running with pid %d tid %d", + myThread, myPID, myTID); + else + ArLog::log(ourLogLevel, "Thread %s (%d) is running with pid %d tid %d", + myName.c_str(), myThread, myPID, myTID); +} + +AREXPORT void ArThread::threadFinished(void) +{ + myFinished = true; + /// 12/3/2012 MPL Taking this out since it should be set already + //myPID = getpid(); + if (myName.size() == 0) + ArLog::log(ourLogLevel, "Anonymous thread (%d) with pid %d tid %d has finished", + myThread, myPID, myTID); + else + ArLog::log(ourLogLevel, "Thread %s (%d) with pid %d tid %d has finished", + myName.c_str(), myThread, myPID, myTID); +} + +AREXPORT void ArThread::logThreadInfo(void) +{ + if (myName.size() == 0) + ArLog::log(ourLogLevel, "Anonymous thread (%d) is running with pid %d tid %d", + myThread, myPID, myTID); + else + ArLog::log(ourLogLevel, "Thread %s (%d) is running with pid %d %d", + myName.c_str(), myThread, myPID, myTID); +} diff --git a/Legacy/Aria/src/ArThread_WIN.cpp b/Legacy/Aria/src/ArThread_WIN.cpp new file mode 100644 index 0000000..dcabf67 --- /dev/null +++ b/Legacy/Aria/src/ArThread_WIN.cpp @@ -0,0 +1,266 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include +#include "ArThread.h" +#include "ArLog.h" +#include "ArSignalHandler.h" +#include "ariaUtil.h" + + +static DWORD WINAPI run(void *arg) +{ + ArThread *t=(ArThread*)arg; + void *ret=NULL; + + if (t->getBlockAllSignals()) + ArSignalHandler::blockCommonThisThread(); + + if (dynamic_cast*>(t->getFunc())) + ret=((ArRetFunctor*)t->getFunc())->invokeR(); + else + t->getFunc()->invoke(); + + return((DWORD)ret); +} + +void ArThread::init() +{ + ArThread *main; + ThreadType pt; + MapType::iterator iter; + + pt=GetCurrentThreadId(); + + ourThreadsMutex.lock(); + if (ourThreads.size()) + { + ourThreadsMutex.unlock(); + return; + } + main=new ArThread; + main->myJoinable=true; + main->myRunning=true; + main->myThread=pt; + ourThreads.insert(MapType::value_type(pt, main)); + ourThreadsMutex.unlock(); +} + +AREXPORT void ArThread::shutdown() +{ + ourThreadsMutex.lock(); + + // At this point, the ourThreads map should only contain the main thread + // that was created in init (presuming that joinAll was called, from + // the main thread). + // + // Do not use deleteSetPairs because this causes the ourThreads map + // to be updated recursively (because the destructor updates the map). + // + std::list threadList; + + for (MapType::iterator mapIter = ourThreads.begin(); + mapIter != ourThreads.end(); + mapIter++) { + if (mapIter->second != NULL) { + threadList.push_back(mapIter->second); + } + } + for (std::list::iterator listIter = threadList.begin(); + listIter != threadList.end(); + listIter++) { + delete (*listIter); + } + if (!ourThreads.empty()) { + ArLog::log(ArLog::Normal, + "ArThread::shutdown() unexpected thread leftover"); + } + ourThreadsMutex.unlock(); + +} // end method shutdown + + +AREXPORT ArThread::~ArThread() +{ + CloseHandle(myThreadHandle); + + // Just make sure the thread is no longer in the map. + ourThreadsMutex.lock(); + ourThreads.erase(myThread); + ourThreadsMutex.unlock(); +} + + +AREXPORT ArThread * ArThread::self() +{ + ThreadType pt; + MapType::iterator iter; + + ourThreadsMutex.lock(); + pt=GetCurrentThreadId(); + iter=ourThreads.find(pt); + ourThreadsMutex.unlock(); + + if (iter != ourThreads.end()) + return((*iter).second); + else + return(NULL); +} + +AREXPORT ArThread::ThreadType ArThread::osSelf() +{ + return GetCurrentThreadId(); +} + +AREXPORT void ArThread::cancelAll() +{ + DWORD ret=0; + std::map::iterator iter; + + ourThreadsMutex.lock(); + for (iter=ourThreadHandles.begin(); iter != ourThreadHandles.end(); ++iter) + TerminateThread((*iter).first, ret); + ourThreadHandles.clear(); + ourThreads.clear(); + ourThreadsMutex.unlock(); +} + + +AREXPORT int ArThread::create(ArFunctor *func, bool joinable, + bool lowerPriority) +{ + // Log a warning (until desired behavior is determined) + if (myThreadHandle != 0) { + ArLog::log(ArLog::Terse, "ArThread::create: Thread %s (ID %d) already created.", + (myName.empty() ? "[anonymous]" : myName.c_str()), + myThread); + } + + + DWORD err; + + myJoinable=joinable; + myFunc=func; + myRunning=true; + + myThreadHandle = CreateThread(0, 0, &run, this, 0, &myThread); + err=GetLastError(); + if (myThreadHandle == 0) + { + ArLog::log(ArLog::Terse, "ArThread::create: Failed to create thread."); + return(STATUS_FAILED); + } + else + { + if (myName.size() == 0) + { + ArLog::log(ourLogLevel, "Created anonymous thread with ID %d", + myThread); + //ArLog::logBacktrace(ArLog::Normal); + } + else + { + ArLog::log(ourLogLevel, "Created %s thread with ID %d", myName.c_str(), + myThread); + } + ourThreadsMutex.lock(); + ourThreads.insert(MapType::value_type(myThread, this)); + ourThreadHandles.insert(std::map::value_type(myThreadHandle, this)); + ourThreadsMutex.unlock(); + if (lowerPriority) + SetThreadPriority(myThreadHandle, THREAD_PRIORITY_IDLE); + return(0); + } +} + +AREXPORT int ArThread::doJoin(void **iret) +{ + DWORD ret; + + ret=WaitForSingleObject(myThreadHandle, INFINITE); + if (ret == WAIT_FAILED) + { + ArLog::log(ArLog::Terse, "ArThread::doJoin: Failed to join on thread."); + return(STATUS_FAILED); + } + + return(0); +} + +AREXPORT int ArThread::detach() +{ + return(0); +} + +AREXPORT void ArThread::cancel() +{ + DWORD ret=0; + + ourThreadsMutex.lock(); + ourThreads.erase(myThread); + ourThreadHandles.erase(myThreadHandle); + ourThreadsMutex.unlock(); + TerminateThread(myThreadHandle, ret); +} + +AREXPORT void ArThread::yieldProcessor() +{ + Sleep(0); +} + + +AREXPORT void ArThread::threadStarted(void) +{ + myStarted = true; + if (myName.size() == 0) + ArLog::log(ourLogLevel, "Anonymous thread (%d) is running", + myThread); + else + ArLog::log(ourLogLevel, "Thread %s (%d) is running", + myName.c_str(), myThread); +} + +AREXPORT void ArThread::threadFinished(void) +{ + myFinished = true; + if (myName.size() == 0) + ArLog::log(ourLogLevel, "Anonymous thread (%d) is finished", + myThread); + else + ArLog::log(ourLogLevel, "Thread %s (%d) is finished", + myName.c_str(), myThread); +} + +AREXPORT void ArThread::logThreadInfo(void) +{ + if (myName.size() == 0) + ArLog::log(ourLogLevel, "Anonymous thread (%d) is running", + myThread); + else + ArLog::log(ourLogLevel, "Thread %s (%d) is running", + myName.c_str(), myThread); +} diff --git a/Legacy/Aria/src/ArTransform.cpp b/Legacy/Aria/src/ArTransform.cpp new file mode 100644 index 0000000..f097ce2 --- /dev/null +++ b/Legacy/Aria/src/ArTransform.cpp @@ -0,0 +1,88 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArTransform.h" + +AREXPORT void ArTransform::doTransform(std::list *poseList) +{ + std::list::iterator it; + ArPose *pose; + + for (it = poseList->begin(); it != poseList->end(); it++) + { + pose = (*it); + *pose = doTransform(*pose); + } + +} + +AREXPORT void ArTransform::doTransform(std::list *poseList) +{ + std::list::iterator it; + ArPoseWithTime *pose; + + for (it = poseList->begin(); it != poseList->end(); it++) + { + pose = (*it); + *pose = doTransform(*pose); + } + +} + +/** + @param pose the coord system from which we transform to abs world coords +*/ +AREXPORT void ArTransform::setTransform(ArPose pose) +{ + myTh = pose.getTh(); + myCos = ArMath::cos(-myTh); + mySin = ArMath::sin(-myTh); + myX = pose.getX(); + myY = pose.getY(); +} + +/** + @param pose1 transform this into pose2 + @param pose2 transform pose1 into this +*/ +AREXPORT void ArTransform::setTransform(ArPose pose1, ArPose pose2) +{ + myTh = ArMath::subAngle(pose2.getTh(), pose1.getTh()); + myCos = ArMath::cos(-myTh); + mySin = ArMath::sin(-myTh); + myX = pose2.getX() - (myCos * pose1.getX() + mySin * pose1.getY()); + myY = pose2.getY() - (myCos * pose1.getY() - mySin * pose1.getX()); +} + +AREXPORT void ArTransform::setTransformLowLevel(double x, double y, double th) +{ + myTh = th; + myCos = ArMath::cos(-myTh); + mySin = ArMath::sin(-myTh); + myX = x; + myY = y; +} diff --git a/Legacy/Aria/src/ArTrimbleGPS.cpp b/Legacy/Aria/src/ArTrimbleGPS.cpp new file mode 100644 index 0000000..0c96927 --- /dev/null +++ b/Legacy/Aria/src/ArTrimbleGPS.cpp @@ -0,0 +1,190 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArTrimbleGPS.h" +#include "ArDeviceConnection.h" + +//#define DEBUG_ARTRIMBLEGPS 1 + +#ifdef DEBUG_ARTRIMBLEGPS +void ArTrimbleGPS_printTransUnprintable( const char *data, int size){ for(int i = 0; i < size; ++i) { if(data[i] < ' ' || data[i] > '~') { printf("[0x%X]", data[i] & 0xff); } else { putchar(data[i]); } }} +#endif + +AREXPORT ArTrimbleGPS::ArTrimbleGPS() : + myAuxDataHandler(this, &ArTrimbleGPS::handlePTNLAG001) +{ + myMutex.setLogName("ArTrimbleGPS::myMutex"); + addNMEAHandler("PTNLAG001", &myAuxDataHandler); +} + +AREXPORT ArTrimbleGPS::~ArTrimbleGPS() { +} + + +AREXPORT bool ArTrimbleGPS::initDevice() +{ + if (!ArGPS::initDevice()) return false; + + const int maxpktlen = 10; + char cmd[maxpktlen]; + + + /* These commands may not do anything, if the firmware configuration (set + * using AgRemote) takes precedence: + */ + + // Enable automatic switching between DGPS and non-DGPS: + memset(cmd, 0, maxpktlen); + const int dgpspktlen = 5; + cmd[0] = 0x10; + cmd[1] = 0x62; + cmd[2] = 3; // mode 3 (automatic) + //cmd[2] = 1; // mode 1 (dgps only) + cmd[3] = 0x10; // packet terminators + cmd[4] = 0x03; + if(myDevice->write(cmd, dgpspktlen) < dgpspktlen) + return false; + + // Enable WAAS? + + + // Enable NMEA output for some messages that we know the ArGPS class + // uses. See TSIP manual (Rev C), table 2-106 on pg 2-62. The special message PTNLAG001 + // is always sent if data from a second device is recieved and the port + // protocols/formats are set up correctly. These commands may not actually + // have any effect if the messages are selected in the configuration using + // AgRemote anyway. + const ArTypes::Byte4 maskGGA = 0x00000001; + const ArTypes::Byte4 maskGSV = 0x00000008; + const ArTypes::Byte4 maskGSA = 0x00000010; + const ArTypes::Byte4 maskRMC = 0x00000080; + const ArTypes::Byte4 maskGST = 0x00000400; + const ArTypes::Byte4 maskMSS = 0x00001000; + const ArTypes::Byte4 mask = maskGGA|maskGSA|maskRMC|maskGSV|maskMSS|maskGST; + const int nmeapktlen = 10; + cmd[0] = (char)0x10; // command header + cmd[1] = (char)0x7A; // general NMEA command id + cmd[2] = (char)0x80; // subcommand to set NMEA outputs + //cmd[3] = 1; // 1-second interval + cmd[3] = 0; // output at position fixrate (i.e. as fast as GPS can calculate them) + cmd[4] = (char) (mask << 24); // MSB, if on little-endian architecture (BUG if ported!) + cmd[5] = (char) (mask << 16); + cmd[6] = (char) (mask << 8); + cmd[7] = (char) mask; + cmd[8] = (char)0x10; // packet terminators + cmd[9] = (char)0x03; + // (note, byte 0x10 is special, and if any of the bytes in mask was 0x10, + // it would have to be preceded by an extra 0x10 byte. see TSIP reference + // manual section 1.4.1). with the currently set value, none of the bytes of mask + // will have value 0x10. + +#ifdef DEBUG_ARTRIMBLEGPS + printf("XXX ArTrimbleGPS sending command: hdr=0x%x, id=0x%x, sid=0x%x, int=%d, mask1=0x%x, mask2=0x%x, mask3=0x%x, mask=0x%x [<-those four bytes should match mask 0x%x, but with MSB first], tail1=0x%x, tail2=0x%x.\n", + (int)cmd[0] & 0xFF, (int)cmd[1] & 0xFF, (int)cmd[2] & 0xFF, + (int)cmd[3] & 0xFF, (int)cmd[4] & 0xFF, (int)cmd[5] & 0xFF, + (int)cmd[6] & 0xFF, (int)cmd[7] & 0xFF, mask, + (int)cmd[8] & 0xFF, (int)cmd[9] & 0xFF); +#endif + + if(myDevice->write(cmd, nmeapktlen) < nmeapktlen) + return false; + + + + + return true; +} + + + +/* Instead of just merging input from a secondary device, which is + * part of the design of NMEA and which would make life easy, Trimble + * wraps messages in a proprietary message PTNLAG001. This handler + * just re-serializes the contents of that message and bounces + * it back to ArGPS for further parsing. + */ +void ArTrimbleGPS::handlePTNLAG001(ArNMEAParser::Message m) +{ + ArNMEAParser::MessageVector *message = m.message; + if(message->size() < 2) return; + std::string text; + size_t len = 0; + // Undo split by commas, skip msg[0] which is "PTNLAG001" + for(ArNMEAParser::MessageVector::const_iterator i = message->begin() + 1; i != message->end(); ++i) + { + if(i != message->begin()) text += ","; + text += *i; + len += (*i).length() + 1; + } +#ifdef DEBUG_ARTRIMBLEGPS + printf("XXXXXXXXX Got PTNLAG001 contents from Trimble, %d bytes: %s\n", len, text.c_str()); +#endif + + // Reparse contents. Note, this will clobber NMEA parser state, including + // *message, so after calling this we can't do anything else with it. (So + // exit the function) + text += "\r\n"; + len += 2; + myNMEAParser.parse(text.c_str(), len); +} + + +AREXPORT bool ArTrimbleGPS::sendTSIPCommand(char cmd, const char *data, size_t size) +{ +#ifdef DEBUG_ARTRIMBLEGPS + ArLog::log(ArLog::Normal, "ArTrimbleGPS sending command 0x%X to GPS, with data:", cmd & 0xFF); + printf("\t"); + ArTrimbleGPS_printTransUnprintable(data, size); + puts(""); +#endif + + // TODO check these writes return values + // + char hdr[2]; + hdr[0] = 0x10; + hdr[1] = cmd; + getDeviceConnection()->write(hdr, 2); + // Since the 0x10 byte is TSIP signals the end of the command, need to + // "escape" it by doubling it. So write data in segments, with a double 0x10 + // between each. + const char *nextSegment = strchr(data, '\x10'); + const char *dataStart = data; + while(nextSegment) + { + getDeviceConnection()->write(data, nextSegment - data); + getDeviceConnection()->write("\x10\x10", 2); + data = nextSegment + 1; + nextSegment = strchr(data, '\x10'); + } + // Write the last segment, if it exists + getDeviceConnection()->write(data, dataStart + size - data); + getDeviceConnection()->write("\x10\x03", 2); // command suffix + + return true; +} + diff --git a/Legacy/Aria/src/ArUrg.cpp b/Legacy/Aria/src/ArUrg.cpp new file mode 100644 index 0000000..31a146e --- /dev/null +++ b/Legacy/Aria/src/ArUrg.cpp @@ -0,0 +1,816 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArUrg.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" + +AREXPORT ArUrg::ArUrg(int laserNumber, const char *name) : + ArLaser(laserNumber, name, 4095), + mySensorInterpTask(this, &ArUrg::sensorInterp), + myAriaExitCB(this, &ArUrg::disconnect) +{ + clear(); + myRawReadings = NULL; + + Aria::addExitCallback(&myAriaExitCB, -10); + + laserSetName(getName()); + + setParams(); + setSensorPosition(0, 0, 0); + + laserAllowSetDegrees(-120, -135, 135, // default, min and max start degrees + 120, -135, 135); // default, min and max end degrees + + laserAllowSetIncrement(1, 0, 135); + + std::list baudChoices; + baudChoices.push_back("019200"); + baudChoices.push_back("057600"); + baudChoices.push_back("115200"); + baudChoices.push_back("250000"); + baudChoices.push_back("500000"); + baudChoices.push_back("750000"); + laserAllowStartingBaudChoices("019200", baudChoices); + + laserAllowAutoBaudChoices("057600", baudChoices); + + + setMinDistBetweenCurrent(0); + setMaxDistToKeepCumulative(4000); + setMinDistBetweenCumulative(200); + setMaxSecondsToKeepCumulative(30); + setMaxInsertDistCumulative(3000); + + setCumulativeCleanDist(75); + setCumulativeCleanInterval(1000); + setCumulativeCleanOffset(600); + + resetLastCumulativeCleanTime(); + + setCurrentDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0xaa, 0xaa), + 70, // mm diameter of dots + 77), true); + setCumulativeDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0x55, 0x55), + 100, // mm diameter of dots + 62), true); + + //myLogMore = false; + myLogMore = true; +} + +AREXPORT ArUrg::~ArUrg() +{ + Aria::remExitCallback(&myAriaExitCB); + if (myRobot != NULL) + { + myRobot->remRangeDevice(this); + myRobot->remLaser(this); + myRobot->remSensorInterpTask(&mySensorInterpTask); + } + if (myRawReadings != NULL) + { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + lockDevice(); + if (isConnected()) + disconnect(); + unlockDevice(); +} + +AREXPORT void ArUrg::laserSetName(const char *name) +{ + myName = name; + + myConnMutex.setLogNameVar("%s::myConnMutex", getName()); + myReadingMutex.setLogNameVar("%s::myReadingMutex", getName()); + myDataMutex.setLogNameVar("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar("%s::exitCallback", getName()); + + ArLaser::laserSetName(getName()); +} + +AREXPORT bool ArUrg::setParams( + double startingDegrees, double endingDegrees, + double incrementDegrees, bool flipped) +{ + if (startingDegrees < -135.0 || startingDegrees > 135.0 || + endingDegrees < -135.0 || startingDegrees > 135.0 || + incrementDegrees < 0.0) + { + ArLog::log(ArLog::Normal, + "%s::setParams: Bad params (starting %g ending %g clusterCount %g)", + getName(), startingDegrees, endingDegrees, incrementDegrees); + return false; + } + double startingStepRaw; + double endingStepRaw; + int startingStep; + int endingStep; + int clusterCount; + + startingStepRaw = -(startingDegrees - 135.0) / .3515625; + endingStepRaw = -(endingDegrees - 135.0) / .3515625; + startingStep = (int)ceil(ArUtil::findMin(startingStepRaw, endingStepRaw)); + endingStep = (int)floor(ArUtil::findMax(startingStepRaw, endingStepRaw)); + clusterCount = ArMath::roundInt(incrementDegrees / .3515625); + + ArLog::log(ArLog::Verbose, "%s: starting deg %.1f raw %.1f step %d ending deg %.1f raw %.1f step %d, cluster deg %f count %d flipped %d", + getName(), startingDegrees, startingStepRaw, startingStep, endingDegrees, endingStepRaw, endingStep, incrementDegrees, clusterCount, flipped); + + return setParamsBySteps(startingStep, endingStep, clusterCount, flipped); +} + +AREXPORT bool ArUrg::setParamsBySteps(int startingStep, int endingStep, + int clusterCount, bool flipped) +{ + if (startingStep < 0 || startingStep > 768 || + endingStep < 0 || endingStep > 768 || + startingStep > endingStep || + clusterCount < 1) + { + ArLog::log(ArLog::Normal, + "%s::setParamsBySteps: Bad params (starting %d ending %d clusterCount %d)", + getName(), startingStep, endingStep, clusterCount); + return false; + } + + myDataMutex.lock(); + myStartingStep = startingStep; + myEndingStep = endingStep; + myClusterCount = clusterCount; + myFlipped = flipped; + sprintf(myRequestString, "G%03d%03d%02d", myStartingStep, endingStep, + clusterCount); + myClusterMiddleAngle = 0; + if (myClusterCount > 1) + myClusterMiddleAngle = myClusterCount * 0.3515625 / 2.0; + + if (myRawReadings != NULL) + { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + + myRawReadings = new std::list; + + + ArSensorReading *reading; + int onStep; + double angle; + + for (onStep = myStartingStep; + onStep < myEndingStep; + onStep += myClusterCount) + { + /// FLIPPED + if (!myFlipped) + angle = ArMath::subAngle(ArMath::subAngle(135, onStep * 0.3515625), + myClusterMiddleAngle); + else + angle = ArMath::addAngle(ArMath::addAngle(-135, onStep * 0.3515625), + myClusterMiddleAngle); + + reading = new ArSensorReading; + reading->resetSensorPosition(ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), + ArMath::addAngle(angle, + mySensorPose.getTh())); + myRawReadings->push_back(reading); + //printf("%.1f ", reading->getSensorTh()); + } + + + myDataMutex.unlock(); + return true; +} + +void ArUrg::clear(void) +{ + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; + + myVendor = ""; + myProduct = ""; + myFirmwareVersion = ""; + myProtocolVersion = ""; + mySerialNumber = ""; + myStat = ""; +} + +AREXPORT void ArUrg::log(void) +{ + ArLog::log(ArLog::Normal, "URG %s:", getName()); + ArLog::log(ArLog::Normal, "Vendor information: %s", myVendor.c_str()); + ArLog::log(ArLog::Normal, "Product information: %s", myProduct.c_str()); + ArLog::log(ArLog::Normal, "Firmware version: %s", myFirmwareVersion.c_str()); + ArLog::log(ArLog::Normal, "Protocol Version: %s", myProtocolVersion.c_str()); + ArLog::log(ArLog::Normal, "Serial number: %s", mySerialNumber.c_str()); + ArLog::log(ArLog::Normal, "Stat: %s", myStat.c_str()); +} + +AREXPORT void ArUrg::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask("urg", 90, &mySensorInterpTask); + ArRangeDevice::setRobot(robot); +} + +bool ArUrg::writeLine(const char *str) +{ + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Attempt to write string to null connection", getName()); + return false; + } + + bool ret = true; + size_t len = strlen(str); + + myConnMutex.lock(); + if (myConn->write(str, len) < len || + myConn->write("\n", 1) < 1) + ret = false; + myConnMutex.unlock(); + return ret; +} + +bool ArUrg::readLine(char *buf, unsigned int size, + unsigned int msWait) +{ + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Attempt to read line from null connection", getName()); + return false; + } + + ArTime started; + started.setToNow(); + + buf[0] = '\0'; + unsigned int onChar = 0; + int ret; + + myConnMutex.lock(); + while ((msWait == 0 || started.mSecSince() < (int)msWait) && + onChar < size) + { + if ((ret = myConn->read(&buf[onChar], 1, 0)) > 0) + { + if (buf[onChar] == '\n' || + buf[onChar] == '\r') + { + //buf[onChar+1] = '\0'; + buf[onChar] = '\0'; + if (myLogMore) + ArLog::log(ArLog::Normal, "%s: '%s'", getName(), buf); + myConnMutex.unlock(); + return true; + } + onChar++; + } + if (ret < 0) + { + ArLog::log(ArLog::Normal, "%s: bad ret", getName()); + myConnMutex.unlock(); + return false; + } + if (ret == 0) + ArUtil::sleep(1); + } + myConnMutex.unlock(); + return false; +} + +bool ArUrg::sendCommandAndRecvStatus( + const char *command, const char *commandDesc, + char *buf, unsigned int size, unsigned int msWait) +{ + bool ret; + ArTime start; + + // send the command + if (!writeLine(command)) + { + ArLog::log(ArLog::Normal, "%s: Could not send %s", getName(), + commandDesc); + return false; + } + + // try and read the command back + if (!readLine(buf, size, msWait)) + { + ArLog::log(ArLog::Normal, "%s: Received no response to %s (in %d but really %d)", + getName(), commandDesc, msWait, start.mSecSince()); + return false; + } + + // make sure the command back matches + if (strcasecmp(buf, command) != 0) + { + ArLog::log(ArLog::Normal, "%s: Received bad echo to %s (command %s got back %s)", + getName(), commandDesc, command, buf); + return false; + } + + // get the status from that command back + if (!readLine(buf, size, msWait)) + { + ArLog::log(ArLog::Normal, + "%s: Did not receive status back from %s", + getName(), commandDesc); + return false; + } + + return true; +} + +AREXPORT bool ArUrg::blockingConnect(void) +{ + if (!getRunning()) + runAsync(); + + myConnMutex.lock(); + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + + if (serConn != NULL) + serConn->setBaud(atoi(getStartingBaudChoice())); + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN && + !myConn->openSimple()) + { + ArLog::log(ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + myConnMutex.unlock(); + + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + + laserPullUnsetParamsFromRobot(); + laserCheckParams(); + + setParams(getStartDegrees(), getEndDegrees(), getIncrement(), getFlipped()); + + ArUtil::sleep(100); + + bool connected = false; + + if (internalConnect()) + connected = true; + + if (connected) + { + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s: Connected to laser", getName()); + laserConnect(); + return true; + } + else + { + failedToConnect(); + return false; + } +} + + +bool ArUrg::internalConnect(void) + +{ + bool ret = true; + char buf[1024]; + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + + bool alreadyAtAutobaud = false; + + // empty the buffer... + buf[0] = '\0'; + while (readLine(buf, sizeof(buf), 1)); + + if (!(ret = sendCommandAndRecvStatus( + "V", "version request", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "0") != 0) + { + // if we didn't get it, try it at what the autobaud rate is + if (serConn != NULL) + { + alreadyAtAutobaud = true; + serConn->setBaud(atoi(getAutoBaudChoice())); + ArUtil::sleep(100); + + if (!(ret = sendCommandAndRecvStatus( + "V", "version request after falling back to autobaudchoice", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "0") != 0) + { + if (ret && strcasecmp(buf, "0") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on version response after falling back to autobaudchoice", + getName()); + return false; + } + } + // if we don't have a serial port, then we can't change the baud, + // so just fail + else + { + if (ret && strcasecmp(buf, "0") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on version response (%s)", + getName(), buf); + return false; + } + } + + if (!alreadyAtAutobaud && serConn != NULL) + { + + // empty the buffer from the last version request + while (readLine(buf, sizeof(buf), 100)); + + // now change the baud... + sprintf(buf, "S%06d7654321", atoi(getAutoBaudChoice())); + if (!writeLine(buf)) + return false; + + ArUtil::sleep(100); + + //serConn->setBaud(115200); + serConn->setBaud(atoi(getAutoBaudChoice())); + // wait a second for the baud to change... + ArUtil::sleep(100); + + // empty the buffer from the baud change + while (readLine(buf, sizeof(buf), 100)); + + if (!(ret = sendCommandAndRecvStatus( + "V", "version request after switching to autobaudchoice", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "0") != 0) + { + if (ret && strcasecmp(buf, "0") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on version response after switching to autobaudchoice", + getName()); + return false; + } + + ArLog::log(ArLog::Normal, "%s: Switched to %s baud rate", + getName(), getAutoBaudChoice()); + } + + while (readLine(buf, sizeof(buf), 10000)) + { + /// MPL put this in instead of the following because of the + /// behavior change of readline + if (strlen(buf) == 0) + break; + + if (strncasecmp(buf, "VEND:", strlen("VEND:")) == 0) + myVendor = &buf[5]; + else if (strncasecmp(buf, "PROD:", strlen("PROD:")) == 0) + myProduct = &buf[5]; + else if (strncasecmp(buf, "FIRM:", strlen("FIRM:")) == 0) + myFirmwareVersion = &buf[5]; + else if (strncasecmp(buf, "PROT:", strlen("PROT:")) == 0) + myProtocolVersion = &buf[5]; + else if (strncasecmp(buf, "SERI:", strlen("SERI:")) == 0) + mySerialNumber = &buf[5]; + else if (strncasecmp(buf, "STAT:", strlen("STAT:")) == 0) + myStat = &buf[5]; + } + + if (myVendor.empty() || myProduct.empty() || myFirmwareVersion.empty() || + myProtocolVersion.empty() || mySerialNumber.empty()) + { + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Missing information in version response", + getName()); + return false; + } + + log(); + + myLogMore = true; + // myLogMore = false; + ArUtil::sleep(100); + + + printf("myRequestString %s\n", myRequestString); + + + if (!(ret = sendCommandAndRecvStatus( + myRequestString, "request distance reading", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "0") != 0) + { + if (ret && strcasecmp(buf, "0") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on distance reading response (%c)", + getName(), buf[0]); + return false; + } + + myLogMore = false; + + ArTime started; + started.setToNow(); + while (started.secSince() < 10 && readLine(buf, sizeof(buf), 10000)) + { + if (strlen(buf) == 0) + return true; + } + + ArLog::log(ArLog::Normal, "%s::blockingConnect: Did not get distance reading back", + getName(), buf[0]); + return false; +} + + +AREXPORT bool ArUrg::asyncConnect(void) +{ + myStartConnect = true; + if (!getRunning()) + runAsync(); + return true; +} + +AREXPORT bool ArUrg::disconnect(void) +{ + if (!isConnected()) + return true; + + ArLog::log(ArLog::Normal, "%s: Disconnecting", getName()); + + bool ret; + + char buf[2048]; + sprintf(buf, "S%06d7654321", atoi(getStartingBaudChoice())); + ret = writeLine(buf); + laserDisconnectNormally(); + return ret; + +} + +void ArUrg::sensorInterp(void) +{ + ArTime readingRequested; + std::string reading; + myReadingMutex.lock(); + if (myReading.empty()) + { + myReadingMutex.unlock(); + return; + } + + readingRequested = myReadingRequested; + reading = myReading; + myReading = ""; + myReadingMutex.unlock(); + + ArTime time = readingRequested; + ArPose pose; + int ret; + int retEncoder; + ArPose encoderPose; + + //time.addMSec(-13); + if (myRobot == NULL || !myRobot->isConnected()) + { + pose.setPose(0, 0, 0); + encoderPose.setPose(0, 0, 0); + } + else if ((ret = myRobot->getPoseInterpPosition(time, &pose)) < 0 || + (retEncoder = + myRobot->getEncoderPoseInterpPosition(time, &encoderPose)) < 0) + { + ArLog::log(ArLog::Normal, "%s: reading too old to process", getName()); + return; + } + + ArTransform transform; + transform.setTransform(pose); + + unsigned int counter = 0; + if (myRobot != NULL) + counter = myRobot->getCounter(); + + lockDevice(); + myDataMutex.lock(); + + //double angle; + int i; + int len = reading.size(); + + int range; + int big; + int little; + //int onStep; + + std::list::reverse_iterator it; + ArSensorReading *sReading; + + bool ignore; + for (it = myRawReadings->rbegin(), i = 0; + it != myRawReadings->rend() && i < len - 1; + it++, i += 2) + { + ignore = false; + big = reading[i] - 0x30; + little = reading[i+1] - 0x30; + range = (big << 6 | little); + if (range < 20) + { + /* Well that didn't work... + // if the range is 1 to 5 that means it has low intensity, which + // could be black or maybe too far... try ignoring it and see if + // it helps with too much clearing + if (range >= 1 || range <= 5) + ignore = true; + */ + range = 4096; + } + sReading = (*it); + sReading->newData(range, pose, encoderPose, transform, counter, + time, ignore, 0); + } + + myDataMutex.unlock(); + + laserProcessReadings(); + unlockDevice(); +} + +AREXPORT void * ArUrg::runThread(void *arg) +{ + while (getRunning()) + { + lockDevice(); + if (myStartConnect) + { + myStartConnect = false; + myTryingToConnect = true; + unlockDevice(); + + blockingConnect(); + + lockDevice(); + myTryingToConnect = false; + unlockDevice(); + continue; + } + unlockDevice(); + + if (!myIsConnected) + { + ArUtil::sleep(100); + continue; + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (laserCheckLostConnection()) + { + ArLog::log(ArLog::Terse, + "%s: Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince()/1000.0, + getConnectionTimeoutSeconds()); + myIsConnected = false; + laserDisconnectOnError(); + continue; + } + + internalGetReading(); + + ArUtil::sleep(1); + + } + return NULL; +} + +bool ArUrg::internalGetReading(void) +{ + ArTime readingRequested; + std::string reading; + char buf[1024]; + + reading = ""; + readingRequested.setToNow(); + if (!writeLine(myRequestString)) + { + ArLog::log(ArLog::Terse, "Could not send request distance reading to urg"); + return false; + } + + if (!readLine(buf, sizeof(buf), 10000) || + strcasecmp(buf, myRequestString) != 0) + { + ArLog::log(ArLog::Normal, "%s: Did not get distance reading response", + getName()); + return false; + } + + if (!readLine(buf, sizeof(buf), 10000) || + strcasecmp(buf, "0") != 0) + { + ArLog::log(ArLog::Normal, + "%s: Bad status on distance reading response (%c)", + getName(), buf[0]); + return false; + } + + while (readLine(buf, sizeof(buf), 10000)) + { + if (strlen(buf) == 0) + { + myReadingMutex.lock(); + myReadingRequested = readingRequested; + myReading = reading; + myReadingMutex.unlock(); + if (myRobot == NULL) + sensorInterp(); + return true; + } + else + { + reading += buf; + } + } + + return false; +} + +void ArUrg::failedToConnect(void) +{ + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + laserFailedConnect(); +} + +bool ArUrg::laserCheckParams(void) +{ + laserSetAbsoluteMaxRange(4095); + return true; +} diff --git a/Legacy/Aria/src/ArUrg_2_0.cpp b/Legacy/Aria/src/ArUrg_2_0.cpp new file mode 100644 index 0000000..000029a --- /dev/null +++ b/Legacy/Aria/src/ArUrg_2_0.cpp @@ -0,0 +1,1065 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArUrg_2_0.h" +#include "ArRobot.h" +#include "ArSerialConnection.h" +#include "ariaInternal.h" + +AREXPORT ArUrg_2_0::ArUrg_2_0(int laserNumber, const char *name) : + ArLaser(laserNumber, name, 262144), + mySensorInterpTask(this, &ArUrg_2_0::sensorInterp), + myAriaExitCB(this, &ArUrg_2_0::disconnect) +{ + clear(); + myRawReadings = NULL; + + Aria::addExitCallback(&myAriaExitCB, -10); + + laserSetName(getName()); + + setSensorPosition(0, 0, 0); + + laserAllowSetDegrees(-180, -180, 180, // start degrees + 180, -180, 180); // end degrees + + laserAllowSetIncrement(1, 0, 180); + + std::list baudChoices; + baudChoices.push_back("0"); + baudChoices.push_back("019200"); + baudChoices.push_back("057600"); + baudChoices.push_back("115200"); + baudChoices.push_back("250000"); + baudChoices.push_back("500000"); + baudChoices.push_back("750000"); + laserAllowStartingBaudChoices("0", baudChoices); + + laserAllowAutoBaudChoices("0", baudChoices); + + + setMinDistBetweenCurrent(0); + setMaxDistToKeepCumulative(4000); + setMinDistBetweenCumulative(200); + setMaxSecondsToKeepCumulative(30); + setMaxInsertDistCumulative(3000); + + setCumulativeCleanDist(75); + setCumulativeCleanInterval(1000); + setCumulativeCleanOffset(600); + + resetLastCumulativeCleanTime(); + + setCurrentDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0xaa, 0xaa), + 70, // mm diameter of dots + 77), true); + setCumulativeDrawingData( + new ArDrawingData("polyDots", + ArColor(0, 0x55, 0x55), + 100, // mm diameter of dots + 62), true); + + myLogMore = false; + //myLogMore = true; +} + +AREXPORT ArUrg_2_0::~ArUrg_2_0() +{ + Aria::remExitCallback(&myAriaExitCB); + if (myRobot != NULL) + { + myRobot->remRangeDevice(this); + myRobot->remLaser(this); + myRobot->remSensorInterpTask(&mySensorInterpTask); + } + if (myRawReadings != NULL) + { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + lockDevice(); + if (isConnected()) + disconnect(); + unlockDevice(); +} + +AREXPORT void ArUrg_2_0::laserSetName(const char *name) +{ + myName = name; + + myConnMutex.setLogNameVar("%s::myConnMutex", getName()); + myReadingMutex.setLogNameVar("%s::myReadingMutex", getName()); + myDataMutex.setLogNameVar("%s::myDataMutex", getName()); + myAriaExitCB.setNameVar("%s::exitCallback", getName()); + + ArLaser::laserSetName(getName()); +} + +AREXPORT bool ArUrg_2_0::setParams( + double startingDegrees, double endingDegrees, + double incrementDegrees, bool flipped) +{ + if (startingDegrees < -180.0 || startingDegrees > 180.0 || + endingDegrees < -180.0 || startingDegrees > 180.0 || + incrementDegrees < 0.0) + { + ArLog::log(ArLog::Normal, + "%s::setParams: Bad params (starting %g ending %g incrementDegrees %g)", + getName(), startingDegrees, endingDegrees, incrementDegrees); + return false; + } + double startingStepRaw; + double endingStepRaw; + int startingStep; + int endingStep; + int clusterCount; + + //startingStepRaw = -(startingDegrees - 135.0) / .3515625; + startingStepRaw = -(startingDegrees - myStepFirst) / myStepSize; + //endingStepRaw = -(endingDegrees - 135.0) / .3515625; + endingStepRaw = -(endingDegrees - myStepFirst) / myStepSize; + startingStep = (int)ceil(ArUtil::findMin(startingStepRaw, endingStepRaw)); + endingStep = (int)floor(ArUtil::findMax(startingStepRaw, endingStepRaw)); + //clusterCount = ArMath::roundInt(incrementDegrees / .3515625); + clusterCount = ArMath::roundInt(incrementDegrees / myStepSize); + if (clusterCount < 1) + clusterCount = 1; + + ArLog::LogLevel logLevel; + if (myLogMore) + logLevel = ArLog::Normal; + else + logLevel = ArLog::Verbose; + + ArLog::log(logLevel, "%s: starting deg %.1f raw %.1f step %d ending deg %.1f raw %.1f step %d, cluster deg %f count %d flipped %d", + getName(), startingDegrees, startingStepRaw, startingStep, endingDegrees, endingStepRaw, endingStep, incrementDegrees, clusterCount, flipped); + + return setParamsBySteps(startingStep, endingStep, clusterCount, flipped); +} + +AREXPORT bool ArUrg_2_0::setParamsBySteps(int startingStep, int endingStep, + int clusterCount, bool flipped) +{ + if (startingStep > endingStep || clusterCount < 1) + { + ArLog::log(ArLog::Normal, + "%s::setParamsBySteps: Bad params (starting %d ending %d clusterCount %d)", + getName(), startingStep, endingStep, clusterCount); + return false; + } + + if (startingStep < myAMin) + startingStep = myAMin; + if (endingStep > myAMax) + endingStep = myAMax; + + myDataMutex.lock(); + myStartingStep = startingStep; + myEndingStep = endingStep; + myClusterCount = clusterCount; + myFlipped = flipped; + //sprintf(myRequestString, "G%03d%03d%02d", myStartingStep, endingStep, + //clusterCount); + + int baudRate = 0; + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + if (serConn != NULL) + baudRate = serConn->getBaud(); + + // only use the three data bytes if our range needs it, and if the baud rate can support it + if (myMaxRange > 4095 && (baudRate == 0 || baudRate > 57600)) + { + myUseThreeDataBytes = true; + sprintf(myRequestString, "MD%04d%04d%02d%01d%02d", + myStartingStep, myEndingStep, myClusterCount, + 0, // scan interval + 0 // number of scans to send (forever) + ); + } + else + { + myUseThreeDataBytes = false; + if (myMaxRange > 4094) + myMaxRange = 4094; + sprintf(myRequestString, "MS%04d%04d%02d%01d%02d", + myStartingStep, myEndingStep, myClusterCount, + 0, // scan interval + 0 // number of scans to send (forever) + ); + } + + myClusterMiddleAngle = 0; + if (myClusterCount > 1) + //myClusterMiddleAngle = myClusterCount * 0.3515625 / 2.0; + myClusterMiddleAngle = myClusterCount * myStepSize / 2.0; + + if (myRawReadings != NULL) + { + ArUtil::deleteSet(myRawReadings->begin(), myRawReadings->end()); + myRawReadings->clear(); + delete myRawReadings; + myRawReadings = NULL; + } + + myRawReadings = new std::list; + + + ArSensorReading *reading; + int onStep; + double angle; + + for (onStep = myStartingStep; + onStep < myEndingStep; + onStep += myClusterCount) + { + /// FLIPPED + if (!myFlipped) + //angle = ArMath::subAngle(ArMath::subAngle(135, + // onStep * 0.3515625), + angle = ArMath::subAngle(ArMath::subAngle(myStepFirst, + onStep * myStepSize), + myClusterMiddleAngle); + else + //angle = ArMath::addAngle(ArMath::addAngle(-135, + // onStep * 0.3515625), + angle = ArMath::addAngle(ArMath::addAngle(-myStepFirst, + onStep * myStepSize), + myClusterMiddleAngle); + + reading = new ArSensorReading; + reading->resetSensorPosition(ArMath::roundInt(mySensorPose.getX()), + ArMath::roundInt(mySensorPose.getY()), + ArMath::addAngle(angle, + mySensorPose.getTh())); + myRawReadings->push_back(reading); + //printf("%.1f ", reading->getSensorTh()); + } + + + myDataMutex.unlock(); + return true; +} + +void ArUrg_2_0::clear(void) +{ + myIsConnected = false; + myTryingToConnect = false; + myStartConnect = false; + + myVendor = ""; + myProduct = ""; + myFirmwareVersion = ""; + myProtocolVersion = ""; + mySerialNumber = ""; + myStat = ""; + + myModel = ""; + myDMin = 0; + myDMax = 0; + myARes = 0; + myAMin = 0; + myAMax = 0; + myAFront = 0; + myScan = 0; +} + +AREXPORT void ArUrg_2_0::log(void) +{ + ArLog::log(ArLog::Normal, "URG %s:", getName()); + ArLog::log(ArLog::Normal, "Vendor information: %s", myVendor.c_str()); + ArLog::log(ArLog::Normal, "Product information: %s", myProduct.c_str()); + ArLog::log(ArLog::Normal, "Firmware version: %s", myFirmwareVersion.c_str()); + ArLog::log(ArLog::Normal, "Protocol Version: %s", myProtocolVersion.c_str()); + ArLog::log(ArLog::Normal, "Serial number: %s", mySerialNumber.c_str()); + if (!myStat.empty()) + ArLog::log(ArLog::Normal, "Stat: %s", myStat.c_str()); + ArLog::log(ArLog::Normal, "Model: %s:", myModel.c_str()); + ArLog::log(ArLog::Normal, "Distance min: %d", myDMin); + ArLog::log(ArLog::Normal, "Distance max: %d", myDMax); + ArLog::log(ArLog::Normal, "Angular resolution: %d", myARes); + ArLog::log(ArLog::Normal, "Angle min step: %d", myAMin); + ArLog::log(ArLog::Normal, "Angle max step: %d", myAMax); + ArLog::log(ArLog::Normal, "Angle front step: %d", myAFront); + ArLog::log(ArLog::Normal, "Scanning speed: %d", myScan); + + ArLog::log(ArLog::Normal, "Calculated first step: %g", myStepFirst); + ArLog::log(ArLog::Normal, "Calculated step size: %g", myStepSize); + +} + +AREXPORT void ArUrg_2_0::setRobot(ArRobot *robot) +{ + myRobot = robot; + if (myRobot != NULL) + myRobot->addSensorInterpTask("urg2.0", 90, &mySensorInterpTask); + ArRangeDevice::setRobot(robot); +} + +bool ArUrg_2_0::writeLine(const char *str) +{ + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Attempt to write string to null connection", getName()); + return false; + } + + bool ret = true; + size_t len = strlen(str); + + myConnMutex.lock(); + if (myConn->write(str, len) < len || + myConn->write("\n", 1) < 1) + ret = false; + myConnMutex.unlock(); + return ret; +} + +/** + @param buf the buffer to put the data into + @param size the size of the buffer + @param msWait how long to wait for the data + @param noChecksum whether there is a checksum on this data or not + (there isn't on command echos) + @param stripLastSemicolon Some responses (to VV and PP) have a + semicolon to separate the string from the checksum... but that + semicolon is NOT included in the checksum, and shouldn't be + included in the string... + @param firstByte if given record time at which first byte was received to +this ArTime objects. +**/ +bool ArUrg_2_0::readLine(char *buf, unsigned int size, + unsigned int msWait, bool noChecksum, + bool stripLastSemicolon, ArTime *firstByte) +{ + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Attempt to read line from null connection", getName()); + return false; + } + + ArTime started; + started.setToNow(); + + buf[0] = '\0'; + unsigned int onChar = 0; + int ret; + + //long int rawCheckSum = 0; + unsigned char rawCheckSum = 0; + char checkSum; + unsigned int i; + unsigned int iMax; + + myConnMutex.lock(); + while ((msWait == 0 || started.mSecSince() < (int)msWait) && + onChar < size) + { + if ((ret = myConn->read(&buf[onChar], 1, 0)) > 0) + { + if (onChar == 0 && firstByte != NULL) + firstByte->setToNow(); + if (buf[onChar] == '\n' || + buf[onChar] == '\r') + { + //buf[onChar+1] = '\0'; + buf[onChar] = '\0'; + if (!noChecksum && onChar >= 1) + { + if (stripLastSemicolon && + onChar > 2 && buf[onChar - 2] == ';') + iMax = onChar - 2; + else + iMax = onChar - 1; + + // find the checksum + for (i = 0; i < iMax; i++) + rawCheckSum += buf[i]; + + // see if it matches onChar - 1, then NULL out onchar -1 + checkSum = (rawCheckSum & 0x3f) + 0x30; + + if ((checkSum) != buf[onChar - 1]) + { + ArLog::log(ArLog::Normal, + "%s: Bad checksum on '%s' it should be %c", + getName(), buf, checkSum); + myConnMutex.unlock(); + return false; + } + // null out the checksum so it doesn't mess up other parsing + buf[onChar - 1] = '\0'; + + if (stripLastSemicolon && + onChar >= 2 && buf[onChar - 2] == ';') + { + buf[onChar - 2] = '\0'; + } + } + if (myLogMore) + ArLog::log(ArLog::Normal, "%s: '%s'", getName(), buf); + myConnMutex.unlock(); + return true; + } + onChar++; + } + if (ret < 0) + { + ArLog::log(ArLog::Normal, "%s: bad ret", getName()); + myConnMutex.unlock(); + return false; + } + if (ret == 0) + ArUtil::sleep(1); + } + myConnMutex.unlock(); + return false; +} + +bool ArUrg_2_0::sendCommandAndRecvStatus( + const char *command, const char *commandDesc, + char *buf, unsigned int size, unsigned int msWait) +{ + ArTime start; + + // send the command + if (!writeLine(command)) + { + ArLog::log(ArLog::Normal, "%s: Could not send %s", getName(), + commandDesc); + return false; + } + + // try and read the command back (no checksum on the echo) + if (!readLine(buf, size, msWait, true, false)) + { + ArLog::log(ArLog::Normal, "%s: Received no response to %s (in %d but really %d)", + getName(), commandDesc, msWait, start.mSecSince()); + return false; + } + + // make sure the command back matches + if (strcasecmp(buf, command) != 0) + { + ArLog::log(ArLog::Normal, "%s: Received bad echo to %s (command %s got back %s)", + getName(), commandDesc, command, buf); + return false; + } + + // get the status from that command back + if (!readLine(buf, size, msWait, false, false)) + { + ArLog::log(ArLog::Normal, + "%s: Did not receive status back from %s", + getName(), commandDesc); + return false; + } + + return true; +} + +AREXPORT bool ArUrg_2_0::blockingConnect(void) +{ + if (!getRunning()) + runAsync(); + + myConnMutex.lock(); + if (myConn == NULL) + { + ArLog::log(ArLog::Terse, + "%s: Could not connect because there is no connection defined", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + + // if we have a starting baud and are a serial port, then change the + // baud rate... not by default this will set it to 0 baud which'll + // cause the serial stuff not to touch it + if (serConn != NULL) + serConn->setBaud(atoi(getStartingBaudChoice())); + + if (myConn->getStatus() != ArDeviceConnection::STATUS_OPEN && + !myConn->openSimple()) + { + ArLog::log(ArLog::Terse, + "%s: Could not connect because the connection was not open and could not open it", + getName()); + myConnMutex.unlock(); + failedToConnect(); + return false; + } + myConnMutex.unlock(); + + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + + laserPullUnsetParamsFromRobot(); + laserCheckParams(); + + ArUtil::sleep(100); + + bool connected = false; + + if (internalConnect()) + connected = true; + + if (connected) + { + lockDevice(); + myIsConnected = true; + myTryingToConnect = false; + unlockDevice(); + ArLog::log(ArLog::Normal, "%s: Connected to laser", getName()); + laserConnect(); + return true; + } + else + { + failedToConnect(); + return false; + } +} + + +bool ArUrg_2_0::internalConnect(void) + +{ + bool ret = true; + char buf[1024]; + + + ArSerialConnection *serConn = NULL; + serConn = dynamic_cast(myConn); + + bool alreadyAtAutobaud = false; + + + + // empty the buffer... + /* + sendCommandAndRecvStatus( + "RS", "reset", + buf, sizeof(buf), 1000); + readLine(buf, sizeof(buf), 1, true, false); + + sendCommandAndRecvStatus( + "SCIP2.0", "SCIP 2.0 request", + buf, sizeof(buf), 1000); + */ + + writeLine("RS"); + ArUtil::sleep(100); + + writeLine("SCIP2.0"); + ArUtil::sleep(100); + + ArTime startedFlushing; + + while (readLine(buf, sizeof(buf), 1, true, false) || + startedFlushing.mSecSince() < 1000); + + buf[0] = '\0'; + + if (!(ret = sendCommandAndRecvStatus( + "VV", "version request", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "00") != 0) + { + // if we didn't get it and have an autobaud, try it at what the autobaud rate is + if (serConn != NULL && atoi(getAutoBaudChoice()) > 0) + { + alreadyAtAutobaud = true; + serConn->setBaud(atoi(getAutoBaudChoice())); + ArUtil::sleep(100); + + writeLine("RS"); + ArUtil::sleep(100); + + writeLine("SCIP2.0"); + ArUtil::sleep(100); + + startedFlushing.setToNow(); + while (readLine(buf, sizeof(buf), 1, true, false) || + startedFlushing.mSecSince() < 1000); + + if (!(ret = sendCommandAndRecvStatus( + "VV", "version request after falling back to autobaudchoice", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "00") != 0) + { + if (ret && strcasecmp(buf, "00") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on version response after falling back to autobaudchoice", + getName()); + return false; + } + } + // if we don't have a serial port or no autobaud then we can't + // change the baud, so just fail + else + { + if (ret && strcasecmp(buf, "00") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on version response (%s)", + getName(), buf); + return false; + } + } + + // if we want to autobaud, then give it a whirl + if (!alreadyAtAutobaud && serConn != NULL && atoi(getAutoBaudChoice()) > 0) + { + + // empty the buffer from the last version request + while (readLine(buf, sizeof(buf), 100, true, false)); + + // now change the baud... + sprintf(buf, "SS%06d", atoi(getAutoBaudChoice())); + if (!writeLine(buf)) + return false; + + ArUtil::sleep(100); + + //serConn->setBaud(115200); + serConn->setBaud(atoi(getAutoBaudChoice())); + // wait a second for the baud to change... + ArUtil::sleep(100); + + // empty the buffer from the baud change + while (readLine(buf, sizeof(buf), 100, true, false)); + + if (!(ret = sendCommandAndRecvStatus( + "VV", "version request after switching to autobaudchoice", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "00") != 0) + { + if (ret && strcasecmp(buf, "00") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on version response after switching to autobaudchoice", + getName()); + return false; + } + + ArLog::log(ArLog::Verbose, "%s: Switched to %s baud rate", + getName(), getAutoBaudChoice()); + } + + while (readLine(buf, sizeof(buf), 10000, false, true)) + { + if (strlen(buf) == 0) + break; + + if (strncasecmp(buf, "VEND:", strlen("VEND:")) == 0) + myVendor = &buf[5]; + else if (strncasecmp(buf, "PROD:", strlen("PROD:")) == 0) + myProduct = &buf[5]; + else if (strncasecmp(buf, "FIRM:", strlen("FIRM:")) == 0) + myFirmwareVersion = &buf[5]; + else if (strncasecmp(buf, "PROT:", strlen("PROT:")) == 0) + myProtocolVersion = &buf[5]; + else if (strncasecmp(buf, "SERI:", strlen("SERI:")) == 0) + mySerialNumber = &buf[5]; + else if (strncasecmp(buf, "STAT:", strlen("STAT:")) == 0) + myStat = &buf[5]; + } + + if (myVendor.empty() || myProduct.empty() || myFirmwareVersion.empty() || + myProtocolVersion.empty() || mySerialNumber.empty()) + { + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Missing information in version response", + getName()); + return false; + } + + if (!(ret = sendCommandAndRecvStatus( + "PP", "parameter info request", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "00") != 0) + { + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad response to parameter info request", + getName()); + return false; + } + + while (readLine(buf, sizeof(buf), 10000, false, true)) + { + if (strlen(buf) == 0) + break; + + if (strncasecmp(buf, "MODL:", strlen("MODL:")) == 0) + myModel = &buf[5]; + else if (strncasecmp(buf, "DMIN:", strlen("DMIN:")) == 0) + myDMin = atoi(&buf[5]); + else if (strncasecmp(buf, "DMAX:", strlen("DMAX:")) == 0) + myDMax = atoi(&buf[5]); + else if (strncasecmp(buf, "ARES:", strlen("ARES:")) == 0) + myARes = atoi(&buf[5]); + else if (strncasecmp(buf, "AMIN:", strlen("AMIN:")) == 0) + myAMin = atoi(&buf[5]); + else if (strncasecmp(buf, "AMAX:", strlen("AMAX:")) == 0) + myAMax = atoi(&buf[5]); + else if (strncasecmp(buf, "AFRT:", strlen("AFRT:")) == 0) + myAFront = atoi(&buf[5]); + else if (strncasecmp(buf, "SCAN:", strlen("SCAN:")) == 0) + myScan = atoi(&buf[5]); + } + + if (myModel.empty() || myDMin == 0 || myDMax == 0 || myARes == 0 || + myAMin == 0 || myAMax == 0 || myAFront == 0 || myScan == 0) + { + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Missing information in parameter info response", + getName()); + //log(); + return false; + } + + myStepSize = 360.0 / myARes; + myStepFirst = myAFront * myStepSize; + + if (myMaxRange > myDMax) + setMaxRange(myDMax); + + //log(); + + setParams(getStartDegrees(), getEndDegrees(), getIncrement(), getFlipped()); + + //myLogMore = true; + // myLogMore = false; + ArUtil::sleep(100); + + + //printf("myRequestString %s\n", myRequestString); + + if (!(ret = sendCommandAndRecvStatus( + myRequestString, "request distance reading", + buf, sizeof(buf), 10000)) || + strcasecmp(buf, "00") != 0) + { + if (ret && strcasecmp(buf, "00") != 0) + ArLog::log(ArLog::Normal, + "%s::blockingConnect: Bad status on distance reading response (%s)", + getName(), buf); + return false; + } + + //myLogMore = false; + + ArTime started; + started.setToNow(); + while (started.secSince() < 10 && + readLine(buf, sizeof(buf), 10000, true, false)) + { + if (strlen(buf) == 0) + return true; + } + + ArLog::log(ArLog::Normal, "%s::blockingConnect: Did not get distance reading back", + getName()); + return false; +} + +AREXPORT bool ArUrg_2_0::asyncConnect(void) +{ + myStartConnect = true; + if (!getRunning()) + runAsync(); + return true; +} + +AREXPORT bool ArUrg_2_0::disconnect(void) +{ + if (!isConnected()) + return true; + + ArLog::log(ArLog::Normal, "%s: Disconnecting", getName()); + + bool ret; + + ret = writeLine("RS"); + + char buf[2048]; + sprintf(buf, "SS%06d", atoi(getStartingBaudChoice())); + ret = (ret & writeLine(buf)); + + laserDisconnectNormally(); + return ret; + +} + + +void ArUrg_2_0::sensorInterp(void) +{ + ArTime readingRequested; + std::string reading; + myReadingMutex.lock(); + if (myReading.empty()) + { + myReadingMutex.unlock(); + return; + } + + readingRequested = myReadingRequested; + reading = myReading; + myReading = ""; + myReadingMutex.unlock(); + + ArTime time = readingRequested; + ArPose pose; + int ret; + int retEncoder; + ArPose encoderPose; + + //time.addMSec(-13); + if (myRobot == NULL || !myRobot->isConnected()) + { + pose.setPose(0, 0, 0); + encoderPose.setPose(0, 0, 0); + } + else if ((ret = myRobot->getPoseInterpPosition(time, &pose)) < 0 || + (retEncoder = + myRobot->getEncoderPoseInterpPosition(time, &encoderPose)) < 0) + { + ArLog::log(ArLog::Normal, "%s: reading too old to process", getName()); + return; + } + + ArTransform transform; + transform.setTransform(pose); + + unsigned int counter = 0; + if (myRobot != NULL) + counter = myRobot->getCounter(); + + lockDevice(); + myDataMutex.lock(); + + //double angle; + int i; + int len = reading.size(); + + int range; + int giant; + int big; + int little; + //int onStep; + + std::list::reverse_iterator it; + ArSensorReading *sReading; + + int iMax; + int iIncr; + + if (myUseThreeDataBytes) + { + iMax = len - 2; + iIncr = 3; + } + else + { + iMax = len - 1; + iIncr = 2; + } + + bool ignore; + for (it = myRawReadings->rbegin(), i = 0; + it != myRawReadings->rend() && i < iMax; //len - 2; + it++, i += iIncr) //3) + { + ignore = false; + + if (myUseThreeDataBytes) + { + giant = reading[i] - 0x30; + big = reading[i+1] - 0x30; + little = reading[i+2] - 0x30; + range = (giant << 12 | big << 6 | little); + } + else + { + big = reading[i] - 0x30; + little = reading[i+1] - 0x30; + range = (big << 6 | little); + } + + if (range < myDMin) + range = myDMax+1; + + sReading = (*it); + sReading->newData(range, pose, encoderPose, transform, counter, + time, ignore, 0); + } + + myDataMutex.unlock(); + + int previous = getCumulativeBuffer()->size(); + laserProcessReadings(); + int now = getCumulativeBuffer()->size(); + + unlockDevice(); +} + +AREXPORT void * ArUrg_2_0::runThread(void *arg) +{ + while (getRunning()) + { + lockDevice(); + if (myStartConnect) + { + myStartConnect = false; + myTryingToConnect = true; + unlockDevice(); + + blockingConnect(); + + lockDevice(); + myTryingToConnect = false; + unlockDevice(); + continue; + } + unlockDevice(); + + if (!myIsConnected) + { + ArUtil::sleep(100); + continue; + } + + // if we have a robot but it isn't running yet then don't have a + // connection failure + if (laserCheckLostConnection()) + { + ArLog::log(ArLog::Terse, + "%s: Lost connection to the laser because of error. Nothing received for %g seconds (greater than the timeout of %g).", getName(), + myLastReading.mSecSince()/1000.0, + getConnectionTimeoutSeconds()); + myIsConnected = false; + laserDisconnectOnError(); + continue; + } + + internalGetReading(); + + ArUtil::sleep(1); + } + return NULL; +} + +bool ArUrg_2_0::internalGetReading(void) +{ + ArTime readingRequested; + std::string reading; + char buf[1024]; + + reading = ""; + /* + if (!writeLine(myRequestString)) + { + ArLog::log(ArLog::Terse, "Could not send request distance reading to urg"); + return false; + } + */ + + ArTime firstByte; + + if (!readLine(buf, sizeof(buf), 1000, true, false, &firstByte) || + strcasecmp(buf, myRequestString) != 0) + { + ArLog::log(ArLog::Normal, + "%s: Did not get distance reading response (%s)", + getName(), buf); + return false; + } + // TODO this isn't the right time, but for most of what we do that + // won't matter + readingRequested.setToNow(); + readingRequested.addMSec(-100); + + if (!readLine(buf, sizeof(buf), 100, false, false) || + strcasecmp(buf, "99") != 0) + { + ArLog::log(ArLog::Normal, + "%s: Bad status on distance reading response (%s)", + getName(), buf); + return false; + } + + if (!readLine(buf, sizeof(buf), 100, false, false)) + { + ArLog::log(ArLog::Normal, + "%s: Could not read timestamp in distance reading response (%s)", + getName(), buf); + return false; + } + + while (readLine(buf, sizeof(buf), 100, false, false)) + { + if (strlen(buf) == 0) + { + myReadingMutex.lock(); + myReadingRequested = readingRequested; + myReading = reading; + myReadingMutex.unlock(); + if (myRobot == NULL) + sensorInterp(); + return true; + } + else + { + reading += buf; + } + } + + return false; +} + +void ArUrg_2_0::failedToConnect(void) +{ + lockDevice(); + myTryingToConnect = true; + unlockDevice(); + laserFailedConnect(); +} + +bool ArUrg_2_0::laserCheckParams(void) +{ + return true; +} diff --git a/Legacy/Aria/src/ArVCC4.cpp b/Legacy/Aria/src/ArVCC4.cpp new file mode 100644 index 0000000..93225a4 --- /dev/null +++ b/Legacy/Aria/src/ArVCC4.cpp @@ -0,0 +1,2355 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArVCC4.h" +#include "ArCommands.h" +#include "ArRobot.h" + + +AREXPORT ArVCC4Packet::ArVCC4Packet(ArTypes::UByte2 bufferSize) : + ArBasePacket(bufferSize, 0) +{ +} + +AREXPORT ArVCC4Packet::~ArVCC4Packet() +{ + +} + + +AREXPORT void ArVCC4Packet::byte2ToBuf(ArTypes::Byte4 val) +{ + int i; + char buf[5]; + if (myLength + 4 > myMaxLength) + { + ArLog::log(ArLog::Terse, "ArVCC4Packet::uByte2ToBuf: Trying to add beyond length of buffer."); + return; + } + + sprintf(buf, "%X", val); + for (i=0;i<(int)strlen(buf);i++) + { + myBuf[myLength] = buf[i]; + ++myLength; + } +} + + +/* Automatically tacks on footer char */ +AREXPORT void ArVCC4Packet::finalizePacket(void) +{ + uByteToBuf(ArVCC4Commands::FOOTER); +} + + +/* +Creates new packet with default header, device id, and delimeter - FE 30 30 00 +*/ +AREXPORT void ArVCC4::preparePacket(ArVCC4Packet *myPacket) +{ + myPacket->uByteToBuf(ArVCC4Commands::HEADER); + myPacket->uByteToBuf(ArVCC4Commands::DEVICEID); + myPacket->uByteToBuf(ArVCC4Commands::DEVICEID); + myPacket->uByteToBuf(ArVCC4Commands::DELIM); + + myPacketTime.setToNow(); + + if (myAutoUpdate) + myIdleTime.setToNow(); +} + + +/** + @param robot the robot this camera is attached to + + @param inverted if this camera is inverted or not, the only time a + camera will normally be inverted is on a robot where it's mounted + on the underside of something, ie like in a peoplebot + + @param commDirection this is the type of communications that the camera should + use. It can be unidirectional, bidirectional, or unknown. If unidirectional + it sends packets without knowing if the camera has received them or not. This + results in necessary 300 ms delays between packets, otherwise the packets + will get dropped. In bidirectional mode, responses are received from the + camera and evaluated for success of receipt of the previous command. In + unknown mode, it will use bidirectional communication if a response is + received, otherwise it will be unidirectional. + + @param autoUpdate this will cause the usertask to periodically query the + camera for actual positional information (pan, tilt, zoom). This will + happen every 1 sec idle time, and will switch between pan/tilt info + and zoom info. + + @param disableLED if set to true this will force the LED, on the front + of the camera, to turn off. Otherwise it will function normally + + @param cameraType used to discriminate between VC-C4 and C50i +**/ +AREXPORT ArVCC4::ArVCC4(ArRobot *robot, bool inverted, CommState commDirection, bool autoUpdate, bool disableLED, CameraType cameraType) : + ArPTZ(robot), + myTaskCB(this, &ArVCC4::camTask) +{ + myConn = NULL; +// myInverted = inverted; + ArPTZ::setInverted(inverted); + myRobot = robot; + myError = CAM_ERROR_NONE; + myCommType = commDirection; + + myCameraType = cameraType; + + // the spec is 300ms, but give 400ms because of processing time for the loop + myPacketTimeout = 400; + + myIdleTime.setToNow(); + + myAutoUpdate = autoUpdate; + myAutoUpdateCycle = 1; + myWasError = false; + myWaitingOnStop = false; + myBytesLeft = 0; + + // set the state timeout based on the type of communication + if (myCommType == COMM_BIDIRECTIONAL || myCommType == COMM_UNKNOWN) + { + myStateTimeout = BIDIRECTIONAL_TIMEOUT; + ArLog::log(ArLog::Verbose,"ArVCC4::ArVCC4: Using bidirectional communication."); + } + else + { + ArLog::log(ArLog::Verbose,"ArVCC4::ArVCC4: Using unidirectional communication."); + myStateTimeout = UNIDIRECTIONAL_TIMEOUT; + } + + // Set these to TOLERANCE +1 and desired's to 0, so it will be automatically + // zero out during the first first passes through the state machine + myPan = TOLERANCE + 1; + myTilt = TOLERANCE + 1; + myZoom = TOLERANCE + 1; + myPanResponse = 0; + myTiltResponse = 0; + myZoomResponse = 0; + myPanSlew = 0; + myTiltSlew = 0; + myFocusMode = -1; + + if (myCameraType == CAMERA_C50I) + myDigitalZoom = -1; + else + myDigitalZoom = 0; + + + myFOVAtMinZoom = 45; + myFOVAtMaxZoom = 1.97; +/* + myFOVAtMinZoom = 41.26; + myFOVAtMaxZoom = 1.97; +*/ + /*myFOVAtMinZoom = 38; + myFOVAtMaxZoom = 0.1; + */ + ArPTZ::setLimits(MAX_PAN, MIN_PAN, MAX_TILT, MIN_TILT, MAX_ZOOM_OPTIC, MIN_ZOOM); + + if (disableLED) + myDesiredLEDControlMode = 2; + else + myDesiredLEDControlMode = -1; + + myIRLEDsEnabled = false; + myDesiredIRLEDsMode = false; + // if C50I then force it to turn off the filter + if (myCameraType == CAMERA_C50I) + myIRFilterModeEnabled = true; + else + myIRFilterModeEnabled = false; + myDesiredIRFilterMode = false; + myFocusModeDesired = 0; + + myPanDesired = 0; + myTiltDesired = 0; + myZoomDesired = 0; + myDigitalZoomDesired = 0; + myPanSlewDesired = getMaxPanSlew(); + myTiltSlewDesired = getMaxTiltSlew(); + + myRequestProductName = false; + + myPacketBufLen = 0; + + // initialize the state variables + myState = UNINITIALIZED; + myPreviousState = UNINITIALIZED; + + // Initialize flags to false + myResponseReceived = false; + myCameraHasBeenInitted = false; + myInitRequested = false; + myCameraIsInitted = false; + myRealPanTiltRequested = false; + myRealZoomRequested = false; + + // add the user task if we have a valid robot + if (myRobot != NULL) + myRobot->addUserTask("vcc4", 50, &myTaskCB); +} + +AREXPORT ArVCC4::~ArVCC4() +{ + if (myRobot != NULL) + myRobot->remUserTask(&myTaskCB); +} + +void ArVCC4::connectHandler(void) +{ +} + +/* + This will send a request for a certain number of bytes if it's not using + a computer serial port. You can also send 0, which will flush the buffer. + + This will let you either request 0 bytes (flush the buffer), 6 bytes, or + more than 6 bytes by first requesting 6, then requesting all the rest at + one time. This will not work with more than two requests for one packet + of data (i.e. 6 bytes, then 4 bytes, then 2 bytes to get 12 bytes total) +*/ +void ArVCC4::requestBytes(int num) +{ + // only send a request if we're not using a computer serial port + if (myUsingAuxPort && myCommType != COMM_UNIDIRECTIONAL) + { + // send a request to the robot, because we're using an Aux port + if (myBytesLeft == 0) + { + // We're not waiting for more bytes from the camera, so assume + // that this is the first request for a response. Responses start + // as 6 bytes, then more if needed. Start by asking for 6 + + // sending 0 will flush the buffer + if (num == 0) + { + myRobot->comInt(myAuxRxCmd,0); + return; + } + + // don't ask for fewer than 6 bytes, because we don't know + // how to handle it + if (num < 6) + { + ArLog::log(ArLog::Terse, "ArVCC4::requestBytes: Requested fewer than 6 bytes total. Not sending request."); + return; + } + + // we're not waiting for any bytes to come in, so request a full packet + myRobot->comInt(myAuxRxCmd,6); + + // set the number of bytes left to 6 less than the request + myBytesLeft = num - 6; + } + else + { + // request the rest of the bytes. asumess num=myBytesLeft + myRobot->comInt(myAuxRxCmd,num); + myBytesLeft = 0; + } + } + + myWaitingOnPacket = true; + +} + + +/* +This is the user task for the camera. It controls the state that the camera is in and responds accordingly. + +The POWERED_ON state will send commands as needed, and then switch the state into a state of waiting for a response. If that state waits for too long without a response, it will timeout. The states wait for a responseReceived flag, which says that a valid response packet was received back from the camera. Based on that, it uses the myError variable to determine what the packet said. If there is not responseReceived, or if operating in undirectional mode, the state will wait for a timeout, at which point it will fail if in bidirectional, or assume success in unidirectional mode. +*/ +void ArVCC4::camTask(void) +{ + + switch(myState) + { + // this is the case the camera starts in before being initialized + case UNINITIALIZED: + if (myConn == NULL) + myConn = getDeviceConnection(); + + // if myConn is still NULL then its an auxport + if (myConn == NULL) + myUsingAuxPort = true; + else + myUsingAuxPort = false; + + if (myInitRequested) + switchState(STATE_UNKNOWN); + + break; + // this case is the starting case, and fallback in case of error + case STATE_UNKNOWN: + ArLog::log(ArLog::Verbose,"ArVCC4::camTask: Attempting to power on and initialize."); + myPowerStateDesired = true; + myPowerState = false; + myResponseReceived = false; + + // flush the buffer + requestBytes(0); + myBytesLeft = 0; + myPacketBufLen = 0; + switchState(AWAITING_INITIAL_POWERON); + sendPower(); + break; + // waiting for the camera to power on for the first time + case AWAITING_INITIAL_POWERON: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(SETTING_CONTROL_MODE); + myPowerState = true; + myPowerStateDesired = true; + setControlMode(); + } + else if (myError == CAM_ERROR_BUSY) + { + sendPower(); + } + else if (myError == CAM_ERROR_MODE) + { + switchState(SETTING_CONTROL_MODE); + setControlMode(); + myPowerState = false; + myPowerStateDesired = true; + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while executing a power command."); + switchState(STATE_UNKNOWN); + } + myResponseReceived = false; + } + else if (timeout(4000)) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: No response from the camera. Using unidirectional communication."); + myCommType = COMM_UNIDIRECTIONAL; + myStateTimeout = UNIDIRECTIONAL_TIMEOUT; + myAutoUpdate = false; + switchState(STATE_UNKNOWN); + } + else + { + if (myCommType == COMM_UNKNOWN) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: No response from the camera. Assuming unidirectional communications."); + myCommType = COMM_UNIDIRECTIONAL; + myStateTimeout = UNIDIRECTIONAL_TIMEOUT; + myAutoUpdate = false; + } + switchState(SETTING_CONTROL_MODE); + myPowerState = true; + myPowerStateDesired = true; + setControlMode(); + } + } + break; + // waiting for the camera to initialize for the first time + case AWAITING_INITIAL_INIT: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(SETTING_INIT_PAN_RATE); + sendPanSlew(); + } + // in the event of busy or mode error, keep trying, camera may be + // powering on + else if (myError == CAM_ERROR_BUSY || myError == CAM_ERROR_MODE) + { + sendInit(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while executing an init command."); + switchState(STATE_UNKNOWN); + } + myResponseReceived = false; + } + else if (timeout(2500)) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out while executing an init command."); + switchState(STATE_UNKNOWN); + } + else + { + switchState(SETTING_INIT_PAN_RATE); + sendPanSlew(); + } + } + break; + // set the control mode to host mode, otherwise commands will be ignored + case SETTING_CONTROL_MODE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + sendInit(); + switchState(AWAITING_INITIAL_INIT); + } + else if (myError == CAM_ERROR_BUSY) + { + setControlMode(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the control mode."); + switchState(STATE_UNKNOWN); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(STATE_UNKNOWN); + } + else + { + sendInit(); + switchState(AWAITING_INITIAL_INIT); + } + } + break; + // setting the initial pan rate + case SETTING_INIT_PAN_RATE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myPanSlew = myPanSlewSent; + sendTiltSlew(); + switchState(SETTING_INIT_TILT_RATE); + } + else if (myError == CAM_ERROR_BUSY) + { + sendPanSlew(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the pan rates."); + switchState(STATE_UNKNOWN); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding to an initialize pan slew command."); + switchState(STATE_UNKNOWN); + } + else + { + myPanSlew = myPanSlewSent; + sendTiltSlew(); + switchState(SETTING_INIT_TILT_RATE); + } + } + break; + // setting the initial tilt rate + case SETTING_INIT_TILT_RATE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myTiltSlew = myTiltSlewSent; + setDefaultRange(); + switchState(SETTING_INIT_RANGE); + } + else if (myError == CAM_ERROR_BUSY) + { + sendTiltSlew(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the tilt rate."); + switchState(STATE_UNKNOWN); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(STATE_UNKNOWN); + } + else + { + myTiltSlew = myTiltSlewSent; + setDefaultRange(); + switchState(SETTING_INIT_RANGE); + } + } + break; + // setting the initial range so the camera will tilt the full amount + case SETTING_INIT_RANGE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(POWERED_ON); + myCameraHasBeenInitted = true; + myCameraIsInitted = true; + ArLog::log(ArLog::Verbose,"ArVCC4::camTask: Camera initialized and ready."); + } + else if (myError == CAM_ERROR_BUSY) + { + setDefaultRange(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the default range."); + // try to power off and see if we can recover + myPowerStateDesired = false; + sendPower(); + switchState(POWERING_OFF); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + // The camera sometimes responds with an error to this, or times out + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding to a set range command. Power cycle the camera."); + myCameraHasBeenInitted = false; + switchState(STATE_UNKNOWN); + } + else + { + ArLog::log(ArLog::Verbose,"ArVCC4::camTask: Camera initialized and ready."); + myCameraHasBeenInitted = true; + myCameraIsInitted = true; + switchState(POWERED_ON); + } + } + break; + // initializing the camera + case INITIALIZING: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myCameraIsInitted = true; + myInitRequested = false; + // delay the state transition by 2500ms to allow init to take place + switchState(POWERED_ON, 5000); + ArLog::log(ArLog::Verbose,"ArVCC4::camTask: Camera initialized."); + } + else if (myError == CAM_ERROR_MODE) + { + setControlMode(); + switchState(SETTING_CONTROL_MODE); + } + else if (myError == CAM_ERROR_BUSY) + { + sendInit(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while initializing the camera."); + myCameraIsInitted = false; + myInitRequested = false; + switchState(STATE_UNKNOWN); + } + myResponseReceived = false; + } + else if (timeout(2000)) + { + myInitRequested = false; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding to an initialization request."); + myCameraIsInitted = false; + switchState(STATE_UNKNOWN); + } + else + { + myCameraIsInitted = true; + switchState(POWERED_ON); + } + } + break; + // waiting for the camera to power on + case POWERING_ON: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myPowerState = true; + myPowerStateDesired = true; + if (myCameraHasBeenInitted == false) + { + myPowerState = true; + myPowerStateDesired = true; + setControlMode(); + switchState(SETTING_CONTROL_MODE); + } + else + switchState(POWERED_ON, 4500); // use a delay + } + else if (myError == CAM_ERROR_BUSY) + { + sendPower(); + } + else + { + ArLog::log(ArLog::Terse, "ArVCC4::camTask: Error while executing power command."); + switchState(POWERED_OFF); + } + myResponseReceived = false; + } + else if (timeout(4500)) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding to a power on command."); + switchState(STATE_UNKNOWN); + } + else + { + myPowerState = true; + myPowerStateDesired = true; + switchState(POWERED_ON); + } + } + break; + // waiting for the camera to power on + case POWERING_OFF: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myPowerState = false; + myPowerStateDesired = false; + switchState(POWERED_OFF); + ArLog::log(ArLog::Verbose, "ArVCC4::camTask: Camera powered off."); + } + else if (myError == CAM_ERROR_BUSY) + { + sendPower(); + } + else + { + ArLog::log(ArLog::Terse, "ArVCC4::camTask: Error while executing power command."); + switchState(POWERED_ON); + } + myResponseReceived = false; + } + else if (timeout(2000)) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(STATE_UNKNOWN); + } + else + { + myPowerState = false; + myPowerStateDesired = false; + switchState(POWERED_OFF); + } + } + break; + // idle state. This is the main state. This will call other processes + // in the event that a desired state doesn't match the current ones + case POWERED_ON: + if (myCameraHasBeenInitted == false || isInitted() == false) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera not initialized."); + switchState(STATE_UNKNOWN); + } + else if (myPowerStateDesired == false) + { + sendPower(); + switchState(POWERING_OFF); + } + else if (myInitRequested == true) + { + sendInit(); + switchState(INITIALIZING); + } + else if (myRequestProductName == true) + { + sendProductNameRequest(); + switchState(AWAITING_PRODUCTNAME_REQUEST); + } + else if (myRealPanTiltRequested == true) + { + sendRealPanTiltRequest(); + switchState(AWAITING_POS_REQUEST); + } + else if (myRealZoomRequested == true) + { + sendRealZoomRequest(); + switchState(AWAITING_ZOOM_REQUEST); + } + else if (myHaltZoomRequested == true) + { + sendHaltZoom(); + switchState(AWAITING_STOP_ZOOM_RESPONSE); + } + else if (myHaltPanTiltRequested == true) + { + sendHaltPanTilt(); + switchState(AWAITING_STOP_PAN_TILT_RESPONSE); + } + else if (fabs(myPan - myPanDesired) > TOLERANCE || + fabs(myTilt - myTiltDesired) > TOLERANCE) + { + // pan tilt sets its own state because it might stop first + sendPanTilt(); + } + else if (myZoom != myZoomDesired) + { + // zoom sets its own state because it might stop first + sendZoom(); + } + else if (myDigitalZoom != myDigitalZoomDesired) + { + if (myCameraType == CAMERA_C50I) + { + sendDigitalZoom(); + switchState(AWAITING_DIGITAL_ZOOM_RESPONSE); + } + else + { + ArLog::log(ArLog::Terse, "ArVCC4::camTask: Camera type does not support digital zoom."); + myDigitalZoom = 0; + myDigitalZoomDesired = 0; + } + } + else if (myFocusMode != myFocusModeDesired) + { + sendFocus(); + switchState(AWAITING_FOCUS_RESPONSE); + } + else if (myPanSlewDesired != myPanSlew) + { + sendPanSlew(); + switchState(AWAITING_PAN_SLEW_RESPONSE); + } + else if (myTiltSlewDesired != myTiltSlew) + { + sendTiltSlew(); + switchState(AWAITING_TILT_SLEW_RESPONSE); + } + else if (myDesiredLEDControlMode != -1) + { + sendLEDControlMode(); + switchState(AWAITING_LED_CONTROL_RESPONSE); + } + else if (myDesiredIRFilterMode != myIRFilterModeEnabled) + { + if (myCameraType == CAMERA_C50I) + { + sendIRFilterControl(); + switchState(AWAITING_IRFILTER_RESPONSE); + } + else + { + ArLog::log(ArLog::Terse, "ArVCC4::camTask: Camera type does not support IR filtering."); + myDesiredIRFilterMode = false; + } + } + else if (myDesiredIRLEDsMode != myIRLEDsEnabled) + { + if (myCameraType == CAMERA_C50I) + { + if (myDesiredIRLEDsMode && !myIRFilterModeEnabled) + { + ArLog::log(ArLog::Terse, "ArVCC4::camTask: Need to first enable IR-filter before turning on InfraRed LEDs."); + myDesiredIRLEDsMode = false; + } + else + { + sendIRLEDControl(); + switchState(AWAITING_IRLEDS_RESPONSE); + } + } + else + { + ArLog::log(ArLog::Terse, "ArVCC4::camTask: Camera model does not support IR LED functions."); + myDesiredIRLEDsMode = false; + } + } + else if (myAutoUpdate && + myCommType == COMM_BIDIRECTIONAL && + myIdleTime.mSecSince() > AUTO_UPDATE_TIME) + { + switch (myAutoUpdateCycle) + { + case 1: + sendRealPanTiltRequest(); + switchState(AWAITING_POS_REQUEST); + break; + case 2: + sendRealZoomRequest(); + switchState(AWAITING_ZOOM_REQUEST); + break; + default: + myAutoUpdateCycle = 0; + break; + } + myAutoUpdateCycle++; + } + break; + // camera is powered off + case POWERED_OFF: + if (myPowerStateDesired == true) + { + sendPower(); + switchState(POWERING_ON); + } + break; + // waiting to hear back from the camera after a zoom command was sent + case AWAITING_ZOOM_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myZoom = myZoomDesired; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendHaltZoom(); + // switch states, but don't reset the timer + switchState(AWAITING_STOP_ZOOM_RESPONSE, false); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while executing a zoom command."); + myZoomDesired = myZoom; + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + myZoomDesired = myZoom; + switchState(myPreviousState); + } + else + { + myZoom = myZoomDesired; + switchState(POWERED_ON); + } + } + break; + // waiting to hear back for verification from digital zoom command + case AWAITING_DIGITAL_ZOOM_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myDigitalZoom = myDigitalZoomDesired; + switchState(POWERED_ON); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while executing a digital zoom command."); + myDigitalZoomDesired = myDigitalZoom; + switchState(myPreviousState); + } + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + myDigitalZoomDesired = myDigitalZoom; + switchState(myPreviousState); + } + else + { + myDigitalZoom = myDigitalZoomDesired; + switchState(POWERED_ON); + } + } + break; + // waiting to hear back for verification of a pan/tilt command + case AWAITING_PAN_TILT_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myPan = myPanSent; + myTilt = myTiltSent; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendHaltPanTilt(); + // switch states, but don't reset the timer + switchState(AWAITING_STOP_PAN_TILT_RESPONSE, false); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while executing a panTilt command."); + myPanDesired = myPan; + myTiltDesired = myTilt; + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + myTiltDesired = myTilt; + myPanDesired = myPan; + if (myPowerState) + switchState(POWERED_ON); + else + switchState(POWERED_OFF); + } + else + { + myTilt = myTiltSent; + myPan = myPanSent; + switchState(POWERED_ON); + } + } + break; + // waiting to hear back after requesting to stop pan/tilt movements + case AWAITING_STOP_PAN_TILT_RESPONSE: + if (myResponseReceived == true) + { + myResponseReceived = false; + if (myError == CAM_ERROR_NONE) + { + myHaltPanTiltRequested = false; + switchState(POWERED_ON); + camTask(); + } + else if (myError == CAM_ERROR_BUSY) + { + // A busy error is only generated when initializing. so just + // return to the previous state + myHaltPanTiltRequested = false; + switchState(myPreviousState); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while stopping panTilt motion."); + myHaltPanTiltRequested = false; + switchState(myPreviousState); + } + } + else if (timeout()) + { + myHaltPanTiltRequested = false; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(myPreviousState); + } + else + { + if (myWaitingOnStop == true) + { + sendPanTilt(); + myWaitingOnStop = false; + switchState(AWAITING_PAN_TILT_RESPONSE); + } + else + switchState(myPreviousState); + } + } + break; + // waiting to hear back about a stop zooming command + case AWAITING_STOP_ZOOM_RESPONSE: + if (myResponseReceived == true) + { + myResponseReceived = false; + if (myError == CAM_ERROR_NONE) + { + myHaltZoomRequested = false; + switchState(POWERED_ON); + camTask(); + } + else if (myError == CAM_ERROR_BUSY) + { + // A busy error is only generated when initializing. so just + // return to the previous state + myHaltZoomRequested = false; + switchState(myPreviousState); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while the zoom."); + myHaltZoomRequested = false; + switchState(myPreviousState); + } + } + else if (timeout()) + { + myHaltZoomRequested = false; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(myPreviousState); + } + else + { + if (myWaitingOnStop == true) + { + sendZoom(); + myWaitingOnStop = false; + switchState(AWAITING_ZOOM_RESPONSE); + } + else + switchState(myPreviousState); + } + } + break; + // waiting to hear back about a pan speed setting + case AWAITING_PAN_SLEW_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myPanSlew = myPanSlewSent; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendPanSlew(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting pan slew."); + myPanSlewDesired = myPanSlew; + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + myPanSlewDesired = myPanSlew; + switchState(myPreviousState); + } + else + { + myPanSlew = myPanSlewSent; + switchState(POWERED_ON); + } + } + break; + // waiting to hear back about a tilt speed setting + case AWAITING_TILT_SLEW_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myTiltSlew = myTiltSlewSent; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendTiltSlew(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting tilt slew."); + myTiltSlewDesired = myTiltSlew; + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + myTiltSlewDesired = myTiltSlew; + switchState(myPreviousState); + } + else + { + myTiltSlew = myTiltSlewSent; + switchState(POWERED_ON); + } + } + break; + // waiting to hear back with pan/tilt information + case AWAITING_POS_REQUEST: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(POWERED_ON); + myPan = myPanResponse; + myTilt = myTiltResponse; + myRealPanTiltRequested = false; + } + else if (myError == CAM_ERROR_BUSY) + { + sendRealPanTiltRequest(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::sendRealPanTiltRequest: Camera responded with an error while requesting pan/tilt information."); + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + myRealPanTiltRequested = false; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::sendRealPanTiltRequest: Camera timed out without responding."); + switchState(myPreviousState); + } + else + { + switchState(POWERED_ON); + } + } + break; + // waiting to hear back with zoom information + case AWAITING_ZOOM_REQUEST: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(POWERED_ON); + myZoom = myZoomResponse; + myRealZoomRequested = false; + } + else if (myError == CAM_ERROR_BUSY) + { + sendRealZoomRequest(); + } + else + { + ArLog::log(ArLog::Terse,"ArVCC4::sendRealZoomRequest: Camera responded with an error while requesting zoom position."); + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + myRealZoomRequested = false; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::sendRealZoomRequest: Camera timed out without responding."); + switchState(myPreviousState); + } + else + { + switchState(POWERED_ON); + } + } + break; + // sit in this state until the specified delay has occurred + case AWAITING_LED_CONTROL_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myDesiredLEDControlMode = -1; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendLEDControlMode(); + } + else + { + myDesiredLEDControlMode = -1; + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the LED control mode."); + switchState(POWERED_ON); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(STATE_UNKNOWN); + } + else + { + switchState(myPreviousState); + } + } + break; + case AWAITING_IRFILTER_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myIRFilterModeEnabled = myDesiredIRFilterMode; + + // the camera automatically shuts off the IR LEDs when removing + // the filter + if (!myIRFilterModeEnabled) + myIRLEDsEnabled = false; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendIRFilterControl(); + } + else + { + myIRFilterModeEnabled = myDesiredIRFilterMode; + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the infrared cutoff control."); + switchState(POWERED_ON); + } + myResponseReceived = false; + } + else if (timeout()) + { + myDesiredIRFilterMode = myIRFilterModeEnabled; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(STATE_UNKNOWN); + } + else + { + switchState(myPreviousState); + } + } + break; + case AWAITING_IRLEDS_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + myIRLEDsEnabled = myDesiredIRLEDsMode; + switchState(POWERED_ON); + } + else if (myError == CAM_ERROR_BUSY) + { + sendIRLEDControl(); + } + else + { + myDesiredIRLEDsMode = myIRLEDsEnabled; + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera responded with an error while setting the infrared light."); + switchState(POWERED_ON); + } + myResponseReceived = false; + } + else if (timeout()) + { + myDesiredIRLEDsMode = myIRLEDsEnabled; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Camera timed out without responding."); + switchState(STATE_UNKNOWN); + } + else + { + switchState(myPreviousState); + } + } + break; + case AWAITING_PRODUCTNAME_REQUEST: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(POWERED_ON); + myProductName = myProductNameResponse; + myRequestProductName = false; + } + else if (myError == CAM_ERROR_BUSY) + { + sendProductNameRequest(); + } + else + { + myRequestProductName = false; + ArLog::log(ArLog::Terse,"ArVCC4::sendProductNameRequest: Camera responded with an error while requesting product name."); + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + myRequestProductName = false; + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::sendProductNameRequest: Camera timed out without responding."); + switchState(myPreviousState); + } + else + { + switchState(POWERED_ON); + } + } + break; + case AWAITING_FOCUS_RESPONSE: + if (myResponseReceived == true) + { + if (myError == CAM_ERROR_NONE) + { + switchState(POWERED_ON); + myFocusMode = myFocusModeDesired; + } + else + { + myFocusModeDesired = myFocusMode; + ArLog::log(ArLog::Terse,"ArVCC4::sendFocus: Camera responded with an error while setting the focus."); + switchState(myPreviousState); + } + myResponseReceived = false; + } + else if (timeout()) + { + if (myCommType == COMM_BIDIRECTIONAL) + { + ArLog::log(ArLog::Terse,"ArVCC4::sendFocus: Camera timed out without responding."); + switchState(myPreviousState); + } + else + { + switchState(POWERED_ON); + } + } + break; + case STATE_DELAYED_SWITCH: + if (timeout(myStateDelayTime)) + { + myState = myPreviousState; + switchState(myNextState); + } + break; + case STATE_ERROR: + default: + ArLog::log(ArLog::Terse,"ArVCC4::camTask: Unknown case in usertask."); + break; + } + + // if there were bad parameters, a control mode error, or an unknown error, + if (myWasError == false && + (myError == CAM_ERROR_PARAM || myError == CAM_ERROR_UNKNOWN || + myError == CAM_ERROR_MODE)) + { + myWasError = true; + throwError(); + } + // turn off error flag if we're out of the error condition now + else if (myWasError == true && + (myError == CAM_ERROR_NONE || myError == CAM_ERROR_BUSY)) + myWasError = false; + +} + + +/* + This performs the actual state switch. In most cases it just switches + from one state to another, and sets the state timer to keep track of + how long it has been in a state. + + When you're requesting a pan/tilt movement, and the camera is busy, + it will switch states to send a stop command, then send another pan/tilt + command. In doing so, you want the state timeout to be from the time the + first pan/tilt request was sent, to the time that it succeeds, including + any time spent telling the camera to stop it's movement. In that case + you want to send a false for the 'useTimer' parameter. + + The delayTime is useful for certain commands, like initialization, that + even when the command is complete, the camera will still respond with + busys for a certain period of time. Use the delayTime to delay the state + switch to the next state. + */ +void ArVCC4::switchState(State state, int delayTime) +{ + // if we're switching to a different state, then store the previous one + if (state != myState) + myPreviousState = myState; + + if (delayTime != 0) + { + myNextState = state; + myStateDelayTime = delayTime; + myState = STATE_DELAYED_SWITCH; + } + else + { + myStateTime.setToNow(); + myState = state; + } +} + +/* + This checks for either a packet timeout or a state timeout. A packet + timeout is when the camera hasn't sent back a packet within the + allotted amount of time. The state timeout is when it takes too long + to transition from state to state, despite how many packets have or + haven't been received. Passing an argument will check for a statetimeout + greater than the argument. The packet timeout is always the same, but + does not exist for unidirecitonal communication +*/ +bool ArVCC4::timeout(int mSec) +{ + bool stateTimeout; + bool packetTimeout = false; + + if (mSec == 0) + stateTimeout = (myStateTime.mSecSince() > myStateTimeout); + else + stateTimeout = (myStateTime.mSecSince() > mSec); + + if (myCommType != COMM_UNIDIRECTIONAL && myWaitingOnPacket) + packetTimeout = myPacketTime.mSecSince() > myPacketTimeout; + + return (stateTimeout || packetTimeout); +} + +/* + This will read bytes from the computer serial port. It will read until + it finds a RESPONSE byte for the header, and then read until it doesn't + get anymore, up to a max of the longest possible response packet. + + If it reads and gets a good header and footer, then it puts the data + in a packet, so that packetHandler will be called. +*/ +ArBasePacket* ArVCC4::readPacket(void) +{ + unsigned char data[MAX_RESPONSE_BYTES]; + unsigned char byte; + int num; + + myPacketBufLen = 0; + + myWaitingOnPacket = false; + + // Check if the connection is NULL and exit if it is + if (myConn == NULL) + { + ArLog::log(ArLog::Verbose,"ArVCC4::readPacket: Error reading packet from serial port. May not be open yet."); + return NULL; + } + + // Check for good header character - + // Loop MAX_RESPONSE_BYTES times, then exit on the next loop + // if we haven't gotten a RESPONSE header byte, yet + for (num=0;num<=MAX_RESPONSE_BYTES + 1;num++) + { + // if we don't get any bytes, or if we've just exceeded the limit + // then return null + if (myConn->read((char *)&byte,1,1) <= 0 || + num == MAX_RESPONSE_BYTES + 1) + return NULL; + else if (byte == ArVCC4Commands::RESPONSE) + { + data[0] = byte; + break; + } + } + + // we got the header character so keep reading bytes for MAX_RESPONSE_BYTES more + for(num=1;num<=MAX_RESPONSE_BYTES;num++) + { + if (myConn->read((char *)&byte, 1, 1) <= 0) + { + // there are no more bytes, so check the last byte for the footer + if (data[num-1] != ArVCC4Commands::FOOTER) + { + ArLog::log(ArLog::Terse, "ArVCC4::readPacket: Discarding bad packet."); + return NULL; + } + else + break; + } + else + // add the byte to the array + data[num] = byte; + + } + + // now put the data into a new packet so that it can be called by + // packet handlers + myPacket.empty(); + myPacket.dataToBuf((char *)data, num); + myPacket.resetRead(); + + return &myPacket; +} + +/* + This will read packets from the VCC4 camera and determine whether or + not we're going to need more bytes from the camera. Trying to get + pan/tilt or zoom position data from the camera generates a 6-byte + packet in event of an error, or a longer packet if no error. This + means we have to receive the first 6-bytes and see if there's a footer + character. If there is, then set myError to the error. Otherwise + request more bytes, put them all in a buffer, and call a function + to process the buffer, depending on what type of response we were + waiting for. +*/ +AREXPORT bool ArVCC4::packetHandler(ArBasePacket *packet) +{ + unsigned int errorCode; + + myWaitingOnPacket = false; + + // If we received a packet, then we can use bidirectional communications, + // so enable if unless the user specified unidirectional + if (myCommType == COMM_UNIDIRECTIONAL) + return true; + else if (myCommType == COMM_UNKNOWN) + { + ArLog::log(ArLog::Verbose,"ArVCC4::packetHandler: Using bidirectional communication."); + myCommType = COMM_BIDIRECTIONAL; + myStateTimeout = BIDIRECTIONAL_TIMEOUT; + } + + // reset the packet time since we got a response from the packet + myPacketTime.setToNow(); + + if (myBytesLeft == 0) + { + // We've received all the expected bytes from the camera, so it's + // either a 6-byte packet from an aux port, the second half of another + // response packet from an aux port, or a complete packet from a + // computer serial port + + if (myPacketBufLen == 0 && myUsingAuxPort) + { + // we don't have any data, so it's supposed to be a 6-byte packet + // from an aux port + myPacketBufLen = packet->getDataLength(); + + if (myPacketBufLen != 6) + { + // we don't know what this is, so scrap it and exit + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Incorrect number of bytes in response packet."); + myPacketBufLen = 0; + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + packet->bufToData((char *)myPacketBuf, myPacketBufLen); + + // check the header and footer + if (myPacketBuf[0] != ArVCC4Commands::RESPONSE || + myPacketBuf[5] != ArVCC4Commands::FOOTER) + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Bad header or footer character in response packet."); + myPacketBufLen = 0; + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + // so far so good. Set myError to the error byte + errorCode = myPacketBuf[3]; + + if (errorCode == CAM_ERROR_NONE || + errorCode == CAM_ERROR_BUSY || + errorCode == CAM_ERROR_PARAM || + errorCode == CAM_ERROR_MODE) + myError = errorCode; + else + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Unrecognized error code sent from camera."); + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + // Set the flag that says we had a valid response + myResponseReceived = true; + + myPacketBufLen = 0; + camTask(); + } + else + { + // we already have some data, or it came in on the computer serial + // port as one big packet, so add it to the rest of the buffer + + // only add up to the max number of bytes + if ((myPacketBufLen + packet->getDataLength()) > MAX_RESPONSE_BYTES) + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Too many bytes in response packet. Truncating to maximum of %d.", MAX_RESPONSE_BYTES); + requestBytes(0); + packet->bufToData((char *)&myPacketBuf[myPacketBufLen],MAX_RESPONSE_BYTES - myPacketBufLen); + myPacketBufLen = MAX_RESPONSE_BYTES; + } + else + { + packet->bufToData((char *)&myPacketBuf[myPacketBufLen],packet->getDataLength()); + myPacketBufLen += packet->getDataLength(); + } + + + // now check the header and footer + if (myPacketBuf[0] != ArVCC4Commands::RESPONSE || + myPacketBuf[myPacketBufLen-1] != ArVCC4Commands::FOOTER) + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Bad header or footer character in long response packet."); + myPacketBufLen = 0; + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + // set the error to the error byte + errorCode = myPacketBuf[3]; + + if (errorCode == CAM_ERROR_NONE || + errorCode == CAM_ERROR_BUSY || + errorCode == CAM_ERROR_PARAM || + errorCode == CAM_ERROR_MODE) + myError = errorCode; + else + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Unrecognized error code sent from camera."); + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + // We now have all the data for a long response packet, so process + // if based on myState, and what type of response we're waiting for + switch (myState) + { + case AWAITING_POS_REQUEST: + processGetPanTiltResponse(); + break; + case AWAITING_ZOOM_REQUEST: + processGetZoomResponse(); + break; + //case AWAITING_PRODUCTNAME_REQUEST: + // processGetProductNameResponse(); + // break; + default: + myPacketBufLen = 0; + break; + } + + // Set the flag for a valid response + myResponseReceived = true; + camTask(); + } + } + else + { + // We're waiting for more bytes. Check the header and error. + // If they're okay, then ask for more bytes + + myPacketBufLen = packet->getDataLength(); + + if (myPacketBufLen != 6) + { + // there should have been 6 bytes. Scrap it and exit. + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Incorrect number of bytes in first part of long response packet."); + myPacketBufLen = 0; + myBytesLeft = 0; + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + myPacketBufLen = packet->getDataLength(); + packet->bufToData((char *)myPacketBuf, myPacketBufLen); + + // check the header character + if (myPacketBuf[0] != ArVCC4Commands::RESPONSE) + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Bad header character in long response packet."); + myPacketBufLen = 0; + myBytesLeft = 0; + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + return true; + } + + if (myPacketBuf[5] != ArVCC4Commands::FOOTER) + { + // this means there is no error, and to expect more data + requestBytes(myBytesLeft); + myError = CAM_ERROR_NONE; + return true; + } + else + { + // there was an error, so set the flags and exit + errorCode = myPacketBuf[3]; + if (errorCode == CAM_ERROR_NONE || + errorCode == CAM_ERROR_BUSY || + errorCode == CAM_ERROR_PARAM || + errorCode == CAM_ERROR_MODE) + myError = errorCode; + else + { + ArLog::log(ArLog::Terse, "ArVCC4::packetHandler: Unrecognized error code sent from camera when expecting long response packet."); + myError = CAM_ERROR_UNKNOWN; + requestBytes(0); + } + myPacketBufLen = 0; + myBytesLeft = 0; + + return true; + } + } + + return true; +} + +/* This needs to eventually use digital zooming, too */ +AREXPORT int ArVCC4::getMaxZoom(void) const +{ + if (myCameraType == CAMERA_C50I) + return MAX_ZOOM_OPTIC; + else + return MAX_ZOOM_OPTIC; +} + +AREXPORT bool ArVCC4::panTilt_i(double pdeg, double tdeg) +{ + if (pdeg > getMaxPosPan_i()) + myPanDesired = getMaxPosPan_i(); + else if (pdeg < getMaxNegPan_i()) + myPanDesired = getMaxNegPan_i(); + else + myPanDesired = pdeg; + + if (tdeg > getMaxPosTilt_i()) + myTiltDesired = getMaxPosTilt_i(); + else if (tdeg < getMaxNegTilt_i()) + myTiltDesired = getMaxNegTilt_i(); + else + myTiltDesired = tdeg; + + return true; +} + +AREXPORT bool ArVCC4::zoom(int deg) +{ + if (deg > getMaxZoom()) + myZoomDesired = getMaxZoom(); + else if (deg < getMinZoom()) + myZoomDesired = getMinZoom(); + else + myZoomDesired = deg; + + return true; +} + +/* Is supposed to accept 1x, 2x, 4x, 8x, and 12x, but doesn't seem to work + for 12x*/ +AREXPORT bool ArVCC4::digitalZoom(int deg) +{ + if (deg < 0) + myDigitalZoomDesired = 0; + else if (deg > 3) + myDigitalZoomDesired = 3; + /* uncomment this if the 12x mode ever works */ + //else if (deg > 4) + // myDigitalZoomDesired = 4; + else + myDigitalZoomDesired = deg; + + return true; +} + +/* + This will process a response from the camera for where it thinks it + is panned and tilted to. +*/ +void ArVCC4::processGetPanTiltResponse(void) +{ + unsigned char buf[4]; + char byte; + unsigned int valU; + double val; + int i; + + // remove the ascii encoding, and put into 4-byte array + for (i=0;i<4;i++) + { + byte = myPacketBuf[i+5]; + if (byte < 0x40) + byte = byte - 0x30; + else + byte = byte - 'A' + 10; + buf[i] = byte; + } + + // convert the 4-bytes into a number + valU = buf[0]*0x1000 + buf[1]*0x100 + buf[2]*0x10 + buf[3]; + + // convert the number to a value that's meaningful, based on camera specs + val = (((int)valU - (int)0x8000)*0.1125); + + // now set myPan to the response received for where the camera thinks it is + myPanResponse = val; + + // repeat the steps for the tilt value + for (i=0;i<4;i++) + { + byte = myPacketBuf[i+9]; + if (byte < 0x40) + byte = byte - 0x30; + else + byte = byte - 'A' + 10; + buf[i] = byte; + } + valU = buf[0]*0x1000 + buf[1]*0x100 + buf[2]*0x10 + buf[3]; + val =(((int)valU - (int)0x8000)*0.1125); + myTiltResponse = val; + + myPacketBufLen = 0; +} + +/* + This will process the response from the camera when requesting to find + out where it thinks it is zoomed to. +*/ +void ArVCC4::processGetZoomResponse(void) +{ + unsigned char buf[4]; + char byte; + unsigned int valU; + int i; + + // Make sure we have the correct number of bytes + if (myPacketBufLen != 10) + { + myPacketBufLen = 0; + return; + } + + // remove the ascii encoding, and put into 2 bytes + for (i=0;i<4;i++) + { + byte = myPacketBuf[i+5]; + if (byte < 0x40) + byte = byte - 0x30; + else + byte = byte - 'A' + 10; + buf[i] = byte; + } + + // convert the 2 bytes into a number + valU = 0; + for (i=0;i<4;i++) + valU += buf[i]*(unsigned int)pow(16.0,(double)(3-i)); + + myZoomResponse = (int)valU; + + myPacketBufLen = 0; +} + +/* This is not implemented yet, but should eventually determine the product name + */ +/* +void ArVCC4::processGetProductNameResponse(void) +{ + char byte; + int i; + + if (myPacketBufLen != 10) + { + myPacketBufLen = 0; + return; + } +}*/ + +bool ArVCC4::sendPower(void) +{ + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::POWER); + if (myPowerStateDesired) + { + ArLog::log(ArLog::Verbose,"ArVCC4::sendPower: sending power on packet\n"); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID + 1); + } + else + { + ArLog::log(ArLog::Verbose,"ArVCC4::sendPower: sending power off packet\n"); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID); + } + + + // The camera will return 6 bytes. If busy, then resend + requestBytes(); + return sendPacket(&myPacket); +} + +bool ArVCC4::setControlMode(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::setControlMode: sending control mode packet\n"); + myPacket.empty(); //Send Control command + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::CONTROL); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID); + + // The camera will return 6 bytes, which fail if menu is operational + // If failure, then power-off and power-on + requestBytes(); + return sendPacket(&myPacket); +} + +AREXPORT void ArVCC4::addErrorCB(ArFunctor *functor, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + myErrorCBList.push_front(functor); + else if (position == ArListPos::LAST) + myErrorCBList.push_back(functor); + else + ArLog::log(ArLog::Terse, "ArVCC4::addErrorCB: Invalid position."); +} + +AREXPORT void ArVCC4::remErrorCB(ArFunctor *functor) +{ + myErrorCBList.remove(functor); +} + +void ArVCC4::throwError(void) +{ + std::list::iterator it; + + for (it = myErrorCBList.begin(); + it != myErrorCBList.end(); + it++) + (*it)->invoke(); + +} + +bool ArVCC4::sendInit(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendInit: sending init packet\n"); + + + myPacket.empty(); // Send Init command + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::INIT); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID); + + // The camera will return 6 bytes. If busy, resend + // If error, then not initted or not in control mode + + requestBytes(); + return sendPacket(&myPacket); +} + + +/* +It's necessary to set the default ranges, because the camera defaults to a max tilt range of +30, instead of +90. +*/ +bool ArVCC4::setDefaultRange(void) +{ + + ArLog::log(ArLog::Verbose,"ArVCC4::setDefaultRange: setting default range for camera movements"); + + myPacket.empty(); + preparePacket(&myPacket); + + myPacket.uByteToBuf(ArVCC4Commands::SETRANGE); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID + 1); + + // Note the conversion from degrees to camera units: + // units = degrees / 0.1125 + + // Set min tilt range + myPacket.byte2ToBuf(ArMath::roundInt(MIN_TILT/.1125) + 0x8000); + + // Set max tilt range + myPacket.byte2ToBuf(ArMath::roundInt(MAX_TILT/.1125) + 0x8000); + + requestBytes(); + return sendPacket(&myPacket); +} + +bool ArVCC4::sendPanTilt() +{ + if (myCommType != COMM_BIDIRECTIONAL && myWaitingOnStop == false) + { + sendHaltPanTilt(); + myWaitingOnStop = true; + switchState(AWAITING_STOP_PAN_TILT_RESPONSE); + return true; + } + + ArLog::log(ArLog::Verbose,"ArVCC4::sendPanTilt: sending panTilt packet"); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::PANTILT); + myPacket.byte2ToBuf(ArMath::roundInt( (myPanDesired)/.1125 ) + 0x8000); + myPacket.byte2ToBuf(ArMath::roundInt( (myTiltDesired)/.1125 ) + 0x8000); + + // set these so that we know what was sent if the command is successful + myPanSent = myPanDesired; + myTiltSent = myTiltDesired; + + switchState(AWAITING_PAN_TILT_RESPONSE); + + requestBytes(); + return sendPacket(&myPacket); +} + +bool ArVCC4::sendZoom() +{ + int i; + if (myCommType != COMM_BIDIRECTIONAL && myWaitingOnStop == false) + { + sendHaltZoom(); + myWaitingOnStop = true; + switchState(AWAITING_STOP_ZOOM_RESPONSE); + return true; + } + + ArLog::log(ArLog::Verbose,"ArVCC4::sendZoom: sending zoom packet"); + + char buf[5]; + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::ZOOM); + sprintf(buf, "%4X", myZoomDesired); + + for (i=0;i<3;i++) + if (buf[i] == ' ') + buf[i] = '0'; + + for (i=0;i<4;i++) + myPacket.byteToBuf(buf[i]); + + // remember what value was sent + myZoomSent = myZoomDesired; + + switchState(AWAITING_ZOOM_RESPONSE); + + requestBytes(); + return sendPacket(&myPacket); +} + +/* This sends- + 0x30, 0x31 to turn off digital zooming + 0x30, 0x32 for 2x + 0x30, 0x34 for 4x + 0x30, 0x38 for 8x + 0x30, 0x3C for 12x + */ +bool ArVCC4::sendDigitalZoom() +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendDigitalZoom: sending digital zoom packet"); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::DIGITALZOOM); + + if (myDigitalZoomDesired < 4) + { + myPacket.uByteToBuf(0x30); + myPacket.uByteToBuf(0x30 + (0x1 << myDigitalZoomDesired)); + } + else + { + /* this currently never gets called because myDigitalZoomDesired is + * always < 4. The manual says 0x3C should work, but it doesn't */ + myPacket.uByteToBuf(0x30); + myPacket.uByteToBuf(0x3C); + } + + requestBytes(); + return sendPacket(&myPacket); +} + + + + + +bool ArVCC4::sendHaltPanTilt(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendHaltPanTilt: sending halt pantilt packet"); + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::STOP); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID); + + requestBytes(); + return sendPacket(&myPacket); +} + + +bool ArVCC4::sendHaltZoom(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendHaltZoom: sending halt zoom packet"); + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::ZOOMSTOP); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID); + + requestBytes(); + return sendPacket(&myPacket); +} + + +bool ArVCC4::sendPanSlew(void) +{ + char buf[4]; + + if (myPanSlewDesired > getMaxPanSlew()) + myPanSlewDesired = getMaxPanSlew(); + if (myPanSlewDesired < getMinPanSlew()) + myPanSlewDesired = getMinPanSlew(); + + if (myPanSlewDesired != myPanSlew) + { + ArLog::log(ArLog::Verbose,"ArVCC4::sendPanSlew: sending panSlew packet"); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::PANSLEW); + + sprintf(buf,"%3X", ArMath::roundInt(myPanSlewDesired/.1125)); + + if (buf[0] < '0') + buf[0] = '0'; + if (buf[1] < '0') + buf[1] = '0'; + if (buf[2] < '0') + buf[2] = '0'; + + myPacket.byteToBuf(buf[0]); + myPacket.byteToBuf(buf[1]); + myPacket.byteToBuf(buf[2]); + + requestBytes(); + myPanSlewSent = myPanSlewDesired; + + return sendPacket(&myPacket); + } + return true; +} + + +bool ArVCC4::sendTiltSlew(void) +{ + char buf[4]; + + if (myTiltSlewDesired > getMaxTiltSlew()) + myTiltSlewDesired = getMaxTiltSlew(); + if (myTiltSlewDesired < getMinTiltSlew()) + myTiltSlewDesired = getMinTiltSlew(); + + if (myTiltSlewDesired != myTiltSlew) + { + ArLog::log(ArLog::Verbose,"ArVCC4::sendTiltSlew: sending tiltSlew packet"); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::TILTSLEW); + + sprintf(buf,"%3X", ArMath::roundInt(myTiltSlewDesired/.1125)); + + if (buf[0] == ' ') + buf[0] = '0'; + if (buf[1] == ' ') + buf[1] = '0'; + + myPacket.byteToBuf(buf[0]); + myPacket.byteToBuf(buf[1]); + myPacket.byteToBuf(buf[2]); + + requestBytes(); + myTiltSlewSent = myTiltSlewDesired; + + return sendPacket(&myPacket); + } + return true; +} + +bool ArVCC4::sendRealPanTiltRequest(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendRealPanTiltRequest: sending request for real pan/tilt information"); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::PANTILTREQ); + + // The camera will return 6 bytes in case of error + // 9 bytes otherwise. + requestBytes(14); + return sendPacket(&myPacket); +} + + +bool ArVCC4::sendRealZoomRequest(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendRealZoomRequest: sending request for real zoom position."); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::ZOOMREQ); + myPacket.uByteToBuf(ArVCC4Commands::DEVICEID); + + // The camera will return 6 bytes in case of error + // bytes othewise + requestBytes(10); + return sendPacket(&myPacket); +} + +/** +This controls the status of the LED. +0 - disable forced control +1 - green forced on +2 - all forced off +3 - red forced on +4 - orange forced on +**/ + +bool ArVCC4::sendLEDControlMode(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendLEDControlMode: sending LED control packet."); + + if (myDesiredLEDControlMode < 0 || myDesiredLEDControlMode > 4) + { + ArLog::log(ArLog::Terse,"ArVCC4::sendLEDControlMode: incorrect parameter. Not sending packet."); + myDesiredLEDControlMode = -1; + return false; + } + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::LEDCONTROL); + myPacket.uByteToBuf(0x30 + (unsigned char) myDesiredLEDControlMode); + + requestBytes(6); + + return sendPacket(&myPacket); +} + +bool ArVCC4::sendIRFilterControl(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendIRFilterControl: sending IR cut filter control packet."); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::IRCUTFILTER); + + if (myDesiredIRFilterMode) + myPacket.uByteToBuf(0x30); + else + myPacket.uByteToBuf(0x31); + + requestBytes(6); + + return sendPacket(&myPacket); +} + +/* The camera automatically shuts off the IR after some specified period of time. + This command tells the camera to leave them on for the max of 6 hours. + */ +bool ArVCC4::sendIRLEDControl(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendIRLEDControl: sending IR-LED control packet."); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::INFRARED); + if (myDesiredIRLEDsMode) + myPacket.uByteToBuf(0x36); + else + myPacket.uByteToBuf(0x30); + + requestBytes(6); + + return sendPacket(&myPacket); +} + +bool ArVCC4::sendProductNameRequest(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendProductNameRequest: sending request for product name."); + + myPacket.empty(); + preparePacket(&myPacket); + myPacket.uByteToBuf(ArVCC4Commands::PRODUCTNAME); + + return sendPacket(&myPacket); +} + +bool ArVCC4::sendFocus(void) +{ + ArLog::log(ArLog::Verbose,"ArVCC4::sendFocus: sending focus control packet."); + + myPacket.empty(); + preparePacket(&myPacket); + + myPacket.uByteToBuf(ArVCC4Commands::AUTOFOCUS); + myPacket.uByteToBuf(0x30 + (unsigned char) myFocusModeDesired); + + requestBytes(6); + + return sendPacket(&myPacket); +} + +ArPTZConnector::GlobalPTZCreateFunc ArVCC4::ourCreateFunc(&ArVCC4::create); + +ArPTZ* ArVCC4::create(size_t index, ArPTZParams params, ArArgumentParser *parser, ArRobot *robot) +{ + CameraType vccType = CAMERA_VCC4; + if(params.type == "vcc50i") + vccType = CAMERA_C50I; + return new ArVCC4(robot, params.inverted, COMM_UNKNOWN, true, false, vccType); + // ArPTZConnector takes care of choosing serial port or aux robot port +} + +void ArVCC4::registerPTZType() +{ + ArPTZConnector::registerPTZType("vcc4", &ourCreateFunc); + ArPTZConnector::registerPTZType("vcc50i", &ourCreateFunc); + ArPTZConnector::registerPTZType("vcc", &ourCreateFunc); +} diff --git a/Legacy/Aria/src/ArVersalogicIO.cpp b/Legacy/Aria/src/ArVersalogicIO.cpp new file mode 100644 index 0000000..393ed49 --- /dev/null +++ b/Legacy/Aria/src/ArVersalogicIO.cpp @@ -0,0 +1,360 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "ariaOSDef.h" +#include "ArVersalogicIO.h" +#include "ariaInternal.h" + +#include +#include + +/* These are taken from the amrio_dev.h file, which is part of the amrio module itself */ + +#define AMRIO_MAJOR_NUM (250) +#define AMRIO_MODULE_NAME ("amrio") + +#define ANALOG_GET_VALUE _IOWR('v', 1, unsigned int) +#define ANALOG_SET_PORT _IOWR('v', 2, unsigned char) +#define DIGITAL_GET_NUM_BANKS _IOWR('v', 3, int) +#define DIGITAL_SET_BANK0 _IOWR('v', 4, unsigned char) +#define DIGITAL_SET_BANK1 _IOWR('v', 5, unsigned char) +#define DIGITAL_SET_BANK2 _IOWR('v', 6, unsigned char) +#define DIGITAL_SET_BANK3 _IOWR('v', 7, unsigned char) +#define DIGITAL_SET_BANK_DIR_IN _IOWR('v', 8, int) +#define DIGITAL_SET_BANK_DIR_OUT _IOWR('v', 9, int) +#define DIGITAL_GET_BANK0 _IOWR('v', 10, unsigned char) +#define DIGITAL_GET_BANK1 _IOWR('v', 11, unsigned char) +#define DIGITAL_GET_BANK2 _IOWR('v', 12, unsigned char) +#define DIGITAL_GET_BANK3 _IOWR('v', 13, unsigned char) +#define GET_SPECIAL_CONTROL_REGISTER _IOWR('v', 14, unsigned char) + +ArMutex ArVersalogicIO::myMutex; + +/** Constructor for the ArVersalogicIO class. This will open the device + * named by @a dev (the default is "/dev/amrio" if the argument is omitted). + It will find the number of digital banks and set the to inputs. It will also + attempt to take an analog reading, which will fail if there is not analog chip + present. If the conversion fails it will disable the analog portion of the + code. + + Check isEnabled() to see if the device was properly opened during construction. +*/ +AREXPORT ArVersalogicIO::ArVersalogicIO(const char * dev) : + myDisconnectCB(this, &ArVersalogicIO::closeIO) +{ + myMutex.setLogName("ArVersalogicIO::myMutex"); + myNumBanks = 0; + + myDigitalBank0 = 0; + myDigitalBank1 = 0; + myDigitalBank2 = 0; + myDigitalBank3 = 0; + + ArLog::log(ArLog::Terse, "ArVersalogicIO::ArVersalogicIO: opening device %s", dev); + myFD = ArUtil::open(dev, O_RDWR); + + if (myFD == -1) + { + ArLog::log(ArLog::Terse, "ArVersalogicIO::ArVersalogicIO: open %s failed. Disabling class", dev); + myEnabled = false; + } + else + { + if(ioctl(myFD, DIGITAL_GET_NUM_BANKS, &myNumBanks)) + ArLog::log(ArLog::Terse, "ArVersalogicIO::ArVersalogicIO: failed to get the number of digital IO banks"); + // set the digital banks to inputs so as to not drive anything + int i; + for(i=0;i myNumBanks - 1) + return false; + + unsigned char tmp; + switch (bank) + { + case 0: + if (ioctl(myFD, DIGITAL_GET_BANK0, &tmp) != 0) + return false; + break; + case 1: + if (ioctl(myFD, DIGITAL_GET_BANK1, &tmp) != 0) + return false; + break; + case 2: + if (ioctl(myFD, DIGITAL_GET_BANK2, &tmp) != 0) + return false; + break; + case 3: + if (ioctl(myFD, DIGITAL_GET_BANK3, &tmp) != 0) + return false; + break; + default: + return false; + } + + // bitwise negate it because the hardware calls a 'high' off + *val = ~tmp; + return true; +} + + +/** Returns the state of the bits as they are currently set in the outputs. It + doesn't reconfirm with the hardware, but instead keeps track of how it last + set them. + @param bank which bank to check + @param val the byte to write the values into + @return true if the request was satisfied, false otherwise + **/ +AREXPORT bool ArVersalogicIO::getDigitalBankOutputs(int bank, unsigned char *val) +{ + if (!myEnabled) + return false; + + if (bank < 0 || bank > myNumBanks - 1) + return false; + + // should check for input vs. output + switch (bank) + { + case 0: + *val = myDigitalBank0; + break; + case 1: + *val = myDigitalBank1; + break; + case 2: + *val = myDigitalBank2; + break; + case 3: + *val = myDigitalBank3; + break; + } + + return true; +} + +/** The bits on the hardware side of the digital I/O ports are inverse-logic. + The bit must be set high in the register for the output to be off, and be + set low to be turned on. This function negates that so that it is more + intuitive. + + @param bank the bank number to use. 0 is the lowest bank + @param val the status of the 8-bits in a single byte. + **/ +AREXPORT bool ArVersalogicIO::setDigitalBankOutputs(int bank, unsigned char val) +{ + if (!myEnabled) + return false; + + if (bank < 0 || bank > myNumBanks - 1) + return false; + + // bitwise negate val because the hardware calls a 'high' off + switch (bank) + { + case 0: + if (ioctl(myFD, DIGITAL_SET_BANK0, ~val) != 0) + return false; + myDigitalBank0 = val; + break; + case 1: + if (ioctl(myFD, DIGITAL_SET_BANK1, ~val) != 0) + return false; + myDigitalBank1 = val; + break; + case 2: + if (ioctl(myFD, DIGITAL_SET_BANK2, ~val) != 0) + return false; + myDigitalBank2 = val; + break; + case 3: + if (ioctl(myFD, DIGITAL_SET_BANK3, ~val) != 0) + return false; + myDigitalBank3 = val; + break; + default: + return false; + } + + return true; +} + +/** The special_control_register contains various status bits, of which can + be found in the manuals for the motherboards. One interesting bit is the + temperature bit, which gets set high if the CPU is over the specified threshold + as set in the BIOS + + **/ +AREXPORT bool ArVersalogicIO::getSpecialControlRegister(unsigned char *val) +{ + if (!myEnabled) + return false; + + unsigned char tmp; + if (ioctl(myFD, GET_SPECIAL_CONTROL_REGISTER, &tmp) != 0) + return false; + + *val = tmp; + return true; +} diff --git a/Legacy/Aria/src/Aria.cpp b/Legacy/Aria/src/Aria.cpp new file mode 100644 index 0000000..cb18341 --- /dev/null +++ b/Legacy/Aria/src/Aria.cpp @@ -0,0 +1,1264 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ArExport.h" +#include "Aria.h" +#include "ArSocket.h" +#include "ArSignalHandler.h" +#include "ArKeyHandler.h" +#include "ArJoyHandler.h" +#ifndef ARINTERFACE +#include "ArModuleLoader.h" +#include "ArRobotJoyHandler.h" +#include "ArSystemStatus.h" +#endif // ARINTERFACE + +// to register PTZ types with PTZConnector: +#include "ArPTZConnector.h" +#include "ArRVisionPTZ.h" +#include "ArVCC4.h" +#include "ArDPPTU.h" +#include "ArSonyPTZ.h" + + + +ArGlobalFunctor1 Aria::ourSignalHandlerCB(&Aria::signalHandlerCB); +ArMutex Aria::ourShuttingDownMutex; +bool Aria::ourShuttingDown=false; +bool Aria::ourExiting=false; +std::string Aria::ourDirectory=""; +std::list Aria::ourInitCBs; +std::list Aria::ourUninitCBs; +ArKeyHandler *Aria::ourKeyHandler = NULL; +ArJoyHandler *Aria::ourJoyHandler = NULL; +bool Aria::ourInited = false; +bool Aria::ourRunning = false; +ArMutex Aria::ourExitCallbacksMutex; +std::multimap Aria::ourExitCallbacks; +bool Aria::ourSigHandleExitNotShutdown = true; +std::multimap *> Aria::ourParseArgCBs; +ArLog::LogLevel Aria::ourParseArgsLogLevel = ArLog::Verbose; +std::multimap Aria::ourLogOptionsCBs; +ArLog::LogLevel Aria::ourExitCallbacksLogLevel = ArLog::Verbose; +std::map *, ArStrCaseCmpOp> Aria::ourDeviceConnectionCreatorMap; +std::string Aria::ourDeviceConnectionTypes; +std::string Aria::ourDeviceConnectionChoices = "Choices:"; + +#ifndef ARINTERFACE +std::list Aria::ourRobots; +ArConfig Aria::ourConfig; +ArRobotJoyHandler *Aria::ourRobotJoyHandler = NULL; +ArStringInfoGroup Aria::ourInfoGroup; +int Aria::ourMaxNumLasers = 2; +int Aria::ourMaxNumSonarBoards = 1; +int Aria::ourMaxNumBatteries = 1; +int Aria::ourMaxNumLCDs = 1; +std::map *, ArStrCaseCmpOp> Aria::ourLaserCreatorMap; +std::string Aria::ourLaserTypes; +std::string Aria::ourLaserChoices = "Choices:"; +std::map *, ArStrCaseCmpOp> Aria::ourBatteryCreatorMap; +std::string Aria::ourBatteryTypes; +std::string Aria::ourBatteryChoices = "Choices:"; +std::map *, ArStrCaseCmpOp> Aria::ourLCDCreatorMap; +std::string Aria::ourLCDTypes; +std::string Aria::ourLCDChoices = "Choices:"; +std::map *, ArStrCaseCmpOp> Aria::ourSonarCreatorMap; +std::string Aria::ourSonarTypes; +std::string Aria::ourSonarChoices = "Choices:"; + +size_t Aria::ourMaxNumVideoDevices = 8; +size_t Aria::ourMaxNumPTZs = 8; + +#endif // ARINTERFACE + +std::string Aria::ourIdentifier = "generic"; + +/** + This must be called first before any other Aria functions. + It initializes the thread layer and the signal handling method. For + Windows it iniatializes the socket layer as well. This also sets the + directory Aria is located in using ARIA environmental variable (or Aria registry key on Windows). + For more about Aria's directory see getDirectory() and setDirectory(). + + For Linux the default signal handling method is to intercept OS signals + in a dedicated "signal handling thread", which cleanly closes down the + program, causes all the instances of ArRobot to stop their run loop and + disconnect from their robot. The program will exit on the following signals: + SIGHUP, SIGINT, SIGQUIT, and SIGTERM. + + For Windows, there is no signal handling. + + This method also adds the file /etc/Aria.args and the environment variable + ARIAARGS as locations for ArArgumentParser to obtain default argument values + from. + + @param method the method in which to handle signals. Defaulted to SIGHANDLE_SINGLE, or the method indicated by the ARIA_SIGHANDLE_METHOD environment variable (NONE, SINGLE or THREAD), if it exists. + @param initSockets specify whether or not to initialize the socket layer. This is only meaningfull for Windows. Defaulted to true. + + @param sigHandleExitNotShutdown if this is true and a signal + happens Aria will use exit() to quit instead of shutdown(), false will + still use shutdown which is the old behavior. + + @see ArSignalHandler + @see ArSocket + + */ +AREXPORT void Aria::init(SigHandleMethod method, bool initSockets, + bool sigHandleExitNotShutdown) +{ +#ifndef ARINTERFACE + // get this here so that the program update can be accurate + ArSystemStatus::getUptime(); +#endif + + std::list::iterator iter; + std::string str; + char buf[1024]; + + // make an ArTime and set it to now so that the good clock value will be set + ArTime timeInit; + timeInit.setToNow(); + + + ourShuttingDownMutex.setLogName("Aria::ourShuttingDownMutex"); + ourExitCallbacksMutex.setLogName("Aria::ourExitCallbacksMutex"); + if (ourInited == true) + return; + + ourRunning = true; +#ifndef WIN32 + srand48(time(NULL)); +#endif + + ArThread::init(); + + char* overrideSigMethod = getenv("ARIA_SIGHANDLE_METHOD"); + if(overrideSigMethod) + { + ArLog::log(ArLog::Terse, "Overriding signal handler method with %s from ARIA_SIGHANDLE_METHOD environment variable.", overrideSigMethod); + if(!strcmp(overrideSigMethod, "NONE")) + method = SIGHANDLE_NONE; + else if(!strcmp(overrideSigMethod, "SINGLE")) + method = SIGHANDLE_SINGLE; + else if(!strcmp(overrideSigMethod, "THREAD")) + method = SIGHANDLE_THREAD; + } + + if (method != SIGHANDLE_NONE) + { + ArSignalHandler::addHandlerCB(&ourSignalHandlerCB, ArListPos::LAST); + ArSignalHandler::blockCommon(); + ArSignalHandler::handle(ArSignalHandler::SigHUP); + ArSignalHandler::handle(ArSignalHandler::SigINT); + ArSignalHandler::handle(ArSignalHandler::SigQUIT); + ArSignalHandler::handle(ArSignalHandler::SigTERM); + ArSignalHandler::handle(ArSignalHandler::SigPIPE); + if (method == SIGHANDLE_SINGLE) + ArSignalHandler::createHandlerNonThreaded(); + else if (method == SIGHANDLE_THREAD) + { + ArSignalHandler::blockCommonThisThread(); + ArSignalHandler::createHandlerThreaded(); + } + } + + if (initSockets) + ArSocket::init(); + + if (ourDirectory.length() == 0) + { + if (getenv("ARIA") != NULL) + { + setDirectory(getenv("ARIA")); + } + else + { +#ifndef WIN32 + ArUtil::getStringFromFile("/etc/Aria", buf, sizeof(buf)); + str = buf; +#else // WIN32 + if (ArUtil::findFirstStringInRegistry( + "SOFTWARE\\MobileRobots\\Aria", + "Install Directory", buf, 1024)) + str = buf; + else + if (ArUtil::findFirstStringInRegistry( + "SOFTWARE\\ActivMedia Robotics\\Aria", + "Install Directory", buf, 1024)) + str = buf; + else + str = ""; + + #endif // WIN32 + if (str.length() > 0) + { + setDirectory(str.c_str()); + } + else + { + #ifndef ARINTERFACE + ArLog::log(ArLog::Terse, "NonCritical Error: ARIA could not find where it is located."); + #else + ArLog::log(ArLog::Verbose, "NonCritical Error: ARIA could not find where it is located."); + #endif + } + } + } + ourSigHandleExitNotShutdown = sigHandleExitNotShutdown; + +#ifndef ARINTERFACE + Aria::laserAddCreator("lms2xx", ArLaserCreatorHelper::getCreateLMS2xxCB()); + Aria::laserAddCreator("urg", ArLaserCreatorHelper::getCreateUrgCB()); + Aria::laserAddCreator("lms1XX", ArLaserCreatorHelper::getCreateLMS1XXCB()); + Aria::laserAddCreator("urg2.0", ArLaserCreatorHelper::getCreateUrg_2_0CB()); + Aria::laserAddCreator("s3series", ArLaserCreatorHelper::getCreateS3SeriesCB()); + Aria::laserAddCreator("lms5XX", ArLaserCreatorHelper::getCreateLMS5XXCB()); + Aria::laserAddCreator("tim3XX", ArLaserCreatorHelper::getCreateTiM3XXCB()); + Aria::laserAddCreator("sZseries", ArLaserCreatorHelper::getCreateSZSeriesCB()); + Aria::batteryAddCreator("mtx", ArBatteryMTXCreatorHelper::getCreateBatteryMTXCB()); + Aria::lcdAddCreator("mtx", ArLCDMTXCreatorHelper::getCreateLCDMTXCB()); + Aria::sonarAddCreator("mtx", ArSonarMTXCreatorHelper::getCreateSonarMTXCB()); + //Aria::batteryAddCreator("mtxbatteryv1", ArBatteryMTXCreatorHelper::getCreateBatteryMTXCB()); + //Aria::lcdAddCreator("mtxlcdv1", ArLCDMTXCreatorHelper::getCreateLCDMTXCB()); + //Aria::sonarAddCreator("mtxsonarv1", ArSonarMTXCreatorHelper::getCreateSonarMTXCB()); + #endif // ARINTERFACE + + Aria::deviceConnectionAddCreator( + "serial", ArDeviceConnectionCreatorHelper::getCreateSerialCB()); + Aria::deviceConnectionAddCreator( + "serial422", ArDeviceConnectionCreatorHelper::getCreateSerial422CB()); + Aria::deviceConnectionAddCreator( + "tcp", ArDeviceConnectionCreatorHelper::getCreateTcpCB()); + + ourInited = true; + + for (iter=ourInitCBs.begin(); iter != ourInitCBs.end(); ++iter) + (*iter)->invoke(); + + ArArgumentParser::addDefaultArgumentFile("/etc/Aria.args"); + ArArgumentParser::addDefaultArgumentEnv("ARIAARGS"); + + ArVCC4::registerPTZType(); + ArRVisionPTZ::registerPTZType(); + ArDPPTU::registerPTZType(); + ArSonyPTZ::registerPTZType(); +} + + +/** + This must be called last, after all other Aria functions. + For both Linux and Windows, it closes all the open ArModules. For Windows + it deinitializes the socket layer as well. +*/ +AREXPORT void Aria::uninit() +{ + std::list::iterator iter; + + for (iter=ourUninitCBs.begin(); iter != ourUninitCBs.end(); ++iter) + (*iter)->invoke(); + +#ifndef ARINTERFACE + ArModuleLoader::closeAll(); +#endif // ARINTERFACE + ArSocket::shutdown(); + ArThread::shutdown(); +} + +/** + This will add a callback to the list of callbacks to call when Aria + has been initialized. It can be called before anything else. +*/ +AREXPORT void Aria::addInitCallBack(ArFunctor *cb, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + ourInitCBs.push_front(cb); + else + ourInitCBs.push_back(cb); +} + +/** + This will add a callback to the list of callbacks to call right before Aria + is un-initialized. It can be called before anything else. This facilitates + code that in operating system signal handlers simply calls Aria::uninit() + and packages that are based on Aria are unitited as well. It simplifies + the entire uninit process. +*/ +AREXPORT void Aria::addUninitCallBack(ArFunctor *cb, ArListPos::Pos position) +{ + if (position == ArListPos::FIRST) + ourUninitCBs.push_front(cb); + else + ourUninitCBs.push_back(cb); +} + +/** + Use this function to clean up or uninitialize Aria, in particular, + to stop background threads. + (Note: If you want to shutdown ARIA cleanly at the + end of your program or when exiting the program due to error, use + Aria::exit() instead.) + This calls stop() on all ArThread's and ArASyncTask's. It will + block until all ArThread's and ArASyncTask's exit. It is expected + that all the tasks will obey the ArThread::myRunning variable and + exit when it is false. Note, this only stop Aria's background threads, + it does not exit the program. + If you want to shutdown ARIA cleanly at the + end of your program or when exiting the program due to error, use + Aria::exit() instead. + @sa Aria::exit() +*/ +AREXPORT void Aria::shutdown() +{ + bool doExit=false; + + ourShuttingDownMutex.lock(); + ourRunning = false; + if (ourShuttingDown) + doExit=true; + else + ourShuttingDown=true; + ourShuttingDownMutex.unlock(); + + if (doExit) + return; + + ArThread::stopAll(); + ArThread::joinAll(); + uninit(); +} + +/** + This will call the list of Aria exit callbacks (added by addExitCallback()) + and then exit the program with + the given exit code. This method may be used as a replacement for the + standard system ::exit() call (which is used by this method + to finally exit the program with the given @a exitCode after finishing Aria + shutdown steps.) + + Note that this could be called from anywhere, + mutexes may be locked when called-- all exit + callbacks MUST return and cannot wait for a lock, since this could result + in the program hanging due to double-lock (deadlock). + + @sa addExitCallback() +**/ +AREXPORT void Aria::exit(int exitCode) +{ + bool doReturn = false; + ourShuttingDownMutex.lock(); + ourRunning = false; + if (ourExiting) + doReturn=true; + else + ourExiting=true; + ourShuttingDownMutex.unlock(); + + if (doReturn) + return; + + callExitCallbacks(); + ::exit(exitCode); +} + +/** @internal */ +AREXPORT void Aria::callExitCallbacks(void) +{ + ourRunning = false; + + ourShuttingDownMutex.lock(); + ourExiting = true; + ourShuttingDownMutex.unlock(); + + std::multimap::reverse_iterator it; + + + + ourExitCallbacksMutex.lock(); + ArLog::log(ourExitCallbacksLogLevel, "Aria::exit: Starting exit callbacks"); + for (it = ourExitCallbacks.rbegin(); it != ourExitCallbacks.rend(); it++) + { + ArLog::log(ourExitCallbacksLogLevel, + "Aria::exit: Calling callback at position %d with name '%s'", + (*it).first, (*it).second->getName()); + (*it).second->invoke(); + ArLog::log(ourExitCallbacksLogLevel, + "Aria::exit: Called callback at position %d with name '%s'", + (*it).first, (*it).second->getName()); + + } + ArLog::log(ourExitCallbacksLogLevel, "Aria::exit: Finished exit callbacks"); + ourExitCallbacksMutex.unlock(); +} + +/** + * Note, an exit callback may be called at any time; it should not + * block or wait on any locked mutexes or similar. + */ +AREXPORT void Aria::addExitCallback(ArFunctor *functor, int position) +{ + if (ourExiting) + { + ArLog::log(ArLog::Normal, + "Aria::addExitCallback: Could not add exit callback '%s' since in the middle of exiting", functor->getName()); + return; + } + + ourExitCallbacksMutex.lock(); + ArLog::log(ourExitCallbacksLogLevel, + "Aria::addExitCallback: Adding callback at position %d with name '%s'", + position, functor->getName()); + ourExitCallbacks.insert(std::pair(position, functor)); + ourExitCallbacksMutex.unlock(); +} + +/** + Note, an exit callback may be called at any time; it should not * + block or wait on any locked mutexes or similar. + + Also note that this will not actually happen if it is called while + aria is exiting (ie it is walking through the list). + + @since 2.7.0 + */ +AREXPORT void Aria::remExitCallback(ArFunctor *functor) +{ + if (ourExiting) + { + ArLog::log(ArLog::Normal, + "Aria::remExitCallback: Could not remove exit callback '%s' since in the middle of exiting", functor->getName()); + return; + } + + std::multimap::iterator it; + + ourExitCallbacksMutex.lock(); + for (it = ourExitCallbacks.begin(); it != ourExitCallbacks.end(); it++) + { + if ((*it).second == functor) + { + ourExitCallbacks.erase(it); + ourExitCallbacksMutex.unlock(); + return remExitCallback(functor); + } + } + ourExitCallbacksMutex.unlock(); +} + +/** + This method is roughly obsolete, it simply forces all the threads to die + immediately and then exits... The new method exit() is preferred. + + This calls cancel() on all AtThread's and ArASyncTask's. It forces + each thread to exit and should only be used in the case of a thread + hanging or getting stuck in an infinite loop. This works fine in Linux. + In Windows it is not recommended at all that this function be called. + Windows can not handle cleanly killing off a thread. See the help in + the VC++ compiler on the WIN32 function TerminateThread. The biggest + problem is that the state of DLL's can be destroyed. + + @deprecated +**/ + +AREXPORT void Aria::exitOld(int exitCode) +{ + ourRunning = false; + ArThread::cancelAll(); + uninit(); + ::exit(exitCode); +} + +#ifndef ARINTERFACE +AREXPORT void Aria::addRobot(ArRobot *robot) +{ + ourRobots.push_back(robot); +} + +AREXPORT void Aria::delRobot(ArRobot *robot) +{ + ourRobots.remove(robot); +} + +/** + @param name the name of the robot you want to find + @return NULL if there is no robot of that name, otherwise the robot with + that name +*/ +AREXPORT ArRobot *Aria::findRobot(char *name) +{ + std::string rname; + std::list::iterator it; + if (name == NULL) + return NULL; + + rname = name; + for (it = ourRobots.begin(); it != ourRobots.end(); it++) + { + if ((*it)->getName() == rname) + return (*it); + } + return NULL; + +} + +AREXPORT std::list * Aria::getRobotList() +{ + return(&ourRobots); +} + +#endif // ARINTERFACE + +/** @internal */ +AREXPORT void Aria::signalHandlerCB(int sig) +{ + + // if we want to exit instead of shutdown then do that ( call never returns) + if (ourSigHandleExitNotShutdown) + { + ArLog::log(ArLog::Normal, "Aria: Received signal '%s'. Exiting.", + ArSignalHandler::nameSignal(sig)); + Aria::exit(0); + // we shouldn't need this here, since the program should already + // exited... but just in case + ::exit(0); + } + + + ourShuttingDownMutex.lock(); + if (!ourRunning) + { + ourShuttingDownMutex.unlock(); + return; + } + ourShuttingDownMutex.unlock(); + + + ArLog::log(ArLog::Normal, "Aria: Received signal '%s'. Shutting down.", + ArSignalHandler::nameSignal(sig)); + +#ifndef ARINTERFACE + std::list::iterator iter; + if ((sig == ArSignalHandler::SigINT) || (sig == ArSignalHandler::SigHUP) || + (sig == ArSignalHandler::SigTERM)) + { + for (iter=ourRobots.begin(); iter != ourRobots.end(); ++iter) + (*iter)->stopRunning(); + } +#endif //ARINTERFACE + + // I'm disregarding this advice below since I can't seem to get + // anything else to work well and haven't seen problems from it + + // dont do an Aria::shutdown() here because we want the main() + // function to do the ArThread::joinAll(). Otherwise variables on + // the stack frame of main() may get destructed if main() happens to + // exit before other threads. And some of those variables may be + // used by those threads. + shutdown(); +} + +/** + This sets the directory that ARIA is located in, so ARIA can find param + files and the like. This can also be controlled by the environment variable + ARIA, which this is set to (if it exists) when Aria::init is done. So + for setDirectory to be effective, it must be done after the Aria::init. + @param directory the directory Aria is located in + @see getDirectory +*/ +AREXPORT void Aria::setDirectory(const char *directory) +{ + int ind; + if (directory != NULL) + { + ourDirectory = directory; + ind = strlen(directory) - 1; + if (ind < 0) + ind = 0; + if (directory[ind] != '/' && directory[ind] != '\\') + { +#ifdef WIN32 + ourDirectory += "\\"; +#else // win32 + ourDirectory += "/"; +#endif // win32 + } +#ifndef ARINTERFACE + ourConfig.setBaseDirectory(ourDirectory.c_str()); +#endif // ARINTERFACE + } +} + +/** + This gets the directory that ARIA is located in, this is so ARIA can find + param files and the like. + @return the directory ARIA is located in + @see setDirectory +*/ +AREXPORT const char *Aria::getDirectory(void) +{ + return ourDirectory.c_str(); +} + +/// Sets the key handler, so that other classes can find it +AREXPORT void Aria::setKeyHandler(ArKeyHandler *keyHandler) +{ + ourKeyHandler = keyHandler; +} + +/// Gets the key handler if one has been set +AREXPORT ArKeyHandler *Aria::getKeyHandler(void) +{ + return ourKeyHandler; +} + +/// Sets the joy handler, so that other classes can find it +AREXPORT void Aria::setJoyHandler(ArJoyHandler *joyHandler) +{ + ourJoyHandler = joyHandler; +} + +/// Gets the joy handler if one has been set +AREXPORT ArJoyHandler *Aria::getJoyHandler(void) +{ + return ourJoyHandler; +} + +#ifndef ARINTERFACE +/// Sets the robot joy handler, so that other classes can find it +AREXPORT void Aria::setRobotJoyHandler(ArRobotJoyHandler *robotJoyHandler) +{ + ourRobotJoyHandler = robotJoyHandler; +} + +/// Gets the robot joy handler if one has been set +AREXPORT ArRobotJoyHandler *Aria::getRobotJoyHandler(void) +{ + return ourRobotJoyHandler; +} + +/** + This gets the global config aria uses. + **/ +AREXPORT ArConfig *Aria::getConfig(void) +{ + return &ourConfig; +} + +/** + This gets the global string group aria uses. + **/ +AREXPORT ArStringInfoGroup *Aria::getInfoGroup(void) +{ + return &ourInfoGroup; +} + +/** + Gets the maximum number of lasers to check for and use +**/ +AREXPORT int Aria::getMaxNumLasers(void) +{ + return ourMaxNumLasers; +} + +/** + Sets the maximum number of lasers to check for and use, if you are + going to set this you should do it after the Aria::init before you + start making laser connectors or robots or robot params. +**/ +AREXPORT void Aria::setMaxNumLasers(int maxNumLasers) +{ + ourMaxNumLasers = maxNumLasers; +} + +/** + Gets the maximum number of sonar boards to check for and use +**/ +AREXPORT int Aria::getMaxNumSonarBoards(void) +{ + return ourMaxNumSonarBoards; +} + +/** + Sets the maximum number of sonars to check for and use, if you are + going to set this you should do it after the Aria::init +**/ +AREXPORT void Aria::setMaxNumSonarBoards(int maxNumSonarBoards) +{ + ourMaxNumSonarBoards = maxNumSonarBoards; +} + +/** + Gets the maximum number of batteries to check for and use +**/ +AREXPORT int Aria::getMaxNumBatteries(void) +{ + return ourMaxNumBatteries; +} + +/** + Sets the maximum number of sonars to check for and use, if you are + going to set this you should do it after the Aria::init +**/ +AREXPORT void Aria::setMaxNumBatteries(int maxNumBatteries) +{ + ourMaxNumBatteries = maxNumBatteries; +} + +/** + Gets the maximum number of lcds to check for and use +**/ +AREXPORT int Aria::getMaxNumLCDs(void) +{ + return ourMaxNumLCDs; +} + +/** + Sets the maximum number of sonars to check for and use, if you are + going to set this you should do it after the Aria::init +**/ +AREXPORT void Aria::setMaxNumLCDs(int maxNumLCDs) +{ + ourMaxNumLCDs = maxNumLCDs; +} + + +#endif // ARINTERFACE + +/** + returns true if ARIA is initialized (Aria::init() has been called) and has not been shut down by + a call to Aria::shutdown() or Aria::exit() and an operating system signal has not occured (e.g. + external KILL signal) +**/ +AREXPORT bool Aria::getRunning(void) +{ + return ourRunning; +} + +/** @sa addParseArgsCB() */ +AREXPORT bool Aria::parseArgs(void) +{ + std::multimap *>::reverse_iterator it; + ArRetFunctor *callback; + + ArLog::log(ourParseArgsLogLevel, "Aria: Parsing arguments"); + for (it = ourParseArgCBs.rbegin(); it != ourParseArgCBs.rend(); it++) + { + callback = (*it).second; + if (callback->getName() != NULL && callback->getName()[0] != '\0') + ArLog::log(ourParseArgsLogLevel, + "Aria: Calling parse arg functor '%s' (%d)", + callback->getName(), (*it).first); + else + ArLog::log(ourParseArgsLogLevel, + "Aria: Calling unnamed parse arg functor (%d)", + (*it).first); + + if (!callback->invokeR()) + { + if (callback->getName() != NULL && callback->getName()[0] != '\0') + ArLog::log(ArLog::Terse, + "Aria::parseArgs: Failed, parse arg functor '%s' (%d) returned false", + callback->getName(), (*it).first); + else + ArLog::log(ArLog::Terse, + "Aria::parseArgs: Failed unnamed parse arg functor (%d) returned false", + (*it).first); + return false; + } + } + return true; +} + +/** @sa addLogOptionsCB() */ +AREXPORT void Aria::logOptions(void) +{ + std::multimap::reverse_iterator it; + + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, ""); + for (it = ourLogOptionsCBs.rbegin(); it != ourLogOptionsCBs.rend(); it++) + { + (*it).second->invoke(); + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, ""); + } + ArLog::log(ArLog::Terse, ""); + ArLog::log(ArLog::Terse, ""); +} + +AREXPORT void Aria::addParseArgsCB(ArRetFunctor *functor, + int position) +{ + ourParseArgCBs.insert(std::pair *>(position, + functor)); +} + +AREXPORT void Aria::setParseArgLogLevel(ArLog::LogLevel level) +{ + ourParseArgsLogLevel = level; +} + +AREXPORT void Aria::addLogOptionsCB(ArFunctor *functor, int position) +{ + ourLogOptionsCBs.insert(std::pair(position, functor)); +} + +AREXPORT void Aria::setExitCallbacksLogLevel(ArLog::LogLevel level) +{ + ourExitCallbacksLogLevel = level; +} + +#ifndef ARINTERFACE +/** + This adds a functor which can create a laser of a given type. + + @param laserType The laser type that the creator will make (these + are always checked case insensitively). If + there is already a creator for this type, then the old one is + replaced and the new one is used. + + @param creator A functor which takes an int (laser number) and a + const char * (logPrefix) and returns a new laser of the laserType +**/ +AREXPORT bool Aria::laserAddCreator( + const char *laserType, + ArRetFunctor2 *creator) +{ + if (ourLaserCreatorMap.find(laserType) != ourLaserCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "Aria::laserAddCreator: There is already a laser creator for %s, replacing it", laserType); + ourLaserCreatorMap.erase(laserType); + } + else + { + // if we haven't added any types add to the choices (there's an + // intro string in choices, so it's checking the other variable) + if (!ourLaserTypes.empty()) + ourLaserChoices += ";;"; + ourLaserChoices += laserType; + + if (!ourLaserTypes.empty()) + ourLaserTypes += "|"; + ourLaserTypes += laserType; + } + + ourLaserCreatorMap[laserType] = creator; + return true; +} + +/** + Gets a string that is the types of lasers that can be created + separated by | characters. Mostly for internal use by ArLaserConnector. +**/ +AREXPORT const char *Aria::laserGetTypes(void) +{ + return ourLaserTypes.c_str(); +} + +/** + Gets a string that is the types of lasers that can be created + separated by ;; characters. Mostly for internal use by the config +**/ +AREXPORT const char *Aria::laserGetChoices(void) +{ + return ourLaserChoices.c_str(); +} + +/** + Creates a laser of a given type, with the given laserNumber, and + uses the logPrefix for logging what happens. This is mostly for + internal use by ArLaserConnector. + + @param laserType The type of laser to create + + @param laserNumber The laser number to use for the created laser + + @param logPrefix The prefix to use when logging +*/ + +AREXPORT ArLaser *Aria::laserCreate(const char *laserType, int laserNumber, + const char *logPrefix) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + if ((it = ourLaserCreatorMap.find(laserType)) == ourLaserCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "%sCannot create a laser of type %s options are <%s>", logPrefix, laserType, laserGetTypes()); + return NULL; + } + + return (*it).second->invokeR(laserNumber, logPrefix); +} + + +/** + This adds a functor which can create a battery of a given type. + + @param batteryType The battery type that the creator will make (these + are always checked case insensitively). If + there is already a creator for this type, then the old one is + replaced and the new one is used. + + @param creator A functor which takes an int (battery number) and a + const char * (logPrefix) and returns a new battery of the batteryType +**/ +AREXPORT bool Aria::batteryAddCreator( + const char *batteryType, + ArRetFunctor2 *creator) +{ + if (ourBatteryCreatorMap.find(batteryType) != ourBatteryCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "Aria::batteryAddCreator: There is already a battery creator for %s, replacing it", batteryType); + ourBatteryCreatorMap.erase(batteryType); + } + else + { + // if we haven't added any types add to the choices (there's an + // intro string in choices, so it's checking the other variable) + if (!ourBatteryTypes.empty()) + ourBatteryChoices += ";;"; + ourBatteryChoices += batteryType; + + if (!ourBatteryTypes.empty()) + ourBatteryTypes += "|"; + ourBatteryTypes += batteryType; + } + + ourBatteryCreatorMap[batteryType] = creator; + return true; +} + +/** + Gets a string that is the types of batteries that can be created + separated by | characters. Mostly for internal use by ArBatteryConnector. +**/ +AREXPORT const char *Aria::batteryGetTypes(void) +{ + return ourBatteryTypes.c_str(); +} + +/** + Gets a string that is the types of batteries that can be created + separated by ;; characters. Mostly for internal use by the config. +**/ +AREXPORT const char *Aria::batteryGetChoices(void) +{ + return ourBatteryChoices.c_str(); +} + +/** + Creates a battery of a given type, with the given batteryNumber, and + uses the logPrefix for logging what happens. This is mostly for + internal use by ArBatteryConnector. + + @param batteryType The type of battery to create + + @param batteryNumber The battery number to use for the created battery + + @param logPrefix The prefix to use when logging +*/ + +AREXPORT ArBatteryMTX *Aria::batteryCreate(const char *batteryType, int batteryNumber, + const char *logPrefix) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + if ((it = ourBatteryCreatorMap.find(batteryType)) == ourBatteryCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "%sCannot create a battery of type %s options are <%s>", logPrefix, batteryType, batteryGetTypes()); + return NULL; + } + + return (*it).second->invokeR(batteryNumber, logPrefix); +} + + +/** + This adds a functor which can create a lcd of a given type. + + @param lcdType The lcd type that the creator will make (these + are always checked case insensitively). If + there is already a creator for this type, then the old one is + replaced and the new one is used. + + @param creator A functor which takes an int (lcd number) and a + const char * (logPrefix) and returns a new lcd of the lcdType +**/ +AREXPORT bool Aria::lcdAddCreator( + const char *lcdType, + ArRetFunctor2 *creator) +{ + if (ourLCDCreatorMap.find(lcdType) != ourLCDCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "Aria::lcdAddCreator: There is already a lcd creator for %s, replacing it", lcdType); + ourLCDCreatorMap.erase(lcdType); + } + else + { + // if we haven't added any types add to the choices (there's an + // intro string in choices, so it's checking the other variable) + + if (!ourLCDTypes.empty()) + ourLCDChoices += ";;"; + ourLCDChoices += lcdType; + + if (!ourLCDTypes.empty()) + ourLCDTypes += "|"; + ourLCDTypes += lcdType; + + } + + ourLCDCreatorMap[lcdType] = creator; + return true; +} + +/** + Gets a string that is the types of batteries that can be created + separated by | characters. Mostly for internal use by ArLCDConnector. +**/ +AREXPORT const char *Aria::lcdGetTypes(void) +{ + return ourLCDTypes.c_str(); +} + +/** + Gets a string that is the types of batteries that can be created + separated by ;; characters. Mostly for internal use by ArLCDConnector. +**/ +AREXPORT const char *Aria::lcdGetChoices(void) +{ + return ourLCDChoices.c_str(); +} + +/** + Creates a lcd of a given type, with the given lcdNumber, and + uses the logPrefix for logging what happens. This is mostly for + internal use by ArLCDConnector. + + @param lcdType The type of lcd to create + + @param lcdNumber The lcd number to use for the created lcd + + @param logPrefix The prefix to use when logging +*/ + +AREXPORT ArLCDMTX *Aria::lcdCreate(const char *lcdType, int lcdNumber, + const char *logPrefix) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + if ((it = ourLCDCreatorMap.find(lcdType)) == ourLCDCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "%sCannot create a lcd of type %s options are <%s>", logPrefix, lcdType, lcdGetTypes()); + return NULL; + } + + return (*it).second->invokeR(lcdNumber, logPrefix); +} + + +/** + This adds a functor which can create a sonar of a given type. + + @param sonarType The sonar type that the creator will make (these + are always checked case insensitively). If + there is already a creator for this type, then the old one is + replaced and the new one is used. + + @param creator A functor which takes an int (sonar number) and a + const char * (logPrefix) and returns a new sonar of the sonarType +**/ +AREXPORT bool Aria::sonarAddCreator( + const char *sonarType, + ArRetFunctor2 *creator) +{ + if (ourSonarCreatorMap.find(sonarType) != ourSonarCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "Aria::sonarAddCreator: There is already a sonar creator for %s, replacing it", sonarType); + ourSonarCreatorMap.erase(sonarType); + } + else + { + // if we haven't added any types add to the choices (there's an + // intro string in choices, so it's checking the other variable) + if (!ourSonarTypes.empty()) + ourSonarChoices += ";;"; + ourSonarChoices += sonarType; + + if (!ourSonarTypes.empty()) + ourSonarTypes += "|"; + ourSonarTypes += sonarType; + } + + ourSonarCreatorMap[sonarType] = creator; + return true; +} + +/** + Gets a string that is the types of sonars that can be created + separated by | characters. Mostly for internal use by ArSonarConnector. +**/ +AREXPORT const char *Aria::sonarGetTypes(void) +{ + return ourSonarTypes.c_str(); +} + +/** + Gets a string that is the types of sonars that can be created + separated by ;; characters. Mostly for internal use by the config. +**/ +AREXPORT const char *Aria::sonarGetChoices(void) +{ + return ourSonarChoices.c_str(); +} + +/** + Creates a sonar of a given type, with the given sonarNumber, and + uses the logPrefix for logging what happens. This is mostly for + internal use by ArSonarConnector. + + @param sonarType The type of sonar to create + + @param sonarNumber The sonar number to use for the created sonar + + @param logPrefix The prefix to use when logging +*/ + +AREXPORT ArSonarMTX *Aria::sonarCreate(const char *sonarType, int sonarNumber, + const char *logPrefix) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + if ((it = ourSonarCreatorMap.find(sonarType)) == ourSonarCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "%sCannot create a sonar of type %s options are <%s>", logPrefix, sonarType, sonarGetTypes()); + return NULL; + } + + return (*it).second->invokeR(sonarNumber, logPrefix); +} + +#endif // ARINTERFACE + +/** + This adds a functor which can create a deviceConnection of a given + type. + + @param deviceConnectionType The deviceConnection type that the + creator will make (these are always checked case insensitively). If + there is already a creator for this type, then the old one is + replaced and the new one is used. + + @param creator A functor which takes a const char * (port name), a + const char * (defaultInfo, for example default tcp port), a const + char * (logPrefix) and returns a new deviceConnection of the + deviceConnectionType if it can create the desired connection. If + the connection failes then it should return NULL. +**/ +AREXPORT bool Aria::deviceConnectionAddCreator( + const char *deviceConnectionType, + ArRetFunctor3 *creator) +{ + if (ourDeviceConnectionCreatorMap.find(deviceConnectionType) != ourDeviceConnectionCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "Aria::deviceConnectionAddCreator: There is already a deviceConnection creator for %s, replacing it", deviceConnectionType); + ourDeviceConnectionCreatorMap.erase(deviceConnectionType); + } + else + { + // if we haven't added any types add to the choices (there's an + // intro string in choices, so it's checking the other variable) + if (!ourDeviceConnectionTypes.empty()) + ourDeviceConnectionChoices += ";;"; + ourDeviceConnectionChoices += deviceConnectionType; + + if (!ourDeviceConnectionTypes.empty()) + ourDeviceConnectionTypes += "|"; + ourDeviceConnectionTypes += deviceConnectionType; + } + + ourDeviceConnectionCreatorMap[deviceConnectionType] = creator; + return true; +} + +/** + Gets a string that is the types of device connections that can be created + separated by | characters. Mostly for internal use by ArLaserConnector. +**/ +AREXPORT const char *Aria::deviceConnectionGetTypes(void) +{ + return ourDeviceConnectionTypes.c_str(); +} + +/** + Gets a string that is the types of device connections that can be created + separated by ;; characters. Mostly for internal use by the config. +**/ +AREXPORT const char *Aria::deviceConnectionGetChoices(void) +{ + return ourDeviceConnectionChoices.c_str(); +} + +/** Creates a device connection of a given type, connecting to a given + port, with the given defaultInfo, logging messages with the given + prefix. This is mostly for internal use by ArLaserConnector + + @param deviceConnectionType The type of device connection to create + + @param port The port to connect to (for serial, an example is COM1 + or /dev/ttyS0, for tcp an example is p3dx:8101) + + @param defaultInfo Default info to use, the only use for this right + now is for a default port for a tcp connection (so that if it + doesn't have hostname:port format but only hostname then it will + use this port) + + @param logPrefix The prefix to use when logging +*/ +AREXPORT ArDeviceConnection *Aria::deviceConnectionCreate( + const char *deviceConnectionType, const char *port, + const char *defaultInfo, const char *logPrefix) +{ + std::map *, ArStrCaseCmpOp>::iterator it; + + if ((it = ourDeviceConnectionCreatorMap.find(deviceConnectionType)) == ourDeviceConnectionCreatorMap.end()) + { + ArLog::log(ArLog::Normal, "%sCannot create a deviceConnection of type %s options are <%s>", logPrefix, deviceConnectionType, deviceConnectionGetTypes()); + return NULL; + } + + return (*it).second->invokeR(port, defaultInfo, logPrefix); +} + + +AREXPORT void Aria::setMaxNumVideoDevices(size_t n) { ourMaxNumVideoDevices = n; } +AREXPORT size_t Aria::getMaxNumVideoDevices() { return ourMaxNumVideoDevices; } +AREXPORT void Aria::setMaxNumPTZs(size_t n) { ourMaxNumVideoDevices = n; } +AREXPORT size_t Aria::getMaxNumPTZs() { return ourMaxNumVideoDevices; } + +AREXPORT const char *Aria::getIdentifier(void) +{ + return ourIdentifier.c_str(); +} + +AREXPORT void Aria::setIdentifier(const char *identifier) +{ + ourIdentifier = identifier; +} diff --git a/Legacy/Aria/src/AriaDLL-vc2003.vcproj b/Legacy/Aria/src/AriaDLL-vc2003.vcproj new file mode 100644 index 0000000..23610b9 --- /dev/null +++ b/Legacy/Aria/src/AriaDLL-vc2003.vcproj @@ -0,0 +1,2485 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/src/AriaDLL-vc2008.vcproj b/Legacy/Aria/src/AriaDLL-vc2008.vcproj new file mode 100644 index 0000000..4f3db99 --- /dev/null +++ b/Legacy/Aria/src/AriaDLL-vc2008.vcproj @@ -0,0 +1,3171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/src/AriaDLL-vc2010.vcxproj b/Legacy/Aria/src/AriaDLL-vc2010.vcxproj new file mode 100644 index 0000000..ed2a584 --- /dev/null +++ b/Legacy/Aria/src/AriaDLL-vc2010.vcxproj @@ -0,0 +1,1957 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + AriaDLL + {606257AE-E882-4C66-84C0-72331642D09F} + AriaDLL + + + + DynamicLibrary + false + MultiByte + v100 + + + DynamicLibrary + false + MultiByte + v100 + + + DynamicLibrary + false + MultiByte + v100 + + + DynamicLibrary + false + MultiByte + Windows7.1SDK + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../bin/ + ../bin64/ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + ../obj64/$(ProjectName)-$(Configuration)-VC10/ + true + true + ../bin/ + ../bin/ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + ../obj/$(ProjectName)-$(Configuration)-VC10/ + false + false + AriaDebugVC10 + AriaDebugVC10 + AriaVC10 + AriaVC10 + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\../lib/AriaDLL.tlb + + + + + MaxSpeed + AnySuitable + true + ../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ARIADLL_EXPORTS;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + $(IntDir)$(TargetName)-VC10.pdb + Level3 + true + + + CompileAsCpp + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;ws2_32.lib;advapi32.lib + $(OutDir)$(TargetFileName) + + + true + true + $(TargetDir)$(TargetName)-VC10.pdb + false + + + ../lib/AriaVC10.lib + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\../lib/AriaDLL.tlb + + + + + MaxSpeed + AnySuitable + true + ../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ARIADLL_EXPORTS;%(PreprocessorDefinitions) + false + Default + MultiThreadedDLL + false + false + true + $(IntDir)$(TargetName)-VC10.pdb + Level3 + true + + + CompileAsCpp + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;ws2_32.lib;advapi32.lib + $(OutDir)$(TargetFileName) + + + true + true + $(TargetDir)$(TargetName)-VC10.pdb + false + + + ../lib64/AriaVC10.lib + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\../lib/AriaDLL.tlb + + + + + Disabled + ../include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;ARIADLL_EXPORTS;DEBUG;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + false + true + $(IntDir)$(TargetName)-VC10.pdb + true + Level3 + true + ProgramDatabase + CompileAsCpp + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;ws2_32.lib;advapi32.lib + $(OutDir)$(TargetFileName) + + + true + true + $(TargetDir)$(TargetName)-VC10.pdb + false + + + ../lib/AriaDebugVC10.lib + MachineX86 + + + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\../lib/AriaDLL.tlb + + + + + Disabled + ../include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;ARIADLL_EXPORTS;DEBUG;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + false + true + $(IntDir)$(TargetName)-VC10.pdb + true + Level3 + true + ProgramDatabase + CompileAsCpp + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;ws2_32.lib;advapi32.lib + $(OutDir)$(TargetFileName) + + + true + true + $(TargetDir)$(TargetName)-VC10.pdb + false + + + ../lib/AriaDebugVC10.lib + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + + + + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + EnableFastChecks + EnableFastChecks + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + EnableFastChecks + EnableFastChecks + true + true + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ARIADLL_EXPORTS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/src/AriaStatic-vc2003.sln b/Legacy/Aria/src/AriaStatic-vc2003.sln new file mode 100644 index 0000000..fd7071e --- /dev/null +++ b/Legacy/Aria/src/AriaStatic-vc2003.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "AriaStatic.vcproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/src/AriaStatic-vc2003.vcproj b/Legacy/Aria/src/AriaStatic-vc2003.vcproj new file mode 100644 index 0000000..a3ed954 --- /dev/null +++ b/Legacy/Aria/src/AriaStatic-vc2003.vcproj @@ -0,0 +1,2436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/src/AriaStatic-vc2008.vcproj b/Legacy/Aria/src/AriaStatic-vc2008.vcproj new file mode 100644 index 0000000..3b02a23 --- /dev/null +++ b/Legacy/Aria/src/AriaStatic-vc2008.vcproj @@ -0,0 +1,3114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/src/AriaStatic-vc2010.vcxproj b/Legacy/Aria/src/AriaStatic-vc2010.vcxproj new file mode 100644 index 0000000..c1571b6 --- /dev/null +++ b/Legacy/Aria/src/AriaStatic-vc2010.vcxproj @@ -0,0 +1,1140 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + AriaStatic + {527BBF7C-631F-486B-8E4F-EA594299A71A} + + + + + + StaticLibrary + false + MultiByte + true + + + StaticLibrary + false + MultiByte + true + Windows7.1SDK + + + StaticLibrary + false + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\../lib\ + ../obj/$(ProjectName)-$(Configuration)-VC10-Static\ + .\../lib\ + ../obj/$(ProjectName)-$(Configuration)-VC10-Static\ + $(ProjectName)DebugVC10 + $(ProjectName)VC10 + + + + Disabled + ../include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;ARIA_STATIC;ARIA_MSVC;%(PreprocessorDefinitions) + false + Sync + Default + MultiThreadedDebug + true + false + true + .\../staticobjNet/AriaStatic.pch + .\../staticobjNet/ + $(IntDir) + $(IntDir)$(TargetName)-VC10.pdb + true + Level3 + true + ProgramDatabase + Default + + + ../lib/AriaStaticDebugVC10.lib + %(AdditionalLibraryDirectories) + true + libcmtd.lib;%(IgnoreSpecificDefaultLibraries) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + + + MaxSpeed + AnySuitable + ../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;ARIA_STATIC;%(PreprocessorDefinitions) + true + Sync + Default + MultiThreaded + false + false + true + .\../staticobjNet/AriaStatic.pch + + + $(IntDir) + $(IntDir)$(TargetName)-VC7.pdb + Level3 + true + ProgramDatabase + Default + + + ..\lib\AriaStaticVC10.lib + true + %(IgnoreSpecificDefaultLibraries) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(IntDir)$(ProjectName)-$(Configuration)-BuildLog.htm + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + true + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/src/AriaStatic.sln b/Legacy/Aria/src/AriaStatic.sln new file mode 100644 index 0000000..fd7071e --- /dev/null +++ b/Legacy/Aria/src/AriaStatic.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaStatic", "AriaStatic.vcproj", "{527BBF7C-631F-486B-8E4F-EA594299A71A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.ActiveCfg = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Debug.Build.0 = Debug|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.ActiveCfg = Release|Win32 + {527BBF7C-631F-486B-8E4F-EA594299A71A}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/src/Makefile b/Legacy/Aria/src/Makefile new file mode 100644 index 0000000..01d8f7f --- /dev/null +++ b/Legacy/Aria/src/Makefile @@ -0,0 +1,14 @@ +# A simple $(MAKE)file to cause make to go look in the top directory. A simple +# convience. + +all: + $(MAKE) -C .. + +dep: + $(MAKE) -C .. dep + +clean: + $(MAKE) -C .. clean + +examples: + $(MAKE) -C .. examples diff --git a/Legacy/Aria/src/ariaUtil.cpp b/Legacy/Aria/src/ariaUtil.cpp new file mode 100644 index 0000000..ab9effa --- /dev/null +++ b/Legacy/Aria/src/ariaUtil.cpp @@ -0,0 +1,2669 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#define _GNU_SOURCE 1 // for isnormal() and other newer (non-ansi) C functions + +#include "ArExport.h" +#include "ariaOSDef.h" +#include +#include +#include +#include +#include +#include + +#ifdef WIN32 +#include // for timeGetTime() and mmsystem.h +#include // for timeGetTime() +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + + +#include "ariaInternal.h" +#include "ariaTypedefs.h" +#include "ariaUtil.h" + +#ifndef ARINTERFACE +#include "ArSick.h" +#include "ArUrg.h" +#include "ArLMS1XX.h" +#include "ArS3Series.h" +#include "ArUrg_2_0.h" +#include "ArSZSeries.h" +#include "ArSonarMTX.h" +#include "ArBatteryMTX.h" +#include "ArLCDMTX.h" +#endif // ARINTERFACE + +#include "ArSerialConnection.h" +#include "ArTcpConnection.h" + +#ifdef WIN32 +#include +AREXPORT const char *ArUtil::COM1 = "COM1"; +AREXPORT const char *ArUtil::COM2 = "COM2"; +AREXPORT const char *ArUtil::COM3 = "COM3"; +AREXPORT const char *ArUtil::COM4 = "COM4"; +AREXPORT const char *ArUtil::COM5 = "COM5"; +AREXPORT const char *ArUtil::COM6 = "COM6"; +AREXPORT const char *ArUtil::COM7 = "COM7"; +AREXPORT const char *ArUtil::COM8 = "COM8"; +AREXPORT const char *ArUtil::COM9 = "COM9"; +AREXPORT const char *ArUtil::COM10 = "COM10"; +AREXPORT const char *ArUtil::COM11 = "COM11"; +AREXPORT const char *ArUtil::COM12 = "COM12"; +AREXPORT const char *ArUtil::COM13 = "COM13"; +AREXPORT const char *ArUtil::COM14 = "COM14"; +AREXPORT const char *ArUtil::COM15 = "COM15"; +AREXPORT const char *ArUtil::COM16 = "COM16"; +#else // ifndef WIN32 +AREXPORT const char *ArUtil::COM1 = "/dev/ttyS0"; +AREXPORT const char *ArUtil::COM2 = "/dev/ttyS1"; +AREXPORT const char *ArUtil::COM3 = "/dev/ttyS2"; +AREXPORT const char *ArUtil::COM4 = "/dev/ttyS3"; +AREXPORT const char *ArUtil::COM5 = "/dev/ttyS4"; +AREXPORT const char *ArUtil::COM6 = "/dev/ttyS5"; +AREXPORT const char *ArUtil::COM7 = "/dev/ttyS6"; +AREXPORT const char *ArUtil::COM8 = "/dev/ttyS7"; +AREXPORT const char *ArUtil::COM9 = "/dev/ttyS8"; +AREXPORT const char *ArUtil::COM10 = "/dev/ttyS9"; +AREXPORT const char *ArUtil::COM11 = "/dev/ttyS10"; +AREXPORT const char *ArUtil::COM12 = "/dev/ttyS11"; +AREXPORT const char *ArUtil::COM13 = "/dev/ttyS12"; +AREXPORT const char *ArUtil::COM14 = "/dev/ttyS13"; +AREXPORT const char *ArUtil::COM15 = "/dev/ttyS14"; +AREXPORT const char *ArUtil::COM16 = "/dev/ttyS15"; +#endif // WIN32 + +AREXPORT const char *ArUtil::TRUESTRING = "true"; +AREXPORT const char *ArUtil::FALSESTRING = "false"; + +// const double eps = std::numeric_limits::epsilon(); +const double ArMath::ourEpsilon = 0.00000001; + +#ifdef WIN32 +// max returned by rand() +const long ArMath::ourRandMax = RAND_MAX; +#else +// max returned by lrand48() +const long ArMath::ourRandMax = 2147483648;// 2^31, per lrand48 man page +#endif + +#ifdef WIN32 +const char ArUtil::SEPARATOR_CHAR = '\\'; +const char *ArUtil::SEPARATOR_STRING = "\\"; +const char ArUtil::OTHER_SEPARATOR_CHAR = '/'; +#else +const char ArUtil::SEPARATOR_CHAR = '/'; +const char *ArUtil::SEPARATOR_STRING = "/"; +const char ArUtil::OTHER_SEPARATOR_CHAR = '\\'; +#endif + +#ifdef WIN32 +ArMutex ArUtil::ourLocaltimeMutex; +#endif + + +/** + Sleep (do nothing, without continuing the program) for @arg ms miliseconds. + Use this to add idle time to threads, or in situations such as waiting for +hardware with a known response time. To perform actions at specific intervals, +however, use the ArTime timer utility instead, or the ArUtil::getTime() method +to check time. + @note in Linux, it actually calls the system usleep() function with 10 ms less +than the desired sleep time, since usleep() can sleep for about 10 ms. more than +requested (for small sleep times especially, it sleeps for the next highest +multiple of 10.) + @param ms the number of milliseconds to sleep for +*/ +AREXPORT void ArUtil::sleep(unsigned int ms) +{ +#ifdef WIN32 + Sleep(ms); +#else // ifndef win32 + if (ms > 10) + ms -= 10; + usleep(ms * 1000); +#endif // linux + +} + +/** + Get the time in milliseconds, counting from some arbitrary point. + This time is only valid within this run of the program, it does not represent +"time of day". In other words, values returned by getTime() may be compared to +each other within the same run time of a program. + If ARIA was compiled on Linux with POSIX monotonic clock functions +available, and the current running Linux kernel supports the monotonic clock, +then the clock_gettime() function is used with the CLOCK_MONOTONIC option +(this is an accurate clock that is robust against e.g. changes to the +system time, etc.). Otherwise, gettimeofday() is used instead. Programs using ARIA +on Linux must therefore link to the librt library (with -lrt) as well as libAria. On Windows, the +timeGetTime() function is used from the winmm library -- this means programs +using ARIA on Windows must be linked to the winmm.lib library as well as ARIA. + @return millisecond time +*/ +AREXPORT unsigned int ArUtil::getTime(void) +{ +// the good unix way +#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) + struct timespec tp; + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return tp.tv_nsec / 1000000 + (tp.tv_sec % 1000000)*1000; +// the old unix way as a fallback +#endif // if it isn't the good way +#if !defined(WIN32) + struct timeval tv; + if (gettimeofday(&tv,NULL) == 0) + return tv.tv_usec/1000 + (tv.tv_sec % 1000000)*1000; + else + return 0; +#elif defined(WIN32) + return timeGetTime(); +#endif +} + +/* + Takes a string and splits it into a list of words. It appends the words + to the outList. If there is nothing found, it will not touch the outList. + @param inString the input string to split + @param outList the list in which to store the words that are found +*/ +/* +AREXPORT void ArUtil::splitString(std::string inString, + std::list &outList) +{ + const char *start, *end; + + // Strip off leading white space + for (end=inString.c_str(); *end && isspace(*end); ++end) + ; + while (*end) + { + // Mark start of the word then find end + for (start=end; *end && !isspace(*end); ++end) + ; + // Store the word + if (*start && ((*end && isspace(*end)) || !*end)) + outList.push_back(std::string(start, (int)(end-start))); + for (; *end && isspace(*end); ++end) + ; + } +} +*/ + + + +#ifdef WIN32 + +/** + @return size in bytes. -1 on error. + @param fileName name of the file to size +*/ +AREXPORT long ArUtil::sizeFile(std::string fileName) +{ + struct _stat buf; + + if (_stat(fileName.c_str(), &buf) < 0) + return(-1); + + if (!(buf.st_mode | _S_IFREG)) + return(-1); + + return(buf.st_size); +} + +/** + @return size in bytes. -1 on error. + @param fileName name of the file to size +*/ +AREXPORT long ArUtil::sizeFile(const char * fileName) +{ + struct _stat buf; + + if (_stat(fileName, &buf) < 0) + return(-1); + + if (!(buf.st_mode | _S_IFREG)) + return(-1); + + return(buf.st_size); +} + +#else // !WIN32 + +AREXPORT long ArUtil::sizeFile(std::string fileName) +{ + struct stat buf; + + if (stat(fileName.c_str(), &buf) < 0) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArUtil::sizeFile: stat failed"); + return(-1); + } + + if (!S_ISREG(buf.st_mode)) + return(-1); + + return(buf.st_size); +} + + +/** + @return size in bytes. -1 on error. + @param fileName name of the file to size +*/ +AREXPORT long ArUtil::sizeFile(const char * fileName) +{ + struct stat buf; + + if (stat(fileName, &buf) < 0) + { + ArLog::logErrorFromOS(ArLog::Normal, "ArUtil::sizeFile: stat failed"); + return(-1); + } + + if (!S_ISREG(buf.st_mode)) + return(-1); + + return(buf.st_size); +} + +#endif // else !WIN32 + +/** + @return true if file is found + @param fileName name of the file to size +*/ +AREXPORT bool ArUtil::findFile(const char *fileName) +{ + FILE *fp; + + if ((fp=ArUtil::fopen(fileName, "r"))) + { + fclose(fp); + return(true); + } + else + return(false); +} + + + + +/* + Works for \ and /. Returns true if something was actualy done. Sets + fileOut to be what ever the answer is. + @return true if the path contains a file + @param fileIn input path/fileName + @param fileOut output fileName +*/ +/*AREXPORT bool ArUtil::stripDir(std::string fileIn, std::string &fileOut) +{ + const char *ptr; + + for (ptr=fileIn.c_str(); *ptr; ++ptr) + ; + for (--ptr; (ptr > fileIn.c_str()) && (*ptr != '/') && (*ptr != '\\'); --ptr) + ; + if ((*ptr == '/') || (*ptr == '\\')) + { + fileOut=ptr+1; + return(true); + } + else + { + fileOut=fileIn; + return(false); + } +} +*/ +/* + Works for \ and /. Returns true if something was actualy done. Sets + fileOut to be what ever the answer is. + @return true if the file contains a path + @param fileIn input path/fileName + @param fileOut output path +*/ +/* +AREXPORT bool ArUtil::stripFile(std::string fileIn, std::string &fileOut) +{ + const char *start, *end; + + for (start=end=fileIn.c_str(); *end; ++end) + { + if ((*end == '/') || (*end == '\\')) + { + start=end; + for (; *end && ((*end == '/') || (*end == '\\')); ++end) + ; + } + } + + if (start < end) + { + fileOut.assign(fileIn, 0, start-fileIn.c_str()); + return(true); + } + + fileOut=fileIn; + return(false); +} +*/ +AREXPORT bool ArUtil::stripQuotes(char *dest, const char *src, size_t destLen) +{ + size_t srcLen = strlen(src); + if (destLen < srcLen + 1) + { + ArLog::log(ArLog::Normal, "ArUtil::stripQuotes: destLen isn't long enough to fit copy its %d should be %d", destLen, srcLen + 1); + return false; + } + // if there are no quotes to strip just copy and return + if (srcLen < 2 || + (src[0] != '"' || src[srcLen - 1] != '"')) + { + strcpy(dest, src); + return true; + } + // we have quotes so chop of the first and last char + strncpy(dest, &src[1], srcLen - 1); + dest[srcLen - 2] = '\0'; + return true; +} + + +/** + * This method behaves similarly to the char[] version, except that it modifies + * the given std::string. If the first and last characters of the string are + * quotation marks ("), then they are removed from the string. Multiple nested + * quotation marks are not handled. + * @param strToStrip a pointer to the std::string to be read/modified; must be + * non-NULL + * @return bool true if the string was successfully processed; false otherwise +**/ +AREXPORT bool ArUtil::stripQuotes(std::string *strToStrip) +{ + if (strToStrip == NULL) { + ArLog::log(ArLog::Normal, + "ArUtil::stripQuotes() NULL string"); + return false; + } + + // If there are no matching quotes to strip, just return + if ((strToStrip->size() < 2) || + (strToStrip->at(0) != '"') || + (strToStrip->at(strToStrip->size() - 1) != '"')) + { + return true; + } + + // Matching quotes found so chop of the first and last char + strToStrip->erase(strToStrip->begin()); + strToStrip->resize(strToStrip->size() - 1); + + return true; + +} // end method stripQuotes + +/** Append a directory separator character to the given path string, depending on the + * platform. On Windows, a backslash ('\\') is added. On other platforms, a + * forward slash ('/') is appended. If there is no more allocated space in the + * path string (as given by the @arg pathLength parameter), no character will be appended. + @param path the path string to append a slash to + @param pathLength maximum length allocated for path string +*/ +AREXPORT void ArUtil::appendSlash(char *path, size_t pathLength) +{ + // first check boundary + size_t len; + len = strlen(path); + if (len > pathLength - 2) + return; + + if (len == 0 || (path[len - 1] != '\\' && path[len - 1] != '/')) + { +#ifdef WIN32 + path[len] = '\\'; +#else + path[len] = '/'; +#endif + path[len + 1] = '\0'; + } +} + +/** Append the appropriate directory separator for this platform (a forward + * slash "/" on Linux, or a backslash "\" on Windows) to @arg path. + */ +AREXPORT void ArUtil::appendSlash(std::string &path) +{ + // first check boundary + size_t len = path.length(); + if ((len == 0) || + (path[len - 1] != SEPARATOR_CHAR && path[len - 1] != OTHER_SEPARATOR_CHAR)) { + path += SEPARATOR_STRING; + } + +} // end method appendSlash + +/** + Replace in @a path all incorrect directory separators for this platform with +the correct directory separator character (forward slash '/' on Linux, backslash +'\' on Windows). + @param path the path in which to fix the orientation of the slashes + @param pathLength the maximum length of path +*/ +AREXPORT void ArUtil::fixSlashes(char *path, size_t pathLength) +{ +#ifdef WIN32 + fixSlashesBackward(path, pathLength); +#else + fixSlashesForward(path, pathLength); +#endif +} + +/** Replace any forward slash charactars ('/') in @a path with backslashes ('\'). + @param path the path in which to fix the orientation of the slashes + @param pathLength size of @a path +*/ +AREXPORT void ArUtil::fixSlashesBackward(char *path, size_t pathLength) +{ + for (size_t i=0; path[i] != '\0' && i < pathLength; i++) + { + if (path[i] == '/') + path[i]='\\'; + } +} + +/** Replace any forward slash charactars ('/') in @a path with backslashes ('\'). + @param path the path in which to fix the orientation of the slashes + @param pathLength size of @a path +*/ +AREXPORT void ArUtil::fixSlashesForward(char *path, size_t pathLength) +{ + + for (size_t i=0; path[i] != '\0' && i < pathLength; i++) + { + if (path[i] == '\\') + path[i]='/'; + } +} + +/** + Replace in @a path all incorrect directory separators for this platform with +the correct directory separator character (forward slash '/' on Linux, backslash +'\' on Windows). + @param path the path in which to fix the orientation of the slashes +*/ +AREXPORT void ArUtil::fixSlashes(std::string &path) +{ + for (size_t i = 0; i < path.length(); i++) + { + if (path[i] == OTHER_SEPARATOR_CHAR) + path[i]= SEPARATOR_CHAR; + } +} + +/** What is the appropriate directory path separator character for this + * platform? */ +AREXPORT char ArUtil::getSlash() +{ + return SEPARATOR_CHAR; +} + +/** + This function will take the @a baseDir and add @a insideDir after + it, separated by appropriate directory path separators for this platform, + with a final directory separator retained or added after @a inside dir. + For example on Linux, this results in 'baseDir/insideDir/', whereas + backslashes are used on Windows instead. The resulting string is + placed in the @a dest buffer (the path string will be truncated if + there is not enough space in @a dest according to @a destLength) + + @param dest the place to put the result + @param destLength the length available in @a dest + @param baseDir the directory to start with + @param insideDir the directory to place after the baseDir +**/ +AREXPORT void ArUtil::addDirectories(char *dest, size_t destLength, + const char *baseDir, + const char *insideDir) +{ + // start it off + strncpy(dest, baseDir, destLength - 1); + // make sure we have a null term + dest[destLength - 1] = '\0'; + // toss on that slash + appendSlash(dest, destLength); + // put on the inside dir + strncat(dest, insideDir, destLength - strlen(dest) - 1); + // now toss on that slash + appendSlash(dest, destLength); + // and now fix up all the slashes + fixSlashes(dest, destLength); +} + +/** + This compares two strings, it returns an integer less than, equal to, + or greater than zero if @a str is found, respectively, to be less than, to + match, or be greater than @a str2. + (This is a version of the standard C strcmp() function + for use with std::string strings instead.) + @param str the string to compare + @param str2 the second string to compare + @return an integer less than, equal to, or greater than zero if str is + found, respectively, to be less than, to match, or be greater than str2. +*/ +AREXPORT int ArUtil::strcmp(std::string str, std::string str2) +{ + return ::strcmp(str.c_str(), str2.c_str()); +} + +/** + This compares two strings, it returns an integer less than, equal to, + or greater than zero if str is found, respectively, to be less than, to + match, or be greater than str2. + (This is a version of the standard C strcmp() function + for use with std::string strings instead.) + @param str the string to compare + @param str2 the second string to compare + @return an integer less than, equal to, or greater than zero if str is + found, respectively, to be less than, to match, or be greater than str2. +*/ +AREXPORT int ArUtil::strcmp(std::string str, const char *str2) +{ + return ::strcmp(str.c_str(), str2); +} + +/** + This compares two strings, it returns an integer less than, equal to, + or greater than zero if str is found, respectively, to be less than, to + match, or be greater than str2. + (This is a version of the standard C strcmp() function + for use with std::string strings instead.) + @param str the string to compare + @param str2 the second string to compare + @return an integer less than, equal to, or greater than zero if str is + found, respectively, to be less than, to match, or be greater than str2. +*/ +AREXPORT int ArUtil::strcmp(const char *str, std::string str2) +{ + return ::strcmp(str, str2.c_str()); +} + +/** + This compares two strings, it returns an integer less than, equal to, + or greater than zero if str is found, respectively, to be less than, to + match, or be greater than str2. + @param str the string to compare + @param str2 the second string to compare + @return an integer less than, equal to, or greater than zero if str is + found, respectively, to be less than, to match, or be greater than str2. +*/ +AREXPORT int ArUtil::strcmp(const char *str, const char *str2) +{ + return ::strcmp(str, str2); +} + + +/** + This compares two strings ignoring case, it returns an integer + less than, equal to, or greater than zero if str is found, + respectively, to be less than, to match, or be greater than str2. + @param str the string to compare @param str2 the second string to + compare @return an integer less than, equal to, or greater than + zero if str is found, respectively, to be less than, to match, or + be greater than str2. */ +AREXPORT int ArUtil::strcasecmp(std::string str, std::string str2) +{ + return ::strcasecmp(str.c_str(), str2.c_str()); +} + +/** + This compares two strings ignoring case, it returns an integer + less than, equal to, or greater than zero if str is found, + respectively, to be less than, to match, or be greater than str2. + @param str the string to compare @param str2 the second string to + compare @return an integer less than, equal to, or greater than + zero if str is found, respectively, to be less than, to match, or + be greater than str2. */ +AREXPORT int ArUtil::strcasecmp(std::string str, const char *str2) +{ + return ::strcasecmp(str.c_str(), str2); +} + +/** + This compares two strings ignoring case, it returns an integer + less than, equal to, or greater than zero if str is found, + respectively, to be less than, to match, or be greater than str2. + @param str the string to compare @param str2 the second string to + compare @return an integer less than, equal to, or greater than + zero if str is found, respectively, to be less than, to match, or + be greater than str2. */ +AREXPORT int ArUtil::strcasecmp(const char *str, std::string str2) +{ + return ::strcasecmp(str, str2.c_str()); +} + +/** + This compares two strings ignoring case, it returns an integer + less than, equal to, or greater than zero if str is found, + respectively, to be less than, to match, or be greater than str2. + @param str the string to compare @param str2 the second string to + compare @return an integer less than, equal to, or greater than + zero if str is found, respectively, to be less than, to match, or + be greater than str2. */ +AREXPORT int ArUtil::strcasecmp(const char *str, const char *str2) +{ + return ::strcasecmp(str, str2); +} + + +AREXPORT bool ArUtil::strSuffixCmp(const char *str, const char *suffix) +{ + if (str != NULL && str[0] != '\0' && + suffix != NULL && suffix[0] != '\0' && + strlen(str) > strlen(suffix) + 1 && + strncmp(&str[strlen(str) - strlen(suffix)], + suffix, strlen(suffix)) == 0) + return true; + else + return false; + +} + +AREXPORT bool ArUtil::strSuffixCaseCmp(const char *str, const char *suffix) +{ + if (str != NULL && str[0] != '\0' && + suffix != NULL && suffix[0] != '\0' && + strlen(str) > strlen(suffix) + 1 && + strncasecmp(&str[strlen(str) - strlen(suffix)], + suffix, strlen(suffix)) == 0) + return true; + else + return false; +} + + +AREXPORT int ArUtil::strcasequotecmp(const std::string &inStr1, + const std::string &inStr2) +{ +std::string str1 = inStr1; +std::string str2 = inStr2; + + int x = 0; + while (x < str1.length()) { + if (isalpha(str1[x]) && isupper(str1[x])) + str1[x] = tolower(str1[x]); + x++; + } + + x = 0; + while (x < str2.length()) { + if (isalpha(str2[x]) && isupper(str2[x])) + str2[x] = tolower(str2[x]); + x++; + } + + int len1 = str1.length(); + size_t pos1 = 0; + if ((len1 >= 2) && (str1[0] == '\"') && (str1[len1 - 1] == '\"')) { + pos1 = 1; + } + int len2 = str2.length(); + size_t pos2 = 0; + if ((len2 >= 2) && (str2[0] == '\"') && (str2[len2 - 1] == '\"')) { + pos2 = 1; + } + + /* Unfortunately gcc2 does't support the 5 argument version of std::string::compare()... + * (Furthermore, note that it's 3-argument compare has the arguments in the wrong order.) + */ +#if defined(__GNUC__) && (__GNUC__ <= 2) && (__GNUC_MINOR__ <= 96) +#warning Using GCC 2.96 or less so must use nonstandard std::string::compare method. + int cmp = str1.compare(str2.substr(pos2, len2 - 2 * pos2), pos1, len1 - 2 * pos1); +#else + int cmp = str1.compare(pos1, + len1 - 2 * pos1, + str2, + pos2, + len2 - 2 * pos2); +#endif + + return cmp; + +} // end method strcasequotecmp + +/** + This copies src into dest but puts a \ before any spaces in src, + escaping them... its mostly for use with ArArgumentBuilder... + make sure you have at least maxLen spaces in the arrays that you're passing + as dest... this allocates no memory +**/ +AREXPORT void ArUtil::escapeSpaces(char *dest, const char *src, size_t maxLen) +{ + size_t i, adj, len; + + len = strlen(src); + // walk it, when we find one toss in the slash and incr adj so the + // next characters go in the right space + for (i = 0, adj = 0; i < len && i + adj < maxLen; i++) + { + if (src[i] == ' ') + { + dest[i+adj] = '\\'; + adj++; + } + dest[i+adj] = src[i]; + } + // make sure its null terminated + dest[i+adj] = '\0'; +} + +/** + This copies src into dest but makes it lower case make sure you + have at least maxLen arrays that you're passing as dest... this + allocates no memory +**/ +AREXPORT void ArUtil::lower(char *dest, const char *src, size_t maxLen) +{ + size_t i; + size_t len; + + len = strlen(src); + for (i = 0; i < len && i < maxLen; i++) + dest[i] = tolower(src[i]); + dest[i] = '\0'; + +} + + +AREXPORT bool ArUtil::isOnlyAlphaNumeric(const char *str) +{ + unsigned int ui; + unsigned int len; + if (str == NULL) + return true; + for (ui = 0, len = strlen(str); ui < len; ui++) + { + if (!isalpha(str[ui]) && !isdigit(str[ui]) && str[ui] != '\0' && + str[ui] != '+' && str[ui] != '-') + return false; + } + return true; +} + +AREXPORT bool ArUtil::isOnlyNumeric(const char *str) +{ + if (str == NULL) + return true; + for (unsigned i = 0, len = strlen(str); i < len; i++) + { + if (!isdigit(str[i]) && str[i] != '\0' && str[i] != '+' && str[i] != '-') + return false; + } + return true; +} + +AREXPORT bool ArUtil::isStrEmpty(const char *str) +{ + if (str == NULL) { + return true; + } + if (str[0] == '\0') { + return true; + } + return false; + +} // end method isStrEmpty + + +AREXPORT bool ArUtil::isStrInList(const char *str, + const std::list &list, + bool isIgnoreCase) +{ + if (str == NULL) { + return false; + } + for (std::list::const_iterator aIter = list.begin(); + aIter != list.end(); + aIter++) { + if (!isIgnoreCase) { + if (strcmp((*aIter).c_str(), str) == 0) { + return true; + } + } + else { // ignore case + if (strcasecmp((*aIter).c_str(), str) == 0) { + return true; + } + } // end else ignore case + } // end for each string + + return false; + +} // end method isStrInList + + +AREXPORT const char *ArUtil::convertBool(int val) +{ + if (val) + return TRUESTRING; + else + return FALSESTRING; +} + +AREXPORT double ArUtil::atof(const char *nptr) +{ + if (strcasecmp(nptr, "inf") == 0) + return HUGE_VAL; + else if (strcasecmp(nptr, "-inf") == 0) + return -HUGE_VAL; + else + return ::atof(nptr); +} + + +AREXPORT void ArUtil::functorPrintf(ArFunctor1 *functor, + char *str, ...) +{ + char buf[10000]; + va_list ptr; + va_start(ptr, str); + //vsprintf(buf, str, ptr); + vsnprintf(buf, sizeof(buf) - 1, str, ptr); + buf[sizeof(buf) - 1] = '\0'; + functor->invoke(buf); + va_end(ptr); +} + + +AREXPORT void ArUtil::writeToFile(const char *str, FILE *file) +{ + fputs(str, file); +} + + +/** + This function reads a string from a file. + The file can contain spaces or tabs, but a '\\r' + or '\\n' will be treated as the end of the string, and the string + cannot have more characters than the value given by strLen. This is mostly for internal use + with Linux to determine the Aria directory from a file in /etc, but + will work with Linux or Windows. + + @param fileName name of the file in which to look + @param str the string to copy the file contents into + @param strLen the maximum allocated length of str +**/ +AREXPORT bool ArUtil::getStringFromFile(const char *fileName, + char *str, size_t strLen) +{ + FILE *strFile; + unsigned int i; + + str[0] = '\0'; + + if ((strFile = ArUtil::fopen(fileName, "r")) != NULL) + { + fgets(str, strLen, strFile); + for (i = 0; i < strLen; i++) + { + if (str[i] == '\r' || str[i] == '\n' || str[i] == '\0') + { + str[i] = '\0'; + fclose(strFile); + break; + } + } + } + else + { + str[0] = '\0'; + return false; + } + return true; +} + +/** + * Look up the given value under the given key, within the given registry root + * key. + + @param root the root key to use, one of the REGKEY enum values + + @param key the name of the key to find + + @param value the value name in which to find the string + + @param str where to put the string found, or if it could not be + found, an empty (length() == 0) string + + @param len the length of the allocated memory in str + + @return true if the string was found, false if it was not found or if there was a problem such as the string not being long enough + **/ + +AREXPORT bool ArUtil::getStringFromRegistry(REGKEY root, + const char *key, + const char *value, + char *str, + int len) +{ +#ifndef WIN32 + return false; +#else // WIN32 + + HKEY hkey; + int err; + unsigned long numKeys; + unsigned long longestKey; + unsigned long numValues; + unsigned long longestValue; + unsigned long longestDataLength; + char *valueName; + unsigned long valueLength; + unsigned long type; + char *data; + unsigned long dataLength; + HKEY rootKey; + + + switch (root) + { + case REGKEY_CLASSES_ROOT: + rootKey = HKEY_CLASSES_ROOT; + break; + case REGKEY_CURRENT_CONFIG: + rootKey = HKEY_CURRENT_CONFIG; + break; + case REGKEY_CURRENT_USER: + rootKey = HKEY_CURRENT_USER; + break; + case REGKEY_LOCAL_MACHINE: + rootKey = HKEY_LOCAL_MACHINE; + break; + case REGKEY_USERS: + rootKey=HKEY_USERS; + break; + default: + ArLog::log(ArLog::Terse, + "ArUtil::getStringFromRegistry: Bad root key given."); + return false; + } + + + if ((err = RegOpenKeyEx(rootKey, key, 0, KEY_READ, &hkey)) == ERROR_SUCCESS) + { + //printf("Got a key\n"); + if (RegQueryInfoKey(hkey, NULL, NULL, NULL, &numKeys, &longestKey, NULL, + &numValues, &longestValue, &longestDataLength, NULL, NULL) == ERROR_SUCCESS) + { + /* + printf("Have %d keys longest is %d, have %d values longest name is %d, longest data is %d\n", + numKeys, longestKey, numValues, longestValue, longestDataLength); + */ + data = new char[longestDataLength+2]; + valueName = new char[longestValue+2]; + for (unsigned long i = 0; i < numValues; ++i) + { + dataLength = longestDataLength+1; + valueLength = longestValue+1; + if ((err = RegEnumValue(hkey, i, valueName, &valueLength, NULL, + &type, (unsigned char *)data, &dataLength)) == ERROR_SUCCESS) + { + //printf("Enumed value %d, name is %s, value is %s\n", i, valueName, data); + if (strcmp(value, valueName) == 0) + { + if (len < dataLength) + { + ArLog::log(ArLog::Terse,"ArUtil::getStringFromRegistry: str passed in not long enough for data."); + delete data; + delete valueName; + return false; + } + strncpy(str, data, len); + delete data; + delete valueName; + return true; + } + } + /* + else + printf("Couldn't enum value %d cause %d\n",i, err); + */ + } + delete data; + delete valueName; + } + /* + else + printf("QueryInfoKey failed\n"); + */ + } + /* + else + printf("No key %d\n", err); + */ + return false; +#endif +} + +#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) +bool ArTime::ourMonotonicClock = true; +#endif + +AREXPORT void ArTime::setToNow(void) +{ +// if we have the best way of finding time use that +#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) + if (ourMonotonicClock) + { + struct timespec timeNow; + if (clock_gettime(CLOCK_MONOTONIC, &timeNow) == 0) + { + // start a million seconds into the future so we have some room + // to go backwards + mySec = timeNow.tv_sec + 1000000; + myMSec = timeNow.tv_nsec / 1000000; + return; + } + else + { + ourMonotonicClock = false; + ArLog::logNoLock(ArLog::Terse, "ArTime::setToNow: invalid return from clock_gettime."); + } + } +#endif +// if our good way didn't work use the old ways +#ifndef WIN32 + struct timeval timeNow; + + if (gettimeofday(&timeNow, NULL) == 0) + { + // start a million seconds into the future so we have some room + // to go backwards + mySec = timeNow.tv_sec + 1000000; + myMSec = timeNow.tv_usec / 1000; + } + else + ArLog::logNoLock(ArLog::Terse, "ArTime::setToNow: invalid return from gettimeofday."); +// thats probably not available in windows, so this is the one we've been using +#else + /* this should be the better way, but it doesn't really work... + this would be seconds from 1970, but it is based on the + hardware timer or something and so winds up not being updated + all the time and winds up being some number of ms < 20 ms off + struct _timeb startTime; + _ftime(&startTime); + mySec = startTime.time; + myMSec = startTime.millitm;*/ + // so we're going with just their normal function, msec since boot + long timeNow; + timeNow = timeGetTime(); + // start a million seconds into the future so we have some room + // to go backwards + mySec = timeNow / 1000 + 1000000; + myMSec = timeNow % 1000; +// but if the good way isn't available use the old way... +#endif + +} + +AREXPORT ArRunningAverage::ArRunningAverage(size_t numToAverage) +{ + myNumToAverage = numToAverage; + myTotal = 0; + myNum = 0; + myUseRootMeanSquare = false; +} + +AREXPORT ArRunningAverage::~ArRunningAverage() +{ + +} + +AREXPORT double ArRunningAverage::getAverage(void) const +{ + if (myNum == 0) + return 0.0; + + if (myUseRootMeanSquare) + return sqrt(myTotal / myNum); + else + return myTotal / myNum; +} + +AREXPORT void ArRunningAverage::add(double val) +{ + if (myUseRootMeanSquare) + myTotal += (val * val); + else + myTotal += val; + myNum++; + myVals.push_front(val); + if (myVals.size() > myNumToAverage || myNum > myNumToAverage) + { + if (myUseRootMeanSquare) + myTotal -= (myVals.back() * myVals.back()); + else + myTotal -= myVals.back(); + myNum--; + myVals.pop_back(); + } +} + +AREXPORT void ArRunningAverage::clear(void) +{ + while (myVals.size() > 0) + myVals.pop_back(); + myNum = 0; + myTotal = 0; +} + +AREXPORT size_t ArRunningAverage::getNumToAverage(void) const +{ + return myNumToAverage; +} + +AREXPORT void ArRunningAverage::setNumToAverage(size_t numToAverage) +{ + myNumToAverage = numToAverage; + while (myVals.size() > myNumToAverage) + { + if (myUseRootMeanSquare) + myTotal -= (myVals.back() * myVals.back()); + else + myTotal -= myVals.back(); + myNum--; + myVals.pop_back(); + } +} + +AREXPORT size_t ArRunningAverage::getCurrentNumAveraged(void) +{ + return myNum; +} + +AREXPORT void ArRunningAverage::setUseRootMeanSquare(bool useRootMeanSquare) +{ + if (myUseRootMeanSquare != useRootMeanSquare) + { + myTotal = 0; + std::list::iterator it; + for (it = myVals.begin(); it != myVals.end(); it++) + { + if (useRootMeanSquare) + myTotal += ((*it) * (*it)); + else + myTotal += (*it); + } + } + + myUseRootMeanSquare = useRootMeanSquare; +} + +AREXPORT bool ArRunningAverage::getUseRootMeanSquare(void) +{ + return myUseRootMeanSquare; +} + +AREXPORT ArRootMeanSquareCalculator::ArRootMeanSquareCalculator() +{ + clear(); + myName = "ArRootMeanSquareCalculator"; +} + +AREXPORT ArRootMeanSquareCalculator::~ArRootMeanSquareCalculator() +{ + +} + +AREXPORT double ArRootMeanSquareCalculator::getRootMeanSquare (void) const +{ + if (myNum == 0) + return 0; + else + return sqrt((double) myTotal / (double)myNum); +} + +AREXPORT void ArRootMeanSquareCalculator::add(int val) +{ + myTotal += val * val; + myNum++; + if (myTotal < 0) + { + ArLog::log(ArLog::Normal, "%s: total wrapped, resetting", myName.c_str()); + clear(); + // this isn't a clean fix, but won't let it infinitely loop on a bad value + //add(val); + } +} + +AREXPORT void ArRootMeanSquareCalculator::clear(void) +{ + myTotal = 0; + myNum = 0; +} + +AREXPORT size_t ArRootMeanSquareCalculator::getCurrentNumAveraged(void) +{ + return myNum; +} + +AREXPORT void ArRootMeanSquareCalculator::setName(const char *name) +{ + if (name != NULL) + myName = name; + else + myName = "ArRootMeanSquareCalculator"; +} + +AREXPORT const char *ArRootMeanSquareCalculator::getName(void) +{ + return myName.c_str(); +} + +#ifndef WIN32 + +AREXPORT ArDaemonizer::ArDaemonizer(int *argc, char **argv, + bool closeStdErrAndStdOut) : + myParser(argc, argv), + myLogOptionsCB(this, &ArDaemonizer::logOptions) +{ + myIsDaemonized = false; + myCloseStdErrAndStdOut = closeStdErrAndStdOut; + Aria::addLogOptionsCB(&myLogOptionsCB); +} + +AREXPORT ArDaemonizer::~ArDaemonizer() +{ + +} + +AREXPORT bool ArDaemonizer::daemonize(void) +{ + if (myParser.checkArgument("-daemonize") || + myParser.checkArgument("-d")) + { + return forceDaemonize(); + } + else + return true; + +} + +/** + This returns true if daemonizing worked, returns false if it + didn't... the parent process exits here if forking worked. + **/ +AREXPORT bool ArDaemonizer::forceDaemonize(void) +{ + switch (fork()) + { + case 0: // child process just return + myIsDaemonized = true; + if (myCloseStdErrAndStdOut) + { + fclose(stdout); + fclose(stderr); + } + return true; + case -1: // error.... fail + printf("Can't fork"); + ArLog::log(ArLog::Terse, "ArDaemonizer: Can't fork"); + return false; + default: // parent process + printf("Daemon started\n"); + exit(0); + } +} + +AREXPORT void ArDaemonizer::logOptions(void) const +{ + ArLog::log(ArLog::Terse, "Options for Daemonizing:"); + ArLog::log(ArLog::Terse, "-daemonize"); + ArLog::log(ArLog::Terse, "-d"); + ArLog::log(ArLog::Terse, ""); +} + +#endif // WIN32 + + +std::map ArPriority::ourPriorityNames; +std::map ArPriority::ourNameToPriorityMap; + +std::string ArPriority::ourUnknownPriorityName; +bool ArPriority::ourStringsInited = false; + +AREXPORT const char *ArPriority::getPriorityName(Priority priority) +{ + + if (!ourStringsInited) + { + ourPriorityNames[IMPORTANT] = "Basic"; + ourPriorityNames[NORMAL] = "Intermediate"; + ourPriorityNames[TRIVIAL] = "Advanced"; + ourPriorityNames[DETAILED] = "Advanced"; + + ourPriorityNames[EXPERT] = "Expert"; + ourPriorityNames[FACTORY] = "Factory"; + ourPriorityNames[CALIBRATION] = "Calibration"; + + for (std::map::iterator iter = ourPriorityNames.begin(); + iter != ourPriorityNames.end(); + iter++) { + ourNameToPriorityMap[iter->second] = iter->first; + } + + ourUnknownPriorityName = "Unknown"; + ourStringsInited = true; + } + + std::map::iterator iter = + ourPriorityNames.find(priority); + if (iter != ourPriorityNames.end()) { + return iter->second.c_str(); + } + else { + return ourUnknownPriorityName.c_str(); + } +} + +AREXPORT ArPriority::Priority ArPriority::getPriorityFromName(const char *text) +{ + // This is merely called to initialize the map + if (!ourStringsInited) { + getPriorityName(IMPORTANT); + } + + if (ArUtil::isStrEmpty(text)) { + ArLog::log(ArLog::Normal, + "ArPriority::getPriorityFromName() error finding priority for empty text"); + return LAST_PRIORITY; + } + + std::map::iterator iter = + ourNameToPriorityMap.find(text); + if (iter != ourNameToPriorityMap.end()) { + return iter->second; + } + + ArLog::log(ArLog::Normal, + "ArPriority::getPriorityFromName() error finding priority for %s", + text); + + return LAST_PRIORITY; + +} // end method getPriorityFromName + + +AREXPORT void ArUtil::putCurrentYearInString(char* s, size_t len) +{ + struct tm t; + ArUtil::localtime(&t); + snprintf(s, len, "%4d", 1900 + t.tm_year); + s[len-1] = '\0'; +} + +AREXPORT void ArUtil::putCurrentMonthInString(char* s, size_t len) +{ + + struct tm t; + ArUtil::localtime(&t); + snprintf(s, len, "%02d", t.tm_mon + 1); + s[len-1] = '\0'; +} +AREXPORT void ArUtil::putCurrentDayInString(char* s, size_t len) +{ + struct tm t; + ArUtil::localtime(&t); + snprintf(s, len, "%02d", t.tm_mday); + s[len-1] = '\0'; +} +AREXPORT void ArUtil::putCurrentHourInString(char* s, size_t len) +{ + struct tm t; + ArUtil::localtime(&t); + snprintf(s, len, "%02d", t.tm_hour); + s[len-1] = '\0'; +} +AREXPORT void ArUtil::putCurrentMinuteInString(char* s, size_t len) +{ + struct tm t; + ArUtil::localtime(&t); + snprintf(s, len, "%02d", t.tm_min); + s[len-1] = '\0'; +} +AREXPORT void ArUtil::putCurrentSecondInString(char* s, size_t len) +{ + struct tm t; + ArUtil::localtime(&t); + snprintf(s, len, "%02d", t.tm_sec); + s[len-1] = '\0'; +} + + + +AREXPORT time_t ArUtil::parseTime(const char *str, bool *ok, bool toToday) +{ + + struct tm tmOut; + if (toToday) + { + struct tm now; + if (!localtime(&now)) + { + *ok = false; + return 0; + } + memcpy(&tmOut, &now, sizeof(now)); + } + else + { + memset(&tmOut, 0, sizeof(tmOut)); + // The day-of-the-month starts at 1 (not 0)... + tmOut.tm_mday = 1; + // Setting the year to 70 because if it is left at 0 or 1, then + // the call to mktime() returns an apparently bogus value. Think + // that 70 makes sense since times are generally measured from + // 1/1/1970 (but still, it's all a little strange). + tmOut.tm_year = 70; + tmOut.tm_isdst = -1; // Negative value means unknown + } + + bool isValid = true; + int hrs = -1; + int min = -1; + int sec = 0; + + ArArgumentBuilder separator(512, ':'); + separator.add(str); + + // if there's the wrong number of args, or any of the args aren't + // integers then it's invalid and we won't parse it + if ((separator.getArgc() != 2 && separator.getArgc() != 3) || + !separator.isArgInt(0) || !separator.isArgInt(1) || + (separator.getArgc() == 3 && !separator.isArgInt(2))) + { + //printf("Invalid... %d\n", separator.getArgc()); + //separator.log(); + isValid = false; + } + else + { + hrs = separator.getArgInt(0); + min = separator.getArgInt(1); + if (separator.getArgc() == 3) + sec = separator.getArgInt(2); + //printf("Was %02d:%02d:%02d", hrs, min, sec); + } + + /* + char *tempBuf = new char[strlen(str) + 1]; + strncpy(tempBuf, str, sizeof(tempBuf)); + + // Attempted to use strptime, but it doesn't seem to be universally + // available. + char *pch = strtok(tempBuf, ":"); + if (pch != NULL) { + hrs = atoi(pch); + } + + pch = strtok(NULL, ":"); + if (pch != NULL) { + min = atoi(pch); + } + */ + + // make sure the actual numbers are valid + if (!((hrs >= 0) && (hrs < 24) && (min >= 0) && (min < 60) && + (sec >= 0) && (sec < 60))) + isValid = false; + + if (isValid) + { + tmOut.tm_hour = hrs; + tmOut.tm_min = min; + tmOut.tm_sec = sec; + } + + time_t newTime = mktime(&tmOut); + + if (ok != NULL) + { + *ok = (isValid && (newTime != -1)); + } + + //delete [] tempBuf; + + return newTime; + +} // end method parseTime + + + +AREXPORT bool ArUtil::localtime(const time_t *timep, struct tm *result) +{ +#ifdef WIN32 + ourLocaltimeMutex.lock(); + struct tm *r = ::localtime(timep); + if(r == NULL) { + ourLocaltimeMutex.unlock(); + return false; + } + *result = *r; // copy the 'struct tm' object before unlocking. + ourLocaltimeMutex.unlock(); + return true; +#else + return (::localtime_r(timep, result) != NULL); +#endif +} + +/** Call ArUtil::localtime() with the current time obtained by calling +* time(NULL). +* @return false on error (e.g. invalid input), otherwise true. +*/ +AREXPORT bool ArUtil::localtime(struct tm *result) +{ + time_t now = time(NULL); + return ArUtil::localtime(&now, result); +} + + +#ifndef WIN32 +/** + @param baseDir the base directory to work from + @param fileName the fileName to squash the case from + + @param result where to put the result + @param resultLen length of the result + + @return true if it could find the file, the result is in result, + false if it couldn't find the file +**/ +AREXPORT bool ArUtil::matchCase(const char *baseDir, + const char *fileName, + char *result, + size_t resultLen) +{ + + /*** + ArLog::log(ArLog::Normal, + "ArUtil::matchCase() baseDir = \"%s\" fileName = \"%s\"", + baseDir, + fileName); + ***/ + + DIR *dir; + struct dirent *ent; + + char separator; +#ifndef WIN32 + separator = '/'; +#else + separator = '\\'; +#endif + + result[0] = '\0'; + + std::list split = splitFileName(fileName); + std::list::iterator it = split.begin(); + std::string finding = (*it); + + /* + for (it = split.begin(); it != split.end(); it++) + { + printf("@@@@@@@@ %s\n", (*it).c_str()); + } + */ + + // how this works is we start at the base dir then read through + // until we find what the next name we need, if entry is a directory + // and we're not at the end of our string list then we change into + // that dir and the while loop keeps going, if the entry isn't a + // directory and matchs and its the last in our string list we've + // found what we want + if ((dir = opendir(baseDir)) == NULL) + { + ArLog::log(ArLog::Normal, + "ArUtil: No such directory '%s' for base", + baseDir); + return false; + } + + if (finding == ".") + { + it++; + if (it != split.end()) + { + finding = (*it); + } + else + { + ArLog::log(ArLog::Normal, + "ArUtil: No file or directory given (base = %s file = %s)", + baseDir, + fileName); + closedir(dir); + + // KMC NEED TO DETERMINE WHICH IS CORRECT. + // The following change appears to be necessary for maps, but is still + // undergoing testing.... + // Just return the given ".". (This is necessary to find maps in the local + // directory under some circumstances.) + // snprintf(result, resultLen, finding.c_str()); + // return true; + + return false; + + + } + } + + while ((ent = readdir(dir)) != NULL) + { + // ignore some of these + if (ent->d_name[0] == '.') + { + //printf("Ignoring %s\n", ent->d_name[0]); + continue; + } + //printf("NAME %s finding %s\n", ent->d_name, finding.c_str()); + + // we've found what we were looking for + if (ArUtil::strcasecmp(ent->d_name, finding) == 0) + { + size_t lenOfResult; + lenOfResult = strlen(result); + + // make sure we can put the filename in + if (strlen(ent->d_name) > resultLen - lenOfResult - 2) + { + ArLog::log(ArLog::Normal, + "ArUtil::matchCase: result not long enough"); + closedir(dir); + return false; + } + //printf("Before %s", result); + if (lenOfResult != 0) + { + result[lenOfResult] = separator; + result[lenOfResult+1] = '\0'; + } + // put the filename in + strcpy(&result[strlen(result)], ent->d_name); + //printf("after %s\n", result); + // see if we're at the end + it++; + if (it != split.end()) + { + //printf("Um.........\n"); + finding = (*it); + std::string wholeDir; + wholeDir = baseDir; + wholeDir += result; + closedir(dir); + //printf("'%s' '%s' '%s'\n", baseDir, result, wholeDir.c_str()); + if ((dir = opendir(wholeDir.c_str())) == NULL) + { + ArLog::log(ArLog::Normal, + "ArUtil::matchCase: Error going into %s", + result); + return false; + } + } + else + { + //printf("\n########## Got it %s\n", result); + closedir(dir); + return true; + } + } + } + ArLog::log(ArLog::Normal, + "ArUtil::matchCase: %s doesn't exist in %s", fileName, + baseDir); + //printf("!!!!!!!! %s", finding.c_str()); + closedir(dir); + return false; +} + +#endif // !WIN32 + + +AREXPORT bool ArUtil::getDirectory(const char *fileName, + char *result, size_t resultLen) +{ + char separator; +#ifndef WIN32 + separator = '/'; +#else + separator = '\\'; +#endif + + if (fileName == NULL || fileName[0] == '\0' || resultLen == 0) + { + ArLog::log(ArLog::Normal, "ArUtil: getDirectory, bad setup"); + return false; + } + + // just play in the result buffer + strncpy(result, fileName, resultLen - 1); + // make sure its nulled + result[resultLen - 1] = '\0'; + char *toPos; + ArUtil::fixSlashes(result, resultLen); + // see where the last directory is + toPos = strrchr(result, separator); + // if there's no divider it must just be a file name + if (toPos == NULL) + { + result[0] = '\0'; + return true; + } + // otherwise just toss a null into the last separator and we're done + else + { + *toPos = '\0'; + return true; + } +} + +AREXPORT bool ArUtil::getFileName(const char *fileName, + char *result, size_t resultLen) +{ + char separator; +#ifndef WIN32 + separator = '/'; +#else + separator = '\\'; +#endif + + if (fileName == NULL || fileName[0] == '\0' || resultLen == 0) + { + ArLog::log(ArLog::Normal, "ArUtil: getFileName, bad setup"); + return false; + } + + char *str; + size_t fileNameLen = strlen(fileName); + str = new char[fileNameLen + 1]; + //printf("0 %s\n", fileName); + // just play in the result buffer + strncpy(str, fileName, fileNameLen); + // make sure its nulled + str[fileNameLen] = '\0'; + //printf("1 %s\n", str); + + char *toPos; + ArUtil::fixSlashes(str, fileNameLen + 1); + //printf("2 %s\n", str); + // see where the last directory is + toPos = strrchr(str, separator); + // if there's no divider it must just be a file name + if (toPos == NULL) + { + // copy the filename in and make sure it has a null + strncpy(result, str, resultLen - 1); + result[resultLen - 1] = '\0'; + //printf("3 %s\n", result); + delete[] str; + return true; + } + // otherwise take the section from that separator to the end + else + { + strncpy(result, &str[toPos - str + 1], resultLen - 2); + result[resultLen - 1] = '\0'; + //printf("4 %s\n", result); + delete[] str; + return true; + } +} + +#ifndef WIN32 +/** + This function assumes the slashes are all heading the right way already. +**/ +std::list ArUtil::splitFileName(const char *fileName) +{ + std::list split; + if (fileName == NULL) + return split; + + char separator; +#ifndef WIN32 + separator = '/'; +#else + separator = '\\'; +#endif + + size_t len; + size_t i; + size_t last; + bool justSepped; + char entry[2048]; + for (i = 0, justSepped = false, last = 0, len = strlen(fileName); + ; + i++) + { + + if ((fileName[i] == separator && !justSepped) + || fileName[i] == '\0' || i >= len) + { + if (i - last > 2047) + { + ArLog::log(ArLog::Normal, "ArUtil::splitFileName: some directory or file too long"); + } + if (!justSepped) + { + strncpy(entry, &fileName[last], i - last); + entry[i-last] = '\0'; + split.push_back(entry); + + justSepped = true; + } + if (fileName[i] == '\0' || i >= len) + return split; + } + else if (fileName[i] == separator && justSepped) + { + justSepped = true; + last = i; + } + else if (fileName[i] != separator && justSepped) + { + justSepped = false; + last = i; + } + } + ArLog::log(ArLog::Normal, "ArUtil::splitFileName: file str ('%s') happened weird", fileName); + return split; +} + + + +#endif // !WIN32 + + +AREXPORT bool ArUtil::changeFileTimestamp(const char *fileName, + time_t timestamp) +{ + if (ArUtil::isStrEmpty(fileName)) { + ArLog::log(ArLog::Normal, + "Cannot change date on file with empty name"); + return false; + } +#ifdef WIN32 + + FILETIME fileTime; + + HANDLE hFile = CreateFile(fileName, + GENERIC_READ | GENERIC_WRITE, + 0,NULL, + OPEN_EXISTING, + 0,NULL); + + if (hFile == NULL) { + return false; + } + + + // The following is extracted from the MSDN article "Converting a time_t Value + // to a File Time". + LONGLONG temp = Int32x32To64(timestamp, 10000000) + 116444736000000000; + fileTime.dwLowDateTime = (DWORD) temp; + fileTime.dwHighDateTime = temp >> 32; + + SetFileTime(hFile, + &fileTime, + (LPFILETIME) NULL, // don't change last access time (?) + &fileTime); + + CloseHandle(hFile); + +#else // unix + + char timeBuf[500]; + strftime(timeBuf, sizeof(timeBuf), "%c", ::localtime(×tamp)); + ArLog::log(ArLog::Normal, + "Changing file %s modified time to %s", + fileName, + timeBuf); + + + // time_t newTime = mktime(×tamp); + struct utimbuf fileTime; + fileTime.actime = timestamp; + fileTime.modtime = timestamp; + utime(fileName, &fileTime); + +#endif // else unix + + return true; + +} // end method changeFileTimestamp + + + +AREXPORT void ArUtil::setFileCloseOnExec(int fd, bool closeOnExec) +{ +#ifndef WIN32 + if (fd <= 0) + return; + + int flags; + + if ((flags = fcntl(fd, F_GETFD)) < 0) + { + ArLog::log(ArLog::Normal, "ArUtil::setFileCloseOnExec: Cannot use F_GETFD in fnctl on fd %d", fd); + return; + } + + if (closeOnExec) + flags |= FD_CLOEXEC; + else + flags &= ~FD_CLOEXEC; + + if (fcntl(fd, F_SETFD, flags) < 0) + { + ArLog::log(ArLog::Normal, "ArUtil::setFileCloseOnExec: Cannot use F_GETFD in fnctl on fd %d", fd); + return; + } +#endif +} + +AREXPORT void ArUtil::setFileCloseOnExec(FILE *file, bool closeOnExec) +{ + if (file != NULL) + setFileCloseOnExec(fileno(file)); +} + +AREXPORT FILE *ArUtil::fopen(const char *path, const char *mode, + bool closeOnExec) +{ + FILE *file; + file = ::fopen(path, mode); + setFileCloseOnExec(file, closeOnExec); + return file; +} + +AREXPORT int ArUtil::open(const char *pathname, int flags, + bool closeOnExec) +{ + int fd; + fd = ::open(pathname, flags); + setFileCloseOnExec(fd, closeOnExec); + return fd; +} + +AREXPORT int ArUtil::open(const char *pathname, int flags, mode_t mode, + bool closeOnExec) +{ + int fd; + fd = ::open(pathname, flags, mode); + setFileCloseOnExec(fd, closeOnExec); + return fd; +} + +AREXPORT int ArUtil::creat(const char *pathname, mode_t mode, + bool closeOnExec) +{ + int fd; + fd = ::creat(pathname, mode); + setFileCloseOnExec(fd, closeOnExec); + return fd; +} + +AREXPORT FILE *ArUtil::popen(const char *command, const char *type, + bool closeOnExec) +{ + FILE *file; +#ifndef WIN32 + file = ::popen(command, type); +#else + file = _popen(command, type); +#endif + setFileCloseOnExec(file, closeOnExec); + return file; +} + + +AREXPORT bool ArUtil::floatIsNormal(double f) +{ +#ifdef WIN32 + return (!::_isnan(f) && ::_finite(f)); +#else + return isnormal(f); +#endif +} + + +AREXPORT long ArMath::randomInRange(long m, long n) +{ + // simple method + return m + random() / (ourRandMax / (n - m + 1) + 1); + // alternate method is to use drand48, multiply and round (does Windows have + // drand48?), or keep trying numbers until we get one in range. +} + +AREXPORT double ArMath::epsilon() { return ourEpsilon; } +AREXPORT long ArMath::getRandMax() { return ourRandMax; } + +#ifndef ARINTERFACE + +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourLMS2xxCB(&ArLaserCreatorHelper::createLMS2xx); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourUrgCB(&ArLaserCreatorHelper::createUrg); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourLMS1XXCB(&ArLaserCreatorHelper::createLMS1XX); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourS3SeriesCB(&ArLaserCreatorHelper::createS3Series); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourUrg_2_0CB(&ArLaserCreatorHelper::createUrg_2_0); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourLMS5XXCB(&ArLaserCreatorHelper::createLMS5XX); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourTiM3XXCB(&ArLaserCreatorHelper::createTiM3XX); +ArGlobalRetFunctor2 +ArLaserCreatorHelper::ourSZSeriesCB(&ArLaserCreatorHelper::createSZSeries); + +ArGlobalRetFunctor2 +ArBatteryMTXCreatorHelper::ourBatteryMTXCB(&ArBatteryMTXCreatorHelper::createBatteryMTX); + +ArGlobalRetFunctor2 +ArLCDMTXCreatorHelper::ourLCDMTXCB(&ArLCDMTXCreatorHelper::createLCDMTX); + +ArGlobalRetFunctor2 +ArSonarMTXCreatorHelper::ourSonarMTXCB(&ArSonarMTXCreatorHelper::createSonarMTX); + + +ArLaser *ArLaserCreatorHelper::createLMS2xx(int laserNumber, + const char *logPrefix) +{ + return new ArLMS2xx(laserNumber); +} + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateLMS2xxCB(void) +{ + return &ourLMS2xxCB; +} + +ArLaser *ArLaserCreatorHelper::createUrg(int laserNumber, const char *logPrefix) +{ + return new ArUrg(laserNumber); +} + + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateUrgCB(void) +{ + return &ourUrgCB; +} + +ArLaser *ArLaserCreatorHelper::createLMS1XX(int laserNumber, + const char *logPrefix) +{ + // PS 8/22/11 - added "lms1xx" and flag specifying laser is NOT an lms5xx + return new ArLMS1XX(laserNumber,"lms1xx", ArLMS1XX::LMS1XX); +} + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateLMS1XXCB(void) +{ + return &ourLMS1XXCB; +} + +ArLaser *ArLaserCreatorHelper::createS3Series(int laserNumber, + const char *logPrefix) +{ + return new ArS3Series(laserNumber); +} + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateS3SeriesCB(void) +{ + return &ourS3SeriesCB; +} + + +ArLaser *ArLaserCreatorHelper::createUrg_2_0(int laserNumber, + const char *logPrefix) +{ + return new ArUrg_2_0(laserNumber); +} + + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateUrg_2_0CB(void) +{ + return &ourUrg_2_0CB; +} + +ArLaser *ArLaserCreatorHelper::createLMS5XX(int laserNumber, + const char *logPrefix) +{ + + // PS 8/22/11 - added "lms5xx" and flag specifying laser is an lms5xx + return new ArLMS1XX(laserNumber, "lms5XX", ArLMS1XX::LMS5XX); +} + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateLMS5XXCB(void) +{ + return &ourLMS5XXCB; +} + +ArLaser *ArLaserCreatorHelper::createTiM3XX(int laserNumber, + const char *logPrefix) +{ + + // PS 8/22/11 - added "lms5xx" and flag specifying laser is an lms5xx + return new ArLMS1XX(laserNumber, "tim3XX", ArLMS1XX::TiM3XX); +} + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateTiM3XXCB(void) +{ + return &ourTiM3XXCB; +} + + +ArLaser *ArLaserCreatorHelper::createSZSeries(int laserNumber, + const char *logPrefix) +{ + return new ArSZSeries(laserNumber); +} + +ArRetFunctor2 *ArLaserCreatorHelper::getCreateSZSeriesCB(void) +{ + return &ourSZSeriesCB; +} + +ArBatteryMTX *ArBatteryMTXCreatorHelper::createBatteryMTX(int batteryNumber, + const char *logPrefix) +{ + return new ArBatteryMTX(batteryNumber); +} + +ArRetFunctor2 *ArBatteryMTXCreatorHelper::getCreateBatteryMTXCB(void) +{ + return &ourBatteryMTXCB; +} + +ArLCDMTX *ArLCDMTXCreatorHelper::createLCDMTX(int lcdNumber, + const char *logPrefix) +{ + return new ArLCDMTX(lcdNumber); +} + +ArRetFunctor2 *ArLCDMTXCreatorHelper::getCreateLCDMTXCB(void) +{ + return &ourLCDMTXCB; +} + +ArSonarMTX *ArSonarMTXCreatorHelper::createSonarMTX(int sonarNumber, + const char *logPrefix) +{ + return new ArSonarMTX(sonarNumber); +} + +ArRetFunctor2 *ArSonarMTXCreatorHelper::getCreateSonarMTXCB(void) +{ + return &ourSonarMTXCB; +} + +#endif // ARINTERFACE + +ArGlobalRetFunctor3 +ArDeviceConnectionCreatorHelper::ourSerialCB( + &ArDeviceConnectionCreatorHelper::createSerialConnection); +ArGlobalRetFunctor3 +ArDeviceConnectionCreatorHelper::ourTcpCB( + &ArDeviceConnectionCreatorHelper::createTcpConnection); +ArGlobalRetFunctor3 +ArDeviceConnectionCreatorHelper::ourSerial422CB( + &ArDeviceConnectionCreatorHelper::createSerial422Connection); +ArLog::LogLevel ArDeviceConnectionCreatorHelper::ourSuccessLogLevel; + +ArDeviceConnection *ArDeviceConnectionCreatorHelper::createSerialConnection( + const char *port, const char *defaultInfo, const char *logPrefix) +{ + ArDeviceConnection *devConn; + + devConn = internalCreateSerialConnection(port, defaultInfo, logPrefix, false); + + return devConn; +} + +ArDeviceConnection *ArDeviceConnectionCreatorHelper::createSerial422Connection( + const char *port, const char *defaultInfo, const char *logPrefix) +{ + ArDeviceConnection *devConn; + + devConn = internalCreateSerialConnection(port, defaultInfo, logPrefix, true); + + return devConn; +} + + +ArDeviceConnection *ArDeviceConnectionCreatorHelper::internalCreateSerialConnection( + const char *port, const char *defaultInfo, const char *logPrefix, bool is422) +{ + ArSerialConnection *serConn = new ArSerialConnection(is422); + + std::string serPort; + if (strcasecmp(port, "COM1") == 0) + serPort = ArUtil::COM1; + else if (strcasecmp(port, "COM2") == 0) + serPort = ArUtil::COM2; + else if (strcasecmp(port, "COM3") == 0) + serPort = ArUtil::COM3; + else if (strcasecmp(port, "COM4") == 0) + serPort = ArUtil::COM4; + else if (strcasecmp(port, "COM5") == 0) + serPort = ArUtil::COM5; + else if (strcasecmp(port, "COM6") == 0) + serPort = ArUtil::COM6; + else if (strcasecmp(port, "COM7") == 0) + serPort = ArUtil::COM7; + else if (strcasecmp(port, "COM8") == 0) + serPort = ArUtil::COM8; + else if (strcasecmp(port, "COM9") == 0) + serPort = ArUtil::COM9; + else if (strcasecmp(port, "COM10") == 0) + serPort = ArUtil::COM10; + else if (strcasecmp(port, "COM11") == 0) + serPort = ArUtil::COM11; + else if (strcasecmp(port, "COM12") == 0) + serPort = ArUtil::COM12; + else if (strcasecmp(port, "COM13") == 0) + serPort = ArUtil::COM13; + else if (strcasecmp(port, "COM14") == 0) + serPort = ArUtil::COM14; + else if (strcasecmp(port, "COM15") == 0) + serPort = ArUtil::COM15; + else if (strcasecmp(port, "COM16") == 0) + serPort = ArUtil::COM16; + else if (port != NULL) + serPort = port; + + ArLog::log(ourSuccessLogLevel, "%sSet serial port to open %s", + logPrefix, serPort.c_str()); + serConn->setPort(serPort.c_str()); + return serConn; + /* + This code is commented out because it created problems with demo + (or any other program that used ArLaserConnector::connectLasers + with addAllLasersToRobot as true) + + int ret; + + if ((ret = serConn->open(serPort.c_str())) == 0) + { + ArLog::log(ourSuccessLogLevel, "%sOpened serial port %s", + logPrefix, serPort.c_str()); + return serConn; + } + else + { + ArLog::log(ArLog::Normal, "%sCould not open serial port %s (from %s), because %s", + logPrefix, serPort.c_str(), port, + serConn->getOpenMessage(ret)); + delete serConn; + return NULL; + } + */ +} + + +ArRetFunctor3 * +ArDeviceConnectionCreatorHelper::getCreateSerialCB(void) +{ + return &ourSerialCB; +} + +ArRetFunctor3 * +ArDeviceConnectionCreatorHelper::getCreateSerial422CB(void) +{ + return &ourSerial422CB; +} + +ArDeviceConnection *ArDeviceConnectionCreatorHelper::createTcpConnection( + const char *port, const char *defaultInfo, const char *logPrefix) +{ + ArTcpConnection *tcpConn = new ArTcpConnection; + int ret; + + tcpConn->setPort(port, atoi(defaultInfo)); + ArLog::log(ourSuccessLogLevel, + "%sSet tcp connection to open %s (and port %d)", + logPrefix, port, atoi(defaultInfo)); + return tcpConn; + + /* + This code is commented out because it created problems with demo + (or any other program that used ArLaserConnector::connectLasers + with addAllLasersToRobot as true) + + if ((ret = tcpConn->open(port, atoi(defaultInfo))) == 0) + { + ArLog::log(ourSuccessLogLevel, + "%sOpened tcp connection from %s (and port %d)", + logPrefix, port, atoi(defaultInfo)); + return tcpConn; + } + else + { + ArLog::log(ArLog::Normal, "%sCould not open a tcp connection to host '%s' with default port %d (from '%s'), because %s", + logPrefix, port, atoi(defaultInfo), defaultInfo, + tcpConn->getOpenMessage(ret)); + delete tcpConn; + return NULL; + } + */ +} + +ArRetFunctor3 * +ArDeviceConnectionCreatorHelper::getCreateTcpCB(void) +{ + return &ourTcpCB; +} + +void ArDeviceConnectionCreatorHelper::setSuccessLogLevel( + ArLog::LogLevel successLogLevel) +{ + ourSuccessLogLevel = successLogLevel; +} + +ArLog::LogLevel ArDeviceConnectionCreatorHelper::setSuccessLogLevel(void) +{ + return ourSuccessLogLevel; +} + +AREXPORT std::list ArPoseUtil::findCornersFromRobotBounds( + double radius, double widthLeft, double widthRight, + double lengthFront, double lengthRear, bool fastButUnsafe) +{ + + std::list ret; + + if (fastButUnsafe) + { + ArPose frontLeft; + if (lengthFront >= radius && widthLeft >= radius) + frontLeft.setPose(lengthFront, + widthLeft); + else if (lengthFront >= radius) + frontLeft.setPose(lengthFront, + 0); + else + frontLeft.setPose(lengthFront, + sqrt(radius * radius - lengthFront * lengthFront)); + + ArPose leftFront; + if (widthLeft >= radius && lengthFront >= radius) + leftFront.setPose(lengthFront, + widthLeft); + else if (widthLeft >= radius) + leftFront.setPose(0, + widthLeft); + else + leftFront.setPose(sqrt(radius * radius - widthLeft * widthLeft), + widthLeft); + + ArPose leftRear; + if (widthLeft >= radius && lengthRear >= radius) + leftRear.setPose(-lengthRear, + widthLeft); + else if (widthLeft >= radius) + leftRear.setPose(0, + widthLeft); + else + leftRear.setPose(-sqrt(radius * radius - widthLeft * widthLeft), + widthLeft); + + ArPose rearLeft; + if (lengthRear >= radius && widthLeft >= radius) + rearLeft.setPose(-lengthRear, + widthLeft); + else if (lengthRear >= radius) + rearLeft.setPose(-lengthRear, + 0); + else + rearLeft.setPose(-lengthRear, + sqrt(radius * radius - lengthRear * lengthRear )); + + + ArPose rearRight; + if (lengthRear >= radius && widthRight >= radius) + rearRight.setPose(-lengthRear, + -widthRight); + else if (lengthRear >= radius) + rearRight.setPose(-lengthRear, + 0); + else + rearRight.setPose(-lengthRear, + -sqrt(radius * radius - lengthRear * lengthRear)); + + + ArPose rightRear; + if (widthRight >= radius && lengthRear >= radius) + rightRear.setPose(-lengthRear, + -widthRight); + else if (widthRight >= radius) + rightRear.setPose(0, + -widthRight); + else + rightRear.setPose(-sqrt(radius * radius - widthRight * widthRight), + -widthRight); + + ArPose rightFront; + if (widthRight >= radius && lengthFront >= radius) + rightFront.setPose(lengthFront, + -widthRight); + else if (widthRight >= radius) + rightFront.setPose(0, + -widthRight); + else + rightFront.setPose(sqrt(radius * radius - widthRight * widthRight), + -widthRight); + + ArPose frontRight; + if (lengthFront >= radius && widthRight >= radius) + frontRight.setPose(lengthFront, + -widthRight); + else if (lengthFront >= radius) + frontRight.setPose(lengthFront, + 0); + else + frontRight.setPose(lengthFront, + -sqrt(radius * radius - lengthFront * lengthFront)); + + if (frontRight.squaredFindDistanceTo(frontLeft) > 1) + ret.push_back(frontLeft); + + if (frontLeft.squaredFindDistanceTo(leftFront) > 1) + ret.push_back(leftFront); + if (leftFront.squaredFindDistanceTo(leftRear) > 1) + ret.push_back(leftRear); + + if (leftRear.squaredFindDistanceTo(rearLeft) > 1) + ret.push_back(rearLeft); + if (rearLeft.squaredFindDistanceTo(rearRight) > 1) + ret.push_back(rearRight); + + if (rearRight.squaredFindDistanceTo(rightRear) > 1) + ret.push_back(rightRear); + if (rightRear.squaredFindDistanceTo(rightFront) > 1) + ret.push_back(rightFront); + + if (rightFront.squaredFindDistanceTo(frontRight) > 1) + ret.push_back(frontRight); + return ret; + } + + return ret; + + /// MPL this code worked, but didn't give us good corners when the width/length got nuts +#if 0 + if (fastButUnsafe) + { + + ArPose frontLeft; + if (lengthFront >= radius) + frontLeft.setPose(lengthFront, + 0); + else + frontLeft.setPose(lengthFront, + sqrt(radius * radius - lengthFront * lengthFront)); + + ArPose leftFront; + if (widthLeft >= radius) + leftFront.setPose(0, + widthLeft); + else + leftFront.setPose(sqrt(radius * radius - widthLeft * widthLeft), + widthLeft); + + ArPose leftRear(-leftFront.getX(), + leftFront.getY()); + /* + ArPose leftRear; + if (widthLefth >= radius) + leftRear.setPose(0, widthLeft); + else + leftRear.setPose(-sqrt(radius * radius - widthLeft * widthLeft), + widthLeft); + */ + + ArPose rearLeft; + if (lengthRear >= radius) + rearLeft.setPose(-lengthRear, + 0); + else + rearLeft.setPose(-lengthRear, + sqrt(radius * radius - lengthRear * lengthRear )); + + ArPose rearRight(rearLeft.getX(), + -rearLeft.getY()); + /* + ArPose rearRight; + if (lengthRear >= radius) + rightRear.setPose(lengthRear, + 0); + else + rightRear.setPose(lengthRear, + -sqrt(radius * radius - lengthRear * lengthRear)); + */ + + ArPose rightRear; + if (widthRight >= radius) + rightRear.setPose(0, + -widthRight); + else + rightRear.setPose(-sqrt(radius * radius - widthRight * widthRight), + -widthRight); + + ArPose rightFront(-rightRear.getX(), + rightRear.getY()); + /* + ArPose rightFront; + if (widthRight >= radius) + rightFront.setPose(0, + -widthRight); + else + rightFront.setPose(sqrt(radius * radius - widthRight * widthRight), + -widthRight); + */ + + ArPose frontRight(frontLeft.getX(), + -frontLeft.getY()); + /* + ArPose frontRight; + if (lengthFront >= radius) + rightFront.setPose(lengthFront, + 0); + else + rightFront.setPose(lengthFront, + -sqrt(radius * radius - lengthFront * lengthFront)); + */ + + std::list ret; + ret.push_back(frontLeft); + + ret.push_back(leftFront); + ret.push_back(leftRear); + + ret.push_back(rearLeft); + ret.push_back(rearRight); + + ret.push_back(rightRear); + ret.push_back(rightFront); + + ret.push_back(frontRight); + return ret; + } +#endif +} + + +AREXPORT std::list ArPoseUtil::breakUpDistanceEvenly( + ArPose start, ArPose end, int resolution) +{ + std::list ret; + + ret.push_back(start); + + double dist = start.findDistanceTo(end); + double angle = start.findAngleTo(end); + double cos = ArMath::cos(angle); + double sin = ArMath::sin(angle); + + if (dist > resolution) + { + // we're using integer truncation here + int steps = dist / resolution + 1; + double increment = dist / steps; + + double atX = start.getX(); + double atY = start.getY(); + + // now walk the length of the line and see if we should put the points in + for (int ii = 1; ii <= steps; ii++) + { + atX += increment * cos; + atY += increment * sin; + ret.push_back(ArPose(atX, atY)); + } + } + + ret.push_back(end); + return ret; +} diff --git a/Legacy/Aria/src/md5.cpp b/Legacy/Aria/src/md5.cpp new file mode 100644 index 0000000..af1c225 --- /dev/null +++ b/Legacy/Aria/src/md5.cpp @@ -0,0 +1,415 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/* + MPL (ActivMedia) renamed to a cpp file + +*/ + +/* RH (ActivMedia/MobileRobots) including header from ARIA which defines AREXPORT to export + functions from Windows DLLs, and added AREXPORT to functions defined below: +*/ +#include "ArExport.h" + +/* + Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.c is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order + either statically or dynamically; added missing #include + in library. + 2002-03-11 lpd Corrected argument list for main(), and added int return + type, in test program and T value program. + 2002-02-21 lpd Added missing #include in test program. + 2000-07-03 lpd Patched to eliminate warnings about "constant is + unsigned in ANSI C, signed in traditional"; made test program + self-checking. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). + 1999-05-03 lpd Original version. + */ + +#include "md5.h" +#include + +#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ +#ifdef ARCH_IS_BIG_ENDIAN +# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) +#else +# define BYTE_ORDER 0 +#endif + +#define T_MASK ((md5_word_t)~0) +#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) +#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) +#define T3 0x242070db +#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) +#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) +#define T6 0x4787c62a +#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) +#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) +#define T9 0x698098d8 +#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) +#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) +#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) +#define T13 0x6b901122 +#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) +#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) +#define T16 0x49b40821 +#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) +#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) +#define T19 0x265e5a51 +#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) +#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) +#define T22 0x02441453 +#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) +#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) +#define T25 0x21e1cde6 +#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) +#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) +#define T28 0x455a14ed +#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) +#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) +#define T31 0x676f02d9 +#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) +#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) +#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) +#define T35 0x6d9d6122 +#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) +#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) +#define T38 0x4bdecfa9 +#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) +#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) +#define T41 0x289b7ec6 +#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) +#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) +#define T44 0x04881d05 +#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) +#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) +#define T47 0x1fa27cf8 +#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) +#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) +#define T50 0x432aff97 +#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) +#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) +#define T53 0x655b59c3 +#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) +#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) +#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) +#define T57 0x6fa87e4f +#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) +#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) +#define T60 0x4e0811a1 +#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) +#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) +#define T63 0x2ad7d2bb +#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) + + +static void +md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) +{ + md5_word_t + a = pms->abcd[0], b = pms->abcd[1], + c = pms->abcd[2], d = pms->abcd[3]; + md5_word_t t; +#if BYTE_ORDER > 0 + /* Define storage only for big-endian CPUs. */ + md5_word_t X[16]; +#else + /* Define storage for little-endian or both types of CPUs. */ + md5_word_t xbuf[16]; + const md5_word_t *X; +#endif + + { +#if BYTE_ORDER == 0 + /* + * Determine dynamically whether this is a big-endian or + * little-endian machine, since we can use a more efficient + * algorithm on the latter. + */ + static const int w = 1; + + if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ +#endif +#if BYTE_ORDER <= 0 /* little-endian */ + { + /* + * On little-endian machines, we can process properly aligned + * data without copying it. + */ + if (!((data - (const md5_byte_t *)0) & 3)) { + /* data are properly aligned */ + X = (const md5_word_t *)data; + } else { + /* not aligned */ + memcpy(xbuf, data, 64); + X = xbuf; + } + } +#endif +#if BYTE_ORDER == 0 + else /* dynamic big-endian */ +#endif +#if BYTE_ORDER >= 0 /* big-endian */ + { + /* + * On big-endian machines, we must arrange the bytes in the + * right order. + */ + const md5_byte_t *xp = data; + int i; + +# if BYTE_ORDER == 0 + X = xbuf; /* (dynamic only) */ +# else +# define xbuf X /* (static only) */ +# endif + for (i = 0; i < 16; ++i, xp += 4) + xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); + } +#endif + } + +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) + + /* Round 1. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ +#define F(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + F(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 7, T1); + SET(d, a, b, c, 1, 12, T2); + SET(c, d, a, b, 2, 17, T3); + SET(b, c, d, a, 3, 22, T4); + SET(a, b, c, d, 4, 7, T5); + SET(d, a, b, c, 5, 12, T6); + SET(c, d, a, b, 6, 17, T7); + SET(b, c, d, a, 7, 22, T8); + SET(a, b, c, d, 8, 7, T9); + SET(d, a, b, c, 9, 12, T10); + SET(c, d, a, b, 10, 17, T11); + SET(b, c, d, a, 11, 22, T12); + SET(a, b, c, d, 12, 7, T13); + SET(d, a, b, c, 13, 12, T14); + SET(c, d, a, b, 14, 17, T15); + SET(b, c, d, a, 15, 22, T16); +#undef SET + + /* Round 2. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ +#define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + G(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 1, 5, T17); + SET(d, a, b, c, 6, 9, T18); + SET(c, d, a, b, 11, 14, T19); + SET(b, c, d, a, 0, 20, T20); + SET(a, b, c, d, 5, 5, T21); + SET(d, a, b, c, 10, 9, T22); + SET(c, d, a, b, 15, 14, T23); + SET(b, c, d, a, 4, 20, T24); + SET(a, b, c, d, 9, 5, T25); + SET(d, a, b, c, 14, 9, T26); + SET(c, d, a, b, 3, 14, T27); + SET(b, c, d, a, 8, 20, T28); + SET(a, b, c, d, 13, 5, T29); + SET(d, a, b, c, 2, 9, T30); + SET(c, d, a, b, 7, 14, T31); + SET(b, c, d, a, 12, 20, T32); +#undef SET + + /* Round 3. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + H(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 5, 4, T33); + SET(d, a, b, c, 8, 11, T34); + SET(c, d, a, b, 11, 16, T35); + SET(b, c, d, a, 14, 23, T36); + SET(a, b, c, d, 1, 4, T37); + SET(d, a, b, c, 4, 11, T38); + SET(c, d, a, b, 7, 16, T39); + SET(b, c, d, a, 10, 23, T40); + SET(a, b, c, d, 13, 4, T41); + SET(d, a, b, c, 0, 11, T42); + SET(c, d, a, b, 3, 16, T43); + SET(b, c, d, a, 6, 23, T44); + SET(a, b, c, d, 9, 4, T45); + SET(d, a, b, c, 12, 11, T46); + SET(c, d, a, b, 15, 16, T47); + SET(b, c, d, a, 2, 23, T48); +#undef SET + + /* Round 4. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ +#define I(x, y, z) ((y) ^ ((x) | ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + I(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 6, T49); + SET(d, a, b, c, 7, 10, T50); + SET(c, d, a, b, 14, 15, T51); + SET(b, c, d, a, 5, 21, T52); + SET(a, b, c, d, 12, 6, T53); + SET(d, a, b, c, 3, 10, T54); + SET(c, d, a, b, 10, 15, T55); + SET(b, c, d, a, 1, 21, T56); + SET(a, b, c, d, 8, 6, T57); + SET(d, a, b, c, 15, 10, T58); + SET(c, d, a, b, 6, 15, T59); + SET(b, c, d, a, 13, 21, T60); + SET(a, b, c, d, 4, 6, T61); + SET(d, a, b, c, 11, 10, T62); + SET(c, d, a, b, 2, 15, T63); + SET(b, c, d, a, 9, 21, T64); +#undef SET + + /* Then perform the following additions. (That is increment each + of the four registers by the value it had before this block + was started.) */ + pms->abcd[0] += a; + pms->abcd[1] += b; + pms->abcd[2] += c; + pms->abcd[3] += d; +} + +AREXPORT void +md5_init(md5_state_t *pms) +{ + pms->count[0] = pms->count[1] = 0; + pms->abcd[0] = 0x67452301; + pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; + pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; + pms->abcd[3] = 0x10325476; +} + +AREXPORT void +md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) +{ + const md5_byte_t *p = data; + int left = nbytes; + int offset = (pms->count[0] >> 3) & 63; + md5_word_t nbits = (md5_word_t)(nbytes << 3); + + if (nbytes <= 0) + return; + + /* Update the message length. */ + pms->count[1] += nbytes >> 29; + pms->count[0] += nbits; + if (pms->count[0] < nbits) + pms->count[1]++; + + /* Process an initial partial block. */ + if (offset) { + int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); + + memcpy(pms->buf + offset, p, copy); + if (offset + copy < 64) + return; + p += copy; + left -= copy; + md5_process(pms, pms->buf); + } + + /* Process full blocks. */ + for (; left >= 64; p += 64, left -= 64) + md5_process(pms, p); + + /* Process a final partial block. */ + if (left) + memcpy(pms->buf, p, left); +} + +AREXPORT void +md5_finish(md5_state_t *pms, md5_byte_t digest[16]) +{ + static const md5_byte_t pad[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + md5_byte_t data[8]; + int i; + + /* Save the length before padding. */ + for (i = 0; i < 8; ++i) + data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); + /* Pad to 56 bytes mod 64. */ + md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); + /* Append the length. */ + md5_append(pms, data, 8); + for (i = 0; i < 16; ++i) + digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); +} diff --git a/Legacy/Aria/tests/ArTestConfig.cpp b/Legacy/Aria/tests/ArTestConfig.cpp new file mode 100644 index 0000000..6896a09 --- /dev/null +++ b/Legacy/Aria/tests/ArTestConfig.cpp @@ -0,0 +1,731 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArTestConfig.h" + +#include +#include + +struct ArConfigPrimitiveData { + + int myIntInt; + int myIntIntWithMin; + int myIntIntWithMax; + int myIntIntWithMinMax; + + short myIntShort; + short myIntShortWithMin; + short myIntShortWithMax; + short myIntShortWithMinMax; + + unsigned short myIntUShort; + unsigned short myIntUShortWithMin; + unsigned short myIntUShortWithMax; + unsigned short myIntUShortWithMinMax; + + unsigned char myIntUChar; + unsigned char myIntUCharWithMin; + unsigned char myIntUCharWithMax; + unsigned char myIntUCharWithMinMax; + + double myDouble; + double myDoubleWithMin; + double myDoubleWithMax; + double myDoubleWithMinAndMax; + + bool myBool; + + char myStringBuf[256]; + + std::list myArgList; + + ArConfigPrimitiveData(); + +}; // end struct ArConfigPrimitiveData + +ArConfigPrimitiveData::ArConfigPrimitiveData() : + myIntInt(1), + myIntIntWithMin(2), + myIntIntWithMax(3), + myIntIntWithMinMax(4), + + myIntShort(5), + myIntShortWithMin(6), + myIntShortWithMax(7), + myIntShortWithMinMax(8), + + myIntUShort(9), + myIntUShortWithMin(10), + myIntUShortWithMax(11), + myIntUShortWithMinMax(12), + + myIntUChar(13), + myIntUCharWithMin(12), + myIntUCharWithMax(11), + myIntUCharWithMinMax(10), + + myDouble(17.1), + myDoubleWithMin(18.2), + myDoubleWithMax(19.3), + myDoubleWithMinAndMax(20.4), + + myBool(false), + + myStringBuf(), + + myArgList() + +{ + myStringBuf[0] = '\0'; + + /// Constructor for making an integer argument by pointer (4 bytes) + + myArgList.push_back(ArConfigArg("PointerIntInt", + &myIntInt, + "Pointer to an INT_INT, no bounds")); + + myArgList.push_back(ArConfigArg("PointerIntIntWithMin", + &myIntIntWithMin, + "Pointer to an INT_INT, min bound", + 1)); + + myArgList.push_back(ArConfigArg("PointerIntIntWithMax", + &myIntIntWithMax, + "Pointer to an INT_INT, max bounds", + INT_MIN, + 9999)); + + myArgList.push_back(ArConfigArg("PointerIntIntWithMinMax", + &myIntIntWithMinMax, + "Pointer to an INT_INT, min and max bounds", + -1, + 9999)); + + + /// Constructor for making an int argument thats a short (2 bytes) + //ArConfigArg(const char * name, short *pointer, + // const char * description = "", + // int minInt = SHRT_MIN, + // int maxInt = SHRT_MAX); + + myArgList.push_back(ArConfigArg("PointerIntShort", + &myIntShort, + "Pointer to an INT_SHORT, no bounds")); + + myArgList.push_back(ArConfigArg("PointerIntShortWithMin", + &myIntShortWithMin, + "Pointer to an INT_SHORT, min bound", + 1)); + + myArgList.push_back(ArConfigArg("PointerIntShortWithMax", + &myIntShortWithMax, + "Pointer to an INT_SHORT, max bounds", + SHRT_MIN, + 9999)); + + myArgList.push_back(ArConfigArg("PointerIntShortWithMinMax", + &myIntShortWithMinMax, + "Pointer to an INT_SHORT, min and max bounds", + -1, + 9999)); + + + + /// Constructor for making an int argument thats a ushort (2 bytes) + // ArConfigArg(const char * name, unsigned short *pointer, + // const char * description = "", + // int minInt = 0, + // int maxInt = USHRT_MAX); + + + myArgList.push_back(ArConfigArg("PointerIntUShort", + &myIntUShort, + "Pointer to an INT_USHORT, no bounds")); + myArgList.back().setRestartLevel(ArConfigArg::NO_RESTART); + + myArgList.push_back(ArConfigArg("PointerIntUShortWithMin", + &myIntUShortWithMin, + "Pointer to an INT_USHORT, min bound", + 1)); + myArgList.back().setRestartLevel(ArConfigArg::RESTART_CLIENT); + + myArgList.push_back(ArConfigArg("PointerIntUShortWithMax", + &myIntUShortWithMax, + "Pointer to an INT_USHORT, max bounds", + SHRT_MIN, + 9999)); + myArgList.back().setRestartLevel(ArConfigArg::RESTART_SOFTWARE); + + myArgList.push_back(ArConfigArg("PointerIntUShortWithMinMax", + &myIntUShortWithMinMax, + "Pointer to an INT_USHORT, min and max bounds", + 1, + 9999)); + myArgList.back().setRestartLevel(ArConfigArg::RESTART_HARDWARE); + + + ///// Constructor for making an char (1 byte) argument by pointer (treated as int) + // ArConfigArg(const char * name, unsigned char *pointer, + // const char * description = "", + // int minInt = 0, + // int maxInt = 255); + + myArgList.push_back(ArConfigArg("PointerIntUChar", + &myIntUChar, + "Pointer to an INT_UCHAR, no bounds")); + + myArgList.push_back(ArConfigArg("PointerIntUCharWithMin", + &myIntUCharWithMin, + "Pointer to an INT_UCHAR, min bound", + 1)); + + myArgList.push_back(ArConfigArg("PointerIntUCharWithMax", + &myIntUCharWithMax, + "Pointer to an INT_UCHAR, max bounds", + 0, + 11)); + + myArgList.push_back(ArConfigArg("PointerIntUCharWithMinMax", + &myIntUCharWithMinMax, + "Pointer to an INT_UCHAR, min and max bounds", + 1, + 11)); + + + + + /// Constructor for making a double argument by pointer + // ArConfigArg(const char * name, double *pointer, + // const char * description = "", + // double minDouble = -HUGE_VAL, + // double maxDouble = HUGE_VAL); + + myArgList.push_back(ArConfigArg("PointerDouble", + &myDouble, + "Pointer to a DOUBLE, no bounds")); + + myArgList.push_back(ArConfigArg("PointerDoubleWithMin", + &myDoubleWithMin, + "Pointer to a DOUBLE, min bound and a precision set to 2 plus a really, really long description that should require word wrapping", + -1.2, + HUGE_VAL, + 2)); + myArgList.back().setExtraExplanation("A bit more information regarding the double with min."); + + myArgList.push_back(ArConfigArg("PointerDoubleWithMax", + &myDoubleWithMax, + "Pointer to a DOUBLE, max bounds", + -HUGE_VAL, + 9999.8)); + myArgList.back().setExtraExplanation("A bit more information regarding the double with max."); + + myArgList.push_back(ArConfigArg("PointerDoubleWithMinMax", + &myDoubleWithMinAndMax, + "Pointer to a DOUBLE, min and max bounds", + -1.2, + 9999.8)); + + + /// Constructor for making a boolean argument by pointer + + //ArConfigArg(const char * name, bool *pointer, + // const char * description = ""); + + myArgList.push_back(ArConfigArg("PointerBool", + &myBool, + "Pointer to a BOOL")); + + + /// Constructor for making an argument of a string by pointer (see details) + // ArConfigArg(const char *name, char *str, + // const char *description, + // size_t maxStrLen); + + myArgList.push_back(ArConfigArg("PointerString", + myStringBuf, + "Pointer to a STRING", + sizeof(myStringBuf))); + + + myArgList.push_back(ArConfigArg(ArConfigArg::SEPARATOR)); + + myArgList.push_back(ArConfigArg("ValueString", + "InputText", + "A STRING value", + 0)); + + /// Constructor for making an argument of a string by pointer (see details) + // ArConfigArg(const char *name, const char *str, + // const char *description); + myArgList.push_back(ArConfigArg("ValueStringNoMaxLength", + "InputTextNoMaxLength", + "A STRING value, no max string length")); + + /// Constructor for making an integer argument + // ArConfigArg(const char * name, + // int val, + // const char * description = "", + // int minInt = INT_MIN, + // int maxInt = INT_MAX); + myArgList.push_back(ArConfigArg("ValueIntInt", + 1, + "An INT_INT value, no bounds")); + + /// Constructor for making a double argument + // ArConfigArg(const char * name, + // double val, + // const char * description = "", + // double minDouble = -HUGE_VAL, + // double maxDouble = HUGE_VAL); + myArgList.push_back(ArConfigArg("ValueDouble", + 2.3, + "A DOUBLE value, no bounds")); + + /// Constructor for making a boolean argument + // ArConfigArg(const char * name, + // bool val, + // const char * description = ""); + myArgList.push_back(ArConfigArg("ValueBool", + false, + "A BOOL value")); + + /// Constructor for making an argument that has functors to handle things + // ArConfigArg(const char *name, + // ArRetFunctor1 *setFunctor, + // ArRetFunctor *> *getFunctor, + // const char *description); + + /// Constructor for just holding a description (for ArConfig) + // ArConfigArg(const char *str, Type type = DESCRIPTION_HOLDER); + myArgList.push_back(ArConfigArg("DescriptionHolder")); + myArgList.push_back(ArConfigArg("Description Holder With Blanks and a really long description that might need to employ truncation or word wrapping upon display")); + + /// Constructor for holding an unknown argument (STRING_HOLDER) + // ArConfigArg(const char *name, const char *str); + myArgList.push_back(ArConfigArg("StringHolderName", + "StringHolderText")); + myArgList.push_back(ArConfigArg("String Holder Name With Blanks", + "String Holder Text With Blanks")); + + /// Constructs a new named argument of the specified type. + //AREXPORT ArConfigArg(Type type, + // const char *name, + // const char *description); + + myArgList.push_back(ArConfigArg(ArConfigArg::LIST, + "EmptyList", + "List with no children")); + + /// Constructs a new argument of the specified type. + // ArConfigArg(Type type); + myArgList.push_back(ArConfigArg(ArConfigArg::SEPARATOR)); + + +} // end method addToConfig + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +struct ArConfigDisplayHintData +{ + + std::list myArgList; + + ArConfigDisplayHintData(); + +}; // end struct ArConfigDisplayHintData + +ArConfigDisplayHintData::ArConfigDisplayHintData() : + myArgList() +{ + + // STRING + // Choices:choice1(;;choice#i)* + myArgList.push_back(ArConfigArg("PrimaryColor", + "Red", + "Choices display hint, for a primary color")); + myArgList.back().setDisplayHint("Choices:Red;;Green;;Blue"); + + // MapItem:type|(Parent|SubType|SubTypeAndParent|SubTypeGlob)|(Optional|Required) + myArgList.push_back(ArConfigArg("Goals", + "", + "MapItem display hint, for goals")); + myArgList.back().setDisplayHint("MapItem:Goal"); + + + // ChildObject:type|(Parent|SubType|SubTypeAndParent|SubTypeGlob)|(Optional|Required) + // TODO + + // Macro:taskClass1(;;taskClass#i)*|(Optional|Required) + // TODO + + // Macro + myArgList.push_back(ArConfigArg("Macros", + "", + "Macro display hint, no task classes")); + myArgList.back().setDisplayHint("Macro"); + + // Time:format + // TODO + + // Time + myArgList.push_back(ArConfigArg("PlainTime", + "", + "Time display hint, no formatting")); + myArgList.back().setDisplayHint("Time"); + + + // RobotFile:fileFilterNames|fileFilters + // KMC Not sure that wil work + myArgList.push_back(ArConfigArg("RobotFile", + "", + "RobotFile display hint, no filters")); + myArgList.back().setDisplayHint("RobotFile"); + + // INT + // Color + myArgList.push_back(ArConfigArg("Color", + 0xAAAAAA, + "Color display hint, for chooser")); + myArgList.back().setDisplayHint("Color"); + + // BOOL + // Checkbox + myArgList.push_back(ArConfigArg("PlainCheckbox", + false, + "Checkbox display hint (plain)")); + myArgList.back().setDisplayHint("Checkbox"); + + + // VISIBLE = + // Visible:OtherParamName=OtherParamValue + + // Creation of variable lists of parameters (a set of lasers, some parameters + // depending on the selected laser type) + + // Data regarding a single laser unit. + // + ArConfigArg laserUnitInfo(ArConfigArg::LIST, + "LaserUnitInfo", + "Data for a laser on the robot."); + + ArConfigArg laserNumberArg("LaserNumber", + 0, + "ID of laser unit"); // ?? TODO Redundant with laserUnit name + laserNumberArg.setDisplayHint("Editable:false"); + + laserUnitInfo.addArg(laserNumberArg); + + laserUnitInfo.addArg(ArConfigArg("LaserX", + 0, + "X position of laser on robot, measured from center of rotation (mm)")); + laserUnitInfo.addArg(ArConfigArg("LaserY", + 0, + "Y position of laser on robot, measured from center of rotation (mm)")); + laserUnitInfo.addArg(ArConfigArg("LaserZ", + 0, + "Z position of laser on robot, measured from floor (mm)")); + + ArConfigArg laserTypeArg("LaserType", + "", + "Type of the laser unit", + 0); + laserTypeArg.setDisplayHint("Choices:LMS1xxx;;LMS2xxx;;URG"); + + laserUnitInfo.addArg(laserTypeArg); + + + // Data that is displayed only when LaserType is set to lms2xxx + // + ArConfigArg lms2xxInfo(ArConfigArg::LIST, + "LMS2xxInfo", + "Data for an LMS2xxx laser"); + lms2xxInfo.setDisplayHint("Visible:LaserType=lms2xxx"); + + lms2xxInfo.addArg(ArConfigArg("LaserMaxRange", + 32000, + "Maximum range of the laser (mm)")); + lms2xxInfo.addArg(ArConfigArg("LaserCumulativeBufSize", + 200, + "Needs a description")); + + laserUnitInfo.addArg(lms2xxInfo); + + + // Placeholders for all possible laser units on the robot + // + ArConfigArg laserUnitCount("LaserCount", + 1, + "Number of lasers on the robot", + 0, + 3); + laserUnitCount.setDisplayHint("SpinBox"); + myArgList.push_back(laserUnitCount); + + + // VISIBLE > + // Visible:OtherParamName>OtherParamValue + + int maxCount = 3; + char nameBuf[256]; + char displayHintBuf[256]; + + for (int i = 1; i <= maxCount; i++) { + + snprintf(nameBuf, sizeof(nameBuf), "LaserUnit%i", i); + nameBuf[sizeof(nameBuf) - 1] = '\0'; + + ArConfigArg curLaserUnit(nameBuf, laserUnitInfo); + + // TODO Set laserNumber too? + ArConfigArg *laserNumberArg = curLaserUnit.findArg("LaserNumber"); + if (laserNumberArg != NULL) { + laserNumberArg->setInt(i); + } + // This info is visible only when the laserUnitCount is big enough + // + snprintf(displayHintBuf, sizeof(displayHintBuf), + "Visible:LaserCount>%i", i - 1); + displayHintBuf[sizeof(displayHintBuf) - 1] = '\0'; + + curLaserUnit.setDisplayHint(displayHintBuf); + + myArgList.push_back(curLaserUnit); + } + + + // Visible:OtherParamName!=OtherParamValue + // Visible:false + + // Editable:OtherParamName=OtherParamValue + // Editable:OtherParamName!=OtherParamValue + // Editable:OtherParamName>OtherParamValue + // Editable:false + + + +} // end ctor + + + + +// -------------------------------------------------------------------------- + +// Simple parameter that is editable only when a feature is enabled +// +//config.addParam("MicroCycleDockEnabled"); +//config.addParam("MicroCycleDockStateOfCharge", ... +// "Editable:MicroCycleDockEnabled=true") // DisplayHint +// + + +// ------------------------------------------------------------------------- + + + + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +ArTestConfig::ArTestConfig(ArConfig *config, + const char *configSectionName) : + myTopLevelConfigPrimitives(new ArConfigPrimitiveData()), + myListMemberPrimitives(new ArConfigPrimitiveData()), + myDisplayHintData(new ArConfigDisplayHintData()) +{ + // KMC Was thinking that we may someday want flags to control these things + // so left them in the body. + + addToConfig(config, configSectionName); + + +} // end ctor + +ArTestConfig::~ArTestConfig() +{ + delete myTopLevelConfigPrimitives; + delete myListMemberPrimitives; + delete myDisplayHintData; + +} + +bool ArTestConfig::addToConfig(ArConfig *config, + const char *configSectionName) +{ + + if (config == NULL) { + return false; + } + + bool isSuccess = true; + + if (myTopLevelConfigPrimitives != NULL) { + + std::string fullSectionName; + if (configSectionName != NULL) { + fullSectionName = configSectionName; + } + fullSectionName += "Primitives"; + + for (std::list::iterator iter = + myTopLevelConfigPrimitives->myArgList.begin(); + (iter != myTopLevelConfigPrimitives->myArgList.end()); + iter++) { + + if ((*iter).getRestartLevel() != ArConfigArg::NO_RESTART) { + ArLog::log(ArLog::Normal, + " %s", (*iter).getName()); + } + if (!config->addParam(*iter, + fullSectionName.c_str(), + ArPriority::NORMAL, + (*iter).getDisplayHint(), + (*iter).getRestartLevel())) { + isSuccess = false; + } + + } // end for each top level arg + + } // end if + + if (myListMemberPrimitives != NULL) { + + std::string fullSectionName; + if (configSectionName != NULL) { + fullSectionName = configSectionName; + } + fullSectionName += "ListMembers"; + + ArConfigArg listArg(ArConfigArg::LIST, + "PrimitiveList", + "List that contains all of the primitives"); + + for (std::list::iterator iter = + myListMemberPrimitives->myArgList.begin(); + (iter != myListMemberPrimitives->myArgList.end()); + iter++) { + + // KMC This is temp just because the separator was the first item in + // the list. + if ((*iter).getType() == ArConfigArg::SEPARATOR) { + continue; + } + if (!listArg.addArg(*iter)) { + + // Not necessarily failure, cannot add pointers ... + + } + + } // end for each list member arg + + if (!config->addParam(listArg, + fullSectionName.c_str(), + ArPriority::NORMAL)) { + isSuccess = false; + } + + } // end if list member primitives + + + if (myDisplayHintData != NULL) { + + std::string fullSectionName; + if (configSectionName != NULL) { + fullSectionName = configSectionName; + } + fullSectionName += "DisplayHints"; + + for (std::list::iterator iter = + myDisplayHintData->myArgList.begin(); + (iter != myDisplayHintData->myArgList.end()); + iter++) { + + if (!config->addParam(*iter, + fullSectionName.c_str(), + ArPriority::NORMAL, + (*iter).getDisplayHint())) { + isSuccess = false; + } + + } // end for each top level arg + } // end if display hint data + + + { + std::string fullSectionName; + if (configSectionName != NULL) { + fullSectionName = configSectionName; + } + fullSectionName += "RestartTypes"; + + config->addParam(ArConfigArg("RestartClientBool", + false, + "A BOOL to flip to cause a client restart request to be sent"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_CLIENT); + + config->addParam(ArConfigArg("RestartServerBool", + false, + "A BOOL to flip to cause the software to restart"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE); + + config->addParam(ArConfigArg("RestartServerInt", + 5, + "An INT to flip to cause the software to restart"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE); + + config->addParam(ArConfigArg("RestartServerDouble", + 5.0, + "A DOUBLE to flip to cause the software to restart"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE); + + config->addParam(ArConfigArg("RestartRobotBool", + false, + "A BOOL to flip to cause the complete robot to restart (really this just turns it off right now)"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_HARDWARE); + + config->addParam(ArConfigArg("RestartServerBool2", + false, + "A BOOL to flip to cause the software to restart"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE); + + config->addParam(ArConfigArg("RestartClientBool2", + false, + "A BOOL to flip to cause a client restart request to be sent"), + fullSectionName.c_str(), + ArPriority::NORMAL, "", ArConfigArg::RESTART_CLIENT); + + + } + + return isSuccess; + +} // end method addToConfig diff --git a/Legacy/Aria/tests/ArTestConfig.h b/Legacy/Aria/tests/ArTestConfig.h new file mode 100644 index 0000000..384c525 --- /dev/null +++ b/Legacy/Aria/tests/ArTestConfig.h @@ -0,0 +1,36 @@ + +#ifndef ARTESTCONFIG_H +#define ARTESTCONFIG_H + +struct ArConfigPrimitiveData; + +struct ArConfigDisplayHintData; + + +class ArConfig; + +class ArTestConfig +{ +public: + + ArTestConfig(ArConfig *config, + const char *configSectionName); + + virtual ~ArTestConfig(); + +protected: + + bool addToConfig(ArConfig *config, + const char *configSectionName); + +private: + + ArConfigPrimitiveData *myTopLevelConfigPrimitives; + + ArConfigPrimitiveData *myListMemberPrimitives; + + ArConfigDisplayHintData *myDisplayHintData; + +}; // end class ArTestConfig + +#endif // ARTESTCONFIG_H \ No newline at end of file diff --git a/Legacy/Aria/tests/AriaTests-vc2003.sln b/Legacy/Aria/tests/AriaTests-vc2003.sln new file mode 100644 index 0000000..8bbdbdb --- /dev/null +++ b/Legacy/Aria/tests/AriaTests-vc2003.sln @@ -0,0 +1,48 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joytest", "joytest.vcproj", "{949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gyroDrive", "gyroDrive.vcproj", "{5CCF6F58-EBB1-46A9-B923-A65E0524931B}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2003.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapTest", "mapTest-vc2003.vcproj", "{B5F29C69-B584-4221-98D9-F6BE7E039571}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Debug.ActiveCfg = Debug|Win32 + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Debug.Build.0 = Debug|Win32 + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Release.ActiveCfg = Release|Win32 + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Release.Build.0 = Release|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Debug.ActiveCfg = Debug|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Debug.Build.0 = Debug|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Release.ActiveCfg = Release|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Release.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release.Build.0 = Release|Win32 + {B5F29C69-B584-4221-98D9-F6BE7E039571}.Debug.ActiveCfg = Debug|Win32 + {B5F29C69-B584-4221-98D9-F6BE7E039571}.Debug.Build.0 = Debug|Win32 + {B5F29C69-B584-4221-98D9-F6BE7E039571}.Release.ActiveCfg = Release|Win32 + {B5F29C69-B584-4221-98D9-F6BE7E039571}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/tests/AriaTests-vc2008.sln b/Legacy/Aria/tests/AriaTests-vc2008.sln new file mode 100644 index 0000000..8ea0276 --- /dev/null +++ b/Legacy/Aria/tests/AriaTests-vc2008.sln @@ -0,0 +1,100 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joytest", "joytest-vc2008.vcproj", "{949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gyroDrive", "gyroDrive-vc2008.vcproj", "{5CCF6F58-EBB1-46A9-B923-A65E0524931B}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AriaDLL", "..\src\AriaDLL-vc2008.vcproj", "{606257AE-E882-4C66-84C0-72331642D09F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "..\examples\demo-vc2008.vcproj", "{E1137892-32C1-4250-8784-8D48A6BEE2DD}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mutexLockWarning", "mutexLockWarning-vc2008.vcproj", "{A1CA7B29-F869-4C21-9BFE-9A235F85E222}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timingTest", "timingTest-vc2008.vcproj", "{61C4520B-3A4C-4EEF-AEF6-E3A033033C37}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "actionManagementTest", "actionManagementTest-vc2008.vcproj", "{8AC014FB-85AF-42D8-BDEF-E298F76F89FD}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configSectionTest", "configSectionTest-vc2008.vcproj", "{59FA998E-94AF-4A2D-8683-6F2CEAB39641}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configTest", "configTest-vc2008.vcproj", "{F20D8C69-B42F-4A34-86E3-0AF04B410630}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moveRobotInSim", "moveRobotInSim-vc2008.vcproj", "{7A2A5D2D-4CD7-4FED-888D-82D4B17F9A9A}" + ProjectSection(ProjectDependencies) = postProject + {606257AE-E882-4C66-84C0-72331642D09F} = {606257AE-E882-4C66-84C0-72331642D09F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Debug|Win32.ActiveCfg = Debug|Win32 + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Debug|Win32.Build.0 = Debug|Win32 + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Release|Win32.ActiveCfg = Release|Win32 + {949DC88E-420E-4A3D-9DA4-95A1D6EAFAE4}.Release|Win32.Build.0 = Release|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Debug|Win32.ActiveCfg = Debug|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Debug|Win32.Build.0 = Debug|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Release|Win32.ActiveCfg = Release|Win32 + {5CCF6F58-EBB1-46A9-B923-A65E0524931B}.Release|Win32.Build.0 = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Debug|Win32.Build.0 = Debug|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.ActiveCfg = Release|Win32 + {606257AE-E882-4C66-84C0-72331642D09F}.Release|Win32.Build.0 = Release|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Debug|Win32.Build.0 = Debug|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Release|Win32.ActiveCfg = Release|Win32 + {E1137892-32C1-4250-8784-8D48A6BEE2DD}.Release|Win32.Build.0 = Release|Win32 + {A1CA7B29-F869-4C21-9BFE-9A235F85E222}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1CA7B29-F869-4C21-9BFE-9A235F85E222}.Debug|Win32.Build.0 = Debug|Win32 + {A1CA7B29-F869-4C21-9BFE-9A235F85E222}.Release|Win32.ActiveCfg = Release|Win32 + {A1CA7B29-F869-4C21-9BFE-9A235F85E222}.Release|Win32.Build.0 = Release|Win32 + {61C4520B-3A4C-4EEF-AEF6-E3A033033C37}.Debug|Win32.ActiveCfg = Debug|Win32 + {61C4520B-3A4C-4EEF-AEF6-E3A033033C37}.Debug|Win32.Build.0 = Debug|Win32 + {61C4520B-3A4C-4EEF-AEF6-E3A033033C37}.Release|Win32.ActiveCfg = Release|Win32 + {61C4520B-3A4C-4EEF-AEF6-E3A033033C37}.Release|Win32.Build.0 = Release|Win32 + {8AC014FB-85AF-42D8-BDEF-E298F76F89FD}.Debug|Win32.ActiveCfg = Debug|Win32 + {8AC014FB-85AF-42D8-BDEF-E298F76F89FD}.Debug|Win32.Build.0 = Debug|Win32 + {8AC014FB-85AF-42D8-BDEF-E298F76F89FD}.Release|Win32.ActiveCfg = Release|Win32 + {8AC014FB-85AF-42D8-BDEF-E298F76F89FD}.Release|Win32.Build.0 = Release|Win32 + {59FA998E-94AF-4A2D-8683-6F2CEAB39641}.Debug|Win32.ActiveCfg = Debug|Win32 + {59FA998E-94AF-4A2D-8683-6F2CEAB39641}.Debug|Win32.Build.0 = Debug|Win32 + {59FA998E-94AF-4A2D-8683-6F2CEAB39641}.Release|Win32.ActiveCfg = Release|Win32 + {59FA998E-94AF-4A2D-8683-6F2CEAB39641}.Release|Win32.Build.0 = Release|Win32 + {F20D8C69-B42F-4A34-86E3-0AF04B410630}.Debug|Win32.ActiveCfg = Debug|Win32 + {F20D8C69-B42F-4A34-86E3-0AF04B410630}.Debug|Win32.Build.0 = Debug|Win32 + {F20D8C69-B42F-4A34-86E3-0AF04B410630}.Release|Win32.ActiveCfg = Release|Win32 + {F20D8C69-B42F-4A34-86E3-0AF04B410630}.Release|Win32.Build.0 = Release|Win32 + {7A2A5D2D-4CD7-4FED-888D-82D4B17F9A9A}.Debug|Win32.ActiveCfg = Debug|Win32 + {7A2A5D2D-4CD7-4FED-888D-82D4B17F9A9A}.Debug|Win32.Build.0 = Debug|Win32 + {7A2A5D2D-4CD7-4FED-888D-82D4B17F9A9A}.Release|Win32.ActiveCfg = Release|Win32 + {7A2A5D2D-4CD7-4FED-888D-82D4B17F9A9A}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Legacy/Aria/tests/Makefile b/Legacy/Aria/tests/Makefile new file mode 100644 index 0000000..36dcbd7 --- /dev/null +++ b/Legacy/Aria/tests/Makefile @@ -0,0 +1,28 @@ +# A simple $(MAKE)file to cause $(MAKE) to go look in the top directory. A simple +# convenience. + +all: ../lib/libAria.so + $(MAKE) -C .. tests + +.PHONY: all clean FORCE + +../lib/libAria.so: FORCE + $(MAKE) -C .. dirs lib/libAria.so + +../lib/libAria.a: FORCE + $(MAKE) -C .. dirs lib/libAria.a + +%.so: ../lib/libAria.so %.cpp + $(MAKE) -C .. tests/$@ + +%: ../lib/libAria.so %.cpp + $(MAKE) -C .. tests/$@ + +%Static: ../lib/libAria.a %.cpp + $(MAKE) -C .. tests/$@ + +clean: + $(MAKE) -C .. cleanTests + +FORCE: + diff --git a/Legacy/Aria/tests/README.txt b/Legacy/Aria/tests/README.txt new file mode 100644 index 0000000..32f0382 --- /dev/null +++ b/Legacy/Aria/tests/README.txt @@ -0,0 +1,150 @@ +These are test programs, users may not want to look at these to +understand how ARIA works, but after understanding ARIA may want to +look at specific files in this directory to see some more complicated +things. These are not documented much, each program trying only to do +one or two things, which should be fairly self-evident from these +descriptions and from the code. + +------------------------------------------------------------------------------- + +absoluteHeadingActionTest - Tests an action with absolute heading. + +actionArgumentTest - Tests the ArArg class and the argument part of ArAction. + +actionAverageTest - Tests to make sure actions average right if at +same priority (differently than samePriorityActionTest, slightly) + +actionManagementTest - Tests adding, removing, and finding actions. + +actsTest - Does a test print out from ACTS + +angleBetweenTest - Tests ArMath::angleBetween + +angleFixTest - Tests ArMath::angleFix + +angleTest - Tests some various things with angles + +asyncConnectTest - Connects to the robot, disconnects, and tries to break the +connection state. This was designed to test the connection sequence. This +uses ArRobot::asyncConnect. + +auxSerialTest - Dumps a lot of things out to aux serial port with TTY commands + +callbackTest - Tests the connection callbacks in ArRobot + +chargeTest - A test for charging with a powerbot dock + +configTest - Tests ArConfig reading in a file and writing files + +connectTest - Connects to the robot, disconnects, and tries to break the +connection state. This was designed to test the connection sequence. This +uses ArRobot::blockingConnect. + +connectionTest - Tests the connection by requesting IO packets as it +drives about hard and fast (make sure it won't hurt anyone) + +driveFast - a test that drives the robot fast for a given distance + +encoderCorrectionTest - Connects to a robot with a joystick, pressing button +two will set the encoder correction callback, just run it to see the args + +fileParserTest - just tests the file parser and shows how to use it a little + +functorTest - Does some extensive tests of functors + +gotoTest - Uses the ArActionGoto to go somewhere in a very naive way + +hardDriveWander - This drives about very hard and fast, only run this +in lots of space where no one will get hurt + +interpolationTest - Tests the position interpolation functions on ArRobot + +ioTest - Tests the response time for IOREQUEST commands sent to the robot + +keyHandlerTest - Tests the keyhandler out + +keys - Lower level test of the keyhandler + +lineTest - Tests the used functionality of ArLine and ArLineSegment + +moveRobotTest - Drives the robot around, has different actions for pushing +button 2, its to make sure that the ArRobot::moveTo(pos) command works in +some fashion, and to check the transforms, just run the program to have it +print its usage + +optoIOtest - This is a very simple test of using the Opto22 interface on the +Versalogic motherboards in P2 and P3 robots. It also tests the analog + +p2osSlamTest - Sends lots of packets to the P2 to try and mess it up + +paramTest - Tests out some of the ArPreference parameter stuff + +poseTest - Tests out ArPose + +robotListTest - Tests some of the Aria:: functions that have to do with +the robot list + +robotConfigPacketReaderTest - A test of getting the robot config packet + +rotvelActionExample - Tests out an action that drives using rot vel + +runtimeTest - Times how long the robot will run when doing a period of +wandering, then a period of resting, then wandering and so on, until the +battery dies. It runs ACTS while wandering, and pipes the display to another computer. + +samePriorityActionTest - Sees if actions average right when at the +same priority (differently than actionAverageTest, slightly) + +segvTest - Causes a seg fault to see if its handled right + +serialTest - Test for checking for interference on a serial port + +serialTest2 - Another test for checking for interference on a serial port + +sickSimpleTest - A test used in the development of the sick driver + +sickMiddleTest - A test that prints out the middle readings of the +laser continually + +sickTest - A test that connects to the laser then prints out a few +sets of readings + +sickTestAll - A test that connects to the laser, turns off all +filtering then prints out readings until killed + +signalTest - Prints out signals that come in to the program + +sonarDeviceTest - Prints out the sonar readings from the sonarDevice + +sonarTest - Prints out the sonar disk positions then prints out the sonar +readings + +stallTest - Tests the stall behavior by going forward and ramming things, you +should only use this one in the simulator, also can be set to go backwards + +stressTest - Creates 2 busy loops, and sees if the syncLoop still winds up +with the right amount of time between runs + +stripQuotesTest - Just a tests that tests ArUtil::stripQuotes + +systemCallTest - Tests doing system calls and signals + +tcm2Test - Connects to the tcm2 compass and prints out its information + +threadTest - Does a rudamentary test on threading + +timeTest - Just does a simple test of the functions related to ArTime + +timingTest - Does a test of how long the syncLoop takes to run, prints out +the results + +transformTest - Tests out ArTransform + +triangleAccuracyTest - Tests out the repeatability of ArActionTriangleDriveTo + +usertasktest - Tests the user task list that ArRobot maintains. + +vcc4Test - Test and exercise a vcc4 camera + +velTest - has the robot drive at set velocities (trans and rot) and +prints out how fast it says its going diff --git a/Legacy/Aria/tests/absoluteHeadingActionTest.cpp b/Legacy/Aria/tests/absoluteHeadingActionTest.cpp new file mode 100644 index 0000000..3c17692 --- /dev/null +++ b/Legacy/Aria/tests/absoluteHeadingActionTest.cpp @@ -0,0 +1,160 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +class ActionTurnToHeading : public ArAction +{ +public: + ActionTurnToHeading(double heading = 0); + virtual ~ActionTurnToHeading(void) {} + virtual ArActionDesired *fire(ArActionDesired currentDesired); + void setHeading(double heading); +protected: + ArActionDesired myDesired; + double myHeading; +}; + +ActionTurnToHeading::ActionTurnToHeading(double heading) : + ArAction("TurnToHeading", "Turns to a heading") +{ + setNextArgument(ArArg("desired heading", &myHeading, "Heading to turn to.")); + myHeading = heading; +} + +void ActionTurnToHeading::setHeading(double heading) +{ + myHeading = heading; +} + +ArActionDesired *ActionTurnToHeading::fire(ArActionDesired currentDesired) +{ + myDesired.reset(); + + myDesired.setHeading(myHeading); + + return &myDesired; +} + +class ConnHandler +{ +public: + ConnHandler(ArRobot *robot); + ~ConnHandler(void) {} + void connFail(void); + void connected(void); +protected: + ArRobot *myRobot; + ArFunctorC *myConnFailCB; + ArFunctorC *myConnectedCB; +}; + +ConnHandler::ConnHandler(ArRobot *robot) +{ + myRobot = robot; + myConnectedCB = new ArFunctorC(this, &ConnHandler::connected); + myRobot->addConnectCB(myConnectedCB, ArListPos::FIRST); + myConnFailCB = new ArFunctorC(this, &ConnHandler::connFail); + myRobot->addFailedConnectCB(myConnFailCB, ArListPos::FIRST); +} + +void ConnHandler::connFail(void) +{ + printf("Failed to connect.\n"); + myRobot->stopRunning(); + Aria::shutdown(); + return; +} + +void ConnHandler::connected(void) +{ + printf("Connected\n"); + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::ENABLE, 1); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +int main(int argc, char **argv) +{ + std::string str; + int ret; + + ArSerialConnection con; + ArRobot robot; + ConnHandler ch(&robot); + + ActionTurnToHeading headingAction; + + Aria::init(Aria::SIGHANDLE_THREAD); + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf( + "asyncConnect failed because robot is not running in its own thread.\n"); + Aria::shutdown(); + return 1; + } + + robot.addAction(&headingAction, 100); + robot.runAsync(true); + + robot.enableMotors(); + + printf("Turning the robot to 180, then sleeping 4 seconds.\n"); + headingAction.setHeading(180); + ArUtil::sleep(4000); + printf("Robot got to %.1f\n", robot.getTh()); + + printf("Turning the robot to 30, then sleeping 4 seconds.\n"); + headingAction.setHeading(30); + ArUtil::sleep(4000); + + printf("Robot got to %.1f\n", robot.getTh()); + printf("Turning the robot to -170, then sleeping 4 seconds.\n"); + headingAction.setHeading(-170); + ArUtil::sleep(4000); + + printf("Robot got to %.1f\n", robot.getTh()); + printf("Turning the robot to -130, then sleeping 4 seconds.\n"); + headingAction.setHeading(-130); + ArUtil::sleep(4000); + + printf("Robot got to %.1f\n", robot.getTh()); + printf("Now exiting\n"); + Aria::exit(); + return 0; +} + diff --git a/Legacy/Aria/tests/accDecelMaxTest.cpp b/Legacy/Aria/tests/accDecelMaxTest.cpp new file mode 100644 index 0000000..a7e63de --- /dev/null +++ b/Legacy/Aria/tests/accDecelMaxTest.cpp @@ -0,0 +1,192 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This is a test of the accelerations and decelerations in actions. + +*/ + +class Tester : public ArAction +{ +public: + Tester(ArRobot *robot); + virtual ~Tester() {} + virtual ArActionDesired *fire(ArActionDesired currentDesired); + void setRotVelMax(int rotVelMax) { myRotVelMax = rotVelMax; } + void setRotAcc(int rotAccel) { myRotAcc = rotAccel; } + void setRotDecel(int rotDecel) { myRotDecel = rotDecel; } + void setTransVelMax(int transVelMax) { myTransVelMax = transVelMax; } + void setTransAcc(int transAcc) { myTransAcc = transAcc; } + void setTransDecel(int transDecel) { myTransDecel = transDecel; } +protected: + ArActionDesired myActionDesired; + int myRotVelMax; + int myRotAcc; + int myRotDecel; + int myTransVelMax; + int myTransAcc; + int myTransDecel; +}; + +Tester::Tester(ArRobot *robot) : + ArAction("Tester") +{ + ArKeyHandler *keyHandler; + + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + robot->attachKeyHandler(keyHandler); + } + myTransVelMax = 0; + myTransAcc = 0; + myTransDecel = 0; + myRotVelMax = 0; + myRotAcc = 0; + myRotDecel = 0; + keyHandler->addKeyHandler('q', new ArFunctor1C(this, &Tester::setRotVelMax, 0)); + keyHandler->addKeyHandler('w', new ArFunctor1C(this, &Tester::setRotVelMax, 20)); + keyHandler->addKeyHandler('e', new ArFunctor1C(this, &Tester::setRotVelMax, 500)); + + keyHandler->addKeyHandler('a', new ArFunctor1C(this, &Tester::setRotAcc, 0)); + keyHandler->addKeyHandler('s', new ArFunctor1C(this, &Tester::setRotAcc, 8)); + keyHandler->addKeyHandler('d', new ArFunctor1C(this, &Tester::setRotAcc, 500)); + + keyHandler->addKeyHandler('z', new ArFunctor1C(this, &Tester::setRotDecel, 0)); + keyHandler->addKeyHandler('x', new ArFunctor1C(this, &Tester::setRotDecel, 8)); + keyHandler->addKeyHandler('c', new ArFunctor1C(this, &Tester::setRotDecel, 500)); + + keyHandler->addKeyHandler('u', new ArFunctor1C(this, &Tester::setTransVelMax, 0)); + keyHandler->addKeyHandler('i', new ArFunctor1C(this, &Tester::setTransVelMax, 20)); + keyHandler->addKeyHandler('o', new ArFunctor1C(this, &Tester::setTransVelMax, 500)); + + keyHandler->addKeyHandler('j', new ArFunctor1C(this, &Tester::setTransAcc, 0)); + keyHandler->addKeyHandler('k', new ArFunctor1C(this, &Tester::setTransAcc, 8)); + keyHandler->addKeyHandler('l', new ArFunctor1C(this, &Tester::setTransAcc, 500)); + + keyHandler->addKeyHandler('m', new ArFunctor1C(this, &Tester::setTransDecel, 0)); + keyHandler->addKeyHandler(',', new ArFunctor1C(this, &Tester::setTransDecel, 8)); + keyHandler->addKeyHandler('.', new ArFunctor1C(this, &Tester::setTransDecel, 500)); + +} + +ArActionDesired *Tester::fire(ArActionDesired currDes) +{ + printf("%4.0f %4.0f Rot max: %3d acc: %3d dec: %3d Trans max: %3d acc: %3d dec %3d\n", + myRobot->getVel(), myRobot->getRotVel(), + myRotVelMax, myRotAcc, myRotDecel, myTransVelMax, myTransAcc, + myTransDecel); + myActionDesired.reset(); + + if (myRotVelMax != 0) + myActionDesired.setMaxRotVel(myRotVelMax); + if (myRotAcc != 0) + myActionDesired.setRotAccel(myRotAcc); + if (myRotDecel != 0) + myActionDesired.setRotDecel(myRotDecel); + if (myTransVelMax != 0) + myActionDesired.setMaxVel(myTransVelMax); + if (myTransVelMax != 0) + myActionDesired.setMaxNegVel(myTransVelMax); + if (myTransAcc != 0) + myActionDesired.setTransAccel(myTransAcc); + if (myTransDecel != 0) + myActionDesired.setTransDecel(myTransDecel); + + return &myActionDesired; +} + + + +int main(int argc, char **argv) +{ + // robot + ArRobot robot; + + // the joydrive action + ArActionJoydrive joydriveAct; + // the keydrive action + ArActionKeydrive keydriveAct; + // Testing action + Tester tester(&robot); + + // sonar device, so the limiter will work, this must be added to the robot + ArSonarDevice sonar; + + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + exit(1); + } + + // mandatory init + Aria::init(); + + printf("This program will allow you to use a joystick or keyboard to control the robot.\nYou can use the arrow keys to drive, and the spacebar to stop.\nFor joystick control press the trigger button and then drive.\nPress escape to exit.\n"); + + // if we don't have a joystick, let 'em know + if (!joydriveAct.joystickInited()) + printf("Do not have a joystick, only the arrow keys on the keyboard will work.\n"); + + // set the joystick so it won't do anything if the button isn't pressed + joydriveAct.setStopIfNoButtonPressed(false); + + // add the sonar to the robot + robot.addRangeDevice(&sonar); + + // try to connect, if we fail exit + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // enable the motors + robot.enableMotors(); + + // add the cations, put the limiters on top, then have the action, + // this will keep the action from being able to drive too fast and hit + // something + robot.addAction(&tester, 55); + //robot.addAction(&joydriveAct, 50); + robot.addAction(&keydriveAct, 45); + + // set the joydrive action so it'll let the keydrive action fire if + // there is no button pressed + joydriveAct.setStopIfNoButtonPressed(false); + + + // run the robot, true here so that the run will exit if connection lost + robot.run(true); + + // now exit + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/actionArgumentTest.cpp b/Legacy/Aria/tests/actionArgumentTest.cpp new file mode 100644 index 0000000..a300a62 --- /dev/null +++ b/Legacy/Aria/tests/actionArgumentTest.cpp @@ -0,0 +1,150 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class TestAction0 : public ArAction +{ +public: + TestAction0(const char *name) : ArAction(name) + {}; + virtual ~TestAction0(void) {} + ArActionDesired *fire(ArActionDesired currentDesired) { return NULL; } +}; + +class TestAction1 : public ArAction +{ +public: + TestAction1(const char *name, const char *description = "") : + ArAction(name, description) + { + setNextArgument(ArArg("first", &myDouble)); + myDouble = 1; + }; + virtual ~TestAction1(void) {} + ArActionDesired *fire(ArActionDesired currentDesired) { return NULL; } + double myDouble; +}; + + +class TestAction3 : public ArAction +{ +public: + TestAction3(const char *name, const char *description = "") : + ArAction(name, description) + { + setNextArgument(ArArg("first", &myDouble, "That infamous double")); + setNextArgument(ArArg("second", &myInt)); + setNextArgument(ArArg("third", myString, "An infamous string", sizeof(myString))); + myDouble = 3; + myInt = 3; + strcpy(myString, "3"); + }; + virtual ~TestAction3(void) {} + ArActionDesired *fire(ArActionDesired currentDesired) { return NULL; } + double myDouble; + int myInt; + char myString[512]; +}; + + + + +int main(void) +{ + ArArg *arg; + + printf("Test0 should have no arguments\nIt should have no description.\n----------------------------------\n"); + TestAction0 ta0("Test0"); + ta0.log(); + printf("Test1 should have one argument.\nA double equal to 1.\nIt should have no description.\n----------------------------------\n"); + TestAction1 ta1("Test1"); + ta1.log(); + printf("Test3 should have 3 arguments.\nA double, an int, and a string equal to 3.\nIt should also have a description.\n----------------------------------\n"); + TestAction3 ta3("Test3", "The real test class"); + ta3.log(); + + printf("Okay, now the automated test bit:\n"); + arg = ta3.getArg(0); + if (arg->getType() == ArArg::DOUBLE && arg->getDouble() == 3 && + ta3.myDouble == 3) + printf("Double argument type and equality: passed.\n"); + else + { + printf("Double argument type and equality: FAILED.\n"); + exit(1); + } + arg->setDouble(6); + printf("Double argument setting: %f %f:", arg->getDouble(), ta3.myDouble); + if (arg->getDouble() == 6 && ta3.myDouble == 6) + printf(" passed\n"); + else + { + printf(" FAILED\n"); + exit(1); + } + + arg = ta3.getArg(1); + if (arg->getType() == ArArg::INT && arg->getInt() == 3 && + ta3.myInt == 3) + printf("Int argument type and equality: passed.\n"); + else + { + printf("Int argument type and equality: FAILED.\n"); + exit(1); + } + arg->setInt(6); + printf("Int argument setting: %d %d:", arg->getInt(), ta3.myInt); + if (arg->getInt() == 6 && ta3.myInt == 6) + printf(" passed\n"); + else + { + printf(" FAILED\n"); + exit(1); + } + + arg = ta3.getArg(2); + if (arg->getType() == ArArg::STRING && strcmp(arg->getString(), "3") == 0 && + strcmp(ta3.myString, "3") == 0) + printf("String argument type and equality: passed.\n"); + else + { + printf("String argument type and equality: FAILED.\n"); + exit(1); + } + + arg->setString("6"); + printf("String argument setting: %s %s:", arg->getString(), + ta3.myString); + if (strcmp(arg->getString(), "6") == 0 && strcmp(ta3.myString, "6") == 0) + printf(" passed\n"); + else + { + printf(" FAILED\n"); + exit(1); + } + + printf("\nAll tests PASSED\n"); +} diff --git a/Legacy/Aria/tests/actionAverageTest.cpp b/Legacy/Aria/tests/actionAverageTest.cpp new file mode 100644 index 0000000..8b43bb4 --- /dev/null +++ b/Legacy/Aria/tests/actionAverageTest.cpp @@ -0,0 +1,53 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArPriorityResolver Resolver; +ArResolver::ActionMap Actions; + +void addAction(ArAction *action, int priority) +{ + Actions.insert(std::pair(priority, action)); +} + +int main(void) +{ + ArActionDesired *des; + + ArActionConstantVelocity cv("", 400); + ArActionConstantVelocity cv2("", 200); + ArActionConstantVelocity cv3("", 500); + + addAction(&cv, 50); + addAction(&cv2, 50); + + des = Resolver.resolve(&Actions, NULL); + printf("des %.2f, should be 300\n", des->getVel()); + + addAction(&cv3, 50); + des = Resolver.resolve(&Actions, NULL); + printf("des %.2f, should be 366.67\n", des->getVel()); +} diff --git a/Legacy/Aria/tests/actionManagementTest-vc2008.vcproj b/Legacy/Aria/tests/actionManagementTest-vc2008.vcproj new file mode 100644 index 0000000..83d16e6 --- /dev/null +++ b/Legacy/Aria/tests/actionManagementTest-vc2008.vcproj @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/actionManagementTest.cpp b/Legacy/Aria/tests/actionManagementTest.cpp new file mode 100644 index 0000000..475a881 --- /dev/null +++ b/Legacy/Aria/tests/actionManagementTest.cpp @@ -0,0 +1,88 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class TestAction : public ArAction +{ +public: + TestAction(const char * name, const char * description = "") : + ArAction(name, description) {} + virtual ~TestAction(void) {} + ArActionDesired *fire(ArActionDesired currentDesired) { return NULL; } +}; + +int main(void) +{ + Aria::init(); + + TestAction act0("0"); + TestAction act1("1"); + TestAction act2("2"); + + TestAction act3("3"); + TestAction act4("4"); + TestAction act5("5"); + + ArAction *act; + ArRobot robot; + + + robot.addAction(&act2, 100); + robot.addAction(&act1, 100); + robot.addAction(&act0, 100); + robot.addAction(&act4, 50); + robot.addAction(&act3, 75); + robot.addAction(&act5, -30); + + printf("###First the action list should print with 6\n"); + printf("--------------------------------------------------------------\n"); + robot.logActions(); + + printf("###Then the action list should print with 5 (lacking number 4)\n"); + printf("--------------------------------------------------------------\n"); + robot.remAction(&act4); + robot.logActions(); + + printf("###Then the action list should print with 4 (lacking number 1)\n"); + printf("--------------------------------------------------------------\n"); + robot.remAction("1"); + robot.logActions(); + + printf("###Then the action list should again print with 4\n"); + printf("--------------------------------------------------------------\n"); + robot.logActions(); + + printf("###Now action 0 should be printed.\n"); + if ((act = robot.findAction("0")) != NULL) + act->log(); + + printf("###Now action 3 should be printed.\n"); + if ((act = robot.findAction("3")) != NULL) + act->log(); + + printf("end of program.\n"); + Aria::exit(0); +} diff --git a/Legacy/Aria/tests/actsTest.cpp b/Legacy/Aria/tests/actsTest.cpp new file mode 100644 index 0000000..a94a375 --- /dev/null +++ b/Legacy/Aria/tests/actsTest.cpp @@ -0,0 +1,62 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArACTS_1_2 acts; +enum { + WIDTH = 160, + HEIGHT = 120 +}; + + +int main(void) +{ + ArACTSBlob blob; + double xRel, yRel; + int i; + + acts.openPort(NULL); + acts.requestPacket(); + while(1) + { + if (acts.receiveBlobInfo()) + { + //acts.receiveBlobInfo(); + for (i = 0; i < 8; i++) + if (acts.getNumBlobs(i) >= 1 && acts.getBlob(i, 1, &blob)) + { + xRel = (double)(blob.getXCG() - WIDTH/2.0) / (double)WIDTH; + yRel = (double)(blob.getYCG() - HEIGHT/2.0) / (double)HEIGHT; + printf("Chan %d xRel %.4f yRel %.4f ", i, xRel, yRel); + blob.log(); + } + acts.requestPacket(); + ArUtil::sleep(80); + } + ArUtil::sleep(5); + } + +} diff --git a/Legacy/Aria/tests/angleBetweenTest.cpp b/Legacy/Aria/tests/angleBetweenTest.cpp new file mode 100644 index 0000000..692bc22 --- /dev/null +++ b/Legacy/Aria/tests/angleBetweenTest.cpp @@ -0,0 +1,93 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* See also angleFixTest, angleTest, mathTests. */ + +int main(void) +{ + bool error = false; + + if (!ArMath::angleBetween(60, 30, 90)) + { + error = true; + printf("Failed 60 reported not between 30, 90\n"); + } + if (ArMath::angleBetween(120, 30, 90)) + { + error = true; + printf("Failed 120 reported between 30, 90\n"); + } + + if (!ArMath::angleBetween(-60, -90, -30)) + { + error = true; + printf("Failed -60 reported not between -30, -90\n"); + } + if (ArMath::angleBetween(-120, -90, -30)) + { + error = true; + printf("Failed -120 reported between -30, -90\n"); + } + + if (!ArMath::angleBetween(-120, 90, -90)) + { + error = true; + printf("Failed -120 reported not between 90, -90\n"); + } + if (!ArMath::angleBetween(120, 90, -90)) + { + error = true; + printf("Failed 120 reported not between 90, -90\n"); + } + if (ArMath::angleBetween(0, 90, -90)) + { + error = true; + printf("Failed 0 reported between 90, -90\n"); + } + + if (!ArMath::angleBetween(-30, -90, 90)) + { + error = true; + printf("Failed -30 reported not between -90, 90\n"); + } + if (!ArMath::angleBetween(30, -90, 90)) + { + error = true; + printf("Failed 30 reported not between -90, 90\n"); + } + + if (ArMath::angleBetween(180, -90, 90)) + { + error = true; + printf("Failed 180 reported between -90, 90\n"); + } + + if (!error) + printf("\nTest ran successfully!\n"); + else + printf("\nTest failed!\n"); +} diff --git a/Legacy/Aria/tests/angleFixTest.cpp b/Legacy/Aria/tests/angleFixTest.cpp new file mode 100644 index 0000000..db608c1 --- /dev/null +++ b/Legacy/Aria/tests/angleFixTest.cpp @@ -0,0 +1,77 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* See also angleBetweenTest, angleTest, mathTests. */ + +void fixTest(double th, double sth) +{ + double cth; + if ((cth = ArMath::fixAngle(th)) == sth) + printf("GOOD fix of %f resulted in %f\n", th, cth); + else + { + printf("bad fix of %f resulted in %f instead of %f\n", th, cth, sth); + printf("Failed tests\n"); + exit(1); + } +} + +int main(void) +{ + + printf("Some tests of fixAngle\n"); + fixTest(405, 45); + fixTest(-405, -45); + fixTest(450, 90); + fixTest(-450, -90); + fixTest(495, 135); + fixTest(-495, -135); + fixTest(540, 180); + fixTest(-540, 180); + fixTest(585, -135); + fixTest(-585, 135); + fixTest(630, -90); + fixTest(-630, 90); + fixTest(675, -45); + fixTest(-675, 45); + fixTest(720, 0); + fixTest(-720, 0); + fixTest(765, 45); + fixTest(-765, -45); + + printf("\n"); + fixTest(225, -135); + fixTest(-225, 135); + fixTest(315, -45); + fixTest(-315, 45); + fixTest(270, -90); + fixTest(-270, 90); + fixTest(-180, 180); + fixTest(180, 180); + + printf("\nPassed all tests!!\n"); +} diff --git a/Legacy/Aria/tests/angleTest.cpp b/Legacy/Aria/tests/angleTest.cpp new file mode 100644 index 0000000..9881c23 --- /dev/null +++ b/Legacy/Aria/tests/angleTest.cpp @@ -0,0 +1,188 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* See also angleBetweenTest, angleFixTest, mathTests. */ + +bool findDifference(ArPose origin, ArPose sonar, double th, + double dist) +{ + double cth, cdist; + cth = ArMath::subAngle(origin.findAngleTo(sonar), origin.getTh()); + cdist = origin.findDistanceTo(sonar); + if (ArMath::fabs(th - cth) < .1 && + ArMath::fabs(cdist - dist) < .1) + { + //printf("GOOD got %7.2f %6.0f\n", cth, cdist); + return true; + } + else + { + printf("bad wanted %.2f %.0f got ", th, dist); + printf("%.2f %.0f origin %.0f %.0f %.0f sonar %.0f %.0f %.0f angleTo %.0f\n", + cth, cdist, origin.getX(), origin.getY(), + origin.getTh(), sonar.getX(), sonar.getY(), sonar.getTh(), + origin.findAngleTo(sonar)); + /* + (sonar.getY() - origin.getY()), (sonar.getX() - origin.getX()), + ArMath::radToDeg(atan2(sonar.getY() - origin.getY(), sonar.getX() - origin.getX()))); + */ + + printf("Failed tests!\n"); + return false; + } + +} + +void testSet(double x1, double y1, double x2, double y2, double initial, + double distance) +{ + double add; + + ArPose origin; + ArPose sonar(x2, y2); + + for (add = -135; add <= 180; add += 45) + { + origin.setPose(x1, y1, add); + if (!findDifference(origin, sonar, ArMath::subAngle(initial, add), + distance)) + { + printf("Failed that one from (%.0f, %.0f) (%.0f, %.0f) %3.0f %4.0f\n", + x1, y1, x2, y2, initial, distance); + exit(0); + } + } + +} + +int main(void) +{ + ArPose origin; + ArPose sonar; + double halfDiag = sqrt(500 * 500 + 500 * 500); + double diag = sqrt(1000 * 1000 + 1000 * 1000); + + origin.setPose(0, 0, 0); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 90, 1000); + + origin.setPose(0, 0, 45); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 45, 1000); + + origin.setPose(0, 0, 90); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 0, 1000); + + origin.setPose(0, 0, 135); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, -45, 1000); + + origin.setPose(0, 0, 180); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, -90, 1000); + + origin.setPose(0, 0, -135); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, -135, 1000); + + origin.setPose(0, 0, -90); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 180, 1000); + + origin.setPose(0, 0, -45); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 135, 1000); + + //printf("\n"); + + origin.setPose(500, 500, 0); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 135, halfDiag); + + origin.setPose(500, 500, 45); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 90, halfDiag); + + origin.setPose(500, 500, 90); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 45, halfDiag); + + origin.setPose(500, 500, 135); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 0, halfDiag); + + origin.setPose(500, 500, 180); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, -45, halfDiag); + + origin.setPose(500, 500, -135); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, -90, halfDiag); + + origin.setPose(500, 500, -90); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, -135, halfDiag); + + origin.setPose(500, 500, -45); + sonar.setPose(0, 1000, 0); + findDifference(origin, sonar, 180, halfDiag); + + + testSet(0, 0, 0, 0, 0, 0); + testSet(0, 0, 0, 1000, 90, 1000); + testSet(0, 0, 1000, 1000, 45, diag); + testSet(0, 0, 1000, 0, 0, 1000); + testSet(0, 0, 500, 500, 45, halfDiag); + + testSet(0, 1000, 0, 0, -90, 1000); + testSet(0, 1000, 0, 1000, 0, 0); + testSet(0, 1000, 1000, 1000, 0, 1000); + testSet(0, 1000, 1000, 0, -45, diag); + testSet(0, 1000, 500, 500, -45, halfDiag); + + testSet(1000, 1000, 0, 0, -135, diag); + testSet(1000, 1000, 0, 1000, -180, 1000); + testSet(1000, 1000, 1000, 1000, 0, 0); + testSet(1000, 1000, 1000, 0, -90, 1000); + testSet(1000, 1000, 500, 500, -135, halfDiag); + + testSet(1000, 0, 0, 0, 180, 1000); + testSet(1000, 0, 0, 1000, 135, diag); + testSet(1000, 0, 1000, 1000, 90, 1000); + testSet(1000, 0, 1000, 0, 0, 0); + testSet(1000, 0, 500, 500, 135, halfDiag); + + testSet(500, 500, 0, 0, -135, halfDiag); + testSet(500, 500, 0, 1000, 135, halfDiag); + testSet(500, 500, 1000, 1000, 45, halfDiag); + testSet(500, 500, 1000, 0, -45, halfDiag); + testSet(500, 500, 500, 500, 0, 0); + + printf("Passed all tests!\n"); + return 0; +} diff --git a/Legacy/Aria/tests/asyncConnectTest.cpp b/Legacy/Aria/tests/asyncConnectTest.cpp new file mode 100644 index 0000000..abda20d --- /dev/null +++ b/Legacy/Aria/tests/asyncConnectTest.cpp @@ -0,0 +1,167 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int successes = 0, failures = 0; + int action; + bool exitOnFailure = true; + + ArSerialConnection con; + ArRobot robot; + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + srand(time(NULL)); + robot.runAsync(false); +// if (!exitOnFailure) +// ArLog::init(ArLog::None, ArLog::Terse); + //else + //ArLog::init(ArLog::None); + while (1) + { + if (con.getStatus() != ArDeviceConnection::STATUS_OPEN && + (ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + ++failures; + if (exitOnFailure) + { + printf("Failed\n"); + exit(0); + } + else + { + ArUtil::sleep(200); + robot.unlock(); + continue; + } + } + robot.lock(); + robot.setDeviceConnection(&con); + robot.unlock(); + ArUtil::sleep((rand() % 5) * 100); + if (robot.asyncConnect()) + { + robot.waitForConnectOrConnFail(); + robot.lock(); + if (!robot.isConnected()) + { + if (exitOnFailure) + { + printf("Failed after %d tries.\n", successes); + exit(0); + } + printf("Failed to connect successfully"); + ++failures; + } + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::SOUNDTOG, 0); + //robot.comInt(ArCommands::PLAYLIST, 0); + robot.comInt(ArCommands::ENCODER, 1); + ArUtil::sleep(((rand() % 20) + 3) * 100); + ++successes; + // okay, now try to leave it in a messed up state + action = rand() % 8; + robot.dropConnection(); + switch (action) { + case 0: + printf("Discon 0 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(0); + break; + case 1: + printf("Discon 1 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(0); + ArUtil::sleep(100); + robot.com(1); + break; + case 2: + printf("Discon 2 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(0); + ArUtil::sleep(100); + robot.com(1); + ArUtil::sleep(100); + robot.com(2); + break; + case 3: + printf("Discon 10 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(10); + break; + case 4: + printf("Discon "); + robot.disconnect(); + break; + default: + printf("Leave "); + break; + } + robot.unlock(); + } + else + { + if (exitOnFailure) + { + printf("Failed after %d tries.\n", successes); + exit(0); + } + printf("Failed to start connect "); + ++failures; + } + if ((rand() % 2) == 0) + { + printf(" ! RadioDisconnect ! "); + con.write("|||\15", strlen("!!!\15")); + + ArUtil::sleep(100); + con.write("WMD\15", strlen("WMD\15")); + ArUtil::sleep(200); + } + if ((rand() % 2) == 0) + { + printf(" ! ClosePort !\n"); + con.close(); + } + else + printf("\n"); + printf("#### %d successes %d failures, %% %.2f success\n", successes, failures, + (float)successes/(float)(successes+failures)*100); + + ArUtil::sleep((rand() % 2)* 1000); + } + return 0; +} + diff --git a/Legacy/Aria/tests/auxSerialTest.cpp b/Legacy/Aria/tests/auxSerialTest.cpp new file mode 100644 index 0000000..6085631 --- /dev/null +++ b/Legacy/Aria/tests/auxSerialTest.cpp @@ -0,0 +1,166 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This demo starts up the robot in its own thread, then runs a bunch of the + direct motion commands... note that if you want to stop direct motion + commands and let actions take over, you should use clearDirectMotion, see + the docs for details. Also note how it locks the robot before doing anything + with the robot, then unlocks it when done, this is vital for threaded code. + You shouldn't really use threads if you don't understand them or don't need + them. +*/ + +/* + This is a connection handler, fairly simple, but quite useful, esp when + the robot is running in another thread. Its not really needed here + since blockingConnect is used. But it'd still be useful if there is an + error after connected +*/ +class ConnHandler +{ +public: + // Constructor + ConnHandler(ArRobot *robot); + // Destructor, its just empty + ~ConnHandler(void) {} + // to be called if the connection was made + void connected(void); + // to call if the connection failed + void connFail(void); + // to be called if the connection was lost + void disconnected(void); +protected: + // robot pointer + ArRobot *myRobot; + // the functor callbacks + ArFunctorC myConnectedCB; + ArFunctorC myConnFailCB; + ArFunctorC myDisconnectedCB; +}; + +/* + The constructor, note its use of contructor chaining to initalize the + callbacks. +*/ +ConnHandler::ConnHandler(ArRobot *robot) : + myConnectedCB(this, &ConnHandler::connected), + myConnFailCB(this, &ConnHandler::connFail), + myDisconnectedCB(this, &ConnHandler::disconnected) + +{ + // set the robot poitner + myRobot = robot; + + // add the callbacks to the robot + myRobot->addConnectCB(&myConnectedCB, ArListPos::FIRST); + myRobot->addFailedConnectCB(&myConnFailCB, ArListPos::FIRST); + myRobot->addDisconnectNormallyCB(&myDisconnectedCB, ArListPos::FIRST); + myRobot->addDisconnectOnErrorCB(&myDisconnectedCB, ArListPos::FIRST); +} + +// just exit if the connection failed +void ConnHandler::connFail(void) +{ + printf("Failed to connect.\n"); + myRobot->stopRunning(); + Aria::shutdown(); + return; +} + +// turn on motors, and off sonar, and off amigobot sounds, when connected +void ConnHandler::connected(void) +{ + printf("Connected\n"); + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::ENABLE, 1); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +// lost connection, so just exit +void ConnHandler::disconnected(void) +{ + printf("Lost connection\n"); + exit(0); +} + + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + ArTime start; + + // connection to the robot + ArSerialConnection con; + // the robot + ArRobot robot; + // the connection handler from above + ConnHandler ch(&robot); + + // init area with a dedicated signal handling thread + Aria::init(Aria::SIGHANDLE_THREAD); + + // open the connection with the defaults, exit if failed + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + // set the robots connection + robot.setDeviceConnection(&con); + // try to connect, if we fail, the connection handler should bail + if (!robot.blockingConnect()) + { + // this should have been taken care of by the connection handler + // but just in case + printf( + "asyncConnect failed because robot is not running in its own thread.\n"); + Aria::shutdown(); + return 1; + } + // run the robot in its own thread, so it gets and processes packets and such + robot.runAsync(false); + + int i; + while (Aria::getRunning()) + { + robot.lock(); + robot.comStr(ArCommands::TTY3, "1234567890"); + robot.unlock(); + } + + robot.disconnect(); + // shutdown and ge tout + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/batteryTest.cpp b/Legacy/Aria/tests/batteryTest.cpp new file mode 100644 index 0000000..6022edd --- /dev/null +++ b/Legacy/Aria/tests/batteryTest.cpp @@ -0,0 +1,107 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +// number of minutes to wait between logs +int numMins = 1; +double shutdownVoltage = 11.0; + +ArRobot *robot; +ArTime startTime; +ArTime lastOut; +FILE *outFile; +bool first = true; + +void batteryLogger(void) +{ + if (outFile == NULL) + { + outFile = ArUtil::fopen("batteryVoltage.txt", "w+"); + startTime.setToNow(); + if (outFile == NULL) + { + printf("Could not open file. Exiting.\n"); + robot->disconnect(); + robot->stopRunning(); + Aria::shutdown(); + exit(0); + } + printf("File opened\n"); + } + if (outFile != NULL) + { + if (lastOut.secSince() > 60 * numMins || first) + { + if (fprintf(outFile, "%ld %.2f\n", startTime.secSince()/60, robot->getBatteryVoltage()) <= 0) + printf("PROBLEM writing to file\n"); + printf("%ld %.2f\n", startTime.secSince()/60, robot->getBatteryVoltage()); + fflush(outFile); + lastOut.setToNow(); + first = false; + } + } +#ifndef WIN32 + if (startTime.secSince() > 30 && + robot->getBatteryVoltage() < shutdownVoltage) + system("halt\n"); +#endif + +} + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + + ArGlobalFunctor batteryLoggerCB(&batteryLogger); + ArSerialConnection con; + Aria::init(); + robot = new ArRobot; + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + robot->setDeviceConnection(&con); + if (!robot->blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + exit(0); + } + robot->addUserTask("Battery Logger", 50, &batteryLoggerCB); + robot->comInt(ArCommands::SONAR, 0); + robot->comInt(ArCommands::SOUNDTOG, 0); + + robot->run(true); + Aria::shutdown(); + +} + diff --git a/Legacy/Aria/tests/callbackTest.cpp b/Legacy/Aria/tests/callbackTest.cpp new file mode 100644 index 0000000..c242b4e --- /dev/null +++ b/Legacy/Aria/tests/callbackTest.cpp @@ -0,0 +1,96 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class CBTest +{ +public: + CBTest(void) {}; + ~CBTest(void) {}; + void connected(void) { printf("Connected\n"); } + void disconnected(void) { printf("Disconnected\n"); } + void disconnectedError(void) { printf("Disconnected Error\n"); } + void failedConnect(void) { printf("Failed Connect\n"); } + +}; + +int main(void) +{ + int ret; + std::string str; + CBTest cbTest; + + ArFunctorC connectCB(&cbTest, &CBTest::connected); + ArFunctorC failedConnectCB(&cbTest, &CBTest::failedConnect); + ArFunctorC disconnectCB(&cbTest, &CBTest::disconnected); + ArFunctorC disconnectErrorCB(&cbTest, &CBTest::disconnectedError); + + ArSerialConnection con; + ArRobot robot; + + printf("If a robot is attached to your port you should see:\n"); + printf("Failed connect, Connected, Disconnected Error, Connected, Disconnected\n"); + printf("If no robot is attached you should see:\n"); + printf("Failed connect, Failed connect, Failed connect\n"); + printf("-------------------------------------------------------\n"); + ArLog::init(ArLog::None, ArLog::Terse); + + srand(time(NULL)); + + robot.setDeviceConnection(&con); + robot.addConnectCB(&connectCB, ArListPos::FIRST); + robot.addFailedConnectCB(&failedConnectCB, ArListPos::FIRST); + robot.addDisconnectNormallyCB(&disconnectCB, ArListPos::FIRST); + robot.addDisconnectOnErrorCB(&disconnectErrorCB, ArListPos::FIRST); + + // this should fail since there isn't an open port yet + robot.blockingConnect(); + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + robot.blockingConnect(); + + con.close(); + robot.loopOnce(); + + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + robot.blockingConnect(); + robot.disconnect(); + + exit(0); + +} diff --git a/Legacy/Aria/tests/chargeTest.cpp b/Legacy/Aria/tests/chargeTest.cpp new file mode 100644 index 0000000..c21a8c5 --- /dev/null +++ b/Legacy/Aria/tests/chargeTest.cpp @@ -0,0 +1,88 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +ArRobot *robot; + +FILE *file; +ArTime lastFiled; + +void printer(void) +{ + printf("\r%.1f, %.2f", robot->getBatteryVoltage(), + robot->getIOAnalogVoltage(4)); + fflush(stdout); + if (file != NULL && lastFiled.mSecSince() > 1000) + { + fprintf(file, "\r%.1f, %.2f\n", robot->getBatteryVoltage(), + robot->getIOAnalogVoltage(4)); + lastFiled.setToNow(); + fflush(file); + } +} + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int i; + ArSensorReading *reading; + + ArGlobalFunctor printerCB(&printer); + ArSerialConnection con; + Aria::init(); + robot = new ArRobot; + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + robot->setDeviceConnection(&con); + if (!robot->blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + exit(0); + } + + file = ArUtil::fopen("chargeLog.txt", "w+"); + lastFiled.setToNow(); + robot->comInt(ArCommands::IOREQUEST, 2); + + robot->addUserTask("printer", 50, &printerCB); + robot->comInt(ArCommands::SONAR, 1); + robot->comInt(ArCommands::SOUNDTOG, 0); + + + + robot->run(true); + Aria::shutdown(); + +} diff --git a/Legacy/Aria/tests/compassDirect.cpp b/Legacy/Aria/tests/compassDirect.cpp new file mode 100644 index 0000000..732ae2a --- /dev/null +++ b/Legacy/Aria/tests/compassDirect.cpp @@ -0,0 +1,65 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "Aria.h" +#include "ArTCMCompassDirect.h" +#include + +void compassCB(double heading) +{ + fprintf(stderr, "compass callback got heading %f\n", heading); + assert(heading >= -180 && heading <= 180); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArTCMCompassDirect compass("/dev/ttyS0"); + if(!compass.blockingConnect()) + { + puts("Error connecting!"); + return -1; + } + compass.addHeadingDataCallback(new ArGlobalFunctor1(&compassCB)); + ArTime printTime; + printTime.setToNow(); + while(true) + { + if(compass.read() < 0) + { + puts("Error reading!"); + return -1; + } + if(printTime.secSince() >= 5) + { + printf("%3.6f\n", compass.getHeading()); + fflush(stdout); + printTime.setToNow(); + } + assert(compass.getHeading() >= -180 && compass.getHeading() <= 180); + ArUtil::sleep(200); + } +} diff --git a/Legacy/Aria/tests/compassDirectCalib.cpp b/Legacy/Aria/tests/compassDirectCalib.cpp new file mode 100644 index 0000000..c0f1bfa --- /dev/null +++ b/Legacy/Aria/tests/compassDirectCalib.cpp @@ -0,0 +1,46 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "Aria.h" +#include "ArKeyHandler.h" +#include "ArTCMCompassDirect.h" + + +int main(int argc, char **argv) +{ + Aria::init(); + ArTCMCompassDirect compass("/dev/ttyS0"); + Aria::addExitCallback(new ArFunctorC(&compass, &ArTCMCompassDirect::commandStopCalibration), 1); + if(!compass.blockingConnect()) + { + puts("Error connecting to compass!"); + return -1; + } + printf("Calibrating compass. Rotate it slowly, making two full revolutions or more, then exit.\n"); + compass.commandUserCalibration(); + while(true) + ArUtil::sleep(1000); +} diff --git a/Legacy/Aria/tests/configSectionTest-vc2008.vcproj b/Legacy/Aria/tests/configSectionTest-vc2008.vcproj new file mode 100644 index 0000000..af4a96c --- /dev/null +++ b/Legacy/Aria/tests/configSectionTest-vc2008.vcproj @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/configSectionTest.cpp b/Legacy/Aria/tests/configSectionTest.cpp new file mode 100644 index 0000000..6f6dafe --- /dev/null +++ b/Legacy/Aria/tests/configSectionTest.cpp @@ -0,0 +1,196 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class ConfigTester +{ +public: + ConfigTester(const char *section); + virtual ~ConfigTester(); + bool processFile(void); + + std::string mySection; + int myInt; + double myDouble; + bool myBool; + ArPose myPose; + char myString[512]; + + // stuff for testing the functor ones + std::list myList; + std::list myArgList; + bool listAdder(ArArgumentBuilder *builder) + { myList.push_front(builder->getFullString()); + printf("Added %s\n", builder->getFullString()); return true; } + const std::list *getList(void) + { + std::list::iterator argIt; + std::list::iterator listIt; + ArArgumentBuilder *builder; + + if (myArgList.size() != 0) + { + while ((argIt = myArgList.begin()) != myArgList.end()) + { + delete (*argIt); + myArgList.pop_front(); + } + } + for (listIt = myList.begin(); listIt != myList.end(); listIt++) + { + builder = new ArArgumentBuilder; + builder->add((*listIt).c_str()); + myArgList.push_front(builder); + } + return &myArgList; + } + ArRetFunctor1C mySetFunctor; + ArRetFunctorC *, ConfigTester> myGetFunctor; + +}; + +ConfigTester::ConfigTester(const char *section) : + mySetFunctor(this, &ConfigTester::listAdder), + myGetFunctor(this, &ConfigTester::getList) +{ + myInt = 42; + myDouble = 42; + myBool = true; + myPose.setPose(42, -42.3, 21.21); + strcpy(myString, "42"); + mySection = section; + + Aria::getConfig()->addParam( + ArConfigArg("int", &myInt, "fun things!"), section);//, 0, 300)); + Aria::getConfig()->addParam( + ArConfigArg("double", &myDouble, "fun things double!"), section);//, 0, 2300)); + Aria::getConfig()->addParam( + ArConfigArg("bool", &myBool, "fun things bool!"), section); + Aria::getConfig()->addParam( + ArConfigArg("string", myString, "fun things string!", sizeof(myString)), section); + Aria::getConfig()->addParam( + ArConfigArg("functor", &mySetFunctor, &myGetFunctor, "fun functor thing!"), section); +} + +ConfigTester::~ConfigTester() +{ + std::list::iterator argIt; + if (myArgList.size() != 0) + { + while ((argIt = myArgList.begin()) != myArgList.end()) + { + delete (*argIt); + myArgList.pop_front(); + } + } +} + +bool ConfigTester::processFile(void) +{ + printf("%s: int %d double %g bool %s string '%s'\n", + mySection.c_str(), myInt, myDouble, + ArUtil::convertBool(myBool), + myString); + return true; +} + +bool func100(void) +{ + printf("100\n"); + return true; +} + +bool func90a(void) +{ + printf("90a\n"); + return true; +} + +bool func90b(void) +{ + printf("90b\n"); + return true; +} + +bool func50(void) +{ + printf("50\n"); + return true; +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Normal); + + ArArgumentParser parser(&argc, argv); + ConfigTester tester1("one"); + ConfigTester tester2("two"); + ConfigTester tester3("three"); + bool ret; + Aria::getConfig()->writeFile("configBefore.txt"); + char errorBuffer[512]; + errorBuffer[0] = '\0'; + + + ArGlobalRetFunctor func100cb(&func100); + ArGlobalRetFunctor func90acb(&func90a); + ArGlobalRetFunctor func90bcb(&func90b); + ArGlobalRetFunctor func50cb(&func50); + + func100cb.setName("100cb"); + func90bcb.setName("bcb"); + func50cb.setName("50cb"); + + Aria::getConfig()->addProcessFileCB(&func100cb, 100); + Aria::getConfig()->addProcessFileCB(&func90acb, 90); + Aria::getConfig()->addProcessFileCB(&func90bcb, 90); + Aria::getConfig()->addProcessFileCB(&func50cb, 50); + + std::list sectionsToParse; + sectionsToParse.push_back("two"); + sectionsToParse.push_back("three"); + + ArLog::init(ArLog::StdOut, ArLog::Verbose); + Aria::getConfig()->useArgumentParser(&parser); + ret = Aria::getConfig()->parseFile( + "configTest.txt", false, true, errorBuffer, + sizeof(errorBuffer), §ionsToParse); + if (ret) + { + printf("\nSucceeded test\n"); + } + else + { + printf("\nFailed config test because '%s'\n\n", errorBuffer); + } + + Aria::getConfig()->writeFile("configAfter.txt"); + exit(0); +} + + + diff --git a/Legacy/Aria/tests/configTest-vc2008.vcproj b/Legacy/Aria/tests/configTest-vc2008.vcproj new file mode 100644 index 0000000..5d33300 --- /dev/null +++ b/Legacy/Aria/tests/configTest-vc2008.vcproj @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/configTest.cpp b/Legacy/Aria/tests/configTest.cpp new file mode 100644 index 0000000..b9a7f6e --- /dev/null +++ b/Legacy/Aria/tests/configTest.cpp @@ -0,0 +1,181 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class ConfigTester : public ArConfig +{ +public: + ConfigTester(); + virtual ~ConfigTester(); + virtual bool processFile(void); + int myInt; + double myDouble; + bool myBool; + ArPose myPose; + char myString[512]; + + // stuff for testing the functor ones + std::list myList; + std::list myArgList; + bool listAdder(ArArgumentBuilder *builder) + { myList.push_front(builder->getFullString()); + printf("Added %s\n", builder->getFullString()); return true; } + const std::list *getList(void) + { + std::list::iterator argIt; + std::list::iterator listIt; + ArArgumentBuilder *builder; + + if (myArgList.size() != 0) + { + while ((argIt = myArgList.begin()) != myArgList.end()) + { + delete (*argIt); + myArgList.pop_front(); + } + } + for (listIt = myList.begin(); listIt != myList.end(); listIt++) + { + builder = new ArArgumentBuilder; + builder->add((*listIt).c_str()); + myArgList.push_front(builder); + } + return &myArgList; + } + ArRetFunctor1C mySetFunctor; + ArRetFunctorC *, ConfigTester> myGetFunctor; + +}; + +ConfigTester::ConfigTester() : + mySetFunctor(this, &ConfigTester::listAdder), + myGetFunctor(this, &ConfigTester::getList) +{ + myInt = 32; + myDouble = 239.394; + myBool = true; + myPose.setPose(42, -42.3, 21.21); + strcpy(myString, "happy fun string will begin to smoke"); + + addParam(ArConfigArg("int", &myInt, "fun things!"), "fuah");//, 0, 300)); + addParam(ArConfigArg("double", &myDouble, "fun things double!"));//, 0, 2300)); + addParam(ArConfigArg("bool", &myBool, "fun things bool!")); + addParam(ArConfigArg("string", myString, "fun things string!", sizeof(myString))); + addParam(ArConfigArg("functor", &mySetFunctor, &myGetFunctor, "fun functor thing!")); +} + +ConfigTester::~ConfigTester() +{ + std::list::iterator argIt; + if (myArgList.size() != 0) + { + while ((argIt = myArgList.begin()) != myArgList.end()) + { + delete (*argIt); + myArgList.pop_front(); + } + } +} + +bool ConfigTester::processFile(void) +{ + printf("Processed \n"); + return true; +} + +bool func100(void) +{ + printf("100\n"); + return true; +} + +bool func90a(void) +{ + printf("90a\n"); + return true; +} + +bool func90b(void) +{ + printf("90b\n"); + return true; +} + +bool func50(void) +{ + printf("50\n"); + return true; +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Verbose); + + ArArgumentParser parser(&argc, argv); + ConfigTester tester; + bool ret; + tester.writeFile("configBefore.txt"); + char errorBuffer[512]; + errorBuffer[0] = '\0'; + + + ArGlobalRetFunctor func100cb(&func100); + ArGlobalRetFunctor func90acb(&func90a); + ArGlobalRetFunctor func90bcb(&func90b); + ArGlobalRetFunctor func50cb(&func50); + + func100cb.setName("100cb"); + func90bcb.setName("bcb"); + func50cb.setName("50cb"); + + tester.addProcessFileCB(&func100cb, 100); + tester.addProcessFileCB(&func90acb, 90); + tester.addProcessFileCB(&func90bcb, 90); + tester.addProcessFileCB(&func50cb, 50); + + tester.useArgumentParser(&parser); + ret = tester.parseFile("configTest.txt", false, true, errorBuffer, + sizeof(errorBuffer)); + if (ret) + { + printf("int %d double %g bool %s string '%s'\n", + tester.myInt, tester.myDouble, + ArUtil::convertBool(tester.myBool), + tester.myString + ); + } + else + { + printf("\nFailed config test because '%s'\n\n", errorBuffer); + } + + tester.writeFile("configAfter.txt"); + exit(0); +} + + + diff --git a/Legacy/Aria/tests/configTest.txt b/Legacy/Aria/tests/configTest.txt new file mode 100644 index 0000000..ad01523 --- /dev/null +++ b/Legacy/Aria/tests/configTest.txt @@ -0,0 +1,8 @@ +bool false +int 20 +double 230 +pose 30 302 30 +string this is a fun wierd string that means something to someone maybe +functor 1 boy oh boy +functor 2 is this such a fun +functor 3 string thing to do \ No newline at end of file diff --git a/Legacy/Aria/tests/connectTest.cpp b/Legacy/Aria/tests/connectTest.cpp new file mode 100644 index 0000000..4393cba --- /dev/null +++ b/Legacy/Aria/tests/connectTest.cpp @@ -0,0 +1,150 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int successes = 0, failures = 0; + int action; + bool exitOnFailure = true; + + ArSerialConnection con; + ArRobot robot; + + srand(time(NULL)); +// if (!exitOnFailure) +// ArLog::init(ArLog::None, ArLog::Terse); + //else + //ArLog::init(ArLog::None); + while (1) + { + if (con.getStatus() != ArDeviceConnection::STATUS_OPEN && + (ret = con.open(ArUtil::COM2)) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + ++failures; + if (exitOnFailure) + { + printf("Failed\n"); + exit(0); + } + else + { + ArUtil::sleep(200); + continue; + } + } + robot.setDeviceConnection(&con); + ArUtil::sleep((rand() % 5) * 100); + if (robot.blockingConnect()) + { + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::SOUNDTOG, 0); + robot.comInt(ArCommands::PLAYLIST, 0); + robot.comInt(ArCommands::ENCODER, 1); + ArUtil::sleep((rand() % 20) * 100); + ++successes; + // okay, now try to leave it in a messed up state + action = rand() % 8; + switch (action) { + case 0: + printf("Discon 0 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(0); + break; + case 1: + printf("Discon 1 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(0); + ArUtil::sleep(100); + robot.com(1); + break; + case 2: + printf("Discon 2 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(0); + ArUtil::sleep(100); + robot.com(1); + ArUtil::sleep(100); + robot.com(2); + break; + case 3: + printf("Discon 10 "); + robot.disconnect(); + ArUtil::sleep(100); + robot.com(10); + break; + case 4: + printf("Discon "); + robot.disconnect(); + break; + default: + printf("Leave "); + break; + } + } + else + { + if (exitOnFailure) + { + printf("Failed after %d tries.\n", successes); + exit(0); + } + printf("Failed "); + ++failures; + } + if ((rand() % 2) == 0) + { + printf(" ! RadioDisconnect ! "); + con.write("|||\15", strlen("!!!\15")); + + ArUtil::sleep(100); + con.write("WMD\15", strlen("WMD\15")); + ArUtil::sleep(200); + } + if ((rand() % 2) == 0) + { + printf(" ! ClosePort !\n"); + con.close(); + } + else + printf("\n"); + printf("#### %d successes %d failures, %% %.2f success\n", successes, failures, + (float)successes/(float)(successes+failures)*100); + + + ArUtil::sleep((rand() % 2)* 1000); + } + return 0; +} + diff --git a/Legacy/Aria/tests/connectionTest.cpp b/Legacy/Aria/tests/connectionTest.cpp new file mode 100644 index 0000000..f174c76 --- /dev/null +++ b/Legacy/Aria/tests/connectionTest.cpp @@ -0,0 +1,173 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArTime requestTime; +int n = 0; +int vel = 0; +int ABOUT_RIGHT = 5; +int numPacketsGotten = 0; +int numPacketsMissed = 0; + +void userTask(ArRobot *robot) +{ + int timeTaken = (requestTime.mSecSince() - + robot->getIOPacketTime().mSecSince()); + + if (timeTaken > 500) + { + ArLog::log(ArLog::Terse, "\nits been: %ld giving up and trying again (missed %d got %d)", timeTaken, numPacketsMissed, numPacketsGotten); + numPacketsMissed++; + robot->comInt(ArCommands::IOREQUEST, 1); + requestTime.setToNow(); + } + + if (robot->getIOPacketTime().mSecSince() > requestTime.mSecSince()) + return; + else + { + if (timeTaken > 30) + { + ArLog::log(ArLog::Terse, "\nlast packet time: %ld", timeTaken); + } + printf("\r%d packets gotten %d missed ", numPacketsGotten, + numPacketsMissed); + numPacketsGotten++; + fflush(stdout); + robot->comInt(ArCommands::IOREQUEST, 1); + requestTime.setToNow(); + } +} + +int main(int argc, char **argv) +{ + // robot + ArRobot robot; + // the laser + ArSick sick; + + + // sonar, must be added to the robot + //ArSonarDevice sonar; + + // the actions we'll use to wander + // recover from stalls + //ArActionStallRecover recover; + // react to bumpers + //ArActionBumpers bumpers; + // limiter for close obstacles + ArActionLimiterForwards limiter("speed limiter near", 1600, 0, 0, 1.3); + // limiter for far away obstacles + //ArActionLimiterForwards limiterFar("speed limiter near", 300, 1000, 450, 1.1); + //ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 600, 1.1); + // limiter for the table sensors + //ArActionLimiterTableSensor tableLimiter; + // actually move the robot + ArActionConstantVelocity constantVelocity("Constant Velocity", 1500); + // turn the orbot if its slowed down + ArActionTurn turn; + + // mandatory init + Aria::init(); + + // Parse all our args + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + exit(1); + } + + // add the sonar to the robot + //robot.addRangeDevice(&sonar); + // add the laser to the robot + robot.addRangeDevice(&sick); + + // try to connect, if we fail exit + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::SONAR, 0); + + // turn on the motors, turn off amigobot sounds + //robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions + //robot.addAction(&recover, 100); + //robot.addAction(&bumpers, 75); + robot.addAction(&limiter, 49); + //robot.addAction(&limiter, 48); + //robot.addAction(&tableLimiter, 50); + robot.addAction(&turn, 30); + robot.addAction(&constantVelocity, 20); + + robot.setStateReflectionRefreshTime(50); + limiter.activate(); + turn.activate(); + constantVelocity.activate(); + + robot.clearDirectMotion(); + //robot.setStateReflectionRefreshTime(50); + robot.setRotVelMax(50); + robot.setTransAccel(1500); + robot.setTransDecel(100); + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + connector.setupLaser(&sick); + + // now that we're connected to the robot, connect to the laser + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + sick.lockDevice(); + sick.setMinRange(250); + sick.unlockDevice(); + robot.lock(); + ArGlobalFunctor1 userTaskCB(&userTask, &robot); + robot.addUserTask("iotest", 100, &userTaskCB); + requestTime.setToNow(); + robot.comInt(ArCommands::IOREQUEST, 1); + robot.comInt(ArCommands::ENABLE, 1); + robot.unlock(); + + robot.waitForRunExit(); + // now exit + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/dcdTest.cpp b/Legacy/Aria/tests/dcdTest.cpp new file mode 100644 index 0000000..da25668 --- /dev/null +++ b/Legacy/Aria/tests/dcdTest.cpp @@ -0,0 +1,45 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + + ArSerialConnection serConn; + + if (serConn.open(ArUtil::COM1) != 0) + { + printf("Could not open serial port\n"); + exit(1); + } + + while (1) + { + printf("\rDCD %d", serConn.getDCD()); + fflush(stdout); + } + return 0; +} diff --git a/Legacy/Aria/tests/deleteArgs.cpp b/Legacy/Aria/tests/deleteArgs.cpp new file mode 100644 index 0000000..96a0b10 --- /dev/null +++ b/Legacy/Aria/tests/deleteArgs.cpp @@ -0,0 +1,130 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +// Pass command-line arguments to this program to really test it + +//#define DO_DELETE 1 +//#define PARSER 1 +//#define BUILDER 1 +#define BUILDER_ARGV 1 +//#define DELETE_BEFORE_PARSE 1 // defining this might make it crash (but only if the OS NULLS out the argument builder or parser's internal pointers, Windows might do this in debug mode for instance) + +int main(int argc, char **argv) +{ + ArRobot robot; + Aria::init(); +#if defined(PARSER) + ArArgumentParser *parser = new ArArgumentParser(&argc, argv); + puts("Creating ArSimpleConnector using parser."); + ArSimpleConnector connector(parser); +#elif defined(BUILDER) + ArArgumentBuilder *builder = new ArArgumentBuilder(); + builder->addStrings(argc, argv); + puts("Creating ArSimpleConnector using builder."); + ArSimpleConnector connector(builder); +#elif defined(BUILDER_ARGV) + ArArgumentBuilder *builder = new ArArgumentBuilder(); + builder->addStrings(argc, argv); + int c = builder->getArgc(); + puts("Creating ArSimpleConnector using (int *argc, char **argv) from builder."); + printf("Got argv pointer 0x%x from builder.\n", builder->getArgv()); + ArSimpleConnector connector(&c, builder->getArgv()); +#else + #error Must define one of PARSER, BUILDER, BUILDER_ARGV +#endif + +#ifndef DELETE_BEFORE_PARSE + puts("Parsing arguments (before deletion)..."); + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::shutdown(); + return 1; + } +#endif + +#ifdef DO_DELETE + puts("Deleting argument object(s)..."); +#if defined(PARSER) + ArArgumentParser *p = parser; + printf("Deleting ArArgumentParser 0x%x and writing %d NULL-bytes to that address (0x%x)\n", parser, sizeof(ArArgumentParser), p); + delete parser; + memset(p, 0, sizeof(ArArgumentParser)); +#elif defined(BUILDER) || defined(BUILDER_ARGV) + ArArgumentBuilder *b = builder; + printf("Deleting ArArgumentBuilder 0x%x and writing %d NULL-bytes to that address (0x%x)\n", builder, sizeof(ArArgumentBuilder), b); + delete builder; + memset(b, 0, sizeof(ArArgumentBuilder)); +#endif +#else + puts("Not deleteing objects."); +#endif + +#ifdef DELETE_BEFORE_PARSE + puts("Parsing arguments (after deletion)..."); + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::shutdown(); + return 1; + } +#endif + + if (!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Normal, "simpleConnect: Could not connect to robot... exiting"); + return 2; + } + + ArLog::log(ArLog::Normal, "simpleConnect: Connected."); + + // Start the robot processing cycle running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + // Print out some data from the SIP. We must "lock" the ArRobot object + // before calling its methods, and "unlock" when done, to prevent conflicts + // with the background thread started by the call to robot.runAsync() above. + // See the section on threading in the manual for more about this. + robot.lock(); + ArLog::log(ArLog::Normal, "simpleConnect: Pose=(%.2f,%.2f,%.2f), Trans. Vel=%.2f, Battery=%.2fV", + robot.getX(), robot.getY(), robot.getTh(), robot.getVel(), robot.getBatteryVoltage()); + robot.unlock(); + + // Sleep for 3 seconds. + ArLog::log(ArLog::Normal, "simpleConnect: Sleeping for 3 seconds..."); + ArUtil::sleep(3000); + + + ArLog::log(ArLog::Normal, "simpleConnect: Ending robot thread..."); + robot.stopRunning(); + + ArLog::log(ArLog::Normal, "simpleConnect: Exiting."); + return 0; +} diff --git a/Legacy/Aria/tests/driveFast.cpp b/Legacy/Aria/tests/driveFast.cpp new file mode 100644 index 0000000..056e228 --- /dev/null +++ b/Legacy/Aria/tests/driveFast.cpp @@ -0,0 +1,250 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This demo starts up the robot in its own thread, then runs a bunch of the + direct motion commands... note that if you want to stop direct motion + commands and let actions take over, you should use clearDirectMotion, see + the docs for details. Also note how it locks the robot before doing anything + with the robot, then unlocks it when done, this is vital for threaded code. + You shouldn't really use threads if you don't understand them or don't need + them. +*/ + +/* + This is a connection handler, fairly simple, but quite useful, esp when + the robot is running in another thread. Its not really needed here + since blockingConnect is used. But it'd still be useful if there is an + error after connected +*/ +class ConnHandler +{ +public: + // Constructor + ConnHandler(ArRobot *robot); + // Destructor, its just empty + ~ConnHandler(void) {} + // to be called if the connection was made + void connected(void); + // to call if the connection failed + void connFail(void); + // to be called if the connection was lost + void disconnected(void); +protected: + // robot pointer + ArRobot *myRobot; + // the functor callbacks + ArFunctorC myConnectedCB; + ArFunctorC myConnFailCB; + ArFunctorC myDisconnectedCB; +}; + +/* + The constructor, note its use of contructor chaining to initalize the + callbacks. +*/ +ConnHandler::ConnHandler(ArRobot *robot) : + myConnectedCB(this, &ConnHandler::connected), + myConnFailCB(this, &ConnHandler::connFail), + myDisconnectedCB(this, &ConnHandler::disconnected) + +{ + // set the robot poitner + myRobot = robot; + + // add the callbacks to the robot + myRobot->addConnectCB(&myConnectedCB, ArListPos::FIRST); + myRobot->addFailedConnectCB(&myConnFailCB, ArListPos::FIRST); + myRobot->addDisconnectOnErrorCB(&myDisconnectedCB, ArListPos::FIRST); +} + +// just exit if the connection failed +void ConnHandler::connFail(void) +{ + printf("Failed to connect.\n"); + myRobot->stopRunning(); + Aria::shutdown(); + return; +} + +// turn on motors, and off sonar, and off amigobot sounds, when connected +void ConnHandler::connected(void) +{ + printf("Connected\n"); + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::ENABLE, 1); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +// lost connection, so just exit +void ConnHandler::disconnected(void) +{ + printf("Lost connection\n"); + exit(0); +} + + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int dist; + ArTime start; + ArPose startPose; + bool vel2 = false; + + // connection to the robot + ArSerialConnection con; + // the robot + ArRobot robot; + // the connection handler from above + ConnHandler ch(&robot); + + // init area with a dedicated signal handling thread + Aria::init(Aria::SIGHANDLE_THREAD); + + if (argc != 2 || (dist = atoi(argv[1])) == 0) + { + printf("Usage: %s \n", argv[0]); + exit(0); + } + if (dist < 1000) + { + printf("You must go at least a meter\n"); + exit(0); + } + // open the connection with the defaults, exit if failed + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + // set the robots connection + robot.setDeviceConnection(&con); + // try to connect, if we fail, the connection handler should bail + if (!robot.blockingConnect()) + { + // this should have been taken care of by the connection handler + // but just in case + printf( + "asyncConnect failed because robot is not running in its own thread.\n"); + Aria::shutdown(); + return 1; + } + // run the robot in its own thread, so it gets and processes packets and such + robot.runAsync(false); + + // just a big long set of printfs, direct motion commands and sleeps, + // it should be self-explanatory + + robot.lock(); + + /* + robot.setAbsoluteMaxTransVel(2000); + robot.setTransVelMax(2000); + robot.setTransAccel(1000); + robot.setTransDecel(1000); + robot.comInt(82, 30); // rotkp + robot.comInt(83, 200); // rotkv + robot.comInt(84, 0); // rotki + robot.comInt(85, 30); // transkp + robot.comInt(86, 450); // transkv + robot.comInt(87, 4); // transki + + */ + printf("Driving %d mm (going full speed for that far minus a meter then stopping)\n", dist); + if (vel2) + robot.setVel2(2200, 2200); + else + robot.setVel(2200); + robot.unlock(); + start.setToNow(); + startPose = robot.getPose(); + while (1) + { + robot.lock(); + printf("\r vel: %.0f x: %.0f y: %.0f: dist: %.0f heading: %.2f", + robot.getVel(), robot.getX(), robot.getY(), + startPose.findDistanceTo(robot.getPose()), + robot.getTh()); + if (startPose.findDistanceTo(robot.getPose()) > abs(dist) - 1000) + { + printf("\nFinished distance\n"); + robot.setVel(0); + robot.unlock(); + break; + } + if (start.mSecSince() > 10000) + { + printf("\nDistance timed out\n"); + robot.setVel(0); + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(50); + } + + if (vel2) + robot.setVel2(0, 0); + else + robot.setVel(0); + start.setToNow(); + while (1) + { + robot.lock(); + if (vel2) + robot.setVel2(0, 0); + else + robot.setVel(0); + if (fabs(robot.getVel()) < 20) + { + printf("Stopped\n"); + robot.unlock(); + break; + } + if (start.mSecSince() > 2000) + { + printf("\nStop timed out\n"); + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(50); + } + robot.lock(); + robot.disconnect(); + robot.unlock(); + // shutdown and ge tout + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/driveHardDirect.cpp b/Legacy/Aria/tests/driveHardDirect.cpp new file mode 100644 index 0000000..c9abf2f --- /dev/null +++ b/Legacy/Aria/tests/driveHardDirect.cpp @@ -0,0 +1,457 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +// Includes +#include "Aria.h" + +// A class that just wraps the robot so that people don't forget +// to unlock and lock the robot when using direct motion commands +class ArDirectMotion +{ +public: + // Constructor + ArDirectMotion(ArRobot *robot) + {myRobot = robot;} + + // Destructor + ~ArDirectMotion() {} + + // Wait until the turn times out or has been completed + // within the required range in degrees + void finishTurn(double timeOut, double withinDeg) + { + ArTime start; + while (1) + { + myRobot->lock(); + if (myRobot->isHeadingDone(withinDeg)) + { + printf("Finished turn\n"); + myRobot->unlock(); + break; + } + if (start.mSecSince() > timeOut) + { + printf("Turn timed out\n"); + myRobot->unlock(); + break; + } + myRobot->unlock(); + } + } + + // Wait until the move times out or has been completed + // within the required range in mm + void finishMove(double timeOut, double withinDist) + { + ArTime start; + while (1) + { + myRobot->lock(); + if (myRobot->isMoveDone(withinDist)) + { + printf("Finished move\n"); + myRobot->unlock(); + break; + } + if (start.mSecSince() > timeOut) + { + printf("Turn timed out\n"); + myRobot->unlock(); + break; + } + myRobot->unlock(); + } + } + + // Move a distance if that distance + the buffer space + // is clear, otherwise do nothing + void move(double distance, double bufferSpace) + { + myRobot->lock(); + + if(myRobot->checkRangeDevicesCurrentBox(0, -myRobot->getRobotRadius(), + distance + bufferSpace, myRobot->getRobotRadius()) + >= distance + myRobot->getRobotRadius() + bufferSpace) + { + myRobot->move(distance); + } + myRobot->unlock(); + } + + // Change heading by + void setDeltaHeading(double heading) + { + myRobot->lock(); + myRobot->setDeltaHeading(heading); + myRobot->unlock(); + } + + // Set to absolute heading + void setHeading(double degree) + { + myRobot->lock(); + myRobot->setHeading(degree); + myRobot->unlock(); + } + + // Set the maximum translational velocity + void setTransVelMax(double max) + { + myRobot->lock(); + myRobot->setTransVelMax(max); + myRobot->unlock(); + } + + // Set the translational acceleration + void setTransAccel(double acc) + { + myRobot->lock(); + myRobot->setTransAccel(acc); + myRobot->unlock(); + } + + // Set the translational deceleration + void setTransDecel(double decel) + { + myRobot->lock(); + myRobot->setTransDecel(decel); + myRobot->unlock(); + } + + // Set the rotational acceleration + void setRotAccel(double acc) + { + myRobot->lock(); + myRobot->setRotAccel(acc); + myRobot->unlock(); + } + + // Set the rotational deceleration + void setRotDecel(double decel) + { + myRobot->lock(); + myRobot->setRotDecel(decel); + myRobot->unlock(); + } + + // Set the maximum rotational velocity + void setRotVelMax(double max) + { + myRobot->lock(); + myRobot->setRotVelMax(max); + myRobot->unlock(); + } + + // Set the rotational velocity + void setRotVel(double velocity) + { + myRobot->lock(); + myRobot->setRotVel(velocity); + myRobot->unlock(); + } + + // Set the translational veocity + void setVel(double velocity) + { + myRobot->lock(); + myRobot->setVel(velocity); + myRobot->unlock(); + } + + // Set the velocities of each wheel + void setVel2(double left, double right) + { + myRobot->lock(); + myRobot->setVel2(left, right); + myRobot->unlock(); + } + + // Stop the wheels + void stop() + { + myRobot->lock(); + myRobot->stop(); + myRobot->unlock(); + } + + +protected: + ArRobot *myRobot; +}; + + + +int main(int argc, char** argv) +{ + // To simply connect + ArSimpleConnector simpleConnector(&argc, argv); + + // The robot + ArRobot robot; + + // The key handler + ArKeyHandler keyHandler; + + // Sonar + ArSonarDevice sonarDev; + // Laser + //ArSick laserDev; + + //Direct Motion Commands + ArDirectMotion motion(&robot); + + // Parse the arguments from the simple connector + simpleConnector.parseArgs(); + + // Some arguments did not parse.... + // The program fails to understand and shuts down. + if (argc > 1) + { + simpleConnector.logOptions(); + keyHandler.restore(); + exit(1); + } + + // Initialize Aria + Aria::init(); + + // Give Aria the key handler + Aria::setKeyHandler(&keyHandler); + + // Attach the key handler to the robot + robot.attachKeyHandler(&keyHandler); + + // Add the sonar to the robot + robot.addRangeDevice(&sonarDev); + // Add the laser (if we have it) to the robot + //robot.addRangeDevice(&laserDev); + + // Connect to the robot + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + keyHandler.restore(); + return 1; + } + + +// Run the robot in its own thread + robot.runAsync(false); + + //simpleConnector.setupLaser(&laserDev); + //laserDev.runAsync(); + /* + if (!laserDev.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::shutdown(); + return 1; + } + */ + + // turn on the motors + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::JOYDRIVE, 1); + + + + + + //---------------------------------------------------------------- + // The robot's settings for this run (feel free to change these) + //---------------------------------------------------------------- + + // Set the Robot's PIDs + robot.comInt(82, 50); // rotkp + robot.comInt(83, 300); // rotkv + robot.comInt(84, 10); // rotki + robot.comInt(85, 25); // transkp + robot.comInt(86, 600); // transkv + robot.comInt(87, 10); // transki + + // Set the robot's velocities and accelerations + motion.setTransVelMax(2999); + motion.setRotVelMax(2999); + motion.setTransAccel(2999); + motion.setTransDecel(2999); + motion.setRotAccel(2999); + motion.setRotDecel(2999); + + + + //---------------------------------------------------------------- + // The robot's test pattern for this run (feel free to change this) + //---------------------------------------------------------------- + + // The test pattern described below + printf("Executing random test pattern\n"); + + // Some constants for this run + const double TIMOUT_TIME = 5000; // Time(msec) before a movement times out + const double WITHIN_DIST = 50; // If within this(mm) of target, good enough + const double WITHIN_DEG = 10; // If within this(deg) of target, good enough + const double SPACE_BUFFER = 600; // Extra space to give robot + + // Distances and angles for pattern + double distance = 100; + double angle = 30; + + /* + A figure 8 test pattern + + // The initial move + motion.move(distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + + while(robot.isRunning()) + { + // Turn right + if(!robot.isRunning())break; + motion.setDeltaHeading(-angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + + // Move forward + if(!robot.isRunning())break; + motion.move(distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + + // Turn right + if(!robot.isRunning())break; + motion.setDeltaHeading(-angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + + + // Move forward + if(!robot.isRunning())break; + motion.move(distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + + // Turn right + if(!robot.isRunning())break; + motion.setDeltaHeading(-angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + + + // Move forward + if(!robot.isRunning())break; + motion.move(2 * distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + + // Turn left + if(!robot.isRunning())break; + motion.setDeltaHeading(angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + + + // Move forward + if(!robot.isRunning())break; + motion.move(distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + + // Turn left + if(!robot.isRunning())break; + motion.setDeltaHeading(angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + + + // Move forward + if(!robot.isRunning())break; + motion.move(distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + + // Turn left + if(!robot.isRunning())break; + motion.setDeltaHeading(angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + + + // Move forward + if(!robot.isRunning())break; + motion.move(2 * distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + } + */ + + + while(robot.isRunning()) + { + double randomNumber = rand(); + + int choice = (int)randomNumber % 3; + + switch(choice) + { + case 0: + // Turn right + motion.setDeltaHeading(-angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + break; + case 1: + // Turn left + motion.setDeltaHeading(angle); + motion.finishTurn(TIMOUT_TIME, WITHIN_DEG); + break; + case 2: + // Move forward + motion.move(distance, SPACE_BUFFER); + motion.finishMove(TIMOUT_TIME, WITHIN_DIST); + default: + motion.stop(); + break; + } + } + + + // now exit + Aria::shutdown(); + return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/encoderCorrectionTest.cpp b/Legacy/Aria/tests/encoderCorrectionTest.cpp new file mode 100644 index 0000000..46eea5b --- /dev/null +++ b/Legacy/Aria/tests/encoderCorrectionTest.cpp @@ -0,0 +1,194 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +class JoydriveEnc +{ +public: + JoydriveEnc(ArRobot *robot, int num); + ~JoydriveEnc(void) {} + + void drive(void); + + + double originEncoder(ArPoseWithTime delta); + double defaultEncoder(ArPoseWithTime delta); + double stayEncoder(ArPoseWithTime delta); + +protected: + ArJoyHandler myJoyHandler; + ArRobot *myRobot; + int myTest; + time_t myLastPress; + ArRetFunctor1C myOriginCB; + ArRetFunctor1C myDefaultCB; + ArRetFunctor1C myStayCB; +}; + +JoydriveEnc::JoydriveEnc(ArRobot *robot, int num) : + myOriginCB(this, &JoydriveEnc::originEncoder), + myDefaultCB(this, &JoydriveEnc::defaultEncoder), + myStayCB(this, &JoydriveEnc::stayEncoder) +{ + myTest = num; + myLastPress = 0; + myRobot = robot; + myJoyHandler.init(); + myJoyHandler.setSpeeds(100, 700); + + if (myJoyHandler.haveJoystick()) + { + printf("Have a joystick\n\n"); + } + else + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + Aria::shutdown(); + exit(0); + } +} + +void JoydriveEnc::drive(void) +{ + int trans, rot; + if (!myRobot->isConnected()) + { + printf("Lost connection to the robot, exiting\n"); + exit(0); + } + printf("\rx %6.1f y %6.1f th %6.1f", + myRobot->getX(), myRobot->getY(), myRobot->getTh()); + fflush(stdout); + if (myJoyHandler.haveJoystick() && myJoyHandler.getButton(1)) + { + if (ArMath::fabs(myRobot->getVel()) < 10.0) + myRobot->comInt(ArCommands::ENABLE, 1); + myJoyHandler.getAdjusted(&rot, &trans); + myRobot->setVel(trans); + myRobot->setRotVel(-rot); + } + else + { + myRobot->setVel(0); + myRobot->setRotVel(0); + } + if (myJoyHandler.haveJoystick() && myJoyHandler.getButton(2) && + time(NULL) - myLastPress > 1) + { + myLastPress = time(NULL); + if (myRobot->getEncoderCorrectionCallback() != NULL) + { + printf("\nClearing Encoder Correction.\n"); + myRobot->setEncoderCorrectionCallback(NULL); + } + else + { + if (myTest == 1) + { + printf("\nSetting encoder correction so it sits at the origin\n"); + myRobot->setEncoderCorrectionCallback(&myOriginCB); + } + else if (myTest == 2) + { + printf("\nSetting encodre correction so that it sits in one spot\n"); + myRobot->setEncoderCorrectionCallback(&myStayCB); + } + else if (myTest == 3) + { + printf("\nSetting encoder correction so that it behaves like the default\n"); + myRobot->setEncoderCorrectionCallback(&myDefaultCB); + } + else + printf("\nNo encoder correction for test %d\n", myTest); + } + } +} + +double JoydriveEnc::originEncoder(ArPoseWithTime delta) +{ + return 0; +} + +double JoydriveEnc::defaultEncoder(ArPoseWithTime delta) +{ + return delta.getTh(); +} + +double JoydriveEnc::stayEncoder(ArPoseWithTime delta) +{ + return 0; +} + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int num; + + if (argc != 2) + { + printf("Usage is '%s ' where is one of:\n", argv[0]); + printf("1 keep the robot at 0, 0, 0\n"); + printf("2 keep the robbot from moving\n"); + printf("3 let the robot move normally\n"); + exit(0); + } + num = atoi(argv[1]); + + ArSerialConnection con; + ArRobot robot(NULL, false); + JoydriveEnc joyd(&robot, num); + ArFunctorC driveCB(&joyd, &JoydriveEnc::drive); + + + Aria::init(); + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.addUserTask("joydrive", 50, &driveCB); + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + robot.run(true); + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/encoderTest.cpp b/Legacy/Aria/tests/encoderTest.cpp new file mode 100644 index 0000000..006b6ef --- /dev/null +++ b/Legacy/Aria/tests/encoderTest.cpp @@ -0,0 +1,83 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +ArRobot *robot; + +bool encoderPrinter(ArRobotPacket *packet) +{ + long int left; + long int right; + printf("encoderTest received packet 0x%X %s\n", packet->getID(), + (packet->getID() == 0x90 ? "[ENCODERpac]" : + ( (packet->getID() == 0x32 || packet->getID() == 0x33) ? "[SIP]" : "" ) + ) + ); + if (packet->getID() != 0x90) + return false; + left = packet->bufToByte4(); + right = packet->bufToByte4(); + printf("### %ld %ld\n", left, right); + return true; +} + + +int main(int argc, char **argv) +{ + Aria::init(); + + std::string str; + int ret; + + ArGlobalRetFunctor1 encoderPrinterCB(&encoderPrinter); + + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + robot = new ArRobot; + ArRobotConnector robotConnector(&parser, robot); + + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "encoderTest: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + + robot->addPacketHandler(&encoderPrinterCB, ArListPos::FIRST); + + robot->requestEncoderPackets(); + + robot->run(true); + Aria::shutdown(); + +} + diff --git a/Legacy/Aria/tests/fileParserTest.cpp b/Legacy/Aria/tests/fileParserTest.cpp new file mode 100644 index 0000000..410c5f2 --- /dev/null +++ b/Legacy/Aria/tests/fileParserTest.cpp @@ -0,0 +1,110 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This file tests the fileParser class and is a rudimentary example +*/ + +bool boolPrinter(ArArgumentBuilder *builder) +{ + if (!builder->isArgBool(0)) + { + printf("Bad boolean value\n"); + return false; + } + if (builder->getArgBool(0)) + printf("bool(%s): true\n", builder->getExtraString()); + else + printf("bool(%s): false\n", builder->getExtraString()); + + return true; +} + +bool intPrinter(ArArgumentBuilder *builder) +{ + if (!builder->isArgInt(0)) + { + printf("Bad integer value\n"); + return false; + } + printf("int: %d\n", builder->getArgInt(0)); + return true; +} + +bool doublePrinter(ArArgumentBuilder *builder) +{ + if (!builder->isArgDouble(0)) + { + printf("Bad double value\n"); + return false; + } + printf("double: %g\n", builder->getArgDouble(0)); + return true; +} + +bool stringPrinter(ArArgumentBuilder *builder) +{ + printf("string: %s\n", builder->getFullString()); + return true; +} + +bool argPrinter(ArArgumentBuilder *builder) +{ + printf("Logging builder:\n"); + builder->log(); + return true; +} + +int main(int argc, char **argv) +{ + ArGlobalRetFunctor1 boolFunctor(&boolPrinter); + ArGlobalRetFunctor1 intFunctor(&intPrinter); + ArGlobalRetFunctor1 doubleFunctor(&doublePrinter); + ArGlobalRetFunctor1 stringFunctor(&stringPrinter); + ArGlobalRetFunctor1 argFunctor(&argPrinter); + ArFileParser parser(Aria::getDirectory()); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + parser.addHandler("keywordbool", &boolFunctor); + // make sure it won't let us add another one + parser.addHandler("keywordbool", &boolFunctor); + parser.addHandler("keywordint", &intFunctor); + // was testing the remHandler + //parser.remHandler("keywordint"); + //parser.remHandler(&intFunctor); + parser.addHandler("keyworddouble", &doubleFunctor); + parser.addHandler("keywordstring", &stringFunctor); + parser.addHandler(NULL, &stringFunctor); + parser.addHandler("keywordbuilder", &argFunctor); + // either parse the bad file + //parser.parseFile("tests/fileParserTestBad.txt"); + // or parse the good file + parser.parseFile("tests/fileParserTestGood.txt", false); +} + + + diff --git a/Legacy/Aria/tests/fileParserTestBad.txt b/Legacy/Aria/tests/fileParserTestBad.txt new file mode 100644 index 0000000..9817c06 --- /dev/null +++ b/Legacy/Aria/tests/fileParserTestBad.txt @@ -0,0 +1,28 @@ + + + +keywordbuilder laksjdf kaljdsf df lkjasdlkf j +keywordstring laksjdf kaljdsf lkjas kjasdlkf j + +woo hoo +keyworddouble 29923840928340983240983209483204.020302 +keyworddouble .000000000000000000000000000000000000000000000000000001 +keyworddouble alskjdflkasjdf +keyworddouble 1.2 +keyworddouble -.4539 + +keywordbool true +keywordbool false +keywordbool f20398 +keywordbool + +keywordint 2 +keywordint -209392 +keywordint 2.0 +keywordint asldkfj29 +keywordint 2039840293840928340928340928340238402938423408 + +whee +;keywordbool + ; +fun \ No newline at end of file diff --git a/Legacy/Aria/tests/fileParserTestGood.txt b/Legacy/Aria/tests/fileParserTestGood.txt new file mode 100644 index 0000000..174314f --- /dev/null +++ b/Legacy/Aria/tests/fileParserTestGood.txt @@ -0,0 +1,15 @@ +keywordbuilder laksjdf kaljdsf df lkjasdlkf j +keywordString laksjdf kaljdsf lkjas kjasdlkf j +keywordstring laksjdf kaljdsf lkjas kjasdlkf j +woo hoo +keywordDouble 29923840928340983240983209483204.020302 +keyworddouble .000000000000000000000000000000000000000000000000000001 +keyworddouble 1.2 +keywordBool true +keywordbool false +keywordInt 2 +keywordint -209392 +whee +;keywordbool + ; +fun \ No newline at end of file diff --git a/Legacy/Aria/tests/functorTest.cpp b/Legacy/Aria/tests/functorTest.cpp new file mode 100644 index 0000000..0bf6097 --- /dev/null +++ b/Legacy/Aria/tests/functorTest.cpp @@ -0,0 +1,500 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/* + TestClass - This class has 6 functions which are used to test out the + functors. +*/ + +class TestClass +{ +public: + + void function(); + void function(int arg1); + void function(bool arg1, std::string arg2); + + bool retFunction(); + char * retFunction(int arg1); + double retFunction(bool arg1, std::string arg2); +}; + + +void TestClass::function() +{ + printf("TestClass::function\n"); +} + +void TestClass::function(int arg1) +{ + printf("TestClass::function(int arg1=%d)\n", arg1); +} + +void TestClass::function(bool arg1, std::string arg2) +{ + printf("TestClass::function(bool arg1=%d, std::string arg2='%s')\n", + arg1, arg2.c_str()); +} + +bool TestClass::retFunction() +{ + printf("bool TestClass::retFunction\n"); + return(true); +} + +char * TestClass::retFunction(int arg1) +{ + printf("char * TestClass::retFunction(int arg1=%d)\n", arg1); + return("Hello"); +} + +double TestClass::retFunction(bool arg1, std::string arg2) +{ + printf("double TestClass::retFunction(bool arg1=%d, std::string arg2='%s')\n", + arg1, arg2.c_str()); + return(4.62); +} + + +/* + Here are 6 global functions to test out the functors for non-member funtions. +*/ +void function() +{ + printf("function\n"); +} + +void function(int arg1) +{ + printf("function(int arg1=%d)\n", arg1); +} + +void function(bool arg1, std::string arg2) +{ + printf("function(bool arg1=%d, std::string arg2='%s')\n", + arg1, arg2.c_str()); +} + +bool retFunction() +{ + printf("bool retFunction\n"); + return(true); +} + +char * retFunction(int arg1) +{ + printf("char * retFunction(int arg1=%d)\n", arg1); + return("Hello"); +} + +double retFunction(bool arg1, std::string arg2) +{ + printf("double retFunction(bool arg1=%d, std::string arg2='%s')\n", + arg1, arg2.c_str()); + return(4.62); +} + + +/* + Test functors with class member funtions +*/ + +// Direct invocation of the functors with supplying parameters. +void testDirect() +{ + TestClass test; + ArFunctorC functor(test, &TestClass::function); + ArFunctor1C functor1(test, &TestClass::function, 1); + ArFunctor2C functor2(test, + &TestClass::function, + false, "default arg"); + + printf("\n****** Testing direct invocation using ArFunctor::invoke(...)\n"); + puts("> Should see TestClass::function()..."); + functor.invoke(); + puts("> Should see TestClass::function(1)..."); + functor1.invoke(); + puts("> Should see TestClass::function(5)..."); + functor1.invoke(5); + puts("> Should see TestClass::function(true, \"argument 1\")..."); + functor2.invoke(true, "argument 1"); +} + +// Invocation of a base ArFunctor pointer to a functor. Because the pointer +// is of type ArFunctor, the parameters can not be supplied. The default +// parameters, which are supplied when the functor is constructed, are used. +void testBase() +{ + TestClass test; + ArFunctor *fptr; + ArFunctorC functor(test, &TestClass::function); + ArFunctor1C functor1(test, &TestClass::function, 1); + ArFunctor2C functor2(test, + &TestClass::function, + false, "default arg"); + + printf("\n****** Testing base invocation\n"); + fptr=&functor; + puts("> Should see TestClass::function()..."); + fptr->invoke(); + fptr=&functor1; + puts("> Should see TestClass::function(1)..."); + fptr->invoke(); + fptr=&functor2; + puts("> Should see TestClass::function(false, \"default arg\")..."); + fptr->invoke(); +} + +// Invocation of pointers which supply the parameter type. Full invocation +// with paramters is posesible in this fashion with out knowing the class +// that the functor refers to. +void testParams() +{ + TestClass test; + ArFunctorC functor(test, &TestClass::function); + ArFunctor1C functor1(test, &TestClass::function); + ArFunctor2C functor2(test, + &TestClass::function); + ArFunctor *fptr; + ArFunctor1 *fptr1; + ArFunctor2 *fptr2; + + printf("\n****** Testing pointer invocation\n"); + fptr=&functor; + puts("> Should see TestClass::function()..."); + fptr->invoke(); + fptr1=&functor1; + puts("> Should see TestClass::function(2)..."); + fptr1->invoke(2); + fptr2=&functor2; + puts("> Should see TestClass::function(true, \"argument 2\")..."); + fptr2->invoke(true, "argument 2"); +} + + +void setFunctorPtr(ArFunctor *f) +{ +} + +void setIntFunctorPtr(ArFunctor1 *f) +{ +} + +// It is possible to supply a more specialized ArFunctor class to a function +// that takes a plant ArFunctor pointer, since it will be +// implicitly cast to that parent class +void testDowncast() +{ + ArRetFunctor1C f; + ArFunctor* y = &f; + setFunctorPtr(&f); + setFunctorPtr(y); +} + +/* + Test functors with return values, ArRetFunctor +*/ + +// Direct invocation of the functors with return values and supplying +// parameters. It is not posesible to have the operator() for functors with +// return values. This is due to limitations of C++ and different C++ +// compilers where you can not overload return values in all cases. +void testReturnDirect() +{ + TestClass test; + ArRetFunctorC functor(test, &TestClass::retFunction); + ArRetFunctor1C + functor1(test, &TestClass::retFunction, 1); + ArRetFunctor2C + functor2(test, &TestClass::retFunction, false, "default arg"); + bool bret; + char *cret; + double dret; + + //bret=test.retFunction(); + //cret=test.retFunction(4); + //dret=test.retFunction(true, "foof"); + + printf("\n****** Testing direct invocation with return\n"); + puts("> TestClass::retFunction() should return true..."); + bret=functor.invokeR(); + printf("Returned: %d\n", bret); + puts("> TestClass::retFunction(5) should return \"Hello\"..."); + cret=functor1.invokeR(5); + printf("Returned: %s\n", cret); + puts("> TestClass::retFunction(true, \"argument 1\") should return 4.62..."); + dret=functor2.invokeR(true, "argument 1"); + printf("Returned: %e\n", dret); +} + +void testReturnBase() +{ + TestClass test; + ArRetFunctorC functor(test, &TestClass::retFunction); + ArRetFunctor1C + functor1(test, &TestClass::retFunction, 1); + ArRetFunctor2C + functor2(test, &TestClass::retFunction, false, "default arg"); + ArRetFunctor *fBoolPtr; + ArRetFunctor *fCharPtr; + ArRetFunctor *fDoublePtr; + bool bret; + char *cret; + double dret; + + printf("\n****** Testing base invocation with return\n"); + fBoolPtr=&functor; + puts("> TestClass::retFunction() should return true"); + bret=fBoolPtr->invokeR(); + printf("Returned: %d\n", bret); + fCharPtr=&functor1; + puts("> TestClass::retFunction(1) should return \"Hello\""); + cret=fCharPtr->invokeR(); + printf("Returned: %s\n", cret); + fDoublePtr=&functor2; + puts("> TestClass::retFunction(false, \"default arg\" should return 4.62"); + dret=fDoublePtr->invokeR(); + printf("Returned: %e\n", dret); +} + +void testReturnParams() +{ + TestClass test; + ArRetFunctorC functor(test, &TestClass::retFunction); + ArRetFunctor1C + functor1(test, &TestClass::retFunction, 1); + ArRetFunctor2C + functor2(test, &TestClass::retFunction, false, "default arg"); + ArRetFunctor *fBoolPtr; + ArRetFunctor1 *fCharPtr; + ArRetFunctor2 *fDoublePtr; + bool bret; + char *cret; + double dret; + + printf("\n****** Testing pointer invocation with return\n"); + fBoolPtr=&functor; + puts("> TestClass::retFunction() should return true"); + bret=fBoolPtr->invokeR(); + printf("Returned: %d\n", bret); + fCharPtr=&functor1; + puts("> TestClass::retFunction(7) should return \"Hello\""); + cret=fCharPtr->invokeR(7); + printf("Returned: %s\n", cret); + fDoublePtr=&functor2; + puts("> TestClass::retFunction(false, \"argument 3\") should return 4.62..."); + dret=fDoublePtr->invokeR(false, "argument 3"); + printf("Returned: %e\n", dret); +} + + +/* + Test global functors, ArGlobalFunctor. +*/ + +// Direct invocation of the global functors with supplying parameters. +void testGlobalDirect() +{ + ArGlobalFunctor functor(&function); + ArGlobalFunctor1 functor1(&function, 1); + ArGlobalFunctor2 functor2(&function, + false, "default arg"); + + printf("\n****** Testing global direct invocation\n"); + puts("> Should see function()..."); + functor.invoke(); + puts("> Should see function(5)..."); + functor1.invoke(5); + puts("> Should see function(true, \"argument 1\")..."); + functor2.invoke(true, "argument 1"); +} + +// Invocation of a base ArFunctor pointer to a global functor. Because the +// pointer is of type ArFunctor, the parameters can not be supplied. The +// default parameters, which are supplied when the functor is constructed, +// are used. +void testGlobalBase() +{ + ArFunctor *fptr; + ArGlobalFunctor functor(function); + ArGlobalFunctor1 functor1(function, 1); + ArGlobalFunctor2 functor2(function, false, + "default arg"); + + printf("\n****** Testing global base invocation\n"); + fptr=&functor; + puts("> Should see function()..."); + fptr->invoke(); + fptr=&functor1; + puts("> Should see function(1)..."); + fptr->invoke(); + fptr=&functor2; + puts("> Should see function(false, \"default arg\")..."); + fptr->invoke(); +} + +// Invocation of pointers which supply the parameter type. Full invocation +// with paramters is posesible in this fashion with out knowing the class +// that the functor refers to. +void testGlobalParams() +{ + ArGlobalFunctor functor(function); + ArGlobalFunctor1 functor1(function, 1); + ArGlobalFunctor2 functor2(function, false, + "default arg"); + ArFunctor *fptr; + ArFunctor1 *fptr1; + ArFunctor2 *fptr2; + + printf("\n****** Testing global pointer invocation\n"); + fptr=&functor; + puts("> Should see function()..."); + fptr->invoke(); + fptr1=&functor1; + puts("> Should see function(2)..."); + fptr1->invoke(2); + fptr2=&functor2; + puts("> Should see function(true, \"argument 2\")..."); + fptr2->invoke(true, "argument 2"); +} + + +/* + Test global functors with return, ArGlobalRetFunctor. +*/ + +// Direct invocation of the global functors with supplying parameters. +void testGlobalReturnDirect() +{ + ArGlobalRetFunctor functor(&retFunction); + ArGlobalRetFunctor1 functor1(&retFunction, 1); + ArGlobalRetFunctor2 + functor2(&retFunction, false, "default arg"); + bool bret; + char *cret; + double dret; + + printf("\n****** Testing global direct invocation with return\n"); + puts("> bool retFunction() should return true..."); + bret=functor.invokeR(); + printf("Returned: %d\n", bret); + puts("> char* retFunction(5) should return \"Hello\"..."); + cret=functor1.invokeR(5); + printf("Returned: %s\n", cret); + puts("> double retFunction(true, \"argument 1\") should return 4.62..."); + dret=functor2.invokeR(true, "argument 1"); + printf("Returned: %e\n", dret); +} + +// Invocation of a base ArFunctor pointer to a global functor. Because the +// pointer is of type ArFunctor, the parameters can not be supplied. The +// default parameters, which are supplied when the functor is constructed, +// are used. +void testGlobalReturnBase() +{ + ArGlobalRetFunctor functor(retFunction); + ArGlobalRetFunctor1 functor1(retFunction, 1); + ArGlobalRetFunctor2 + functor2(retFunction, false, "default arg"); + ArRetFunctor *fBoolPtr; + ArRetFunctor *fCharPtr; + ArRetFunctor *fDoublePtr; + bool bret; + char *cret; + double dret; + + printf("\n****** Testing global base invocation with return\n"); + fBoolPtr=&functor; + puts("> bool retFunction() should return true..."); + bret=fBoolPtr->invokeR(); + printf("Returned: %d\n", bret); + fCharPtr=&functor1; + puts("> char* retFunction(1) should return \"Hello\"..."); + cret=fCharPtr->invokeR(); + printf("Returned: %s\n", cret); + fDoublePtr=&functor2; + puts("> double retFunction(false, \"default arg\") should return 4.62..."); + dret=fDoublePtr->invokeR(); + printf("Returned: %e\n", dret); +} + +// Invocation of pointers which supply the parameter type. Full invocation +// with paramters is posesible in this fashion with out knowing the class +// that the functor refers to. +void testGlobalReturnParams() +{ + ArGlobalRetFunctor functor(retFunction); + ArGlobalRetFunctor1 functor1(retFunction, 1); + ArGlobalRetFunctor2 + functor2(retFunction, false, "default arg"); + ArRetFunctor *fBoolPtr; + ArRetFunctor1 *fCharPtr; + ArRetFunctor2 *fDoublePtr; + bool bret; + char *cret; + double dret; + + printf("\n****** Testing global pointer invocation with return\n"); + fBoolPtr=&functor; + puts("> bool retFunction() should return true..."); + bret=fBoolPtr->invokeR(); + printf("Returned: %d\n", bret); + fCharPtr=&functor1; + puts("> char* retFunction(7) should return \"Hello\"..."); + cret=fCharPtr->invokeR(7); + printf("Returned: %s\n", cret); + fDoublePtr=&functor2; + puts("> double retFunction(false, \"argument 3\") should return 4.62..."); + dret=fDoublePtr->invokeR(false, "argument 3"); + printf("Returned: %e\n", dret); +} + + +// main(). Drives this example by creating an instance of the TestClass and +// instances of functors. Then the functors are invoked. +int main() +{ + testDirect(); + testBase(); + testParams(); + testReturnDirect(); + testReturnBase(); + testReturnParams(); + testGlobalDirect(); + testGlobalBase(); + testGlobalParams(); + testGlobalReturnDirect(); + testGlobalReturnBase(); + testGlobalReturnParams(); + + ArGlobalFunctor2 f(&function); + f.setP2("hello"); + f.invoke(true); + + return(0); +} diff --git a/Legacy/Aria/tests/gotoTest.cpp b/Legacy/Aria/tests/gotoTest.cpp new file mode 100644 index 0000000..d55ee9e --- /dev/null +++ b/Legacy/Aria/tests/gotoTest.cpp @@ -0,0 +1,129 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This program will just have the robot drive a couple of meters forwards. + + You can press escape while it was running to cause the program to + close up and exit. +*/ + +int main(void) +{ + // the serial connection (robot) + ArSerialConnection serConn; + // tcp connection (sim) + ArTcpConnection tcpConn; + + // robot + ArRobot robot; + // sonar, must be added to the robot + ArSonarDevice sonar; + + // limiter for close obstacles + ArActionLimiterForwards limiter("speed limiter near", 300, 600, 250); + // limiter for far away obstacles + ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 400); + // limiter so we don't bump things backwards + // limiter for far away obstacles + ArActionLimiterTableSensor tableLimiter; + // goto the goal + ArActionGoto gotoPose("goto", ArPose(2000, 0)); + // Make a key handler, so that escape will shut down the program + // cleanly + ArKeyHandler keyHandler; + + // mandatory init + Aria::init(); + + // Add the key handler to Aria so other things can find it + Aria::setKeyHandler(&keyHandler); + + // Attach the key handler to a robot now, so that it actually gets + // some processing time so it can work, this will also make escape + // exit + robot.attachKeyHandler(&keyHandler); + + + // First we see if we can open the tcp connection, if we can we'll + // assume we're connecting to the sim, and just go on... if we + // can't open the tcp it means the sim isn't there, so just try the + // robot + + // modify this next line if you're not using default tcp connection + tcpConn.setPort(); + + // see if we can get to the simulator (true is success) + if (tcpConn.openSimple()) + { + // we could get to the sim, so set the robots device connection to the sim + printf("Connecting to simulator through tcp.\n"); + robot.setDeviceConnection(&tcpConn); + } + else + { + // we couldn't get to the sim, so set the port on the serial + // connection and then set the serial connection as the robots + // device + + // modify the next line if you're not using the first serial port + // to talk to your robot + serConn.setPort(); + printf( + "Could not connect to simulator, connecting to robot through serial.\n"); + robot.setDeviceConnection(&serConn); + } + + + // add the sonar to the robot + robot.addRangeDevice(&sonar); + + // try to connect, if we fail exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // turn on the motors, turn off amigobot sounds + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions + robot.addAction(&tableLimiter, 100); + robot.addAction(&limiter, 95); + robot.addAction(&limiterFar, 90); + robot.addAction(&gotoPose, 50); + + // start the robot running, true so that if we lose connection the run stops + robot.run(true); + + // now exit + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/gpsCoordsTest.cpp b/Legacy/Aria/tests/gpsCoordsTest.cpp new file mode 100644 index 0000000..9ab4b16 --- /dev/null +++ b/Legacy/Aria/tests/gpsCoordsTest.cpp @@ -0,0 +1,113 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/** @example gpsCoordsTest.cpp : works the LLA2ENU and ENU2LLA coord transformations */ + +#include "Aria.h" +#include "ArGPSCoords.h" + +int main(int argc, char **argv) +{ + // Initialize Aria and Arnl global information + Aria::init(); + ArLLACoords originLatLon(42.805464, -71.574738, 64.0); + ArMapGPSCoords mapGPSCoords(originLatLon); + ArLog::log(ArLog::Normal, "Origin LLA is %.6f %.6f %g", + originLatLon.getLatitude(), + originLatLon.getLongitude(), + originLatLon.getAltitude()); + // Line of points along longitude. + for(int i = 0; i < 10; i++) + { + double di = (double) i * 1e-6; + ArLLACoords lla(originLatLon.getLatitude(), + originLatLon.getLongitude() + di, + originLatLon.getAltitude()); + + double ea, no, up; + mapGPSCoords.convertLLA2MapCoords(lla.getLatitude(), + lla.getLongitude(), + lla.getAltitude(), + ea, no, up); + + ArLog::log(ArLog::Normal, + "LLA %.6f %.6f %g (deg deg m)-> ENU %.2f %.2f %.2f (mm)", + lla.getLatitude(), + lla.getLongitude(), + lla.getAltitude(), + ea, no, up); + } + // Line of points along latitude. + for(int i = 0; i < 10; i++) + { + double di = (double) i * 1e-6; + ArLLACoords lla(originLatLon.getLatitude() + di, + originLatLon.getLongitude(), + originLatLon.getAltitude()); + + double ea, no, up; + mapGPSCoords.convertLLA2MapCoords(lla.getLatitude(), + lla.getLongitude(), + lla.getAltitude(), + ea, no, up); + + ArLog::log(ArLog::Normal, + "LLA %.6f %.6f %g (deg deg m)-> ENU %.2f %.2f %.2f (mm)", + lla.getLatitude(), + lla.getLongitude(), + lla.getAltitude(), + ea, no, up); + } + // Line of points along east. + for(int i = 0; i < 10; i++) + { + double di = (double) i * 1000.0; + double lat, lon, alt; + double ea=di, no=0.0, up=0.0; + mapGPSCoords.convertMap2LLACoords(ea, no, up, + lat, lon, alt); + + ArLog::log(ArLog::Normal, + "ENU %g %g %g (mm) -> LLA %.6f %.6f %g (deg deg m)", + ea, no, up, lat, lon, alt); + } + // Line of points along north. + for(int i = 0; i < 10; i++) + { + double di = (double) i * 1000.0; + double lat, lon, alt; + double ea=0.0, no=di, up=0.0; + mapGPSCoords.convertMap2LLACoords(ea, no, up, + lat, lon, alt); + + ArLog::log(ArLog::Normal, + "ENU %g %g %g (mm) -> LLA %.6f %.6f %g (deg deg m)", + ea, no, up, lat, lon, alt); + } + + Aria::exit(0); +} + + diff --git a/Legacy/Aria/tests/gpsInternals.cpp b/Legacy/Aria/tests/gpsInternals.cpp new file mode 100644 index 0000000..2aa2a99 --- /dev/null +++ b/Legacy/Aria/tests/gpsInternals.cpp @@ -0,0 +1,156 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArGPS.h" +#include "assert.h" + +class TestArGPS : public ArGPS { +public: + TestArGPS() : ArGPS() { } + int tests(); +}; + +int main(int argc, char **argv) { + return TestArGPS().tests(); +} + +bool floatsCloseEnough(double x, double y, double eps = 0.000001) +{ + return( fabs(x - y) < eps ); +} + +int TestArGPS::tests() { + + puts(""); + double degmin = 4248.32544; + double deg = gpsDegminToDegrees(degmin); + printf("Degrees/minutes combination %f converts to decimal degrees %f.\nChecking against correct value 42.805424...\n", degmin, deg); + assert(floatsCloseEnough(deg, 42.805424)); + puts("OK"); + + puts(""); + degmin = -4248.32544; + deg = gpsDegminToDegrees(degmin); + printf("Degrees/minutes combination %f converts to decimal degrees %f.\nChecking against correct value -42.805424... \n", degmin, deg); + assert(floatsCloseEnough(deg, -42.805424)); + puts("OK"); + + puts(""); + ArNMEAParser::MessageVector msgParts; + msgParts.push_back("GPRMC"); + msgParts.push_back("1.1"); // timestamp + msgParts.push_back("A"); // warning flag + msgParts.push_back("4248.32544"); // latitude + msgParts.push_back("N"); // lat n/s + msgParts.push_back("7234.293016"); // longitude + msgParts.push_back("E"); // lon e/w + msgParts.push_back("0"); // speed + ArNMEAParser::Message msg; + msg.message = &msgParts; + handleGPRMC(msg); + printf("Extracted and converted data from preconstructed GPRMC message with north latitude, east latitude: lat=%f, lon=%f, time.sec=%lu, time.msec=%lu, speed=%f.\nChecking against correct values lat=42.805424 lon=72.571550, time.sec=1, time.mseg=100, speed=0.0...\n", myData.latitude, myData.longitude, myData.GPSPositionTimestamp.getSec(), myData.GPSPositionTimestamp.getMSec(), myData.speed); + assert(myData.havePosition); + assert(floatsCloseEnough(myData.latitude, 42.805424)); + assert(floatsCloseEnough(myData.longitude, 72.571550)); + assert(myData.GPSPositionTimestamp.getSec() == 1); + assert(myData.GPSPositionTimestamp.getMSec() == 100); + assert(floatsCloseEnough(myData.speed, 0.0)); + puts("OK"); + + puts(""); + msgParts[4] = "S"; + msgParts[6] = "W"; + handleGPRMC(msg); + printf("Extracted and converted data from preconstructed GPRMC message with south latitude, west longitude: lat=%f, lon=%f, time.sec=%lu, time.msec=%ld, speed=%f.\nChecking against correct values lat=-42.805424 lon=-72.57155...\n", myData.latitude, myData.longitude, myData.GPSPositionTimestamp.getSec(), myData.GPSPositionTimestamp.getMSec(), myData.speed); + assert(myData.havePosition); + assert(floatsCloseEnough(myData.latitude, -42.805424)); + assert(floatsCloseEnough(myData.longitude, -72.57155)); + puts("OK"); + + puts(""); + msgParts[6] = "xxx"; + msgParts[1] = "2"; + handleGPRMC(msg); + printf("Extracted and converted data from preconstructed GPRMC message with south latitude, invalid (\"xxx\") longitude, message should have been ignored (timestamp should still show 1/100, not 2.): lat=%f, lon=%f, time.sec=%lu, time.msec=%ld, speed=%f.\nChecking against correct values lat=-42.805424 lon=-72.57155, time.sec!=2...\n", myData.latitude, myData.longitude, myData.GPSPositionTimestamp.getSec(), myData.GPSPositionTimestamp.getMSec(), myData.speed); + assert(floatsCloseEnough(myData.latitude, -42.805424)); + assert(floatsCloseEnough(myData.longitude, -72.57155)); + assert(myData.GPSPositionTimestamp.getSec() != 2); + puts("OK"); + + + puts(""); + puts("Now testing messages with invalid NMEA format (checksums should be seen as wrong, or messages ignored)."); + char *malformedMessage1 = "$GPRMC,11\r\n99,22$33,44*5*6\n" ; // broken halfway through + char *malformedMessage2 = "xxx\r\nxxxx\r\n"; // not an nmea message + char *malformedMessage3 = "$*01\r\n"; // missing key contents. maybe acepted by ignored? + char *malformedMessage4 = "$GPRMC,11,22,33\r\n"; // missing checksum + char *malformedMessage5 = "$GPRMC,11,22$GPRMC,99,$GPR33MC88,77*01\r**0\n203\r\n"; // overlapping messages + puts("\nMessage 1 of 5..."); + myNMEAParser.parse(malformedMessage1, strlen(malformedMessage1)); + myNMEAParser.parse("\r\n\r\n", 4); + puts("\nMessage 2 of 5..."); + myNMEAParser.parse(malformedMessage2, strlen(malformedMessage2)); + myNMEAParser.parse("\r\n\r\n", 4); + puts("\nMessage 3 of 5..."); + myNMEAParser.parse(malformedMessage3, strlen(malformedMessage3)); + myNMEAParser.parse("\r\n\r\n", 4); + puts("\nMessage 4 of 5..."); + myNMEAParser.parse(malformedMessage4, strlen(malformedMessage4)); + myNMEAParser.parse("\r\n\r\n", 4); + puts("\nMessage 5 of 5..."); + myNMEAParser.parse(malformedMessage5, strlen(malformedMessage5)); + myNMEAParser.parse("\r\n\r\n", 4); + + puts(""); + char *text = "HCHDM,123.4,M"; + char chk = 0; + for(unsigned int i = 0; i < strlen(text); ++i) + { + chk ^= text[i]; + } + printf("Checking checksum algorithm: Checksum for example message contents \"%s\" is 0x%X (%d). (ought to be 0x2D). Checking...\n", text, chk&0xFF, chk&0xFF); + assert(chk == 0x2D); + puts("OK"); + + + puts(""); + puts("Testing a message with a correct checksum. Should be no checksum warnings."); + char *messageWithGoodChecksum = "$HCHDM,123.4,M*2D\r\n"; + myNMEAParser.parse(messageWithGoodChecksum, strlen(messageWithGoodChecksum)); + + puts(""); + puts("Testing messages with incorrect checksums. Should see checksum warnings."); + char *messageWithBadChecksum = "$HCHDM,123.4,M*23\r\n"; + myNMEAParser.parse(messageWithBadChecksum, strlen(messageWithBadChecksum)); + myNMEAParser.parse("\r\n\r\n", 4); + messageWithBadChecksum = "$HCHDM,123.4,z*2D\r\n"; + myNMEAParser.parse(messageWithBadChecksum, strlen(messageWithBadChecksum)); + myNMEAParser.parse("\r\n\r\n", 4); + + puts(""); + puts("Done."); + return 0; +} diff --git a/Legacy/Aria/tests/gripperStateFlagsTest.cpp b/Legacy/Aria/tests/gripperStateFlagsTest.cpp new file mode 100644 index 0000000..181366d --- /dev/null +++ b/Legacy/Aria/tests/gripperStateFlagsTest.cpp @@ -0,0 +1,217 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/** @example gripperExample.cpp Example program demonstrating use of the Pioneer gripper. + * + * Shows how to control the Pioneer 2DOF gripper accessory. + * In addition to the arrow keys to teleoperate the robot, + * Use the following keyboard keys to control it: + * u Lift the gripper up + * d Lift the gripper down + * o Open the gripper + * c Close the gripper + * s Stop gripper movement. + * + * + * @sa ArModeGripper (the gripper control mode used in the "demo" program) + * +*/ + +#include "Aria.h" + +// Adds robot callback to print gripper status. +class PrintGripStatus +{ + ArGripper* myGripper; + ArRobot* myRobot; + ArFunctorC myPrintCB; +public: + PrintGripStatus(ArGripper* gripper, ArRobot* rbt) : + myGripper(gripper), myRobot(rbt), + myPrintCB(this, &PrintGripStatus::printStatus) + { + myRobot->addUserTask("PrintGripStatus", 10, &myPrintCB); + } + + + void printStatus() + { + myGripper->logState(); + char gs[9], ds[9]; + int bit; + int ch; + unsigned char digin = myRobot->getDigIn(); + unsigned char gripstate = (myRobot->getAnalogPortSelected() >> 8); + for(bit = 7, ch = 0; bit >= 0; bit--,ch++) + gs[ch] = ((gripstate>>bit)&1) ? '1' : '0'; + gs[8] = 0; + for(bit = 7, ch = 0; bit >= 0; bit--,ch++) + ds[ch] = ((digin>>bit)&1) ? '1' : '0'; + ds[8] = 0; + printf("GRIPSTATE:%s DIGIN:%s\n", gs, ds); + } +}; + +// Adds key handler callbacks for controlling the gripper +class GripperControlHandler +{ + ArGripper* myGripper; + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myOpenCB; + ArFunctorC myCloseCB; + ArFunctorC myStopCB; +public: + GripperControlHandler(ArGripper* gripper) : + myGripper(gripper), + myUpCB(this, &GripperControlHandler::liftUp), + myDownCB(this, &GripperControlHandler::liftDown), + myOpenCB(this, &GripperControlHandler::open), + myCloseCB(this, &GripperControlHandler::close), + myStopCB(this, &GripperControlHandler::stop) + { + } + + void addKeyHandlers(ArRobot *robot) + { + ArKeyHandler *keyHandler = Aria::getKeyHandler(); + if(keyHandler == NULL) + { + keyHandler = new ArKeyHandler(); + Aria::setKeyHandler(keyHandler); + robot->attachKeyHandler(keyHandler); + } + keyHandler->addKeyHandler(ArKeyHandler::PAGEUP, &myUpCB); + keyHandler->addKeyHandler('u', &myUpCB); + keyHandler->addKeyHandler(ArKeyHandler::PAGEDOWN, &myDownCB); + keyHandler->addKeyHandler('d', &myDownCB); + keyHandler->addKeyHandler('o', &myOpenCB); + keyHandler->addKeyHandler('c', &myCloseCB); + keyHandler->addKeyHandler('s', &myStopCB); + } + + void liftUp() + { + ArLog::log(ArLog::Normal, "Moving gripper lift up..."); + myGripper->liftUp(); + } + + void liftDown() + { + ArLog::log(ArLog::Normal, "Moving gripper lift down..."); + myGripper->liftDown(); + } + + void stop() + { + ArLog::log(ArLog::Normal, "Stopping gripper..."); + myGripper->gripperHalt(); // stops both lift an grip + //myGripper->liftStop(); // stops just the lift + //myGripper->gripStop(); // stops just the gripper + } + + void close() + { + ArLog::log(ArLog::Normal, "Closing gripper..."); + myGripper->gripClose(); + } + + void open() + { + ArLog::log(ArLog::Normal, "Opening gripper..."); + myGripper->gripOpen(); + } + +}; + +int main(int argc, char **argv) +{ + + Aria::init(); + ArRobot robot; + ArArgumentParser argParser(&argc, argv); + ArSimpleConnector connector(&argParser); + ArGripper gripper(&robot); + ArSonarDevice sonar; + robot.addRangeDevice(&sonar); + + argParser.loadDefaultArguments(); + + if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::shutdown(); + return 1; + } + + if (!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "gripperExample: Could not connect to robot... exiting"); + Aria::shutdown(); + return 2; + } + ArLog::log(ArLog::Normal, "gripperExample: Connected to robot."); + + ArLog::log(ArLog::Normal, "gripperExample: GripperType=%d", gripper.getType()); + gripper.logState(); + if(gripper.getType() == ArGripper::NOGRIPPER) + { + ArLog::log(ArLog::Terse, "gripperExample: Error: Robot does not have a gripper. Exiting."); + Aria::shutdown(); + return -1; + } + + // Teleoperation actions with obstacle-collision avoidance + ArActionLimiterTableSensor tableLimit; + robot.addAction(&tableLimit, 110); + ArActionLimiterForwards limitNearAction("near", 300, 600, 250); + robot.addAction(&limitNearAction, 100); + ArActionLimiterForwards limitFarAction("far", 300, 1100, 400); + robot.addAction(&limitFarAction, 90); + ArActionLimiterBackwards limitBackAction; + robot.addAction(&limitBackAction, 50); + ArActionJoydrive joydriveAction("joydrive", 400, 15); + robot.addAction(&joydriveAction, 40); + joydriveAction.setStopIfNoButtonPressed(false); + ArActionKeydrive keydriveAction; + robot.addAction(&keydriveAction, 30); + + + // Handlers to control the gripper and print out info (classes defined above) + PrintGripStatus printStatus(&gripper, &robot); + GripperControlHandler gripControl(&gripper); + gripControl.addKeyHandlers(&robot); + + // enable motors and run (if we lose connection to the robot, exit) + ArLog::log(ArLog::Normal, "You may now operate the robot with arrow keys or joystick. Operate the gripper with the u, d, o, c, and page up/page down keys."); + robot.enableMotors(); + robot.run(true); + + Aria::shutdown(); + return 0; +} + + diff --git a/Legacy/Aria/tests/gyroDrive-vc2008.vcproj b/Legacy/Aria/tests/gyroDrive-vc2008.vcproj new file mode 100644 index 0000000..e4cb51a --- /dev/null +++ b/Legacy/Aria/tests/gyroDrive-vc2008.vcproj @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/gyroDrive.cpp b/Legacy/Aria/tests/gyroDrive.cpp new file mode 100644 index 0000000..f86b52c --- /dev/null +++ b/Legacy/Aria/tests/gyroDrive.cpp @@ -0,0 +1,210 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** If you start this program up with an argument it will not use the gyro + with no argument it will use the gyro +**/ +ArRobot *robot; + +void printer(void) +{ + printf("%.2f\n", robot->getTh()); +} + +void hardExit(void) +{ + ArKeyHandler *keyHandler; + robot->disconnect(); + if ((keyHandler = Aria::getKeyHandler()) != NULL) + keyHandler->restore(); + else + printf("Could not restore keyboard settings."); + exit(0); +} + +int main(int argc, char **argv) +{ + bool done; + double distToTravel = 3000; + int spinTime = 0; + + // set up our simpleConnector + ArSimpleConnector simpleConnector(&argc, argv); + // set up a key handler so escape exits and attach to the robot + ArKeyHandler keyHandler; + + Aria::init(); + + robot = new ArRobot; + + printf("You can press the escape key to exit this program\n"); + + // parse its arguments + if (simpleConnector.parseArgs()) + { + simpleConnector.logOptions(); + exit(1); + } + + // if there are more arguments left then it means we didn't + // understand an option + /* + if (argc > 1) + { + simpleConnector.logOptions(); + keyHandler.restore(); + exit(1); + } + */ + + ArGlobalFunctor exitCB(&hardExit); + ArGlobalFunctor printerCB(&printer); + + keyHandler.addKeyHandler(ArKeyHandler::ESCAPE, &exitCB); + robot->attachKeyHandler(&keyHandler); + Aria::setKeyHandler(&keyHandler); + + + + // set up the robot for connecting + if (!simpleConnector.connectRobot(robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + keyHandler.restore(); + return 1; + } + + //robot->addUserTask("printer", 50, &printerCB); + // run the robot, true here so that the run will exit if connection lost + robot->runAsync(true); + +#ifdef WIN32 + // wait until someone pushes the motor button to go + printf("Press the motor button to start the robot moving\n"); + while (1) + { + robot->lock(); + if (!robot->isRunning()) + hardExit(); + if (robot->areMotorsEnabled()) + { + robot->unlock(); + break; + } + robot->unlock(); + ArUtil::sleep(100); + } +#endif + ArAnalogGyro *gyro; + + if (argc == 1) + { + printf("Gyro\n"); + gyro = new ArAnalogGyro(robot); + } + printf("Waiting for inertial to stabilize for 5 seconds.\n"); + // wait a bit for the inertial to warm up + ArUtil::sleep(5000); + // basically from here on down the robot just cruises around a bit + robot->lock(); + // enable the motors, disable amigobot sounds + robot->comInt(ArCommands::SONAR, 0); + robot->comInt(ArCommands::ENABLE, 1); + robot->setMoveDoneDist(200); + + // move a couple meters + printf("Driving out\n"); + robot->move(distToTravel); + robot->setHeading(0); + robot->unlock(); + do { + ArUtil::sleep(100); + robot->lock(); + //robot->setHeading(0); + done = robot->isMoveDone(200); + robot->unlock(); + } while (!done); + + if (spinTime != 0) + { + printf("Spinning a while\n"); + // rotate a few times + robot->lock(); + robot->setRotVel(200); + robot->unlock(); + ArUtil::sleep(spinTime * 1000); + } + + printf("Pointing back\n"); + robot->lock(); + robot->setHeading(180); + robot->unlock(); + do { + ArUtil::sleep(100); + robot->lock(); + //robot->setHeading(180); + done = robot->isHeadingDone(5); + robot->unlock(); + } while (!done); + + printf("Driving back\n"); + // move a couple meters + robot->lock(); + robot->move(distToTravel); + robot->setHeading(180); + robot->unlock(); + do { + ArUtil::sleep(100); + robot->lock(); + //robot->setHeading(180); + done = robot->isMoveDone(200); + robot->unlock(); + } while (!done); + + printf("Pointing back in original direction.\n"); + robot->lock(); + robot->setHeading(0); + robot->unlock(); + do { + ArUtil::sleep(100); + robot->lock(); + //robot->setHeading(0); + done = robot->isHeadingDone(5); + robot->unlock(); + } while (!done); + + + robot->lock(); + printf("Final heading %.2f\n", robot->getTh()); + robot->disconnect(); + robot->unlock(); + // now exit + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/gyroDrive.vcproj b/Legacy/Aria/tests/gyroDrive.vcproj new file mode 100644 index 0000000..a078e06 --- /dev/null +++ b/Legacy/Aria/tests/gyroDrive.vcproj @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/hardDriveWander.cpp b/Legacy/Aria/tests/hardDriveWander.cpp new file mode 100644 index 0000000..e70d70f --- /dev/null +++ b/Legacy/Aria/tests/hardDriveWander.cpp @@ -0,0 +1,138 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This program will just have the robot wander around, it uses some avoidance + routines, then just has a constant velocity. +*/ + +int main(int argc, char **argv) +{ + // robot + ArRobot robot; + // the laser + ArSick sick; + + + // sonar, must be added to the robot + //ArSonarDevice sonar; + + // the actions we'll use to wander + // recover from stalls + //ArActionStallRecover recover; + // react to bumpers + //ArActionBumpers bumpers; + // limiter for close obstacles + ArActionLimiterForwards limiter("speed limiter near", 1600, 0, 0, 1.3); + // limiter for far away obstacles + //ArActionLimiterForwards limiterFar("speed limiter near", 300, 1000, 450, 1.1); + //ArActionLimiterForwards limiterFar("speed limiter far", 300, 1100, 600, 1.1); + // limiter for the table sensors + //ArActionLimiterTableSensor tableLimiter; + // actually move the robot + ArActionConstantVelocity constantVelocity("Constant Velocity", 1500); + // turn the orbot if its slowed down + ArActionTurn turn; + + // mandatory init + Aria::init(); + + // Parse all our args + ArSimpleConnector connector(&argc, argv); + connector.parseArgs(); + + if (argc > 1) + { + connector.logOptions(); + exit(1); + } + + // add the sonar to the robot + //robot.addRangeDevice(&sonar); + // add the laser to the robot + robot.addRangeDevice(&sick); + + // try to connect, if we fail exit + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::SONAR, 0); + + // turn on the motors, turn off amigobot sounds + //robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions + //robot.addAction(&recover, 100); + //robot.addAction(&bumpers, 75); + robot.addAction(&limiter, 49); + //robot.addAction(&limiter, 48); + //robot.addAction(&tableLimiter, 50); + robot.addAction(&turn, 30); + robot.addAction(&constantVelocity, 20); + + limiter.activate(); + turn.activate(); + constantVelocity.activate(); + + robot.clearDirectMotion(); + //robot.setStateReflectionRefreshTime(50); + robot.setRotVelMax(50); + robot.setTransAccel(1500); + robot.setTransDecel(100); + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + connector.setupLaser(&sick); + + // now that we're connected to the robot, connect to the laser + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + sick.lockDevice(); + sick.setMinRange(250); + sick.unlockDevice(); + robot.lock(); + robot.comInt(ArCommands::ENABLE, 1); + robot.unlock(); + + robot.waitForRunExit(); + // now exit + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/interpolationTest.cpp b/Legacy/Aria/tests/interpolationTest.cpp new file mode 100644 index 0000000..3db5d4a --- /dev/null +++ b/Legacy/Aria/tests/interpolationTest.cpp @@ -0,0 +1,118 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + ArInterpolation interp; + ArTime t; + ArPose p; + int i; + int result; + + for (i = 1; i <= 6; i++) + { + t.setMSec(i*100); + p.setPose(i*100, i*100, (i - 1)*60); + interp.addReading(t, p); + } + + t.setMSec(250); + result = interp.getPose(t, &p); + printf("Result of 250 %d\n\n", result); + if (result) + p.log(); + + t.setMSec(366); + result = interp.getPose(t, &p); + printf("\nResult of 366 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(455); + result = interp.getPose(t, &p); + printf("\nResult of 455 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(580); + result = interp.getPose(t, &p); + printf("\nResult of 580 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(750); + result = interp.getPose(t, &p); + printf("\nResult of 750 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(599); + result = interp.getPose(t, &p); + printf("\nResult of 599 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(600); + result = interp.getPose(t, &p); + printf("\nResult of 600 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(601); + result = interp.getPose(t, &p); + printf("\nResult of 601 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(50); + result = interp.getPose(t, &p); + printf("\nResult of 50 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(99); + result = interp.getPose(t, &p); + printf("\nResult of 99 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(100); + result = interp.getPose(t, &p); + printf("\nResult of 100 %d\n", result); + if (result == 1) + p.log(); + + t.setMSec(101); + result = interp.getPose(t, &p); + printf("\nResult of 101 %d\n", result); + if (result == 1) + p.log(); + + +} + + diff --git a/Legacy/Aria/tests/ioTest.cpp b/Legacy/Aria/tests/ioTest.cpp new file mode 100644 index 0000000..a1d730d --- /dev/null +++ b/Legacy/Aria/tests/ioTest.cpp @@ -0,0 +1,136 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* This tests the response time for IO packet requests sent to the robot. It can + * also test response for velocity commands if the section is uncommented. + * + * This can be used to see what the delay is in the time a command is sent to the + * time the command takes effect. + */ + +ArTime requestTime; +ArTime velTime; +int n = 0; +int vel = 0; +int ABOUT_RIGHT = 5; + +void userTask(ArRobot *robot) +{ + if (robot->getIOPacketTime().mSecSince() > requestTime.mSecSince()) + return; + else + { + ArLog::log(ArLog::Terse, "last packet time: %ld", requestTime.mSecSince() - robot->getIOPacketTime().mSecSince()); + fflush(stdout); + robot->comInt(ArCommands::IOREQUEST, 1); + requestTime.setToNow(); + } + + /* Uncomment the next section to test response in velocity commands. */ + + /* + if (abs((int)(robot->getVel() - vel)) <= ABOUT_RIGHT && + velTime.secSince() > 5) + { + if (vel == 0) + vel = 200; + else if (vel == 200) + vel = 400; + else if (vel == 400) + vel = 0; + robot->setVel(vel); + velTime.setToNow(); + } + + ArLog::log(ArLog::Terse, "vel requested: %d\trobot vel: %3.2f\tvel time: %d", vel, robot->getVel(), velTime.mSecSince()); + */ + + ArLog::log(ArLog::Terse, "Aria cycle time: %d", robot->getCycleTime()); + fflush(stdout); +} + +int main(int argc, char** argv) +{ + // set up our simpleConnector + ArSimpleConnector simpleConnector(&argc, argv); + // robot + ArRobot robot; + // a key handler so we can do our key handling + ArKeyHandler keyHandler; + + ArLog::init(ArLog::StdOut,ArLog::Verbose); + + // if there are more arguments left then it means we didn't + // understand an option + if (!simpleConnector.parseArgs() || argc > 1) + { + simpleConnector.logOptions(); + keyHandler.restore(); + exit(1); + } + + // mandatory init + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Terse, NULL, true); + + // let the global aria stuff know about it + Aria::setKeyHandler(&keyHandler); + // toss it on the robot + robot.attachKeyHandler(&keyHandler); + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + keyHandler.restore(); + return 1; + } + + // turn on the motors for the velocity response test + robot.comInt(ArCommands::ENABLE, 1); + velTime.setToNow(); + + // turn off the sonar + robot.comInt(ArCommands::SONAR, 0); + + ArGlobalFunctor1 userTaskCB(&userTask, &robot); + robot.addUserTask("iotest", 100, &userTaskCB); + + robot.comInt(ArCommands::IOREQUEST, 1); + requestTime.setToNow(); + + //start the robot running, true so that if we lose connection the run stops + robot.run(true); + + // now exit + Aria::shutdown(); + return 0; + + +} + diff --git a/Legacy/Aria/tests/joytest-vc2008.vcproj b/Legacy/Aria/tests/joytest-vc2008.vcproj new file mode 100644 index 0000000..6a410c2 --- /dev/null +++ b/Legacy/Aria/tests/joytest-vc2008.vcproj @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/joytest.cpp b/Legacy/Aria/tests/joytest.cpp new file mode 100644 index 0000000..bf397d5 --- /dev/null +++ b/Legacy/Aria/tests/joytest.cpp @@ -0,0 +1,83 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This program just outputs the values from the joystick +*/ +int main(void) +{ + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Verbose); + ArJoyHandler joy; + joy.init(); + unsigned int i; + double x, y, z; + int xi, yi, zi; + if (!joy.haveJoystick()) + { + printf("Did not definitely detect a joystick, it may not work.\n"); + } + printf("Num. Buttons: %d\n", joy.getNumButtons()); + printf("Num. Axes: %d\n", joy.getNumAxes()); + if (joy.haveZAxis()) + printf("The Z axis (Axis 3, the throttle) works\n"); + else + printf("The Z axis (Axis 3, the throttle) may or may not work (it'll show up below if it does)\n"); + + puts("Press button 1 to set speeds to 100,100,100, button 2 for 1000,100,50"); + + while (Aria::getRunning()) + { + printf("\rButton "); + for (i = 1; i <= joy.getNumButtons(); i++) + printf(" %d:%d", i, joy.getButton(i)); + + joy.getDoubles(&x, &y, &z); + joy.getAdjusted(&xi, &yi, &zi); + printf(" Axis x:%6.3f y:%6.3f (adj x:%d y:%d)", x, y, xi, yi); + if (joy.haveZAxis()) + printf(" z:%6.3f (adj %d)", z, zi); + for (i = 4; i < joy.getNumAxes(); i++) + printf(" %d:%6.3f", i, joy.getAxis(i)); + + if(joy.getNumButtons() >= 1 && joy.getButton(1)) + { + printf(" ->setSpeeds(100,100,100);"); + joy.setSpeeds(100,100,100); + } + else if (joy.getNumButtons() >= 2 && joy.getButton(2)) + { + printf(" ->setSpeeds(1000,100,50);"); + joy.setSpeeds(1000,100,50); + } + else + printf(" "); + fflush(stdout); + ArUtil::sleep(1); + } + +} diff --git a/Legacy/Aria/tests/joytest.vcproj b/Legacy/Aria/tests/joytest.vcproj new file mode 100644 index 0000000..9c1d84d --- /dev/null +++ b/Legacy/Aria/tests/joytest.vcproj @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/keyHandlerTest.cpp b/Legacy/Aria/tests/keyHandlerTest.cpp new file mode 100644 index 0000000..781b7d2 --- /dev/null +++ b/Legacy/Aria/tests/keyHandlerTest.cpp @@ -0,0 +1,93 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArKeyHandler keyHandler; + +void up(void) +{ + printf("Up\n"); +} + +void down(void) +{ + printf("Down\n"); +} + +void right(void) +{ + printf("Right\n"); +} + +void left(void) +{ + printf("Left\n"); +} + +void escape(void) +{ + printf("Escape\n"); + printf("exiting\n"); + keyHandler.restore(); + Aria::shutdown(); + exit(0); +} + +void space(void) +{ + printf("Space\n"); +} + +void a(void) +{ + printf("a\n"); +} + + +int main(int argc, char **argv) +{ + Aria::init(); + ArGlobalFunctor upCB(&up); + ArGlobalFunctor downCB(&down); + ArGlobalFunctor aCB(&a); + ArGlobalFunctor escapeCB(&escape); + ArGlobalFunctor spaceCB(&space); + + puts("Adding key handlers for: up, down, escape (also exits program), space, 'a', 'a' (again; should warn)"); + keyHandler.addKeyHandler(ArKeyHandler::UP, &upCB); + keyHandler.addKeyHandler(ArKeyHandler::DOWN, &downCB); + keyHandler.addKeyHandler(ArKeyHandler::ESCAPE, &escapeCB); + keyHandler.addKeyHandler(ArKeyHandler::SPACE, &spaceCB); + keyHandler.addKeyHandler('a', &aCB); + keyHandler.addKeyHandler('a', &aCB); + + + while (1) + { + keyHandler.checkKeys(); + ArUtil::sleep(100); + } +} diff --git a/Legacy/Aria/tests/keys.cpp b/Legacy/Aria/tests/keys.cpp new file mode 100644 index 0000000..6492a32 --- /dev/null +++ b/Legacy/Aria/tests/keys.cpp @@ -0,0 +1,137 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + #include "Aria.h" + +int main(int argc, char **argv) +{ + int key; + ArKeyHandler keyHandler; + Aria::init(); + + printf("type away... (ESC to quit)\n"); + while (1) + { + //keyHandler.checkKeys(); + key = keyHandler.getKey(); + if(key == -1) + { + ArUtil::sleep(100); + continue; + } + printf("keyHandler.getKey() returned %d.\n", key); + switch (key) { + case ArKeyHandler::UP: + printf("Up\n"); + break; + case ArKeyHandler::DOWN: + printf("Down\n"); + break; + case ArKeyHandler::LEFT: + printf("Left\n"); + break; + case ArKeyHandler::RIGHT: + printf("Right\n"); + break; + case ArKeyHandler::ESCAPE: + printf("Escape\n"); + printf("Exiting\n"); + keyHandler.restore(); + exit(0); + case ArKeyHandler::F1: + printf("F1\n"); + break; + case ArKeyHandler::F2: + printf("F2\n"); + break; + case ArKeyHandler::F3: + printf("F3\n"); + break; + case ArKeyHandler::F4: + printf("F4\n"); + break; + case ArKeyHandler::F5: + printf("F5\n"); + break; + case ArKeyHandler::F6: + printf("F6\n"); + break; + case ArKeyHandler::F7: + printf("F7\n"); + break; + case ArKeyHandler::F8: + printf("F8\n"); + break; + case ArKeyHandler::F9: + printf("F9\n"); + break; + case ArKeyHandler::F10: + printf("F10\n"); + break; + case ArKeyHandler::F11: + printf("F11\n"); + break; + case ArKeyHandler::F12: + printf("F12\n"); + break; + case ArKeyHandler::HOME: + printf("HOME\n"); + break; + case ArKeyHandler::END: + printf("END\n"); + break; + case ArKeyHandler::INSERT: + printf("INSERT\n"); + break; + case ArKeyHandler::DEL: + printf("DELETE\n"); + break; + case ArKeyHandler::PAGEUP: + printf("PAGEUP\n"); + break; + case ArKeyHandler::PAGEDOWN: + printf("PAGEDOWN\n"); + break; + case ArKeyHandler::SPACE: + printf("Space\n"); + break; + case ArKeyHandler::TAB: + printf("Tab\n"); + break; + case ArKeyHandler::ENTER: + printf("Enter\n"); + break; + case ArKeyHandler::BACKSPACE: + printf("Backspace\n"); + break; + case -1: + ArUtil::sleep(1); + break; + default: + printf("'%c' %d\n", key, key); + break; + } + } +} diff --git a/Legacy/Aria/tests/lineTest.cpp b/Legacy/Aria/tests/lineTest.cpp new file mode 100644 index 0000000..a7ea0f5 --- /dev/null +++ b/Legacy/Aria/tests/lineTest.cpp @@ -0,0 +1,158 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include "ariaUtil.h" + +void testIntersection(ArLine *line1, ArLine *line2, double x, double y, + char *name) +{ + ArPose pose; + + if (!line1->intersects(line2, &pose) || fabs(pose.getX() - x) > .001 || + fabs(pose.getY() - y) > .001) + { + printf("%s didn't intersect\n", name); + exit(1); + } + + if (line1->intersects(line1, &pose)) + { + printf("First line of %s intersected itself\n", name); + exit(1); + } + + if (line2->intersects(line2, &pose)) + { + printf("Second line of %s intersected itself\n", name); + exit(1); + } +} + +void testIntersection(ArLineSegment *line1, ArLine *line2, double x, double y, + char *name) +{ + ArPose pose; + + if (!line1->intersects(line2, &pose) || fabs(pose.getX() - x) > .001 || + fabs(pose.getY() - y) > .001) + { + printf("%s didn't intersect\n", name); + exit(1); + } + + if (line1->intersects(line1, &pose)) + { + printf("First line of %s intersected itself\n", name); + exit(1); + } + + if (line2->intersects(line2, &pose)) + { + printf("Second line of %s intersected itself\n", name); + exit(1); + } +} + +void testIntersection(ArLineSegment *line1, ArLineSegment *line2, + double x, double y, char *name) +{ + ArPose pose; + + if (!line1->intersects(line2, &pose) || fabs(pose.getX() - x) > .001 || + fabs(pose.getY() - y) > .001) + { + printf("%s didn't intersect\n", name); + exit(1); + } + + if (line1->intersects(line1, &pose)) + { + printf("First line of %s intersected itself\n", name); + exit(1); + } + + if (line2->intersects(line2, &pose)) + { + printf("Second line of %s intersected itself\n", name); + exit(1); + } +} + +void testPerp(ArLineSegment *segment, ArPose perp, ArPose perpPoint, + char *name) +{ + ArPose pose; + if (!segment->getPerpPoint(perp, &pose) || + fabs(pose.getX() - perpPoint.getX()) > .001 || + fabs(pose.getY() - perpPoint.getY()) > .001) + { + printf("%s wasn't perp but should have been\n", name); + exit(1); + } +} + +void testNotPerp(ArLineSegment *segment, ArPose perp, char *name) +{ + ArPose pose; + if (segment->getPerpPoint(perp, &pose)) + { + printf("%s was perp but shouldn't have been, at %.0f %.0f\n", name, + pose.getX(), pose.getY()); + exit(1); + } +} + +int main(void) +{ + ArPose pose; + + ArLine xLine(-2000, 0, 2000, 0); + ArLine yLine(100, 500, 100, -500); + ArLineSegment xLineSeg(-2000, 0, 2000, 0); + ArLineSegment yLineSeg(100, 500, 100, -500); + + // test all our segments + testIntersection(&xLine, &yLine, 100, 0, "xLine and yLine"); + testIntersection(&xLineSeg, &yLine, 100, 0, "xLineSeg and yLine"); + testIntersection(&yLineSeg, &xLine, 100, 0, "yLineSeg and xLine"); + testIntersection(&xLineSeg, &yLineSeg, 100, 0, "xLineSeg and yLineSeg"); + + + // test the perp on all the segments + testPerp(&xLineSeg, ArPose(-2000, 50), ArPose(-2000, 0), "xLineSeg end1"); + testPerp(&xLineSeg, ArPose(2000, 50), ArPose(2000, 0), "xLineSeg end2"); + testPerp(&xLineSeg, ArPose(357, 50), ArPose(357, 0), "xLineSeg middle"); + testNotPerp(&xLineSeg, ArPose(2001, 0), "xLineSeg beyond end2"); + testNotPerp(&xLineSeg, ArPose(3000, 0), "xLineSeg way beyond end2"); + testNotPerp(&xLineSeg, ArPose(-2001, 0), "xLineSeg beyond end1"); + testNotPerp(&xLineSeg, ArPose(-3000, 0), "xLineSeg way beyond end1"); + + testPerp(&xLineSeg, ArPose(1000, 0), ArPose(1000, 0), "xLineSeg point on line"); + + printf("All tests completed successfully\n"); + + return 0; +} diff --git a/Legacy/Aria/tests/lms2xxTest.cpp b/Legacy/Aria/tests/lms2xxTest.cpp new file mode 100644 index 0000000..a43f320 --- /dev/null +++ b/Legacy/Aria/tests/lms2xxTest.cpp @@ -0,0 +1,82 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +// This tests standalone use of the LMS2xx class. +// It first tries connecting to a robot and sending it the command +// to switch on power to the primary laser. Then it connects +// to the SICK LMS2xx using the ArLMS2xx class directly, not using +// ArLaserConnector or ArRobot. + +#include "Aria.h" + +int main(int argc, char **argv) +{ + Aria::init(); + + /* Connect to robot just so we can turn on laser power if neccesary */ + ArArgumentParser parser(&argc, argv); + ArRobot robot; + ArRobotConnector robotConnector(&parser, &robot); + if(robotConnector.connectRobot()) + { + robot.runAsync(true); + ArLog::log(ArLog::Normal, "Connected to robot, issusing LRF_POWER command..."); + robot.comInt(ArCommands::POWER_LRF, 1); + robot.disableSonar(); + } + else + { + ArLog::log(ArLog::Normal, "No robot or unable to connect."); + } + + + /* Now connect to laser. ArRobot is not used. */ + + ArSerialConnection con; + ArLMS2xx laser(0); + con.setPort(ArUtil::COM3); + if(con.open(ArUtil::COM3) != 0) { + ArLog::log(ArLog::Terse, "Error opening serial port %s", con.getPort()); + Aria::exit(1); + } + laser.setDeviceConnection(&con); + laser.setPowerControlled(true); + laser.chooseAutoBaud("38400"); + laser.chooseDegrees("180"); + laser.chooseIncrement("one"); + laser.runAsync(); + if(!laser.blockingConnect()) { + ArLog::log(ArLog::Terse, "Error connecting to SICK LMS2xx on %s", con.getPort()); + Aria::exit(2); + } + while(laser.isConnected()) { + ArUtil::sleep(2000); + ArLog::log(ArLog::Normal, "%d readings/sec.", laser.getReadingCount()); + } + ArLog::log(ArLog::Normal, "Laser disconnected."); + Aria::exit(0); +} + diff --git a/Legacy/Aria/tests/logRobotJoystick.cpp b/Legacy/Aria/tests/logRobotJoystick.cpp new file mode 100644 index 0000000..26ca9b8 --- /dev/null +++ b/Legacy/Aria/tests/logRobotJoystick.cpp @@ -0,0 +1,75 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +void task(ArRobotJoyHandler *j) +{ + if(j->gotData()) + { + double x, y, z; + j->getDoubles(&x, &y, &z); + ArLog::log(ArLog::Normal, "x: %.3f, y: %.3f, z:%.3f, button1: %d, button2: %d", + x, y, z, j->getButton1(), j->getButton2()); + } + else + ArLog::log(ArLog::Normal, "no joystick data."); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotJoyHandler j(&robot); + + robot.addUserTask("joylog", 5, new ArGlobalFunctor1(&task, &j)); + + // Connect to the robot, get some initial data from it such as type and name, + // and then load parameter files for this robot. + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + robot.run(true); + + Aria::exit(0); +} diff --git a/Legacy/Aria/tests/logSIPData.cpp b/Legacy/Aria/tests/logSIPData.cpp new file mode 100644 index 0000000..fa875c4 --- /dev/null +++ b/Legacy/Aria/tests/logSIPData.cpp @@ -0,0 +1,235 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +/* + * This is useful as a diagnostic tool, plus it shows all the many accessor + * methods of ArRobot for robot state. It makes the robot wander, using sonar + * to avoid obstacles, and prints out various pieces of robot state information + * each second. Refer to the ARIA ArRobot documentation and to your robot manual + * (section on standard ARCOS SIP packet contents) for details on the data. + */ + + + +/* function to display a byte as a string of 8 '1' and '0' characters. */ +std::string byte_as_bitstring(char byte) +{ + char tmp[9]; + int bit; + int ch; + for(bit = 7, ch = 0; bit >= 0; bit--,ch++) + tmp[ch] = ((byte>>bit)&1) ? '1' : '0'; + tmp[8] = 0; + return std::string(tmp); +} + +/* function to display a 2-byte int as a string of 16 '1' and '0' characters. */ +std::string int_as_bitstring(ArTypes::Byte2 n) +{ + char tmp[17]; + int bit; + int ch; + for(bit = 15, ch = 0; bit >= 0; bit--, ch++) + tmp[ch] = ((n>>bit)&1) ? '1' : '0'; + tmp[16] = 0; + return std::string(tmp); +} + +/* Some events might only be detectable in one robot cycle, not over the + * 1-second period that the main thread sleeps. This cycle callback will detect + * those and save them in some global variables. */ +bool wasLeftMotorStalled = false; +bool wasRightMotorStalled = false; +ArTypes::UByte2 cumulativeStallVal = 0; +ArTypes::UByte2 cumulativeRobotFlags = 0; +bool wasLeftIRTriggered = false; +bool wasRightIRTriggered = false; +bool wasEStopTriggered = false; + +bool cycleCallback(ArRobot* robot) +{ + cumulativeStallVal |= robot->getStallValue(); + wasLeftMotorStalled = wasLeftMotorStalled || robot->isLeftMotorStalled(); + wasRightMotorStalled = wasRightMotorStalled || robot->isRightMotorStalled(); + wasEStopTriggered = wasEStopTriggered || robot->getEstop(); + wasLeftIRTriggered = wasLeftIRTriggered || (robot->hasTableSensingIR() && robot->isLeftTableSensingIRTriggered()); + wasRightIRTriggered = wasRightIRTriggered || (robot->hasTableSensingIR() && robot->isRightTableSensingIRTriggered()); + return true; +} + + +/* main function */ +int main(int argc, char **argv) +{ + // robot and devices + ArRobot robot; + ArSonarDevice sonar; + ArBumpers bumpers; + ArIRs ir; + + // initialize aria and aria's logging destination and level + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + + // connector + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobotConnector connector(&parser, &robot); + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::exit(1); + } + + printf("This program will continously print some data and events.\nPress Ctrl-C to exit.\n"); + + // add the range devices to the robot + robot.addRangeDevice(&sonar); + robot.addRangeDevice(&bumpers); + robot.addRangeDevice(&ir); + + // try to connect, if we fail exit + if (!connector.connectRobot()) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + return 1; + } + + // turn on the motors, sonar, turn off amigobot sound effects (for old h8-model amigobots) + robot.enableMotors(); + robot.comInt(ArCommands::SOUNDTOG, 0); + robot.comInt(ArCommands::SONAR, 1); + + // Cycle callback to check for events + robot.addUserTask("checkevents", 1, new ArGlobalRetFunctor1(&cycleCallback, &robot)); + + // start the robot running, true means that if we lose robot connection the + // ArRobot runloop stops + robot.runAsync(true); + + // Print data header +#define HEADFORMAT "%-24s %-5s %-16s %-5s %-6s %-6s %-16s %-8s %-8s %-8s %-8s %-8s %-8s %-10s %-10s %-5s %-5s %s" +#define DATAFORMAT "%-24s %03.02f %-16s %-5s %-6s %-6s %-16s %-8d %-8d %-8g %-8g %-8s %-8s %-10lu %-10lu %-5s %-5s" // doesn't include bumps details on end + printf("\n" HEADFORMAT "\n\n", + "Time", + "Volts", + "Flags", + "EStop", + "StallL", + "StallR", + "StallVal", + "#SIP/sec", + "#Son/sec", + "Vel L", + "Vel R", + "DigIns", + "DigOuts", + "Enc L", + "Enc R", + "IR L", + "IR R", + "Cur Bumps, (Last Bump Pose)" + ); + + // Request that we will want encoder data + robot.requestEncoderPackets(); + + // Print data every second + char timestamp[24]; + while(robot.isRunning()) { + robot.lock(); + time_t t = time(NULL); + strftime(timestamp, 24, "%Y-%m-%d %H:%M:%S", localtime(&t)); + printf( DATAFORMAT, + timestamp, + robot.getRealBatteryVoltage(), + int_as_bitstring(cumulativeRobotFlags).c_str(), + (wasEStopTriggered ? "YES" : " "), + (wasLeftMotorStalled?"YES":" "), + (wasRightMotorStalled?"YES":" "), + int_as_bitstring(cumulativeStallVal).c_str(), + robot.getMotorPacCount(), + robot.getSonarPacCount(), + robot.getLeftVel(), + robot.getRightVel(), + byte_as_bitstring(robot.getDigIn()).c_str(), + byte_as_bitstring(robot.getDigOut()).c_str(), + robot.getLeftEncoder(), + robot.getRightEncoder(), + wasLeftIRTriggered?"YES": " ", + wasRightIRTriggered?"YES":" " + ); + + // list indices of bumpers flaged in stallval + // skip the last bit which is a motor stall flag + ArTypes::UByte2 bumpmask = ArUtil::BIT15; + int bump = 0; + for(int bit = 16; bit > 0; bit--) + { + if(bit == 9) // this is also a motor stall bit + { + bumpmask = bumpmask >> 1; + bit--; + continue; + } + //printf("\n\tComparing stallval=%s to bumpmask=%s... ", int_as_bitstring(stallval).c_str(), int_as_bitstring(bumpmask).c_str()); + if(cumulativeStallVal & bumpmask) + printf("%d ", bump); + bumpmask = bumpmask >> 1; + bump++; + } + + // print pose of last bump sensor reading + const std::list* bumpsensed = bumpers.getCurrentBuffer(); + if(bumpsensed) + { + //printf("%d readings. ", bumpsensed->size()); + if(bumpsensed->size() > 0 && bumpsensed->front()) { + printf("(%.0f,%.0f)", bumpsensed->front()->getX(), bumpsensed->front()->getY()); + } + } + puts(""); + + if(robot.areSonarsEnabled()) + puts("Sonars Enabled."); + else + puts("Sonars Not Enabled."); + + // clear events to accumulate for the next second + cumulativeRobotFlags = cumulativeStallVal = 0; + wasLeftMotorStalled = wasRightMotorStalled = wasLeftIRTriggered = wasRightIRTriggered = wasEStopTriggered = false; + + robot.unlock(); + ArUtil::sleep(1000); + } + + // robot cycle stopped, probably because of lost robot connection + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/logSIPs.cpp b/Legacy/Aria/tests/logSIPs.cpp new file mode 100644 index 0000000..68fcb09 --- /dev/null +++ b/Legacy/Aria/tests/logSIPs.cpp @@ -0,0 +1,75 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + robot.setLogSIPContents(true); + + // Connect to the robot, get some initial data from it such as type and name, + // and then load parameter files for this robot. + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + ArActionGroupRatioDrive driveAct(&robot); + driveAct.activate(); + + robot.enableMotors(); + + robot.runAsync(true); + + while(true) + { + ArUtil::sleep(100); + robot.lock(); + int f = robot.getFlags(); + printf("Charging power good: %d, E-Stall Engaged: %d, Motors Enabled: %d, Stop Button Pressed: %d, Pioner Sonar Array 1: %d\n", f&ArUtil::BIT10, f&ArUtil::BIT6, f&ArUtil::BIT0, f&ArUtil::BIT5, f&ArUtil::BIT1); + robot.unlock(); + } + robot.waitForRunExit(); + + Aria::exit(0); +} diff --git a/Legacy/Aria/tests/mapTest-vc2003.vcproj b/Legacy/Aria/tests/mapTest-vc2003.vcproj new file mode 100644 index 0000000..34dcf6c --- /dev/null +++ b/Legacy/Aria/tests/mapTest-vc2003.vcproj @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/mapTest.cpp b/Legacy/Aria/tests/mapTest.cpp new file mode 100644 index 0000000..5e24727 --- /dev/null +++ b/Legacy/Aria/tests/mapTest.cpp @@ -0,0 +1,170 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +void mapChanged(void) +{ + printf("mapTest: # Map changed\n"); +} + +int main(int argc, char **argv) +{ + + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Verbose); + + ArMap testMap; + + ArTime timer; + + ArGlobalFunctor mapChangedCB(&mapChanged); + testMap.addMapChangedCB(&mapChangedCB); + + + if (argc <= 1) + { + printf("mapTest: Usage %s \n", argv[0]); + Aria::exit(1); + } + + timer.setToNow(); + if (!testMap.readFile(argv[1])) + { + printf("mapTest: Could not read map '%s'\n", argv[1]); + Aria::exit(2); + } + printf("mapTest: Took %ld ms to read file\n", timer.mSecSince()); +/* + printf("mapTest: ChangeTimes (in ms): mapObjects %ld points %ld mapInfo %ld\n", + testMap.getMapObjectsChanged().mSecSince(), + testMap.getPointsChanged().mSecSince(), + testMap.getMapInfoChanged().mSecSince()); +*/ + timer.setToNow(); + if(!testMap.writeFile("mapTest.map")) + { + printf("mapTest: Error could not write new map to mapTest.map"); + Aria::exit(3); + } + printf("mapTest: Took %ld ms to write file mapTest.map\n", timer.mSecSince()); + + std::list::iterator objIt; + ArMapObject *obj; + for (objIt = testMap.getMapObjects()->begin(); + objIt != testMap.getMapObjects()->end(); + objIt++) + { + obj = (*objIt); + printf("mapTest: Map object: %s named \"%s\". Pose: %0.2f,%0.2f,%0.2f. ", obj->getType(), obj->getName(), obj->getPose().getX(), obj->getPose().getY(), obj->getPose().getTh()); + if(obj->hasFromTo()) + printf("mapTest: Extents: From %0.2f,%0.2f to %0.2f,%0.2f.", obj->getFromPose().getX(), obj->getFromPose().getY(), obj->getToPose().getX(), obj->getToPose().getY()); + printf("mapTest: \n"); + +/* + if (strcasecmp(obj->getType(), "Goal") == 0 || + strcasecmp(obj->getType(), "GoalWithHeading") == 0) + { + printf("mapTest: Map object: Goal %s\n", obj->getName()); + } + else if (strcasecmp(obj->getType(), "ForbiddenLine") == 0 && + obj->hasFromTo()) + { + printf("mapTest: Map object: Forbidden line from %.0f %.0f to %.0f %.0f\n", + obj->getFromPose().getX(), obj->getFromPose().getY(), + obj->getToPose().getX(), obj->getToPose().getY()); + } + +*/ + + } + + std::list* objInfo = testMap.getMapInfo(); + for(std::list::const_iterator i = objInfo->begin(); + i != objInfo->end(); + i++) + { + printf("mapTest: MapInfo object definition:\n----\n"); + (*i)->log(); + printf("mapTest: ----\n"); + } + + printf("mapTest: First 5 data points:\n"); + std::vector::iterator pIt; + ArPose pose; + int n = 0; + for (pIt = testMap.getPoints()->begin(); + pIt != testMap.getPoints()->end(); + pIt++) + { + pose = (*pIt); + if (n > 5) + exit(0); + printf("mapTest: \t%.0f %.0f\n", pose.getX(), pose.getY()); + n++; + // the points are gone through + } + + if (argc >= 3) + { + timer.setToNow(); + if (!testMap.readFile(argv[2])) + { + printf("mapTest: Could not read map '%s'\n", argv[2]); + } + printf("mapTest: Took %ld ms to read file2\n", timer.mSecSince()); +/* + ArUtil::sleep(30); + printf("mapTest: ChangeTimes (in ms): mapObjects %ld points %ld mapInfo %ld\n", + testMap.getMapObjectsChanged().mSecSince(), + testMap.getPointsChanged().mSecSince(), + testMap.getMapInfoChanged().mSecSince()); +*/ + timer.setToNow(); + testMap.writeFile("mapTest2.map"); + printf("mapTest: Took %ld ms to write file2\n", timer.mSecSince()); + } + + // now test it with the config stuff + ArArgumentBuilder builder; + builder.setExtraString("Map"); + builder.add(argv[1]); + printf("mapTest: Trying config with map (%s)\n", argv[1]); + Aria::getConfig()->parseArgument(&builder); + Aria::getConfig()->callProcessFileCallBacks(true, NULL, 0); + printf("mapTest: Trying config again with same map (%s)\n", argv[1]); + Aria::getConfig()->parseArgument(&builder); + Aria::getConfig()->callProcessFileCallBacks(true, NULL, 0); + if (argc >= 3) + { + ArArgumentBuilder builder2; + builder2.setExtraString("Map"); + builder2.add(argv[2]); + printf("mapTest: Trying config with map2 (%s)\n", argv[2]); + Aria::getConfig()->parseArgument(&builder2); + Aria::getConfig()->callProcessFileCallBacks(true, NULL, 0); + } + +} diff --git a/Legacy/Aria/tests/mathTests.cpp b/Legacy/Aria/tests/mathTests.cpp new file mode 100644 index 0000000..46d3bd1 --- /dev/null +++ b/Legacy/Aria/tests/mathTests.cpp @@ -0,0 +1,46 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ariaUtil.h" +#include +#include +#include + +/* Also see angleBetweenTest.cpp, angleFixTest.cpp and anglesTest.cpp for the angle comparison functions. */ + +int main(int argc, char ** argv) +{ + // Check that ArMath::roundInt is a correct replacement for rint(): + assert(rint(0.001) == ArMath::roundInt(0.001)); + assert(rint(0.5) == ArMath::roundInt(0.5)); + assert(rint(0.9999) == ArMath::roundInt(0.999)); + assert(rint(0.449) == ArMath::roundInt(0.449)); + assert(rint(999999.9999) == ArMath::roundInt(999999.999)); + assert(ArMath::roundInt(INT_MAX) == INT_MAX); + assert(ArMath::roundInt(INT_MIN) == INT_MIN); + assert(rint(0) == ArMath::roundInt(0)); + assert(rint(0.000000001) == ArMath::roundInt(0.000000001)); +} diff --git a/Legacy/Aria/tests/moduleActionExample.cpp b/Legacy/Aria/tests/moduleActionExample.cpp new file mode 100644 index 0000000..abc5907 --- /dev/null +++ b/Legacy/Aria/tests/moduleActionExample.cpp @@ -0,0 +1,113 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example moduleActionExample.cpp Example demonstrating how to load an ArModule + * + This is a simple program that loads the modules moduleActionExample_Mod and +moduleActionExample_Mod2, which are + defined in moduleActionExample_Mod.cpp and moduleActionExample_Mod2.cpp. These modules + create and add some ArActions to the robot, but your module(s) may do +anything. + This + program simply calls ArModuleLoader::load() with a short message + argument and ArModuleLoader::reload with no argument and finally + calls ArModuleLoader::close(). The return status of the load(), + reload(), and close() are checked and printed out. + ArModuleLoader uses the name of the module file without the platform-specific + suffix (i.e. ".dll" on Windows and ".so" on Linux) to load the module. + + @sa moduleActionExample_Mod.cpp. + @sa moduleActionExample_Mod2.cpp. + @sa ArModuleLoader in the reference manual. +*/ + + +void printStatus(ArModuleLoader::Status status) +{ + if (status == ArModuleLoader::STATUS_ALREADY_LOADED) + ArLog::log(ArLog::Terse, "moduleActionExample: Module already loaded."); + else if (status == ArModuleLoader::STATUS_FAILED_OPEN) + ArLog::log(ArLog::Terse, "moduleActionExample: Failed to find or open the simpleMod module."); + else if (status == ArModuleLoader::STATUS_INVALID) + ArLog::log(ArLog::Terse, "moduleActionExample: Invalid file."); + else if (status == ArModuleLoader::STATUS_INIT_FAILED) + ArLog::log(ArLog::Terse, "moduleActionExample: Module Init failed."); + else if (status == ArModuleLoader::STATUS_SUCCESS) + ArLog::log(ArLog::Terse, "moduleActionExample: Module succedded."); + else if (status == ArModuleLoader::STATUS_EXIT_FAILED) + ArLog::log(ArLog::Terse, "moduleActionExample: Module exit sequence failed."); + else if (status == ArModuleLoader::STATUS_NOT_FOUND) + ArLog::log(ArLog::Terse, "moduleActionExample: Module not found."); + else + ArLog::log(ArLog::Terse, "moduleActionExample: Module returned unknown status!"); + ArLog::log(ArLog::Terse, ""); +} + +int main(int argc, char **argv) +{ + + Aria::init(); + + ArArgumentParser parser(&argc, argv); + // set up our simple connector + ArSimpleConnector simpleConnector(&parser); + ArRobot robot; + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + } + + robot.runAsync(true); + + ArModuleLoader::Status status; + std::string str; + + ArLog::log(ArLog::Terse, "moduleActionExample: Loading the module \"moduleActionExample_Mod\" with a string argument..."); + status=ArModuleLoader::load("./moduleActionExample_Mod", &robot, (char *)"You've loaded a module!"); + printStatus(status); + + ArLog::log(ArLog::Terse, "moduleActionExample: Loading the module \"moduleActionExample_Mod2\" with a string argument..."); + status=ArModuleLoader::load("./moduleActionExample2_Mod", &robot, (char *)"You've loaded a second module!"); + printStatus(status); + + //ArLog::log(ArLog::Terse, "moduleActionExample: Reloading \"moduleActionExample_Mod\" with no argument..."); + //status=ArModuleLoader::reload("./moduleActionExample_Mod", &robot); + //printStatus(status); + + //ArLog::log(ArLog::Terse, "moduleActionExample: Closing \"moduleActionExample_Mod\"..."); + //status=ArModuleLoader::close("./moduleActionExample_Mod"); + //printStatus(status); + + ArUtil::sleep(3000); + + Aria::exit(0); + return(0); +} diff --git a/Legacy/Aria/tests/moduleActionExample2_Mod.cpp b/Legacy/Aria/tests/moduleActionExample2_Mod.cpp new file mode 100644 index 0000000..2193982 --- /dev/null +++ b/Legacy/Aria/tests/moduleActionExample2_Mod.cpp @@ -0,0 +1,79 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example moduleExample_Mod2.cpp + * @brief Example demonstrating how to implement a module with ArModule + * + * This is a second module loaded by moduleExample.cpp. + @sa moduleExample.cpp. + @sa ArModule in the reference manual. +*/ + + +class SimpleMod : public ArModule +{ +public: + + bool init(ArRobot *robot, void *argument = NULL); + bool exit(); + + ArActionLimiterForwards myLimiterForwards; + +}; + +SimpleMod module2; +ARDEF_MODULE(module2); + +bool SimpleMod::init(ArRobot *robot, void *argument) +{ + ArLog::log(ArLog::Normal, "moduleActionExample2_Mod: Robot name is %s", robot->getRobotName()); + ArLog::log(ArLog::Terse, "moduleActionExample2_Mod: init(%p) called in moduleActionExample2_Mod!", robot); + if (argument != NULL) + ArLog::log(ArLog::Terse, "moduleActionExample2_Mod: Argument given to ArModuleLoader::load was the string '%s'.", + (char *)argument); + else + ArLog::log(ArLog::Terse, "moduleActionExample2_Mod: No argument was given to ArModuleLoader (this is OK)."); + + // Do stuff here... + + robot->addAction(&myLimiterForwards, 40); + myLimiterForwards.activate(); + robot->clearDirectMotion(); + robot->enableMotors(); + + return(true); +} + +bool SimpleMod::exit() +{ + ArLog::log(ArLog::Terse, "moduleActionExample2_Mod: exit() called."); + + // Do stuff here... + + return(true); +} diff --git a/Legacy/Aria/tests/moduleActionExample_Mod.cpp b/Legacy/Aria/tests/moduleActionExample_Mod.cpp new file mode 100644 index 0000000..548485b --- /dev/null +++ b/Legacy/Aria/tests/moduleActionExample_Mod.cpp @@ -0,0 +1,94 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/** @example moduleExample_Mod.cpp + * @brief Example demonstrating how to implement a module with ArModule + * + This is a simple example of how to define a module of code that Aria's ArModuleLoader class can dynamically load at runtime. + On Windows, loadable modules are DLL files. On Linux, they are shared object (.so) + files (ARIA's Makefiles can compile any source file ending in "Mod.cpp" into + a .so, so to build this module, run "make moduleExample_Mod.so"). + ArModuleLoader knows about these platform conventions, so only the base name + (without the .dll or .so suffix) is used to load it. + To implement a loadable module, you derive a class from ArModule, + instantiate the pure virtual functions init() and exit(), and create an + instance of that class. The two functions simply print out the equivalent + of Hello World. An important part is the global instance of the class + and the call to the macro ARDEF_MODULE(). Without that macro invocation, + Aria will never be able to invoke those two functions. + + The program moduleExample.cpp is designed to load this module and check the + error return. + + @sa moduleExample.cpp. + @sa ArModule in the reference manual. +*/ + + +class SimpleMod : public ArModule +{ +public: + + bool init(ArRobot *robot, void *argument = NULL); + bool exit(); + + ArActionConstantVelocity myConstantVelocity; + +}; + +SimpleMod module1; +ARDEF_MODULE(module1); + +bool SimpleMod::init(ArRobot *robot, void *argument) +{ + ArLog::log(ArLog::Normal, "moduleActionExample_Mod: Robot name is %s", robot->getRobotName()); + ArLog::log(ArLog::Terse, "moduleActionExample_Mod: init(%p) called in the loaded module!", robot); + if (argument != NULL) + ArLog::log(ArLog::Terse, "moduleActionExample_Mod: Argument given to ArModuleLoader::load was the string '%s'.", + (char *)argument); + else + ArLog::log(ArLog::Terse, "moduleActionExample_Mod: No argument was given to ArModuleLoader (this is OK)."); + + // Do stuff here... + + robot->addAction(&myConstantVelocity, 50); + myConstantVelocity.activate(); + robot->clearDirectMotion(); + robot->enableMotors(); + + return(true); +} + +bool SimpleMod::exit() +{ + ArLog::log(ArLog::Terse, "moduleActionExample_Mod: exit() called."); + + // Do stuff here... + + return(true); +} diff --git a/Legacy/Aria/tests/moveCommandTest.cpp b/Legacy/Aria/tests/moveCommandTest.cpp new file mode 100644 index 0000000..371551f --- /dev/null +++ b/Legacy/Aria/tests/moveCommandTest.cpp @@ -0,0 +1,84 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* Tests the MOVE command */ + +int main(int argc, char **argv) +{ + ArRobot robot; + Aria::init(); + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + return 1; + } + + if (!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "moveCommandTest: Could not connect to robot... exiting."); + return 2; + } + + robot.runAsync(true); + + robot.lock(); + robot.enableMotors(); + robot.unlock(); + + ArLog::log(ArLog::Normal, "moveCommandTest: Sending command to MOVE 500 mm..."); + robot.lock(); + robot.move(500); + robot.unlock(); + ArLog::log(ArLog::Normal, "moveCommandTest: Sleeping for 5 seconds...\n"); + ArUtil::sleep(5000); + + ArLog::log(ArLog::Normal, "moveCommandTest: Sending command to MOVE 2000 mm..."); + robot.lock(); + robot.move(2000); + robot.unlock(); + ArLog::log(ArLog::Normal, "moveCommandTest: Sleeping for 10 seconds...\n"); + ArUtil::sleep(10000); + + ArLog::log(ArLog::Normal, "moveCommandTest: Sending command to MOVE 5000 mm..."); + robot.lock(); + robot.move(5000); + robot.unlock(); + ArLog::log(ArLog::Normal, "moveCommandTest: Sleeping for 15 seconds...\n"); + ArUtil::sleep(15000); + + ArLog::log(ArLog::Normal, "moveCommandTest: Sending command to MOVE 10000 mm... The robot may ignore this command, since the argument is so large."); + robot.lock(); + robot.move(10000); + robot.unlock(); + ArLog::log(ArLog::Normal, "moveCommandTest: Sleeping for 30 seconds...\n"); + ArUtil::sleep(30000); + + ArLog::log(ArLog::Normal, "moveCommandTest: Ending robot thread and exiting."); + robot.stopRunning(); + return 0; +} diff --git a/Legacy/Aria/tests/moveRobotInSim.cpp b/Legacy/Aria/tests/moveRobotInSim.cpp new file mode 100644 index 0000000..c1972ab --- /dev/null +++ b/Legacy/Aria/tests/moveRobotInSim.cpp @@ -0,0 +1,90 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/* Tests SIM_SET_POSE command to move the robot in the simulator. */ + + + +#include "Aria.h" + +void simSetPose(ArRobot *robot, const ArPose& pose) +{ + ArRobotPacket pkt; + pkt.setID(ArCommands::SIM_SET_POSE); + pkt.uByteToBuf(0); + pkt.byte4ToBuf((ArTypes::Byte4)pose.getX()); + pkt.byte4ToBuf((ArTypes::Byte4)pose.getY()); + pkt.byte4ToBuf((ArTypes::Byte4)pose.getTh()); + pkt.finalizePacket(); + printf("-> SIM_SET_POSE %d %d %d\n", (ArTypes::Byte4)pose.getX(), (ArTypes::Byte4)pose.getY(), (ArTypes::Byte4)pose.getTh()); + robot->getDeviceConnection()->write(pkt.getBuf(), pkt.getLength()); + printf("Command sent.\n\n"); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + ArSimpleConnector connector(&parser); + ArRobot robot; + + if (!connector.parseArgs()) + { + connector.logOptions(); + return 1; + } + + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + return 2; + } + printf("Connected to robot.\n"); + + robot.runAsync(true); + + simSetPose(&robot, ArPose(1000, 1000, 90)); + ArUtil::sleep(500); + + simSetPose(&robot, ArPose(1000, -2000, -90)); + ArUtil::sleep(500); + + simSetPose(&robot, ArPose(0, -2000, 180)); + ArUtil::sleep(500); + + simSetPose(&robot, ArPose(8000, 1, 0)); + ArUtil::sleep(500); + + simSetPose(&robot, ArPose(-8000, -1000, 45)); + ArUtil::sleep(500); + + printf("** Done with tests. Sleeping for 3 seconds and then stopping ArRobot thread... **\n"); + ArUtil::sleep(3000); + robot.stopRunning(); + printf("** Exiting. **\n"); + return 0; +} + diff --git a/Legacy/Aria/tests/moveRobotTest.cpp b/Legacy/Aria/tests/moveRobotTest.cpp new file mode 100644 index 0000000..8e989e1 --- /dev/null +++ b/Legacy/Aria/tests/moveRobotTest.cpp @@ -0,0 +1,272 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +class Joydrive +{ +public: + Joydrive(ArRobot *robot, int test); + ~Joydrive(void) {} + + void drive(void); + +protected: + ArJoyHandler myJoyHandler; + ArRobot *myRobot; + int myTest; + time_t myLastPress; +}; + +Joydrive::Joydrive(ArRobot *robot, int test) +{ + myRobot = robot; + myJoyHandler.init(); + myJoyHandler.setSpeeds(100, 700); + + myTest = test; + myLastPress = 0; + if (myJoyHandler.haveJoystick()) + { + printf("Have a joystick\n\n"); + } + else + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + exit(0); + } +} + +void Joydrive::drive(void) +{ + int trans, rot; + ArPose pose; + ArPose rpose; + ArTransform transform; + ArRangeDevice *dev; + ArSensorReading *son; + + if (!myRobot->isConnected()) + { + printf("Lost connection to the robot, exiting\n"); + exit(0); + } + printf("\rx %6.1f y %6.1f th %6.1f", + myRobot->getX(), myRobot->getY(), myRobot->getTh()); + fflush(stdout); + if (myJoyHandler.haveJoystick() && myJoyHandler.getButton(1)) + { + if (ArMath::fabs(myRobot->getVel()) < 10.0) + myRobot->comInt(ArCommands::ENABLE, 1); + myJoyHandler.getAdjusted(&rot, &trans); + myRobot->setVel(trans); + myRobot->setRotVel(-rot); + } + else + { + myRobot->setVel(0); + myRobot->setRotVel(0); + } + if (myJoyHandler.haveJoystick() && myJoyHandler.getButton(2) && + time(NULL) - myLastPress > 1) + { + myLastPress = time(NULL); + printf("\n"); + switch (myTest) + { + case 1: + printf("Moving back to the origin.\n"); + pose.setPose(0, 0, 0); + myRobot->moveTo(pose); + break; + case 2: + printf("Moving over a meter.\n"); + pose.setPose(myRobot->getX() + 1000, myRobot->getY(), 0); + myRobot->moveTo(pose); + break; + case 3: + printf("Doing a transform test....\n"); + printf("\nOrigin should be transformed to the robots coords.\n"); + transform = myRobot->getToGlobalTransform(); + pose.setPose(0, 0, 0); + pose = transform.doTransform(pose); + rpose = myRobot->getPose(); + printf("Pos: "); + pose.log(); + printf("Robot: "); + rpose.log(); + + if (pose.findDistanceTo(rpose) < .1) + printf("Success\n"); + else + printf("#### FAILURE\n"); + + printf("\nRobot coords should be transformed to the origin.\n"); + transform = myRobot->getToLocalTransform(); + pose = myRobot->getPose(); + pose = transform.doTransform(pose); + rpose.setPose(0, 0, 0); + printf("Pos: "); + pose.log(); + printf("Robot: "); + rpose.log(); + if (pose.findDistanceTo(rpose) < .1) + printf("Success\n"); + else + printf("#### FAILURE\n"); + break; + case 4: + printf("Doing a tranform test...\n"); + printf("A point 1 meter to the -x from the robot (in local coords) should be transformed into global coordinates.\n"); + transform = myRobot->getToGlobalTransform(); + pose.setPose(-1000, 0, 0); + pose = transform.doTransform(pose); + rpose = myRobot->getPose(); + printf("Pos: "); + pose.log(); + printf("Robot: "); + rpose.log(); + + if (ArMath::fabs(pose.findDistanceTo(rpose) - 1000.0) < .1) + printf("Probable Success\n"); + else + printf("#### FAILURE\n"); + break; + case 5: + printf("Doing a transform test on range devices..\n"); + printf("Moving the robot +4 meters x and +4 meters y and seeing if the moveTo will move the sonar readings along with it.\n"); + dev = myRobot->findRangeDevice("sonar"); + if (dev == NULL) + { + printf("No sonar on the robot, can't do the test.\n"); + break; + } + printf("Closest sonar reading to the robot is %.0f away\n", dev->currentReadingPolar(1, 0)); + printf("Sonar 0 reading is at "); + son = myRobot->getSonarReading(0); + if (son != NULL) + { + pose = son->getPose(); + pose.log(); + } + pose = myRobot->getPose(); + pose.setX(pose.getX() + 4000); + pose.setY(pose.getY() + 4000); + myRobot->moveTo(pose); + printf("Moved robot.\n"); + printf("Closest sonar reading to the robot is %.0f away\n", dev->currentReadingPolar(1, 0)); + printf("Sonar 0 reading is at "); + son = myRobot->getSonarReading(0); + if (son != NULL) + { + pose = son->getPose(); + pose.log(); + } + + break; + case 6: + printf("Robot position now is:\n"); + pose = myRobot->getPose(); + pose.log(); + printf("Disconnecting from the robot, then reconnecting.\n"); + myRobot->disconnect(); + myRobot->blockingConnect(); + printf("Robot position now is:\n"); + pose = myRobot->getPose(); + pose.log(); + break; + default: + printf("No test for second button.\n"); + break; + } + } +} + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int num; + ArPose pose; + + Aria::init(); + + if (argc != 2) + { + printf("Usage is '%s ' where is one of:\n", argv[0]); + printf("1 Moves the robot back to the origin.\n"); + printf("2 Moves the robot +1 meter in X direction.\n"); + printf("3 Does a transform test, going from the origin to robot and back.\n"); + printf("4 Does a transform test with a point 1 meter to the -x from the robot (ie left).\n"); + printf("5 Does a transform, prints out sonar plar reading before and after.\n"); + printf("6 Disconnects the robot, and reconnects to it.\n"); + exit(1); + } + + num = atoi(argv[1]); + ArTcpConnection con; + ArRobot robot(NULL, false); + Joydrive joyd(&robot, num); + ArFunctorC driveCB(&joyd, &Joydrive::drive); + ArSonarDevice sonar; + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.addUserTask("joydrive", 50, &driveCB); + robot.addRangeDevice(&sonar); + robot.setDeviceConnection(&con); + pose.setPose(4000, 2000, 90); + robot.moveTo(pose); + pose = robot.getPose(); + printf("Position set to, before connect.\n"); + pose.log(); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + pose = robot.getPose(); + printf("Position robot at, after connect.\n"); + pose.log(); + //printf("Position being reset to 0.\n"); + //pose.setPose(0, 0, 0); + //robot.moveTo(pose); + //robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + robot.run(true); + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/mtxIOTest.cpp b/Legacy/Aria/tests/mtxIOTest.cpp new file mode 100644 index 0000000..a00404c --- /dev/null +++ b/Legacy/Aria/tests/mtxIOTest.cpp @@ -0,0 +1,117 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include "ArMTXIO.h" + + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "mtxIOTest: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + ArLog::log(ArLog::Normal, "mtxIOTest: Connected."); + robot.comInt(ArCommands::JOYINFO, 0); + + ArMTXIO mtxIO; + + if(!mtxIO.isEnabled()) + { + ArLog::log(ArLog::Terse, "mtxIOTest: Error opening MTX IO device interface!"); + Aria::exit(4); + } + + robot.runAsync(true); + + ArMTXIO mtxIO2; + if(!mtxIO2.isEnabled()) + { + ArLog::log(ArLog::Terse, "mtxIOTest: Error opening a second MTX IO interface"); + Aria::exit(5); + } + + unsigned char out = 1; + while(true) + { + mtxIO.lock(); + unsigned char cur; + // get current state + if(!mtxIO.getDigitalOutputControl1(&cur)) + { + ArLog::log(ArLog::Terse, "mtxIOTest: Error getting current state of output control 1"); + mtxIO.unlock(); + Aria::exit(2); + } + + // set new state + cur = out; + if(!mtxIO.setDigitalOutputControl1(&cur)) + { + ArLog::log(ArLog::Terse, "mtxIOTest: Error setting state of output control 1"); + mtxIO.unlock(); + Aria::exit(3); + } + + + mtxIO2.lock(); + if(!mtxIO2.setDigitalOutputControl2(&cur)) + { + ArLog::log(ArLog::Terse, "mtxIOTest: Error setting state of output control 2 through second interface object"); + mtxIO.unlock(); + Aria::exit(6); + } + mtxIO2.unlock(); + + mtxIO.unlock(); + ArUtil::sleep(500); + + // shift + out = out << 1; + if(out == 0) out = 1; + } + + + Aria::exit(0); + +} diff --git a/Legacy/Aria/tests/mutexLockWarning-vc2008.vcproj b/Legacy/Aria/tests/mutexLockWarning-vc2008.vcproj new file mode 100644 index 0000000..bbf6b6f --- /dev/null +++ b/Legacy/Aria/tests/mutexLockWarning-vc2008.vcproj @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/mutexLockWarning.cpp b/Legacy/Aria/tests/mutexLockWarning.cpp new file mode 100644 index 0000000..5b06ba1 --- /dev/null +++ b/Legacy/Aria/tests/mutexLockWarning.cpp @@ -0,0 +1,87 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + Aria::init(); + ArMutex mutex; + mutex.setLogName("test mutex"); + ArLog::log(ArLog::Normal, "This test succeeds if three (and only three) mutex lock/unlock time warning follow."); + puts("setting test_mutex warning time to 1 sec"); + mutex.setUnlockWarningTime(1); // 1 sec + puts("locking and unlocking immediately, should not warn..."); + mutex.lock(); + mutex.unlock(); // should not warn + puts("locking and unlocking after 2 sec, should warn..."); + mutex.lock(); + ArUtil::sleep(2000); // 2 sec + mutex.unlock(); // should warn + puts("locking and unlocking after 0.5 sec, should not warn..."); + mutex.lock(); + ArUtil::sleep(500); // 0.5 sec + mutex.unlock(); // should not warn + puts("setting test_mutex warning time to 0.5 sec"); + mutex.setUnlockWarningTime(0.5); // 0.5 sec + puts("locking and unlocking after 0.6 sec, should warn..."); + mutex.lock(); + ArUtil::sleep(600); // 0.6 sec + mutex.unlock(); // should warn + puts("locking and unlocking after 0.2 sec, should not warn..."); + mutex.lock(); + ArUtil::sleep(200); // 0.2 sec + mutex.unlock(); // should not warn + puts("locking and unlocking immediately, should not warn..."); + mutex.lock(); + mutex.unlock(); // should not warn + puts("setting test_mutex warning time to 0.1 sec"); + mutex.setUnlockWarningTime(0.1); // 0.1 sec + puts("locking and unlocking after 0.2 sec, should warn..."); + mutex.lock(); + ArUtil::sleep(200); // 0.2 sec + mutex.unlock(); // should warn + mutex.setUnlockWarningTime(0.0); // off + mutex.lock(); + ArUtil::sleep(100); // should not warn + mutex.unlock(); + + // Create and destroy a few mutexes, locking them, etc. + ArMutex *m1 = new ArMutex(); + m1->setLogName("m1"); + m1->lock(); + ArMutex *m2 = new ArMutex(); + m2->lock(); + m2->setLogName("m2"); + puts("unlocking m1 before destroying it..."); + m1->unlock(); + delete m1; + puts("NOT unlocking m2 before destroying it..."); + delete m2; + + puts("exiting with Aria::exit(0)..."); + Aria::exit(0); +} + diff --git a/Legacy/Aria/tests/nmeaParser.cpp b/Legacy/Aria/tests/nmeaParser.cpp new file mode 100644 index 0000000..636d4cb --- /dev/null +++ b/Legacy/Aria/tests/nmeaParser.cpp @@ -0,0 +1,100 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "ArNMEAParser.h" +#include "assert.h" + +int main(int argc, char **argv) { + + ArNMEAParser nmeaParser; + int result = 0; + + puts(""); + puts("Now testing messages with invalid NMEA format (checksums should be seen as wrong, or messages ignored)."); + char *malformedMessage1 = "$GPRMC,11\r\n99,22$33,44*5*6\n" ; // broken halfway through + char *malformedMessage2 = "xxx\r\nxxxx\r\n"; // not an nmea message, should just be ignored + char *malformedMessage3 = "$*01\r\n"; // missing key contents, except bogus checksum. error. + char *malformedMessage4 = "$GPRMC,11,22,33\r\n"; // missing checksum + char *malformedMessage5 = "$GPRMC,11,22$GPRMC,99,$GPR33MC88,77*01\r**0\n203\r\n"; // overlapping messages + puts("\nMessage 1 of 5 (abrupt end of message)..."); + result = nmeaParser.parse(malformedMessage1, strlen(malformedMessage1)); + assert(result & ArNMEAParser::ParseError); + nmeaParser.parse("\r\n\r\n", 4); + puts("\nMessage 2 of 5 (no NMEA syntactical characters present)..."); + result = nmeaParser.parse(malformedMessage2, strlen(malformedMessage2)); + assert(!(result & ArNMEAParser::ParseError)); + nmeaParser.parse("\r\n\r\n", 4); + puts("\nMessage 3 of 5 (no contents, just start and (bogus) checksum)..."); + result = nmeaParser.parse(malformedMessage3, strlen(malformedMessage3)); + assert(result & ArNMEAParser::ParseError); + nmeaParser.parse("\r\n\r\n", 4); + puts("\nMessage 4 of 5 (missing checksum)..."); + result = nmeaParser.parse(malformedMessage4, strlen(malformedMessage4)); + assert(result & ArNMEAParser::ParseError); + nmeaParser.parse("\r\n\r\n", 4); + puts("\nMessage 5 of 5 (overlapping/corrupted messages)..."); + result = nmeaParser.parse(malformedMessage5, strlen(malformedMessage5)); + assert(result & ArNMEAParser::ParseError); + nmeaParser.parse("\r\n\r\n", 4); + + + puts(""); + puts("Testing a message with a correct checksum. Should be no checksum warnings."); + char *messageWithGoodChecksum = "$HCHDM,123.4,M*2D\r\n"; + result = nmeaParser.parse(messageWithGoodChecksum, strlen(messageWithGoodChecksum)); + assert(!(result & ArNMEAParser::ParseError)); + + puts(""); + puts("Testing messages with incorrect checksums. Should see checksum warnings."); + char *messageWithBadChecksum = "$HCHDM,123.4,M*23\r\n"; + result = nmeaParser.parse(messageWithBadChecksum, strlen(messageWithBadChecksum)); + assert(result & ArNMEAParser::ParseError); + nmeaParser.parse("\r\n\r\n", 4); + messageWithBadChecksum = "$HCHDM,123.4,z*2D\r\n"; + result = nmeaParser.parse(messageWithBadChecksum, strlen(messageWithBadChecksum)); + assert(result & ArNMEAParser::ParseError); + nmeaParser.parse("\r\n\r\n", 4); + + puts(""); + puts("Testing very long message."); + char longMessage[256]; + char c = 'a'; + for(int i = 0; i <= 256; ++i) + { + longMessage[i] = c; + if(c == 'z') c = 'A'; + else if(c == 'Z') c = 'a'; + else ++c; + } + result = nmeaParser.parse(longMessage, 256); + assert(!(result & ArNMEAParser::ParseError)); + assert(!(result & ArNMEAParser::ParseUpdated)); + + + puts(""); + puts("Done."); + return 0; +} diff --git a/Legacy/Aria/tests/optoIOtest.cpp b/Legacy/Aria/tests/optoIOtest.cpp new file mode 100644 index 0000000..e0e91ce --- /dev/null +++ b/Legacy/Aria/tests/optoIOtest.cpp @@ -0,0 +1,275 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +/** This program will step through various test of the analog and digital IO + * on the Versalogic VSBC-6/8 and EBX-12 boards. + **/ + +#include + + +int main(void) +{ + int i, j; + bool EBX12 = true; + + ArVersalogicIO amrioIO; + if (!amrioIO.isEnabled()) + { + printf("Device disabled! Exiting....\n"); + return 0; + } + // double an0, an1, an2, an3, an4, an5, an6, an7; + bool retval; + printf("\nsetting digital banks to outputs\n"); + { + retval = amrioIO.setDigitalBankDirection(0, ArVersalogicIO::DIGITAL_OUTPUT); + printf("Bank 0:\t%d\n", retval); + retval = amrioIO.setDigitalBankDirection(1, ArVersalogicIO::DIGITAL_OUTPUT); + printf("Bank 1:\t%d\n", retval); + if (EBX12) + { + retval = amrioIO.setDigitalBankDirection(2, ArVersalogicIO::DIGITAL_OUTPUT); + printf("Bank 2:\t%d\n", retval); + retval = amrioIO.setDigitalBankDirection(3, ArVersalogicIO::DIGITAL_OUTPUT); + printf("Bank 3:\t%d\n", retval); + } + } + + unsigned char bits[33]; + for (i=0;i<32;i++) + bits[i] = 0x30; + bits[32] = 0x0; + + printf("\nwriting data to banks\n"); + for (i=0;i<4;i++) + { + printf("\r%s", bits); + fflush(stdout); + for (j=0;j<=7;j++) + { + bits[j] = 0x31; + if (!(retval = amrioIO.setDigitalBankOutputs(0, (unsigned char) 1 << j))) + printf("\nretval %d on bit %d\n", retval, j); + else + printf("\r%32s", bits); + bits[j] = 0x30; + fflush(stdout); + ArUtil::sleep(100); +// bits[j] = 0x30; + } + // clear out the last bit + if (!(retval = amrioIO.setDigitalBankOutputs(0, (unsigned char) 0))) + printf("\nretval %d on bit 7\n", retval); + for (j=8;j<=15;j++) + { + bits[j] = 0x31; + if (!(retval = amrioIO.setDigitalBankOutputs(1, (unsigned char) 1 << (j-8)))) + printf("\nretval %d on bit %d\n", retval, j); + else + printf("\r%s", bits); + bits[j] = 0x30; + fflush(stdout); + ArUtil::sleep(100); +// bits[j] = 0x30; + } + // clear out the last bit + if (!(retval = amrioIO.setDigitalBankOutputs(1, (unsigned char) 0))) + printf("\nretval %d on bit 15\n", retval); + if (EBX12) + { + for (j=16;j<=23;j++) + { + bits[j] = 0x31; + if (!(retval = amrioIO.setDigitalBankOutputs(2, (unsigned char) 1 << (j-16)))) + printf("\nretval %d on bit %d\n", retval, j); + else + printf("\r%s", bits); + bits[j] = 0x30; + fflush(stdout); + ArUtil::sleep(100); +// bits[j] = 0x30; + } + // clear out the last bit + if (!(retval = amrioIO.setDigitalBankOutputs(2, (unsigned char) 0))) + printf("\nretval %d on bit 23\n", retval); + for (j=24;j<=31;j++) + { + bits[j] = 0x31; + if (!(retval = amrioIO.setDigitalBankOutputs(3, (unsigned char) 1 << (j-24)))) + printf("\nretval %d on bit %d\n", retval, j); + else + printf("\r%s", bits); + bits[j] = 0x30; + fflush(stdout); + ArUtil::sleep(100); +// bits[j] = 0x30; + } + // clear out the last bit + if (!(retval = amrioIO.setDigitalBankOutputs(3, (unsigned char) 0))) + printf("\nretval %d on bit 31\n", retval); + } + } + for (i=0;i<32;i++) + bits[i] = 0x31; + printf("\n\nsetting all digital outputs high\n"); + if (!(retval = amrioIO.setDigitalBankOutputs(0, 0xFF))) + printf("\nretval %d on bank 0\n", retval); + if (!(retval = amrioIO.setDigitalBankOutputs(1, 0xFF))) + printf("\nretval %d on bank 1\n", retval); + if (EBX12) + { + if (!(retval = amrioIO.setDigitalBankOutputs(2, 0xFF))) + printf("\nretval %d on bank 2\n", retval); + if (!(retval = amrioIO.setDigitalBankOutputs(3, 0xFF))) + printf("\nretval %d on bank 3\n", retval); + } + printf("%s\n", bits); + fflush(stdout); + ArUtil::sleep(2000); + for (i=0;i<32;i++) + bits[i] = 0x30; + printf("\nsetting all digital outputs low\n"); + if (!(retval = amrioIO.setDigitalBankOutputs(0, 0))) + printf("\nretval %d on bank 0\n", retval); + if (!(retval = amrioIO.setDigitalBankOutputs(1, 0))) + printf("\nretval %d on bank 1\n", retval); + if (EBX12) + { + if (!(retval = amrioIO.setDigitalBankOutputs(2, 0))) + printf("\nretval %d on bank 2\n", retval); + if (!(retval = amrioIO.setDigitalBankOutputs(3, 0))) + printf("\nretval %d on bank 3\n", retval); + } + printf("%s\n", bits); + fflush(stdout); + ArUtil::sleep(2000); + + printf("\n\nsetting digital banks to inputs\n"); + { + retval = amrioIO.setDigitalBankDirection(0, ArVersalogicIO::DIGITAL_INPUT); + printf("Bank 0:\t%d\n", retval); + retval = amrioIO.setDigitalBankDirection(1, ArVersalogicIO::DIGITAL_INPUT); + printf("Bank 1:\t%d\n", retval); + if (EBX12) + { + retval = amrioIO.setDigitalBankDirection(2, ArVersalogicIO::DIGITAL_INPUT); + printf("Bank 2:\t%d\n", retval); + retval = amrioIO.setDigitalBankDirection(3, ArVersalogicIO::DIGITAL_INPUT); + printf("Bank 3:\t%d\n", retval); + } + } + + for (i=0;i<32;i++) + bits[i] = 0x30; + printf("\ngetting digital input values\n"); + unsigned char bank; + if (!(retval = amrioIO.getDigitalBankInputs(0, &bank))) + printf("\nretval %d on bank 0\n", retval); + for (i=0;i<8;i++) + if (bank & ( 1 << i )) + bits[i] = 0x31; + if (!(retval = amrioIO.getDigitalBankInputs(1, &bank))) + printf("\nretval %d on bank 1\n", retval); + for (i=0;i<8;i++) + if (bank & ( 1 << i )) + bits[i+8] = 0x31; + if (EBX12) + { + if (!(retval = amrioIO.getDigitalBankInputs(2, &bank))) + printf("\nretval %d on bank 2\n", retval); + for (i=0;i<8;i++) + if (bank & ( 1 << i )) + bits[i+16] = 0x31; + if (!(retval = amrioIO.getDigitalBankInputs(3, &bank))) + printf("\nretval %d on bank 3\n", retval); + for (i=0;i<8;i++) + if (bank & ( 1 << i )) + bits[i+24] = 0x31; + } + printf("Digital input values:\n"); + printf("%s\n", bits); + + printf("\n"); + /* + unsigned char bank0, bank1, bank2, bank3; + printf("Digital Low High An0 An1 An2 An3 An4 An5 An6 An7\n"); + an0 = 0; + an1 = 0; + an2 = 0; + an3 = 0; + an4 = 0; + an5 = 0; + an6 = 0; + an7 = 0; + while(true) + { + if (!amrioIO.getDigitalBankInputs(0, &bank0)) + printf("getDigitalBank 0 failed\n"); + if (!amrioIO.getDigitalBankInputs(1, &bank1)) + printf("getDigitalBank 1 failed\n"); + if (EBX12) + { + if (!amrioIO.getDigitalBankInputs(2, &bank2)) + printf("getDigitalBank 2 failed\n"); + if (!amrioIO.getDigitalBankInputs(3, &bank3)) + printf("getDigitalBank 3 failed\n"); + } + + retval = amrioIO.getAnalogValue(0, &an0); + if (!retval) + printf("an0 failed\n"); + retval = amrioIO.getAnalogValue(1, &an1); + if (!retval) + printf("an1 failed\n"); + retval = amrioIO.getAnalogValue(2, &an2); + if (!retval) + printf("an2 failed\n"); + retval = amrioIO.getAnalogValue(3, &an3); + if (!retval) + printf("an3 failed\n"); + retval = amrioIO.getAnalogValue(4, &an4); + if (!retval) + printf("an4 failed\n"); + retval = amrioIO.getAnalogValue(5, &an5); + if (!retval) + printf("an5 failed\n"); + retval = amrioIO.getAnalogValue(6, &an6); + if (!retval) + printf("an6 failed\n"); + retval = amrioIO.getAnalogValue(7, &an7); + if (!retval) + printf("an7 failed\n"); + printf("\r\t%.2x %.2x", bank0, bank1); + if (EBX12) + printf(" %.2x %.2x", bank2, bank3); + printf(" %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f", an0, an1, an2, an3, an4, an5, an6, an7); + fflush(stdout); + ArUtil::sleep(1000); + } + */ + printf("\n"); + +} diff --git a/Legacy/Aria/tests/p2osSlamTest.cpp b/Legacy/Aria/tests/p2osSlamTest.cpp new file mode 100644 index 0000000..1529cb0 --- /dev/null +++ b/Legacy/Aria/tests/p2osSlamTest.cpp @@ -0,0 +1,144 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArRobot *robot; +ArGripper *grip; +ArSonyPTZ *cam; + +void runCommands(void) +{ + static int state = 0; + static ArTime last; + /* MODIFY THIS TO SEND MORE PACKETS */ + int numToSend = 4; + int i; + + if (last.getSec() != 0 && last.getMSec() != 0 && last.mSecSince() < 8000) + return; + + last.setToNow(); + + for (i = 0; i < numToSend; i++) + robot->comInt(97, state); + + switch (state % 4) { + case 0: + printf("Down Open, Down Left\n"); + cam->panTilt(-90, -45); + grip->liftDown(); + grip->gripOpen(); + break; + case 1: + printf("Up Open, Up Left\n"); + cam->panTilt(-90, 45); + grip->liftUp(); + grip->gripOpen(); + break; + case 2: + printf("Up Closed, Up Right\n"); + cam->panTilt(90, 45); + grip->liftUp(); + grip->gripClose(); + break; + case 3: + printf("Down Closed, Down Right\n"); + cam->panTilt(90, -45); + grip->liftDown(); + grip->gripClose(); + break; + } + + for (i = 0; i < numToSend; i++) + robot->comInt(97, state); + + state++; + + if (numToSend > 0) + printf("Should be at %d times\n", state * numToSend * 2); +} + +/* + This program will just have the robot wander around, it uses some avoidance + routines, then just has a constant velocity. +*/ + +int main(void) +{ + + ArGlobalFunctor func(&runCommands); + // sonar, must be added to the robot + ArSonarDevice sonar; + + // the connection + ArSerialConnection con; + ArActionStallRecover recover; + ArActionBumpers bumpers; + ArActionAvoidFront avoidFront; + ArActionConstantVelocity constantVelocity("Constant Velocity", 400); + + // robot + robot = new ArRobot; + cam = new ArSonyPTZ(robot); + grip = new ArGripper(robot); + + + // mandatory init + Aria::init(); + + // set the port for the connection + con.setPort(); + con.setBaud(38400); + + // set the device connection on the robot + robot->setDeviceConnection(&con); + robot->addUserTask("slam p2os", 50, &func); + + // add the sonar to the robot + robot->addRangeDevice(&sonar); + + // try to connect, if we fail exit + if (!robot->blockingConnect()) + { + printf("Could not connect to robot->.. exiting\n"); + Aria::shutdown(); + return 1; + } + + ArUtil::sleep(100); + robot->addAction(&recover, 100); + robot->addAction(&bumpers, 75); + robot->addAction(&avoidFront, 50); + robot->addAction(&constantVelocity, 25); + + // start the robot running, true so that if we lose connection the run stops + robot->run(true); + + // now exit + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/poseTest.cpp b/Legacy/Aria/tests/poseTest.cpp new file mode 100644 index 0000000..7829f18 --- /dev/null +++ b/Legacy/Aria/tests/poseTest.cpp @@ -0,0 +1,75 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArPose fn1(void) +{ + static ArPose pose; + pose.setX(pose.getX() + 1); + pose.setY(pose.getY() + 1); + pose.setTh(pose.getTh() - 1); + return pose; +} + +void fn2(ArPose pose) +{ + pose.log(); +} + +int main(void) +{ + printf("Entering 100 iterations of incrementing pose X and Y and decrementing Theta..."); + for (int i = 0; i < 100; i++) + fn2(fn1()); + + printf("\nTesting ArPose::operator+(const ArPose&) and ArPose::operator-(const ArPose&)...\n"); + ArPose p1(10, 10, 90); + ArPose p2(10, 10, 45); + ArPose p3(0, 0, 0); + ArPose p4(-20, 0, 360); + ArPose p5(-20, -20, -180); + printf("(10,10,90) + (10,10,90) => "); + (p1 + p1).log(); + printf("(10,10,90) - (10,10,90) => "); + (p1 - p1).log(); + printf("(10,10,90) + (10,10,45) => "); + (p1 + p2).log(); + printf("(10,10,90) + (0,0,0) => "); + (p1 + p3).log(); + printf("(10,10,90) - (0,0,0) => "); + (p1 - p3).log(); + printf("(0,0,0) + (-20,0,360) => "); + (p3 + p4).log(); + printf("(0,0,0) - (-20,0,360) => "); + (p3 - p4).log(); + printf("(10,10,90) + (-20,0,360) => "); + (p1 + p4).log(); + printf("(-20,0,360) + (-20,0,360) => "); + (p4 + p4).log(); + printf("(-20,-20,-180) - (10,10,45) => "); + (p5 - p2).log(); + +} diff --git a/Legacy/Aria/tests/ptzTest.cpp b/Legacy/Aria/tests/ptzTest.cpp new file mode 100644 index 0000000..8fc0c62 --- /dev/null +++ b/Legacy/Aria/tests/ptzTest.cpp @@ -0,0 +1,160 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This is a test of Pan/Tilt/Zoom devices using ArPTZ. +*/ + +#define WAIT 4000 + +void testPan(ArPTZ *ptz, double pos, const char *tag = "") +{ + ArLog::log(ArLog::Normal, "Pan %s %f...", tag, pos); + ptz->pan(pos); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, " => At pan %f.", ptz->getPan()); +} +void testTilt(ArPTZ *ptz, double pos, const char *tag = "") +{ + ArLog::log(ArLog::Normal, "Tilt %s %f...", tag, pos); + ptz->tilt(pos); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, " => At tilt %f.", ptz->getTilt()); +} +void testZoom(ArPTZ *ptz, int pos, const char *tag = "") +{ + ArLog::log(ArLog::Normal, "Zoom %s %d...", tag, pos); + ptz->zoom(pos); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, " => At zoom %d.", ptz->getZoom()); +} + +void testPanRel(ArPTZ *ptz, double pos, const char *tag = "") +{ + ArLog::log(ArLog::Normal, "PanRel %s %f...", tag, pos); + ptz->panRel(pos); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, " => At pan %f.", ptz->getPan()); +} +void testTiltRel(ArPTZ *ptz, double pos, const char *tag = "") +{ + ArLog::log(ArLog::Normal, "TiltRel %s %f...", tag, pos); + ptz->tiltRel(pos); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, " => At tilt %f.", ptz->getTilt()); +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArRobot robot; + ArArgumentParser parser(&argc, argv); + ArRobotConnector con(&parser, &robot); + if (!con.connectRobot()) + { + ArLog::log(ArLog::Terse, "Error connecting to robot."); + Aria::exit(1); + } + if(!Aria::parseArgs()) + { + ArLog::log(ArLog::Terse, "Error parsing program arguments."); + Aria::logOptions(); + Aria::exit(2); + } + + //ArRVisionPTZ ptz(&robot); + ArVCC4 ptz(&robot); + //ArSonyPTZ ptz(&robot); + //ArDPPTU ptz(&robot); + + ArLog::log(ArLog::Normal, "Using robot connection. (Aux. serial port 1)"); + + robot.runAsync(true); + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 0); + robot.comInt(ArCommands::SOUNDTOG, 0); + + if(!ptz.init()) + { + ArLog::log(ArLog::Terse, "Error connecting to and initializing PTZ."); + Aria::exit(3); + } + + // ptz.getRealPanTilt(); // vcc4 only + if(ptz.canGetRealPanTilt()) ArLog::log(ArLog::Normal, "PTU will report real measured pan/tilt positions."); + else ArLog::log(ArLog::Normal, "PTU cannot report real measured pan/tilt positions, will report commanded positions instead."); + testPan(&ptz, ptz.getMaxPosPan(), "max"); + testPan(&ptz, ptz.getMaxNegPan(), "min"); + testPan(&ptz, 45); + testPan(&ptz, -45); + testPan(&ptz, 0); + ArLog::log(ArLog::Normal, "Reset..."); + ptz.reset(); + ArUtil::sleep(WAIT); + testPanRel(&ptz, 45); + testPanRel(&ptz, -45); + testPan(&ptz, 0); + ArLog::log(ArLog::Normal, "Reset..."); + ptz.reset(); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, ""); + + testTilt(&ptz, ptz.getMaxPosTilt(), "max"); + testTilt(&ptz, ptz.getMaxNegTilt(), "min"); + testTilt(&ptz, 45); + testTilt(&ptz, -45); + testTilt(&ptz, 0); + ArLog::log(ArLog::Normal, "Reset..."); + ptz.reset(); + ArUtil::sleep(WAIT); + testTiltRel(&ptz, 45); + testTiltRel(&ptz, -45); + testTilt(&ptz, 0); + ArLog::log(ArLog::Normal, "Reset..."); + ptz.reset(); + ArUtil::sleep(WAIT); + ArLog::log(ArLog::Normal, ""); + + if(ptz.canZoom()) + { + if(ptz.canGetRealZoom()) ArLog::log(ArLog::Normal, "PTZ will report real measured zoom positions."); + else ArLog::log(ArLog::Normal, "PTZ cannot report real measured zoom positions, will report commanded positions instead."); + testZoom(&ptz, ptz.getMaxZoom(), "max"); + testZoom(&ptz, ptz.getMinZoom(), "min"); + testZoom(&ptz, 0); + ptz.reset(); + ArUtil::sleep(WAIT); + } + else + { + ArLog::log(ArLog::Normal, "PTU has no zoom feature."); + } + + + Aria::exit(0); +} + diff --git a/Legacy/Aria/tests/robotConfigPacketReaderTest.cpp b/Legacy/Aria/tests/robotConfigPacketReaderTest.cpp new file mode 100644 index 0000000..175bbdf --- /dev/null +++ b/Legacy/Aria/tests/robotConfigPacketReaderTest.cpp @@ -0,0 +1,76 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +int main(int argc, char **argv) +{ + // set up our simpleConnector + ArSimpleConnector simpleConnector(&argc, argv); + // robot + ArRobot robot; + + Aria::init(); + + // if there are more arguments left then it means we didn't + // understand an option + if (!simpleConnector.parseArgs() || argc > 1) + { + simpleConnector.logOptions(); + exit(1); + } + + ArRobotConfigPacketReader config(&robot); + config.requestPacket(); + + printf("Before connect: %s\n", ArUtil::convertBool(config.hasPacketArrived())); + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::SONAR, 0); + printf("After connect before run %s robot orig %s\n", ArUtil::convertBool(config.hasPacketArrived()), ArUtil::convertBool(robot.getOrigRobotConfig()->hasPacketArrived())); + + robot.runAsync(true); + ArUtil::sleep(1000); + robot.lock(); + printf("1 second after run arrived %s robot orig %s\n", ArUtil::convertBool(config.hasPacketArrived()), ArUtil::convertBool(robot.getOrigRobotConfig()->hasPacketArrived())); + if (config.hasPacketArrived()) + { + config.log(); + printf("Robot maxTransVel %.0f maxRotVel %.0f transAcc %.0f transDecel %.0f rotAcc %.0f rotDecel %.0f\n", robot.getTransVelMax(), robot.getRotVelMax(), robot.getTransAccel(), robot.getTransDecel(), robot.getRotAccel(), robot.getRotDecel()); + } + robot.unlock(); + Aria::shutdown(); + return 0; +} + + + diff --git a/Legacy/Aria/tests/robotListTest.cpp b/Legacy/Aria/tests/robotListTest.cpp new file mode 100644 index 0000000..a7517e5 --- /dev/null +++ b/Legacy/Aria/tests/robotListTest.cpp @@ -0,0 +1,110 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + ArRobot *r; + + ArRobot robot; + printf("%s\n", robot.getName()); + if (strcmp(robot.getName(), "robot") == 0) + printf("SUCCESS: 'robot's name successfully set\n"); + else + { + printf("FAILURE: 'robot's name not successfully set\n"); + exit(1); + } + ArRobot robot2; + printf("%s\n", robot2.getName()); + if (strcmp(robot2.getName(), "robot2") == 0) + printf("SUCCESS: 'robot2's name successfully set\n"); + else + { + printf("FAILURE: 'robot2's name not successfully set\n"); + exit(1); + } + ArRobot robot3; + printf("%s\n", robot3.getName()); + if (strcmp(robot3.getName(), "robot3") == 0) + printf("SUCCESS: 'robot3's name successfully set\n"); + else + { + printf("FAILURE: 'robot3's name not successfully set\n"); + exit(1); + } + + r = Aria::findRobot("robot"); + if (r != NULL && strcmp(r->getName(), "robot") == 0) + printf("SUCCESS: Found a the robot named 'robot' successfully.\n"); + else + { + printf("FAILURE: could not find the robot named 'robot'\n"); + exit(1); + } + + r = Aria::findRobot("Bleargh"); + if (r == NULL) + printf("SUCCESS: didn't find any robot named bleargh\n"); + else + { + printf("FAILURE: found a robot with the name bleargh\n"); + exit(1); + } + + robot.setName(NULL); + printf("Resetting the name of 'robot'\n"); + printf("%s\n", robot.getName()); + if (strcmp(robot.getName(), "robot") == 0) + printf("SUCCESS: 'robot's name successfully reset\n"); + else + { + printf("FAILURE: 'robot's name not successfully reset\n"); + exit(1); + } + + robot2.setName(NULL); + printf("Resetting the name of 'robot2'\n"); + printf("%s\n", robot2.getName()); + if (strcmp(robot2.getName(), "robot2") == 0) + printf("SUCCESS: 'robot2's name successfully reset\n"); + else + { + printf("FAILURE: 'robot2's name not successfully reset\n"); + exit(1); + } + + robot.setName("BobBot"); + printf("Resetting the name of 'robot' to 'BobBot'\n"); + printf("%s\n", robot.getName()); + if (strcmp(robot.getName(), "BobBot") == 0) + printf("SUCCESS: 'robot's name successfully changed to 'BobBot'\n"); + else + { + printf("FAILURE: 'robot's name not successfully changed to 'BobBot'"); + exit(1); + } +} diff --git a/Legacy/Aria/tests/robotPacketHandlerTest.cpp b/Legacy/Aria/tests/robotPacketHandlerTest.cpp new file mode 100644 index 0000000..d68dc12 --- /dev/null +++ b/Legacy/Aria/tests/robotPacketHandlerTest.cpp @@ -0,0 +1,65 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +/* Connects to the robot or sim and logs all packets recieved. + * Adds a packet handler (as the first one) which logs the packet + * data but allows subsequent packet handlers to have the packet as well. + */ + +bool testcb(ArRobotPacket* pkt) +{ + pkt->log(); + return false; +} + +int main(int argc, char **argv) +{ + ArRobot robot; + Aria::init(); + ArSimpleConnector connector(&argc, argv); + if (!Aria::parseArgs()) + { + Aria::logOptions(); + Aria::shutdown(); + return 1; + } + + if (!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Normal, "robotPacketHandlerTest: Could not connect to robot... exiting"); + return 2; + } + + ArLog::log(ArLog::Normal, "robotPacketHandlerTest: Connected."); + + robot.addPacketHandler(new ArGlobalRetFunctor1(&testcb), ArListPos::FIRST); + + robot.run(true); + + return 0; +} diff --git a/Legacy/Aria/tests/rotVelActionExample.cpp b/Legacy/Aria/tests/rotVelActionExample.cpp new file mode 100644 index 0000000..1e6afc2 --- /dev/null +++ b/Legacy/Aria/tests/rotVelActionExample.cpp @@ -0,0 +1,310 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* +This demonstrates how to make actions using rot vel and how to use them. +It creates two actions, Go and Turn... Go will drive the robot forward safely, +while Turn will avoid obstacles by turning. + +Each of these actions have the normal constructor and destructor, note that +the constructors use constructor chaining to create their ArAction part +correctly. Each action then also implements the needed fire function, this +fire function is where the robot is driven from. + +Also note that each of these actions override the setRobot function, their +implementation grabs the sonar device from the robot in addition to doing the +needed caching of the robot pointer. This is what you should do if you +care about the presence or absence of a particular sensor. If you don't +care about any particular sensor you could just use one of the +ArRobot::checkRangeDevice functions (there are four of them). + +Also note that these are very naive actions, they are simply an example +of how to use actions. +*/ + +class ActionGo : public ArAction +{ +public: + // constructor, sets myMaxSpeed and myStopDistance + ActionGo(double maxSpeed, double stopDistance); + // destructor, its just empty, we don't need to do anything + virtual ~ActionGo(void) {}; + // fire, this is what the resolver calls to figure out what this action wants + virtual ArActionDesired *fire(ArActionDesired currentDesired); + // sets the robot pointer, also gets the sonar device + virtual void setRobot(ArRobot *robot); +protected: + // this is to hold the sonar device form the robot + ArRangeDevice *mySonar; + // what the action wants to do + ArActionDesired myDesired; + // maximum speed + double myMaxSpeed; + // distance to stop at + double myStopDistance; +}; + + +class ActionTurn : public ArAction +{ +public: + // constructor, sets the turnThreshold, and rotVel + ActionTurn(double turnThreshold, double rotVel); + // destructor, its just empty, we don't need to do anything + virtual ~ActionTurn(void) {}; + // fire, this is what the resolver calls to figure out what this action wants + virtual ArActionDesired *fire(ArActionDesired currentDesired); + // sets the robot pointer, also gets the sonar device + virtual void setRobot(ArRobot *robot); +protected: + // this is to hold the sonar device form the robot + ArRangeDevice *mySonar; + // what the action wants to do + ArActionDesired myDesired; + // distance at which to start turning + double myTurnThreshold; + // amount to turn when turning is needed + double myTurnAmount; + // value ot hold onto so turns are smooth, which direction its turning + int myTurning; // -1 == left, 1 == right, 0 == none +}; + + +/* + This is the constructor, note the use of constructor chaining with the + ArAction... also note how it uses setNextArgument, which makes it so that + other things can see what parameters this action has, and set them. + It also initializes the classes variables. +*/ +ActionGo::ActionGo(double maxSpeed, double stopDistance) : + ArAction("Go") +{ + mySonar = NULL; + myMaxSpeed = maxSpeed; + myStopDistance = stopDistance; + setNextArgument(ArArg("maximum speed", &myMaxSpeed, "Maximum speed to go.")); + setNextArgument(ArArg("stop distance", &myStopDistance, "Distance at which to stop.")); +} + +/* + Sets the myRobot pointer (all setRobot overloaded functions must do this), + finds the sonar device from the robot, and if the sonar isn't there, + then it deactivates itself. +*/ +void ActionGo::setRobot(ArRobot *robot) +{ + myRobot = robot; + mySonar = myRobot->findRangeDevice("sonar"); + if (mySonar == NULL) + deactivate(); +} + +/* + This fire is the whole point of the action. +*/ +ArActionDesired *ActionGo::fire(ArActionDesired currentDesired) +{ + double range; + double speed; + + // reset the actionDesired (must be done) + myDesired.reset(); + + // if the sonar is null we can't do anything, so deactivate + if (mySonar == NULL) + { + deactivate(); + return NULL; + } + + // get the range off the sonar + range = mySonar->currentReadingPolar(-70, 70) - myRobot->getRobotRadius(); + // if the range is greater than the stop distance, find some speed to go + if (range > myStopDistance) + { + // just an arbitrary speed based on the range + speed = range * .3; + // if that speed is greater than our max, cap it + if (speed > myMaxSpeed) + speed = myMaxSpeed; + // now set the velocity + myDesired.setVel(speed); + } + // the range was less than the sop distance, so just stop + else + { + myDesired.setVel(0); + } + // return a pointer to the actionDesired, so resolver knows what to do + return &myDesired; +} + +/* + This is the constructor, note the use of constructor chaining with the + ArAction... also note how it uses setNextArgument, which makes it so that + other things can see what parameters this action has, and set them. + It also initializes the classes variables. +*/ +ActionTurn::ActionTurn(double turnThreshold, double rotVel) : + ArAction("Turn") +{ + myTurnThreshold = turnThreshold; + myTurnAmount = rotVel; + setNextArgument(ArArg("turn threshold (mm)", &myTurnThreshold, "The number of mm away from obstacle to begin turnning.")); + setNextArgument(ArArg("turn amount (deg)", &myTurnAmount, "The number of degress to turn if turning.")); + myTurning = 0; +} + +/* + Sets the myRobot pointer (all setRobot overloaded functions must do this), + finds the sonar device from the robot, and if the sonar isn't there, + then it deactivates itself. +*/ +void ActionTurn::setRobot(ArRobot *robot) +{ + myRobot = robot; + mySonar = myRobot->findRangeDevice("sonar"); + if (mySonar == NULL) + deactivate(); +} + +/* + This is the guts of the action. +*/ +ArActionDesired *ActionTurn::fire(ArActionDesired currentDesired) +{ + double leftRange, rightRange; + + // reset the actionDesired (must be done) + myDesired.reset(); + + // if the sonar is null we can't do anything, so deactivate + if (mySonar == NULL) + { + deactivate(); + return NULL; + } + + // Get the left readings and right readings off of the sonar + leftRange = (mySonar->currentReadingPolar(0, 100) - + myRobot->getRobotRadius()); + rightRange = (mySonar->currentReadingPolar(-100, 0) - + myRobot->getRobotRadius()); + + // if neither left nor right range is within the turn threshold, + // reset the turning variable and don't turn + if (leftRange > myTurnThreshold && rightRange > myTurnThreshold) + { + myTurning = 0; + myDesired.setRotVel(0); + } + // if we're already turning some direction, keep turning that direction + else if (myTurning) + { + myDesired.setRotVel(myTurnAmount * myTurning); + } + // if we're not turning already, but need to, and left is closer, turn right + // and set the turning variable so we turn the same direction for as long as + // we need to + else if (leftRange < rightRange) + { + myTurning = -1; + myDesired.setRotVel(myTurnAmount * myTurning); + } + // if we're not turning already, but need to, and right is closer, turn left + // and set the turning variable so we turn the same direction for as long as + // we need to + else + { + myTurning = 1; + myDesired.setRotVel(myTurnAmount * myTurning); + } + // return a pointer to the actionDesired, so resolver knows what to do + return &myDesired; +} + +int main(void) +{ + // The connection we'll use to talk to the robot + ArTcpConnection con; + // the robot + ArRobot robot; + // the sonar device + ArSonarDevice sonar; + + // some stuff for return values + int ret; + std::string str; + + // the behaviors from above, and a stallRecover behavior that uses defaults + ActionGo go(500, 350); + ActionTurn turn(400, 30); + ArActionStallRecover recover; + + // this needs to be done + Aria::init(); + + // open the connection, just using the defaults, if it fails, exit + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + // add the range device to the robot, you should add all the range + // devices and such before you add actions + robot.addRangeDevice(&sonar); + // set the robot to use the given connection + robot.setDeviceConnection(&con); + + // do a blocking connect, if it fails exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // enable the motors, disable amigobot sounds + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add our actions in a good order, the integer here is the priority, + // with higher priority actions going first + robot.addAction(&recover, 100); + robot.addAction(&go, 50); + robot.addAction(&turn, 49); + + // run the robot, the true here is to exit if it loses connection + robot.run(true); + + // now just shutdown and go away + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/runtimeTest.cpp b/Legacy/Aria/tests/runtimeTest.cpp new file mode 100644 index 0000000..2e2818d --- /dev/null +++ b/Legacy/Aria/tests/runtimeTest.cpp @@ -0,0 +1,373 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + Takes two or three arguments: + + peoplebotTest + + This program will just have the robot wander around for a specificed period of + time, and then rest for a period of time. While wandering it runs acts + and pipes it the the machine name listed as the third argument. Otherwise + it defaults to try to pipe to prod.local.net. + + It pings the front sonar when moving forwards, and the read sonar when moving + backwards. It assumes that the robot is a Performance Peoplbot, and has three + rings of sonar. + + It uses some avoidance routines, then just has a constant velocity when + wandering. + + You can press escape while it was running to cause the program to + close up and exit. Otherwise it exits when the batteries dies, and then + displays the total runtime, and the time spent driving. +*/ + +class PeoplebotTest +{ + public: + PeoplebotTest(ArRobot *robot, int wanderTime, int restTime, std::string hostname); + ~PeoplebotTest(void); + + private: + ArRobot *myRobot; + ArTime myStateTime; + + enum State { + IDLE, + WANDERING, + RESTING, + OTHER + }; + + ArFunctorC myPeoplebotTestCB; + State myState; + void userTask(void); + bool timeout(int mSec); + int myWanderingTimeout; + int myRestingTimeout; + int myTotalRestTime; + int myTotalWanderTime; + int myTotalRunTime; + std::string myHostname; + std::string myCmd; + int mySonar; // state of sonar - -1 for rear, 0 for none, 1 for front + ArActionConstantVelocity *myConstantVelocity; +}; + +PeoplebotTest::PeoplebotTest(ArRobot *robot, int wanderTime, int restTime, std::string hostname) : +myPeoplebotTestCB(this, &PeoplebotTest::userTask) +{ + myRobot = robot; + myConstantVelocity = new ArActionConstantVelocity(); + + if (myRobot != NULL) + myRobot->addUserTask("peoplebotTest", 100, &myPeoplebotTestCB); + + myStateTime.setToNow(); + + myState = IDLE; + mySonar = 0; + + myTotalRestTime = 0; + myTotalRunTime = 0; + myTotalWanderTime = 0; + + // set the timeouts. These are minutes + myWanderingTimeout = wanderTime; + myRestingTimeout = restTime; + + myHostname = hostname; +} + +PeoplebotTest::~PeoplebotTest(void) +{ + if (myRobot != NULL) + myRobot->remUserTask(&myPeoplebotTestCB); + + if (myState == WANDERING) + myTotalWanderTime += (int)myStateTime.mSecSince()/1000/60; + else if (myState == RESTING) + myTotalRestTime += (int)myStateTime.mSecSince()/1000/60; + + myTotalRunTime = myTotalWanderTime + myTotalRestTime; + if (myTotalRunTime != 0) + { + printf("Percent wander time - %.2f%% \n", myTotalWanderTime*100.0/myTotalRunTime); + printf("Total run time - %d minutes\n", myTotalRunTime); + } + printf("Killing acts\n"); + system("killall -9 acts &> /dev/null"); +} + +bool PeoplebotTest::timeout(int min) +{ + return (myStateTime.mSecSince() > 60*1000*min); +} + +void PeoplebotTest::userTask(void) +{ + switch (myState) + { + case IDLE: + // start wandering + printf("Starting to wander for the first time\n"); + myStateTime.setToNow(); + myState = WANDERING; + myRobot->addAction(myConstantVelocity, 25); + printf("Opening up ACTS\n"); + myCmd = "DISPLAY="; + myCmd += myHostname.c_str(); + myCmd += ":0; /usr/local/acts/bin/acts -G bttv -n 0 &> /dev/null &"; + system(myCmd.c_str()); + break; + case WANDERING: + if (timeout(myWanderingTimeout)) + { + myRobot->comInt(ArCommands::SONAR,0); + myRobot->remAction(myConstantVelocity); + myRobot->setVel(0); + myRobot->setRotVel(0); + myState = RESTING; + mySonar = 0; + printf("Going to rest now\n"); + printf("Killing ACTS\n"); + system("killall -9 acts &> /dev/null"); + myStateTime.setToNow(); + myTotalWanderTime += myWanderingTimeout; + } + else if (myRobot->getVel() > 0 && mySonar != 1) + { + // ping front sonar + //printf("Enabling front sonar\n"); + mySonar = 1; + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::SONAR, 1); + myRobot->comInt(ArCommands::SONAR, 4); + } + else if (myRobot->getVel() < 0 && mySonar != -1) + { + // ping rear sonar + //printf("Enabling rear sonar\n"); + mySonar = -1; + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::SONAR, 5); + } + break; + case RESTING: + if (timeout(myRestingTimeout)) + { + printf("Going to wander now\n"); + myState = WANDERING; + myStateTime.setToNow(); + myTotalRestTime += myRestingTimeout; + myRobot->clearDirectMotion(); + myRobot->addAction(myConstantVelocity, 25); + printf("Opening up ACTS\n"); + myCmd = "DISPLAY="; + myCmd += myHostname.c_str(); + myCmd += ":0; /usr/local/acts/bin/acts -G bttv -n 0 &> /dev/null &"; + system(myCmd.c_str()); + } + break; + case OTHER: + default: + break; + }; +} + + + +int main(int argc, char **argv) +{ + int ret; + std::string str; + // the serial connection (robot) + ArSerialConnection serConn; + // tcp connection (sim) + ArTcpConnection tcpConn; + // the robot + ArRobot robot; + // the laser + ArSick sick; + // the laser connection + ArSerialConnection laserCon; + + bool useSimForLaser = false; + + + std::string hostname = "prod.local.net"; + + // timeouts in minutes + int wanderTime = 0; + int restTime = 0; + + + // check arguments + if (argc == 3 || argc == 4) + { + wanderTime = atoi(argv[1]); + restTime = atoi(argv[2]); + if (argc == 4) + hostname = argv[3]; + } + else + { + printf("\nUsage:\n\tpeoplebotTest \n\n"); + printf("Times are in minutes. Hostname is the machine to pipe the ACTS display to\n\n"); + wanderTime = 15; + restTime = 45; + } + + printf("Wander time - %d minutes\nRest time - %d minutes\n", wanderTime, restTime); + printf("Sending display to %s.\n\n", hostname.c_str()); + + // sonar, must be added to the robot + ArSonarDevice sonar; + + // the actions we'll use to wander + ArActionStallRecover recover; + ArActionBumpers bumpers; + ArActionAvoidFront avoidFrontNear("Avoid Front Near", 225, 0); + ArActionAvoidFront avoidFrontFar; + + // Make a key handler, so that escape will shut down the program + // cleanly + ArKeyHandler keyHandler; + + // mandatory init + Aria::init(); + + // Add the key handler to Aria so other things can find it + Aria::setKeyHandler(&keyHandler); + + // Attach the key handler to a robot now, so that it actually gets + // some processing time so it can work, this will also make escape + // exit + robot.attachKeyHandler(&keyHandler); + + + // First we see if we can open the tcp connection, if we can we'll + // assume we're connecting to the sim, and just go on... if we + // can't open the tcp it means the sim isn't there, so just try the + // robot + + // modify this next line if you're not using default tcp connection + tcpConn.setPort(); + + // see if we can get to the simulator (true is success) + if (tcpConn.openSimple()) + { + // we could get to the sim, so set the robots device connection to the sim + printf("Connecting to simulator through tcp.\n"); + robot.setDeviceConnection(&tcpConn); + } + else + { + // we couldn't get to the sim, so set the port on the serial + // connection and then set the serial connection as the robots + // device + + // modify the next line if you're not using the first serial port + // to talk to your robot + serConn.setPort(); + printf( + "Could not connect to simulator, connecting to robot through serial.\n"); + robot.setDeviceConnection(&serConn); + } + + + // add the sonar to the robot + robot.addRangeDevice(&sonar); + + // add the laser + robot.addRangeDevice(&sick); + + // try to connect, if we fail exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // turn on the motors, turn off amigobot sounds + //robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // turn off the sonar to start with + robot.comInt(ArCommands::SONAR, 0); + + // add the actions + robot.addAction(&recover, 100); + robot.addAction(&bumpers, 75); + robot.addAction(&avoidFrontNear, 50); + robot.addAction(&avoidFrontFar, 49); + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + if (!useSimForLaser) + { + sick.setDeviceConnection(&laserCon); + + if ((ret = laserCon.open("/dev/ttyS2")) != 0) + { + str = tcpConn.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + sick.configureShort(false); + } + else + { + sick.configureShort(true); + } + + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.lock(); + robot.comInt(ArCommands::ENABLE, 1); + robot.unlock(); + + // add the peoplebot test + PeoplebotTest pbTest(&robot, wanderTime, restTime, hostname); + + robot.waitForRunExit(); + + // now exit + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/samePriorityActionTest.cpp b/Legacy/Aria/tests/samePriorityActionTest.cpp new file mode 100644 index 0000000..6b75e57 --- /dev/null +++ b/Legacy/Aria/tests/samePriorityActionTest.cpp @@ -0,0 +1,100 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +class ActionTest : public ArAction +{ +public: + ActionTest(double turnAmount, double speed); + virtual ~ActionTest(void) {} + virtual ArActionDesired *fire(ArActionDesired currentDesired); + +protected: + ArActionDesired myActionDesired; + double myTurnAmount; + double mySpeed; +}; + +ActionTest::ActionTest(double turnAmount, double speed) : + ArAction("ActionTest") +{ + myTurnAmount = turnAmount; + mySpeed = speed; +} + +ArActionDesired *ActionTest::fire(ArActionDesired currentDesired) +{ + myActionDesired.reset(); + if (fabs(mySpeed) > 1) + myActionDesired.setVel(mySpeed); + if (fabs(myTurnAmount) > 1) + myActionDesired.setDeltaHeading(myTurnAmount); + return &myActionDesired; +} + +int main(int argc, char **argv) +{ + + std::string str; + int ret; + ArTcpConnection con; + ArRobot robot; + + ActionTest at1(-50, 333); + ActionTest at2(25, 666); + ActionTest at3(25, 0); + ActionTest at4(0, -999); + + Aria::init(); + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.addAction(&at1, 100); + robot.addAction(&at2, 100); + robot.addAction(&at3, 100); + robot.addAction(&at4, 100); + + robot.run(true); + Aria::shutdown(); + return 0; + + + +} diff --git a/Legacy/Aria/tests/serialDump.cpp b/Legacy/Aria/tests/serialDump.cpp new file mode 100644 index 0000000..92b276f --- /dev/null +++ b/Legacy/Aria/tests/serialDump.cpp @@ -0,0 +1,91 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + int ret; + char bufWrite[1024]; + char bufRead[1024]; + bool verbose = false; + int i, n; + for (i = 0; i < 1024; i++) + bufWrite[i] = 0x66; + + srand(time(NULL)); + + int bytes1 = 0; + int bytes2 = 0; + //int numToWrite = 1; + + ArTime lastPrint; + + ArSerialConnection ser1; + ser1.setPort(ArUtil::COM1); + //ser1.setBaud(115200); + if (!ser1.openSimple()) + { + printf("Exiting since open failed\n"); + exit(0); + } + printf("Port opened\n"); + lastPrint.setToNow(); + while (1) + { + ArUtil::sleep(1); + //ArUtil::sleep(500); +/* + bufWrite[0] = 0xfa; + bufWrite[1] = 0xfb; + bufWrite[2] = 0x3; + bufWrite[3] = 0x0; + bufWrite[4] = 0x0; + bufWrite[5] = 0x0; + ser1.write(bufWrite, 6); +*/ + ////ser1.write("a", 1); + if ((ret = ser1.read(bufRead, sizeof(bufRead))) < 0) + printf("Failed2 read\n"); + else if (ret > 0) + { + bufRead[ret] = '\0'; + if (verbose) + { + printf("%3d: ", ret); + for (i = 0; i < ret; i++) + printf("%c(%x) ", bufRead[i], (unsigned char)bufRead[i]); + printf("\n"); + } + else + printf("%s", bufRead); + } + else + bufRead[0] = '\0'; + //ser1.write("a", 1); + + } + +} diff --git a/Legacy/Aria/tests/serialTest.cpp b/Legacy/Aria/tests/serialTest.cpp new file mode 100644 index 0000000..88a4eb3 --- /dev/null +++ b/Legacy/Aria/tests/serialTest.cpp @@ -0,0 +1,104 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + int ret; + char bufWrite[1024]; + char bufRead[1024]; + int i, n; + for (i = 0; i < 1024; i++) + bufWrite[i] = 0x66; + + srand(time(NULL)); + + int bytes1 = 0; + int bytes2 = 0; + //int numToWrite = 1; + + ArTime lastPrint; + + ArSerialConnection ser1; + ArSerialConnection ser2; + ser1.setPort(ArUtil::COM1); +// ser1.setBaud(38400); + ser2.setPort(ArUtil::COM2); +// ser2.setBaud(38400); + if (!ser1.openSimple()) + { + printf("Exiting since open failed\n"); + exit(0); + } + if (!ser2.openSimple()) + { + printf("Exiting since open failed\n"); + exit(0); + } + printf("Ports opened"); + lastPrint.setToNow(); + while (1) + { + if (ser1.write(bufWrite, rand() % 1024) < 0) + printf("Failed write\n"); + n = rand() % 1024; + if ((ret = ser2.read(bufRead, n)) < 0) + printf("Failed read\n"); + else if (ret > 0) + { + for (i = 0; i < ret; i++) + if (bufRead[i] != 0x66) + { + printf("Failed\n"); + break; + } + bytes2 += ret; + } + + if (ser2.write(bufWrite, rand() % 1024) < 0) + printf("Failed2 write\n"); + n = rand() % 1024; + if ((ret = ser1.read(bufRead, n)) < 0) + printf("Failed2 read\n"); + else if (ret > 0) + { + for (i = 0; i < ret; i++) + if (bufRead[i] != 0x66) + { + printf("Failed2 0x%x %d/%d\n", bufRead[i], i, n); + break; + } + bytes1 += ret; + } + + if (lastPrint.mSecSince() > 1000) + { + printf("%d %d\n", bytes1, bytes2); + lastPrint.setToNow(); + } + } + +} diff --git a/Legacy/Aria/tests/serialTest2.cpp b/Legacy/Aria/tests/serialTest2.cpp new file mode 100644 index 0000000..37ccac5 --- /dev/null +++ b/Legacy/Aria/tests/serialTest2.cpp @@ -0,0 +1,87 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + int ret; + char bufWrite[1024]; + char bufRead[1024]; + int i, n; + for (i = 0; i < 1024; i++) + bufWrite[i] = 0x66; + + srand(time(NULL)); + + int bytes1 = 0; + //int bytes2 = 0; + //int numToWrite = 1; + + ArTime lastPrint; + + if (argc < 2) + { + printf("Usage: %s ", argv[0]); + exit(0); + } + + + ArSerialConnection ser1; + ser1.setPort(argv[1]); + ser1.setBaud(38400); + if (!ser1.openSimple()) + { + printf("Exiting since open failed\n"); + exit(0); + } + printf("Port opened"); + lastPrint.setToNow(); + while (1) + { + if (ser1.write(bufWrite, rand() % 1024) < 0) + printf("Failed write\n"); + n = rand() % 1024; + if ((ret = ser1.read(bufRead, n)) < 0) + printf("Failed read\n"); + else if (ret > 0) + { + for (i = 0; i < ret; i++) + if (bufRead[i] != 0x66) + { + printf("Failed\n"); + break; + } + bytes1 += ret; + } + + if (lastPrint.mSecSince() > 1000) + { + printf("%d\n", bytes1); + lastPrint.setToNow(); + } + } + +} diff --git a/Legacy/Aria/tests/showFirmwareParameters.cpp b/Legacy/Aria/tests/showFirmwareParameters.cpp new file mode 100644 index 0000000..8530053 --- /dev/null +++ b/Legacy/Aria/tests/showFirmwareParameters.cpp @@ -0,0 +1,127 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#include "Aria.h" + + +bool gotConfigPacket = false; +ArCondition gotConfigPacketCondition; +bool handleConfigPacket(ArRobotPacket* pkt) +{ + if(pkt->getID() != 0x20) return false; + if(gotConfigPacket) return true; + printf("----------- CONFIG pkt received: ------------\n"); + char buf[256]; + pkt->bufToStr(buf, sizeof(buf)); + printf("Type=%s\n", buf); + pkt->bufToStr(buf, sizeof(buf)); + printf("Subtype=%s\n", buf); + pkt->bufToStr(buf, sizeof(buf)); + printf("SerialNumber=%s\n", buf); + printf("unknown=%d\n", pkt->bufToUByte()); + printf("RotVelTop=%d\n", pkt->bufToUByte2()); + printf("TransVelTop=%d\n", pkt->bufToUByte2()); + printf("RotAccelTop=%d\n", pkt->bufToUByte2()); + printf("TransAccelTop=%d\n", pkt->bufToUByte2()); + printf("PWMMax=%d\n", pkt->bufToUByte2()); + pkt->bufToStr(buf, sizeof(buf)); + printf("Name=%s\n", buf); + printf("SipCycleTime=%d\n", pkt->bufToUByte()); + printf("HostBaud=%d\n", pkt->bufToUByte()); + printf("Aux1Baud=%d\n", pkt->bufToUByte()); + printf("HasGripper=%d\n", pkt->bufToUByte2()); + printf("HasFrontSonar=%d\n", pkt->bufToUByte2()); + printf("HasRearSonar=%d\n", pkt->bufToUByte()); + printf("LowBattery=%d\n", pkt->bufToUByte2()); + printf("RevCount=%d\n", pkt->bufToUByte2()); + printf("Watchdog=%d\n", pkt->bufToUByte2()); + printf("NormalMPacs=%d\n", pkt->bufToUByte()); + printf("StallVal=0x%X\n", pkt->bufToUByte2()); + printf("StallCount=%d\n", pkt->bufToUByte2()); + printf("JoyVel=%d\n", pkt->bufToUByte2()); + printf("JoyRotVel=%d\n", pkt->bufToUByte2()); + printf("RotVelMax=%d\n", pkt->bufToUByte2()); + printf("TransVelMax=%d\n", pkt->bufToUByte2()); + printf("RotAccel=%d\n", pkt->bufToUByte2()); + printf("RotDecel=%d\n", pkt->bufToUByte2()); + printf("RotKP=%d\n", pkt->bufToUByte2()); + printf("RotKV=%d\n", pkt->bufToUByte2()); + printf("RotKI=%d\n", pkt->bufToUByte2()); + printf("TransAccel=%d\n", pkt->bufToUByte2()); + printf("TransDecel=%d\n", pkt->bufToUByte2()); + printf("TransKP=%d\n", pkt->bufToUByte2()); + printf("TransKV=%d\n", pkt->bufToUByte2()); + printf("TransKI=%d\n", pkt->bufToUByte2()); + printf("FrontBumps=%d\n", pkt->bufToUByte()); + printf("RearBumps=%d\n", pkt->bufToUByte()); + printf("HasCharger=%d\n", pkt->bufToUByte()); + printf("SonarCycle=%d\n", pkt->bufToUByte()); + printf("ResetBaud=%d\n", pkt->bufToUByte()); + printf("HasGyro=%d\n", pkt->bufToUByte()); + printf("DriftFactor=%d\n", pkt->bufToUByte2()); + printf("Aux2Baud=%d\n", pkt->bufToUByte()); + printf("Aux3Baud=%d\n", pkt->bufToUByte()); + printf("TicksPerMM=%d\n", pkt->bufToUByte2()); + printf("ShutdownVoltage=%d\n", pkt->bufToUByte2()); + pkt->bufToStr(buf, sizeof(buf)); + printf("FirmwareVersion=%s\n", buf); + printf("ChargeThreshold=%d\n", pkt->bufToUByte2()); + gotConfigPacket = true; + gotConfigPacketCondition.signal(); + return true; + +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + ArSimpleConnector connector(&parser); + ArRobot robot; + + if (!connector.parseArgs()) + { + connector.logOptions(); + return 1; + } + + + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + return 2; + } + printf("Connected to robot.\n"); + robot.runAsync(true); + + ArGlobalRetFunctor1 myConfigPacketHandler(&handleConfigPacket); + robot.addPacketHandler(&myConfigPacketHandler); + puts("-> CONFIG..."); + robot.com(18); + gotConfigPacketCondition.wait(); + Aria::exit(0); +} diff --git a/Legacy/Aria/tests/sickMiddleTest.cpp b/Legacy/Aria/tests/sickMiddleTest.cpp new file mode 100644 index 0000000..5fbf1fe --- /dev/null +++ b/Legacy/Aria/tests/sickMiddleTest.cpp @@ -0,0 +1,112 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +// this test prints out the middle readings of the laser continually + +ArSick *sick; + +void failedConnect(void) +{ + printf("Failed connect\n"); + system("echo 'Failed' >> results"); + sick->stopRunning(); + sick->disconnect(); + exit(0); +} + +int main(int argc, char **argv) +{ + int ret; + std::string str; + ArSerialConnection con; + const std::list *readings; + std::list::const_iterator it; + int i; + ArGlobalFunctor failedConnectCB(&failedConnect); + + Aria::init(); + sick = new ArSick; + // open the connection, if it fails, exit + if ((ret = con.open("/dev/ttyS2")) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + sick->configure(false); + sick->setDeviceConnection(&con); + + sick->addFailedConnectCB(&failedConnectCB, ArListPos::FIRST); + sick->runAsync(); + + ArUtil::sleep(100); + sick->lockDevice(); + sick->asyncConnect(); + sick->unlockDevice(); + while (!sick->isConnected()) + ArUtil::sleep(100); + printf("Connected\n"); +// while (sick->isConnected()) + while (1) + { + //dist = sick->getCurrentBuffer().getClosestPolar(-90, 90, ArPose(0, 0), 30000, &angle); + sick->lockDevice(); + if (!sick->getRunning() || !sick->isConnected()) + { + break; + } + printf("\r"); + readings = sick->getRawReadings(); + if (readings != NULL) + { + for (i = 0, it = readings->begin(); it != readings->end(); it++, i++) + { + if (abs(i - readings->size()/2) < 3) + printf("(%.2f %d) ", (*it)->getSensorTh(), (*it)->getRange()); + } + } + // switch the commenting in out of the fflush and the + // printf("\n"); if you want to print on the same line or have it + // scrolling + fflush(stdout); + //printf("\n"); + + sick->unlockDevice(); + ArUtil::sleep(100); + } + sick->lockDevice(); + sick->stopRunning(); + sick->disconnect(); + sick->unlockDevice(); + return 0; +} + + + + diff --git a/Legacy/Aria/tests/sickQuadrantReadings.cpp b/Legacy/Aria/tests/sickQuadrantReadings.cpp new file mode 100644 index 0000000..da6c9ab --- /dev/null +++ b/Legacy/Aria/tests/sickQuadrantReadings.cpp @@ -0,0 +1,108 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArRobot *robot; + +ArSick laser; + +void laserPrinter(void) +{ + double d; + double th; + + + d = laser.currentReadingPolar(-45, 45, &th); + printf("front: %5.0fmm ", d); + if (d != laser.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + d = laser.currentReadingPolar(-135, -45, &th); + printf(" right: %5.0fmm ", d); + if (d != laser.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + d = laser.currentReadingPolar(45, 135, &th); + printf(" left: %5.0fmm ", d); + if (d != laser.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + d = laser.currentReadingPolar(135, -135, &th); + printf(" back: %5.0fmm ", d); + if (d != laser.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + printf("\r"); + fflush(stdout); +} + +int main(int argc, char** argv) +{ + ArGlobalFunctor laserPrinterCB(&laserPrinter); + Aria::init(); + + ArSimpleConnector connector(&argc, argv); + if(!connector.parseArgs()) + { + connector.logOptions(); + return 1; + } + + robot = new ArRobot; + robot->addRangeDevice(&laser); + + if(!connector.connectRobot(robot)) + { + printf("Could not connect to robot.\n"); + return 2; + } + + connector.setupLaser(&laser); + laser.runAsync(); + if(!laser.blockingConnect()) + { + printf("Could not connect to SICK laser\n"); + return 3; + } + + robot->comInt(ArCommands::SOUNDTOG, 0); + + printf("Closest readings within quadrants:\n"); + robot->addUserTask("Laser printer", 50, &laserPrinterCB); + + robot->run(true); + Aria::shutdown(); + + +} diff --git a/Legacy/Aria/tests/sickSafeAutoLogger.cpp b/Legacy/Aria/tests/sickSafeAutoLogger.cpp new file mode 100644 index 0000000..25d61b8 --- /dev/null +++ b/Legacy/Aria/tests/sickSafeAutoLogger.cpp @@ -0,0 +1,269 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + bool done; + + bool shouldSpin = true; + int spinTime = 10000; + double distToTravel = 1000; + + double rotVelMax = 50; + double rotAccel = 100; + double rotDecel = 100; + double transVelMax = 1500; + double transAccel = 600; + double transDecel = 600; + + Aria::init(); + + + // set up our parser + ArArgumentParser parser(&argc, argv); + // set up our simple connector + ArSimpleConnector simpleConnector(&parser); + // robot + ArRobot robot; + // a laser in case one is used + ArSick sick; + // sonar, must be added to the robot, for teleop and wander + ArSonarDevice sonarDev; + + + parser.addDefaultArgument("-connectLaser -laserIncrement half"); + + // load the default arguments + parser.loadDefaultArguments(); + + // parse the command line... fail and print the help if the parsing fails + // or if the help was requested + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + exit(1); + } + + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + // if you're using a program at startup in linux you must NOT + // include a keyhandler or you'll get lockups when trying to read + // keys with no terminal + + // a key handler so we can do our key handling + ArKeyHandler keyHandler; + // let the global aria stuff know about it + Aria::setKeyHandler(&keyHandler); + // toss it on the robot + robot.attachKeyHandler(&keyHandler); + printf("You may press escape to exit\n"); + + // add the sonar to the robot + robot.addRangeDevice(&sonarDev); + // add the laser to the robot + robot.addRangeDevice(&sick); + + // add a gyro, it'll see if it should attach to the robot or not + ArAnalogGyro gyro(&robot); + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + } + + robot.setRotVelMax(rotVelMax); + robot.setRotAccel(rotAccel); + robot.setRotDecel(rotDecel); + robot.setTransVelMax(transVelMax); + robot.setTransAccel(transAccel); + robot.setTransDecel(transDecel); + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + // set up the laser before handing it to the laser mode + sick.runAsync(); + + // connect the laser if it was requested + if (!simpleConnector.connectLaser(&sick)) + { + printf("Could not connect to laser... exiting\n"); + Aria::exit(2); + } + + ArUtil::sleep(300); + + robot.lock(); + + // set a default filename + //std::string filename = "c:\\log\\1scans.2d"; + std::string filename = "1scans.2d"; + // see if we want to use a different filename + //if (argc > 1) + printf("Logging to file %s\n", filename.c_str()); + // start the logger with good values + ArSickLogger logger(&robot, &sick, 300, 25, filename.c_str()); + + //Make a couple action groups, one for driving in a straight line, one for turning + + ArActionGroup drive(&robot); + ArActionDriveDistance driveAction("driveDistance", transVelMax, transDecel); + ArActionDeceleratingLimiter limiterAction; + limiterAction.setParameters(200, 100, 100, 0, 100, 100, 2000, 1000, true, 0); + + drive.addAction(&driveAction, 50); + drive.addAction(&limiterAction, 75); + + ArActionGroup spin(&robot); + ArActionInput spinAction; + + spin.addAction(&spinAction, 100); + + + + robot.unlock(); + +#ifdef WIN32 + // wait until someone pushes the motor button to go (since vnc hoses + // timing) + while (1) + { + robot.lock(); + if (!robot.isRunning()) + exit(0); + if (robot.areMotorsEnabled()) + { + robot.unlock(); + break; + } + robot.unlock(); + ArUtil::sleep(100); + } +#endif + + // basically from here on down the robot just cruises around a bit + + robot.lock(); + // enable the motors + robot.comInt(ArCommands::ENABLE, 1); + + ArTime startTime; + + ArLog::log(ArLog::Normal, "Driving out"); + // move a couple meters + drive.activateExclusive(); + driveAction.setDistance(distToTravel); + robot.unlock(); + done = false; + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + done = (driveAction.haveAchievedDistance() || startTime.secSince() > 10 || + (startTime.secSince() > 2 && fabs(robot.getVel() < 2))); + robot.unlock(); + } while (!done); + + + if (shouldSpin) + { + ArLog::log(ArLog::Normal, "Spinning counter clockwise"); + robot.lock(); + spin.activateExclusive(); + spinAction.setRotVel(rotVelMax); + spinAction.setVel(0); + robot.unlock(); + ArUtil::sleep(spinTime); + ArLog::log(ArLog::Normal, "Spinning clockwise"); + robot.lock(); + spin.activateExclusive(); + spinAction.setRotVel(-rotVelMax); + spinAction.setVel(0); + robot.unlock(); + ArUtil::sleep(spinTime); + } + + ArLog::log(ArLog::Normal, "Pointing back"); + robot.lock(); + spin.activateExclusive(); + spinAction.setHeading(180); + robot.unlock(); + done = false; + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + done = (fabs(ArMath::subAngle(robot.getTh(), 180)) < 2 && + fabs(robot.getRotVel() < 2)) || startTime.secSince() > 10; + robot.unlock(); + } while (!done); + + ArLog::log(ArLog::Normal, "Driving back"); + robot.lock(); + drive.activateExclusive(); + driveAction.setDistance(distToTravel); + robot.unlock(); + done = false; + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + done = (driveAction.haveAchievedDistance() || startTime.secSince() > 10 || + (startTime.secSince() > 2 && fabs(robot.getVel() < 2))); + robot.unlock(); + } while (!done); + + + ArLog::log(ArLog::Normal, "Pointing out"); + robot.lock(); + spin.activateExclusive(); + spinAction.setHeading(0); + robot.unlock(); + done = false; + startTime.setToNow(); + do { + ArUtil::sleep(100); + robot.lock(); + done = (fabs(ArMath::subAngle(robot.getTh(), 0)) < 2 && + fabs(robot.getRotVel() < 2)) || startTime.secSince() > 10; + robot.unlock(); + } while (!done); + + ArLog::log(ArLog::Normal, "Done"); + sick.lockDevice(); + sick.disconnect(); + sick.unlockDevice(); + robot.lock(); + robot.disconnect(); + robot.unlock(); + // now exit + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/sickSimpleTest.cpp b/Legacy/Aria/tests/sickSimpleTest.cpp new file mode 100644 index 0000000..788c627 --- /dev/null +++ b/Legacy/Aria/tests/sickSimpleTest.cpp @@ -0,0 +1,168 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(int argc, char **argv) +{ + int ret; + std::string str; + ArSerialConnection con; + ArSickPacket sick; + ArSickPacket *packet; + ArSickPacketReceiver receiver(&con); + ArTime start; + unsigned int value; + int numReadings; + ArTime lastReading; + ArTime packetTime; + + start.setToNow(); + + // open the connection, if it fails, exit + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + start.setToNow(); + + printf("Waiting for laser to power on\n"); + sick.empty(); + sick.uByteToBuf(0x10); + sick.finalizePacket(); + con.write(sick.getBuf(), sick.getLength()); + + while (start.secSince() < 70 && + ((packet = receiver.receivePacket(100)) == NULL + || (packet->getID() != 0x90))); + if (packet != NULL) + printf("Laser powered on\n"); + else + exit(1); + + printf("Changing baud\n"); + sick.empty(); + sick.byteToBuf(0x20); + sick.byteToBuf(0x40); + sick.finalizePacket(); + con.write(sick.getBuf(), sick.getLength()); + + ArUtil::sleep(10); + if (!con.setBaud(38400)) + { + printf("Could not set baud, exiting\n"); + } + + + /*packet = receiver.receivePacket(100); + if (packet != NULL) + packet->log(); + */ + sick.empty(); + sick.uByteToBuf(0x3B); + sick.uByte2ToBuf(180); + sick.uByte2ToBuf(100); + sick.finalizePacket(); + con.write(sick.getBuf(), sick.getLength()); + + packet = receiver.receivePacket(100); + if (packet != NULL) + packet->log(); + + sick.empty(); + sick.byteToBuf(0x20); + sick.byteToBuf(0x24); + sick.finalizePacket(); + con.write(sick.getBuf(), sick.getLength()); + + packet = receiver.receivePacket(100); + if (packet != NULL) + packet->log(); + + + + printf("Starting to report back from port, it took %ld ms to get here:\n", + start.mSecSince()); + start.setToNow(); + while (start.secSince() < 6) + { + packetTime.setToNow(); + packet = receiver.receivePacket(); + if (packet != NULL) + printf("####### %ld ms was how long the packet took\n", packetTime.mSecSince()); + if (packet != NULL) + { + if (packet->getLength() < 10) + packet->log(); + else if (packet->getID() == 0x90) + { + char strBuf[512]; + packet->log(); + //printf("%x\n", packet->bufToUByte()); + packet->bufToStr(strBuf, 512); + printf("0x%x %s\n", packet->getID(), strBuf); + sick.empty(); + sick.uByteToBuf(0x3B); + sick.uByte2ToBuf(180); + sick.uByte2ToBuf(100); + sick.finalizePacket(); + con.write(sick.getBuf(), sick.getLength()); + packet = receiver.receivePacket(100); + sick.empty(); + sick.uByteToBuf(0x20); + sick.uByteToBuf(0x24); + sick.finalizePacket(); + con.write(sick.getBuf(), sick.getLength()); + } + else + { + value = packet->bufToUByte2(); + numReadings = value & 0x3ff; + printf("%ld ms after last reading.\n", lastReading.mSecSince()); + /* + printf("Reading number %d, complete %d, unit: %d %d:\n", value & 0x3ff, !(bool)(value & ArUtil::BIT13), (bool)(value & ArUtil::BIT14), (bool)(value & ArUtil::BIT15)); + for (i = 0; i < numReadings; i++) + { + value = packet->bufToUByte2(); + if (value & ArUtil::BIT13) + printf("D"); + printf("%d ", value & 0x1fff); + } + printf("\n"); + */ + lastReading.setToNow(); + } + } + else + { + //printf("No packet\n"); + } + } +} + diff --git a/Legacy/Aria/tests/sickTest.cpp b/Legacy/Aria/tests/sickTest.cpp new file mode 100644 index 0000000..a87a389 --- /dev/null +++ b/Legacy/Aria/tests/sickTest.cpp @@ -0,0 +1,127 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArSick *sick; + +void failedConnect(void) +{ + printf("Failed connect\n"); + system("echo 'Failed' >> results"); + sick->stopRunning(); + sick->disconnect(); + exit(0); +} + +int main(int argc, char **argv) +{ + int ret; + std::string str; + ArSerialConnection con; + double dist, angle; + std::list *readings; + std::list::iterator it; + double farDist, farAngle; + bool found; + ArGlobalFunctor failedConnectCB(&failedConnect); + + std::string port; + if (argc > 1) + port = argv[1]; + else + port = "/dev/ttyS2"; + + printf("Opening sick on port %s\n", port.c_str()); + sick = new ArSick; + // open the connection, if it fails, exit + if ((ret = con.open(port.c_str())) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + sick->configure(false); + sick->setDeviceConnection(&con); + + sick->addFailedConnectCB(&failedConnectCB, ArListPos::FIRST); + sick->runAsync(); + + ArUtil::sleep(100); + sick->lockDevice(); + sick->asyncConnect(); + sick->unlockDevice(); + while (!sick->isConnected()) + ArUtil::sleep(100); + + printf("Connected\n"); +// while (sick->isConnected()) + int times = 0; + while (times++ < 3) + { + //dist = sick->getCurrentBuffer().getClosestPolar(-90, 90, ArPose(0, 0), 30000, &angle); + sick->lockDevice(); + dist = sick->currentReadingPolar(-90, 90, &angle); + if (dist < sick->getMaxRange()) + printf("Closest reading %.2f mm away at %.2f degrees\n", dist, angle); + else + printf("No close reading.\n"); + readings = sick->getCurrentBuffer(); + int i = 0; + for (it = readings->begin(), found = false; it != readings->end(); it++) + { + i++; + dist = (*it)->findDistanceTo(ArPose(0, 0)); + angle = (*it)->findAngleTo(ArPose(0, 0)); + if (!found || dist > farDist) + { + found = true; + farDist = dist; + farAngle = angle; + } + } + printf("%d readings\n", i); + if (found) + printf("Furthest reading %.2f mm away at %.2f degrees\n", + farDist, farAngle); + else + printf("No far reading found.\n"); + + sick->unlockDevice(); + ArUtil::sleep(100); + } + sick->lockDevice(); + sick->stopRunning(); + sick->disconnect(); + sick->unlockDevice(); + system("echo 'succeeded' >> results"); + return 0; +} + + + + diff --git a/Legacy/Aria/tests/sickTestAll.cpp b/Legacy/Aria/tests/sickTestAll.cpp new file mode 100644 index 0000000..8b42460 --- /dev/null +++ b/Legacy/Aria/tests/sickTestAll.cpp @@ -0,0 +1,124 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArSick *sick; + +void failedConnect(void) +{ + printf("Failed connect\n"); + system("echo 'Failed' >> results"); + sick->stopRunning(); + sick->disconnect(); + exit(0); +} + +int main(int argc, char **argv) +{ + int ret; + std::string str; + ArSerialConnection con; + double dist, angle; + std::list *readings; + std::list::iterator it; + double farDist, farAngle; + bool found; + ArGlobalFunctor failedConnectCB(&failedConnect); + + Aria::init(); + + sick = new ArSick; + // open the connection, if it fails, exit + if ((ret = con.open("/dev/ttyS2")) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + sick->configure(false); + sick->setDeviceConnection(&con); + + sick->setFilterNearDist(0); + sick->setMinRange(0); + sick->addFailedConnectCB(&failedConnectCB, ArListPos::FIRST); + sick->runAsync(); + + ArUtil::sleep(100); + sick->lockDevice(); + sick->asyncConnect(); + sick->unlockDevice(); + while (!sick->isConnected()) + ArUtil::sleep(100); + + printf("Connected\n"); +// while (sick->isConnected()) + int times = 0; + while (sick->getRunning()) + { + //dist = sick->getCurrentBuffer().getClosestPolar(-90, 90, ArPose(0, 0), 30000, &angle); + sick->lockDevice(); + dist = sick->currentReadingPolar(-90, 90, &angle); + if (dist < sick->getMaxRange()) + printf("Closest reading %.2f mm away at %.2f degrees\n", dist, angle); + else + printf("No close reading.\n"); + readings = sick->getCurrentBuffer(); + int i = 0; + for (it = readings->begin(), found = false; it != readings->end(); it++) + { + i++; + dist = (*it)->findDistanceTo(ArPose(0, 0)); + angle = (*it)->findAngleTo(ArPose(0, 0)); + if (!found || dist > farDist) + { + found = true; + farDist = dist; + farAngle = angle; + } + } + if (found) + printf("Furthest reading %.2f mm away at %.2f degrees\n", + farDist, farAngle); + else + printf("No far reading found.\n"); + printf("%d readings\n\n", i); + + sick->unlockDevice(); + ArUtil::sleep(100); + } + sick->lockDevice(); + sick->stopRunning(); + sick->disconnect(); + sick->unlockDevice(); + system("echo 'succeeded' >> results"); + return 0; +} + + + + diff --git a/Legacy/Aria/tests/signalTest.cpp b/Legacy/Aria/tests/signalTest.cpp new file mode 100644 index 0000000..701d9ce --- /dev/null +++ b/Legacy/Aria/tests/signalTest.cpp @@ -0,0 +1,137 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +void sigHandlerTest(int signal) +{ + printf("Sig %d %s\n", signal, ArSignalHandler::nameSignal(signal)); +} + +int main(int argc, char** argv) +{ + // set up our simpleConnector + ArSimpleConnector simpleConnector(&argc, argv); + // robot + ArRobot robot; + // a laser in case one is used + ArSick sick; + // a key handler so we can do our key handling + ArKeyHandler keyHandler; + // sonar, must be added to the robot, for teleop and wander + ArSonarDevice sonarDev; + + // parse the args and if there are more arguments left then it means + // we didn't understand an option + if (!simpleConnector.parseArgs() || argc > 1) + { + simpleConnector.logOptions(); + keyHandler.restore(); + exit(1); + } + + // mandatory init + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + ArGlobalFunctor1 signalHandlerCB(&sigHandlerTest); + ArSignalHandler::addHandlerCB(&signalHandlerCB, ArListPos::FIRST); + + // let the global aria stuff know about it + Aria::setKeyHandler(&keyHandler); + // toss it on the robot + robot.attachKeyHandler(&keyHandler); + + // add the sonar to the robot + robot.addRangeDevice(&sonarDev); + // add the laser to the robot + robot.addRangeDevice(&sick); + + + + // add a gyro, it'll see if it should attach to the robot or not + ArAnalogGyro gyro(&robot); + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + keyHandler.restore(); + return 1; + } + + simpleConnector.setupLaser(&sick); + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + // set up the laser before handing it to the laser mode + sick.runAsync(); + + // connect the laser if it was requested + if (!simpleConnector.connectLaser(&sick)) + { + printf("Could not connect to laser... exiting\n"); + Aria::shutdown(); + keyHandler.restore(); + return 1; + } + + // we need to lock the robot since we'll be setting up these modes + // while the robot is already running and don't want anything to + // break + robot.lock(); + + // now add all the modes + ArModeLaser laser(&robot, "laser", 'l', 'L', &sick); + ArModeTeleop teleop(&robot, "teleop", 't', 'T'); + ArModeUnguardedTeleop unguardedTeleop(&robot, "unguarded teleop", 'u', 'U'); + ArModeWander wander(&robot, "wander", 'w', 'W'); + ArModeGripper gripper(&robot, "gripper", 'g', 'G'); + ArModeCamera camera(&robot, "camera", 'c', 'C'); + ArModeSonar sonar(&robot, "sonar", 's', 'S'); + ArModeBumps bumps(&robot, "bumps", 'b', 'B'); + ArModePosition position(&robot, "position", 'p', 'P', &gyro); + ArModeIO io(&robot, "io", 'i', 'I'); + ArModeActs actsMode(&robot, "acts", 'a', 'A'); + + // activate the default mode + teleop.activate(); + + // turn on the motors + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::JOYDRIVE, 1); + + robot.unlock(); + + robot.waitForRunExit(); + // now exit + Aria::shutdown(); + return 0; + + +} + diff --git a/Legacy/Aria/tests/sonarAutoDisablerTest.cpp b/Legacy/Aria/tests/sonarAutoDisablerTest.cpp new file mode 100644 index 0000000..6e4ae58 --- /dev/null +++ b/Legacy/Aria/tests/sonarAutoDisablerTest.cpp @@ -0,0 +1,83 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + + +/* main function */ +int main(int argc, char **argv) +{ + ArRobot robot; + ArSonarDevice sonar; + + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + exit(1); + } + + + robot.addRangeDevice(&sonar); + + ArActionKeydrive keydriveAction; + + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + ArSonarAutoDisabler sonarAutoDisabler(&robot); + + robot.addAction(&keydriveAction, 50); + puts("Drive robot with arrow keys. There is NO obstacle avoidance!"); + + robot.enableMotors(); + robot.comInt(ArCommands::SOUNDTOG, 0); + robot.comInt(ArCommands::SONAR, 1); + + robot.runAsync(true); + + + char timestamp[24]; + while(robot.isRunning()) { + robot.lock(); + time_t t = time(NULL); + strftime(timestamp, 24, "%Y-%m-%d %H:%M:%S", localtime(&t)); + printf( "%s ArRobot::areSonarsEnabled()=%s, areMotorsEnabled()=%s\n", timestamp, robot.areSonarsEnabled()?"true":"false", robot.areMotorsEnabled()?"true":"false"); + robot.unlock(); + ArUtil::sleep(1000); + } + + // robot cycle stopped, probably because of lost robot connection + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/sonarDeviceTest.cpp b/Legacy/Aria/tests/sonarDeviceTest.cpp new file mode 100644 index 0000000..dc74af4 --- /dev/null +++ b/Legacy/Aria/tests/sonarDeviceTest.cpp @@ -0,0 +1,123 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArRobot *robot; + +ArSonarDevice sonar; + +void sonarPrinter(void) +{ + ArSonarDevice *sd; + + std::list::iterator it; + std::list *readings; + ArPose *pose; + + sd = (ArSonarDevice *)robot->findRangeDevice("sonar"); + if (sd != NULL) + { + sd->lockDevice(); + readings = sd->getCurrentBuffer(); + if (readings != NULL) + { + for (it = readings->begin(); it != readings->end(); ++it) + { + pose = (*it); + //pose->log(); + } + } + sd->unlockDevice(); + } + + double d; + double th; + int i; + + printf("Closest readings within polar sections:\n"); + + d = sonar.currentReadingPolar(-45, 45, &th); + printf(" front quadrant: %5.0f ", d); + if (d != 5000) + printf("%3.0f ", th); + printf("\n"); + + d = sonar.currentReadingPolar(-135, -45, &th); + printf(" right quadrant: %5.0f ", d); + if (d != 5000) + printf("%3.0f ", th); + printf("\n"); + + d = sonar.currentReadingPolar(45, 135, &th); + printf(" left quadrant: %5.0f ", d); + if (d != 5000) + printf("%3.0f ", th); + printf("\n"); + + d = sonar.currentReadingPolar(-135, 135, &th); + printf(" back quadrant: %5.0f ", d); + if (d != 5000) + printf("%3.0f ", th); + printf("\n"); + + fflush(stdout); +} + +int main(void) +{ + std::string str; + int ret; + ArGlobalFunctor sonarPrinterCB(&sonarPrinter); + ArTcpConnection con; + Aria::init(); + + robot = new ArRobot; + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + robot->setDeviceConnection(&con); + if (!robot->blockingConnect()) + { + printf("Could not connect to robot->.. exiting\n"); + exit(0); + } + + robot->addRangeDevice(&sonar); + + robot->addUserTask("Sonar printer", 50, &sonarPrinterCB); + robot->comInt(ArCommands::SONAR, 1); + robot->comInt(ArCommands::SOUNDTOG, 0); + + robot->run(true); + Aria::shutdown(); + + +} diff --git a/Legacy/Aria/tests/sonarMonitor.cpp b/Legacy/Aria/tests/sonarMonitor.cpp new file mode 100644 index 0000000..9ea7c0a --- /dev/null +++ b/Legacy/Aria/tests/sonarMonitor.cpp @@ -0,0 +1,115 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* This program monitors the time it takes to receive a new value + * for Sonar #3. + * + * (Or, you can uncomment code in main() to experiment with different + * sonar polling sequences). + */ + + +class SonarMonitor +{ +private: + ArRobot* myRobot; + int mySonarNum; + ArTime myTimer; + ArFunctorC myCB; + +public: + + SonarMonitor(ArRobot* r, int s) : + myRobot(r), mySonarNum(s), myCB(this, &SonarMonitor::cycleCallback) + { + ArLog::log(ArLog::Normal, "Sonar Monitor: Monitoring sonar transducer #%d", s); + myTimer.setToNow(); + myRobot->addSensorInterpTask("SonarMonitor", 1, &myCB); + } + + void cycleCallback() + { + if(myRobot->isSonarNew(mySonarNum)) + { + ArLog::log(ArLog::Normal, "Sonar Monitor: It took %d ms for sonar #%d to be refreshed (range value=%d)", + myTimer.mSecSince(), mySonarNum, myRobot->getSonarRange(mySonarNum)); + myTimer.setToNow(); + } + } +}; + +int main(int argc, char **argv) +{ + ArRobot robot; + Aria::init(); + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + return 1; + } + + if (!connector.connectRobot(&robot)) + { + ArLog::log(ArLog::Terse, "Sonar Monitor: Error: Could not connect to robot... exiting\n"); + return 2; + } + + ArLog::log(ArLog::Normal, "Sonar Monitor: Connected.\n"); + + // Check the state of sonar index 1 (the second sonar) every cycle + SonarMonitor sonarMon(&robot, 1); + + // Check the state of sonar index 4 (the fifth sonar) every cycle + SonarMonitor sonarMon2(&robot, 4); + + // You can experiment with different polling sequences by commenting + // out one of the following commands: + + /* + * Change the polling sequence to only enable one sonar (#0 if you are + * counting from 0 like ARIA, but 1 counting from 1 like ARCOS): + */ + //char sequence[1] = {2}; + //robot.comStrN(ArCommands::POLLING, sequence, 2); + + /* + * This would work too: + */ + //char sequence[8] = {2, 2, 2, 2, 2, 2, 2, 2}; + //robot.comStrN(ArCommands::POLLING, sequence, 8); + + /* + * Only enable the left-front side of a pioneer, or the front of an amigo: + */ + //char sequence[4] = {2, 3, 4, 5}; + //robot.comStrN(ArCommands::POLLING, sequence, 4); + + // Run robot loop until killed. + robot.run(true); + return 0; +} diff --git a/Legacy/Aria/tests/sonarQuadrantReadings.cpp b/Legacy/Aria/tests/sonarQuadrantReadings.cpp new file mode 100644 index 0000000..c30375b --- /dev/null +++ b/Legacy/Aria/tests/sonarQuadrantReadings.cpp @@ -0,0 +1,101 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArRobot *robot; + +ArSonarDevice sonar; + +void sonarPrinter(void) +{ + double d; + double th; + + + d = sonar.currentReadingPolar(-45, 45, &th); + printf("front: %5.0fmm ", d); + if (d != sonar.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + d = sonar.currentReadingPolar(-135, -45, &th); + printf(" right: %5.0fmm ", d); + if (d != sonar.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + d = sonar.currentReadingPolar(45, 135, &th); + printf(" left: %5.0fmm ", d); + if (d != sonar.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + d = sonar.currentReadingPolar(135, -135, &th); + printf(" back: %5.0fmm ", d); + if (d != sonar.getMaxRange()) + printf("%3.0fdeg ", th); + else + printf("???deg "); + + printf("\r"); + fflush(stdout); +} + +int main(int argc, char** argv) +{ + ArGlobalFunctor sonarPrinterCB(&sonarPrinter); + Aria::init(); + + ArSimpleConnector connector(&argc, argv); + if(!connector.parseArgs()) + { + connector.logOptions(); + return 1; + } + + robot = new ArRobot; + robot->addRangeDevice(&sonar); + + if(!connector.connectRobot(robot)) + { + printf("Could not connect to robot.\n"); + return 2; + } + + robot->comInt(ArCommands::SONAR, 1); + robot->comInt(ArCommands::SOUNDTOG, 0); + + printf("Closest readings within quadrants:\n"); + robot->addUserTask("Sonar printer", 50, &sonarPrinterCB); + + robot->run(true); + Aria::shutdown(); + + +} diff --git a/Legacy/Aria/tests/sonarTest.cpp b/Legacy/Aria/tests/sonarTest.cpp new file mode 100644 index 0000000..3e980d0 --- /dev/null +++ b/Legacy/Aria/tests/sonarTest.cpp @@ -0,0 +1,93 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +ArRobot *robot; + +void sonarPrinter(void) +{ + int i; + printf("\r"); + for (i = 0; i < robot->getNumSonar(); i++) + { + printf(" %4d", robot->getSonarRange(i)); + if (robot->isSonarNew(i)) + printf("* "); + else + printf(" "); + } + if (robot->getNumSonar() == 0) + printf("No sonar"); + fflush(stdout); + +} + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + int i; + ArSensorReading *reading; + + ArGlobalFunctor sonarPrinterCB(&sonarPrinter); + ArTcpConnection con; + Aria::init(); + robot = new ArRobot; + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + robot->setDeviceConnection(&con); + if (!robot->blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + exit(0); + } + + printf("%d Sonar: Their positions:\n", robot->getNumSonar()); + for (i = 0; i < robot->getNumSonar(); i++) + { + reading = robot->getSonarReading(i); + if (reading != NULL) + printf("%d x: %.1f y: %.1f th: %.1f\n", i, reading->getSensorX(), + reading->getSensorY(), reading->getSensorTh()); + } + + robot->addUserTask("Sonar printer", 50, &sonarPrinterCB); + robot->comInt(ArCommands::SONAR, 1); + robot->comInt(ArCommands::SOUNDTOG, 0); + + robot->run(true); + Aria::shutdown(); + +} + diff --git a/Legacy/Aria/tests/soundPlayer.cpp b/Legacy/Aria/tests/soundPlayer.cpp new file mode 100644 index 0000000..6df0ff1 --- /dev/null +++ b/Legacy/Aria/tests/soundPlayer.cpp @@ -0,0 +1,97 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + + +#include "ArSoundPlayer.h" +#include +#include +#include +#include +#include +#include + +int main(int argc, char** argv) +{ + puts("reading PCM16 sound \"testsound.sw.raw\"..."); + int fd = open("testsound.sw.raw", O_RDONLY); + char data[60000]; + char* p = data; + int len = 0; + for(len = 0; ( (len <= 60000) && (read(fd, p++, 1) > 0) ); len++); + close(fd); + printf("playing PCM16 sound: %d bytes with %d samples of 2 bytes each...\n", len, len/2); + ArSoundPlayer::playSoundPCM16(data, len/2); + puts("done playing test sound.\n"); + + puts("playing test sound \"../examples/sound-r2a.wav\"..."); + ArSoundPlayer::playWavFile("../examples/sound-r2a.wav", NULL); + puts("done playing test sound.\n"); + + + + puts("attempting to play nonexistant sound \"nonexistant\". should fail (error output from \"play\" program)..."); + ArSoundPlayer::playWavFile("nonexistant", NULL); + puts("done playing bogus test sound.\n"); + + puts("attempting to play test sound \"../examples/sound-r2a.wav\" but with the bogus play program \"badplay\" (set via PLAY_WAV environment variable)... should fail with descriptive error message"); + setenv("PLAY_WAV", "badplay", 1); + ArSoundPlayer::playWavFile("../examples/sound-r2a.wav", NULL); + setenv("PLAY_WAV", "play", 1); + puts("done playing test sound with bogus player.\n"); + + puts("allocating a lot of memory, then trying to play sound.... (If ArSoundPlayer is using fork() to run the sound player, then you can get fork() to fail with ENOMEM by reducing available system memory and swap, and increasing the number of mallocs and their size. if it is using vfork() then this won't affect the creation of the child process.)"); + unsigned long total = 0; + const unsigned long allocsize = 20000; + const int alloctimes = 29999; + char *arrays[alloctimes]; + for(int i = 0; i < alloctimes; ++i) + { + arrays[i] = (char*) malloc(allocsize); + if(arrays[i] == NULL) + perror("Error allocating memory!"); + total += allocsize; + if(i % 1000 == 0) + printf("...allocated %d bytes (%f MB) in %d blocks...\n", total, ((double)total)/(1024.0*1024.0), i+1); + } + ArSoundPlayer::playWavFile("../examples/sound-r2a.wav", NULL); + puts("ok, played test sound. deallocating memory..."); + for(int i = 0; i < alloctimes; ++i) + { + free(arrays[i]); + } + puts("done deallocating memory."); + + + + puts("Playing WAV file in a loop (forever times)..."); + while(true) + ArSoundPlayer::playWavFile("../examples/sound-r2a.wav", NULL); + puts("done playing in a loop.\n"); + + return 0; +} + + diff --git a/Legacy/Aria/tests/stallTest.cpp b/Legacy/Aria/tests/stallTest.cpp new file mode 100644 index 0000000..6ef0897 --- /dev/null +++ b/Legacy/Aria/tests/stallTest.cpp @@ -0,0 +1,72 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +// Tests the stall behavior by going forward and ramming +// whatever is there... set the constantVelocity param to +// -400 instead of 400 to test going backwards. + +int main(void) +{ + ArTcpConnection con; + + ArRobot robot; + ArSonarDevice sonar; + + int ret; + std::string str; + ArActionStallRecover recover; + ArActionConstantVelocity constantVelocity("Constant Velocity", 400); + + Aria::init(); + + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.addRangeDevice(&sonar); + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + robot.addAction(&recover, 100); + robot.addAction(&constantVelocity, 25); + robot.run(true); + + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/stressTest.cpp b/Legacy/Aria/tests/stressTest.cpp new file mode 100644 index 0000000..fea4b6d --- /dev/null +++ b/Legacy/Aria/tests/stressTest.cpp @@ -0,0 +1,155 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArTime lastLoopTime; +int loopTime; + +class FillerThread : public ArASyncTask +{ +public: + FillerThread(void) {} + ~FillerThread(void) {} + + virtual void * runThread(void *arg); +protected: + ArTime myStartBusyTime; +}; + +void *FillerThread::runThread(void *arg) +{ + while (1) + { + myStartBusyTime.setToNow(); + while (myStartBusyTime.mSecSince() < 150); + } +} + +class JoydriveAction : public ArAction +{ +public: + JoydriveAction(void); + virtual ~JoydriveAction(void) {}; + virtual ArActionDesired *fire(ArActionDesired currentDesired); + bool joystickInited(void); +protected: + ArActionDesired myDesired; + ArJoyHandler myJoyHandler; +}; + +JoydriveAction::JoydriveAction(void) : + ArAction("Joydrive Action", "This action reads the joystick and sets the translational and rotational velocity based on this.") +{ + myJoyHandler.init(); + myJoyHandler.setSpeeds(50, 700); +} + +bool JoydriveAction::joystickInited(void) +{ + return myJoyHandler.haveJoystick(); +} + +ArActionDesired *JoydriveAction::fire(ArActionDesired currentDesired) +{ + int rot, trans; + + printf("%6ld ms since last loop. ms longer than desired: %6ld. mpac %d\n", + lastLoopTime.mSecSince(), + lastLoopTime.mSecSince() - loopTime, myRobot->getMotorPacCount()); + lastLoopTime.setToNow(); + + if (myJoyHandler.haveJoystick() && (myJoyHandler.getButton(1) || + myJoyHandler.getButton(2))) + { + if (ArMath::fabs(myRobot->getVel()) < 10.0) + myRobot->comInt(ArCommands::ENABLE, 1); + myJoyHandler.getAdjusted(&rot, &trans); + myDesired.setVel(trans); + myDesired.setDeltaHeading(-rot); + return &myDesired; + } + else + { + myDesired.setVel(0); + myDesired.setDeltaHeading(0); + return &myDesired; + } +} + +int main(void) +{ + ArTcpConnection con; + ArRobot robot; + int ret; + std::string str; + JoydriveAction jdAct; + FillerThread ft; + + ft.create(); + + FillerThread ft2; + + ft2.create(); + + Aria::init(); + /* + if (!jdAct.joystickInited()) + { + printf("Do not have a joystick, set up the joystick then rerun the program\n\n"); + Aria::shutdown(); + return 1; + } + */ + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + robot.setDeviceConnection(&con); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + lastLoopTime.setToNow(); + loopTime = robot.getCycleTime(); + + robot.addAction(&jdAct, 100); + robot.runAsync(true); + + robot.waitForRunExit(); + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/tests/stripQuoteTest.cpp b/Legacy/Aria/tests/stripQuoteTest.cpp new file mode 100644 index 0000000..e20034a --- /dev/null +++ b/Legacy/Aria/tests/stripQuoteTest.cpp @@ -0,0 +1,56 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +void printIt(const char *printing) +{ + char buffer[512]; + + if (ArUtil::stripQuotes(buffer, printing, 512)) + printf("Old '%s' New '%s'\n", printing, buffer); + else + printf("String '%s' didn't work\n", printing); +} + +int main(void) +{ + char buffer[512]; + + printIt("\"\""); + + printIt(""); + + printIt("\""); + + printIt("hi"); + + printIt("\"hi\""); + + printIt("boy oh boy is this fun!"); + + printIt("\"boy oh boy is this fun!\""); + +} diff --git a/Legacy/Aria/tests/systemCallTest.cpp b/Legacy/Aria/tests/systemCallTest.cpp new file mode 100644 index 0000000..e340a4f --- /dev/null +++ b/Legacy/Aria/tests/systemCallTest.cpp @@ -0,0 +1,159 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +int main(int argc, char** argv) +{ + system("echo joy of joys"); + // mandatory init + + //ArSignalHandler::block(ArSignalHandler::SigABRT); + Aria::init(); + + /* + ArSignalHandler::addHandlerCB(new ArGlobalFunctor1(&Aria::signalHandlerCB), ArListPos::LAST); + ArSignalHandler::blockCommon(); + ArSignalHandler::block(ArSignalHandler::SigABRT); + ArSignalHandler::handle(ArSignalHandler::SigHUP); + ArSignalHandler::handle(ArSignalHandler::SigINT); + ArSignalHandler::handle(ArSignalHandler::SigQUIT); + ArSignalHandler::handle(ArSignalHandler::SigTERM); + ArSignalHandler::handle(ArSignalHandler::SigPIPE); + ArSignalHandler::blockCommonThisThread(); + ArSignalHandler::createHandlerThreaded(); + */ + + //ArUtil::sleep(1000); + system("echo joy of joys"); + // set up our parser + ArArgumentParser parser(&argc, argv); + // set up our simple connector + ArSimpleConnector simpleConnector(&parser); + // robot + ArRobot robot; + // a laser in case one is used + ArSick sick; + // sonar, must be added to the robot, for teleop and wander + ArSonarDevice sonarDev; + + + // load the default arguments + parser.loadDefaultArguments(); + + // parse the command line... fail and print the help if the parsing fails + // or if the help was requested + if (!simpleConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + simpleConnector.logOptions(); + exit(1); + } + + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + // if you're using a program at startup in linux you must NOT + // include a keyhandler or you'll get lockups when trying to read + // keys with no terminal + + // a key handler so we can do our key handling + ArKeyHandler keyHandler; + // let the global aria stuff know about it + Aria::setKeyHandler(&keyHandler); + // toss it on the robot + robot.attachKeyHandler(&keyHandler); + printf("You may press escape to exit\n"); + + // add the sonar to the robot + robot.addRangeDevice(&sonarDev); + // add the laser to the robot + robot.addRangeDevice(&sick); + + + + // add a gyro, it'll see if it should attach to the robot or not + ArAnalogGyro gyro(&robot); + + // set up the robot for connecting + if (!simpleConnector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::exit(1); + } + + // start the robot running, true so that if we lose connection the run stops + robot.runAsync(true); + + // set up the laser before handing it to the laser mode + sick.runAsync(); + + // connect the laser if it was requested + if (!simpleConnector.connectLaser(&sick)) + { + printf("Could not connect to laser... exiting\n"); + Aria::exit(2); + } + + // we need to lock the robot since we'll be setting up these modes + // while the robot is already running and don't want anything to + // break + robot.lock(); + + // now add all the modes + ArModeLaser laser(&robot, "laser", 'l', 'L', &sick); + ArModeTeleop teleop(&robot, "teleop", 't', 'T'); + ArModeUnguardedTeleop unguardedTeleop(&robot, "unguarded teleop", 'u', 'U'); + ArModeWander wander(&robot, "wander", 'w', 'W'); + ArModeGripper gripper(&robot, "gripper", 'g', 'G'); + ArModeCamera camera(&robot, "camera", 'c', 'C'); + ArModeSonar sonar(&robot, "sonar", 's', 'S'); + ArModeBumps bumps(&robot, "bumps", 'b', 'B'); + ArModePosition position(&robot, "position", 'p', 'P', &gyro); + ArModeIO io(&robot, "io", 'i', 'I'); + ArModeActs actsMode(&robot, "acts", 'a', 'A'); + ArModeCommand command(&robot, "command", 'd', 'D'); + ArModeTCM2 tcm2(&robot, "tcm2", 'm', 'M'); + + // activate the default mode + teleop.activate(); + + // turn on the motors + robot.comInt(ArCommands::ENABLE, 1); + //robot.comInt(ArCommands::JOYDRIVE, 1); + + robot.unlock(); + + while (robot.isRunning() && Aria::getRunning()) + { + system("echo starting; sleep 3; echo done"); + ArUtil::sleep(3000); + } + + // now exit + Aria::exit(0); + + +} + diff --git a/Legacy/Aria/tests/systemStatusBasic.cpp b/Legacy/Aria/tests/systemStatusBasic.cpp new file mode 100644 index 0000000..0728e22 --- /dev/null +++ b/Legacy/Aria/tests/systemStatusBasic.cpp @@ -0,0 +1,63 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "Aria.h" +#include "ArSystemStatus.h" + +void printNewStatus() +{ + printf("CPU Usage: %0.1f%% Uptime: %f hours Wireless Link: %d (Signal:%d Noise:%d) Discarded Packets: %d (NetConflict:%d)\n", + ArSystemStatus::getCPUPercent(), ArSystemStatus::getUptimeHours(), + ArSystemStatus::getWirelessLinkQuality(), ArSystemStatus::getWirelessLinkSignal(), ArSystemStatus::getWirelessLinkNoise(), + ArSystemStatus::getWirelessDiscardedPackets(), ArSystemStatus::getWirelessDiscardedPacketsBecauseNetConflict() + ); +} + +int main(int argc, char** argv) +{ + Aria::init(); + printf("Running with sleep time of 1sec...\n"); + + for(int i = 0; i < 10; i++) + { + printNewStatus(); + ArUtil::sleep(1000); + } + + printf("\nRunning with sleep time of 5ms!...\n"); + for(int i = 0; i < 50; i++) + { + printNewStatus(); + ArUtil::sleep(5); + } + + printf("\nRunning with sleep time of 10 sec...\n"); + for(int i = 0; i < 4; i++) + { + printNewStatus(); + ArUtil::sleep(10000); + } +} diff --git a/Legacy/Aria/tests/systemStatusThread.cpp b/Legacy/Aria/tests/systemStatusThread.cpp new file mode 100644 index 0000000..1e3203a --- /dev/null +++ b/Legacy/Aria/tests/systemStatusThread.cpp @@ -0,0 +1,45 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/* test system status with refresh thread */ + +#include "Aria.h" +#include "ArSystemStatus.h" + +int main(int argc, char** argv) +{ + Aria::init(); + ArSystemStatus::startPeriodicUpdate(); + while(true) + { + printf("CPU Usage: %d%% Uptime: %f hours Wireless Link: %d (Signal:%d Noise:%d) Discarded Packets: %d (NetConflict:%d)\n", + (int)ArSystemStatus::getCPUPercent(), ArSystemStatus::getUptimeHours(), + ArSystemStatus::getWirelessLinkQuality(), ArSystemStatus::getWirelessLinkSignal(), ArSystemStatus::getWirelessLinkNoise(), + ArSystemStatus::getWirelessDiscardedPackets(), ArSystemStatus::getWirelessDiscardedPacketsBecauseNetConflict() + ); + ArUtil::sleep(1000); + } +} diff --git a/Legacy/Aria/tests/tcm2Test.cpp b/Legacy/Aria/tests/tcm2Test.cpp new file mode 100644 index 0000000..7bdb80e --- /dev/null +++ b/Legacy/Aria/tests/tcm2Test.cpp @@ -0,0 +1,101 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +ArRobot *robot; + +bool tcm2Printer(ArRobotPacket *packet) +{ + double myCompass; + double myPitch; + double myRoll; + double myXMag; + double myYMag; + double myZMag; + double myTemperature; + int myError; + char myCalibrationH; + char myCalibrationV; + double myCalibrationM; + //printf("%d\n", packet->getID()); + if (packet->getID() != 0xC0) + return false; + + myCompass = packet->bufToByte2() / 10.0; + myPitch = packet->bufToByte2() / 10.0; + myRoll = packet->bufToByte2() / 10.0; + myXMag = packet->bufToByte2() / 100.0; + myYMag = packet->bufToByte2() / 100.0; + myZMag = packet->bufToByte2() / 100.0; + myTemperature = packet->bufToByte2() / 10.0; + myError = packet->bufToByte2(); + myCalibrationH = packet->bufToByte(); + myCalibrationV = packet->bufToByte(); + myCalibrationM = packet->bufToByte2() / 100.0; + printf("\r%6.1f %6.1f %6.1f %6.2f %6.2f %6.2f %6.1f 0x%08x %4d %4d %6.2f", myCompass, myPitch, myRoll, myXMag, myYMag, myZMag, myTemperature, myError, myCalibrationH, myCalibrationV, myCalibrationM); + fflush(stdout); + //, myError, myCalibrationH, myCalibrationV, myCalibration + return true; +} + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + + ArGlobalRetFunctor1 tcm2PrinterCB(&tcm2Printer); + ArSerialConnection con; + Aria::init(); + + robot = new ArRobot; + + robot->addPacketHandler(&tcm2PrinterCB, ArListPos::FIRST); + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + exit(0); + } + + robot->setDeviceConnection(&con); + if (!robot->blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + exit(0); + } + + printf("%6s %6s %6s %6s %6s %6s %6s %10s %4s %4s %6s\n", + "comp", "pitch", "roll", "magX", "magY", "magZ", "temp", "error", + "calH", "calV", "calM"); + robot->comInt(ArCommands::TCM2, 3); + + robot->run(true); + Aria::shutdown(); + +} + diff --git a/Legacy/Aria/tests/tcpConnectionTest.cpp b/Legacy/Aria/tests/tcpConnectionTest.cpp new file mode 100644 index 0000000..49ef5b6 --- /dev/null +++ b/Legacy/Aria/tests/tcpConnectionTest.cpp @@ -0,0 +1,70 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* Test ArTcpConnection */ + +const char* host = "127.0.0.1"; + +int main(int argc, char **argv) +{ + ArRobot robot; + Aria::init(); + ArTcpConnection tcpCon; + + printf("Opening TCP connection to %s...\n", host); + int status = tcpCon.open(host); + if(status != 0) + { + printf("Failed to connect via TCP to %s: %s.\n", host, tcpCon.getOpenMessage(status)); + exit(1); + } + + printf("Connecting to robot...\n"); + robot.setDeviceConnection(&tcpCon); + if(!robot.blockingConnect()) + { + printf("Failed to connect to robot.\n"); + exit(2); + } + + printf("Connected to robot.\n"); + + // Start the robot running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + // Sleep for 3 seconds. + printf("Sleeping for 3 seconds...\n"); + ArUtil::sleep(3000); + + printf("Ending robot thread...\n"); + robot.stopRunning(); + + printf("Exiting.\n"); + return 0; +} diff --git a/Legacy/Aria/tests/testAbsoluteMaxesCommand.cpp b/Legacy/Aria/tests/testAbsoluteMaxesCommand.cpp new file mode 100644 index 0000000..e18a555 --- /dev/null +++ b/Legacy/Aria/tests/testAbsoluteMaxesCommand.cpp @@ -0,0 +1,151 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "Aria.h" +#include + +struct VelParams { + int transVel, transNegVel, transAccel, transDecel, rotVel, rotAccel, rotDecel, latVel, latAccel, latDecel; + void assertEqual(const VelParams &p) + { + assert(p.transVel == transVel); + assert(p.transNegVel == transNegVel); + assert(p.transAccel == transAccel); + assert(p.transDecel == transDecel); + assert(p.rotVel == rotVel); + assert(p.rotAccel == rotAccel); + assert(p.rotDecel == rotDecel); + assert(p.latVel == latVel); + assert(p.latAccel == latAccel); + assert(p.latDecel == latDecel); + } +}; + +VelParams SentMax, RecdMax; + + +bool handleAbsoluteMaxesReplyPacket(ArRobotPacket *pkt) +{ + if(pkt->getID() != 213) return false; + ArLog::log(ArLog::Normal, "Received ABSOLUTE_MAXES reply with:"); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransVel=%d (SentMax %d)", RecdMax.transVel= pkt->bufToByte2(), SentMax.transVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransNegVel=%d (SentMax %d)", RecdMax.transNegVel = pkt->bufToByte2(), SentMax.transNegVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransAccel=%d (SentMax %d)", RecdMax.transAccel = pkt->bufToByte2(), SentMax.transAccel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransDecel=%d (SentMax %d)", RecdMax.transDecel = pkt->bufToByte2(), SentMax.transDecel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotVel=%d (SentMax %d)", RecdMax.rotVel = pkt->bufToByte2(), SentMax.rotVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotAccel=%d (SentMax %d)", RecdMax.rotAccel = pkt->bufToByte2(), SentMax.rotAccel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotDecel=%d (SentMax %d)", RecdMax.rotDecel = pkt->bufToByte2(), SentMax.rotDecel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatVel=%d (SentMax %d)", RecdMax.latVel = pkt->bufToByte2(), SentMax.latVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatAccel=%d (SentMax %d)", RecdMax.latAccel = pkt->bufToByte2(), SentMax.latAccel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatDecel=%d (SentMax %d)", RecdMax.latDecel = pkt->bufToByte2(), SentMax.latDecel); + SentMax.assertEqual(RecdMax); + return true; +} + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser parser(&argc, argv); + parser.loadDefaultArguments(); + ArRobot robot; + + ArRobotConnector robotConnector(&parser, &robot); + if(!robotConnector.connectRobot()) + { + ArLog::log(ArLog::Terse, "testAbsoluteMaxesCommand: Could not connect to the robot."); + if(parser.checkHelpAndWarnUnparsed()) + { + // -help not given + Aria::logOptions(); + Aria::exit(1); + } + } + + if (!Aria::parseArgs() || !parser.checkHelpAndWarnUnparsed()) + { + Aria::logOptions(); + Aria::exit(1); + } + + ArLog::log(ArLog::Normal, "testAbsoluteMaxesCommand: Connected."); + + // Start the robot processing cycle running in the background. + // True parameter means that if the connection is lost, then the + // run loop ends. + robot.runAsync(true); + + ArUtil::sleep(500); + ArLog::log(ArLog::Normal, "Initial ARIA defaults for absolute maximums:"); + robot.lock(); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransVel=%d", robot.getAbsoluteMaxTransVel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransNegVel=%d", robot.getAbsoluteMaxTransNegVel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransAccel=%d", robot.getAbsoluteMaxTransAccel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransDecel=%d", robot.getAbsoluteMaxTransDecel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotVel=%d", robot.getAbsoluteMaxRotVel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotAccel=%d", robot.getAbsoluteMaxRotAccel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotDecel=%d", robot.getAbsoluteMaxRotDecel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatVel=%d", robot.getAbsoluteMaxLatVel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatAccel=%d", robot.getAbsoluteMaxLatAccel()); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatDecel=%d", robot.getAbsoluteMaxLatDecel()); + robot.unlock(); + + // Send ABSOLUTE_MAXES + ArRobotPacket pkt; + pkt.setID(ArCommands::ABSOLUTE_MAXES); + pkt.byte2ToBuf(SentMax.transVel = 500); + pkt.byte2ToBuf(SentMax.transNegVel = 500); + pkt.byte2ToBuf(SentMax.transAccel = 200); + pkt.byte2ToBuf(SentMax.transDecel = 200); + pkt.byte2ToBuf(SentMax.rotVel = 50); + pkt.byte2ToBuf(SentMax.rotAccel = 20); + pkt.byte2ToBuf(SentMax.rotDecel = 20); + pkt.byte2ToBuf(SentMax.latVel = 500); + pkt.byte2ToBuf(SentMax.latAccel = 200); + pkt.byte2ToBuf(SentMax.latDecel = 200); + pkt.finalizePacket(); + ArLog::log(ArLog::Normal, "Sending ABSOLUTE_MAXES command with:"); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransVel=%d", SentMax.transVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransNegVel=%d", SentMax.transNegVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransAccel=%d", SentMax.transAccel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxTransDecel=%d", SentMax.transDecel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotVel=%d", SentMax.rotVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotAccel=%d", SentMax.rotAccel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxRotDecel=%d", SentMax.rotDecel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatVel=%d", SentMax.latVel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatAccel=%d", SentMax.latAccel); + ArLog::log(ArLog::Normal, "\tAbsoluteMaxLatDecel=%d", SentMax.latDecel); + robot.lock(); + robot.getPacketSender()->sendPacket(&pkt); + robot.unlock(); + + + + ArLog::log(ArLog::Normal, "testAbsoluteMaxesCommand: Waiting for robot disconnect..."); + robot.waitForRunExit(); + ArLog::log(ArLog::Normal, "testAbsoluteMaxesCommand: Exiting."); + Aria::exit(0); + return 0; +} diff --git a/Legacy/Aria/tests/testCOM.cpp b/Legacy/Aria/tests/testCOM.cpp new file mode 100644 index 0000000..29060db --- /dev/null +++ b/Legacy/Aria/tests/testCOM.cpp @@ -0,0 +1,466 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +//#define DEBUG + +#include "Aria.h" +#include "string.h" + +#define BUF_LEN 50 +#define LOOP 100000 +#define MAGIC 0x5A +#define MAX_BR 10 +#define START_BR 8 + +#define NOMAGIC + +void sleep(int br); + +int main(int argc, char** argv) +{ + unsigned int real_loop, real_len; + int actual_start; + unsigned int c1, c2; + int ret; + unsigned long drops; + unsigned long fail, n, eachtry1, eachtry2, eachfail1, eachfail2, tx; + char bufWrite[BUF_LEN]; + char bufRead[BUF_LEN]; + int foo, pctcomplete; + int i; + float pct; + for (i = 0; i < BUF_LEN; i++) +#ifdef NOMAGIC + bufWrite[i] = i+1; +#else + bufWrite[i] = MAGIC; +#endif + + srand(time(NULL)); + + int bauds[10]; + float pcts1[10], pcts2[10]; +//not all standard baud rates are supported, "ArSerialConnection::rateToBaud" supports these: + bauds[0] = 300; + bauds[1] = 1200; + bauds[2] = 1800; + bauds[3] = 2400; + bauds[4] = 4800; + bauds[5] = 9600; + bauds[6] = 19200; + bauds[7] = 38400; + bauds[8] = 57600; + bauds[9] = 115200; + + eachfail1 = 0; + eachfail2 = 0; + eachtry1 = 0; + eachtry2 = 0; + + for(i=0;i<10;i++) + { + pcts1[i] = 0.0; + pcts2[i] = 0.0; + } + + fail = 0; + n = 0; + c1 = 5; + c2 = 5; + real_loop = LOOP; + + int bytes1 = 0; + int bytes2 = 0; + //int numToWrite = 1; + +#ifdef DEBUG + for (i=1;i3) + printf("\n\n%d\n\n",(48 + MAX_BR) - ((unsigned int) *argv[3])); +#endif + + c1 = (unsigned int) *argv[1]; + c2 = (unsigned int) *argv[2]; + + if ((c1 == c2) || ('1'>c1) || ('1'>c2) || ('4'real_loop) || (LOOPactual_start) || (MAX_BR 0) + { + for (i = 0; i < ret; i++) + { +#ifdef NOMAGIC + if ((bufRead[i] != bufWrite[i]) && (bufRead[i] != bufWrite[BUF_LEN - ret + i])) +#else + if (bufRead[i] != MAGIC) +#endif + { +// printf("Failed2 0x%x %d/%d ", bufRead[i], i, ret); + eachfail1 ++; + } + } + } + } + bytes2 += ret; + eachtry1 += ret; + +// ArUtil::sleep(1000); + + sleep(bauds[br]); + if (ser2.write(bufWrite, BUF_LEN) < 0) + { + printf("Failed2 write "); + eachfail2 += BUF_LEN; + } + sleep(bauds[br]); + if ((ret = ser1.read(bufRead, BUF_LEN)) < 0) + { + printf("Failed2 read "); + eachfail2 += BUF_LEN; + } + else + { + if (ret > 0) + { + for (i = 0; i < ret; i++) + { +#ifdef NOMAGIC + if ((bufRead[i] != bufWrite[i]) && (bufRead[i] != bufWrite[BUF_LEN - ret + i])) +// if (bufRead[i] != bufWrite[i]) +#else + if (bufRead[i] != MAGIC) +#endif + { +// printf("Failed2 0x%x %d/%d ", bufRead[i], i, ret); + eachfail2 ++; + } + } + } + } + bytes1 += ret; + eachtry2 += ret; + + printf("\r"); + printf("{"); + pctcomplete = (j*50)/real_loop; + for(int k=0;k<50;k++) + { + if (pctcomplete>k) + { + printf("*"); + } + else + { + if(pctcomplete==k) + { + foo = j % 4; + switch(foo) + { + case 0: + printf("\\"); + break; + case 1: + printf("|"); + break; + case 2: + printf("/"); + break; + default: + printf("-"); + break; + } + } + else + printf(" "); + } + } + printf("}"); + drops += ((2*(j+1)*BUF_LEN)-(eachtry1 + eachtry2)); + printf("%7d,%7d,%4d,%ld,%d", bytes1, bytes2, j, drops, bufRead[5]); + fflush(stdout); + } + + tx = (BUF_LEN*real_loop); + + if(eachtry1COM%s dropped %ld bytes.",argv[1],argv[2],(tx - eachtry1)); + eachfail1 +=(tx - eachtry1); + eachtry1 = tx; + } + if(eachtry2COM%s dropped %ld bytes.",argv[2],argv[1],(tx - eachtry2)); + eachfail2 +=(tx - eachtry2); + eachtry2 = tx; + } + + pcts1[br] = 100.0 * (1.0 - ((float)eachfail1 / (float)eachtry1)); + pcts2[br] = 100.0 * (1.0 - ((float)eachfail2 / (float)eachtry2)); + printf("\n%f%% ", pcts1[br]); + printf("Port1->2 %ld failures out of %ld attempts. (%d baud)\n", eachfail1, eachtry1, bauds[br]); + printf("%f%% ", pcts2[br]); + printf("Port2->1 %ld failures out of %ld attempts. (%d baud)", eachfail2, eachtry2, bauds[br]); + fail += eachfail1; + fail += eachfail2; + n += eachtry1; + n += eachtry2; + } + +tx = (BUF_LEN*2*real_loop*(MAX_BR-actual_start)); + +if(nCOM%s: COM%s->COM%s:",argv[1],argv[2],argv[2],argv[1]); +for(int k=0;k<10;k++) + { + if (0.0 == pcts1[k]) + { + printf("\n%6d baud: untested untested",bauds[k]); + } + else + { + if (100.0==pcts1[k]) + { + printf("\n%6d baud: %05f%% %f%%",bauds[k],pcts1[k],pcts2[k]); + } + else + { + printf("\n%6d baud: %05f%% %f%%",bauds[k],pcts1[k],pcts2[k]); + } + } + } +/* +printf("\n\nPort COM%s->COM%s:",argv[2],argv[1]); +for(int k=0;k<10;k++) + { + if (0.0 == pcts2[k]) + { + printf("\n%6d baud: untested",bauds[k]); + } + else + { + printf("\n%6d baud: %f%%",bauds[k],pcts2[k]); + } + } +*/ + +pct = 100.0 * (1.0 - ((float)fail / (float)n)); +printf("\n\n%f%% Overall\n", pct); + +if (99.8>pct) + { + printf("\n*****************************************\n"); + printf(" %ld errors -- test failed.",fail); + printf("\n*****************************************\n"); + printf("\n FFFFF AAA IIIII L"); + printf("\n F A A I L"); + printf("\n FFFF AAAAA I L"); + printf("\n F A A I L"); + printf("\n F A A IIIII LLLLL\n\n"); + } +else + { + if(100.0==pct) + { + printf("\n*****************************************\n"); + printf("Test completed successfully."); + printf("\n*****************************************\n"); + printf("\n PPPP AAA SSSS SSSS"); + printf("\n P P A A S S "); + printf("\n PPPP AAAAA SSS SSS"); + printf("\n P A A S S"); + printf("\n P A A SSSS SSSS \n\n"); + } + else + { + printf("\nMarginal success..... please re-test.\n\n"); + } + } + +ser1.close(); +ser2.close(); +} + + +void sleep(int br) +{ +ArUtil::sleep((200000 / (long)br) + 2); +//ArUtil::sleep(2); +return; +} diff --git a/Legacy/Aria/tests/testMobileSim.cpp b/Legacy/Aria/tests/testMobileSim.cpp new file mode 100644 index 0000000..b0fbeda --- /dev/null +++ b/Legacy/Aria/tests/testMobileSim.cpp @@ -0,0 +1,812 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +/* tests mobilesim-only commands, and some robot commands that can be + * particularly tricky in mobilesim (e.g. HEAD and MOVE). + */ + + +#include "Aria.h" + +#include + +bool log_simstat = true; + +unsigned int simint, realint, lastint; +int realX, realY, realTh, realZ; +double lat, lon, alt; + +bool handleSimStatPacket(ArRobotPacket* pkt) +{ + if(pkt->getID() != 0x62) return false; + if(log_simstat) printf("----------- SIMSTAT pkt received: ------------\n"); + char a = pkt->bufToByte(); // unused byte + char b = pkt->bufToByte(); // unused byte + ArTypes::UByte4 flags = pkt->bufToUByte4(); + if(log_simstat) printf("\tFlags=0x%x (Georef? %s)\n", flags, (flags&ArUtil::BIT1)?"yes":"no"); + simint = pkt->bufToUByte2(); + realint = pkt->bufToUByte2(); + lastint = pkt->bufToUByte2(); + if(log_simstat) printf("\tSimInterval=%d, RealInterval=%d, LastInterval=%d.\n", simint, realint, lastint); + realX = pkt->bufToByte4(); + realY = pkt->bufToByte4(); + realZ = pkt->bufToByte4(); + realTh = pkt->bufToByte4(); + if(log_simstat) printf("\tTrue Pose = (%d, %d, %d, %d)\n", realX, realY, realZ, realTh); + lat = pkt->bufToByte4() / 10e6; + lon = pkt->bufToByte4() / 10e6; + alt = pkt->bufToByte4() / 100.0; + if(log_simstat) printf("\tGeo Pose = (%f, %f, %f)\n", lat, lon, alt); + /* + This stuff has been moved to sim device data packet + unsigned int numDevs = pkt->bufToUByte4(); + printf("\t%d Devices:\n", numDevs); + for(unsigned int i = 0; i < numDevs; i++) + { + memset(s1, 0, 24); + memset(s2, 0, 24); + pkt->bufToStr(s1, 23); + pkt->bufToStr(s2, 23); + unsigned int which = (unsigned int) pkt->bufToUByte(); + unsigned int status = pkt->bufToUByte4(); + printf("\t\t%s is %s #%d (status 0x%x)\n", s1, s2, which, status); + } + */ + if(log_simstat) printf("-------------------------------------------------\n"); + return true; +} + +bool handleSimDeviceData(ArRobotPacket* pkt) +{ + if(pkt->getID() != 100) return false; + printf("------ SIM DEVICE DATA packet received: ---------\n"); + char name[24]; + char type[24]; + int idx; + pkt->bufToStr(name, 23); + pkt->bufToStr(type, 23); + idx = pkt->bufToUByte2(); + printf("Data for %s which is #%d of type %s.\n", name, idx, type); + if(strcmp(type, "gps") == 0) + { + double lat, lon, dop; + lat = (double)pkt->bufToByte4() / (double)10e6; + lon = (double)pkt->bufToByte4() / (double)10e6; + dop = (double)pkt->bufToByte2() / 1000.0; + printf("GPS Lat=%f, Lon=%f, DOP=%f\n", lat, lon, dop); + } + printf("-------------------------------------------------\n"); + return true; +} + +ArCondition gotSimMapChangedPacketCondition; +bool handleSimMapChangedPacket(ArRobotPacket* pkt) +{ + if(pkt->getID() != 102) return false; + printf("------- SIM MAP CHANGED packet received: --------\n"); + char name[256]; + int user = pkt->bufToUByte(); + int really_loaded = pkt->bufToUByte(); + if(user == 1) + printf("user=%d: Loaded by user GUI\n", user); + else + { + printf("user=%d: Loaded by client program\n", user); + if(really_loaded) + printf("loaded=%d: A new map was loaded.\n", really_loaded); + else + printf("loaded=%d: Map already loaded, not reloaded.\n", really_loaded); + } + pkt->bufToStr(name, 256); + printf("filename=%s\n", name); + printf("-------------------------------------------------\n"); + gotSimMapChangedPacketCondition.signal(); + return true; +} + + +ArCondition gotConfigPacketCondition; +bool handleConfigPacket(ArRobotPacket* pkt) +{ + if(pkt->getID() != 0x20) return false; + printf("----------- CONFIG pkt received: ------------\n"); + char buf[256]; + pkt->bufToStr(buf, sizeof(buf)); + printf("Type=%s\n", buf); + pkt->bufToStr(buf, sizeof(buf)); + printf("Subtype=%s\n", buf); + pkt->bufToStr(buf, sizeof(buf)); + printf("SerialNumber=%s\n", buf); + printf("unknown=%d\n", pkt->bufToUByte()); + printf("RotVelTop=%d\n", pkt->bufToUByte2()); + printf("TransVelTop=%d\n", pkt->bufToUByte2()); + printf("RotAccelTop=%d\n", pkt->bufToUByte2()); + printf("TransAccelTop=%d\n", pkt->bufToUByte2()); + printf("(PWMMax=%d)\n", pkt->bufToUByte2()); + pkt->bufToStr(buf, sizeof(buf)); + printf("Name=%s\n", buf); + printf("SipCycleTime=%d\n", pkt->bufToUByte()); + printf("(HostBaud=%d)\n", pkt->bufToUByte()); + printf("(Aux1Baud=%d)\n", pkt->bufToUByte()); + printf("HasGripper=%d\n", pkt->bufToUByte2()); + printf("HasFrontSonar=%d\n", pkt->bufToUByte2()); + printf("HasRearSonar=%d\n", pkt->bufToUByte()); + printf("LowBattery=%d\n", pkt->bufToUByte2()); + printf("(RevCount=%d)\n", pkt->bufToUByte2()); + printf("Watchdog=%d\n", pkt->bufToUByte2()); + printf("NormalMPacs=%d\n", pkt->bufToUByte()); + printf("StallVal=0x%X\n", pkt->bufToUByte2()); + printf("StallCount=%d\n", pkt->bufToUByte2()); + printf("(JoyVel=%d)\n", pkt->bufToUByte2()); + printf("(JoyRotVel=%d)\n", pkt->bufToUByte2()); + printf("RotVelMax=%d\n", pkt->bufToUByte2()); + printf("TransVelMax=%d\n", pkt->bufToUByte2()); + printf("RotAccel=%d\n", pkt->bufToUByte2()); + printf("RotDecel=%d\n", pkt->bufToUByte2()); + printf("(RotKP=%d)\n", pkt->bufToUByte2()); + printf("(RotKV=%d)\n", pkt->bufToUByte2()); + printf("(RotKI=%d)\n", pkt->bufToUByte2()); + printf("TransAccel=%d\n", pkt->bufToUByte2()); + printf("TransDecel=%d\n", pkt->bufToUByte2()); + printf("(TransKP=%d)\n", pkt->bufToUByte2()); + printf("(TransKV=%d)\n", pkt->bufToUByte2()); + printf("(TransKI=%d)\n", pkt->bufToUByte2()); + printf("FrontBumps=%d\n", pkt->bufToUByte()); + printf("RearBumps=%d\n", pkt->bufToUByte()); + printf("HasCharger=%d\n", pkt->bufToUByte()); + printf("SonarCycle=%d\n", pkt->bufToUByte()); + printf("ResetBaud=%d\n", pkt->bufToUByte()); + printf("HasGyro=%d\n", pkt->bufToUByte()); + printf("(DriftFactor=%d)\n", pkt->bufToUByte2()); + printf("(Aux2Baud=%d)\n", pkt->bufToUByte()); + printf("(Aux3Baud=%d)\n", pkt->bufToUByte()); + printf("(TicksPerMM=%d)\n", pkt->bufToUByte2()); + printf("(ShutdownVoltage=%d)\n", pkt->bufToUByte2()); + pkt->bufToStr(buf, sizeof(buf)); + printf("FirmwareVersion=%s\n", buf); + printf("(ChargeThreshold=%d)\n", pkt->bufToUByte2()); + gotConfigPacketCondition.signal(); + return true; + +} + +class CheckPositionTask +{ + ArRobot *robot; + ArFunctorC taskCB; + ArTime lastCheck; + ArPose oldpose, newpose, corner; + double expectedDist; + double speed; + int time; + double turndist; +public: + CheckPositionTask(ArRobot *_robot, double _speed, int _time, double _turndist) : + robot(_robot), taskCB(this, &CheckPositionTask::checkPosition), + expectedDist(_speed * ((double)_time/1000.0)), speed(_speed), time(_time), turndist(_turndist) + { + oldpose.setPose(realX, realY, realTh); + corner = oldpose; + printf("Speed=%.0f m/sec, Check interval=%d ms, Expected distance per check interval=%0.f mm, Sim Interval=%d ms\n", speed, time, expectedDist, realint); + printf("XPos\tYPos\tOldX\tOldY\tVelRptd\tPosDiff\tVelErr\tPosErr\tLastInt\tSimIntervalErr\n"); + } + void addTask() + { + puts("addTask()"); + robot->addSensorInterpTask("testMobileSim::CheckPositionTask", ArListPos::LAST, &taskCB); + } + void checkPosition() + { + puts("checkPosition()"); + fflush(stdout); + if(lastCheck.mSecSince() >= time) + { + lastCheck.setToNow(); + newpose.setPose(realX, realY, realTh); + double dist = newpose.findDistanceTo(oldpose); + double poserr = fabs( dist - expectedDist ); + printf("%.0f\t%.0f\t%.0f\t%.0f\t%.0f\t%.0f\t%.0f\t%.1f\t%u\t%.0f", newpose.getX(), newpose.getY(), oldpose.getX(), oldpose.getY(), robot->getVel(), dist, fabs(speed-robot->getVel()), poserr, lastint, fabs((double)realint-(double)lastint)); + if(poserr > 25) + printf("\t!!"); + if(poserr > 50) + printf("!!"); + if(poserr > 100) + { + printf("!!"); + } + if(poserr > 250) + { + robot->comStr(ArCommands::SIM_MESSAGE, "Warning, client detected big jump (>100)!"); + printf("!!"); + } + puts(""); fflush(stdout); + if(poserr > 500) + { + puts("Distance error is too much (more than 500 mm)!! Stopping here"); + robot->comStr(ArCommands::SIM_MESSAGE, "Jump was too big (>500)! Stopping here."); + robot->stop(); + return; + } + oldpose = newpose; + if(newpose.findDistanceTo(corner) >= turndist) + { + puts(" [turning]"); + corner = newpose; + robot->setDeltaHeading(-90); + } + } + } +}; + +class CheckRotationTask +{ + void checkRotation() + { + } +}; + + +/* * TODO: Register with Aria as an argument parser. * */ + +void usageerror() +{ + printf("usage: testMobileSim \n" + " or\n"\ + " testMobileSim --all --message --message-sequence --newmap \n"\ + "testMobileSim options:\n" \ + " --stayconnected --simstat --message --setpose \n" + " --move --vel2 --exit --newmap|--master-newmap --config\n" + " --gps --position --rotation --die-during-sync --slow-sync --crash\n" + " --sleep-after-newmap --logstate \n" + "Note: --stayconnected, --position and --rotation enable a persistent mode that does not exit.\n\n" + ); + Aria::logOptions(); + exit(1); +} + +int main(int argc, char **argv) +{ + const int test_simstat = 1; + const int test_message = 1<<1; + const int test_setpose = 1<<2; + const int test_move = 1<<3; + const int test_vel2 = 1<<4; + const int test_exit = 1<<5; + const int test_newmap = 1<<6; + const int test_seta = 1<<7; + const int test_config = 1<<8; + const int test_old_broken_setpose = 1<<9; + const int test_gps = 1<<10; + const int test_position = 1<<11; + const int test_rotation = 1<<12; + const int test_die_during_sync = 1<<13; + const int test_slow_sync = 1<<14; + const int test_crash = 1<<15; + const int test_message_sequence = 1<<16; + const int test_hang_during_sync = 1<<17; + const int test_logstate = 1<<18; + + int testmask = 0; + char* mapfile = NULL; + bool master_newmap = false; + char* message = NULL; + char* logstate_msg = NULL; + int32_t X = 0; + int32_t Y = 0; + int32_t Th = 0; + bool stayConnected = false; + bool simdevicepacket = false; + bool sleep_after_newmap = false; + + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + ArArgumentParser parser(&argc, argv); + ArSimpleConnector connector(&parser); + + if(parser.checkArgument("--help") || parser.checkArgument("-help")) + usageerror(); + mapfile = parser.checkParameterArgument("--newmap"); + if(mapfile) + { + if(strlen(mapfile) == 0) + usageerror(); + printf("mapfile will be \"%s\"\n", mapfile); + testmask |= test_newmap; + } + master_newmap = parser.checkArgument("--master-newmap"); + sleep_after_newmap = parser.checkArgument("--sleep-after-newmap"); + + message = parser.checkParameterArgument("--message"); + if(message) + { + if(strlen(message) == 0) + usageerror(); + printf("message will be \"%s\"\n", message); + testmask |= test_message; + } + + if(parser.checkArgument("--simstat")) + testmask |= test_simstat; + char* posestr = parser.checkParameterArgument("--setpose"); + if(posestr) + { + if(strlen(posestr) == 0) + usageerror(); + sscanf(posestr, "%d,%d,%d", &X, &Y, &Th); + printf("setpose: X=%d, Y=%d, Th=%d.\n", X, Y, Th); + testmask |= test_setpose; + } + if(parser.checkArgument("--move")) + testmask |= test_move; + if(parser.checkArgument("--vel2")) + testmask |= test_vel2; + if(parser.checkArgument("--exit")) + testmask |= test_exit; + if(parser.checkArgument("--seta")) + testmask |= test_seta; + if(parser.checkArgument("--config")) + testmask |= test_config; + if(parser.checkArgument("--broken-setpose")) + testmask |= test_old_broken_setpose; + if(parser.checkArgument("--gps")) + { + testmask |= test_gps; + simdevicepacket = true; + } + if(parser.checkArgument("--position")) + { + testmask |= test_position; + } + if(parser.checkArgument("--rotation")) + { + testmask |= test_rotation; + } + if(parser.checkArgument("--die-during-sync")) + { + testmask |= test_die_during_sync; + } + if(parser.checkArgument("--slow-sync")) + { + testmask |= test_slow_sync; + } + if(parser.checkArgument("--crash")) + { + testmask |= test_crash; + } + if(parser.checkArgument("--message-sequence")) + { + testmask |= test_message_sequence; + } + if(parser.checkArgument("--hang-during-sync")) + { + testmask |= test_hang_during_sync; + } + + logstate_msg = parser.checkParameterArgument("--logstate"); + if(logstate_msg) + { + testmask |= test_logstate; + } + + if(parser.checkArgument("--all")) + { + if(!message || !mapfile) + usageerror(); + testmask = 0xFF; + } + + if(parser.checkArgument("--stayconnected")) + stayConnected = true; + + + + ArRobot robot; + robot.setLogMovementSent(true); + + ArSick laser; + robot.addRangeDevice(&laser); + + if (!connector.parseArgs()) + { + connector.logOptions(); + return 1; + } + + + if(testmask & test_die_during_sync) + { + connector.setupRobot(&robot); + robot.asyncConnect(); + ArUtil::sleep(20); + abort(); + } + else if(testmask & test_slow_sync) + { + connector.setupRobot(&robot); + ArDeviceConnection *devCon = robot.getDeviceConnection(); + assert(devCon->openSimple()); + for(int syncSeq = 0; syncSeq < 3; ++syncSeq) + { + for(int i = 0; i < 3; ++i) + { + printf("Sending SYNC%d packet...\n", syncSeq); + ArRobotPacket pkt; + pkt.setID(syncSeq); + pkt.finalizePacket(); + devCon->writePacket(&pkt); + ArRobotPacketReceiver rec; + rec.setDeviceConnection(devCon); + ArRobotPacket *replyPkt = rec.receivePacket(1000); + assert(replyPkt); + printf("Got reply to SYNC%d: SYNC%d.\n", syncSeq, replyPkt->getID()); + if(replyPkt->getID() == 2) + { + printf("Got SYNC2 with length %d.\n", replyPkt->getDataLength()); + exit(0); + } + } + } + puts("Hey, did we never receive SYNC2? "); + exit(-1); + } + else if(testmask & test_hang_during_sync) + { + connector.setupRobot(&robot); + robot.asyncConnect(); + ArUtil::sleep(20); + puts("Hanging (by locking ArRobot indefinitely and then doing nothing forever)..."); + robot.lock(); + while(true) + ArUtil::sleep(1000000); + } + else + { + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to simulated robot... exiting\n"); + return 2; + } + } + printf("Connected to robot.\n"); + robot.runAsync(true); + + printf("running laser.\n"); + connector.setupLaser(&laser); + laser.runAsync(); + printf("connecting to laser.\n"); + if(!laser.blockingConnect()) + { + printf("Could not connect to simulated laser. That's OK, maybe it doesn't have one.\n"); + } + + robot.enableMotors(); + + ArGlobalRetFunctor1 mySimDeviceDataPacketHandler(&handleSimDeviceData); + if(simdevicepacket) { + puts("adding simdevicedata packet handler..."); + robot.addPacketHandler(&mySimDeviceDataPacketHandler); + } + + ArGlobalRetFunctor1 mySimStatPacketHandler(&handleSimStatPacket); + if(testmask & test_simstat) + { + printf("** SIMSTAT **\n"); + robot.addPacketHandler(&mySimStatPacketHandler); + printf("-> SIM_STAT 1...\n"); + robot.comInt(ArCommands::SIM_STAT, 1); + printf("Request sent. sleeping for 4 seconds...\n"); + ArUtil::sleep(4000); + robot.remPacketHandler(&mySimStatPacketHandler); + } + + if(testmask & test_gps) + { + printf("** GPS request **\n"); + struct gpscmd { + ArTypes::Byte enable; + char gpsstr[4]; + ArTypes::UByte2 idx; + }; + gpscmd c; + c.enable = 1; + strcpy(c.gpsstr, "gps"); + c.idx = 0; + printf("-> 229 %d, \"%s\", %d...\n", c.enable, c.gpsstr, c.idx); + robot.comDataN(229, (const char*)&c, sizeof(c)); + } + + if(testmask & test_message) + { + printf("** Message **\n"); + printf("-> SIM_MESSAGE \"%s\"...\n", message); + robot.comStr(ArCommands::SIM_MESSAGE, message); + printf("Message command sent (message length %d bytes).\n\n", strlen(message)); + } + + if(testmask & test_message_sequence) + { + puts("** Message sequence (1..20)"); + char buf[8]; + for(int i = 1; i <= 20; ++i) + { + snprintf(buf, 8, "seq%d", i); + printf("-> SIM_MESSAGE \"%s\"...\n", buf); + robot.comStr(ArCommands::SIM_MESSAGE, buf); + printf("Message command sent (message length %d bytes).\n\n", strlen(buf)); + } + } + + if(testmask & test_old_broken_setpose) + { + /* OLD WAY:*/ + printf("** SIM_SET_POSE with broken argument packing **\n"); + int16_t cmd[6]; + cmd[1] = (int16_t) X; + cmd[0] = (int16_t) (X >> 16); + + cmd[3] = (int16_t) Y; + cmd[2] = (int16_t) (Y >> 16); + + cmd[5] = (int16_t) Th; + cmd[4] = (int16_t) (Th >> 16); + printf("-> SIM_SET_POSE,\n"); + printf("\t x[0] = %d, x[1] = %d; y[0] = %d, y[1] = %d; th[0] = %d, th[1] = %d\n", cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5]); + robot.comDataN(ArCommands::SIM_SET_POSE, (char*)cmd, sizeof(cmd)); + printf("Command sent.\n\n"); + } + + if(testmask & test_setpose) + { + printf("** SIM_SET_POSE **\n"); + + ArRobotPacket pkt; + pkt.setID(ArCommands::SIM_SET_POSE); + pkt.uByteToBuf(0); + pkt.byte4ToBuf(X); + pkt.byte4ToBuf(Y); + pkt.byte4ToBuf(Th); + pkt.finalizePacket(); + printf("-> SIM_SET_POSE %d %d %d\n", X, Y, Th); + robot.getDeviceConnection()->write(pkt.getBuf(), pkt.getLength()); + printf("Command sent.\n\n"); + } + + if(testmask & test_seta) + { + puts("** SETA test **"); + if(robot.hasSettableAccsDecs()) + puts("ArRobot thinks this robot has settable acceleration and deceleration."); + else + puts("WARNING ArRobot does not think that this robot has settable acceleration and deceleration."); + //puts("-> SETA 500..."); + //robot.comInt(ArCommands::SETA, 500); + //puts("Command sent.\n"); + puts("-> SETA 500 (via ArRobot)..."); + robot.setTransAccel(500); + puts("TransAccel set in ArRobot. Will be sent next state reflection cycle. Waiting 300ms for cycles to happen...\n"); + ArUtil::sleep(300); + } + + if(testmask & test_move) + { + printf("** MOVE test **\n"); + printf("-> MOVE 1000\n"); + robot.lock(); + robot.move(1000); + robot.unlock(); + printf("(sleep 4 sec)...\n"); ArUtil::sleep(4000); + printf("-> MOVE -2000\n"); + robot.move(-2000); + printf("(sleep 5 sec)...\n"); ArUtil::sleep(5000); + printf("-> MOVE -2000\n"); + robot.move(-2000); + printf("(sleep 5 sec)...\n"); ArUtil::sleep(5000); + printf("-> MOVE 1\n"); + robot.move(1); + printf("(sleep 2 sec)...\n"); ArUtil::sleep(2000); + printf("-> MOVE 0\n"); + robot.move(0); + printf("(sleep 2 sec)...\n"); ArUtil::sleep(2000); + printf("-> MOVE 500\n"); + robot.move(500); + printf("(sleep 3 sec)...\n"); ArUtil::sleep(3000); + printf("-> MOVE 500\n"); + robot.move(500); + printf("(sleep 3 sec)...\n"); ArUtil::sleep(3000); + printf("-> MOVE 500\n"); + robot.move(500); + printf("(sleep 3 sec)...\n"); ArUtil::sleep(3000); + printf("\n"); + } + + if(testmask & test_vel2) + { + printf("** VEL2 Tests **\n"); + printf("-> VEL2 100 100...\n"); + robot.setVel2(100, 100); + ArUtil::sleep(4000); + printf("-> VEL2 -100 100...\n"); + robot.setVel2(-100, 100); + ArUtil::sleep(4000); + printf("-> VEL2 100 -100...\n"); + robot.setVel2(100, -100); + ArUtil::sleep(4000); + printf("-> VEL2 150 100...\n"); + robot.setVel2(200, 100); + ArUtil::sleep(4000); + printf("-> VEL2 -200 -200...\n"); + robot.setVel2(-200, -200); + ArUtil::sleep(4000); + printf("-> VEL2 0 0...\n"); + robot.setVel2(0, 0); + ArUtil::sleep(4000); + printf("-> stop...\n"); + robot.stop(); + printf("\n\n"); + } + + if(testmask & test_newmap) + { + ArGlobalRetFunctor1 mapChanged(&handleSimMapChangedPacket); + robot.addPacketHandler(&mapChanged); + ArUtil::sleep(200); + if(master_newmap) + printf("** SIM_CTRL 2 (master load new map) **\n"); + else + printf("** SIM_CTRL 1 (load new map) **\n"); + struct sim_ctrl_map_t { + ArTypes::Byte2 code; + ArTypes::UByte2 len; + char mapfile[128]; + }; + struct sim_ctrl_map_t cmd; + if(master_newmap) + cmd.code = 2; + else + cmd.code = 1; + cmd.len = strlen(mapfile); + memset(cmd.mapfile, 0, 128); + strncpy(cmd.mapfile, mapfile, cmd.len); + printf("-> SIM_CTRL %d, %d, \"%s\"...\n", cmd.code, cmd.len, cmd.mapfile); + robot.comDataN(ArCommands::SIM_CTRL, (const char*)&cmd, sizeof(cmd)); + puts(" waiting for map change reply packet..."); + gotSimMapChangedPacketCondition.wait(); + puts(" got map change reply packet."); + if(sleep_after_newmap) + { + puts(" sleeping for 15 seconds..."); + ArUtil::sleep(15000); + } + } + + + if(testmask & test_config) + { + puts("** Config Packet **"); + ArGlobalRetFunctor1 myConfigPacketHandler(&handleConfigPacket); + robot.addPacketHandler(&myConfigPacketHandler); + ArUtil::sleep(300); + puts("-> CONFIG..."); + robot.com(18); + gotConfigPacketCondition.wait(); + printf("\nArRobot::getAbsoluteMaxTransVel() == %f.", robot.getAbsoluteMaxTransVel()); + } + + if(testmask & test_crash) + { + puts("** SIM_RESET test (crash/abort MobileSim) after 2 sec"); + ArUtil::sleep(2000); + puts("-> 255..."); + robot.com(255); + } + + if(testmask & test_exit) + { + printf("** SIM_EXIT test **\n"); + printf("-> SIM_EXIT 23...\n"); + robot.comInt(ArCommands::SIM_EXIT, 23); + // old SRISim command: robot.com(62); + printf("\n\n"); + } + + + // Note: must be last test: + if(testmask & test_position || testmask & test_rotation) + { + printf("** Positions match velocities test **\n"); + int time = 1000; + log_simstat = false; + ArGlobalRetFunctor1 mySimStatPacketHandler(&handleSimStatPacket); + robot.lock(); + robot.addPacketHandler(&mySimStatPacketHandler); + printf("-> SIMSTAT 2\n"); + robot.comInt(237, 2); + printf("(now is the time to move the robot in the sim before the test start...)\n"); + robot.unlock(); + ArUtil::sleep(4000); + robot.lock(); + + if(testmask & test_position) + { + double speed = 200; + int turndist = 20000; + printf("-> VEL %.0f...\n", speed); + robot.setVel(speed); + robot.unlock(); + ArUtil::sleep(4000); // let it get up to speed, also more time to move the robot or whatever + robot.lock(); + (new CheckPositionTask(&robot, speed, time, turndist))->addTask(); + } + else if(testmask & test_rotation) + { + double speed = 30; + printf("-> RVEL %.0f...\n", speed); + robot.setRotVel(speed); + robot.unlock(); + ArUtil::sleep(1000); + robot.lock(); + //(new CheckRotationTask(&robot, speed, time))->addTask(); + } + + robot.unlock(); + stayConnected = true; + } + + if(testmask & test_logstate) + { + puts("** SIM_CTRL 5 (logstate) **"); + struct { + ArTypes::Byte2 sim_ctrl; + char logmsg[128]; + } cmd; + cmd.sim_ctrl = 5; + //cmd.len = strlen(logstate_msg); + strncpy(cmd.logmsg, logstate_msg, 128); + printf("-> SIM_CTRL %d, \"%s\"...\n", cmd.sim_ctrl, cmd.logmsg); + robot.comDataN(ArCommands::SIM_CTRL, (const char*)&cmd, sizeof(cmd)); + } + + // ------ end of tests ----- + + robot.lock(); + if(stayConnected && robot.isRunning()) + { + robot.unlock(); + puts("waitForRunExit()"); + robot.waitForRunExit(); + } + else + { + robot.unlock(); + } + + printf("** Done with tests. Sleeping for 3 seconds and then stopping ArRobot thread... **\n"); + ArUtil::sleep(3000); + robot.stopRunning(); + printf("** Exiting. **\n"); + return 0; +} + diff --git a/Legacy/Aria/tests/testsound.sw.raw b/Legacy/Aria/tests/testsound.sw.raw new file mode 100644 index 0000000..2d2ac52 Binary files /dev/null and b/Legacy/Aria/tests/testsound.sw.raw differ diff --git a/Legacy/Aria/tests/threadTest.cpp b/Legacy/Aria/tests/threadTest.cpp new file mode 100644 index 0000000..f820b25 --- /dev/null +++ b/Legacy/Aria/tests/threadTest.cpp @@ -0,0 +1,138 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +//#include + +class TestThread : public ArASyncTask +{ +public: + TestThread(int number, ArMutex &mutex); + ~TestThread(void) {} + + virtual void * runThread(void *arg); + + int myNum; + ArMutex &myMutex; +}; + +TestThread::TestThread(int number, ArMutex &mutex) : + myNum(number), + myMutex(mutex) +{ +} + +void *TestThread::runThread(void *arg) +{ + unsigned int interval; + +puts("new thread running..."); + while (myRunning) + { + // Yield the processor here so that the other threads get a chance + // to get the lock. calling ArThread::yield() will give sequential + // running of the threads. + //yield(); + + // Sleeping of 1 microsecond randomizes the order of running of the + // threads. + ArUtil::sleep(1); + + myMutex.lock(); + interval=rand()%10000; + printf("Thread %d: Locked. Going to sleep for %dms\n", myNum, interval); + ArUtil::sleep(interval); + printf("Thread %d: Unlocking...\n", myNum); + myMutex.unlock(); + } + + return NULL; +} + +int main(int argc, char **argv) +{ +puts("Aria init..."); +fflush(stdout); + Aria::init(Aria::SIGHANDLE_THREAD, false); + + ArMutex mutex; + mutex.setLogName("mutex"); + + ArMutex::setLockWarningTime(1); + ArMutex::setUnlockWarningTime(5); + TestThread thread1(1, mutex), thread2(2, mutex), thread3(3, mutex), + thread4(4, mutex); + + thread1.setThreadName("thread1"); + thread2.setThreadName("thread2"); + thread3.setThreadName("thread3"); + thread4.setThreadName("thread4"); +puts("srand..."); + srand(time(0)); + + +puts("creating 3 threads..."); + thread1.create(); + thread2.create(); + thread3.create(); + + printf("main thread name=\"%s\", OS handle=%lu, OS pointer=0x%x\n", ArThread::getThisThreadName(), ArThread::getThisOSThread(), (unsigned int) ArThread::getThisThread()); + printf("thread1 thread name=\"%s\", OS handle=%lu, OS pointer=0x%x\n", thread1.getThreadName(), thread1.getOSThread(), (unsigned int) thread1.getThread()); + printf("thread2 thread name=\"%s\", OS handle=%lu, OS pointer=0x%x\n", thread2.getThreadName(), thread2.getOSThread(), (unsigned int) thread2.getThread()); + printf("thread3 thread name=\"%s\", OS handle=%lu, OS pointer=0x%x\n", thread3.getThreadName(), thread3.getOSThread(), (unsigned int) thread3.getThread()); + printf("thread4 (not created yet) thread name=\"%s\", OS handle=%lu, OS pointer=0x%x\n", thread4.getThreadName(), thread4.getOSThread(), (unsigned int) thread4.getThread()); + +#ifndef MINGW + if(ArThread::getThisOSThread() == thread1.getOSThread() || + ArThread::getThisOSThread() == thread2.getOSThread() || + ArThread::getThisOSThread() == thread3.getOSThread() || + ArThread::getThisOSThread() == thread4.getOSThread() || + thread1.getOSThread() == thread2.getOSThread() || + thread1.getOSThread() == thread3.getOSThread() || + thread1.getOSThread() == thread4.getOSThread() || + thread2.getOSThread() == thread1.getOSThread() || + thread2.getOSThread() == thread3.getOSThread() || + thread2.getOSThread() == thread4.getOSThread() || + thread3.getOSThread() == thread1.getOSThread() || + thread3.getOSThread() == thread2.getOSThread() || + thread3.getOSThread() == thread4.getOSThread() || + thread4.getOSThread() == thread1.getOSThread() || + thread4.getOSThread() == thread2.getOSThread() || + thread4.getOSThread() == thread3.getOSThread() ) + { + puts("error, some thread IDs are the same!"); + return 5; + } +#endif + +puts("run thread 4 in main thread"); + thread4.runInThisThread(); + +puts("exit"); + Aria::exit(0); + + return(0); +} + diff --git a/Legacy/Aria/tests/timePrinter.cpp b/Legacy/Aria/tests/timePrinter.cpp new file mode 100644 index 0000000..4e7fe80 --- /dev/null +++ b/Legacy/Aria/tests/timePrinter.cpp @@ -0,0 +1,46 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + Aria::init(); + ArLog::init(ArLog::StdOut, ArLog::Normal, "", true); + + if (ArTime::usingMonotonicClock()) + ArLog::log(ArLog::Normal, "Using monotonic clock"); + else + ArLog::log(ArLog::Normal, "Using normal clock that will have issues if time of day is changed"); + + ArTime time; + while (Aria::getRunning()) + { + time.setToNow(); + ArLog::log(ArLog::Normal, "%10s\t%lu%10s\t%lu", "", time.getSec(), "", + time.getMSec()); + ArUtil::sleep(1000); + } +} diff --git a/Legacy/Aria/tests/timeTest.cpp b/Legacy/Aria/tests/timeTest.cpp new file mode 100644 index 0000000..7ccee2e --- /dev/null +++ b/Legacy/Aria/tests/timeTest.cpp @@ -0,0 +1,156 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +int main(void) +{ + + Aria::init(); + + + ArLog::log(ArLog::Normal, "\nTesting ArTime with large values:"); + ArTime startLarge, testlarge; + + ArLog::log(ArLog::Normal, "Setting an ArTime object \"startLarge\" to now..."); + startLarge.setToNow(); + ArLog::log(ArLog::Normal, "mSecSince %ld secSince %ld", + startLarge.mSecSince(), startLarge.secSince()); + + long adding=pow(2,31) - 10 * 1000; + ArLog::log(ArLog::Normal, "Adding %d milliseconds", adding); + startLarge.addMSec(adding); + ArLog::log(ArLog::Normal, "mSecSince %ld secSince %ld", + startLarge.mSecSince(), startLarge.secSince()); + ArLog::log(ArLog::Normal, "mSecSinceLL %lld secSinceLL %lld", + startLarge.mSecSinceLL(), startLarge.secSinceLL()); + + + ArLog::log(ArLog::Normal, "Adding %d milliseconds", adding); + startLarge.addMSec(adding); + ArLog::log(ArLog::Normal, "mSecSince %ld secSince %ld", + startLarge.mSecSince(), startLarge.secSince()); + ArLog::log(ArLog::Normal, "mSecSinceLL %lld secSinceLL %lld", + startLarge.mSecSinceLL(), startLarge.secSinceLL()); + + ArLog::log(ArLog::Normal, "\nTesting platform localtime (broken-down) struct:"); + struct tm t; + ArUtil::localtime(&t); + ArLog::log(ArLog::Normal, "ArUtil::localtime() returned: year=%d mon=%d mday=%d hour=%d min=%d sec=%d", + t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec); + time_t yesterday = time(NULL) - (24*60*60) ; + ArUtil::localtime(&yesterday, &t); + ArLog::log(ArLog::Normal, "ArUtil::localtime(time(NULL) - 24hours, struct tm*) returned: year=%d mon=%d mday=%d hour=%d min=%d sec=%d", + t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec); + + ArLog::log(ArLog::Normal, "\nCurrent time as strings:"); + char year[5], month[3], day[3], hour[3], min[3], sec[3]; + ArUtil::putCurrentYearInString(year, 5); + ArUtil::putCurrentMonthInString(month, 3); + ArUtil::putCurrentDayInString(day, 3); + ArUtil::putCurrentHourInString(hour, 3); + ArUtil::putCurrentMinuteInString(min, 3); + ArUtil::putCurrentSecondInString(sec, 3); + ArLog::log(ArLog::Normal, " Year:%s, Month:%s, Day:%s, Hour:%s, Min:%s, Sec:%s", + year, month, day, hour, min, sec); + + ArLog::log(ArLog::Normal, "\nTesting ArTime:"); + ArTime start, test; + + ArLog::log(ArLog::Normal, "Setting an ArTime object \"start\" to now..."); + start.setToNow(); + start.log(); + ArLog::log(ArLog::Normal, "Sleeping 4 secs"); + ArUtil::sleep(4000); + ArLog::log(ArLog::Normal, "Setting an ArTime object \"test\" to now..."); + test.setToNow(); + test.log(); + + ArLog::log(ArLog::Normal, "ms of \"test\" since start %ld", test.mSecSince(start)); + ArLog::log(ArLog::Normal, "seconds \"test\" since start %ld", test.secSince(start)); + ArLog::log(ArLog::Normal, "ms of start since \"test\" %ld", start.mSecSince(test)); + ArLog::log(ArLog::Normal, "seconds \"start\" test %ld", start.secSince(test)); + ArLog::log(ArLog::Normal, "\"start\" is before \"test\"? %d", test.isBefore(start)); + ArLog::log(ArLog::Normal, "\"start\" is after \"test\"? %d", test.isAfter(start)); + ArLog::log(ArLog::Normal, "\"test\" is before \"start\"? %d", start.isBefore(test)); + ArLog::log(ArLog::Normal, "\"test\" is after \"start\"? %d", start.isAfter(test)); + ArLog::log(ArLog::Normal, "ms from \"start\" to now %ld", start.mSecTo()); + ArLog::log(ArLog::Normal, "s from \"start\" to now %ld", start.secTo()); + ArLog::log(ArLog::Normal, "ms since \"start\" %ld", start.mSecSince()); + ArLog::log(ArLog::Normal, "s since \"start\" %ld", start.secSince()); + ArLog::log(ArLog::Normal, "ms from \"test\" stamp to now %ld", test.mSecTo()); + ArLog::log(ArLog::Normal, "s from \"test\" stamp to now %ld", test.secTo()); + + ArLog::log(ArLog::Normal, "Testing addMSec, adding 200 mSec"); + test.addMSec(200); + ArLog::log(ArLog::Normal, "ms from \"test\" stamp to now %ld", test.mSecTo()); + ArLog::log(ArLog::Normal, "Testing addMSec, subtracting 300 mSec"); + test.addMSec(-300); + ArLog::log(ArLog::Normal, "ms from \"test\" stamp to now %ld", test.mSecTo()); + ArLog::log(ArLog::Normal, "Testing addMSec, adding 20.999 seconds"); + test.addMSec(20999); + ArLog::log(ArLog::Normal, "ms from \"test\" stamp to now %ld", test.mSecTo()); + ArLog::log(ArLog::Normal, "Testing addMSec, subtracting 23.5 seconds"); + test.addMSec(-23500); + ArLog::log(ArLog::Normal, "ms from \"test\" stamp to now %ld", test.mSecTo()); + + ArTime timeDone; + ArLog::log(ArLog::Normal, "Setting ArTime object \"done\" to now."); + timeDone.setToNow(); + timeDone.addMSec(1000); + ArLog::log(ArLog::Normal, "Making sure the add works in the right direction, adding a second to a timestamp set now"); + ArLog::log(ArLog::Normal, "Reading: %ld", timeDone.mSecTo()); + ArLog::log(ArLog::Normal, "Sleeping 20 ms"); + ArUtil::sleep(20); + ArLog::log(ArLog::Normal, "Reading: %ld", timeDone.mSecTo()); + ArLog::log(ArLog::Normal, "Sleeping 2 seconds"); + ArUtil::sleep(2000); + ArLog::log(ArLog::Normal, "Reading: %ld", timeDone.mSecTo()); + + /* + puts("\nslamming ArUtil::localtime() from a bunch of threads with the same input time..."); + time_t now = time(NULL); + class LocaltimeTestThread : public virtual ArASyncTask + { + private: + time_t time; + public: + LocaltimeTestThread(time_t t) : time(t) {} + virtual void *runThread(void *) { + struct tm t; + ArUtil::localtime(&time, &t); + ArLog::log(ArLog::Normal, "ArUtil::localtime() returned: year=%d mon=%d mday=%d hour=%d min=%d sec=%d", t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec); + return 0; + } + }; + + for(int i = 0; i < 200; ++i) + (new LocaltimeTestThread(now))->runAsync(); + ArUtil::sleep(5000); + */ + + ArLog::log(ArLog::Normal, "test is done."); + +} diff --git a/Legacy/Aria/tests/timingTest-vc2008.vcproj b/Legacy/Aria/tests/timingTest-vc2008.vcproj new file mode 100644 index 0000000..3cb4e14 --- /dev/null +++ b/Legacy/Aria/tests/timingTest-vc2008.vcproj @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/tests/timingTest.cpp b/Legacy/Aria/tests/timingTest.cpp new file mode 100644 index 0000000..9bc922f --- /dev/null +++ b/Legacy/Aria/tests/timingTest.cpp @@ -0,0 +1,70 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArTime lastLoopTime; +int loopTime; + + + +void loopTester(void) +{ + printf("%6ld ms since last loop. ms longer than desired: %6ld.\n", + lastLoopTime.mSecSince(), + lastLoopTime.mSecSince() - loopTime); + lastLoopTime.setToNow(); + +} + +int main(void) +{ + ArRobot robot; + ArTcpConnection conn; + ArGlobalFunctor loopTesterCB(&loopTester); + + lastLoopTime.setToNow(); + Aria::init(); + + conn.setPort(); + robot.setDeviceConnection(&conn); + robot.setCycleChained(true); + if (!robot.blockingConnect()) + { + printf("Could not connect to robot.\n"); + Aria::shutdown(); + exit(0); + } + robot.comInt(ArCommands::ENCODER, 1); + robot.setCycleTime(100); + loopTime = robot.getCycleTime(); + robot.addUserTask("loopTester", 0, &loopTesterCB); + robot.run(false); + + Aria::shutdown(); +} + + + diff --git a/Legacy/Aria/tests/transformTest.cpp b/Legacy/Aria/tests/transformTest.cpp new file mode 100644 index 0000000..d485119 --- /dev/null +++ b/Legacy/Aria/tests/transformTest.cpp @@ -0,0 +1,50 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +int main(void) +{ + ArPose p1(100, 100, 0), p2(1000, 1000, 90), p3; + ArTransform trans; + + trans.setTransform(p1); + + p3.setPose(-900,-900,0); + p3 = trans.doTransform(p3); + p3.log(); + + p2.setPose(200, 200, 0); + trans.setTransform(p1, p2); + p3.setPose(0,0,0); + p3 = trans.doInvTransform(p3); + p3.log(); + + + + + +} diff --git a/Legacy/Aria/tests/triangleAccuracyTest.cpp b/Legacy/Aria/tests/triangleAccuracyTest.cpp new file mode 100644 index 0000000..96ec639 --- /dev/null +++ b/Legacy/Aria/tests/triangleAccuracyTest.cpp @@ -0,0 +1,232 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +ArRobot *robot; + +/** + This program will repeatedly test the ArActionTriangleDriveTo + by backing away a random amount and direction, then using the + action to move forwards. It'll pause to allow time to mark the + location relative to the world (using a laser pointer, for example) + + **/ + +int main(int argc, char **argv) +{ + // parse our args and make sure they were all accounted for + ArSimpleConnector connector(&argc, argv); + + // the robot + robot = new ArRobot; + // the laser + ArSick sick; + + Aria::init(); + + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + exit(1); + } + + // a key handler so we can do our key handling + ArKeyHandler keyHandler; + // let the global aria stuff know about it + Aria::setKeyHandler(&keyHandler); + // toss it on the robot + robot->attachKeyHandler(&keyHandler); + + // add the laser to the robot + robot->addRangeDevice(&sick); + + ArSonarDevice sonar; + robot->addRangeDevice(&sonar); + + //ArLineFinder lineFinder(&sick); + ArActionTriangleDriveTo triangleDriveTo; + ArFunctorC lineGoCB(&triangleDriveTo, + &ArActionTriangleDriveTo::activate); + //keyHandler.addKeyHandler('g', &lineGoCB); + //keyHandler.addKeyHandler('G', &lineGoCB); + ArFunctorC lineStopCB(&triangleDriveTo, + &ArActionTriangleDriveTo::deactivate); + //keyHandler.addKeyHandler('s', &lineStopCB); + //keyHandler.addKeyHandler('S', &lineStopCB); + ArLineFinder lineFinder(&sick); + ArFunctorC findLineCB(&lineFinder, + &ArLineFinder::getLinesAndSaveThem); + keyHandler.addKeyHandler('f', &findLineCB); + keyHandler.addKeyHandler('F', &findLineCB); + //lineFinder.setVerbose(true); + + ArActionLimiterForwards limiter("limiter", 150, 0, 0, 1.3); + robot->addAction(&limiter, 70); + ArActionLimiterBackwards limiterBackwards; + robot->addAction(&limiterBackwards, 69); + + robot->addAction(&triangleDriveTo, 60); + + ArActionKeydrive keydrive; + robot->addAction(&keydrive, 55); + + + ArActionStop stopAction; + robot->addAction(&stopAction, 50); + + // try to connect, if we fail exit + if (!connector.connectRobot(robot)) + { + printf("Could not connect to robot->.. exiting\n"); + Aria::shutdown(); + return 1; + } + + robot->comInt(ArCommands::SONAR, 1); + robot->comInt(ArCommands::ENABLE, 1); + + // start the robot running, true so that if we lose connection the run stops + robot->runAsync(true); + + // now set up the laser + connector.setupLaser(&sick); + + sick.runAsync(); + + if (!sick.blockingConnect()) + { + printf("Could not connect to SICK laser... exiting\n"); + Aria::shutdown(); + return 1; + } + + //printf("If you press the 'g' key it'll go find a triangle, if you press 's' it'll stop.\nPress 'f' to save lines\n"); + printf("\nPress 'f' to save lines\n"); + bool lastSucceeded = false; + int numGood = 0; + int numBad = 0; + // how many times to run, if this is negative it'll go forever (well + // until it wraps at 2 billion) + int timesToRun = -1; + for (int i=0; (i != timesToRun) && (robot->isRunning()); i++) { + bool done = false; + printf("\nStarting run: %d",i); + // move back + + if (lastSucceeded) + { + robot->lock(); + robot->move(-300); + robot->unlock(); + } + do { + ArUtil::sleep(100); + robot->lock(); + done = robot->isMoveDone(); + robot->unlock(); + } while (!done); + // figure out how much to rotate + int rotation = ArMath::random()%60; + // make it positive or negative + rotation = rotation - 30; + printf("...rotating"); + robot->lock(); + robot->setDeltaHeading(rotation); + robot->unlock(); + do { + ArUtil::sleep(100); + robot->lock(); + done = robot->isHeadingDone(5); + robot->unlock(); + } while (!done); + // figure out how much to move back + int distance_back = ArMath::random()%1500; + // make it at least half a meter + if (lastSucceeded) + { + distance_back = -1*(distance_back + 1200); + printf("...moving"); + robot->lock(); + robot->move(distance_back); + robot->unlock(); + do { + ArUtil::sleep(100); + robot->lock(); + done = robot->isMoveDone(100); + robot->unlock(); + } while (!done); + } + // activate the action + printf("...activating\n"); + robot->lock(); + robot->clearDirectMotion(); + triangleDriveTo.activate(); + robot->unlock(); + // insert cool way to see if we're done with the driveTo + // for now, just sleep for a while + do { + ArUtil::sleep(100); + robot->lock(); + if (triangleDriveTo.getState() == + ArActionTriangleDriveTo::STATE_SUCCEEDED) + { + numGood++; + printf("succeeded (made %d of %d)...", numGood, numGood + numBad); + done = true; + lastSucceeded = true; + } + else if (triangleDriveTo.getState() == + ArActionTriangleDriveTo::STATE_FAILED) + { + numBad++; + printf("failed (made %d of %d)...", numGood, numGood + numBad); + done = true; + lastSucceeded = false; + } + else + done = false; + robot->unlock(); + } while (!done); + printf("\a"); + printf("...sleeping"); + ArUtil::sleep(3000); + // deactivate the action + printf("...deactivating"); + robot->lock(); + triangleDriveTo.deactivate(); + robot->unlock(); + } + printf("\n\n"); + robot->lock(); + robot->disconnect(); + robot->unlock(); + Aria::shutdown(); + printf("\n"); + return 0; +} + + + diff --git a/Legacy/Aria/tests/usertasktest.cpp b/Legacy/Aria/tests/usertasktest.cpp new file mode 100644 index 0000000..2b21be1 --- /dev/null +++ b/Legacy/Aria/tests/usertasktest.cpp @@ -0,0 +1,127 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + + +class UserTaskTest +{ +public: + UserTaskTest(void) {}; + ~UserTaskTest(void) {}; + void userTaskOne(void) { printf("One\n"); } + void userTaskTwo(void) { printf("Two\n"); } + void userTaskThree(void) { printf("Three\n"); } + void userTaskFour(void) { printf("Four\n"); } + ArTaskState::State myTaskFourState; +}; + +int main() +{ + ArSyncTask *task; + UserTaskTest test; + ArRobot robot; + + ArFunctorC userTaskOne(&test, &UserTaskTest::userTaskOne); + ArFunctorC userTaskTwo(&test, &UserTaskTest::userTaskTwo); + ArFunctorC userTaskThree(&test, &UserTaskTest::userTaskThree); + ArFunctorC userTaskFour(&test, &UserTaskTest::userTaskFour); + + + printf("Before tasks added:\n"); + robot.logUserTasks(); + printf("---------------------------------------------------------------\n"); + + // the order you add tasks doesn't matter, it goes off of the integer + // you give the function call to add them + // Caveat: if you give the function call the same number it goes off of order + robot.addUserTask("procTwo", 20, &userTaskTwo); + robot.addUserTask("procFour", 40, &userTaskFour, &test.myTaskFourState); + robot.addUserTask("procThree", 30, &userTaskThree); + robot.addUserTask("procOne", 10, &userTaskOne); + + printf("After tasks added:\n"); + robot.logUserTasks(); + printf("---------------------------------------------------------------\n"); + printf("What happens when these are run:\n"); + robot.loopOnce(); + + printf("---------------------------------------------------------------\n"); + + printf("After tasks removed by name:\n"); + printf("---------------------------------------------------------------\n"); + robot.remUserTask("procOne"); + robot.remUserTask("procTwo"); + robot.remUserTask("procThree"); + robot.remUserTask("procFour"); + robot.logUserTasks(); + + + printf("\nAfter they are added again, procThree is found by name and set to SUSPEND and procFour is found by functor and set to FAILURE:\n"); + printf("---------------------------------------------------------------\n"); + + printf("---------------------------------------------------------------\n"); + robot.addUserTask("procTwo", 20, &userTaskTwo); + robot.addUserTask("procFour", 40, &userTaskFour, &test.myTaskFourState); + robot.addUserTask("procThree", 30, &userTaskThree); + robot.addUserTask("procOne", 10, &userTaskOne); + task = robot.findUserTask("procThree"); + if (task != NULL) + task->setState(ArTaskState::SUSPEND); + + task = robot.findUserTask(&userTaskFour); + if (task != NULL) + task->setState(ArTaskState::FAILURE); + + robot.logUserTasks(); + + task = robot.findUserTask(&userTaskFour); + if (task != NULL) + { + printf("---------------------------------------------------------------\n"); + + printf("Did the real state on procFourState get set:\n"); + printf("getState: %d realState: %d\n", task->getState(), + test.myTaskFourState); + } + + + printf("---------------------------------------------------------------\n"); + printf("What happens when these are run:\n"); + robot.loopOnce(); + + printf("---------------------------------------------------------------\n"); + + + printf("After tasks removed by functor:\n"); + printf("---------------------------------------------------------------\n"); + robot.remUserTask(&userTaskOne); + robot.remUserTask(&userTaskTwo); + robot.remUserTask(&userTaskThree); + robot.remUserTask(&userTaskFour); + robot.logUserTasks(); + + +} diff --git a/Legacy/Aria/tests/vcc4Test.cpp b/Legacy/Aria/tests/vcc4Test.cpp new file mode 100644 index 0000000..be5ff51 --- /dev/null +++ b/Legacy/Aria/tests/vcc4Test.cpp @@ -0,0 +1,492 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/* + This is a demo of the Canon VC-C4 Pan/Tilt/Zoom camera. It uses the same slew for the pan and tilt axes. +It defaults to use the microcontroller port Aux1. See the setport comments below to use the computer's serial port, or a different aux port on the microcontroller. + +This is a slightly modified version of the examples/vcc4Demo.cpp file. This has an added exercise command, and auto-update is toggleable. + + +Commands: +_________________ + +UP,DOWN -- tilt up/down by 1 degree +LEFT,RIGHT -- pan left/right by 1 degree +X,C -- zoom in/out by 10 units (80 total) +I -- initialize PTU to default settings +>,< -- increase/decrease the positional increment by one 1 degree ++,- -- increase/decrease the slew by 5 degrees/sec +Z -- move pan and tilt axes to zero +H -- Halt all motion +S -- Status of camera position and variable values +P -- Power on/off the camera +ESC -- Exit program +*/ + +/* + This class is the core of this demo, it adds itself to the robot given + as a user task, then drives the PTZ camera from the keyboard +*/ +class KeyPTU +{ +public: + // constructor + KeyPTU(ArRobot *robot); + // destructor, its just empty + ~KeyPTU(void) {} + + void up(void); + void down(void); + void left(void); + void right(void); + + void plus(void); + void minus(void); + void greater(void); + void less(void); + void question(void); + void status(void); + + void c(void); + void h(void); + void i(void); + void p(void); + void x(void); + void z(void); + + // the callback function + void drive(void); + +protected: + + ArTime myExerciseTime; + + int myPanSlew; + int myTiltSlew; + int myPosIncrement; + int mySlewIncrement; + int myZoomIncrement; + + bool myMonitor; + bool myInit; + bool myAbsolute; + bool myExercise; + + void exercise(void) { myExercise = !myExercise; } + void autoupdate(void); + + ArFunctorC myUpCB; + ArFunctorC myDownCB; + ArFunctorC myLeftCB; + ArFunctorC myRightCB; + + ArFunctorC myPlusCB; + ArFunctorC myMinusCB; + ArFunctorC myGreaterCB; + ArFunctorC myLessCB; + ArFunctorC myQuestionCB; + ArFunctorC mySCB; + + ArFunctorC myECB; + ArFunctorC myACB; + + ArFunctorC myCCB; + ArFunctorC myHCB; + ArFunctorC myICB; + ArFunctorC myPCB; + ArFunctorC myXCB; + ArFunctorC myZCB; + + // the PTU + ArVCC4 myPTU; + + // the serial connection, in case we are connected to a computer + // serial port + ArSerialConnection myCon; + + // whether or not we've requested that the Camera initialize itself + bool myPTUInitRequested; + // pointer to the robot + ArRobot *myRobot; + // callback for the drive function + ArFunctorC myDriveCB; +}; + +/* + Constructor, sets the robot pointer, and some initial values, also note the + use of constructor chaining on myPTU and myDriveCB. +*/ +KeyPTU::KeyPTU(ArRobot *robot) : + myUpCB(this, &KeyPTU::up), + myDownCB(this, &KeyPTU::down), + myLeftCB(this, &KeyPTU::left), + myRightCB(this, &KeyPTU::right), + myPlusCB(this, &KeyPTU::plus), + myMinusCB(this, &KeyPTU::minus), + myGreaterCB(this, &KeyPTU::greater), + myLessCB(this, &KeyPTU::less), + myQuestionCB(this, &KeyPTU::question), + mySCB(this, &KeyPTU::status), + myECB(this, &KeyPTU::exercise), + myACB(this, &KeyPTU::autoupdate), + myCCB(this, &KeyPTU::c), + myHCB(this, &KeyPTU::h), + myICB(this, &KeyPTU::i), + myPCB(this, &KeyPTU::p), + myXCB(this, &KeyPTU::x), + myZCB(this, &KeyPTU::z), + + myPTU(robot), + myDriveCB(this, &KeyPTU::drive) +{ + // set the robot pointer and add the KeyPTU as user task + ArKeyHandler *keyHandler; + myRobot = robot; + myRobot->addSensorInterpTask("KeyPTU", 50, &myDriveCB); + + myExerciseTime.setToNow(); + myExercise = true; + +// SETPORT Uncomment the following to run the camera off +// of the computer's serial port, rather than the microcontroller + +// uncomment below here +/* +#ifdef WIN32 + myCon.setPort("COM2"); +#else + myCon.setPort("/dev/ttyS0"); +#endif + myPTU.setDeviceConnection(&myCon); +*/ +// to here + + // or use this next line to set the aux port + //myPTU.setAuxPort(2); + + + if ((keyHandler = Aria::getKeyHandler()) == NULL) + { + keyHandler = new ArKeyHandler; + Aria::setKeyHandler(keyHandler); + myRobot->attachKeyHandler(keyHandler); + } + + if (!keyHandler->addKeyHandler(ArKeyHandler::UP, &myUpCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for up, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::DOWN, &myDownCB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for down, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::LEFT, &myLeftCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for left, keydrive will not work correctly."); + if (!keyHandler->addKeyHandler(ArKeyHandler::RIGHT, &myRightCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for right, keydrive will not work correctly."); + + if (!keyHandler->addKeyHandler('+', &myPlusCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '+', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('-', &myMinusCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '-', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('>', &myGreaterCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '>', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('<', &myLessCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '<', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('?', &myQuestionCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for '?', keydrive will not work correctly."); + + if (!keyHandler->addKeyHandler('c', &myCCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'C', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('h', &myHCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'H', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('i', &myICB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'I', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('p', &myPCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'P', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('s', &mySCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'S', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('x', &myXCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'X', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('z', &myZCB)) + ArLog::log(ArLog::Terse, +"The key handler already has a key for 'Z', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('a', &myACB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for 'A', keydrive will not work correctly."); + if (!keyHandler->addKeyHandler('e', &myECB)) + ArLog::log(ArLog::Terse, "The key handler already has a key for 'E', keydrive will not work correctly."); + + + + // initialize some variables + + myPTUInitRequested = false; + myPosIncrement = 1; + mySlewIncrement = 5; + myZoomIncrement = 50; + +} + +void KeyPTU::autoupdate(void) +{ + if (myPTU.getAutoUpdate()) + myPTU.disableAutoUpdate(); + else + myPTU.enableAutoUpdate(); +} + +void KeyPTU::right(void) +{ + myPTU.panRel(myPosIncrement); +} + +void KeyPTU::left(void) +{ + myPTU.panRel(-myPosIncrement); +} + +void KeyPTU::up(void) +{ + myPTU.tiltRel(myPosIncrement); +} + +void KeyPTU::down(void) +{ + myPTU.tiltRel(-myPosIncrement); +} + +void KeyPTU::x(void) +{ + myPTU.zoom(myPTU.getZoom() + myZoomIncrement); +} + +void KeyPTU::c(void) +{ + myPTU.zoom(myPTU.getZoom() - myZoomIncrement); +} + +void KeyPTU::i(void) +{ + myPTU.init(); +} + +void KeyPTU::plus(void) +{ + myPTU.panSlew(myPTU.getPanSlew() + mySlewIncrement); + myPTU.tiltSlew(myPTU.getTiltSlew() + mySlewIncrement); + + status(); +} + +void KeyPTU::minus(void) +{ + myPTU.panSlew(myPTU.getPanSlew() - mySlewIncrement); + myPTU.tiltSlew(myPTU.getTiltSlew() - mySlewIncrement); + + status(); +} + +void KeyPTU::greater(void) +{ + myPosIncrement += 1; + + if (myPosIncrement > myPTU.getMaxPosPan()) //Use pan range as reference for largest allowable positional increment + myPosIncrement = myPTU.getMaxPosPan(); + + status(); +} + +void KeyPTU::less(void) +{ + myPosIncrement -= 1; + + if (myPosIncrement < 0) + myPosIncrement = 0; + + status(); +} + + +void KeyPTU::z(void) +{ + myPTU.panTilt(0,0); + myPTU.zoom(0); + status(); +} + +void KeyPTU::question(void) +{ + ArLog::log(ArLog::Normal, "\r\nCommands:\r\n_________________\r\n"); + ArLog::log(ArLog::Normal, "UP,DOWN -- tilt up/down by 1 increment"); + ArLog::log(ArLog::Normal, "LEFT,RIGHT -- pan left/right by 1 increment"); + ArLog::log(ArLog::Normal, "X,C -- zoom in/out by 50 units (2140 max)"); + ArLog::log(ArLog::Normal, "I -- initialize PTU to default settings"); + ArLog::log(ArLog::Normal, ">,< -- increase/decrease the positional increment by 1 degree"); + ArLog::log(ArLog::Normal, "+,- -- increase/decrease the slew by 5 degrees/sec"); + ArLog::log(ArLog::Normal, "Z -- move pan and tilt axes to zero"); + ArLog::log(ArLog::Normal, "H -- Halt all motion"); + ArLog::log(ArLog::Normal, "S -- Status of camera position and variable values"); + ArLog::log(ArLog::Normal, "P -- Power on/off the camera"); + ArLog::log(ArLog::Normal, "ESC -- Exit program"); + ArLog::log(ArLog::Normal, "\r\n"); +} + +void KeyPTU::status(void) +{ + ArLog::log(ArLog::Normal, "\r\nStatus:\r\n_________________________\r\n"); + ArLog::log(ArLog::Normal, "Pan Position = %d deg", myPTU.getPan()); + ArLog::log(ArLog::Normal, "Tilt Position = %d deg", myPTU.getTilt()); + ArLog::log(ArLog::Normal, "Zoom Position = %d", myPTU.getZoom()); + ArLog::log(ArLog::Normal, "Pan Slew = %d deg/s", myPTU.getPanSlew()); + ArLog::log(ArLog::Normal, "Tilt Slew = %d deg/s", myPTU.getTiltSlew()); + ArLog::log(ArLog::Normal, "Position Increment = %d deg", myPosIncrement); + if (myPTU.getPower()) + ArLog::log(ArLog::Normal, "Power is ON"); + else + ArLog::log(ArLog::Normal, "Power is OFF"); + ArLog::log(ArLog::Normal, "\r\n"); +} + +void KeyPTU::h(void) +{ + myPTU.haltPanTilt(); + myPTU.haltZoom(); +} + +void KeyPTU::p(void) +{ + if (myPTU.getPower()) + myPTU.power(0); + else + myPTU.power(1); + + status(); +} + +// the important function +void KeyPTU::drive(void) +{ + // if the PTU isn't initialized, initialize it here... it has to be + // done here instead of above because it needs to be done when the + // robot is connected + if (!myPTUInitRequested && !myPTU.isInitted() && myRobot->isConnected()) + { + printf("\nWaiting for Camera to Initialize\n"); + myAbsolute = true; + myPTUInitRequested = true; + myPTU.init(); + } + + // if the camera hasn't initialized yet, then just return + if (myPTUInitRequested && !myPTU.isInitted()) + { + return; + } + + if (myPTUInitRequested && myPTU.isInitted()) + { + myPTUInitRequested = false; + myPanSlew = myPTU.getPanSlew(); + myTiltSlew = myPTU.getTiltSlew(); + printf("Done.\n"); + question(); + } + + if (myExerciseTime.secSince() > 5 && myExercise) + { + int pan,tilt; + + if (ArMath::random()%2) + pan = ArMath::random()%((long) myPTU.getMaxPosPan()); + else + pan = -ArMath::random()%((long) myPTU.getMaxNegPan()); + + if (ArMath::random()%2) + tilt = ArMath::random()%((long) myPTU.getMaxPosTilt()); + else + tilt = -ArMath::random()%((long) myPTU.getMaxNegTilt()); + + myPTU.panTilt(pan, tilt); + myExerciseTime.setToNow(); + } + +} + +int main(int argc, char **argv) +{ + // just some stuff for returns + std::string str; + // robots connection + ArSerialConnection con; + + // the robot, this turns state reflection off + ArRobot robot(NULL, false); + // the joydrive as defined above, this also adds itself as a user task + KeyPTU ptu(&robot); + + // mandatory init + Aria::init(); + + ArLog::init(ArLog::StdOut, ArLog::Terse, NULL, true); + + con.setPort(ArUtil::COM1); + // set the connection on the robot + robot.setDeviceConnection(&con); + + // connect, if we fail, exit + if (!robot.blockingConnect()) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + + // turn off the sonar, enable the motors, turn off amigobot sounds + robot.comInt(ArCommands::SONAR, 0); + robot.comInt(ArCommands::ENABLE, 1); + robot.comInt(ArCommands::SOUNDTOG, 0); + + printf("Press '?' for available commands\r\n"); + // run, if we lose connection to the robot, exit + robot.run(true); + + // shutdown and go away + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/velTest.cpp b/Legacy/Aria/tests/velTest.cpp new file mode 100644 index 0000000..ef0f05b --- /dev/null +++ b/Legacy/Aria/tests/velTest.cpp @@ -0,0 +1,218 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "Aria.h" + +/* + This demo starts up the robot in its own thread, then runs a bunch + of the direct motion commands and prints the results ... note that + if you want to stop direct motion commands and let actions take + over, you should use clearDirectMotion, see the docs for details. + Also note how it locks the robot before doing anything with the + robot, then unlocks it when done, this is vital for threaded code. + You shouldn't really use threads if you don't understand them or + don't need them. */ + +/* + This is a connection handler, fairly simple, but quite useful, esp when + the robot is running in another thread. Its not really needed here + since blockingConnect is used. But it'd still be useful if there is an + error after connected +*/ +class ConnHandler +{ +public: + // Constructor + ConnHandler(ArRobot *robot); + // Destructor, its just empty + ~ConnHandler(void) {} + // to be called if the connection was made + void connected(void); + // to call if the connection failed + void connFail(void); + // to be called if the connection was lost + void disconnected(void); +protected: + // robot pointer + ArRobot *myRobot; + // the functor callbacks + ArFunctorC myConnectedCB; + ArFunctorC myConnFailCB; + ArFunctorC myDisconnectedCB; +}; + +/* + The constructor, note its use of contructor chaining to initalize the + callbacks. +*/ +ConnHandler::ConnHandler(ArRobot *robot) : + myConnectedCB(this, &ConnHandler::connected), + myConnFailCB(this, &ConnHandler::connFail), + myDisconnectedCB(this, &ConnHandler::disconnected) + +{ + // set the robot poitner + myRobot = robot; + + // add the callbacks to the robot + myRobot->addConnectCB(&myConnectedCB, ArListPos::FIRST); + myRobot->addFailedConnectCB(&myConnFailCB, ArListPos::FIRST); + myRobot->addDisconnectNormallyCB(&myDisconnectedCB, ArListPos::FIRST); + myRobot->addDisconnectOnErrorCB(&myDisconnectedCB, ArListPos::FIRST); +} + +// just exit if the connection failed +void ConnHandler::connFail(void) +{ + printf("Failed to connect.\n"); + myRobot->stopRunning(); + Aria::shutdown(); + return; +} + +// turn on motors, and off sonar, and off amigobot sounds, when connected +void ConnHandler::connected(void) +{ + printf("Connected\n"); + myRobot->comInt(ArCommands::SONAR, 0); + myRobot->comInt(ArCommands::ENABLE, 1); + myRobot->comInt(ArCommands::SOUNDTOG, 0); +} + +// lost connection, so just exit +void ConnHandler::disconnected(void) +{ + printf("Lost connection\n"); + exit(0); +} + + + +int main(int argc, char **argv) +{ + std::string str; + int ret; + ArTime start; + + // connection to the robot + ArSerialConnection con; + // the robot + ArRobot robot; + // the connection handler from above + ConnHandler ch(&robot); + + // init area with a dedicated signal handling thread + Aria::init(Aria::SIGHANDLE_THREAD); + + // open the connection with the defaults, exit if failed + if ((ret = con.open()) != 0) + { + str = con.getOpenMessage(ret); + printf("Open failed: %s\n", str.c_str()); + Aria::shutdown(); + return 1; + } + + // set the robots connection + robot.setDeviceConnection(&con); + // try to connect, if we fail, the connection handler should bail + if (!robot.blockingConnect()) + { + // this should have been taken care of by the connection handler + // but just in case + printf( + "asyncConnect failed because robot is not running in its own thread.\n"); + Aria::shutdown(); + return 1; + } + // run the robot in its own thread, so it gets and processes packets and such + robot.runAsync(false); + + // just a big long set of printfs, direct motion commands and sleeps, + // it should be self-explanatory + printf("Telling the robot to go 300 mm for 5 seconds\n"); + robot.lock(); + robot.setVel(500); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (start.mSecSince() > 5000) + { + robot.unlock(); + break; + } + printf("Trans: %10g Rot: %10g\n", robot.getVel(), robot.getRotVel()); + robot.unlock(); + ArUtil::sleep(100); + } + + printf("Telling the robot to turn at 50 deg/sec for 10 seconds\n"); + robot.lock(); + robot.setVel(0); + robot.setRotVel(50); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (start.mSecSince() > 10000) + { + robot.unlock(); + break; + } + printf("Trans: %10g Rot: %10g\n", robot.getVel(), robot.getRotVel()); + robot.unlock(); + ArUtil::sleep(100); + } + + printf("Telling the robot to turn at 100 deg/sec for 10 seconds\n"); + robot.lock(); + robot.setVel(0); + robot.setRotVel(100); + robot.unlock(); + start.setToNow(); + while (1) + { + robot.lock(); + if (start.mSecSince() > 10000) + { + robot.unlock(); + break; + } + printf("Trans: %10g Rot: %10g\n", robot.getVel(), robot.getRotVel()); + robot.unlock(); + ArUtil::sleep(100); + } + + printf("Done with tests, exiting\n"); + robot.disconnect(); + // shutdown and ge tout + Aria::shutdown(); + return 0; +} + diff --git a/Legacy/Aria/tests/wanderAndLogBumps.cpp b/Legacy/Aria/tests/wanderAndLogBumps.cpp new file mode 100644 index 0000000..c483b58 --- /dev/null +++ b/Legacy/Aria/tests/wanderAndLogBumps.cpp @@ -0,0 +1,223 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" +#include + +/* + * This is useful as a diagnostic tool for the bumpers, motor stalls, table IR + * (peoplebot) and e-stop events. + * It makes the robot wander, using sonar to avoid obstacles, if an event happens + * it is printed to standard output with a timestamp. + * Refer to the ARIA ArRobot documentation and to your robot manual + * (section on standard ARCOS SIP packet contents) for details on the stallval + * format. + * + * Note, it lists bumpers by the bit in the stallval that was set, not + * neccesarily by other bumper numbering conventions (depending on what kind + * of robot it is). E.g. on a DX, the front bumper ring triggers bits 2-6 from + * right side to left side. A PowerBot triggers bits 0-7. + */ + + + +/* function to display a byte as a string of 8 '1' and '0' characters. */ +std::string byte_as_bitstring(char byte) +{ + char tmp[9]; + int bit; + int ch; + for(bit = 7, ch = 0; bit >= 0; bit--,ch++) + tmp[ch] = ((byte>>bit)&1) ? '1' : '0'; + tmp[8] = 0; + return std::string(tmp); +} + +/* function to display a 2-byte int as a string of 16 '1' and '0' characters. */ +std::string int_as_bitstring(int16_t n) +{ + char tmp[17]; + int bit; + int ch; + for(bit = 15, ch = 0; bit >= 0; bit--, ch++) + tmp[ch] = ((n>>bit)&1) ? '1' : '0'; + tmp[16] = 0; + return std::string(tmp); +} + + +/* Things that might only be evident in one robot cycle, so are set by a cycle + * callback then cleared after being printed. */ +bool wasLeftMotorStalled = false; +bool wasRightMotorStalled = false; +ArTypes::UByte2 cumulativeStallVal = 0; +ArTypes::UByte2 cumulativeRobotFlags = 0; +bool wasLeftIRTriggered = false; +bool wasRightIRTriggered = false; +bool wasEStopTriggered = false; + +/* Robot cycle callback that accumulates positive states over several cycles + * until the main thread gets around to checking and printing them out (since it + * only logs once a second). */ +bool cycleCallback(ArRobot* robot) +{ + cumulativeStallVal |= robot->getStallValue(); + cumulativeRobotFlags |= robot->getFlags(); + wasLeftMotorStalled = wasLeftMotorStalled || robot->isLeftMotorStalled(); + wasRightMotorStalled = wasRightMotorStalled || robot->isRightMotorStalled(); + wasEStopTriggered = wasEStopTriggered || robot->getEstop(); + wasLeftIRTriggered = wasLeftIRTriggered || (robot->hasTableSensingIR() && robot->isLeftTableSensingIRTriggered()); + wasRightIRTriggered = wasRightIRTriggered || (robot->hasTableSensingIR() && robot->isRightTableSensingIRTriggered()); + return true; +} + +/* main function */ +int main(int argc, char **argv) +{ + // robot and devices + ArRobot robot; + ArSonarDevice sonar; + ArBumpers bumpers; + ArIRs ir; + + // the actions we'll use to wander and avoid obstacles + ArActionStallRecover recoverAct; + ArActionBumpers bumpAct; + ArActionAvoidFront avoidFrontNearAct("Avoid Front Near", 225, 0); + ArActionAvoidFront avoidFrontFarAct; + ArActionConstantVelocity constantVelocityAct("Constant Velocity", 400); + + // initialize aria and aria's logging destination and level + Aria::init(); + ArLog::init(ArLog::StdErr, ArLog::Normal); + + // connector + ArSimpleConnector connector(&argc, argv); + if (!connector.parseArgs() || argc > 1) + { + connector.logOptions(); + exit(1); + } + + printf("This program will make the robot wander around, avoiding obstacles with the sonar if possible, and print stall, bumper, e-stop and IR (Peoplebot) if and when they happen.\nPress Ctrl-C to exit.\n"); + + // add the range devices to the robot + robot.addRangeDevice(&sonar); + robot.addRangeDevice(&bumpers); + robot.addRangeDevice(&ir); + + // try to connect, if we fail exit + if (!connector.connectRobot(&robot)) + { + printf("Could not connect to robot... exiting\n"); + Aria::shutdown(); + return 1; + } + + // turn on the motors, turn off amigobot sound effects (for old h8-model amigobots) + robot.enableMotors(); + robot.comInt(ArCommands::SOUNDTOG, 0); + + // add the actions created above + robot.addAction(&recoverAct, 100); + robot.addAction(&bumpAct, 75); + robot.addAction(&avoidFrontNearAct, 50); + robot.addAction(&avoidFrontFarAct, 49); + robot.addAction(&constantVelocityAct, 25); + + // Cycle callback to check for events + robot.addUserTask("checkevents", 1, new ArGlobalRetFunctor1(&cycleCallback, &robot)); + + + // start the robot running, true means that if we lose robot connection the + // ArRobot runloop stops + robot.runAsync(true); + + // Print data header +#define HEADFORMAT "%-24s %-16s %-6s %-6s %-6s %-6s %-6s %s" +#define DATAFORMAT "%-24s %-16s %-6s %-6s %-6s %-6s %-6s" // doesn't include bumps details on end + printf("\n" HEADFORMAT "\n\n", + "Time", + "StallVal", + "StallL", + "StallR", + "EStop", + "IR L", + "IR R", + "Bumps Triggered" + ); + + // Print data every second + char timestamp[24]; + while(robot.isRunning()) { + robot.lock(); + if(cumulativeStallVal || wasEStopTriggered || wasLeftIRTriggered || wasRightIRTriggered) + { + time_t t = time(NULL); + strftime(timestamp, 24, "%Y-%m-%d %H:%M:%S", localtime(&t)); + printf( DATAFORMAT, + timestamp, + int_as_bitstring(cumulativeStallVal).c_str(), + (wasLeftMotorStalled?"YES":" "), + (wasRightMotorStalled?"YES":" "), + (wasEStopTriggered ? "YES" : " "), + (wasLeftIRTriggered ? "YES" : " " ), + (wasRightIRTriggered ? "YES" : " " ) + ); + + // list indices of bumpers flaged in stallval + // skip the last bit which is a motor stall flag + ArTypes::UByte2 bumpmask = ArUtil::BIT15; + int bump = 0; + for(int bit = 16; bit > 0; bit--) + { + if(bit == 9) // this is also a motor stall bit + { + bumpmask = bumpmask >> 1; + bit--; + continue; + } + //printf("\n\tComparing stallval=%s to bumpmask=%s... ", int_as_bitstring(stallval).c_str(), int_as_bitstring(bumpmask).c_str()); + if(cumulativeStallVal & bumpmask) + printf("%d ", bump); + bumpmask = bumpmask >> 1; + bump++; + } + + puts(""); // newline + } + + // clear values to accumulate for the next second + cumulativeStallVal = 0; + wasLeftMotorStalled = wasRightMotorStalled = wasLeftIRTriggered = wasRightIRTriggered = wasEStopTriggered = false; + + robot.unlock(); + ArUtil::sleep(1000); + } + + // robot cycle stopped, probably because of lost robot connection + Aria::shutdown(); + return 0; +} diff --git a/Legacy/Aria/utils/Makefile b/Legacy/Aria/utils/Makefile new file mode 100644 index 0000000..7bf417d --- /dev/null +++ b/Legacy/Aria/utils/Makefile @@ -0,0 +1,12 @@ +# A simple makefile to cause make to go look in the top directory. A simple +# convience. + +all: + $(MAKE) -C .. utils + +clean: + $(MAKE) -C .. cleanUtils + +%: %.cpp + $(MAKE) -C .. utils/$@ + diff --git a/Legacy/Aria/utils/addSfWorldLinesToArMap.cpp b/Legacy/Aria/utils/addSfWorldLinesToArMap.cpp new file mode 100644 index 0000000..48604fd --- /dev/null +++ b/Legacy/Aria/utils/addSfWorldLinesToArMap.cpp @@ -0,0 +1,104 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** + This program adds the lines from a world file to a map file and + saves it as the map file. + **/ + + +int main(int argc, char **argv) +{ + Aria::init(); + char *worldName; + char *oldMapName; + char *newMapName; + + if (argc != 3 && argc != 4) + { + ArLog::log(ArLog::Normal, "Usage: %s ", argv[0]); + ArLog::log(ArLog::Normal, "Example: %s columbia.wld columbia.map (this opens columbia.wld and takes the lines from that and adds it to columbia.map", argv[0]); + ArLog::log(ArLog::Normal, "Usage: %s ", argv[0]); + ArLog::log(ArLog::Normal, "Example: %s columbia.wld columbia.map newColumbia.map (this opens columbia.wld and takes the lines from that and opens columbia.map and and saves the combined data to newColumbia.map)", argv[0]); + + exit(1); + } + + worldName = argv[1]; + oldMapName = argv[2]; + if (argc == 4) + newMapName = argv[3]; + else if (argc == 3) + newMapName = argv[2]; + + FILE *file; + if ((file = ArUtil::fopen(worldName, "r")) == NULL) + { + ArLog::log(ArLog::Normal, "Could not open world file '%s' to convert", worldName); + exit(1); + } + + char line[10000]; + + std::vector lines; + + // read until the end of the file + while (fgets(line, sizeof(line), file) != NULL) + { + ArArgumentBuilder builder; + builder.add(line); + if (builder.getArgc() == 4 && builder.isArgInt(0) && + builder.isArgInt(1) && builder.isArgInt(2) && + builder.isArgInt(3)) + { + lines.push_back( + ArLineSegment(builder.getArgInt(0), builder.getArgInt(1), + builder.getArgInt(2), builder.getArgInt(3))); + } + } + + + ArMap armap; + if (!armap.readFile(oldMapName)) + { + ArLog::log(ArLog::Normal, "Could not open map file '%s' to convert", worldName); + exit(1); + } + armap.setLines(&lines); + + if (!armap.writeFile(newMapName)) + { + ArLog::log(ArLog::Normal, "Could not save new map file '%s'", newMapName); + exit(1); + } + + ArLog::log(ArLog::Normal, "Added lines of '%s' world file and to map '%s' and saved it as '%s'.", worldName, oldMapName, newMapName); + exit(0); +} + + + diff --git a/Legacy/Aria/utils/convertSfWorldToArMap.cpp b/Legacy/Aria/utils/convertSfWorldToArMap.cpp new file mode 100644 index 0000000..b38c6fd --- /dev/null +++ b/Legacy/Aria/utils/convertSfWorldToArMap.cpp @@ -0,0 +1,117 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "Aria.h" + +/** + This file converts a Saphira/SRIsim world file (.wld) to a an ARIA map file. + **/ + + +int main(int argc, char **argv) +{ + Aria::init(); + char *worldName; + char *mapName; + + if (argc != 3) + { + ArLog::log(ArLog::Normal, "Usage: %s ", argv[0]); + ArLog::log(ArLog::Normal, "Example: %s columbia.wld columbia.map", argv[0]); + exit(1); + } + + worldName = argv[1]; + mapName = argv[2]; + + FILE *file; + if ((file = ArUtil::fopen(worldName, "r")) == NULL) + { + ArLog::log(ArLog::Normal, "Could not open world file '%s' to convert", worldName); + exit(1); + } + + char line[10000]; + + std::vector lines; + + bool haveHome = false; + ArPose homePose; + + // read until the end of the file + while (fgets(line, sizeof(line), file) != NULL) + { + ArArgumentBuilder builder; + builder.add(line); + + // Four ints is a line + if (builder.getArgc() == 4 && builder.isArgInt(0) && + builder.isArgInt(1) && builder.isArgInt(2) && + builder.isArgInt(3)) + { + lines.push_back( + ArLineSegment(builder.getArgInt(0), builder.getArgInt(1), + builder.getArgInt(2), builder.getArgInt(3))); + } + + // "position X Y Th" becomes a RobotHome + if( !strcmp(builder.getArg(0), "position") && + builder.getArgc() == 4 && builder.isArgInt(1) && + builder.isArgInt(2) && builder.isArgInt(3) ) + { + haveHome = true; + homePose.setX(builder.getArgInt(1)); + homePose.setY(builder.getArgInt(2)); + homePose.setTh(builder.getArgInt(3)); + printf("Will make a Home point out of start position: "); + homePose.log(); + } + } + + + ArMap armap; + armap.setLines(&lines); + + ArPose nopose; + ArMapObject home("RobotHome", homePose, NULL, "ICON", "Home", false, nopose, nopose); + std::list objects; + if(haveHome) + { + objects.push_back(&home); + armap.setMapObjects(&objects); + } + + if (!armap.writeFile(mapName)) + { + ArLog::log(ArLog::Normal, "Could not save map file '%s'", mapName); + exit(1); + } + + ArLog::log(ArLog::Normal, "Converted %s world file to %s map file.", worldName, mapName); + exit(0); +} + + + diff --git a/Legacy/Aria/utils/genCommandLineOptionDocs.cpp b/Legacy/Aria/utils/genCommandLineOptionDocs.cpp new file mode 100644 index 0000000..95a4287 --- /dev/null +++ b/Legacy/Aria/utils/genCommandLineOptionDocs.cpp @@ -0,0 +1,400 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ + +#include "Aria.h" +#include + +/* Queries a subset of the ARIA classes for help text on their command line + * arguments, outputs nd creates files containing that text, plus two files that + * aggregates them all, one with some HTML formatting for use in the doxygen + * documentation, one with an explanatory header for use as a stand alone + * text file. It redirects the log help output be reopening stdout bound to + * each file and then calling the logOptions() or similar methods on objects + * of the classes with options. + * + * + * When compiling this program, you must define either FOR_ARIA or + * FOR_ARNETWORKING (or both) with -D, since this program can be used either + * for ARIA or ArNetworking. + * + * The files generated are: + * docs/options/ + * docs/options/all_options.dox + * CommandLineOptions.txt.in + * + * If FOR_ARIA is defined, then the classes whose options are included are: + * ArRobotConnector + * ArLaserConnector with Sick LMS2xx + * ArLaserConnector with Sick LMS1xx + * ArLaserConnector with URG 1.0 + * ArLaserConnector with URG 2.0 + * ArLaserConnector with LMS5xx + * ArLaserConnector with SICK S3xxx Series + * ArLaserConnector with Keyence SZ Series + * ArLaserConnector with SICK TiM3XX + * ArPTZConnector + * ArGPSConnector + * ArCompassConnector + * ArSonarConnector + * [ArDaemonizer?] + * + * If FOR_ARNETWORKING is defined, then these classes are also included: + * ArClientSimpleConnector + * ArServerSimpleOpener + * ArClientSwitchManager + */ + + + +/* Wrapper classes provide a standardized publically accessible logOptions() + * method for each class that have the ability to log options in some way. + * (They can all be stored as Wrapper classes below, and they expose + * logOptions() as a public method instead of private.) + */ + +class Wrapper { +public: + virtual void logOptions() = 0; +}; + + +#ifdef FOR_ARIA +#include "ArArgumentParser.h" +#include "ArRobotConnector.h" +#include "ArGPSConnector.h" +#include "ArTCM2.h" +#include "ArSonarConnector.h" +#include "ArPTZConnector.h" + +class ArRobotConnectorWrapper : + public ArRobotConnector, public virtual Wrapper +{ +public: + ArRobotConnectorWrapper(ArArgumentParser *argParser) : + ArRobotConnector(argParser, NULL) + { + } + virtual void logOptions() + { + ArRobotConnector::logOptions(); + } +}; + +class ArPTZConnectorWrapper : + public ArPTZConnector, public virtual Wrapper +{ +public: + ArPTZConnectorWrapper(ArArgumentParser *argParser) : + ArPTZConnector(argParser, NULL) + { + } + virtual void logOptions() + { + ArPTZConnector::logOptions(); + } +}; + + +class ArLaserConnectorWrapper : + public ArLaserConnector, public virtual Wrapper +{ + + ArLMS2xx lms2xxLaser; + ArUrg urgLaser; + ArUrg_2_0 urg2Laser; + ArLMS1XX lms1xxLaser; + ArLMS1XX lms5xxLaser; + ArS3Series s3xxLaser; + ArSZSeries szLaser; + ArLMS1XX tim3xxLaser; +public: + ArLaserConnectorWrapper(ArArgumentParser *argParser) : + ArLaserConnector(argParser, NULL, NULL), + lms2xxLaser(1), urgLaser(1), urg2Laser(1), lms1xxLaser(1, "lms1xx", ArLMS1XX::LMS1XX), + lms5xxLaser(1, "lms5xx", ArLMS1XX::LMS5XX), s3xxLaser(1), szLaser(1), + tim3xxLaser(1, "tim3XX", ArLMS1XX::TiM3XX) + { + } + virtual void logOptions() + { + puts( +"Laser types and options may also be set in the robot parameter file. See the\n" +"ARIA reference documentation for details.\n\n" +"If a program supports multiple lasers, then options for additional lasers\n" +"after the first are given by appending the laser number (e.g. -laserType2)\n" +"To enable use of a laser, choose its type with the -laserType options\n" +"(e.g.: -laserType lms2xx -laserType2 urg2.0)\n\n" +"The default laser type for the primary laser (laser 1) is specified in the\n" +"robot type parameter file in the ARIA \"params\" directory. For many robots\n" +"it is \"lms2xx\", the SICK LMS200. For some it is \"lms1xx\", for the SICK\n" +"LMS100 or LMS111.\n\n" +"Instruct a program to connect to a laser using the -connectLaser option\n" +"or by setting LaserAutoConnect to true in the robot's parameter file.\n" +"If a program requires use of a laser it usually always attempts to connect to\n" +"the primary laser, however.\n\n" +"The index number is optional in any options for the primary laser; i.e. 1 is\n" +"assumed if the index number is omitted.\n\n" +); + + + // TODO loop through all laser registered with Aria class and instantiate + // them that way. + + // lms 200 + puts("\nFor laser type \"lms2xx\" (SICK LMS-200):\n"); + addPlaceholderLaser(&lms2xxLaser, 1); + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // lms 100 + puts("\nFor laser type \"lms1xx\" (SICK LMS-100, LMS-111, etc.):\n"); + addPlaceholderLaser(&lms1xxLaser, 1); // replace lms2xx as first laser + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // urg2.0 + puts("\nFor laser type \"urg2.0\" (URG with SCIP 2.0):\n"); + addPlaceholderLaser(&urg2Laser, 1); // replace lms1xx as first laser + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // urg 1.0 + puts("\nFor laser type \"urg\" (URG with old SCIP 1.0):\n"); + addPlaceholderLaser(&urgLaser, 1); // replace urg2.0 as first laser + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // LMS500 + puts("\nFor laser type \"lms5XX\" (SICK LMS-500):\n"); + addPlaceholderLaser(&lms5xxLaser, 1); // replace previous + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // SZ + puts("\nFor laser type \"sZseries\" (Keyence SZ):\n"); + addPlaceholderLaser(&szLaser, 1); // replace previous + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // S3xx + puts("\nFor laser type \"s3series\" (SICK S-300, S-3000, etc.):\n"); + addPlaceholderLaser(&s3xxLaser, 1); // replace previous + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + + // TiM3xx + puts("\nFor laser type \"tim3XX\" (SICK TiM300):\n"); + addPlaceholderLaser(&tim3xxLaser, 1); // replace previous + ArLaserConnector::logLaserOptions(myLasers[1], false, false); + } +}; + +class ArGPSConnectorWrapper : + public ArGPSConnector, + public virtual Wrapper +{ +public: + ArGPSConnectorWrapper(ArArgumentParser *argParser) : + ArGPSConnector(argParser) + { + } + virtual void logOptions() + { + ArGPSConnector::logOptions(); + } +}; + +class ArCompassConnectorWrapper : + public ArCompassConnector, + public virtual Wrapper +{ +public: + ArCompassConnectorWrapper(ArArgumentParser *argParser) : + ArCompassConnector(argParser) + { + } + virtual void logOptions() + { + ArCompassConnector::logOptions(); + } +}; + +class ArSonarConnectorWrapper: + public ArSonarConnector, + public virtual Wrapper +{ +public: + ArSonarConnectorWrapper(ArArgumentParser *argParser) : + ArSonarConnector(argParser, NULL, NULL) + { + } + virtual void logOptions() + { + ArSonarConnector::logOptions(); + } +}; +#endif + +#ifdef FOR_ARNETWORKING +#include "ArNetworking.h" + +class ArClientSimpleConnectorWrapper : public ArClientSimpleConnector, public virtual Wrapper +{ +public: + ArClientSimpleConnectorWrapper(ArArgumentParser *argParser) : ArClientSimpleConnector(argParser) + { + } + virtual void logOptions() + { + ArClientSimpleConnector::logOptions(); + } +}; + +class ArServerSimpleOpenerWrapper : public ArServerSimpleOpener, public virtual Wrapper +{ +public: + ArServerSimpleOpenerWrapper(ArArgumentParser *argParser) : ArServerSimpleOpener(argParser) + { + } + virtual void logOptions() + { + ArServerSimpleOpener::logOptions(); + } +}; + +class ArClientSwitchManagerWrapper : public ArClientSwitchManager, public virtual Wrapper +{ +public: + ArClientSwitchManagerWrapper(ArServerBase *server, ArArgumentParser *argParser) : ArClientSwitchManager(server, argParser) + { + } + virtual void logOptions() + { + ArClientSwitchManager::logOptions(); + } +}; +#endif + +const char *EXPLANATION = +"Some classes in ARIA and ArNetworking check a program's run time options to\n" +"specify parameters and options. These options are used to configure run time\n" +"accessory device parameters (ports, speeds, etc.) used by ARIA; host names,\n" +"port numbers, etc. used by ArNetworking; and various other run time options.\n" +"Options may be given as program arguments on the command line, or globally\n" +"saved as defaults in the file /etc/Aria.args if on Linux, or in the ARIAARGS\n" +"environment variable. Arguments given on the command line may override some\n" +"internal defaults or values read from the robot parameter files.\n\n" +"Note, an option will be available only in programs that instantiate an\n" +"object of the class that uses it. Some programs may also check for\n" +"program-specific command line options.\n\n" +"Use the special \"-help\" command line option to cause a program to \n" +"print out its available options.\n\n" +"A list of options used by each class follows.\n\n"; + +/* Redirect stdout to a file. If reopening stdout for the new file fails, print + * a message and exit the program with error code 3. + */ +void redirectStdout(const char *filename) +{ + FILE *fp = freopen(filename, "w", stdout); + if(fp == NULL) + { + fprintf(stderr, "genCommandLineOptionDocs: Error opening \"%s\"! Exiting.\n", filename); + Aria::exit(3); + } +} + +typedef std::pair WrapPair; +typedef std::vector WrapList; + +int main(int argc, char **argv) +{ + Aria::init(); + ArArgumentParser argParser(&argc, argv); + + WrapList wrappers; + +#ifdef FOR_ARIA + wrappers.push_back(WrapPair("ArRobotConnector", new ArRobotConnectorWrapper(&argParser))); + wrappers.push_back(WrapPair("ArLaserConnector", new ArLaserConnectorWrapper(&argParser))); + wrappers.push_back(WrapPair("ArPTZConnector", new ArPTZConnectorWrapper(&argParser))); + wrappers.push_back(WrapPair("ArGPSConnector", new ArGPSConnectorWrapper(&argParser))); + wrappers.push_back(WrapPair("ArCompassConnector", new ArCompassConnectorWrapper(&argParser))); + wrappers.push_back(WrapPair("ArSonarConnector", new ArSonarConnectorWrapper(&argParser))); +#endif + +#ifdef FOR_ARNETWORKING + ArServerBase server; + wrappers.push_back(WrapPair("ArClientSimpleConnector", new ArClientSimpleConnectorWrapper(&argParser))); + wrappers.push_back(WrapPair("ArServerSimpleOpener", new ArServerSimpleOpenerWrapper(&argParser))); + wrappers.push_back(WrapPair("ArClientSwitchManager", new ArClientSwitchManagerWrapper(&server, &argParser))); +#endif + + /* Write docs/options/all_options.dox */ + // TODO process text to replace HTML characters with entities or formatting + // (especially < and >) + redirectStdout("docs/options/all_options.dox"); + printf("/* This file was automatically generated by utils/genCommandLineOptionDocs.cpp. Do not modify or changes will be lost.*/\n\n"\ + "/** @page CommandLineOptions Command Line Option Summary\n\n%s\n\n", EXPLANATION); + // TODO process text by turning it into a
or similar: start new
at + // beginning of line, add
at first \t, then add at end. + for(WrapList::const_iterator i = wrappers.begin(); i != wrappers.end(); ++i) + { + printf("@section %s\n\n(See %s for class documentation)\n\n
", (*i).first.c_str(), (*i).first.c_str());
+    (*i).second->logOptions();
+    puts("
\n"); + fprintf(stderr, "genCommandLineOptionDocs: Added %s to docs/options/all_options.dox\n", (*i).first.c_str()); + } + puts("*/"); + fputs("genCommandLineOptionDocs: Wrote docs/options/all_options.dox\n", stderr); + + + /* Write docs/options/ */ + for(WrapList::const_iterator i = wrappers.begin(); i != wrappers.end(); ++i) + { + std::string filename("docs/options/"); + filename += (*i).first + "_options"; + redirectStdout(filename.c_str()); + (*i).second->logOptions(); + fprintf(stderr, "genCommandLineOptionDocs: Wrote %s\n", filename.c_str()); + } + + /* Write CommandLineOptions.txt.in */ + redirectStdout("CommandLineOptions.txt.in"); +#ifdef FOR_ARIA + puts("\nARIA @ARIA_VERSION@\n"); +#elif defined(FOR_ARNETWORKING) + puts("\nArNetworking @ARIA_VERSION@\n"); +#endif + printf("Summary of command line options\n\n%s", EXPLANATION); + + for(WrapList::const_iterator i = wrappers.begin(); i != wrappers.end(); ++i) + { + puts(""); + puts((*i).first.c_str()); + for(std::string::size_type c = 0; c < (*i).first.size(); ++c) + fputc('-', stdout); + puts(""); + (*i).second->logOptions(); + } + puts("\n"); + fputs("genCommandLineOptionDocs: Wrote CommandLineOptions.txt.in\n", stderr); + + Aria::exit(0); +} diff --git a/Legacy/Aria/utils/genCommandLineOptionDocs.vcxproj b/Legacy/Aria/utils/genCommandLineOptionDocs.vcxproj new file mode 100644 index 0000000..3a9aada --- /dev/null +++ b/Legacy/Aria/utils/genCommandLineOptionDocs.vcxproj @@ -0,0 +1,91 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + {1ADA6255-2D8A-4FB8-B342-B93A806C80CF} + Win32Proj + genCommandLineOptionDocs + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + $(SolutionDir)\bin\ + ..\obj\genCommandLineOptionDocs-$(Configuration)-VC10\ + $(ProjectName)Debug + + + false + $(SolutionDir)\bin\ + ..\obj\genCommandLineOptionDocs-$(Configuration)-VC10\ + + + + NotUsing + Level3 + Disabled + FOR_ARIA;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\include + + + Console + true + ..\lib + AriaDebugVC10.lib + + + + + Level3 + NotUsing + MaxSpeed + true + true + FOR_ARIA;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\include + + + Console + true + true + true + ..\lib + AriaVC10.lib + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/utils/genCommandLineOptionDocsForArNetworking.vcxproj b/Legacy/Aria/utils/genCommandLineOptionDocsForArNetworking.vcxproj new file mode 100644 index 0000000..4c4da4e --- /dev/null +++ b/Legacy/Aria/utils/genCommandLineOptionDocsForArNetworking.vcxproj @@ -0,0 +1,91 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + Win32Proj + genCommandLineOptionDocsForArNetworking + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + $(SolutionDir)\bin\ + ..\obj\genCommandLineOptionDocsForArNetworking-$(Configuration)-VC10\ + $(ProjectName)Debug + + + false + $(SolutionDir)\bin\ + ..\obj\genCommandLineOptionDocsForArNetworking-$(Configuration)-VC10\ + $(ProjectName) + + + + NotUsing + Level3 + Disabled + FOR_ARNETWORKING;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\include;..\ArNetworking\include + + + Console + true + ..\lib + AriaDebugVC10.lib;ArNetworkingDebugVC10.lib + + + + + Level3 + NotUsing + MaxSpeed + true + true + FOR_ARNETWORKING;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\include;..\ArNetworking\include + + + Console + true + true + true + ..\lib + AriaVC10.lib;ArNetworkingVC10.lib + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/utils/makeParams b/Legacy/Aria/utils/makeParams new file mode 100755 index 0000000..fc66624 Binary files /dev/null and b/Legacy/Aria/utils/makeParams differ diff --git a/Legacy/Aria/utils/makeParams.cpp b/Legacy/Aria/utils/makeParams.cpp new file mode 100644 index 0000000..f762c04 --- /dev/null +++ b/Legacy/Aria/utils/makeParams.cpp @@ -0,0 +1,91 @@ +/* +Adept MobileRobots Robotics Interface for Applications (ARIA) +Copyright (C) 2004, 2005 ActivMedia Robotics LLC +Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc. +Copyright (C) 2011, 2012, 2013 Adept Technology + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +If you wish to redistribute ARIA under different terms, contact +Adept MobileRobots for information about a commercial version of ARIA at +robots@mobilerobots.com or +Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960 +*/ +#include "ariaOSDef.h" +#include +#include "Aria.h" +#include "ArRobotTypes.h" + + +void makePref(ArRobotParams *param) +{ + param->save(); +} + +int main() +{ + Aria::init(); + //ArLog::init(ArLog::StdOut, ArLog::Verbose); + + makePref(new ArRobotAmigo); + makePref(new ArRobotAmigoSh); + makePref(new ArRobotP2AT); + makePref(new ArRobotP2AT8); + makePref(new ArRobotP2IT); + makePref(new ArRobotP2DX); + makePref(new ArRobotP2CE); + makePref(new ArRobotP2DXe); + makePref(new ArRobotP2DF); + makePref(new ArRobotP2D8); + makePref(new ArRobotP2PB); + makePref(new ArRobotP2PP); + makePref(new ArRobotPerfPB); + makePref(new ArRobotPion1M); + makePref(new ArRobotPion1X); + makePref(new ArRobotPionAT); + makePref(new ArRobotPsos1X); + makePref(new ArRobotPsos1M); + makePref(new ArRobotPsos43M); + makePref(new ArRobotPowerBot); + makePref(new ArRobotP2AT8Plus); + makePref(new ArRobotP2D8Plus); + makePref(new ArRobotPerfPBPlus); + makePref(new ArRobotP3AT); + makePref(new ArRobotP3DX); + makePref(new ArRobotP3DXSH); + makePref(new ArRobotP3ATSH); + makePref(new ArRobotP3ATIWSH); + makePref(new ArRobotPatrolBotSH); + makePref(new ArRobotPeopleBotSH); + makePref(new ArRobotPowerBotSH); + makePref(new ArRobotWheelchairSH); + makePref(new ArRobotSeekur); + makePref(new ArRobotPowerBotSHuARCS); + makePref(new ArRobotMT400); + makePref(new ArRobotResearchPB); + makePref(new ArRobotSeekurJr); + makePref(new ArRobotP3DXSH_lms1xx); + makePref(new ArRobotP3ATSH_lms1xx); + makePref(new ArRobotPeopleBotSH_lms1xx); + makePref(new ArRobotP3DXSH_lms500); + makePref(new ArRobotP3ATSH_lms500); + makePref(new ArRobotPeopleBotSH_lms500); + makePref(new ArRobotPowerBotSH_lms500); + makePref(new ArRobotResearchPB_lms500); + makePref(new ArRobotPioneerLX); + + Aria::shutdown(); + return(0); +} diff --git a/Legacy/Aria/utils/makeParams.vcproj b/Legacy/Aria/utils/makeParams.vcproj new file mode 100644 index 0000000..aa340b2 --- /dev/null +++ b/Legacy/Aria/utils/makeParams.vcproj @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Legacy/Aria/utils/makeParams.vcxproj b/Legacy/Aria/utils/makeParams.vcxproj new file mode 100644 index 0000000..8be1af4 --- /dev/null +++ b/Legacy/Aria/utils/makeParams.vcxproj @@ -0,0 +1,91 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + {54F7CFCE-18A5-44C7-894D-9C4814F1209F} + Win32Proj + makeParams + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + $(SolutionDir)\bin\ + obj\makeParams-$(Configuration)-VC10\ + $(ProjectName)Debug + + + false + $(SolutionDir)\bin + obj\makeParams-$(Configuration)-VC10\ + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\include;%(AdditionalIncludeDirectories) + + + Console + true + AriaDebugVC10.lib + ..\lib + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + AriaVC10.lib + ..\lib + + + + + + \ No newline at end of file diff --git a/Legacy/Aria/version.txt b/Legacy/Aria/version.txt new file mode 100644 index 0000000..4b2963e --- /dev/null +++ b/Legacy/Aria/version.txt @@ -0,0 +1,5 @@ +ARIA Version 2.8.0 +August 22, 2013 +Adept MobileRobots +Linux +gcc-4.6.3 diff --git a/Legacy/Dockerfile b/Legacy/Dockerfile new file mode 100644 index 0000000..dae1d8f --- /dev/null +++ b/Legacy/Dockerfile @@ -0,0 +1,11 @@ +FROM irth7/ros:hydro as build + +RUN apt-get update && apt-get install -y ros-hydro-tf ros-hydro-dynamic-reconfigure ros-hydro-nav-msgs ros-hydro-hokuyo-node && rm -rf /var/lib/apt/lists/* +COPY ws_linux /home/lab1_5/ws/ws_linux +ADD Aria /usr/local/Aria +COPY entrypoint.sh /entrypoint.sh + +ENV ROS_MASTER_URI=http://10.104.16.29:11311 +ENV ARIA_PORT=/dev/ttyS0 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/Legacy/entrypoint.sh b/Legacy/entrypoint.sh new file mode 100755 index 0000000..e07590b --- /dev/null +++ b/Legacy/entrypoint.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +export LD_LIBRARY_PATH=/usr/local/Aria/lib:$LD_LIBRARY_PATH +source /opt/ros/hydro/setup.bash +source /home/lab1_5//ws/ws_linux/devel/setup.bash + +[[ -v PIONIER_ID ]] || { + echo + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'; + echo 'Please set the $PIONIER_ID environment variable.'; + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'; + exit -1; +} +[[ -v ROS_NAMESPACE ]] || export ROS_NAMESPACE=/PIONIER$PIONIER_ID + + +echo +echo +echo "ENVIRONMENT CONFIG" +env | grep -e ROS_MASTER_URI -e ARIA_PORT -e PIONIER_ID -e ROS_NAMESPACE | sed 's/^/ - /' +echo +echo + +set -x + +rosrun rosaria RosAria _port:=$ARIA_PORT _tf_prefix:=PIONIER${PIONIER_ID} & +rosrun hokuyo_node hokuyo_node _frame_id:="laser${PIONIER_ID}" diff --git a/Legacy/ws_linux/.catkin_workspace b/Legacy/ws_linux/.catkin_workspace new file mode 100644 index 0000000..52fd97e --- /dev/null +++ b/Legacy/ws_linux/.catkin_workspace @@ -0,0 +1 @@ +# This file currently only serves to mark the location of a catkin workspace for tool integration diff --git a/Legacy/ws_linux/build/CATKIN_IGNORE b/Legacy/ws_linux/build/CATKIN_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/Legacy/ws_linux/build/CMakeCache.txt b/Legacy/ws_linux/build/CMakeCache.txt new file mode 100644 index 0000000..b1bab60 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeCache.txt @@ -0,0 +1,572 @@ +# This is the CMakeCache file. +# For build in directory: /home/lab1_5/ws/ws_linux/build +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Build shared libraries (DLLs). +BUILD_SHARED_LIBS:BOOL=ON + +//The directory containing a CMake configuration file for Boost. +Boost_DIR:PATH=Boost_DIR-NOTFOUND + +//Path to a file. +Boost_INCLUDE_DIR:PATH=/usr/include + +//Boost library directory +Boost_LIBRARY_DIRS:FILEPATH=/usr/lib + +//The Boost THREAD library +Boost_THREAD_LIBRARY:FILEPATH=/usr/lib/libboost_thread-mt.so + +//Boost thread library (debug) +Boost_THREAD_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_thread-mt.so + +//Boost thread library (release) +Boost_THREAD_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_thread-mt.so + +//List of ';' separated packages to exclude +CATKIN_BLACKLIST_PACKAGES:STRING= + +//catkin devel space +CATKIN_DEVEL_PREFIX:PATH=/home/lab1_5/ws/ws_linux/devel + +//Catkin enable testing +CATKIN_ENABLE_TESTING:BOOL=ON + +//Catkin skip testing +CATKIN_SKIP_TESTING:BOOL=OFF + +//List of ';' separated packages to build +CATKIN_WHITELIST_PACKAGES:STRING= + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler. +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release minsize builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds (/MD /Ob1 /Oi +// /Ot /Oy /Gs will produce slightly less optimized but smaller +// files). +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during Release with Debug Info builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g + +//C compiler. +CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release minsize builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds (/MD /Ob1 /Oi +// /Ot /Oy /Gs will produce slightly less optimized but smaller +// files). +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during Release with Debug Info builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING=' ' + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/home/lab1_5/ws/ws_linux/install + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING=' ' + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=Project + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING=' ' + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If true, cmake will use relative paths in makefiles and projects. +CMAKE_USE_RELATIVE_PATHS:BOOL=OFF + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Path to a program. +DOXYGEN_EXECUTABLE:FILEPATH=/usr/bin/doxygen + +//Doxygen found +DOXYGEN_FOUND:BOOL=TRUE + +//Path to a program. +EMPY_EXECUTABLE:FILEPATH=/usr/bin/empy + +//Path to a file. +GTEST_INCLUDE_DIR:PATH=/usr/include + +//Path to a library. +GTEST_LIBRARY:FILEPATH=GTEST_LIBRARY-NOTFOUND + +//Path to a library. +GTEST_LIBRARY_DEBUG:FILEPATH=GTEST_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +GTEST_MAIN_LIBRARY:FILEPATH=GTEST_MAIN_LIBRARY-NOTFOUND + +//Path to a library. +GTEST_MAIN_LIBRARY_DEBUG:FILEPATH=GTEST_MAIN_LIBRARY_DEBUG-NOTFOUND + +//lsb_release executable was found +LSB_FOUND:BOOL=TRUE + +//Path to a program. +LSB_RELEASE_EXECUTABLE:FILEPATH=/usr/bin/lsb_release + +//Path to a program. +NOSETESTS:FILEPATH=/usr/bin/nosetests + +//Path to a program. +PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python + +//Specify specific Python version to use ('major.minor' or 'major') +PYTHON_VERSION:STRING= + +//Value Computed by CMake +Project_BINARY_DIR:STATIC=/home/lab1_5/ws/ws_linux/build + +//Value Computed by CMake +Project_SOURCE_DIR:STATIC=/home/lab1_5/ws/ws_linux/src + +//Path to a library. +RT_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so + +//Enable debian style python package layout +SETUPTOOLS_DEB_LAYOUT:BOOL=ON + +//LSB Distrib tag +UBUNTU:BOOL=TRUE + +//LSB Distrib - codename tag +UBUNTU_PRECISE:BOOL=TRUE + +//Path to a file. +_CATKIN_GTEST_INCLUDE:FILEPATH=/usr/include/gtest/gtest.h + +//Path to a file. +_CATKIN_GTEST_SRC:FILEPATH=/usr/src/gtest/src/gtest.cc + +//The directory containing a CMake configuration file for actionlib. +actionlib_DIR:PATH=/opt/ros/hydro/share/actionlib/cmake + +//The directory containing a CMake configuration file for actionlib_msgs. +actionlib_msgs_DIR:PATH=/opt/ros/hydro/share/actionlib_msgs/cmake + +//The directory containing a CMake configuration file for catkin. +catkin_DIR:PATH=/opt/ros/hydro/share/catkin/cmake + +//The directory containing a CMake configuration file for cpp_common. +cpp_common_DIR:PATH=/opt/ros/hydro/share/cpp_common/cmake + +//The directory containing a CMake configuration file for dynamic_reconfigure. +dynamic_reconfigure_DIR:PATH=/opt/ros/hydro/share/dynamic_reconfigure/cmake + +//The directory containing a CMake configuration file for gencpp. +gencpp_DIR:PATH=/opt/ros/hydro/share/gencpp/cmake + +//The directory containing a CMake configuration file for genlisp. +genlisp_DIR:PATH=/opt/ros/hydro/share/genlisp/cmake + +//The directory containing a CMake configuration file for genmsg. +genmsg_DIR:PATH=/opt/ros/hydro/share/genmsg/cmake + +//The directory containing a CMake configuration file for genpy. +genpy_DIR:PATH=/opt/ros/hydro/share/genpy/cmake + +//The directory containing a CMake configuration file for geometry_msgs. +geometry_msgs_DIR:PATH=/opt/ros/hydro/share/geometry_msgs/cmake + +//Value Computed by CMake +gtest_BINARY_DIR:STATIC=/home/lab1_5/ws/ws_linux/build/gtest + +//Dependencies for the target +gtest_LIB_DEPENDS:STATIC=general;-lpthread; + +//Value Computed by CMake +gtest_SOURCE_DIR:STATIC=/usr/src/gtest + +//Build gtest's sample programs. +gtest_build_samples:BOOL=OFF + +//Build all of gtest's own tests. +gtest_build_tests:BOOL=OFF + +//Disable uses of pthreads in gtest. +gtest_disable_pthreads:BOOL=OFF + +//Use shared (DLL) run-time lib even when Google Test is built +// as static lib. +gtest_force_shared_crt:BOOL=OFF + +//Dependencies for the target +gtest_main_LIB_DEPENDS:STATIC=general;-lpthread;general;gtest; + +//Path to a library. +lib:FILEPATH=/opt/ros/hydro/lib/libxmlrpcpp.so + +//The directory containing a CMake configuration file for message_filters. +message_filters_DIR:PATH=/opt/ros/hydro/share/message_filters/cmake + +//The directory containing a CMake configuration file for message_generation. +message_generation_DIR:PATH=/opt/ros/hydro/share/message_generation/cmake + +//The directory containing a CMake configuration file for message_runtime. +message_runtime_DIR:PATH=/opt/ros/hydro/share/message_runtime/cmake + +//The directory containing a CMake configuration file for nav_msgs. +nav_msgs_DIR:PATH=/opt/ros/hydro/share/nav_msgs/cmake + +//Value Computed by CMake +rosaria_BINARY_DIR:STATIC=/home/lab1_5/ws/ws_linux/build/rosaria + +//The directory containing a CMake configuration file for rosaria. +rosaria_DIR:PATH=/home/lab1_5/ws/ws_linux/devel/share/rosaria/cmake + +//Value Computed by CMake +rosaria_SOURCE_DIR:STATIC=/home/lab1_5/ws/ws_linux/src/rosaria + +//Value Computed by CMake +rosaria_msgs_BINARY_DIR:STATIC=/home/lab1_5/ws/ws_linux/build/rosaria_msgs + +//Value Computed by CMake +rosaria_msgs_SOURCE_DIR:STATIC=/home/lab1_5/ws/ws_linux/src/rosaria_msgs + +//The directory containing a CMake configuration file for rosconsole. +rosconsole_DIR:PATH=/opt/ros/hydro/share/rosconsole/cmake + +//The directory containing a CMake configuration file for roscpp. +roscpp_DIR:PATH=/opt/ros/hydro/share/roscpp/cmake + +//The directory containing a CMake configuration file for roscpp_serialization. +roscpp_serialization_DIR:PATH=/opt/ros/hydro/share/roscpp_serialization/cmake + +//The directory containing a CMake configuration file for roscpp_traits. +roscpp_traits_DIR:PATH=/opt/ros/hydro/share/roscpp_traits/cmake + +//The directory containing a CMake configuration file for rosgraph. +rosgraph_DIR:PATH=/opt/ros/hydro/share/rosgraph/cmake + +//The directory containing a CMake configuration file for rosgraph_msgs. +rosgraph_msgs_DIR:PATH=/opt/ros/hydro/share/rosgraph_msgs/cmake + +//The directory containing a CMake configuration file for rospy. +rospy_DIR:PATH=/opt/ros/hydro/share/rospy/cmake + +//The directory containing a CMake configuration file for rostime. +rostime_DIR:PATH=/opt/ros/hydro/share/rostime/cmake + +//Value Computed by CMake +safety_BINARY_DIR:STATIC=/home/lab1_5/ws/ws_linux/build/safety + +//Value Computed by CMake +safety_SOURCE_DIR:STATIC=/home/lab1_5/ws/ws_linux/src/safety + +//The directory containing a CMake configuration file for sensor_msgs. +sensor_msgs_DIR:PATH=/opt/ros/hydro/share/sensor_msgs/cmake + +//The directory containing a CMake configuration file for std_msgs. +std_msgs_DIR:PATH=/opt/ros/hydro/share/std_msgs/cmake + +//The directory containing a CMake configuration file for tf2. +tf2_DIR:PATH=/opt/ros/hydro/share/tf2/cmake + +//The directory containing a CMake configuration file for tf2_msgs. +tf2_msgs_DIR:PATH=/opt/ros/hydro/share/tf2_msgs/cmake + +//The directory containing a CMake configuration file for tf2_py. +tf2_py_DIR:PATH=/opt/ros/hydro/share/tf2_py/cmake + +//The directory containing a CMake configuration file for tf2_ros. +tf2_ros_DIR:PATH=/opt/ros/hydro/share/tf2_ros/cmake + +//The directory containing a CMake configuration file for tf. +tf_DIR:PATH=/opt/ros/hydro/share/tf/cmake + +//Value Computed by CMake +videostream_BINARY_DIR:STATIC=/home/lab1_5/ws/ws_linux/build/videostream + +//Value Computed by CMake +videostream_SOURCE_DIR:STATIC=/home/lab1_5/ws/ws_linux/src/videostream + +//The directory containing a CMake configuration file for xmlrpcpp. +xmlrpcpp_DIR:PATH=/opt/ros/hydro/share/xmlrpcpp/cmake + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: Boost_INCLUDE_DIR +Boost_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: Boost_LIBRARY_DIRS +Boost_LIBRARY_DIRS-ADVANCED:INTERNAL=1 +//The library version string for boost libraries +Boost_LIB_VERSION:INTERNAL=1_46_1 +//Whether the Boost THREAD library found +Boost_THREAD_FOUND:INTERNAL=ON +//ADVANCED property for variable: Boost_THREAD_LIBRARY +Boost_THREAD_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: Boost_THREAD_LIBRARY_DEBUG +Boost_THREAD_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: Boost_THREAD_LIBRARY_RELEASE +Boost_THREAD_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//The version number for boost libraries +Boost_VERSION:INTERNAL=104601 +//catkin environment +CATKIN_ENV:INTERNAL=/home/lab1_5/ws/ws_linux/build/catkin_generated/env_cached.sh +CATKIN_TEST_RESULTS_DIR:INTERNAL=/home/lab1_5/ws/ws_linux/build/test_results +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_BUILD_TOOL +CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1 +//What is the target build tool cmake is generating for. +CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/make +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/lab1_5/ws/ws_linux/build +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=8 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=7 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_CXX_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_C_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Result of TRY_COMPILE +CMAKE_DETERMINE_CXX_ABI_COMPILED:INTERNAL=TRUE +//Result of TRY_COMPILE +CMAKE_DETERMINE_C_ABI_COMPILED:INTERNAL=TRUE +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Have library pthreads +CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= +//Have library pthread +CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 +//Have include CMAKE_HAVE_PTHREAD_H +CMAKE_HAVE_PTHREAD_H:INTERNAL=1 +//Start directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/lab1_5/ws/ws_linux/src +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=6 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-2.8 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS +CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Details about finding PythonInterp +FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python][v2.7.3()] +//Details about finding Threads +FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] +GTEST_FROM_SOURCE_FOUND:INTERNAL=TRUE +GTEST_FROM_SOURCE_INCLUDE_DIRS:INTERNAL=/usr/include +GTEST_FROM_SOURCE_LIBRARIES:INTERNAL=gtest +GTEST_FROM_SOURCE_LIBRARY_DIRS:INTERNAL=/home/lab1_5/ws/ws_linux/build/gtest +GTEST_FROM_SOURCE_MAIN_LIBRARIES:INTERNAL=gtest_main +//ADVANCED property for variable: GTEST_INCLUDE_DIR +GTEST_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: GTEST_LIBRARY +GTEST_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: GTEST_LIBRARY_DEBUG +GTEST_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: GTEST_MAIN_LIBRARY +GTEST_MAIN_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: GTEST_MAIN_LIBRARY_DEBUG +GTEST_MAIN_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: PYTHON_EXECUTABLE +PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1 +//This needs to be in PYTHONPATH when 'setup.py install' is called. +// And it needs to match. But setuptools won't tell us where +// it will install things. +PYTHON_INSTALL_DIR:INTERNAL=lib/python2.7/dist-packages + diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeCCompiler.cmake b/Legacy/ws_linux/build/CMakeFiles/CMakeCCompiler.cmake new file mode 100644 index 0000000..657f5b0 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeCCompiler.cmake @@ -0,0 +1,49 @@ +SET(CMAKE_C_COMPILER "/usr/bin/gcc") +SET(CMAKE_C_COMPILER_ARG1 "") +SET(CMAKE_C_COMPILER_ID "GNU") +SET(CMAKE_C_PLATFORM_ID "Linux") + +SET(CMAKE_AR "/usr/bin/ar") +SET(CMAKE_RANLIB "/usr/bin/ranlib") +SET(CMAKE_LINKER "/usr/bin/ld") +SET(CMAKE_COMPILER_IS_GNUCC 1) +SET(CMAKE_C_COMPILER_LOADED 1) +SET(CMAKE_COMPILER_IS_MINGW ) +SET(CMAKE_COMPILER_IS_CYGWIN ) +IF(CMAKE_COMPILER_IS_CYGWIN) + SET(CYGWIN 1) + SET(UNIX 1) +ENDIF(CMAKE_COMPILER_IS_CYGWIN) + +SET(CMAKE_C_COMPILER_ENV_VAR "CC") + +IF(CMAKE_COMPILER_IS_MINGW) + SET(MINGW 1) +ENDIF(CMAKE_COMPILER_IS_MINGW) +SET(CMAKE_C_COMPILER_ID_RUN 1) +SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c) +SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +SET(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +SET(CMAKE_C_SIZEOF_DATA_PTR "8") +SET(CMAKE_C_COMPILER_ABI "ELF") +SET(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +IF(CMAKE_C_SIZEOF_DATA_PTR) + SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +ENDIF(CMAKE_C_SIZEOF_DATA_PTR) + +IF(CMAKE_C_COMPILER_ABI) + SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +ENDIF(CMAKE_C_COMPILER_ABI) + +IF(CMAKE_C_LIBRARY_ARCHITECTURE) + SET(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +ENDIF() + +SET(CMAKE_C_HAS_ISYSROOT "") + + +SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") +SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/4.6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeCXXCompiler.cmake b/Legacy/ws_linux/build/CMakeFiles/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..f62d04d --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeCXXCompiler.cmake @@ -0,0 +1,50 @@ +SET(CMAKE_CXX_COMPILER "/usr/bin/c++") +SET(CMAKE_CXX_COMPILER_ARG1 "") +SET(CMAKE_CXX_COMPILER_ID "GNU") +SET(CMAKE_CXX_PLATFORM_ID "Linux") + +SET(CMAKE_AR "/usr/bin/ar") +SET(CMAKE_RANLIB "/usr/bin/ranlib") +SET(CMAKE_LINKER "/usr/bin/ld") +SET(CMAKE_COMPILER_IS_GNUCXX 1) +SET(CMAKE_CXX_COMPILER_LOADED 1) +SET(CMAKE_COMPILER_IS_MINGW ) +SET(CMAKE_COMPILER_IS_CYGWIN ) +IF(CMAKE_COMPILER_IS_CYGWIN) + SET(CYGWIN 1) + SET(UNIX 1) +ENDIF(CMAKE_COMPILER_IS_CYGWIN) + +SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +IF(CMAKE_COMPILER_IS_MINGW) + SET(MINGW 1) +ENDIF(CMAKE_COMPILER_IS_MINGW) +SET(CMAKE_CXX_COMPILER_ID_RUN 1) +SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) +SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) +SET(CMAKE_CXX_LINKER_PREFERENCE 30) +SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +SET(CMAKE_CXX_SIZEOF_DATA_PTR "8") +SET(CMAKE_CXX_COMPILER_ABI "ELF") +SET(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +IF(CMAKE_CXX_SIZEOF_DATA_PTR) + SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR) + +IF(CMAKE_CXX_COMPILER_ABI) + SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +ENDIF(CMAKE_CXX_COMPILER_ABI) + +IF(CMAKE_CXX_LIBRARY_ARCHITECTURE) + SET(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +ENDIF() + +SET(CMAKE_CXX_HAS_ISYSROOT "") + + +SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") +SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/4.6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeDetermineCompilerABI_C.bin b/Legacy/ws_linux/build/CMakeFiles/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000..dc21ec4 Binary files /dev/null and b/Legacy/ws_linux/build/CMakeFiles/CMakeDetermineCompilerABI_C.bin differ diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin b/Legacy/ws_linux/build/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000..fa7cd7d Binary files /dev/null and b/Legacy/ws_linux/build/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeDirectoryInformation.cmake b/Legacy/ws_linux/build/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..e65c53f --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,22 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Relative path conversion top directories. +SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/lab1_5/ws/ws_linux/src") +SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/lab1_5/ws/ws_linux/build") + +# Force unix paths in dependencies. +SET(CMAKE_FORCE_UNIX_PATHS 1) + +# The C and CXX include file search paths: +SET(CMAKE_C_INCLUDE_PATH + ) +SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) + +# The C and CXX include file regular expressions for this directory. +SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeError.log b/Legacy/ws_linux/build/CMakeFiles/CMakeError.log new file mode 100644 index 0000000..4403620 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeError.log @@ -0,0 +1,19 @@ +Determining if the function pthread_create exists in the pthreads failed with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o +/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c +Linking C executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -o cmTryCompileExec -rdynamic -lpthreads +/usr/bin/ld: cannot find -lpthreads +collect2: ld returned 1 exit status +make[1]: *** [cmTryCompileExec] Błąd 1 +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +make: *** [cmTryCompileExec/fast] Błąd 2 + + diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeOutput.log b/Legacy/ws_linux/build/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..35d39b1 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeOutput.log @@ -0,0 +1,293 @@ +The system is: Linux - 3.14.17-xenomai-2.6.4 - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/gcc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/home/lab1_5/ws/ws_linux/build/CMakeFiles/CompilerIdC/a.out" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/c++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/lab1_5/ws/ws_linux/build/CMakeFiles/CompilerIdCXX/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o +/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/gcc CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o cmTryCompileExec -rdynamic +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building C object CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o +/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-2.8/Modules/CMakeCCompilerABI.c +Linking C executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/gcc -v CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -o cmTryCompileExec -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/gcc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec' '-rdynamic' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTryCompileExec /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:/usr/bin/make "cmTryCompileExec/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build] + ignore line: [make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp'] + ignore line: [/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1] + ignore line: [Building C object CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-2.8/Modules/CMakeCCompilerABI.c] + ignore line: [Linking C executable cmTryCompileExec] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1] + ignore line: [/usr/bin/gcc -v CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -o cmTryCompileExec -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/gcc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec' '-rdynamic' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTryCompileExec /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--no-add-needed] ==> ignore + arg [--as-needed] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTryCompileExec] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..] + arg [CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6] ==> [/usr/lib/gcc/x86_64-linux-gnu/4.6] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib] ==> [/usr/lib] + collapse dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse dir [/lib/../lib] ==> [/lib] + collapse dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse dir [/usr/lib/../lib] ==> [/usr/lib] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..] ==> [/usr/lib] + implicit libs: [c] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/4.6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + + +Determining if the CXX compiler works passed with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o +/usr/bin/c++ -o CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -c /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +Linking CXX executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -o cmTryCompileExec -rdynamic +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building CXX object CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/c++ -o CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-2.8/Modules/CMakeCXXCompilerABI.cpp +Linking CXX executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/c++ -v CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -o cmTryCompileExec -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTryCompileExec /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:/usr/bin/make "cmTryCompileExec/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build] + ignore line: [make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp'] + ignore line: [/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1] + ignore line: [Building CXX object CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -o CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-2.8/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Linking CXX executable cmTryCompileExec] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -o cmTryCompileExec -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTryCompileExec /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--no-add-needed] ==> ignore + arg [--as-needed] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTryCompileExec] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..] + arg [CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6] ==> [/usr/lib/gcc/x86_64-linux-gnu/4.6] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib] ==> [/usr/lib] + collapse dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse dir [/lib/../lib] ==> [/lib] + collapse dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse dir [/usr/lib/../lib] ==> [/usr/lib] + collapse dir [/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;c] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/4.6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + + +Determining if files pthread.h exist passed with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o +/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c +Linking C executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/gcc CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -o cmTryCompileExec -rdynamic +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' + + +Determining if the function pthread_create exists in the pthread passed with the following output: +Change Dir: /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp + +Run Build Command:/usr/bin/make "cmTryCompileExec/fast" +/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build +make[1]: Wejście do katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' +/usr/bin/cmake -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp/CMakeFiles 1 +Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o +/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c +Linking C executable cmTryCompileExec +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 +/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -o cmTryCompileExec -rdynamic -lpthread +make[1]: Opuszczenie katalogu `/home/lab1_5/ws/ws_linux/build/CMakeFiles/CMakeTmp' + + diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeRuleHashes.txt b/Legacy/ws_linux/build/CMakeFiles/CMakeRuleHashes.txt new file mode 100644 index 0000000..3ee6f83 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeRuleHashes.txt @@ -0,0 +1,84 @@ +# Hashes of file build rules. +e080c3e5e73febe4e2068a93a5b2cb0a /home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h +7dc242583ade1b73ff19968b1227c636 /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +fe6d554df5d5446de5d0e8aa70c9ebac /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h +dc0ca9717dbbdf4c0bc913c3a482eb29 /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h +be683fc2dc7472661d81a9ac81d360e4 /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h +41fd248b70dbf81470620287c5bb47ab /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py +7234d80da6a4bd403e7b61286e186130 /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/__init__.py +a0478ebd217c1233c0bf3a6624904d03 /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py +7b9a6628a49150579963f568dd643d9f /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py +58ca1c3cb3cca0f0415e1e1e523d7061 /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py +9caf6c700275b8d0568355f454924a17 /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/__init__.py +698e659c14887bb043b91ded9cab18d5 /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py +e18ad45c8276c68e05c1b1ed420e4561 /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp +a9f69f91ee132907f33873cb052cf015 /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp +6ba5ea70e359ebd796f7543566ae3db2 /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp +77b69422e50c2944789978515dce4c72 /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp +8099a92a7968e95953b230635467d9bf CMakeFiles/clean_test_results +548b6dc829b8c3b7b051e5fc0b33c85f CMakeFiles/doxygen +548b6dc829b8c3b7b051e5fc0b33c85f CMakeFiles/run_tests +548b6dc829b8c3b7b051e5fc0b33c85f CMakeFiles/tests +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/actionlib_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/actionlib_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/actionlib_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/actionlib_msgs_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/dynamic_reconfigure_gencfg +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/nav_msgs_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/nav_msgs_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/nav_msgs_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_gencfg +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_gencpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_generate_messages +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_genlisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosaria_genpy +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/roscpp_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/roscpp_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/roscpp_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/sensor_msgs_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/tf2_msgs_generate_messages_py +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/tf_generate_messages_cpp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/tf_generate_messages_lisp +ecb60bf5b43b0dc8aa686e69b54fe939 rosaria/CMakeFiles/tf_generate_messages_py +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/rosaria_msgs_genpy +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp +884736c1cf2e8d12735b52fbf36c0bfb rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_gencpp +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_generate_messages +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_generate_messages_cpp +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_generate_messages_lisp +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_generate_messages_py +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_genlisp +73ee8551314fa7957542f8683693dbc9 safety/CMakeFiles/safety_genpy +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_gencpp +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_generate_messages +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_generate_messages_cpp +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_generate_messages_lisp +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_generate_messages_py +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_genlisp +b5d05b5f28673d7881e1997c5e4843e8 videostream/CMakeFiles/videostream_genpy diff --git a/Legacy/ws_linux/build/CMakeFiles/CMakeSystem.cmake b/Legacy/ws_linux/build/CMakeFiles/CMakeSystem.cmake new file mode 100644 index 0000000..18a2889 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CMakeSystem.cmake @@ -0,0 +1,15 @@ + + +SET(CMAKE_SYSTEM "Linux-3.14.17-xenomai-2.6.4") +SET(CMAKE_SYSTEM_NAME "Linux") +SET(CMAKE_SYSTEM_VERSION "3.14.17-xenomai-2.6.4") +SET(CMAKE_SYSTEM_PROCESSOR "x86_64") + +SET(CMAKE_HOST_SYSTEM "Linux-3.14.17-xenomai-2.6.4") +SET(CMAKE_HOST_SYSTEM_NAME "Linux") +SET(CMAKE_HOST_SYSTEM_VERSION "3.14.17-xenomai-2.6.4") +SET(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + +SET(CMAKE_CROSSCOMPILING "FALSE") + +SET(CMAKE_SYSTEM_LOADED 1) diff --git a/Legacy/ws_linux/build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c b/Legacy/ws_linux/build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..936ae30 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,232 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" + +#elif defined(__clang__) +# define COMPILER_ID "Clang" + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + +#elif defined(__WATCOMC__) +# define COMPILER_ID "Watcom" + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + +#elif defined(__IBMC__) +# if defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" +# elif __IBMC__ >= 800 +# define COMPILER_ID "XL" +# else +# define COMPILER_ID "VisualAge" +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" + +#elif defined(__PATHSCALE__) +# define COMPILER_ID "PathScale" + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI_DSP" + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + +#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +/* Analog Devices C++ compiler for Blackfin, TigerSHARC and + SHARC (21000) DSPs */ +# define COMPILER_ID "ADSP" + +/* IAR Systems compiler for embedded systems. + http://www.iar.com + Not supported yet by CMake +#elif defined(__IAR_SYSTEMS_ICC__) +# define COMPILER_ID "IAR" */ + +/* sdcc, the small devices C compiler for embedded systems, + http://sdcc.sourceforge.net */ +#elif defined(SDCC) +# define COMPILER_ID "SDCC" + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" + +/* This compiler is either not known or is too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" + +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU) +# define PLATFORM_ID "Haiku" +/* Haiku also defines __BEOS__ so we must + put it prior to the check for __BEOS__ +*/ + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; + (void)argv; + return require; +} +#endif diff --git a/Legacy/ws_linux/build/CMakeFiles/CompilerIdC/a.out b/Legacy/ws_linux/build/CMakeFiles/CompilerIdC/a.out new file mode 100755 index 0000000..ec9b7d5 Binary files /dev/null and b/Legacy/ws_linux/build/CMakeFiles/CompilerIdC/a.out differ diff --git a/Legacy/ws_linux/build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp b/Legacy/ws_linux/build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..7414ddf --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,215 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" + +#elif defined(__clang__) +# define COMPILER_ID "Clang" + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + +#elif defined(__WATCOMC__) +# define COMPILER_ID "Watcom" + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + +#elif defined(__IBMCPP__) +# if defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" +# elif __IBMCPP__ >= 800 +# define COMPILER_ID "XL" +# else +# define COMPILER_ID "VisualAge" +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" + +#elif defined(__PATHSCALE__) +# define COMPILER_ID "PathScale" + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI_DSP" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + +#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +/* Analog Devices C++ compiler for Blackfin, TigerSHARC and + SHARC (21000) DSPs */ +# define COMPILER_ID "ADSP" + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" + +/* This compiler is either not known or is too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" + +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU) +# define PLATFORM_ID "Haiku" +/* Haiku also defines __BEOS__ so we must + put it prior to the check for __BEOS__ +*/ + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + (void)argv; + return require; +} diff --git a/Legacy/ws_linux/build/CMakeFiles/CompilerIdCXX/a.out b/Legacy/ws_linux/build/CMakeFiles/CompilerIdCXX/a.out new file mode 100755 index 0000000..2472423 Binary files /dev/null and b/Legacy/ws_linux/build/CMakeFiles/CompilerIdCXX/a.out differ diff --git a/Legacy/ws_linux/build/CMakeFiles/Makefile.cmake b/Legacy/ws_linux/build/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000..81a41b2 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/Makefile.cmake @@ -0,0 +1,324 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# The generator used is: +SET(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +SET(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "CMakeFiles/CMakeCCompiler.cmake" + "CMakeFiles/CMakeCXXCompiler.cmake" + "CMakeFiles/CMakeSystem.cmake" + "catkin/catkin_generated/version/package.cmake" + "catkin_generated/order_packages.cmake" + "rosaria/catkin_generated/ordered_paths.cmake" + "rosaria/catkin_generated/package.cmake" + "rosaria/catkin_generated/rosaria-msg-extras.cmake.develspace.in" + "rosaria/catkin_generated/rosaria-msg-extras.cmake.installspace.in" + "rosaria/cmake/rosaria-genmsg.cmake" + "rosaria_msgs/catkin_generated/ordered_paths.cmake" + "rosaria_msgs/catkin_generated/package.cmake" + "rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.develspace.in" + "rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.installspace.in" + "rosaria_msgs/cmake/rosaria_msgs-genmsg.cmake" + "safety/catkin_generated/ordered_paths.cmake" + "safety/catkin_generated/package.cmake" + "safety/catkin_generated/safety-msg-extras.cmake.develspace.in" + "safety/catkin_generated/safety-msg-extras.cmake.installspace.in" + "safety/cmake/safety-genmsg.cmake" + "videostream/catkin_generated/ordered_paths.cmake" + "videostream/catkin_generated/package.cmake" + "videostream/catkin_generated/videostream-msg-extras.cmake.develspace.in" + "videostream/catkin_generated/videostream-msg-extras.cmake.installspace.in" + "videostream/cmake/videostream-genmsg.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/cmake/rosaria-msg-extras.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/cmake/rosaria-msg-paths.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/cmake/rosariaConfig-version.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/cmake/rosariaConfig.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-paths.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/safety/cmake/safety-msg-paths.cmake" + "/home/lab1_5/ws/ws_linux/devel/share/videostream/cmake/videostream-msg-paths.cmake" + "/home/lab1_5/ws/ws_linux/src/CMakeLists.txt" + "/home/lab1_5/ws/ws_linux/src/rosaria/CMakeLists.txt" + "/home/lab1_5/ws/ws_linux/src/rosaria/package.xml" + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/CMakeLists.txt" + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/package.xml" + "/home/lab1_5/ws/ws_linux/src/safety/CMakeLists.txt" + "/home/lab1_5/ws/ws_linux/src/safety/package.xml" + "/home/lab1_5/ws/ws_linux/src/videostream/CMakeLists.txt" + "/home/lab1_5/ws/ws_linux/src/videostream/package.xml" + "/opt/ros/hydro/share/actionlib/cmake/actionlib-msg-extras.cmake" + "/opt/ros/hydro/share/actionlib/cmake/actionlibConfig-version.cmake" + "/opt/ros/hydro/share/actionlib/cmake/actionlibConfig.cmake" + "/opt/ros/hydro/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake" + "/opt/ros/hydro/share/actionlib_msgs/cmake/actionlib_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/actionlib_msgs/cmake/actionlib_msgsConfig-version.cmake" + "/opt/ros/hydro/share/actionlib_msgs/cmake/actionlib_msgsConfig.cmake" + "/opt/ros/hydro/share/catkin/cmake/../package.xml" + "/opt/ros/hydro/share/catkin/cmake/all.cmake" + "/opt/ros/hydro/share/catkin/cmake/assert.cmake" + "/opt/ros/hydro/share/catkin/cmake/atomic_configure_file.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkinConfig-version.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_add_env_hooks.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_destinations.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_generate_environment.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_install_python.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_libraries.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_metapackage.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_package.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_package_xml.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_python_setup.cmake" + "/opt/ros/hydro/share/catkin/cmake/catkin_workspace.cmake" + "/opt/ros/hydro/share/catkin/cmake/debug_message.cmake" + "/opt/ros/hydro/share/catkin/cmake/em/order_packages.cmake.em" + "/opt/ros/hydro/share/catkin/cmake/em/pkg.pc.em" + "/opt/ros/hydro/share/catkin/cmake/em_expand.cmake" + "/opt/ros/hydro/share/catkin/cmake/empy.cmake" + "/opt/ros/hydro/share/catkin/cmake/env-hooks/05.catkin-test-results.sh.develspace.in" + "/opt/ros/hydro/share/catkin/cmake/find_program_required.cmake" + "/opt/ros/hydro/share/catkin/cmake/interrogate_setup_dot_py.py" + "/opt/ros/hydro/share/catkin/cmake/legacy.cmake" + "/opt/ros/hydro/share/catkin/cmake/list_append_deduplicate.cmake" + "/opt/ros/hydro/share/catkin/cmake/list_append_unique.cmake" + "/opt/ros/hydro/share/catkin/cmake/list_insert_in_workspace_order.cmake" + "/opt/ros/hydro/share/catkin/cmake/parse_arguments.cmake" + "/opt/ros/hydro/share/catkin/cmake/platform/lsb.cmake" + "/opt/ros/hydro/share/catkin/cmake/platform/ubuntu.cmake" + "/opt/ros/hydro/share/catkin/cmake/platform/windows.cmake" + "/opt/ros/hydro/share/catkin/cmake/python.cmake" + "/opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake" + "/opt/ros/hydro/share/catkin/cmake/stamp.cmake" + "/opt/ros/hydro/share/catkin/cmake/string_starts_with.cmake" + "/opt/ros/hydro/share/catkin/cmake/templates/_setup_util.py.in" + "/opt/ros/hydro/share/catkin/cmake/templates/env.sh.in" + "/opt/ros/hydro/share/catkin/cmake/templates/generate_cached_setup.py.in" + "/opt/ros/hydro/share/catkin/cmake/templates/order_packages.context.py.in" + "/opt/ros/hydro/share/catkin/cmake/templates/pkg.context.pc.in" + "/opt/ros/hydro/share/catkin/cmake/templates/pkgConfig-version.cmake.in" + "/opt/ros/hydro/share/catkin/cmake/templates/pkgConfig.cmake.in" + "/opt/ros/hydro/share/catkin/cmake/templates/rosinstall.in" + "/opt/ros/hydro/share/catkin/cmake/templates/setup.bash.in" + "/opt/ros/hydro/share/catkin/cmake/templates/setup.sh.in" + "/opt/ros/hydro/share/catkin/cmake/templates/setup.zsh.in" + "/opt/ros/hydro/share/catkin/cmake/test/catkin_download_test_data.cmake" + "/opt/ros/hydro/share/catkin/cmake/test/download_test_data.cmake" + "/opt/ros/hydro/share/catkin/cmake/test/gtest.cmake" + "/opt/ros/hydro/share/catkin/cmake/test/nosetests.cmake" + "/opt/ros/hydro/share/catkin/cmake/test/tests.cmake" + "/opt/ros/hydro/share/catkin/cmake/tools/doxygen.cmake" + "/opt/ros/hydro/share/catkin/cmake/tools/libraries.cmake" + "/opt/ros/hydro/share/catkin/cmake/tools/rt.cmake" + "/opt/ros/hydro/share/cpp_common/cmake/cpp_commonConfig-version.cmake" + "/opt/ros/hydro/share/cpp_common/cmake/cpp_commonConfig.cmake" + "/opt/ros/hydro/share/dynamic_reconfigure/cmake/dynamic_reconfigure-extras.cmake" + "/opt/ros/hydro/share/dynamic_reconfigure/cmake/dynamic_reconfigure-macros.cmake" + "/opt/ros/hydro/share/dynamic_reconfigure/cmake/dynamic_reconfigure-msg-extras.cmake" + "/opt/ros/hydro/share/dynamic_reconfigure/cmake/dynamic_reconfigureConfig-version.cmake" + "/opt/ros/hydro/share/dynamic_reconfigure/cmake/dynamic_reconfigureConfig.cmake" + "/opt/ros/hydro/share/gencpp/cmake/gencpp-extras.cmake" + "/opt/ros/hydro/share/gencpp/cmake/gencppConfig-version.cmake" + "/opt/ros/hydro/share/gencpp/cmake/gencppConfig.cmake" + "/opt/ros/hydro/share/genlisp/cmake/genlisp-extras.cmake" + "/opt/ros/hydro/share/genlisp/cmake/genlispConfig-version.cmake" + "/opt/ros/hydro/share/genlisp/cmake/genlispConfig.cmake" + "/opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake" + "/opt/ros/hydro/share/genmsg/cmake/genmsgConfig-version.cmake" + "/opt/ros/hydro/share/genmsg/cmake/genmsgConfig.cmake" + "/opt/ros/hydro/share/genmsg/cmake/pkg-genmsg.cmake.em" + "/opt/ros/hydro/share/genmsg/cmake/pkg-genmsg.context.in" + "/opt/ros/hydro/share/genmsg/cmake/pkg-msg-extras.cmake.in" + "/opt/ros/hydro/share/genmsg/cmake/pkg-msg-paths.cmake.em" + "/opt/ros/hydro/share/genmsg/cmake/pkg-msg-paths.context.in" + "/opt/ros/hydro/share/genpy/cmake/genpy-extras.cmake" + "/opt/ros/hydro/share/genpy/cmake/genpyConfig-version.cmake" + "/opt/ros/hydro/share/genpy/cmake/genpyConfig.cmake" + "/opt/ros/hydro/share/geometry_msgs/cmake/geometry_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/geometry_msgs/cmake/geometry_msgs-msg-paths.cmake" + "/opt/ros/hydro/share/geometry_msgs/cmake/geometry_msgsConfig-version.cmake" + "/opt/ros/hydro/share/geometry_msgs/cmake/geometry_msgsConfig.cmake" + "/opt/ros/hydro/share/message_filters/cmake/message_filtersConfig-version.cmake" + "/opt/ros/hydro/share/message_filters/cmake/message_filtersConfig.cmake" + "/opt/ros/hydro/share/message_generation/cmake/message_generationConfig-version.cmake" + "/opt/ros/hydro/share/message_generation/cmake/message_generationConfig.cmake" + "/opt/ros/hydro/share/message_runtime/cmake/message_runtimeConfig-version.cmake" + "/opt/ros/hydro/share/message_runtime/cmake/message_runtimeConfig.cmake" + "/opt/ros/hydro/share/nav_msgs/cmake/nav_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/nav_msgs/cmake/nav_msgsConfig-version.cmake" + "/opt/ros/hydro/share/nav_msgs/cmake/nav_msgsConfig.cmake" + "/opt/ros/hydro/share/rosconsole/cmake/rosconsole-extras.cmake" + "/opt/ros/hydro/share/rosconsole/cmake/rosconsoleConfig-version.cmake" + "/opt/ros/hydro/share/rosconsole/cmake/rosconsoleConfig.cmake" + "/opt/ros/hydro/share/roscpp/cmake/roscpp-msg-extras.cmake" + "/opt/ros/hydro/share/roscpp/cmake/roscppConfig-version.cmake" + "/opt/ros/hydro/share/roscpp/cmake/roscppConfig.cmake" + "/opt/ros/hydro/share/roscpp_serialization/cmake/roscpp_serializationConfig-version.cmake" + "/opt/ros/hydro/share/roscpp_serialization/cmake/roscpp_serializationConfig.cmake" + "/opt/ros/hydro/share/roscpp_traits/cmake/roscpp_traitsConfig-version.cmake" + "/opt/ros/hydro/share/roscpp_traits/cmake/roscpp_traitsConfig.cmake" + "/opt/ros/hydro/share/rosgraph/cmake/rosgraphConfig-version.cmake" + "/opt/ros/hydro/share/rosgraph/cmake/rosgraphConfig.cmake" + "/opt/ros/hydro/share/rosgraph_msgs/cmake/rosgraph_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/rosgraph_msgs/cmake/rosgraph_msgsConfig-version.cmake" + "/opt/ros/hydro/share/rosgraph_msgs/cmake/rosgraph_msgsConfig.cmake" + "/opt/ros/hydro/share/rospy/cmake/rospyConfig-version.cmake" + "/opt/ros/hydro/share/rospy/cmake/rospyConfig.cmake" + "/opt/ros/hydro/share/rostime/cmake/rostimeConfig-version.cmake" + "/opt/ros/hydro/share/rostime/cmake/rostimeConfig.cmake" + "/opt/ros/hydro/share/sensor_msgs/cmake/sensor_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/sensor_msgs/cmake/sensor_msgsConfig-version.cmake" + "/opt/ros/hydro/share/sensor_msgs/cmake/sensor_msgsConfig.cmake" + "/opt/ros/hydro/share/std_msgs/cmake/std_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/std_msgs/cmake/std_msgs-msg-paths.cmake" + "/opt/ros/hydro/share/std_msgs/cmake/std_msgsConfig-version.cmake" + "/opt/ros/hydro/share/std_msgs/cmake/std_msgsConfig.cmake" + "/opt/ros/hydro/share/tf/cmake/tf-msg-extras.cmake" + "/opt/ros/hydro/share/tf/cmake/tfConfig-version.cmake" + "/opt/ros/hydro/share/tf/cmake/tfConfig.cmake" + "/opt/ros/hydro/share/tf2/cmake/tf2Config-version.cmake" + "/opt/ros/hydro/share/tf2/cmake/tf2Config.cmake" + "/opt/ros/hydro/share/tf2_msgs/cmake/tf2_msgs-msg-extras.cmake" + "/opt/ros/hydro/share/tf2_msgs/cmake/tf2_msgsConfig-version.cmake" + "/opt/ros/hydro/share/tf2_msgs/cmake/tf2_msgsConfig.cmake" + "/opt/ros/hydro/share/tf2_py/cmake/tf2_pyConfig-version.cmake" + "/opt/ros/hydro/share/tf2_py/cmake/tf2_pyConfig.cmake" + "/opt/ros/hydro/share/tf2_ros/cmake/tf2_rosConfig-version.cmake" + "/opt/ros/hydro/share/tf2_ros/cmake/tf2_rosConfig.cmake" + "/opt/ros/hydro/share/xmlrpcpp/cmake/xmlrpcppConfig-version.cmake" + "/opt/ros/hydro/share/xmlrpcpp/cmake/xmlrpcppConfig.cmake" + "/usr/share/cmake-2.8/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-2.8/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-2.8/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-2.8/Modules/CMakeCXXCompiler.cmake.in" + "/usr/share/cmake-2.8/Modules/CMakeCXXCompilerABI.cpp" + "/usr/share/cmake-2.8/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-2.8/Modules/CMakeConfigurableFile.in" + "/usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake" + "/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-2.8/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-2.8/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake-2.8/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-2.8/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake" + "/usr/share/cmake-2.8/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-2.8/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-2.8/Modules/CheckFunctionExists.c" + "/usr/share/cmake-2.8/Modules/CheckIncludeFiles.cmake" + "/usr/share/cmake-2.8/Modules/CheckLibraryExists.cmake" + "/usr/share/cmake-2.8/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-2.8/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake-2.8/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-2.8/Modules/FindBoost.cmake" + "/usr/share/cmake-2.8/Modules/FindGTest.cmake" + "/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake" + "/usr/share/cmake-2.8/Modules/FindPackageMessage.cmake" + "/usr/share/cmake-2.8/Modules/FindPythonInterp.cmake" + "/usr/share/cmake-2.8/Modules/FindThreads.cmake" + "/usr/share/cmake-2.8/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-2.8/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake-2.8/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-2.8/Modules/Platform/Linux.cmake" + "/usr/share/cmake-2.8/Modules/Platform/UnixPaths.cmake" + "/usr/src/gtest/CMakeLists.txt" + "/usr/src/gtest/cmake/internal_utils.cmake" + ) + +# The corresponding makefile is: +SET(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +SET(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/CMakeDirectoryInformation.cmake" + "gtest/CMakeFiles/CMakeDirectoryInformation.cmake" + "rosaria_msgs/CMakeFiles/CMakeDirectoryInformation.cmake" + "rosaria/CMakeFiles/CMakeDirectoryInformation.cmake" + "safety/CMakeFiles/CMakeDirectoryInformation.cmake" + "videostream/CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +SET(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/clean_test_results.dir/DependInfo.cmake" + "CMakeFiles/doxygen.dir/DependInfo.cmake" + "CMakeFiles/run_tests.dir/DependInfo.cmake" + "CMakeFiles/tests.dir/DependInfo.cmake" + "gtest/CMakeFiles/gtest.dir/DependInfo.cmake" + "gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/RosAria.dir/DependInfo.cmake" + "rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/actionlib_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/DependInfo.cmake" + "rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_gencfg.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_gencpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_generate_messages.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_genlisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosaria_genpy.dir/DependInfo.cmake" + "rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/DependInfo.cmake" + "rosaria/CMakeFiles/tf_generate_messages_cpp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/tf_generate_messages_lisp.dir/DependInfo.cmake" + "rosaria/CMakeFiles/tf_generate_messages_py.dir/DependInfo.cmake" + "safety/CMakeFiles/cloud_reader.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_gencpp.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_generate_messages.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_generate_messages_cpp.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_generate_messages_lisp.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_generate_messages_py.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_genlisp.dir/DependInfo.cmake" + "safety/CMakeFiles/safety_genpy.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_gencpp.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_generate_messages.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_generate_messages_cpp.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_generate_messages_lisp.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_generate_messages_py.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_genlisp.dir/DependInfo.cmake" + "videostream/CMakeFiles/videostream_genpy.dir/DependInfo.cmake" + ) diff --git a/Legacy/ws_linux/build/CMakeFiles/Makefile2 b/Legacy/ws_linux/build/CMakeFiles/Makefile2 new file mode 100644 index 0000000..48c4164 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/Makefile2 @@ -0,0 +1,2482 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# The main recursive all target +all: +.PHONY : all + +# The main recursive preinstall target +preinstall: +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Target rules for target CMakeFiles/clean_test_results.dir + +# All Build rule for target. +CMakeFiles/clean_test_results.dir/all: + $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/depend + $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target clean_test_results" +.PHONY : CMakeFiles/clean_test_results.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/clean_test_results.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/clean_test_results.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : CMakeFiles/clean_test_results.dir/rule + +# Convenience name for target. +clean_test_results: CMakeFiles/clean_test_results.dir/rule +.PHONY : clean_test_results + +# clean rule for target. +CMakeFiles/clean_test_results.dir/clean: + $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/clean +.PHONY : CMakeFiles/clean_test_results.dir/clean + +# clean rule for target. +clean: CMakeFiles/clean_test_results.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/doxygen.dir + +# All Build rule for target. +CMakeFiles/doxygen.dir/all: + $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/depend + $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 3 + @echo "Built target doxygen" +.PHONY : CMakeFiles/doxygen.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/doxygen.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/doxygen.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : CMakeFiles/doxygen.dir/rule + +# Convenience name for target. +doxygen: CMakeFiles/doxygen.dir/rule +.PHONY : doxygen + +# clean rule for target. +CMakeFiles/doxygen.dir/clean: + $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/clean +.PHONY : CMakeFiles/doxygen.dir/clean + +# clean rule for target. +clean: CMakeFiles/doxygen.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/run_tests.dir + +# All Build rule for target. +CMakeFiles/run_tests.dir/all: + $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/depend + $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target run_tests" +.PHONY : CMakeFiles/run_tests.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/run_tests.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/run_tests.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : CMakeFiles/run_tests.dir/rule + +# Convenience name for target. +run_tests: CMakeFiles/run_tests.dir/rule +.PHONY : run_tests + +# clean rule for target. +CMakeFiles/run_tests.dir/clean: + $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/clean +.PHONY : CMakeFiles/run_tests.dir/clean + +# clean rule for target. +clean: CMakeFiles/run_tests.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/tests.dir + +# All Build rule for target. +CMakeFiles/tests.dir/all: + $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/depend + $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tests" +.PHONY : CMakeFiles/tests.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/tests.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/tests.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : CMakeFiles/tests.dir/rule + +# Convenience name for target. +tests: CMakeFiles/tests.dir/rule +.PHONY : tests + +# clean rule for target. +CMakeFiles/tests.dir/clean: + $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/clean +.PHONY : CMakeFiles/tests.dir/clean + +# clean rule for target. +clean: CMakeFiles/tests.dir/clean +.PHONY : clean + +#============================================================================= +# Directory level rules for directory gtest + +# Convenience name for "all" pass in the directory. +gtest/all: +.PHONY : gtest/all + +# Convenience name for "clean" pass in the directory. +gtest/clean: gtest/CMakeFiles/gtest.dir/clean +gtest/clean: gtest/CMakeFiles/gtest_main.dir/clean +.PHONY : gtest/clean + +# Convenience name for "preinstall" pass in the directory. +gtest/preinstall: +.PHONY : gtest/preinstall + +#============================================================================= +# Target rules for target gtest/CMakeFiles/gtest.dir + +# All Build rule for target. +gtest/CMakeFiles/gtest.dir/all: + $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/depend + $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 4 + @echo "Built target gtest" +.PHONY : gtest/CMakeFiles/gtest.dir/all + +# Build rule for subdir invocation for target. +gtest/CMakeFiles/gtest.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : gtest/CMakeFiles/gtest.dir/rule + +# Convenience name for target. +gtest: gtest/CMakeFiles/gtest.dir/rule +.PHONY : gtest + +# clean rule for target. +gtest/CMakeFiles/gtest.dir/clean: + $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/clean +.PHONY : gtest/CMakeFiles/gtest.dir/clean + +# clean rule for target. +clean: gtest/CMakeFiles/gtest.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target gtest/CMakeFiles/gtest_main.dir + +# All Build rule for target. +gtest/CMakeFiles/gtest_main.dir/all: gtest/CMakeFiles/gtest.dir/all + $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/depend + $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 5 + @echo "Built target gtest_main" +.PHONY : gtest/CMakeFiles/gtest_main.dir/all + +# Build rule for subdir invocation for target. +gtest/CMakeFiles/gtest_main.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest_main.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : gtest/CMakeFiles/gtest_main.dir/rule + +# Convenience name for target. +gtest_main: gtest/CMakeFiles/gtest_main.dir/rule +.PHONY : gtest_main + +# clean rule for target. +gtest/CMakeFiles/gtest_main.dir/clean: + $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/clean +.PHONY : gtest/CMakeFiles/gtest_main.dir/clean + +# clean rule for target. +clean: gtest/CMakeFiles/gtest_main.dir/clean +.PHONY : clean + +#============================================================================= +# Directory level rules for directory rosaria_msgs + +# Convenience name for "all" pass in the directory. +rosaria_msgs/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all +.PHONY : rosaria_msgs/all + +# Convenience name for "clean" pass in the directory. +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean +rosaria_msgs/clean: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean +.PHONY : rosaria_msgs/clean + +# Convenience name for "preinstall" pass in the directory. +rosaria_msgs/preinstall: +.PHONY : rosaria_msgs/preinstall + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target geometry_msgs_generate_messages_cpp" +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +geometry_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule +.PHONY : geometry_msgs_generate_messages_cpp + +# clean rule for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target geometry_msgs_generate_messages_lisp" +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +geometry_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule +.PHONY : geometry_msgs_generate_messages_lisp + +# clean rule for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target geometry_msgs_generate_messages_py" +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +geometry_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule +.PHONY : geometry_msgs_generate_messages_py + +# clean rule for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_msgs_gencpp" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule + +# Convenience name for target. +rosaria_msgs_gencpp: rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule +.PHONY : rosaria_msgs_gencpp + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/all +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/all +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_msgs_generate_messages" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all + +# Include target in all. +all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 7 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule +.PHONY : rosaria_msgs_generate_messages + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/all: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/all +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 11 12 + @echo "Built target rosaria_msgs_generate_messages_cpp" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria_msgs_generate_messages_cpp + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/all: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 13 14 + @echo "Built target rosaria_msgs_generate_messages_lisp" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria_msgs_generate_messages_lisp + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/all: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 15 16 17 + @echo "Built target rosaria_msgs_generate_messages_py" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 3 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule +.PHONY : rosaria_msgs_generate_messages_py + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_msgs_genlisp" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule + +# Convenience name for target. +rosaria_msgs_genlisp: rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule +.PHONY : rosaria_msgs_genlisp + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/all: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/all + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_msgs_genpy" +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 3 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule + +# Convenience name for target. +rosaria_msgs_genpy: rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule +.PHONY : rosaria_msgs_genpy + +# clean rule for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target std_msgs_generate_messages_cpp" +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +std_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule +.PHONY : std_msgs_generate_messages_cpp + +# clean rule for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target std_msgs_generate_messages_lisp" +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +std_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule +.PHONY : std_msgs_generate_messages_lisp + +# clean rule for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target std_msgs_generate_messages_py" +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +std_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule +.PHONY : std_msgs_generate_messages_py + +# clean rule for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Directory level rules for directory rosaria + +# Convenience name for "all" pass in the directory. +rosaria/all: rosaria/CMakeFiles/RosAria.dir/all +rosaria/all: rosaria/CMakeFiles/rosaria_gencfg.dir/all +rosaria/all: rosaria/CMakeFiles/rosaria_generate_messages.dir/all +.PHONY : rosaria/all + +# Convenience name for "clean" pass in the directory. +rosaria/clean: rosaria/CMakeFiles/RosAria.dir/clean +rosaria/clean: rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean +rosaria/clean: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_gencfg.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_gencpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_generate_messages.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_genlisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosaria_genpy.dir/clean +rosaria/clean: rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean +rosaria/clean: rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean +rosaria/clean: rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean +rosaria/clean: rosaria/CMakeFiles/tf_generate_messages_py.dir/clean +.PHONY : rosaria/clean + +# Convenience name for "preinstall" pass in the directory. +rosaria/preinstall: +.PHONY : rosaria/preinstall + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/RosAria.dir + +# All Build rule for target. +rosaria/CMakeFiles/RosAria.dir/all: rosaria/CMakeFiles/rosaria_gencfg.dir/all +rosaria/CMakeFiles/RosAria.dir/all: rosaria/CMakeFiles/rosaria_gencpp.dir/all + $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/depend + $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + @echo "Built target RosAria" +.PHONY : rosaria/CMakeFiles/RosAria.dir/all + +# Include target in all. +all: rosaria/CMakeFiles/RosAria.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/RosAria.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 3 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/RosAria.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/RosAria.dir/rule + +# Convenience name for target. +RosAria: rosaria/CMakeFiles/RosAria.dir/rule +.PHONY : RosAria + +# clean rule for target. +rosaria/CMakeFiles/RosAria.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/clean +.PHONY : rosaria/CMakeFiles/RosAria.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/RosAria.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target actionlib_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule + +# Convenience name for target. +actionlib_generate_messages_cpp: rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule +.PHONY : actionlib_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target actionlib_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule + +# Convenience name for target. +actionlib_generate_messages_lisp: rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule +.PHONY : actionlib_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/actionlib_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target actionlib_generate_messages_py" +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule + +# Convenience name for target. +actionlib_generate_messages_py: rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule +.PHONY : actionlib_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target actionlib_msgs_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +actionlib_msgs_generate_messages_cpp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule +.PHONY : actionlib_msgs_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target actionlib_msgs_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +actionlib_msgs_generate_messages_lisp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule +.PHONY : actionlib_msgs_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target actionlib_msgs_generate_messages_py" +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +actionlib_msgs_generate_messages_py: rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule +.PHONY : actionlib_msgs_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir + +# All Build rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/all: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/depend + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target dynamic_reconfigure_gencfg" +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule + +# Convenience name for target. +dynamic_reconfigure_gencfg: rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule +.PHONY : dynamic_reconfigure_gencfg + +# clean rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target dynamic_reconfigure_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule + +# Convenience name for target. +dynamic_reconfigure_generate_messages_cpp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule +.PHONY : dynamic_reconfigure_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target dynamic_reconfigure_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule + +# Convenience name for target. +dynamic_reconfigure_generate_messages_lisp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule +.PHONY : dynamic_reconfigure_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target dynamic_reconfigure_generate_messages_py" +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule + +# Convenience name for target. +dynamic_reconfigure_generate_messages_py: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule +.PHONY : dynamic_reconfigure_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target nav_msgs_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +nav_msgs_generate_messages_cpp: rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule +.PHONY : nav_msgs_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target nav_msgs_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +nav_msgs_generate_messages_lisp: rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule +.PHONY : nav_msgs_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target nav_msgs_generate_messages_py" +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +nav_msgs_generate_messages_py: rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule +.PHONY : nav_msgs_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_gencfg.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_gencfg.dir/all: + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencfg.dir/build.make rosaria/CMakeFiles/rosaria_gencfg.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencfg.dir/build.make rosaria/CMakeFiles/rosaria_gencfg.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 6 + @echo "Built target rosaria_gencfg" +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/all + +# Include target in all. +all: rosaria/CMakeFiles/rosaria_gencfg.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_gencfg.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_gencfg.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/rule + +# Convenience name for target. +rosaria_gencfg: rosaria/CMakeFiles/rosaria_gencfg.dir/rule +.PHONY : rosaria_gencfg + +# clean rule for target. +rosaria/CMakeFiles/rosaria_gencfg.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencfg.dir/build.make rosaria/CMakeFiles/rosaria_gencfg.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_gencfg.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_gencpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_gencpp.dir/all: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencpp.dir/build.make rosaria/CMakeFiles/rosaria_gencpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencpp.dir/build.make rosaria/CMakeFiles/rosaria_gencpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_gencpp" +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_gencpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_gencpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/rule + +# Convenience name for target. +rosaria_gencpp: rosaria/CMakeFiles/rosaria_gencpp.dir/rule +.PHONY : rosaria_gencpp + +# clean rule for target. +rosaria/CMakeFiles/rosaria_gencpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencpp.dir/build.make rosaria/CMakeFiles/rosaria_gencpp.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_gencpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_generate_messages.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_generate_messages.dir/all: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/all +rosaria/CMakeFiles/rosaria_generate_messages.dir/all: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/all +rosaria/CMakeFiles/rosaria_generate_messages.dir/all: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_generate_messages" +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/all + +# Include target in all. +all: rosaria/CMakeFiles/rosaria_generate_messages.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_generate_messages.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 4 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/rule + +# Convenience name for target. +rosaria_generate_messages: rosaria/CMakeFiles/rosaria_generate_messages.dir/rule +.PHONY : rosaria_generate_messages + +# clean rule for target. +rosaria/CMakeFiles/rosaria_generate_messages.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_generate_messages.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/all: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/all +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 7 + @echo "Built target rosaria_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule + +# Convenience name for target. +rosaria_generate_messages_cpp: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule +.PHONY : rosaria_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/all: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 8 + @echo "Built target rosaria_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule + +# Convenience name for target. +rosaria_generate_messages_lisp: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule +.PHONY : rosaria_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/all: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 9 10 + @echo "Built target rosaria_generate_messages_py" +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule + +# Convenience name for target. +rosaria_generate_messages_py: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule +.PHONY : rosaria_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_genlisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_genlisp.dir/all: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_genlisp.dir/build.make rosaria/CMakeFiles/rosaria_genlisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_genlisp.dir/build.make rosaria/CMakeFiles/rosaria_genlisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_genlisp" +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_genlisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_genlisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/rule + +# Convenience name for target. +rosaria_genlisp: rosaria/CMakeFiles/rosaria_genlisp.dir/rule +.PHONY : rosaria_genlisp + +# clean rule for target. +rosaria/CMakeFiles/rosaria_genlisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_genlisp.dir/build.make rosaria/CMakeFiles/rosaria_genlisp.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_genlisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosaria_genpy.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosaria_genpy.dir/all: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/all + $(MAKE) -f rosaria/CMakeFiles/rosaria_genpy.dir/build.make rosaria/CMakeFiles/rosaria_genpy.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosaria_genpy.dir/build.make rosaria/CMakeFiles/rosaria_genpy.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosaria_genpy" +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosaria_genpy.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_genpy.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/rule + +# Convenience name for target. +rosaria_genpy: rosaria/CMakeFiles/rosaria_genpy.dir/rule +.PHONY : rosaria_genpy + +# clean rule for target. +rosaria/CMakeFiles/rosaria_genpy.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosaria_genpy.dir/build.make rosaria/CMakeFiles/rosaria_genpy.dir/clean +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosaria_genpy.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target roscpp_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule + +# Convenience name for target. +roscpp_generate_messages_cpp: rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule +.PHONY : roscpp_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target roscpp_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule + +# Convenience name for target. +roscpp_generate_messages_lisp: rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule +.PHONY : roscpp_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/roscpp_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target roscpp_generate_messages_py" +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/roscpp_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule + +# Convenience name for target. +roscpp_generate_messages_py: rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule +.PHONY : roscpp_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosgraph_msgs_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +rosgraph_msgs_generate_messages_cpp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule +.PHONY : rosgraph_msgs_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosgraph_msgs_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +rosgraph_msgs_generate_messages_lisp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule +.PHONY : rosgraph_msgs_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target rosgraph_msgs_generate_messages_py" +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +rosgraph_msgs_generate_messages_py: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule +.PHONY : rosgraph_msgs_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target sensor_msgs_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +sensor_msgs_generate_messages_cpp: rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule +.PHONY : sensor_msgs_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target sensor_msgs_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +sensor_msgs_generate_messages_lisp: rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule +.PHONY : sensor_msgs_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target sensor_msgs_generate_messages_py" +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +sensor_msgs_generate_messages_py: rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule +.PHONY : sensor_msgs_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tf2_msgs_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +tf2_msgs_generate_messages_cpp: rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule +.PHONY : tf2_msgs_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tf2_msgs_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +tf2_msgs_generate_messages_lisp: rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule +.PHONY : tf2_msgs_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tf2_msgs_generate_messages_py" +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +tf2_msgs_generate_messages_py: rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule +.PHONY : tf2_msgs_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/tf_generate_messages_cpp.dir + +# All Build rule for target. +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_cpp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tf_generate_messages_cpp" +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule + +# Convenience name for target. +tf_generate_messages_cpp: rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule +.PHONY : tf_generate_messages_cpp + +# clean rule for target. +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/tf_generate_messages_lisp.dir + +# All Build rule for target. +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/all: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_lisp.dir/depend + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tf_generate_messages_lisp" +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule + +# Convenience name for target. +tf_generate_messages_lisp: rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule +.PHONY : tf_generate_messages_lisp + +# clean rule for target. +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target rosaria/CMakeFiles/tf_generate_messages_py.dir + +# All Build rule for target. +rosaria/CMakeFiles/tf_generate_messages_py.dir/all: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf_generate_messages_py.dir/depend + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target tf_generate_messages_py" +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +rosaria/CMakeFiles/tf_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/rule + +# Convenience name for target. +tf_generate_messages_py: rosaria/CMakeFiles/tf_generate_messages_py.dir/rule +.PHONY : tf_generate_messages_py + +# clean rule for target. +rosaria/CMakeFiles/tf_generate_messages_py.dir/clean: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf_generate_messages_py.dir/clean +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/clean + +# clean rule for target. +clean: rosaria/CMakeFiles/tf_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Directory level rules for directory safety + +# Convenience name for "all" pass in the directory. +safety/all: safety/CMakeFiles/cloud_reader.dir/all +safety/all: safety/CMakeFiles/safety_generate_messages.dir/all +.PHONY : safety/all + +# Convenience name for "clean" pass in the directory. +safety/clean: safety/CMakeFiles/cloud_reader.dir/clean +safety/clean: safety/CMakeFiles/safety_gencpp.dir/clean +safety/clean: safety/CMakeFiles/safety_generate_messages.dir/clean +safety/clean: safety/CMakeFiles/safety_generate_messages_cpp.dir/clean +safety/clean: safety/CMakeFiles/safety_generate_messages_lisp.dir/clean +safety/clean: safety/CMakeFiles/safety_generate_messages_py.dir/clean +safety/clean: safety/CMakeFiles/safety_genlisp.dir/clean +safety/clean: safety/CMakeFiles/safety_genpy.dir/clean +.PHONY : safety/clean + +# Convenience name for "preinstall" pass in the directory. +safety/preinstall: +.PHONY : safety/preinstall + +#============================================================================= +# Target rules for target safety/CMakeFiles/cloud_reader.dir + +# All Build rule for target. +safety/CMakeFiles/cloud_reader.dir/all: safety/CMakeFiles/safety_generate_messages_cpp.dir/all + $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/depend + $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + @echo "Built target cloud_reader" +.PHONY : safety/CMakeFiles/cloud_reader.dir/all + +# Include target in all. +all: safety/CMakeFiles/cloud_reader.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/cloud_reader.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/cloud_reader.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/cloud_reader.dir/rule + +# Convenience name for target. +cloud_reader: safety/CMakeFiles/cloud_reader.dir/rule +.PHONY : cloud_reader + +# clean rule for target. +safety/CMakeFiles/cloud_reader.dir/clean: + $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/clean +.PHONY : safety/CMakeFiles/cloud_reader.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/cloud_reader.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_gencpp.dir + +# All Build rule for target. +safety/CMakeFiles/safety_gencpp.dir/all: safety/CMakeFiles/safety_generate_messages_cpp.dir/all + $(MAKE) -f safety/CMakeFiles/safety_gencpp.dir/build.make safety/CMakeFiles/safety_gencpp.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_gencpp.dir/build.make safety/CMakeFiles/safety_gencpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_gencpp" +.PHONY : safety/CMakeFiles/safety_gencpp.dir/all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_gencpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_gencpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_gencpp.dir/rule + +# Convenience name for target. +safety_gencpp: safety/CMakeFiles/safety_gencpp.dir/rule +.PHONY : safety_gencpp + +# clean rule for target. +safety/CMakeFiles/safety_gencpp.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_gencpp.dir/build.make safety/CMakeFiles/safety_gencpp.dir/clean +.PHONY : safety/CMakeFiles/safety_gencpp.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_gencpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_generate_messages.dir + +# All Build rule for target. +safety/CMakeFiles/safety_generate_messages.dir/all: safety/CMakeFiles/safety_generate_messages_cpp.dir/all +safety/CMakeFiles/safety_generate_messages.dir/all: safety/CMakeFiles/safety_generate_messages_py.dir/all +safety/CMakeFiles/safety_generate_messages.dir/all: safety/CMakeFiles/safety_generate_messages_lisp.dir/all + $(MAKE) -f safety/CMakeFiles/safety_generate_messages.dir/build.make safety/CMakeFiles/safety_generate_messages.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_generate_messages.dir/build.make safety/CMakeFiles/safety_generate_messages.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_generate_messages" +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/all + +# Include target in all. +all: safety/CMakeFiles/safety_generate_messages.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_generate_messages.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/rule + +# Convenience name for target. +safety_generate_messages: safety/CMakeFiles/safety_generate_messages.dir/rule +.PHONY : safety_generate_messages + +# clean rule for target. +safety/CMakeFiles/safety_generate_messages.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages.dir/build.make safety/CMakeFiles/safety_generate_messages.dir/clean +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_generate_messages.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_generate_messages_cpp.dir + +# All Build rule for target. +safety/CMakeFiles/safety_generate_messages_cpp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make safety/CMakeFiles/safety_generate_messages_cpp.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make safety/CMakeFiles/safety_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_generate_messages_cpp" +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/rule + +# Convenience name for target. +safety_generate_messages_cpp: safety/CMakeFiles/safety_generate_messages_cpp.dir/rule +.PHONY : safety_generate_messages_cpp + +# clean rule for target. +safety/CMakeFiles/safety_generate_messages_cpp.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make safety/CMakeFiles/safety_generate_messages_cpp.dir/clean +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_generate_messages_lisp.dir + +# All Build rule for target. +safety/CMakeFiles/safety_generate_messages_lisp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make safety/CMakeFiles/safety_generate_messages_lisp.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make safety/CMakeFiles/safety_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_generate_messages_lisp" +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/rule + +# Convenience name for target. +safety_generate_messages_lisp: safety/CMakeFiles/safety_generate_messages_lisp.dir/rule +.PHONY : safety_generate_messages_lisp + +# clean rule for target. +safety/CMakeFiles/safety_generate_messages_lisp.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make safety/CMakeFiles/safety_generate_messages_lisp.dir/clean +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_generate_messages_py.dir + +# All Build rule for target. +safety/CMakeFiles/safety_generate_messages_py.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_py.dir/build.make safety/CMakeFiles/safety_generate_messages_py.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_py.dir/build.make safety/CMakeFiles/safety_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_generate_messages_py" +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/rule + +# Convenience name for target. +safety_generate_messages_py: safety/CMakeFiles/safety_generate_messages_py.dir/rule +.PHONY : safety_generate_messages_py + +# clean rule for target. +safety/CMakeFiles/safety_generate_messages_py.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_py.dir/build.make safety/CMakeFiles/safety_generate_messages_py.dir/clean +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_genlisp.dir + +# All Build rule for target. +safety/CMakeFiles/safety_genlisp.dir/all: safety/CMakeFiles/safety_generate_messages_lisp.dir/all + $(MAKE) -f safety/CMakeFiles/safety_genlisp.dir/build.make safety/CMakeFiles/safety_genlisp.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_genlisp.dir/build.make safety/CMakeFiles/safety_genlisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_genlisp" +.PHONY : safety/CMakeFiles/safety_genlisp.dir/all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_genlisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_genlisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_genlisp.dir/rule + +# Convenience name for target. +safety_genlisp: safety/CMakeFiles/safety_genlisp.dir/rule +.PHONY : safety_genlisp + +# clean rule for target. +safety/CMakeFiles/safety_genlisp.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_genlisp.dir/build.make safety/CMakeFiles/safety_genlisp.dir/clean +.PHONY : safety/CMakeFiles/safety_genlisp.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_genlisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target safety/CMakeFiles/safety_genpy.dir + +# All Build rule for target. +safety/CMakeFiles/safety_genpy.dir/all: safety/CMakeFiles/safety_generate_messages_py.dir/all + $(MAKE) -f safety/CMakeFiles/safety_genpy.dir/build.make safety/CMakeFiles/safety_genpy.dir/depend + $(MAKE) -f safety/CMakeFiles/safety_genpy.dir/build.make safety/CMakeFiles/safety_genpy.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target safety_genpy" +.PHONY : safety/CMakeFiles/safety_genpy.dir/all + +# Build rule for subdir invocation for target. +safety/CMakeFiles/safety_genpy.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 + $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_genpy.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : safety/CMakeFiles/safety_genpy.dir/rule + +# Convenience name for target. +safety_genpy: safety/CMakeFiles/safety_genpy.dir/rule +.PHONY : safety_genpy + +# clean rule for target. +safety/CMakeFiles/safety_genpy.dir/clean: + $(MAKE) -f safety/CMakeFiles/safety_genpy.dir/build.make safety/CMakeFiles/safety_genpy.dir/clean +.PHONY : safety/CMakeFiles/safety_genpy.dir/clean + +# clean rule for target. +clean: safety/CMakeFiles/safety_genpy.dir/clean +.PHONY : clean + +#============================================================================= +# Directory level rules for directory videostream + +# Convenience name for "all" pass in the directory. +videostream/all: videostream/CMakeFiles/videostream.dir/all +videostream/all: videostream/CMakeFiles/videostream_generate_messages.dir/all +.PHONY : videostream/all + +# Convenience name for "clean" pass in the directory. +videostream/clean: videostream/CMakeFiles/videostream.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_gencpp.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_generate_messages.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_generate_messages_py.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_genlisp.dir/clean +videostream/clean: videostream/CMakeFiles/videostream_genpy.dir/clean +.PHONY : videostream/clean + +# Convenience name for "preinstall" pass in the directory. +videostream/preinstall: +.PHONY : videostream/preinstall + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream.dir/all: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 18 + @echo "Built target videostream" +.PHONY : videostream/CMakeFiles/videostream.dir/all + +# Include target in all. +all: videostream/CMakeFiles/videostream.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream.dir/rule + +# Convenience name for target. +videostream: videostream/CMakeFiles/videostream.dir/rule +.PHONY : videostream + +# clean rule for target. +videostream/CMakeFiles/videostream.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/clean +.PHONY : videostream/CMakeFiles/videostream.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_gencpp.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_gencpp.dir/all: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_gencpp.dir/build.make videostream/CMakeFiles/videostream_gencpp.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_gencpp.dir/build.make videostream/CMakeFiles/videostream_gencpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target videostream_gencpp" +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_gencpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_gencpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/rule + +# Convenience name for target. +videostream_gencpp: videostream/CMakeFiles/videostream_gencpp.dir/rule +.PHONY : videostream_gencpp + +# clean rule for target. +videostream/CMakeFiles/videostream_gencpp.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_gencpp.dir/build.make videostream/CMakeFiles/videostream_gencpp.dir/clean +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_gencpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_generate_messages.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_generate_messages.dir/all: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/all +videostream/CMakeFiles/videostream_generate_messages.dir/all: videostream/CMakeFiles/videostream_generate_messages_py.dir/all +videostream/CMakeFiles/videostream_generate_messages.dir/all: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages.dir/build.make videostream/CMakeFiles/videostream_generate_messages.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages.dir/build.make videostream/CMakeFiles/videostream_generate_messages.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target videostream_generate_messages" +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/all + +# Include target in all. +all: videostream/CMakeFiles/videostream_generate_messages.dir/all +.PHONY : all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_generate_messages.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 4 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/rule + +# Convenience name for target. +videostream_generate_messages: videostream/CMakeFiles/videostream_generate_messages.dir/rule +.PHONY : videostream_generate_messages + +# clean rule for target. +videostream/CMakeFiles/videostream_generate_messages.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages.dir/build.make videostream/CMakeFiles/videostream_generate_messages.dir/clean +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_generate_messages.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_generate_messages_cpp.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 19 + @echo "Built target videostream_generate_messages_cpp" +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages_cpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule + +# Convenience name for target. +videostream_generate_messages_cpp: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule +.PHONY : videostream_generate_messages_cpp + +# clean rule for target. +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_generate_messages_lisp.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 20 + @echo "Built target videostream_generate_messages_lisp" +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages_lisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule + +# Convenience name for target. +videostream_generate_messages_lisp: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule +.PHONY : videostream_generate_messages_lisp + +# clean rule for target. +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_generate_messages_py.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_generate_messages_py.dir/all: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make videostream/CMakeFiles/videostream_generate_messages_py.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make videostream/CMakeFiles/videostream_generate_messages_py.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles 21 22 + @echo "Built target videostream_generate_messages_py" +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_generate_messages_py.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages_py.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/rule + +# Convenience name for target. +videostream_generate_messages_py: videostream/CMakeFiles/videostream_generate_messages_py.dir/rule +.PHONY : videostream_generate_messages_py + +# clean rule for target. +videostream/CMakeFiles/videostream_generate_messages_py.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make videostream/CMakeFiles/videostream_generate_messages_py.dir/clean +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_generate_messages_py.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_genlisp.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_genlisp.dir/all: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_genlisp.dir/build.make videostream/CMakeFiles/videostream_genlisp.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_genlisp.dir/build.make videostream/CMakeFiles/videostream_genlisp.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target videostream_genlisp" +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_genlisp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 1 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_genlisp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/rule + +# Convenience name for target. +videostream_genlisp: videostream/CMakeFiles/videostream_genlisp.dir/rule +.PHONY : videostream_genlisp + +# clean rule for target. +videostream/CMakeFiles/videostream_genlisp.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_genlisp.dir/build.make videostream/CMakeFiles/videostream_genlisp.dir/clean +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_genlisp.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target videostream/CMakeFiles/videostream_genpy.dir + +# All Build rule for target. +videostream/CMakeFiles/videostream_genpy.dir/all: videostream/CMakeFiles/videostream_generate_messages_py.dir/all + $(MAKE) -f videostream/CMakeFiles/videostream_genpy.dir/build.make videostream/CMakeFiles/videostream_genpy.dir/depend + $(MAKE) -f videostream/CMakeFiles/videostream_genpy.dir/build.make videostream/CMakeFiles/videostream_genpy.dir/build + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles + @echo "Built target videostream_genpy" +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/all + +# Build rule for subdir invocation for target. +videostream/CMakeFiles/videostream_genpy.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_genpy.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/rule + +# Convenience name for target. +videostream_genpy: videostream/CMakeFiles/videostream_genpy.dir/rule +.PHONY : videostream_genpy + +# clean rule for target. +videostream/CMakeFiles/videostream_genpy.dir/clean: + $(MAKE) -f videostream/CMakeFiles/videostream_genpy.dir/build.make videostream/CMakeFiles/videostream_genpy.dir/clean +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/clean + +# clean rule for target. +clean: videostream/CMakeFiles/videostream_genpy.dir/clean +.PHONY : clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/CMakeFiles/TargetDirectories.txt b/Legacy/ws_linux/build/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..c6c6c64 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,72 @@ +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/RosAria.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/CMakeFiles/clean_test_results.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/cloud_reader.dir +/home/lab1_5/ws/ws_linux/build/CMakeFiles/doxygen.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest.dir +/home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest_main.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/CMakeFiles/run_tests.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir +/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_genpy.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/CMakeFiles/tests.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir +/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir diff --git a/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/DependInfo.cmake b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/build.make b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/build.make new file mode 100644 index 0000000..fdb0aa8 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/build.make @@ -0,0 +1,63 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for clean_test_results. + +# Include the progress variables for this target. +include CMakeFiles/clean_test_results.dir/progress.make + +CMakeFiles/clean_test_results: + /usr/bin/cmake -E remove_directory /home/lab1_5/ws/ws_linux/build/test_results + +clean_test_results: CMakeFiles/clean_test_results +clean_test_results: CMakeFiles/clean_test_results.dir/build.make +.PHONY : clean_test_results + +# Rule to build all files generated by this target. +CMakeFiles/clean_test_results.dir/build: clean_test_results +.PHONY : CMakeFiles/clean_test_results.dir/build + +CMakeFiles/clean_test_results.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/clean_test_results.dir/cmake_clean.cmake +.PHONY : CMakeFiles/clean_test_results.dir/clean + +CMakeFiles/clean_test_results.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/CMakeFiles/clean_test_results.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/clean_test_results.dir/depend + diff --git a/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/cmake_clean.cmake b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/cmake_clean.cmake new file mode 100644 index 0000000..46c1cb3 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/clean_test_results" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/clean_test_results.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/progress.make b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/clean_test_results.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/CMakeFiles/cmake.check_cache b/Legacy/ws_linux/build/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/DependInfo.cmake b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/build.make b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/build.make new file mode 100644 index 0000000..c2cb178 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/build.make @@ -0,0 +1,64 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for doxygen. + +# Include the progress variables for this target. +include CMakeFiles/doxygen.dir/progress.make + +CMakeFiles/doxygen: + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "doxygen found" + +doxygen: CMakeFiles/doxygen +doxygen: CMakeFiles/doxygen.dir/build.make +.PHONY : doxygen + +# Rule to build all files generated by this target. +CMakeFiles/doxygen.dir/build: doxygen +.PHONY : CMakeFiles/doxygen.dir/build + +CMakeFiles/doxygen.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/doxygen.dir/cmake_clean.cmake +.PHONY : CMakeFiles/doxygen.dir/clean + +CMakeFiles/doxygen.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/CMakeFiles/doxygen.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/doxygen.dir/depend + diff --git a/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/cmake_clean.cmake b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/cmake_clean.cmake new file mode 100644 index 0000000..3cf72d9 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/doxygen" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/doxygen.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/progress.make b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/progress.make new file mode 100644 index 0000000..822db75 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/doxygen.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 3 + diff --git a/Legacy/ws_linux/build/CMakeFiles/progress.marks b/Legacy/ws_linux/build/CMakeFiles/progress.marks new file mode 100644 index 0000000..d6b2404 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/progress.marks @@ -0,0 +1 @@ +19 diff --git a/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/DependInfo.cmake b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/build.make b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/build.make new file mode 100644 index 0000000..c3efa54 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for run_tests. + +# Include the progress variables for this target. +include CMakeFiles/run_tests.dir/progress.make + +CMakeFiles/run_tests: + +run_tests: CMakeFiles/run_tests +run_tests: CMakeFiles/run_tests.dir/build.make +.PHONY : run_tests + +# Rule to build all files generated by this target. +CMakeFiles/run_tests.dir/build: run_tests +.PHONY : CMakeFiles/run_tests.dir/build + +CMakeFiles/run_tests.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/run_tests.dir/cmake_clean.cmake +.PHONY : CMakeFiles/run_tests.dir/clean + +CMakeFiles/run_tests.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/CMakeFiles/run_tests.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/run_tests.dir/depend + diff --git a/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/cmake_clean.cmake b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/cmake_clean.cmake new file mode 100644 index 0000000..45a3e05 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/run_tests" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/run_tests.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/progress.make b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/run_tests.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/CMakeFiles/tests.dir/DependInfo.cmake b/Legacy/ws_linux/build/CMakeFiles/tests.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/tests.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/CMakeFiles/tests.dir/build.make b/Legacy/ws_linux/build/CMakeFiles/tests.dir/build.make new file mode 100644 index 0000000..569579d --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/tests.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tests. + +# Include the progress variables for this target. +include CMakeFiles/tests.dir/progress.make + +CMakeFiles/tests: + +tests: CMakeFiles/tests +tests: CMakeFiles/tests.dir/build.make +.PHONY : tests + +# Rule to build all files generated by this target. +CMakeFiles/tests.dir/build: tests +.PHONY : CMakeFiles/tests.dir/build + +CMakeFiles/tests.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/tests.dir/cmake_clean.cmake +.PHONY : CMakeFiles/tests.dir/clean + +CMakeFiles/tests.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/CMakeFiles/tests.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/tests.dir/depend + diff --git a/Legacy/ws_linux/build/CMakeFiles/tests.dir/cmake_clean.cmake b/Legacy/ws_linux/build/CMakeFiles/tests.dir/cmake_clean.cmake new file mode 100644 index 0000000..a0424cf --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/tests.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tests" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tests.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/CMakeFiles/tests.dir/progress.make b/Legacy/ws_linux/build/CMakeFiles/tests.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/CMakeFiles/tests.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/CTestTestfile.cmake b/Legacy/ws_linux/build/CTestTestfile.cmake new file mode 100644 index 0000000..3d8731e --- /dev/null +++ b/Legacy/ws_linux/build/CTestTestfile.cmake @@ -0,0 +1,11 @@ +# CMake generated Testfile for +# Source directory: /home/lab1_5/ws/ws_linux/src +# Build directory: /home/lab1_5/ws/ws_linux/build +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. +SUBDIRS(gtest) +SUBDIRS(rosaria_msgs) +SUBDIRS(rosaria) +SUBDIRS(safety) +SUBDIRS(videostream) diff --git a/Legacy/ws_linux/build/Makefile b/Legacy/ws_linux/build/Makefile new file mode 100644 index 0000000..beba074 --- /dev/null +++ b/Legacy/ws_linux/build/Makefile @@ -0,0 +1,1183 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles /home/lab1_5/ws/ws_linux/build/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named clean_test_results + +# Build rule for target. +clean_test_results: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 clean_test_results +.PHONY : clean_test_results + +# fast build rule for target. +clean_test_results/fast: + $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/build +.PHONY : clean_test_results/fast + +#============================================================================= +# Target rules for targets named doxygen + +# Build rule for target. +doxygen: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 doxygen +.PHONY : doxygen + +# fast build rule for target. +doxygen/fast: + $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/build +.PHONY : doxygen/fast + +#============================================================================= +# Target rules for targets named run_tests + +# Build rule for target. +run_tests: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 run_tests +.PHONY : run_tests + +# fast build rule for target. +run_tests/fast: + $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/build +.PHONY : run_tests/fast + +#============================================================================= +# Target rules for targets named tests + +# Build rule for target. +tests: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tests +.PHONY : tests + +# fast build rule for target. +tests/fast: + $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/build +.PHONY : tests/fast + +#============================================================================= +# Target rules for targets named gtest + +# Build rule for target. +gtest: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gtest +.PHONY : gtest + +# fast build rule for target. +gtest/fast: + $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/build +.PHONY : gtest/fast + +#============================================================================= +# Target rules for targets named gtest_main + +# Build rule for target. +gtest_main: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gtest_main +.PHONY : gtest_main + +# fast build rule for target. +gtest_main/fast: + $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/build +.PHONY : gtest_main/fast + +#============================================================================= +# Target rules for targets named geometry_msgs_generate_messages_cpp + +# Build rule for target. +geometry_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 geometry_msgs_generate_messages_cpp +.PHONY : geometry_msgs_generate_messages_cpp + +# fast build rule for target. +geometry_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build +.PHONY : geometry_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named geometry_msgs_generate_messages_lisp + +# Build rule for target. +geometry_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 geometry_msgs_generate_messages_lisp +.PHONY : geometry_msgs_generate_messages_lisp + +# fast build rule for target. +geometry_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build +.PHONY : geometry_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named geometry_msgs_generate_messages_py + +# Build rule for target. +geometry_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 geometry_msgs_generate_messages_py +.PHONY : geometry_msgs_generate_messages_py + +# fast build rule for target. +geometry_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build +.PHONY : geometry_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_gencpp + +# Build rule for target. +rosaria_msgs_gencpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_gencpp +.PHONY : rosaria_msgs_gencpp + +# fast build rule for target. +rosaria_msgs_gencpp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build +.PHONY : rosaria_msgs_gencpp/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_generate_messages + +# Build rule for target. +rosaria_msgs_generate_messages: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_generate_messages +.PHONY : rosaria_msgs_generate_messages + +# fast build rule for target. +rosaria_msgs_generate_messages/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build +.PHONY : rosaria_msgs_generate_messages/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_generate_messages_cpp + +# Build rule for target. +rosaria_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_generate_messages_cpp +.PHONY : rosaria_msgs_generate_messages_cpp + +# fast build rule for target. +rosaria_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build +.PHONY : rosaria_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_generate_messages_lisp + +# Build rule for target. +rosaria_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_generate_messages_lisp +.PHONY : rosaria_msgs_generate_messages_lisp + +# fast build rule for target. +rosaria_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build +.PHONY : rosaria_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_generate_messages_py + +# Build rule for target. +rosaria_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_generate_messages_py +.PHONY : rosaria_msgs_generate_messages_py + +# fast build rule for target. +rosaria_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build +.PHONY : rosaria_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_genlisp + +# Build rule for target. +rosaria_msgs_genlisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_genlisp +.PHONY : rosaria_msgs_genlisp + +# fast build rule for target. +rosaria_msgs_genlisp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build +.PHONY : rosaria_msgs_genlisp/fast + +#============================================================================= +# Target rules for targets named rosaria_msgs_genpy + +# Build rule for target. +rosaria_msgs_genpy: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs_genpy +.PHONY : rosaria_msgs_genpy + +# fast build rule for target. +rosaria_msgs_genpy/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build +.PHONY : rosaria_msgs_genpy/fast + +#============================================================================= +# Target rules for targets named std_msgs_generate_messages_cpp + +# Build rule for target. +std_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_cpp +.PHONY : std_msgs_generate_messages_cpp + +# fast build rule for target. +std_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build +.PHONY : std_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named std_msgs_generate_messages_lisp + +# Build rule for target. +std_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_lisp +.PHONY : std_msgs_generate_messages_lisp + +# fast build rule for target. +std_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build +.PHONY : std_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named std_msgs_generate_messages_py + +# Build rule for target. +std_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_py +.PHONY : std_msgs_generate_messages_py + +# fast build rule for target. +std_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build +.PHONY : std_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named RosAria + +# Build rule for target. +RosAria: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 RosAria +.PHONY : RosAria + +# fast build rule for target. +RosAria/fast: + $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/build +.PHONY : RosAria/fast + +#============================================================================= +# Target rules for targets named actionlib_generate_messages_cpp + +# Build rule for target. +actionlib_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 actionlib_generate_messages_cpp +.PHONY : actionlib_generate_messages_cpp + +# fast build rule for target. +actionlib_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build +.PHONY : actionlib_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named actionlib_generate_messages_lisp + +# Build rule for target. +actionlib_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 actionlib_generate_messages_lisp +.PHONY : actionlib_generate_messages_lisp + +# fast build rule for target. +actionlib_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build +.PHONY : actionlib_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named actionlib_generate_messages_py + +# Build rule for target. +actionlib_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 actionlib_generate_messages_py +.PHONY : actionlib_generate_messages_py + +# fast build rule for target. +actionlib_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build +.PHONY : actionlib_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named actionlib_msgs_generate_messages_cpp + +# Build rule for target. +actionlib_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 actionlib_msgs_generate_messages_cpp +.PHONY : actionlib_msgs_generate_messages_cpp + +# fast build rule for target. +actionlib_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build +.PHONY : actionlib_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named actionlib_msgs_generate_messages_lisp + +# Build rule for target. +actionlib_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 actionlib_msgs_generate_messages_lisp +.PHONY : actionlib_msgs_generate_messages_lisp + +# fast build rule for target. +actionlib_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build +.PHONY : actionlib_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named actionlib_msgs_generate_messages_py + +# Build rule for target. +actionlib_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 actionlib_msgs_generate_messages_py +.PHONY : actionlib_msgs_generate_messages_py + +# fast build rule for target. +actionlib_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build +.PHONY : actionlib_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named dynamic_reconfigure_gencfg + +# Build rule for target. +dynamic_reconfigure_gencfg: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 dynamic_reconfigure_gencfg +.PHONY : dynamic_reconfigure_gencfg + +# fast build rule for target. +dynamic_reconfigure_gencfg/fast: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build +.PHONY : dynamic_reconfigure_gencfg/fast + +#============================================================================= +# Target rules for targets named dynamic_reconfigure_generate_messages_cpp + +# Build rule for target. +dynamic_reconfigure_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 dynamic_reconfigure_generate_messages_cpp +.PHONY : dynamic_reconfigure_generate_messages_cpp + +# fast build rule for target. +dynamic_reconfigure_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build +.PHONY : dynamic_reconfigure_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named dynamic_reconfigure_generate_messages_lisp + +# Build rule for target. +dynamic_reconfigure_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 dynamic_reconfigure_generate_messages_lisp +.PHONY : dynamic_reconfigure_generate_messages_lisp + +# fast build rule for target. +dynamic_reconfigure_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build +.PHONY : dynamic_reconfigure_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named dynamic_reconfigure_generate_messages_py + +# Build rule for target. +dynamic_reconfigure_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 dynamic_reconfigure_generate_messages_py +.PHONY : dynamic_reconfigure_generate_messages_py + +# fast build rule for target. +dynamic_reconfigure_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build +.PHONY : dynamic_reconfigure_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named nav_msgs_generate_messages_cpp + +# Build rule for target. +nav_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 nav_msgs_generate_messages_cpp +.PHONY : nav_msgs_generate_messages_cpp + +# fast build rule for target. +nav_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build +.PHONY : nav_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named nav_msgs_generate_messages_lisp + +# Build rule for target. +nav_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 nav_msgs_generate_messages_lisp +.PHONY : nav_msgs_generate_messages_lisp + +# fast build rule for target. +nav_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build +.PHONY : nav_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named nav_msgs_generate_messages_py + +# Build rule for target. +nav_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 nav_msgs_generate_messages_py +.PHONY : nav_msgs_generate_messages_py + +# fast build rule for target. +nav_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build +.PHONY : nav_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named rosaria_gencfg + +# Build rule for target. +rosaria_gencfg: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_gencfg +.PHONY : rosaria_gencfg + +# fast build rule for target. +rosaria_gencfg/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencfg.dir/build.make rosaria/CMakeFiles/rosaria_gencfg.dir/build +.PHONY : rosaria_gencfg/fast + +#============================================================================= +# Target rules for targets named rosaria_gencpp + +# Build rule for target. +rosaria_gencpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_gencpp +.PHONY : rosaria_gencpp + +# fast build rule for target. +rosaria_gencpp/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_gencpp.dir/build.make rosaria/CMakeFiles/rosaria_gencpp.dir/build +.PHONY : rosaria_gencpp/fast + +#============================================================================= +# Target rules for targets named rosaria_generate_messages + +# Build rule for target. +rosaria_generate_messages: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_generate_messages +.PHONY : rosaria_generate_messages + +# fast build rule for target. +rosaria_generate_messages/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages.dir/build +.PHONY : rosaria_generate_messages/fast + +#============================================================================= +# Target rules for targets named rosaria_generate_messages_cpp + +# Build rule for target. +rosaria_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_generate_messages_cpp +.PHONY : rosaria_generate_messages_cpp + +# fast build rule for target. +rosaria_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build +.PHONY : rosaria_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named rosaria_generate_messages_lisp + +# Build rule for target. +rosaria_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_generate_messages_lisp +.PHONY : rosaria_generate_messages_lisp + +# fast build rule for target. +rosaria_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build +.PHONY : rosaria_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named rosaria_generate_messages_py + +# Build rule for target. +rosaria_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_generate_messages_py +.PHONY : rosaria_generate_messages_py + +# fast build rule for target. +rosaria_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build +.PHONY : rosaria_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named rosaria_genlisp + +# Build rule for target. +rosaria_genlisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_genlisp +.PHONY : rosaria_genlisp + +# fast build rule for target. +rosaria_genlisp/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_genlisp.dir/build.make rosaria/CMakeFiles/rosaria_genlisp.dir/build +.PHONY : rosaria_genlisp/fast + +#============================================================================= +# Target rules for targets named rosaria_genpy + +# Build rule for target. +rosaria_genpy: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosaria_genpy +.PHONY : rosaria_genpy + +# fast build rule for target. +rosaria_genpy/fast: + $(MAKE) -f rosaria/CMakeFiles/rosaria_genpy.dir/build.make rosaria/CMakeFiles/rosaria_genpy.dir/build +.PHONY : rosaria_genpy/fast + +#============================================================================= +# Target rules for targets named roscpp_generate_messages_cpp + +# Build rule for target. +roscpp_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_cpp +.PHONY : roscpp_generate_messages_cpp + +# fast build rule for target. +roscpp_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build +.PHONY : roscpp_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named roscpp_generate_messages_lisp + +# Build rule for target. +roscpp_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_lisp +.PHONY : roscpp_generate_messages_lisp + +# fast build rule for target. +roscpp_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build +.PHONY : roscpp_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named roscpp_generate_messages_py + +# Build rule for target. +roscpp_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_py +.PHONY : roscpp_generate_messages_py + +# fast build rule for target. +roscpp_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build +.PHONY : roscpp_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named rosgraph_msgs_generate_messages_cpp + +# Build rule for target. +rosgraph_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_cpp +.PHONY : rosgraph_msgs_generate_messages_cpp + +# fast build rule for target. +rosgraph_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build +.PHONY : rosgraph_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named rosgraph_msgs_generate_messages_lisp + +# Build rule for target. +rosgraph_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_lisp +.PHONY : rosgraph_msgs_generate_messages_lisp + +# fast build rule for target. +rosgraph_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build +.PHONY : rosgraph_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named rosgraph_msgs_generate_messages_py + +# Build rule for target. +rosgraph_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_py +.PHONY : rosgraph_msgs_generate_messages_py + +# fast build rule for target. +rosgraph_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build +.PHONY : rosgraph_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named sensor_msgs_generate_messages_cpp + +# Build rule for target. +sensor_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 sensor_msgs_generate_messages_cpp +.PHONY : sensor_msgs_generate_messages_cpp + +# fast build rule for target. +sensor_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build +.PHONY : sensor_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named sensor_msgs_generate_messages_lisp + +# Build rule for target. +sensor_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 sensor_msgs_generate_messages_lisp +.PHONY : sensor_msgs_generate_messages_lisp + +# fast build rule for target. +sensor_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build +.PHONY : sensor_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named sensor_msgs_generate_messages_py + +# Build rule for target. +sensor_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 sensor_msgs_generate_messages_py +.PHONY : sensor_msgs_generate_messages_py + +# fast build rule for target. +sensor_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build +.PHONY : sensor_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named tf2_msgs_generate_messages_cpp + +# Build rule for target. +tf2_msgs_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tf2_msgs_generate_messages_cpp +.PHONY : tf2_msgs_generate_messages_cpp + +# fast build rule for target. +tf2_msgs_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build +.PHONY : tf2_msgs_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named tf2_msgs_generate_messages_lisp + +# Build rule for target. +tf2_msgs_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tf2_msgs_generate_messages_lisp +.PHONY : tf2_msgs_generate_messages_lisp + +# fast build rule for target. +tf2_msgs_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build +.PHONY : tf2_msgs_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named tf2_msgs_generate_messages_py + +# Build rule for target. +tf2_msgs_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tf2_msgs_generate_messages_py +.PHONY : tf2_msgs_generate_messages_py + +# fast build rule for target. +tf2_msgs_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build +.PHONY : tf2_msgs_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named tf_generate_messages_cpp + +# Build rule for target. +tf_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tf_generate_messages_cpp +.PHONY : tf_generate_messages_cpp + +# fast build rule for target. +tf_generate_messages_cpp/fast: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build +.PHONY : tf_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named tf_generate_messages_lisp + +# Build rule for target. +tf_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tf_generate_messages_lisp +.PHONY : tf_generate_messages_lisp + +# fast build rule for target. +tf_generate_messages_lisp/fast: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build +.PHONY : tf_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named tf_generate_messages_py + +# Build rule for target. +tf_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 tf_generate_messages_py +.PHONY : tf_generate_messages_py + +# fast build rule for target. +tf_generate_messages_py/fast: + $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf_generate_messages_py.dir/build +.PHONY : tf_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named cloud_reader + +# Build rule for target. +cloud_reader: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 cloud_reader +.PHONY : cloud_reader + +# fast build rule for target. +cloud_reader/fast: + $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/build +.PHONY : cloud_reader/fast + +#============================================================================= +# Target rules for targets named safety_gencpp + +# Build rule for target. +safety_gencpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_gencpp +.PHONY : safety_gencpp + +# fast build rule for target. +safety_gencpp/fast: + $(MAKE) -f safety/CMakeFiles/safety_gencpp.dir/build.make safety/CMakeFiles/safety_gencpp.dir/build +.PHONY : safety_gencpp/fast + +#============================================================================= +# Target rules for targets named safety_generate_messages + +# Build rule for target. +safety_generate_messages: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_generate_messages +.PHONY : safety_generate_messages + +# fast build rule for target. +safety_generate_messages/fast: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages.dir/build.make safety/CMakeFiles/safety_generate_messages.dir/build +.PHONY : safety_generate_messages/fast + +#============================================================================= +# Target rules for targets named safety_generate_messages_cpp + +# Build rule for target. +safety_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_generate_messages_cpp +.PHONY : safety_generate_messages_cpp + +# fast build rule for target. +safety_generate_messages_cpp/fast: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make safety/CMakeFiles/safety_generate_messages_cpp.dir/build +.PHONY : safety_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named safety_generate_messages_lisp + +# Build rule for target. +safety_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_generate_messages_lisp +.PHONY : safety_generate_messages_lisp + +# fast build rule for target. +safety_generate_messages_lisp/fast: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make safety/CMakeFiles/safety_generate_messages_lisp.dir/build +.PHONY : safety_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named safety_generate_messages_py + +# Build rule for target. +safety_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_generate_messages_py +.PHONY : safety_generate_messages_py + +# fast build rule for target. +safety_generate_messages_py/fast: + $(MAKE) -f safety/CMakeFiles/safety_generate_messages_py.dir/build.make safety/CMakeFiles/safety_generate_messages_py.dir/build +.PHONY : safety_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named safety_genlisp + +# Build rule for target. +safety_genlisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_genlisp +.PHONY : safety_genlisp + +# fast build rule for target. +safety_genlisp/fast: + $(MAKE) -f safety/CMakeFiles/safety_genlisp.dir/build.make safety/CMakeFiles/safety_genlisp.dir/build +.PHONY : safety_genlisp/fast + +#============================================================================= +# Target rules for targets named safety_genpy + +# Build rule for target. +safety_genpy: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 safety_genpy +.PHONY : safety_genpy + +# fast build rule for target. +safety_genpy/fast: + $(MAKE) -f safety/CMakeFiles/safety_genpy.dir/build.make safety/CMakeFiles/safety_genpy.dir/build +.PHONY : safety_genpy/fast + +#============================================================================= +# Target rules for targets named videostream + +# Build rule for target. +videostream: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream +.PHONY : videostream + +# fast build rule for target. +videostream/fast: + $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/build +.PHONY : videostream/fast + +#============================================================================= +# Target rules for targets named videostream_gencpp + +# Build rule for target. +videostream_gencpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_gencpp +.PHONY : videostream_gencpp + +# fast build rule for target. +videostream_gencpp/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_gencpp.dir/build.make videostream/CMakeFiles/videostream_gencpp.dir/build +.PHONY : videostream_gencpp/fast + +#============================================================================= +# Target rules for targets named videostream_generate_messages + +# Build rule for target. +videostream_generate_messages: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_generate_messages +.PHONY : videostream_generate_messages + +# fast build rule for target. +videostream_generate_messages/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages.dir/build.make videostream/CMakeFiles/videostream_generate_messages.dir/build +.PHONY : videostream_generate_messages/fast + +#============================================================================= +# Target rules for targets named videostream_generate_messages_cpp + +# Build rule for target. +videostream_generate_messages_cpp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_generate_messages_cpp +.PHONY : videostream_generate_messages_cpp + +# fast build rule for target. +videostream_generate_messages_cpp/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build +.PHONY : videostream_generate_messages_cpp/fast + +#============================================================================= +# Target rules for targets named videostream_generate_messages_lisp + +# Build rule for target. +videostream_generate_messages_lisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_generate_messages_lisp +.PHONY : videostream_generate_messages_lisp + +# fast build rule for target. +videostream_generate_messages_lisp/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build +.PHONY : videostream_generate_messages_lisp/fast + +#============================================================================= +# Target rules for targets named videostream_generate_messages_py + +# Build rule for target. +videostream_generate_messages_py: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_generate_messages_py +.PHONY : videostream_generate_messages_py + +# fast build rule for target. +videostream_generate_messages_py/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make videostream/CMakeFiles/videostream_generate_messages_py.dir/build +.PHONY : videostream_generate_messages_py/fast + +#============================================================================= +# Target rules for targets named videostream_genlisp + +# Build rule for target. +videostream_genlisp: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_genlisp +.PHONY : videostream_genlisp + +# fast build rule for target. +videostream_genlisp/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_genlisp.dir/build.make videostream/CMakeFiles/videostream_genlisp.dir/build +.PHONY : videostream_genlisp/fast + +#============================================================================= +# Target rules for targets named videostream_genpy + +# Build rule for target. +videostream_genpy: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 videostream_genpy +.PHONY : videostream_genpy + +# fast build rule for target. +videostream_genpy/fast: + $(MAKE) -f videostream/CMakeFiles/videostream_genpy.dir/build.make videostream/CMakeFiles/videostream_genpy.dir/build +.PHONY : videostream_genpy/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... clean_test_results" + @echo "... doxygen" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... run_tests" + @echo "... test" + @echo "... tests" + @echo "... gtest" + @echo "... gtest_main" + @echo "... geometry_msgs_generate_messages_cpp" + @echo "... geometry_msgs_generate_messages_lisp" + @echo "... geometry_msgs_generate_messages_py" + @echo "... rosaria_msgs_gencpp" + @echo "... rosaria_msgs_generate_messages" + @echo "... rosaria_msgs_generate_messages_cpp" + @echo "... rosaria_msgs_generate_messages_lisp" + @echo "... rosaria_msgs_generate_messages_py" + @echo "... rosaria_msgs_genlisp" + @echo "... rosaria_msgs_genpy" + @echo "... std_msgs_generate_messages_cpp" + @echo "... std_msgs_generate_messages_lisp" + @echo "... std_msgs_generate_messages_py" + @echo "... RosAria" + @echo "... actionlib_generate_messages_cpp" + @echo "... actionlib_generate_messages_lisp" + @echo "... actionlib_generate_messages_py" + @echo "... actionlib_msgs_generate_messages_cpp" + @echo "... actionlib_msgs_generate_messages_lisp" + @echo "... actionlib_msgs_generate_messages_py" + @echo "... dynamic_reconfigure_gencfg" + @echo "... dynamic_reconfigure_generate_messages_cpp" + @echo "... dynamic_reconfigure_generate_messages_lisp" + @echo "... dynamic_reconfigure_generate_messages_py" + @echo "... nav_msgs_generate_messages_cpp" + @echo "... nav_msgs_generate_messages_lisp" + @echo "... nav_msgs_generate_messages_py" + @echo "... rosaria_gencfg" + @echo "... rosaria_gencpp" + @echo "... rosaria_generate_messages" + @echo "... rosaria_generate_messages_cpp" + @echo "... rosaria_generate_messages_lisp" + @echo "... rosaria_generate_messages_py" + @echo "... rosaria_genlisp" + @echo "... rosaria_genpy" + @echo "... roscpp_generate_messages_cpp" + @echo "... roscpp_generate_messages_lisp" + @echo "... roscpp_generate_messages_py" + @echo "... rosgraph_msgs_generate_messages_cpp" + @echo "... rosgraph_msgs_generate_messages_lisp" + @echo "... rosgraph_msgs_generate_messages_py" + @echo "... sensor_msgs_generate_messages_cpp" + @echo "... sensor_msgs_generate_messages_lisp" + @echo "... sensor_msgs_generate_messages_py" + @echo "... tf2_msgs_generate_messages_cpp" + @echo "... tf2_msgs_generate_messages_lisp" + @echo "... tf2_msgs_generate_messages_py" + @echo "... tf_generate_messages_cpp" + @echo "... tf_generate_messages_lisp" + @echo "... tf_generate_messages_py" + @echo "... cloud_reader" + @echo "... safety_gencpp" + @echo "... safety_generate_messages" + @echo "... safety_generate_messages_cpp" + @echo "... safety_generate_messages_lisp" + @echo "... safety_generate_messages_py" + @echo "... safety_genlisp" + @echo "... safety_genpy" + @echo "... videostream" + @echo "... videostream_gencpp" + @echo "... videostream_generate_messages" + @echo "... videostream_generate_messages_cpp" + @echo "... videostream_generate_messages_lisp" + @echo "... videostream_generate_messages_py" + @echo "... videostream_genlisp" + @echo "... videostream_genpy" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/catkin/catkin_generated/version/package.cmake b/Legacy/ws_linux/build/catkin/catkin_generated/version/package.cmake new file mode 100644 index 0000000..a456474 --- /dev/null +++ b/Legacy/ws_linux/build/catkin/catkin_generated/version/package.cmake @@ -0,0 +1,9 @@ +set(_CATKIN_CURRENT_PACKAGE "catkin") +set(catkin_VERSION "0.5.89") +set(catkin_BUILD_DEPENDS_python-catkin-pkg_VERSION_GTE "0.2.2") +set(catkin_BUILD_DEPENDS "gtest" "python-argparse" "python-catkin-pkg" "python-empy" "python-nose") +set(catkin_DEPRECATED "") +set(catkin_RUN_DEPENDS "cmake" "gtest" "python-argparse" "python-catkin-pkg" "python-empy" "python-nose") +set(catkin_MAINTAINER "Dirk Thomas ") +set(catkin_BUILDTOOL_DEPENDS "cmake") +set(catkin_RUN_DEPENDS_python-catkin-pkg_VERSION_GTE "0.2.0") \ No newline at end of file diff --git a/Legacy/ws_linux/build/catkin_generated/env_cached.sh b/Legacy/ws_linux/build/catkin_generated/env_cached.sh new file mode 100755 index 0000000..d6be91d --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/env_cached.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +# generated from catkin/cmake/templates/env.sh.in + +if [ $# -eq 0 ] ; then + /bin/echo "Usage: env.sh COMMANDS" + /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." + exit 1 +fi + +# ensure to not use different shell type which was set before +CATKIN_SHELL=sh + +# source setup_cached.sh from same directory as this file +_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) +. "$_CATKIN_SETUP_DIR/setup_cached.sh" +exec "$@" diff --git a/Legacy/ws_linux/build/catkin_generated/generate_cached_setup.py b/Legacy/ws_linux/build/catkin_generated/generate_cached_setup.py new file mode 100644 index 0000000..88a1cf4 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/generate_cached_setup.py @@ -0,0 +1,29 @@ +from __future__ import print_function +import argparse +import os +import stat +import sys + +# find the import for catkin's python package - either from source space or from an installed underlay +if os.path.exists(os.path.join('/opt/ros/hydro/share/catkin/cmake', 'catkinConfig.cmake.in')): + sys.path.insert(0, os.path.join('/opt/ros/hydro/share/catkin/cmake', '..', 'python')) +try: + from catkin.environment_cache import generate_environment_script +except ImportError: + # search for catkin package in all workspaces and prepend to path + for workspace in "/home/lab1_5/ws/ws_linux/devel;/home/lab1_5/ws/ws_xeno/devel;/home/lab1_5/ws/ws_isolated/install_isolated;/opt/ros/hydro".split(';'): + python_path = os.path.join(workspace, 'lib/python2.7/dist-packages') + if os.path.isdir(os.path.join(python_path, 'catkin')): + sys.path.insert(0, python_path) + break + from catkin.environment_cache import generate_environment_script + +code = generate_environment_script('/home/lab1_5/ws/ws_linux/devel/env.sh') + +output_filename = '/home/lab1_5/ws/ws_linux/build/catkin_generated/setup_cached.sh' +with open(output_filename, 'w') as f: + #print('Generate script for cached setup "%s"' % output_filename) + f.write('\n'.join(code)) + +mode = os.stat(output_filename).st_mode +os.chmod(output_filename, mode | stat.S_IXUSR) diff --git a/Legacy/ws_linux/build/catkin_generated/installspace/.rosinstall b/Legacy/ws_linux/build/catkin_generated/installspace/.rosinstall new file mode 100644 index 0000000..515131f --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/installspace/.rosinstall @@ -0,0 +1,2 @@ +- setup-file: + local-name: /home/lab1_5/ws/ws_linux/install/setup.sh diff --git a/Legacy/ws_linux/build/catkin_generated/installspace/_setup_util.py b/Legacy/ws_linux/build/catkin_generated/installspace/_setup_util.py new file mode 100755 index 0000000..1ba3413 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/installspace/_setup_util.py @@ -0,0 +1,280 @@ +#!/usr/bin/env python + +# Software License Agreement (BSD License) +# +# Copyright (c) 2012, Willow Garage, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of Willow Garage, Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +'''This file generates shell code for the setup.SHELL scripts to set environment variables''' + +from __future__ import print_function +import argparse +import copy +import errno +import os +import platform +import sys + +CATKIN_MARKER_FILE = '.catkin' + +system = platform.system() +IS_DARWIN = (system == 'Darwin') +IS_WINDOWS = (system == 'Windows') + +# subfolder of workspace prepended to CMAKE_PREFIX_PATH +ENV_VAR_SUBFOLDERS = { + 'CMAKE_PREFIX_PATH': '', + 'CPATH': 'include', + 'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': 'lib', + 'PATH': 'bin', + 'PKG_CONFIG_PATH': 'lib/pkgconfig', + 'PYTHONPATH': 'lib/python2.7/dist-packages', +} + + +def rollback_env_variables(environ, env_var_subfolders): + ''' + Generate shell code to reset environment variables + by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH. + This does not cover modifications performed by environment hooks. + ''' + lines = [] + unmodified_environ = copy.copy(environ) + for key in sorted(env_var_subfolders.keys()): + subfolder = env_var_subfolders[key] + value = _rollback_env_variable(unmodified_environ, key, subfolder) + if value is not None: + environ[key] = value + lines.append(assignment(key, value)) + if lines: + lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH')) + return lines + + +def _rollback_env_variable(environ, name, subfolder): + ''' + For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. + + :param subfolder: str '' or subfoldername that may start with '/' + :returns: the updated value of the environment variable. + ''' + value = environ[name] if name in environ else '' + env_paths = [path for path in value.split(os.pathsep) if path] + value_modified = False + if subfolder: + if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)): + subfolder = subfolder[1:] + if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)): + subfolder = subfolder[:-1] + for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True): + path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path + path_to_remove = None + for env_path in env_paths: + env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path + if env_path_clean == path_to_find: + path_to_remove = env_path + break + if path_to_remove: + env_paths.remove(path_to_remove) + value_modified = True + new_value = os.pathsep.join(env_paths) + return new_value if value_modified else None + + +def _get_workspaces(environ, include_fuerte=False, include_non_existing=False): + ''' + Based on CMAKE_PREFIX_PATH return all catkin workspaces. + + :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool`` + ''' + # get all cmake prefix paths + env_name = 'CMAKE_PREFIX_PATH' + value = environ[env_name] if env_name in environ else '' + paths = [path for path in value.split(os.pathsep) if path] + # remove non-workspace paths + workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))] + return workspaces + + +def prepend_env_variables(environ, env_var_subfolders, workspaces): + ''' + Generate shell code to prepend environment variables + for the all workspaces. + ''' + lines = [] + lines.append(comment('prepend folders of workspaces to environment variables')) + + paths = [path for path in workspaces.split(os.pathsep) if path] + + prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '') + lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix)) + + for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']): + subfolder = env_var_subfolders[key] + prefix = _prefix_env_variable(environ, key, paths, subfolder) + lines.append(prepend(environ, key, prefix)) + return lines + + +def _prefix_env_variable(environ, name, paths, subfolder): + ''' + Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items. + ''' + value = environ[name] if name in environ else '' + environ_paths = [path for path in value.split(os.pathsep) if path] + checked_paths = [] + for path in paths: + if subfolder: + path = os.path.join(path, subfolder) + # exclude any path already in env and any path we already added + if path not in environ_paths and path not in checked_paths: + checked_paths.append(path) + prefix_str = os.pathsep.join(checked_paths) + if prefix_str != '' and environ_paths: + prefix_str += os.pathsep + return prefix_str + + +def assignment(key, value): + if not IS_WINDOWS: + return 'export %s="%s"' % (key, value) + else: + return 'set %s=%s' % (key, value) + + +def comment(msg): + if not IS_WINDOWS: + return '# %s' % msg + else: + return 'REM %s' % msg + + +def prepend(environ, key, prefix): + if key not in environ or not environ[key]: + return assignment(key, prefix) + if not IS_WINDOWS: + return 'export %s="%s$%s"' % (key, prefix, key) + else: + return 'set %s=%s%%%s%%' % (key, prefix, key) + + +def find_env_hooks(environ, cmake_prefix_path): + ''' + Generate shell code with found environment hooks + for the all workspaces. + ''' + lines = [] + lines.append(comment('found environment hooks in workspaces')) + + generic_env_hooks = [] + generic_env_hooks_workspace = [] + specific_env_hooks = [] + specific_env_hooks_workspace = [] + generic_env_hooks_by_filename = {} + specific_env_hooks_by_filename = {} + generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh' + specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None + # remove non-workspace paths + workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))] + for workspace in reversed(workspaces): + env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d') + if os.path.isdir(env_hook_dir): + for filename in sorted(os.listdir(env_hook_dir)): + if filename.endswith('.%s' % generic_env_hook_ext): + # remove previous env hook with same name if present + if filename in generic_env_hooks_by_filename: + i = generic_env_hooks.index(generic_env_hooks_by_filename[filename]) + generic_env_hooks.pop(i) + generic_env_hooks_workspace.pop(i) + # append env hook + generic_env_hooks.append(os.path.join(env_hook_dir, filename)) + generic_env_hooks_workspace.append(workspace) + generic_env_hooks_by_filename[filename] = generic_env_hooks[-1] + elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext): + # remove previous env hook with same name if present + if filename in specific_env_hooks_by_filename: + i = specific_env_hooks.index(specific_env_hooks_by_filename[filename]) + specific_env_hooks.pop(i) + specific_env_hooks_workspace.pop(i) + # append env hook + specific_env_hooks.append(os.path.join(env_hook_dir, filename)) + specific_env_hooks_workspace.append(workspace) + specific_env_hooks_by_filename[filename] = specific_env_hooks[-1] + env_hooks = generic_env_hooks + specific_env_hooks + env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace + count = len(env_hooks) + lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count)) + for i in range(count): + lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i])) + lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i])) + return lines + + +def _parse_arguments(args=None): + parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.') + parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context') + return parser.parse_known_args(args=args)[0] + + +if __name__ == '__main__': + try: + try: + args = _parse_arguments() + except Exception as e: + print(e, file=sys.stderr) + sys.exit(1) + + # environment at generation time + CMAKE_PREFIX_PATH = '/home/lab1_5/ws/ws_linux/devel;/home/lab1_5/ws/ws_xeno/devel;/home/lab1_5/ws/ws_isolated/install_isolated;/home/lab1_5/ws/install_isolated;/opt/ros/hydro'.split(';') + # prepend current workspace if not already part of CPP + base_path = os.path.dirname(__file__) + if base_path not in CMAKE_PREFIX_PATH: + CMAKE_PREFIX_PATH.insert(0, base_path) + CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH) + + environ = dict(os.environ) + lines = [] + if not args.extend: + lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS) + lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH) + lines += find_env_hooks(environ, CMAKE_PREFIX_PATH) + print('\n'.join(lines)) + + # need to explicitly flush the output + sys.stdout.flush() + except IOError as e: + # and catch potantial "broken pipe" if stdout is not writable + # which can happen when piping the output to a file but the disk is full + if e.errno == errno.EPIPE: + print(e, file=sys.stderr) + sys.exit(2) + raise + + sys.exit(0) diff --git a/Legacy/ws_linux/build/catkin_generated/installspace/env.sh b/Legacy/ws_linux/build/catkin_generated/installspace/env.sh new file mode 100755 index 0000000..8aa9d24 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/installspace/env.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +# generated from catkin/cmake/templates/env.sh.in + +if [ $# -eq 0 ] ; then + /bin/echo "Usage: env.sh COMMANDS" + /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." + exit 1 +fi + +# ensure to not use different shell type which was set before +CATKIN_SHELL=sh + +# source setup.sh from same directory as this file +_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) +. "$_CATKIN_SETUP_DIR/setup.sh" +exec "$@" diff --git a/Legacy/ws_linux/build/catkin_generated/installspace/setup.bash b/Legacy/ws_linux/build/catkin_generated/installspace/setup.bash new file mode 100644 index 0000000..ff47af8 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/installspace/setup.bash @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# generated from catkin/cmake/templates/setup.bash.in + +CATKIN_SHELL=bash + +# source setup.sh from same directory as this file +_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) +. "$_CATKIN_SETUP_DIR/setup.sh" diff --git a/Legacy/ws_linux/build/catkin_generated/installspace/setup.sh b/Legacy/ws_linux/build/catkin_generated/installspace/setup.sh new file mode 100644 index 0000000..081053d --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/installspace/setup.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env sh +# generated from catkin/cmake/template/setup.sh.in + +# Sets various environment variables and sources additional environment hooks. +# It tries it's best to undo changes from a previously sourced setup file before. +# Supported command line options: +# --extend: skips the undoing of changes from a previously sourced setup file + +# since this file is sourced either use the provided _CATKIN_SETUP_DIR +# or fall back to the destination set at configure time +: ${_CATKIN_SETUP_DIR:=/home/lab1_5/ws/ws_linux/install} +_SETUP_UTIL="$_CATKIN_SETUP_DIR/_setup_util.py" +unset _CATKIN_SETUP_DIR + +if [ ! -f "$_SETUP_UTIL" ]; then + echo "Missing Python script: $_SETUP_UTIL" + return 22 +fi + +# detect if running on Darwin platform +_UNAME=`uname -s` +_IS_DARWIN=0 +if [ "$_UNAME" = "Darwin" ]; then + _IS_DARWIN=1 +fi +unset _UNAME + +# make sure to export all environment variables +export CMAKE_PREFIX_PATH +export CPATH +if [ $_IS_DARWIN -eq 0 ]; then + export LD_LIBRARY_PATH +else + export DYLD_LIBRARY_PATH +fi +unset _IS_DARWIN +export PATH +export PKG_CONFIG_PATH +export PYTHONPATH + +# remember type of shell if not already set +if [ -z "$CATKIN_SHELL" ]; then + CATKIN_SHELL=sh +fi + +# invoke Python script to generate necessary exports of environment variables +_SETUP_TMP=`mktemp /tmp/setup.sh.XXXXXXXXXX` +if [ $? -ne 0 -o ! -f "$_SETUP_TMP" ]; then + echo "Could not create temporary file: $_SETUP_TMP" + return 1 +fi +CATKIN_SHELL=$CATKIN_SHELL "$_SETUP_UTIL" $@ > $_SETUP_TMP +_RC=$? +if [ $_RC -ne 0 ]; then + if [ $_RC -eq 2 ]; then + echo "Could not write the output of '$_SETUP_UTIL' to temporary file '$_SETUP_TMP': may be the disk if full?" + else + echo "Failed to run '\"$_SETUP_UTIL\" $@': return code $_RC" + fi + unset _RC + unset _SETUP_UTIL + rm -f $_SETUP_TMP + unset _SETUP_TMP + return 1 +fi +unset _RC +unset _SETUP_UTIL +. $_SETUP_TMP +rm -f $_SETUP_TMP +unset _SETUP_TMP + +# source all environment hooks +_i=0 +while [ $_i -lt $_CATKIN_ENVIRONMENT_HOOKS_COUNT ]; do + eval _envfile=\$_CATKIN_ENVIRONMENT_HOOKS_$_i + unset _CATKIN_ENVIRONMENT_HOOKS_$_i + eval _envfile_workspace=\$_CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE + unset _CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE + # set workspace for environment hook + CATKIN_ENV_HOOK_WORKSPACE=$_envfile_workspace + . "$_envfile" + unset CATKIN_ENV_HOOK_WORKSPACE + _i=$((_i + 1)) +done +unset _i + +unset _CATKIN_ENVIRONMENT_HOOKS_COUNT diff --git a/Legacy/ws_linux/build/catkin_generated/installspace/setup.zsh b/Legacy/ws_linux/build/catkin_generated/installspace/setup.zsh new file mode 100644 index 0000000..b660717 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/installspace/setup.zsh @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh +# generated from catkin/cmake/templates/setup.zsh.in + +CATKIN_SHELL=zsh +_CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) +emulate sh # emulate POSIX +. "$_CATKIN_SETUP_DIR/setup.sh" +emulate zsh # back to zsh mode diff --git a/Legacy/ws_linux/build/catkin_generated/order_packages.cmake b/Legacy/ws_linux/build/catkin_generated/order_packages.cmake new file mode 100644 index 0000000..dd1f6d1 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/order_packages.cmake @@ -0,0 +1,26 @@ +# generated from catkin/cmake/em/order_packages.cmake.em + +set(CATKIN_ORDERED_PACKAGES "") +set(CATKIN_ORDERED_PACKAGE_PATHS "") +set(CATKIN_ORDERED_PACKAGES_IS_META "") +set(CATKIN_ORDERED_PACKAGES_BUILD_TYPE "") +list(APPEND CATKIN_ORDERED_PACKAGES "rosaria_msgs") +list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "rosaria_msgs") +list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "False") +list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "catkin") +list(APPEND CATKIN_ORDERED_PACKAGES "rosaria") +list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "rosaria") +list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "False") +list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "catkin") +list(APPEND CATKIN_ORDERED_PACKAGES "safety") +list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "safety") +list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "False") +list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "catkin") +list(APPEND CATKIN_ORDERED_PACKAGES "videostream") +list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "videostream") +list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "False") +list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "catkin") + +set(CATKIN_MESSAGE_GENERATORS ) + +set(CATKIN_METAPACKAGE_CMAKE_TEMPLATE "/usr/lib/python2.7/dist-packages/catkin_pkg/templates/metapackage.cmake.in") diff --git a/Legacy/ws_linux/build/catkin_generated/order_packages.py b/Legacy/ws_linux/build/catkin_generated/order_packages.py new file mode 100644 index 0000000..14bb87f --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/order_packages.py @@ -0,0 +1,5 @@ +# generated from catkin/cmake/template/order_packages.context.py.in +source_root_dir = "/home/lab1_5/ws/ws_linux/src" +whitelisted_packages = "".split(';') if "" != "" else [] +blacklisted_packages = "".split(';') if "" != "" else [] +underlay_workspaces = "/home/lab1_5/ws/ws_linux/devel;/home/lab1_5/ws/ws_xeno/devel;/home/lab1_5/ws/ws_isolated/install_isolated;/opt/ros/hydro".split(';') if "/home/lab1_5/ws/ws_linux/devel;/home/lab1_5/ws/ws_xeno/devel;/home/lab1_5/ws/ws_isolated/install_isolated;/opt/ros/hydro" != "" else [] diff --git a/Legacy/ws_linux/build/catkin_generated/setup_cached.sh b/Legacy/ws_linux/build/catkin_generated/setup_cached.sh new file mode 100755 index 0000000..acd1ad5 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/setup_cached.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +# generated from catkin/python/catkin/environment_cache.py + +# based on a snapshot of the environment before and after calling the setup script +# it emulates the modifications of the setup script without recurring computations + +# new environment variables + +# modified environment variables +export LD_LIBRARY_PATH="/home/lab1_5/ws/ws_isolated/install_isolated/lib/typelib:/home/lab1_5/ws/ws_linux/devel/lib:/home/lab1_5/ws/ws_xeno/devel/lib:/home/lab1_5/ws/ws_isolated/install_isolated/lib:/home/lab1_5/ws/install_isolated/lib:/opt/ros/hydro/lib:/home/lab1_5/ws/ws_isolated/install_isolated/lib/typelib:/opt/ros/hydro/lib/typelib:/home/lab1_5/ws/ws_isolated/install_isolated/lib/typelib:/opt/ros/hydro/lib/typelib" +export LUA_PATH=";;/home/lab1_5/ws/ws_isolated/install_isolated/share/lua/5.1/?.lua;/home/lab1_5/ws/ws_isolated/install_isolated/share/lua/5.1/?.lua;/home/lab1_5/ws/ws_isolated/install_isolated/share/lua/5.1/?.lua" +export PWD="/home/lab1_5/ws/ws_linux/build" \ No newline at end of file diff --git a/Legacy/ws_linux/build/catkin_generated/stamps/Project/interrogate_setup_dot_py.py.stamp b/Legacy/ws_linux/build/catkin_generated/stamps/Project/interrogate_setup_dot_py.py.stamp new file mode 100644 index 0000000..26882f0 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/stamps/Project/interrogate_setup_dot_py.py.stamp @@ -0,0 +1,250 @@ +#!/usr/bin/env python + +# Software License Agreement (BSD License) +# +# Copyright (c) 2012, Willow Garage, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of Willow Garage, Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +from __future__ import print_function +import os +import sys + +import distutils.core +try: + import setuptools +except ImportError: + pass + +from argparse import ArgumentParser + + +def _get_locations(pkgs, package_dir): + """ + based on setuptools logic and the package_dir dict, builds a dict + of location roots for each pkg in pkgs. + See http://docs.python.org/distutils/setupscript.html + + :returns: a dict {pkgname: root} for each pkgname in pkgs (and each of their parents) + """ + # package_dir contains a dict {package_name: relativepath} + # Example {'': 'src', 'foo': 'lib', 'bar': 'lib2'} + # + # '' means where to look for any package unless a parent package + # is listed so package bar.pot is expected at lib2/bar/pot, + # whereas package sup.dee is expected at src/sup/dee + # + # if package_dir does not state anything about a package, + # setuptool expects the package folder to be in the root of the + # project + locations = {} + allprefix = package_dir.get('', '') + for pkg in pkgs: + parent_location = None + splits = pkg.split('.') + # we iterate over compound name from parent to child + # so once we found parent, children just append to their parent + for key_len in range(len(splits)): + key = '.'.join(splits[:key_len + 1]) + if key not in locations: + if key in package_dir: + locations[key] = package_dir[key] + elif parent_location is not None: + locations[key] = parent_location + else: + locations[key] = allprefix + parent_location = locations[key] + return locations + + +def generate_cmake_file(package_name, version, scripts, package_dir, pkgs, modules): + """ + Generates lines to add to a cmake file which will set variables + + :param version: str, format 'int.int.int' + :param scripts: [list of str]: relative paths to scripts + :param package_dir: {modulename: path} + :pkgs: [list of str] python_packages declared in catkin package + :modules: [list of str] python modules + """ + prefix = '%s_SETUP_PY' % package_name + result = [] + result.append(r'set(%s_VERSION "%s")' % (prefix, version)) + result.append(r'set(%s_SCRIPTS "%s")' % (prefix, ';'.join(scripts))) + + # Remove packages with '.' separators. + # + # setuptools allows specifying submodules in other folders than + # their parent + # + # The symlink approach of catkin does not work with such submodules. + # In the common case, this does not matter as the submodule is + # within the containing module. We verify this assumption, and if + # it passes, we remove submodule packages. + locations = _get_locations(pkgs, package_dir) + for pkgname, location in locations.items(): + if not '.' in pkgname: + continue + splits = pkgname.split('.') + # hack: ignore write-combining setup.py files for msg and srv files + if splits[1] in ['msg', 'srv']: + continue + # check every child has the same root folder as its parent + parent_name = '.'.join(splits[:1]) + if location != locations[parent_name]: + raise RuntimeError( + "catkin_export_python does not support setup.py files that combine across multiple directories: %s in %s, %s in %s" % (pkgname, location, parent_name, locations[parent_name])) + + # If checks pass, remove all submodules + pkgs = [p for p in pkgs if '.' not in p] + + resolved_pkgs = [] + for pkg in pkgs: + resolved_pkgs += [os.path.join(locations[pkg], pkg)] + + result.append(r'set(%s_PACKAGES "%s")' % (prefix, ';'.join(pkgs))) + result.append(r'set(%s_PACKAGE_DIRS "%s")' % (prefix, ';'.join(resolved_pkgs).replace("\\", "/"))) + + # skip modules which collide with package names + filtered_modules = [] + for modname in modules: + splits = modname.split('.') + # check all parents too + equals_package = [('.'.join(splits[:-i]) in locations) for i in range(len(splits))] + if any(equals_package): + continue + filtered_modules.append(modname) + module_locations = _get_locations(filtered_modules, package_dir) + + result.append(r'set(%s_MODULES "%s")' % (prefix, ';'.join(['%s.py' % m.replace('.', '/') for m in filtered_modules]))) + result.append(r'set(%s_MODULE_DIRS "%s")' % (prefix, ';'.join([module_locations[m] for m in filtered_modules]).replace("\\", "/"))) + + return result + + +def _create_mock_setup_function(package_name, outfile): + """ + Creates a function to call instead of distutils.core.setup or + setuptools.setup, which just captures some args and writes them + into a file that can be used from cmake + + :param package_name: name of the package + :param outfile: filename that cmake will use afterwards + :returns: a function to replace disutils.core.setup and setuptools.setup + """ + + def setup(*args, **kwargs): + ''' + Checks kwargs and writes a scriptfile + ''' + if 'version' not in kwargs: + sys.stderr.write("\n*** Unable to find 'version' in setup.py of %s\n" % package_name) + raise RuntimeError("version not found in setup.py") + version = kwargs['version'] + package_dir = kwargs.get('package_dir', {}) + + pkgs = kwargs.get('packages', []) + scripts = kwargs.get('scripts', []) + modules = kwargs.get('py_modules', []) + + unsupported_args = [ + 'entry_points', + 'exclude_package_data', + 'ext_modules ', + 'ext_package', + 'include_package_data', + 'namespace_packages', + 'setup_requires', + 'use_2to3', + 'zip_safe'] + used_unsupported_args = [arg for arg in unsupported_args if arg in kwargs] + if used_unsupported_args: + sys.stderr.write("*** Arguments %s to setup() not supported in catkin devel space in setup.py of %s\n" % (used_unsupported_args, package_name)) + + result = generate_cmake_file(package_name=package_name, + version=version, + scripts=scripts, + package_dir=package_dir, + pkgs=pkgs, + modules=modules) + with open(outfile, 'w') as out: + out.write('\n'.join(result)) + + return setup + + +def main(): + """ + Script main, parses arguments and invokes Dummy.setup indirectly. + """ + parser = ArgumentParser(description='Utility to read setup.py values from cmake macros. Creates a file with CMake set commands setting variables.') + parser.add_argument('package_name', help='Name of catkin package') + parser.add_argument('setupfile_path', help='Full path to setup.py') + parser.add_argument('outfile', help='Where to write result to') + + args = parser.parse_args() + + # print("%s" % sys.argv) + # PACKAGE_NAME = sys.argv[1] + # OUTFILE = sys.argv[3] + # print("Interrogating setup.py for package %s into %s " % (PACKAGE_NAME, OUTFILE), + # file=sys.stderr) + + # print("executing %s" % args.setupfile_path) + + # be sure you're in the directory containing + # setup.py so the sys.path manipulation works, + # so the import of __version__ works + os.chdir(os.path.dirname(os.path.abspath(args.setupfile_path))) + + # patch setup() function of distutils and setuptools for the + # context of evaluating setup.py + try: + fake_setup = _create_mock_setup_function(package_name=args.package_name, + outfile=args.outfile) + + distutils_backup = distutils.core.setup + distutils.core.setup = fake_setup + try: + setuptools_backup = setuptools.setup + setuptools.setup = fake_setup + except NameError: + pass + + with open(args.setupfile_path, 'r') as fh: + exec(fh.read()) + finally: + distutils.core.setup = distutils_backup + try: + setuptools.setup = setuptools_backup + except NameError: + pass + +if __name__ == '__main__': + main() diff --git a/Legacy/ws_linux/build/catkin_generated/stamps/Project/order_packages.cmake.em.stamp b/Legacy/ws_linux/build/catkin_generated/stamps/Project/order_packages.cmake.em.stamp new file mode 100644 index 0000000..087d4d8 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/stamps/Project/order_packages.cmake.em.stamp @@ -0,0 +1,56 @@ +# generated from catkin/cmake/em/order_packages.cmake.em +@{ +import os +try: + from catkin_pkg.cmake import get_metapackage_cmake_template_path +except ImportError as e: + raise RuntimeError('ImportError: "from catkin_pkg.cmake import get_metapackage_cmake_template_path" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e) +try: + from catkin_pkg.topological_order import topological_order +except ImportError as e: + raise RuntimeError('ImportError: "from catkin_pkg.topological_order import topological_order" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e) +try: + from catkin_pkg.package import InvalidPackage +except ImportError as e: + raise RuntimeError('ImportError: "from catkin_pkg.package import InvalidPackage" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e) +# vars defined in order_packages.context.py.in +try: + ordered_packages = topological_order(os.path.normpath(source_root_dir), whitelisted=whitelisted_packages, blacklisted=blacklisted_packages, underlay_workspaces=underlay_workspaces) +except InvalidPackage as e: + print('message(FATAL_ERROR "%s")' % ('%s' % e).replace('"', '\\"')) + ordered_packages = [] +fatal_error = False +}@ + +set(CATKIN_ORDERED_PACKAGES "") +set(CATKIN_ORDERED_PACKAGE_PATHS "") +set(CATKIN_ORDERED_PACKAGES_IS_META "") +set(CATKIN_ORDERED_PACKAGES_BUILD_TYPE "") +@[for path, package in ordered_packages]@ +@[if path is None]@ +message(FATAL_ERROR "Circular dependency in subset of packages:\n@package") +@{ +fatal_error = True +}@ +@[elif package.name != 'catkin']@ +list(APPEND CATKIN_ORDERED_PACKAGES "@(package.name)") +list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "@(path.replace('\\','/'))") +list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "@(str('metapackage' in [e.tagname for e in package.exports]))") +list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "@(str([e.content for e in package.exports if e.tagname == 'build_type'][0]) if 'build_type' in [e.tagname for e in package.exports] else 'catkin')") +@{ +deprecated = [e for e in package.exports if e.tagname == 'deprecated'] +}@ +@[if deprecated]@ +message("WARNING: Package '@(package.name)' is deprecated@(' (%s)' % deprecated[0].content if deprecated[0].content else '')") +@[end if]@ +@[end if]@ +@[end for]@ + +@[if not fatal_error]@ +@{ +message_generators = [package.name for (_, package) in ordered_packages if 'message_generator' in [e.tagname for e in package.exports]] +}@ +set(CATKIN_MESSAGE_GENERATORS @(' '.join(message_generators))) +@[end if]@ + +set(CATKIN_METAPACKAGE_CMAKE_TEMPLATE "@(get_metapackage_cmake_template_path().replace('\\','/'))") diff --git a/Legacy/ws_linux/build/catkin_generated/stamps/Project/package.xml.stamp b/Legacy/ws_linux/build/catkin_generated/stamps/Project/package.xml.stamp new file mode 100644 index 0000000..e8ce7d4 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_generated/stamps/Project/package.xml.stamp @@ -0,0 +1,36 @@ + + + catkin + 0.5.89 + Low-level build system macros and infrastructure for ROS. + Dirk Thomas + BSD + + http://www.ros.org/wiki/catkin + https://github.com/ros/catkin/issues + https://github.com/ros/catkin + + Troy Straszheim + Morten Kjaergaard + Brian Gerkey + Dirk Thomas + + gtest + python-argparse + python-catkin-pkg + python-empy + python-nose + + cmake + + cmake + gtest + python-argparse + python-catkin-pkg + python-empy + python-nose + + + + + diff --git a/Legacy/ws_linux/build/catkin_make.cache b/Legacy/ws_linux/build/catkin_make.cache new file mode 100644 index 0000000..aac7dd7 --- /dev/null +++ b/Legacy/ws_linux/build/catkin_make.cache @@ -0,0 +1 @@ +rosaria:rosaria_msgs:safety:videostream diff --git a/Legacy/ws_linux/build/cmake_install.cmake b/Legacy/ws_linux/build/cmake_install.cmake new file mode 100644 index 0000000..1e91845 --- /dev/null +++ b/Legacy/ws_linux/build/cmake_install.cmake @@ -0,0 +1,108 @@ +# Install script for directory: /home/lab1_5/ws/ws_linux/src + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/home/lab1_5/ws/ws_linux/install") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + + if (NOT EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}") + file(MAKE_DIRECTORY "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}") + endif() + if (NOT EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/.catkin") + file(WRITE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/.catkin" "") + endif() +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES + "/home/lab1_5/ws/ws_linux/install/_setup_util.py") +FILE(INSTALL DESTINATION "/home/lab1_5/ws/ws_linux/install" TYPE PROGRAM FILES "/home/lab1_5/ws/ws_linux/build/catkin_generated/installspace/_setup_util.py") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES + "/home/lab1_5/ws/ws_linux/install/env.sh") +FILE(INSTALL DESTINATION "/home/lab1_5/ws/ws_linux/install" TYPE PROGRAM FILES "/home/lab1_5/ws/ws_linux/build/catkin_generated/installspace/env.sh") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES + "/home/lab1_5/ws/ws_linux/install/setup.bash") +FILE(INSTALL DESTINATION "/home/lab1_5/ws/ws_linux/install" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/catkin_generated/installspace/setup.bash") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES + "/home/lab1_5/ws/ws_linux/install/setup.sh") +FILE(INSTALL DESTINATION "/home/lab1_5/ws/ws_linux/install" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/catkin_generated/installspace/setup.sh") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES + "/home/lab1_5/ws/ws_linux/install/setup.zsh") +FILE(INSTALL DESTINATION "/home/lab1_5/ws/ws_linux/install" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/catkin_generated/installspace/setup.zsh") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES + "/home/lab1_5/ws/ws_linux/install/.rosinstall") +FILE(INSTALL DESTINATION "/home/lab1_5/ws/ws_linux/install" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/catkin_generated/installspace/.rosinstall") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/catkin/profile.d" TYPE FILE FILES "/opt/ros/hydro/share/catkin/cmake/env-hooks/05.catkin_make.bash") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/catkin/profile.d" TYPE FILE FILES "/opt/ros/hydro/share/catkin/cmake/env-hooks/05.catkin_make_isolated.bash") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + INCLUDE("/home/lab1_5/ws/ws_linux/build/gtest/cmake_install.cmake") + INCLUDE("/home/lab1_5/ws/ws_linux/build/rosaria_msgs/cmake_install.cmake") + INCLUDE("/home/lab1_5/ws/ws_linux/build/rosaria/cmake_install.cmake") + INCLUDE("/home/lab1_5/ws/ws_linux/build/safety/cmake_install.cmake") + INCLUDE("/home/lab1_5/ws/ws_linux/build/videostream/cmake_install.cmake") + +ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) + +IF(CMAKE_INSTALL_COMPONENT) + SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +ELSE(CMAKE_INSTALL_COMPONENT) + SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +ENDIF(CMAKE_INSTALL_COMPONENT) + +FILE(WRITE "/home/lab1_5/ws/ws_linux/build/${CMAKE_INSTALL_MANIFEST}" "") +FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES}) + FILE(APPEND "/home/lab1_5/ws/ws_linux/build/${CMAKE_INSTALL_MANIFEST}" "${file}\n") +ENDFOREACH(file) diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/CMakeDirectoryInformation.cmake b/Legacy/ws_linux/build/gtest/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..115e889 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,24 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Relative path conversion top directories. +SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/src/gtest") +SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/lab1_5/ws/ws_linux/build") + +# Force unix paths in dependencies. +SET(CMAKE_FORCE_UNIX_PATHS 1) + +# The C and CXX include file search paths: +SET(CMAKE_C_INCLUDE_PATH + "/usr/src/gtest/include" + "/usr/src/gtest" + ) +SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) + +# The C and CXX include file regular expressions for this directory. +SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/DependInfo.cmake b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/DependInfo.cmake new file mode 100644 index 0000000..39a6d5c --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/DependInfo.cmake @@ -0,0 +1,18 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +SET(CMAKE_DEPENDS_CHECK_CXX + "/usr/src/gtest/src/gtest-all.cc" "/home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o" + ) +SET(CMAKE_CXX_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "GTEST_CREATE_SHARED_LIBRARY=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/build.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/build.make new file mode 100644 index 0000000..daf98bc --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/build.make @@ -0,0 +1,99 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Include any dependencies generated for this target. +include gtest/CMakeFiles/gtest.dir/depend.make + +# Include the progress variables for this target. +include gtest/CMakeFiles/gtest.dir/progress.make + +# Include the compile flags for this target's objects. +include gtest/CMakeFiles/gtest.dir/flags.make + +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o: gtest/CMakeFiles/gtest.dir/flags.make +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o: /usr/src/gtest/src/gtest-all.cc + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o" + cd /home/lab1_5/ws/ws_linux/build/gtest && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /usr/src/gtest/src/gtest-all.cc + +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/gtest.dir/src/gtest-all.cc.i" + cd /home/lab1_5/ws/ws_linux/build/gtest && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -E /usr/src/gtest/src/gtest-all.cc > CMakeFiles/gtest.dir/src/gtest-all.cc.i + +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/gtest.dir/src/gtest-all.cc.s" + cd /home/lab1_5/ws/ws_linux/build/gtest && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -S /usr/src/gtest/src/gtest-all.cc -o CMakeFiles/gtest.dir/src/gtest-all.cc.s + +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires: +.PHONY : gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires + +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires + $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides.build +.PHONY : gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides + +gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides.build: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o + +# Object files for target gtest +gtest_OBJECTS = \ +"CMakeFiles/gtest.dir/src/gtest-all.cc.o" + +# External object files for target gtest +gtest_EXTERNAL_OBJECTS = + +gtest/libgtest.so: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o +gtest/libgtest.so: gtest/CMakeFiles/gtest.dir/build.make +gtest/libgtest.so: gtest/CMakeFiles/gtest.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library libgtest.so" + cd /home/lab1_5/ws/ws_linux/build/gtest && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/gtest.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +gtest/CMakeFiles/gtest.dir/build: gtest/libgtest.so +.PHONY : gtest/CMakeFiles/gtest.dir/build + +gtest/CMakeFiles/gtest.dir/requires: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires +.PHONY : gtest/CMakeFiles/gtest.dir/requires + +gtest/CMakeFiles/gtest.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/gtest && $(CMAKE_COMMAND) -P CMakeFiles/gtest.dir/cmake_clean.cmake +.PHONY : gtest/CMakeFiles/gtest.dir/clean + +gtest/CMakeFiles/gtest.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /usr/src/gtest /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/gtest /home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : gtest/CMakeFiles/gtest.dir/depend + diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/cmake_clean.cmake b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/cmake_clean.cmake new file mode 100644 index 0000000..015a1ee --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/gtest.dir/src/gtest-all.cc.o" + "libgtest.pdb" + "libgtest.so" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang CXX) + INCLUDE(CMakeFiles/gtest.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/depend.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/depend.make new file mode 100644 index 0000000..37ac348 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for gtest. +# This may be replaced when dependencies are built. diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/flags.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/flags.make new file mode 100644 index 0000000..17ff575 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -fPIC -I/usr/src/gtest/include -I/usr/src/gtest + +CXX_DEFINES = -Dgtest_EXPORTS -DGTEST_CREATE_SHARED_LIBRARY=1 + +# TARGET_FLAGS = -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra + diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/link.txt b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/link.txt new file mode 100644 index 0000000..d0ad740 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ -fPIC -shared -Wl,-soname,libgtest.so -o libgtest.so CMakeFiles/gtest.dir/src/gtest-all.cc.o -L/home/lab1_5/ws/ws_linux/build/gtest/src -lpthread -Wl,-rpath,/home/lab1_5/ws/ws_linux/build/gtest/src diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/progress.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/progress.make new file mode 100644 index 0000000..8b1fa81 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 4 + diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake new file mode 100644 index 0000000..f6a32a4 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake @@ -0,0 +1,19 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +SET(CMAKE_DEPENDS_CHECK_CXX + "/usr/src/gtest/src/gtest_main.cc" "/home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" + ) +SET(CMAKE_CXX_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "GTEST_CREATE_SHARED_LIBRARY=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + "/home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest.dir/DependInfo.cmake" + ) diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/build.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/build.make new file mode 100644 index 0000000..687ceb3 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/build.make @@ -0,0 +1,100 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Include any dependencies generated for this target. +include gtest/CMakeFiles/gtest_main.dir/depend.make + +# Include the progress variables for this target. +include gtest/CMakeFiles/gtest_main.dir/progress.make + +# Include the compile flags for this target's objects. +include gtest/CMakeFiles/gtest_main.dir/flags.make + +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o: gtest/CMakeFiles/gtest_main.dir/flags.make +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o: /usr/src/gtest/src/gtest_main.cc + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" + cd /home/lab1_5/ws/ws_linux/build/gtest && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -c /usr/src/gtest/src/gtest_main.cc + +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/gtest_main.dir/src/gtest_main.cc.i" + cd /home/lab1_5/ws/ws_linux/build/gtest && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -E /usr/src/gtest/src/gtest_main.cc > CMakeFiles/gtest_main.dir/src/gtest_main.cc.i + +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/gtest_main.dir/src/gtest_main.cc.s" + cd /home/lab1_5/ws/ws_linux/build/gtest && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -S /usr/src/gtest/src/gtest_main.cc -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.s + +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires: +.PHONY : gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires + +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires + $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides.build +.PHONY : gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides + +gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides.build: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o + +# Object files for target gtest_main +gtest_main_OBJECTS = \ +"CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" + +# External object files for target gtest_main +gtest_main_EXTERNAL_OBJECTS = + +gtest/libgtest_main.so: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o +gtest/libgtest_main.so: gtest/libgtest.so +gtest/libgtest_main.so: gtest/CMakeFiles/gtest_main.dir/build.make +gtest/libgtest_main.so: gtest/CMakeFiles/gtest_main.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library libgtest_main.so" + cd /home/lab1_5/ws/ws_linux/build/gtest && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/gtest_main.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +gtest/CMakeFiles/gtest_main.dir/build: gtest/libgtest_main.so +.PHONY : gtest/CMakeFiles/gtest_main.dir/build + +gtest/CMakeFiles/gtest_main.dir/requires: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires +.PHONY : gtest/CMakeFiles/gtest_main.dir/requires + +gtest/CMakeFiles/gtest_main.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/gtest && $(CMAKE_COMMAND) -P CMakeFiles/gtest_main.dir/cmake_clean.cmake +.PHONY : gtest/CMakeFiles/gtest_main.dir/clean + +gtest/CMakeFiles/gtest_main.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /usr/src/gtest /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/gtest /home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : gtest/CMakeFiles/gtest_main.dir/depend + diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/cmake_clean.cmake b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/cmake_clean.cmake new file mode 100644 index 0000000..c8fe838 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" + "libgtest_main.pdb" + "libgtest_main.so" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang CXX) + INCLUDE(CMakeFiles/gtest_main.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/depend.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/depend.make new file mode 100644 index 0000000..1d67c1a --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for gtest_main. +# This may be replaced when dependencies are built. diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/flags.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/flags.make new file mode 100644 index 0000000..1363759 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -fPIC -I/usr/src/gtest/include -I/usr/src/gtest + +CXX_DEFINES = -Dgtest_main_EXPORTS -DGTEST_CREATE_SHARED_LIBRARY=1 + +# TARGET_FLAGS = -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra + diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/link.txt b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/link.txt new file mode 100644 index 0000000..b0bb4bc --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ -fPIC -shared -Wl,-soname,libgtest_main.so -o libgtest_main.so CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -L/home/lab1_5/ws/ws_linux/build/gtest/src -lpthread libgtest.so -lpthread -Wl,-rpath,/home/lab1_5/ws/ws_linux/build/gtest/src:/home/lab1_5/ws/ws_linux/build/gtest diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/progress.make b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/progress.make new file mode 100644 index 0000000..b9ea7bd --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/gtest_main.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 5 + diff --git a/Legacy/ws_linux/build/gtest/CMakeFiles/progress.marks b/Legacy/ws_linux/build/gtest/CMakeFiles/progress.marks new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/Legacy/ws_linux/build/gtest/CTestTestfile.cmake b/Legacy/ws_linux/build/gtest/CTestTestfile.cmake new file mode 100644 index 0000000..8ac66d4 --- /dev/null +++ b/Legacy/ws_linux/build/gtest/CTestTestfile.cmake @@ -0,0 +1,6 @@ +# CMake generated Testfile for +# Source directory: /usr/src/gtest +# Build directory: /home/lab1_5/ws/ws_linux/build/gtest +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. diff --git a/Legacy/ws_linux/build/gtest/Makefile b/Legacy/ws_linux/build/gtest/Makefile new file mode 100644 index 0000000..50fa8ae --- /dev/null +++ b/Legacy/ws_linux/build/gtest/Makefile @@ -0,0 +1,259 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles /home/lab1_5/ws/ws_linux/build/gtest/CMakeFiles/progress.marks + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 gtest/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 gtest/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 gtest/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 gtest/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +gtest/CMakeFiles/gtest.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest.dir/rule +.PHONY : gtest/CMakeFiles/gtest.dir/rule + +# Convenience name for target. +gtest: gtest/CMakeFiles/gtest.dir/rule +.PHONY : gtest + +# fast build rule for target. +gtest/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/build +.PHONY : gtest/fast + +# Convenience name for target. +gtest/CMakeFiles/gtest_main.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest_main.dir/rule +.PHONY : gtest/CMakeFiles/gtest_main.dir/rule + +# Convenience name for target. +gtest_main: gtest/CMakeFiles/gtest_main.dir/rule +.PHONY : gtest_main + +# fast build rule for target. +gtest_main/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/build +.PHONY : gtest_main/fast + +src/gtest-all.o: src/gtest-all.cc.o +.PHONY : src/gtest-all.o + +# target to build an object file +src/gtest-all.cc.o: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o +.PHONY : src/gtest-all.cc.o + +src/gtest-all.i: src/gtest-all.cc.i +.PHONY : src/gtest-all.i + +# target to preprocess a source file +src/gtest-all.cc.i: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.i +.PHONY : src/gtest-all.cc.i + +src/gtest-all.s: src/gtest-all.cc.s +.PHONY : src/gtest-all.s + +# target to generate assembly for a file +src/gtest-all.cc.s: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.s +.PHONY : src/gtest-all.cc.s + +src/gtest_main.o: src/gtest_main.cc.o +.PHONY : src/gtest_main.o + +# target to build an object file +src/gtest_main.cc.o: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o +.PHONY : src/gtest_main.cc.o + +src/gtest_main.i: src/gtest_main.cc.i +.PHONY : src/gtest_main.i + +# target to preprocess a source file +src/gtest_main.cc.i: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.i +.PHONY : src/gtest_main.cc.i + +src/gtest_main.s: src/gtest_main.cc.s +.PHONY : src/gtest_main.s + +# target to generate assembly for a file +src/gtest_main.cc.s: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.s +.PHONY : src/gtest_main.cc.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... gtest" + @echo "... gtest_main" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... src/gtest-all.o" + @echo "... src/gtest-all.i" + @echo "... src/gtest-all.s" + @echo "... src/gtest_main.o" + @echo "... src/gtest_main.i" + @echo "... src/gtest_main.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/gtest/cmake_install.cmake b/Legacy/ws_linux/build/gtest/cmake_install.cmake new file mode 100644 index 0000000..98fb9dc --- /dev/null +++ b/Legacy/ws_linux/build/gtest/cmake_install.cmake @@ -0,0 +1,34 @@ +# Install script for directory: /usr/src/gtest + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/home/lab1_5/ws/ws_linux/install") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/CMakeDirectoryInformation.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..9d5fbab --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,25 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Relative path conversion top directories. +SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/lab1_5/ws/ws_linux/src") +SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/lab1_5/ws/ws_linux/build") + +# Force unix paths in dependencies. +SET(CMAKE_FORCE_UNIX_PATHS 1) + +# The C and CXX include file search paths: +SET(CMAKE_C_INCLUDE_PATH + "/home/lab1_5/ws/ws_linux/devel/include" + "/opt/ros/hydro/include" + "/usr/local/Aria/include" + ) +SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) + +# The C and CXX include file regular expressions for this directory. +SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/CXX.includecache b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/CXX.includecache new file mode 100644 index 0000000..294e901 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/CXX.includecache @@ -0,0 +1,3750 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- + +/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +dynamic_reconfigure/config_tools.h +- +limits +- +ros/node_handle.h +- +dynamic_reconfigure/ConfigDescription.h +- +dynamic_reconfigure/ParamDescription.h +- +dynamic_reconfigure/Group.h +- +dynamic_reconfigure/config_init_mutex.h +- +boost/any.hpp +- + +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h + +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/UInt8.h +- +std_msgs/Float64.h +- +geometry_msgs/Twist.h +- +std_msgs/Bool.h +- +std_msgs/Bool.h +- +std_msgs/Bool.h +- + +/home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp +stdio.h +- +math.h +- +Aria.h +- +/usr/include/Aria/Aria.h +- +ros/ros.h +/home/lab1_5/ws/ws_linux/src/rosaria/ros/ros.h +geometry_msgs/Twist.h +/home/lab1_5/ws/ws_linux/src/rosaria/geometry_msgs/Twist.h +geometry_msgs/Pose.h +/home/lab1_5/ws/ws_linux/src/rosaria/geometry_msgs/Pose.h +geometry_msgs/PoseStamped.h +/home/lab1_5/ws/ws_linux/src/rosaria/geometry_msgs/PoseStamped.h +sensor_msgs/PointCloud.h +- +sensor_msgs/PointCloud2.h +- +sensor_msgs/point_cloud_conversion.h +- +nav_msgs/Odometry.h +/home/lab1_5/ws/ws_linux/src/rosaria/nav_msgs/Odometry.h +rosaria/BumperState.h +/home/lab1_5/ws/ws_linux/src/rosaria/rosaria/BumperState.h +tf/tf.h +/home/lab1_5/ws/ws_linux/src/rosaria/tf/tf.h +tf/transform_listener.h +/home/lab1_5/ws/ws_linux/src/rosaria/tf/transform_listener.h +tf/transform_broadcaster.h +- +tf/transform_datatypes.h +/home/lab1_5/ws/ws_linux/src/rosaria/tf/transform_datatypes.h +dynamic_reconfigure/server.h +- +rosaria/RosAriaConfig.h +- +std_msgs/Float64.h +/home/lab1_5/ws/ws_linux/src/rosaria/std_msgs/Float64.h +std_msgs/Float32.h +/home/lab1_5/ws/ws_linux/src/rosaria/std_msgs/Float32.h +std_msgs/Int8.h +/home/lab1_5/ws/ws_linux/src/rosaria/std_msgs/Int8.h +std_msgs/Bool.h +/home/lab1_5/ws/ws_linux/src/rosaria/std_msgs/Bool.h +std_srvs/Empty.h +/home/lab1_5/ws/ws_linux/src/rosaria/std_srvs/Empty.h +sensor_msgs/JointState.h +/home/lab1_5/ws/ws_linux/src/rosaria/sensor_msgs/JointState.h +rosaria_msgs/RestrictionsMsg.h +/home/lab1_5/ws/ws_linux/src/rosaria/rosaria_msgs/RestrictionsMsg.h +rosaria_msgs/RobotInfoMsg.h +/home/lab1_5/ws/ws_linux/src/rosaria/rosaria_msgs/RobotInfoMsg.h +sstream +- +cstdlib +- + +/opt/ros/hydro/include/XmlRpcDecl.h +ros/macros.h +- + +/opt/ros/hydro/include/XmlRpcValue.h +XmlRpcDecl.h +/opt/ros/hydro/include/XmlRpcDecl.h +map +- +string +- +vector +- +time.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/BoolParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/Config.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/BoolParameter.h +- +dynamic_reconfigure/IntParameter.h +- +dynamic_reconfigure/StrParameter.h +- +dynamic_reconfigure/DoubleParameter.h +- +dynamic_reconfigure/GroupState.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/ConfigDescription.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/Group.h +- +dynamic_reconfigure/Config.h +- +dynamic_reconfigure/Config.h +- +dynamic_reconfigure/Config.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/DoubleParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/Group.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/ParamDescription.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/GroupState.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/IntParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/ParamDescription.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/Reconfigure.h +ros/service_traits.h +- +dynamic_reconfigure/ReconfigureRequest.h +- +dynamic_reconfigure/ReconfigureResponse.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/ReconfigureRequest.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/Config.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/ReconfigureResponse.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/Config.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/StrParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/config_init_mutex.h +boost/thread/mutex.hpp +- + +/opt/ros/hydro/include/dynamic_reconfigure/config_tools.h +string +- +vector +- +dynamic_reconfigure/Config.h +- +dynamic_reconfigure/Group.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/server.h +boost/function.hpp +- +boost/thread/recursive_mutex.hpp +- +ros/node_handle.h +- +dynamic_reconfigure/ConfigDescription.h +- +dynamic_reconfigure/Reconfigure.h +- + +/opt/ros/hydro/include/geometry_msgs/Point.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/geometry_msgs/Point32.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/geometry_msgs/PointStamped.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Point.h +- + +/opt/ros/hydro/include/geometry_msgs/Pose.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/Point.h +- +geometry_msgs/Quaternion.h +- + +/opt/ros/hydro/include/geometry_msgs/PoseStamped.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Pose.h +- + +/opt/ros/hydro/include/geometry_msgs/PoseWithCovariance.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/Pose.h +- + +/opt/ros/hydro/include/geometry_msgs/Quaternion.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/geometry_msgs/QuaternionStamped.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Quaternion.h +- + +/opt/ros/hydro/include/geometry_msgs/Transform.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/Vector3.h +- +geometry_msgs/Quaternion.h +- + +/opt/ros/hydro/include/geometry_msgs/TransformStamped.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Transform.h +- + +/opt/ros/hydro/include/geometry_msgs/Twist.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/Vector3.h +- +geometry_msgs/Vector3.h +- + +/opt/ros/hydro/include/geometry_msgs/TwistStamped.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Twist.h +- + +/opt/ros/hydro/include/geometry_msgs/TwistWithCovariance.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/Twist.h +- + +/opt/ros/hydro/include/geometry_msgs/Vector3.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/geometry_msgs/Vector3Stamped.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Vector3.h +- + +/opt/ros/hydro/include/nav_msgs/Odometry.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/PoseWithCovariance.h +- +geometry_msgs/TwistWithCovariance.h +- + +/opt/ros/hydro/include/ros/advertise_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/advertise_service_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/service_callback_helper.h +/opt/ros/hydro/include/ros/ros/service_callback_helper.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/assert.h +ros/console.h +/opt/ros/hydro/include/ros/ros/console.h +ros/static_assert.h +/opt/ros/hydro/include/ros/ros/static_assert.h +ros/platform.h +- +stdlib.h +- + +/opt/ros/hydro/include/ros/builtin_message_traits.h +message_traits.h +/opt/ros/hydro/include/ros/message_traits.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h + +/opt/ros/hydro/include/ros/callback_queue.h +ros/callback_queue_interface.h +/opt/ros/hydro/include/ros/ros/callback_queue_interface.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/shared_ptr.hpp +- +boost/thread/mutex.hpp +- +boost/thread/shared_mutex.hpp +- +boost/thread/condition_variable.hpp +- +boost/thread/tss.hpp +- +list +- +deque +- + +/opt/ros/hydro/include/ros/callback_queue_interface.h +boost/shared_ptr.hpp +- +common.h +/opt/ros/hydro/include/ros/common.h +ros/types.h +/opt/ros/hydro/include/ros/ros/types.h + +/opt/ros/hydro/include/ros/common.h +stdint.h +- +assert.h +- +stddef.h +- +string +- +ros/assert.h +/opt/ros/hydro/include/ros/ros/assert.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/serialized_message.h +/opt/ros/hydro/include/ros/ros/serialized_message.h +boost/shared_array.hpp +- +ros/macros.h +- + +/opt/ros/hydro/include/ros/console.h +console_backend.h +/opt/ros/hydro/include/ros/console_backend.h +cstdio +- +sstream +- +ros/time.h +- +cstdarg +- +ros/macros.h +- +map +- +log4cxx/level.h +/opt/ros/hydro/include/ros/log4cxx/level.h +rosconsole/macros_generated.h +/opt/ros/hydro/include/ros/rosconsole/macros_generated.h + +/opt/ros/hydro/include/ros/console_backend.h + +/opt/ros/hydro/include/ros/datatypes.h +string +- +vector +- +map +- +set +- +list +- +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/duration.h +iostream +- +math.h +- +stdexcept +- +climits +- +stdint.h +- +rostime_decl.h +/opt/ros/hydro/include/ros/rostime_decl.h + +/opt/ros/hydro/include/ros/exception.h +stdexcept +- + +/opt/ros/hydro/include/ros/exceptions.h +ros/exception.h +- + +/opt/ros/hydro/include/ros/forwards.h +string +- +vector +- +map +- +set +- +list +- +boost/shared_ptr.hpp +- +boost/weak_ptr.hpp +- +boost/function.hpp +- +ros/time.h +- +ros/macros.h +- +exceptions.h +/opt/ros/hydro/include/ros/exceptions.h +ros/datatypes.h +/opt/ros/hydro/include/ros/ros/datatypes.h + +/opt/ros/hydro/include/ros/init.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/spinner.h +/opt/ros/hydro/include/ros/ros/spinner.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/macros.h + +/opt/ros/hydro/include/ros/master.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +XmlRpcValue.h +/opt/ros/hydro/include/ros/XmlRpcValue.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/message.h +ros/macros.h +/opt/ros/hydro/include/ros/ros/macros.h +ros/assert.h +/opt/ros/hydro/include/ros/ros/assert.h +string +- +string.h +- +boost/shared_ptr.hpp +- +boost/array.hpp +- +stdint.h +- + +/opt/ros/hydro/include/ros/message_event.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +ros/datatypes.h +- +ros/message_traits.h +- +boost/type_traits/is_void.hpp +- +boost/type_traits/is_base_of.hpp +- +boost/type_traits/is_const.hpp +- +boost/type_traits/add_const.hpp +- +boost/type_traits/remove_const.hpp +- +boost/utility/enable_if.hpp +- +boost/function.hpp +- +boost/make_shared.hpp +- + +/opt/ros/hydro/include/ros/message_forward.h +memory +- + +/opt/ros/hydro/include/ros/message_operations.h +ostream +- + +/opt/ros/hydro/include/ros/message_traits.h +message_forward.h +/opt/ros/hydro/include/ros/message_forward.h +ros/time.h +- +string +- +boost/utility/enable_if.hpp +- +boost/type_traits/remove_const.hpp +- +boost/type_traits/remove_reference.hpp +- + +/opt/ros/hydro/include/ros/names.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/node_handle.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/publisher.h +/opt/ros/hydro/include/ros/ros/publisher.h +ros/subscriber.h +/opt/ros/hydro/include/ros/ros/subscriber.h +ros/service_server.h +/opt/ros/hydro/include/ros/ros/service_server.h +ros/service_client.h +/opt/ros/hydro/include/ros/ros/service_client.h +ros/timer.h +/opt/ros/hydro/include/ros/ros/timer.h +ros/rate.h +/opt/ros/hydro/include/ros/ros/rate.h +ros/wall_timer.h +/opt/ros/hydro/include/ros/ros/wall_timer.h +ros/advertise_options.h +/opt/ros/hydro/include/ros/ros/advertise_options.h +ros/advertise_service_options.h +/opt/ros/hydro/include/ros/ros/advertise_service_options.h +ros/subscribe_options.h +/opt/ros/hydro/include/ros/ros/subscribe_options.h +ros/service_client_options.h +/opt/ros/hydro/include/ros/ros/service_client_options.h +ros/timer_options.h +/opt/ros/hydro/include/ros/ros/timer_options.h +ros/wall_timer_options.h +/opt/ros/hydro/include/ros/ros/wall_timer_options.h +ros/spinner.h +/opt/ros/hydro/include/ros/ros/spinner.h +ros/init.h +/opt/ros/hydro/include/ros/ros/init.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/bind.hpp +- +XmlRpcValue.h +- + +/opt/ros/hydro/include/ros/param.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h +XmlRpcValue.h +/opt/ros/hydro/include/ros/XmlRpcValue.h +vector +- +map +- + +/opt/ros/hydro/include/ros/parameter_adapter.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/message_event.h +/opt/ros/hydro/include/ros/ros/message_event.h +ros/static_assert.h +- +boost/type_traits/add_const.hpp +- +boost/type_traits/remove_const.hpp +- +boost/type_traits/remove_reference.hpp +- + +/opt/ros/hydro/include/ros/platform.h +windows.h +- +stdlib.h +- +string +- + +/opt/ros/hydro/include/ros/publisher.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/message.h +/opt/ros/hydro/include/ros/ros/message.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +boost/bind.hpp +- + +/opt/ros/hydro/include/ros/rate.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +rostime_decl.h +/opt/ros/hydro/include/ros/rostime_decl.h + +/opt/ros/hydro/include/ros/ros.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +ros/rate.h +/opt/ros/hydro/include/ros/ros/rate.h +ros/console.h +/opt/ros/hydro/include/ros/ros/console.h +ros/assert.h +/opt/ros/hydro/include/ros/ros/assert.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/types.h +/opt/ros/hydro/include/ros/ros/types.h +ros/node_handle.h +/opt/ros/hydro/include/ros/ros/node_handle.h +ros/publisher.h +/opt/ros/hydro/include/ros/ros/publisher.h +ros/single_subscriber_publisher.h +/opt/ros/hydro/include/ros/ros/single_subscriber_publisher.h +ros/service_server.h +/opt/ros/hydro/include/ros/ros/service_server.h +ros/subscriber.h +/opt/ros/hydro/include/ros/ros/subscriber.h +ros/service.h +/opt/ros/hydro/include/ros/ros/service.h +ros/init.h +/opt/ros/hydro/include/ros/ros/init.h +ros/master.h +/opt/ros/hydro/include/ros/ros/master.h +ros/this_node.h +/opt/ros/hydro/include/ros/ros/this_node.h +ros/param.h +/opt/ros/hydro/include/ros/ros/param.h +ros/topic.h +/opt/ros/hydro/include/ros/ros/topic.h +ros/names.h +/opt/ros/hydro/include/ros/ros/names.h + +/opt/ros/hydro/include/ros/roscpp_serialization_macros.h +ros/macros.h +- + +/opt/ros/hydro/include/ros/rostime_decl.h +ros/macros.h +- + +/opt/ros/hydro/include/ros/serialization.h +roscpp_serialization_macros.h +/opt/ros/hydro/include/ros/roscpp_serialization_macros.h +ros/types.h +- +ros/time.h +- +serialized_message.h +/opt/ros/hydro/include/ros/serialized_message.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +ros/builtin_message_traits.h +/opt/ros/hydro/include/ros/ros/builtin_message_traits.h +ros/exception.h +/opt/ros/hydro/include/ros/ros/exception.h +ros/datatypes.h +/opt/ros/hydro/include/ros/ros/datatypes.h +vector +- +map +- +boost/array.hpp +- +boost/call_traits.hpp +- +boost/utility/enable_if.hpp +- +boost/mpl/and.hpp +- +boost/mpl/or.hpp +- +boost/mpl/not.hpp +- +cstring +- + +/opt/ros/hydro/include/ros/serialized_message.h +roscpp_serialization_macros.h +/opt/ros/hydro/include/ros/roscpp_serialization_macros.h +boost/shared_array.hpp +- +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/service.h +string +- +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/message.h +/opt/ros/hydro/include/ros/ros/message.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/node_handle.h +/opt/ros/hydro/include/ros/ros/node_handle.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/names.h +/opt/ros/hydro/include/ros/ros/names.h +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/service_callback_helper.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/message.h +/opt/ros/hydro/include/ros/ros/message.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +boost/type_traits/is_base_of.hpp +- +boost/utility/enable_if.hpp +- + +/opt/ros/hydro/include/ros/service_client.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h + +/opt/ros/hydro/include/ros/service_client_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h + +/opt/ros/hydro/include/ros/service_server.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/service_traits.h +boost/type_traits/remove_reference.hpp +- +boost/type_traits/remove_const.hpp +- + +/opt/ros/hydro/include/ros/single_subscriber_publisher.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/utility.hpp +- + +/opt/ros/hydro/include/ros/spinner.h +ros/types.h +/opt/ros/hydro/include/ros/ros/types.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/static_assert.h +boost/static_assert.hpp +- + +/opt/ros/hydro/include/ros/subscribe_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/transport_hints.h +/opt/ros/hydro/include/ros/ros/transport_hints.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +subscription_callback_helper.h +/opt/ros/hydro/include/ros/subscription_callback_helper.h + +/opt/ros/hydro/include/ros/subscriber.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/subscription_callback_helper.h +/opt/ros/hydro/include/ros/ros/subscription_callback_helper.h + +/opt/ros/hydro/include/ros/subscription_callback_helper.h +typeinfo +- +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/parameter_adapter.h +/opt/ros/hydro/include/ros/ros/parameter_adapter.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +ros/builtin_message_traits.h +/opt/ros/hydro/include/ros/ros/builtin_message_traits.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +ros/message_event.h +/opt/ros/hydro/include/ros/ros/message_event.h +ros/static_assert.h +- +boost/type_traits/add_const.hpp +- +boost/type_traits/remove_const.hpp +- +boost/type_traits/remove_reference.hpp +- +boost/type_traits/is_base_of.hpp +- +boost/utility/enable_if.hpp +- +boost/make_shared.hpp +- + +/opt/ros/hydro/include/ros/this_node.h +common.h +/opt/ros/hydro/include/ros/common.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h + +/opt/ros/hydro/include/ros/time.h +ros/platform.h +- +iostream +- +cmath +- +ros/exception.h +- +duration.h +/opt/ros/hydro/include/ros/duration.h +boost/math/special_functions/round.hpp +- +rostime_decl.h +/opt/ros/hydro/include/ros/rostime_decl.h +sys/timeb.h +- +sys/time.h +- + +/opt/ros/hydro/include/ros/timer.h +common.h +/opt/ros/hydro/include/ros/common.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +timer_options.h +/opt/ros/hydro/include/ros/timer_options.h + +/opt/ros/hydro/include/ros/timer_options.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h + +/opt/ros/hydro/include/ros/topic.h +common.h +/opt/ros/hydro/include/ros/common.h +node_handle.h +/opt/ros/hydro/include/ros/node_handle.h +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/transport_hints.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +boost/lexical_cast.hpp +- + +/opt/ros/hydro/include/ros/types.h +stdint.h +- + +/opt/ros/hydro/include/ros/wall_timer.h +common.h +/opt/ros/hydro/include/ros/common.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +wall_timer_options.h +/opt/ros/hydro/include/ros/wall_timer_options.h + +/opt/ros/hydro/include/ros/wall_timer_options.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h + +/opt/ros/hydro/include/rosconsole/macros_generated.h + +/opt/ros/hydro/include/sensor_msgs/ChannelFloat32.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/sensor_msgs/JointState.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- + +/opt/ros/hydro/include/sensor_msgs/PointCloud.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Point32.h +- +sensor_msgs/ChannelFloat32.h +- + +/opt/ros/hydro/include/sensor_msgs/PointCloud2.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +sensor_msgs/PointField.h +- + +/opt/ros/hydro/include/sensor_msgs/PointField.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/sensor_msgs/point_cloud_conversion.h +sensor_msgs/PointCloud.h +- +sensor_msgs/PointCloud2.h +- + +/opt/ros/hydro/include/std_msgs/Bool.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/Empty.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/Float32.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/Float64.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/Header.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/Int8.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/UInt8.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_srvs/Empty.h +ros/service_traits.h +- +std_srvs/EmptyRequest.h +- +std_srvs/EmptyResponse.h +- + +/opt/ros/hydro/include/std_srvs/EmptyRequest.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_srvs/EmptyResponse.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/tf/FrameGraph.h +ros/service_traits.h +- +tf/FrameGraphRequest.h +- +tf/FrameGraphResponse.h +- + +/opt/ros/hydro/include/tf/FrameGraphRequest.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/tf/FrameGraphResponse.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/tf/LinearMath/Matrix3x3.h +Vector3.h +/opt/ros/hydro/include/tf/LinearMath/Vector3.h +Quaternion.h +/opt/ros/hydro/include/tf/LinearMath/Quaternion.h + +/opt/ros/hydro/include/tf/LinearMath/MinMax.h + +/opt/ros/hydro/include/tf/LinearMath/QuadWord.h +Scalar.h +/opt/ros/hydro/include/tf/LinearMath/Scalar.h +MinMax.h +/opt/ros/hydro/include/tf/LinearMath/MinMax.h +altivec.h +- + +/opt/ros/hydro/include/tf/LinearMath/Quaternion.h +Vector3.h +/opt/ros/hydro/include/tf/LinearMath/Vector3.h +QuadWord.h +/opt/ros/hydro/include/tf/LinearMath/QuadWord.h + +/opt/ros/hydro/include/tf/LinearMath/Scalar.h +math.h +- +stdlib.h +- +cstdlib +- +cfloat +- +float.h +- +ppcintrinsics.h +- +assert.h +- +assert.h +- +assert.h +- +assert.h +- + +/opt/ros/hydro/include/tf/LinearMath/Transform.h +Matrix3x3.h +/opt/ros/hydro/include/tf/LinearMath/Matrix3x3.h + +/opt/ros/hydro/include/tf/LinearMath/Vector3.h +Scalar.h +/opt/ros/hydro/include/tf/LinearMath/Scalar.h +MinMax.h +/opt/ros/hydro/include/tf/LinearMath/MinMax.h + +/opt/ros/hydro/include/tf/exceptions.h +stdexcept +- +tf2/exceptions.h +- + +/opt/ros/hydro/include/tf/tf.h +iostream +- +iomanip +- +cmath +- +vector +- +sstream +- +map +- +tf/exceptions.h +- +tf/time_cache.h +/opt/ros/hydro/include/tf/tf/time_cache.h +boost/unordered_map.hpp +- +boost/signals.hpp +- +geometry_msgs/TwistStamped.h +/opt/ros/hydro/include/tf/geometry_msgs/TwistStamped.h +tf2_ros/buffer.h +- + +/opt/ros/hydro/include/tf/tfMessage.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/TransformStamped.h +- + +/opt/ros/hydro/include/tf/time_cache.h +set +- +boost/thread/mutex.hpp +- +tf/transform_datatypes.h +/opt/ros/hydro/include/tf/tf/transform_datatypes.h +tf/exceptions.h +/opt/ros/hydro/include/tf/tf/exceptions.h +tf/LinearMath/Transform.h +/opt/ros/hydro/include/tf/tf/LinearMath/Transform.h +sstream +- + +/opt/ros/hydro/include/tf/transform_broadcaster.h +tf/tf.h +/opt/ros/hydro/include/tf/tf/tf.h +tf/tfMessage.h +/opt/ros/hydro/include/tf/tf/tfMessage.h +tf2_ros/transform_broadcaster.h +- + +/opt/ros/hydro/include/tf/transform_datatypes.h +string +- +geometry_msgs/PointStamped.h +/opt/ros/hydro/include/tf/geometry_msgs/PointStamped.h +geometry_msgs/Vector3Stamped.h +/opt/ros/hydro/include/tf/geometry_msgs/Vector3Stamped.h +geometry_msgs/QuaternionStamped.h +/opt/ros/hydro/include/tf/geometry_msgs/QuaternionStamped.h +geometry_msgs/TransformStamped.h +/opt/ros/hydro/include/tf/geometry_msgs/TransformStamped.h +geometry_msgs/PoseStamped.h +/opt/ros/hydro/include/tf/geometry_msgs/PoseStamped.h +tf/LinearMath/Transform.h +/opt/ros/hydro/include/tf/tf/LinearMath/Transform.h +ros/time.h +/opt/ros/hydro/include/tf/ros/time.h +ros/console.h +/opt/ros/hydro/include/tf/ros/console.h + +/opt/ros/hydro/include/tf/transform_listener.h +sensor_msgs/PointCloud.h +/opt/ros/hydro/include/tf/sensor_msgs/PointCloud.h +std_msgs/Empty.h +/opt/ros/hydro/include/tf/std_msgs/Empty.h +tf/tfMessage.h +/opt/ros/hydro/include/tf/tf/tfMessage.h +tf/tf.h +/opt/ros/hydro/include/tf/tf/tf.h +ros/ros.h +/opt/ros/hydro/include/tf/ros/ros.h +ros/callback_queue.h +/opt/ros/hydro/include/tf/ros/callback_queue.h +tf/FrameGraph.h +/opt/ros/hydro/include/tf/tf/FrameGraph.h +boost/thread.hpp +/opt/ros/hydro/include/tf/boost/thread.hpp +tf2_ros/transform_listener.h +- + +/opt/ros/hydro/include/tf2/LinearMath/Quaternion.h +Vector3.h +/opt/ros/hydro/include/tf2/LinearMath/Vector3.h +QuadWord.h +/opt/ros/hydro/include/tf2/LinearMath/QuadWord.h + +/opt/ros/hydro/include/tf2/LinearMath/Vector3.h +Scalar.h +/opt/ros/hydro/include/tf2/LinearMath/Scalar.h +MinMax.h +/opt/ros/hydro/include/tf2/LinearMath/MinMax.h + +/opt/ros/hydro/include/tf2/buffer_core.h +transform_storage.h +/opt/ros/hydro/include/tf2/transform_storage.h +boost/signals.hpp +- +string +- +ros/duration.h +/opt/ros/hydro/include/tf2/ros/duration.h +ros/time.h +/opt/ros/hydro/include/tf2/ros/time.h +geometry_msgs/TransformStamped.h +/opt/ros/hydro/include/tf2/geometry_msgs/TransformStamped.h +boost/unordered_map.hpp +- +boost/thread/mutex.hpp +- +boost/function.hpp +- +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/tf2/convert.h +tf2/transform_datatypes.h +- +tf2/exceptions.h +- +geometry_msgs/TransformStamped.h +- + +/opt/ros/hydro/include/tf2/exceptions.h +stdexcept +- + +/opt/ros/hydro/include/tf2/transform_datatypes.h +string +- +ros/time.h +/opt/ros/hydro/include/tf2/ros/time.h + +/opt/ros/hydro/include/tf2/transform_storage.h +tf2/LinearMath/Vector3.h +- +tf2/LinearMath/Quaternion.h +- +ros/message_forward.h +- +ros/time.h +- +ros/types.h +- + +/opt/ros/hydro/include/tf2_msgs/FrameGraph.h +ros/service_traits.h +- +tf2_msgs/FrameGraphRequest.h +- +tf2_msgs/FrameGraphResponse.h +- + +/opt/ros/hydro/include/tf2_msgs/FrameGraphRequest.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/tf2_msgs/FrameGraphResponse.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/tf2_msgs/TFMessage.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/TransformStamped.h +- + +/opt/ros/hydro/include/tf2_ros/buffer.h +tf2_ros/buffer_interface.h +- +tf2/buffer_core.h +- +tf2_msgs/FrameGraph.h +- +ros/ros.h +- +tf2/convert.h +- + +/opt/ros/hydro/include/tf2_ros/buffer_interface.h +tf2/buffer_core.h +- +tf2/transform_datatypes.h +- +tf2/exceptions.h +- +geometry_msgs/TransformStamped.h +- +sstream +- +tf2/convert.h +- + +/opt/ros/hydro/include/tf2_ros/transform_broadcaster.h +ros/ros.h +/opt/ros/hydro/include/tf2_ros/ros/ros.h +geometry_msgs/TransformStamped.h +/opt/ros/hydro/include/tf2_ros/geometry_msgs/TransformStamped.h + +/opt/ros/hydro/include/tf2_ros/transform_listener.h +std_msgs/Empty.h +/opt/ros/hydro/include/tf2_ros/std_msgs/Empty.h +tf2_msgs/TFMessage.h +/opt/ros/hydro/include/tf2_ros/tf2_msgs/TFMessage.h +ros/ros.h +/opt/ros/hydro/include/tf2_ros/ros/ros.h +ros/callback_queue.h +/opt/ros/hydro/include/tf2_ros/ros/callback_queue.h +tf2_ros/buffer.h +/opt/ros/hydro/include/tf2_ros/tf2_ros/buffer.h +boost/thread.hpp +/opt/ros/hydro/include/tf2_ros/boost/thread.hpp + +/usr/local/Aria/include/ArACTS.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArAMPTU.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h + +/usr/local/Aria/include/ArASyncTask.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArThread.h +/usr/local/Aria/include/ArThread.h + +/usr/local/Aria/include/ArAction.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArArg.h +/usr/local/Aria/include/ArArg.h +ArActionDesired.h +/usr/local/Aria/include/ArActionDesired.h +map +- +string +- + +/usr/local/Aria/include/ArActionAvoidFront.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionAvoidSide.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionBumpers.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionColorFollow.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArACTS.h +/usr/local/Aria/include/ArACTS.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h + +/usr/local/Aria/include/ArActionConstantVelocity.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionDeceleratingLimiter.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionDesired.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArActionDriveDistance.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionGoto.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionGotoStraight.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionGroup.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +list +- + +/usr/local/Aria/include/ArActionGroups.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArActionGroup.h +/usr/local/Aria/include/ArActionGroup.h +ArActionColorFollow.h +/usr/local/Aria/include/ArActionColorFollow.h +ArACTS.h +/usr/local/Aria/include/ArACTS.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h + +/usr/local/Aria/include/ArActionIRs.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArRobotParams.h +/usr/local/Aria/include/ArRobotParams.h +vector +- + +/usr/local/Aria/include/ArActionInput.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionJoydrive.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArJoyHandler.h +/usr/local/Aria/include/ArJoyHandler.h + +/usr/local/Aria/include/ArActionKeydrive.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArActionLimiterBackwards.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionLimiterForwards.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionLimiterRot.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionLimiterTableSensor.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionMovementParameters.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArMapObject.h +/usr/local/Aria/include/ArMapObject.h + +/usr/local/Aria/include/ArActionMovementParametersDebugging.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArMapObject.h +/usr/local/Aria/include/ArMapObject.h + +/usr/local/Aria/include/ArActionRatioInput.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionRobotJoydrive.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionStallRecover.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionStop.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArActionTriangleDriveTo.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArLineFinder.h +/usr/local/Aria/include/ArLineFinder.h + +/usr/local/Aria/include/ArActionTurn.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h + +/usr/local/Aria/include/ArAnalogGyro.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArArg.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArArgumentBuilder.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArArgumentParser.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h + +/usr/local/Aria/include/ArBasePacket.h +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArBatteryConnector.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h + +/usr/local/Aria/include/ArBatteryMTX.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h + +/usr/local/Aria/include/ArBumpers.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h + +/usr/local/Aria/include/ArCameraCollection.h +list +- +map +- +string +- +ArConfigArg.h +/usr/local/Aria/include/ArConfigArg.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h + +/usr/local/Aria/include/ArCameraCommands.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArCommands.h + +/usr/local/Aria/include/ArCondition.h +pthread.h +- +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArConfig.h +ArConfigArg.h +/usr/local/Aria/include/ArConfigArg.h +ArFileParser.h +/usr/local/Aria/include/ArFileParser.h +ArHasFileName.h +/usr/local/Aria/include/ArHasFileName.h +set +- + +/usr/local/Aria/include/ArConfigArg.h +map +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArConfigGroup.h +ArConfig.h +/usr/local/Aria/include/ArConfig.h + +/usr/local/Aria/include/ArDPPTU.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h +vector +- + +/usr/local/Aria/include/ArDataLogger.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +vector +- + +/usr/local/Aria/include/ArDeviceConnection.h +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h + +/usr/local/Aria/include/ArDrawingData.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArExitErrorSource.h + +/usr/local/Aria/include/ArFileParser.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArForbiddenRangeDevice.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArMapInterface.h +/usr/local/Aria/include/ArMapInterface.h + +/usr/local/Aria/include/ArFunctor.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaOSDef.h +/usr/local/Aria/include/ariaOSDef.h +stdarg.h +- +stdio.h +- + +/usr/local/Aria/include/ArFunctorASyncTask.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArASyncTask.h +/usr/local/Aria/include/ArASyncTask.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArGPS.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ArNMEAParser.h +/usr/local/Aria/include/ArNMEAParser.h +math.h +- +string +- +vector +- + +/usr/local/Aria/include/ArGPSCoords.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArGripper.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArHasFileName.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArIRs.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h + +/usr/local/Aria/include/ArInterpolation.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArIrrfDevice.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArJoyHandler.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +mmsystem.h +- +stdio.h +- +unistd.h +- +stdlib.h +- +sys/ioctl.h +- +fcntl.h +- +linux/joystick.h +- + +/usr/local/Aria/include/ArKeyHandler.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +map +- +stdio.h +- +termios.h +- +unistd.h +- + +/usr/local/Aria/include/ArLCDConnector.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h + +/usr/local/Aria/include/ArLCDMTX.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h + +/usr/local/Aria/include/ArLMS1XX.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArLMS2xx.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArLMS2xxPacket.h +/usr/local/Aria/include/ArLMS2xxPacket.h +ArLMS2xxPacketReceiver.h +/usr/local/Aria/include/ArLMS2xxPacketReceiver.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArCondition.h +/usr/local/Aria/include/ArCondition.h + +/usr/local/Aria/include/ArLMS2xxPacket.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArLMS2xxPacketReceiver.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h +ArLMS2xxPacket.h +/usr/local/Aria/include/ArLMS2xxPacket.h + +/usr/local/Aria/include/ArLaser.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDeviceThreaded.h +/usr/local/Aria/include/ArRangeDeviceThreaded.h + +/usr/local/Aria/include/ArLaserConnector.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h + +/usr/local/Aria/include/ArLaserFilter.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArLaserLogger.h +stdio.h +- +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArLaserReflectorDevice.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArLineFinder.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +vector +- + +/usr/local/Aria/include/ArLog.h +stdio.h +- +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArLogFileConnection.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h +string +- +stdio.h +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArMTXIO.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArMap.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArMapComponents.h +/usr/local/Aria/include/ArMapComponents.h +ArMapInterface.h +/usr/local/Aria/include/ArMapInterface.h +ArMapUtils.h +/usr/local/Aria/include/ArMapUtils.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +vector +- + +/usr/local/Aria/include/ArMapComponents.h +ArMapInterface.h +/usr/local/Aria/include/ArMapInterface.h + +/usr/local/Aria/include/ArMapInterface.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArMapObject.h +/usr/local/Aria/include/ArMapObject.h +ArMapUtils.h +/usr/local/Aria/include/ArMapUtils.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArHasFileName.h +/usr/local/Aria/include/ArHasFileName.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +vector +- +set +- + +/usr/local/Aria/include/ArMapObject.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArMapUtils.h +algorithm +- +functional +- +map +- +set +- +string +- +vector +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArMode.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +string +- +list +- + +/usr/local/Aria/include/ArModes.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArMode.h +/usr/local/Aria/include/ArMode.h +ArActionGroups.h +/usr/local/Aria/include/ArActionGroups.h +ArGripper.h +/usr/local/Aria/include/ArGripper.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h +ArTCMCompassRobot.h +/usr/local/Aria/include/ArTCMCompassRobot.h +ArRobotConfigPacketReader.h +/usr/local/Aria/include/ArRobotConfigPacketReader.h + +/usr/local/Aria/include/ArModule.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArModuleLoader.h +map +- +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArMutex.h +pthread.h +- +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ArNMEAParser.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h +string +- +vector +- + +/usr/local/Aria/include/ArNetServer.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSocket.h +/usr/local/Aria/include/ArSocket.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +list +- + +/usr/local/Aria/include/ArNovatelGPS.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArGPS.h +/usr/local/Aria/include/ArGPS.h + +/usr/local/Aria/include/ArP2Arm.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ariaOSDef.h +/usr/local/Aria/include/ariaOSDef.h + +/usr/local/Aria/include/ArPTZ.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArCommands.h +/usr/local/Aria/include/ArCommands.h +ArPTZConnector.h +/usr/local/Aria/include/ArPTZConnector.h + +/usr/local/Aria/include/ArPTZConnector.h +string +- +vector +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobotParams.h +/usr/local/Aria/include/ArRobotParams.h +ariaInternal.h +/usr/local/Aria/include/ariaInternal.h + +/usr/local/Aria/include/ArPriorityResolver.h +ArResolver.h +/usr/local/Aria/include/ArResolver.h + +/usr/local/Aria/include/ArRVisionPTZ.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h + +/usr/local/Aria/include/ArRangeBuffer.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArTransform.h +/usr/local/Aria/include/ArTransform.h +list +- +vector +- + +/usr/local/Aria/include/ArRangeDevice.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeBuffer.h +/usr/local/Aria/include/ArRangeBuffer.h +ArSensorReading.h +/usr/local/Aria/include/ArSensorReading.h +ArDrawingData.h +/usr/local/Aria/include/ArDrawingData.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +set +- + +/usr/local/Aria/include/ArRangeDeviceThreaded.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctorASyncTask.h +/usr/local/Aria/include/ArFunctorASyncTask.h + +/usr/local/Aria/include/ArRatioInputJoydrive.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArActionRatioInput.h +/usr/local/Aria/include/ArActionRatioInput.h +ArJoyHandler.h +/usr/local/Aria/include/ArJoyHandler.h + +/usr/local/Aria/include/ArRatioInputKeydrive.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArActionRatioInput.h +/usr/local/Aria/include/ArActionRatioInput.h + +/usr/local/Aria/include/ArRatioInputRobotJoydrive.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArActionRatioInput.h +/usr/local/Aria/include/ArActionRatioInput.h + +/usr/local/Aria/include/ArRecurrentTask.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArThread.h +/usr/local/Aria/include/ArThread.h +ArASyncTask.h +/usr/local/Aria/include/ArASyncTask.h + +/usr/local/Aria/include/ArResolver.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArActionDesired.h +/usr/local/Aria/include/ArActionDesired.h +string +- + +/usr/local/Aria/include/ArRobot.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobotPacketSender.h +/usr/local/Aria/include/ArRobotPacketSender.h +ArRobotPacketReceiver.h +/usr/local/Aria/include/ArRobotPacketReceiver.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArSyncTask.h +/usr/local/Aria/include/ArSyncTask.h +ArSensorReading.h +/usr/local/Aria/include/ArSensorReading.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ArCondition.h +/usr/local/Aria/include/ArCondition.h +ArSyncLoop.h +/usr/local/Aria/include/ArSyncLoop.h +ArRobotPacketReaderThread.h +/usr/local/Aria/include/ArRobotPacketReaderThread.h +ArRobotParams.h +/usr/local/Aria/include/ArRobotParams.h +ArActionDesired.h +/usr/local/Aria/include/ArActionDesired.h +ArResolver.h +/usr/local/Aria/include/ArResolver.h +ArTransform.h +/usr/local/Aria/include/ArTransform.h +ArInterpolation.h +/usr/local/Aria/include/ArInterpolation.h +ArKeyHandler.h +/usr/local/Aria/include/ArKeyHandler.h +list +- + +/usr/local/Aria/include/ArRobotBatteryPacketReader.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArRobotConfig.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArRobotConfigPacketReader.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h + +/usr/local/Aria/include/ArRobotConnector.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArRobotJoyHandler.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArRobotPacket.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArRobotPacketReaderThread.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArASyncTask.h +/usr/local/Aria/include/ArASyncTask.h + +/usr/local/Aria/include/ArRobotPacketReceiver.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h + +/usr/local/Aria/include/ArRobotPacketSender.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h + +/usr/local/Aria/include/ArRobotParams.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArConfig.h +/usr/local/Aria/include/ArConfig.h +vector +- + +/usr/local/Aria/include/ArRobotTypes.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobotParams.h +/usr/local/Aria/include/ArRobotParams.h + +/usr/local/Aria/include/ArS3Series.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaOSDef.h +/usr/local/Aria/include/ariaOSDef.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArSZSeries.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaOSDef.h +/usr/local/Aria/include/ariaOSDef.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArSensorReading.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArTransform.h +/usr/local/Aria/include/ArTransform.h + +/usr/local/Aria/include/ArSerialConnection.h +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h + +/usr/local/Aria/include/ArSick.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArCondition.h +/usr/local/Aria/include/ArCondition.h +ArLMS2xx.h +/usr/local/Aria/include/ArLMS2xx.h + +/usr/local/Aria/include/ArSignalHandler.h +list +- +signal.h +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArASyncTask.h +/usr/local/Aria/include/ArASyncTask.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArSimpleConnector.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h +ArLaserConnector.h +/usr/local/Aria/include/ArLaserConnector.h + +/usr/local/Aria/include/ArSimulatedLaser.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h + +/usr/local/Aria/include/ArSocket.h +sys/time.h +- +sys/types.h +- +unistd.h +- +sys/types.h +- +sys/socket.h +- +sys/stat.h +- +sys/param.h +- +fcntl.h +- +netinet/in.h +- +stdio.h +- +errno.h +- +stdarg.h +- +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArSonarAutoDisabler.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArSonarConnector.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h + +/usr/local/Aria/include/ArSonarDevice.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArSonarMTX.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRangeDevice.h +/usr/local/Aria/include/ArRangeDevice.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h + +/usr/local/Aria/include/ArSonyPTZ.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h + +/usr/local/Aria/include/ArSoundPlayer.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h + +/usr/local/Aria/include/ArSoundsQueue.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArASyncTask.h +/usr/local/Aria/include/ArASyncTask.h +ArCondition.h +/usr/local/Aria/include/ArCondition.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArSpeech.h +/usr/local/Aria/include/ArSpeech.h +list +- +string +- +set +- + +/usr/local/Aria/include/ArSpeech.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArConfig.h +/usr/local/Aria/include/ArConfig.h +list +- +string +- + +/usr/local/Aria/include/ArStringInfoGroup.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +string +- +set +- +list +- + +/usr/local/Aria/include/ArSyncLoop.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArASyncTask.h +/usr/local/Aria/include/ArASyncTask.h +ArSyncTask.h +/usr/local/Aria/include/ArSyncTask.h + +/usr/local/Aria/include/ArSyncTask.h +string +- +map +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArTaskState.h +/usr/local/Aria/include/ArTaskState.h + +/usr/local/Aria/include/ArTCM2.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArTCMCompassDirect.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h +ArTCM2.h +/usr/local/Aria/include/ArTCM2.h +ArNMEAParser.h +/usr/local/Aria/include/ArNMEAParser.h + +/usr/local/Aria/include/ArTCMCompassRobot.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArCommands.h +/usr/local/Aria/include/ArCommands.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ArTCM2.h +/usr/local/Aria/include/ArTCM2.h + +/usr/local/Aria/include/ArTaskState.h + +/usr/local/Aria/include/ArTcpConnection.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h +string +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSocket.h +/usr/local/Aria/include/ArSocket.h + +/usr/local/Aria/include/ArThread.h +map +- +pthread.h +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArLog.h +/usr/local/Aria/include/ArLog.h +vector +- +map +- + +/usr/local/Aria/include/ArTransform.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h + +/usr/local/Aria/include/ArTrimbleGPS.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArGPS.h +/usr/local/Aria/include/ArGPS.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +deque +- + +/usr/local/Aria/include/ArUrg.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h + +/usr/local/Aria/include/ArUrg_2_0.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArDeviceConnection.h +/usr/local/Aria/include/ArDeviceConnection.h + +/usr/local/Aria/include/ArVCC4.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArBasePacket.h +/usr/local/Aria/include/ArBasePacket.h +ArPTZ.h +/usr/local/Aria/include/ArPTZ.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArCommands.h +/usr/local/Aria/include/ArCommands.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h + +/usr/local/Aria/include/ArVersalogicIO.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h + +/usr/local/Aria/include/ArZippable.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/Aria.h +ariaOSDef.h +/usr/local/Aria/include/ariaOSDef.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArSerialConnection.h +/usr/local/Aria/include/ArSerialConnection.h +ArTcpConnection.h +/usr/local/Aria/include/ArTcpConnection.h +ArSimpleConnector.h +/usr/local/Aria/include/ArSimpleConnector.h +ArLogFileConnection.h +/usr/local/Aria/include/ArLogFileConnection.h +ArLog.h +/usr/local/Aria/include/ArLog.h +ArRobotPacket.h +/usr/local/Aria/include/ArRobotPacket.h +ArRobotPacketSender.h +/usr/local/Aria/include/ArRobotPacketSender.h +ArRobotPacketReceiver.h +/usr/local/Aria/include/ArRobotPacketReceiver.h +ArRobotConfigPacketReader.h +/usr/local/Aria/include/ArRobotConfigPacketReader.h +ArRobotTypes.h +/usr/local/Aria/include/ArRobotTypes.h +ariaUtil.h +/usr/local/Aria/include/ariaUtil.h +ArArgumentBuilder.h +/usr/local/Aria/include/ArArgumentBuilder.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ArFileParser.h +/usr/local/Aria/include/ArFileParser.h +ArConfig.h +/usr/local/Aria/include/ArConfig.h +ArConfigArg.h +/usr/local/Aria/include/ArConfigArg.h +ArConfigGroup.h +/usr/local/Aria/include/ArConfigGroup.h +ArRobot.h +/usr/local/Aria/include/ArRobot.h +ArCommands.h +/usr/local/Aria/include/ArCommands.h +ArJoyHandler.h +/usr/local/Aria/include/ArJoyHandler.h +ArSyncTask.h +/usr/local/Aria/include/ArSyncTask.h +ArTaskState.h +/usr/local/Aria/include/ArTaskState.h +ariaInternal.h +/usr/local/Aria/include/ariaInternal.h +ArSonarDevice.h +/usr/local/Aria/include/ArSonarDevice.h +ArPriorityResolver.h +/usr/local/Aria/include/ArPriorityResolver.h +ArAction.h +/usr/local/Aria/include/ArAction.h +ArActionGroup.h +/usr/local/Aria/include/ArActionGroup.h +ArActionGroups.h +/usr/local/Aria/include/ArActionGroups.h +ArActionDeceleratingLimiter.h +/usr/local/Aria/include/ArActionDeceleratingLimiter.h +ArActionLimiterForwards.h +/usr/local/Aria/include/ArActionLimiterForwards.h +ArActionLimiterBackwards.h +/usr/local/Aria/include/ArActionLimiterBackwards.h +ArActionLimiterTableSensor.h +/usr/local/Aria/include/ArActionLimiterTableSensor.h +ArActionBumpers.h +/usr/local/Aria/include/ArActionBumpers.h +ArActionIRs.h +/usr/local/Aria/include/ArActionIRs.h +ArActionStallRecover.h +/usr/local/Aria/include/ArActionStallRecover.h +ArActionAvoidFront.h +/usr/local/Aria/include/ArActionAvoidFront.h +ArActionAvoidSide.h +/usr/local/Aria/include/ArActionAvoidSide.h +ArActionConstantVelocity.h +/usr/local/Aria/include/ArActionConstantVelocity.h +ArActionInput.h +/usr/local/Aria/include/ArActionInput.h +ArActionRobotJoydrive.h +/usr/local/Aria/include/ArActionRobotJoydrive.h +ArActionJoydrive.h +/usr/local/Aria/include/ArActionJoydrive.h +ArActionKeydrive.h +/usr/local/Aria/include/ArActionKeydrive.h +ArActionTriangleDriveTo.h +/usr/local/Aria/include/ArActionTriangleDriveTo.h +ArActionTurn.h +/usr/local/Aria/include/ArActionTurn.h +ArActionRatioInput.h +/usr/local/Aria/include/ArActionRatioInput.h +ArActionStop.h +/usr/local/Aria/include/ArActionStop.h +ArActionGoto.h +/usr/local/Aria/include/ArActionGoto.h +ArModule.h +/usr/local/Aria/include/ArModule.h +ArModuleLoader.h +/usr/local/Aria/include/ArModuleLoader.h +ArRecurrentTask.h +/usr/local/Aria/include/ArRecurrentTask.h +ArInterpolation.h +/usr/local/Aria/include/ArInterpolation.h +ArGripper.h +/usr/local/Aria/include/ArGripper.h +ArSonyPTZ.h +/usr/local/Aria/include/ArSonyPTZ.h +ArRVisionPTZ.h +/usr/local/Aria/include/ArRVisionPTZ.h +ArAMPTU.h +/usr/local/Aria/include/ArAMPTU.h +ArP2Arm.h +/usr/local/Aria/include/ArP2Arm.h +ArACTS.h +/usr/local/Aria/include/ArACTS.h +ArSick.h +/usr/local/Aria/include/ArSick.h +ArLaserLogger.h +/usr/local/Aria/include/ArLaserLogger.h +ArIrrfDevice.h +/usr/local/Aria/include/ArIrrfDevice.h +ArKeyHandler.h +/usr/local/Aria/include/ArKeyHandler.h +ArDPPTU.h +/usr/local/Aria/include/ArDPPTU.h +ArVCC4.h +/usr/local/Aria/include/ArVCC4.h +ArMode.h +/usr/local/Aria/include/ArMode.h +ArModes.h +/usr/local/Aria/include/ArModes.h +ArNetServer.h +/usr/local/Aria/include/ArNetServer.h +ArSignalHandler.h +/usr/local/Aria/include/ArSignalHandler.h +ArAnalogGyro.h +/usr/local/Aria/include/ArAnalogGyro.h +ArMapInterface.h +/usr/local/Aria/include/ArMapInterface.h +ArMapObject.h +/usr/local/Aria/include/ArMapObject.h +ArMap.h +/usr/local/Aria/include/ArMap.h +ArLineFinder.h +/usr/local/Aria/include/ArLineFinder.h +ArBumpers.h +/usr/local/Aria/include/ArBumpers.h +ArIRs.h +/usr/local/Aria/include/ArIRs.h +ArDrawingData.h +/usr/local/Aria/include/ArDrawingData.h +ArForbiddenRangeDevice.h +/usr/local/Aria/include/ArForbiddenRangeDevice.h +ArTCM2.h +/usr/local/Aria/include/ArTCM2.h +ArVersalogicIO.h +/usr/local/Aria/include/ArVersalogicIO.h +ArMTXIO.h +/usr/local/Aria/include/ArMTXIO.h +ArActionGotoStraight.h +/usr/local/Aria/include/ArActionGotoStraight.h +ArDataLogger.h +/usr/local/Aria/include/ArDataLogger.h +ArRobotJoyHandler.h +/usr/local/Aria/include/ArRobotJoyHandler.h +ArRatioInputKeydrive.h +/usr/local/Aria/include/ArRatioInputKeydrive.h +ArRatioInputJoydrive.h +/usr/local/Aria/include/ArRatioInputJoydrive.h +ArRatioInputRobotJoydrive.h +/usr/local/Aria/include/ArRatioInputRobotJoydrive.h +ArActionMovementParameters.h +/usr/local/Aria/include/ArActionMovementParameters.h +ArSoundPlayer.h +/usr/local/Aria/include/ArSoundPlayer.h +ArSoundsQueue.h +/usr/local/Aria/include/ArSoundsQueue.h +ArCameraCollection.h +/usr/local/Aria/include/ArCameraCollection.h +ArCameraCommands.h +/usr/local/Aria/include/ArCameraCommands.h +ArStringInfoGroup.h +/usr/local/Aria/include/ArStringInfoGroup.h +ArSonarAutoDisabler.h +/usr/local/Aria/include/ArSonarAutoDisabler.h +ArActionDriveDistance.h +/usr/local/Aria/include/ArActionDriveDistance.h +ArLaserReflectorDevice.h +/usr/local/Aria/include/ArLaserReflectorDevice.h +ArRobotConfig.h +/usr/local/Aria/include/ArRobotConfig.h +ArTCMCompassRobot.h +/usr/local/Aria/include/ArTCMCompassRobot.h +ArTCMCompassDirect.h +/usr/local/Aria/include/ArTCMCompassDirect.h +ArLaserFilter.h +/usr/local/Aria/include/ArLaserFilter.h +ArUrg.h +/usr/local/Aria/include/ArUrg.h +ArSpeech.h +/usr/local/Aria/include/ArSpeech.h +ArGPS.h +/usr/local/Aria/include/ArGPS.h +ArTrimbleGPS.h +/usr/local/Aria/include/ArTrimbleGPS.h +ArNovatelGPS.h +/usr/local/Aria/include/ArNovatelGPS.h +ArGPSCoords.h +/usr/local/Aria/include/ArGPSCoords.h +ArLaser.h +/usr/local/Aria/include/ArLaser.h +ArRobotConnector.h +/usr/local/Aria/include/ArRobotConnector.h +ArLaserConnector.h +/usr/local/Aria/include/ArLaserConnector.h +ArSonarConnector.h +/usr/local/Aria/include/ArSonarConnector.h +ArBatteryConnector.h +/usr/local/Aria/include/ArBatteryConnector.h +ArLCDConnector.h +/usr/local/Aria/include/ArLCDConnector.h +ArSonarMTX.h +/usr/local/Aria/include/ArSonarMTX.h +ArBatteryMTX.h +/usr/local/Aria/include/ArBatteryMTX.h +ArLCDMTX.h +/usr/local/Aria/include/ArLCDMTX.h +ArSimulatedLaser.h +/usr/local/Aria/include/ArSimulatedLaser.h +ArExitErrorSource.h +/usr/local/Aria/include/ArExitErrorSource.h +ArActionLimiterRot.h +/usr/local/Aria/include/ArActionLimiterRot.h +ArRobotBatteryPacketReader.h +/usr/local/Aria/include/ArRobotBatteryPacketReader.h +ArLMS1XX.h +/usr/local/Aria/include/ArLMS1XX.h +ArUrg_2_0.h +/usr/local/Aria/include/ArUrg_2_0.h +ArActionMovementParametersDebugging.h +/usr/local/Aria/include/ArActionMovementParametersDebugging.h +ArZippable.h +/usr/local/Aria/include/ArZippable.h +ArS3Series.h +/usr/local/Aria/include/ArS3Series.h +ArSZSeries.h +/usr/local/Aria/include/ArSZSeries.h +ArRobotPacketReaderThread.h +/usr/local/Aria/include/ArRobotPacketReaderThread.h +ArHasFileName.h +/usr/local/Aria/include/ArHasFileName.h + +/usr/local/Aria/include/ariaInternal.h +ArMutex.h +/usr/local/Aria/include/ArMutex.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArConfig.h +/usr/local/Aria/include/ArConfig.h +ArStringInfoGroup.h +/usr/local/Aria/include/ArStringInfoGroup.h + +/usr/local/Aria/include/ariaOSDef.h +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h + +/usr/local/Aria/include/ariaTypedefs.h +time.h +- +string +- +map +- +list +- +winsock2.h +- +windows.h +- + +/usr/local/Aria/include/ariaUtil.h +string +- +list +- +map +- +math.h +- +stdarg.h +- +stdlib.h +- +limits.h +- +string.h +- +float.h +- +sys/timeb.h +- +sys/stat.h +- +sys/types.h +- +sys/stat.h +- +sys/time.h +- +unistd.h +- +strings.h +- +time.h +- +ariaTypedefs.h +/usr/local/Aria/include/ariaTypedefs.h +ArLog.h +/usr/local/Aria/include/ArLog.h +ArFunctor.h +/usr/local/Aria/include/ArFunctor.h +ArArgumentParser.h +/usr/local/Aria/include/ArArgumentParser.h +ariaOSDef.h +/usr/local/Aria/include/ariaOSDef.h + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/DependInfo.cmake new file mode 100644 index 0000000..111026e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/DependInfo.cmake @@ -0,0 +1,21 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +SET(CMAKE_DEPENDS_CHECK_CXX + "/home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp" "/home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o" + ) +SET(CMAKE_CXX_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o new file mode 100644 index 0000000..b5d5232 Binary files /dev/null and b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o differ diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/build.make new file mode 100644 index 0000000..aaf596b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/build.make @@ -0,0 +1,126 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Include any dependencies generated for this target. +include rosaria/CMakeFiles/RosAria.dir/depend.make + +# Include the progress variables for this target. +include rosaria/CMakeFiles/RosAria.dir/progress.make + +# Include the compile flags for this target's objects. +include rosaria/CMakeFiles/RosAria.dir/flags.make + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: rosaria/CMakeFiles/RosAria.dir/flags.make +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o" + cd /home/lab1_5/ws/ws_linux/build/rosaria && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -fPIC -o CMakeFiles/RosAria.dir/RosAria.cpp.o -c /home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/RosAria.dir/RosAria.cpp.i" + cd /home/lab1_5/ws/ws_linux/build/rosaria && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -fPIC -E /home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp > CMakeFiles/RosAria.dir/RosAria.cpp.i + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/RosAria.dir/RosAria.cpp.s" + cd /home/lab1_5/ws/ws_linux/build/rosaria && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -fPIC -S /home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp -o CMakeFiles/RosAria.dir/RosAria.cpp.s + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.requires: +.PHONY : rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.requires + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.provides: rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.requires + $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.provides.build +.PHONY : rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.provides + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.provides.build: rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o + +# Object files for target RosAria +RosAria_OBJECTS = \ +"CMakeFiles/RosAria.dir/RosAria.cpp.o" + +# External object files for target RosAria +RosAria_EXTERNAL_OBJECTS = + +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libtf.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libtf2_ros.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libactionlib.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libmessage_filters.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libroscpp.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_signals-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_filesystem-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libxmlrpcpp.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libtf2.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/librosconsole.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/librosconsole_log4cxx.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/librosconsole_backend_interface.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/liblog4cxx.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_regex-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libdynamic_reconfigure_config_init_mutex.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libroscpp_serialization.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/librostime.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_date_time-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_system-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_thread-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/x86_64-linux-gnu/libpthread.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libcpp_common.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libconsole_bridge.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/libboost_thread-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /usr/lib/x86_64-linux-gnu/libpthread.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libcpp_common.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: /opt/ros/hydro/lib/libconsole_bridge.so +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: rosaria/CMakeFiles/RosAria.dir/build.make +/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria: rosaria/CMakeFiles/RosAria.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX executable /home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria" + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/RosAria.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/RosAria.dir/build: /home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria +.PHONY : rosaria/CMakeFiles/RosAria.dir/build + +rosaria/CMakeFiles/RosAria.dir/requires: rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o.requires +.PHONY : rosaria/CMakeFiles/RosAria.dir/requires + +rosaria/CMakeFiles/RosAria.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/RosAria.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/RosAria.dir/clean + +rosaria/CMakeFiles/RosAria.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/RosAria.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/cmake_clean.cmake new file mode 100644 index 0000000..941f843 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/RosAria.dir/RosAria.cpp.o" + "/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria.pdb" + "/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang CXX) + INCLUDE(CMakeFiles/RosAria.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/depend.internal new file mode 100644 index 0000000..45a50b4 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/depend.internal @@ -0,0 +1,302 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o + /home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h + /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h + /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h + /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h + /home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp + /opt/ros/hydro/include/XmlRpcDecl.h + /opt/ros/hydro/include/XmlRpcValue.h + /opt/ros/hydro/include/dynamic_reconfigure/BoolParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/Config.h + /opt/ros/hydro/include/dynamic_reconfigure/ConfigDescription.h + /opt/ros/hydro/include/dynamic_reconfigure/DoubleParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/Group.h + /opt/ros/hydro/include/dynamic_reconfigure/GroupState.h + /opt/ros/hydro/include/dynamic_reconfigure/IntParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/ParamDescription.h + /opt/ros/hydro/include/dynamic_reconfigure/Reconfigure.h + /opt/ros/hydro/include/dynamic_reconfigure/ReconfigureRequest.h + /opt/ros/hydro/include/dynamic_reconfigure/ReconfigureResponse.h + /opt/ros/hydro/include/dynamic_reconfigure/StrParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/config_init_mutex.h + /opt/ros/hydro/include/dynamic_reconfigure/config_tools.h + /opt/ros/hydro/include/dynamic_reconfigure/server.h + /opt/ros/hydro/include/geometry_msgs/Point.h + /opt/ros/hydro/include/geometry_msgs/Point32.h + /opt/ros/hydro/include/geometry_msgs/PointStamped.h + /opt/ros/hydro/include/geometry_msgs/Pose.h + /opt/ros/hydro/include/geometry_msgs/PoseStamped.h + /opt/ros/hydro/include/geometry_msgs/PoseWithCovariance.h + /opt/ros/hydro/include/geometry_msgs/Quaternion.h + /opt/ros/hydro/include/geometry_msgs/QuaternionStamped.h + /opt/ros/hydro/include/geometry_msgs/Transform.h + /opt/ros/hydro/include/geometry_msgs/TransformStamped.h + /opt/ros/hydro/include/geometry_msgs/Twist.h + /opt/ros/hydro/include/geometry_msgs/TwistStamped.h + /opt/ros/hydro/include/geometry_msgs/TwistWithCovariance.h + /opt/ros/hydro/include/geometry_msgs/Vector3.h + /opt/ros/hydro/include/geometry_msgs/Vector3Stamped.h + /opt/ros/hydro/include/nav_msgs/Odometry.h + /opt/ros/hydro/include/ros/advertise_options.h + /opt/ros/hydro/include/ros/advertise_service_options.h + /opt/ros/hydro/include/ros/assert.h + /opt/ros/hydro/include/ros/builtin_message_traits.h + /opt/ros/hydro/include/ros/callback_queue.h + /opt/ros/hydro/include/ros/callback_queue_interface.h + /opt/ros/hydro/include/ros/common.h + /opt/ros/hydro/include/ros/console.h + /opt/ros/hydro/include/ros/console_backend.h + /opt/ros/hydro/include/ros/datatypes.h + /opt/ros/hydro/include/ros/duration.h + /opt/ros/hydro/include/ros/exception.h + /opt/ros/hydro/include/ros/exceptions.h + /opt/ros/hydro/include/ros/forwards.h + /opt/ros/hydro/include/ros/init.h + /opt/ros/hydro/include/ros/macros.h + /opt/ros/hydro/include/ros/master.h + /opt/ros/hydro/include/ros/message.h + /opt/ros/hydro/include/ros/message_event.h + /opt/ros/hydro/include/ros/message_forward.h + /opt/ros/hydro/include/ros/message_operations.h + /opt/ros/hydro/include/ros/message_traits.h + /opt/ros/hydro/include/ros/names.h + /opt/ros/hydro/include/ros/node_handle.h + /opt/ros/hydro/include/ros/param.h + /opt/ros/hydro/include/ros/parameter_adapter.h + /opt/ros/hydro/include/ros/platform.h + /opt/ros/hydro/include/ros/publisher.h + /opt/ros/hydro/include/ros/rate.h + /opt/ros/hydro/include/ros/ros.h + /opt/ros/hydro/include/ros/roscpp_serialization_macros.h + /opt/ros/hydro/include/ros/rostime_decl.h + /opt/ros/hydro/include/ros/serialization.h + /opt/ros/hydro/include/ros/serialized_message.h + /opt/ros/hydro/include/ros/service.h + /opt/ros/hydro/include/ros/service_callback_helper.h + /opt/ros/hydro/include/ros/service_client.h + /opt/ros/hydro/include/ros/service_client_options.h + /opt/ros/hydro/include/ros/service_server.h + /opt/ros/hydro/include/ros/service_traits.h + /opt/ros/hydro/include/ros/single_subscriber_publisher.h + /opt/ros/hydro/include/ros/spinner.h + /opt/ros/hydro/include/ros/static_assert.h + /opt/ros/hydro/include/ros/subscribe_options.h + /opt/ros/hydro/include/ros/subscriber.h + /opt/ros/hydro/include/ros/subscription_callback_helper.h + /opt/ros/hydro/include/ros/this_node.h + /opt/ros/hydro/include/ros/time.h + /opt/ros/hydro/include/ros/timer.h + /opt/ros/hydro/include/ros/timer_options.h + /opt/ros/hydro/include/ros/topic.h + /opt/ros/hydro/include/ros/transport_hints.h + /opt/ros/hydro/include/ros/types.h + /opt/ros/hydro/include/ros/wall_timer.h + /opt/ros/hydro/include/ros/wall_timer_options.h + /opt/ros/hydro/include/rosconsole/macros_generated.h + /opt/ros/hydro/include/sensor_msgs/ChannelFloat32.h + /opt/ros/hydro/include/sensor_msgs/JointState.h + /opt/ros/hydro/include/sensor_msgs/PointCloud.h + /opt/ros/hydro/include/sensor_msgs/PointCloud2.h + /opt/ros/hydro/include/sensor_msgs/PointField.h + /opt/ros/hydro/include/sensor_msgs/point_cloud_conversion.h + /opt/ros/hydro/include/std_msgs/Bool.h + /opt/ros/hydro/include/std_msgs/Empty.h + /opt/ros/hydro/include/std_msgs/Float32.h + /opt/ros/hydro/include/std_msgs/Float64.h + /opt/ros/hydro/include/std_msgs/Header.h + /opt/ros/hydro/include/std_msgs/Int8.h + /opt/ros/hydro/include/std_msgs/UInt8.h + /opt/ros/hydro/include/std_srvs/Empty.h + /opt/ros/hydro/include/std_srvs/EmptyRequest.h + /opt/ros/hydro/include/std_srvs/EmptyResponse.h + /opt/ros/hydro/include/tf/FrameGraph.h + /opt/ros/hydro/include/tf/FrameGraphRequest.h + /opt/ros/hydro/include/tf/FrameGraphResponse.h + /opt/ros/hydro/include/tf/LinearMath/Matrix3x3.h + /opt/ros/hydro/include/tf/LinearMath/MinMax.h + /opt/ros/hydro/include/tf/LinearMath/QuadWord.h + /opt/ros/hydro/include/tf/LinearMath/Quaternion.h + /opt/ros/hydro/include/tf/LinearMath/Scalar.h + /opt/ros/hydro/include/tf/LinearMath/Transform.h + /opt/ros/hydro/include/tf/LinearMath/Vector3.h + /opt/ros/hydro/include/tf/exceptions.h + /opt/ros/hydro/include/tf/tf.h + /opt/ros/hydro/include/tf/tfMessage.h + /opt/ros/hydro/include/tf/time_cache.h + /opt/ros/hydro/include/tf/transform_broadcaster.h + /opt/ros/hydro/include/tf/transform_datatypes.h + /opt/ros/hydro/include/tf/transform_listener.h + /opt/ros/hydro/include/tf2/LinearMath/Quaternion.h + /opt/ros/hydro/include/tf2/LinearMath/Vector3.h + /opt/ros/hydro/include/tf2/buffer_core.h + /opt/ros/hydro/include/tf2/convert.h + /opt/ros/hydro/include/tf2/exceptions.h + /opt/ros/hydro/include/tf2/transform_datatypes.h + /opt/ros/hydro/include/tf2/transform_storage.h + /opt/ros/hydro/include/tf2_msgs/FrameGraph.h + /opt/ros/hydro/include/tf2_msgs/FrameGraphRequest.h + /opt/ros/hydro/include/tf2_msgs/FrameGraphResponse.h + /opt/ros/hydro/include/tf2_msgs/TFMessage.h + /opt/ros/hydro/include/tf2_ros/buffer.h + /opt/ros/hydro/include/tf2_ros/buffer_interface.h + /opt/ros/hydro/include/tf2_ros/transform_broadcaster.h + /opt/ros/hydro/include/tf2_ros/transform_listener.h + /usr/local/Aria/include/ArACTS.h + /usr/local/Aria/include/ArAMPTU.h + /usr/local/Aria/include/ArASyncTask.h + /usr/local/Aria/include/ArAction.h + /usr/local/Aria/include/ArActionAvoidFront.h + /usr/local/Aria/include/ArActionAvoidSide.h + /usr/local/Aria/include/ArActionBumpers.h + /usr/local/Aria/include/ArActionColorFollow.h + /usr/local/Aria/include/ArActionConstantVelocity.h + /usr/local/Aria/include/ArActionDeceleratingLimiter.h + /usr/local/Aria/include/ArActionDesired.h + /usr/local/Aria/include/ArActionDriveDistance.h + /usr/local/Aria/include/ArActionGoto.h + /usr/local/Aria/include/ArActionGotoStraight.h + /usr/local/Aria/include/ArActionGroup.h + /usr/local/Aria/include/ArActionGroups.h + /usr/local/Aria/include/ArActionIRs.h + /usr/local/Aria/include/ArActionInput.h + /usr/local/Aria/include/ArActionJoydrive.h + /usr/local/Aria/include/ArActionKeydrive.h + /usr/local/Aria/include/ArActionLimiterBackwards.h + /usr/local/Aria/include/ArActionLimiterForwards.h + /usr/local/Aria/include/ArActionLimiterRot.h + /usr/local/Aria/include/ArActionLimiterTableSensor.h + /usr/local/Aria/include/ArActionMovementParameters.h + /usr/local/Aria/include/ArActionMovementParametersDebugging.h + /usr/local/Aria/include/ArActionRatioInput.h + /usr/local/Aria/include/ArActionRobotJoydrive.h + /usr/local/Aria/include/ArActionStallRecover.h + /usr/local/Aria/include/ArActionStop.h + /usr/local/Aria/include/ArActionTriangleDriveTo.h + /usr/local/Aria/include/ArActionTurn.h + /usr/local/Aria/include/ArAnalogGyro.h + /usr/local/Aria/include/ArArg.h + /usr/local/Aria/include/ArArgumentBuilder.h + /usr/local/Aria/include/ArArgumentParser.h + /usr/local/Aria/include/ArBasePacket.h + /usr/local/Aria/include/ArBatteryConnector.h + /usr/local/Aria/include/ArBatteryMTX.h + /usr/local/Aria/include/ArBumpers.h + /usr/local/Aria/include/ArCameraCollection.h + /usr/local/Aria/include/ArCameraCommands.h + /usr/local/Aria/include/ArCommands.h + /usr/local/Aria/include/ArCondition.h + /usr/local/Aria/include/ArConfig.h + /usr/local/Aria/include/ArConfigArg.h + /usr/local/Aria/include/ArConfigGroup.h + /usr/local/Aria/include/ArDPPTU.h + /usr/local/Aria/include/ArDataLogger.h + /usr/local/Aria/include/ArDeviceConnection.h + /usr/local/Aria/include/ArDrawingData.h + /usr/local/Aria/include/ArExitErrorSource.h + /usr/local/Aria/include/ArFileParser.h + /usr/local/Aria/include/ArForbiddenRangeDevice.h + /usr/local/Aria/include/ArFunctor.h + /usr/local/Aria/include/ArFunctorASyncTask.h + /usr/local/Aria/include/ArGPS.h + /usr/local/Aria/include/ArGPSCoords.h + /usr/local/Aria/include/ArGripper.h + /usr/local/Aria/include/ArHasFileName.h + /usr/local/Aria/include/ArIRs.h + /usr/local/Aria/include/ArInterpolation.h + /usr/local/Aria/include/ArIrrfDevice.h + /usr/local/Aria/include/ArJoyHandler.h + /usr/local/Aria/include/ArKeyHandler.h + /usr/local/Aria/include/ArLCDConnector.h + /usr/local/Aria/include/ArLCDMTX.h + /usr/local/Aria/include/ArLMS1XX.h + /usr/local/Aria/include/ArLMS2xx.h + /usr/local/Aria/include/ArLMS2xxPacket.h + /usr/local/Aria/include/ArLMS2xxPacketReceiver.h + /usr/local/Aria/include/ArLaser.h + /usr/local/Aria/include/ArLaserConnector.h + /usr/local/Aria/include/ArLaserFilter.h + /usr/local/Aria/include/ArLaserLogger.h + /usr/local/Aria/include/ArLaserReflectorDevice.h + /usr/local/Aria/include/ArLineFinder.h + /usr/local/Aria/include/ArLog.h + /usr/local/Aria/include/ArLogFileConnection.h + /usr/local/Aria/include/ArMTXIO.h + /usr/local/Aria/include/ArMap.h + /usr/local/Aria/include/ArMapComponents.h + /usr/local/Aria/include/ArMapInterface.h + /usr/local/Aria/include/ArMapObject.h + /usr/local/Aria/include/ArMapUtils.h + /usr/local/Aria/include/ArMode.h + /usr/local/Aria/include/ArModes.h + /usr/local/Aria/include/ArModule.h + /usr/local/Aria/include/ArModuleLoader.h + /usr/local/Aria/include/ArMutex.h + /usr/local/Aria/include/ArNMEAParser.h + /usr/local/Aria/include/ArNetServer.h + /usr/local/Aria/include/ArNovatelGPS.h + /usr/local/Aria/include/ArP2Arm.h + /usr/local/Aria/include/ArPTZ.h + /usr/local/Aria/include/ArPTZConnector.h + /usr/local/Aria/include/ArPriorityResolver.h + /usr/local/Aria/include/ArRVisionPTZ.h + /usr/local/Aria/include/ArRangeBuffer.h + /usr/local/Aria/include/ArRangeDevice.h + /usr/local/Aria/include/ArRangeDeviceThreaded.h + /usr/local/Aria/include/ArRatioInputJoydrive.h + /usr/local/Aria/include/ArRatioInputKeydrive.h + /usr/local/Aria/include/ArRatioInputRobotJoydrive.h + /usr/local/Aria/include/ArRecurrentTask.h + /usr/local/Aria/include/ArResolver.h + /usr/local/Aria/include/ArRobot.h + /usr/local/Aria/include/ArRobotBatteryPacketReader.h + /usr/local/Aria/include/ArRobotConfig.h + /usr/local/Aria/include/ArRobotConfigPacketReader.h + /usr/local/Aria/include/ArRobotConnector.h + /usr/local/Aria/include/ArRobotJoyHandler.h + /usr/local/Aria/include/ArRobotPacket.h + /usr/local/Aria/include/ArRobotPacketReaderThread.h + /usr/local/Aria/include/ArRobotPacketReceiver.h + /usr/local/Aria/include/ArRobotPacketSender.h + /usr/local/Aria/include/ArRobotParams.h + /usr/local/Aria/include/ArRobotTypes.h + /usr/local/Aria/include/ArS3Series.h + /usr/local/Aria/include/ArSZSeries.h + /usr/local/Aria/include/ArSensorReading.h + /usr/local/Aria/include/ArSerialConnection.h + /usr/local/Aria/include/ArSick.h + /usr/local/Aria/include/ArSignalHandler.h + /usr/local/Aria/include/ArSimpleConnector.h + /usr/local/Aria/include/ArSimulatedLaser.h + /usr/local/Aria/include/ArSocket.h + /usr/local/Aria/include/ArSonarAutoDisabler.h + /usr/local/Aria/include/ArSonarConnector.h + /usr/local/Aria/include/ArSonarDevice.h + /usr/local/Aria/include/ArSonarMTX.h + /usr/local/Aria/include/ArSonyPTZ.h + /usr/local/Aria/include/ArSoundPlayer.h + /usr/local/Aria/include/ArSoundsQueue.h + /usr/local/Aria/include/ArSpeech.h + /usr/local/Aria/include/ArStringInfoGroup.h + /usr/local/Aria/include/ArSyncLoop.h + /usr/local/Aria/include/ArSyncTask.h + /usr/local/Aria/include/ArTCM2.h + /usr/local/Aria/include/ArTCMCompassDirect.h + /usr/local/Aria/include/ArTCMCompassRobot.h + /usr/local/Aria/include/ArTaskState.h + /usr/local/Aria/include/ArTcpConnection.h + /usr/local/Aria/include/ArThread.h + /usr/local/Aria/include/ArTransform.h + /usr/local/Aria/include/ArTrimbleGPS.h + /usr/local/Aria/include/ArUrg.h + /usr/local/Aria/include/ArUrg_2_0.h + /usr/local/Aria/include/ArVCC4.h + /usr/local/Aria/include/ArVersalogicIO.h + /usr/local/Aria/include/ArZippable.h + /usr/local/Aria/include/Aria.h + /usr/local/Aria/include/ariaInternal.h + /usr/local/Aria/include/ariaOSDef.h + /usr/local/Aria/include/ariaTypedefs.h + /usr/local/Aria/include/ariaUtil.h diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/depend.make new file mode 100644 index 0000000..4f21a21 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/depend.make @@ -0,0 +1,302 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /home/lab1_5/ws/ws_linux/src/rosaria/RosAria.cpp +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/XmlRpcDecl.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/XmlRpcValue.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/BoolParameter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/Config.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/ConfigDescription.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/DoubleParameter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/Group.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/GroupState.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/IntParameter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/ParamDescription.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/Reconfigure.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/ReconfigureRequest.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/ReconfigureResponse.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/StrParameter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/config_init_mutex.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/config_tools.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/server.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Point.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Point32.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/PointStamped.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Pose.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/PoseStamped.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/PoseWithCovariance.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Quaternion.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/QuaternionStamped.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Transform.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/TransformStamped.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Twist.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/TwistStamped.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/TwistWithCovariance.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Vector3.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/geometry_msgs/Vector3Stamped.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/nav_msgs/Odometry.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/advertise_options.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/advertise_service_options.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/assert.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/builtin_message_traits.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/callback_queue.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/callback_queue_interface.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/common.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/console.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/console_backend.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/datatypes.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/duration.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/exception.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/exceptions.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/forwards.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/init.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/macros.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/master.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/message.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/message_event.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/message_forward.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/message_operations.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/message_traits.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/names.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/node_handle.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/param.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/parameter_adapter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/platform.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/publisher.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/rate.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/ros.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/roscpp_serialization_macros.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/rostime_decl.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/serialization.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/serialized_message.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/service.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/service_callback_helper.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/service_client.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/service_client_options.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/service_server.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/service_traits.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/single_subscriber_publisher.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/spinner.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/static_assert.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/subscribe_options.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/subscriber.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/subscription_callback_helper.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/this_node.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/time.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/timer.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/timer_options.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/topic.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/transport_hints.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/types.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/wall_timer.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/ros/wall_timer_options.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/rosconsole/macros_generated.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/sensor_msgs/ChannelFloat32.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/sensor_msgs/JointState.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/sensor_msgs/PointCloud.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/sensor_msgs/PointCloud2.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/sensor_msgs/PointField.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/sensor_msgs/point_cloud_conversion.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/Bool.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/Empty.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/Float32.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/Float64.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/Header.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/Int8.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_msgs/UInt8.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_srvs/Empty.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_srvs/EmptyRequest.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/std_srvs/EmptyResponse.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/FrameGraph.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/FrameGraphRequest.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/FrameGraphResponse.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/Matrix3x3.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/MinMax.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/QuadWord.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/Quaternion.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/Scalar.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/Transform.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/LinearMath/Vector3.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/exceptions.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/tf.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/tfMessage.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/time_cache.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/transform_broadcaster.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/transform_datatypes.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf/transform_listener.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/LinearMath/Quaternion.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/LinearMath/Vector3.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/buffer_core.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/convert.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/exceptions.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/transform_datatypes.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2/transform_storage.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_msgs/FrameGraph.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_msgs/FrameGraphRequest.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_msgs/FrameGraphResponse.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_msgs/TFMessage.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_ros/buffer.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_ros/buffer_interface.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_ros/transform_broadcaster.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /opt/ros/hydro/include/tf2_ros/transform_listener.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArACTS.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArAMPTU.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArASyncTask.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArAction.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionAvoidFront.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionAvoidSide.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionBumpers.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionColorFollow.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionConstantVelocity.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionDeceleratingLimiter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionDesired.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionDriveDistance.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionGoto.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionGotoStraight.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionGroup.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionGroups.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionIRs.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionInput.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionJoydrive.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionKeydrive.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionLimiterBackwards.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionLimiterForwards.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionLimiterRot.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionLimiterTableSensor.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionMovementParameters.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionMovementParametersDebugging.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionRatioInput.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionRobotJoydrive.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionStallRecover.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionStop.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionTriangleDriveTo.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArActionTurn.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArAnalogGyro.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArArg.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArArgumentBuilder.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArArgumentParser.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArBasePacket.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArBatteryConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArBatteryMTX.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArBumpers.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArCameraCollection.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArCameraCommands.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArCommands.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArCondition.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArConfig.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArConfigArg.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArConfigGroup.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArDPPTU.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArDataLogger.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArDeviceConnection.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArDrawingData.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArExitErrorSource.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArFileParser.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArForbiddenRangeDevice.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArFunctor.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArFunctorASyncTask.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArGPS.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArGPSCoords.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArGripper.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArHasFileName.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArIRs.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArInterpolation.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArIrrfDevice.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArJoyHandler.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArKeyHandler.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLCDConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLCDMTX.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLMS1XX.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLMS2xx.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLMS2xxPacket.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLMS2xxPacketReceiver.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLaser.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLaserConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLaserFilter.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLaserLogger.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLaserReflectorDevice.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLineFinder.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLog.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArLogFileConnection.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMTXIO.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMap.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMapComponents.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMapInterface.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMapObject.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMapUtils.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMode.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArModes.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArModule.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArModuleLoader.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArMutex.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArNMEAParser.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArNetServer.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArNovatelGPS.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArP2Arm.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArPTZ.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArPTZConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArPriorityResolver.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRVisionPTZ.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRangeBuffer.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRangeDevice.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRangeDeviceThreaded.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRatioInputJoydrive.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRatioInputKeydrive.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRatioInputRobotJoydrive.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRecurrentTask.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArResolver.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobot.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotBatteryPacketReader.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotConfig.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotConfigPacketReader.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotJoyHandler.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotPacket.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotPacketReaderThread.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotPacketReceiver.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotPacketSender.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotParams.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArRobotTypes.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArS3Series.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSZSeries.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSensorReading.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSerialConnection.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSick.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSignalHandler.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSimpleConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSimulatedLaser.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSocket.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSonarAutoDisabler.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSonarConnector.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSonarDevice.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSonarMTX.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSonyPTZ.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSoundPlayer.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSoundsQueue.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSpeech.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArStringInfoGroup.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSyncLoop.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArSyncTask.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTCM2.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTCMCompassDirect.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTCMCompassRobot.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTaskState.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTcpConnection.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArThread.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTransform.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArTrimbleGPS.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArUrg.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArUrg_2_0.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArVCC4.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArVersalogicIO.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ArZippable.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/Aria.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ariaInternal.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ariaOSDef.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ariaTypedefs.h +rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o: /usr/local/Aria/include/ariaUtil.h + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/flags.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/flags.make new file mode 100644 index 0000000..e758f3f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -I/home/lab1_5/ws/ws_linux/devel/include -I/opt/ros/hydro/include -I/usr/local/Aria/include + +CXX_DEFINES = -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"rosaria\" -DROSCONSOLE_BACKEND_LOG4CXX -DADEPT_PKG + +# TARGET_FLAGS = -fPIC + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/link.txt b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/link.txt new file mode 100644 index 0000000..c6dc19b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/RosAria.dir/RosAria.cpp.o -o /home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria -rdynamic -L/usr/local/Aria/lib /opt/ros/hydro/lib/libtf.so /opt/ros/hydro/lib/libtf2_ros.so /opt/ros/hydro/lib/libactionlib.so /opt/ros/hydro/lib/libmessage_filters.so /opt/ros/hydro/lib/libroscpp.so -lboost_signals-mt -lboost_filesystem-mt /opt/ros/hydro/lib/libxmlrpcpp.so /opt/ros/hydro/lib/libtf2.so /opt/ros/hydro/lib/librosconsole.so /opt/ros/hydro/lib/librosconsole_log4cxx.so /opt/ros/hydro/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex-mt /opt/ros/hydro/lib/libdynamic_reconfigure_config_init_mutex.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_system-mt -lboost_thread-mt -lpthread /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libconsole_bridge.so -lboost_thread-mt -lpthread -lAria -lpthread -ldl -lrt -lpthread /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libconsole_bridge.so -lpthread -lAria -lpthread -lAria -ldl -lrt -Wl,-rpath,/usr/local/Aria/lib:/opt/ros/hydro/lib: diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/progress.make new file mode 100644 index 0000000..781c7de --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/RosAria.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 1 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..c67a88c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for actionlib_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/actionlib_generate_messages_cpp: + +actionlib_generate_messages_cpp: rosaria/CMakeFiles/actionlib_generate_messages_cpp +actionlib_generate_messages_cpp: rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make +.PHONY : actionlib_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build: actionlib_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/actionlib_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..4e0256b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/actionlib_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/actionlib_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..5cf6583 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for actionlib_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/actionlib_generate_messages_lisp: + +actionlib_generate_messages_lisp: rosaria/CMakeFiles/actionlib_generate_messages_lisp +actionlib_generate_messages_lisp: rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make +.PHONY : actionlib_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build: actionlib_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/actionlib_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..338cf95 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/actionlib_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/actionlib_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make new file mode 100644 index 0000000..75a9229 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for actionlib_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/actionlib_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/actionlib_generate_messages_py: + +actionlib_generate_messages_py: rosaria/CMakeFiles/actionlib_generate_messages_py +actionlib_generate_messages_py: rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make +.PHONY : actionlib_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build: actionlib_generate_messages_py +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build + +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/actionlib_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/clean + +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..01fa21b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/actionlib_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/actionlib_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..2190cd8 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for actionlib_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp: + +actionlib_msgs_generate_messages_cpp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp +actionlib_msgs_generate_messages_cpp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make +.PHONY : actionlib_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build: actionlib_msgs_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..9f2b9ac --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/actionlib_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..b350eda --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for actionlib_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp: + +actionlib_msgs_generate_messages_lisp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp +actionlib_msgs_generate_messages_lisp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make +.PHONY : actionlib_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build: actionlib_msgs_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..1c5d47e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/actionlib_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..8547212 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for actionlib_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py: + +actionlib_msgs_generate_messages_py: rosaria/CMakeFiles/actionlib_msgs_generate_messages_py +actionlib_msgs_generate_messages_py: rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make +.PHONY : actionlib_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build: actionlib_msgs_generate_messages_py +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/actionlib_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/clean + +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..6dcc146 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/actionlib_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/actionlib_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make new file mode 100644 index 0000000..823867b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for dynamic_reconfigure_gencfg. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/progress.make + +rosaria/CMakeFiles/dynamic_reconfigure_gencfg: + +dynamic_reconfigure_gencfg: rosaria/CMakeFiles/dynamic_reconfigure_gencfg +dynamic_reconfigure_gencfg: rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make +.PHONY : dynamic_reconfigure_gencfg + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build: dynamic_reconfigure_gencfg +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build + +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/dynamic_reconfigure_gencfg.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/clean + +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/cmake_clean.cmake new file mode 100644 index 0000000..a97f6d1 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/dynamic_reconfigure_gencfg" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/dynamic_reconfigure_gencfg.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..debd928 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for dynamic_reconfigure_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp: + +dynamic_reconfigure_generate_messages_cpp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp +dynamic_reconfigure_generate_messages_cpp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make +.PHONY : dynamic_reconfigure_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build: dynamic_reconfigure_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..640246f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/dynamic_reconfigure_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..c26d081 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for dynamic_reconfigure_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp: + +dynamic_reconfigure_generate_messages_lisp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp +dynamic_reconfigure_generate_messages_lisp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make +.PHONY : dynamic_reconfigure_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build: dynamic_reconfigure_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..d054616 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/dynamic_reconfigure_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make new file mode 100644 index 0000000..e9476f6 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for dynamic_reconfigure_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py: + +dynamic_reconfigure_generate_messages_py: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py +dynamic_reconfigure_generate_messages_py: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make +.PHONY : dynamic_reconfigure_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build: dynamic_reconfigure_generate_messages_py +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/clean + +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..7353389 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/dynamic_reconfigure_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..144da2f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for nav_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp: + +nav_msgs_generate_messages_cpp: rosaria/CMakeFiles/nav_msgs_generate_messages_cpp +nav_msgs_generate_messages_cpp: rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make +.PHONY : nav_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build: nav_msgs_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/nav_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..4dd12c3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/nav_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/nav_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..8f439c3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for nav_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp: + +nav_msgs_generate_messages_lisp: rosaria/CMakeFiles/nav_msgs_generate_messages_lisp +nav_msgs_generate_messages_lisp: rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make +.PHONY : nav_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build: nav_msgs_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/nav_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..e6bdcfb --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/nav_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/nav_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..e396a62 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for nav_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/nav_msgs_generate_messages_py: + +nav_msgs_generate_messages_py: rosaria/CMakeFiles/nav_msgs_generate_messages_py +nav_msgs_generate_messages_py: rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make +.PHONY : nav_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build: nav_msgs_generate_messages_py +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build + +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/nav_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/clean + +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..5d55a59 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/nav_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/nav_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/progress.marks b/Legacy/ws_linux/build/rosaria/CMakeFiles/progress.marks new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/progress.marks @@ -0,0 +1 @@ +6 diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/DependInfo.cmake new file mode 100644 index 0000000..e2053f2 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/DependInfo.cmake @@ -0,0 +1,25 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Pairs of files generated by the same build rule. +SET(CMAKE_MULTIPLE_OUTPUT_PAIRS + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py" "/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox" "/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox" "/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc" "/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h" + ) + + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/build.make new file mode 100644 index 0000000..f95f3bc --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/build.make @@ -0,0 +1,83 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_gencfg. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_gencfg.dir/progress.make + +rosaria/CMakeFiles/rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +rosaria/CMakeFiles/rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py + +/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h: /home/lab1_5/ws/ws_linux/src/rosaria/cfg/RosAria.cfg +/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h: /opt/ros/hydro/share/dynamic_reconfigure/cmake/../templates/ConfigType.py.template +/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h: /opt/ros/hydro/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating dynamic reconfigure files from cfg/RosAria.cfg: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py" + cd /home/lab1_5/ws/ws_linux/build/rosaria && ../catkin_generated/env_cached.sh /home/lab1_5/ws/ws_linux/src/rosaria/cfg/RosAria.cfg /opt/ros/hydro/share/dynamic_reconfigure/cmake/.. /home/lab1_5/ws/ws_linux/devel/share/rosaria /home/lab1_5/ws/ws_linux/devel/include/rosaria /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria + +/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h + +/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h + +/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h + +rosaria_gencfg: rosaria/CMakeFiles/rosaria_gencfg +rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox +rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox +rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py +rosaria_gencfg: /home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc +rosaria_gencfg: rosaria/CMakeFiles/rosaria_gencfg.dir/build.make +.PHONY : rosaria_gencfg + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_gencfg.dir/build: rosaria_gencfg +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/build + +rosaria/CMakeFiles/rosaria_gencfg.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_gencfg.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/clean + +rosaria/CMakeFiles/rosaria_gencfg.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/cmake_clean.cmake new file mode 100644 index 0000000..8ebaf2d --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/cmake_clean.cmake @@ -0,0 +1,13 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_gencfg" + "/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py" + "/home/lab1_5/ws/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_gencfg.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/progress.make new file mode 100644 index 0000000..16d5ea2 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencfg.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 6 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/build.make new file mode 100644 index 0000000..8c7472e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_gencpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_gencpp.dir/progress.make + +rosaria/CMakeFiles/rosaria_gencpp: + +rosaria_gencpp: rosaria/CMakeFiles/rosaria_gencpp +rosaria_gencpp: rosaria/CMakeFiles/rosaria_gencpp.dir/build.make +.PHONY : rosaria_gencpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_gencpp.dir/build: rosaria_gencpp +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/build + +rosaria/CMakeFiles/rosaria_gencpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_gencpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/clean + +rosaria/CMakeFiles/rosaria_gencpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..d4c69c4 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_gencpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_gencpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_gencpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make new file mode 100644 index 0000000..c70a070 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_generate_messages. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_generate_messages.dir/progress.make + +rosaria/CMakeFiles/rosaria_generate_messages: + +rosaria_generate_messages: rosaria/CMakeFiles/rosaria_generate_messages +rosaria_generate_messages: rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make +.PHONY : rosaria_generate_messages + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_generate_messages.dir/build: rosaria_generate_messages +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/build + +rosaria/CMakeFiles/rosaria_generate_messages.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_generate_messages.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/clean + +rosaria/CMakeFiles/rosaria_generate_messages.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/cmake_clean.cmake new file mode 100644 index 0000000..a0ee125 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_generate_messages" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_generate_messages.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..3f752d9 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make @@ -0,0 +1,71 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/rosaria_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h + +/home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h: /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py +/home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h: /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h: /opt/ros/hydro/share/std_msgs/cmake/../msg/Header.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h: /opt/ros/hydro/share/gencpp/cmake/../msg.h.template + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating C++ code from rosaria/BumperState.msg" + cd /home/lab1_5/ws/ws_linux/build/rosaria && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg -Irosaria:/home/lab1_5/ws/ws_linux/src/rosaria/msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -p rosaria -o /home/lab1_5/ws/ws_linux/devel/include/rosaria -e /opt/ros/hydro/share/gencpp/cmake/.. + +rosaria_generate_messages_cpp: rosaria/CMakeFiles/rosaria_generate_messages_cpp +rosaria_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h +rosaria_generate_messages_cpp: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make +.PHONY : rosaria_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build: rosaria_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..1ebcaed --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,9 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_generate_messages_cpp" + "/home/lab1_5/ws/ws_linux/devel/include/rosaria/BumperState.h" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..68e0bc5 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 7 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..08bbe82 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make @@ -0,0 +1,70 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/rosaria_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp + +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp: /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp: /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp: /opt/ros/hydro/share/std_msgs/cmake/../msg/Header.msg + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Lisp code from rosaria/BumperState.msg" + cd /home/lab1_5/ws/ws_linux/build/rosaria && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg -Irosaria:/home/lab1_5/ws/ws_linux/src/rosaria/msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -p rosaria -o /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg + +rosaria_generate_messages_lisp: rosaria/CMakeFiles/rosaria_generate_messages_lisp +rosaria_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp +rosaria_generate_messages_lisp: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make +.PHONY : rosaria_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build: rosaria_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..8aac6b3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,9 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_generate_messages_lisp" + "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..c561fca --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make new file mode 100644 index 0000000..89f521b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make @@ -0,0 +1,78 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/rosaria_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py +rosaria/CMakeFiles/rosaria_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/__init__.py + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py: /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py: /opt/ros/hydro/share/std_msgs/cmake/../msg/Header.msg + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python from MSG rosaria/BumperState" + cd /home/lab1_5/ws/ws_linux/build/rosaria && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg -Irosaria:/home/lab1_5/ws/ws_linux/src/rosaria/msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -p rosaria -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/__init__.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/__init__.py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_2) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python msg __init__.py for rosaria" + cd /home/lab1_5/ws/ws_linux/build/rosaria && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg --initpy + +rosaria_generate_messages_py: rosaria/CMakeFiles/rosaria_generate_messages_py +rosaria_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py +rosaria_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/__init__.py +rosaria_generate_messages_py: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make +.PHONY : rosaria_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build: rosaria_generate_messages_py +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build + +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/clean + +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..d1b1b54 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_generate_messages_py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/__init__.py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend.internal b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..b700c2c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_generate_messages_py.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 9 +CMAKE_PROGRESS_2 = 10 + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/build.make new file mode 100644 index 0000000..c23883e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_genlisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_genlisp.dir/progress.make + +rosaria/CMakeFiles/rosaria_genlisp: + +rosaria_genlisp: rosaria/CMakeFiles/rosaria_genlisp +rosaria_genlisp: rosaria/CMakeFiles/rosaria_genlisp.dir/build.make +.PHONY : rosaria_genlisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_genlisp.dir/build: rosaria_genlisp +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/build + +rosaria/CMakeFiles/rosaria_genlisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_genlisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/clean + +rosaria/CMakeFiles/rosaria_genlisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..d8e47ba --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_genlisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_genlisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genlisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/build.make new file mode 100644 index 0000000..5996a94 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_genpy. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosaria_genpy.dir/progress.make + +rosaria/CMakeFiles/rosaria_genpy: + +rosaria_genpy: rosaria/CMakeFiles/rosaria_genpy +rosaria_genpy: rosaria/CMakeFiles/rosaria_genpy.dir/build.make +.PHONY : rosaria_genpy + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosaria_genpy.dir/build: rosaria_genpy +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/build + +rosaria/CMakeFiles/rosaria_genpy.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_genpy.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/clean + +rosaria/CMakeFiles/rosaria_genpy.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/cmake_clean.cmake new file mode 100644 index 0000000..1d45df6 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_genpy" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_genpy.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosaria_genpy.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..97a1596 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for roscpp_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/roscpp_generate_messages_cpp: + +roscpp_generate_messages_cpp: rosaria/CMakeFiles/roscpp_generate_messages_cpp +roscpp_generate_messages_cpp: rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make +.PHONY : roscpp_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build: roscpp_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..20c0902 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/roscpp_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..be5af23 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for roscpp_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/roscpp_generate_messages_lisp: + +roscpp_generate_messages_lisp: rosaria/CMakeFiles/roscpp_generate_messages_lisp +roscpp_generate_messages_lisp: rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make +.PHONY : roscpp_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build: roscpp_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..0d54a3c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/roscpp_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make new file mode 100644 index 0000000..cc2f071 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for roscpp_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/roscpp_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/roscpp_generate_messages_py: + +roscpp_generate_messages_py: rosaria/CMakeFiles/roscpp_generate_messages_py +roscpp_generate_messages_py: rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make +.PHONY : roscpp_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build: roscpp_generate_messages_py +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build + +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/clean + +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..7282dbb --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/roscpp_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/roscpp_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..14b9faf --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosgraph_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp: + +rosgraph_msgs_generate_messages_cpp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp +rosgraph_msgs_generate_messages_cpp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make +.PHONY : rosgraph_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build: rosgraph_msgs_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..eff4ce5 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosgraph_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..e8a4be7 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosgraph_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp: + +rosgraph_msgs_generate_messages_lisp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp +rosgraph_msgs_generate_messages_lisp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make +.PHONY : rosgraph_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build: rosgraph_msgs_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..122b942 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosgraph_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..81a50a6 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosgraph_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py: + +rosgraph_msgs_generate_messages_py: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py +rosgraph_msgs_generate_messages_py: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make +.PHONY : rosgraph_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build: rosgraph_msgs_generate_messages_py +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean + +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..f400201 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosgraph_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..8986ecc --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for sensor_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp: + +sensor_msgs_generate_messages_cpp: rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp +sensor_msgs_generate_messages_cpp: rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make +.PHONY : sensor_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build: sensor_msgs_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/sensor_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..9a8c5d4 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/sensor_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/sensor_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..7e12270 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for sensor_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp: + +sensor_msgs_generate_messages_lisp: rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp +sensor_msgs_generate_messages_lisp: rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make +.PHONY : sensor_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build: sensor_msgs_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/sensor_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..5fe672b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/sensor_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/sensor_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..64053b6 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for sensor_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/sensor_msgs_generate_messages_py: + +sensor_msgs_generate_messages_py: rosaria/CMakeFiles/sensor_msgs_generate_messages_py +sensor_msgs_generate_messages_py: rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make +.PHONY : sensor_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build: sensor_msgs_generate_messages_py +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build + +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/sensor_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/clean + +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..87f1fb0 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/sensor_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/sensor_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..a898e03 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tf2_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp: + +tf2_msgs_generate_messages_cpp: rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp +tf2_msgs_generate_messages_cpp: rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make +.PHONY : tf2_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build: tf2_msgs_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/tf2_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..57143f9 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tf2_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tf2_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..1edeaf4 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tf2_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp: + +tf2_msgs_generate_messages_lisp: rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp +tf2_msgs_generate_messages_lisp: rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make +.PHONY : tf2_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build: tf2_msgs_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/tf2_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..bba5b76 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tf2_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tf2_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..763c4b1 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tf2_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/tf2_msgs_generate_messages_py: + +tf2_msgs_generate_messages_py: rosaria/CMakeFiles/tf2_msgs_generate_messages_py +tf2_msgs_generate_messages_py: rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make +.PHONY : tf2_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build: tf2_msgs_generate_messages_py +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build + +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/tf2_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/clean + +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..cd378c0 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tf2_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tf2_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..15b95ff --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tf_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/tf_generate_messages_cpp.dir/progress.make + +rosaria/CMakeFiles/tf_generate_messages_cpp: + +tf_generate_messages_cpp: rosaria/CMakeFiles/tf_generate_messages_cpp +tf_generate_messages_cpp: rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make +.PHONY : tf_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build: tf_generate_messages_cpp +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build + +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/tf_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/clean + +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..2ac63b1 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tf_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tf_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..d91f90a --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tf_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/tf_generate_messages_lisp.dir/progress.make + +rosaria/CMakeFiles/tf_generate_messages_lisp: + +tf_generate_messages_lisp: rosaria/CMakeFiles/tf_generate_messages_lisp +tf_generate_messages_lisp: rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make +.PHONY : tf_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build: tf_generate_messages_lisp +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build + +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/tf_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/clean + +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..1c7d7e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tf_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tf_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..85f8501 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,16 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"rosaria\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + "ADEPT_PKG" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make new file mode 100644 index 0000000..9853601 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for tf_generate_messages_py. + +# Include the progress variables for this target. +include rosaria/CMakeFiles/tf_generate_messages_py.dir/progress.make + +rosaria/CMakeFiles/tf_generate_messages_py: + +tf_generate_messages_py: rosaria/CMakeFiles/tf_generate_messages_py +tf_generate_messages_py: rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make +.PHONY : tf_generate_messages_py + +# Rule to build all files generated by this target. +rosaria/CMakeFiles/tf_generate_messages_py.dir/build: tf_generate_messages_py +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/build + +rosaria/CMakeFiles/tf_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria && $(CMAKE_COMMAND) -P CMakeFiles/tf_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/clean + +rosaria/CMakeFiles/tf_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..4b74511 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/tf_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/tf_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CMakeFiles/tf_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria/CTestTestfile.cmake b/Legacy/ws_linux/build/rosaria/CTestTestfile.cmake new file mode 100644 index 0000000..212fa0f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/CTestTestfile.cmake @@ -0,0 +1,6 @@ +# CMake generated Testfile for +# Source directory: /home/lab1_5/ws/ws_linux/src/rosaria +# Build directory: /home/lab1_5/ws/ws_linux/build/rosaria +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. diff --git a/Legacy/ws_linux/build/rosaria/Makefile b/Legacy/ws_linux/build/rosaria/Makefile new file mode 100644 index 0000000..540843f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/Makefile @@ -0,0 +1,757 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles /home/lab1_5/ws/ws_linux/build/rosaria/CMakeFiles/progress.marks + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +rosaria/CMakeFiles/RosAria.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/RosAria.dir/rule +.PHONY : rosaria/CMakeFiles/RosAria.dir/rule + +# Convenience name for target. +RosAria: rosaria/CMakeFiles/RosAria.dir/rule +.PHONY : RosAria + +# fast build rule for target. +RosAria/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/build +.PHONY : RosAria/fast + +# Convenience name for target. +rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule + +# Convenience name for target. +actionlib_generate_messages_cpp: rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/rule +.PHONY : actionlib_generate_messages_cpp + +# fast build rule for target. +actionlib_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_cpp.dir/build +.PHONY : actionlib_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule + +# Convenience name for target. +actionlib_generate_messages_lisp: rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/rule +.PHONY : actionlib_generate_messages_lisp + +# fast build rule for target. +actionlib_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_lisp.dir/build +.PHONY : actionlib_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule + +# Convenience name for target. +actionlib_generate_messages_py: rosaria/CMakeFiles/actionlib_generate_messages_py.dir/rule +.PHONY : actionlib_generate_messages_py + +# fast build rule for target. +actionlib_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_generate_messages_py.dir/build +.PHONY : actionlib_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +actionlib_msgs_generate_messages_cpp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/rule +.PHONY : actionlib_msgs_generate_messages_cpp + +# fast build rule for target. +actionlib_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_cpp.dir/build +.PHONY : actionlib_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +actionlib_msgs_generate_messages_lisp: rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/rule +.PHONY : actionlib_msgs_generate_messages_lisp + +# fast build rule for target. +actionlib_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_lisp.dir/build +.PHONY : actionlib_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +actionlib_msgs_generate_messages_py: rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/rule +.PHONY : actionlib_msgs_generate_messages_py + +# fast build rule for target. +actionlib_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/actionlib_msgs_generate_messages_py.dir/build +.PHONY : actionlib_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule + +# Convenience name for target. +dynamic_reconfigure_gencfg: rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/rule +.PHONY : dynamic_reconfigure_gencfg + +# fast build rule for target. +dynamic_reconfigure_gencfg/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_gencfg.dir/build +.PHONY : dynamic_reconfigure_gencfg/fast + +# Convenience name for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule + +# Convenience name for target. +dynamic_reconfigure_generate_messages_cpp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/rule +.PHONY : dynamic_reconfigure_generate_messages_cpp + +# fast build rule for target. +dynamic_reconfigure_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_cpp.dir/build +.PHONY : dynamic_reconfigure_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule + +# Convenience name for target. +dynamic_reconfigure_generate_messages_lisp: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/rule +.PHONY : dynamic_reconfigure_generate_messages_lisp + +# fast build rule for target. +dynamic_reconfigure_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_lisp.dir/build +.PHONY : dynamic_reconfigure_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule + +# Convenience name for target. +dynamic_reconfigure_generate_messages_py: rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/rule +.PHONY : dynamic_reconfigure_generate_messages_py + +# fast build rule for target. +dynamic_reconfigure_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build.make rosaria/CMakeFiles/dynamic_reconfigure_generate_messages_py.dir/build +.PHONY : dynamic_reconfigure_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +nav_msgs_generate_messages_cpp: rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/rule +.PHONY : nav_msgs_generate_messages_cpp + +# fast build rule for target. +nav_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_cpp.dir/build +.PHONY : nav_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +nav_msgs_generate_messages_lisp: rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/rule +.PHONY : nav_msgs_generate_messages_lisp + +# fast build rule for target. +nav_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_lisp.dir/build +.PHONY : nav_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +nav_msgs_generate_messages_py: rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/rule +.PHONY : nav_msgs_generate_messages_py + +# fast build rule for target. +nav_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/nav_msgs_generate_messages_py.dir/build +.PHONY : nav_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_gencfg.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_gencfg.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_gencfg.dir/rule + +# Convenience name for target. +rosaria_gencfg: rosaria/CMakeFiles/rosaria_gencfg.dir/rule +.PHONY : rosaria_gencfg + +# fast build rule for target. +rosaria_gencfg/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_gencfg.dir/build.make rosaria/CMakeFiles/rosaria_gencfg.dir/build +.PHONY : rosaria_gencfg/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_gencpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_gencpp.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_gencpp.dir/rule + +# Convenience name for target. +rosaria_gencpp: rosaria/CMakeFiles/rosaria_gencpp.dir/rule +.PHONY : rosaria_gencpp + +# fast build rule for target. +rosaria_gencpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_gencpp.dir/build.make rosaria/CMakeFiles/rosaria_gencpp.dir/build +.PHONY : rosaria_gencpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_generate_messages.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages.dir/rule + +# Convenience name for target. +rosaria_generate_messages: rosaria/CMakeFiles/rosaria_generate_messages.dir/rule +.PHONY : rosaria_generate_messages + +# fast build rule for target. +rosaria_generate_messages/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages.dir/build +.PHONY : rosaria_generate_messages/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule + +# Convenience name for target. +rosaria_generate_messages_cpp: rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/rule +.PHONY : rosaria_generate_messages_cpp + +# fast build rule for target. +rosaria_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_cpp.dir/build +.PHONY : rosaria_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule + +# Convenience name for target. +rosaria_generate_messages_lisp: rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/rule +.PHONY : rosaria_generate_messages_lisp + +# fast build rule for target. +rosaria_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_lisp.dir/build +.PHONY : rosaria_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule + +# Convenience name for target. +rosaria_generate_messages_py: rosaria/CMakeFiles/rosaria_generate_messages_py.dir/rule +.PHONY : rosaria_generate_messages_py + +# fast build rule for target. +rosaria_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosaria_generate_messages_py.dir/build +.PHONY : rosaria_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_genlisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_genlisp.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_genlisp.dir/rule + +# Convenience name for target. +rosaria_genlisp: rosaria/CMakeFiles/rosaria_genlisp.dir/rule +.PHONY : rosaria_genlisp + +# fast build rule for target. +rosaria_genlisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_genlisp.dir/build.make rosaria/CMakeFiles/rosaria_genlisp.dir/build +.PHONY : rosaria_genlisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosaria_genpy.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosaria_genpy.dir/rule +.PHONY : rosaria/CMakeFiles/rosaria_genpy.dir/rule + +# Convenience name for target. +rosaria_genpy: rosaria/CMakeFiles/rosaria_genpy.dir/rule +.PHONY : rosaria_genpy + +# fast build rule for target. +rosaria_genpy/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosaria_genpy.dir/build.make rosaria/CMakeFiles/rosaria_genpy.dir/build +.PHONY : rosaria_genpy/fast + +# Convenience name for target. +rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule + +# Convenience name for target. +roscpp_generate_messages_cpp: rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/rule +.PHONY : roscpp_generate_messages_cpp + +# fast build rule for target. +roscpp_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_cpp.dir/build +.PHONY : roscpp_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule + +# Convenience name for target. +roscpp_generate_messages_lisp: rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/rule +.PHONY : roscpp_generate_messages_lisp + +# fast build rule for target. +roscpp_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_lisp.dir/build +.PHONY : roscpp_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule + +# Convenience name for target. +roscpp_generate_messages_py: rosaria/CMakeFiles/roscpp_generate_messages_py.dir/rule +.PHONY : roscpp_generate_messages_py + +# fast build rule for target. +roscpp_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build.make rosaria/CMakeFiles/roscpp_generate_messages_py.dir/build +.PHONY : roscpp_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +rosgraph_msgs_generate_messages_cpp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule +.PHONY : rosgraph_msgs_generate_messages_cpp + +# fast build rule for target. +rosgraph_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build +.PHONY : rosgraph_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +rosgraph_msgs_generate_messages_lisp: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule +.PHONY : rosgraph_msgs_generate_messages_lisp + +# fast build rule for target. +rosgraph_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build +.PHONY : rosgraph_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +rosgraph_msgs_generate_messages_py: rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule +.PHONY : rosgraph_msgs_generate_messages_py + +# fast build rule for target. +rosgraph_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build +.PHONY : rosgraph_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +sensor_msgs_generate_messages_cpp: rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/rule +.PHONY : sensor_msgs_generate_messages_cpp + +# fast build rule for target. +sensor_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_cpp.dir/build +.PHONY : sensor_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +sensor_msgs_generate_messages_lisp: rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/rule +.PHONY : sensor_msgs_generate_messages_lisp + +# fast build rule for target. +sensor_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_lisp.dir/build +.PHONY : sensor_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +sensor_msgs_generate_messages_py: rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/rule +.PHONY : sensor_msgs_generate_messages_py + +# fast build rule for target. +sensor_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/sensor_msgs_generate_messages_py.dir/build +.PHONY : sensor_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +tf2_msgs_generate_messages_cpp: rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/rule +.PHONY : tf2_msgs_generate_messages_cpp + +# fast build rule for target. +tf2_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_cpp.dir/build +.PHONY : tf2_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +tf2_msgs_generate_messages_lisp: rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/rule +.PHONY : tf2_msgs_generate_messages_lisp + +# fast build rule for target. +tf2_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_lisp.dir/build +.PHONY : tf2_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +tf2_msgs_generate_messages_py: rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/rule +.PHONY : tf2_msgs_generate_messages_py + +# fast build rule for target. +tf2_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf2_msgs_generate_messages_py.dir/build +.PHONY : tf2_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule +.PHONY : rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule + +# Convenience name for target. +tf_generate_messages_cpp: rosaria/CMakeFiles/tf_generate_messages_cpp.dir/rule +.PHONY : tf_generate_messages_cpp + +# fast build rule for target. +tf_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_cpp.dir/build +.PHONY : tf_generate_messages_cpp/fast + +# Convenience name for target. +rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule +.PHONY : rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule + +# Convenience name for target. +tf_generate_messages_lisp: rosaria/CMakeFiles/tf_generate_messages_lisp.dir/rule +.PHONY : tf_generate_messages_lisp + +# fast build rule for target. +tf_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build.make rosaria/CMakeFiles/tf_generate_messages_lisp.dir/build +.PHONY : tf_generate_messages_lisp/fast + +# Convenience name for target. +rosaria/CMakeFiles/tf_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria/CMakeFiles/tf_generate_messages_py.dir/rule +.PHONY : rosaria/CMakeFiles/tf_generate_messages_py.dir/rule + +# Convenience name for target. +tf_generate_messages_py: rosaria/CMakeFiles/tf_generate_messages_py.dir/rule +.PHONY : tf_generate_messages_py + +# fast build rule for target. +tf_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/tf_generate_messages_py.dir/build.make rosaria/CMakeFiles/tf_generate_messages_py.dir/build +.PHONY : tf_generate_messages_py/fast + +RosAria.o: RosAria.cpp.o +.PHONY : RosAria.o + +# target to build an object file +RosAria.cpp.o: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.o +.PHONY : RosAria.cpp.o + +RosAria.i: RosAria.cpp.i +.PHONY : RosAria.i + +# target to preprocess a source file +RosAria.cpp.i: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.i +.PHONY : RosAria.cpp.i + +RosAria.s: RosAria.cpp.s +.PHONY : RosAria.s + +# target to generate assembly for a file +RosAria.cpp.s: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria/CMakeFiles/RosAria.dir/build.make rosaria/CMakeFiles/RosAria.dir/RosAria.cpp.s +.PHONY : RosAria.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... RosAria" + @echo "... actionlib_generate_messages_cpp" + @echo "... actionlib_generate_messages_lisp" + @echo "... actionlib_generate_messages_py" + @echo "... actionlib_msgs_generate_messages_cpp" + @echo "... actionlib_msgs_generate_messages_lisp" + @echo "... actionlib_msgs_generate_messages_py" + @echo "... dynamic_reconfigure_gencfg" + @echo "... dynamic_reconfigure_generate_messages_cpp" + @echo "... dynamic_reconfigure_generate_messages_lisp" + @echo "... dynamic_reconfigure_generate_messages_py" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... nav_msgs_generate_messages_cpp" + @echo "... nav_msgs_generate_messages_lisp" + @echo "... nav_msgs_generate_messages_py" + @echo "... rebuild_cache" + @echo "... rosaria_gencfg" + @echo "... rosaria_gencpp" + @echo "... rosaria_generate_messages" + @echo "... rosaria_generate_messages_cpp" + @echo "... rosaria_generate_messages_lisp" + @echo "... rosaria_generate_messages_py" + @echo "... rosaria_genlisp" + @echo "... rosaria_genpy" + @echo "... roscpp_generate_messages_cpp" + @echo "... roscpp_generate_messages_lisp" + @echo "... roscpp_generate_messages_py" + @echo "... rosgraph_msgs_generate_messages_cpp" + @echo "... rosgraph_msgs_generate_messages_lisp" + @echo "... rosgraph_msgs_generate_messages_py" + @echo "... sensor_msgs_generate_messages_cpp" + @echo "... sensor_msgs_generate_messages_lisp" + @echo "... sensor_msgs_generate_messages_py" + @echo "... test" + @echo "... tf2_msgs_generate_messages_cpp" + @echo "... tf2_msgs_generate_messages_lisp" + @echo "... tf2_msgs_generate_messages_py" + @echo "... tf_generate_messages_cpp" + @echo "... tf_generate_messages_lisp" + @echo "... tf_generate_messages_py" + @echo "... RosAria.o" + @echo "... RosAria.i" + @echo "... RosAria.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-extras.cmake b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-extras.cmake new file mode 100644 index 0000000..3cb9603 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-extras.cmake @@ -0,0 +1,2 @@ +set(rosaria_MESSAGE_FILES "msg/BumperState.msg") +set(rosaria_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths-context.py b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths-context.py new file mode 100644 index 0000000..662d513 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'FALSE' == 'TRUE' +INSTALLSPACE = 'TRUE' == 'TRUE' + +PROJECT_NAME = 'rosaria' +PKG_MSG_INCLUDE_DIRS = 'msg' +ARG_DEPENDENCIES = 'geometry_msgs;std_msgs' diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths.cmake b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths.cmake new file mode 100644 index 0000000..f963a4d --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in installspace +_prepend_path("${rosaria_DIR}/.." "msg" rosaria_MSG_INCLUDE_DIRS UNIQUE) +set(rosaria_MSG_DEPENDENCIES geometry_msgs;std_msgs) diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria.pc b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria.pc new file mode 100644 index 0000000..f052f52 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosaria.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/install + +Name: rosaria +Description: Description of rosaria +Version: 0.9.0 +Cflags: -I/home/lab1_5/ws/ws_linux/install/include +Libs: -L/home/lab1_5/ws/ws_linux/install/lib +Requires: roscpp nav_msgs geometry_msgs sensor_msgs tf diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig-version.cmake b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig-version.cmake new file mode 100644 index 0000000..0df8aa0 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.9.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig.cmake b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig.cmake new file mode 100644 index 0000000..aa7aa4c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(rosaria_CONFIG_INCLUDED) + return() +endif() +set(rosaria_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("FALSE" STREQUAL "TRUE") + set(rosaria_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/rosaria) + set(rosaria_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(rosaria_INSTALL_PREFIX "") + set(rosaria_PREFIX ${rosaria_DEVEL_PREFIX}) +else() + set(rosaria_SOURCE_PREFIX "") + set(rosaria_DEVEL_PREFIX "") + set(rosaria_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(rosaria_PREFIX ${rosaria_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'rosaria' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(rosaria_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "include" STREQUAL "") + set(rosaria_INCLUDE_DIRS "") + set(_include_dirs "include") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${rosaria_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'rosaria' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Srećko Jurić-Kavelj , Ivan Marković , Reed Hedges ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'rosaria' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/install/${idir}'. Ask the maintainer 'Srećko Jurić-Kavelj , Ivan Marković , Reed Hedges ' to fix it.") + endif() + _list_append_unique(rosaria_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND rosaria_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND rosaria_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND rosaria_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/install/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(rosaria_LIBRARY_DIRS ${lib_path}) + list(APPEND rosaria_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'rosaria'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND rosaria_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(rosaria_EXPORTED_TARGETS "rosaria_gencfg;rosaria_generate_messages_cpp;rosaria_generate_messages_lisp;rosaria_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${rosaria_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "roscpp;nav_msgs;geometry_msgs;sensor_msgs;tf") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 rosaria_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${rosaria_dep}_FOUND) + find_package(${rosaria_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${rosaria_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(rosaria_INCLUDE_DIRS ${${rosaria_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(rosaria_LIBRARIES ${rosaria_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${rosaria_dep}_LIBRARIES}) + _list_append_deduplicate(rosaria_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(rosaria_LIBRARIES ${rosaria_LIBRARIES}) + + _list_append_unique(rosaria_LIBRARY_DIRS ${${rosaria_dep}_LIBRARY_DIRS}) + list(APPEND rosaria_EXPORTED_TARGETS ${${rosaria_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "rosaria-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${rosaria_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/ordered_paths.cmake b/Legacy/ws_linux/build/rosaria/catkin_generated/ordered_paths.cmake new file mode 100644 index 0000000..3b5d318 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/ordered_paths.cmake @@ -0,0 +1 @@ +set(ORDERED_PATHS "/opt/ros/hydro/lib") \ No newline at end of file diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/package.cmake b/Legacy/ws_linux/build/rosaria/catkin_generated/package.cmake new file mode 100644 index 0000000..84507ae --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/package.cmake @@ -0,0 +1,7 @@ +set(_CATKIN_CURRENT_PACKAGE "rosaria") +set(rosaria_MAINTAINER "Srećko Jurić-Kavelj , Ivan Marković , Reed Hedges ") +set(rosaria_DEPRECATED "") +set(rosaria_VERSION "0.9.0") +set(rosaria_BUILD_DEPENDS "message_generation" "libaria" "roscpp" "nav_msgs" "geometry_msgs" "sensor_msgs" "std_msgs" "tf" "dynamic_reconfigure" "std_msgs") +set(rosaria_RUN_DEPENDS "libaria" "roscpp" "nav_msgs" "geometry_msgs" "sensor_msgs" "tf" "dynamic_reconfigure") +set(rosaria_BUILDTOOL_DEPENDS "catkin") \ No newline at end of file diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/pkg.develspace.context.pc.py b/Legacy/ws_linux/build/rosaria/catkin_generated/pkg.develspace.context.pc.py new file mode 100644 index 0000000..72e3bd5 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/pkg.develspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lab1_5/ws/ws_linux/devel/include".split(';') if "/home/lab1_5/ws/ws_linux/devel/include" != "" else [] +PROJECT_CATKIN_DEPENDS = "roscpp;nav_msgs;geometry_msgs;sensor_msgs;tf".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] +PROJECT_NAME = "rosaria" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/devel" +PROJECT_VERSION = "0.9.0" diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/pkg.installspace.context.pc.py b/Legacy/ws_linux/build/rosaria/catkin_generated/pkg.installspace.context.pc.py new file mode 100644 index 0000000..c28e17b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/pkg.installspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lab1_5/ws/ws_linux/install/include".split(';') if "/home/lab1_5/ws/ws_linux/install/include" != "" else [] +PROJECT_CATKIN_DEPENDS = "roscpp;nav_msgs;geometry_msgs;sensor_msgs;tf".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] +PROJECT_NAME = "rosaria" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/install" +PROJECT_VERSION = "0.9.0" diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-extras.cmake.develspace.in b/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-extras.cmake.develspace.in new file mode 100644 index 0000000..01b9d0d --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-extras.cmake.develspace.in @@ -0,0 +1,2 @@ +set(rosaria_MESSAGE_FILES "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg") +set(rosaria_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-extras.cmake.installspace.in b/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-extras.cmake.installspace.in new file mode 100644 index 0000000..3cb9603 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-extras.cmake.installspace.in @@ -0,0 +1,2 @@ +set(rosaria_MESSAGE_FILES "msg/BumperState.msg") +set(rosaria_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-paths-context.py b/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-paths-context.py new file mode 100644 index 0000000..2266d3c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/rosaria-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'TRUE' == 'TRUE' +INSTALLSPACE = 'FALSE' == 'TRUE' + +PROJECT_NAME = 'rosaria' +PKG_MSG_INCLUDE_DIRS = '/home/lab1_5/ws/ws_linux/src/rosaria/msg' +ARG_DEPENDENCIES = 'geometry_msgs;std_msgs' diff --git a/package.xml b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/package.xml.stamp similarity index 100% rename from package.xml rename to Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/package.xml.stamp diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg-genmsg.cmake.em.stamp b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg-genmsg.cmake.em.stamp new file mode 100644 index 0000000..5182859 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg-genmsg.cmake.em.stamp @@ -0,0 +1,141 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +@{ +import os +import sys + +import genmsg +import genmsg.base +genmsg.base.log_verbose('GENMSG_VERBOSE' in os.environ) +import genmsg.deps +import genmsg.gentools + +# split incoming variables +messages = messages_str.split(';') if messages_str != '' else [] +services = services_str.split(';') if services_str != '' else [] +dependencies = dependencies_str.split(';') if dependencies_str != '' else [] +dep_search_paths = dep_include_paths_str.split(';') if dep_include_paths_str != '' else [] + +dep_search_paths_dict = {} +dep_search_paths_tuple_list = [] +is_even = True +for val in dep_search_paths: + if is_even: + dep_search_paths_dict.setdefault(val, []) + val_prev = val + is_even = False + else: + dep_search_paths_dict[val_prev].append(val) + dep_search_paths_tuple_list.append((val_prev, val)) + is_even = True +dep_search_paths = dep_search_paths_dict + +if not messages and not services: + print('message(WARNING "Invoking generate_messages() without having added any message or service file before.\nYou should either add add_message_files() and/or add_service_files() calls or remove the invocation of generate_messages().")') + +msg_deps = {} +for m in messages: + try: + msg_deps[m] = genmsg.deps.find_msg_dependencies(pkg_name, m, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (m, str(e))) + +srv_deps = {} +for s in services: + try: + srv_deps[s] = genmsg.deps.find_srv_dependencies(pkg_name, s, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (s, str(e))) + +}@ +message(STATUS "@(pkg_name): @(len(messages)) messages, @(len(services)) services") + +set(MSG_I_FLAGS "@(';'.join(["-I%s:%s" % (dep, dir) for dep, dir in dep_search_paths_tuple_list]))") + +# Find all generators +@[if langs]@ +@[for l in langs.split(';')]@ +find_package(@l REQUIRED) +@[end for]@ +@[end if]@ + +add_custom_target(@(pkg_name)_generate_messages ALL) + +# +# langs = @langs +# + +@[if langs]@ +@[for l in langs.split(';')]@ +### Section generating for lang: @l +### Generating Messages +@[for m in msg_deps.keys()]@ +_generate_msg_@(l[3:])(@pkg_name + "@m" + "${MSG_I_FLAGS}" + "@(';'.join(msg_deps[m]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# messages + +### Generating Services +@[for s in srv_deps.keys()]@ +_generate_srv_@(l[3:])(@pkg_name + "@s" + "${MSG_I_FLAGS}" + "@(';'.join(srv_deps[s]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# services + +### Generating Module File +_generate_module_@(l[3:])(@pkg_name + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + "${ALL_GEN_OUTPUT_FILES_@(l[3:])}" +) + +add_custom_target(@(pkg_name)_generate_messages_@(l[3:]) + DEPENDS ${ALL_GEN_OUTPUT_FILES_@(l[3:])} +) +add_dependencies(@(pkg_name)_generate_messages @(pkg_name)_generate_messages_@(l[3:])) + +# target for backward compatibility +add_custom_target(@(pkg_name)_@(l)) +add_dependencies(@(pkg_name)_@(l) @(pkg_name)_generate_messages_@(l[3:])) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS @(pkg_name)_generate_messages_@(l[3:])) + +@[end for]@# langs +@[end if]@ + +@[if langs]@ +@[for l in langs.split(';')]@ + +if(@(l)_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name) +@[if l == 'genpy']@ + install(CODE "execute_process(COMMAND \"@(PYTHON_EXECUTABLE)\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name\")") +@[end if]@ + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} +@[if l == 'genpy' and package_has_static_sources]@ + # skip all init files + PATTERN "__init__.py" EXCLUDE + PATTERN "__init__.pyc" EXCLUDE + ) + # install init files which are not in the root folder of the generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} + FILES_MATCHING + REGEX "${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@(pkg_name)/.+/__init__.pyc?$" +@[end if]@ + ) +endif() +@[for d in dependencies]@ +add_dependencies(@(pkg_name)_generate_messages_@(l[3:]) @(d)_generate_messages_@(l[3:])) +@[end for]@# dependencies +@[end for]@# langs +@[end if]@ diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg-msg-paths.cmake.em.stamp b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg-msg-paths.cmake.em.stamp new file mode 100644 index 0000000..eb6f88a --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg-msg-paths.cmake.em.stamp @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +@[if DEVELSPACE]@ +# message include dirs in develspace +set(@(PROJECT_NAME)_MSG_INCLUDE_DIRS "@(PKG_MSG_INCLUDE_DIRS)") +@[else]@ +# message include dirs in installspace +_prepend_path("${@(PROJECT_NAME)_DIR}/.." "@(PKG_MSG_INCLUDE_DIRS)" @(PROJECT_NAME)_MSG_INCLUDE_DIRS UNIQUE) +@[end if]@ +set(@(PROJECT_NAME)_MSG_DEPENDENCIES @(ARG_DEPENDENCIES)) diff --git a/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg.pc.em.stamp b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg.pc.em.stamp new file mode 100644 index 0000000..a4f7257 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/catkin_generated/stamps/rosaria/pkg.pc.em.stamp @@ -0,0 +1,8 @@ +prefix=@PROJECT_SPACE_DIR + +Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME) +Description: Description of @PROJECT_NAME +Version: @PROJECT_VERSION +Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS])) +Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX)) +Requires: @(PROJECT_CATKIN_DEPENDS) diff --git a/Legacy/ws_linux/build/rosaria/cmake/rosaria-genmsg-context.py b/Legacy/ws_linux/build/rosaria/cmake/rosaria-genmsg-context.py new file mode 100644 index 0000000..030edc0 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/cmake/rosaria-genmsg-context.py @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-genmsg.context.in + +messages_str = "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg" +services_str = "" +pkg_name = "rosaria" +dependencies_str = "geometry_msgs;std_msgs" +langs = "gencpp;genlisp;genpy" +dep_include_paths_str = "rosaria;/home/lab1_5/ws/ws_linux/src/rosaria/msg;geometry_msgs;/opt/ros/hydro/share/geometry_msgs/cmake/../msg;std_msgs;/opt/ros/hydro/share/std_msgs/cmake/../msg" +PYTHON_EXECUTABLE = "/usr/bin/python" +package_has_static_sources = '' == 'TRUE' diff --git a/Legacy/ws_linux/build/rosaria/cmake/rosaria-genmsg.cmake b/Legacy/ws_linux/build/rosaria/cmake/rosaria-genmsg.cmake new file mode 100644 index 0000000..81b8118 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/cmake/rosaria-genmsg.cmake @@ -0,0 +1,136 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +message(STATUS "rosaria: 1 messages, 0 services") + +set(MSG_I_FLAGS "-Irosaria:/home/lab1_5/ws/ws_linux/src/rosaria/msg;-Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg;-Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg") + +# Find all generators +find_package(gencpp REQUIRED) +find_package(genlisp REQUIRED) +find_package(genpy REQUIRED) + +add_custom_target(rosaria_generate_messages ALL) + +# +# langs = gencpp;genlisp;genpy +# + +### Section generating for lang: gencpp +### Generating Messages +_generate_msg_cpp(rosaria + "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/std_msgs/cmake/../msg/Header.msg" + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria +) + +### Generating Services + +### Generating Module File +_generate_module_cpp(rosaria + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria + "${ALL_GEN_OUTPUT_FILES_cpp}" +) + +add_custom_target(rosaria_generate_messages_cpp + DEPENDS ${ALL_GEN_OUTPUT_FILES_cpp} +) +add_dependencies(rosaria_generate_messages rosaria_generate_messages_cpp) + +# target for backward compatibility +add_custom_target(rosaria_gencpp) +add_dependencies(rosaria_gencpp rosaria_generate_messages_cpp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS rosaria_generate_messages_cpp) + +### Section generating for lang: genlisp +### Generating Messages +_generate_msg_lisp(rosaria + "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/std_msgs/cmake/../msg/Header.msg" + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria +) + +### Generating Services + +### Generating Module File +_generate_module_lisp(rosaria + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria + "${ALL_GEN_OUTPUT_FILES_lisp}" +) + +add_custom_target(rosaria_generate_messages_lisp + DEPENDS ${ALL_GEN_OUTPUT_FILES_lisp} +) +add_dependencies(rosaria_generate_messages rosaria_generate_messages_lisp) + +# target for backward compatibility +add_custom_target(rosaria_genlisp) +add_dependencies(rosaria_genlisp rosaria_generate_messages_lisp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS rosaria_generate_messages_lisp) + +### Section generating for lang: genpy +### Generating Messages +_generate_msg_py(rosaria + "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/std_msgs/cmake/../msg/Header.msg" + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria +) + +### Generating Services + +### Generating Module File +_generate_module_py(rosaria + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria + "${ALL_GEN_OUTPUT_FILES_py}" +) + +add_custom_target(rosaria_generate_messages_py + DEPENDS ${ALL_GEN_OUTPUT_FILES_py} +) +add_dependencies(rosaria_generate_messages rosaria_generate_messages_py) + +# target for backward compatibility +add_custom_target(rosaria_genpy) +add_dependencies(rosaria_genpy rosaria_generate_messages_py) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS rosaria_generate_messages_py) + + + +if(gencpp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria + DESTINATION ${gencpp_INSTALL_DIR} + ) +endif() +add_dependencies(rosaria_generate_messages_cpp geometry_msgs_generate_messages_cpp) +add_dependencies(rosaria_generate_messages_cpp std_msgs_generate_messages_cpp) + +if(genlisp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria + DESTINATION ${genlisp_INSTALL_DIR} + ) +endif() +add_dependencies(rosaria_generate_messages_lisp geometry_msgs_generate_messages_lisp) +add_dependencies(rosaria_generate_messages_lisp std_msgs_generate_messages_lisp) + +if(genpy_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria) + install(CODE "execute_process(COMMAND \"/usr/bin/python\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria\")") + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria + DESTINATION ${genpy_INSTALL_DIR} + ) +endif() +add_dependencies(rosaria_generate_messages_py geometry_msgs_generate_messages_py) +add_dependencies(rosaria_generate_messages_py std_msgs_generate_messages_py) diff --git a/Legacy/ws_linux/build/rosaria/cmake_install.cmake b/Legacy/ws_linux/build/rosaria/cmake_install.cmake new file mode 100644 index 0000000..bb57709 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria/cmake_install.cmake @@ -0,0 +1,111 @@ +# Install script for directory: /home/lab1_5/ws/ws_linux/src/rosaria + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/home/lab1_5/ws/ws_linux/install") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria/msg" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/rosaria" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages/rosaria" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/__init__.py") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + execute_process(COMMAND "/usr/bin/python" -m compileall "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages/rosaria" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-paths.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/include/rosaria") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/common-lisp/ros" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + execute_process(COMMAND "/usr/bin/python" -m compileall "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/rosaria/catkin_generated/installspace/rosaria.pc") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/rosaria/catkin_generated/installspace/rosaria-msg-extras.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria/cmake" TYPE FILE FILES + "/home/lab1_5/ws/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig.cmake" + "/home/lab1_5/ws/ws_linux/build/rosaria/catkin_generated/installspace/rosariaConfig-version.cmake" + ) +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/src/rosaria/package.xml") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria" AND + NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria") + FILE(RPATH_CHECK + FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria" + RPATH "") + ENDIF() + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/rosaria" TYPE EXECUTABLE FILES "/home/lab1_5/ws/ws_linux/devel/lib/rosaria/RosAria") + IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria" AND + NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria") + FILE(RPATH_REMOVE + FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria") + IF(CMAKE_INSTALL_DO_STRIP) + EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/rosaria/RosAria") + ENDIF(CMAKE_INSTALL_DO_STRIP) + ENDIF() +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/CMakeDirectoryInformation.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..4e991dd --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,24 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Relative path conversion top directories. +SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/lab1_5/ws/ws_linux/src") +SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/lab1_5/ws/ws_linux/build") + +# Force unix paths in dependencies. +SET(CMAKE_FORCE_UNIX_PATHS 1) + +# The C and CXX include file search paths: +SET(CMAKE_C_INCLUDE_PATH + "/home/lab1_5/ws/ws_linux/devel/include" + "/opt/ros/hydro/include" + ) +SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) + +# The C and CXX include file regular expressions for this directory. +SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..bb02bbd --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for geometry_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/progress.make + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp: + +geometry_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp +geometry_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make +.PHONY : geometry_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build: geometry_msgs_generate_messages_cpp +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/geometry_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/clean + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..7604a6c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/geometry_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/geometry_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..77d2dec --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for geometry_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/progress.make + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp: + +geometry_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp +geometry_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make +.PHONY : geometry_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build: geometry_msgs_generate_messages_lisp +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/geometry_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/clean + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..71acf8d --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/geometry_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/geometry_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..7318be8 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for geometry_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/progress.make + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py: + +geometry_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py +geometry_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make +.PHONY : geometry_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build: geometry_msgs_generate_messages_py +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/geometry_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/clean + +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..ec52fbc --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/geometry_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/geometry_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/progress.marks b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/progress.marks new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/progress.marks @@ -0,0 +1 @@ +7 diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make new file mode 100644 index 0000000..89580c8 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_gencpp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp: + +rosaria_msgs_gencpp: rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp +rosaria_msgs_gencpp: rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make +.PHONY : rosaria_msgs_gencpp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build: rosaria_msgs_gencpp +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_gencpp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..2545aab --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_gencpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_gencpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make new file mode 100644 index 0000000..797a3f1 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_generate_messages. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages: + +rosaria_msgs_generate_messages: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages +rosaria_msgs_generate_messages: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make +.PHONY : rosaria_msgs_generate_messages + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build: rosaria_msgs_generate_messages +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_generate_messages.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/cmake_clean.cmake new file mode 100644 index 0000000..64b8c4f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_generate_messages" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_generate_messages.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..56ff59e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,85 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h + +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/geometry_msgs/cmake/../msg/Twist.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/std_msgs/cmake/../msg/UInt8.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/geometry_msgs/cmake/../msg/Vector3.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/std_msgs/cmake/../msg/Bool.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h: /opt/ros/hydro/share/gencpp/cmake/../msg.h.template + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating C++ code from rosaria_msgs/RobotInfoMsg.msg" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg -Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -p rosaria_msgs -o /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs -e /opt/ros/hydro/share/gencpp/cmake/.. + +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h: /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h: /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h: /opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg +/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h: /opt/ros/hydro/share/gencpp/cmake/../msg.h.template + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_2) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating C++ code from rosaria_msgs/RestrictionsMsg.msg" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg -Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -p rosaria_msgs -o /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs -e /opt/ros/hydro/share/gencpp/cmake/.. + +rosaria_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp +rosaria_msgs_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h +rosaria_msgs_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h +rosaria_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make +.PHONY : rosaria_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build: rosaria_msgs_generate_messages_cpp +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..908b1ea --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_generate_messages_cpp" + "/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h" + "/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..596289c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 11 +CMAKE_PROGRESS_2 = 12 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..2e49e1a --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,83 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp + +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /opt/ros/hydro/share/geometry_msgs/cmake/../msg/Twist.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /opt/ros/hydro/share/std_msgs/cmake/../msg/UInt8.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /opt/ros/hydro/share/geometry_msgs/cmake/../msg/Vector3.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp: /opt/ros/hydro/share/std_msgs/cmake/../msg/Bool.msg + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Lisp code from rosaria_msgs/RobotInfoMsg.msg" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg -Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -p rosaria_msgs -o /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg + +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp: /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp: /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp: /opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_2) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Lisp code from rosaria_msgs/RestrictionsMsg.msg" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg -Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -p rosaria_msgs -o /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg + +rosaria_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp +rosaria_msgs_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp +rosaria_msgs_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp +rosaria_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make +.PHONY : rosaria_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build: rosaria_msgs_generate_messages_lisp +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..6391df9 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_generate_messages_lisp" + "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp" + "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..d92f75a --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 13 +CMAKE_PROGRESS_2 = 14 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..c84c9b0 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,92 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /opt/ros/hydro/share/geometry_msgs/cmake/../msg/Twist.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /opt/ros/hydro/share/std_msgs/cmake/../msg/UInt8.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /opt/ros/hydro/share/geometry_msgs/cmake/../msg/Vector3.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py: /opt/ros/hydro/share/std_msgs/cmake/../msg/Bool.msg + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python from MSG rosaria_msgs/RobotInfoMsg" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg -Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -p rosaria_msgs -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py: /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py: /opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_2) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python from MSG rosaria_msgs/RestrictionsMsg" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg -Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg -p rosaria_msgs -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_3) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python msg __init__.py for rosaria_msgs" + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg --initpy + +rosaria_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py +rosaria_msgs_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py +rosaria_msgs_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py +rosaria_msgs_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py +rosaria_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make +.PHONY : rosaria_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build: rosaria_msgs_generate_messages_py +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..2a70c06 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,11 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_generate_messages_py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/__init__.py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..06dbb11 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1,4 @@ +CMAKE_PROGRESS_1 = 15 +CMAKE_PROGRESS_2 = 16 +CMAKE_PROGRESS_3 = 17 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make new file mode 100644 index 0000000..385029c --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_genlisp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp: + +rosaria_msgs_genlisp: rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp +rosaria_msgs_genlisp: rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make +.PHONY : rosaria_msgs_genlisp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build: rosaria_msgs_genlisp +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_genlisp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..f42aa50 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_genlisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_genlisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make new file mode 100644 index 0000000..a77ce1e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for rosaria_msgs_genpy. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/progress.make + +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy: + +rosaria_msgs_genpy: rosaria_msgs/CMakeFiles/rosaria_msgs_genpy +rosaria_msgs_genpy: rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make +.PHONY : rosaria_msgs_genpy + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build: rosaria_msgs_genpy +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build + +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/rosaria_msgs_genpy.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/clean + +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/cmake_clean.cmake new file mode 100644 index 0000000..eb9e13f --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/rosaria_msgs_genpy" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/rosaria_msgs_genpy.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..4ea0533 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for std_msgs_generate_messages_cpp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp: + +std_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp +std_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make +.PHONY : std_msgs_generate_messages_cpp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build: std_msgs_generate_messages_cpp +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/clean + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..6d9f3cf --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/std_msgs_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..7e0e5b3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for std_msgs_generate_messages_lisp. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp: + +std_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp +std_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make +.PHONY : std_msgs_generate_messages_lisp + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build: std_msgs_generate_messages_lisp +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/clean + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..1629779 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/std_msgs_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..8bc32e3 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,13 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make new file mode 100644 index 0000000..c1e4d16 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for std_msgs_generate_messages_py. + +# Include the progress variables for this target. +include rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py: + +std_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py +std_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make +.PHONY : std_msgs_generate_messages_py + +# Rule to build all files generated by this target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build: std_msgs_generate_messages_py +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/rosaria_msgs && $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/clean + +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/rosaria_msgs /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/rosaria_msgs /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..73217c0 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/std_msgs_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend.internal b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/rosaria_msgs/CTestTestfile.cmake b/Legacy/ws_linux/build/rosaria_msgs/CTestTestfile.cmake new file mode 100644 index 0000000..8682ab6 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/CTestTestfile.cmake @@ -0,0 +1,6 @@ +# CMake generated Testfile for +# Source directory: /home/lab1_5/ws/ws_linux/src/rosaria_msgs +# Build directory: /home/lab1_5/ws/ws_linux/build/rosaria_msgs +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. diff --git a/Legacy/ws_linux/build/rosaria_msgs/Makefile b/Legacy/ws_linux/build/rosaria_msgs/Makefile new file mode 100644 index 0000000..577627d --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/Makefile @@ -0,0 +1,370 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles /home/lab1_5/ws/ws_linux/build/rosaria_msgs/CMakeFiles/progress.marks + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +geometry_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/rule +.PHONY : geometry_msgs_generate_messages_cpp + +# fast build rule for target. +geometry_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_cpp.dir/build +.PHONY : geometry_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +geometry_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/rule +.PHONY : geometry_msgs_generate_messages_lisp + +# fast build rule for target. +geometry_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_lisp.dir/build +.PHONY : geometry_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +geometry_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/rule +.PHONY : geometry_msgs_generate_messages_py + +# fast build rule for target. +geometry_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/geometry_msgs_generate_messages_py.dir/build +.PHONY : geometry_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule + +# Convenience name for target. +rosaria_msgs_gencpp: rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/rule +.PHONY : rosaria_msgs_gencpp + +# fast build rule for target. +rosaria_msgs_gencpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_gencpp.dir/build +.PHONY : rosaria_msgs_gencpp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/rule +.PHONY : rosaria_msgs_generate_messages + +# fast build rule for target. +rosaria_msgs_generate_messages/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages.dir/build +.PHONY : rosaria_msgs_generate_messages/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria_msgs_generate_messages_cpp + +# fast build rule for target. +rosaria_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_cpp.dir/build +.PHONY : rosaria_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria_msgs_generate_messages_lisp + +# fast build rule for target. +rosaria_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_lisp.dir/build +.PHONY : rosaria_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +rosaria_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/rule +.PHONY : rosaria_msgs_generate_messages_py + +# fast build rule for target. +rosaria_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_generate_messages_py.dir/build +.PHONY : rosaria_msgs_generate_messages_py/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule + +# Convenience name for target. +rosaria_msgs_genlisp: rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/rule +.PHONY : rosaria_msgs_genlisp + +# fast build rule for target. +rosaria_msgs_genlisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genlisp.dir/build +.PHONY : rosaria_msgs_genlisp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule + +# Convenience name for target. +rosaria_msgs_genpy: rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/rule +.PHONY : rosaria_msgs_genpy + +# fast build rule for target. +rosaria_msgs_genpy/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build.make rosaria_msgs/CMakeFiles/rosaria_msgs_genpy.dir/build +.PHONY : rosaria_msgs_genpy/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule + +# Convenience name for target. +std_msgs_generate_messages_cpp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/rule +.PHONY : std_msgs_generate_messages_cpp + +# fast build rule for target. +std_msgs_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_cpp.dir/build +.PHONY : std_msgs_generate_messages_cpp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule + +# Convenience name for target. +std_msgs_generate_messages_lisp: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/rule +.PHONY : std_msgs_generate_messages_lisp + +# fast build rule for target. +std_msgs_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_lisp.dir/build +.PHONY : std_msgs_generate_messages_lisp/fast + +# Convenience name for target. +rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule +.PHONY : rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule + +# Convenience name for target. +std_msgs_generate_messages_py: rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/rule +.PHONY : std_msgs_generate_messages_py + +# fast build rule for target. +std_msgs_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build.make rosaria_msgs/CMakeFiles/std_msgs_generate_messages_py.dir/build +.PHONY : std_msgs_generate_messages_py/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... geometry_msgs_generate_messages_cpp" + @echo "... geometry_msgs_generate_messages_lisp" + @echo "... geometry_msgs_generate_messages_py" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... rosaria_msgs_gencpp" + @echo "... rosaria_msgs_generate_messages" + @echo "... rosaria_msgs_generate_messages_cpp" + @echo "... rosaria_msgs_generate_messages_lisp" + @echo "... rosaria_msgs_generate_messages_py" + @echo "... rosaria_msgs_genlisp" + @echo "... rosaria_msgs_genpy" + @echo "... std_msgs_generate_messages_cpp" + @echo "... std_msgs_generate_messages_lisp" + @echo "... std_msgs_generate_messages_py" + @echo "... test" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-extras.cmake b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-extras.cmake new file mode 100644 index 0000000..7b087f9 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-extras.cmake @@ -0,0 +1,2 @@ +set(rosaria_msgs_MESSAGE_FILES "msg/RestrictionsMsg.msg;msg/RobotInfoMsg.msg") +set(rosaria_msgs_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths-context.py b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths-context.py new file mode 100644 index 0000000..46fb66e --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'FALSE' == 'TRUE' +INSTALLSPACE = 'TRUE' == 'TRUE' + +PROJECT_NAME = 'rosaria_msgs' +PKG_MSG_INCLUDE_DIRS = 'msg' +ARG_DEPENDENCIES = 'std_msgs;geometry_msgs' diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths.cmake b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths.cmake new file mode 100644 index 0000000..36ecc85 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in installspace +_prepend_path("${rosaria_msgs_DIR}/.." "msg" rosaria_msgs_MSG_INCLUDE_DIRS UNIQUE) +set(rosaria_msgs_MSG_DEPENDENCIES std_msgs;geometry_msgs) diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs.pc b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs.pc new file mode 100644 index 0000000..a13e505 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/install + +Name: rosaria_msgs +Description: Description of rosaria_msgs +Version: 0.0.0 +Cflags: -I/home/lab1_5/ws/ws_linux/install/include +Libs: -L/home/lab1_5/ws/ws_linux/install/lib +Requires: message_runtime diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig-version.cmake b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig-version.cmake new file mode 100644 index 0000000..7fd9f99 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig.cmake b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig.cmake new file mode 100644 index 0000000..39010a8 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(rosaria_msgs_CONFIG_INCLUDED) + return() +endif() +set(rosaria_msgs_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("FALSE" STREQUAL "TRUE") + set(rosaria_msgs_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/rosaria_msgs) + set(rosaria_msgs_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(rosaria_msgs_INSTALL_PREFIX "") + set(rosaria_msgs_PREFIX ${rosaria_msgs_DEVEL_PREFIX}) +else() + set(rosaria_msgs_SOURCE_PREFIX "") + set(rosaria_msgs_DEVEL_PREFIX "") + set(rosaria_msgs_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(rosaria_msgs_PREFIX ${rosaria_msgs_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'rosaria_msgs' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(rosaria_msgs_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "include" STREQUAL "") + set(rosaria_msgs_INCLUDE_DIRS "") + set(_include_dirs "include") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${rosaria_msgs_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'rosaria_msgs' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Aleksander Bojda ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'rosaria_msgs' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/install/${idir}'. Ask the maintainer 'Aleksander Bojda ' to fix it.") + endif() + _list_append_unique(rosaria_msgs_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND rosaria_msgs_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND rosaria_msgs_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND rosaria_msgs_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/install/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(rosaria_msgs_LIBRARY_DIRS ${lib_path}) + list(APPEND rosaria_msgs_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'rosaria_msgs'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND rosaria_msgs_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(rosaria_msgs_EXPORTED_TARGETS "rosaria_msgs_generate_messages_cpp;rosaria_msgs_generate_messages_lisp;rosaria_msgs_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${rosaria_msgs_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "message_runtime") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 rosaria_msgs_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${rosaria_msgs_dep}_FOUND) + find_package(${rosaria_msgs_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${rosaria_msgs_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(rosaria_msgs_INCLUDE_DIRS ${${rosaria_msgs_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(rosaria_msgs_LIBRARIES ${rosaria_msgs_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${rosaria_msgs_dep}_LIBRARIES}) + _list_append_deduplicate(rosaria_msgs_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(rosaria_msgs_LIBRARIES ${rosaria_msgs_LIBRARIES}) + + _list_append_unique(rosaria_msgs_LIBRARY_DIRS ${${rosaria_msgs_dep}_LIBRARY_DIRS}) + list(APPEND rosaria_msgs_EXPORTED_TARGETS ${${rosaria_msgs_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "rosaria_msgs-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${rosaria_msgs_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/ordered_paths.cmake b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/ordered_paths.cmake new file mode 100644 index 0000000..3b5d318 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/ordered_paths.cmake @@ -0,0 +1 @@ +set(ORDERED_PATHS "/opt/ros/hydro/lib") \ No newline at end of file diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/package.cmake b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/package.cmake new file mode 100644 index 0000000..8239483 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/package.cmake @@ -0,0 +1,7 @@ +set(_CATKIN_CURRENT_PACKAGE "rosaria_msgs") +set(rosaria_msgs_MAINTAINER "Aleksander Bojda ") +set(rosaria_msgs_DEPRECATED "") +set(rosaria_msgs_VERSION "0.0.0") +set(rosaria_msgs_BUILD_DEPENDS "std_msgs" "message_generation") +set(rosaria_msgs_RUN_DEPENDS "std_msgs" "message_runtime" "message_generation") +set(rosaria_msgs_BUILDTOOL_DEPENDS "catkin") \ No newline at end of file diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/pkg.develspace.context.pc.py b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/pkg.develspace.context.pc.py new file mode 100644 index 0000000..714539d --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/pkg.develspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lab1_5/ws/ws_linux/devel/include".split(';') if "/home/lab1_5/ws/ws_linux/devel/include" != "" else [] +PROJECT_CATKIN_DEPENDS = "message_runtime".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] +PROJECT_NAME = "rosaria_msgs" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/devel" +PROJECT_VERSION = "0.0.0" diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/pkg.installspace.context.pc.py b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/pkg.installspace.context.pc.py new file mode 100644 index 0000000..3fb7ef6 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/pkg.installspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lab1_5/ws/ws_linux/install/include".split(';') if "/home/lab1_5/ws/ws_linux/install/include" != "" else [] +PROJECT_CATKIN_DEPENDS = "message_runtime".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] +PROJECT_NAME = "rosaria_msgs" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/install" +PROJECT_VERSION = "0.0.0" diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.develspace.in b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.develspace.in new file mode 100644 index 0000000..e01c757 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.develspace.in @@ -0,0 +1,2 @@ +set(rosaria_msgs_MESSAGE_FILES "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg;/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg") +set(rosaria_msgs_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.installspace.in b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.installspace.in new file mode 100644 index 0000000..7b087f9 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-extras.cmake.installspace.in @@ -0,0 +1,2 @@ +set(rosaria_msgs_MESSAGE_FILES "msg/RestrictionsMsg.msg;msg/RobotInfoMsg.msg") +set(rosaria_msgs_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-paths-context.py b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-paths-context.py new file mode 100644 index 0000000..1678578 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/rosaria_msgs-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'TRUE' == 'TRUE' +INSTALLSPACE = 'FALSE' == 'TRUE' + +PROJECT_NAME = 'rosaria_msgs' +PKG_MSG_INCLUDE_DIRS = '/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg' +ARG_DEPENDENCIES = 'std_msgs;geometry_msgs' diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/package.xml.stamp b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/package.xml.stamp new file mode 100644 index 0000000..81a1a54 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/package.xml.stamp @@ -0,0 +1,21 @@ + + + rosaria_msgs + 0.0.0 + The rosaria_msgs package + + Aleksander Bojda + + MIT + + catkin + std_msgs + message_generation + + std_msgs + message_generation + + std_msgs + message_runtime + + diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg-genmsg.cmake.em.stamp b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg-genmsg.cmake.em.stamp new file mode 100644 index 0000000..5182859 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg-genmsg.cmake.em.stamp @@ -0,0 +1,141 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +@{ +import os +import sys + +import genmsg +import genmsg.base +genmsg.base.log_verbose('GENMSG_VERBOSE' in os.environ) +import genmsg.deps +import genmsg.gentools + +# split incoming variables +messages = messages_str.split(';') if messages_str != '' else [] +services = services_str.split(';') if services_str != '' else [] +dependencies = dependencies_str.split(';') if dependencies_str != '' else [] +dep_search_paths = dep_include_paths_str.split(';') if dep_include_paths_str != '' else [] + +dep_search_paths_dict = {} +dep_search_paths_tuple_list = [] +is_even = True +for val in dep_search_paths: + if is_even: + dep_search_paths_dict.setdefault(val, []) + val_prev = val + is_even = False + else: + dep_search_paths_dict[val_prev].append(val) + dep_search_paths_tuple_list.append((val_prev, val)) + is_even = True +dep_search_paths = dep_search_paths_dict + +if not messages and not services: + print('message(WARNING "Invoking generate_messages() without having added any message or service file before.\nYou should either add add_message_files() and/or add_service_files() calls or remove the invocation of generate_messages().")') + +msg_deps = {} +for m in messages: + try: + msg_deps[m] = genmsg.deps.find_msg_dependencies(pkg_name, m, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (m, str(e))) + +srv_deps = {} +for s in services: + try: + srv_deps[s] = genmsg.deps.find_srv_dependencies(pkg_name, s, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (s, str(e))) + +}@ +message(STATUS "@(pkg_name): @(len(messages)) messages, @(len(services)) services") + +set(MSG_I_FLAGS "@(';'.join(["-I%s:%s" % (dep, dir) for dep, dir in dep_search_paths_tuple_list]))") + +# Find all generators +@[if langs]@ +@[for l in langs.split(';')]@ +find_package(@l REQUIRED) +@[end for]@ +@[end if]@ + +add_custom_target(@(pkg_name)_generate_messages ALL) + +# +# langs = @langs +# + +@[if langs]@ +@[for l in langs.split(';')]@ +### Section generating for lang: @l +### Generating Messages +@[for m in msg_deps.keys()]@ +_generate_msg_@(l[3:])(@pkg_name + "@m" + "${MSG_I_FLAGS}" + "@(';'.join(msg_deps[m]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# messages + +### Generating Services +@[for s in srv_deps.keys()]@ +_generate_srv_@(l[3:])(@pkg_name + "@s" + "${MSG_I_FLAGS}" + "@(';'.join(srv_deps[s]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# services + +### Generating Module File +_generate_module_@(l[3:])(@pkg_name + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + "${ALL_GEN_OUTPUT_FILES_@(l[3:])}" +) + +add_custom_target(@(pkg_name)_generate_messages_@(l[3:]) + DEPENDS ${ALL_GEN_OUTPUT_FILES_@(l[3:])} +) +add_dependencies(@(pkg_name)_generate_messages @(pkg_name)_generate_messages_@(l[3:])) + +# target for backward compatibility +add_custom_target(@(pkg_name)_@(l)) +add_dependencies(@(pkg_name)_@(l) @(pkg_name)_generate_messages_@(l[3:])) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS @(pkg_name)_generate_messages_@(l[3:])) + +@[end for]@# langs +@[end if]@ + +@[if langs]@ +@[for l in langs.split(';')]@ + +if(@(l)_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name) +@[if l == 'genpy']@ + install(CODE "execute_process(COMMAND \"@(PYTHON_EXECUTABLE)\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name\")") +@[end if]@ + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} +@[if l == 'genpy' and package_has_static_sources]@ + # skip all init files + PATTERN "__init__.py" EXCLUDE + PATTERN "__init__.pyc" EXCLUDE + ) + # install init files which are not in the root folder of the generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} + FILES_MATCHING + REGEX "${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@(pkg_name)/.+/__init__.pyc?$" +@[end if]@ + ) +endif() +@[for d in dependencies]@ +add_dependencies(@(pkg_name)_generate_messages_@(l[3:]) @(d)_generate_messages_@(l[3:])) +@[end for]@# dependencies +@[end for]@# langs +@[end if]@ diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg-msg-paths.cmake.em.stamp b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg-msg-paths.cmake.em.stamp new file mode 100644 index 0000000..eb6f88a --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg-msg-paths.cmake.em.stamp @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +@[if DEVELSPACE]@ +# message include dirs in develspace +set(@(PROJECT_NAME)_MSG_INCLUDE_DIRS "@(PKG_MSG_INCLUDE_DIRS)") +@[else]@ +# message include dirs in installspace +_prepend_path("${@(PROJECT_NAME)_DIR}/.." "@(PKG_MSG_INCLUDE_DIRS)" @(PROJECT_NAME)_MSG_INCLUDE_DIRS UNIQUE) +@[end if]@ +set(@(PROJECT_NAME)_MSG_DEPENDENCIES @(ARG_DEPENDENCIES)) diff --git a/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg.pc.em.stamp b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg.pc.em.stamp new file mode 100644 index 0000000..a4f7257 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/catkin_generated/stamps/rosaria_msgs/pkg.pc.em.stamp @@ -0,0 +1,8 @@ +prefix=@PROJECT_SPACE_DIR + +Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME) +Description: Description of @PROJECT_NAME +Version: @PROJECT_VERSION +Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS])) +Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX)) +Requires: @(PROJECT_CATKIN_DEPENDS) diff --git a/Legacy/ws_linux/build/rosaria_msgs/cmake/rosaria_msgs-genmsg-context.py b/Legacy/ws_linux/build/rosaria_msgs/cmake/rosaria_msgs-genmsg-context.py new file mode 100644 index 0000000..52a887b --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/cmake/rosaria_msgs-genmsg-context.py @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-genmsg.context.in + +messages_str = "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg;/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg" +services_str = "" +pkg_name = "rosaria_msgs" +dependencies_str = "std_msgs;geometry_msgs" +langs = "gencpp;genlisp;genpy" +dep_include_paths_str = "rosaria_msgs;/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg;std_msgs;/opt/ros/hydro/share/std_msgs/cmake/../msg;geometry_msgs;/opt/ros/hydro/share/geometry_msgs/cmake/../msg" +PYTHON_EXECUTABLE = "/usr/bin/python" +package_has_static_sources = '' == 'TRUE' diff --git a/Legacy/ws_linux/build/rosaria_msgs/cmake/rosaria_msgs-genmsg.cmake b/Legacy/ws_linux/build/rosaria_msgs/cmake/rosaria_msgs-genmsg.cmake new file mode 100644 index 0000000..3bb79d2 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/cmake/rosaria_msgs-genmsg.cmake @@ -0,0 +1,154 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +message(STATUS "rosaria_msgs: 2 messages, 0 services") + +set(MSG_I_FLAGS "-Irosaria_msgs:/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg;-Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg;-Igeometry_msgs:/opt/ros/hydro/share/geometry_msgs/cmake/../msg") + +# Find all generators +find_package(gencpp REQUIRED) +find_package(genlisp REQUIRED) +find_package(genpy REQUIRED) + +add_custom_target(rosaria_msgs_generate_messages ALL) + +# +# langs = gencpp;genlisp;genpy +# + +### Section generating for lang: gencpp +### Generating Messages +_generate_msg_cpp(rosaria_msgs + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/geometry_msgs/cmake/../msg/Twist.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/UInt8.msg;/opt/ros/hydro/share/geometry_msgs/cmake/../msg/Vector3.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/Bool.msg" + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria_msgs +) +_generate_msg_cpp(rosaria_msgs + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg" + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria_msgs +) + +### Generating Services + +### Generating Module File +_generate_module_cpp(rosaria_msgs + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria_msgs + "${ALL_GEN_OUTPUT_FILES_cpp}" +) + +add_custom_target(rosaria_msgs_generate_messages_cpp + DEPENDS ${ALL_GEN_OUTPUT_FILES_cpp} +) +add_dependencies(rosaria_msgs_generate_messages rosaria_msgs_generate_messages_cpp) + +# target for backward compatibility +add_custom_target(rosaria_msgs_gencpp) +add_dependencies(rosaria_msgs_gencpp rosaria_msgs_generate_messages_cpp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS rosaria_msgs_generate_messages_cpp) + +### Section generating for lang: genlisp +### Generating Messages +_generate_msg_lisp(rosaria_msgs + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/geometry_msgs/cmake/../msg/Twist.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/UInt8.msg;/opt/ros/hydro/share/geometry_msgs/cmake/../msg/Vector3.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/Bool.msg" + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria_msgs +) +_generate_msg_lisp(rosaria_msgs + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg" + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria_msgs +) + +### Generating Services + +### Generating Module File +_generate_module_lisp(rosaria_msgs + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria_msgs + "${ALL_GEN_OUTPUT_FILES_lisp}" +) + +add_custom_target(rosaria_msgs_generate_messages_lisp + DEPENDS ${ALL_GEN_OUTPUT_FILES_lisp} +) +add_dependencies(rosaria_msgs_generate_messages rosaria_msgs_generate_messages_lisp) + +# target for backward compatibility +add_custom_target(rosaria_msgs_genlisp) +add_dependencies(rosaria_msgs_genlisp rosaria_msgs_generate_messages_lisp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS rosaria_msgs_generate_messages_lisp) + +### Section generating for lang: genpy +### Generating Messages +_generate_msg_py(rosaria_msgs + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/geometry_msgs/cmake/../msg/Twist.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/UInt8.msg;/opt/ros/hydro/share/geometry_msgs/cmake/../msg/Vector3.msg;/opt/ros/hydro/share/std_msgs/cmake/../msg/Bool.msg" + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria_msgs +) +_generate_msg_py(rosaria_msgs + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg" + "${MSG_I_FLAGS}" + "/opt/ros/hydro/share/std_msgs/cmake/../msg/Float64.msg" + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria_msgs +) + +### Generating Services + +### Generating Module File +_generate_module_py(rosaria_msgs + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria_msgs + "${ALL_GEN_OUTPUT_FILES_py}" +) + +add_custom_target(rosaria_msgs_generate_messages_py + DEPENDS ${ALL_GEN_OUTPUT_FILES_py} +) +add_dependencies(rosaria_msgs_generate_messages rosaria_msgs_generate_messages_py) + +# target for backward compatibility +add_custom_target(rosaria_msgs_genpy) +add_dependencies(rosaria_msgs_genpy rosaria_msgs_generate_messages_py) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS rosaria_msgs_generate_messages_py) + + + +if(gencpp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria_msgs) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/rosaria_msgs + DESTINATION ${gencpp_INSTALL_DIR} + ) +endif() +add_dependencies(rosaria_msgs_generate_messages_cpp std_msgs_generate_messages_cpp) +add_dependencies(rosaria_msgs_generate_messages_cpp geometry_msgs_generate_messages_cpp) + +if(genlisp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria_msgs) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/rosaria_msgs + DESTINATION ${genlisp_INSTALL_DIR} + ) +endif() +add_dependencies(rosaria_msgs_generate_messages_lisp std_msgs_generate_messages_lisp) +add_dependencies(rosaria_msgs_generate_messages_lisp geometry_msgs_generate_messages_lisp) + +if(genpy_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria_msgs) + install(CODE "execute_process(COMMAND \"/usr/bin/python\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria_msgs\")") + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/rosaria_msgs + DESTINATION ${genpy_INSTALL_DIR} + ) +endif() +add_dependencies(rosaria_msgs_generate_messages_py std_msgs_generate_messages_py) +add_dependencies(rosaria_msgs_generate_messages_py geometry_msgs_generate_messages_py) diff --git a/Legacy/ws_linux/build/rosaria_msgs/cmake_install.cmake b/Legacy/ws_linux/build/rosaria_msgs/cmake_install.cmake new file mode 100644 index 0000000..7025c47 --- /dev/null +++ b/Legacy/ws_linux/build/rosaria_msgs/cmake_install.cmake @@ -0,0 +1,80 @@ +# Install script for directory: /home/lab1_5/ws/ws_linux/src/rosaria_msgs + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/home/lab1_5/ws/ws_linux/install") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria_msgs/msg" TYPE FILE FILES + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg" + "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg" + ) +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria_msgs/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-paths.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/include/rosaria_msgs") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/common-lisp/ros" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/rosaria_msgs") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + execute_process(COMMAND "/usr/bin/python" -m compileall "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs.pc") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria_msgs/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgs-msg-extras.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria_msgs/cmake" TYPE FILE FILES + "/home/lab1_5/ws/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig.cmake" + "/home/lab1_5/ws/ws_linux/build/rosaria_msgs/catkin_generated/installspace/rosaria_msgsConfig-version.cmake" + ) +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/rosaria_msgs" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/package.xml") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/CMakeDirectoryInformation.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..b89c852 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,25 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Relative path conversion top directories. +SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/lab1_5/ws/ws_linux/src") +SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/lab1_5/ws/ws_linux/build") + +# Force unix paths in dependencies. +SET(CMAKE_FORCE_UNIX_PATHS 1) + +# The C and CXX include file search paths: +SET(CMAKE_C_INCLUDE_PATH + "/home/lab1_5/ws/ws_linux/src/safety/include" + "/home/lab1_5/ws/ws_linux/devel/include" + "/opt/ros/hydro/include" + ) +SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) + +# The C and CXX include file regular expressions for this directory. +SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/CXX.includecache b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/CXX.includecache new file mode 100644 index 0000000..a44274e --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/CXX.includecache @@ -0,0 +1,1026 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +dynamic_reconfigure/config_tools.h +- +limits +- +ros/node_handle.h +- +dynamic_reconfigure/ConfigDescription.h +- +dynamic_reconfigure/ParamDescription.h +- +dynamic_reconfigure/Group.h +- +dynamic_reconfigure/config_init_mutex.h +- +boost/any.hpp +- + +/home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp +ros/ros.h +/home/lab1_5/ws/ws_linux/src/safety/src/ros/ros.h +sensor_msgs/PointCloud.h +/home/lab1_5/ws/ws_linux/src/safety/src/sensor_msgs/PointCloud.h +rosaria/RosAriaConfig.h +- +std_srvs/Empty.h +- +std_msgs/Float32.h +- +geometry_msgs/Twist.h +- +geometry_msgs/Vector3.h +- +cmath +- +sstream +- + +/opt/ros/hydro/include/XmlRpcDecl.h +ros/macros.h +- + +/opt/ros/hydro/include/XmlRpcValue.h +XmlRpcDecl.h +/opt/ros/hydro/include/XmlRpcDecl.h +map +- +string +- +vector +- +time.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/BoolParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/Config.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/BoolParameter.h +- +dynamic_reconfigure/IntParameter.h +- +dynamic_reconfigure/StrParameter.h +- +dynamic_reconfigure/DoubleParameter.h +- +dynamic_reconfigure/GroupState.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/ConfigDescription.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/Group.h +- +dynamic_reconfigure/Config.h +- +dynamic_reconfigure/Config.h +- +dynamic_reconfigure/Config.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/DoubleParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/Group.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +dynamic_reconfigure/ParamDescription.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/GroupState.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/IntParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/ParamDescription.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/StrParameter.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/dynamic_reconfigure/config_init_mutex.h +boost/thread/mutex.hpp +- + +/opt/ros/hydro/include/dynamic_reconfigure/config_tools.h +string +- +vector +- +dynamic_reconfigure/Config.h +- +dynamic_reconfigure/Group.h +- + +/opt/ros/hydro/include/geometry_msgs/Point32.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/geometry_msgs/Twist.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +geometry_msgs/Vector3.h +- +geometry_msgs/Vector3.h +- + +/opt/ros/hydro/include/geometry_msgs/Vector3.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/ros/advertise_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/advertise_service_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/service_callback_helper.h +/opt/ros/hydro/include/ros/ros/service_callback_helper.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/assert.h +ros/console.h +/opt/ros/hydro/include/ros/ros/console.h +ros/static_assert.h +/opt/ros/hydro/include/ros/ros/static_assert.h +ros/platform.h +- +stdlib.h +- + +/opt/ros/hydro/include/ros/builtin_message_traits.h +message_traits.h +/opt/ros/hydro/include/ros/message_traits.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h + +/opt/ros/hydro/include/ros/common.h +stdint.h +- +assert.h +- +stddef.h +- +string +- +ros/assert.h +/opt/ros/hydro/include/ros/ros/assert.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/serialized_message.h +/opt/ros/hydro/include/ros/ros/serialized_message.h +boost/shared_array.hpp +- +ros/macros.h +- + +/opt/ros/hydro/include/ros/console.h +console_backend.h +/opt/ros/hydro/include/ros/console_backend.h +cstdio +- +sstream +- +ros/time.h +- +cstdarg +- +ros/macros.h +- +map +- +log4cxx/level.h +/opt/ros/hydro/include/ros/log4cxx/level.h +rosconsole/macros_generated.h +/opt/ros/hydro/include/ros/rosconsole/macros_generated.h + +/opt/ros/hydro/include/ros/console_backend.h + +/opt/ros/hydro/include/ros/datatypes.h +string +- +vector +- +map +- +set +- +list +- +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/duration.h +iostream +- +math.h +- +stdexcept +- +climits +- +stdint.h +- +rostime_decl.h +/opt/ros/hydro/include/ros/rostime_decl.h + +/opt/ros/hydro/include/ros/exception.h +stdexcept +- + +/opt/ros/hydro/include/ros/exceptions.h +ros/exception.h +- + +/opt/ros/hydro/include/ros/forwards.h +string +- +vector +- +map +- +set +- +list +- +boost/shared_ptr.hpp +- +boost/weak_ptr.hpp +- +boost/function.hpp +- +ros/time.h +- +ros/macros.h +- +exceptions.h +/opt/ros/hydro/include/ros/exceptions.h +ros/datatypes.h +/opt/ros/hydro/include/ros/ros/datatypes.h + +/opt/ros/hydro/include/ros/init.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/spinner.h +/opt/ros/hydro/include/ros/ros/spinner.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/macros.h + +/opt/ros/hydro/include/ros/master.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +XmlRpcValue.h +/opt/ros/hydro/include/ros/XmlRpcValue.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/message.h +ros/macros.h +/opt/ros/hydro/include/ros/ros/macros.h +ros/assert.h +/opt/ros/hydro/include/ros/ros/assert.h +string +- +string.h +- +boost/shared_ptr.hpp +- +boost/array.hpp +- +stdint.h +- + +/opt/ros/hydro/include/ros/message_event.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +ros/datatypes.h +- +ros/message_traits.h +- +boost/type_traits/is_void.hpp +- +boost/type_traits/is_base_of.hpp +- +boost/type_traits/is_const.hpp +- +boost/type_traits/add_const.hpp +- +boost/type_traits/remove_const.hpp +- +boost/utility/enable_if.hpp +- +boost/function.hpp +- +boost/make_shared.hpp +- + +/opt/ros/hydro/include/ros/message_forward.h +memory +- + +/opt/ros/hydro/include/ros/message_operations.h +ostream +- + +/opt/ros/hydro/include/ros/message_traits.h +message_forward.h +/opt/ros/hydro/include/ros/message_forward.h +ros/time.h +- +string +- +boost/utility/enable_if.hpp +- +boost/type_traits/remove_const.hpp +- +boost/type_traits/remove_reference.hpp +- + +/opt/ros/hydro/include/ros/names.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/node_handle.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/publisher.h +/opt/ros/hydro/include/ros/ros/publisher.h +ros/subscriber.h +/opt/ros/hydro/include/ros/ros/subscriber.h +ros/service_server.h +/opt/ros/hydro/include/ros/ros/service_server.h +ros/service_client.h +/opt/ros/hydro/include/ros/ros/service_client.h +ros/timer.h +/opt/ros/hydro/include/ros/ros/timer.h +ros/rate.h +/opt/ros/hydro/include/ros/ros/rate.h +ros/wall_timer.h +/opt/ros/hydro/include/ros/ros/wall_timer.h +ros/advertise_options.h +/opt/ros/hydro/include/ros/ros/advertise_options.h +ros/advertise_service_options.h +/opt/ros/hydro/include/ros/ros/advertise_service_options.h +ros/subscribe_options.h +/opt/ros/hydro/include/ros/ros/subscribe_options.h +ros/service_client_options.h +/opt/ros/hydro/include/ros/ros/service_client_options.h +ros/timer_options.h +/opt/ros/hydro/include/ros/ros/timer_options.h +ros/wall_timer_options.h +/opt/ros/hydro/include/ros/ros/wall_timer_options.h +ros/spinner.h +/opt/ros/hydro/include/ros/ros/spinner.h +ros/init.h +/opt/ros/hydro/include/ros/ros/init.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/bind.hpp +- +XmlRpcValue.h +- + +/opt/ros/hydro/include/ros/param.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h +XmlRpcValue.h +/opt/ros/hydro/include/ros/XmlRpcValue.h +vector +- +map +- + +/opt/ros/hydro/include/ros/parameter_adapter.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/message_event.h +/opt/ros/hydro/include/ros/ros/message_event.h +ros/static_assert.h +- +boost/type_traits/add_const.hpp +- +boost/type_traits/remove_const.hpp +- +boost/type_traits/remove_reference.hpp +- + +/opt/ros/hydro/include/ros/platform.h +windows.h +- +stdlib.h +- +string +- + +/opt/ros/hydro/include/ros/publisher.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/message.h +/opt/ros/hydro/include/ros/ros/message.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +boost/bind.hpp +- + +/opt/ros/hydro/include/ros/rate.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +rostime_decl.h +/opt/ros/hydro/include/ros/rostime_decl.h + +/opt/ros/hydro/include/ros/ros.h +ros/time.h +/opt/ros/hydro/include/ros/ros/time.h +ros/rate.h +/opt/ros/hydro/include/ros/ros/rate.h +ros/console.h +/opt/ros/hydro/include/ros/ros/console.h +ros/assert.h +/opt/ros/hydro/include/ros/ros/assert.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/types.h +/opt/ros/hydro/include/ros/ros/types.h +ros/node_handle.h +/opt/ros/hydro/include/ros/ros/node_handle.h +ros/publisher.h +/opt/ros/hydro/include/ros/ros/publisher.h +ros/single_subscriber_publisher.h +/opt/ros/hydro/include/ros/ros/single_subscriber_publisher.h +ros/service_server.h +/opt/ros/hydro/include/ros/ros/service_server.h +ros/subscriber.h +/opt/ros/hydro/include/ros/ros/subscriber.h +ros/service.h +/opt/ros/hydro/include/ros/ros/service.h +ros/init.h +/opt/ros/hydro/include/ros/ros/init.h +ros/master.h +/opt/ros/hydro/include/ros/ros/master.h +ros/this_node.h +/opt/ros/hydro/include/ros/ros/this_node.h +ros/param.h +/opt/ros/hydro/include/ros/ros/param.h +ros/topic.h +/opt/ros/hydro/include/ros/ros/topic.h +ros/names.h +/opt/ros/hydro/include/ros/ros/names.h + +/opt/ros/hydro/include/ros/roscpp_serialization_macros.h +ros/macros.h +- + +/opt/ros/hydro/include/ros/rostime_decl.h +ros/macros.h +- + +/opt/ros/hydro/include/ros/serialization.h +roscpp_serialization_macros.h +/opt/ros/hydro/include/ros/roscpp_serialization_macros.h +ros/types.h +- +ros/time.h +- +serialized_message.h +/opt/ros/hydro/include/ros/serialized_message.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +ros/builtin_message_traits.h +/opt/ros/hydro/include/ros/ros/builtin_message_traits.h +ros/exception.h +/opt/ros/hydro/include/ros/ros/exception.h +ros/datatypes.h +/opt/ros/hydro/include/ros/ros/datatypes.h +vector +- +map +- +boost/array.hpp +- +boost/call_traits.hpp +- +boost/utility/enable_if.hpp +- +boost/mpl/and.hpp +- +boost/mpl/or.hpp +- +boost/mpl/not.hpp +- +cstring +- + +/opt/ros/hydro/include/ros/serialized_message.h +roscpp_serialization_macros.h +/opt/ros/hydro/include/ros/roscpp_serialization_macros.h +boost/shared_array.hpp +- +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/service.h +string +- +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/message.h +/opt/ros/hydro/include/ros/ros/message.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/node_handle.h +/opt/ros/hydro/include/ros/ros/node_handle.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/names.h +/opt/ros/hydro/include/ros/ros/names.h +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/service_callback_helper.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/message.h +/opt/ros/hydro/include/ros/ros/message.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +boost/type_traits/is_base_of.hpp +- +boost/utility/enable_if.hpp +- + +/opt/ros/hydro/include/ros/service_client.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/common.h +/opt/ros/hydro/include/ros/ros/common.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h + +/opt/ros/hydro/include/ros/service_client_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/service_traits.h +/opt/ros/hydro/include/ros/ros/service_traits.h + +/opt/ros/hydro/include/ros/service_server.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h + +/opt/ros/hydro/include/ros/service_traits.h +boost/type_traits/remove_reference.hpp +- +boost/type_traits/remove_const.hpp +- + +/opt/ros/hydro/include/ros/single_subscriber_publisher.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/utility.hpp +- + +/opt/ros/hydro/include/ros/spinner.h +ros/types.h +/opt/ros/hydro/include/ros/ros/types.h +common.h +/opt/ros/hydro/include/ros/common.h +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/static_assert.h +boost/static_assert.hpp +- + +/opt/ros/hydro/include/ros/subscribe_options.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/transport_hints.h +/opt/ros/hydro/include/ros/ros/transport_hints.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +subscription_callback_helper.h +/opt/ros/hydro/include/ros/subscription_callback_helper.h + +/opt/ros/hydro/include/ros/subscriber.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/subscription_callback_helper.h +/opt/ros/hydro/include/ros/ros/subscription_callback_helper.h + +/opt/ros/hydro/include/ros/subscription_callback_helper.h +typeinfo +- +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +ros/parameter_adapter.h +/opt/ros/hydro/include/ros/ros/parameter_adapter.h +ros/message_traits.h +/opt/ros/hydro/include/ros/ros/message_traits.h +ros/builtin_message_traits.h +/opt/ros/hydro/include/ros/ros/builtin_message_traits.h +ros/serialization.h +/opt/ros/hydro/include/ros/ros/serialization.h +ros/message_event.h +/opt/ros/hydro/include/ros/ros/message_event.h +ros/static_assert.h +- +boost/type_traits/add_const.hpp +- +boost/type_traits/remove_const.hpp +- +boost/type_traits/remove_reference.hpp +- +boost/type_traits/is_base_of.hpp +- +boost/utility/enable_if.hpp +- +boost/make_shared.hpp +- + +/opt/ros/hydro/include/ros/this_node.h +common.h +/opt/ros/hydro/include/ros/common.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h + +/opt/ros/hydro/include/ros/time.h +ros/platform.h +- +iostream +- +cmath +- +ros/exception.h +- +duration.h +/opt/ros/hydro/include/ros/duration.h +boost/math/special_functions/round.hpp +- +rostime_decl.h +/opt/ros/hydro/include/ros/rostime_decl.h +sys/timeb.h +- +sys/time.h +- + +/opt/ros/hydro/include/ros/timer.h +common.h +/opt/ros/hydro/include/ros/common.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +timer_options.h +/opt/ros/hydro/include/ros/timer_options.h + +/opt/ros/hydro/include/ros/timer_options.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h + +/opt/ros/hydro/include/ros/topic.h +common.h +/opt/ros/hydro/include/ros/common.h +node_handle.h +/opt/ros/hydro/include/ros/node_handle.h +boost/shared_ptr.hpp +- + +/opt/ros/hydro/include/ros/transport_hints.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h +boost/lexical_cast.hpp +- + +/opt/ros/hydro/include/ros/types.h +stdint.h +- + +/opt/ros/hydro/include/ros/wall_timer.h +common.h +/opt/ros/hydro/include/ros/common.h +forwards.h +/opt/ros/hydro/include/ros/forwards.h +wall_timer_options.h +/opt/ros/hydro/include/ros/wall_timer_options.h + +/opt/ros/hydro/include/ros/wall_timer_options.h +common.h +/opt/ros/hydro/include/ros/common.h +ros/forwards.h +/opt/ros/hydro/include/ros/ros/forwards.h + +/opt/ros/hydro/include/rosconsole/macros_generated.h + +/opt/ros/hydro/include/sensor_msgs/ChannelFloat32.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/sensor_msgs/PointCloud.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- +std_msgs/Header.h +- +geometry_msgs/Point32.h +- +sensor_msgs/ChannelFloat32.h +- + +/opt/ros/hydro/include/std_msgs/Float32.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_msgs/Header.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_srvs/Empty.h +ros/service_traits.h +- +std_srvs/EmptyRequest.h +- +std_srvs/EmptyResponse.h +- + +/opt/ros/hydro/include/std_srvs/EmptyRequest.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/opt/ros/hydro/include/std_srvs/EmptyResponse.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/DependInfo.cmake new file mode 100644 index 0000000..0829414 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/DependInfo.cmake @@ -0,0 +1,20 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +SET(CMAKE_DEPENDS_CHECK_CXX + "/home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp" "/home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o" + ) +SET(CMAKE_CXX_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/build.make new file mode 100644 index 0000000..668abd2 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/build.make @@ -0,0 +1,121 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Include any dependencies generated for this target. +include safety/CMakeFiles/cloud_reader.dir/depend.make + +# Include the progress variables for this target. +include safety/CMakeFiles/cloud_reader.dir/progress.make + +# Include the compile flags for this target's objects. +include safety/CMakeFiles/cloud_reader.dir/flags.make + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: safety/CMakeFiles/cloud_reader.dir/flags.make +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o" + cd /home/lab1_5/ws/ws_linux/build/safety && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o -c /home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.i" + cd /home/lab1_5/ws/ws_linux/build/safety && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp > CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.i + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.s" + cd /home/lab1_5/ws/ws_linux/build/safety && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp -o CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.s + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.requires: +.PHONY : safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.requires + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.provides: safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.requires + $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.provides.build +.PHONY : safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.provides + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.provides.build: safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o + +# Object files for target cloud_reader +cloud_reader_OBJECTS = \ +"CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o" + +# External object files for target cloud_reader +cloud_reader_EXTERNAL_OBJECTS = + +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libtf.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libtf2_ros.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libactionlib.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libmessage_filters.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libroscpp.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/libboost_signals-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/libboost_filesystem-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libxmlrpcpp.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libtf2.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libroscpp_serialization.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/librosconsole.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/librosconsole_log4cxx.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/librosconsole_backend_interface.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/liblog4cxx.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/libboost_regex-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/librostime.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/libboost_date_time-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/libboost_system-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/libboost_thread-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /usr/lib/x86_64-linux-gnu/libpthread.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libcpp_common.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: /opt/ros/hydro/lib/libconsole_bridge.so +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: safety/CMakeFiles/cloud_reader.dir/build.make +/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader: safety/CMakeFiles/cloud_reader.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX executable /home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader" + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/cloud_reader.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +safety/CMakeFiles/cloud_reader.dir/build: /home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader +.PHONY : safety/CMakeFiles/cloud_reader.dir/build + +safety/CMakeFiles/cloud_reader.dir/requires: safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o.requires +.PHONY : safety/CMakeFiles/cloud_reader.dir/requires + +safety/CMakeFiles/cloud_reader.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/cloud_reader.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/cloud_reader.dir/clean + +safety/CMakeFiles/cloud_reader.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/cloud_reader.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/cmake_clean.cmake new file mode 100644 index 0000000..90229e7 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o" + "/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader.pdb" + "/home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang CXX) + INCLUDE(CMakeFiles/cloud_reader.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/depend.internal b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/depend.internal new file mode 100644 index 0000000..a0dce07 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/depend.internal @@ -0,0 +1,83 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o + /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h + /home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp + /opt/ros/hydro/include/XmlRpcDecl.h + /opt/ros/hydro/include/XmlRpcValue.h + /opt/ros/hydro/include/dynamic_reconfigure/BoolParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/Config.h + /opt/ros/hydro/include/dynamic_reconfigure/ConfigDescription.h + /opt/ros/hydro/include/dynamic_reconfigure/DoubleParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/Group.h + /opt/ros/hydro/include/dynamic_reconfigure/GroupState.h + /opt/ros/hydro/include/dynamic_reconfigure/IntParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/ParamDescription.h + /opt/ros/hydro/include/dynamic_reconfigure/StrParameter.h + /opt/ros/hydro/include/dynamic_reconfigure/config_init_mutex.h + /opt/ros/hydro/include/dynamic_reconfigure/config_tools.h + /opt/ros/hydro/include/geometry_msgs/Point32.h + /opt/ros/hydro/include/geometry_msgs/Twist.h + /opt/ros/hydro/include/geometry_msgs/Vector3.h + /opt/ros/hydro/include/ros/advertise_options.h + /opt/ros/hydro/include/ros/advertise_service_options.h + /opt/ros/hydro/include/ros/assert.h + /opt/ros/hydro/include/ros/builtin_message_traits.h + /opt/ros/hydro/include/ros/common.h + /opt/ros/hydro/include/ros/console.h + /opt/ros/hydro/include/ros/console_backend.h + /opt/ros/hydro/include/ros/datatypes.h + /opt/ros/hydro/include/ros/duration.h + /opt/ros/hydro/include/ros/exception.h + /opt/ros/hydro/include/ros/exceptions.h + /opt/ros/hydro/include/ros/forwards.h + /opt/ros/hydro/include/ros/init.h + /opt/ros/hydro/include/ros/macros.h + /opt/ros/hydro/include/ros/master.h + /opt/ros/hydro/include/ros/message.h + /opt/ros/hydro/include/ros/message_event.h + /opt/ros/hydro/include/ros/message_forward.h + /opt/ros/hydro/include/ros/message_operations.h + /opt/ros/hydro/include/ros/message_traits.h + /opt/ros/hydro/include/ros/names.h + /opt/ros/hydro/include/ros/node_handle.h + /opt/ros/hydro/include/ros/param.h + /opt/ros/hydro/include/ros/parameter_adapter.h + /opt/ros/hydro/include/ros/platform.h + /opt/ros/hydro/include/ros/publisher.h + /opt/ros/hydro/include/ros/rate.h + /opt/ros/hydro/include/ros/ros.h + /opt/ros/hydro/include/ros/roscpp_serialization_macros.h + /opt/ros/hydro/include/ros/rostime_decl.h + /opt/ros/hydro/include/ros/serialization.h + /opt/ros/hydro/include/ros/serialized_message.h + /opt/ros/hydro/include/ros/service.h + /opt/ros/hydro/include/ros/service_callback_helper.h + /opt/ros/hydro/include/ros/service_client.h + /opt/ros/hydro/include/ros/service_client_options.h + /opt/ros/hydro/include/ros/service_server.h + /opt/ros/hydro/include/ros/service_traits.h + /opt/ros/hydro/include/ros/single_subscriber_publisher.h + /opt/ros/hydro/include/ros/spinner.h + /opt/ros/hydro/include/ros/static_assert.h + /opt/ros/hydro/include/ros/subscribe_options.h + /opt/ros/hydro/include/ros/subscriber.h + /opt/ros/hydro/include/ros/subscription_callback_helper.h + /opt/ros/hydro/include/ros/this_node.h + /opt/ros/hydro/include/ros/time.h + /opt/ros/hydro/include/ros/timer.h + /opt/ros/hydro/include/ros/timer_options.h + /opt/ros/hydro/include/ros/topic.h + /opt/ros/hydro/include/ros/transport_hints.h + /opt/ros/hydro/include/ros/types.h + /opt/ros/hydro/include/ros/wall_timer.h + /opt/ros/hydro/include/ros/wall_timer_options.h + /opt/ros/hydro/include/rosconsole/macros_generated.h + /opt/ros/hydro/include/sensor_msgs/ChannelFloat32.h + /opt/ros/hydro/include/sensor_msgs/PointCloud.h + /opt/ros/hydro/include/std_msgs/Float32.h + /opt/ros/hydro/include/std_msgs/Header.h + /opt/ros/hydro/include/std_srvs/Empty.h + /opt/ros/hydro/include/std_srvs/EmptyRequest.h + /opt/ros/hydro/include/std_srvs/EmptyResponse.h diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/depend.make b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/depend.make new file mode 100644 index 0000000..11e0b1f --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/depend.make @@ -0,0 +1,83 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/rosaria/RosAriaConfig.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /home/lab1_5/ws/ws_linux/src/safety/src/cloud_reader.cpp +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/XmlRpcDecl.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/XmlRpcValue.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/BoolParameter.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/Config.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/ConfigDescription.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/DoubleParameter.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/Group.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/GroupState.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/IntParameter.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/ParamDescription.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/StrParameter.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/config_init_mutex.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/dynamic_reconfigure/config_tools.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/geometry_msgs/Point32.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/geometry_msgs/Twist.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/geometry_msgs/Vector3.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/advertise_options.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/advertise_service_options.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/assert.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/builtin_message_traits.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/common.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/console.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/console_backend.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/datatypes.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/duration.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/exception.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/exceptions.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/forwards.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/init.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/macros.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/master.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/message.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/message_event.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/message_forward.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/message_operations.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/message_traits.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/names.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/node_handle.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/param.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/parameter_adapter.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/platform.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/publisher.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/rate.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/ros.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/roscpp_serialization_macros.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/rostime_decl.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/serialization.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/serialized_message.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/service.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/service_callback_helper.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/service_client.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/service_client_options.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/service_server.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/service_traits.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/single_subscriber_publisher.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/spinner.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/static_assert.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/subscribe_options.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/subscriber.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/subscription_callback_helper.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/this_node.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/time.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/timer.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/timer_options.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/topic.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/transport_hints.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/types.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/wall_timer.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/ros/wall_timer_options.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/rosconsole/macros_generated.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/sensor_msgs/ChannelFloat32.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/sensor_msgs/PointCloud.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/std_msgs/Float32.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/std_msgs/Header.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/std_srvs/Empty.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/std_srvs/EmptyRequest.h +safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o: /opt/ros/hydro/include/std_srvs/EmptyResponse.h + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/flags.make b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/flags.make new file mode 100644 index 0000000..8c6832e --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/flags.make @@ -0,0 +1,8 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -I/home/lab1_5/ws/ws_linux/src/safety/include -I/home/lab1_5/ws/ws_linux/devel/include -I/opt/ros/hydro/include + +CXX_DEFINES = -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"safety\" -DROSCONSOLE_BACKEND_LOG4CXX + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/link.txt b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/link.txt new file mode 100644 index 0000000..2655fbf --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o -o /home/lab1_5/ws/ws_linux/devel/lib/safety/cloud_reader -rdynamic /opt/ros/hydro/lib/libtf.so /opt/ros/hydro/lib/libtf2_ros.so /opt/ros/hydro/lib/libactionlib.so /opt/ros/hydro/lib/libmessage_filters.so /opt/ros/hydro/lib/libroscpp.so -lboost_signals-mt -lboost_filesystem-mt /opt/ros/hydro/lib/libxmlrpcpp.so /opt/ros/hydro/lib/libtf2.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librosconsole.so /opt/ros/hydro/lib/librosconsole_log4cxx.so /opt/ros/hydro/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex-mt /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_system-mt -lboost_thread-mt -lpthread /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libconsole_bridge.so -Wl,-rpath,/opt/ros/hydro/lib diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/progress.make new file mode 100644 index 0000000..164e1d2 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 2 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o new file mode 100644 index 0000000..f73e440 Binary files /dev/null and b/Legacy/ws_linux/build/safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o differ diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/progress.marks b/Legacy/ws_linux/build/safety/CMakeFiles/progress.marks new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/progress.marks @@ -0,0 +1 @@ +1 diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/build.make new file mode 100644 index 0000000..34be82b --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_gencpp. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_gencpp.dir/progress.make + +safety/CMakeFiles/safety_gencpp: + +safety_gencpp: safety/CMakeFiles/safety_gencpp +safety_gencpp: safety/CMakeFiles/safety_gencpp.dir/build.make +.PHONY : safety_gencpp + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_gencpp.dir/build: safety_gencpp +.PHONY : safety/CMakeFiles/safety_gencpp.dir/build + +safety/CMakeFiles/safety_gencpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_gencpp.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_gencpp.dir/clean + +safety/CMakeFiles/safety_gencpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_gencpp.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..5994f9d --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_gencpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_gencpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_gencpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/build.make new file mode 100644 index 0000000..63419e2 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_generate_messages. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_generate_messages.dir/progress.make + +safety/CMakeFiles/safety_generate_messages: + +safety_generate_messages: safety/CMakeFiles/safety_generate_messages +safety_generate_messages: safety/CMakeFiles/safety_generate_messages.dir/build.make +.PHONY : safety_generate_messages + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_generate_messages.dir/build: safety_generate_messages +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/build + +safety/CMakeFiles/safety_generate_messages.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_generate_messages.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/clean + +safety/CMakeFiles/safety_generate_messages.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/cmake_clean.cmake new file mode 100644 index 0000000..05745ed --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_generate_messages" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_generate_messages.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/depend.internal b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/depend.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..8ba7291 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_generate_messages_cpp. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_generate_messages_cpp.dir/progress.make + +safety/CMakeFiles/safety_generate_messages_cpp: + +safety_generate_messages_cpp: safety/CMakeFiles/safety_generate_messages_cpp +safety_generate_messages_cpp: safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make +.PHONY : safety_generate_messages_cpp + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_generate_messages_cpp.dir/build: safety_generate_messages_cpp +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/build + +safety/CMakeFiles/safety_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/clean + +safety/CMakeFiles/safety_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..5c27385 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_generate_messages_cpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/depend.internal b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/depend.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_cpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..cac976b --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_generate_messages_lisp. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_generate_messages_lisp.dir/progress.make + +safety/CMakeFiles/safety_generate_messages_lisp: + +safety_generate_messages_lisp: safety/CMakeFiles/safety_generate_messages_lisp +safety_generate_messages_lisp: safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make +.PHONY : safety_generate_messages_lisp + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_generate_messages_lisp.dir/build: safety_generate_messages_lisp +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/build + +safety/CMakeFiles/safety_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/clean + +safety/CMakeFiles/safety_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..4bac217 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_generate_messages_lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/depend.internal b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/depend.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_lisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/build.make new file mode 100644 index 0000000..456577a --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_generate_messages_py. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_generate_messages_py.dir/progress.make + +safety/CMakeFiles/safety_generate_messages_py: + +safety_generate_messages_py: safety/CMakeFiles/safety_generate_messages_py +safety_generate_messages_py: safety/CMakeFiles/safety_generate_messages_py.dir/build.make +.PHONY : safety_generate_messages_py + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_generate_messages_py.dir/build: safety_generate_messages_py +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/build + +safety/CMakeFiles/safety_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_generate_messages_py.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/clean + +safety/CMakeFiles/safety_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..5b52075 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_generate_messages_py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/depend.internal b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/depend.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_generate_messages_py.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/build.make new file mode 100644 index 0000000..7bd7962 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_genlisp. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_genlisp.dir/progress.make + +safety/CMakeFiles/safety_genlisp: + +safety_genlisp: safety/CMakeFiles/safety_genlisp +safety_genlisp: safety/CMakeFiles/safety_genlisp.dir/build.make +.PHONY : safety_genlisp + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_genlisp.dir/build: safety_genlisp +.PHONY : safety/CMakeFiles/safety_genlisp.dir/build + +safety/CMakeFiles/safety_genlisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_genlisp.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_genlisp.dir/clean + +safety/CMakeFiles/safety_genlisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_genlisp.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..fa46b02 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_genlisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_genlisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genlisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/DependInfo.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/DependInfo.cmake new file mode 100644 index 0000000..a7fba27 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"safety\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/build.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/build.make new file mode 100644 index 0000000..ac1e40d --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for safety_genpy. + +# Include the progress variables for this target. +include safety/CMakeFiles/safety_genpy.dir/progress.make + +safety/CMakeFiles/safety_genpy: + +safety_genpy: safety/CMakeFiles/safety_genpy +safety_genpy: safety/CMakeFiles/safety_genpy.dir/build.make +.PHONY : safety_genpy + +# Rule to build all files generated by this target. +safety/CMakeFiles/safety_genpy.dir/build: safety_genpy +.PHONY : safety/CMakeFiles/safety_genpy.dir/build + +safety/CMakeFiles/safety_genpy.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/safety && $(CMAKE_COMMAND) -P CMakeFiles/safety_genpy.dir/cmake_clean.cmake +.PHONY : safety/CMakeFiles/safety_genpy.dir/clean + +safety/CMakeFiles/safety_genpy.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/safety /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/safety /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : safety/CMakeFiles/safety_genpy.dir/depend + diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/cmake_clean.cmake b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/cmake_clean.cmake new file mode 100644 index 0000000..003437e --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/safety_genpy" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/safety_genpy.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/progress.make b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/safety/CMakeFiles/safety_genpy.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/safety/CTestTestfile.cmake b/Legacy/ws_linux/build/safety/CTestTestfile.cmake new file mode 100644 index 0000000..9c287eb --- /dev/null +++ b/Legacy/ws_linux/build/safety/CTestTestfile.cmake @@ -0,0 +1,6 @@ +# CMake generated Testfile for +# Source directory: /home/lab1_5/ws/ws_linux/src/safety +# Build directory: /home/lab1_5/ws/ws_linux/build/safety +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. diff --git a/Legacy/ws_linux/build/safety/Makefile b/Legacy/ws_linux/build/safety/Makefile new file mode 100644 index 0000000..b6e3cb8 --- /dev/null +++ b/Legacy/ws_linux/build/safety/Makefile @@ -0,0 +1,322 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles /home/lab1_5/ws/ws_linux/build/safety/CMakeFiles/progress.marks + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +safety/CMakeFiles/cloud_reader.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/cloud_reader.dir/rule +.PHONY : safety/CMakeFiles/cloud_reader.dir/rule + +# Convenience name for target. +cloud_reader: safety/CMakeFiles/cloud_reader.dir/rule +.PHONY : cloud_reader + +# fast build rule for target. +cloud_reader/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/build +.PHONY : cloud_reader/fast + +# Convenience name for target. +safety/CMakeFiles/safety_gencpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_gencpp.dir/rule +.PHONY : safety/CMakeFiles/safety_gencpp.dir/rule + +# Convenience name for target. +safety_gencpp: safety/CMakeFiles/safety_gencpp.dir/rule +.PHONY : safety_gencpp + +# fast build rule for target. +safety_gencpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_gencpp.dir/build.make safety/CMakeFiles/safety_gencpp.dir/build +.PHONY : safety_gencpp/fast + +# Convenience name for target. +safety/CMakeFiles/safety_generate_messages.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages.dir/rule +.PHONY : safety/CMakeFiles/safety_generate_messages.dir/rule + +# Convenience name for target. +safety_generate_messages: safety/CMakeFiles/safety_generate_messages.dir/rule +.PHONY : safety_generate_messages + +# fast build rule for target. +safety_generate_messages/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_generate_messages.dir/build.make safety/CMakeFiles/safety_generate_messages.dir/build +.PHONY : safety_generate_messages/fast + +# Convenience name for target. +safety/CMakeFiles/safety_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages_cpp.dir/rule +.PHONY : safety/CMakeFiles/safety_generate_messages_cpp.dir/rule + +# Convenience name for target. +safety_generate_messages_cpp: safety/CMakeFiles/safety_generate_messages_cpp.dir/rule +.PHONY : safety_generate_messages_cpp + +# fast build rule for target. +safety_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_generate_messages_cpp.dir/build.make safety/CMakeFiles/safety_generate_messages_cpp.dir/build +.PHONY : safety_generate_messages_cpp/fast + +# Convenience name for target. +safety/CMakeFiles/safety_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages_lisp.dir/rule +.PHONY : safety/CMakeFiles/safety_generate_messages_lisp.dir/rule + +# Convenience name for target. +safety_generate_messages_lisp: safety/CMakeFiles/safety_generate_messages_lisp.dir/rule +.PHONY : safety_generate_messages_lisp + +# fast build rule for target. +safety_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_generate_messages_lisp.dir/build.make safety/CMakeFiles/safety_generate_messages_lisp.dir/build +.PHONY : safety_generate_messages_lisp/fast + +# Convenience name for target. +safety/CMakeFiles/safety_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_generate_messages_py.dir/rule +.PHONY : safety/CMakeFiles/safety_generate_messages_py.dir/rule + +# Convenience name for target. +safety_generate_messages_py: safety/CMakeFiles/safety_generate_messages_py.dir/rule +.PHONY : safety_generate_messages_py + +# fast build rule for target. +safety_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_generate_messages_py.dir/build.make safety/CMakeFiles/safety_generate_messages_py.dir/build +.PHONY : safety_generate_messages_py/fast + +# Convenience name for target. +safety/CMakeFiles/safety_genlisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_genlisp.dir/rule +.PHONY : safety/CMakeFiles/safety_genlisp.dir/rule + +# Convenience name for target. +safety_genlisp: safety/CMakeFiles/safety_genlisp.dir/rule +.PHONY : safety_genlisp + +# fast build rule for target. +safety_genlisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_genlisp.dir/build.make safety/CMakeFiles/safety_genlisp.dir/build +.PHONY : safety_genlisp/fast + +# Convenience name for target. +safety/CMakeFiles/safety_genpy.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 safety/CMakeFiles/safety_genpy.dir/rule +.PHONY : safety/CMakeFiles/safety_genpy.dir/rule + +# Convenience name for target. +safety_genpy: safety/CMakeFiles/safety_genpy.dir/rule +.PHONY : safety_genpy + +# fast build rule for target. +safety_genpy/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/safety_genpy.dir/build.make safety/CMakeFiles/safety_genpy.dir/build +.PHONY : safety_genpy/fast + +src/cloud_reader.o: src/cloud_reader.cpp.o +.PHONY : src/cloud_reader.o + +# target to build an object file +src/cloud_reader.cpp.o: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.o +.PHONY : src/cloud_reader.cpp.o + +src/cloud_reader.i: src/cloud_reader.cpp.i +.PHONY : src/cloud_reader.i + +# target to preprocess a source file +src/cloud_reader.cpp.i: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.i +.PHONY : src/cloud_reader.cpp.i + +src/cloud_reader.s: src/cloud_reader.cpp.s +.PHONY : src/cloud_reader.s + +# target to generate assembly for a file +src/cloud_reader.cpp.s: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f safety/CMakeFiles/cloud_reader.dir/build.make safety/CMakeFiles/cloud_reader.dir/src/cloud_reader.cpp.s +.PHONY : src/cloud_reader.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... cloud_reader" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... safety_gencpp" + @echo "... safety_generate_messages" + @echo "... safety_generate_messages_cpp" + @echo "... safety_generate_messages_lisp" + @echo "... safety_generate_messages_py" + @echo "... safety_genlisp" + @echo "... safety_genpy" + @echo "... test" + @echo "... src/cloud_reader.o" + @echo "... src/cloud_reader.i" + @echo "... src/cloud_reader.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-extras.cmake b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-extras.cmake new file mode 100644 index 0000000..c1b75eb --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-extras.cmake @@ -0,0 +1,2 @@ +set(safety_MESSAGE_FILES "") +set(safety_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths-context.py b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths-context.py new file mode 100644 index 0000000..734ff24 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'FALSE' == 'TRUE' +INSTALLSPACE = 'TRUE' == 'TRUE' + +PROJECT_NAME = 'safety' +PKG_MSG_INCLUDE_DIRS = '' +ARG_DEPENDENCIES = 'std_msgs' diff --git a/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths.cmake b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths.cmake new file mode 100644 index 0000000..83dcf9c --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in installspace +_prepend_path("${safety_DIR}/.." "" safety_MSG_INCLUDE_DIRS UNIQUE) +set(safety_MSG_DEPENDENCIES std_msgs) diff --git a/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety.pc b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety.pc new file mode 100644 index 0000000..e48086e --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safety.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/install + +Name: safety +Description: Description of safety +Version: 0.2.1 +Cflags: +Libs: -L/home/lab1_5/ws/ws_linux/install/lib -lsafety +Requires: message_runtime roscpp rospy std_msgs rosaria diff --git a/Legacy/ws_linux/build/safety/catkin_generated/installspace/safetyConfig-version.cmake b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safetyConfig-version.cmake new file mode 100644 index 0000000..40ac4c2 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safetyConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.2.1") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/build/safety/catkin_generated/installspace/safetyConfig.cmake b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safetyConfig.cmake new file mode 100644 index 0000000..b914a42 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/installspace/safetyConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(safety_CONFIG_INCLUDED) + return() +endif() +set(safety_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("FALSE" STREQUAL "TRUE") + set(safety_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/safety) + set(safety_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(safety_INSTALL_PREFIX "") + set(safety_PREFIX ${safety_DEVEL_PREFIX}) +else() + set(safety_SOURCE_PREFIX "") + set(safety_DEVEL_PREFIX "") + set(safety_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(safety_PREFIX ${safety_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'safety' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(safety_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "" STREQUAL "") + set(safety_INCLUDE_DIRS "") + set(_include_dirs "") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${safety_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'safety' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Aleksandra Grzelak ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'safety' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/install/${idir}'. Ask the maintainer 'Aleksandra Grzelak ' to fix it.") + endif() + _list_append_unique(safety_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "safety") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND safety_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND safety_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND safety_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/install/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(safety_LIBRARY_DIRS ${lib_path}) + list(APPEND safety_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'safety'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND safety_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(safety_EXPORTED_TARGETS "safety_generate_messages_cpp;safety_generate_messages_lisp;safety_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${safety_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "message_runtime;roscpp;rospy;std_msgs;rosaria") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 safety_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${safety_dep}_FOUND) + find_package(${safety_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${safety_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(safety_INCLUDE_DIRS ${${safety_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(safety_LIBRARIES ${safety_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${safety_dep}_LIBRARIES}) + _list_append_deduplicate(safety_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(safety_LIBRARIES ${safety_LIBRARIES}) + + _list_append_unique(safety_LIBRARY_DIRS ${${safety_dep}_LIBRARY_DIRS}) + list(APPEND safety_EXPORTED_TARGETS ${${safety_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "safety-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${safety_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/build/safety/catkin_generated/ordered_paths.cmake b/Legacy/ws_linux/build/safety/catkin_generated/ordered_paths.cmake new file mode 100644 index 0000000..3b5d318 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/ordered_paths.cmake @@ -0,0 +1 @@ +set(ORDERED_PATHS "/opt/ros/hydro/lib") \ No newline at end of file diff --git a/Legacy/ws_linux/build/safety/catkin_generated/package.cmake b/Legacy/ws_linux/build/safety/catkin_generated/package.cmake new file mode 100644 index 0000000..43b4ce7 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/package.cmake @@ -0,0 +1,7 @@ +set(_CATKIN_CURRENT_PACKAGE "safety") +set(safety_MAINTAINER "Aleksandra Grzelak ") +set(safety_DEPRECATED "") +set(safety_VERSION "0.2.1") +set(safety_BUILD_DEPENDS "message_generation" "roscpp" "rospy" "std_msgs" "rosaria") +set(safety_RUN_DEPENDS "message_runtime" "roscpp" "rospy" "std_msgs" "rosaria") +set(safety_BUILDTOOL_DEPENDS "catkin") \ No newline at end of file diff --git a/Legacy/ws_linux/build/safety/catkin_generated/pkg.develspace.context.pc.py b/Legacy/ws_linux/build/safety/catkin_generated/pkg.develspace.context.pc.py new file mode 100644 index 0000000..9f303ed --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/pkg.develspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] +PROJECT_CATKIN_DEPENDS = "message_runtime;roscpp;rospy;std_msgs;rosaria".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lsafety".split(';') if "-lsafety" != "" else [] +PROJECT_NAME = "safety" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/devel" +PROJECT_VERSION = "0.2.1" diff --git a/Legacy/ws_linux/build/safety/catkin_generated/pkg.installspace.context.pc.py b/Legacy/ws_linux/build/safety/catkin_generated/pkg.installspace.context.pc.py new file mode 100644 index 0000000..5f168ac --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/pkg.installspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] +PROJECT_CATKIN_DEPENDS = "message_runtime;roscpp;rospy;std_msgs;rosaria".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lsafety".split(';') if "-lsafety" != "" else [] +PROJECT_NAME = "safety" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/install" +PROJECT_VERSION = "0.2.1" diff --git a/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-extras.cmake.develspace.in b/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-extras.cmake.develspace.in new file mode 100644 index 0000000..c1b75eb --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-extras.cmake.develspace.in @@ -0,0 +1,2 @@ +set(safety_MESSAGE_FILES "") +set(safety_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-extras.cmake.installspace.in b/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-extras.cmake.installspace.in new file mode 100644 index 0000000..c1b75eb --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-extras.cmake.installspace.in @@ -0,0 +1,2 @@ +set(safety_MESSAGE_FILES "") +set(safety_SERVICE_FILES "") diff --git a/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-paths-context.py b/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-paths-context.py new file mode 100644 index 0000000..0b12a4d --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/safety-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'TRUE' == 'TRUE' +INSTALLSPACE = 'FALSE' == 'TRUE' + +PROJECT_NAME = 'safety' +PKG_MSG_INCLUDE_DIRS = '' +ARG_DEPENDENCIES = 'std_msgs' diff --git a/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/package.xml.stamp b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/package.xml.stamp new file mode 100644 index 0000000..c73f4e1 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/package.xml.stamp @@ -0,0 +1,24 @@ + + + safety + 0.2.1 + Package prevents robot from crashing into obstacle. Enables robot brakes when the distance is smaller than minimum_distance. + + Aleksandra Grzelak + GNU GPLv3 + + message_generation + message_runtime + catkin + roscpp + rospy + std_msgs + rosaria + + roscpp + rospy + std_msgs + rosaria + + + diff --git a/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg-genmsg.cmake.em.stamp b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg-genmsg.cmake.em.stamp new file mode 100644 index 0000000..5182859 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg-genmsg.cmake.em.stamp @@ -0,0 +1,141 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +@{ +import os +import sys + +import genmsg +import genmsg.base +genmsg.base.log_verbose('GENMSG_VERBOSE' in os.environ) +import genmsg.deps +import genmsg.gentools + +# split incoming variables +messages = messages_str.split(';') if messages_str != '' else [] +services = services_str.split(';') if services_str != '' else [] +dependencies = dependencies_str.split(';') if dependencies_str != '' else [] +dep_search_paths = dep_include_paths_str.split(';') if dep_include_paths_str != '' else [] + +dep_search_paths_dict = {} +dep_search_paths_tuple_list = [] +is_even = True +for val in dep_search_paths: + if is_even: + dep_search_paths_dict.setdefault(val, []) + val_prev = val + is_even = False + else: + dep_search_paths_dict[val_prev].append(val) + dep_search_paths_tuple_list.append((val_prev, val)) + is_even = True +dep_search_paths = dep_search_paths_dict + +if not messages and not services: + print('message(WARNING "Invoking generate_messages() without having added any message or service file before.\nYou should either add add_message_files() and/or add_service_files() calls or remove the invocation of generate_messages().")') + +msg_deps = {} +for m in messages: + try: + msg_deps[m] = genmsg.deps.find_msg_dependencies(pkg_name, m, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (m, str(e))) + +srv_deps = {} +for s in services: + try: + srv_deps[s] = genmsg.deps.find_srv_dependencies(pkg_name, s, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (s, str(e))) + +}@ +message(STATUS "@(pkg_name): @(len(messages)) messages, @(len(services)) services") + +set(MSG_I_FLAGS "@(';'.join(["-I%s:%s" % (dep, dir) for dep, dir in dep_search_paths_tuple_list]))") + +# Find all generators +@[if langs]@ +@[for l in langs.split(';')]@ +find_package(@l REQUIRED) +@[end for]@ +@[end if]@ + +add_custom_target(@(pkg_name)_generate_messages ALL) + +# +# langs = @langs +# + +@[if langs]@ +@[for l in langs.split(';')]@ +### Section generating for lang: @l +### Generating Messages +@[for m in msg_deps.keys()]@ +_generate_msg_@(l[3:])(@pkg_name + "@m" + "${MSG_I_FLAGS}" + "@(';'.join(msg_deps[m]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# messages + +### Generating Services +@[for s in srv_deps.keys()]@ +_generate_srv_@(l[3:])(@pkg_name + "@s" + "${MSG_I_FLAGS}" + "@(';'.join(srv_deps[s]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# services + +### Generating Module File +_generate_module_@(l[3:])(@pkg_name + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + "${ALL_GEN_OUTPUT_FILES_@(l[3:])}" +) + +add_custom_target(@(pkg_name)_generate_messages_@(l[3:]) + DEPENDS ${ALL_GEN_OUTPUT_FILES_@(l[3:])} +) +add_dependencies(@(pkg_name)_generate_messages @(pkg_name)_generate_messages_@(l[3:])) + +# target for backward compatibility +add_custom_target(@(pkg_name)_@(l)) +add_dependencies(@(pkg_name)_@(l) @(pkg_name)_generate_messages_@(l[3:])) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS @(pkg_name)_generate_messages_@(l[3:])) + +@[end for]@# langs +@[end if]@ + +@[if langs]@ +@[for l in langs.split(';')]@ + +if(@(l)_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name) +@[if l == 'genpy']@ + install(CODE "execute_process(COMMAND \"@(PYTHON_EXECUTABLE)\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name\")") +@[end if]@ + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} +@[if l == 'genpy' and package_has_static_sources]@ + # skip all init files + PATTERN "__init__.py" EXCLUDE + PATTERN "__init__.pyc" EXCLUDE + ) + # install init files which are not in the root folder of the generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} + FILES_MATCHING + REGEX "${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@(pkg_name)/.+/__init__.pyc?$" +@[end if]@ + ) +endif() +@[for d in dependencies]@ +add_dependencies(@(pkg_name)_generate_messages_@(l[3:]) @(d)_generate_messages_@(l[3:])) +@[end for]@# dependencies +@[end for]@# langs +@[end if]@ diff --git a/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg-msg-paths.cmake.em.stamp b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg-msg-paths.cmake.em.stamp new file mode 100644 index 0000000..eb6f88a --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg-msg-paths.cmake.em.stamp @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +@[if DEVELSPACE]@ +# message include dirs in develspace +set(@(PROJECT_NAME)_MSG_INCLUDE_DIRS "@(PKG_MSG_INCLUDE_DIRS)") +@[else]@ +# message include dirs in installspace +_prepend_path("${@(PROJECT_NAME)_DIR}/.." "@(PKG_MSG_INCLUDE_DIRS)" @(PROJECT_NAME)_MSG_INCLUDE_DIRS UNIQUE) +@[end if]@ +set(@(PROJECT_NAME)_MSG_DEPENDENCIES @(ARG_DEPENDENCIES)) diff --git a/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg.pc.em.stamp b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg.pc.em.stamp new file mode 100644 index 0000000..a4f7257 --- /dev/null +++ b/Legacy/ws_linux/build/safety/catkin_generated/stamps/safety/pkg.pc.em.stamp @@ -0,0 +1,8 @@ +prefix=@PROJECT_SPACE_DIR + +Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME) +Description: Description of @PROJECT_NAME +Version: @PROJECT_VERSION +Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS])) +Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX)) +Requires: @(PROJECT_CATKIN_DEPENDS) diff --git a/Legacy/ws_linux/build/safety/cmake/safety-genmsg-context.py b/Legacy/ws_linux/build/safety/cmake/safety-genmsg-context.py new file mode 100644 index 0000000..e74a5ff --- /dev/null +++ b/Legacy/ws_linux/build/safety/cmake/safety-genmsg-context.py @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-genmsg.context.in + +messages_str = "" +services_str = "" +pkg_name = "safety" +dependencies_str = "std_msgs" +langs = "gencpp;genlisp;genpy" +dep_include_paths_str = "std_msgs;/opt/ros/hydro/share/std_msgs/cmake/../msg" +PYTHON_EXECUTABLE = "/usr/bin/python" +package_has_static_sources = '' == 'TRUE' diff --git a/Legacy/ws_linux/build/safety/cmake/safety-genmsg.cmake b/Legacy/ws_linux/build/safety/cmake/safety-genmsg.cmake new file mode 100644 index 0000000..d607ccf --- /dev/null +++ b/Legacy/ws_linux/build/safety/cmake/safety-genmsg.cmake @@ -0,0 +1,117 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +message(WARNING "Invoking generate_messages() without having added any message or service file before. +You should either add add_message_files() and/or add_service_files() calls or remove the invocation of generate_messages().") +message(STATUS "safety: 0 messages, 0 services") + +set(MSG_I_FLAGS "-Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg") + +# Find all generators +find_package(gencpp REQUIRED) +find_package(genlisp REQUIRED) +find_package(genpy REQUIRED) + +add_custom_target(safety_generate_messages ALL) + +# +# langs = gencpp;genlisp;genpy +# + +### Section generating for lang: gencpp +### Generating Messages + +### Generating Services + +### Generating Module File +_generate_module_cpp(safety + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/safety + "${ALL_GEN_OUTPUT_FILES_cpp}" +) + +add_custom_target(safety_generate_messages_cpp + DEPENDS ${ALL_GEN_OUTPUT_FILES_cpp} +) +add_dependencies(safety_generate_messages safety_generate_messages_cpp) + +# target for backward compatibility +add_custom_target(safety_gencpp) +add_dependencies(safety_gencpp safety_generate_messages_cpp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS safety_generate_messages_cpp) + +### Section generating for lang: genlisp +### Generating Messages + +### Generating Services + +### Generating Module File +_generate_module_lisp(safety + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/safety + "${ALL_GEN_OUTPUT_FILES_lisp}" +) + +add_custom_target(safety_generate_messages_lisp + DEPENDS ${ALL_GEN_OUTPUT_FILES_lisp} +) +add_dependencies(safety_generate_messages safety_generate_messages_lisp) + +# target for backward compatibility +add_custom_target(safety_genlisp) +add_dependencies(safety_genlisp safety_generate_messages_lisp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS safety_generate_messages_lisp) + +### Section generating for lang: genpy +### Generating Messages + +### Generating Services + +### Generating Module File +_generate_module_py(safety + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/safety + "${ALL_GEN_OUTPUT_FILES_py}" +) + +add_custom_target(safety_generate_messages_py + DEPENDS ${ALL_GEN_OUTPUT_FILES_py} +) +add_dependencies(safety_generate_messages safety_generate_messages_py) + +# target for backward compatibility +add_custom_target(safety_genpy) +add_dependencies(safety_genpy safety_generate_messages_py) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS safety_generate_messages_py) + + + +if(gencpp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/safety) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/safety + DESTINATION ${gencpp_INSTALL_DIR} + ) +endif() +add_dependencies(safety_generate_messages_cpp std_msgs_generate_messages_cpp) + +if(genlisp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/safety) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/safety + DESTINATION ${genlisp_INSTALL_DIR} + ) +endif() +add_dependencies(safety_generate_messages_lisp std_msgs_generate_messages_lisp) + +if(genpy_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/safety) + install(CODE "execute_process(COMMAND \"/usr/bin/python\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/safety\")") + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/safety + DESTINATION ${genpy_INSTALL_DIR} + ) +endif() +add_dependencies(safety_generate_messages_py std_msgs_generate_messages_py) diff --git a/Legacy/ws_linux/build/safety/cmake_install.cmake b/Legacy/ws_linux/build/safety/cmake_install.cmake new file mode 100644 index 0000000..6d09437 --- /dev/null +++ b/Legacy/ws_linux/build/safety/cmake_install.cmake @@ -0,0 +1,65 @@ +# Install script for directory: /home/lab1_5/ws/ws_linux/src/safety + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/home/lab1_5/ws/ws_linux/install") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/safety/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/safety/catkin_generated/installspace/safety-msg-paths.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + execute_process(COMMAND "/usr/bin/python" -m compileall "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/safety") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/safety") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/safety/catkin_generated/installspace/safety.pc") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/safety/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/safety/catkin_generated/installspace/safety-msg-extras.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/safety/cmake" TYPE FILE FILES + "/home/lab1_5/ws/ws_linux/build/safety/catkin_generated/installspace/safetyConfig.cmake" + "/home/lab1_5/ws/ws_linux/build/safety/catkin_generated/installspace/safetyConfig-version.cmake" + ) +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/safety" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/src/safety/package.xml") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/CMakeDirectoryInformation.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..7ffe49e --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,23 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Relative path conversion top directories. +SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/lab1_5/ws/ws_linux/src") +SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/lab1_5/ws/ws_linux/build") + +# Force unix paths in dependencies. +SET(CMAKE_FORCE_UNIX_PATHS 1) + +# The C and CXX include file search paths: +SET(CMAKE_C_INCLUDE_PATH + "/home/lab1_5/ws/ws_linux/devel/include" + ) +SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) +SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) + +# The C and CXX include file regular expressions for this directory. +SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/progress.marks b/Legacy/ws_linux/build/videostream/CMakeFiles/progress.marks new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/progress.marks @@ -0,0 +1 @@ +5 diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/CXX.includecache b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/CXX.includecache new file mode 100644 index 0000000..1576008 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/CXX.includecache @@ -0,0 +1,82 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h +ros/service_traits.h +- +videostream/ip_getRequest.h +- +videostream/ip_getResponse.h +- + +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_getRequest.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_getResponse.h +string +- +vector +- +map +- +ros/types.h +- +ros/serialization.h +- +ros/builtin_message_traits.h +- +ros/message_operations.h +- + +/home/lab1_5/ws/ws_linux/src/videostream/src/../include/Videostream.h +ros/ros.h +/home/lab1_5/ws/ws_linux/src/videostream/src/../include/ros/ros.h +videostream/ip_get.h +/home/lab1_5/ws/ws_linux/src/videostream/src/../include/videostream/ip_get.h +std_msgs/String.h +/home/lab1_5/ws/ws_linux/src/videostream/src/../include/std_msgs/String.h +cstdlib +- +string +- +sstream +- +unistd.h +- +sys/types.h +- +sys/stat.h +- +fcntl.h +- +map +- +vector +- +algorithm +- +boost/tr1/regex.hpp +- + +/home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp +../include/Videostream.h +/home/lab1_5/ws/ws_linux/src/videostream/src/../include/Videostream.h + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/DependInfo.cmake new file mode 100644 index 0000000..8cded8b --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/DependInfo.cmake @@ -0,0 +1,20 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +SET(CMAKE_DEPENDS_CHECK_CXX + "/home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp" "/home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o" + ) +SET(CMAKE_CXX_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/build.make new file mode 100644 index 0000000..55af076 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/build.make @@ -0,0 +1,116 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Include any dependencies generated for this target. +include videostream/CMakeFiles/videostream.dir/depend.make + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream.dir/progress.make + +# Include the compile flags for this target's objects. +include videostream/CMakeFiles/videostream.dir/flags.make + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: videostream/CMakeFiles/videostream.dir/flags.make +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: /home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o" + cd /home/lab1_5/ws/ws_linux/build/videostream && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/videostream.dir/src/videostream.cpp.o -c /home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/videostream.dir/src/videostream.cpp.i" + cd /home/lab1_5/ws/ws_linux/build/videostream && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp > CMakeFiles/videostream.dir/src/videostream.cpp.i + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/videostream.dir/src/videostream.cpp.s" + cd /home/lab1_5/ws/ws_linux/build/videostream && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp -o CMakeFiles/videostream.dir/src/videostream.cpp.s + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.requires: +.PHONY : videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.requires + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.provides: videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.requires + $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.provides.build +.PHONY : videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.provides + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.provides.build: videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o + +# Object files for target videostream +videostream_OBJECTS = \ +"CMakeFiles/videostream.dir/src/videostream.cpp.o" + +# External object files for target videostream +videostream_EXTERNAL_OBJECTS = + +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/libroscpp.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/libboost_signals-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/libboost_filesystem-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/librosconsole.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/librosconsole_log4cxx.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/librosconsole_backend_interface.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/liblog4cxx.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/libboost_regex-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/libxmlrpcpp.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/libroscpp_serialization.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/librostime.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/libboost_date_time-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/libboost_system-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/libboost_thread-mt.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /usr/lib/x86_64-linux-gnu/libpthread.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/libcpp_common.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: /opt/ros/hydro/lib/libconsole_bridge.so +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: videostream/CMakeFiles/videostream.dir/build.make +/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream: videostream/CMakeFiles/videostream.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX executable /home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream" + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/videostream.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream.dir/build: /home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream +.PHONY : videostream/CMakeFiles/videostream.dir/build + +videostream/CMakeFiles/videostream.dir/requires: videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o.requires +.PHONY : videostream/CMakeFiles/videostream.dir/requires + +videostream/CMakeFiles/videostream.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream.dir/clean + +videostream/CMakeFiles/videostream.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/cmake_clean.cmake new file mode 100644 index 0000000..d4bf140 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream.dir/src/videostream.cpp.o" + "/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream.pdb" + "/home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang CXX) + INCLUDE(CMakeFiles/videostream.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/depend.internal b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/depend.internal new file mode 100644 index 0000000..f6e2334 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/depend.internal @@ -0,0 +1,9 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o + /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h + /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_getRequest.h + /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_getResponse.h + /home/lab1_5/ws/ws_linux/src/videostream/src/../include/Videostream.h + /home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/depend.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/depend.make new file mode 100644 index 0000000..72f503b --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/depend.make @@ -0,0 +1,9 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_getRequest.h +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_getResponse.h +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: /home/lab1_5/ws/ws_linux/src/videostream/src/../include/Videostream.h +videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o: /home/lab1_5/ws/ws_linux/src/videostream/src/videostream.cpp + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/flags.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/flags.make new file mode 100644 index 0000000..d92e17c --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/flags.make @@ -0,0 +1,8 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -I/home/lab1_5/ws/ws_linux/devel/include + +CXX_DEFINES = -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"videostream\" -DROSCONSOLE_BACKEND_LOG4CXX + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/link.txt b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/link.txt new file mode 100644 index 0000000..0948c18 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/videostream.dir/src/videostream.cpp.o -o /home/lab1_5/ws/ws_linux/devel/lib/videostream/videostream -rdynamic /opt/ros/hydro/lib/libroscpp.so -lboost_signals-mt -lboost_filesystem-mt /opt/ros/hydro/lib/librosconsole.so /opt/ros/hydro/lib/librosconsole_log4cxx.so /opt/ros/hydro/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex-mt /opt/ros/hydro/lib/libxmlrpcpp.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_system-mt -lboost_thread-mt -lpthread /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libconsole_bridge.so -Wl,-rpath,/opt/ros/hydro/lib diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/progress.make new file mode 100644 index 0000000..e9ac291 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 18 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o new file mode 100644 index 0000000..e142161 Binary files /dev/null and b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o differ diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/build.make new file mode 100644 index 0000000..6eb3dc1 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_gencpp. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_gencpp.dir/progress.make + +videostream/CMakeFiles/videostream_gencpp: + +videostream_gencpp: videostream/CMakeFiles/videostream_gencpp +videostream_gencpp: videostream/CMakeFiles/videostream_gencpp.dir/build.make +.PHONY : videostream_gencpp + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_gencpp.dir/build: videostream_gencpp +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/build + +videostream/CMakeFiles/videostream_gencpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_gencpp.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/clean + +videostream/CMakeFiles/videostream_gencpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..e16f56d --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_gencpp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_gencpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_gencpp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/build.make new file mode 100644 index 0000000..ce6c72d --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_generate_messages. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_generate_messages.dir/progress.make + +videostream/CMakeFiles/videostream_generate_messages: + +videostream_generate_messages: videostream/CMakeFiles/videostream_generate_messages +videostream_generate_messages: videostream/CMakeFiles/videostream_generate_messages.dir/build.make +.PHONY : videostream_generate_messages + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_generate_messages.dir/build: videostream_generate_messages +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/build + +videostream/CMakeFiles/videostream_generate_messages.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_generate_messages.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/clean + +videostream/CMakeFiles/videostream_generate_messages.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/cmake_clean.cmake new file mode 100644 index 0000000..cdc9fc2 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_generate_messages" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_generate_messages.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/depend.internal b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/depend.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make new file mode 100644 index 0000000..5b2fe3f --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make @@ -0,0 +1,71 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_generate_messages_cpp. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_generate_messages_cpp.dir/progress.make + +videostream/CMakeFiles/videostream_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h + +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h: /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h: /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h: /opt/ros/hydro/share/gencpp/cmake/../msg.h.template +/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h: /opt/ros/hydro/share/gencpp/cmake/../srv.h.template + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating C++ code from videostream/ip_get.srv" + cd /home/lab1_5/ws/ws_linux/build/videostream && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -p videostream -o /home/lab1_5/ws/ws_linux/devel/include/videostream -e /opt/ros/hydro/share/gencpp/cmake/.. + +videostream_generate_messages_cpp: videostream/CMakeFiles/videostream_generate_messages_cpp +videostream_generate_messages_cpp: /home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h +videostream_generate_messages_cpp: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make +.PHONY : videostream_generate_messages_cpp + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build: videostream_generate_messages_cpp +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build + +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_generate_messages_cpp.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/clean + +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/cmake_clean.cmake new file mode 100644 index 0000000..2ca2a92 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/cmake_clean.cmake @@ -0,0 +1,9 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_generate_messages_cpp" + "/home/lab1_5/ws/ws_linux/devel/include/videostream/ip_get.h" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend.internal b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/progress.make new file mode 100644 index 0000000..a7f2629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_cpp.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 19 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make new file mode 100644 index 0000000..4e72463 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make @@ -0,0 +1,69 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_generate_messages_lisp. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_generate_messages_lisp.dir/progress.make + +videostream/CMakeFiles/videostream_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp + +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp: /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py +/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp: /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Lisp code from videostream/ip_get.srv" + cd /home/lab1_5/ws/ws_linux/build/videostream && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -p videostream -o /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv + +videostream_generate_messages_lisp: videostream/CMakeFiles/videostream_generate_messages_lisp +videostream_generate_messages_lisp: /home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp +videostream_generate_messages_lisp: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make +.PHONY : videostream_generate_messages_lisp + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build: videostream_generate_messages_lisp +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build + +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_generate_messages_lisp.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/clean + +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..0a69d6b --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/cmake_clean.cmake @@ -0,0 +1,9 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_generate_messages_lisp" + "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend.internal b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/progress.make new file mode 100644 index 0000000..5ec04d3 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_lisp.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 20 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make new file mode 100644 index 0000000..c52f6c1 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make @@ -0,0 +1,77 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_generate_messages_py. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_generate_messages_py.dir/progress.make + +videostream/CMakeFiles/videostream_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py +videostream/CMakeFiles/videostream_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/__init__.py + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/gensrv_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py: /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_1) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python code from SRV videostream/ip_get" + cd /home/lab1_5/ws/ws_linux/build/videostream && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/gensrv_py.py /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv -Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg -p videostream -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv + +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/__init__.py: /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py +/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/__init__.py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py + $(CMAKE_COMMAND) -E cmake_progress_report /home/lab1_5/ws/ws_linux/build/CMakeFiles $(CMAKE_PROGRESS_2) + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating Python srv __init__.py for videostream" + cd /home/lab1_5/ws/ws_linux/build/videostream && ../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/hydro/share/genpy/cmake/../../../lib/genpy/genmsg_py.py -o /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv --initpy + +videostream_generate_messages_py: videostream/CMakeFiles/videostream_generate_messages_py +videostream_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py +videostream_generate_messages_py: /home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/__init__.py +videostream_generate_messages_py: videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make +.PHONY : videostream_generate_messages_py + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_generate_messages_py.dir/build: videostream_generate_messages_py +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/build + +videostream/CMakeFiles/videostream_generate_messages_py.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_generate_messages_py.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/clean + +videostream/CMakeFiles/videostream_generate_messages_py.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/cmake_clean.cmake new file mode 100644 index 0000000..e5083f3 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_generate_messages_py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/_ip_get.py" + "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream/srv/__init__.py" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/depend.internal b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/depend.internal new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/depend.internal @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/depend.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/depend.make new file mode 100644 index 0000000..38eae05 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/depend.make @@ -0,0 +1,3 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/progress.make new file mode 100644 index 0000000..6ec2abf --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_generate_messages_py.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 21 +CMAKE_PROGRESS_2 = 22 + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/build.make new file mode 100644 index 0000000..ebb72f0 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_genlisp. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_genlisp.dir/progress.make + +videostream/CMakeFiles/videostream_genlisp: + +videostream_genlisp: videostream/CMakeFiles/videostream_genlisp +videostream_genlisp: videostream/CMakeFiles/videostream_genlisp.dir/build.make +.PHONY : videostream_genlisp + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_genlisp.dir/build: videostream_genlisp +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/build + +videostream/CMakeFiles/videostream_genlisp.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_genlisp.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/clean + +videostream/CMakeFiles/videostream_genlisp.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/cmake_clean.cmake new file mode 100644 index 0000000..2fb088f --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_genlisp" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_genlisp.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genlisp.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/DependInfo.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/DependInfo.cmake new file mode 100644 index 0000000..551e629 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/DependInfo.cmake @@ -0,0 +1,15 @@ +# The set of languages for which implicit dependencies are needed: +SET(CMAKE_DEPENDS_LANGUAGES + ) +# The set of files for implicit dependencies of each language: + +# Preprocessor definitions for this target. +SET(CMAKE_TARGET_DEFINITIONS + "ROS_BUILD_SHARED_LIBS=1" + "ROS_PACKAGE_NAME=\"videostream\"" + "ROSCONSOLE_BACKEND_LOG4CXX" + ) + +# Targets to which this target links. +SET(CMAKE_TARGET_LINKED_INFO_FILES + ) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/build.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/build.make new file mode 100644 index 0000000..ec4e1dc --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/build.make @@ -0,0 +1,62 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +# Utility rule file for videostream_genpy. + +# Include the progress variables for this target. +include videostream/CMakeFiles/videostream_genpy.dir/progress.make + +videostream/CMakeFiles/videostream_genpy: + +videostream_genpy: videostream/CMakeFiles/videostream_genpy +videostream_genpy: videostream/CMakeFiles/videostream_genpy.dir/build.make +.PHONY : videostream_genpy + +# Rule to build all files generated by this target. +videostream/CMakeFiles/videostream_genpy.dir/build: videostream_genpy +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/build + +videostream/CMakeFiles/videostream_genpy.dir/clean: + cd /home/lab1_5/ws/ws_linux/build/videostream && $(CMAKE_COMMAND) -P CMakeFiles/videostream_genpy.dir/cmake_clean.cmake +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/clean + +videostream/CMakeFiles/videostream_genpy.dir/depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/lab1_5/ws/ws_linux/src /home/lab1_5/ws/ws_linux/src/videostream /home/lab1_5/ws/ws_linux/build /home/lab1_5/ws/ws_linux/build/videostream /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/depend + diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/cmake_clean.cmake b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/cmake_clean.cmake new file mode 100644 index 0000000..229e3df --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +FILE(REMOVE_RECURSE + "CMakeFiles/videostream_genpy" +) + +# Per-language clean rules from dependency scanning. +FOREACH(lang) + INCLUDE(CMakeFiles/videostream_genpy.dir/cmake_clean_${lang}.cmake OPTIONAL) +ENDFOREACH(lang) diff --git a/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/progress.make b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CMakeFiles/videostream_genpy.dir/progress.make @@ -0,0 +1 @@ + diff --git a/Legacy/ws_linux/build/videostream/CTestTestfile.cmake b/Legacy/ws_linux/build/videostream/CTestTestfile.cmake new file mode 100644 index 0000000..f0fb532 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/CTestTestfile.cmake @@ -0,0 +1,6 @@ +# CMake generated Testfile for +# Source directory: /home/lab1_5/ws/ws_linux/src/videostream +# Build directory: /home/lab1_5/ws/ws_linux/build/videostream +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. diff --git a/Legacy/ws_linux/build/videostream/Makefile b/Legacy/ws_linux/build/videostream/Makefile new file mode 100644 index 0000000..ed90513 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/Makefile @@ -0,0 +1,322 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/lab1_5/ws/ws_linux/src + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/lab1_5/ws/ws_linux/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles /home/lab1_5/ws/ws_linux/build/videostream/CMakeFiles/progress.marks + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/lab1_5/ws/ws_linux/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +videostream/CMakeFiles/videostream.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream.dir/rule +.PHONY : videostream/CMakeFiles/videostream.dir/rule + +# Convenience name for target. +videostream: videostream/CMakeFiles/videostream.dir/rule +.PHONY : videostream + +# fast build rule for target. +videostream/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/build +.PHONY : videostream/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_gencpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_gencpp.dir/rule +.PHONY : videostream/CMakeFiles/videostream_gencpp.dir/rule + +# Convenience name for target. +videostream_gencpp: videostream/CMakeFiles/videostream_gencpp.dir/rule +.PHONY : videostream_gencpp + +# fast build rule for target. +videostream_gencpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_gencpp.dir/build.make videostream/CMakeFiles/videostream_gencpp.dir/build +.PHONY : videostream_gencpp/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_generate_messages.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages.dir/rule +.PHONY : videostream/CMakeFiles/videostream_generate_messages.dir/rule + +# Convenience name for target. +videostream_generate_messages: videostream/CMakeFiles/videostream_generate_messages.dir/rule +.PHONY : videostream_generate_messages + +# fast build rule for target. +videostream_generate_messages/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages.dir/build.make videostream/CMakeFiles/videostream_generate_messages.dir/build +.PHONY : videostream_generate_messages/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule +.PHONY : videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule + +# Convenience name for target. +videostream_generate_messages_cpp: videostream/CMakeFiles/videostream_generate_messages_cpp.dir/rule +.PHONY : videostream_generate_messages_cpp + +# fast build rule for target. +videostream_generate_messages_cpp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_cpp.dir/build +.PHONY : videostream_generate_messages_cpp/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule +.PHONY : videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule + +# Convenience name for target. +videostream_generate_messages_lisp: videostream/CMakeFiles/videostream_generate_messages_lisp.dir/rule +.PHONY : videostream_generate_messages_lisp + +# fast build rule for target. +videostream_generate_messages_lisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build.make videostream/CMakeFiles/videostream_generate_messages_lisp.dir/build +.PHONY : videostream_generate_messages_lisp/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_generate_messages_py.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_generate_messages_py.dir/rule +.PHONY : videostream/CMakeFiles/videostream_generate_messages_py.dir/rule + +# Convenience name for target. +videostream_generate_messages_py: videostream/CMakeFiles/videostream_generate_messages_py.dir/rule +.PHONY : videostream_generate_messages_py + +# fast build rule for target. +videostream_generate_messages_py/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_generate_messages_py.dir/build.make videostream/CMakeFiles/videostream_generate_messages_py.dir/build +.PHONY : videostream_generate_messages_py/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_genlisp.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_genlisp.dir/rule +.PHONY : videostream/CMakeFiles/videostream_genlisp.dir/rule + +# Convenience name for target. +videostream_genlisp: videostream/CMakeFiles/videostream_genlisp.dir/rule +.PHONY : videostream_genlisp + +# fast build rule for target. +videostream_genlisp/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_genlisp.dir/build.make videostream/CMakeFiles/videostream_genlisp.dir/build +.PHONY : videostream_genlisp/fast + +# Convenience name for target. +videostream/CMakeFiles/videostream_genpy.dir/rule: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f CMakeFiles/Makefile2 videostream/CMakeFiles/videostream_genpy.dir/rule +.PHONY : videostream/CMakeFiles/videostream_genpy.dir/rule + +# Convenience name for target. +videostream_genpy: videostream/CMakeFiles/videostream_genpy.dir/rule +.PHONY : videostream_genpy + +# fast build rule for target. +videostream_genpy/fast: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream_genpy.dir/build.make videostream/CMakeFiles/videostream_genpy.dir/build +.PHONY : videostream_genpy/fast + +src/videostream.o: src/videostream.cpp.o +.PHONY : src/videostream.o + +# target to build an object file +src/videostream.cpp.o: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/src/videostream.cpp.o +.PHONY : src/videostream.cpp.o + +src/videostream.i: src/videostream.cpp.i +.PHONY : src/videostream.i + +# target to preprocess a source file +src/videostream.cpp.i: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/src/videostream.cpp.i +.PHONY : src/videostream.cpp.i + +src/videostream.s: src/videostream.cpp.s +.PHONY : src/videostream.s + +# target to generate assembly for a file +src/videostream.cpp.s: + cd /home/lab1_5/ws/ws_linux/build && $(MAKE) -f videostream/CMakeFiles/videostream.dir/build.make videostream/CMakeFiles/videostream.dir/src/videostream.cpp.s +.PHONY : src/videostream.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... videostream" + @echo "... videostream_gencpp" + @echo "... videostream_generate_messages" + @echo "... videostream_generate_messages_cpp" + @echo "... videostream_generate_messages_lisp" + @echo "... videostream_generate_messages_py" + @echo "... videostream_genlisp" + @echo "... videostream_genpy" + @echo "... src/videostream.o" + @echo "... src/videostream.i" + @echo "... src/videostream.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/lab1_5/ws/ws_linux/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-extras.cmake b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-extras.cmake new file mode 100644 index 0000000..9dd80d4 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-extras.cmake @@ -0,0 +1,2 @@ +set(videostream_MESSAGE_FILES "") +set(videostream_SERVICE_FILES "srv/ip_get.srv") diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths-context.py b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths-context.py new file mode 100644 index 0000000..72bf22e --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'FALSE' == 'TRUE' +INSTALLSPACE = 'TRUE' == 'TRUE' + +PROJECT_NAME = 'videostream' +PKG_MSG_INCLUDE_DIRS = '' +ARG_DEPENDENCIES = 'std_msgs' diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths.cmake b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths.cmake new file mode 100644 index 0000000..a510aa0 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in installspace +_prepend_path("${videostream_DIR}/.." "" videostream_MSG_INCLUDE_DIRS UNIQUE) +set(videostream_MSG_DEPENDENCIES std_msgs) diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream.pc b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream.pc new file mode 100644 index 0000000..b7319e7 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostream.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/install + +Name: videostream +Description: Description of videostream +Version: 0.0.0 +Cflags: -I/home/lab1_5/ws/ws_linux/install/include +Libs: -L/home/lab1_5/ws/ws_linux/install/lib -lvideostream +Requires: message_runtime roscpp rospy std_msgs diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig-version.cmake b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig-version.cmake new file mode 100644 index 0000000..7fd9f99 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig.cmake b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig.cmake new file mode 100644 index 0000000..67cd4c1 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(videostream_CONFIG_INCLUDED) + return() +endif() +set(videostream_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("FALSE" STREQUAL "TRUE") + set(videostream_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/videostream) + set(videostream_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(videostream_INSTALL_PREFIX "") + set(videostream_PREFIX ${videostream_DEVEL_PREFIX}) +else() + set(videostream_SOURCE_PREFIX "") + set(videostream_DEVEL_PREFIX "") + set(videostream_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(videostream_PREFIX ${videostream_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'videostream' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(videostream_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "include" STREQUAL "") + set(videostream_INCLUDE_DIRS "") + set(_include_dirs "include") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${videostream_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'videostream' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'lab ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'videostream' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/install/${idir}'. Ask the maintainer 'lab ' to fix it.") + endif() + _list_append_unique(videostream_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "videostream") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND videostream_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND videostream_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND videostream_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/install/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(videostream_LIBRARY_DIRS ${lib_path}) + list(APPEND videostream_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'videostream'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND videostream_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(videostream_EXPORTED_TARGETS "videostream_generate_messages_cpp;videostream_generate_messages_lisp;videostream_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${videostream_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "message_runtime;roscpp;rospy;std_msgs") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 videostream_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${videostream_dep}_FOUND) + find_package(${videostream_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${videostream_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(videostream_INCLUDE_DIRS ${${videostream_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(videostream_LIBRARIES ${videostream_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${videostream_dep}_LIBRARIES}) + _list_append_deduplicate(videostream_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(videostream_LIBRARIES ${videostream_LIBRARIES}) + + _list_append_unique(videostream_LIBRARY_DIRS ${${videostream_dep}_LIBRARY_DIRS}) + list(APPEND videostream_EXPORTED_TARGETS ${${videostream_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "videostream-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${videostream_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/ordered_paths.cmake b/Legacy/ws_linux/build/videostream/catkin_generated/ordered_paths.cmake new file mode 100644 index 0000000..3b5d318 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/ordered_paths.cmake @@ -0,0 +1 @@ +set(ORDERED_PATHS "/opt/ros/hydro/lib") \ No newline at end of file diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/package.cmake b/Legacy/ws_linux/build/videostream/catkin_generated/package.cmake new file mode 100644 index 0000000..98f53c3 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/package.cmake @@ -0,0 +1,7 @@ +set(_CATKIN_CURRENT_PACKAGE "videostream") +set(videostream_MAINTAINER "lab ") +set(videostream_DEPRECATED "") +set(videostream_VERSION "0.0.0") +set(videostream_BUILD_DEPENDS "message_generation" "roscpp" "rospy" "std_msgs") +set(videostream_RUN_DEPENDS "message_runtime" "roscpp" "rospy" "std_msgs") +set(videostream_BUILDTOOL_DEPENDS "catkin") \ No newline at end of file diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/pkg.develspace.context.pc.py b/Legacy/ws_linux/build/videostream/catkin_generated/pkg.develspace.context.pc.py new file mode 100644 index 0000000..d980cc0 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/pkg.develspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lab1_5/ws/ws_linux/devel/include;/home/lab1_5/ws/ws_linux/src/videostream/include".split(';') if "/home/lab1_5/ws/ws_linux/devel/include;/home/lab1_5/ws/ws_linux/src/videostream/include" != "" else [] +PROJECT_CATKIN_DEPENDS = "message_runtime;roscpp;rospy;std_msgs".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lvideostream".split(';') if "-lvideostream" != "" else [] +PROJECT_NAME = "videostream" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/devel" +PROJECT_VERSION = "0.0.0" diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/pkg.installspace.context.pc.py b/Legacy/ws_linux/build/videostream/catkin_generated/pkg.installspace.context.pc.py new file mode 100644 index 0000000..f13b486 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/pkg.installspace.context.pc.py @@ -0,0 +1,8 @@ +# generated from catkin/cmake/template/pkg.context.pc.in +CATKIN_PACKAGE_PREFIX = "" +PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lab1_5/ws/ws_linux/install/include".split(';') if "/home/lab1_5/ws/ws_linux/install/include" != "" else [] +PROJECT_CATKIN_DEPENDS = "message_runtime;roscpp;rospy;std_msgs".replace(';', ' ') +PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lvideostream".split(';') if "-lvideostream" != "" else [] +PROJECT_NAME = "videostream" +PROJECT_SPACE_DIR = "/home/lab1_5/ws/ws_linux/install" +PROJECT_VERSION = "0.0.0" diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/package.xml.stamp b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/package.xml.stamp new file mode 100644 index 0000000..fefd5f1 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/package.xml.stamp @@ -0,0 +1,59 @@ + + + videostream + 0.0.0 + The videostream package + + + + + lab + + + + + + TODO + + + + + + + + + + + + + + + + + + + message_generation + + + + message_runtime + + + catkin + roscpp + rospy + std_msgs + roscpp + rospy + std_msgs + + + + + + + + + + + diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg-genmsg.cmake.em.stamp b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg-genmsg.cmake.em.stamp new file mode 100644 index 0000000..5182859 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg-genmsg.cmake.em.stamp @@ -0,0 +1,141 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +@{ +import os +import sys + +import genmsg +import genmsg.base +genmsg.base.log_verbose('GENMSG_VERBOSE' in os.environ) +import genmsg.deps +import genmsg.gentools + +# split incoming variables +messages = messages_str.split(';') if messages_str != '' else [] +services = services_str.split(';') if services_str != '' else [] +dependencies = dependencies_str.split(';') if dependencies_str != '' else [] +dep_search_paths = dep_include_paths_str.split(';') if dep_include_paths_str != '' else [] + +dep_search_paths_dict = {} +dep_search_paths_tuple_list = [] +is_even = True +for val in dep_search_paths: + if is_even: + dep_search_paths_dict.setdefault(val, []) + val_prev = val + is_even = False + else: + dep_search_paths_dict[val_prev].append(val) + dep_search_paths_tuple_list.append((val_prev, val)) + is_even = True +dep_search_paths = dep_search_paths_dict + +if not messages and not services: + print('message(WARNING "Invoking generate_messages() without having added any message or service file before.\nYou should either add add_message_files() and/or add_service_files() calls or remove the invocation of generate_messages().")') + +msg_deps = {} +for m in messages: + try: + msg_deps[m] = genmsg.deps.find_msg_dependencies(pkg_name, m, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (m, str(e))) + +srv_deps = {} +for s in services: + try: + srv_deps[s] = genmsg.deps.find_srv_dependencies(pkg_name, s, dep_search_paths) + except genmsg.MsgNotFound as e: + print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (s, str(e))) + +}@ +message(STATUS "@(pkg_name): @(len(messages)) messages, @(len(services)) services") + +set(MSG_I_FLAGS "@(';'.join(["-I%s:%s" % (dep, dir) for dep, dir in dep_search_paths_tuple_list]))") + +# Find all generators +@[if langs]@ +@[for l in langs.split(';')]@ +find_package(@l REQUIRED) +@[end for]@ +@[end if]@ + +add_custom_target(@(pkg_name)_generate_messages ALL) + +# +# langs = @langs +# + +@[if langs]@ +@[for l in langs.split(';')]@ +### Section generating for lang: @l +### Generating Messages +@[for m in msg_deps.keys()]@ +_generate_msg_@(l[3:])(@pkg_name + "@m" + "${MSG_I_FLAGS}" + "@(';'.join(msg_deps[m]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# messages + +### Generating Services +@[for s in srv_deps.keys()]@ +_generate_srv_@(l[3:])(@pkg_name + "@s" + "${MSG_I_FLAGS}" + "@(';'.join(srv_deps[s]).replace("\\","/"))" + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name +) +@[end for]@# services + +### Generating Module File +_generate_module_@(l[3:])(@pkg_name + ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + "${ALL_GEN_OUTPUT_FILES_@(l[3:])}" +) + +add_custom_target(@(pkg_name)_generate_messages_@(l[3:]) + DEPENDS ${ALL_GEN_OUTPUT_FILES_@(l[3:])} +) +add_dependencies(@(pkg_name)_generate_messages @(pkg_name)_generate_messages_@(l[3:])) + +# target for backward compatibility +add_custom_target(@(pkg_name)_@(l)) +add_dependencies(@(pkg_name)_@(l) @(pkg_name)_generate_messages_@(l[3:])) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS @(pkg_name)_generate_messages_@(l[3:])) + +@[end for]@# langs +@[end if]@ + +@[if langs]@ +@[for l in langs.split(';')]@ + +if(@(l)_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name) +@[if l == 'genpy']@ + install(CODE "execute_process(COMMAND \"@(PYTHON_EXECUTABLE)\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name\")") +@[end if]@ + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} +@[if l == 'genpy' and package_has_static_sources]@ + # skip all init files + PATTERN "__init__.py" EXCLUDE + PATTERN "__init__.pyc" EXCLUDE + ) + # install init files which are not in the root folder of the generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name + DESTINATION ${@(l)_INSTALL_DIR} + FILES_MATCHING + REGEX "${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@(pkg_name)/.+/__init__.pyc?$" +@[end if]@ + ) +endif() +@[for d in dependencies]@ +add_dependencies(@(pkg_name)_generate_messages_@(l[3:]) @(d)_generate_messages_@(l[3:])) +@[end for]@# dependencies +@[end for]@# langs +@[end if]@ diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg-msg-paths.cmake.em.stamp b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg-msg-paths.cmake.em.stamp new file mode 100644 index 0000000..eb6f88a --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg-msg-paths.cmake.em.stamp @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +@[if DEVELSPACE]@ +# message include dirs in develspace +set(@(PROJECT_NAME)_MSG_INCLUDE_DIRS "@(PKG_MSG_INCLUDE_DIRS)") +@[else]@ +# message include dirs in installspace +_prepend_path("${@(PROJECT_NAME)_DIR}/.." "@(PKG_MSG_INCLUDE_DIRS)" @(PROJECT_NAME)_MSG_INCLUDE_DIRS UNIQUE) +@[end if]@ +set(@(PROJECT_NAME)_MSG_DEPENDENCIES @(ARG_DEPENDENCIES)) diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg.pc.em.stamp b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg.pc.em.stamp new file mode 100644 index 0000000..a4f7257 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/stamps/videostream/pkg.pc.em.stamp @@ -0,0 +1,8 @@ +prefix=@PROJECT_SPACE_DIR + +Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME) +Description: Description of @PROJECT_NAME +Version: @PROJECT_VERSION +Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS])) +Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX)) +Requires: @(PROJECT_CATKIN_DEPENDS) diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-extras.cmake.develspace.in b/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-extras.cmake.develspace.in new file mode 100644 index 0000000..ea194e9 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-extras.cmake.develspace.in @@ -0,0 +1,2 @@ +set(videostream_MESSAGE_FILES "") +set(videostream_SERVICE_FILES "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv") diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-extras.cmake.installspace.in b/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-extras.cmake.installspace.in new file mode 100644 index 0000000..9dd80d4 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-extras.cmake.installspace.in @@ -0,0 +1,2 @@ +set(videostream_MESSAGE_FILES "") +set(videostream_SERVICE_FILES "srv/ip_get.srv") diff --git a/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-paths-context.py b/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-paths-context.py new file mode 100644 index 0000000..7f91d1d --- /dev/null +++ b/Legacy/ws_linux/build/videostream/catkin_generated/videostream-msg-paths-context.py @@ -0,0 +1,8 @@ +# generated from genmsg/cmake/pkg-msg-paths.context.in + +DEVELSPACE = 'TRUE' == 'TRUE' +INSTALLSPACE = 'FALSE' == 'TRUE' + +PROJECT_NAME = 'videostream' +PKG_MSG_INCLUDE_DIRS = '' +ARG_DEPENDENCIES = 'std_msgs' diff --git a/Legacy/ws_linux/build/videostream/cmake/videostream-genmsg-context.py b/Legacy/ws_linux/build/videostream/cmake/videostream-genmsg-context.py new file mode 100644 index 0000000..43e56d9 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/cmake/videostream-genmsg-context.py @@ -0,0 +1,10 @@ +# generated from genmsg/cmake/pkg-genmsg.context.in + +messages_str = "" +services_str = "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv" +pkg_name = "videostream" +dependencies_str = "std_msgs" +langs = "gencpp;genlisp;genpy" +dep_include_paths_str = "std_msgs;/opt/ros/hydro/share/std_msgs/cmake/../msg" +PYTHON_EXECUTABLE = "/usr/bin/python" +package_has_static_sources = '' == 'TRUE' diff --git a/Legacy/ws_linux/build/videostream/cmake/videostream-genmsg.cmake b/Legacy/ws_linux/build/videostream/cmake/videostream-genmsg.cmake new file mode 100644 index 0000000..18ab996 --- /dev/null +++ b/Legacy/ws_linux/build/videostream/cmake/videostream-genmsg.cmake @@ -0,0 +1,133 @@ +# generated from genmsg/cmake/pkg-genmsg.cmake.em + +message(STATUS "videostream: 0 messages, 1 services") + +set(MSG_I_FLAGS "-Istd_msgs:/opt/ros/hydro/share/std_msgs/cmake/../msg") + +# Find all generators +find_package(gencpp REQUIRED) +find_package(genlisp REQUIRED) +find_package(genpy REQUIRED) + +add_custom_target(videostream_generate_messages ALL) + +# +# langs = gencpp;genlisp;genpy +# + +### Section generating for lang: gencpp +### Generating Messages + +### Generating Services +_generate_srv_cpp(videostream + "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv" + "${MSG_I_FLAGS}" + "" + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/videostream +) + +### Generating Module File +_generate_module_cpp(videostream + ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/videostream + "${ALL_GEN_OUTPUT_FILES_cpp}" +) + +add_custom_target(videostream_generate_messages_cpp + DEPENDS ${ALL_GEN_OUTPUT_FILES_cpp} +) +add_dependencies(videostream_generate_messages videostream_generate_messages_cpp) + +# target for backward compatibility +add_custom_target(videostream_gencpp) +add_dependencies(videostream_gencpp videostream_generate_messages_cpp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS videostream_generate_messages_cpp) + +### Section generating for lang: genlisp +### Generating Messages + +### Generating Services +_generate_srv_lisp(videostream + "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv" + "${MSG_I_FLAGS}" + "" + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/videostream +) + +### Generating Module File +_generate_module_lisp(videostream + ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/videostream + "${ALL_GEN_OUTPUT_FILES_lisp}" +) + +add_custom_target(videostream_generate_messages_lisp + DEPENDS ${ALL_GEN_OUTPUT_FILES_lisp} +) +add_dependencies(videostream_generate_messages videostream_generate_messages_lisp) + +# target for backward compatibility +add_custom_target(videostream_genlisp) +add_dependencies(videostream_genlisp videostream_generate_messages_lisp) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS videostream_generate_messages_lisp) + +### Section generating for lang: genpy +### Generating Messages + +### Generating Services +_generate_srv_py(videostream + "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv" + "${MSG_I_FLAGS}" + "" + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/videostream +) + +### Generating Module File +_generate_module_py(videostream + ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/videostream + "${ALL_GEN_OUTPUT_FILES_py}" +) + +add_custom_target(videostream_generate_messages_py + DEPENDS ${ALL_GEN_OUTPUT_FILES_py} +) +add_dependencies(videostream_generate_messages videostream_generate_messages_py) + +# target for backward compatibility +add_custom_target(videostream_genpy) +add_dependencies(videostream_genpy videostream_generate_messages_py) + +# register target for catkin_package(EXPORTED_TARGETS) +list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS videostream_generate_messages_py) + + + +if(gencpp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/videostream) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/videostream + DESTINATION ${gencpp_INSTALL_DIR} + ) +endif() +add_dependencies(videostream_generate_messages_cpp std_msgs_generate_messages_cpp) + +if(genlisp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/videostream) + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/videostream + DESTINATION ${genlisp_INSTALL_DIR} + ) +endif() +add_dependencies(videostream_generate_messages_lisp std_msgs_generate_messages_lisp) + +if(genpy_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/videostream) + install(CODE "execute_process(COMMAND \"/usr/bin/python\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/videostream\")") + # install generated code + install( + DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/videostream + DESTINATION ${genpy_INSTALL_DIR} + ) +endif() +add_dependencies(videostream_generate_messages_py std_msgs_generate_messages_py) diff --git a/Legacy/ws_linux/build/videostream/cmake_install.cmake b/Legacy/ws_linux/build/videostream/cmake_install.cmake new file mode 100644 index 0000000..7b044fb --- /dev/null +++ b/Legacy/ws_linux/build/videostream/cmake_install.cmake @@ -0,0 +1,77 @@ +# Install script for directory: /home/lab1_5/ws/ws_linux/src/videostream + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/home/lab1_5/ws/ws_linux/install") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/videostream/srv" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/videostream/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-paths.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/include/videostream") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/common-lisp/ros" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/share/common-lisp/ros/videostream") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + execute_process(COMMAND "/usr/bin/python" -m compileall "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages" TYPE DIRECTORY FILES "/home/lab1_5/ws/ws_linux/devel/lib/python2.7/dist-packages/videostream") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/videostream/catkin_generated/installspace/videostream.pc") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/videostream/cmake" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/build/videostream/catkin_generated/installspace/videostream-msg-extras.cmake") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/videostream/cmake" TYPE FILE FILES + "/home/lab1_5/ws/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig.cmake" + "/home/lab1_5/ws/ws_linux/build/videostream/catkin_generated/installspace/videostreamConfig-version.cmake" + ) +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/videostream" TYPE FILE FILES "/home/lab1_5/ws/ws_linux/src/videostream/package.xml") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + diff --git a/Legacy/ws_linux/devel/.catkin b/Legacy/ws_linux/devel/.catkin new file mode 100644 index 0000000..2e75d7d --- /dev/null +++ b/Legacy/ws_linux/devel/.catkin @@ -0,0 +1 @@ +/home/lab1_5/ws/ws_linux/src \ No newline at end of file diff --git a/Legacy/ws_linux/devel/.rosinstall b/Legacy/ws_linux/devel/.rosinstall new file mode 100644 index 0000000..c4dad5d --- /dev/null +++ b/Legacy/ws_linux/devel/.rosinstall @@ -0,0 +1,2 @@ +- setup-file: + local-name: /home/lab1_5/ws/ws_linux/devel/setup.sh diff --git a/Legacy/ws_linux/devel/_setup_util.py b/Legacy/ws_linux/devel/_setup_util.py new file mode 100755 index 0000000..1ba3413 --- /dev/null +++ b/Legacy/ws_linux/devel/_setup_util.py @@ -0,0 +1,280 @@ +#!/usr/bin/env python + +# Software License Agreement (BSD License) +# +# Copyright (c) 2012, Willow Garage, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of Willow Garage, Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +'''This file generates shell code for the setup.SHELL scripts to set environment variables''' + +from __future__ import print_function +import argparse +import copy +import errno +import os +import platform +import sys + +CATKIN_MARKER_FILE = '.catkin' + +system = platform.system() +IS_DARWIN = (system == 'Darwin') +IS_WINDOWS = (system == 'Windows') + +# subfolder of workspace prepended to CMAKE_PREFIX_PATH +ENV_VAR_SUBFOLDERS = { + 'CMAKE_PREFIX_PATH': '', + 'CPATH': 'include', + 'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': 'lib', + 'PATH': 'bin', + 'PKG_CONFIG_PATH': 'lib/pkgconfig', + 'PYTHONPATH': 'lib/python2.7/dist-packages', +} + + +def rollback_env_variables(environ, env_var_subfolders): + ''' + Generate shell code to reset environment variables + by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH. + This does not cover modifications performed by environment hooks. + ''' + lines = [] + unmodified_environ = copy.copy(environ) + for key in sorted(env_var_subfolders.keys()): + subfolder = env_var_subfolders[key] + value = _rollback_env_variable(unmodified_environ, key, subfolder) + if value is not None: + environ[key] = value + lines.append(assignment(key, value)) + if lines: + lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH')) + return lines + + +def _rollback_env_variable(environ, name, subfolder): + ''' + For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. + + :param subfolder: str '' or subfoldername that may start with '/' + :returns: the updated value of the environment variable. + ''' + value = environ[name] if name in environ else '' + env_paths = [path for path in value.split(os.pathsep) if path] + value_modified = False + if subfolder: + if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)): + subfolder = subfolder[1:] + if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)): + subfolder = subfolder[:-1] + for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True): + path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path + path_to_remove = None + for env_path in env_paths: + env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path + if env_path_clean == path_to_find: + path_to_remove = env_path + break + if path_to_remove: + env_paths.remove(path_to_remove) + value_modified = True + new_value = os.pathsep.join(env_paths) + return new_value if value_modified else None + + +def _get_workspaces(environ, include_fuerte=False, include_non_existing=False): + ''' + Based on CMAKE_PREFIX_PATH return all catkin workspaces. + + :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool`` + ''' + # get all cmake prefix paths + env_name = 'CMAKE_PREFIX_PATH' + value = environ[env_name] if env_name in environ else '' + paths = [path for path in value.split(os.pathsep) if path] + # remove non-workspace paths + workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))] + return workspaces + + +def prepend_env_variables(environ, env_var_subfolders, workspaces): + ''' + Generate shell code to prepend environment variables + for the all workspaces. + ''' + lines = [] + lines.append(comment('prepend folders of workspaces to environment variables')) + + paths = [path for path in workspaces.split(os.pathsep) if path] + + prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '') + lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix)) + + for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']): + subfolder = env_var_subfolders[key] + prefix = _prefix_env_variable(environ, key, paths, subfolder) + lines.append(prepend(environ, key, prefix)) + return lines + + +def _prefix_env_variable(environ, name, paths, subfolder): + ''' + Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items. + ''' + value = environ[name] if name in environ else '' + environ_paths = [path for path in value.split(os.pathsep) if path] + checked_paths = [] + for path in paths: + if subfolder: + path = os.path.join(path, subfolder) + # exclude any path already in env and any path we already added + if path not in environ_paths and path not in checked_paths: + checked_paths.append(path) + prefix_str = os.pathsep.join(checked_paths) + if prefix_str != '' and environ_paths: + prefix_str += os.pathsep + return prefix_str + + +def assignment(key, value): + if not IS_WINDOWS: + return 'export %s="%s"' % (key, value) + else: + return 'set %s=%s' % (key, value) + + +def comment(msg): + if not IS_WINDOWS: + return '# %s' % msg + else: + return 'REM %s' % msg + + +def prepend(environ, key, prefix): + if key not in environ or not environ[key]: + return assignment(key, prefix) + if not IS_WINDOWS: + return 'export %s="%s$%s"' % (key, prefix, key) + else: + return 'set %s=%s%%%s%%' % (key, prefix, key) + + +def find_env_hooks(environ, cmake_prefix_path): + ''' + Generate shell code with found environment hooks + for the all workspaces. + ''' + lines = [] + lines.append(comment('found environment hooks in workspaces')) + + generic_env_hooks = [] + generic_env_hooks_workspace = [] + specific_env_hooks = [] + specific_env_hooks_workspace = [] + generic_env_hooks_by_filename = {} + specific_env_hooks_by_filename = {} + generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh' + specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None + # remove non-workspace paths + workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))] + for workspace in reversed(workspaces): + env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d') + if os.path.isdir(env_hook_dir): + for filename in sorted(os.listdir(env_hook_dir)): + if filename.endswith('.%s' % generic_env_hook_ext): + # remove previous env hook with same name if present + if filename in generic_env_hooks_by_filename: + i = generic_env_hooks.index(generic_env_hooks_by_filename[filename]) + generic_env_hooks.pop(i) + generic_env_hooks_workspace.pop(i) + # append env hook + generic_env_hooks.append(os.path.join(env_hook_dir, filename)) + generic_env_hooks_workspace.append(workspace) + generic_env_hooks_by_filename[filename] = generic_env_hooks[-1] + elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext): + # remove previous env hook with same name if present + if filename in specific_env_hooks_by_filename: + i = specific_env_hooks.index(specific_env_hooks_by_filename[filename]) + specific_env_hooks.pop(i) + specific_env_hooks_workspace.pop(i) + # append env hook + specific_env_hooks.append(os.path.join(env_hook_dir, filename)) + specific_env_hooks_workspace.append(workspace) + specific_env_hooks_by_filename[filename] = specific_env_hooks[-1] + env_hooks = generic_env_hooks + specific_env_hooks + env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace + count = len(env_hooks) + lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count)) + for i in range(count): + lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i])) + lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i])) + return lines + + +def _parse_arguments(args=None): + parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.') + parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context') + return parser.parse_known_args(args=args)[0] + + +if __name__ == '__main__': + try: + try: + args = _parse_arguments() + except Exception as e: + print(e, file=sys.stderr) + sys.exit(1) + + # environment at generation time + CMAKE_PREFIX_PATH = '/home/lab1_5/ws/ws_linux/devel;/home/lab1_5/ws/ws_xeno/devel;/home/lab1_5/ws/ws_isolated/install_isolated;/home/lab1_5/ws/install_isolated;/opt/ros/hydro'.split(';') + # prepend current workspace if not already part of CPP + base_path = os.path.dirname(__file__) + if base_path not in CMAKE_PREFIX_PATH: + CMAKE_PREFIX_PATH.insert(0, base_path) + CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH) + + environ = dict(os.environ) + lines = [] + if not args.extend: + lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS) + lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH) + lines += find_env_hooks(environ, CMAKE_PREFIX_PATH) + print('\n'.join(lines)) + + # need to explicitly flush the output + sys.stdout.flush() + except IOError as e: + # and catch potantial "broken pipe" if stdout is not writable + # which can happen when piping the output to a file but the disk is full + if e.errno == errno.EPIPE: + print(e, file=sys.stderr) + sys.exit(2) + raise + + sys.exit(0) diff --git a/Legacy/ws_linux/devel/env.sh b/Legacy/ws_linux/devel/env.sh new file mode 100755 index 0000000..8aa9d24 --- /dev/null +++ b/Legacy/ws_linux/devel/env.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +# generated from catkin/cmake/templates/env.sh.in + +if [ $# -eq 0 ] ; then + /bin/echo "Usage: env.sh COMMANDS" + /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." + exit 1 +fi + +# ensure to not use different shell type which was set before +CATKIN_SHELL=sh + +# source setup.sh from same directory as this file +_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) +. "$_CATKIN_SETUP_DIR/setup.sh" +exec "$@" diff --git a/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin-test-results.sh b/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin-test-results.sh new file mode 100644 index 0000000..501b091 --- /dev/null +++ b/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin-test-results.sh @@ -0,0 +1,4 @@ +# generated from catkin/cmake/env-hooks/05.catkin-test-results.sh.develspace.in + +export CATKIN_TEST_RESULTS_DIR="/home/lab1_5/ws/ws_linux/build/test_results" +export ROS_TEST_RESULTS_DIR="$CATKIN_TEST_RESULTS_DIR" diff --git a/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin_make.bash b/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin_make.bash new file mode 100644 index 0000000..bb6ab44 --- /dev/null +++ b/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin_make.bash @@ -0,0 +1,64 @@ +function _catkin_make() +{ + local cur prev + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + # autocomplete path arguments for -C, --directory, --source, --build + case $prev in + -C|--directory|--source|--build) + _filedir -d + return 0 + ;; + esac + + if [[ "$cur" == -DCMAKE_BUILD_TYPE=* ]]; then + # autocomplete CMake argument CMAKE_BUILD_TYPE with its options + COMPREPLY=( $( compgen -P "-DCMAKE_BUILD_TYPE=" -W "None Debug Release RelWithDebInfo MinSizeRel" -- "${cur:19}" ) ) + elif [[ "$cur" == -DCATKIN_ENABLE_TESTING=* ]]; then + # autocomplete catkin argument CATKIN_ENABLE_TESTING with its options + COMPREPLY=( $( compgen -P "-DCATKIN_ENABLE_TESTING=" -W "0 1" -- "${cur:24}" ) ) + elif [[ "$cur" == -DCATKIN_DEVEL_PREFIX=* || "$cur" == -DCMAKE_INSTALL_PREFIX=* ]]; then + COMPREPLY=() + elif [[ "$cur" == -* ]]; then + local opts="$( _parse_help "$1" )" + [[ $opts ]] || opts="$( _parse_usage "$1" )" + if [[ "$cur" == -* ]]; then + # suggest some common CMake arguments + opts="$opts -DCATKIN_DEVEL_PREFIX= -DCATKIN_ENABLE_TESTING= -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=" + fi + COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + else + # check if custom workspace root has been specified on the command line + local workspace_dir="." + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == -C || ${COMP_WORDS[i]} == --directory ]]; then + # eval to expand tilde + eval workspace_dir=${COMP_WORDS[i+1]} + fi + done + # check if custom build folder has been specified on the command line + local build_dir="build" + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == --build ]]; then + # eval to expand tilde + eval build_dir=${COMP_WORDS[i+1]} + fi + done + + # determine location of Makefile + local makefile_dir + if [[ "$build_dir" = /* ]]; then + makefile_dir="$build_dir" + else + makefile_dir="$workspace_dir/$build_dir" + fi + COMPREPLY=() + if [ -f "$makefile_dir/Makefile" ]; then + cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=( $( compgen -W "`make -C $makefile_dir -qp 2>/dev/null | awk -F':' '/^[a-zA-Z0-9][a-zA-Z0-9_\.]*:/ { print $1 }'`" -- $cur )) + fi + fi +} && +complete -F _catkin_make catkin_make diff --git a/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin_make_isolated.bash b/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin_make_isolated.bash new file mode 100644 index 0000000..5cdc4dd --- /dev/null +++ b/Legacy/ws_linux/devel/etc/catkin/profile.d/05.catkin_make_isolated.bash @@ -0,0 +1,62 @@ +function _catkin_make_isolated() +{ + local cur prev + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + # autocomplete path arguments for -C, --directory, --source, --build, --devel, --install + case $prev in + -C|--directory|--source|--build|--devel|--install) + _filedir -d + return 0 + ;; + esac + + if [[ "$cur" == -DCMAKE_BUILD_TYPE=* ]]; then + # autocomplete CMake argument CMAKE_BUILD_TYPE with its options + COMPREPLY=( $( compgen -P "-DCMAKE_BUILD_TYPE=" -W "None Debug Release RelWithDebInfo MinSizeRel" -- "${cur:19}" ) ) + elif [[ "$cur" == -DCATKIN_ENABLE_TESTING=* ]]; then + # autocomplete catkin argument CATKIN_ENABLE_TESTING with its options + COMPREPLY=( $( compgen -P "-DCATKIN_ENABLE_TESTING=" -W "0 1" -- "${cur:24}" ) ) + elif [[ "$cur" == -* ]]; then + local opts="$( _parse_help "$1" )" + [[ $opts ]] || opts="$( _parse_usage "$1" )" + if [[ "$cur" == -* ]]; then + # suggest some common CMake arguments + opts="$opts -DCATKIN_ENABLE_TESTING= -DCMAKE_BUILD_TYPE=" + fi + COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + else + # check if custom workspace root has been specified on the command line + local workspace_dir="." + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == -C || ${COMP_WORDS[i]} == --directory ]]; then + # eval to expand tilde + eval workspace_dir=${COMP_WORDS[i+1]} + fi + done + # check if custom build folder has been specified on the command line + local build_dir="build_isolated" + for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do + if [[ ${COMP_WORDS[i]} == --build ]]; then + # eval to expand tilde + eval build_dir=${COMP_WORDS[i+1]} + fi + done + + # determine location of Makefile + local makefile_dir + if [[ "$build_dir" = /* ]]; then + makefile_dir="$build_dir" + else + makefile_dir="$workspace_dir/$build_dir" + fi + COMPREPLY=() + if [ -f "$makefile_dir/Makefile" ]; then + cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=( $( compgen -W "`make -C $makefile_dir -qp 2>/dev/null | awk -F':' '/^[a-zA-Z0-9][a-zA-Z0-9_\.]*:/ { print $1 }'`" -- $cur )) + fi + fi +} && +complete -F _catkin_make_isolated catkin_make_isolated diff --git a/Legacy/ws_linux/devel/include/rosaria/BumperState.h b/Legacy/ws_linux/devel/include/rosaria/BumperState.h new file mode 100644 index 0000000..da61aa9 --- /dev/null +++ b/Legacy/ws_linux/devel/include/rosaria/BumperState.h @@ -0,0 +1,265 @@ +/* Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Auto-generated by genmsg_cpp from file /home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg + * + */ + + +#ifndef ROSARIA_MESSAGE_BUMPERSTATE_H +#define ROSARIA_MESSAGE_BUMPERSTATE_H + + +#include +#include +#include + +#include +#include +#include +#include + +#include + +namespace rosaria +{ +template +struct BumperState_ +{ + typedef BumperState_ Type; + + BumperState_() + : header() + , front_bumpers() + , rear_bumpers() { + } + BumperState_(const ContainerAllocator& _alloc) + : header(_alloc) + , front_bumpers(_alloc) + , rear_bumpers(_alloc) { + } + + + + typedef ::std_msgs::Header_ _header_type; + _header_type header; + + typedef std::vector::other > _front_bumpers_type; + _front_bumpers_type front_bumpers; + + typedef std::vector::other > _rear_bumpers_type; + _rear_bumpers_type rear_bumpers; + + + + + typedef boost::shared_ptr< ::rosaria::BumperState_ > Ptr; + typedef boost::shared_ptr< ::rosaria::BumperState_ const> ConstPtr; + boost::shared_ptr > __connection_header; + +}; // struct BumperState_ + +typedef ::rosaria::BumperState_ > BumperState; + +typedef boost::shared_ptr< ::rosaria::BumperState > BumperStatePtr; +typedef boost::shared_ptr< ::rosaria::BumperState const> BumperStateConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::rosaria::BumperState_ & v) +{ +ros::message_operations::Printer< ::rosaria::BumperState_ >::stream(s, "", v); +return s; +} + +} // namespace rosaria + +namespace ros +{ +namespace message_traits +{ + + + +// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True} +// {'rosaria': ['/home/lab1_5/ws/ws_linux/src/rosaria/msg'], 'std_msgs': ['/opt/ros/hydro/share/std_msgs/cmake/../msg'], 'geometry_msgs': ['/opt/ros/hydro/share/geometry_msgs/cmake/../msg']} + +// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] + + + + +template +struct IsFixedSize< ::rosaria::BumperState_ > + : FalseType + { }; + +template +struct IsFixedSize< ::rosaria::BumperState_ const> + : FalseType + { }; + +template +struct IsMessage< ::rosaria::BumperState_ > + : TrueType + { }; + +template +struct IsMessage< ::rosaria::BumperState_ const> + : TrueType + { }; + +template +struct HasHeader< ::rosaria::BumperState_ > + : TrueType + { }; + +template +struct HasHeader< ::rosaria::BumperState_ const> + : TrueType + { }; + + +template +struct MD5Sum< ::rosaria::BumperState_ > +{ + static const char* value() + { + return "f81947761ff7e166a3bbaf937b9869b5"; + } + + static const char* value(const ::rosaria::BumperState_&) { return value(); } + static const uint64_t static_value1 = 0xf81947761ff7e166ULL; + static const uint64_t static_value2 = 0xa3bbaf937b9869b5ULL; +}; + +template +struct DataType< ::rosaria::BumperState_ > +{ + static const char* value() + { + return "rosaria/BumperState"; + } + + static const char* value(const ::rosaria::BumperState_&) { return value(); } +}; + +template +struct Definition< ::rosaria::BumperState_ > +{ + static const char* value() + { + return "Header header\n\ +bool[] front_bumpers\n\ +bool[] rear_bumpers\n\ +\n\ +================================================================================\n\ +MSG: std_msgs/Header\n\ +# Standard metadata for higher-level stamped data types.\n\ +# This is generally used to communicate timestamped data \n\ +# in a particular coordinate frame.\n\ +# \n\ +# sequence ID: consecutively increasing ID \n\ +uint32 seq\n\ +#Two-integer timestamp that is expressed as:\n\ +# * stamp.secs: seconds (stamp_secs) since epoch\n\ +# * stamp.nsecs: nanoseconds since stamp_secs\n\ +# time-handling sugar is provided by the client library\n\ +time stamp\n\ +#Frame this data is associated with\n\ +# 0: no frame\n\ +# 1: global frame\n\ +string frame_id\n\ +"; + } + + static const char* value(const ::rosaria::BumperState_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::rosaria::BumperState_ > + { + template inline static void allInOne(Stream& stream, T m) + { + stream.next(m.header); + stream.next(m.front_bumpers); + stream.next(m.rear_bumpers); + } + + ROS_DECLARE_ALLINONE_SERIALIZER; + }; // struct BumperState_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::rosaria::BumperState_ > +{ + template static void stream(Stream& s, const std::string& indent, const ::rosaria::BumperState_& v) + { + s << indent << "header: "; + s << std::endl; + Printer< ::std_msgs::Header_ >::stream(s, indent + " ", v.header); + s << indent << "front_bumpers[]" << std::endl; + for (size_t i = 0; i < v.front_bumpers.size(); ++i) + { + s << indent << " front_bumpers[" << i << "]: "; + Printer::stream(s, indent + " ", v.front_bumpers[i]); + } + s << indent << "rear_bumpers[]" << std::endl; + for (size_t i = 0; i < v.rear_bumpers.size(); ++i) + { + s << indent << " rear_bumpers[" << i << "]: "; + Printer::stream(s, indent + " ", v.rear_bumpers[i]); + } + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // ROSARIA_MESSAGE_BUMPERSTATE_H diff --git a/Legacy/ws_linux/devel/include/rosaria/RosAriaConfig.h b/Legacy/ws_linux/devel/include/rosaria/RosAriaConfig.h new file mode 100644 index 0000000..0cd34a9 --- /dev/null +++ b/Legacy/ws_linux/devel/include/rosaria/RosAriaConfig.h @@ -0,0 +1,621 @@ +//#line 2 "/opt/ros/hydro/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template" +// ********************************************************* +// +// File autogenerated for the rosaria package +// by the dynamic_reconfigure package. +// Please do not edit. +// +// ********************************************************/ + +/*********************************************************** + * Software License Agreement (BSD License) + * + * Copyright (c) 2008, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Willow Garage nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ***********************************************************/ + +// Author: Blaise Gassend + + +#ifndef __rosaria__ROSARIACONFIG_H__ +#define __rosaria__ROSARIACONFIG_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace rosaria +{ + class RosAriaConfigStatics; + + class RosAriaConfig + { + public: + class AbstractParamDescription : public dynamic_reconfigure::ParamDescription + { + public: + AbstractParamDescription(std::string n, std::string t, uint32_t l, + std::string d, std::string e) + { + name = n; + type = t; + level = l; + description = d; + edit_method = e; + } + + virtual void clamp(RosAriaConfig &config, const RosAriaConfig &max, const RosAriaConfig &min) const = 0; + virtual void calcLevel(uint32_t &level, const RosAriaConfig &config1, const RosAriaConfig &config2) const = 0; + virtual void fromServer(const ros::NodeHandle &nh, RosAriaConfig &config) const = 0; + virtual void toServer(const ros::NodeHandle &nh, const RosAriaConfig &config) const = 0; + virtual bool fromMessage(const dynamic_reconfigure::Config &msg, RosAriaConfig &config) const = 0; + virtual void toMessage(dynamic_reconfigure::Config &msg, const RosAriaConfig &config) const = 0; + virtual void getValue(const RosAriaConfig &config, boost::any &val) const = 0; + }; + + typedef boost::shared_ptr AbstractParamDescriptionPtr; + typedef boost::shared_ptr AbstractParamDescriptionConstPtr; + + template + class ParamDescription : public AbstractParamDescription + { + public: + ParamDescription(std::string name, std::string type, uint32_t level, + std::string description, std::string edit_method, T RosAriaConfig::* f) : + AbstractParamDescription(name, type, level, description, edit_method), + field(f) + {} + + T (RosAriaConfig::* field); + + virtual void clamp(RosAriaConfig &config, const RosAriaConfig &max, const RosAriaConfig &min) const + { + if (config.*field > max.*field) + config.*field = max.*field; + + if (config.*field < min.*field) + config.*field = min.*field; + } + + virtual void calcLevel(uint32_t &comb_level, const RosAriaConfig &config1, const RosAriaConfig &config2) const + { + if (config1.*field != config2.*field) + comb_level |= level; + } + + virtual void fromServer(const ros::NodeHandle &nh, RosAriaConfig &config) const + { + nh.getParam(name, config.*field); + } + + virtual void toServer(const ros::NodeHandle &nh, const RosAriaConfig &config) const + { + nh.setParam(name, config.*field); + } + + virtual bool fromMessage(const dynamic_reconfigure::Config &msg, RosAriaConfig &config) const + { + return dynamic_reconfigure::ConfigTools::getParameter(msg, name, config.*field); + } + + virtual void toMessage(dynamic_reconfigure::Config &msg, const RosAriaConfig &config) const + { + dynamic_reconfigure::ConfigTools::appendParameter(msg, name, config.*field); + } + + virtual void getValue(const RosAriaConfig &config, boost::any &val) const + { + val = config.*field; + } + }; + + class AbstractGroupDescription : public dynamic_reconfigure::Group + { + public: + AbstractGroupDescription(std::string n, std::string t, int p, int i, bool s) + { + name = n; + type = t; + parent = p; + state = s; + id = i; + } + + std::vector abstract_parameters; + bool state; + + virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &config) const = 0; + virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &config) const =0; + virtual void updateParams(boost::any &cfg, RosAriaConfig &top) const= 0; + virtual void setInitialState(boost::any &cfg) const = 0; + + + void convertParams() + { + for(std::vector::const_iterator i = abstract_parameters.begin(); i != abstract_parameters.end(); ++i) + { + parameters.push_back(dynamic_reconfigure::ParamDescription(**i)); + } + } + }; + + typedef boost::shared_ptr AbstractGroupDescriptionPtr; + typedef boost::shared_ptr AbstractGroupDescriptionConstPtr; + + template + class GroupDescription : public AbstractGroupDescription + { + public: + GroupDescription(std::string name, std::string type, int parent, int id, bool s, T PT::* f) : AbstractGroupDescription(name, type, parent, id, s), field(f) + { + } + + GroupDescription(const GroupDescription& g): AbstractGroupDescription(g.name, g.type, g.parent, g.id, g.state), field(g.field), groups(g.groups) + { + parameters = g.parameters; + abstract_parameters = g.abstract_parameters; + } + + virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &cfg) const + { + PT* config = boost::any_cast(cfg); + if(!dynamic_reconfigure::ConfigTools::getGroupState(msg, name, (*config).*field)) + return false; + + for(std::vector::const_iterator i = groups.begin(); i != groups.end(); ++i) + { + boost::any n = &((*config).*field); + if(!(*i)->fromMessage(msg, n)) + return false; + } + + return true; + } + + virtual void setInitialState(boost::any &cfg) const + { + PT* config = boost::any_cast(cfg); + T* group = &((*config).*field); + group->state = state; + + for(std::vector::const_iterator i = groups.begin(); i != groups.end(); ++i) + { + boost::any n = boost::any(&((*config).*field)); + (*i)->setInitialState(n); + } + + } + + virtual void updateParams(boost::any &cfg, RosAriaConfig &top) const + { + PT* config = boost::any_cast(cfg); + + T* f = &((*config).*field); + f->setParams(top, abstract_parameters); + + for(std::vector::const_iterator i = groups.begin(); i != groups.end(); ++i) + { + boost::any n = &((*config).*field); + (*i)->updateParams(n, top); + } + } + + virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &cfg) const + { + const PT config = boost::any_cast(cfg); + dynamic_reconfigure::ConfigTools::appendGroup(msg, name, id, parent, config.*field); + + for(std::vector::const_iterator i = groups.begin(); i != groups.end(); ++i) + { + (*i)->toMessage(msg, config.*field); + } + } + + T (PT::* field); + std::vector groups; + }; + +class DEFAULT +{ + public: + DEFAULT() + { + state = true; + name = "Default"; + } + + void setParams(RosAriaConfig &config, const std::vector params) + { + for (std::vector::const_iterator _i = params.begin(); _i != params.end(); ++_i) + { + boost::any val; + (*_i)->getValue(config, val); + + if("trans_accel"==(*_i)->name){trans_accel = boost::any_cast(val);} + if("trans_decel"==(*_i)->name){trans_decel = boost::any_cast(val);} + if("lat_accel"==(*_i)->name){lat_accel = boost::any_cast(val);} + if("lat_decel"==(*_i)->name){lat_decel = boost::any_cast(val);} + if("rot_accel"==(*_i)->name){rot_accel = boost::any_cast(val);} + if("rot_decel"==(*_i)->name){rot_decel = boost::any_cast(val);} + if("TicksMM"==(*_i)->name){TicksMM = boost::any_cast(val);} + if("DriftFactor"==(*_i)->name){DriftFactor = boost::any_cast(val);} + if("RevCount"==(*_i)->name){RevCount = boost::any_cast(val);} + } + } + + double trans_accel; +double trans_decel; +double lat_accel; +double lat_decel; +double rot_accel; +double rot_decel; +int TicksMM; +int DriftFactor; +int RevCount; + + bool state; + std::string name; + + +}groups; + + + +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + double trans_accel; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + double trans_decel; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + double lat_accel; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + double lat_decel; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + double rot_accel; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + double rot_decel; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + int TicksMM; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + int DriftFactor; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + int RevCount; +//#line 255 "/opt/ros/hydro/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template" + + bool __fromMessage__(dynamic_reconfigure::Config &msg) + { + const std::vector &__param_descriptions__ = __getParamDescriptions__(); + const std::vector &__group_descriptions__ = __getGroupDescriptions__(); + + int count = 0; + for (std::vector::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) + if ((*i)->fromMessage(msg, *this)) + count++; + + for (std::vector::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i ++) + { + if ((*i)->id == 0) + { + boost::any n = boost::any(this); + (*i)->updateParams(n, *this); + (*i)->fromMessage(msg, n); + } + } + + if (count != dynamic_reconfigure::ConfigTools::size(msg)) + { + ROS_ERROR("RosAriaConfig::__fromMessage__ called with an unexpected parameter."); + ROS_ERROR("Booleans:"); + for (unsigned int i = 0; i < msg.bools.size(); i++) + ROS_ERROR(" %s", msg.bools[i].name.c_str()); + ROS_ERROR("Integers:"); + for (unsigned int i = 0; i < msg.ints.size(); i++) + ROS_ERROR(" %s", msg.ints[i].name.c_str()); + ROS_ERROR("Doubles:"); + for (unsigned int i = 0; i < msg.doubles.size(); i++) + ROS_ERROR(" %s", msg.doubles[i].name.c_str()); + ROS_ERROR("Strings:"); + for (unsigned int i = 0; i < msg.strs.size(); i++) + ROS_ERROR(" %s", msg.strs[i].name.c_str()); + // @todo Check that there are no duplicates. Make this error more + // explicit. + return false; + } + return true; + } + + // This version of __toMessage__ is used during initialization of + // statics when __getParamDescriptions__ can't be called yet. + void __toMessage__(dynamic_reconfigure::Config &msg, const std::vector &__param_descriptions__, const std::vector &__group_descriptions__) const + { + dynamic_reconfigure::ConfigTools::clear(msg); + for (std::vector::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) + (*i)->toMessage(msg, *this); + + for (std::vector::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i) + { + if((*i)->id == 0) + { + (*i)->toMessage(msg, *this); + } + } + } + + void __toMessage__(dynamic_reconfigure::Config &msg) const + { + const std::vector &__param_descriptions__ = __getParamDescriptions__(); + const std::vector &__group_descriptions__ = __getGroupDescriptions__(); + __toMessage__(msg, __param_descriptions__, __group_descriptions__); + } + + void __toServer__(const ros::NodeHandle &nh) const + { + const std::vector &__param_descriptions__ = __getParamDescriptions__(); + for (std::vector::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) + (*i)->toServer(nh, *this); + } + + void __fromServer__(const ros::NodeHandle &nh) + { + static bool setup=false; + + const std::vector &__param_descriptions__ = __getParamDescriptions__(); + for (std::vector::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) + (*i)->fromServer(nh, *this); + + const std::vector &__group_descriptions__ = __getGroupDescriptions__(); + for (std::vector::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++){ + if (!setup && (*i)->id == 0) { + setup = true; + boost::any n = boost::any(this); + (*i)->setInitialState(n); + } + } + } + + void __clamp__() + { + const std::vector &__param_descriptions__ = __getParamDescriptions__(); + const RosAriaConfig &__max__ = __getMax__(); + const RosAriaConfig &__min__ = __getMin__(); + for (std::vector::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) + (*i)->clamp(*this, __max__, __min__); + } + + uint32_t __level__(const RosAriaConfig &config) const + { + const std::vector &__param_descriptions__ = __getParamDescriptions__(); + uint32_t level = 0; + for (std::vector::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) + (*i)->calcLevel(level, config, *this); + return level; + } + + static const dynamic_reconfigure::ConfigDescription &__getDescriptionMessage__(); + static const RosAriaConfig &__getDefault__(); + static const RosAriaConfig &__getMax__(); + static const RosAriaConfig &__getMin__(); + static const std::vector &__getParamDescriptions__(); + static const std::vector &__getGroupDescriptions__(); + + private: + static const RosAriaConfigStatics *__get_statics__(); + }; + + template <> // Max and min are ignored for strings. + inline void RosAriaConfig::ParamDescription::clamp(RosAriaConfig &config, const RosAriaConfig &max, const RosAriaConfig &min) const + { + return; + } + + class RosAriaConfigStatics + { + friend class RosAriaConfig; + + RosAriaConfigStatics() + { +RosAriaConfig::GroupDescription Default("Default", "", 0, 0, true, &RosAriaConfig::groups); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.trans_accel = -std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.trans_accel = std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.trans_accel = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("trans_accel", "double", 0, "Translational acceleration (m/s^2)", "", &RosAriaConfig::trans_accel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("trans_accel", "double", 0, "Translational acceleration (m/s^2)", "", &RosAriaConfig::trans_accel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.trans_decel = -std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.trans_decel = std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.trans_decel = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("trans_decel", "double", 0, "Translational deceleration (m/s^2)", "", &RosAriaConfig::trans_decel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("trans_decel", "double", 0, "Translational deceleration (m/s^2)", "", &RosAriaConfig::trans_decel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.lat_accel = -std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.lat_accel = std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.lat_accel = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("lat_accel", "double", 0, "Lateral acceleration (m/s^2)", "", &RosAriaConfig::lat_accel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("lat_accel", "double", 0, "Lateral acceleration (m/s^2)", "", &RosAriaConfig::lat_accel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.lat_decel = -std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.lat_decel = std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.lat_decel = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("lat_decel", "double", 0, "Lateral deceleration (m/s^2)", "", &RosAriaConfig::lat_decel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("lat_decel", "double", 0, "Lateral deceleration (m/s^2)", "", &RosAriaConfig::lat_decel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.rot_accel = -std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.rot_accel = std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.rot_accel = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("rot_accel", "double", 0, "Rotational acceleration (rad/s^2)", "", &RosAriaConfig::rot_accel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("rot_accel", "double", 0, "Rotational acceleration (rad/s^2)", "", &RosAriaConfig::rot_accel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.rot_decel = -std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.rot_decel = std::numeric_limits::infinity(); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.rot_decel = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("rot_decel", "double", 0, "Rotational deceleration (rad/s^2)", "", &RosAriaConfig::rot_decel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("rot_decel", "double", 0, "Rotational deceleration (rad/s^2)", "", &RosAriaConfig::rot_decel))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.TicksMM = -2147483648; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.TicksMM = 2147483647; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.TicksMM = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("TicksMM", "int", 0, "Encoder ticks/mm", "", &RosAriaConfig::TicksMM))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("TicksMM", "int", 0, "Encoder ticks/mm", "", &RosAriaConfig::TicksMM))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.DriftFactor = -2147483648; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.DriftFactor = 2147483647; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.DriftFactor = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("DriftFactor", "int", 0, "Value in 1/8192 increments to be added or subtracted from the left encoder ticks in order to compensate for tire differences.", "", &RosAriaConfig::DriftFactor))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("DriftFactor", "int", 0, "Value in 1/8192 increments to be added or subtracted from the left encoder ticks in order to compensate for tire differences.", "", &RosAriaConfig::DriftFactor))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __min__.RevCount = -2147483648; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __max__.RevCount = 2147483647; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __default__.RevCount = 0; +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.abstract_parameters.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("RevCount", "int", 0, "The number of differential encoder ticks for a 180-degree revolution of the robot.", "", &RosAriaConfig::RevCount))); +//#line 262 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __param_descriptions__.push_back(RosAriaConfig::AbstractParamDescriptionConstPtr(new RosAriaConfig::ParamDescription("RevCount", "int", 0, "The number of differential encoder ticks for a 180-degree revolution of the robot.", "", &RosAriaConfig::RevCount))); +//#line 233 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + Default.convertParams(); +//#line 233 "/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" + __group_descriptions__.push_back(RosAriaConfig::AbstractGroupDescriptionConstPtr(new RosAriaConfig::GroupDescription(Default))); +//#line 390 "/opt/ros/hydro/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template" + + for (std::vector::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i) + { + __description_message__.groups.push_back(**i); + } + __max__.__toMessage__(__description_message__.max, __param_descriptions__, __group_descriptions__); + __min__.__toMessage__(__description_message__.min, __param_descriptions__, __group_descriptions__); + __default__.__toMessage__(__description_message__.dflt, __param_descriptions__, __group_descriptions__); + } + std::vector __param_descriptions__; + std::vector __group_descriptions__; + RosAriaConfig __max__; + RosAriaConfig __min__; + RosAriaConfig __default__; + dynamic_reconfigure::ConfigDescription __description_message__; + + static const RosAriaConfigStatics *get_instance() + { + // Split this off in a separate function because I know that + // instance will get initialized the first time get_instance is + // called, and I am guaranteeing that get_instance gets called at + // most once. + static RosAriaConfigStatics instance; + return &instance; + } + }; + + inline const dynamic_reconfigure::ConfigDescription &RosAriaConfig::__getDescriptionMessage__() + { + return __get_statics__()->__description_message__; + } + + inline const RosAriaConfig &RosAriaConfig::__getDefault__() + { + return __get_statics__()->__default__; + } + + inline const RosAriaConfig &RosAriaConfig::__getMax__() + { + return __get_statics__()->__max__; + } + + inline const RosAriaConfig &RosAriaConfig::__getMin__() + { + return __get_statics__()->__min__; + } + + inline const std::vector &RosAriaConfig::__getParamDescriptions__() + { + return __get_statics__()->__param_descriptions__; + } + + inline const std::vector &RosAriaConfig::__getGroupDescriptions__() + { + return __get_statics__()->__group_descriptions__; + } + + inline const RosAriaConfigStatics *RosAriaConfig::__get_statics__() + { + const static RosAriaConfigStatics *statics; + + if (statics) // Common case + return statics; + + boost::mutex::scoped_lock lock(dynamic_reconfigure::__init_mutex__); + + if (statics) // In case we lost a race. + return statics; + + statics = RosAriaConfigStatics::get_instance(); + + return statics; + } + + +} + +#endif // __ROSARIARECONFIGURATOR_H__ diff --git a/Legacy/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h b/Legacy/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h new file mode 100644 index 0000000..0101656 --- /dev/null +++ b/Legacy/ws_linux/devel/include/rosaria_msgs/RestrictionsMsg.h @@ -0,0 +1,246 @@ +/* Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Auto-generated by genmsg_cpp from file /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg + * + */ + + +#ifndef ROSARIA_MSGS_MESSAGE_RESTRICTIONSMSG_H +#define ROSARIA_MSGS_MESSAGE_RESTRICTIONSMSG_H + + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +namespace rosaria_msgs +{ +template +struct RestrictionsMsg_ +{ + typedef RestrictionsMsg_ Type; + + RestrictionsMsg_() + : distance() + , linear_velocity() + , angular_velocity() { + } + RestrictionsMsg_(const ContainerAllocator& _alloc) + : distance(_alloc) + , linear_velocity(_alloc) + , angular_velocity(_alloc) { + } + + + + typedef ::std_msgs::Float64_ _distance_type; + _distance_type distance; + + typedef ::std_msgs::Float64_ _linear_velocity_type; + _linear_velocity_type linear_velocity; + + typedef ::std_msgs::Float64_ _angular_velocity_type; + _angular_velocity_type angular_velocity; + + + + + typedef boost::shared_ptr< ::rosaria_msgs::RestrictionsMsg_ > Ptr; + typedef boost::shared_ptr< ::rosaria_msgs::RestrictionsMsg_ const> ConstPtr; + boost::shared_ptr > __connection_header; + +}; // struct RestrictionsMsg_ + +typedef ::rosaria_msgs::RestrictionsMsg_ > RestrictionsMsg; + +typedef boost::shared_ptr< ::rosaria_msgs::RestrictionsMsg > RestrictionsMsgPtr; +typedef boost::shared_ptr< ::rosaria_msgs::RestrictionsMsg const> RestrictionsMsgConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::rosaria_msgs::RestrictionsMsg_ & v) +{ +ros::message_operations::Printer< ::rosaria_msgs::RestrictionsMsg_ >::stream(s, "", v); +return s; +} + +} // namespace rosaria_msgs + +namespace ros +{ +namespace message_traits +{ + + + +// BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False} +// {'std_msgs': ['/opt/ros/hydro/share/std_msgs/cmake/../msg'], 'rosaria_msgs': ['/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg'], 'geometry_msgs': ['/opt/ros/hydro/share/geometry_msgs/cmake/../msg']} + +// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] + + + + +template +struct IsFixedSize< ::rosaria_msgs::RestrictionsMsg_ > + : TrueType + { }; + +template +struct IsFixedSize< ::rosaria_msgs::RestrictionsMsg_ const> + : TrueType + { }; + +template +struct IsMessage< ::rosaria_msgs::RestrictionsMsg_ > + : TrueType + { }; + +template +struct IsMessage< ::rosaria_msgs::RestrictionsMsg_ const> + : TrueType + { }; + +template +struct HasHeader< ::rosaria_msgs::RestrictionsMsg_ > + : FalseType + { }; + +template +struct HasHeader< ::rosaria_msgs::RestrictionsMsg_ const> + : FalseType + { }; + + +template +struct MD5Sum< ::rosaria_msgs::RestrictionsMsg_ > +{ + static const char* value() + { + return "c2466ab186049d2506624976271d3b3e"; + } + + static const char* value(const ::rosaria_msgs::RestrictionsMsg_&) { return value(); } + static const uint64_t static_value1 = 0xc2466ab186049d25ULL; + static const uint64_t static_value2 = 0x06624976271d3b3eULL; +}; + +template +struct DataType< ::rosaria_msgs::RestrictionsMsg_ > +{ + static const char* value() + { + return "rosaria_msgs/RestrictionsMsg"; + } + + static const char* value(const ::rosaria_msgs::RestrictionsMsg_&) { return value(); } +}; + +template +struct Definition< ::rosaria_msgs::RestrictionsMsg_ > +{ + static const char* value() + { + return "std_msgs/Float64 distance\n\ +std_msgs/Float64 linear_velocity\n\ +std_msgs/Float64 angular_velocity\n\ +================================================================================\n\ +MSG: std_msgs/Float64\n\ +float64 data\n\ +"; + } + + static const char* value(const ::rosaria_msgs::RestrictionsMsg_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::rosaria_msgs::RestrictionsMsg_ > + { + template inline static void allInOne(Stream& stream, T m) + { + stream.next(m.distance); + stream.next(m.linear_velocity); + stream.next(m.angular_velocity); + } + + ROS_DECLARE_ALLINONE_SERIALIZER; + }; // struct RestrictionsMsg_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::rosaria_msgs::RestrictionsMsg_ > +{ + template static void stream(Stream& s, const std::string& indent, const ::rosaria_msgs::RestrictionsMsg_& v) + { + s << indent << "distance: "; + s << std::endl; + Printer< ::std_msgs::Float64_ >::stream(s, indent + " ", v.distance); + s << indent << "linear_velocity: "; + s << std::endl; + Printer< ::std_msgs::Float64_ >::stream(s, indent + " ", v.linear_velocity); + s << indent << "angular_velocity: "; + s << std::endl; + Printer< ::std_msgs::Float64_ >::stream(s, indent + " ", v.angular_velocity); + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // ROSARIA_MSGS_MESSAGE_RESTRICTIONSMSG_H diff --git a/Legacy/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h b/Legacy/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h new file mode 100644 index 0000000..226332f --- /dev/null +++ b/Legacy/ws_linux/devel/include/rosaria_msgs/RobotInfoMsg.h @@ -0,0 +1,299 @@ +/* Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Auto-generated by genmsg_cpp from file /home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg + * + */ + + +#ifndef ROSARIA_MSGS_MESSAGE_ROBOTINFOMSG_H +#define ROSARIA_MSGS_MESSAGE_ROBOTINFOMSG_H + + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace rosaria_msgs +{ +template +struct RobotInfoMsg_ +{ + typedef RobotInfoMsg_ Type; + + RobotInfoMsg_() + : robot_id() + , battery_voltage() + , twist() + , state() + , clutch() + , obstacle_detected() { + } + RobotInfoMsg_(const ContainerAllocator& _alloc) + : robot_id(_alloc) + , battery_voltage(_alloc) + , twist(_alloc) + , state(_alloc) + , clutch(_alloc) + , obstacle_detected(_alloc) { + } + + + + typedef ::std_msgs::UInt8_ _robot_id_type; + _robot_id_type robot_id; + + typedef ::std_msgs::Float64_ _battery_voltage_type; + _battery_voltage_type battery_voltage; + + typedef ::geometry_msgs::Twist_ _twist_type; + _twist_type twist; + + typedef ::std_msgs::Bool_ _state_type; + _state_type state; + + typedef ::std_msgs::Bool_ _clutch_type; + _clutch_type clutch; + + typedef ::std_msgs::Bool_ _obstacle_detected_type; + _obstacle_detected_type obstacle_detected; + + + + + typedef boost::shared_ptr< ::rosaria_msgs::RobotInfoMsg_ > Ptr; + typedef boost::shared_ptr< ::rosaria_msgs::RobotInfoMsg_ const> ConstPtr; + boost::shared_ptr > __connection_header; + +}; // struct RobotInfoMsg_ + +typedef ::rosaria_msgs::RobotInfoMsg_ > RobotInfoMsg; + +typedef boost::shared_ptr< ::rosaria_msgs::RobotInfoMsg > RobotInfoMsgPtr; +typedef boost::shared_ptr< ::rosaria_msgs::RobotInfoMsg const> RobotInfoMsgConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::rosaria_msgs::RobotInfoMsg_ & v) +{ +ros::message_operations::Printer< ::rosaria_msgs::RobotInfoMsg_ >::stream(s, "", v); +return s; +} + +} // namespace rosaria_msgs + +namespace ros +{ +namespace message_traits +{ + + + +// BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False} +// {'std_msgs': ['/opt/ros/hydro/share/std_msgs/cmake/../msg'], 'rosaria_msgs': ['/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg'], 'geometry_msgs': ['/opt/ros/hydro/share/geometry_msgs/cmake/../msg']} + +// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] + + + + +template +struct IsFixedSize< ::rosaria_msgs::RobotInfoMsg_ > + : TrueType + { }; + +template +struct IsFixedSize< ::rosaria_msgs::RobotInfoMsg_ const> + : TrueType + { }; + +template +struct IsMessage< ::rosaria_msgs::RobotInfoMsg_ > + : TrueType + { }; + +template +struct IsMessage< ::rosaria_msgs::RobotInfoMsg_ const> + : TrueType + { }; + +template +struct HasHeader< ::rosaria_msgs::RobotInfoMsg_ > + : FalseType + { }; + +template +struct HasHeader< ::rosaria_msgs::RobotInfoMsg_ const> + : FalseType + { }; + + +template +struct MD5Sum< ::rosaria_msgs::RobotInfoMsg_ > +{ + static const char* value() + { + return "fc20ec1228cc0538c3b1ee05e9614d34"; + } + + static const char* value(const ::rosaria_msgs::RobotInfoMsg_&) { return value(); } + static const uint64_t static_value1 = 0xfc20ec1228cc0538ULL; + static const uint64_t static_value2 = 0xc3b1ee05e9614d34ULL; +}; + +template +struct DataType< ::rosaria_msgs::RobotInfoMsg_ > +{ + static const char* value() + { + return "rosaria_msgs/RobotInfoMsg"; + } + + static const char* value(const ::rosaria_msgs::RobotInfoMsg_&) { return value(); } +}; + +template +struct Definition< ::rosaria_msgs::RobotInfoMsg_ > +{ + static const char* value() + { + return "std_msgs/UInt8 robot_id\n\ +std_msgs/Float64 battery_voltage\n\ +geometry_msgs/Twist twist\n\ +std_msgs/Bool state\n\ +std_msgs/Bool clutch\n\ +std_msgs/Bool obstacle_detected\n\ +================================================================================\n\ +MSG: std_msgs/UInt8\n\ +uint8 data\n\ +\n\ +================================================================================\n\ +MSG: std_msgs/Float64\n\ +float64 data\n\ +================================================================================\n\ +MSG: geometry_msgs/Twist\n\ +# This expresses velocity in free space broken into its linear and angular parts.\n\ +Vector3 linear\n\ +Vector3 angular\n\ +\n\ +================================================================================\n\ +MSG: geometry_msgs/Vector3\n\ +# This represents a vector in free space. \n\ +\n\ +float64 x\n\ +float64 y\n\ +float64 z\n\ +================================================================================\n\ +MSG: std_msgs/Bool\n\ +bool data\n\ +"; + } + + static const char* value(const ::rosaria_msgs::RobotInfoMsg_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::rosaria_msgs::RobotInfoMsg_ > + { + template inline static void allInOne(Stream& stream, T m) + { + stream.next(m.robot_id); + stream.next(m.battery_voltage); + stream.next(m.twist); + stream.next(m.state); + stream.next(m.clutch); + stream.next(m.obstacle_detected); + } + + ROS_DECLARE_ALLINONE_SERIALIZER; + }; // struct RobotInfoMsg_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::rosaria_msgs::RobotInfoMsg_ > +{ + template static void stream(Stream& s, const std::string& indent, const ::rosaria_msgs::RobotInfoMsg_& v) + { + s << indent << "robot_id: "; + s << std::endl; + Printer< ::std_msgs::UInt8_ >::stream(s, indent + " ", v.robot_id); + s << indent << "battery_voltage: "; + s << std::endl; + Printer< ::std_msgs::Float64_ >::stream(s, indent + " ", v.battery_voltage); + s << indent << "twist: "; + s << std::endl; + Printer< ::geometry_msgs::Twist_ >::stream(s, indent + " ", v.twist); + s << indent << "state: "; + s << std::endl; + Printer< ::std_msgs::Bool_ >::stream(s, indent + " ", v.state); + s << indent << "clutch: "; + s << std::endl; + Printer< ::std_msgs::Bool_ >::stream(s, indent + " ", v.clutch); + s << indent << "obstacle_detected: "; + s << std::endl; + Printer< ::std_msgs::Bool_ >::stream(s, indent + " ", v.obstacle_detected); + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // ROSARIA_MSGS_MESSAGE_ROBOTINFOMSG_H diff --git a/Legacy/ws_linux/devel/include/videostream/ip_get.h b/Legacy/ws_linux/devel/include/videostream/ip_get.h new file mode 100644 index 0000000..5a5b0a1 --- /dev/null +++ b/Legacy/ws_linux/devel/include/videostream/ip_get.h @@ -0,0 +1,156 @@ +/* Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Auto-generated by gensrv_cpp from file /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv + * + */ + + +#ifndef VIDEOSTREAM_MESSAGE_IP_GET_H +#define VIDEOSTREAM_MESSAGE_IP_GET_H + +#include + + +#include +#include + + +namespace videostream +{ + +struct ip_get +{ + +typedef ip_getRequest Request; +typedef ip_getResponse Response; +Request request; +Response response; + +typedef Request RequestType; +typedef Response ResponseType; + +}; // struct ip_get +} // namespace videostream + + +namespace ros +{ +namespace service_traits +{ + + +template<> +struct MD5Sum< ::videostream::ip_get > { + static const char* value() + { + return "994972b6e03928b2476860ce6c4c8e17"; + } + + static const char* value(const ::videostream::ip_get&) { return value(); } +}; + +template<> +struct DataType< ::videostream::ip_get > { + static const char* value() + { + return "videostream/ip_get"; + } + + static const char* value(const ::videostream::ip_get&) { return value(); } +}; + + +// service_traits::MD5Sum< ::videostream::ip_getRequest> should match +// service_traits::MD5Sum< ::videostream::ip_get > +template<> +struct MD5Sum< ::videostream::ip_getRequest> +{ + static const char* value() + { + return MD5Sum< ::videostream::ip_get >::value(); + } + static const char* value(const ::videostream::ip_getRequest&) + { + return value(); + } +}; + +// service_traits::DataType< ::videostream::ip_getRequest> should match +// service_traits::DataType< ::videostream::ip_get > +template<> +struct DataType< ::videostream::ip_getRequest> +{ + static const char* value() + { + return DataType< ::videostream::ip_get >::value(); + } + static const char* value(const ::videostream::ip_getRequest&) + { + return value(); + } +}; + +// service_traits::MD5Sum< ::videostream::ip_getResponse> should match +// service_traits::MD5Sum< ::videostream::ip_get > +template<> +struct MD5Sum< ::videostream::ip_getResponse> +{ + static const char* value() + { + return MD5Sum< ::videostream::ip_get >::value(); + } + static const char* value(const ::videostream::ip_getResponse&) + { + return value(); + } +}; + +// service_traits::DataType< ::videostream::ip_getResponse> should match +// service_traits::DataType< ::videostream::ip_get > +template<> +struct DataType< ::videostream::ip_getResponse> +{ + static const char* value() + { + return DataType< ::videostream::ip_get >::value(); + } + static const char* value(const ::videostream::ip_getResponse&) + { + return value(); + } +}; + +} // namespace service_traits +} // namespace ros + +#endif // VIDEOSTREAM_MESSAGE_IP_GET_H diff --git a/Legacy/ws_linux/devel/include/videostream/ip_getRequest.h b/Legacy/ws_linux/devel/include/videostream/ip_getRequest.h new file mode 100644 index 0000000..f0bd0bb --- /dev/null +++ b/Legacy/ws_linux/devel/include/videostream/ip_getRequest.h @@ -0,0 +1,219 @@ +/* Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Auto-generated by genmsg_cpp from file /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv + * + */ + + +#ifndef VIDEOSTREAM_MESSAGE_IP_GETREQUEST_H +#define VIDEOSTREAM_MESSAGE_IP_GETREQUEST_H + + +#include +#include +#include + +#include +#include +#include +#include + + +namespace videostream +{ +template +struct ip_getRequest_ +{ + typedef ip_getRequest_ Type; + + ip_getRequest_() + : str() { + } + ip_getRequest_(const ContainerAllocator& _alloc) + : str(_alloc) { + } + + + + typedef std::basic_string, typename ContainerAllocator::template rebind::other > _str_type; + _str_type str; + + + + + typedef boost::shared_ptr< ::videostream::ip_getRequest_ > Ptr; + typedef boost::shared_ptr< ::videostream::ip_getRequest_ const> ConstPtr; + boost::shared_ptr > __connection_header; + +}; // struct ip_getRequest_ + +typedef ::videostream::ip_getRequest_ > ip_getRequest; + +typedef boost::shared_ptr< ::videostream::ip_getRequest > ip_getRequestPtr; +typedef boost::shared_ptr< ::videostream::ip_getRequest const> ip_getRequestConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::videostream::ip_getRequest_ & v) +{ +ros::message_operations::Printer< ::videostream::ip_getRequest_ >::stream(s, "", v); +return s; +} + +} // namespace videostream + +namespace ros +{ +namespace message_traits +{ + + + +// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': False} +// {'std_msgs': ['/opt/ros/hydro/share/std_msgs/cmake/../msg']} + +// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] + + + + +template +struct IsFixedSize< ::videostream::ip_getRequest_ > + : FalseType + { }; + +template +struct IsFixedSize< ::videostream::ip_getRequest_ const> + : FalseType + { }; + +template +struct IsMessage< ::videostream::ip_getRequest_ > + : TrueType + { }; + +template +struct IsMessage< ::videostream::ip_getRequest_ const> + : TrueType + { }; + +template +struct HasHeader< ::videostream::ip_getRequest_ > + : FalseType + { }; + +template +struct HasHeader< ::videostream::ip_getRequest_ const> + : FalseType + { }; + + +template +struct MD5Sum< ::videostream::ip_getRequest_ > +{ + static const char* value() + { + return "994972b6e03928b2476860ce6c4c8e17"; + } + + static const char* value(const ::videostream::ip_getRequest_&) { return value(); } + static const uint64_t static_value1 = 0x994972b6e03928b2ULL; + static const uint64_t static_value2 = 0x476860ce6c4c8e17ULL; +}; + +template +struct DataType< ::videostream::ip_getRequest_ > +{ + static const char* value() + { + return "videostream/ip_getRequest"; + } + + static const char* value(const ::videostream::ip_getRequest_&) { return value(); } +}; + +template +struct Definition< ::videostream::ip_getRequest_ > +{ + static const char* value() + { + return "string str\n\ +"; + } + + static const char* value(const ::videostream::ip_getRequest_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::videostream::ip_getRequest_ > + { + template inline static void allInOne(Stream& stream, T m) + { + stream.next(m.str); + } + + ROS_DECLARE_ALLINONE_SERIALIZER; + }; // struct ip_getRequest_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::videostream::ip_getRequest_ > +{ + template static void stream(Stream& s, const std::string& indent, const ::videostream::ip_getRequest_& v) + { + s << indent << "str: "; + Printer, typename ContainerAllocator::template rebind::other > >::stream(s, indent + " ", v.str); + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // VIDEOSTREAM_MESSAGE_IP_GETREQUEST_H diff --git a/Legacy/ws_linux/devel/include/videostream/ip_getResponse.h b/Legacy/ws_linux/devel/include/videostream/ip_getResponse.h new file mode 100644 index 0000000..24a5965 --- /dev/null +++ b/Legacy/ws_linux/devel/include/videostream/ip_getResponse.h @@ -0,0 +1,211 @@ +/* Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Auto-generated by genmsg_cpp from file /home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv + * + */ + + +#ifndef VIDEOSTREAM_MESSAGE_IP_GETRESPONSE_H +#define VIDEOSTREAM_MESSAGE_IP_GETRESPONSE_H + + +#include +#include +#include + +#include +#include +#include +#include + + +namespace videostream +{ +template +struct ip_getResponse_ +{ + typedef ip_getResponse_ Type; + + ip_getResponse_() + { + } + ip_getResponse_(const ContainerAllocator& _alloc) + { + } + + + + + + + typedef boost::shared_ptr< ::videostream::ip_getResponse_ > Ptr; + typedef boost::shared_ptr< ::videostream::ip_getResponse_ const> ConstPtr; + boost::shared_ptr > __connection_header; + +}; // struct ip_getResponse_ + +typedef ::videostream::ip_getResponse_ > ip_getResponse; + +typedef boost::shared_ptr< ::videostream::ip_getResponse > ip_getResponsePtr; +typedef boost::shared_ptr< ::videostream::ip_getResponse const> ip_getResponseConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::videostream::ip_getResponse_ & v) +{ +ros::message_operations::Printer< ::videostream::ip_getResponse_ >::stream(s, "", v); +return s; +} + +} // namespace videostream + +namespace ros +{ +namespace message_traits +{ + + + +// BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False} +// {'std_msgs': ['/opt/ros/hydro/share/std_msgs/cmake/../msg']} + +// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] + + + + +template +struct IsFixedSize< ::videostream::ip_getResponse_ > + : TrueType + { }; + +template +struct IsFixedSize< ::videostream::ip_getResponse_ const> + : TrueType + { }; + +template +struct IsMessage< ::videostream::ip_getResponse_ > + : TrueType + { }; + +template +struct IsMessage< ::videostream::ip_getResponse_ const> + : TrueType + { }; + +template +struct HasHeader< ::videostream::ip_getResponse_ > + : FalseType + { }; + +template +struct HasHeader< ::videostream::ip_getResponse_ const> + : FalseType + { }; + + +template +struct MD5Sum< ::videostream::ip_getResponse_ > +{ + static const char* value() + { + return "d41d8cd98f00b204e9800998ecf8427e"; + } + + static const char* value(const ::videostream::ip_getResponse_&) { return value(); } + static const uint64_t static_value1 = 0xd41d8cd98f00b204ULL; + static const uint64_t static_value2 = 0xe9800998ecf8427eULL; +}; + +template +struct DataType< ::videostream::ip_getResponse_ > +{ + static const char* value() + { + return "videostream/ip_getResponse"; + } + + static const char* value(const ::videostream::ip_getResponse_&) { return value(); } +}; + +template +struct Definition< ::videostream::ip_getResponse_ > +{ + static const char* value() + { + return "\n\ +"; + } + + static const char* value(const ::videostream::ip_getResponse_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::videostream::ip_getResponse_ > + { + template inline static void allInOne(Stream&, T) + {} + + ROS_DECLARE_ALLINONE_SERIALIZER; + }; // struct ip_getResponse_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::videostream::ip_getResponse_ > +{ + template static void stream(Stream&, const std::string&, const ::videostream::ip_getResponse_&) + {} +}; + +} // namespace message_operations +} // namespace ros + +#endif // VIDEOSTREAM_MESSAGE_IP_GETRESPONSE_H diff --git a/Legacy/ws_linux/devel/lib/pkgconfig/rosaria.pc b/Legacy/ws_linux/devel/lib/pkgconfig/rosaria.pc new file mode 100644 index 0000000..61e1551 --- /dev/null +++ b/Legacy/ws_linux/devel/lib/pkgconfig/rosaria.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/devel + +Name: rosaria +Description: Description of rosaria +Version: 0.9.0 +Cflags: -I/home/lab1_5/ws/ws_linux/devel/include +Libs: -L/home/lab1_5/ws/ws_linux/devel/lib +Requires: roscpp nav_msgs geometry_msgs sensor_msgs tf diff --git a/Legacy/ws_linux/devel/lib/pkgconfig/rosaria_msgs.pc b/Legacy/ws_linux/devel/lib/pkgconfig/rosaria_msgs.pc new file mode 100644 index 0000000..68a54f6 --- /dev/null +++ b/Legacy/ws_linux/devel/lib/pkgconfig/rosaria_msgs.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/devel + +Name: rosaria_msgs +Description: Description of rosaria_msgs +Version: 0.0.0 +Cflags: -I/home/lab1_5/ws/ws_linux/devel/include +Libs: -L/home/lab1_5/ws/ws_linux/devel/lib +Requires: message_runtime diff --git a/Legacy/ws_linux/devel/lib/pkgconfig/safety.pc b/Legacy/ws_linux/devel/lib/pkgconfig/safety.pc new file mode 100644 index 0000000..f63ab1e --- /dev/null +++ b/Legacy/ws_linux/devel/lib/pkgconfig/safety.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/devel + +Name: safety +Description: Description of safety +Version: 0.2.1 +Cflags: +Libs: -L/home/lab1_5/ws/ws_linux/devel/lib -lsafety +Requires: message_runtime roscpp rospy std_msgs rosaria diff --git a/Legacy/ws_linux/devel/lib/pkgconfig/videostream.pc b/Legacy/ws_linux/devel/lib/pkgconfig/videostream.pc new file mode 100644 index 0000000..4e957e2 --- /dev/null +++ b/Legacy/ws_linux/devel/lib/pkgconfig/videostream.pc @@ -0,0 +1,8 @@ +prefix=/home/lab1_5/ws/ws_linux/devel + +Name: videostream +Description: Description of videostream +Version: 0.0.0 +Cflags: -I/home/lab1_5/ws/ws_linux/devel/include -I/home/lab1_5/ws/ws_linux/src/videostream/include +Libs: -L/home/lab1_5/ws/ws_linux/devel/lib -lvideostream +Requires: message_runtime roscpp rospy std_msgs diff --git a/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/__init__.py b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py new file mode 100644 index 0000000..206824b --- /dev/null +++ b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/RosAriaConfig.py @@ -0,0 +1,70 @@ +## ********************************************************* +## +## File autogenerated for the rosaria package +## by the dynamic_reconfigure package. +## Please do not edit. +## +## ********************************************************/ + +##********************************************************** +## Software License Agreement (BSD License) +## +## Copyright (c) 2008, Willow Garage, Inc. +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions +## are met: +## +## * Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## * Redistributions in binary form must reproduce the above +## copyright notice, this list of conditions and the following +## disclaimer in the documentation and/or other materials provided +## with the distribution. +## * Neither the name of the Willow Garage nor the names of its +## contributors may be used to endorse or promote products derived +## from this software without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +## FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +## COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +## BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +## CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +## ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +## POSSIBILITY OF SUCH DAMAGE. +##**********************************************************/ + +from dynamic_reconfigure.encoding import extract_params + +inf = float('inf') + +config_description = {'upper': 'DEFAULT', 'lower': 'groups', 'srcline': 233, 'name': 'Default', 'parent': 0, 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'cstate': 'true', 'parentname': 'Default', 'class': 'DEFAULT', 'field': 'default', 'state': True, 'parentclass': '', 'groups': [], 'parameters': [{'srcline': 262, 'description': 'Translational acceleration (m/s^2)', 'max': 'std::numeric_limits::infinity()', 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'trans_accel', 'edit_method': '', 'default': 0, 'level': 0, 'min': '-std::numeric_limits::infinity()', 'type': 'double'}, {'srcline': 262, 'description': 'Translational deceleration (m/s^2)', 'max': 'std::numeric_limits::infinity()', 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'trans_decel', 'edit_method': '', 'default': 0, 'level': 0, 'min': '-std::numeric_limits::infinity()', 'type': 'double'}, {'srcline': 262, 'description': 'Lateral acceleration (m/s^2)', 'max': 'std::numeric_limits::infinity()', 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'lat_accel', 'edit_method': '', 'default': 0, 'level': 0, 'min': '-std::numeric_limits::infinity()', 'type': 'double'}, {'srcline': 262, 'description': 'Lateral deceleration (m/s^2)', 'max': 'std::numeric_limits::infinity()', 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'lat_decel', 'edit_method': '', 'default': 0, 'level': 0, 'min': '-std::numeric_limits::infinity()', 'type': 'double'}, {'srcline': 262, 'description': 'Rotational acceleration (rad/s^2)', 'max': 'std::numeric_limits::infinity()', 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'rot_accel', 'edit_method': '', 'default': 0, 'level': 0, 'min': '-std::numeric_limits::infinity()', 'type': 'double'}, {'srcline': 262, 'description': 'Rotational deceleration (rad/s^2)', 'max': 'std::numeric_limits::infinity()', 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'rot_decel', 'edit_method': '', 'default': 0, 'level': 0, 'min': '-std::numeric_limits::infinity()', 'type': 'double'}, {'srcline': 262, 'description': 'Encoder ticks/mm', 'max': 2147483647, 'cconsttype': 'const int', 'ctype': 'int', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'TicksMM', 'edit_method': '', 'default': 0, 'level': 0, 'min': -2147483648, 'type': 'int'}, {'srcline': 262, 'description': 'Value in 1/8192 increments to be added or subtracted from the left encoder ticks in order to compensate for tire differences.', 'max': 2147483647, 'cconsttype': 'const int', 'ctype': 'int', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'DriftFactor', 'edit_method': '', 'default': 0, 'level': 0, 'min': -2147483648, 'type': 'int'}, {'srcline': 262, 'description': 'The number of differential encoder ticks for a 180-degree revolution of the robot.', 'max': 2147483647, 'cconsttype': 'const int', 'ctype': 'int', 'srcfile': '/opt/ros/hydro/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'RevCount', 'edit_method': '', 'default': 0, 'level': 0, 'min': -2147483648, 'type': 'int'}], 'type': '', 'id': 0} + +min = {} +max = {} +defaults = {} +level = {} +type = {} +all_level = 0 + +#def extract_params(config): +# params = [] +# params.extend(config['parameters']) +# for group in config['groups']: +# params.extend(extract_params(group)) +# return params + +for param in extract_params(config_description): + min[param['name']] = param['min'] + max[param['name']] = param['max'] + defaults[param['name']] = param['default'] + level[param['name']] = param['level'] + type[param['name']] = param['type'] + all_level = all_level | param['level'] + diff --git a/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/__init__.py b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/cfg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py new file mode 100644 index 0000000..1f92eb0 --- /dev/null +++ b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria/msg/_BumperState.py @@ -0,0 +1,211 @@ +"""autogenerated by genpy from rosaria/BumperState.msg. Do not edit.""" +import sys +python3 = True if sys.hexversion > 0x03000000 else False +import genpy +import struct + +import std_msgs.msg + +class BumperState(genpy.Message): + _md5sum = "f81947761ff7e166a3bbaf937b9869b5" + _type = "rosaria/BumperState" + _has_header = True #flag to mark the presence of a Header object + _full_text = """Header header +bool[] front_bumpers +bool[] rear_bumpers + +================================================================================ +MSG: std_msgs/Header +# Standard metadata for higher-level stamped data types. +# This is generally used to communicate timestamped data +# in a particular coordinate frame. +# +# sequence ID: consecutively increasing ID +uint32 seq +#Two-integer timestamp that is expressed as: +# * stamp.secs: seconds (stamp_secs) since epoch +# * stamp.nsecs: nanoseconds since stamp_secs +# time-handling sugar is provided by the client library +time stamp +#Frame this data is associated with +# 0: no frame +# 1: global frame +string frame_id + +""" + __slots__ = ['header','front_bumpers','rear_bumpers'] + _slot_types = ['std_msgs/Header','bool[]','bool[]'] + + def __init__(self, *args, **kwds): + """ + Constructor. Any message fields that are implicitly/explicitly + set to None will be assigned a default value. The recommend + use is keyword arguments as this is more robust to future message + changes. You cannot mix in-order arguments and keyword arguments. + + The available fields are: + header,front_bumpers,rear_bumpers + + :param args: complete set of field values, in .msg order + :param kwds: use keyword arguments corresponding to message field names + to set specific fields. + """ + if args or kwds: + super(BumperState, self).__init__(*args, **kwds) + #message fields cannot be None, assign default values for those that are + if self.header is None: + self.header = std_msgs.msg.Header() + if self.front_bumpers is None: + self.front_bumpers = [] + if self.rear_bumpers is None: + self.rear_bumpers = [] + else: + self.header = std_msgs.msg.Header() + self.front_bumpers = [] + self.rear_bumpers = [] + + def _get_types(self): + """ + internal API method + """ + return self._slot_types + + def serialize(self, buff): + """ + serialize message into buffer + :param buff: buffer, ``StringIO`` + """ + try: + _x = self + buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) + _x = self.header.frame_id + length = len(_x) + if python3 or type(_x) == unicode: + _x = _x.encode('utf-8') + length = len(_x) + buff.write(struct.pack(' 0x03000000 else False +import genpy +import struct + +import std_msgs.msg + +class RestrictionsMsg(genpy.Message): + _md5sum = "c2466ab186049d2506624976271d3b3e" + _type = "rosaria_msgs/RestrictionsMsg" + _has_header = False #flag to mark the presence of a Header object + _full_text = """std_msgs/Float64 distance +std_msgs/Float64 linear_velocity +std_msgs/Float64 angular_velocity +================================================================================ +MSG: std_msgs/Float64 +float64 data +""" + __slots__ = ['distance','linear_velocity','angular_velocity'] + _slot_types = ['std_msgs/Float64','std_msgs/Float64','std_msgs/Float64'] + + def __init__(self, *args, **kwds): + """ + Constructor. Any message fields that are implicitly/explicitly + set to None will be assigned a default value. The recommend + use is keyword arguments as this is more robust to future message + changes. You cannot mix in-order arguments and keyword arguments. + + The available fields are: + distance,linear_velocity,angular_velocity + + :param args: complete set of field values, in .msg order + :param kwds: use keyword arguments corresponding to message field names + to set specific fields. + """ + if args or kwds: + super(RestrictionsMsg, self).__init__(*args, **kwds) + #message fields cannot be None, assign default values for those that are + if self.distance is None: + self.distance = std_msgs.msg.Float64() + if self.linear_velocity is None: + self.linear_velocity = std_msgs.msg.Float64() + if self.angular_velocity is None: + self.angular_velocity = std_msgs.msg.Float64() + else: + self.distance = std_msgs.msg.Float64() + self.linear_velocity = std_msgs.msg.Float64() + self.angular_velocity = std_msgs.msg.Float64() + + def _get_types(self): + """ + internal API method + """ + return self._slot_types + + def serialize(self, buff): + """ + serialize message into buffer + :param buff: buffer, ``StringIO`` + """ + try: + _x = self + buff.write(_struct_3d.pack(_x.distance.data, _x.linear_velocity.data, _x.angular_velocity.data)) + except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x)))) + except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x)))) + + def deserialize(self, str): + """ + unpack serialized message in str into this message instance + :param str: byte array of serialized message, ``str`` + """ + try: + if self.distance is None: + self.distance = std_msgs.msg.Float64() + if self.linear_velocity is None: + self.linear_velocity = std_msgs.msg.Float64() + if self.angular_velocity is None: + self.angular_velocity = std_msgs.msg.Float64() + end = 0 + _x = self + start = end + end += 24 + (_x.distance.data, _x.linear_velocity.data, _x.angular_velocity.data,) = _struct_3d.unpack(str[start:end]) + return self + except struct.error as e: + raise genpy.DeserializationError(e) #most likely buffer underfill + + + def serialize_numpy(self, buff, numpy): + """ + serialize message with numpy array types into buffer + :param buff: buffer, ``StringIO`` + :param numpy: numpy python module + """ + try: + _x = self + buff.write(_struct_3d.pack(_x.distance.data, _x.linear_velocity.data, _x.angular_velocity.data)) + except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x)))) + except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x)))) + + def deserialize_numpy(self, str, numpy): + """ + unpack serialized message in str into this message instance using numpy for array types + :param str: byte array of serialized message, ``str`` + :param numpy: numpy python module + """ + try: + if self.distance is None: + self.distance = std_msgs.msg.Float64() + if self.linear_velocity is None: + self.linear_velocity = std_msgs.msg.Float64() + if self.angular_velocity is None: + self.angular_velocity = std_msgs.msg.Float64() + end = 0 + _x = self + start = end + end += 24 + (_x.distance.data, _x.linear_velocity.data, _x.angular_velocity.data,) = _struct_3d.unpack(str[start:end]) + return self + except struct.error as e: + raise genpy.DeserializationError(e) #most likely buffer underfill + +_struct_I = genpy.struct_I +_struct_3d = struct.Struct("<3d") diff --git a/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.pyc b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.pyc new file mode 100644 index 0000000..dea68b1 Binary files /dev/null and b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RestrictionsMsg.pyc differ diff --git a/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py new file mode 100644 index 0000000..c9fbf32 --- /dev/null +++ b/Legacy/ws_linux/devel/lib/python2.7/dist-packages/rosaria_msgs/msg/_RobotInfoMsg.py @@ -0,0 +1,176 @@ +"""autogenerated by genpy from rosaria_msgs/RobotInfoMsg.msg. Do not edit.""" +import sys +python3 = True if sys.hexversion > 0x03000000 else False +import genpy +import struct + +import geometry_msgs.msg +import std_msgs.msg + +class RobotInfoMsg(genpy.Message): + _md5sum = "fc20ec1228cc0538c3b1ee05e9614d34" + _type = "rosaria_msgs/RobotInfoMsg" + _has_header = False #flag to mark the presence of a Header object + _full_text = """std_msgs/UInt8 robot_id +std_msgs/Float64 battery_voltage +geometry_msgs/Twist twist +std_msgs/Bool state +std_msgs/Bool clutch +std_msgs/Bool obstacle_detected +================================================================================ +MSG: std_msgs/UInt8 +uint8 data + +================================================================================ +MSG: std_msgs/Float64 +float64 data +================================================================================ +MSG: geometry_msgs/Twist +# This expresses velocity in free space broken into its linear and angular parts. +Vector3 linear +Vector3 angular + +================================================================================ +MSG: geometry_msgs/Vector3 +# This represents a vector in free space. + +float64 x +float64 y +float64 z +================================================================================ +MSG: std_msgs/Bool +bool data +""" + __slots__ = ['robot_id','battery_voltage','twist','state','clutch','obstacle_detected'] + _slot_types = ['std_msgs/UInt8','std_msgs/Float64','geometry_msgs/Twist','std_msgs/Bool','std_msgs/Bool','std_msgs/Bool'] + + def __init__(self, *args, **kwds): + """ + Constructor. Any message fields that are implicitly/explicitly + set to None will be assigned a default value. The recommend + use is keyword arguments as this is more robust to future message + changes. You cannot mix in-order arguments and keyword arguments. + + The available fields are: + robot_id,battery_voltage,twist,state,clutch,obstacle_detected + + :param args: complete set of field values, in .msg order + :param kwds: use keyword arguments corresponding to message field names + to set specific fields. + """ + if args or kwds: + super(RobotInfoMsg, self).__init__(*args, **kwds) + #message fields cannot be None, assign default values for those that are + if self.robot_id is None: + self.robot_id = std_msgs.msg.UInt8() + if self.battery_voltage is None: + self.battery_voltage = std_msgs.msg.Float64() + if self.twist is None: + self.twist = geometry_msgs.msg.Twist() + if self.state is None: + self.state = std_msgs.msg.Bool() + if self.clutch is None: + self.clutch = std_msgs.msg.Bool() + if self.obstacle_detected is None: + self.obstacle_detected = std_msgs.msg.Bool() + else: + self.robot_id = std_msgs.msg.UInt8() + self.battery_voltage = std_msgs.msg.Float64() + self.twist = geometry_msgs.msg.Twist() + self.state = std_msgs.msg.Bool() + self.clutch = std_msgs.msg.Bool() + self.obstacle_detected = std_msgs.msg.Bool() + + def _get_types(self): + """ + internal API method + """ + return self._slot_types + + def serialize(self, buff): + """ + serialize message into buffer + :param buff: buffer, ``StringIO`` + """ + try: + _x = self + buff.write(_struct_B7d3B.pack(_x.robot_id.data, _x.battery_voltage.data, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.state.data, _x.clutch.data, _x.obstacle_detected.data)) + except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x)))) + except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x)))) + + def deserialize(self, str): + """ + unpack serialized message in str into this message instance + :param str: byte array of serialized message, ``str`` + """ + try: + if self.robot_id is None: + self.robot_id = std_msgs.msg.UInt8() + if self.battery_voltage is None: + self.battery_voltage = std_msgs.msg.Float64() + if self.twist is None: + self.twist = geometry_msgs.msg.Twist() + if self.state is None: + self.state = std_msgs.msg.Bool() + if self.clutch is None: + self.clutch = std_msgs.msg.Bool() + if self.obstacle_detected is None: + self.obstacle_detected = std_msgs.msg.Bool() + end = 0 + _x = self + start = end + end += 60 + (_x.robot_id.data, _x.battery_voltage.data, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.state.data, _x.clutch.data, _x.obstacle_detected.data,) = _struct_B7d3B.unpack(str[start:end]) + self.state.data = bool(self.state.data) + self.clutch.data = bool(self.clutch.data) + self.obstacle_detected.data = bool(self.obstacle_detected.data) + return self + except struct.error as e: + raise genpy.DeserializationError(e) #most likely buffer underfill + + + def serialize_numpy(self, buff, numpy): + """ + serialize message with numpy array types into buffer + :param buff: buffer, ``StringIO`` + :param numpy: numpy python module + """ + try: + _x = self + buff.write(_struct_B7d3B.pack(_x.robot_id.data, _x.battery_voltage.data, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.state.data, _x.clutch.data, _x.obstacle_detected.data)) + except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x)))) + except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x)))) + + def deserialize_numpy(self, str, numpy): + """ + unpack serialized message in str into this message instance using numpy for array types + :param str: byte array of serialized message, ``str`` + :param numpy: numpy python module + """ + try: + if self.robot_id is None: + self.robot_id = std_msgs.msg.UInt8() + if self.battery_voltage is None: + self.battery_voltage = std_msgs.msg.Float64() + if self.twist is None: + self.twist = geometry_msgs.msg.Twist() + if self.state is None: + self.state = std_msgs.msg.Bool() + if self.clutch is None: + self.clutch = std_msgs.msg.Bool() + if self.obstacle_detected is None: + self.obstacle_detected = std_msgs.msg.Bool() + end = 0 + _x = self + start = end + end += 60 + (_x.robot_id.data, _x.battery_voltage.data, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.state.data, _x.clutch.data, _x.obstacle_detected.data,) = _struct_B7d3B.unpack(str[start:end]) + self.state.data = bool(self.state.data) + self.clutch.data = bool(self.clutch.data) + self.obstacle_detected.data = bool(self.obstacle_detected.data) + return self + except struct.error as e: + raise genpy.DeserializationError(e) #most likely buffer underfill + +_struct_I = genpy.struct_I +_struct_B7d3B = struct.Struct(" 0x03000000 else False +import genpy +import struct + + +class ip_getRequest(genpy.Message): + _md5sum = "994972b6e03928b2476860ce6c4c8e17" + _type = "videostream/ip_getRequest" + _has_header = False #flag to mark the presence of a Header object + _full_text = """string str + +""" + __slots__ = ['str'] + _slot_types = ['string'] + + def __init__(self, *args, **kwds): + """ + Constructor. Any message fields that are implicitly/explicitly + set to None will be assigned a default value. The recommend + use is keyword arguments as this is more robust to future message + changes. You cannot mix in-order arguments and keyword arguments. + + The available fields are: + str + + :param args: complete set of field values, in .msg order + :param kwds: use keyword arguments corresponding to message field names + to set specific fields. + """ + if args or kwds: + super(ip_getRequest, self).__init__(*args, **kwds) + #message fields cannot be None, assign default values for those that are + if self.str is None: + self.str = '' + else: + self.str = '' + + def _get_types(self): + """ + internal API method + """ + return self._slot_types + + def serialize(self, buff): + """ + serialize message into buffer + :param buff: buffer, ``StringIO`` + """ + try: + _x = self.str + length = len(_x) + if python3 or type(_x) == unicode: + _x = _x.encode('utf-8') + length = len(_x) + buff.write(struct.pack(' 0x03000000 else False +import genpy +import struct + + +class ip_getResponse(genpy.Message): + _md5sum = "d41d8cd98f00b204e9800998ecf8427e" + _type = "videostream/ip_getResponse" + _has_header = False #flag to mark the presence of a Header object + _full_text = """ + +""" + __slots__ = [] + _slot_types = [] + + def __init__(self, *args, **kwds): + """ + Constructor. Any message fields that are implicitly/explicitly + set to None will be assigned a default value. The recommend + use is keyword arguments as this is more robust to future message + changes. You cannot mix in-order arguments and keyword arguments. + + The available fields are: + + + :param args: complete set of field values, in .msg order + :param kwds: use keyword arguments corresponding to message field names + to set specific fields. + """ + if args or kwds: + super(ip_getResponse, self).__init__(*args, **kwds) + + def _get_types(self): + """ + internal API method + """ + return self._slot_types + + def serialize(self, buff): + """ + serialize message into buffer + :param buff: buffer, ``StringIO`` + """ + try: + pass + except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x)))) + except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x)))) + + def deserialize(self, str): + """ + unpack serialized message in str into this message instance + :param str: byte array of serialized message, ``str`` + """ + try: + end = 0 + return self + except struct.error as e: + raise genpy.DeserializationError(e) #most likely buffer underfill + + + def serialize_numpy(self, buff, numpy): + """ + serialize message with numpy array types into buffer + :param buff: buffer, ``StringIO`` + :param numpy: numpy python module + """ + try: + pass + except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x)))) + except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x)))) + + def deserialize_numpy(self, str, numpy): + """ + unpack serialized message in str into this message instance using numpy for array types + :param str: byte array of serialized message, ``str`` + :param numpy: numpy python module + """ + try: + end = 0 + return self + except struct.error as e: + raise genpy.DeserializationError(e) #most likely buffer underfill + +_struct_I = genpy.struct_I +class ip_get(object): + _type = 'videostream/ip_get' + _md5sum = '994972b6e03928b2476860ce6c4c8e17' + _request_class = ip_getRequest + _response_class = ip_getResponse diff --git a/Legacy/ws_linux/devel/lib/rosaria/RosAria b/Legacy/ws_linux/devel/lib/rosaria/RosAria new file mode 100755 index 0000000..38aa4bd Binary files /dev/null and b/Legacy/ws_linux/devel/lib/rosaria/RosAria differ diff --git a/Legacy/ws_linux/devel/lib/safety/cloud_reader b/Legacy/ws_linux/devel/lib/safety/cloud_reader new file mode 100755 index 0000000..352c53b Binary files /dev/null and b/Legacy/ws_linux/devel/lib/safety/cloud_reader differ diff --git a/Legacy/ws_linux/devel/lib/videostream/videostream b/Legacy/ws_linux/devel/lib/videostream/videostream new file mode 100755 index 0000000..cc2afdf Binary files /dev/null and b/Legacy/ws_linux/devel/lib/videostream/videostream differ diff --git a/Legacy/ws_linux/devel/setup.bash b/Legacy/ws_linux/devel/setup.bash new file mode 100644 index 0000000..ff47af8 --- /dev/null +++ b/Legacy/ws_linux/devel/setup.bash @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# generated from catkin/cmake/templates/setup.bash.in + +CATKIN_SHELL=bash + +# source setup.sh from same directory as this file +_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) +. "$_CATKIN_SETUP_DIR/setup.sh" diff --git a/Legacy/ws_linux/devel/setup.sh b/Legacy/ws_linux/devel/setup.sh new file mode 100644 index 0000000..01ce9a7 --- /dev/null +++ b/Legacy/ws_linux/devel/setup.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env sh +# generated from catkin/cmake/template/setup.sh.in + +# Sets various environment variables and sources additional environment hooks. +# It tries it's best to undo changes from a previously sourced setup file before. +# Supported command line options: +# --extend: skips the undoing of changes from a previously sourced setup file + +# since this file is sourced either use the provided _CATKIN_SETUP_DIR +# or fall back to the destination set at configure time +: ${_CATKIN_SETUP_DIR:=/home/lab1_5/ws/ws_linux/devel} +_SETUP_UTIL="$_CATKIN_SETUP_DIR/_setup_util.py" +unset _CATKIN_SETUP_DIR + +if [ ! -f "$_SETUP_UTIL" ]; then + echo "Missing Python script: $_SETUP_UTIL" + return 22 +fi + +# detect if running on Darwin platform +_UNAME=`uname -s` +_IS_DARWIN=0 +if [ "$_UNAME" = "Darwin" ]; then + _IS_DARWIN=1 +fi +unset _UNAME + +# make sure to export all environment variables +export CMAKE_PREFIX_PATH +export CPATH +if [ $_IS_DARWIN -eq 0 ]; then + export LD_LIBRARY_PATH +else + export DYLD_LIBRARY_PATH +fi +unset _IS_DARWIN +export PATH +export PKG_CONFIG_PATH +export PYTHONPATH + +# remember type of shell if not already set +if [ -z "$CATKIN_SHELL" ]; then + CATKIN_SHELL=sh +fi + +# invoke Python script to generate necessary exports of environment variables +_SETUP_TMP=`mktemp /tmp/setup.sh.XXXXXXXXXX` +if [ $? -ne 0 -o ! -f "$_SETUP_TMP" ]; then + echo "Could not create temporary file: $_SETUP_TMP" + return 1 +fi +CATKIN_SHELL=$CATKIN_SHELL "$_SETUP_UTIL" $@ > $_SETUP_TMP +_RC=$? +if [ $_RC -ne 0 ]; then + if [ $_RC -eq 2 ]; then + echo "Could not write the output of '$_SETUP_UTIL' to temporary file '$_SETUP_TMP': may be the disk if full?" + else + echo "Failed to run '\"$_SETUP_UTIL\" $@': return code $_RC" + fi + unset _RC + unset _SETUP_UTIL + rm -f $_SETUP_TMP + unset _SETUP_TMP + return 1 +fi +unset _RC +unset _SETUP_UTIL +. $_SETUP_TMP +rm -f $_SETUP_TMP +unset _SETUP_TMP + +# source all environment hooks +_i=0 +while [ $_i -lt $_CATKIN_ENVIRONMENT_HOOKS_COUNT ]; do + eval _envfile=\$_CATKIN_ENVIRONMENT_HOOKS_$_i + unset _CATKIN_ENVIRONMENT_HOOKS_$_i + eval _envfile_workspace=\$_CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE + unset _CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE + # set workspace for environment hook + CATKIN_ENV_HOOK_WORKSPACE=$_envfile_workspace + . "$_envfile" + unset CATKIN_ENV_HOOK_WORKSPACE + _i=$((_i + 1)) +done +unset _i + +unset _CATKIN_ENVIRONMENT_HOOKS_COUNT diff --git a/Legacy/ws_linux/devel/setup.zsh b/Legacy/ws_linux/devel/setup.zsh new file mode 100644 index 0000000..b660717 --- /dev/null +++ b/Legacy/ws_linux/devel/setup.zsh @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh +# generated from catkin/cmake/templates/setup.zsh.in + +CATKIN_SHELL=zsh +_CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) +emulate sh # emulate POSIX +. "$_CATKIN_SETUP_DIR/setup.sh" +emulate zsh # back to zsh mode diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp new file mode 100644 index 0000000..bd604e1 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/BumperState.lisp @@ -0,0 +1,120 @@ +; Auto-generated. Do not edit! + + +(cl:in-package rosaria-msg) + + +;//! \htmlinclude BumperState.msg.html + +(cl:defclass (roslisp-msg-protocol:ros-message) + ((header + :reader header + :initarg :header + :type std_msgs-msg:Header + :initform (cl:make-instance 'std_msgs-msg:Header)) + (front_bumpers + :reader front_bumpers + :initarg :front_bumpers + :type (cl:vector cl:boolean) + :initform (cl:make-array 0 :element-type 'cl:boolean :initial-element cl:nil)) + (rear_bumpers + :reader rear_bumpers + :initarg :rear_bumpers + :type (cl:vector cl:boolean) + :initform (cl:make-array 0 :element-type 'cl:boolean :initial-element cl:nil))) +) + +(cl:defclass BumperState () + ()) + +(cl:defmethod cl:initialize-instance :after ((m ) cl:&rest args) + (cl:declare (cl:ignorable args)) + (cl:unless (cl:typep m 'BumperState) + (roslisp-msg-protocol:msg-deprecation-warning "using old message class name rosaria-msg: is deprecated: use rosaria-msg:BumperState instead."))) + +(cl:ensure-generic-function 'header-val :lambda-list '(m)) +(cl:defmethod header-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria-msg:header-val is deprecated. Use rosaria-msg:header instead.") + (header m)) + +(cl:ensure-generic-function 'front_bumpers-val :lambda-list '(m)) +(cl:defmethod front_bumpers-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria-msg:front_bumpers-val is deprecated. Use rosaria-msg:front_bumpers instead.") + (front_bumpers m)) + +(cl:ensure-generic-function 'rear_bumpers-val :lambda-list '(m)) +(cl:defmethod rear_bumpers-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria-msg:rear_bumpers-val is deprecated. Use rosaria-msg:rear_bumpers instead.") + (rear_bumpers m)) +(cl:defmethod roslisp-msg-protocol:serialize ((msg ) ostream) + "Serializes a message object of type '" + (roslisp-msg-protocol:serialize (cl:slot-value msg 'header) ostream) + (cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'front_bumpers)))) + (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_arr_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_arr_len) ostream)) + (cl:map cl:nil #'(cl:lambda (ele) (cl:write-byte (cl:ldb (cl:byte 8 0) (cl:if ele 1 0)) ostream)) + (cl:slot-value msg 'front_bumpers)) + (cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'rear_bumpers)))) + (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_arr_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_arr_len) ostream)) + (cl:map cl:nil #'(cl:lambda (ele) (cl:write-byte (cl:ldb (cl:byte 8 0) (cl:if ele 1 0)) ostream)) + (cl:slot-value msg 'rear_bumpers)) +) +(cl:defmethod roslisp-msg-protocol:deserialize ((msg ) istream) + "Deserializes a message object of type '" + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'header) istream) + (cl:let ((__ros_arr_len 0)) + (cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 16) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 24) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:slot-value msg 'front_bumpers) (cl:make-array __ros_arr_len)) + (cl:let ((vals (cl:slot-value msg 'front_bumpers))) + (cl:dotimes (i __ros_arr_len) + (cl:setf (cl:aref vals i) (cl:not (cl:zerop (cl:read-byte istream))))))) + (cl:let ((__ros_arr_len 0)) + (cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 16) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 24) __ros_arr_len) (cl:read-byte istream)) + (cl:setf (cl:slot-value msg 'rear_bumpers) (cl:make-array __ros_arr_len)) + (cl:let ((vals (cl:slot-value msg 'rear_bumpers))) + (cl:dotimes (i __ros_arr_len) + (cl:setf (cl:aref vals i) (cl:not (cl:zerop (cl:read-byte istream))))))) + msg +) +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql '))) + "Returns string type for a message object of type '" + "rosaria/BumperState") +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'BumperState))) + "Returns string type for a message object of type 'BumperState" + "rosaria/BumperState") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '))) + "Returns md5sum for a message object of type '" + "f81947761ff7e166a3bbaf937b9869b5") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'BumperState))) + "Returns md5sum for a message object of type 'BumperState" + "f81947761ff7e166a3bbaf937b9869b5") +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '))) + "Returns full string definition for message of type '" + (cl:format cl:nil "Header header~%bool[] front_bumpers~%bool[] rear_bumpers~%~%================================================================================~%MSG: std_msgs/Header~%# Standard metadata for higher-level stamped data types.~%# This is generally used to communicate timestamped data ~%# in a particular coordinate frame.~%# ~%# sequence ID: consecutively increasing ID ~%uint32 seq~%#Two-integer timestamp that is expressed as:~%# * stamp.secs: seconds (stamp_secs) since epoch~%# * stamp.nsecs: nanoseconds since stamp_secs~%# time-handling sugar is provided by the client library~%time stamp~%#Frame this data is associated with~%# 0: no frame~%# 1: global frame~%string frame_id~%~%~%")) +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'BumperState))) + "Returns full string definition for message of type 'BumperState" + (cl:format cl:nil "Header header~%bool[] front_bumpers~%bool[] rear_bumpers~%~%================================================================================~%MSG: std_msgs/Header~%# Standard metadata for higher-level stamped data types.~%# This is generally used to communicate timestamped data ~%# in a particular coordinate frame.~%# ~%# sequence ID: consecutively increasing ID ~%uint32 seq~%#Two-integer timestamp that is expressed as:~%# * stamp.secs: seconds (stamp_secs) since epoch~%# * stamp.nsecs: nanoseconds since stamp_secs~%# time-handling sugar is provided by the client library~%time stamp~%#Frame this data is associated with~%# 0: no frame~%# 1: global frame~%string frame_id~%~%~%")) +(cl:defmethod roslisp-msg-protocol:serialization-length ((msg )) + (cl:+ 0 + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'header)) + 4 (cl:reduce #'cl:+ (cl:slot-value msg 'front_bumpers) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ 1))) + 4 (cl:reduce #'cl:+ (cl:slot-value msg 'rear_bumpers) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ 1))) +)) +(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg )) + "Converts a ROS message object to a list" + (cl:list 'BumperState + (cl:cons ':header (header msg)) + (cl:cons ':front_bumpers (front_bumpers msg)) + (cl:cons ':rear_bumpers (rear_bumpers msg)) +)) diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/_package.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/_package.lisp new file mode 100644 index 0000000..4c84b8a --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/_package.lisp @@ -0,0 +1,7 @@ +(cl:defpackage rosaria-msg + (:use ) + (:export + "" + "BUMPERSTATE" + )) + diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/_package_BumperState.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/_package_BumperState.lisp new file mode 100644 index 0000000..cd55fee --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/_package_BumperState.lisp @@ -0,0 +1,8 @@ +(cl:in-package rosaria-msg) +(cl:export '(HEADER-VAL + HEADER + FRONT_BUMPERS-VAL + FRONT_BUMPERS + REAR_BUMPERS-VAL + REAR_BUMPERS +)) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/rosaria-msg.asd b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/rosaria-msg.asd new file mode 100644 index 0000000..c0aaa54 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria/msg/rosaria-msg.asd @@ -0,0 +1,10 @@ + +(cl:in-package :asdf) + +(defsystem "rosaria-msg" + :depends-on (:roslisp-msg-protocol :roslisp-utils :std_msgs-msg +) + :components ((:file "_package") + (:file "BumperState" :depends-on ("_package_BumperState")) + (:file "_package_BumperState" :depends-on ("_package")) + )) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp new file mode 100644 index 0000000..63c2c13 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RestrictionsMsg.lisp @@ -0,0 +1,92 @@ +; Auto-generated. Do not edit! + + +(cl:in-package rosaria_msgs-msg) + + +;//! \htmlinclude RestrictionsMsg.msg.html + +(cl:defclass (roslisp-msg-protocol:ros-message) + ((distance + :reader distance + :initarg :distance + :type std_msgs-msg:Float64 + :initform (cl:make-instance 'std_msgs-msg:Float64)) + (linear_velocity + :reader linear_velocity + :initarg :linear_velocity + :type std_msgs-msg:Float64 + :initform (cl:make-instance 'std_msgs-msg:Float64)) + (angular_velocity + :reader angular_velocity + :initarg :angular_velocity + :type std_msgs-msg:Float64 + :initform (cl:make-instance 'std_msgs-msg:Float64))) +) + +(cl:defclass RestrictionsMsg () + ()) + +(cl:defmethod cl:initialize-instance :after ((m ) cl:&rest args) + (cl:declare (cl:ignorable args)) + (cl:unless (cl:typep m 'RestrictionsMsg) + (roslisp-msg-protocol:msg-deprecation-warning "using old message class name rosaria_msgs-msg: is deprecated: use rosaria_msgs-msg:RestrictionsMsg instead."))) + +(cl:ensure-generic-function 'distance-val :lambda-list '(m)) +(cl:defmethod distance-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:distance-val is deprecated. Use rosaria_msgs-msg:distance instead.") + (distance m)) + +(cl:ensure-generic-function 'linear_velocity-val :lambda-list '(m)) +(cl:defmethod linear_velocity-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:linear_velocity-val is deprecated. Use rosaria_msgs-msg:linear_velocity instead.") + (linear_velocity m)) + +(cl:ensure-generic-function 'angular_velocity-val :lambda-list '(m)) +(cl:defmethod angular_velocity-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:angular_velocity-val is deprecated. Use rosaria_msgs-msg:angular_velocity instead.") + (angular_velocity m)) +(cl:defmethod roslisp-msg-protocol:serialize ((msg ) ostream) + "Serializes a message object of type '" + (roslisp-msg-protocol:serialize (cl:slot-value msg 'distance) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'linear_velocity) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'angular_velocity) ostream) +) +(cl:defmethod roslisp-msg-protocol:deserialize ((msg ) istream) + "Deserializes a message object of type '" + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'distance) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'linear_velocity) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'angular_velocity) istream) + msg +) +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql '))) + "Returns string type for a message object of type '" + "rosaria_msgs/RestrictionsMsg") +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'RestrictionsMsg))) + "Returns string type for a message object of type 'RestrictionsMsg" + "rosaria_msgs/RestrictionsMsg") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '))) + "Returns md5sum for a message object of type '" + "c2466ab186049d2506624976271d3b3e") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'RestrictionsMsg))) + "Returns md5sum for a message object of type 'RestrictionsMsg" + "c2466ab186049d2506624976271d3b3e") +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '))) + "Returns full string definition for message of type '" + (cl:format cl:nil "std_msgs/Float64 distance~%std_msgs/Float64 linear_velocity~%std_msgs/Float64 angular_velocity~%================================================================================~%MSG: std_msgs/Float64~%float64 data~%~%")) +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'RestrictionsMsg))) + "Returns full string definition for message of type 'RestrictionsMsg" + (cl:format cl:nil "std_msgs/Float64 distance~%std_msgs/Float64 linear_velocity~%std_msgs/Float64 angular_velocity~%================================================================================~%MSG: std_msgs/Float64~%float64 data~%~%")) +(cl:defmethod roslisp-msg-protocol:serialization-length ((msg )) + (cl:+ 0 + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'distance)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'linear_velocity)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'angular_velocity)) +)) +(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg )) + "Converts a ROS message object to a list" + (cl:list 'RestrictionsMsg + (cl:cons ':distance (distance msg)) + (cl:cons ':linear_velocity (linear_velocity msg)) + (cl:cons ':angular_velocity (angular_velocity msg)) +)) diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp new file mode 100644 index 0000000..f28c5ed --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/RobotInfoMsg.lisp @@ -0,0 +1,134 @@ +; Auto-generated. Do not edit! + + +(cl:in-package rosaria_msgs-msg) + + +;//! \htmlinclude RobotInfoMsg.msg.html + +(cl:defclass (roslisp-msg-protocol:ros-message) + ((robot_id + :reader robot_id + :initarg :robot_id + :type std_msgs-msg:UInt8 + :initform (cl:make-instance 'std_msgs-msg:UInt8)) + (battery_voltage + :reader battery_voltage + :initarg :battery_voltage + :type std_msgs-msg:Float64 + :initform (cl:make-instance 'std_msgs-msg:Float64)) + (twist + :reader twist + :initarg :twist + :type geometry_msgs-msg:Twist + :initform (cl:make-instance 'geometry_msgs-msg:Twist)) + (state + :reader state + :initarg :state + :type std_msgs-msg:Bool + :initform (cl:make-instance 'std_msgs-msg:Bool)) + (clutch + :reader clutch + :initarg :clutch + :type std_msgs-msg:Bool + :initform (cl:make-instance 'std_msgs-msg:Bool)) + (obstacle_detected + :reader obstacle_detected + :initarg :obstacle_detected + :type std_msgs-msg:Bool + :initform (cl:make-instance 'std_msgs-msg:Bool))) +) + +(cl:defclass RobotInfoMsg () + ()) + +(cl:defmethod cl:initialize-instance :after ((m ) cl:&rest args) + (cl:declare (cl:ignorable args)) + (cl:unless (cl:typep m 'RobotInfoMsg) + (roslisp-msg-protocol:msg-deprecation-warning "using old message class name rosaria_msgs-msg: is deprecated: use rosaria_msgs-msg:RobotInfoMsg instead."))) + +(cl:ensure-generic-function 'robot_id-val :lambda-list '(m)) +(cl:defmethod robot_id-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:robot_id-val is deprecated. Use rosaria_msgs-msg:robot_id instead.") + (robot_id m)) + +(cl:ensure-generic-function 'battery_voltage-val :lambda-list '(m)) +(cl:defmethod battery_voltage-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:battery_voltage-val is deprecated. Use rosaria_msgs-msg:battery_voltage instead.") + (battery_voltage m)) + +(cl:ensure-generic-function 'twist-val :lambda-list '(m)) +(cl:defmethod twist-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:twist-val is deprecated. Use rosaria_msgs-msg:twist instead.") + (twist m)) + +(cl:ensure-generic-function 'state-val :lambda-list '(m)) +(cl:defmethod state-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:state-val is deprecated. Use rosaria_msgs-msg:state instead.") + (state m)) + +(cl:ensure-generic-function 'clutch-val :lambda-list '(m)) +(cl:defmethod clutch-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:clutch-val is deprecated. Use rosaria_msgs-msg:clutch instead.") + (clutch m)) + +(cl:ensure-generic-function 'obstacle_detected-val :lambda-list '(m)) +(cl:defmethod obstacle_detected-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader rosaria_msgs-msg:obstacle_detected-val is deprecated. Use rosaria_msgs-msg:obstacle_detected instead.") + (obstacle_detected m)) +(cl:defmethod roslisp-msg-protocol:serialize ((msg ) ostream) + "Serializes a message object of type '" + (roslisp-msg-protocol:serialize (cl:slot-value msg 'robot_id) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'battery_voltage) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'twist) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'state) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'clutch) ostream) + (roslisp-msg-protocol:serialize (cl:slot-value msg 'obstacle_detected) ostream) +) +(cl:defmethod roslisp-msg-protocol:deserialize ((msg ) istream) + "Deserializes a message object of type '" + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'robot_id) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'battery_voltage) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'twist) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'state) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'clutch) istream) + (roslisp-msg-protocol:deserialize (cl:slot-value msg 'obstacle_detected) istream) + msg +) +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql '))) + "Returns string type for a message object of type '" + "rosaria_msgs/RobotInfoMsg") +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'RobotInfoMsg))) + "Returns string type for a message object of type 'RobotInfoMsg" + "rosaria_msgs/RobotInfoMsg") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '))) + "Returns md5sum for a message object of type '" + "fc20ec1228cc0538c3b1ee05e9614d34") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'RobotInfoMsg))) + "Returns md5sum for a message object of type 'RobotInfoMsg" + "fc20ec1228cc0538c3b1ee05e9614d34") +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '))) + "Returns full string definition for message of type '" + (cl:format cl:nil "std_msgs/UInt8 robot_id~%std_msgs/Float64 battery_voltage~%geometry_msgs/Twist twist~%std_msgs/Bool state~%std_msgs/Bool clutch~%std_msgs/Bool obstacle_detected~%================================================================================~%MSG: std_msgs/UInt8~%uint8 data~%~%================================================================================~%MSG: std_msgs/Float64~%float64 data~%================================================================================~%MSG: geometry_msgs/Twist~%# This expresses velocity in free space broken into its linear and angular parts.~%Vector3 linear~%Vector3 angular~%~%================================================================================~%MSG: geometry_msgs/Vector3~%# This represents a vector in free space. ~%~%float64 x~%float64 y~%float64 z~%================================================================================~%MSG: std_msgs/Bool~%bool data~%~%")) +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'RobotInfoMsg))) + "Returns full string definition for message of type 'RobotInfoMsg" + (cl:format cl:nil "std_msgs/UInt8 robot_id~%std_msgs/Float64 battery_voltage~%geometry_msgs/Twist twist~%std_msgs/Bool state~%std_msgs/Bool clutch~%std_msgs/Bool obstacle_detected~%================================================================================~%MSG: std_msgs/UInt8~%uint8 data~%~%================================================================================~%MSG: std_msgs/Float64~%float64 data~%================================================================================~%MSG: geometry_msgs/Twist~%# This expresses velocity in free space broken into its linear and angular parts.~%Vector3 linear~%Vector3 angular~%~%================================================================================~%MSG: geometry_msgs/Vector3~%# This represents a vector in free space. ~%~%float64 x~%float64 y~%float64 z~%================================================================================~%MSG: std_msgs/Bool~%bool data~%~%")) +(cl:defmethod roslisp-msg-protocol:serialization-length ((msg )) + (cl:+ 0 + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'robot_id)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'battery_voltage)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'twist)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'state)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'clutch)) + (roslisp-msg-protocol:serialization-length (cl:slot-value msg 'obstacle_detected)) +)) +(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg )) + "Converts a ROS message object to a list" + (cl:list 'RobotInfoMsg + (cl:cons ':robot_id (robot_id msg)) + (cl:cons ':battery_voltage (battery_voltage msg)) + (cl:cons ':twist (twist msg)) + (cl:cons ':state (state msg)) + (cl:cons ':clutch (clutch msg)) + (cl:cons ':obstacle_detected (obstacle_detected msg)) +)) diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package.lisp new file mode 100644 index 0000000..6cc1e9b --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package.lisp @@ -0,0 +1,9 @@ +(cl:defpackage rosaria_msgs-msg + (:use ) + (:export + "" + "ROBOTINFOMSG" + "" + "RESTRICTIONSMSG" + )) + diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package_RestrictionsMsg.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package_RestrictionsMsg.lisp new file mode 100644 index 0000000..c3ffa66 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package_RestrictionsMsg.lisp @@ -0,0 +1,8 @@ +(cl:in-package rosaria_msgs-msg) +(cl:export '(DISTANCE-VAL + DISTANCE + LINEAR_VELOCITY-VAL + LINEAR_VELOCITY + ANGULAR_VELOCITY-VAL + ANGULAR_VELOCITY +)) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package_RobotInfoMsg.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package_RobotInfoMsg.lisp new file mode 100644 index 0000000..a9b974d --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/_package_RobotInfoMsg.lisp @@ -0,0 +1,14 @@ +(cl:in-package rosaria_msgs-msg) +(cl:export '(ROBOT_ID-VAL + ROBOT_ID + BATTERY_VOLTAGE-VAL + BATTERY_VOLTAGE + TWIST-VAL + TWIST + STATE-VAL + STATE + CLUTCH-VAL + CLUTCH + OBSTACLE_DETECTED-VAL + OBSTACLE_DETECTED +)) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/rosaria_msgs-msg.asd b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/rosaria_msgs-msg.asd new file mode 100644 index 0000000..ec417cf --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/rosaria_msgs/msg/rosaria_msgs-msg.asd @@ -0,0 +1,13 @@ + +(cl:in-package :asdf) + +(defsystem "rosaria_msgs-msg" + :depends-on (:roslisp-msg-protocol :roslisp-utils :geometry_msgs-msg + :std_msgs-msg +) + :components ((:file "_package") + (:file "RobotInfoMsg" :depends-on ("_package_RobotInfoMsg")) + (:file "_package_RobotInfoMsg" :depends-on ("_package")) + (:file "RestrictionsMsg" :depends-on ("_package_RestrictionsMsg")) + (:file "_package_RestrictionsMsg" :depends-on ("_package")) + )) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/_package.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/_package.lisp new file mode 100644 index 0000000..8a3f688 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/_package.lisp @@ -0,0 +1,10 @@ +(cl:defpackage videostream-srv + (:use ) + (:export + "IP_GET" + "" + "IP_GET-REQUEST" + "" + "IP_GET-RESPONSE" + )) + diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/_package_ip_get.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/_package_ip_get.lisp new file mode 100644 index 0000000..a5183d2 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/_package_ip_get.lisp @@ -0,0 +1,4 @@ +(cl:in-package videostream-srv) +(cl:export '(STR-VAL + STR +)) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp new file mode 100644 index 0000000..43d99a0 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/ip_get.lisp @@ -0,0 +1,128 @@ +; Auto-generated. Do not edit! + + +(cl:in-package videostream-srv) + + +;//! \htmlinclude ip_get-request.msg.html + +(cl:defclass (roslisp-msg-protocol:ros-message) + ((str + :reader str + :initarg :str + :type cl:string + :initform "")) +) + +(cl:defclass ip_get-request () + ()) + +(cl:defmethod cl:initialize-instance :after ((m ) cl:&rest args) + (cl:declare (cl:ignorable args)) + (cl:unless (cl:typep m 'ip_get-request) + (roslisp-msg-protocol:msg-deprecation-warning "using old message class name videostream-srv: is deprecated: use videostream-srv:ip_get-request instead."))) + +(cl:ensure-generic-function 'str-val :lambda-list '(m)) +(cl:defmethod str-val ((m )) + (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader videostream-srv:str-val is deprecated. Use videostream-srv:str instead.") + (str m)) +(cl:defmethod roslisp-msg-protocol:serialize ((msg ) ostream) + "Serializes a message object of type '" + (cl:let ((__ros_str_len (cl:length (cl:slot-value msg 'str)))) + (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_str_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_str_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_str_len) ostream) + (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_str_len) ostream)) + (cl:map cl:nil #'(cl:lambda (c) (cl:write-byte (cl:char-code c) ostream)) (cl:slot-value msg 'str)) +) +(cl:defmethod roslisp-msg-protocol:deserialize ((msg ) istream) + "Deserializes a message object of type '" + (cl:let ((__ros_str_len 0)) + (cl:setf (cl:ldb (cl:byte 8 0) __ros_str_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 8) __ros_str_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 16) __ros_str_len) (cl:read-byte istream)) + (cl:setf (cl:ldb (cl:byte 8 24) __ros_str_len) (cl:read-byte istream)) + (cl:setf (cl:slot-value msg 'str) (cl:make-string __ros_str_len)) + (cl:dotimes (__ros_str_idx __ros_str_len msg) + (cl:setf (cl:char (cl:slot-value msg 'str) __ros_str_idx) (cl:code-char (cl:read-byte istream))))) + msg +) +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql '))) + "Returns string type for a service object of type '" + "videostream/ip_getRequest") +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'ip_get-request))) + "Returns string type for a service object of type 'ip_get-request" + "videostream/ip_getRequest") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '))) + "Returns md5sum for a message object of type '" + "994972b6e03928b2476860ce6c4c8e17") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'ip_get-request))) + "Returns md5sum for a message object of type 'ip_get-request" + "994972b6e03928b2476860ce6c4c8e17") +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '))) + "Returns full string definition for message of type '" + (cl:format cl:nil "string str~%~%~%")) +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'ip_get-request))) + "Returns full string definition for message of type 'ip_get-request" + (cl:format cl:nil "string str~%~%~%")) +(cl:defmethod roslisp-msg-protocol:serialization-length ((msg )) + (cl:+ 0 + 4 (cl:length (cl:slot-value msg 'str)) +)) +(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg )) + "Converts a ROS message object to a list" + (cl:list 'ip_get-request + (cl:cons ':str (str msg)) +)) +;//! \htmlinclude ip_get-response.msg.html + +(cl:defclass (roslisp-msg-protocol:ros-message) + () +) + +(cl:defclass ip_get-response () + ()) + +(cl:defmethod cl:initialize-instance :after ((m ) cl:&rest args) + (cl:declare (cl:ignorable args)) + (cl:unless (cl:typep m 'ip_get-response) + (roslisp-msg-protocol:msg-deprecation-warning "using old message class name videostream-srv: is deprecated: use videostream-srv:ip_get-response instead."))) +(cl:defmethod roslisp-msg-protocol:serialize ((msg ) ostream) + "Serializes a message object of type '" +) +(cl:defmethod roslisp-msg-protocol:deserialize ((msg ) istream) + "Deserializes a message object of type '" + msg +) +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql '))) + "Returns string type for a service object of type '" + "videostream/ip_getResponse") +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'ip_get-response))) + "Returns string type for a service object of type 'ip_get-response" + "videostream/ip_getResponse") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '))) + "Returns md5sum for a message object of type '" + "994972b6e03928b2476860ce6c4c8e17") +(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'ip_get-response))) + "Returns md5sum for a message object of type 'ip_get-response" + "994972b6e03928b2476860ce6c4c8e17") +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '))) + "Returns full string definition for message of type '" + (cl:format cl:nil "~%~%~%")) +(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'ip_get-response))) + "Returns full string definition for message of type 'ip_get-response" + (cl:format cl:nil "~%~%~%")) +(cl:defmethod roslisp-msg-protocol:serialization-length ((msg )) + (cl:+ 0 +)) +(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg )) + "Converts a ROS message object to a list" + (cl:list 'ip_get-response +)) +(cl:defmethod roslisp-msg-protocol:service-request-type ((msg (cl:eql 'ip_get))) + 'ip_get-request) +(cl:defmethod roslisp-msg-protocol:service-response-type ((msg (cl:eql 'ip_get))) + 'ip_get-response) +(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'ip_get))) + "Returns string type for a service object of type '" + "videostream/ip_get") \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/videostream-srv.asd b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/videostream-srv.asd new file mode 100644 index 0000000..2040f31 --- /dev/null +++ b/Legacy/ws_linux/devel/share/common-lisp/ros/videostream/srv/videostream-srv.asd @@ -0,0 +1,9 @@ + +(cl:in-package :asdf) + +(defsystem "videostream-srv" + :depends-on (:roslisp-msg-protocol :roslisp-utils ) + :components ((:file "_package") + (:file "ip_get" :depends-on ("_package_ip_get")) + (:file "_package_ip_get" :depends-on ("_package")) + )) \ No newline at end of file diff --git a/Legacy/ws_linux/devel/share/rosaria/cmake/rosaria-msg-extras.cmake b/Legacy/ws_linux/devel/share/rosaria/cmake/rosaria-msg-extras.cmake new file mode 100644 index 0000000..01b9d0d --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/cmake/rosaria-msg-extras.cmake @@ -0,0 +1,2 @@ +set(rosaria_MESSAGE_FILES "/home/lab1_5/ws/ws_linux/src/rosaria/msg/BumperState.msg") +set(rosaria_SERVICE_FILES "") diff --git a/Legacy/ws_linux/devel/share/rosaria/cmake/rosaria-msg-paths.cmake b/Legacy/ws_linux/devel/share/rosaria/cmake/rosaria-msg-paths.cmake new file mode 100644 index 0000000..8a4a316 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/cmake/rosaria-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in develspace +set(rosaria_MSG_INCLUDE_DIRS "/home/lab1_5/ws/ws_linux/src/rosaria/msg") +set(rosaria_MSG_DEPENDENCIES geometry_msgs;std_msgs) diff --git a/Legacy/ws_linux/devel/share/rosaria/cmake/rosariaConfig-version.cmake b/Legacy/ws_linux/devel/share/rosaria/cmake/rosariaConfig-version.cmake new file mode 100644 index 0000000..0df8aa0 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/cmake/rosariaConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.9.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/devel/share/rosaria/cmake/rosariaConfig.cmake b/Legacy/ws_linux/devel/share/rosaria/cmake/rosariaConfig.cmake new file mode 100644 index 0000000..087a45c --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/cmake/rosariaConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(rosaria_CONFIG_INCLUDED) + return() +endif() +set(rosaria_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("TRUE" STREQUAL "TRUE") + set(rosaria_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/rosaria) + set(rosaria_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(rosaria_INSTALL_PREFIX "") + set(rosaria_PREFIX ${rosaria_DEVEL_PREFIX}) +else() + set(rosaria_SOURCE_PREFIX "") + set(rosaria_DEVEL_PREFIX "") + set(rosaria_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(rosaria_PREFIX ${rosaria_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'rosaria' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(rosaria_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "/home/lab1_5/ws/ws_linux/devel/include" STREQUAL "") + set(rosaria_INCLUDE_DIRS "") + set(_include_dirs "/home/lab1_5/ws/ws_linux/devel/include") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${rosaria_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'rosaria' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Srećko Jurić-Kavelj , Ivan Marković , Reed Hedges ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'rosaria' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/src/rosaria/${idir}'. Ask the maintainer 'Srećko Jurić-Kavelj , Ivan Marković , Reed Hedges ' to fix it.") + endif() + _list_append_unique(rosaria_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND rosaria_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND rosaria_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND rosaria_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(rosaria_LIBRARY_DIRS ${lib_path}) + list(APPEND rosaria_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'rosaria'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND rosaria_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(rosaria_EXPORTED_TARGETS "rosaria_gencfg;rosaria_generate_messages_cpp;rosaria_generate_messages_lisp;rosaria_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${rosaria_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "roscpp;nav_msgs;geometry_msgs;sensor_msgs;tf") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 rosaria_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${rosaria_dep}_FOUND) + find_package(${rosaria_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${rosaria_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(rosaria_INCLUDE_DIRS ${${rosaria_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(rosaria_LIBRARIES ${rosaria_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${rosaria_dep}_LIBRARIES}) + _list_append_deduplicate(rosaria_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(rosaria_LIBRARIES ${rosaria_LIBRARIES}) + + _list_append_unique(rosaria_LIBRARY_DIRS ${${rosaria_dep}_LIBRARY_DIRS}) + list(APPEND rosaria_EXPORTED_TARGETS ${${rosaria_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "rosaria-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${rosaria_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox b/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox new file mode 100644 index 0000000..6a5810a --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig-usage.dox @@ -0,0 +1,15 @@ +\subsubsection usage Usage +\verbatim + + + + + + + + + + + +\endverbatim + diff --git a/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox b/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox new file mode 100644 index 0000000..cb8723f --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig.dox @@ -0,0 +1,14 @@ +\subsubsection parameters ROS parameters + +Reads and maintains the following parameters on the ROS server + +- \b "~trans_accel" : \b [double] Translational acceleration (m/s^2) min: -std::numeric_limits::infinity(), default: 0, max: std::numeric_limits::infinity() +- \b "~trans_decel" : \b [double] Translational deceleration (m/s^2) min: -std::numeric_limits::infinity(), default: 0, max: std::numeric_limits::infinity() +- \b "~lat_accel" : \b [double] Lateral acceleration (m/s^2) min: -std::numeric_limits::infinity(), default: 0, max: std::numeric_limits::infinity() +- \b "~lat_decel" : \b [double] Lateral deceleration (m/s^2) min: -std::numeric_limits::infinity(), default: 0, max: std::numeric_limits::infinity() +- \b "~rot_accel" : \b [double] Rotational acceleration (rad/s^2) min: -std::numeric_limits::infinity(), default: 0, max: std::numeric_limits::infinity() +- \b "~rot_decel" : \b [double] Rotational deceleration (rad/s^2) min: -std::numeric_limits::infinity(), default: 0, max: std::numeric_limits::infinity() +- \b "~TicksMM" : \b [int] Encoder ticks/mm min: -2147483648, default: 0, max: 2147483647 +- \b "~DriftFactor" : \b [int] Value in 1/8192 increments to be added or subtracted from the left encoder ticks in order to compensate for tire differences. min: -2147483648, default: 0, max: 2147483647 +- \b "~RevCount" : \b [int] The number of differential encoder ticks for a 180-degree revolution of the robot. min: -2147483648, default: 0, max: 2147483647 + diff --git a/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc b/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc new file mode 100644 index 0000000..101f246 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria/docs/RosAriaConfig.wikidoc @@ -0,0 +1,44 @@ +# Autogenerated param section. Do not hand edit. +param { +group.0 { +name=Dynamically Reconfigurable Parameters +desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters. +0.name= ~trans_accel +0.default= 0 +0.type= double +0.desc=Translational acceleration (m/s^2) Range: -std::numeric_limits::infinity() to std::numeric_limits::infinity() +1.name= ~trans_decel +1.default= 0 +1.type= double +1.desc=Translational deceleration (m/s^2) Range: -std::numeric_limits::infinity() to std::numeric_limits::infinity() +2.name= ~lat_accel +2.default= 0 +2.type= double +2.desc=Lateral acceleration (m/s^2) Range: -std::numeric_limits::infinity() to std::numeric_limits::infinity() +3.name= ~lat_decel +3.default= 0 +3.type= double +3.desc=Lateral deceleration (m/s^2) Range: -std::numeric_limits::infinity() to std::numeric_limits::infinity() +4.name= ~rot_accel +4.default= 0 +4.type= double +4.desc=Rotational acceleration (rad/s^2) Range: -std::numeric_limits::infinity() to std::numeric_limits::infinity() +5.name= ~rot_decel +5.default= 0 +5.type= double +5.desc=Rotational deceleration (rad/s^2) Range: -std::numeric_limits::infinity() to std::numeric_limits::infinity() +6.name= ~TicksMM +6.default= 0 +6.type= int +6.desc=Encoder ticks/mm Range: -2147483648 to 2147483647 +7.name= ~DriftFactor +7.default= 0 +7.type= int +7.desc=Value in 1/8192 increments to be added or subtracted from the left encoder ticks in order to compensate for tire differences. Range: -2147483648 to 2147483647 +8.name= ~RevCount +8.default= 0 +8.type= int +8.desc=The number of differential encoder ticks for a 180-degree revolution of the robot. Range: -2147483648 to 2147483647 +} +} +# End of autogenerated section. You may edit below. diff --git a/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-extras.cmake b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-extras.cmake new file mode 100644 index 0000000..e01c757 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-extras.cmake @@ -0,0 +1,2 @@ +set(rosaria_msgs_MESSAGE_FILES "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg;/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg") +set(rosaria_msgs_SERVICE_FILES "") diff --git a/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-paths.cmake b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-paths.cmake new file mode 100644 index 0000000..226d244 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgs-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in develspace +set(rosaria_msgs_MSG_INCLUDE_DIRS "/home/lab1_5/ws/ws_linux/src/rosaria_msgs/msg") +set(rosaria_msgs_MSG_DEPENDENCIES std_msgs;geometry_msgs) diff --git a/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgsConfig-version.cmake b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgsConfig-version.cmake new file mode 100644 index 0000000..7fd9f99 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgsConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgsConfig.cmake b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgsConfig.cmake new file mode 100644 index 0000000..d813638 --- /dev/null +++ b/Legacy/ws_linux/devel/share/rosaria_msgs/cmake/rosaria_msgsConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(rosaria_msgs_CONFIG_INCLUDED) + return() +endif() +set(rosaria_msgs_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("TRUE" STREQUAL "TRUE") + set(rosaria_msgs_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/rosaria_msgs) + set(rosaria_msgs_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(rosaria_msgs_INSTALL_PREFIX "") + set(rosaria_msgs_PREFIX ${rosaria_msgs_DEVEL_PREFIX}) +else() + set(rosaria_msgs_SOURCE_PREFIX "") + set(rosaria_msgs_DEVEL_PREFIX "") + set(rosaria_msgs_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(rosaria_msgs_PREFIX ${rosaria_msgs_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'rosaria_msgs' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(rosaria_msgs_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "/home/lab1_5/ws/ws_linux/devel/include" STREQUAL "") + set(rosaria_msgs_INCLUDE_DIRS "") + set(_include_dirs "/home/lab1_5/ws/ws_linux/devel/include") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${rosaria_msgs_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'rosaria_msgs' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Aleksander Bojda ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'rosaria_msgs' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/src/rosaria_msgs/${idir}'. Ask the maintainer 'Aleksander Bojda ' to fix it.") + endif() + _list_append_unique(rosaria_msgs_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND rosaria_msgs_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND rosaria_msgs_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND rosaria_msgs_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(rosaria_msgs_LIBRARY_DIRS ${lib_path}) + list(APPEND rosaria_msgs_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'rosaria_msgs'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND rosaria_msgs_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(rosaria_msgs_EXPORTED_TARGETS "rosaria_msgs_generate_messages_cpp;rosaria_msgs_generate_messages_lisp;rosaria_msgs_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${rosaria_msgs_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "message_runtime") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 rosaria_msgs_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${rosaria_msgs_dep}_FOUND) + find_package(${rosaria_msgs_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${rosaria_msgs_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(rosaria_msgs_INCLUDE_DIRS ${${rosaria_msgs_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(rosaria_msgs_LIBRARIES ${rosaria_msgs_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${rosaria_msgs_dep}_LIBRARIES}) + _list_append_deduplicate(rosaria_msgs_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(rosaria_msgs_LIBRARIES ${rosaria_msgs_LIBRARIES}) + + _list_append_unique(rosaria_msgs_LIBRARY_DIRS ${${rosaria_msgs_dep}_LIBRARY_DIRS}) + list(APPEND rosaria_msgs_EXPORTED_TARGETS ${${rosaria_msgs_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "rosaria_msgs-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${rosaria_msgs_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/devel/share/safety/cmake/safety-msg-extras.cmake b/Legacy/ws_linux/devel/share/safety/cmake/safety-msg-extras.cmake new file mode 100644 index 0000000..c1b75eb --- /dev/null +++ b/Legacy/ws_linux/devel/share/safety/cmake/safety-msg-extras.cmake @@ -0,0 +1,2 @@ +set(safety_MESSAGE_FILES "") +set(safety_SERVICE_FILES "") diff --git a/Legacy/ws_linux/devel/share/safety/cmake/safety-msg-paths.cmake b/Legacy/ws_linux/devel/share/safety/cmake/safety-msg-paths.cmake new file mode 100644 index 0000000..ad11753 --- /dev/null +++ b/Legacy/ws_linux/devel/share/safety/cmake/safety-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in develspace +set(safety_MSG_INCLUDE_DIRS "") +set(safety_MSG_DEPENDENCIES std_msgs) diff --git a/Legacy/ws_linux/devel/share/safety/cmake/safetyConfig-version.cmake b/Legacy/ws_linux/devel/share/safety/cmake/safetyConfig-version.cmake new file mode 100644 index 0000000..40ac4c2 --- /dev/null +++ b/Legacy/ws_linux/devel/share/safety/cmake/safetyConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.2.1") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/devel/share/safety/cmake/safetyConfig.cmake b/Legacy/ws_linux/devel/share/safety/cmake/safetyConfig.cmake new file mode 100644 index 0000000..6169f32 --- /dev/null +++ b/Legacy/ws_linux/devel/share/safety/cmake/safetyConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(safety_CONFIG_INCLUDED) + return() +endif() +set(safety_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("TRUE" STREQUAL "TRUE") + set(safety_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/safety) + set(safety_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(safety_INSTALL_PREFIX "") + set(safety_PREFIX ${safety_DEVEL_PREFIX}) +else() + set(safety_SOURCE_PREFIX "") + set(safety_DEVEL_PREFIX "") + set(safety_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(safety_PREFIX ${safety_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'safety' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(safety_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "" STREQUAL "") + set(safety_INCLUDE_DIRS "") + set(_include_dirs "") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${safety_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'safety' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Aleksandra Grzelak ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'safety' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/src/safety/${idir}'. Ask the maintainer 'Aleksandra Grzelak ' to fix it.") + endif() + _list_append_unique(safety_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "safety") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND safety_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND safety_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND safety_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(safety_LIBRARY_DIRS ${lib_path}) + list(APPEND safety_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'safety'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND safety_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(safety_EXPORTED_TARGETS "safety_generate_messages_cpp;safety_generate_messages_lisp;safety_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${safety_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "message_runtime;roscpp;rospy;std_msgs;rosaria") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 safety_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${safety_dep}_FOUND) + find_package(${safety_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${safety_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(safety_INCLUDE_DIRS ${${safety_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(safety_LIBRARIES ${safety_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${safety_dep}_LIBRARIES}) + _list_append_deduplicate(safety_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(safety_LIBRARIES ${safety_LIBRARIES}) + + _list_append_unique(safety_LIBRARY_DIRS ${${safety_dep}_LIBRARY_DIRS}) + list(APPEND safety_EXPORTED_TARGETS ${${safety_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "safety-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${safety_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/devel/share/videostream/cmake/videostream-msg-extras.cmake b/Legacy/ws_linux/devel/share/videostream/cmake/videostream-msg-extras.cmake new file mode 100644 index 0000000..ea194e9 --- /dev/null +++ b/Legacy/ws_linux/devel/share/videostream/cmake/videostream-msg-extras.cmake @@ -0,0 +1,2 @@ +set(videostream_MESSAGE_FILES "") +set(videostream_SERVICE_FILES "/home/lab1_5/ws/ws_linux/src/videostream/srv/ip_get.srv") diff --git a/Legacy/ws_linux/devel/share/videostream/cmake/videostream-msg-paths.cmake b/Legacy/ws_linux/devel/share/videostream/cmake/videostream-msg-paths.cmake new file mode 100644 index 0000000..bd4496a --- /dev/null +++ b/Legacy/ws_linux/devel/share/videostream/cmake/videostream-msg-paths.cmake @@ -0,0 +1,5 @@ +# generated from genmsg/cmake/pkg-msg-paths.cmake.em + +# message include dirs in develspace +set(videostream_MSG_INCLUDE_DIRS "") +set(videostream_MSG_DEPENDENCIES std_msgs) diff --git a/Legacy/ws_linux/devel/share/videostream/cmake/videostreamConfig-version.cmake b/Legacy/ws_linux/devel/share/videostream/cmake/videostreamConfig-version.cmake new file mode 100644 index 0000000..7fd9f99 --- /dev/null +++ b/Legacy/ws_linux/devel/share/videostream/cmake/videostreamConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from catkin/cmake/template/pkgConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/Legacy/ws_linux/devel/share/videostream/cmake/videostreamConfig.cmake b/Legacy/ws_linux/devel/share/videostream/cmake/videostreamConfig.cmake new file mode 100644 index 0000000..bdc09a6 --- /dev/null +++ b/Legacy/ws_linux/devel/share/videostream/cmake/videostreamConfig.cmake @@ -0,0 +1,191 @@ +# generated from catkin/cmake/template/pkgConfig.cmake.in + +# append elements to a list and remove existing duplicates from the list +# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig +# self contained +macro(_list_append_deduplicate listname) + if(NOT "${ARGN}" STREQUAL "") + if(${listname}) + list(REMOVE_ITEM ${listname} ${ARGN}) + endif() + list(APPEND ${listname} ${ARGN}) + endif() +endmacro() + +# append elements to a list if they are not already in the list +# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig +# self contained +macro(_list_append_unique listname) + foreach(_item ${ARGN}) + list(FIND ${listname} ${_item} _index) + if(_index EQUAL -1) + list(APPEND ${listname} ${_item}) + endif() + endforeach() +endmacro() + +# pack a list of libraries with optional build configuration keywords +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_pack_libraries_with_build_configuration VAR) + set(${VAR} "") + set(_argn ${ARGN}) + list(LENGTH _argn _count) + set(_index 0) + while(${_index} LESS ${_count}) + list(GET _argn ${_index} lib) + if("${lib}" MATCHES "^debug|optimized|general$") + math(EXPR _index "${_index} + 1") + if(${_index} EQUAL ${_count}) + message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") + endif() + list(GET _argn ${_index} library) + list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") + else() + list(APPEND ${VAR} "${lib}") + endif() + math(EXPR _index "${_index} + 1") + endwhile() +endmacro() + +# unpack a list of libraries with optional build configuration keyword prefixes +# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig +# self contained +macro(_unpack_libraries_with_build_configuration VAR) + set(${VAR} "") + foreach(lib ${ARGN}) + string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") + list(APPEND ${VAR} "${lib}") + endforeach() +endmacro() + + +if(videostream_CONFIG_INCLUDED) + return() +endif() +set(videostream_CONFIG_INCLUDED TRUE) + +# set variables for source/devel/install prefixes +if("TRUE" STREQUAL "TRUE") + set(videostream_SOURCE_PREFIX /home/lab1_5/ws/ws_linux/src/videostream) + set(videostream_DEVEL_PREFIX /home/lab1_5/ws/ws_linux/devel) + set(videostream_INSTALL_PREFIX "") + set(videostream_PREFIX ${videostream_DEVEL_PREFIX}) +else() + set(videostream_SOURCE_PREFIX "") + set(videostream_DEVEL_PREFIX "") + set(videostream_INSTALL_PREFIX /home/lab1_5/ws/ws_linux/install) + set(videostream_PREFIX ${videostream_INSTALL_PREFIX}) +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "WARNING: package 'videostream' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + message("${_msg}") +endif() + +# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project +set(videostream_FOUND_CATKIN_PROJECT TRUE) + +if(NOT "/home/lab1_5/ws/ws_linux/devel/include;/home/lab1_5/ws/ws_linux/src/videostream/include" STREQUAL "") + set(videostream_INCLUDE_DIRS "") + set(_include_dirs "/home/lab1_5/ws/ws_linux/devel/include;/home/lab1_5/ws/ws_linux/src/videostream/include") + foreach(idir ${_include_dirs}) + if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) + set(include ${idir}) + elseif("${idir}" STREQUAL "include") + get_filename_component(include "${videostream_DIR}/../../../include" ABSOLUTE) + if(NOT IS_DIRECTORY ${include}) + message(FATAL_ERROR "Project 'videostream' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'lab ' to fix it.") + endif() + else() + message(FATAL_ERROR "Project 'videostream' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/lab1_5/ws/ws_linux/src/videostream/${idir}'. Ask the maintainer 'lab ' to fix it.") + endif() + _list_append_unique(videostream_INCLUDE_DIRS ${include}) + endforeach() +endif() + +set(libraries "videostream") +foreach(library ${libraries}) + # keep build configuration keywords, target names and absolute libraries as-is + if("${library}" MATCHES "^debug|optimized|general$") + list(APPEND videostream_LIBRARIES ${library}) + elseif(TARGET ${library}) + list(APPEND videostream_LIBRARIES ${library}) + elseif(IS_ABSOLUTE ${library}) + list(APPEND videostream_LIBRARIES ${library}) + else() + set(lib_path "") + set(lib "${library}-NOTFOUND") + # since the path where the library is found is returned we have to iterate over the paths manually + foreach(path /home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_linux/devel/lib;/home/lab1_5/ws/ws_xeno/devel/lib;/home/lab1_5/ws/ws_isolated/install_isolated/lib;/opt/ros/hydro/lib) + find_library(lib ${library} + PATHS ${path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(lib) + set(lib_path ${path}) + break() + endif() + endforeach() + if(lib) + _list_append_unique(videostream_LIBRARY_DIRS ${lib_path}) + list(APPEND videostream_LIBRARIES ${lib}) + else() + # as a fall back for non-catkin libraries try to search globally + find_library(lib ${library}) + if(NOT lib) + message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'videostream'? Did you find_package() it before the subdirectory containing its code is included?") + endif() + list(APPEND videostream_LIBRARIES ${lib}) + endif() + endif() +endforeach() + +set(videostream_EXPORTED_TARGETS "videostream_generate_messages_cpp;videostream_generate_messages_lisp;videostream_generate_messages_py") +# create dummy targets for exported code generation targets to make life of users easier +foreach(t ${videostream_EXPORTED_TARGETS}) + if(NOT TARGET ${t}) + add_custom_target(${t}) + endif() +endforeach() + +set(depends "message_runtime;roscpp;rospy;std_msgs") +foreach(depend ${depends}) + string(REPLACE " " ";" depend_list ${depend}) + # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls + list(GET depend_list 0 videostream_dep) + list(LENGTH depend_list count) + if(${count} EQUAL 1) + # simple dependencies must only be find_package()-ed once + if(NOT ${videostream_dep}_FOUND) + find_package(${videostream_dep} REQUIRED) + endif() + else() + # dependencies with components must be find_package()-ed again + list(REMOVE_AT depend_list 0) + find_package(${videostream_dep} REQUIRED ${depend_list}) + endif() + _list_append_unique(videostream_INCLUDE_DIRS ${${videostream_dep}_INCLUDE_DIRS}) + + # merge build configuration keywords with library names to correctly deduplicate + _pack_libraries_with_build_configuration(videostream_LIBRARIES ${videostream_LIBRARIES}) + _pack_libraries_with_build_configuration(_libraries ${${videostream_dep}_LIBRARIES}) + _list_append_deduplicate(videostream_LIBRARIES ${_libraries}) + # undo build configuration keyword merging after deduplication + _unpack_libraries_with_build_configuration(videostream_LIBRARIES ${videostream_LIBRARIES}) + + _list_append_unique(videostream_LIBRARY_DIRS ${${videostream_dep}_LIBRARY_DIRS}) + list(APPEND videostream_EXPORTED_TARGETS ${${videostream_dep}_EXPORTED_TARGETS}) +endforeach() + +set(pkg_cfg_extras "videostream-msg-extras.cmake") +foreach(extra ${pkg_cfg_extras}) + if(NOT IS_ABSOLUTE ${extra}) + set(extra ${videostream_DIR}/${extra}) + endif() + include(${extra}) +endforeach() diff --git a/Legacy/ws_linux/src/CMakeLists.txt b/Legacy/ws_linux/src/CMakeLists.txt new file mode 100644 index 0000000..40273ce --- /dev/null +++ b/Legacy/ws_linux/src/CMakeLists.txt @@ -0,0 +1,64 @@ +# toplevel CMakeLists.txt for a catkin workspace +# catkin/cmake/toplevel.cmake + +cmake_minimum_required(VERSION 2.8.3) + +set(CATKIN_TOPLEVEL TRUE) + +# search for catkin within the workspace +set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}") +execute_process(COMMAND ${_cmd} + RESULT_VARIABLE _res + OUTPUT_VARIABLE _out + ERROR_VARIABLE _err + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE +) +if(NOT _res EQUAL 0 AND NOT _res EQUAL 2) + # searching fot catkin resulted in an error + string(REPLACE ";" " " _cmd_str "${_cmd}") + message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}") +endif() + +# include catkin from workspace or via find_package() +if(_res EQUAL 0) + set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake") + # include all.cmake without add_subdirectory to let it operate in same scope + include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE) + add_subdirectory("${_out}") + +else() + # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument + # or CMAKE_PREFIX_PATH from the environment + if(NOT DEFINED CMAKE_PREFIX_PATH) + if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "") + string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) + endif() + endif() + + # list of catkin workspaces + set(catkin_search_path "") + foreach(path ${CMAKE_PREFIX_PATH}) + if(EXISTS "${path}/.catkin") + list(FIND catkin_search_path ${path} _index) + if(_index EQUAL -1) + list(APPEND catkin_search_path ${path}) + endif() + endif() + endforeach() + + # search for catkin in all workspaces + set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE) + find_package(catkin QUIET + NO_POLICY_SCOPE + PATHS ${catkin_search_path} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + unset(CATKIN_TOPLEVEL_FIND_PACKAGE) + + if(NOT catkin_FOUND) + message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.") + endif() +endif() + +catkin_workspace() + diff --git a/Legacy/ws_linux/src/rosaria/.RosAria.cpp.swp b/Legacy/ws_linux/src/rosaria/.RosAria.cpp.swp new file mode 100644 index 0000000..d2dca96 Binary files /dev/null and b/Legacy/ws_linux/src/rosaria/.RosAria.cpp.swp differ diff --git a/CMakeLists.txt b/Legacy/ws_linux/src/rosaria/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to Legacy/ws_linux/src/rosaria/CMakeLists.txt diff --git a/RosAria.cpp b/Legacy/ws_linux/src/rosaria/RosAria.cpp similarity index 99% rename from RosAria.cpp rename to Legacy/ws_linux/src/rosaria/RosAria.cpp index e91d75d..4f9fff5 100644 --- a/RosAria.cpp +++ b/Legacy/ws_linux/src/rosaria/RosAria.cpp @@ -602,10 +602,6 @@ bool RosAriaNode::isCloseToObstacle() range = reading->getRange(); - std_msgs::Float32 soc; - soc.data = (float)(range/1000.0); - state_of_charge_pub.publish(soc); - if ((float)(range/1000.0) < minDist) // Readings are in mm { return true; diff --git a/Legacy/ws_linux/src/rosaria/RosAria.cpp.old b/Legacy/ws_linux/src/rosaria/RosAria.cpp.old new file mode 100644 index 0000000..c1ca524 --- /dev/null +++ b/Legacy/ws_linux/src/rosaria/RosAria.cpp.old @@ -0,0 +1,899 @@ +//#define WATCHDOG 1 +#include +#include +#ifdef ADEPT_PKG +#include +#else +#include +//Aria/Aria.h> +#endif +#include "ros/ros.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/PoseStamped.h" +#include //for sonar data +#include +#include // can optionally publish sonar as new type pointcloud2 +#include "nav_msgs/Odometry.h" +#include "rosaria/BumperState.h" +#include "tf/tf.h" +#include "tf/transform_listener.h" //for tf::getPrefixParam +#include +#include "tf/transform_datatypes.h" +#include +#include +#include "std_msgs/Float64.h" +#include "std_msgs/Float32.h" +#include "std_msgs/Int8.h" +#include "std_msgs/Bool.h" +#include "std_srvs/Empty.h" + +#include + + +// Node that interfaces between ROS and mobile robot base features via ARIA library. +// +// RosAria uses the roscpp client library, see http://www.ros.org/wiki/roscpp for +// information, tutorials and documentation. +class RosAriaNode +{ +public: + RosAriaNode(ros::NodeHandle n); + virtual ~RosAriaNode(); + +public: + int Setup(); + void cmdvel_cb( const geometry_msgs::TwistConstPtr &); + void maxspeed_cb( const geometry_msgs::Vector3ConstPtr &); + + + + //void cmd_enable_motors_cb(); + //void cmd_disable_motors_cb(); + void spin(); + void publish(); + void sonarConnectCb(); + void dynamic_reconfigureCB(rosaria::RosAriaConfig &config, uint32_t level); + void readParameters(); + +protected: + int WATCHDOG; + ros::NodeHandle n; + ros::Publisher pose_pub; + ros::Publisher bumpers_pub; + ros::Publisher sonar_pub; + ros::Publisher sonar_pointcloud2_pub; + ros::Publisher voltage_pub; + + ros::Publisher recharge_state_pub; + std_msgs::Int8 recharge_state; + + ros::Publisher state_of_charge_pub; + + ros::Publisher motors_state_pub; + std_msgs::Bool motors_state; + bool published_motors_state; + + ros::Subscriber cmdvel_sub; + ros::Subscriber maxspeed_sub; + + ros::ServiceServer enable_srv; + ros::ServiceServer disable_srv; + bool enable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool disable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + + ros::Publisher stop_motors_pub; + ros::ServiceServer stop_motors_srv; + ros::ServiceServer start_motors_srv; + bool stop_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool start_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + + //Gripper + ros::ServiceServer gripper_open_srv; + ros::ServiceServer gripper_close_srv; + ros::ServiceServer gripper_up_srv; + ros::ServiceServer gripper_down_srv; + + bool gripper_open_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool gripper_close_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool gripper_up_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool gripper_down_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + + ros::Time veltime; + + std::string serial_port; + int serial_baud; + + float maxVel; + float maxRot; + + ArRobotConnector *conn; + ArRobot *robot; + ArGripper* gripper; + + nav_msgs::Odometry position; + rosaria::BumperState bumpers; + ArPose pos; + ArFunctorC myPublishCB; + //ArRobot::ChargeState batteryCharge; + + //for odom->base_link transform + tf::TransformBroadcaster odom_broadcaster; + geometry_msgs::TransformStamped odom_trans; + //for resolving tf names. + std::string tf_prefix; + std::string frame_id_odom; + std::string frame_id_base_link; + std::string frame_id_bumper; + std::string frame_id_sonar; + + // flag indicating whether sonar was enabled or disabled on the robot + bool sonar_enabled; + + // enable and publish sonar topics. set to true when first subscriber connects, set to false when last subscriber disconnects. + bool publish_sonar; + bool publish_sonar_pointcloud2; + + // Debug Aria + bool debug_aria; + std::string aria_log_filename; + + // Robot Parameters + int TicksMM, DriftFactor, RevCount; // Odometry Calibration Settings + + // dynamic_reconfigure + dynamic_reconfigure::Server *dynamic_reconfigure_server; + + //Damian zmienna mówiąca czy robot jest zatrzymany awaryjnie + bool stop_robot; + std_msgs::Bool stop_motors_msg; + + ros::Time watchdog; +}; + +void RosAriaNode::readParameters() +{ + // Robot Parameters + robot->lock(); + ros::NodeHandle n_("~"); + if (n_.hasParam("TicksMM")) + { + n_.getParam( "TicksMM", TicksMM); + ROS_INFO("Setting TicksMM from ROS Parameter: %d", TicksMM); + robot->comInt(93, TicksMM); + } + else + { + TicksMM = robot->getOrigRobotConfig()->getTicksMM(); + n_.setParam( "TicksMM", TicksMM); + ROS_INFO("Setting TicksMM from robot controller stored configuration: %d", TicksMM); + } + + if (n_.hasParam("DriftFactor")) + { + n_.getParam( "DriftFactor", DriftFactor); + ROS_INFO("Setting DriftFactor from ROS Parameter: %d", DriftFactor); + robot->comInt(89, DriftFactor); + } + else + { + DriftFactor = robot->getOrigRobotConfig()->getDriftFactor(); + n_.setParam( "DriftFactor", DriftFactor); + ROS_INFO("Setting DriftFactor from robot controller stored configuration: %d", DriftFactor); + } + + if (n_.hasParam("RevCount")) + { + n_.getParam( "RevCount", RevCount); + ROS_INFO("Setting RevCount from ROS Parameter: %d", RevCount); + robot->comInt(88, RevCount); + } + else + { + RevCount = robot->getOrigRobotConfig()->getRevCount(); + n_.setParam( "RevCount", RevCount); + ROS_INFO("Setting RevCount from robot controller stored configuration: %d", RevCount); + } + if (n_.hasParam("WatchDog")) + { + n_.getParam( "WatchDog", WATCHDOG); + ROS_INFO("Setting WatchDog from ROS Parameter: %d", WATCHDOG); + } + else + { + n_.setParam( "WatchDog", WATCHDOG); + ROS_INFO("Setting default WatchDog : %d", WATCHDOG); + } + robot->unlock(); +} + +void RosAriaNode::dynamic_reconfigureCB(rosaria::RosAriaConfig &config, uint32_t level) +{ + // + // Odometry Settings + // + robot->lock(); + if(TicksMM != config.TicksMM and config.TicksMM > 0) + { + ROS_INFO("Setting TicksMM from Dynamic Reconfigure: %d -> %d ", TicksMM, config.TicksMM); + TicksMM = config.TicksMM; + robot->comInt(93, TicksMM); + } + + if(DriftFactor != config.DriftFactor) + { + ROS_INFO("Setting DriftFactor from Dynamic Reconfigure: %d -> %d ", DriftFactor, config.DriftFactor); + DriftFactor = config.DriftFactor; + robot->comInt(89, DriftFactor); + } + + if(RevCount != config.RevCount and config.RevCount > 0) + { + ROS_INFO("Setting RevCount from Dynamic Reconfigure: %d -> %d ", RevCount, config.RevCount); + RevCount = config.RevCount; + robot->comInt(88, RevCount); + } + + // + // Acceleration Parameters + // + int value; + value = config.trans_accel * 1000; + if(value != robot->getTransAccel() and value > 0) + { + ROS_INFO("Setting TransAccel from Dynamic Reconfigure: %d", value); + robot->setTransAccel(value); + } + + value = config.trans_decel * 1000; + if(value != robot->getTransDecel() and value > 0) + { + ROS_INFO("Setting TransDecel from Dynamic Reconfigure: %d", value); + robot->setTransDecel(value); + } + + value = config.lat_accel * 1000; + if(value != robot->getLatAccel() and value > 0) + { + ROS_INFO("Setting LatAccel from Dynamic Reconfigure: %d", value); + if (robot->getAbsoluteMaxLatAccel() > 0 ) + robot->setLatAccel(value); + } + + value = config.lat_decel * 1000; + if(value != robot->getLatDecel() and value > 0) + { + ROS_INFO("Setting LatDecel from Dynamic Reconfigure: %d", value); + if (robot->getAbsoluteMaxLatDecel() > 0 ) + robot->setLatDecel(value); + } + + value = config.rot_accel * 180/M_PI; + if(value != robot->getRotAccel() and value > 0) + { + ROS_INFO("Setting RotAccel from Dynamic Reconfigure: %d", value); + robot->setRotAccel(value); + } + + value = config.rot_decel * 180/M_PI; + if(value != robot->getRotDecel() and value > 0) + { + ROS_INFO("Setting RotDecel from Dynamic Reconfigure: %d", value); + robot->setRotDecel(value); + } + robot->unlock(); +} + +void RosAriaNode::sonarConnectCb() +{ + publish_sonar = (sonar_pub.getNumSubscribers() > 0); + publish_sonar_pointcloud2 = (sonar_pointcloud2_pub.getNumSubscribers() > 0); + robot->lock(); + if (publish_sonar || publish_sonar_pointcloud2) + { + robot->enableSonar(); + sonar_enabled = false; + } + else if(!publish_sonar && !publish_sonar_pointcloud2) + { + robot->disableSonar(); + sonar_enabled = true; + } + robot->unlock(); +} + +RosAriaNode::RosAriaNode(ros::NodeHandle nh) : + myPublishCB(this, &RosAriaNode::publish), serial_port(""), serial_baud(0), + sonar_enabled(false), publish_sonar(false), publish_sonar_pointcloud2(false) +{ + // read in runtime parameters + n = nh; + + // port and baud + n.param( "port", serial_port, std::string("/dev/ttyUSB0") ); + ROS_INFO( "RosAria: using port: [%s]", serial_port.c_str() ); + + n.param("baud", serial_baud, 0); + if(serial_baud != 0) + ROS_INFO("RosAria: using serial port baud rate %d", serial_baud); + + // handle debugging more elegantly + n.param( "debug_aria", debug_aria, false ); // default not to debug + n.param( "aria_log_filename", aria_log_filename, std::string("Aria.log") ); + + // Figure out what frame_id's to use. if a tf_prefix param is specified, + // it will be added to the beginning of the frame_ids. + // + // e.g. rosrun ... _tf_prefix:=MyRobot (or equivalently using s in + // roslaunch files) + // will result in the frame_ids being set to /MyRobot/odom etc, + // rather than /odom. This is useful for Multi Robot Systems. + // See ROS Wiki for further details. + tf_prefix = tf::getPrefixParam(n); + frame_id_odom = tf::resolve(tf_prefix, "odom"); + frame_id_base_link = tf::resolve(tf_prefix, "base_link"); + frame_id_bumper = tf::resolve(tf_prefix, "bumpers_frame"); + frame_id_sonar = tf::resolve(tf_prefix, "sonar_frame"); + + // advertise services for data topics + // second argument to advertise() is queue size. + // other argmuments (optional) are callbacks, or a boolean "latch" flag (whether to send current data to new + // subscribers when they subscribe). + // See ros::NodeHandle API docs. + pose_pub = n.advertise("pose",1000); + bumpers_pub = n.advertise("bumper_state",1000); + sonar_pub = n.advertise("sonar", 50, + boost::bind(&RosAriaNode::sonarConnectCb, this), + boost::bind(&RosAriaNode::sonarConnectCb, this)); + sonar_pointcloud2_pub = n.advertise("sonar_pointcloud2", 50, + boost::bind(&RosAriaNode::sonarConnectCb, this), + boost::bind(&RosAriaNode::sonarConnectCb, this)); + + voltage_pub = n.advertise("battery_voltage", 1000); + recharge_state_pub = n.advertise("battery_recharge_state", 5, true /*latch*/ ); + recharge_state.data = -2; + state_of_charge_pub = n.advertise("battery_state_of_charge", 100); + + motors_state_pub = n.advertise("motors_state", 5, true /*latch*/ ); + stop_motors_pub = n.advertise("stop_motors_state", 5, true /*latch*/ ); + motors_state.data = false; + published_motors_state = false; + + // subscribe to services + cmdvel_sub = n.subscribe( "cmd_vel", 1, (boost::function ) + boost::bind(&RosAriaNode::cmdvel_cb, this, _1 )); + + + maxspeed_sub = n.subscribe( "/PIONIER/distance", 1, (boost::function ) + boost::bind(&RosAriaNode::maxspeed_cb, this, _1 )); + + // advertise enable/disable services + enable_srv = n.advertiseService("enable_motors", &RosAriaNode::enable_motors_cb, this); + disable_srv = n.advertiseService("disable_motors", &RosAriaNode::disable_motors_cb, this); + + //Damian Gripper + gripper_open_srv = n.advertiseService("gripper_open", &RosAriaNode::gripper_open_cb, this); + gripper_close_srv = n.advertiseService("gripper_close", &RosAriaNode::gripper_close_cb, this); + gripper_up_srv = n.advertiseService("gripper_up", &RosAriaNode::gripper_up_cb, this); + gripper_down_srv = n.advertiseService("gripper_down", &RosAriaNode::gripper_down_cb, this); + + //Damian usługi stopu awaryjnego + stop_motors_srv = n.advertiseService("stop_motors", &RosAriaNode::stop_motors_cb, this); + start_motors_srv = n.advertiseService("start_motors", &RosAriaNode::start_motors_cb, this); + stop_robot=false; + stop_motors_msg.data=false; + + maxVel=1.4; + maxRot=1; + + + veltime = ros::Time::now(); + + +} + +RosAriaNode::~RosAriaNode() +{ + // disable motors and sonar. + robot->disableMotors(); + robot->disableSonar(); + + robot->stopRunning(); + robot->waitForRunExit(); + Aria::shutdown(); +} + +int RosAriaNode::Setup() +{ + WATCHDOG=1; + // Note, various objects are allocated here which are never deleted (freed), since Setup() is only supposed to be + // called once per instance, and these objects need to persist until the process terminates. + + robot = new ArRobot(); + gripper = new ArGripper(robot); + ArArgumentBuilder *args = new ArArgumentBuilder(); // never freed + ArArgumentParser *argparser = new ArArgumentParser(args); // Warning never freed + argparser->loadDefaultArguments(); // adds any arguments given in /etc/Aria.args. Useful on robots with unusual serial port or baud rate (e.g. pioneer lx) + + // Now add any parameters given via ros params (see RosAriaNode constructor): + + // if serial port parameter contains a ':' character, then interpret it as hostname:tcpport + // for wireless serial connection. Otherwise, interpret it as a serial port name. + size_t colon_pos = serial_port.find(":"); + if (colon_pos != std::string::npos) + { + args->add("-remoteHost"); // pass robot's hostname/IP address to Aria + args->add(serial_port.substr(0, colon_pos).c_str()); + args->add("-remoteRobotTcpPort"); // pass robot's TCP port to Aria + args->add(serial_port.substr(colon_pos+1).c_str()); + } + else + { + args->add("-robotPort"); // pass robot's serial port to Aria + args->add(serial_port.c_str()); + } + + // if a baud rate was specified in baud parameter + if(serial_baud != 0) + { + args->add("-robotBaud"); + char tmp[100]; + snprintf(tmp, 100, "%d", serial_baud); + args->add(tmp); + } + + if( debug_aria ) + { + // turn on all ARIA debugging + args->add("-robotLogPacketsReceived"); // log received packets + args->add("-robotLogPacketsSent"); // log sent packets + args->add("-robotLogVelocitiesReceived"); // log received velocities + args->add("-robotLogMovementSent"); + args->add("-robotLogMovementReceived"); + ArLog::init(ArLog::File, ArLog::Verbose, aria_log_filename.c_str(), true); + } + + + // Connect to the robot + conn = new ArRobotConnector(argparser, robot); // warning never freed + if (!conn->connectRobot()) { + ROS_ERROR("RosAria: ARIA could not connect to robot! (Check ~port parameter is correct, and permissions on port device.)"); + return 1; + } + + // causes ARIA to load various robot-specific hardware parameters from the robot parameter file in /usr/local/Aria/params + if(!Aria::parseArgs()) + { + ROS_ERROR("RosAria: ARIA error parsing ARIA startup parameters!"); + return 1; + } + + readParameters(); + + // Start dynamic_reconfigure server + dynamic_reconfigure_server = new dynamic_reconfigure::Server; + + // Setup Parameter Minimums + rosaria::RosAriaConfig dynConf_min; + dynConf_min.trans_accel = robot->getAbsoluteMaxTransAccel() / 1000; + dynConf_min.trans_decel = robot->getAbsoluteMaxTransDecel() / 1000; + // TODO: Fix rqt dynamic_reconfigure gui to handle empty intervals + // Until then, set unit length interval. + dynConf_min.lat_accel = ((robot->getAbsoluteMaxLatAccel() > 0.0) ? robot->getAbsoluteMaxLatAccel() : 0.1) / 1000; + dynConf_min.lat_decel = ((robot->getAbsoluteMaxLatDecel() > 0.0) ? robot->getAbsoluteMaxLatDecel() : 0.1) / 1000; + dynConf_min.rot_accel = robot->getAbsoluteMaxRotAccel() * M_PI/180; + dynConf_min.rot_decel = robot->getAbsoluteMaxRotDecel() * M_PI/180; + + // I'm setting these upper bounds relitivly arbitrarily, feel free to increase them. + dynConf_min.TicksMM = 10; + dynConf_min.DriftFactor = -200; + dynConf_min.RevCount = -32760; + + dynamic_reconfigure_server->setConfigMin(dynConf_min); + + + rosaria::RosAriaConfig dynConf_max; + dynConf_max.trans_accel = robot->getAbsoluteMaxTransAccel() / 1000; + dynConf_max.trans_decel = robot->getAbsoluteMaxTransDecel() / 1000; + // TODO: Fix rqt dynamic_reconfigure gui to handle empty intervals + // Until then, set unit length interval. + dynConf_max.lat_accel = ((robot->getAbsoluteMaxLatAccel() > 0.0) ? robot->getAbsoluteMaxLatAccel() : 0.1) / 1000; + dynConf_max.lat_decel = ((robot->getAbsoluteMaxLatDecel() > 0.0) ? robot->getAbsoluteMaxLatDecel() : 0.1) / 1000; + dynConf_max.rot_accel = robot->getAbsoluteMaxRotAccel() * M_PI/180; + dynConf_max.rot_decel = robot->getAbsoluteMaxRotDecel() * M_PI/180; + + // I'm setting these upper bounds relitivly arbitrarily, feel free to increase them. + dynConf_max.TicksMM = 200; + dynConf_max.DriftFactor = 200; + dynConf_max.RevCount = 32760; + + dynamic_reconfigure_server->setConfigMax(dynConf_max); + + + rosaria::RosAriaConfig dynConf_default; + dynConf_default.trans_accel = robot->getTransAccel() / 1000; + dynConf_default.trans_decel = robot->getTransDecel() / 1000; + dynConf_default.lat_accel = robot->getLatAccel() / 1000; + dynConf_default.lat_decel = robot->getLatDecel() / 1000; + dynConf_default.rot_accel = robot->getRotAccel() * M_PI/180; + dynConf_default.rot_decel = robot->getRotDecel() * M_PI/180; + + dynConf_default.TicksMM = TicksMM; + dynConf_default.DriftFactor = DriftFactor; + dynConf_default.RevCount = RevCount; + + dynamic_reconfigure_server->setConfigDefault(dynConf_max); + + dynamic_reconfigure_server->setCallback(boost::bind(&RosAriaNode::dynamic_reconfigureCB, this, _1, _2)); + + // Enable the motors + robot->enableMotors(); + + // disable sonars on startup + robot->disableSonar(); + + // callback will be called by ArRobot background processing thread for every SIP data packet received from robot + robot->addSensorInterpTask("ROSPublishingTask", 100, &myPublishCB); + + // Initialize bumpers with robot number of bumpers + bumpers.front_bumpers.resize(robot->getNumFrontBumpers()); + bumpers.rear_bumpers.resize(robot->getNumRearBumpers()); + + // Run ArRobot background processing thread + robot->runAsync(true); + return 0; +} + +void RosAriaNode::spin() +{ + ros::spin(); +} + +void RosAriaNode::publish() +{ + // Note, this is called via SensorInterpTask callback (myPublishCB, named "ROSPublishingTask"). ArRobot object 'robot' sholud not be locked or unlocked. + pos = robot->getPose(); + tf::poseTFToMsg(tf::Transform(tf::createQuaternionFromYaw(pos.getTh()*M_PI/180), tf::Vector3(pos.getX()/1000, + pos.getY()/1000, 0)), position.pose.pose); //Aria returns pose in mm. + position.twist.twist.linear.x = robot->getVel()/1000; //Aria returns velocity in mm/s. + position.twist.twist.linear.y = robot->getLatVel()/1000.0; + position.twist.twist.angular.z = robot->getRotVel()*M_PI/180; + + position.header.frame_id = frame_id_odom; + position.child_frame_id = frame_id_base_link; + position.header.stamp = ros::Time::now(); + pose_pub.publish(position); + + ROS_DEBUG("RosAria: publish: (time %f) pose x: %f, y: %f, angle: %f; linear vel x: %f, y: %f; angular vel z: %f", + position.header.stamp.toSec(), + (double)position.pose.pose.position.x, + (double)position.pose.pose.position.y, + (double)position.pose.pose.orientation.w, + (double) position.twist.twist.linear.x, + (double) position.twist.twist.linear.y, + (double) position.twist.twist.angular.z + ); + + + // publishing transform odom->base_link + odom_trans.header.stamp = ros::Time::now(); + odom_trans.header.frame_id = frame_id_odom; + odom_trans.child_frame_id = frame_id_base_link; + + odom_trans.transform.translation.x = pos.getX()/1000; + odom_trans.transform.translation.y = pos.getY()/1000; + odom_trans.transform.translation.z = 0.0; + odom_trans.transform.rotation = tf::createQuaternionMsgFromYaw(pos.getTh()*M_PI/180); + + odom_broadcaster.sendTransform(odom_trans); + + // getStallValue returns 2 bytes with stall bit and bumper bits, packed as (00 00 FrontBumpers RearBumpers) + int stall = robot->getStallValue(); + unsigned char front_bumpers = (unsigned char)(stall >> 8); + unsigned char rear_bumpers = (unsigned char)(stall); + + bumpers.header.frame_id = frame_id_bumper; + bumpers.header.stamp = ros::Time::now(); + + std::stringstream bumper_info(std::stringstream::out); + // Bit 0 is for stall, next bits are for bumpers (leftmost is LSB) + for (unsigned int i=0; igetNumFrontBumpers(); i++) + { + bumpers.front_bumpers[i] = (front_bumpers & (1 << (i+1))) == 0 ? 0 : 1; + bumper_info << " " << (front_bumpers & (1 << (i+1))); + } + ROS_DEBUG("RosAria: Front bumpers:%s", bumper_info.str().c_str()); + + bumper_info.str(""); + // Rear bumpers have reverse order (rightmost is LSB) + unsigned int numRearBumpers = robot->getNumRearBumpers(); + for (unsigned int i=0; igetRealBatteryVoltageNow(); + voltage_pub.publish(batteryVoltage); + + if(robot->haveStateOfCharge()) + { + std_msgs::Float32 soc; + soc.data = robot->getStateOfCharge()/100.0; + state_of_charge_pub.publish(soc); + } + + // publish recharge state if changed + char s = robot->getChargeState(); + if(s != recharge_state.data) + { + ROS_INFO("RosAria: publishing new recharge state %d.", s); + recharge_state.data = s; + recharge_state_pub.publish(recharge_state); + } + + // publish motors state if changed + bool e = robot->areMotorsEnabled(); + if(e != motors_state.data || !published_motors_state) + { + ROS_INFO("RosAria: publishing stop motors state %d.", e); + motors_state.data = e; + motors_state_pub.publish(motors_state); + published_motors_state = true; + } + + //Publikuje czy zatrzymane silniki + if(stop_robot) + { + ROS_INFO("RosAria: publishing new motors state %d.", stop_motors_msg.data); + stop_motors_pub.publish(stop_motors_msg); + stop_robot = false; + } + + // Publish sonar information, if enabled. + if (publish_sonar || publish_sonar_pointcloud2) + { + sensor_msgs::PointCloud cloud; //sonar readings. + cloud.header.stamp = position.header.stamp; //copy time. + // sonar sensors relative to base_link + cloud.header.frame_id = frame_id_sonar; + + + std::stringstream sonar_debug_info; // Log debugging info + sonar_debug_info << "Sonar readings: "; + + for (int i = 0; i < robot->getNumSonar(); i++) { + ArSensorReading* reading = NULL; + reading = robot->getSonarReading(i); + if(!reading) { + ROS_WARN("RosAria: Did not receive a sonar reading."); + continue; + } + + // getRange() will return an integer between 0 and 5000 (5m) + sonar_debug_info << reading->getRange() << " "; + + // local (x,y). Appears to be from the centre of the robot, since values may + // exceed 5000. This is good, since it means we only need 1 transform. + // x & y seem to be swapped though, i.e. if the robot is driving north + // x is north/south and y is east/west. + // + //ArPose sensor = reading->getSensorPosition(); //position of sensor. + // sonar_debug_info << "(" << reading->getLocalX() + // << ", " << reading->getLocalY() + // << ") from (" << sensor.getX() << ", " + // << sensor.getY() << ") ;; " ; + + //add sonar readings (robot-local coordinate frame) to cloud + geometry_msgs::Point32 p; + p.x = reading->getLocalX() / 1000.0; + p.y = reading->getLocalY() / 1000.0; + p.z = 0.0; + cloud.points.push_back(p); + } + ROS_DEBUG_STREAM(sonar_debug_info.str()); + + // publish topic(s) + + if(publish_sonar_pointcloud2) + { + sensor_msgs::PointCloud2 cloud2; + if(!sensor_msgs::convertPointCloudToPointCloud2(cloud, cloud2)) + { + ROS_WARN("Error converting sonar point cloud message to point_cloud2 type before publishing! Not publishing this time."); + } + else + { + sonar_pointcloud2_pub.publish(cloud2); + } + } + + if(publish_sonar) + { + sonar_pub.publish(cloud); + } + } // end if sonar_enabled + + if(watchdog.toSec()+WATCHDOGcomInt(ArCommands::ESTOP,0); + robot->setVel(0); + if(robot->hasLatVel()) + robot->setLatVel(0); + robot->setRotVel(0); + // ROS_INFO("WATCHDOG %d", WATCHDOG); + } +} + +bool RosAriaNode::enable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + ROS_INFO("RosAria: Enable motors request."); + robot->lock(); + if(robot->isEStopPressed()) + ROS_WARN("RosAria: Warning: Enable motors requested, but robot also has E-Stop button pressed. Motors will not enable."); + robot->enableMotors(); + robot->unlock(); + // todo could wait and see if motors do become enabled, and send a response with an error flag if not + return true; +} + +bool RosAriaNode::disable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + ROS_INFO("RosAria: Disable motors request."); + robot->lock(); + robot->disableMotors(); + robot->unlock(); + // todo could wait and see if motors do become disabled, and send a response with an error flag if not + return true; +} + +//Damian Metody odpowiedzialne za awaryjne ztrzymanie silników +bool RosAriaNode::start_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + stop_robot=true; + stop_motors_msg.data=false; + + ROS_INFO("RosAria: Disable motors brakes."); + robot->lock(); + if(robot->isEStopPressed()) + ROS_WARN("RosAria: Warning: Enable motors requested, but robot also has E-Stop button pressed. Motors will not enable."); + robot->unlock(); + return true; +} + +bool RosAriaNode::stop_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + stop_robot=true; + stop_motors_msg.data=true; + //Zatrzymuje robota + robot->setVel(0); + if(robot->hasLatVel()) + robot->setLatVel(0); + robot->setRotVel(0); + + robot->comInt(ArCommands::ESTOP,0); + ROS_INFO("RosAria: Enable motors brakes."); + robot->unlock(); + return true; +} +bool RosAriaNode::gripper_open_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->gripOpen(); + ROS_INFO("RosAria: Gripper opening."); + robot->unlock(); + return true; +} + +bool RosAriaNode::gripper_close_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->gripClose(); + ROS_INFO("RosAria: Gripper closing."); + robot->unlock(); + return true; +} + +bool RosAriaNode::gripper_up_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->liftUp(); + ROS_INFO("RosAria: Gripper moving up"); + robot->unlock(); + return true; +} + +bool RosAriaNode::gripper_down_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->liftDown(); + ROS_INFO("RosAria: Gripper moving down."); + robot->unlock(); + return true; +} + + +void RosAriaNode::cmdvel_cb( const geometry_msgs::TwistConstPtr &msg) +{ + veltime = ros::Time::now(); + watchdog= ros::Time::now(); + if(stop_motors_msg.data) + { + ROS_INFO( "new speed: [%0.2f,%0.2f](%0.3f) but robot is stop", msg->linear.x*1e3, msg->angular.z, veltime.toSec() ); + return; + } + ROS_INFO( "new speed: [%0.2f,%0.2f](%0.3f)", msg->linear.x, msg->angular.z, veltime.toSec() ); + + ROS_INFO( "max speed: [%0.2f,%0.2f](%0.3f)", maxVel, maxRot, veltime.toSec() ); + float x,y,z; + x=msg->linear.x; + y=msg->linear.y; + z=msg->angular.z; + + if (fabs(msg->linear.x)>maxVel) + { + ROS_INFO( "angular velocity is too large"); + if(msg->linear.x<0) x=-maxVel; + if(msg->linear.x>0) x=maxVel; + } + if (fabs(msg->linear.y)>maxVel) + { + ROS_INFO( "angular velocity is too large"); + if(msg->linear.y<0) y=-maxVel; + if(msg->linear.y>0) y=maxVel; + } + if (fabs(msg->angular.z)>maxRot) + { + ROS_INFO( "rotate velocity is too large"); + if(msg->angular.z<0) z=-maxRot; + if(msg->angular.z>0) z=maxRot; + } + + + robot->lock(); + robot->setVel(x*1e3); + if(robot->hasLatVel()) + robot->setLatVel(y*1e3); + robot->setRotVel(z*180/M_PI); + robot->unlock(); + ROS_DEBUG("RosAria: sent vels to to aria (time %f): x vel %f mm/s, y vel %f mm/s, ang vel %f deg/s", veltime.toSec(), + (double) x * 1e3, (double) y * 1.3, (double) z * 180/M_PI); +} + +void RosAriaNode::maxspeed_cb( const geometry_msgs::Vector3ConstPtr &msg) +{ + veltime = ros::Time::now(); + maxVel=msg->y; + maxRot=msg->z; + ROS_INFO( "new max speed: [%0.2f,%0.2f]", msg->y, msg->z); +} + +int main( int argc, char** argv ) +{ + ros::init(argc,argv, "RosAria"); + ros::NodeHandle n(std::string("~")); + Aria::init(); + + RosAriaNode *node = new RosAriaNode(n); + + if( node->Setup() != 0 ) + { + ROS_FATAL( "RosAria: ROS node setup failed... \n" ); + return -1; + } + + node->spin(); + + delete node; + + ROS_INFO( "RosAria: Quitting... \n" ); + return 0; + +} diff --git a/Legacy/ws_linux/src/rosaria/RosAria.cpp.old.save b/Legacy/ws_linux/src/rosaria/RosAria.cpp.old.save new file mode 100644 index 0000000..216888b --- /dev/null +++ b/Legacy/ws_linux/src/rosaria/RosAria.cpp.old.save @@ -0,0 +1,900 @@ + +//#define WATCHDOG 1 +#include +#include +#ifdef ADEPT_PKG +#include +#else +#include +//Aria/Aria.h> +#endif +#include "ros/ros.h" +#include "geometry_msgs/Twist.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/PoseStamped.h" +#include //for sonar data +#include +#include // can optionally publish sonar as new type pointcloud2 +#include "nav_msgs/Odometry.h" +#include "rosaria/BumperState.h" +#include "tf/tf.h" +#include "tf/transform_listener.h" //for tf::getPrefixParam +#include +#include "tf/transform_datatypes.h" +#include +#include +#include "std_msgs/Float64.h" +#include "std_msgs/Float32.h" +#include "std_msgs/Int8.h" +#include "std_msgs/Bool.h" +#include "std_srvs/Empty.h" + +#include + + +// Node that interfaces between ROS and mobile robot base features via ARIA library. +// +// RosAria uses the roscpp client library, see http://www.ros.org/wiki/roscpp for +// information, tutorials and documentation. +class RosAriaNode +{ +public: + RosAriaNode(ros::NodeHandle n); + virtual ~RosAriaNode(); + +public: + int Setup(); + void cmdvel_cb( const geometry_msgs::TwistConstPtr &); + void maxspeed_cb( const geometry_msgs::Vector3ConstPtr &); + + + + //void cmd_enable_motors_cb(); + //void cmd_disable_motors_cb(); + void spin(); + void publish(); + void sonarConnectCb(); + void dynamic_reconfigureCB(rosaria::RosAriaConfig &config, uint32_t level); + void readParameters(); + +protected: + int WATCHDOG; + ros::NodeHandle n; + ros::Publisher pose_pub; + ros::Publisher bumpers_pub; + ros::Publisher sonar_pub; + ros::Publisher sonar_pointcloud2_pub; + ros::Publisher voltage_pub; + + ros::Publisher recharge_state_pub; + std_msgs::Int8 recharge_state; + + ros::Publisher state_of_charge_pub; + + ros::Publisher motors_state_pub; + std_msgs::Bool motors_state; + bool published_motors_state; + + ros::Subscriber cmdvel_sub; + ros::Subscriber maxspeed_sub; + + ros::ServiceServer enable_srv; + ros::ServiceServer disable_srv; + bool enable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool disable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + + ros::Publisher stop_motors_pub; + ros::ServiceServer stop_motors_srv; + ros::ServiceServer start_motors_srv; + bool stop_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool start_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + + //Gripper + ros::ServiceServer gripper_open_srv; + ros::ServiceServer gripper_close_srv; + ros::ServiceServer gripper_up_srv; + ros::ServiceServer gripper_down_srv; + + bool gripper_open_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool gripper_close_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool gripper_up_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + bool gripper_down_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response); + + ros::Time veltime; + + std::string serial_port; + int serial_baud; + + float maxVel; + float maxRot; + + ArRobotConnector *conn; + ArRobot *robot; + ArGripper* gripper; + + nav_msgs::Odometry position; + rosaria::BumperState bumpers; + ArPose pos; + ArFunctorC myPublishCB; + //ArRobot::ChargeState batteryCharge; + + //for odom->base_link transform + tf::TransformBroadcaster odom_broadcaster; + geometry_msgs::TransformStamped odom_trans; + //for resolving tf names. + std::string tf_prefix; + std::string frame_id_odom; + std::string frame_id_base_link; + std::string frame_id_bumper; + std::string frame_id_sonar; + + // flag indicating whether sonar was enabled or disabled on the robot + bool sonar_enabled; + + // enable and publish sonar topics. set to true when first subscriber connects, set to false when last subscriber disconnects. + bool publish_sonar; + bool publish_sonar_pointcloud2; + + // Debug Aria + bool debug_aria; + std::string aria_log_filename; + + // Robot Parameters + int TicksMM, DriftFactor, RevCount; // Odometry Calibration Settings + + // dynamic_reconfigure + dynamic_reconfigure::Server *dynamic_reconfigure_server; + + //Damian zmienna mówiąca czy robot jest zatrzymany awaryjnie + bool stop_robot; + std_msgs::Bool stop_motors_msg; + + ros::Time watchdog; +}; + +void RosAriaNode::readParameters() +{ + // Robot Parameters + robot->lock(); + ros::NodeHandle n_("~"); + if (n_.hasParam("TicksMM")) + { + n_.getParam( "TicksMM", TicksMM); + ROS_INFO("Setting TicksMM from ROS Parameter: %d", TicksMM); + robot->comInt(93, TicksMM); + } + else + { + TicksMM = robot->getOrigRobotConfig()->getTicksMM(); + n_.setParam( "TicksMM", TicksMM); + ROS_INFO("Setting TicksMM from robot controller stored configuration: %d", TicksMM); + } + + if (n_.hasParam("DriftFactor")) + { + n_.getParam( "DriftFactor", DriftFactor); + ROS_INFO("Setting DriftFactor from ROS Parameter: %d", DriftFactor); + robot->comInt(89, DriftFactor); + } + else + { + DriftFactor = robot->getOrigRobotConfig()->getDriftFactor(); + n_.setParam( "DriftFactor", DriftFactor); + ROS_INFO("Setting DriftFactor from robot controller stored configuration: %d", DriftFactor); + } + + if (n_.hasParam("RevCount")) + { + n_.getParam( "RevCount", RevCount); + ROS_INFO("Setting RevCount from ROS Parameter: %d", RevCount); + robot->comInt(88, RevCount); + } + else + { + RevCount = robot->getOrigRobotConfig()->getRevCount(); + n_.setParam( "RevCount", RevCount); + ROS_INFO("Setting RevCount from robot controller stored configuration: %d", RevCount); + } + if (n_.hasParam("WatchDog")) + { + n_.getParam( "WatchDog", WATCHDOG); + ROS_INFO("Setting WatchDog from ROS Parameter: %d", WATCHDOG); + } + else + { + n_.setParam( "WatchDog", WATCHDOG); + ROS_INFO("Setting default WatchDog : %d", WATCHDOG); + } + robot->unlock(); +} + +void RosAriaNode::dynamic_reconfigureCB(rosaria::RosAriaConfig &config, uint32_t level) +{ + // + // Odometry Settings + // + robot->lock(); + if(TicksMM != config.TicksMM and config.TicksMM > 0) + { + ROS_INFO("Setting TicksMM from Dynamic Reconfigure: %d -> %d ", TicksMM, config.TicksMM); + TicksMM = config.TicksMM; + robot->comInt(93, TicksMM); + } + + if(DriftFactor != config.DriftFactor) + { + ROS_INFO("Setting DriftFactor from Dynamic Reconfigure: %d -> %d ", DriftFactor, config.DriftFactor); + DriftFactor = config.DriftFactor; + robot->comInt(89, DriftFactor); + } + + if(RevCount != config.RevCount and config.RevCount > 0) + { + ROS_INFO("Setting RevCount from Dynamic Reconfigure: %d -> %d ", RevCount, config.RevCount); + RevCount = config.RevCount; + robot->comInt(88, RevCount); + } + + // + // Acceleration Parameters + // + int value; + value = config.trans_accel * 1000; + if(value != robot->getTransAccel() and value > 0) + { + ROS_INFO("Setting TransAccel from Dynamic Reconfigure: %d", value); + robot->setTransAccel(value); + } + + value = config.trans_decel * 1000; + if(value != robot->getTransDecel() and value > 0) + { + ROS_INFO("Setting TransDecel from Dynamic Reconfigure: %d", value); + robot->setTransDecel(value); + } + + value = config.lat_accel * 1000; + if(value != robot->getLatAccel() and value > 0) + { + ROS_INFO("Setting LatAccel from Dynamic Reconfigure: %d", value); + if (robot->getAbsoluteMaxLatAccel() > 0 ) + robot->setLatAccel(value); + } + + value = config.lat_decel * 1000; + if(value != robot->getLatDecel() and value > 0) + { + ROS_INFO("Setting LatDecel from Dynamic Reconfigure: %d", value); + if (robot->getAbsoluteMaxLatDecel() > 0 ) + robot->setLatDecel(value); + } + + value = config.rot_accel * 180/M_PI; + if(value != robot->getRotAccel() and value > 0) + { + ROS_INFO("Setting RotAccel from Dynamic Reconfigure: %d", value); + robot->setRotAccel(value); + } + + value = config.rot_decel * 180/M_PI; + if(value != robot->getRotDecel() and value > 0) + { + ROS_INFO("Setting RotDecel from Dynamic Reconfigure: %d", value); + robot->setRotDecel(value); + } + robot->unlock(); +} + +void RosAriaNode::sonarConnectCb() +{ + publish_sonar = (sonar_pub.getNumSubscribers() > 0); + publish_sonar_pointcloud2 = (sonar_pointcloud2_pub.getNumSubscribers() > 0); + robot->lock(); + if (publish_sonar || publish_sonar_pointcloud2) + { + robot->enableSonar(); + sonar_enabled = false; + } + else if(!publish_sonar && !publish_sonar_pointcloud2) + { + robot->disableSonar(); + sonar_enabled = true; + } + robot->unlock(); +} + +RosAriaNode::RosAriaNode(ros::NodeHandle nh) : + myPublishCB(this, &RosAriaNode::publish), serial_port(""), serial_baud(0), + sonar_enabled(false), publish_sonar(false), publish_sonar_pointcloud2(false) +{ + // read in runtime parameters + n = nh; + + // port and baud + n.param( "port", serial_port, std::string("/dev/ttyUSB0") ); + ROS_INFO( "RosAria: using port: [%s]", serial_port.c_str() ); + + n.param("baud", serial_baud, 0); + if(serial_baud != 0) + ROS_INFO("RosAria: using serial port baud rate %d", serial_baud); + + // handle debugging more elegantly + n.param( "debug_aria", debug_aria, false ); // default not to debug + n.param( "aria_log_filename", aria_log_filename, std::string("Aria.log") ); + + // Figure out what frame_id's to use. if a tf_prefix param is specified, + // it will be added to the beginning of the frame_ids. + // + // e.g. rosrun ... _tf_prefix:=MyRobot (or equivalently using s in + // roslaunch files) + // will result in the frame_ids being set to /MyRobot/odom etc, + // rather than /odom. This is useful for Multi Robot Systems. + // See ROS Wiki for further details. + tf_prefix = tf::getPrefixParam(n); + frame_id_odom = tf::resolve(tf_prefix, "odom"); + frame_id_base_link = tf::resolve(tf_prefix, "base_link"); + frame_id_bumper = tf::resolve(tf_prefix, "bumpers_frame"); + frame_id_sonar = tf::resolve(tf_prefix, "sonar_frame"); + + // advertise services for data topics + // second argument to advertise() is queue size. + // other argmuments (optional) are callbacks, or a boolean "latch" flag (whether to send current data to new + // subscribers when they subscribe). + // See ros::NodeHandle API docs. + pose_pub = n.advertise("pose",1000); + bumpers_pub = n.advertise("bumper_state",1000); + sonar_pub = n.advertise("sonar", 50, + boost::bind(&RosAriaNode::sonarConnectCb, this), + boost::bind(&RosAriaNode::sonarConnectCb, this)); + sonar_pointcloud2_pub = n.advertise("sonar_pointcloud2", 50, + boost::bind(&RosAriaNode::sonarConnectCb, this), + boost::bind(&RosAriaNode::sonarConnectCb, this)); + + voltage_pub = n.advertise("battery_voltage", 1000); + recharge_state_pub = n.advertise("battery_recharge_state", 5, true /*latch*/ ); + recharge_state.data = -2; + state_of_charge_pub = n.advertise("battery_state_of_charge", 100); + + motors_state_pub = n.advertise("motors_state", 5, true /*latch*/ ); + stop_motors_pub = n.advertise("stop_motors_state", 5, true /*latch*/ ); + motors_state.data = false; + published_motors_state = false; + + // subscribe to services + cmdvel_sub = n.subscribe( "cmd_vel", 1, (boost::function ) + boost::bind(&RosAriaNode::cmdvel_cb, this, _1 )); + + + maxspeed_sub = n.subscribe( "/PIONIER/distance", 1, (boost::function ) + boost::bind(&RosAriaNode::maxspeed_cb, this, _1 )); + + // advertise enable/disable services + enable_srv = n.advertiseService("enable_motors", &RosAriaNode::enable_motors_cb, this); + disable_srv = n.advertiseService("disable_motors", &RosAriaNode::disable_motors_cb, this); + + //Damian Gripper + gripper_open_srv = n.advertiseService("gripper_open", &RosAriaNode::gripper_open_cb, this); + gripper_close_srv = n.advertiseService("gripper_close", &RosAriaNode::gripper_close_cb, this); + gripper_up_srv = n.advertiseService("gripper_up", &RosAriaNode::gripper_up_cb, this); + gripper_down_srv = n.advertiseService("gripper_down", &RosAriaNode::gripper_down_cb, this); + + //Damian usługi stopu awaryjnego + stop_motors_srv = n.advertiseService("stop_motors", &RosAriaNode::stop_motors_cb, this); + start_motors_srv = n.advertiseService("start_motors", &RosAriaNode::start_motors_cb, this); + stop_robot=false; + stop_motors_msg.data=false; + + maxVel=1.4; + maxRot=1; + + + veltime = ros::Time::now(); + + +} + +RosAriaNode::~RosAriaNode() +{ + // disable motors and sonar. + robot->disableMotors(); + robot->disableSonar(); + + robot->stopRunning(); + robot->waitForRunExit(); + Aria::shutdown(); +} + +int RosAriaNode::Setup() +{ + WATCHDOG=1; + // Note, various objects are allocated here which are never deleted (freed), since Setup() is only supposed to be + // called once per instance, and these objects need to persist until the process terminates. + + robot = new ArRobot(); + gripper = new ArGripper(robot); + ArArgumentBuilder *args = new ArArgumentBuilder(); // never freed + ArArgumentParser *argparser = new ArArgumentParser(args); // Warning never freed + argparser->loadDefaultArguments(); // adds any arguments given in /etc/Aria.args. Useful on robots with unusual serial port or baud rate (e.g. pioneer lx) + + // Now add any parameters given via ros params (see RosAriaNode constructor): + + // if serial port parameter contains a ':' character, then interpret it as hostname:tcpport + // for wireless serial connection. Otherwise, interpret it as a serial port name. + size_t colon_pos = serial_port.find(":"); + if (colon_pos != std::string::npos) + { + args->add("-remoteHost"); // pass robot's hostname/IP address to Aria + args->add(serial_port.substr(0, colon_pos).c_str()); + args->add("-remoteRobotTcpPort"); // pass robot's TCP port to Aria + args->add(serial_port.substr(colon_pos+1).c_str()); + } + else + { + args->add("-robotPort"); // pass robot's serial port to Aria + args->add(serial_port.c_str()); + } + + // if a baud rate was specified in baud parameter + if(serial_baud != 0) + { + args->add("-robotBaud"); + char tmp[100]; + snprintf(tmp, 100, "%d", serial_baud); + args->add(tmp); + } + + if( debug_aria ) + { + // turn on all ARIA debugging + args->add("-robotLogPacketsReceived"); // log received packets + args->add("-robotLogPacketsSent"); // log sent packets + args->add("-robotLogVelocitiesReceived"); // log received velocities + args->add("-robotLogMovementSent"); + args->add("-robotLogMovementReceived"); + ArLog::init(ArLog::File, ArLog::Verbose, aria_log_filename.c_str(), true); + } + + + // Connect to the robot + conn = new ArRobotConnector(argparser, robot); // warning never freed + if (!conn->connectRobot()) { + ROS_ERROR("RosAria: ARIA could not connect to robot! (Check ~port parameter is correct, and permissions on port device.)"); + return 1; + } + + // causes ARIA to load various robot-specific hardware parameters from the robot parameter file in /usr/local/Aria/params + if(!Aria::parseArgs()) + { + ROS_ERROR("RosAria: ARIA error parsing ARIA startup parameters!"); + return 1; + } + + readParameters(); + + // Start dynamic_reconfigure server + dynamic_reconfigure_server = new dynamic_reconfigure::Server; + + // Setup Parameter Minimums + rosaria::RosAriaConfig dynConf_min; + dynConf_min.trans_accel = robot->getAbsoluteMaxTransAccel() / 1000; + dynConf_min.trans_decel = robot->getAbsoluteMaxTransDecel() / 1000; + // TODO: Fix rqt dynamic_reconfigure gui to handle empty intervals + // Until then, set unit length interval. + dynConf_min.lat_accel = ((robot->getAbsoluteMaxLatAccel() > 0.0) ? robot->getAbsoluteMaxLatAccel() : 0.1) / 1000; + dynConf_min.lat_decel = ((robot->getAbsoluteMaxLatDecel() > 0.0) ? robot->getAbsoluteMaxLatDecel() : 0.1) / 1000; + dynConf_min.rot_accel = robot->getAbsoluteMaxRotAccel() * M_PI/180; + dynConf_min.rot_decel = robot->getAbsoluteMaxRotDecel() * M_PI/180; + + // I'm setting these upper bounds relitivly arbitrarily, feel free to increase them. + dynConf_min.TicksMM = 10; + dynConf_min.DriftFactor = -200; + dynConf_min.RevCount = -32760; + + dynamic_reconfigure_server->setConfigMin(dynConf_min); + + + rosaria::RosAriaConfig dynConf_max; + dynConf_max.trans_accel = robot->getAbsoluteMaxTransAccel() / 1000; + dynConf_max.trans_decel = robot->getAbsoluteMaxTransDecel() / 1000; + // TODO: Fix rqt dynamic_reconfigure gui to handle empty intervals + // Until then, set unit length interval. + dynConf_max.lat_accel = ((robot->getAbsoluteMaxLatAccel() > 0.0) ? robot->getAbsoluteMaxLatAccel() : 0.1) / 1000; + dynConf_max.lat_decel = ((robot->getAbsoluteMaxLatDecel() > 0.0) ? robot->getAbsoluteMaxLatDecel() : 0.1) / 1000; + dynConf_max.rot_accel = robot->getAbsoluteMaxRotAccel() * M_PI/180; + dynConf_max.rot_decel = robot->getAbsoluteMaxRotDecel() * M_PI/180; + + // I'm setting these upper bounds relitivly arbitrarily, feel free to increase them. + dynConf_max.TicksMM = 200; + dynConf_max.DriftFactor = 200; + dynConf_max.RevCount = 32760; + + dynamic_reconfigure_server->setConfigMax(dynConf_max); + + + rosaria::RosAriaConfig dynConf_default; + dynConf_default.trans_accel = robot->getTransAccel() / 1000; + dynConf_default.trans_decel = robot->getTransDecel() / 1000; + dynConf_default.lat_accel = robot->getLatAccel() / 1000; + dynConf_default.lat_decel = robot->getLatDecel() / 1000; + dynConf_default.rot_accel = robot->getRotAccel() * M_PI/180; + dynConf_default.rot_decel = robot->getRotDecel() * M_PI/180; + + dynConf_default.TicksMM = TicksMM; + dynConf_default.DriftFactor = DriftFactor; + dynConf_default.RevCount = RevCount; + + dynamic_reconfigure_server->setConfigDefault(dynConf_max); + + dynamic_reconfigure_server->setCallback(boost::bind(&RosAriaNode::dynamic_reconfigureCB, this, _1, _2)); + + // Enable the motors + robot->enableMotors(); + + // disable sonars on startup + robot->disableSonar(); + + // callback will be called by ArRobot background processing thread for every SIP data packet received from robot + robot->addSensorInterpTask("ROSPublishingTask", 100, &myPublishCB); + + // Initialize bumpers with robot number of bumpers + bumpers.front_bumpers.resize(robot->getNumFrontBumpers()); + bumpers.rear_bumpers.resize(robot->getNumRearBumpers()); + + // Run ArRobot background processing thread + robot->runAsync(true); + return 0; +} + +void RosAriaNode::spin() +{ + ros::spin(); +} + +void RosAriaNode::publish() +{ + // Note, this is called via SensorInterpTask callback (myPublishCB, named "ROSPublishingTask"). ArRobot object 'robot' sholud not be locked or unlocked. + pos = robot->getPose(); + tf::poseTFToMsg(tf::Transform(tf::createQuaternionFromYaw(pos.getTh()*M_PI/180), tf::Vector3(pos.getX()/1000, + pos.getY()/1000, 0)), position.pose.pose); //Aria returns pose in mm. + position.twist.twist.linear.x = robot->getVel()/1000; //Aria returns velocity in mm/s. + position.twist.twist.linear.y = robot->getLatVel()/1000.0; + position.twist.twist.angular.z = robot->getRotVel()*M_PI/180; + + position.header.frame_id = frame_id_odom; + position.child_frame_id = frame_id_base_link; + position.header.stamp = ros::Time::now(); + pose_pub.publish(position); + + ROS_DEBUG("RosAria: publish: (time %f) pose x: %f, y: %f, angle: %f; linear vel x: %f, y: %f; angular vel z: %f", + position.header.stamp.toSec(), + (double)position.pose.pose.position.x, + (double)position.pose.pose.position.y, + (double)position.pose.pose.orientation.w, + (double) position.twist.twist.linear.x, + (double) position.twist.twist.linear.y, + (double) position.twist.twist.angular.z + ); + + + // publishing transform odom->base_link + odom_trans.header.stamp = ros::Time::now(); + odom_trans.header.frame_id = frame_id_odom; + odom_trans.child_frame_id = frame_id_base_link; + + odom_trans.transform.translation.x = pos.getX()/1000; + odom_trans.transform.translation.y = pos.getY()/1000; + odom_trans.transform.translation.z = 0.0; + odom_trans.transform.rotation = tf::createQuaternionMsgFromYaw(pos.getTh()*M_PI/180); + + odom_broadcaster.sendTransform(odom_trans); + + // getStallValue returns 2 bytes with stall bit and bumper bits, packed as (00 00 FrontBumpers RearBumpers) + int stall = robot->getStallValue(); + unsigned char front_bumpers = (unsigned char)(stall >> 8); + unsigned char rear_bumpers = (unsigned char)(stall); + + bumpers.header.frame_id = frame_id_bumper; + bumpers.header.stamp = ros::Time::now(); + + std::stringstream bumper_info(std::stringstream::out); + // Bit 0 is for stall, next bits are for bumpers (leftmost is LSB) + for (unsigned int i=0; igetNumFrontBumpers(); i++) + { + bumpers.front_bumpers[i] = (front_bumpers & (1 << (i+1))) == 0 ? 0 : 1; + bumper_info << " " << (front_bumpers & (1 << (i+1))); + } + ROS_DEBUG("RosAria: Front bumpers:%s", bumper_info.str().c_str()); + + bumper_info.str(""); + // Rear bumpers have reverse order (rightmost is LSB) + unsigned int numRearBumpers = robot->getNumRearBumpers(); + for (unsigned int i=0; igetRealBatteryVoltageNow(); + voltage_pub.publish(batteryVoltage); + + if(robot->haveStateOfCharge()) + { + std_msgs::Float32 soc; + soc.data = robot->getStateOfCharge()/100.0; + state_of_charge_pub.publish(soc); + } + + // publish recharge state if changed + char s = robot->getChargeState(); + if(s != recharge_state.data) + { + ROS_INFO("RosAria: publishing new recharge state %d.", s); + recharge_state.data = s; + recharge_state_pub.publish(recharge_state); + } + + // publish motors state if changed + bool e = robot->areMotorsEnabled(); + if(e != motors_state.data || !published_motors_state) + { + ROS_INFO("RosAria: publishing stop motors state %d.", e); + motors_state.data = e; + motors_state_pub.publish(motors_state); + published_motors_state = true; + } + + //Publikuje czy zatrzymane silniki + if(stop_robot) + { + ROS_INFO("RosAria: publishing new motors state %d.", stop_motors_msg.data); + stop_motors_pub.publish(stop_motors_msg); + stop_robot = false; + } + + // Publish sonar information, if enabled. + if (publish_sonar || publish_sonar_pointcloud2) + { + sensor_msgs::PointCloud cloud; //sonar readings. + cloud.header.stamp = position.header.stamp; //copy time. + // sonar sensors relative to base_link + cloud.header.frame_id = frame_id_sonar; + + + std::stringstream sonar_debug_info; // Log debugging info + sonar_debug_info << "Sonar readings: "; + + for (int i = 0; i < robot->getNumSonar(); i++) { + ArSensorReading* reading = NULL; + reading = robot->getSonarReading(i); + if(!reading) { + ROS_WARN("RosAria: Did not receive a sonar reading."); + continue; + } + + // getRange() will return an integer between 0 and 5000 (5m) + sonar_debug_info << reading->getRange() << " "; + + // local (x,y). Appears to be from the centre of the robot, since values may + // exceed 5000. This is good, since it means we only need 1 transform. + // x & y seem to be swapped though, i.e. if the robot is driving north + // x is north/south and y is east/west. + // + //ArPose sensor = reading->getSensorPosition(); //position of sensor. + // sonar_debug_info << "(" << reading->getLocalX() + // << ", " << reading->getLocalY() + // << ") from (" << sensor.getX() << ", " + // << sensor.getY() << ") ;; " ; + + //add sonar readings (robot-local coordinate frame) to cloud + geometry_msgs::Point32 p; + p.x = reading->getLocalX() / 1000.0; + p.y = reading->getLocalY() / 1000.0; + p.z = 0.0; + cloud.points.push_back(p); + } + ROS_DEBUG_STREAM(sonar_debug_info.str()); + + // publish topic(s) + + if(publish_sonar_pointcloud2) + { + sensor_msgs::PointCloud2 cloud2; + if(!sensor_msgs::convertPointCloudToPointCloud2(cloud, cloud2)) + { + ROS_WARN("Error converting sonar point cloud message to point_cloud2 type before publishing! Not publishing this time."); + } + else + { + sonar_pointcloud2_pub.publish(cloud2); + } + } + + if(publish_sonar) + { + sonar_pub.publish(cloud); + } + } // end if sonar_enabled + + if(watchdog.toSec()+WATCHDOGcomInt(ArCommands::ESTOP,0); + robot->setVel(0); + if(robot->hasLatVel()) + robot->setLatVel(0); + robot->setRotVel(0); + // ROS_INFO("WATCHDOG %d", WATCHDOG); + } +} + +bool RosAriaNode::enable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + ROS_INFO("RosAria: Enable motors request."); + robot->lock(); + if(robot->isEStopPressed()) + ROS_WARN("RosAria: Warning: Enable motors requested, but robot also has E-Stop button pressed. Motors will not enable."); + robot->enableMotors(); + robot->unlock(); + // todo could wait and see if motors do become enabled, and send a response with an error flag if not + return true; +} + +bool RosAriaNode::disable_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + ROS_INFO("RosAria: Disable motors request."); + robot->lock(); + robot->disableMotors(); + robot->unlock(); + // todo could wait and see if motors do become disabled, and send a response with an error flag if not + return true; +} + +//Damian Metody odpowiedzialne za awaryjne ztrzymanie silników +bool RosAriaNode::start_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + stop_robot=true; + stop_motors_msg.data=false; + + ROS_INFO("RosAria: Disable motors brakes."); + robot->lock(); + if(robot->isEStopPressed()) + ROS_WARN("RosAria: Warning: Enable motors requested, but robot also has E-Stop button pressed. Motors will not enable."); + robot->unlock(); + return true; +} + +bool RosAriaNode::stop_motors_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + stop_robot=true; + stop_motors_msg.data=true; + //Zatrzymuje robota + robot->setVel(0); + if(robot->hasLatVel()) + robot->setLatVel(0); + robot->setRotVel(0); + + robot->comInt(ArCommands::ESTOP,0); + ROS_INFO("RosAria: Enable motors brakes."); + robot->unlock(); + return true; +} +bool RosAriaNode::gripper_open_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->gripOpen(); + ROS_INFO("RosAria: Gripper opening."); + robot->unlock(); + return true; +} + +bool RosAriaNode::gripper_close_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->gripClose(); + ROS_INFO("RosAria: Gripper closing."); + robot->unlock(); + return true; +} + +bool RosAriaNode::gripper_up_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->liftUp(); + ROS_INFO("RosAria: Gripper moving up"); + robot->unlock(); + return true; +} + +bool RosAriaNode::gripper_down_cb(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) +{ + robot->lock(); + gripper->liftDown(); + ROS_INFO("RosAria: Gripper moving down."); + robot->unlock(); + return true; +} + + +void RosAriaNode::cmdvel_cb( const geometry_msgs::TwistConstPtr &msg) +{ + veltime = ros::Time::now(); + watchdog= ros::Time::now(); + if(stop_motors_msg.data) + { + ROS_INFO( "new speed: [%0.2f,%0.2f](%0.3f) but robot is stop", msg->linear.x*1e3, msg->angular.z, veltime.toSec() ); + return; + } + ROS_INFO( "new speed: [%0.2f,%0.2f](%0.3f)", msg->linear.x, msg->angular.z, veltime.toSec() ); + + ROS_INFO( "max speed: [%0.2f,%0.2f](%0.3f)", maxVel, maxRot, veltime.toSec() ); + float x,y,z; + x=msg->linear.x; + y=msg->linear.y; + z=msg->angular.z; + + if (fabs(msg->linear.x)>maxVel) + { + ROS_INFO( "angular velocity is too large"); + if(msg->linear.x<0) x=-maxVel; + if(msg->linear.x>0) x=maxVel; + } + if (fabs(msg->linear.y)>maxVel) + { + ROS_INFO( "angular velocity is too large"); + if(msg->linear.y<0) y=-maxVel; + if(msg->linear.y>0) y=maxVel; + } + if (fabs(msg->angular.z)>maxRot) + { + ROS_INFO( "rotate velocity is too large"); + if(msg->angular.z<0) z=-maxRot; + if(msg->angular.z>0) z=maxRot; + } + + + robot->lock(); + robot->setVel(x*1e3); + if(robot->hasLatVel()) + robot->setLatVel(y*1e3); + robot->setRotVel(z*180/M_PI); + robot->unlock(); + ROS_DEBUG("RosAria: sent vels to to aria (time %f): x vel %f mm/s, y vel %f mm/s, ang vel %f deg/s", veltime.toSec(), + (double) x * 1e3, (double) y * 1.3, (double) z * 180/M_PI); +} + +void RosAriaNode::maxspeed_cb( const geometry_msgs::Vector3ConstPtr &msg) +{ + veltime = ros::Time::now(); + maxVel=msg->y; + maxRot=msg->z; + ROS_INFO( "new max speed: [%0.2f,%0.2f]", msg->y, msg->z); +} + +int main( int argc, char** argv ) +{ + ros::init(argc,argv, "RosAria"); + ros::NodeHandle n(std::string("~")); + Aria::init(); + + RosAriaNode *node = new RosAriaNode(n); + + if( node->Setup() != 0 ) + { + ROS_FATAL( "RosAria: ROS node setup failed... \n" ); + return -1; + } + + node->spin(); + + delete node; + + ROS_INFO( "RosAria: Quitting... \n" ); + return 0; + +} diff --git a/cfg/RosAria.cfg b/Legacy/ws_linux/src/rosaria/cfg/RosAria.cfg similarity index 100% rename from cfg/RosAria.cfg rename to Legacy/ws_linux/src/rosaria/cfg/RosAria.cfg diff --git a/libaria.rdmanifest b/Legacy/ws_linux/src/rosaria/libaria.rdmanifest similarity index 100% rename from libaria.rdmanifest rename to Legacy/ws_linux/src/rosaria/libaria.rdmanifest diff --git a/mainpage.dox b/Legacy/ws_linux/src/rosaria/mainpage.dox similarity index 100% rename from mainpage.dox rename to Legacy/ws_linux/src/rosaria/mainpage.dox diff --git a/msg/BumperState.msg b/Legacy/ws_linux/src/rosaria/msg/BumperState.msg similarity index 100% rename from msg/BumperState.msg rename to Legacy/ws_linux/src/rosaria/msg/BumperState.msg diff --git a/Legacy/ws_linux/src/rosaria/package.xml b/Legacy/ws_linux/src/rosaria/package.xml new file mode 100644 index 0000000..65de483 --- /dev/null +++ b/Legacy/ws_linux/src/rosaria/package.xml @@ -0,0 +1,56 @@ + + rosaria + 0.9.0 + + ROSARIA provides a ROS interface for most Adept MobileRobots, + MobileRobots Inc., and ActivMedia mobile robot bases including + Pioneer 2, Pioneer 3, AmigoBot, PeopleBot, PowerBot, PatrolBot, Seekur, + Seekur Jr., Pioneer LX, + and any other past, current or future robot base supported by Adept MobileRobot's + open source ARIA library. + Information from the robot base, and velocity and acceleration control, is implemented + via a RosAria node, which publishes topics providing data recieved from + the robot's embedded controller by ARIA, and sets desired velocity, acceleration and + other commands in ARIA when new commands are received from command topics. + + Srećko Jurić-Kavelj + Ivan Marković + Reed Hedges + + GPLv2 + + http://www.ros.org/wiki/ROSARIA + https://github.com/amor-ros-pkg/rosaria/issues + + Srećko Jurić-Kavelj + + catkin + + message_generation + libaria + roscpp + nav_msgs + geometry_msgs + sensor_msgs + std_msgs + tf + dynamic_reconfigure + libaria + roscpp + nav_msgs + geometry_msgs + sensor_msgs + std_msgs + tf + dynamic_reconfigure + + + + + + diff --git a/Legacy/ws_linux/src/rosaria_msgs/CMakeLists.txt b/Legacy/ws_linux/src/rosaria_msgs/CMakeLists.txt new file mode 100644 index 0000000..e04f1f5 --- /dev/null +++ b/Legacy/ws_linux/src/rosaria_msgs/CMakeLists.txt @@ -0,0 +1,202 @@ +cmake_minimum_required(VERSION 2.8.3) +project(rosaria_msgs) + +## Compile as C++11, supported in ROS Kinetic and newer +# add_compile_options(-std=c++11) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED COMPONENTS + geometry_msgs + rospy + std_msgs + message_generation +) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend tag for "message_generation" +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependency has been pulled in +## but can be declared for certainty nonetheless: +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder + add_message_files( + FILES + RestrictionsMsg.msg + RobotInfoMsg.msg + ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here + generate_messages( + DEPENDENCIES + std_msgs + geometry_msgs + ) + +################################################ +## Declare ROS dynamic reconfigure parameters ## +################################################ + +## To declare and build dynamic reconfigure parameters within this +## package, follow these steps: +## * In the file package.xml: +## * add a build_depend and a run_depend tag for "dynamic_reconfigure" +## * In this file (CMakeLists.txt): +## * add "dynamic_reconfigure" to +## find_package(catkin REQUIRED COMPONENTS ...) +## * uncomment the "generate_dynamic_reconfigure_options" section below +## and list every .cfg file to be processed + +## Generate dynamic reconfigure parameters in the 'cfg' folder +# generate_dynamic_reconfigure_options( +# cfg/DynReconf1.cfg +# cfg/DynReconf2.cfg +# ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if your package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( + CATKIN_DEPENDS message_runtime +# INCLUDE_DIRS include +# LIBRARIES rosaria_msgs +# CATKIN_DEPENDS geometry_msgs rospy std_msgs +# DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +include_directories( +# include + ${catkin_INCLUDE_DIRS} +) + +## Declare a C++ library +# add_library(${PROJECT_NAME} +# src/${PROJECT_NAME}/rosaria_msgs.cpp +# ) + +## Add cmake target dependencies of the library +## as an example, code may need to be generated before libraries +## either from message generation or dynamic reconfigure +# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Declare a C++ executable +## With catkin_make all packages are built within a single CMake context +## The recommended prefix ensures that target names across packages don't collide +# add_executable(${PROJECT_NAME}_node src/rosaria_msgs_node.cpp) + +## Rename C++ executable without prefix +## The above recommended prefix causes long target names, the following renames the +## target back to the shorter version for ease of user use +## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" +# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") + +## Add cmake target dependencies of the executable +## same as for the library above +# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Specify libraries to link a library or executable target against +# target_link_libraries(${PROJECT_NAME}_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +install(PROGRAMS +# scripts/my_python_script + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) + +## Mark executables and/or libraries for installation +# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_rosaria_msgs.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/Legacy/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg b/Legacy/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg new file mode 100644 index 0000000..2b0aa55 --- /dev/null +++ b/Legacy/ws_linux/src/rosaria_msgs/msg/RestrictionsMsg.msg @@ -0,0 +1,3 @@ +std_msgs/Float64 distance +std_msgs/Float64 linear_velocity +std_msgs/Float64 angular_velocity \ No newline at end of file diff --git a/Legacy/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg b/Legacy/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg new file mode 100644 index 0000000..f3ded53 --- /dev/null +++ b/Legacy/ws_linux/src/rosaria_msgs/msg/RobotInfoMsg.msg @@ -0,0 +1,6 @@ +std_msgs/UInt8 robot_id +std_msgs/Float64 battery_voltage +geometry_msgs/Twist twist +std_msgs/Bool state +std_msgs/Bool clutch +std_msgs/Bool obstacle_detected \ No newline at end of file diff --git a/Legacy/ws_linux/src/rosaria_msgs/package.xml b/Legacy/ws_linux/src/rosaria_msgs/package.xml new file mode 100644 index 0000000..81a1a54 --- /dev/null +++ b/Legacy/ws_linux/src/rosaria_msgs/package.xml @@ -0,0 +1,21 @@ + + + rosaria_msgs + 0.0.0 + The rosaria_msgs package + + Aleksander Bojda + + MIT + + catkin + std_msgs + message_generation + + std_msgs + message_generation + + std_msgs + message_runtime + + diff --git a/Legacy/ws_linux/src/safety/.gitignore b/Legacy/ws_linux/src/safety/.gitignore new file mode 100644 index 0000000..1c565ef --- /dev/null +++ b/Legacy/ws_linux/src/safety/.gitignore @@ -0,0 +1,3 @@ +# ignore tmp and backup files +*.sw* +*.*~ diff --git a/Legacy/ws_linux/src/safety/CMakeLists.txt b/Legacy/ws_linux/src/safety/CMakeLists.txt new file mode 100644 index 0000000..f1aee9d --- /dev/null +++ b/Legacy/ws_linux/src/safety/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 2.8.3) +project(safety) + +## Find catkin and any catkin packages +find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation rosaria +) + +## Declare ROS messages and services +#add_message_files(#DIRECTORY msg +# FILES Num.msg) +#add_service_files(#DIRECTORY srv +# FILES AddInts.srv) + +## Generate added messages and services +generate_messages(DEPENDENCIES std_msgs) + +## Declare a catkin package +#catkin_package() +catkin_package( + # INCLUDE_DIRS include + LIBRARIES safety + CATKIN_DEPENDS message_runtime roscpp rospy std_msgs rosaria + DEPENDS system_lib +) + +include_directories(include ${catkin_INCLUDE_DIRS}) + + +add_executable(cloud_reader src/cloud_reader.cpp) +target_link_libraries(cloud_reader ${catkin_LIBRARIES}) +add_dependencies(cloud_reader safety_generate_messages_cpp) + + + diff --git a/Legacy/ws_linux/src/safety/README.txt b/Legacy/ws_linux/src/safety/README.txt new file mode 100644 index 0000000..aeb97f5 --- /dev/null +++ b/Legacy/ws_linux/src/safety/README.txt @@ -0,0 +1,29 @@ + + Package 'safety' prevents robot from crashing into obstacle. + Enables motor brakes when the distance is smaller than + minimum_distance specified in command-line. + + Note. After moving robot back into safe place, + turning on of breaks is needed. Also is + suggested to set robot cmd_vel to 0, + before restaring. + +------------------------------------------------------------------ + LAUNCHING + + To launch package, make sure roscore and modified RosAria (with + service stop_motors) is allready running. + + In terminal type: + + rosrun safety cloud_reader [minimal_distance] + + where minimal_distance is the distance to obstacle, where robot + breaks are enabled, measured in meters. + + Suggested minimal distance for Pionier is 0.7. + + + + + diff --git a/Legacy/ws_linux/src/safety/gnu_licence.txt b/Legacy/ws_linux/src/safety/gnu_licence.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/Legacy/ws_linux/src/safety/gnu_licence.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Legacy/ws_linux/src/safety/package.xml b/Legacy/ws_linux/src/safety/package.xml new file mode 100644 index 0000000..c73f4e1 --- /dev/null +++ b/Legacy/ws_linux/src/safety/package.xml @@ -0,0 +1,24 @@ + + + safety + 0.2.1 + Package prevents robot from crashing into obstacle. Enables robot brakes when the distance is smaller than minimum_distance. + + Aleksandra Grzelak + GNU GPLv3 + + message_generation + message_runtime + catkin + roscpp + rospy + std_msgs + rosaria + + roscpp + rospy + std_msgs + rosaria + + + diff --git a/Legacy/ws_linux/src/safety/src/cloud_reader.cpp b/Legacy/ws_linux/src/safety/src/cloud_reader.cpp new file mode 100644 index 0000000..74889de --- /dev/null +++ b/Legacy/ws_linux/src/safety/src/cloud_reader.cpp @@ -0,0 +1,198 @@ +/* ------------------------------------------------------------------------ + * cloud_reader + * + * copyright 2015 Aleksandra Grzelak + * + * Wroclaw University of Technology, + * 27 Wybrzeze Wyspianskiego St + * 50-370 Wroclaw, + * Poland, + * www.pwr.edu.pl + * + * Contact email: aleksandra.j.grzelak@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * ------------------------------------------------------------------------ */ + +#include "ros/ros.h" +#include "sensor_msgs/PointCloud.h" +#include +#include +#include +#include +#include +#include +#include + +#define N_POINTS_ 8 //because only 8 sonars are working in PIONIER + +/* SAFETY cloud_reader [minimum_distance] + * + * Package prevents robot from crashing into obstacle + * Enables motor brakes when the distance is smaller than + * minimum_distance + * + * Note. After moving robot back into safe place, + * it is needed to disable breaks. Also, it is + * suggested to set robot cmd_vel to 0, + * before restaring. + */ + +class SafeReader { + public: + ros::NodeHandle n; + + protected: + bool motors_on; // information for toggling motors + float stop_dist; // minimal distance to obstacle + + ros::ServiceClient client_stop; // client for stopping motors + std_srvs::Empty stop_srv; // service for stopping motors + ros::Subscriber sub_sonar; // subscriber from robot sonars + ros::Subscriber sub_dist; // subscriber from safe distance + + public: + + /* SafeReader + * constructor, gets namespace in node + * and initiates client responsible for stopping motors + * + * NOTE. requires modified RosAria with service stop_motors + */ + SafeReader() { + std::stringstream node_motor; + std::stringstream node_sonar; + std::stringstream node_distance; + node_motor << ros::this_node::getNamespace(); + motors_on=1; + set_stop_dist( 2.0 ); + + node_motor << "/RosAria/"; + node_sonar << node_motor.str() << "sonar"; + //node_distance << node_motor.str() << "distance"; + node_distance << "/PIONIER/distance"; + node_motor << "stop_motors"; + ROS_DEBUG( "namespace: [%10s]", node_motor.str().c_str() ); + client_stop = n.serviceClient< std_srvs::Empty >( node_motor.str().c_str() ); + sub_dist = n.subscribe( node_distance.str().c_str(), 100, &SafeReader::distance_callback, this ); + sub_sonar = n.subscribe( node_sonar.str().c_str(), 100, &SafeReader::reader_callback , this ); + + } + + /* get_stop_dist + * returns defined minimal distance, after which robot stops + */ + float get_stop_dist() const { + return stop_dist; + } + + /* set_stop_distance + * sets the minmal distance after which robot stops + * new_dist -- new minimal distance + */ + void set_stop_dist( float new_dist ) { + stop_dist = new_dist; + } + + /* get_motors + * returns if motors are enabled + * + * return value: + * 1 -- motors enabled, brakes off + * 0 -- motors disabled, brakes on + */ + bool get_motors() const { + return motors_on; + } + + /* calc_distance + * returns the distance to obstacle + * x,y -- coordinates of the obstacle + */ + float calc_distance( float x, float y ) { // (x,y) are obstacle coordinates + return sqrt(x*x+y*y); + } + + /* distance_callback + * after changing value of safe distance + * this safe distance is published + * after reciving safe_distance is set + * + * NOTE. After connecting new robot + * this message must be published. + */ + void distance_callback( const geometry_msgs::Vector3::ConstPtr & msg ) { + set_stop_dist( msg->x ); + ROS_DEBUG( "recieved new safe_dist: %0.3f", get_stop_dist() ); + } + + /* reader_callback + * after recieving message with coordinates of obstacle + * calculcates the distance, if the smallest distance is smaller + * than specified minimal distance, sets the parameter motors_on + * to 0 and enables robot breaks (calling the service stop_motors), + * otherwise parameter motors_on is set to 1. + * + * NOTE. Once the breaks are enabled, they must be disabled manually, + * even though the distance is proper. + */ + void reader_callback( const sensor_msgs::PointCloud::ConstPtr & msg ) { + geometry_msgs::Twist out; + float x,y, min_x, min_y; + float temp_dist, dist=99999; + for( int i=0; i < N_POINTS_; ++i ) { //all points from PointCloud + x=msg->points[i].x; + y=msg->points[i].y; + if( x != 0.0 && y != 0.0 ) { + temp_dist=calc_distance( x,y ); + if( dist > temp_dist ) { //get the smallest distance + dist=temp_dist; + min_x=x; + min_y=y; + } + } + } //endfor + + if( dist < get_stop_dist() ) { // disable motors + ROS_DEBUG( "Distance %0.3f too small (min: %0.3f)", dist, get_stop_dist() ); //DEBUG + motors_on=0; + client_stop.call( stop_srv ); + ROS_DEBUG( "Stopped motors" ); //DEBUG + } else { // distance ok + ROS_DEBUG( " Distance OK %0.3f, x=%0.3f, y=%0.3f (min: %0.3f)", dist, x,y, get_stop_dist() ); //DEBUG + motors_on=1; + } // endif + } +}; // SAFEREADER + + +int main( int argc, char **argv ) { + ros::init( argc, argv, "cloud_reader" ); + SafeReader reader; + + if( argc == 2 ) { // stop distance must be given in command-line + reader.set_stop_dist( atof( argv[1] ) ); + ROS_DEBUG( " Stop distance at [%0.3f] ", reader.get_stop_dist() ); + } else { + ROS_INFO( "Distance parameters not specified. Usage:\n cloud_reader [stop_distance] " ); + return 1; + } + + ROS_INFO( " Ready. "); + ros::spin(); + + return 0; +} diff --git a/Legacy/ws_linux/src/videostream/.gitignore b/Legacy/ws_linux/src/videostream/.gitignore new file mode 100644 index 0000000..9020de0 --- /dev/null +++ b/Legacy/ws_linux/src/videostream/.gitignore @@ -0,0 +1,2 @@ +*.*~ +*.sw* diff --git a/Legacy/ws_linux/src/videostream/CMakeLists.txt b/Legacy/ws_linux/src/videostream/CMakeLists.txt new file mode 100644 index 0000000..caed66f --- /dev/null +++ b/Legacy/ws_linux/src/videostream/CMakeLists.txt @@ -0,0 +1,160 @@ +cmake_minimum_required(VERSION 2.8.3) +project(videostream) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED COMPONENTS + roscpp + rospy + std_msgs + message_generation + ) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependencies might have been +## pulled in transitively but can be declared for certainty nonetheless: +## * add a build_depend tag for "message_generation" +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +add_service_files( + FILES + ip_get.srv +) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +generate_messages( + DEPENDENCIES + std_msgs # Or other packages containing msgs + ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( + INCLUDE_DIRS include + LIBRARIES videostream + CATKIN_DEPENDS message_runtime roscpp rospy std_msgs + DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +# include_directories(include) + +## Declare a cpp library +# add_library(videostream +# src/${PROJECT_NAME}/videostream.cpp +# ) + +## Declare a cpp executable +add_executable(videostream src/videostream.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +add_dependencies(videostream videostream_generate_messages_cpp) + +## Specify libraries to link a library or executable target against +target_link_libraries(videostream + ${catkin_LIBRARIES} + ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS videostream videostream_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_videostream.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/Legacy/ws_linux/src/videostream/include/Videostream.h b/Legacy/ws_linux/src/videostream/include/Videostream.h new file mode 100644 index 0000000..1e35e4c --- /dev/null +++ b/Legacy/ws_linux/src/videostream/include/Videostream.h @@ -0,0 +1,51 @@ +#ifndef __VIDEOSTREAM__ +#define __VIDEOSTREAM__ + +#include "ros/ros.h" +#include "videostream/ip_get.h" + +#include "std_msgs/String.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MAX_STREAMERS 1 +#define PORT_NR 1234 + +class Videostream { + public: + ros::NodeHandle n; + + protected: + std::map< std::string, pid_t > ip_list; + std::vector< std::string > dev_list; + int number_streamers; + + ros::ServiceServer service_add; + ros::ServiceServer service_rmv; + + int _find_free_device() const; + void _occupy_device( std::string ip, int dev_number ); + void _free_device( int dev_number ); + pid_t system2( const char * command, int * infp, int * outfp ) const; + bool _validate( const std::string & ip ) const; + bool _ip_exist( const std::string & ip ) const; + void DE_view_dev() const; + + public: + Videostream(); + + bool add_ip( videostream::ip_get::Request &req, videostream::ip_get::Response &res ) ; + bool remove_ip( videostream::ip_get::Request &req, videostream::ip_get::Response &res ); + +}; + +#endif diff --git a/Legacy/ws_linux/src/videostream/package.xml b/Legacy/ws_linux/src/videostream/package.xml new file mode 100644 index 0000000..fefd5f1 --- /dev/null +++ b/Legacy/ws_linux/src/videostream/package.xml @@ -0,0 +1,59 @@ + + + videostream + 0.0.0 + The videostream package + + + + + lab + + + + + + TODO + + + + + + + + + + + + + + + + + + + message_generation + + + + message_runtime + + + catkin + roscpp + rospy + std_msgs + roscpp + rospy + std_msgs + + + + + + + + + + + diff --git a/Legacy/ws_linux/src/videostream/src/videostream.cpp b/Legacy/ws_linux/src/videostream/src/videostream.cpp new file mode 100644 index 0000000..2b96918 --- /dev/null +++ b/Legacy/ws_linux/src/videostream/src/videostream.cpp @@ -0,0 +1,216 @@ +/* + * VIDEOSTREAM is a program for streaming video using ROS services + * + * Copyright (C) 2015 Aleksandra Grzelak (aleksandra.grzelak@pwr.edu.pl) + * Copyright (C) 2015 Damian Baranski (damian.baranski@pwr.edu.pl) + * + * Wroclaw University of Technology, + * 27 Wybrzeze Wyspianskiego St + * 50-370 Wroclaw, + * Poland, + * www.pwr.edu.pl + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + + +#include "../include/Videostream.h" + + +Videostream::Videostream() { + number_streamers=0; + dev_list.resize( MAX_STREAMERS ); + service_add = n.advertiseService("add_ip_to_stream", &Videostream::add_ip, this); + service_rmv = n.advertiseService("remove_ip_from_stream", &Videostream::remove_ip, this); +} + +int Videostream::_find_free_device() const { + for( int i=0; i < MAX_STREAMERS; ++i ) { + if( dev_list[i].empty() ) { + return i; + } + } + return -1; + +} + +void Videostream::_occupy_device( std::string ip, int dev_number ) { + dev_list[dev_number]=ip; + +} + +void Videostream:: _free_device( int dev_number ) { + dev_list[dev_number].clear(); +} + + +/* SYSTEM 2 + * launches command and returns pid of the process */ +pid_t Videostream::system2( const char * command, int * infp, int * outfp ) const { + int p_stdin[2]; + int p_stdout[2]; + pid_t pid; + + if( pipe( p_stdin ) == -1 ) + return -1; + + if( pipe( p_stdout) == -1 ) { + close( p_stdin[0] ); + close( p_stdin[1] ); + return -1; + } + + pid = fork(); + + if( pid < 0 ) { + close( p_stdin[0]); + close( p_stdin[1] ); + close( p_stdout[0] ); + close( p_stdout[1] ); + return pid; + } else if(pid == 0 ) { + close( p_stdin[1] ); + dup2( p_stdin[0], 0); + close( p_stdout[0] ); + dup2( p_stdout[1], 1 ); + dup2( ::open( "/dev/null", O_RDONLY ), 2 ); + /// Close all other descriptors for the safety sake. + for( int i = 3; i < 4096; ++i ) + ::close(i); + + setsid(); + execl( "/bin/sh", "sh", "-c", command, NULL ); + _exit( 1 ); + } + + close( p_stdin[0] ); + close( p_stdout[1] ); + + if( infp == NULL ) { + close( p_stdin[1] ); + } else { + *infp = p_stdin[1]; + } + + if( outfp == NULL ) { + close( p_stdout[0] ); + } else { + *outfp = p_stdout[0]; + } + + return pid; +} + +/* VALIDATE + * checks if given ip matches to be an ip address + * using regex */ +bool Videostream::_validate( const std::string & ip ) const{ + std::tr1::regex rx("[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?"); + return std::tr1::regex_match( ip.begin(), ip.end() ,rx ); +} + +bool Videostream::_ip_exist( const std::string & ip ) const { + if( ip_list.find( ip ) != ip_list.end() ) { + return true; + } + return false; +} + +void Videostream::DE_view_dev() const{ + for( std::vector < std::string >::const_iterator it=dev_list.begin(); it != dev_list.end(); ++it ) { + std::cout << *it << std::endl; + } +} +/* ADD_IP + * service for adding ip for streaming */ +bool Videostream::add_ip( + videostream::ip_get::Request &req, + videostream::ip_get::Response &res ) { + if( number_streamers >= MAX_STREAMERS ) { + ROS_INFO("[err] too much streamers "); + return false; + } + std::string ip_to_add=req.str.c_str(); + + if( ! _validate(ip_to_add) ) { + ROS_INFO("[err] illegal expresion "); + return false; + } + if( _ip_exist(ip_to_add) ) { + ROS_INFO("[err] ip already exists "); + return false; + } + int free_dev=_find_free_device(); + if( free_dev == -1 ) { + ROS_INFO("[err] no free device "); + return false; + } + + _occupy_device( ip_to_add, free_dev ); + ROS_INFO("[added %1s]", ip_to_add.c_str() ); + ++number_streamers; + + std::stringstream command; + command << "gst-launch v4l2src device=/dev/video" <::iterator vect_iter; + + vect_iter= std::find( dev_list.begin(), dev_list.end(), ip_to_del ) ; // make ip empty + if( vect_iter == dev_list.end() ) { + ROS_INFO("[err] no device found "); + return false; + } + vect_iter->clear(); + ip_list.erase(iter); + DE_view_dev(); + return true; + +} + + +/* ========= MAIN =================*/ +int main(int argc, char**argv ) { + ros::init(argc,argv,"videostream"); + Videostream video; + ROS_INFO("Ready to stream"); + ros::spin(); + return 0; +} + + diff --git a/Legacy/ws_linux/src/videostream/srv/ip_get.srv b/Legacy/ws_linux/src/videostream/srv/ip_get.srv new file mode 100644 index 0000000..53ee91c --- /dev/null +++ b/Legacy/ws_linux/src/videostream/srv/ip_get.srv @@ -0,0 +1,2 @@ +string str +--- diff --git a/ros.desktop b/ros.desktop deleted file mode 100755 index 7a71050..0000000 --- a/ros.desktop +++ /dev/null @@ -1,7 +0,0 @@ -# Pleace change ${ID} to ID of robot -[Desktop Entry] -Type=Application -Exec=/home/lab1_5/run.sh ${ID} -Hidden=false -NoDisplay=false -Name=ros diff --git a/run.sh b/run.sh deleted file mode 100755 index 759723d..0000000 --- a/run.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -ID=$1 -if [[ -n ${ID//[0-9]/} ]]; then - echo "Invalid pioneer number!" - exit 1 -fi -source /opt/ros/hydro/setup.bash -source /home/lab1_5/ws/ws_linux/devel/setup.bash -export ROS_MASTER_URI='http://10.104.16.29:11311' -export ROS_IP=10.104.16.4${ID} -export PIONIER_ID=${ID} -export ROS_NAMESPACE=/PIONIER${ID} - -#rosrun rosaria RosAria _port:=/dev/ttyS0 & >/dev/null 2>&1 -rosrun rosaria RosAria _port:=/dev/ttyS0 _tf_prefix:=/PIONIER${ID} & -#rosrun safety cloud_reader 0.7 & -rosrun hokuyo_node hokuyo_node _frame_id:="${ROS_NAMESPACE}/laser" & -#rosrun videostream videostream & -#cvlc v4l2:///dev/video0 :v4l2-standard= :sout='#transcode{vcodec=FLV1,vb=0,scale=0,acodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/}' :sout-keep :live-caching=300 &